Frame 2
if ($tweenManager == undefined) {
_global.$tweenManager = new zigo.tweenManager();
}
com.robertpenner.easing.Back;
com.robertpenner.easing.Bounce;
com.robertpenner.easing.Circ;
com.robertpenner.easing.Cubic;
com.robertpenner.easing.Elastic;
com.robertpenner.easing.Expo;
com.robertpenner.easing.Linear;
com.robertpenner.easing.Quad;
com.robertpenner.easing.Quart;
com.robertpenner.easing.Quint;
com.robertpenner.easing.Sine;
AsBroadcaster.initialize(MovieClip.prototype);
MovieClip.prototype.$addListener = MovieClip.prototype.addListener;
ASSetPropFlags(MovieClip.prototype, "$addListener", 1, 0);
MovieClip.prototype.addListener = function () {
var _local1 = this;
AsBroadcaster.initialize(_local1);
_local1.$addListener.apply(_local1, arguments);
};
MovieClip.prototype.tween = function (props, pEnd, seconds, animType, delay, callback, extra1, extra2) {
if ($tweenManager.isTweenLocked(this)) {
trace("tween not added, this movieclip is locked");
return(undefined);
}
if (arguments.length < 2) {
trace("tween not added, props & pEnd must be defined");
return(undefined);
}
if (typeof(props) == "string") {
props = [props];
}
if (pEnd.length == undefined) {
pEnd = [pEnd];
}
if (seconds == undefined) {
seconds = 2;
} else if (seconds < 0.01) {
seconds = 0;
}
if ((delay < 0.01) || (delay == undefined)) {
delay = 0;
}
switch (typeof(animType)) {
case "string" :
animType = animType.toLowerCase();
if (animType == "linear") {
var eqf = com.robertpenner.easing.Linear.easeNone;
} else if (animType.indexOf("easeinout") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeInOut;
} else if (animType.indexOf("easein") == 0) {
var t = animType.substr(6);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeIn;
} else if (animType.indexOf("easeout") == 0) {
var t = animType.substr(7);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOut;
}
if (eqf == undefined) {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
case "function" :
var eqf = animType;
break;
case "object" :
if ((animType.ease != undefined) && (animType.pts != undefined)) {
var eqf = animType.ease;
extra1 = animType.pts;
} else {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
default :
var eqf = com.robertpenner.easing.Expo.easeOut;
}
switch (typeof(callback)) {
case "function" :
callback = {func:callback, scope:this._parent};
break;
case "string" :
var ilp = callback.indexOf("(");
var funcp = callback.slice(0, ilp);
var scope = eval (funcp.slice(0, funcp.lastIndexOf(".")));
var func = eval (funcp);
var args = callback.slice(ilp + 1, callback.lastIndexOf(")")).split(",");
var i = 0;
while (i < args.length) {
var a = eval (args[i]);
if (a != undefined) {
args[i] = a;
}
i++;
}
callback = {func:func, scope:scope, args:args};
}
if ($tweenManager.autoStop) {
$tweenManager.removeTween(this, props);
}
if (delay > 0) {
$tweenManager.addTweenWithDelay(delay, this, props, pEnd, seconds, eqf, callback, extra1, extra2);
} else {
$tweenManager.addTween(this, props, pEnd, seconds, eqf, callback, extra1, extra2);
}
};
ASSetPropFlags(MovieClip.prototype, "tween", 1, 0);
MovieClip.prototype.stopTween = function (props) {
var _local1 = props;
if (typeof(_local1) == "string") {
_local1 = [_local1];
}
$tweenManager.removeTween(this, _local1);
};
ASSetPropFlags(MovieClip.prototype, "stopTween", 1, 0);
MovieClip.prototype.isTweening = function () {
return($tweenManager.isTweening(this));
};
ASSetPropFlags(MovieClip.prototype, "isTweening", 1, 0);
MovieClip.prototype.getTweens = function () {
return($tweenManager.getTweens(this));
};
ASSetPropFlags(MovieClip.prototype, "getTweens", 1, 0);
MovieClip.prototype.lockTween = function () {
$tweenManager.lockTween(this, true);
};
ASSetPropFlags(MovieClip.prototype, "lockTween", 1, 0);
MovieClip.prototype.unlockTween = function () {
$tweenManager.lockTween(this, false);
};
ASSetPropFlags(MovieClip.prototype, "unlockTween", 1, 0);
MovieClip.prototype.isTweenLocked = function () {
return($tweenManager.isTweenLocked(this));
};
ASSetPropFlags(MovieClip.prototype, "isTweenLocked", 1, 0);
MovieClip.prototype.alphaTo = function (destAlpha, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_alpha"], [destAlpha], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "alphaTo", 1, 0);
MovieClip.prototype.brightnessTo = function (bright, seconds, animType, delay, callback, extra1, extra2) {
var _local3 = bright;
var _local2 = 100 - Math.abs(_local3);
var _local1 = 0;
if (_local3 > 0) {
_local1 = 256 * (_local3 / 100);
}
var destCt = {ra:_local2, rb:_local1, ga:_local2, gb:_local1, ba:_local2, bb:_local1};
this.tween(["_ct_"], [destCt], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "brightnessTo", 1, 0);
MovieClip.prototype.colorTo = function (destColor, seconds, animType, delay, callback, extra1, extra2) {
var _local1 = destColor;
var _local2 = {rb:_local1 >> 16, ra:0, gb:(_local1 & 65280) >> 8, ga:0, bb:_local1 & 255, ba:0};
this.tween(["_ct_"], [_local2], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "colorTo", 1, 0);
MovieClip.prototype.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) {
var _local1 = {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab};
this.tween(["_ct_"], [_local1], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "colorTransformTo", 1, 0);
MovieClip.prototype.scaleTo = function (destScale, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_xscale", "_yscale"], [destScale, destScale], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "scaleTo", 1, 0);
MovieClip.prototype.slideTo = function (destX, destY, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_x", "_y"], [destX, destY], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "slideTo", 1, 0);
MovieClip.prototype.rotateTo = function (destRotation, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_rotation"], [destRotation], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "rotateTo", 1, 0);
_global.appRoot = this;
initLoadBar = function () {
appRoot.loadBar_mc.onEnterFrame = function () {
if (appRoot.getBytesLoaded() == appRoot.getBytesTotal()) {
appRoot.gotoAndPlay("loaded");
} else {
var _local1 = 138 * (appRoot.getBytesLoaded() / appRoot.getBytesTotal());
this.progress_mc._width = _local1;
}
};
};
appRoot.gambits = new Array();
appRoot.gambits.push({name:"avalanche", id:1, data:["r", "r", "r"]});
appRoot.gambits.push({name:"bureaucrat", id:9, data:["p", "p", "p"]});
appRoot.gambits.push({name:"toolbox", id:3, data:["s", "s", "s"]});
appRoot.gambits.push({name:"crescendo", id:11, data:["r", "s", "p"]});
appRoot.gambits.push({name:"paperweight", id:7, data:["r", "p", "p"]});
appRoot.gambits.push({name:"fistfull o' dollars", id:2, data:["p", "p", "r"]});
appRoot.gambits.push({name:"paper doll", id:5, data:["s", "s", "p"]});
appRoot.gambits.push({name:"excalibur", id:6, data:["r", "s", "r"]});
appRoot.gambits.push({name:"obstruction of justice", id:8, data:["s", "p", "p"]});
appRoot.gambits.push({name:"scissor sandwich", id:4, data:["p", "s", "p"]});
appRoot.gambits.push({name:"denouement", id:10, data:["p", "s", "r"]});
beginSession = function (playerName) {
var _local1 = this;
trace("! BEGINNING A NEW RPS SESSION");
if (appRoot.session != undefined) {
delete appRoot.session;
}
appRoot.session = new Object();
appRoot.session.playerName = "";
appRoot.session.recordStats = false;
appRoot.session.matchRecord = {w:0, l:0};
appRoot.session.throwRecord = {w:0, l:0};
appRoot.session.throwWinStreak = 0;
appRoot.session.matchWinStreak = 0;
appRoot.session.throwLosingStreak = 0;
appRoot.session.matchLosingStreak = 0;
appRoot.session.throws = {r:0, p:0, s:0};
appRoot.session.setPlayerName = function (str) {
var _local1 = this;
if (str == "") {
_local1.recordStats = false;
} else {
_local1.recordStats = true;
_local1.playerName = str;
}
};
appRoot.session.getPlayerName = function () {
return(this.playerName);
};
appRoot.session.setPlayerName(playerName);
appRoot.session.winThrow = function (theThrow) {
appRoot.session.throwRecord.w++;
appRoot.session.throwWinStreak++;
appRoot.session.throws[theThrow]++;
trace((((("R:" + appRoot.session.throws.r) + " P:") + appRoot.session.throws.p) + " S:") + appRoot.session.throws.s);
if (appRoot.session.throwLosingStreak > 1) {
appRoot.submitThrowLosingStreak(appRoot.session.throwLosingStreak);
appRoot.session.throwLosingStreak = 0;
}
this.updateRecordDisplay();
};
appRoot.session.loseThrow = function (theThrow) {
appRoot.session.throwRecord.l++;
appRoot.session.throwLosingStreak++;
appRoot.session.throws[theThrow]++;
if (appRoot.session.throwWinStreak > 1) {
appRoot.submitThrowWinStreak(appRoot.session.throwWinStreak);
appRoot.session.throwWinStreak = 0;
}
this.updateRecordDisplay();
};
appRoot.session.tieThrow = function (theThrow) {
appRoot.session.throws[theThrow]++;
};
appRoot.session.winMatch = function () {
appRoot.session.matchRecord.w++;
appRoot.session.matchWinStreak++;
if (appRoot.session.matchLosingStreak > 1) {
appRoot.submitMatchLosingStreak(appRoot.session.matchLosingStreak);
appRoot.session.matchLosingStreak = 0;
}
this.updateRecordDisplay();
};
appRoot.session.loseMatch = function () {
appRoot.session.matchRecord.l++;
appRoot.session.matchLosingStreak++;
if (appRoot.session.matchWinStreak > 1) {
appRoot.submitMatchWinStreak(appRoot.session.matchWinStreak);
appRoot.session.matchWinStreak = 0;
}
this.updateRecordDisplay();
};
appRoot.session.updateRecordDisplay = function () {
var _local1 = this;
appRoot.matchRecord_txt.text = _local1.matchRecord.w;
appRoot.matchRecord_txt.text = appRoot.matchRecord_txt.text + ((_local1.matchRecord.w == 1) ? " win " : " wins ");
appRoot.matchRecord_txt.text = appRoot.matchRecord_txt.text + _local1.matchRecord.l;
appRoot.matchRecord_txt.text = appRoot.matchRecord_txt.text + ((_local1.matchRecord.l == 1) ? " loss" : " losses");
appRoot.throwRecord_txt.text = _local1.throwRecord.w;
appRoot.throwRecord_txt.text = appRoot.throwRecord_txt.text + ((_local1.throwRecord.w == 1) ? " win " : " wins ");
appRoot.throwRecord_txt.text = appRoot.throwRecord_txt.text + _local1.throwRecord.l;
appRoot.throwRecord_txt.text = appRoot.throwRecord_txt.text + ((_local1.throwRecord.l == 1) ? " loss" : " losses");
};
};
beginMatch = function () {
trace("! BEGINNING A NEW RPS MATCH");
if (appRoot.session.match != undefined) {
delete appRoot.session.match;
}
appRoot.session.match = new Object();
appRoot.session.match = {playerScore:0, cpuScore:0};
var _local1 = appRoot.session.getPlayerName();
trace(_local1);
if (_local1 != "") {
appRoot.playerName_txt.text = _local1.toUpperCase();
}
};
beginThrow = function () {
if (appRoot.session.currentThrow != undefined) {
delete appRoot.session.currentThrow;
}
appRoot.session.currentThrow = new Object();
appRoot.session.currentThrow = {playerThrow:"", cpuThrow:""};
appRoot.playerThrow_mc.gotoAndPlay("throw");
appRoot.cpuThrow_mc.gotoAndPlay("throw");
appRoot.playerThrow_mc.scaleTo(100, 1, "easeOutExpo");
appRoot.cpuThrow_mc.scaleTo(100, 1, "easeOutExpo");
appRoot.cpuThrow_mc.brightnessTo(0, 1, "easeOutExpo");
appRoot.playerThrow_mc.brightnessTo(0, 1, "easeOutExpo");
};
playerSelectThrow = function (theThrow) {
var _local1 = this;
if (theThrow != _local1.currentSelection) {
if (_local1.currentSelection != "") {
var _local2 = _local1[_local1.currentSelection + "_mc"];
_local2.stopTween();
_local2.colorTo(3355443, 0.1);
}
_local1.currentSelection = theThrow;
}
};
initChooseButtons = function () {
appRoot.interface_mc.playerSelectThrow = appRoot.playerSelectThrow;
appRoot.interface_mc.chooseRollOver = appRoot.chooseRollOver;
appRoot.interface_mc.chooseRollOut = appRoot.chooseRollOut;
appRoot.interface_mc.currentSelection = undefined;
with (appRoot.interface_mc) {
r_btn.onRollOver = function () {
this._parent.chooseRollOver("r");
};
r_btn.onRollOut = function () {
this._parent.chooseRollOut("r");
};
r_btn.onRelease = function () {
this._parent.playerSelectThrow("r");
};
p_btn.onRollOver = function () {
this._parent.chooseRollOver("p");
};
p_btn.onRollOut = function () {
this._parent.chooseRollOut("p");
};
p_btn.onRelease = function () {
this._parent.playerSelectThrow("p");
};
s_btn.onRollOver = function () {
this._parent.chooseRollOver("s");
};
s_btn.onRollOut = function () {
this._parent.chooseRollOut("s");
};
s_btn.onRelease = function () {
this._parent.playerSelectThrow("s");
};
}
};
chooseRollOver = function (theThrow) {
var _local1 = this[theThrow + "_mc"];
_local1.stopTween();
_local1.colorTo(16777215, 0.1);
};
chooseRollOut = function (theThrow) {
if (this.currentSelection != theThrow) {
var _local1 = this[theThrow + "_mc"];
_local1.stopTween();
_local1.colorTo(3355443, 0.1);
}
};
checkForWinner = function () {
var p = appRoot.session.currentThrow.playerThrow;
var _local2 = appRoot.session.currentThrow.cpuThrow;
var _local1;
if (p == _local2) {
_local1 = "tie";
} else {
switch (p) {
case "r" :
if (_local2 == "p") {
_local1 = "lose";
} else if (_local2 == "s") {
_local1 = "win";
}
break;
case "p" :
if (_local2 == "s") {
_local1 = "lose";
} else if (_local2 == "r") {
_local1 = "win";
}
break;
case "s" :
if (_local2 == "r") {
_local1 = "lose";
} else if (_local2 == "p") {
_local1 = "win";
}
break;
default :
trace("error");
return("error");
}
}
if (_local1 == "win") {
appRoot.session.winThrow(appRoot.session.currentThrow.playerThrow);
appRoot.session.match.playerScore++;
appRoot.playerScore_mc[("dot" + appRoot.session.match.playerScore) + "_mc"].gotoAndPlay("on");
appRoot.playerHistory_mc.addHistoryItem(appRoot.session.currentThrow.playerThrow);
appRoot.cpuHistory_mc.clearHistory();
var _local3 = appRoot.checkForGambit(appRoot.playerHistory_mc.history_array);
if (_local3 > 0) {
appRoot.gambitID = _local3;
appRoot.interface_mc.gotoAndPlay("gambit");
appRoot.matchOutcome = "win";
appRoot.session.winMatch();
} else if (appRoot.session.match.playerScore == 3) {
appRoot.matchOutcome = "win";
appRoot.interface_mc.gotoAndPlay("matchOver");
appRoot.session.winMatch();
} else {
appRoot.interface_mc.gotoAndPlay("win");
}
appRoot.playerThrow_mc.scaleTo(115, 1, "easeOutElastic");
appRoot.cpuThrow_mc.scaleTo(85, 0.5, "easeOutBounce");
appRoot.cpuThrow_mc.brightnessTo(25, 0.5, "easeOutExpo");
} else if (_local1 == "lose") {
appRoot.session.loseThrow(appRoot.session.currentThrow.playerThrow);
appRoot.session.match.cpuScore++;
appRoot.cpuScore_mc[("dot" + appRoot.session.match.cpuScore) + "_mc"].gotoAndPlay("on");
appRoot.cpuHistory_mc.addHistoryItem(appRoot.session.currentThrow.cpuThrow);
appRoot.playerHistory_mc.clearHistory();
var _local3 = appRoot.checkForGambit(appRoot.cpuHistory_mc.history_array);
if (_local3 > 0) {
appRoot.gambitID = _local3;
appRoot.interface_mc.gotoAndPlay("gambit");
appRoot.matchOutcome = "lose";
appRoot.session.loseMatch();
} else if (appRoot.session.match.cpuScore == 3) {
appRoot.matchOutcome = "lose";
appRoot.interface_mc.gotoAndPlay("matchOver");
appRoot.session.loseMatch();
} else {
appRoot.interface_mc.gotoAndPlay("lose");
}
appRoot.cpuThrow_mc.scaleTo(115, 1, "easeOutElastic");
appRoot.playerThrow_mc.scaleTo(85, 0.5, "easeOutBounce");
appRoot.playerThrow_mc.brightnessTo(25, 0.5, "easeOutExpo");
} else if (_local1 == "tie") {
appRoot.session.tieThrow(appRoot.session.currentThrow.playerThrow);
appRoot.interface_mc.gotoAndPlay("tie");
}
return(_local1);
};
isMatchOver = function () {
if ((appRoot.session.match.playerScore == 3) || (appRoot.session.match.cpuScore == 3)) {
return(true);
}
return(false);
};
gotoMatchResult = function () {
if (appRoot.session.match.playerScore == 3) {
appRoot.gotoAndPlay("win");
} else if (appRoot.session.match.cpuScore == 3) {
appRoot.gotoAndPlay("lose");
}
};
initCpuPlayer = function () {
if (appRoot.cpuPlayer != undefined) {
delete appRoot.cpuPlayer;
}
appRoot.cpuPlayer = new Object();
};
cpuChooseThrow = function () {
var _local1 = ["r", "p", "s"];
var _local2 = _local1[Math.floor(Math.random() * _local1.length)];
return(_local2);
};
cpuSelectGambit = function () {
return(["r", "r", "r"]);
};
addHistoryItem = function (str) {
var _local1 = this;
_local1.history_array.unshift(str);
_local1.history_array.length = 3;
_local1.addHistoryIcon(str);
};
clearHistory = function () {
var _local1 = this;
_local1.history_array = ["", "", ""];
_local1.icon_array = ["", "", ""];
_local1.gotoAndPlay("clear");
};
checkForGambit = function (history) {
var _local2 = history;
var _local1 = 0;
while (_local1 < appRoot.gambits.length) {
if (_local2.join("") == appRoot.gambits[_local1].data.join("")) {
trace(appRoot.gambits[_local1].name + "!!!!!");
return(appRoot.gambits[_local1].id);
}
_local1++;
}
return(0);
};
addHistoryIcon = function (type) {
this.icon0_mc.icon_mc.gotoAndPlay(type);
this.gotoAndPlay("flip");
};
updateHistoryView = function () {
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.history_array.length) {
var _local2 = _local3[("icon" + (_local1 + 1)) + "_mc"];
if (_local3.history_array[_local1] == "") {
_local2._visible = false;
} else {
_local2._visible = true;
_local2.icon_mc.gotoAndPlay(_local3.history_array[_local1]);
}
_local1++;
}
};
initHistoryClip = function () {
var _local1 = this;
_local1.history_array = ["", "", ""];
_local1.addHistoryItem = appRoot.addHistoryItem;
_local1.clearHistory = appRoot.clearHistory;
_local1.updateHistoryView = appRoot.updateHistoryView;
_local1.addHistoryIcon = appRoot.addHistoryIcon;
_local1.icon0_mc._visible = false;
_local1.icon1_mc._visible = false;
_local1.icon2_mc._visible = false;
_local1.icon3_mc._visible = false;
};
submitWinLossRecord = function () {
var _local1 = [appRoot.session.getPlayerName(), appRoot.session.matchRecord.l, appRoot.session.throws.r, appRoot.session.throws.p, appRoot.session.throws.s];
submitStatToServer(_local1.join("|"), "rpsMatchWins", appRoot.session.matchRecord.w);
};
submitThrowWinStreak = function (streak) {
if (streak > 2) {
submitStatToServer(appRoot.session.getPlayerName(), "rpsWinStreakThrows", streak);
}
};
submitThrowLosingStreak = function (streak) {
if (streak > 2) {
submitStatToServer(appRoot.session.getPlayerName(), "rpsLosingStreakThrows", streak);
}
};
submitMatchWinStreak = function (streak) {
if (streak > 2) {
submitStatToServer(appRoot.session.getPlayerName(), "rpsWinStreakMatches", streak);
}
};
submitMatchLosingStreak = function (streak) {
if (streak > 2) {
submitStatToServer(appRoot.session.getPlayerName(), "rpsLosingStreakMatches", streak);
}
};
submitStatToServer = function (playerName, statType, statData) {
if (appRoot.session.recordStats) {
var _local1 = new LoadVars();
var _local2 = new LoadVars();
_local1.nocache = getTimer();
_local1.name = playerName;
_local1.game = statType;
_local1.score = statData;
trace("!SENDING : " + _local1.toString());
_local1.sendAndLoad("/gameHighScores.asp", _local2, "GET");
}
};
loadHighScores = function () {
trace("! Loading High Scores");
if (appRoot.highScores_obj == undefined) {
delete highScores_obj;
}
appRoot.highScores_obj = new Object();
appRoot.highScores_obj.topScores = new Object();
appRoot.highScores_obj.topScores.matches_array = new Array();
appRoot.highScores_obj.topScores.matches_xml = new XML();
appRoot.highScores_obj.topScores.matches_xml.ignoreWhite = true;
appRoot.highScores_obj.topScores.matches_xml.onLoad = function (success) {
trace("! loaded");
if (success) {
trace("! loading successful");
var theNode = this.firstChild.childNodes[1];
var _local1 = 0;
while (_local1 < theNode.childNodes.length) {
var _local3 = theNode.childNodes[_local1].attributes.name.split("|");
var score = parseInt(theNode.childNodes[_local1].attributes.score);
var school = theNode.childNodes[_local1].attributes.school;
var percent = Math.round((score / (score + parseInt(_local3[1]))) * 100);
appRoot.highScores_obj.topScores.matches_array.push({name:_local3[0], wins:score, losses:_local3[1], percent:percent, r:_local3[2], p:_local3[3], s:_local3[4]});
_local1++;
}
appRoot.highScores_mc.loading_mc._visible = false;
_local1 = 0;
while (_local1 < 10) {
var _local2 = appRoot.highScores_mc[("item" + _local1) + "_mc"];
if (appRoot.highScores_obj.topScores.matches_array[_local1].name != undefined) {
_local2.name_txt.text = appRoot.highScores_obj.topScores.matches_array[_local1].name;
_local2.w_txt.text = appRoot.highScores_obj.topScores.matches_array[_local1].wins;
_local2.l_txt.text = appRoot.highScores_obj.topScores.matches_array[_local1].losses;
_local2.percent_txt.text = appRoot.highScores_obj.topScores.matches_array[_local1].percent + "%";
_local2.rps_txt.text = (((appRoot.highScores_obj.topScores.matches_array[_local1].r + "/") + appRoot.highScores_obj.topScores.matches_array[_local1].p) + "/") + appRoot.highScores_obj.topScores.matches_array[_local1].s;
} else {
_local2.name_txt.text = "";
_local2.w_txt.text = "";
_local2.l_txt.text = "";
_local2.percent_txt.text = "";
_local2.rps_txt.text = "";
}
_local1++;
}
} else {
trace("! error loading...");
}
};
appRoot.highScores_obj.topScores.matches_xml.load(("/gameHighScores.xml.asp?nocache=" + getTimer()) + "&game=rpsMatchWins");
};
loadStats = function (type) {
trace("! Loading Stats");
if (appRoot.stats_obj == undefined) {
appRoot.stats_obj = new Object();
}
appRoot.stats_obj.throws_xml = new XML();
appRoot.stats_obj.throws_xml.ignoreWhite = true;
appRoot.stats_obj.matches_xml = new XML();
appRoot.stats_obj.matches_xml.ignoreWhite = true;
appRoot.stats_obj.matches_array = new Array();
appRoot.stats_obj.matches_array.length = 0;
appRoot.stats_obj.throws_array = new Array();
appRoot.stats_obj.throws_array.length = 0;
appRoot.stats_obj.matches_xml.onLoad = function (success) {
if (success) {
var _local3 = this.firstChild.childNodes[1];
var _local1 = 0;
while (_local1 < _local3.childNodes.length) {
appRoot.stats_obj.matches_array.push({name:_local3.childNodes[_local1].attributes.name, wins:_local3.childNodes[_local1].attributes.score});
_local1++;
}
appRoot.matches_mc.loader_mc._visible = false;
_local1 = 0;
while (_local1 < 10) {
var _local2 = appRoot.matches_mc[("entry" + _local1) + "_mc"];
_local2.name_txt.text = appRoot.stats_obj.matches_array[_local1].name;
_local2.score_txt.text = appRoot.stats_obj.matches_array[_local1].wins;
_local1++;
}
}
};
var game_str;
if (type == "win") {
game_str = "rpsWinStreakMatches";
} else if (type == "lose") {
game_str = "rpsLosingStreakMatches";
}
appRoot.matches_mc.loader_mc._visible = true;
appRoot.stats_obj.matches_xml.load((("/gameHighScores.xml.asp?nocache=" + getTimer()) + "&game=") + game_str);
appRoot.stats_obj.throws_xml.onLoad = function (success) {
if (success) {
var _local3 = this.firstChild.childNodes[1];
var _local1 = 0;
while (_local1 < _local3.childNodes.length) {
appRoot.stats_obj.throws_array.push({name:_local3.childNodes[_local1].attributes.name, wins:_local3.childNodes[_local1].attributes.score});
_local1++;
}
appRoot.throws_mc.loader_mc._visible = false;
_local1 = 0;
while (_local1 < 10) {
var _local2 = appRoot.throws_mc[("entry" + _local1) + "_mc"];
_local2.name_txt.text = appRoot.stats_obj.throws_array[_local1].name;
_local2.score_txt.text = appRoot.stats_obj.throws_array[_local1].wins;
_local1++;
}
}
};
var game_str;
if (type == "win") {
game_str = "rpsWinStreakThrows";
} else if (type == "lose") {
game_str = "rpsLosingStreakThrows";
}
appRoot.throws_mc.loader_mc._visible = true;
appRoot.stats_obj.throws_xml.load((("/gameHighScores.xml.asp?nocache=" + getTimer()) + "&game=") + game_str);
};
initStatsButtons = function () {
var _local1 = this;
appRoot.statsTitle_mc.win_btn.onRollOver = function () {
this._parent.win_mc.stopTween();
this._parent.win_mc.colorTo(16777215, 0.25);
};
appRoot.statsTitle_mc.win_btn.onRollOut = function () {
this._parent.win_mc.stopTween();
this._parent.win_mc.colorTo(15455251, 0.25);
};
appRoot.statsTitle_mc.win_btn.onRelease = function () {
var _local1 = this;
_local1.enabled = false;
_local1._parent.lose_btn.enabled = true;
_local1._parent.lose_mc.colorTo(15455251, 0.25);
_local1._parent.win_mc.stopTween();
_local1._parent.win_mc.colorTo(0, 0.25);
appRoot.loadStats("win");
};
appRoot.statsTitle_mc.lose_btn.onRollOver = function () {
this._parent.lose_mc.stopTween();
this._parent.lose_mc.colorTo(16777215, 0.25);
};
appRoot.statsTitle_mc.lose_btn.onRollOut = function () {
this._parent.lose_mc.stopTween();
this._parent.lose_mc.colorTo(15455251, 0.25);
};
appRoot.statsTitle_mc.lose_btn.onRelease = function () {
var _local1 = this;
_local1.enabled = false;
_local1._parent.win_btn.enabled = true;
_local1._parent.win_mc.colorTo(15455251, 0.25);
_local1._parent.lose_mc.stopTween();
_local1._parent.lose_mc.colorTo(0, 0.25);
appRoot.loadStats("lose");
};
appRoot.statsTitle_mc.win_btn.enabled = false;
};
initMainMenu = function () {
var _local1 = this;
appRoot.mainBox2_mc.play_btn.onRollOver = function () {
this._parent.play_mc.stopTween();
this._parent.play_mc.colorTo(16777215, 0.25);
};
appRoot.mainBox2_mc.play_btn.onRollOut = function () {
this._parent.play_mc.stopTween();
this._parent.play_mc.colorTo(11261929, 0.25);
};
appRoot.mainBox2_mc.play_btn.onRelease = function () {
appRoot.beginSession(this._parent._parent.name_mc.playerName_txt.text);
appRoot.gotoAndPlay("game");
};
appRoot.mainBox2_mc.highScores_btn.onRollOver = function () {
this._parent.highScores_mc.stopTween();
this._parent.highScores_mc.colorTo(16777215, 0.25);
};
appRoot.mainBox2_mc.highScores_btn.onRollOut = function () {
this._parent.highScores_mc.stopTween();
this._parent.highScores_mc.colorTo(4630222, 0.25);
};
appRoot.mainBox2_mc.highScores_btn.onRelease = function () {
if ((appRoot.currentSection == "main") || (appRoot.currentSection == undefined)) {
appRoot.currentSection = "scores";
gotoAndPlay ("mainwipe");
} else if (appRoot.currentSection == "scores") {
appRoot.currentSection = "main";
appRoot.play();
} else {
appRoot.currentSection = "scores";
appRoot.play();
}
};
appRoot.mainBox2_mc.instructions_btn.onRollOver = function () {
this._parent.instructions_mc.stopTween();
this._parent.instructions_mc.colorTo(16777215, 0.25);
};
appRoot.mainBox2_mc.instructions_btn.onRollOut = function () {
this._parent.instructions_mc.stopTween();
this._parent.instructions_mc.colorTo(4630222, 0.25);
};
appRoot.mainBox2_mc.instructions_btn.onRelease = function () {
if ((appRoot.currentSection == "main") || (appRoot.currentSection == undefined)) {
appRoot.currentSection = "instructions";
gotoAndPlay ("mainwipe");
} else if (appRoot.currentSection == "instructions") {
appRoot.currentSection = "main";
appRoot.play();
} else {
appRoot.currentSection = "instructions";
appRoot.play();
}
};
appRoot.mainBox1_mc.about_btn.onRollOver = function () {
this._parent.about_mc.stopTween();
this._parent.about_mc.colorTo(16777215, 0.25);
};
appRoot.mainBox1_mc.about_btn.onRollOut = function () {
this._parent.about_mc.stopTween();
this._parent.about_mc.colorTo(1922669, 0.25);
};
appRoot.mainBox1_mc.about_btn.onRelease = function () {
if ((appRoot.currentSection == "main") || (appRoot.currentSection == undefined)) {
appRoot.currentSection = "about";
gotoAndPlay ("mainwipe");
} else if (appRoot.currentSection == "about") {
appRoot.currentSection = "main";
appRoot.play();
} else {
appRoot.currentSection = "about";
appRoot.play();
}
};
appRoot.mainBox1_mc.stats_btn.onRollOver = function () {
this._parent.stats_mc.stopTween();
this._parent.stats_mc.colorTo(16777215, 0.25);
};
appRoot.mainBox1_mc.stats_btn.onRollOut = function () {
this._parent.stats_mc.stopTween();
this._parent.stats_mc.colorTo(1922669, 0.25);
};
appRoot.mainBox1_mc.stats_btn.onRelease = function () {
if ((appRoot.currentSection == "main") || (appRoot.currentSection == undefined)) {
appRoot.currentSection = "stats";
gotoAndPlay ("mainwipe");
} else if (appRoot.currentSection == "stats") {
appRoot.currentSection = "main";
appRoot.play();
} else {
appRoot.currentSection = "stats";
appRoot.play();
}
};
};
initLoadBar();
Frame 4
stop();
Frame 25
initMainMenu();
stop();
Frame 36
gotoAndPlay(appRoot.currentSection);
Frame 45
stop();
Frame 72
stop();
Frame 90
if (appRoot.currentSection == "main") {
appRoot.gotoAndPlay("mainwipeback");
} else {
appRoot.gotoAndPlay(appRoot.currentSection);
}
Frame 128
stop();
Frame 146
if (appRoot.currentSection == "main") {
appRoot.gotoAndPlay("mainwipeback");
} else {
appRoot.gotoAndPlay(appRoot.currentSection);
}
Frame 155
if (appRoot.currentSection == "main") {
appRoot.gotoAndPlay("mainwipeback");
} else {
appRoot.gotoAndPlay(appRoot.currentSection);
}
Frame 168
initStatsButtons();
loadStats("win");
stop();
Frame 177
if (appRoot.currentSection == "main") {
appRoot.gotoAndPlay("mainwipeback");
} else {
appRoot.gotoAndPlay(appRoot.currentSection);
}
Frame 194
loadHighScores();
stop();
Frame 204
if (appRoot.currentSection == "main") {
appRoot.gotoAndPlay("mainwipeback");
} else {
appRoot.gotoAndPlay(appRoot.currentSection);
}
Instance of Symbol 141 MovieClip "playerThrow_mc" in Frame 209
onClipEvent (load) {
this.isPlayer = true;
}
Frame 211
beginMatch();
stop();
Frame 226
stop();
Frame 233
stop();
Symbol 287 MovieClip [__Packages.com.robertpenner.easing.Quad] Frame 0
class com.robertpenner.easing.Quad
{
function Quad () {
}
static function easeIn(t, b, c, d) {
return(((c * ((t = t / d))) * t) + b);
}
static function easeOut(t, b, c, d) {
return((((-c) * ((t = t / d))) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((c / 2) * _local1) * _local1) + b);
}
_local1--;
return((((-c) / 2) * ((_local1 * (_local1 - 2)) - 1)) + b);
}
}
Symbol 288 MovieClip [__Packages.com.robertpenner.easing.Circ] Frame 0
class com.robertpenner.easing.Circ
{
function Circ () {
}
static function easeIn(t, b, c, d) {
return(((-c) * (Math.sqrt(1 - (((t = t / d)) * t)) - 1)) + b);
}
static function easeOut(t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return((c * Math.sqrt(1 - (_local1 * _local1))) + b);
}
static function easeInOut(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + b);
}
_local1 = _local1 - 2;
return(((c / 2) * (Math.sqrt(1 - (_local1 * _local1)) + 1)) + b);
}
}
Symbol 289 MovieClip [__Packages.com.robertpenner.easing.Quart] Frame 0
class com.robertpenner.easing.Quart
{
function Quart () {
}
static function easeIn(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / d;
return(((((c * _local1) * _local1) * _local1) * _local1) + b);
}
static function easeOut(t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return(((-c) * ((((_local1 * _local1) * _local1) * _local1) - 1)) + b);
}
static function easeInOut(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((((c / 2) * _local1) * _local1) * _local1) * _local1) + b);
}
_local1 = _local1 - 2;
return((((-c) / 2) * ((((_local1 * _local1) * _local1) * _local1) - 2)) + b);
}
}
Symbol 290 MovieClip [__Packages.com.robertpenner.easing.Sine] Frame 0
class com.robertpenner.easing.Sine
{
function Sine () {
}
static function easeIn(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOut(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOut(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
}
Symbol 291 MovieClip [__Packages.com.robertpenner.easing.Back] Frame 0
class com.robertpenner.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
var _local1 = s;
var _local2 = t;
if (_local1 == undefined) {
_local1 = 1.70158;
}
_local2 = _local2 / d;
return((((c * _local2) * _local2) * (((_local1 + 1) * _local2) - _local1)) + b);
}
static function easeOut(t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = (_local1 / d) - 1;
return((c * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local2 = _local2 * 1.525;
return(((c / 2) * ((_local1 * _local1) * (((_local2 + 1) * _local1) - _local2))) + b);
}
_local1 = _local1 - 2;
_local2 = _local2 * 1.525;
return(((c / 2) * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 2)) + b);
}
}
Symbol 292 MovieClip [__Packages.com.robertpenner.easing.Quint] Frame 0
class com.robertpenner.easing.Quint
{
function Quint () {
}
static function easeIn(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / d;
return((((((c * _local1) * _local1) * _local1) * _local1) * _local1) + b);
}
static function easeOut(t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return((c * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((((((c / 2) * _local1) * _local1) * _local1) * _local1) * _local1) + b);
}
_local1 = _local1 - 2;
return(((c / 2) * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 2)) + b);
}
}
Symbol 293 MovieClip [__Packages.com.robertpenner.easing.Linear] Frame 0
class com.robertpenner.easing.Linear
{
function Linear () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 294 MovieClip [__Packages.com.robertpenner.easing.Expo] Frame 0
class com.robertpenner.easing.Expo
{
function Expo () {
}
static function easeIn(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOut(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOut(t, b, c, d) {
var _local1 = t;
var _local2 = b;
var _local3 = c;
if (_local1 == 0) {
return(_local2);
}
if (_local1 == d) {
return(_local2 + _local3);
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((_local3 / 2) * Math.pow(2, 10 * (_local1 - 1))) + _local2);
}
_local1--;
return(((_local3 / 2) * ((-Math.pow(2, -10 * _local1)) + 2)) + _local2);
}
}
Symbol 295 MovieClip [__Packages.com.robertpenner.easing.Elastic] Frame 0
class com.robertpenner.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
var _local1 = a;
var _local2 = p;
var _local3 = t;
if (_local3 == 0) {
return(b);
}
_local3 = _local3 / d;
if (_local3 == 1) {
return(b + c);
}
if (!_local2) {
_local2 = d * 0.3;
}
if ((!_local1) || (_local1 < Math.abs(c))) {
_local1 = c;
var s = (_local2 / 4);
} else {
var s = ((_local2 / (Math.PI*2)) * Math.asin(c / _local1));
}
_local3 = _local3 - 1;
return((-((_local1 * Math.pow(2, 10 * _local3)) * Math.sin((((_local3 * d) - s) * (Math.PI*2)) / _local2))) + b);
}
static function easeOut(t, b, c, d, a, p) {
var _local1 = c;
var _local2 = a;
var _local3 = p;
if (t == 0) {
return(b);
}
if (((t = t / d)) == 1) {
return(b + _local1);
}
if (!_local3) {
_local3 = d * 0.3;
}
if ((!_local2) || (_local2 < Math.abs(_local1))) {
_local2 = _local1;
var s = (_local3 / 4);
} else {
var s = ((_local3 / (Math.PI*2)) * Math.asin(_local1 / _local2));
}
return((((_local2 * Math.pow(2, -10 * t)) * Math.sin((((t * d) - s) * (Math.PI*2)) / _local3)) + _local1) + b);
}
static function easeInOut(t, b, c, d, a, p) {
var _local1 = t;
var _local2 = a;
var _local3 = p;
if (_local1 == 0) {
return(b);
}
_local1 = _local1 / (d / 2);
if (_local1 == 2) {
return(b + c);
}
if (!_local3) {
_local3 = d * 0.45;
}
if ((!_local2) || (_local2 < Math.abs(c))) {
_local2 = c;
var s = (_local3 / 4);
} else {
var s = ((_local3 / (Math.PI*2)) * Math.asin(c / _local2));
}
if (_local1 < 1) {
_local1 = _local1 - 1;
return((-0.5 * ((_local2 * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / _local3))) + b);
}
_local1 = _local1 - 1;
return(((((_local2 * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / _local3)) * 0.5) + c) + b);
}
}
Symbol 296 MovieClip [__Packages.com.robertpenner.easing.Bounce] Frame 0
class com.robertpenner.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
var _local1 = t;
var _local2 = c;
var _local3 = b;
_local1 = _local1 / d;
if (_local1 < 0.363636363636364) {
return((_local2 * ((7.5625 * _local1) * _local1)) + _local3);
}
if (_local1 < 0.727272727272727) {
_local1 = _local1 - 0.545454545454545;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.75)) + _local3);
}
if (_local1 < 0.909090909090909) {
_local1 = _local1 - 0.818181818181818;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.9375)) + _local3);
}
_local1 = _local1 - 0.954545454545455;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.984375)) + _local3);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
var _local1 = d;
var _local2 = t;
var _local3 = c;
if (_local2 < (_local1 / 2)) {
return((easeIn(_local2 * 2, 0, _local3, _local1) * 0.5) + b);
}
return(((easeOut((_local2 * 2) - _local1, 0, _local3, _local1) * 0.5) + (_local3 * 0.5)) + b);
}
}
Symbol 297 MovieClip [__Packages.zigo.tweenManager] Frame 0
class zigo.tweenManager
{
var playing, tweenHolder, tweenList, lockedTweens;
function tweenManager () {
var _local1 = this;
_local1.playing = false;
_local1.autoStop = false;
_local1.broadcastEvents = false;
_local1.ints = new Array();
_local1.lockedTweens = new Object();
_local1.tweenList = new Array();
_local1.tweenHolder = _root.createEmptyMovieClip("_th_", 6789);
}
function init() {
var _local1 = this;
if (_local1.tweenHolder._name == undefined) {
_local1.tweenHolder = _root.createEmptyMovieClip("_th_", 6789);
}
_local1.tweenHolder.onEnterFrame = function () {
_global.$tweenManager.update.call(_global.$tweenManager);
};
_local1.playing = true;
_local1.now = getTimer();
}
function deinit() {
playing = false;
delete tweenHolder.onEnterFrame;
}
function update() {
var _local2 = this;
var i = _local2.tweenList.length;
if (_local2.broadcastEvents) {
var _local3 = {};
var et = {};
}
while (i--) {
var _local1 = _local2.tweenList[i];
if ((_local1.ts + _local1.d) > _local2.now) {
if (_local1.ctm == undefined) {
_local1.mc[_local1.pp] = _local1.ef(_local2.now - _local1.ts, _local1.ps, _local1.ch, _local1.d, _local1.e1, _local1.e2);
} else {
var ttm = {};
for (var j in _local1.ctm) {
ttm[j] = _local1.ef(_local2.now - _local1.ts, _local1.stm[j], _local1.ctm[j], _local1.d, _local1.e1, _local1.e2);
}
_local1.c.setTransform(ttm);
}
if (_local2.broadcastEvents) {
if (_local3[targetPath(_local1.mc)] == undefined) {
_local3[targetPath(_local1.mc)] = _local1.mc;
}
}
if (_local1.cb.updfunc != undefined) {
_local1.cb.updfunc.apply(_local1.cb.updscope, _local1.cb.updargs);
}
} else {
if (_local1.ctm == undefined) {
_local1.mc[_local1.pp] = _local1.ps + _local1.ch;
} else {
var ttm = {};
for (var j in _local1.ctm) {
ttm[j] = _local1.stm[j] + _local1.ctm[j];
}
_local1.c.setTransform(ttm);
}
if (_local2.broadcastEvents) {
if (_local3[targetPath(_local1.mc)] == undefined) {
_local3[targetPath(_local1.mc)] = _local1.mc;
}
if (et[targetPath(_local1.mc)] == undefined) {
et[targetPath(_local1.mc)] = _local1.mc;
}
}
if (_local1.cb.updfunc != undefined) {
_local1.cb.updfunc.apply(_local1.cb.updscope, _local1.cb.updargs);
}
if (endt == undefined) {
var endt = new Array();
}
endt.push(i);
}
}
for (var j in _local3) {
_local3[j].broadcastMessage("onTweenUpdate");
}
if (endt != undefined) {
_local2.endTweens(endt);
}
for (var j in et) {
et[j].broadcastMessage("onTweenEnd");
}
_local2.now = getTimer();
}
function endTweens(tid_arr) {
var _local1 = [];
var tl = tid_arr.length;
var _local2 = 0;
while (_local2 < tl) {
var _local3 = tweenList[tid_arr[_local2]].cb;
if (_local3 != undefined) {
var exec = true;
for (var j in _local1) {
if (_local1[j] == _local3) {
exec = false;
break;
}
}
if (exec) {
_local1.push(_local3);
}
}
tweenList.splice(tid_arr[_local2], 1);
_local2++;
}
_local2 = 0;
while (_local2 < _local1.length) {
_local1[_local2].func.apply(_local1[_local2].scope, _local1[_local2].args);
_local2++;
}
if (tweenList.length == 0) {
deinit();
}
}
function addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var _local1 = pEnd;
var _local2 = props;
var _local3 = this;
if (!_local3.playing) {
_local3.init();
}
for (var i in _local2) {
if (_local2[i].substr(0, 4) != "_ct_") {
_local3.tweenList.unshift({mc:mc, pp:_local2[i], ps:mc[_local2[i]], ch:_local1[i] - mc[_local2[i]], ts:_local3.now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2});
} else {
var c = new Color(mc);
var stm = c.getTransform();
var ctm = {};
for (var j in _local1[i]) {
if ((_local1[i][j] != stm[j]) && (_local1[i][j] != undefined)) {
ctm[j] = _local1[i][j] - stm[j];
}
}
_local3.tweenList.unshift({mc:mc, c:c, stm:stm, ctm:ctm, ts:_local3.now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2});
}
}
if (_local3.broadcastEvents) {
mc.broadcastMessage("onTweenStart", _local2[i]);
}
if (callback.startfunc != undefined) {
callback.startfunc.apply(callback.startscope, callback.startargs);
}
}
function addTweenWithDelay(delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var _local1 = this;
var il = _local1.ints.length;
var intid = setInterval(function (obj) {
var _local1 = obj;
_local1.addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2);
clearInterval(_local1.ints[il].intid);
_local1.ints[il] = undefined;
}, delay * 1000, _local1);
_local1.ints[il] = {mc:mc, props:props, pend:pEnd, intid:intid};
}
function removeTween(mc, props) {
var _local1 = this;
var _local3 = props;
var all = false;
if (_local3 == undefined) {
var all = true;
}
var _local2 = _local1.tweenList.length;
while (_local2--) {
if (_local1.tweenList[_local2].mc == mc) {
if (all) {
_local1.tweenList.splice(_local2, 1);
} else {
for (var j in _local3) {
if (_local1.tweenList[_local2].pp == _local3[j]) {
_local1.tweenList.splice(_local2, 1);
} else if ((_local3[j] == "_ct_") && (_local1.tweenList[_local2].ctm != undefined)) {
_local1.tweenList.splice(_local2, 1);
}
}
}
}
}
_local2 = _local1.ints.length;
while (_local2--) {
if (_local1.ints[_local2].mc == mc) {
if (all) {
clearInterval(_local1.ints[_local2].intid);
_local1.ints[_local2] = undefined;
} else {
for (var j in _local3) {
for (var k in _local1.ints[_local2].props) {
if (_local1.ints[_local2].props[k] == _local3[j]) {
_local1.ints[_local2].props.splice(k, 1);
_local1.ints[_local2].pend.splice(k, 1);
}
}
if (_local1.ints[_local2].props.length == 0) {
clearInterval(_local1.ints[_local2].intid);
}
}
}
}
}
if (_local1.tweenList.length == 0) {
_local1.deinit();
}
}
function isTweening(mc) {
var _local1 = this;
var _local3 = mc;
var _local2 = false;
for (var i in _local1.tweenList) {
if (_local1.tweenList[i].mc == _local3) {
_local2 = true;
break;
}
}
return(_local2);
}
function getTweens(mc) {
var _local1 = this;
var _local3 = mc;
var _local2 = 0;
for (var i in _local1.tweenList) {
if (_local1.tweenList[i].mc == _local3) {
_local2++;
}
}
return(_local2);
}
function lockTween(mc, bool) {
lockedTweens[targetPath(mc)] = bool;
}
function isTweenLocked(mc) {
if (lockedTweens[targetPath(mc)] == undefined) {
return(false);
}
return(lockedTweens[targetPath(mc)]);
}
function toString() {
return("[AS2 tweenManager 1.1.5]");
}
}
Symbol 298 MovieClip [__Packages.com.robertpenner.easing.Cubic] Frame 0
class com.robertpenner.easing.Cubic
{
function Cubic () {
}
static function easeIn(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / d;
return((((c * _local1) * _local1) * _local1) + b);
}
static function easeOut(t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return((c * (((_local1 * _local1) * _local1) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((((c / 2) * _local1) * _local1) * _local1) + b);
}
_local1 = _local1 - 2;
return(((c / 2) * (((_local1 * _local1) * _local1) + 2)) + b);
}
}
Symbol 140 MovieClip Frame 3
stop();
Symbol 140 MovieClip Frame 7
stop();
Symbol 140 MovieClip Frame 11
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 128
var theThrow;
if (this.isPlayer) {
if (appRoot.interface_mc.currentSelection == undefined) {
theThrow = "r";
} else {
theThrow = appRoot.interface_mc.currentSelection;
}
trace("the player's throw: " + theThrow);
appRoot.session.currentThrow.playerThrow = theThrow;
hand_mc.gotoAndPlay(theThrow);
} else {
theThrow = appRoot.cpuChooseThrow();
hand_mc.gotoAndPlay(theThrow);
appRoot.session.currentThrow.cpuThrow = theThrow;
}
Symbol 141 MovieClip Frame 138
if (this.isPlayer) {
trace(appRoot.checkForWinner());
}
stop();
Symbol 151 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 3
stop();
Symbol 156 MovieClip Frame 14
stop();
Symbol 156 MovieClip Frame 25
stop();
Symbol 159 MovieClip Frame 1
initHistoryClip = appRoot.initHistoryClip;
initHistoryClip();
Symbol 159 MovieClip Frame 2
updateHistoryView();
Symbol 159 MovieClip Frame 3
icon1_mc.icon_mc.shine_mc.play();
stop();
Symbol 159 MovieClip Frame 18
icon0_mc._visible = false;
icon1_mc._visible = false;
icon2_mc._visible = false;
icon3_mc._visible = false;
stop();
Symbol 159 MovieClip Frame 29
icon0_mc._visible = true;
Symbol 159 MovieClip Frame 39
gotoAndPlay ("ready");
Symbol 164 MovieClip Frame 4
stop();
Symbol 164 MovieClip Frame 26
stop();
Symbol 172 MovieClip Frame 1
stop();
Symbol 175 Button
on (release) {
begin_mc.art_mc.stopTween();
this.play();
}
on (rollOver) {
begin_mc.art_mc.stopTween();
begin_mc.art_mc.colorTo(16777215, 0);
begin_mc.art_mc.arrow_mc.gotoAndPlay("over");
}
on (rollOut) {
begin_mc.art_mc.stopTween();
begin_mc.art_mc.colorTo(1922669, 0);
}
Symbol 185 MovieClip Frame 15
gotoAndPlay ("loop");
Symbol 200 Button
on (release) {
gotoAndPlay ("choose");
}
Symbol 204 MovieClip Frame 1
if (appRoot.matchOutcome == "lose") {
gotoAndPlay ("loss");
}
Symbol 204 MovieClip Frame 3
stop();
Symbol 204 MovieClip Frame 7
stop();
Symbol 209 Button
on (release) {
appRoot.gotoAndPlay("game");
}
on (rollOver) {
playAgain_mc.stopTween();
playAgain_mc.colorTo(1922669, 0.25);
}
on (rollOut) {
playAgain_mc.stopTween();
playAgain_mc.colorTo(6205653, 0.25);
}
Symbol 210 Button
on (release) {
appRoot.submitWinLossRecord();
appRoot.gotoAndPlay("main");
}
on (rollOver) {
playAgain_mc.stopTween();
quit_mc.colorTo(1922669, 0.25);
}
on (rollOut) {
quit_mc.stopTween();
quit_mc.colorTo(6205653, 0.25);
}
Symbol 215 MovieClip Frame 1
if (appRoot.matchOutcome == "lose") {
gotoAndPlay ("loss");
}
Symbol 215 MovieClip Frame 3
stop();
Symbol 215 MovieClip Frame 7
stop();
Symbol 279 MovieClip Frame 2
stop();
Symbol 279 MovieClip Frame 4
stop();
Symbol 279 MovieClip Frame 6
stop();
Symbol 279 MovieClip Frame 8
stop();
Symbol 279 MovieClip Frame 10
stop();
Symbol 279 MovieClip Frame 12
stop();
Symbol 279 MovieClip Frame 14
stop();
Symbol 279 MovieClip Frame 16
stop();
Symbol 279 MovieClip Frame 18
stop();
Symbol 279 MovieClip Frame 20
stop();
Symbol 279 MovieClip Frame 22
stop();
Symbol 286 MovieClip Frame 3
stop();
Symbol 286 MovieClip Frame 12
appRoot.beginThrow();
Symbol 286 MovieClip Frame 17
appRoot.initChooseButtons();
Symbol 286 MovieClip Frame 141
stop();
Symbol 286 MovieClip Frame 194
if (appRoot.isMatchOver() == true) {
stop();
appRoot.gotoMatchResult();
}
Symbol 286 MovieClip Frame 202
stop();
Symbol 286 MovieClip Frame 302
stop();
Symbol 286 MovieClip Frame 355
if (appRoot.matchOutcome == "win") {
var h = appRoot.playerHistory_mc;
} else {
var h = appRoot.cpuHistory_mc;
}
h.icon1_mc.icon_mc.shine_mc.play();
h.icon2_mc.icon_mc.shine_mc.play();
h.icon3_mc.icon_mc.shine_mc.play();
Instance of Symbol 280 MovieClip "gambit_mc" in Symbol 286 MovieClip Frame 371
onClipEvent (load) {
this.icon_mc.gotoAndPlay("g" + appRoot.gambitID);
}
Symbol 286 MovieClip Frame 480
stop();
Symbol 286 MovieClip Frame 543
if (appRoot.isMatchOver() == true) {
stop();
appRoot.gotoMatchResult();
}
Symbol 286 MovieClip Frame 550
stop();
Symbol 286 MovieClip Frame 609
stop();