Frame 1
function preload(clip, goFrame) {
clip.currentPos = 0;
clip.goFrame = goFrame;
clip.tl = clip;
clip.root = _global.root;
clip.ready = false;
clip.onEnterFrame = function () {
var _local3 = this.root.getBytesLoaded();
var _local6 = this.root.getBytesTotal();
var _local4 = Math.round((100 / _local6) * _local3);
var _local5 = Math.round((_local4 - this.currentPos) / 4);
if (_local5 < 1) {
_local5 = 1;
}
this.currentPos = this.currentPos + _local5;
if (this.currentPos >= _local4) {
this.currentPos = _local4;
}
if (_local3 > 16) {
this.p_txt.text = this.currentPos;
_global.t.text = _global.t.text + (newline + this.currentPos);
this.dial_mc.gotoAndStop(this.currentPos);
if ((this.currentPos >= 100) && (_local3 >= _local6)) {
delete this.onEnterFrame;
_global.t.text = _global.t.text + "\r\rLOADED";
this.tl.gotoAndPlay(goFrame);
}
}
};
}
_global.root = this;
if (((_root.CID == undefined) || (_root.CID == "")) || (_root.CID == null)) {
_root.CID = "88";
}
if (((_root.PID == undefined) || (_root.PID == "")) || (_root.PID == null)) {
_root.PID = "4mations_Booty";
}
if (((_root.EXIT_LABEL == undefined) || (_root.EXIT_LABEL == "")) || (_root.EXIT_LABEL == null)) {
_root.EXIT_LABEL = "mainClientLogo";
}
if (((_root.EXIT_LINK == undefined) || (_root.EXIT_LINK == "")) || (_root.EXIT_LINK == null)) {
_root.EXIT_LINK = "http://www.4mations.tv";
}
_global.exitLink = function () {
SeqTrackerAdaptor.campaignExit(_root.EXIT_LINK, _root.EXIT_LABEL);
};
_global.trackAction = function () {
SeqTrackerAdaptor.trackActionByLabel();
};
com.teamrubber.SeqTrackerAdaptor.setProjectDetails(this.tracker_comp);
com.teamrubber.SeqTrackerAdaptor.initTracker();
stop();
Frame 10
com.bentempleton.Screens.setup(this);
Frame 25
com.bentempleton.Screens.setupSplash();
stop();
Frame 35
stop();
com.bentempleton.Screens.setupInstructions();
Frame 45
com.bentempleton.Game.root = this;
com.bentempleton.Game.UI = this.interface_mc;
com.bentempleton.Game.char = new com.bentempleton.Character({headBase:head_mc, l_1:h_l_1, l_2:h_l_2, l_3:h_l_3, r_3:h_r_3, r_2:h_r_2, r_1:h_r_1, t_l:t_l, t_r:t_r});
com.bentempleton.Game.__get__instance().setup();
com.bentempleton.Screens.endScreen = this.endScreen_mc;
com.bentempleton.Screens.endScreen._visible = false;
Frame 48
stop();
com.bentempleton.Screens.setupGameScreen();
Symbol 6 MovieClip Frame 5
gotoAndPlay (1);
Symbol 43 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 20
stop();
_global.root.preload(this, "loaded");
Symbol 48 MovieClip Frame 55
stop();
_global.root.gotoAndPlay("init");
Symbol 52 MovieClip [tracker_] Frame 1
#initclip 22
Object.registerClass("tracker_", com.rubberductions.Tracker);
#endinitclip
Symbol 672 MovieClip [__Packages.com.teamrubber.SeqTrackerAdaptor] Frame 0
class com.teamrubber.SeqTrackerAdaptor
{
static var CAMPAIGN_ID, PROJECT_ID, instance;
function SeqTrackerAdaptor () {
init();
setup();
}
function init() {
}
function setup() {
}
static function initTracker() {
if (active) {
getInstance().comp.setVerbose(true);
getInstance().comp.setBaseURL(BASE_URL);
getInstance().comp.setCampaignID(CAMPAIGN_ID);
getInstance().comp.setProjectID(PROJECT_ID);
getInstance().comp.initialise(doLoad);
getInstance().comp._visible = false;
}
}
static function doLoad() {
getInstance().comp.load();
}
static function campaignExit(link, from) {
var _local1;
var _local3;
trace("TRACKER : " + from);
if ((from == undefined) || (from == "")) {
_local1 = "exitLink";
} else {
_local1 = from;
}
if ((link == undefined) || (link == "")) {
_local3 = "http://www.4mations.tv";
} else {
_local3 = link;
}
if (active) {
getInstance().comp.exit(_local3, _local1, "_blank");
}
}
static function sendToFriendConversion() {
if (active) {
getInstance().comp.conversion("n/a", "sendToFriend");
}
}
static function trackActionByLabel(label) {
if (active) {
if ((label == undefined) || (label == "")) {
label = ACTION_LABEL;
}
getInstance().comp.view(label);
}
}
static function setComponentReference(comp) {
if (active) {
getInstance().comp = comp;
}
}
static function setProjectDetails(comp) {
setComponentReference(comp);
if (((_root.CID == undefined) || (_root.CID == "")) || (_root.CID == null)) {
_root.CID = undefined;
}
if (((_root.PID == undefined) || (_root.PID == "")) || (_root.PID == null)) {
_root.PID = "not_defined";
}
if (active) {
CAMPAIGN_ID = _root.CID;
PROJECT_ID = _root.PID;
}
}
static function getInstance() {
if (!instance) {
instance = new com.teamrubber.SeqTrackerAdaptor();
}
return(instance);
}
static var BASE_URL = "http://tracking.viralmanager.com/tracking/";
static var ACTION_LABEL = "play";
static var active = true;
static var projectViewed = false;
}
Symbol 673 MovieClip [__Packages.com.bentempleton.Arc] Frame 0
class com.bentempleton.Arc extends MovieClip
{
var root, typeRef, holder, hitAreas, addEventListener, dir, inc, gotoAndStop, onEnterFrame, ITEM, removeMovieClip, _currentframe, _totalframes, arcRef;
function Arc () {
super();
root = this;
mx.events.EventDispatcher.initialize(this);
init();
setup();
}
function init() {
typeRef = "arc";
holder = root.item_mc;
hitAreas = new Array(root.l_mc, root.r_mc, root.seabed_mc);
addEventListener("collision", com.bentempleton.Game.__get__instance());
var _local5 = root.mask_true;
var _local2 = root.mask_false;
var _local3 = root.guide_true;
var _local4 = root.guide_false;
_local3.setMask(_local5);
_local4.setMask(_local2);
}
function setup() {
}
function doThrow(item, dir) {
this.dir = dir;
catchItem(item);
setMasking();
if (dir) {
inc = 1;
gotoAndStop("l_hand");
} else {
gotoAndStop("r_hand");
inc = -1;
}
onEnterFrame = EF;
}
function catchItem(item) {
trace(">>>>>>>>>>>>> CATCH ITEM");
ITEM = item;
holder.setITEM(ITEM);
ITEM.outer = this;
ITEM.setup("throw", dir);
}
function clearItem() {
removeMovieClip();
}
function EF() {
gotoAndStop(_currentframe + inc);
if (((inc == 1) && (_currentframe == _totalframes)) || ((inc == -1) && (_currentframe == 1))) {
killAnimation(true);
}
}
function killAnimation(force) {
trace("\t\t{}Arc killAnimation()");
delete onEnterFrame;
if (force) {
clearItem();
removeMovieClip();
}
}
function setMasking() {
var _local3 = root["guide_" + dir];
var _local2 = root["guide_" + (!dir)];
_local3._visible = true;
_local2._visible = false;
}
function get side() {
if (dir) {
return(arcRef.substr(0, 1));
}
return(arcRef.substr(4, 1));
}
}
Symbol 674 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 675 MovieClip [__Packages.com.bentempleton.Game] Frame 0
class com.bentempleton.Game
{
static var UI, root, char, uniqueInstance;
var totalItems, inPlay, scoreVals, gameLevel, gameplay, timer, droppedDefaults, totalBombs, dropPaths, limbsRequired, lifeDrop, startItems, lastRewardDrop, distractionInterval, rewardInterval, totalScore, lastDistractionDrop;
function Game () {
}
function init() {
mx.events.EventDispatcher.initialize(this);
totalItems = 6;
com.bentempleton.User.__get__instance().playCount = 0;
}
function setup() {
inPlay = false;
scoreVals = new Object();
scoreVals.good = new Object({bomb:500, caught:100, points:500, life:500});
scoreVals.bad = new Object({bomb:-500, drop:-100});
gameLevel = 0;
gameplay = new Array({scoreBounds:2000, decent:6000, maxPerDropPath:1, delayBetweenDrops:10000, maxBombs:1}, {scoreBounds:3000, decent:5800, maxPerDropPath:1, delayBetweenDrops:9000, maxBombs:1}, {scoreBounds:5000, decent:5600, maxPerDropPath:1, delayBetweenDrops:8000, maxBombs:1}, {scoreBounds:7000, decent:5400, maxPerDropPath:1, delayBetweenDrops:7000, maxBombs:2}, {scoreBounds:9000, decent:5200, maxPerDropPath:1, delayBetweenDrops:6000, maxBombs:2}, {scoreBounds:10000, decent:5000, maxPerDropPath:1, delayBetweenDrops:6000, maxBombs:2}, {scoreBounds:11000, decent:4800, maxPerDropPath:2, delayBetweenDrops:5000, maxBombs:2}, {scoreBounds:12000, decent:4600, maxPerDropPath:2, delayBetweenDrops:5000, maxBombs:3}, {scoreBounds:13000, decent:4300, maxPerDropPath:2, delayBetweenDrops:4000, maxBombs:3}, {scoreBounds:14000, decent:4000, maxPerDropPath:2, delayBetweenDrops:3000, maxBombs:4});
timer = new com.bentempleton.Timer(UI, "countup");
timer.setup();
droppedDefaults = new Array();
totalBombs = 0;
dropPaths = new Array(root.d_l_1, root.d_l_2, root.d_l_3, root.d_r_3, root.d_r_2, root.d_r_1);
var _local4 = 0;
while (_local4 < dropPaths.length) {
dropPaths[_local4].setup();
_local4++;
}
limbsRequired = new Array();
lifeDrop = new Object({startTime:getTimer(), dropDelay:10000});
var _local11 = new com.bentempleton.Item("cutlass", true);
var _local10 = new com.bentempleton.Item("spyglass", true);
var _local9 = new com.bentempleton.Item("pistol", true);
var _local8 = new com.bentempleton.Item("compass", true);
var _local13 = new com.bentempleton.Item("barrel", true);
var _local12 = new com.bentempleton.Item("scroll", true);
startItems = new Array(_local11, _local10, _local9, _local8, _local13, _local12);
_local4 = 0;
while (_local4 < allHands.length) {
var _local6 = Math.floor(Math.random() * startItems.length);
var _local7 = startItems.splice(_local6, 1)[0];
allHands[_local4].setup();
allHands[_local4].catchItem(_local7);
allHands[_local4].trigger.enabled = false;
var _local5 = allHands[_local4]._name.split("h_")[1];
if (_local5.split("_")[0] == "l") {
var _local2 = 1;
while (_local2 < 4) {
var _local3 = (_local5 + "_r_") + _local2;
setArc(_local3);
setArc(_local3);
_local2++;
}
}
_local4++;
}
char.resetTreasure();
setScore(0, true);
setLives(3, true);
}
function newGame() {
setup();
startGame();
}
function startGame() {
_root._quality = "MEDIUM";
var _local4 = 0;
while (_local4 < allHands.length) {
allHands[_local4].trigger.enabled = true;
_local4++;
}
_local4 = 0;
while (_local4 < dropPaths.length) {
dropPaths[_local4].clearAll();
_local4++;
}
inPlay = true;
com.bentempleton.User.__get__instance().playCount++;
timer.startTimer();
lastRewardDrop = getTimer();
distractionInterval = setInterval(this, "dropDistraction", 1000);
rewardInterval = setInterval(this, "dropReward", 1000);
dropDistraction("bomb");
_global.snd.playSound("loop", 9999);
}
function endGame() {
_root._quality = "HIGH";
inPlay = false;
timer.killTimer();
clearInterval(rewardInterval);
clearInterval(distractionInterval);
com.bentempleton.User.__get__instance().__set__currTime(totalScore);
var _local4 = 0;
while (_local4 < allHands.length) {
allHands[_local4].trigger.enabled = false;
_local4++;
}
_local4 = 0;
while (_local4 < dropPaths.length) {
dropPaths[_local4].clearAll();
_local4++;
}
com.bentempleton.Screens.setupEndScreen();
_global.snd.stopSound("loop");
_global.snd.playSound("game_over", 1);
}
function doThrow(fromHand, item) {
trace("-------------- DO THROW");
var _local4;
var _local5;
if (fromHand.side == "l") {
_local4 = "r";
_local5 = true;
} else {
_local4 = "l";
_local5 = false;
}
var _local2 = fromHand.posRef;
var _local3 = (_local4 + "_") + Math.ceil(Math.random() * 3);
var _local8 = ((fromHand.side == "l") ? ((_local2 + "_") + _local3) : ((_local3 + "_") + _local2));
var _local6 = getArc(_local8);
_local6.doThrow(item, _local5);
}
function collision(evObj) {
if (inPlay == false) {
return(undefined);
}
var _local3 = evObj.item;
var _local4 = root["h_" + evObj.hitClip._name.substr(2, 3)];
if (evObj.hitClip._name == "seabed_mc") {
if (_local3.defaultItem) {
var _local6 = (6 - droppedDefaults.length) * 1000;
_local6 = _local6 - 2000;
if (_local6 < 1000) {
_local6 = 1000;
}
droppedDefaults.push({itemType:_local3.itemType, startTime:getTimer(), dropDelay:_local6});
setScore(scoreVals.bad.drop);
_global.snd.playSound("drop", 1);
} else if (_local3.itemType == "bomb") {
evObj.outer.killAnimation(false);
_local3.bombCountdown(true);
}
} else if (_local4 != undefined) {
if (((_local4.empty && (_local4.active)) && (_local3.active)) || (_local3.itemType == "limb")) {
setScore(instance.scoreVals.good.caught);
if (_local3.itemType == "limb") {
_local3.limbSuccess = true;
}
evObj.outer.clearItem(_local3);
_local4.catchItem(_local3);
_global.snd.playSound("catch", 1);
}
}
}
function specialEvent(evObj) {
if (inPlay == false) {
return(undefined);
}
if (evObj.special == "bomb") {
trace("================================ EXPLOSION");
totalBombs--;
if (totalBombs < 0) {
totalBombs = 0;
}
_global.snd.playSound("bomb_explode", 1);
_global.snd.setupAfade("bomb_tick", 0, -10, true);
dropDistraction();
if (evObj.holder.hitTest(root.hitAreas_mc.seabed_mc)) {
_global.snd.playSound("treasure_explode", 1);
setScore(scoreVals.bad.bomb);
setLives(-1);
_global.snd.playSound("lose_life", 1);
var _local5 = new Object({x:evObj.item.holder._x, y:0});
evObj.item.holder.localToGlobal(_local5);
var _local6 = ((_local5.x > 200) ? "r" : "l");
char.damageTreasure(_local6);
char.setExpression("lose_life");
} else {
var _local4 = ((evObj.outer.typeRef == "hand") ? (evObj.outer) : undefined);
if (_local4 != undefined) {
trace("==================== LOSE HAND");
var _local8 = (6 - limbsRequired.length) * 500;
if (limbsRequired.length > 3) {
_local8 = 500;
}
limbsRequired.push({startTime:getTimer(), dropDelay:_local8});
char.loseLimb(_local4);
getDropPath(_local4.posRef).limbRequired();
evObj.item.limbSuccess = false;
setScore(scoreVals.bad.bomb);
} else {
trace("==================== !! SUCCESS");
evObj.item.bombSuccess = true;
evObj.outer.killAnimation(false);
setScore(scoreVals.good.bomb);
}
}
}
}
function levelUp() {
if ((gameLevel < (gameplay.length - 1)) && (inPlay)) {
gameLevel++;
trace((("***************************** LEVEL UP " + (gameLevel - 1)) + " | ") + gameLevel);
}
}
function dropReward() {
if (droppedDefaults.length > 0) {
var _local3 = 0;
while (_local3 < droppedDefaults.length) {
var _local2 = droppedDefaults[_local3];
if (((getTimer() - _local2.startTime) > _local2.dropDelay) && ((getTimer() - lastRewardDrop) > 2000)) {
var _local4 = putDropItem(_local2.itemType);
if (_local4) {
droppedDefaults.splice(_local3, 1);
lastRewardDrop = getTimer();
}
return(undefined);
}
_local3++;
}
}
if (limbsRequired.length > 0) {
var _local3 = 0;
while (_local3 < limbsRequired.length) {
var _local2 = limbsRequired[_local3];
if (((getTimer() - _local2.startTime) > _local2.dropDelay) && ((getTimer() - lastRewardDrop) > 2000)) {
var _local4 = putDropItem("limb");
if (_local4) {
lastRewardDrop = getTimer();
limbsRequired.splice(_local3, 1);
trace((((("\t\tDROP ITEM : " + _local2.startTime) + " : ") + (getTimer() - _local2.startTime)) + " : ") + _local2.dropDelay);
}
return(undefined);
}
_local3++;
}
}
if (((com.bentempleton.User.__get__instance().totalLives < 3) && ((getTimer() - lifeDrop.startTime) > lifeDrop.dropDelay)) && (gameLevel < 9)) {
lifeDrop.startTime = getTimer();
var _local5 = (((Math.random() * 4) > 2) ? true : false);
if (_local5 && ((getTimer() - lastRewardDrop) > 2000)) {
putDropItem("life");
lastRewardDrop = getTimer();
}
}
}
function dropDistraction(forcedItem) {
if ((totalBombs < levelProps.maxBombs) || (forcedItem != undefined)) {
var _local4 = new Array("bomb", "bomb", "bomb", "points");
var _local5 = Math.floor(Math.random() * _local4.length);
var _local3 = _local4[_local5];
if (forcedItem != undefined) {
_local3 = forcedItem;
}
var _local2 = false;
if (((getTimer() - lastDistractionDrop) > levelProps.delayBetweenDrops) || (totalBombs < 1)) {
_local2 = putDropItem(_local3);
}
if (_local2) {
lastDistractionDrop = getTimer();
}
if ((_local3 == "bomb") && (_local2)) {
totalBombs++;
}
}
}
function putDropItem(itemRef) {
if (inPlay == false) {
return(undefined);
}
var _local6 = Math.floor(Math.random() * dropPaths.length);
var _local3 = dropPaths[_local6];
if (itemRef == "limb") {
var _local2 = 0;
while (_local2 < dropPaths.length) {
if (dropPaths[_local2].awaitingLimb) {
_local3 = dropPaths[_local2];
break;
}
_local2++;
}
}
_local3.itemRef = itemRef;
var _local8 = (((((itemRef != "limb") && (itemRef != "life")) && (itemRef != "points")) && (itemRef != "bomb")) ? true : false);
var _local7 = new com.bentempleton.Item(itemRef, _local8);
var _local5 = _local3.doDrop(_local7);
return(_local5);
}
function getArc(ref) {
var _local3;
for (var _local5 in root.arcs_mc) {
var _local2 = root.arcs_mc[_local5];
if (_local2.arcRef == ref) {
_local3 = _local2;
break;
}
}
setArc(ref);
_local3._visible = true;
return(_local3);
}
function setArc(arcRef) {
var _local2 = root.arcs_mc.getNextHighestDepth();
var _local1 = root.arcs_mc.attachMovie(arcRef, (arcRef + "_d_") + _local2, _local2);
_local1.arcRef = arcRef;
_local1._visible = false;
}
function getTargetHandByArc(arc) {
var _local1 = arc._name.split("_");
if (arc.inc == 1) {
return(root["h_r_" + _local1[3]]);
}
return(root["h_l_" + _local1[1]]);
}
function get levelProps() {
return(gameplay[gameLevel]);
}
function getDropPath(posRef) {
var _local2 = 0;
while (_local2 < dropPaths.length) {
if (dropPaths[_local2].posRef == posRef) {
return(dropPaths[_local2]);
}
_local2++;
}
}
function get itemsDropping() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < dropPaths.length) {
_local3 = _local3 + dropPaths[_local2].itemCount;
_local2++;
}
return(_local3);
}
function getCountForDropItem(itemRef) {
var _local3 = 0;
var _local2 = 0;
while (_local2 < dropPaths.length) {
_local3 = _local3 + dropPaths[_local2].itemCount;
_local2++;
}
return(_local3);
}
function setScore(val, force) {
if ((totalScore <= levelProps.scoreBounds) && ((totalScore + val) > levelProps.scoreBounds)) {
levelUp();
}
if (force) {
totalScore = val;
} else {
totalScore = totalScore + val;
}
UI.score_txt.text = totalScore;
}
function setLives(val, force) {
if (val == -1) {
} else if (val == 1) {
_global.snd.playSound("life", 1);
setScore(scoreVals.good.life);
}
if (force) {
com.bentempleton.User.__get__instance().totalLives = val;
} else {
com.bentempleton.User.__get__instance().totalLives = com.bentempleton.User.__get__instance().totalLives + val;
}
if (com.bentempleton.User.__get__instance().totalLives < 1) {
endGame();
}
UI.lives_mc.gotoAndStop(com.bentempleton.User.__get__instance().totalLives + 1);
char.setLives(com.bentempleton.User.__get__instance().totalLives);
}
static function get instance() {
if (uniqueInstance == undefined) {
uniqueInstance = new com.bentempleton.Game();
uniqueInstance.init();
}
return(uniqueInstance);
}
function get allHands() {
return(char.hands);
}
}
Symbol 676 MovieClip [__Packages.com.bentempleton.User] Frame 0
class com.bentempleton.User
{
static var uniqueInstance;
var bestTime, finalTime, __get__currTime;
function User () {
}
function init() {
}
function setup() {
}
function set currTime(t) {
if ((t > bestTime) || (bestTime == undefined)) {
bestTime = t;
}
finalTime = t;
//return(__get__currTime());
}
static function get instance() {
if (uniqueInstance == undefined) {
uniqueInstance = new com.bentempleton.User();
uniqueInstance.init();
}
return(uniqueInstance);
}
}
Symbol 677 MovieClip [__Packages.com.bentempleton.Timer] Frame 0
class com.bentempleton.Timer
{
var root, timerType, updateFreq, alarms, interval, pauseTotal, pauseFrom, startTime, isRunning, elapsed, currTime, max, dispatchEvent, min, addEventListener;
function Timer (root, timerType) {
this.root = root;
this.timerType = ((timerType != undefined) ? (timerType) : "countup");
mx.events.EventDispatcher.initialize(this);
init();
}
function init() {
updateFreq = 100;
alarms = new Array();
}
function setup() {
reset();
updateTimer();
}
function reset() {
clearInterval(interval);
pauseTotal = 0;
pauseFrom = 0;
startTime = getTimer();
}
function startTimer() {
reset();
startTime = getTimer();
isRunning = true;
interval = setInterval(this, "updateTimer", updateFreq);
updateTimer();
}
function killTimer() {
updateTimer();
clearInterval(interval);
return(elapsed);
}
function pauseTimer(boo) {
if (boo) {
pauseFrom = getTimer();
clearInterval(interval);
} else if (isRunning) {
var _local2 = getTimer() - pauseFrom;
pauseTotal = pauseTotal + _local2;
startTime = startTime + _local2;
clearInterval(interval);
interval = setInterval(this, "updateTimer", updateFreq);
}
}
function updateTimer() {
currTime = getTimer();
checkAlarms();
if (timerType == "countup") {
elapsed = currTime - startTime;
if ((elapsed >= max) && (max != undefined)) {
dispatchEvent({type:"endGame", finalTime:elapsed});
elapsed = max;
}
} else if (timerType == "countdown") {
elapsed = startTime - currTime;
if ((elapsed <= min) && (min != undefined)) {
dispatchEvent({type:"endGame", finalTime:elapsed});
elapsed = min;
}
}
updateInterface();
}
function checkAlarms() {
if (alarms.length > 0) {
var _local2 = 0;
while (_local2 < alarms.length) {
if (alarms[_local2].pending && (alarms[_local2].val < elapsed)) {
alarms[_local2].pending = false;
dispatchEvent({type:alarms[_local2].type, elapsed:elapsed});
}
_local2++;
}
}
}
function setLoopAlarm(interval, num, type, listener) {
addEventListener(type, listener);
var _local2 = 1;
while (_local2 <= num) {
alarms.push({val:interval * _local2, type:type, pending:true, loopNum:_local2 + 1});
_local2++;
}
}
function updateInterface() {
root.time_txt.text = com.bentempleton.Utils.formatTime(elapsed, "m-s");
}
}
Symbol 678 MovieClip [__Packages.com.bentempleton.Utils] Frame 0
class com.bentempleton.Utils
{
static var colours;
function Utils () {
init();
setup();
}
function init() {
colours = new Object();
colours.pink = {ra:0, rb:248, ga:0, gb:0, ba:0, bb:101, aa:100, ab:0};
colours.green = {ra:0, rb:50, ga:0, gb:140, ba:0, bb:19, aa:100, ab:0};
colours.orange = {ra:0, rb:255, ga:0, gb:88, ba:0, bb:19, aa:100, ab:0};
colours.maroon = {ra:0, rb:118, ga:0, gb:0, ba:0, bb:49, aa:100, ab:0};
colours.purple = {ra:0, rb:97, ga:0, gb:85, ba:0, bb:169, aa:100, ab:0};
colours.navy = {ra:0, rb:0, ga:0, gb:108, ba:0, bb:116, aa:100, ab:0};
colours.sky = {ra:0, rb:0, ga:0, gb:177, ba:0, bb:227, aa:100, ab:0};
colours.grey = {ra:0, rb:115, ga:0, gb:88, ba:0, bb:62, aa:100, ab:0};
colours.white = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
colours.black = {ra:0, rb:0, ga:0, gb:0, ba:0, bb:0, aa:100, ab:0};
}
function setup() {
}
static function boxStretch(clip, val, plane) {
if (plane == undefined) {
plane == "_y";
}
var _local2 = (((plane == "_y") || (plane == undefined)) ? "_height" : "_width");
var _local3 = clip.cap_mc;
var _local4 = clip.mid_mc;
var _local5 = clip.base_mc;
_local3[plane] = val - _local3[_local2];
_local4[_local2] = (_local3[plane] + 1) - (_local5[_local2] - 1);
_local4[plane] = _local5[_local2] - 1;
}
static function applyTint(clip, hex) {
var _local1 = hexToRgb(hex);
var _local2 = new flash.filters.ColorMatrixFilter([_local1.rb / 255, 0, 0, 0, 0, 0, _local1.gb / 255, 0, 0, 0, 0, 0, _local1.bb / 255, 0, 0, 0, 0, 0, 1, 0]);
clip.filters = [_local2];
}
static function setColour(clip, colour) {
var _local1 = new Color(clip);
_local1.setTransform(colour);
}
static function hexToRgb(hex) {
var _local2 = hex >> 16;
var _local1 = hex ^ (_local2 << 16);
var _local3 = _local1 >> 8;
var _local4 = _local1 ^ (_local3 << 8);
return({rb:_local2, gb:_local3, bb:_local4});
}
static function shortenSentence(str, limit) {
var _local3 = str.split(" ");
var _local2 = "";
var _local1 = 0;
while ((_local2.length < limit) && (_local1 < _local3.length)) {
_local2 = _local2 + (_local3[_local1] + " ");
_local1++;
}
_local2 = _local2 + "...";
return(_local2);
}
static function capFirstLetters(str) {
function capFirstLetter(str) {
str = str.toUpperCase();
var _local2 = str.slice(1);
_local2 = _local2.toLowerCase();
str = str.slice(0, 1) + _local2;
return(str);
}
str = capFirstLetter(str);
var _local4 = str.split("-");
if (_local4.length > 1) {
var _local2 = 0;
while (_local2 < _local4.length) {
_local4[_local2] = capFirstLetter(_local4[_local2]);
_local2++;
}
str = _local4.join("-");
}
var _local3 = str.split(" ");
if (_local3.length > 1) {
var _local1 = 0;
while (_local1 < _local3.length) {
_local3[_local1] = capFirstLetter(_local3[_local1]);
_local1++;
}
str = _local3.join(" ");
}
return(str);
}
static function createRect(root, bounds, colour, opacity) {
if (bounds.x == undefined) {
bounds.x = 0;
}
if (bounds.y == undefined) {
bounds.y = 0;
}
if (bounds.w == undefined) {
bounds.w = 500;
}
if (bounds.h == undefined) {
bounds.h = 500;
}
if (colour == undefined) {
colour = 13421772 /* 0xCCCCCC */;
}
if (opacity == undefined) {
opacity = 100;
}
root.beginFill(colour, opacity);
root.moveTo(bounds.x, bounds.y);
root.lineTo(bounds.x + bounds.w, bounds.y);
root.lineTo(bounds.x + bounds.w, bounds.y + bounds.h);
root.lineTo(bounds.x, bounds.y + bounds.h);
root.lineTo(bounds.x, bounds.y);
root.endFill();
return(root);
}
static function createLine(root, points, lineStyle, depth) {
if (depth == undefined) {
depth = root.getNextHighestDepth();
}
if (lineStyle == undefined) {
lineStyle = new Object({});
}
if (lineStyle.weight == undefined) {
lineStyle.weight = 1;
}
if (lineStyle.colour == undefined) {
lineStyle.colour = 16711680 /* 0xFF0000 */;
}
if (lineStyle.alpha == undefined) {
lineStyle.alpha = 100;
}
var _local3 = root.createEmptyMovieClip("newLine" + depth, depth);
_local3.lineStyle(lineStyle.weight, lineStyle.colour, lineStyle.alpha);
_local3.moveTo(points[0].x, points[0].y);
var _local1 = 1;
while (_local1 < points.length) {
_local3.lineTo(points[_local1].x, points[_local1].y);
_local1++;
}
return(_local3);
}
static function createCircle(root, props, depth, TL) {
if (props.x == undefined) {
props.x = 0;
}
if (props.y == undefined) {
props.y = 0;
}
if (props.r == undefined) {
props.r = 50;
}
depth = ((depth == undefined) ? (root.getNextHighestDepth()) : (depth));
var _local2 = root.createEmptyMovieClip("circle", depth);
_local2.lineStyle(0, 16777215);
_local2.moveTo(props.x + props.r, props.y);
_local2.curveTo(props.r + props.x, (0.414213562373095 * props.r) + props.y, (0.707106781186547 * props.r) + props.x, (0.707106781186547 * props.r) + props.y);
_local2.curveTo((0.414213562373095 * props.r) + props.x, props.r + props.y, props.x, props.r + props.y);
_local2.curveTo((-0.414213562373095 * props.r) + props.x, props.r + props.y, (-0.707106781186547 * props.r) + props.x, (0.707106781186547 * props.r) + props.y);
_local2.curveTo((-props.r) + props.x, (0.414213562373095 * props.r) + props.y, (-props.r) + props.x, props.y);
_local2.curveTo((-props.r) + props.x, (-0.414213562373095 * props.r) + props.y, (-0.707106781186547 * props.r) + props.x, (-0.707106781186547 * props.r) + props.y);
_local2.curveTo((-0.414213562373095 * props.r) + props.x, (-props.r) + props.y, props.x, (-props.r) + props.y);
_local2.curveTo((0.414213562373095 * props.r) + props.x, (-props.r) + props.y, (0.707106781186547 * props.r) + props.x, (-0.707106781186547 * props.r) + props.y);
_local2.curveTo(props.r + props.x, (-0.414213562373095 * props.r) + props.y, props.r + props.x, props.y);
if (TL) {
_local2._x = _local2._x + props.r;
_local2._y = _local2._y + props.r;
}
}
static function addDropShadow(clip) {
var _local6 = 0;
var _local2 = 90;
var _local5 = 0;
var _local13 = 0.38;
var _local9 = 5;
var _local8 = 5;
var _local11 = 1;
var _local3 = 3;
var _local7 = false;
var _local12 = false;
var _local10 = false;
var _local4 = new flash.filters.DropShadowFilter(_local6, _local2, _local5, _local13, _local9, _local8, _local11, _local3, _local7, _local12, _local10);
var _local1 = new Array();
_local1.push(_local4);
clip.filters = _local1;
}
static function layoutMedia(clip, maxW, maxH) {
var _local7;
var _local4;
var _local5;
var _local3;
var _local2;
var _local8;
var _local6;
if (clip._width > clip._height) {
_local7 = "_xscale";
_local4 = "_yscale";
_local5 = "_width";
_local3 = "_height";
_local2 = "_y";
_local8 = maxH;
_local6 = maxW;
} else {
_local7 = "_yscale";
_local4 = "_xscale";
_local5 = "_height";
_local3 = "_width";
_local2 = "_x";
_local8 = maxW;
_local6 = maxH;
}
clip[_local5] = _local6;
clip[_local4] = clip[_local7];
clip[_local2] = (_local8 / 2) - (clip[_local3] / 2);
}
static function traceLV(obj, t) {
if (t == undefined) {
t = "";
}
trace(t + " ---------------------");
for (var _local2 in obj) {
trace((("| " + _local2) + " : ") + obj[_local2]);
}
trace(newline);
}
static function traceOBJ(obj, t) {
if (t == undefined) {
t = "*";
}
trace(t + " ---------------------");
for (var _local2 in obj) {
if (typeof(obj[_local2]) == "object") {
traceOBJ(obj[_local2], "---- " + _local2);
trace(("--- (" + _local2) + ") ---------------------");
} else {
trace((("| " + _local2) + " ") + obj[_local2]);
}
}
}
static function copyObj(obj) {
var _local2 = new Object();
for (var _local3 in obj) {
if (obj[_local3][0] != undefined) {
_local2[_local3] = obj[_local3].concat();
} else if (typeof(obj[_local3]) == "object") {
_local2[_local3] = copyObj(obj[_local3]);
} else {
_local2[_local3] = obj[_local3];
}
}
return(_local2);
}
static function traceToBox(obj, t) {
if (t == undefined) {
t = "";
}
_global.t.text = _global.t.text + (t + " ---------------------");
for (var _local3 in obj) {
_global.t.text = _global.t.text + ((("\n| " + _local3) + " ") + obj[_local3]);
}
_global.t.text = _global.t.text + newline;
}
static function cb() {
return(getTimer());
}
static function isDefined(t) {
if (((((t == undefined) || (t == "")) || (t == null)) || (t == NaN)) || (t == "NAN")) {
return(false);
}
return(true);
}
static function randBetween(a, b) {
return(Math.round((Math.random() * (b - a)) + a));
}
static function randAround(a, b) {
var _local1 = Math.random() * b;
_local1 = (-(b / 2)) + _local1;
return(Math.round(a + _local1));
}
static function fullURL(t) {
var _local2 = t.slice(0, 3);
trace((("fullURL() - " + t) + " ") + _local2);
if (_local2 == "www") {
t = "http://" + t;
}
return(t);
}
static function formatTime(milliseconds, toReturn) {
if (toReturn == undefined) {
toReturn = "s";
}
var _local2 = Math.floor(milliseconds / 10);
var _local1 = Math.floor(_local2 / 100);
var _local3 = Math.floor(_local1 / 60);
_local2 = _local2 % 100;
_local1 = _local1 % 60;
_local3 = _local3 % 60;
if (isNaN(_local2)) {
_local2 = 0;
}
if (isNaN(_local1)) {
_local1 = 0;
}
if (isNaN(_local3)) {
_local3 = 0;
}
if (_local2 < 10) {
_local2 = "0" + _local2;
}
if (_local1 < 10) {
_local1 = "0" + _local1;
}
if (_local3 < 10) {
_local3 = "0" + _local3;
}
switch (toReturn) {
case "m-s-c" :
return((((_local3 + ":") + _local1) + ":") + _local2);
case "m-s" :
return((_local3 + ":") + _local1);
case "s" :
return(_local1);
}
}
static function addCommas(t) {
var _local3 = new Array();
var _local2 = 0;
var _local1 = t.length;
while (_local1 >= 0) {
trace((_local1 + " ") + (_local2 % 3));
_local3.push(t.charAt(_local1));
if ((((_local2 % 3) == 0) && (_local2 != 0)) && (_local1 != 0)) {
_local2 = 0;
_local3.push(",");
}
_local2++;
_local1--;
}
_local3.reverse();
var _local5 = _local3.join("");
trace(_local5);
return(_local5);
}
static function tabIndexing(clips) {
var _local1 = 0;
while (_local1 < clips.length) {
clips[_local1].tabIndex = _local1;
_local1++;
}
}
static function definedText(t) {
if ((((t == undefined) || (t == "undefined")) || (t == null)) || (t == "null")) {
return("");
}
return(t);
}
static function attachRollOffButt(ref, root, depth, h) {
if (h == undefined) {
h = Stage.height;
}
if (depth == undefined) {
depth = 0;
}
var _local1 = new Object({x:0, y:0});
root.globalToLocal(_local1);
underButtons[ref] = root.attachMovie("underBtn", "underBtn", depth, {_x:_local1.x, _y:_local1.y, _width:Stage.width, _height:h});
return(underButtons[ref]);
}
static function killRollOffButt(ref) {
if (ref != undefined) {
underButtons[ref].removeMovieClip();
} else {
for (var _local1 in underButtons) {
underButtons[_local1].removeMovieClip();
}
}
}
static var underButtons = new Object();
}
Symbol 679 MovieClip [__Packages.com.bentempleton.Item] Frame 0
class com.bentempleton.Item
{
var itemType, defaultItem, bombActive, bombCounter, active, addEventListener, moveType, bombSuccess, holder, bombInterval, removeEventListener, dispatchEvent, outer;
function Item (itemType, defaultItem) {
if (defaultItem == undefined) {
defaultItem = false;
}
this.itemType = itemType;
this.defaultItem = defaultItem;
mx.events.EventDispatcher.initialize(this);
init();
}
function init() {
bombActive = false;
bombCounter = 5;
active = true;
addEventListener("specialEvent", com.bentempleton.Game.__get__instance());
}
function setup(moveType, dir) {
this.moveType = moveType;
bombSuccess = false;
holder.setup(dir);
if ((itemType == "bomb") && (bombActive == false)) {
holder.inner.t_txt._visible = false;
}
}
function clear() {
active = true;
clearInterval(bombInterval);
}
function disable() {
removeEventListener("specialEvent", com.bentempleton.Game.__get__instance());
active = false;
bombActive = false;
delete holder.onEnterFrame;
}
function setupBomb() {
if (bombActive == false) {
_global.snd.playSound("bomb_tick", 1);
bombSuccess = false;
bombActive = true;
bombCounter = 5;
bombInterval = setInterval(this, "bombCountdown", 1000);
holder.inner.t_txt.text = "5";
holder.inner.t_txt._visible = true;
}
}
function bombCountdown(force) {
bombCounter--;
if ((bombCounter <= 0) || (force)) {
clearInterval(bombInterval);
bombActive = false;
active = false;
holder.doSpecial("explode");
dispatchEvent({type:"specialEvent", special:"bomb", item:this, holder:holder, outer:outer, arc:outer});
} else {
holder.inner.t_txt.text = bombCounter;
}
}
}
Symbol 680 MovieClip [__Packages.com.bentempleton.Screens] Frame 0
class com.bentempleton.Screens
{
static var root, endScreen;
function Screens () {
}
static function init() {
}
static function setup(root) {
com.bentempleton.Screens.root = root;
_global.snd = new com.bentempleton.SoundManager(com.bentempleton.Screens.root, ["click", "loop", "sea", "intro", "rollover", "throw_1", "throw_2", "throw_3", "gain_life", "lose_life", "lose_limb", "eat_fish", "drop", "catch", "bomb_tick", "bomb_explode", "treasure_explode", "life", "points", "game_over"]);
_global.root.soundToggle_mc.volState = true;
_global.root.soundToggle_mc.onRelease = function () {
this.volState = !this.volState;
if (this.volState) {
_global.snd.fadeUpAllSounds();
_global.snd.setSoundState(true);
this.gotoAndStop("on");
} else {
_global.snd.fadeOutAllSounds();
_global.snd.setSoundState(false);
this.gotoAndStop("off");
}
};
}
static function setupSplash() {
_global.root.gotoAndPlay("intro");
_global.snd.playSound("intro", 1);
_global.snd.playSound("sea", 9999);
var _local3 = new Object();
_local3.onKeyDown = function () {
if (Key.isDown(13) || (Key.isDown(32))) {
trace("ENTER");
_global.snd.playSound("click", 1);
com.bentempleton.Screens.root.splash_mc.gotoAndPlay("transition");
Key.removeListener(this);
}
};
Key.addListener(_local3);
}
static function setupInstructions() {
var _local2 = new Object();
_local2.onKeyDown = function () {
if (Key.isDown(13) || (Key.isDown(32))) {
_global.snd.playSound("click", 1);
com.bentempleton.Screens.root.instructions_mc.gotoAndPlay("transition");
}
};
Key.addListener(_local2);
}
static function setupGameScreen() {
_global.snd.setupAfade("intro", 0, -10, true);
_global.snd.setupAfade("sea", 0, -10, true);
com.bentempleton.Game.__get__instance().newGame();
}
static function setupEndScreen() {
var _local3 = endScreen;
var clip = endScreen.inner_mc;
trace("playCOUNT " + com.bentempleton.User.__get__instance().playCount);
if (com.bentempleton.User.__get__instance().finalTime == com.bentempleton.User.__get__instance().bestTime) {
clip.gotoAndStop("first");
} else {
clip.gotoAndStop("replay");
}
clip.s_txt.text = com.bentempleton.User.__get__instance().finalTime;
clip.b_txt.text = com.bentempleton.User.__get__instance().bestTime;
clip.play_mc.onRelease = function () {
clip._visible = false;
com.bentempleton.Game.__get__instance().newGame();
};
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(13) || (Key.isDown(32))) {
_global.snd.playSound("click", 1);
com.bentempleton.Screens.endScreen.gotoAndPlay("transition");
com.bentempleton.Screens.endScreen.endSelect = "play";
Key.removeListener(this);
}
};
Key.addListener(_local4);
_local3._visible = true;
_local3.gotoAndPlay("in");
}
}
Symbol 681 MovieClip [__Packages.com.bentempleton.SoundManager] Frame 0
class com.bentempleton.SoundManager
{
var verbose, linkList, tl, soundHolder, fadeList, panList, volume, sounds, soundVolumes, playFlag, playList, currentPlayListSound, EOFlistener, soundState;
function SoundManager (tl, linkList) {
verbose = false;
this.linkList = linkList;
this.tl = tl;
soundHolder = null;
fadeList = [];
panList = [];
volume = 100;
sounds = {};
soundVolumes = {};
playFlag = true;
playList = [];
currentPlayListSound = null;
EOFlistener = null;
soundState = true;
setupSounds();
setNewVolume(volume);
}
function setupSounds() {
soundHolder = tl.createEmptyMovieClip("SOUNDS_MC", 99998);
soundHolder.cb = this;
var _local3 = 0;
while (_local3 < linkList.length) {
var _local2 = linkList[_local3];
soundHolder.createEmptyMovieClip(_local2, 999 + _local3);
sounds[_local2] = new Sound(soundHolder[_local2]);
sounds[_local2].attachSound(_local2);
if (verbose) {
trace(((">>> sound '" + _local2) + "' duration is ") + sounds[_local2].duration);
}
_local3++;
}
}
function endOfPlayListSubscribe(obj) {
EOFlistener = obj;
}
function addToPlayList(linkName) {
playList.push(linkName);
}
function addArrayToPlayList(links) {
var _local2 = 0;
while (_local2 < links.length) {
playList.push(links[_local2]);
_local2++;
}
}
function playListKickIfEmpty() {
if (playList.length == 0) {
playListKick();
}
}
function playListKick() {
if (playList.length > 0) {
var _local2 = playList.shift();
sounds[_local2].cb = this;
sounds[_local2].onSoundComplete = function () {
this.playing = false;
this.cb.endOfSound();
};
currentPlayListSound = sounds[_local2];
currentPlayListSound.link = _local2;
playSound(_local2, 0, false);
} else {
EOFlistener.endOfPlayList();
EOFlistener = null;
}
}
function stopAndEmptyPlayList() {
if (playList.length > 0) {
for (var _local2 in playList) {
playList[_local2].stop();
playList[_local2].playing = false;
}
playList = [];
}
currentPlayListSound.stop();
currentPlayListSound.playing = false;
currentPlayListSound = null;
}
function endOfSound() {
if (verbose) {
trace("end of sound " + currentPlayListSound.link);
}
currentPlayListSound.onSoundComplete = null;
currentPlayListSound.playing = false;
playListKick();
}
function doLoop() {
if (verbose) {
trace("loop");
}
for (var _local2 in fadeList) {
if (verbose) {
trace("fading " + fadeList[_local2]);
}
if (fadeSound(fadeList[_local2])) {
if (fadeList[_local2].fadeTo <= 0) {
}
delete fadeList[_local2];
}
}
}
function playSound(linkname, loop, setOnComplete) {
if (verbose) {
trace("play sound " + linkname);
}
if (playFlag) {
sounds[linkname].stop();
if (loop == undefined) {
loop = 0;
}
if (setOnComplete == undefined) {
setOnComplete = true;
}
if (setOnComplete) {
sounds[linkname].onSoundComplete = function () {
this.playing = false;
delete this.onSoundComplete;
};
}
sounds[linkname].start(0, loop);
sounds[linkname].playing = true;
}
}
function stopSound(linkname) {
if (verbose) {
trace("stopping " + linkname);
}
sounds[linkname].stop(linkname);
sounds[linkname].playing = false;
sounds[linkname].onSoundComplete = null;
}
function setNewVolume(theVol_num, linkname) {
if (linkname == undefined) {
for (var _local3 in sounds) {
sounds[_local3].setVolume(theVol_num);
}
} else {
sounds[linkname].setVolume(theVol_num);
soundVolumes[linkname].vol = theVol_num;
if (theVol_num <= 0) {
}
}
}
function fadeSound(obj) {
obj.curVol = obj.curVol + obj.volInc;
if (obj.volInc < 0) {
if (obj.curVol <= obj.fadeTo) {
setNewVolume(obj.fadeTo, obj.linkName);
if (verbose) {
trace("sound target reached. KILL ? " + obj.kill);
}
if (obj.kill) {
stopSound(obj.linkName);
obj.kill = false;
}
obj = null;
return(true);
}
setNewVolume(obj.curVol, obj.linkName);
return(false);
}
if (obj.volInc > 0) {
if (obj.curVol >= obj.fadeTo) {
setNewVolume(obj.fadeTo, obj.linkName);
obj = null;
return(true);
}
setNewVolume(obj.curVol, obj.linkName);
return(false);
}
obj = null;
return(true);
}
function setSoundState(flag, override) {
playFlag = flag;
if (playFlag) {
soundState = true;
if (override) {
setNewVolume(100);
}
} else {
soundState = false;
if (override) {
setNewVolume(0);
}
}
}
function setupAfade(linkName, fadeTo, inc, kill) {
if (verbose) {
trace("FADING ** : " + linkName);
}
if (kill == undefined) {
kill = false;
}
fadeList[linkName] = {linkName:linkName, curVol:sounds[linkName].getVolume(), volInc:inc, fadeTo:fadeTo, kill:kill};
soundHolder.onEnterFrame = function () {
this.cb.doLoop();
};
}
function cancelFade(linkName) {
delete fadeList[linkName];
if (fadeList.length == 0) {
delete soundHolder.onEnterFrame;
}
}
function fadeOutAllSounds() {
for (var _local2 in sounds) {
setupAfade(_local2, 0, -10);
}
}
function fadeUpAllSounds() {
for (var _local2 in sounds) {
setupAfade(_local2, 100, 10);
}
}
function setNewPan(thePan_num, linkname) {
if (linkname == undefined) {
for (var _local3 in sounds) {
if (verbose) {
trace("set pan " + thePan_num);
}
sounds[_local3].setPan(thePan_num);
}
} else {
sounds[linkname].setPan(thePan_num);
}
}
function panSound(obj) {
obj.curPan = obj.curPan + obj.panInc;
if (obj.panInc < 0) {
if (obj.curPan <= obj.fadeTo) {
setNewPan(obj.fadeTo, obj.linkName);
obj = null;
return(true);
}
setNewPan(obj.curVol, obj.linkName);
return(false);
}
if (obj.panInc > 0) {
if (obj.curPan >= obj.fadeTo) {
setNewPan(obj.fadeTo, obj.linkName);
obj = null;
return(true);
}
setNewPan(obj.curPan, obj.linkName);
return(false);
}
obj = null;
return(true);
}
function setupAPan(linkName, fadeTo, inc) {
panList[linkName] = {linkName:linkName, curPan:sounds[linkName].getPan(), panInc:inc, fadeTo:fadeTo};
}
function cancelPan(linkName) {
delete panList[linkName];
}
}
Symbol 682 MovieClip [__Packages.com.bentempleton.ItemHolder] Frame 0
class com.bentempleton.ItemHolder extends MovieClip
{
var root, outer, _parent, hitBlob, addEventListener, dir, hitTargets, myHitClip, ITEM, onEnterFrame, _y, dispatchEvent, gotoAndStop, tween;
function ItemHolder () {
super();
root = this;
outer = _parent;
mx.events.EventDispatcher.initialize(this);
init();
}
function init() {
hitBlob = root.hitBlob_mc;
clear(true);
addEventListener("collision", com.bentempleton.Game.__get__instance());
}
function setup(dir) {
this.dir = dir;
hitTargets = new Array(com.bentempleton.Game.root.hitAreas_mc.h_l_1, com.bentempleton.Game.root.hitAreas_mc.h_l_2, com.bentempleton.Game.root.hitAreas_mc.h_l_3, com.bentempleton.Game.root.hitAreas_mc.h_r_3, com.bentempleton.Game.root.hitAreas_mc.h_r_2, com.bentempleton.Game.root.hitAreas_mc.h_r_1, com.bentempleton.Game.root.hitAreas_mc.seabed_mc);
myHitClip = undefined;
if (ITEM.moveType != "hold") {
onEnterFrame = EF;
}
var _local2 = (this.dir ? "l" : "r");
if ((ITEM.moveType == "drop") || (ITEM.moveType == "hold")) {
inner.gotoAndStop("home_" + _local2);
} else if (ITEM.moveType == "throw") {
inner.gotoAndStop("spin_" + this.dir);
}
if ((ITEM.moveType == "drop") || (ITEM.moveType == "throw")) {
outer.trigger.enabled = false;
}
doOut();
}
function EF() {
if (_y > 280) {
var _local7;
var _local2 = 0;
while (_local2 < hitTargets.length) {
if (hitBlob.hitTest(hitTargets[_local2])) {
_local7 = hitTargets[_local2];
break;
}
_local2++;
}
var _local3 = (((((dir && (_local7._name.substr(2, 1) == "r")) || ((!dir) && (_local7._name.substr(2, 1) == "l"))) || (_local7._name == "seabed_mc")) || (moveType == "drop")) ? true : false);
if (((_local7 != undefined) && ((myHitClip == undefined) || (myHitClip != _local7))) && (_local3)) {
myHitClip = _local7;
dispatchEvent({type:"collision", hitClip:_local7, outer:outer, arc:_parent, item:ITEM, dropPath:_parent});
}
}
}
function clear(force) {
gotoAndStop("empty");
delete onEnterFrame;
ITEM = undefined;
tween.stop();
}
function animFinished(str) {
if (str == "bomb") {
trace("BOMB EXPLODED !! item.success : " + ITEM.bombSuccess);
if (ITEM.bombSuccess) {
_global.snd.playSound("points", 1);
}
ITEM.outer.clearItem(ITEM);
}
}
function doOver() {
root.over_mc.attachMovie("over", "over", 0);
inner._xscale = (inner._yscale = 90);
}
function doOut() {
root.over_mc.createEmptyMovieClip("over", "over", 0);
inner._xscale = (inner._yscale = 100);
}
function doSpecial(str) {
if (str == undefined) {
str = "special";
}
outer.trigger.enabled = false;
doOut();
inner.gotoAndPlay(str);
}
function get inner() {
return(root.inner_mc);
}
function setITEM(item) {
delete eval (onEnterFrame());
ITEM = item;
item.holder = this;
gotoAndStop(ITEM.itemType);
if (item.itemType == "bomb") {
inner.t_txt.text = ITEM.bombCounter;
}
}
function get moveType() {
return(ITEM.moveType);
}
}
Symbol 683 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 684 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 685 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 686 MovieClip [__Packages.com.bentempleton.Character] Frame 0
class com.bentempleton.Character
{
var hands, head, headBase, currExp, currHolder, t_l, t_r, l_1, l_2, l_3, r_3, r_2, r_1;
function Character (limbs) {
mx.events.EventDispatcher.initialize(this);
hands = new Array();
for (var _local3 in limbs) {
this[_local3] = limbs[_local3];
if (limbs[_local3]._name.substr(0, 2) == "h_") {
hands.push(limbs[_local3]);
}
}
init();
setup();
}
function init() {
head = headBase.default_mc;
setExpression("default");
Key.addListener(this);
}
function setup() {
}
function setExpression(exp) {
trace((("{}Char " + currExp) + " ") + exp);
if (currExp != "points") {
currExp = exp;
for (var _local2 in headBase) {
headBase[_local2]._visible = false;
}
headBase[exp + "_mc"]._visible = true;
if (exp != "default") {
headBase[exp + "_mc"].gotoAndPlay(2);
}
}
}
function animationFinished() {
setExpression("default");
}
function eatFish(hand, item) {
var _local3 = ((hand.side == "l") ? true : false);
currHolder = headBase[("points_" + hand.posRef) + "_mc"].item_mc;
catchItem(item, _local3);
setExpression("points_" + hand.posRef);
com.bentempleton.Game.__get__instance().setScore(com.bentempleton.Game.__get__instance().scoreVals.good.points);
}
function catchItem(item, dir) {
currHolder.setITEM(item);
trace("CHARACTER currHoler " + currHolder);
item.outer = this;
item.setup("eat", dir);
}
function damageTreasure(side) {
var _local2 = this["t_" + side].inner_mc;
trace((((((("damager treasure " + side) + " ") + _local2) + " ") + _local2._currentframe) + " ") + (_local2._currentframe + 1));
_local2.gotoAndStop(_local2._currentframe + 1);
_local2._parent.gotoAndPlay("shake");
}
function resetTreasure() {
t_l.inner_mc.gotoAndStop(1);
t_r.inner_mc.gotoAndStop(1);
}
function doExtraLife() {
setExpression("gain_life");
_global.snd.playSound("gain_life", 1);
com.bentempleton.Game.__get__instance().setScore(com.bentempleton.Game.__get__instance().scoreVals.good.life);
com.bentempleton.Game.__get__instance().setLives(1);
}
function attachLimb(hand) {
}
function loseLimb(hand) {
hand.loseLimb();
_global.snd.playSound("lose_limb", 1);
setExpression("lose_limb");
}
function setLives(lives) {
head.gotoAndStop(lives + 1);
}
function onKeyDown() {
if (Key.getCode() == 65) {
l_1.throwItem();
} else if (Key.getCode() == 83) {
l_2.throwItem();
} else if (Key.getCode() == 68) {
l_3.throwItem();
} else if (Key.getCode() == 74) {
r_3.throwItem();
} else if (Key.getCode() == 75) {
r_2.throwItem();
} else if (Key.getCode() == 76) {
r_1.throwItem();
}
}
}
Symbol 687 MovieClip [__Packages.com.bentempleton.Hand] Frame 0
class com.bentempleton.Hand extends MovieClip
{
var root, active, holder, arm, trigger, hearts, posRef, _name, typeRef, side, mask1, mask2, ITEM, gotoAndPlay, gotoAndStop, _empty;
function Hand () {
super();
root = this;
mx.events.EventDispatcher.initialize(this);
init();
}
function init() {
empty = (true);
clearItem();
active = true;
holder = root.item_mc;
arm = root.arm_mc;
trigger = root.trigger_mc;
hearts = root.hearts_mc;
posRef = _name.split("h_")[1];
typeRef = "hand";
side = _name.split("_")[1];
mask1 = root.mask_hand;
mask1.orig = mask1._x;
mask2 = root.mask_hook;
mask2.orig = mask2._x;
setLimbState("hand");
var ref = this;
trigger.onRollOver = function () {
if (this.enabled) {
ref.holder.doOver();
}
};
trigger.onRollOut = function () {
if (this.enabled) {
ref.holder.doOut();
}
};
trigger.onRelease = function () {
ref.throwItem();
};
}
function setup() {
clearItem();
active = true;
setLimbState("hand");
}
function throwItem() {
if (trigger.enabled && (ITEM.active)) {
trace("****************** THROW ITEM (go to frame)");
trigger.enabled = false;
gotoAndPlay("throw");
}
}
function doThrow() {
if (ITEM.active) {
trace("****************** DO THROW (called form frame)");
ITEM.holder.doOut();
if (ITEM.itemType != undefined) {
com.bentempleton.Game.__get__instance().doThrow(this, ITEM);
}
empty = (true);
clearItem();
var _local3 = Math.ceil(Math.random() * 3);
_global.snd.playSound("throw_" + _local3, 1);
}
}
function catchItem(item) {
gotoAndPlay("catch");
empty = (false);
ITEM = item;
holder.setITEM(ITEM);
ITEM.outer = this;
var _local4 = ((side == "l") ? true : false);
ITEM.setup("hold", _local4);
if (item.itemType == "bomb") {
ITEM.setupBomb();
} else if (item.itemType == "limb") {
attachLimb();
} else if (item.itemType == "points") {
doPoints();
} else if (item.itemType == "life") {
doExtraLife();
}
_global.snd.playSound("catch", 1);
}
function clearItem() {
holder.clear();
ITEM = undefined;
empty = (true);
}
function animationFinished(str) {
if (str == "points") {
} else if (str == "throwing") {
}
}
function doPoints() {
com.bentempleton.Game.char.eatFish(this, ITEM);
empty = (true);
clearItem();
_global.snd.playSound("points", 1);
gotoAndPlay("throw");
}
function doExtraLife() {
com.bentempleton.Game.char.doExtraLife();
empty = (true);
clearItem();
hearts.gotoAndPlay(2);
}
function attachLimb() {
setLimbState("hook");
active = true;
empty = (true);
clearItem();
com.bentempleton.Game.__get__instance().getDropPath(posRef).awaitingLimb = false;
}
function loseLimb() {
setLimbState("stump");
active = false;
empty = (true);
}
function setLimbState(str) {
if (str == "hand") {
gotoAndStop("home");
mask1._x = mask1.orig;
mask2._x = 1000;
} else if (str == "hook") {
gotoAndStop("home");
mask2._x = mask2.orig;
mask1._x = 1000;
} else if (str == "stump") {
gotoAndStop("loseLimb");
}
}
function set empty(boo) {
_empty = boo;
trigger.useHandCursor = !boo;
trigger.enabled = !boo;
//return(empty);
}
function get empty() {
return(_empty);
}
}
Symbol 688 MovieClip [__Packages.com.bentempleton.DropHolder] Frame 0
class com.bentempleton.DropHolder extends MovieClip
{
var root, typeRef, side, _name, ITEMS, awaitingLimb, posRef, holderDepth, holders, attachMovie, lastDrop, currHolder, __set__itemCount, startTime;
function DropHolder () {
super();
root = this;
mx.events.EventDispatcher.initialize(this);
init();
}
function init() {
typeRef = "drop";
side = _name.split("_")[1];
ITEMS = new Array();
awaitingLimb = false;
posRef = _name.split("d_")[1];
side = posRef.split("_")[0];
holderDepth = 0;
holders = new Array();
var _local2 = 0;
while (_local2 < 2) {
var _local3 = attachMovie("item", "item_" + holderDepth, holderDepth);
holderDepth++;
holders.push(_local3);
_local2++;
}
}
function setup() {
clearAll();
}
function doDrop(item) {
var _local3 = getTimer() - lastDrop;
if (((itemCount + 1) <= com.bentempleton.Game.__get__instance().__get__levelProps().maxPerDropPath) && ((_local3 > 3000) || (itemCount == 0))) {
catchItem(item);
var _local2 = com.bentempleton.Utils.randAround(com.bentempleton.Game.__get__instance().__get__levelProps().decent, 500);
_local2 = _local2 / 1000;
currHolder.tween.stop();
currHolder.tween = new mx.transitions.Tween(currHolder, "_y", mx.transitions.easing.Regular.easeIn, 0, 650, _local2, true);
var ref = this;
currHolder.tween.onMotionFinished = function () {
ref.clearItem(item);
};
lastDrop = getTimer();
return(true);
}
return(false);
}
function catchItem(item) {
__set__itemCount((itemCount+1));
ITEMS.push(item);
currHolder = getHolder();
currHolder.setITEM(item);
item.outer = this;
var _local3 = ((side == "l") ? true : false);
item.setup("drop", _local3);
}
function clearItem(item) {
if (item.type == "limb") {
if (item.limbSuccess) {
awaitingLimb = false;
} else {
limbRequired();
}
}
item.holder.clear();
item.holder.removeMovieClip();
var _local2 = 0;
while (_local2 < ITEMS.length) {
if (ITEMS[_local2] == item) {
ITEMS.splice(_local2, 1);
}
_local2++;
}
}
function clearAll() {
var _local2 = 0;
while (_local2 < ITEMS.length) {
ITEMS[_local2].disable();
_local2++;
}
ITEMS = new Array();
awaitingLimb = false;
}
function limbRequired() {
awaitingLimb = true;
startTime = getTimer();
}
function killAnimation(force) {
var _local2 = 0;
while (_local2 < ITEMS.length) {
if (ITEMS[_local2].holder.myHitClip._name == "seabed_mc") {
ITEMS[_local2].holder.tween.stop();
trace((("killing animation " + ITEMS[_local2].itemType) + " ") + ITEMS[_local2].holder);
}
_local2++;
}
}
function getHolder() {
holderDepth++;
return(attachMovie("item", "item_" + holderDepth, holderDepth));
}
function get itemCount() {
return(ITEMS.length);
}
}
Symbol 689 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 49 MovieClip [__Packages.com.rubberductions.Tracker] Frame 0
class com.rubberductions.Tracker extends MovieClip
{
var lvID, lvs, sessionID, referrer, flashMinorVersion, flashMajorVersion, debug, CID, baseURL, userID, projectID, getIDFunc, userLV, getURL;
function Tracker () {
super();
initVars();
}
function initVars() {
lvID = 0;
lvs = [];
sessionID = "-1";
referrer = ((_root.referrer == undefined) ? "" : (_root.referrer));
var _local3 = com.rubberductions.Utils.getFlashVersion();
flashMinorVersion = (_local3.result ? (_local3.minor) : -1);
flashMajorVersion = (_local3.result ? (_local3.major) : -1);
}
function getNextLvID() {
return(++lvID);
}
function getALoadVars(label) {
var _local2 = new LoadVars();
_local2.__arrID = getNextLvID();
_local2.__label = label;
_local2.__cb = this;
_local2.onLoad = function (success) {
if (success) {
this.__cb.checkRequest(this);
} else {
this.__cb.badRequest(this);
}
};
lvs[_local2.__arrID] = _local2;
return(_local2);
}
function badRequest(lv) {
output(("request " + lv.__label) + " failed");
delete lvs[lv.__arrID];
}
function checkRequest(lv) {
if (lv.ok == "1") {
output(("request " + lv.__label) + " returned ok");
} else {
output(("request " + lv.__label) + " failed on the server");
}
if (lv.sessionID != undefined) {
sessionID = lv.sessionID;
}
delete lvs[lv.__arrID];
}
function output(str) {
if (debug) {
trace("TRACKER: " + str);
}
}
function checkReady() {
if ((((CID != undefined) && (baseURL != undefined)) && (userID != undefined)) && (projectID != undefined)) {
return(true);
}
output("prerequisits haven't been defined, check you have made calls to setBaseURL() ,setCampaignID(), setProjectID() and initialise() and that they returned correctly");
return(false);
}
function initialise(cbFunction) {
if (typeof(cbFunction) == "function") {
getIDFunc = cbFunction;
var _local2 = com.rubberductions.Utils.readLSO(projectID, "id");
if (_local2 != "") {
userID = _local2;
output("cookie found... letting you know");
getIDFunc(true);
} else {
output("cookie not found...");
requestUserID();
}
} else {
output("check the passed function");
}
}
function requestUserID() {
if (CID != undefined) {
output(("asking the server for a new user id from: " + baseURL) + GETID);
userLV = new LoadVars();
userLV.CID = CID;
userLV.onLoad = mx.utils.Delegate.create(this, userIDRequestResponse);
userLV.sendAndLoad(baseURL + GETID, userLV, "POST");
} else {
output("define the campaign id first before calling requestUserID");
}
}
function userIDRequestResponse(success) {
if (success) {
if (userLV.id != undefined) {
output("server provided a user id: " + userLV.id);
userID = userLV.id;
com.rubberductions.Utils.writeLSO(projectID, "id", userID);
output("wrote the coookie");
getIDFunc(true);
} else {
output("server didn't provide a user id");
getIDFunc(false);
}
} else {
output("request for the user id failed");
getIDFunc(false);
}
delete userLV;
}
function setBaseURL(u) {
if (typeof(u) == "string") {
baseURL = u;
return(true);
}
output("check the URL you passed to setBaseURL()");
return(false);
}
function setProjectID(id) {
if (typeof(id) == "string") {
projectID = id;
output("project id set: " + projectID);
return(true);
}
output("project id was not a string");
return(false);
}
function setCampaignID(id) {
if (typeof(id) == "string") {
CID = id;
output("campaign id set: " + CID);
return(true);
}
output("campaign id was not a number");
return(false);
}
function load() {
if (checkReady()) {
var _local2 = getALoadVars("load");
_local2.CID = CID;
_local2.flversionmajor = flashMajorVersion;
_local2.flversionminor = flashMinorVersion;
_local2.referrer = referrer;
_local2.UID = userID;
_local2.sendAndLoad(baseURL + LOAD, _local2, "POST");
return(true);
}
return(false);
}
function startSession() {
sessionID = "0";
if (checkReady()) {
var _local2 = getALoadVars("start session");
_local2.CID = CID;
_local2.UID = userID;
_local2.currentTime = new Date().getTime();
_local2.sendAndLoad(baseURL + START_SESSION, _local2, "POST");
return(true);
}
return(false);
}
function endSession() {
if (checkReady()) {
var _local2 = getALoadVars("end session");
_local2.CID = CID;
_local2.UID = userID;
_local2.currentTime = new Date().getTime();
_local2.sessionID = sessionID;
_local2.sendAndLoad(baseURL + END_SESSION, _local2, "POST");
return(true);
}
return(false);
}
function exit(link, exitLabel, window) {
if (typeof(link) == "string") {
if (typeof(exitLabel) == "string") {
if (typeof(window) == "string") {
if (checkReady()) {
var _local2 = getALoadVars("exit");
_local2.UID = userID;
_local2.CID = CID;
_local2.label = exitLabel;
_local2.link = link;
_local2.sendAndLoad(baseURL + EXIT, _local2, "POST");
}
(getURL(link, window));// not popped
return(true);
}
output("check the window you passed");
} else {
output("check the exitLabel you passed");
}
} else {
output("check the link you passed");
}
return(false);
}
function conversion(label, type) {
if (typeof(label) == "string") {
if (typeof(type) == "string") {
if (checkReady()) {
var _local2 = getALoadVars("conversion");
_local2.UID = userID;
_local2.CID = CID;
_local2.label = label;
_local2.type = type;
_local2.sendAndLoad(baseURL + CONVERSION, _local2, "POST");
return(true);
}
return(false);
}
output("check the type you passed");
} else {
output("check the label you passed");
}
return(false);
}
function exitPass(toSplit) {
if (checkReady()) {
if (typeof(toSplit) == "string") {
var _local2 = toSplit.split("|");
exit(unescape(_local2[1]), _local2[0]);
return(true);
}
return(false);
}
}
function view(label) {
if (typeof(label) == "string") {
if (checkReady()) {
var _local2 = getALoadVars("view");
_local2.UID = userID;
_local2.CID = CID;
_local2.label = label;
_local2.sendAndLoad(baseURL + VIEW, _local2, "POST");
return(true);
}
} else {
output("check the label you passed");
return(false);
}
}
function custom(path, obj, id) {
if (typeof(path) == "string") {
if (typeof(obj) == "object") {
if (typeof(id) == "string") {
if (checkReady()) {
var _local3 = getALoadVars(id);
_local3.UID = userID;
_local3.CID = CID;
for (var _local4 in obj) {
_local3[_local4] = obj[_local4];
}
_local3.sendAndLoad(baseURL + path, _local3, "POST");
return(true);
}
return(false);
}
// unexpected jump
}
output("check the supplied data obj - doesn't seem to be a Object");
return(false);
}
output("check the supplied path - doesn't seem to be a string");
return(false);
}
function setVerbose(val) {
if (typeof(val) == "boolean") {
debug = val;
output("setVerbose: " + val);
return(true);
}
trace("TRACKER: setVerbose: param is not a boolean");
return(false);
}
static var GETID = "getUID";
static var LOAD = "load";
static var START_SESSION = "startSession";
static var END_SESSION = "endSession";
static var EXIT = "exit";
static var VIEW = "view";
static var CONVERSION = "conversion";
}
Symbol 53 MovieClip [__Packages.com.rubberductions.Utils] Frame 0
class com.rubberductions.Utils
{
function Utils () {
}
static function readLSO(lsoName, prop) {
if (lsoName != undefined) {
var _local1 = SharedObject.getLocal(lsoName);
if (_local1.data[prop] == undefined) {
return("");
}
return(_local1.data[prop]);
}
}
static function writeLSO(lsoName, prop, stuff) {
var _local1 = SharedObject.getLocal(lsoName);
_local1.data[prop] = stuff;
_local1.data.flush();
}
static function getFlashVersion() {
var _local1 = System.capabilities.version;
var _local2 = _local1.indexOf(" ");
if (_local2 != -1) {
_local1 = _local1.substr(_local2 + 1, _local1.length);
_local1 = _local1.split(",");
var _local5 = _local1[0];
var _local4 = _local1[1];
return({major:_local5, minor:_local4, result:true});
}
return({major:-1, minor:-1, result:false});
}
}
Symbol 54 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 _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 66 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 10
play();
Symbol 67 MovieClip Frame 15
stop();
Symbol 67 MovieClip Frame 30
stop();
Symbol 67 MovieClip Frame 40
play();
Symbol 67 MovieClip Frame 45
stop();
Symbol 70 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 10
play();
Symbol 71 MovieClip Frame 15
stop();
Symbol 71 MovieClip Frame 30
stop();
Symbol 71 MovieClip Frame 40
play();
Symbol 71 MovieClip Frame 45
stop();
Symbol 74 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 10
play();
Symbol 75 MovieClip Frame 15
stop();
Symbol 75 MovieClip Frame 30
stop();
Symbol 75 MovieClip Frame 40
play();
Symbol 75 MovieClip Frame 45
stop();
Symbol 79 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 10
play();
Symbol 80 MovieClip Frame 15
stop();
Symbol 80 MovieClip Frame 30
stop();
Symbol 80 MovieClip Frame 40
play();
Symbol 80 MovieClip Frame 45
stop();
Symbol 80 MovieClip Frame 69
this._parent.animFinished("bomb");
Symbol 83 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 10
play();
Symbol 92 MovieClip Frame 15
stop();
Symbol 92 MovieClip Frame 30
stop();
Symbol 92 MovieClip Frame 40
play();
Symbol 92 MovieClip Frame 45
stop();
Symbol 95 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 96 MovieClip Frame 1
stop();
stop();
Symbol 96 MovieClip Frame 10
play();
Symbol 96 MovieClip Frame 15
stop();
Symbol 96 MovieClip Frame 30
stop();
Symbol 96 MovieClip Frame 40
play();
Symbol 96 MovieClip Frame 45
stop();
Symbol 99 MovieClip Frame 21
gotoAndPlay ("spin");
Symbol 100 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 10
play();
Symbol 100 MovieClip Frame 15
stop();
Symbol 100 MovieClip Frame 30
stop();
Symbol 100 MovieClip Frame 40
play();
Symbol 100 MovieClip Frame 45
stop();
Symbol 101 MovieClip [item] Frame 1
#initclip 32
Object.registerClass("item", com.bentempleton.ItemHolder);
#endinitclip
stop();
Symbol 102 MovieClip [l_1_r_1] Frame 1
#initclip 23
Object.registerClass("l_1_r_1", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 102 MovieClip [l_1_r_1] Frame 69
stop();
Symbol 107 MovieClip [l_1_r_2] Frame 1
#initclip 24
Object.registerClass("l_1_r_2", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 107 MovieClip [l_1_r_2] Frame 72
stop();
Symbol 112 MovieClip [l_1_r_3] Frame 1
#initclip 25
Object.registerClass("l_1_r_3", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 112 MovieClip [l_1_r_3] Frame 75
stop();
Symbol 115 MovieClip [l_2_r_1] Frame 1
#initclip 26
Object.registerClass("l_2_r_1", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 115 MovieClip [l_2_r_1] Frame 72
stop();
Symbol 119 MovieClip [l_2_r_2] Frame 1
#initclip 27
Object.registerClass("l_2_r_2", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 119 MovieClip [l_2_r_2] Frame 75
stop();
Symbol 124 MovieClip [l_2_r_3] Frame 1
#initclip 28
Object.registerClass("l_2_r_3", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 124 MovieClip [l_2_r_3] Frame 78
stop();
Symbol 129 MovieClip [l_3_r_1] Frame 1
#initclip 29
Object.registerClass("l_3_r_1", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 129 MovieClip [l_3_r_1] Frame 75
stop();
Symbol 134 MovieClip [l_3_r_2] Frame 1
#initclip 30
Object.registerClass("l_3_r_2", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 134 MovieClip [l_3_r_2] Frame 78
stop();
Symbol 138 MovieClip [l_3_r_3] Frame 1
#initclip 31
Object.registerClass("l_3_r_3", com.bentempleton.Arc);
#endinitclip
stop();
Symbol 138 MovieClip [l_3_r_3] Frame 81
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 160 MovieClip [over] Frame 5
stop();
Symbol 163 MovieClip Frame 1
stop();
Symbol 169 Button
on (release) {
exit_url = "http://www.4mations.tv?referrer=booty_juggler";
com.teamrubber.SeqTrackerAdaptor.campaignExit(exit_url, "end_exit_banner");
}
Symbol 186 Button
on (rollOver) {
gotoAndPlay ("robin in");
}
on (rollOut) {
gotoAndPlay ("robin out");
}
on (press) {
getURL ("http://www.robindavey.co.uk", "_blank");
}
Symbol 187 Button
on (rollOver) {
gotoAndPlay ("ben in");
}
on (rollOut) {
gotoAndPlay ("ben out");
}
on (press) {
getURL ("http://www.thoughtden.co.uk", "_blank");
}
Symbol 188 Button
on (rollOver) {
gotoAndPlay ("4mations in");
}
on (rollOut) {
gotoAndPlay ("4mations out");
}
on (release) {
exit_url = "http://www.4mations.tv?referrer=booty_juggler";
com.teamrubber.SeqTrackerAdaptor.campaignExit(exit_url, "end_exit_banner");
}
Symbol 193 Button
on (rollOver) {
gotoAndPlay ("4mations in");
}
on (rollOut) {
gotoAndPlay ("4mations out");
}
on (press) {
getURL ("http://www.4mations.tv", "_blank");
}
Symbol 196 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 19
stop();
Symbol 196 MovieClip Frame 34
gotoAndPlay ("home");
Symbol 196 MovieClip Frame 49
stop();
Symbol 196 MovieClip Frame 64
gotoAndPlay ("home");
Symbol 196 MovieClip Frame 79
stop();
Symbol 196 MovieClip Frame 94
gotoAndPlay ("home");
Symbol 238 MovieClip Frame 85
stop();
Symbol 245 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (press) {
gotoAndPlay ("out");
}
Symbol 247 MovieClip Frame 10
stop();
Symbol 247 MovieClip Frame 20
_global.snd.playSound("rollover", 1);
Symbol 247 MovieClip Frame 27
stop();
Symbol 247 MovieClip Frame 40
_global.snd.playSound("click", 1);
Symbol 247 MovieClip Frame 48
stop();
_parent.gotoAndPlay("transition");
Symbol 247 MovieClip Frame 55
_global.snd.playSound("rollover", 1);
Symbol 247 MovieClip Frame 62
gotoAndPlay ("up");
Symbol 248 MovieClip Frame 56
stop();
Symbol 248 MovieClip Frame 75
_parent.gotoAndPlay("instructions");
Symbol 381 MovieClip Frame 15
stop();
Symbol 381 MovieClip Frame 35
_parent.gotoAndPlay("game");
Symbol 423 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 15
_global.snd.playSound("eat_fish", 1);
Symbol 423 MovieClip Frame 40
com.bentempleton.Game.char.animationFinished("points");
Symbol 424 MovieClip Frame 1
stop();
Symbol 424 MovieClip Frame 13
_global.snd.playSound("eat_fish", 1);
Symbol 424 MovieClip Frame 38
com.bentempleton.Game.char.animationFinished("points");
Symbol 425 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 11
_global.snd.playSound("eat_fish", 1);
Symbol 425 MovieClip Frame 36
com.bentempleton.Game.char.animationFinished("points");
Symbol 426 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 15
_global.snd.playSound("eat_fish", 1);
Symbol 426 MovieClip Frame 40
com.bentempleton.Game.char.animationFinished("points");
Symbol 427 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 13
_global.snd.playSound("eat_fish", 1);
Symbol 427 MovieClip Frame 38
com.bentempleton.Game.char.animationFinished("points");
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 11
_global.snd.playSound("eat_fish", 1);
Symbol 428 MovieClip Frame 36
com.bentempleton.Game.char.animationFinished("points");
Symbol 447 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 25
com.bentempleton.Game.char.animationFinished("hurt");
Symbol 458 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 35
com.bentempleton.Game.char.animationFinished("laugh");
Symbol 476 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 25
com.bentempleton.Game.char.animationFinished("frown");
Symbol 505 MovieClip Frame 4
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 542 MovieClip [hand_r_3] Frame 1
#initclip 39
Object.registerClass("hand_r_3", com.bentempleton.Hand);
#endinitclip
stop();
Symbol 542 MovieClip [hand_r_3] Frame 14
this.doThrow();
Symbol 542 MovieClip [hand_r_3] Frame 18
this.gotoAndStop("home");
Symbol 542 MovieClip [hand_r_3] Frame 29
this.gotoAndStop("home");
Symbol 544 MovieClip [hand_l_3 ] Frame 1
#initclip 33
Object.registerClass("hand_l_3 ", com.bentempleton.Hand);
#endinitclip
stop();
Symbol 544 MovieClip [hand_l_3 ] Frame 14
this.doThrow();
Symbol 544 MovieClip [hand_l_3 ] Frame 19
this.gotoAndStop("home");
Symbol 544 MovieClip [hand_l_3 ] Frame 29
this.gotoAndStop("home");
Symbol 571 MovieClip [hand_r_2] Frame 1
#initclip 34
Object.registerClass("hand_r_2", com.bentempleton.Hand);
#endinitclip
stop();
Symbol 571 MovieClip [hand_r_2] Frame 14
this.doThrow();
Symbol 571 MovieClip [hand_r_2] Frame 18
this.gotoAndStop("home");
Symbol 571 MovieClip [hand_r_2] Frame 29
this.gotoAndStop("home");
Symbol 573 MovieClip [hand_l_2] Frame 1
#initclip 35
Object.registerClass("hand_l_2", com.bentempleton.Hand);
#endinitclip
stop();
Symbol 573 MovieClip [hand_l_2] Frame 14
this.doThrow();
Symbol 573 MovieClip [hand_l_2] Frame 18
this.gotoAndStop("home");
Symbol 573 MovieClip [hand_l_2] Frame 29
this.gotoAndStop("home");
Symbol 602 MovieClip [hand_r_1] Frame 1
#initclip 36
Object.registerClass("hand_r_1", com.bentempleton.Hand);
#endinitclip
stop();
Symbol 602 MovieClip [hand_r_1] Frame 14
this.doThrow();
Symbol 602 MovieClip [hand_r_1] Frame 18
this.gotoAndStop("home");
Symbol 602 MovieClip [hand_r_1] Frame 29
this.gotoAndStop("home");
Symbol 604 MovieClip [hand_l_1] Frame 1
#initclip 37
Object.registerClass("hand_l_1", com.bentempleton.Hand);
#endinitclip
stop();
Symbol 604 MovieClip [hand_l_1] Frame 14
this.doThrow();
Symbol 604 MovieClip [hand_l_1] Frame 18
this.gotoAndStop("home");
Symbol 604 MovieClip [hand_l_1] Frame 29
this.gotoAndStop("home");
Symbol 607 MovieClip [Drop Path] Frame 1
#initclip 38
Object.registerClass("Drop Path", com.bentempleton.DropHolder);
#endinitclip
Symbol 614 MovieClip Frame 26
stop();
Symbol 626 MovieClip Frame 1
stop();
Symbol 627 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 1
stop();
Symbol 650 MovieClip Frame 11
gotoAndPlay (1);
Symbol 654 MovieClip Frame 1
btn.useHandCursor = false;
Symbol 660 Button
on (rollOver) {
gotoAndPlay ("over_menu");
}
on (rollOut) {
gotoAndPlay ("off_menu");
}
on (press) {
gotoAndPlay ("out_menu");
trace("MENU SECLECT " + this._parent._parent);
this._parent.endSelect = "menu";
}
Symbol 661 Button
on (rollOver) {
gotoAndPlay ("over_play");
}
on (rollOut) {
gotoAndPlay ("off_play");
}
on (press) {
gotoAndPlay ("out_play");
trace("MENU SECLECT " + this._parent._parent);
this._parent.endSelect = "play";
}
Symbol 662 MovieClip Frame 15
stop();
Symbol 662 MovieClip Frame 25
_global.snd.playSound("rollover", 1);
Symbol 662 MovieClip Frame 32
stop();
Symbol 662 MovieClip Frame 34
_global.snd.playSound("click", 1);
Symbol 662 MovieClip Frame 46
_parent.gotoAndPlay("transition");
Symbol 662 MovieClip Frame 55
_global.snd.playSound("rollover", 1);
Symbol 662 MovieClip Frame 62
gotoAndPlay ("home");
Symbol 662 MovieClip Frame 70
_global.snd.playSound("rollover", 1);
Symbol 662 MovieClip Frame 77
stop();
Symbol 662 MovieClip Frame 79
_global.snd.playSound("click", 1);
Symbol 662 MovieClip Frame 92
_parent.gotoAndPlay("transition");
Symbol 662 MovieClip Frame 100
_global.snd.playSound("rollover", 1);
Symbol 662 MovieClip Frame 107
gotoAndPlay ("home");
Symbol 663 MovieClip Frame 1
stop();
var endSelect;
Symbol 663 MovieClip Frame 17
stop();
Symbol 663 MovieClip Frame 37
trace("GAMEOVER : " + endSelect);
if (endSelect == "play") {
com.bentempleton.Screens.setupGameScreen();
} else if (endSelect == "menu") {
com.bentempleton.Screens.setupSplash();
}
Symbol 668 MovieClip Frame 1
stop();
Symbol 671 MovieClip Frame 1
_global.snd.playSound("screen", 1);
Symbol 671 MovieClip Frame 5
stop();