Frame 1
Stage.showMenu = false;
_focusrect = false;
Frame 2
stop();
Instance of Symbol 67 MovieClip "mcLaodCTRL" in Frame 2
onClipEvent (enterFrame) {
var _nPc = (_parent.getBytesLoaded() / _parent.getBytesTotal());
var _sPc = String(Math.floor(_nPc * 100));
_parent.mcState.txtPercent.text = _sPc;
_parent.mcState.txtPercentShade.text = _sPc;
if (_nPc == 1) {
_parent.gotoAndStop("Loaded");
}
}
Frame 10
if (_global.P == undefined) {
_global.P = new MainCTRL(this);
}
stop();
HighScores.bDebug = false;
HighScores.bDisplay = true;
HighScores.init(gProxyObj, MainCTRL.sNICK_GAME_ID);
_global.P.doSectionActions("Loaded");
Frame 20
_global.P.doSectionActions("Title");
Frame 30
nextFrame();
Frame 31
_global.P.doSectionActions("ChooseSkin");
Frame 40
_global.P.doSectionActions("Help");
Frame 50
stop();
_global.P.doSectionActions("Game");
Instance of Symbol 944 MovieClip "mcWinPop" in Frame 50
/* no clip actions */
Instance of Symbol 1017 MovieClip "mc2PPop" in Frame 50
/* no clip actions */
Frame 60
nextFrame();
Frame 61
_global.P.doSectionActions("GameComplete");
Frame 70
_global.P.doSectionActions("NextOpponent");
Frame 80
_global.P.doSectionActions("HighScores");
Frame 90
_global.P.doSectionActions("UnloadVar");
Symbol 3 MovieClip [SarbakanLibrary] Frame 1
#initclip 1
Object.registerClass("SarbakanLibrary", LibCompileHookComponent);
#endinitclip
Symbol 42 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
Symbol 89 MovieClip Frame 8
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 2
BB.useHandCursor = false;
Symbol 262 MovieClip Frame 14
_global.P.doTransitionCompleted();
Symbol 262 MovieClip Frame 21
gotoAndStop (1);
Symbol 29 MovieClip [__Packages.HighScores] Frame 0
class HighScores
{
static var oProxyObj, bDebug;
function HighScores () {
}
static function init(_oProxyObj, _sGameID) {
oProxyObj = _oProxyObj;
oProxyObj.setGame_Id(_sGameID);
if (bDebug) {
oProxyObj.setServer("www.nick.com");
oProxyObj.setScreenName("sarbaRf");
oProxyObj.setIsLoggedIn(true);
}
}
static function requestScores() {
oProxyObj.getScores(function () {
HighScores.onSuccess();
});
}
static function submitScore(_nScore) {
oProxyObj.submitScore(_nScore, function () {
HighScores.onSuccess();
});
}
static function populateFields(_oIndexes, _oNames, _oScores) {
var _local2 = getHighScores();
var _local5 = "";
var _local4 = "";
var _local3 = "";
var _local1 = 0;
while (_local1 < _local2.length) {
_local5 = _local5 + ((_local2[_local1].nIndex + 1) + newline);
_local4 = _local4 + (_local2[_local1].sName + newline);
_local3 = _local3 + (Library.Utils.Tools.getFormatedNumber(_local2[_local1].nScore) + newline);
_local1++;
}
_oIndexes.text = _local5;
_oNames.text = _local4;
_oScores.text = _local3;
}
static function getHighScores() {
var _local6 = new Array();
var _local7 = oProxyObj.getScoreCount();
var _local1 = 0;
while (_local1 < _local7) {
var _local2 = oProxyObj.getScoreItem(_local1);
_local6.push({nIndex:_local1, sName:_local2[0], nScore:_local2[1]});
_local1++;
}
return(_local6);
}
}
Symbol 17 MovieClip [__Packages.Library.Utils.Tools] Frame 0
class Library.Utils.Tools
{
function Tools () {
}
static function isItemInArray(__aArray, __oItem) {
var _local2 = false;
for (var _local4 in __aArray) {
if (__aArray[_local4] == __oItem) {
_local2 = true;
}
}
return(_local2);
}
static function doCopyArray(__aArraySource) {
var _local3 = new Array();
var _local1 = 0;
_local1 = 0;
while (_local1 < __aArraySource.length) {
if (__aArraySource[_local1] instanceof Array) {
_local3.push(doCopyArray(__aArraySource[_local1]));
} else {
_local3.push(__aArraySource[_local1]);
}
_local1++;
}
return(_local3);
}
static function getFormatedNumber(__nNumber, __nMinimumChar) {
return(returnFormatedNumber(__nNumber, __nMinimumChar));
}
static function returnFormatedNumber(__nNumber, __nMinimumChar) {
var _local1 = String(__nNumber);
while (_local1.length < __nMinimumChar) {
_local1 = "0" + _local1;
}
var _local3 = new Array();
var _local6 = _local1.length - 1;
var _local2;
_local2 = 0;
while (_local2 <= _local6) {
var _local5 = _local1.charAt(_local2);
_local3.push(_local5);
_local2++;
}
_local1 = "";
var _local4 = 0;
_local2 = _local3.length - 1;
while (_local2 >= 0) {
if (((_local4 % 3) == 0) && (_local4 != 0)) {
_local1 = " " + _local1;
}
_local1 = _local3[_local2] + _local1;
_local4++;
_local2--;
}
return(_local1);
}
static function getFormatedTime(__nTime, __bIncludeMilliseconds) {
if (__bIncludeMilliseconds == undefined) {
__bIncludeMilliseconds = false;
}
var _local6 = false;
if (__nTime < 0) {
_local6 = true;
__nTime = Math.abs(__nTime);
}
var _local4 = Math.floor(__nTime / 1000);
var _local3;
if (__bIncludeMilliseconds) {
var _local5;
if (__nTime >= 1000) {
_local5 = __nTime % (_local4 * 1000);
} else {
_local5 = __nTime;
}
_local3 = String(_local5).substr(0, 2);
if (_local3.length <= 1) {
_local3 = "0" + _local3;
}
}
var _local8 = Math.floor(_local4 / 60);
var _local9 = Math.floor(_local4 % 60);
var _local11 = "";
var _local10 = "";
if (_local9 < 10) {
_local10 = "0";
}
if (_local8 < 10) {
_local11 = "0";
}
var _local2 = String((((_local11 + _local8) + ":") + _local10) + _local9);
if (__bIncludeMilliseconds) {
_local2 = _local2 + (":" + _local3);
}
if (_local6) {
_local2 = "-" + _local2;
}
return(_local2);
}
}
Symbol 4 MovieClip [__Packages.Library.State] Frame 0
class Library.State
{
var mcRef, bStateLocked, bPaused, sState, nStateTotalFrame;
function State (__mcRef) {
mcRef = __mcRef;
bStateLocked = false;
bPaused = false;
}
function doEnterFrame() {
this["do" + sState]();
}
function doPause() {
bPaused = true;
mcRef.mcState.stop();
}
function doResume() {
bPaused = false;
mcRef.mcState.play();
}
function setState(__sState) {
if (!bStateLocked) {
doForcedSetState(__sState);
}
}
function doForcedSetState(__sState) {
if (sState != __sState) {
doUnLoadStateAction(sState);
sState = __sState;
mcRef.gotoAndStop(sState);
nStateTotalFrame = mcRef.mcState._totalframes;
doLoadStateAction(sState);
}
}
function get Paused() {
return(bPaused);
}
function get CurrentState() {
return(sState);
}
function doLoadStateAction() {
}
function doUnLoadStateAction() {
}
function doLockState() {
bStateLocked = true;
}
function doUnlockState() {
bStateLocked = false;
}
function isStateComplete() {
var _local2 = false;
if (mcRef.mcState._currentframe == nStateTotalFrame) {
_local2 = true;
}
return(_local2);
}
function isStateStarting() {
var _local2 = false;
if (mcRef.mcState._currentframe == 1) {
_local2 = true;
}
return(_local2);
}
}
Symbol 7 MovieClip [__Packages.Character] Frame 0
class Character extends Library.State
{
var mcRef, oSkin, setState, sState, doForcedSetState, sBeforeResetState, nBeforeResetFrame;
function Character (__mcRef) {
super(__mcRef);
mcRef = __mcRef;
oSkin = new Skin();
setState("Idle");
doResetVisual();
}
function setPart(__mcRef, __sBodyPart) {
__mcRef.gotoAndStop(oSkin.getPart(__sBodyPart));
}
function setPartType(__sBodyPart, __nTypeNum) {
oSkin.setPart(__sBodyPart, __nTypeNum);
doResetVisual();
}
function setSkin(__oSkin) {
oSkin = __oSkin;
doResetVisual();
}
function doTriggerEasterEgg() {
oSkin.doTriggerEasterEgg();
doResetVisual();
}
function doDelete() {
delete oSkin;
}
function get PlayerSkin() {
return(oSkin);
}
function doLoadStateAction() {
if (!(sState === "Reset")) {
} else {
doForcedSetState(sBeforeResetState);
mcRef.mcState.gotoAndPlay(nBeforeResetFrame);
}
}
function doResetVisual() {
nBeforeResetFrame = mcRef.mcState._currentframe;
sBeforeResetState = sState;
doForcedSetState("Reset");
}
}
Symbol 1 MovieClip [__Packages.LibCompileHookComponent] Frame 0
class LibCompileHookComponent extends MovieClip
{
function LibCompileHookComponent () {
super();
}
function LibCompileHook() {
}
}
Symbol 5 MovieClip [__Packages.Library.Utils.MoreMath] Frame 0
class Library.Utils.MoreMath
{
function MoreMath () {
}
static function getRandomRange(__nMin, __nMax) {
return(Math.floor(Math.random() * ((__nMax + 1) - __nMin)) + __nMin);
}
static function getPolarity(__nNum) {
var _local1 = 0;
if (__nNum < 0) {
_local1 = -1;
} else if (__nNum > 0) {
_local1 = 1;
}
return(_local1);
}
static function getReachZero(__nNum, __nReducer) {
return(getReachNum(__nNum, 0, __nReducer));
}
static function getReachNum(__nNum, __nTargetNum, __nReducer) {
var _local1 = __nNum;
if (_local1 != __nTargetNum) {
if (_local1 < __nTargetNum) {
_local1 = _local1 + __nReducer;
if (_local1 > __nTargetNum) {
_local1 = __nTargetNum;
}
} else {
_local1 = _local1 - __nReducer;
if (_local1 < __nTargetNum) {
_local1 = __nTargetNum;
}
}
}
return(_local1);
}
static function getDistance(__nX1, __nY1, __nX2, __nY2) {
return(Math.sqrt(Math.pow(Math.abs(__nX2 - __nX1), 2) + Math.pow(Math.abs(__nY2 - __nY1), 2)));
}
static function getHypotenuse(__nDX, __nDY) {
return(Math.sqrt(Math.pow(__nDX, 2) + Math.pow(__nDY, 2)));
}
static function getAngle(__nX1, __nY1, __nX2, __nY2) {
var _local2;
var _local1;
var _local4;
var _local3;
_local2 = __nX2 - __nX1;
_local1 = __nY2 - __nY1;
_local4 = Math.atan2(_local1, _local2);
_local3 = getDegreeFromRadius(_local4);
return(_local3);
}
static function getDegreeFromRadius(__nRadius) {
var _local1 = (__nRadius / Math.PI) * 180;
return(_local1);
}
static function getRadianFromDegree(__nDegree) {
var _local1 = __nDegree * (Math.PI/180);
return(_local1);
}
static function getBoundsCenter(_oBox) {
var _local3 = (_oBox.xMin + _oBox.xMax) / 2;
var _local2 = (_oBox.yMin + _oBox.yMax) / 2;
return({x:_local3, y:_local2});
}
}
Symbol 6 MovieClip [__Packages.Skin] Frame 0
class Skin
{
var aMinValues, aMaxValues, nHead, nTorso, nArm, nLeg, bInEasterEgg;
function Skin () {
aMinValues = new Array();
aMaxValues = new Array();
aMinValues.Head = HEAD_MIN;
aMinValues.Torso = TORSO_MIN;
aMinValues.Arm = ARM_MIN;
aMinValues.Leg = LEG_MIN;
aMaxValues.Head = HEAD_MAX;
aMaxValues.Torso = TORSO_MAX;
aMaxValues.Arm = ARM_MAX;
aMaxValues.Leg = LEG_MAX;
nHead = HEAD_MIN;
nTorso = TORSO_MIN;
nArm = ARM_MIN;
nLeg = LEG_MIN;
bInEasterEgg = false;
}
function doCreateRandomSkin() {
nHead = Library.Utils.MoreMath.getRandomRange(HEAD_MIN, HEAD_MAX);
nTorso = Library.Utils.MoreMath.getRandomRange(TORSO_MIN, TORSO_MAX);
nArm = Library.Utils.MoreMath.getRandomRange(ARM_MIN, ARM_MAX);
nLeg = Library.Utils.MoreMath.getRandomRange(LEG_MIN, LEG_MAX);
}
function setPart(__sBodyPart, __nTypeNum) {
if (this["n" + __sBodyPart] != undefined) {
if ((__nTypeNum >= aMinValues[__sBodyPart]) && (__nTypeNum <= aMaxValues[__sBodyPart])) {
this["n" + __sBodyPart] = __nTypeNum;
} else {
if (__nTypeNum < aMinValues[__sBodyPart]) {
__nTypeNum = aMaxValues[__sBodyPart];
} else if (__nTypeNum > aMaxValues[__sBodyPart]) {
__nTypeNum = aMinValues[__sBodyPart];
}
this["n" + __sBodyPart] = __nTypeNum;
}
}
}
function getPart(__sBodyPart) {
var _local2;
if (!bInEasterEgg) {
if (this["n" + __sBodyPart] != undefined) {
_local2 = this["n" + __sBodyPart];
}
} else {
_local2 = EASTER_EGG_FRAME;
}
return(_local2);
}
function doTriggerEasterEgg() {
bInEasterEgg = !bInEasterEgg;
}
static var HEAD_MIN = 2;
static var HEAD_MAX = 6;
static var TORSO_MIN = 2;
static var TORSO_MAX = 6;
static var ARM_MIN = 2;
static var ARM_MAX = 6;
static var LEG_MIN = 2;
static var LEG_MAX = 6;
static var EASTER_EGG_FRAME = 1;
}
Symbol 8 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++;
}
}
}
Symbol 9 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");
};
}
}
}
Symbol 10 MovieClip [__Packages.Library.Utils.Delegate] Frame 0
class Library.Utils.Delegate extends Object
{
var func;
function Delegate () {
super();
}
function DelegateArgs(f) {
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local3 = arguments.callee.target;
func = arguments.callee.func;
var _local2 = arguments.callee.arg;
_local2 = _local2.concat(arguments);
return(func.apply(_local3, _local2));
};
_local2.target = obj;
_local2.func = func;
_local2.arg = arguments.slice(2);
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 11 MovieClip [__Packages.SkinSelectCharacter] Frame 0
class SkinSelectCharacter extends Character
{
var oEnterFrameListener, doEnterFrame, nMovesInterval, isStateComplete, doUnlockState, setState, doLockState, nCallTimer, __get__CurrentState;
function SkinSelectCharacter (__mcRef) {
super(__mcRef);
mx.transitions.OnEnterFrameBeacon.init();
oEnterFrameListener = new Object();
oEnterFrameListener.onEnterFrame = Library.Utils.Delegate.create(this, doEnterFrame);
MovieClip.addListener(oEnterFrameListener);
nMovesInterval = Library.Utils.MoreMath.getRandomRange(MOVE_INTERVAL_BOUNDS.min, MOVE_INTERVAL_BOUNDS.max);
}
function doDelete() {
delete oEnterFrameListener.onEnterFrame;
MovieClip.removeListener(oEnterFrameListener);
delete oEnterFrameListener;
super.doDelete();
}
function doIdle() {
nMovesInterval--;
if (isStateComplete() && (nMovesInterval <= 0)) {
doSelectMove();
}
}
function doPunchStart() {
if (isStateComplete()) {
doUnlockState();
setState("PunchEnd");
doLockState();
}
}
function doPunchEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doKickStart() {
if (isStateComplete()) {
doUnlockState();
setState("KickEnd");
doLockState();
}
}
function doKickEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doCallStart() {
if (isStateComplete()) {
nCallTimer = 0;
doUnlockState();
setState("CallLoop");
doLockState();
}
}
function doCallLoop() {
nCallTimer++;
if (isStateComplete() && (nCallTimer >= CALL_TIME_WAIT)) {
doUnlockState();
setState("CallEnd");
doLockState();
}
}
function doCallEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doSelectMove() {
doUnlockState();
switch (Library.Utils.MoreMath.getRandomRange(1, 3)) {
case 1 :
setState("CallStart");
break;
case 2 :
setState("KickStart");
break;
case 3 :
setState("PunchStart");
}
doLockState();
}
function doLoadStateAction() {
if (!(__get__CurrentState() === "Idle")) {
} else {
nMovesInterval = Library.Utils.MoreMath.getRandomRange(MOVE_INTERVAL_BOUNDS.min, MOVE_INTERVAL_BOUNDS.max);
}
super.doLoadStateAction();
}
function doUnLoadStateAction() {
if (!(__get__CurrentState() === "Super2End")) {
}
super.doUnLoadStateAction();
}
var MOVE_INTERVAL_BOUNDS = {min:40, max:120};
var CALL_TIME_WAIT = 22;
}
Symbol 12 MovieClip [__Packages.MainCTRL] Frame 0
class MainCTRL extends Library.State
{
static var oController;
var bScoreScrolling, mcRef, nMusicVolume, nSoundsVolume, nAmbianceVolume, bFirstTimeTitle, bEnnemyListLoadWait, nEnnemyListWaitTimer, oMusicPack, oMusicGame, nPlayerScore, sTransitionTarget, oPlayerSkin, nNickScore, sPlayerName, oEnnemyList, oSkinChooser, bTwoPlayer, nTwoPlayerSkinChooseTurn, oGameController, oDummyP1, oDummyP2, oPlayer2Skin, oEnnemyToAffront, sLabelToGoAfterClean, oPresP1, oPresP2, bForceSubmit, bAllowScoreSubmit, nScoreScrollingWay, bInstructionsOriginsFromGame, sCurrentSection, oQuitPop;
function MainCTRL (__mcRef) {
super(__mcRef);
System.security.allowDomain("nick.com");
bScoreScrolling = false;
mcRef = __mcRef;
mcRef.onEnterFrame = Library.Utils.Delegate.create(this, doEnterFrame);
initMainVar();
nMusicVolume = MUSIC_DEFAULT_VOLUME;
nSoundsVolume = SOUNDS_DEFAULT_VOLUME;
nAmbianceVolume = AMBIANCE_DEFAULT_VOLUME;
var _local3 = mcRef.createEmptyMovieClip("Sounds", SOUND_CONTROLLER_DEPTH);
Library.Sound.SoundManager.doInit(_local3);
Library.Sound.SoundManager.setCategoryVolume("Music", nMusicVolume);
Library.Sound.SoundManager.setCategoryVolume("SFX", nSoundsVolume);
Library.Sound.SoundManager.setCategoryVolume("Ambiance", nAmbianceVolume);
bFirstTimeTitle = true;
bEnnemyListLoadWait = false;
oController = this;
}
static function get Instance() {
return(oController);
}
function doEnterFrame() {
if (bEnnemyListLoadWait) {
nEnnemyListWaitTimer--;
if (nEnnemyListWaitTimer == 0) {
onEnnemyListLoaded();
}
}
if (bScoreScrolling) {
doScrollScores();
}
}
function doSoundEvent(__nEvent, __oSound) {
if (!(__nEvent === Library.Sound.SoundManager.EVENT_SOUND_COMPLETE)) {
} else if (__oSound == oMusicPack) {
delete oMusicPack;
} else if (__oSound == oMusicGame) {
delete oMusicGame;
}
}
function initMainVar() {
setSection("Loaded");
nPlayerScore = 0;
}
function doAddPlayerScore(__nScore) {
nPlayerScore = nPlayerScore + __nScore;
}
function onEnnemyListLoaded() {
sTransitionTarget = "Title";
doStartTransition();
bEnnemyListLoadWait = false;
}
function onPlayerSkinLoaded(_oPlayerSkin) {
oPlayerSkin = _oPlayerSkin;
}
function doSectionActions(__sSection) {
setSection(__sSection);
switch (__sSection) {
case "Loaded" :
nPlayerScore = 0;
nNickScore = 0;
var _local5 = HighScores.oProxyObj.getIsLoggedIn();
if (_local5 == undefined) {
_local5 = false;
}
if (_local5) {
sPlayerName = HighScores.oProxyObj.getScreenName();
if (sPlayerName == "undefined") {
sPlayerName = "Player";
}
} else {
sPlayerName = "Player";
}
oPlayerSkin = new Skin();
oPlayerSkin.doCreateRandomSkin();
oEnnemyList = new EnnemyList();
bEnnemyListLoadWait = true;
nEnnemyListWaitTimer = nENNEMY_LIST_LOAD_WAIT_MAX;
break;
case "Title" :
if (oMusicPack == undefined) {
oMusicPack = Library.Sound.SoundManager.doPlaySoundInCat("Music", "MusicPackaging", 0, 99999, true);
oMusicPack.doAddListener(this);
}
if (bFirstTimeTitle) {
oMusicPack.setFadeRate(2);
} else {
oMusicPack.setFadeRate();
}
oMusicPack.doFadeTo(100);
oMusicGame.doFadeTo(0);
break;
case "ChooseSkin" :
oSkinChooser = new SkinSelector(mcRef.mcState, bTwoPlayer, nTwoPlayerSkinChooseTurn);
_global.SkinC = oSkinChooser;
break;
case "Game" :
if (oMusicGame == undefined) {
oMusicGame = Library.Sound.SoundManager.doPlaySoundInCat("Music", "MusicGame", 0, 99999, true);
oMusicGame.doAddListener(this);
}
oMusicGame.doFadeTo(100);
oMusicPack.setFadeRate();
oMusicPack.doFadeTo(0);
oGameController = new GameCTRL(mcRef.mcState, bTwoPlayer);
var _local13 = new HumanPlayerHud(mcRef.mcHUD.mcHudP1, !bTwoPlayer);
var _local4;
if (bTwoPlayer) {
_local4 = new HumanPlayerHud(mcRef.mcHUD.mcHudP2);
} else {
_local4 = new BaseHud(mcRef.mcHUD.mcHudP2);
}
oDummyP1 = new Human1(mcRef.mcState.P1, 1, !bTwoPlayer);
oDummyP1.setSkin(oPlayerSkin);
oDummyP1.setHud(_local13);
if (bTwoPlayer) {
oDummyP2 = new Human2(mcRef.mcState.P2, 2, false);
oDummyP2.setSkin(oPlayer2Skin);
oDummyP2.setHud(_local4);
} else {
var _local3 = oEnnemyToAffront;
oDummyP2 = new ComputerPlayer(mcRef.mcState.P2, 2);
oDummyP2.setSkin(_local3.oSkin);
oDummyP2.setHud(_local4);
ComputerPlayer(oDummyP2).setAgressivity(_local3.nAgressivity);
ComputerPlayer(oDummyP2).setDefensivity(_local3.nDefensivity);
ComputerPlayer(oDummyP2).setSmartness(_local3.nSmartness);
}
delete _global.SkinC;
break;
case "GameComplete" :
oDummyP1 = null;
delete oDummyP1;
oDummyP2 = null;
delete oDummyP2;
oGameController = null;
delete oGameController;
gotoAndStop(sLabelToGoAfterClean);
break;
case "NextOpponent" :
if (oMusicPack == undefined) {
oMusicPack = Library.Sound.SoundManager.doPlaySoundInCat("Music", "MusicPackaging", 0, 99999, true);
oMusicPack.doAddListener(this);
}
oMusicPack.doFadeTo(100);
oMusicGame.setFadeRate();
oMusicGame.doFadeTo(0);
if (!bTwoPlayer) {
}
oPresP1 = new Character(mcRef.mcState.P1);
oPresP2 = new Character(mcRef.mcState.P2);
oPresP1.setSkin(oPlayerSkin);
if (bTwoPlayer) {
oPresP2.setSkin(oPlayer2Skin);
} else {
oPresP2.setSkin(oEnnemyToAffront.oSkin);
}
if (bTwoPlayer) {
mcRef.mcState.txtP1_Name.text = "Player 1";
mcRef.mcState.txtP2_Name.text = "Player 2";
} else {
mcRef.mcState.txtP1_Name.text = sPlayerName;
mcRef.mcState.txtP2_Name.text = oEnnemyToAffront.sName;
}
if (bTwoPlayer) {
mcRef.mcState.txtP1_Rank._visible = false;
mcRef.mcState.txtP2_Rank._visible = false;
mcRef.mcState.txtP1_Score._visible = false;
mcRef.mcState.txtP2_Score._visible = false;
mcRef.mcState.txtBestLabel1._visible = false;
mcRef.mcState.txtBestLabel2._visible = false;
mcRef.mcState.txtRankLabel1._visible = false;
mcRef.mcState.txtRankLabel2._visible = false;
mcRef.mcState.txtRankThLabel1._visible = false;
mcRef.mcState.txtRankThLabel2._visible = false;
} else {
var _local6 = oEnnemyToAffront.nRank + 1;
if (_local6 <= 0) {
_local6 = 1;
}
var _local9 = oEnnemyToAffront.nRank;
var _local12 = String(_local6);
var _local7 = String(_local9);
if (_local9 <= 0) {
_local7 = "";
mcRef.mcState.txtBestLabel2._visible = false;
mcRef.mcState.txtP2_Score._visible = false;
mcRef.mcState.txtRankLabel2._visible = false;
mcRef.mcState.txtRankThLabel2._visible = false;
}
mcRef.mcState.txtP1_Rank.text = _local12;
mcRef.mcState.txtP2_Rank.text = _local7;
var _local14 = Math.max(nNickScore, nPlayerScore);
var _local8 = oEnnemyToAffront.nScore;
var _local15 = String(Library.Utils.Tools.getFormatedNumber(_local14, SCORE_MINIMUM_CHARS));
var _local10 = String(Library.Utils.Tools.getFormatedNumber(_local8, SCORE_MINIMUM_CHARS));
if (_local8 <= 0) {
_local10 = "";
mcRef.mcState.txtBestLabel2._visible = false;
mcRef.mcState.txtP2_Score._visible = false;
}
mcRef.mcState.txtP1_Score.text = _local15;
mcRef.mcState.txtP2_Score.text = _local10;
}
break;
case "HighScores" :
if ((bForceSubmit && (bAllowScoreSubmit)) && (isScoreSubmitAllowed())) {
bAllowScoreSubmit = false;
doSubmitScore();
} else {
HighScores.onSuccess = Library.Utils.Delegate.create(this, onScoreListLoaded);
HighScores.requestScores();
}
if (bAllowScoreSubmit && (isScoreSubmitAllowed())) {
mcRef.mcState.mcButtons.gotoAndStop(1);
} else {
mcRef.mcState.mcButtons.gotoAndStop(2);
}
mcRef.mcState.mcButtons.btnSubmit.onRelease = Library.Utils.Delegate.create(this, doSubmitScore);
mcRef.mcState.btnUp.onPress = Library.Utils.Delegate.create(this, doChangeScoresScroll, -1);
mcRef.mcState.btnDown.onPress = Library.Utils.Delegate.create(this, doChangeScoresScroll, 1);
mcRef.mcState.btnUp.onRelease = Library.Utils.Delegate.create(this, doChangeScoresScroll, 0);
mcRef.mcState.btnDown.onRelease = Library.Utils.Delegate.create(this, doChangeScoresScroll, 0);
mcRef.mcState.btnUp.onReleaseOutside = Library.Utils.Delegate.create(this, doChangeScoresScroll, 0);
mcRef.mcState.btnDown.onReleaseOutside = Library.Utils.Delegate.create(this, doChangeScoresScroll, 0);
break;
case "UnloadVar" :
}
}
function doChangeScoresScroll(_nWay) {
nScoreScrollingWay = _nWay;
if (nScoreScrollingWay == 0) {
bScoreScrolling = false;
} else {
bScoreScrolling = true;
}
}
function doScrollScores() {
mcRef.mcState.txtRanks.scroll = mcRef.mcState.txtRanks.scroll + nScoreScrollingWay;
mcRef.mcState.txtNames.scroll = mcRef.mcState.txtNames.scroll + nScoreScrollingWay;
mcRef.mcState.txtScores.scroll = mcRef.mcState.txtScores.scroll + nScoreScrollingWay;
}
function isNextOpponentAvailable() {
return(oEnnemyToAffront.nRank > 1);
}
function isScoreSubmitAllowed() {
var _local2 = HighScores.oProxyObj.getIsLoggedIn() && (!bTwoPlayer);
if (_local2 == undefined) {
_local2 = false;
}
return(_local2);
}
function doSubmitScore() {
HighScores.onSuccess = Library.Utils.Delegate.create(this, onScoreSubmited);
HighScores.submitScore(nPlayerScore);
mcRef.mcState.mcButtons.gotoAndStop(2);
}
function onScoreSubmited() {
HighScores.onSuccess = Library.Utils.Delegate.create(this, onScoreListLoaded);
HighScores.requestScores();
var _local2 = EnnemyList.__get__Instance().convertSkinToXml(oPlayerSkin);
PlayerData.saveData(_local2);
}
function onScoreListLoaded() {
HighScores.populateFields(mcRef.mcState.txtRanks, mcRef.mcState.txtNames, mcRef.mcState.txtScores);
}
function setPart(__mcRef, __sBodyPart) {
if (__mcRef._parent._parent._name == "P1") {
if (__mcRef._name == "Host") {
getPlayer(1).setPart(__mcRef, __sBodyPart);
} else if (__mcRef._name == "Guest") {
getPlayer(2).setPart(__mcRef, __sBodyPart);
}
} else if (__mcRef._parent._parent._name == "P2") {
if (__mcRef._name == "Host") {
getPlayer(2).setPart(__mcRef, __sBodyPart);
} else if (__mcRef._name == "Guest") {
getPlayer(1).setPart(__mcRef, __sBodyPart);
}
} else if (__mcRef._parent._parent._name == "PSkinChoose") {
oSkinChooser.__get__Dummy().setPart(__mcRef, __sBodyPart);
}
}
function doSkinChooseComplete() {
if (!bTwoPlayer) {
oPlayerSkin = oSkinChooser.__get__Dummy().PlayerSkin;
oSkinChooser.doDelete();
oEnnemyList.doCheckListLength();
doNextOpponent();
} else if (nTwoPlayerSkinChooseTurn == 1) {
oPlayerSkin = oSkinChooser.__get__Dummy().PlayerSkin;
nTwoPlayerSkinChooseTurn++;
oSkinChooser.doDelete();
sTransitionTarget = "ChooseSkin";
doStartTransition();
} else if (nTwoPlayerSkinChooseTurn == 2) {
oPlayer2Skin = oSkinChooser.__get__Dummy().PlayerSkin;
oSkinChooser.doDelete();
doNextOpponent();
}
}
function doStartNextRound() {
oPresP1.doDelete();
oPresP2.doDelete();
delete oPresP1;
delete oPresP2;
sTransitionTarget = "Game";
doStartTransition();
}
function doTitleStart(__nHumanNumber) {
if (__nHumanNumber == 1) {
bTwoPlayer = false;
} else {
bTwoPlayer = true;
}
nTwoPlayerSkinChooseTurn = 1;
sTransitionTarget = "ChooseSkin";
doStartTransition();
}
function doTitleStartFromInstructions() {
mcRef.gotoAndStop("ChooseSkin");
}
function doTitleInstructions() {
bInstructionsOriginsFromGame = false;
sTransitionTarget = "SHOW_INSTRUCTIONS";
doStartTransition();
}
function doGameInstructions() {
bInstructionsOriginsFromGame = true;
sTransitionTarget = "SHOW_INSTRUCTIONS";
doStartTransition();
}
function doTitleHighScores() {
bAllowScoreSubmit = false;
bForceSubmit = false;
sTransitionTarget = "HighScores";
doStartTransition();
}
function doGameHighScores() {
bAllowScoreSubmit = true;
bForceSubmit = true;
sTransitionTarget = "HighScores";
doStartTransition();
}
function doInstructionsPlayResume(__mcRef) {
if (sCurrentSection != "Game") {
__mcRef.gotoAndStop(1);
} else {
__mcRef.gotoAndStop(2);
}
}
function doInstructionsEnd(__nHumanNumber) {
if (sCurrentSection != "Game") {
if (__nHumanNumber == 1) {
bTwoPlayer = false;
} else {
bTwoPlayer = true;
}
nTwoPlayerSkinChooseTurn = 1;
}
sTransitionTarget = "CLOSE_INSTRUCTIONS";
doStartTransition();
}
function doCloseQuitPopUp() {
oQuitPop.doClose();
}
function doNewGameAsk(_bAskConfirm) {
if (_bAskConfirm == undefined) {
_bAskConfirm = true;
}
if (_bAskConfirm) {
oQuitPop = new PopUpBox(_global.P.Stage.mcQuitPop);
} else {
doNewGame();
}
}
function doNewGame() {
oGameController.doDeleteAll();
sLabelToGoAfterClean = "Loaded";
sTransitionTarget = "GameComplete";
doStartTransition();
}
function do2PRematch() {
sLabelToGoAfterClean = "NextOpponent";
sTransitionTarget = "GameComplete";
doStartTransition();
}
function doNextOpponent() {
oGameController.doDeleteAll();
oEnnemyToAffront = oEnnemyList.getNextOpponent();
sLabelToGoAfterClean = "NextOpponent";
sTransitionTarget = "GameComplete";
doStartTransition();
}
function doButtonSound() {
var _local1 = "Button" + Library.Utils.MoreMath.getRandomRange(1, 4);
Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local1, 40, 1, true);
}
function doStartTransition() {
mcRef.mcTransition.gotoAndPlay(2);
}
function doTransitionCompleted() {
if (sTransitionTarget == "SHOW_INSTRUCTIONS") {
mcRef.mcInstructions.gotoAndStop(2);
} else if (sTransitionTarget == "CLOSE_INSTRUCTIONS") {
mcRef.mcInstructions.gotoAndStop(1);
if (!bInstructionsOriginsFromGame) {
doTitleStartFromInstructions();
}
} else {
mcRef.gotoAndStop(sTransitionTarget);
}
}
function doUpdateMusicMuteVisual(__mcRef) {
var _local1 = "Off";
if (!Library.Sound.SoundManager.isCategoryMuted("Music")) {
_local1 = "On";
}
__mcRef.gotoAndStop(_local1);
}
function doUpdateSoundMuteVisual(__mcRef) {
var _local1 = "Off";
if (!Library.Sound.SoundManager.isCategoryMuted("SFX")) {
_local1 = "On";
}
__mcRef.gotoAndStop(_local1);
}
function doToggleMusicMute(__mcRef) {
if (!Library.Sound.SoundManager.isCategoryMuted("Music")) {
Library.Sound.SoundManager.doMuteCategory("Music");
Library.Sound.SoundManager.doMuteCategory("Ambiance");
} else {
Library.Sound.SoundManager.doUnMuteCategory("Music");
Library.Sound.SoundManager.doUnMuteCategory("Ambiance");
}
doUpdateMusicMuteVisual(__mcRef);
}
function doToggleSoundMute(__mcRef) {
if (!Library.Sound.SoundManager.isCategoryMuted("SFX")) {
Library.Sound.SoundManager.doMuteCategory("SFX");
} else {
Library.Sound.SoundManager.doUnMuteCategory("SFX");
}
doUpdateSoundMuteVisual(__mcRef);
}
function getPlayer(__nPlayerNum) {
if (sCurrentSection == "NextOpponent") {
return(this["oPresP" + __nPlayerNum]);
}
return(this["oDummyP" + __nPlayerNum]);
}
function get Stage() {
return(mcRef);
}
function get Score() {
return(nPlayerScore);
}
function get Scene() {
return(mcRef.mcState);
}
function get InstrFromGame() {
return(bInstructionsOriginsFromGame);
}
function setSection(__sSection) {
sCurrentSection = __sSection;
}
static var nRING_TOP = 135;
static var nRING_BOTTOM = 250;
static var sNICK_GAME_ID = "wa_wrestle";
static var SOUND_CONTROLLER_DEPTH = 1042001;
static var MUSIC_DEFAULT_VOLUME = 15;
static var SOUNDS_DEFAULT_VOLUME = 115;
static var AMBIANCE_DEFAULT_VOLUME = 35;
static var SCORE_MINIMUM_CHARS = 7;
static var STAGE_WIDTH = 600;
static var STAGE_HEIGHT = 300;
static var STAGE_FPS = 35;
static var nENNEMY_LIST_LOAD_WAIT_MAX = 120;
}
Symbol 13 MovieClip [__Packages.SimpleProgress] Frame 0
class SimpleProgress extends Library.State
{
var fCallBack, nCurrentStatus, nCurrentStatusVisual, mcRef, nFatiguePercent, setState, isStateComplete, nStateTotalFrame, sState;
function SimpleProgress (__mcRef, __fCallBack, __nStartProgress, __nFatiguePercent) {
super(__mcRef);
fCallBack = __fCallBack;
if ((__nStartProgress == 0) || (__nStartProgress == undefined)) {
__nStartProgress = 1;
}
nCurrentStatus = __nStartProgress;
nCurrentStatusVisual = __nStartProgress;
mcRef.mcState.mcProgress.gotoAndStop(Math.floor(nCurrentStatusVisual) + 1);
if (__nFatiguePercent < FATIGUE_AFFECT_TRIGGER) {
nFatiguePercent = 1 - ((FATIGUE_AFFECT_TRIGGER - __nFatiguePercent) / FATIGUE_AFFECT_TRIGGER);
if (nFatiguePercent < FATIGUE_MINIMUM) {
nFatiguePercent = FATIGUE_MINIMUM;
}
} else {
nFatiguePercent = 1;
}
if (__nFatiguePercent == 0) {
nFatiguePercent = 0;
}
_global.C.addBroadcastObj(this);
setState("In");
}
function doIn() {
mcRef.mcState.mcProgress.gotoAndStop(Math.floor(nCurrentStatusVisual) + 1);
if (isStateComplete()) {
setState("Idle");
}
}
function doOut() {
mcRef.mcState.mcProgress.gotoAndStop(Math.floor(nCurrentStatusVisual) + 1);
if (isStateComplete()) {
doDelete();
}
}
function doIdle() {
doTendToZero();
doChangeVisual();
if (isStateComplete()) {
doRemove();
fCallBack();
}
}
function doRemoveProgress(__nAmout) {
nCurrentStatus = nCurrentStatus - __nAmout;
if (nCurrentStatus < 0) {
nCurrentStatus = 0;
}
}
function doReceiveBash() {
nCurrentStatus = nCurrentStatus + (POINTS_PER_BASH_BASE * nFatiguePercent);
if (nCurrentStatus > nStateTotalFrame) {
nCurrentStatus = nStateTotalFrame;
}
}
function doRemove() {
setState("Out");
}
function doDelete() {
_global.C.removeBroadcastObj(this);
mcRef.removeMovieClip();
delete mcRef;
}
function get Status() {
return(nCurrentStatus);
}
function doLoadStateAction() {
if (!(sState === "Idle")) {
} else {
mcRef.mcState.stop();
}
}
function doTendToZero() {
nCurrentStatus = Library.Utils.MoreMath.getReachZero(nCurrentStatus, BACK_TO_ZERO_RATE);
}
function doChangeVisual() {
if (nCurrentStatusVisual < nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatusVisual + VISUAL_UPDATE_RATE;
if (nCurrentStatusVisual > nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatus;
}
} else if (nCurrentStatusVisual > nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatusVisual - VISUAL_UPDATE_RATE;
if (nCurrentStatusVisual < nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatus;
}
}
mcRef.mcState.gotoAndStop(Math.floor(nCurrentStatusVisual + 1));
}
static var PROGRESS_PLAYER_RELATIVE_COORD = {x:0, y:80};
static var POINTS_TO_TRIGGER = 101;
static var POINTS_PER_BASH_BASE = 15;
static var VISUAL_UPDATE_RATE = 8;
static var BACK_TO_ZERO_RATE = 0.075;
static var FATIGUE_MINIMUM = 0.085;
static var FATIGUE_AFFECT_TRIGGER = 75;
}
Symbol 14 MovieClip [__Packages.Player] Frame 0
class Player extends Character
{
var bAffectScore, nPlayerNum, nOpponentNum, nSpeedX, nSpeedY, nRealHealth, nVisualHealth, nCurrentDamage, nPreviousStandUpProgress, nSpecialMarkers, nConsecutiveHits, bSpecialMoveAvailable, nWinTimer, bWantToMoveHorz, bWantToMoveVert, bGameStarted, nCurrentOrientation, oSoundManager, oHud, oSkin, __get__CurrentState, doUnlockState, setState, doLockState, oCurrentProgress, sHiddenReason, mcRef, bGameComplete, isStateComplete, nCallTimer, bCurrentPunchKickSuceed, nJumpDiveMoveSpeedX, nStateTotalFrame, nJumpDiveMoveSpeedY, nJumpDiveEndMoveSpeedX, nPinHitMoveSpeedX, nPinHitMoveSpeedY, nThrowEndMoveSpeedX, nWonStandMoveSpeedY;
function Player (__mcRef, __nPlayerNum) {
super(__mcRef);
bAffectScore = false;
nPlayerNum = __nPlayerNum;
if (nPlayerNum == 1) {
nOpponentNum = 2;
} else {
nOpponentNum = 1;
}
nSpeedX = 0;
nSpeedY = 0;
nRealHealth = MAXIMUM_HEALTH;
nVisualHealth = MAXIMUM_HEALTH;
nCurrentDamage = 0;
nPreviousStandUpProgress = 0;
nSpecialMarkers = 0;
nConsecutiveHits = 0;
bSpecialMoveAvailable = false;
nWinTimer = 0;
bWantToMoveHorz = false;
bWantToMoveVert = false;
bGameStarted = false;
nCurrentOrientation = ORIENTATION_RIGHT;
oSoundManager = new PlayerSoundsManager();
oSoundManager.setPlayerRef(this);
}
function doStartGame() {
bGameStarted = true;
}
function doEnterFrame() {
doChangeDepth();
doRecoverDamage();
super.doEnterFrame();
}
function setHud(__oHud) {
oHud = __oHud;
oHud.doSetHead(oSkin.getPart("Head"));
}
function doSufferHit(__nHitPoints) {
doReceiveDamage(__nHitPoints);
if (Library.Utils.Tools.isItemInArray(STATES_IDLE, __get__CurrentState())) {
doUnlockState();
setState("HitStand");
doLockState();
} else if (__get__CurrentState() == "Ground") {
doUnlockState();
if (__nHitPoints == JUMP_DIVE_HIT_POINTS) {
setState("HitGroundFlat");
} else {
setState("HitGround");
}
oCurrentProgress.doRemoveProgress(__nHitPoints * HIT_TO_PROGRESSREDUCER_RATIO);
doLockState();
}
nSpeedX = 0;
nSpeedY = 0;
if (State != "Ground") {
var _local4 = Coordinates.x - _global.P.getPlayer(nOpponentNum).Coordinates.x;
if (Library.Utils.MoreMath.getPolarity(_local4) == -1) {
nSpeedX = -DAMAGE_REBOUND;
} else {
nSpeedX = DAMAGE_REBOUND;
}
if (__nHitPoints == KICK_HIT_POINTS) {
nSpeedX = nSpeedX * KICK_REBOUND_FACTOR;
}
}
}
function checkDoEnterStruggle() {
var _local2 = false;
if (Library.Utils.Tools.isItemInArray(STATES_IDLE, __get__CurrentState())) {
sHiddenReason = "StruggleLoop";
doUnlockState();
setState("Hidden");
doLockState();
_local2 = true;
}
return(_local2);
}
function doStruggleTimeOut() {
doUnlockState();
setState("HitStand");
doLockState();
nSpeedX = 0;
nSpeedY = 0;
var _local3 = Coordinates.x - _global.P.getPlayer(nOpponentNum).Coordinates.x;
if (Library.Utils.MoreMath.getPolarity(_local3) == -1) {
nSpeedX = -STRUGGLE_TIMEOUT_REOUND;
} else {
nSpeedX = STRUGGLE_TIMEOUT_REOUND;
}
}
function doStruggleEnded(__bPlayerWon) {
if (__bPlayerWon) {
doGrabBegins(true);
_global.P.getPlayer(nOpponentNum).doGrabBegins(false);
} else {
var _local4 = mcRef.mcState.mcHostRegPoint.getBounds(_global.P.Scene);
var _local7 = (_local4.xMin + _local4.xMax) / 2;
var _local3 = (_local4.yMin + _local4.yMax) / 2;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
var _local6 = _local7 - _global.P.getPlayer(nOpponentNum).Coordinates.x;
var _local5 = _local3 - _global.P.getPlayer(nOpponentNum).Coordinates.y;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:_local6, y:_local5});
_global.P.getPlayer(nOpponentNum).doGrabBegins(true);
doGrabBegins(false);
}
}
function doGrabBegins(__bGrabOwner, __bFromGround) {
if (__bFromGround == undefined) {
__bFromGround = false;
}
if (__bGrabOwner) {
doUnlockState();
if (__bFromGround) {
setState("GroundGrab");
} else {
setState("StruggleGrab");
}
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_GRAB);
}
doLockState();
} else {
sHiddenReason = "GrabLoop";
doUnlockState();
setState("Hidden");
doLockState();
if (__bFromGround) {
if (oCurrentProgress != undefined) {
nPreviousStandUpProgress = oCurrentProgress.Status;
oCurrentProgress.doRemove();
delete oCurrentProgress;
}
}
}
}
function doSwitchToGroundAfterThrow() {
doUnlockState();
setState("ThrowEndGround");
doLockState();
}
function doSwitchToGroundAfterSuperMove() {
doUnlockState();
setState("Ground");
doLockState();
}
function doStartStandUp() {
delete oCurrentProgress;
nCurrentDamage = 0;
nPreviousStandUpProgress = 0;
if ((__get__CurrentState() == "Hidden") && (sHiddenReason == "PinHitLoop")) {
_global.P.getPlayer(nOpponentNum).doFailPinHit();
if (bAffectScore) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_PIN_RELEASE);
}
} else {
doUnlockState();
setState("StandUp");
doLockState();
if (bAffectScore) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_STAND_UP);
}
}
var _local4 = mcRef._x;
var _local3 = mcRef._y;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
mcRef._x = _local4;
mcRef._y = _local3;
}
function doEnterPinHit(__bHost) {
if (__bHost) {
doUnlockState();
setState("PinHitEnd");
doLockState();
if (bAffectScore) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_START_PIN);
}
_global.C.doStartKoCountDown(nPlayerNum);
} else {
oCurrentProgress.doRemoveProgress(PIN_HIT_PROGRESS_REDUCE);
sHiddenReason = "PinHitLoop";
doUnlockState();
setState("Hidden");
doLockState();
}
}
function doEnterInPinHitRelease() {
sHiddenReason = "PinHitRelease";
doUnlockState();
setState("Hidden");
doLockState();
}
function doFailPinHit() {
doUnlockState();
setState("PinHitRelease");
doLockState();
_global.P.getPlayer(nOpponentNum).doEnterInPinHitRelease();
}
function doReleasedFromPinHit(__oCoordToUse) {
mcRef._x = __oCoordToUse.x;
mcRef._y = __oCoordToUse.y;
doUnlockState();
setState("CallStart");
doLockState();
}
function doLostGame() {
oCurrentProgress.doRemove();
delete oCurrentProgress;
bGameComplete = true;
doUnlockState();
setState("Ground");
doLockState();
}
function doWonGame() {
_global.P.getPlayer(nOpponentNum).doLostGame();
bGameComplete = true;
if (bAffectScore) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_WINNING);
}
doPositionOpponentForWon();
doUnlockState();
setState("StandUpFromPinStart");
doLockState();
}
function doEnterHiddenSuperMove() {
sHiddenReason = "SuperMove";
doUnlockState();
setState("Hidden");
doLockState();
}
function doDelete() {
super.doDelete();
mcRef.swapDepths(_global.C.returnDepth("Remove"));
mcRef.removeMovieClip();
delete oCurrentProgress;
oSoundManager.doDelete();
delete oSoundManager;
oHud.doDelete();
delete oHud;
}
function doOrientRight() {
mcRef._xscale = 100;
nCurrentOrientation = ORIENTATION_RIGHT;
}
function doOrientLeft() {
mcRef._xscale = -100;
nCurrentOrientation = ORIENTATION_LEFT;
}
function doApplyPositionTranform(__oTransformCoordinates) {
mcRef._x = mcRef._x + __oTransformCoordinates.x;
mcRef._y = mcRef._y + __oTransformCoordinates.y;
}
function get HitZone() {
return(mcRef.mcHitZone);
}
function get FootZone() {
return(mcRef.mcFootZone);
}
function get FootZoneLeft() {
return(mcRef.mcFootLeft);
}
function get FootZoneRight() {
return(mcRef.mcFootRight);
}
function get FootZoneTop() {
return(mcRef.mcFootTop);
}
function get FootZoneBottom() {
return(mcRef.mcFootBottom);
}
function get Coordinates() {
return({x:mcRef._x, y:mcRef._y});
}
function get BodyCoordinates() {
var _local3 = Library.Utils.MoreMath.getBoundsCenter(FootZone.getBounds(_global.P.Scene));
return({x:_local3.x, y:_local3.y});
}
function get Health() {
return(nRealHealth);
}
function get Orientation() {
return(nCurrentOrientation);
}
function get UsedDepth() {
return(mcRef.getDepth());
}
function doWalk() {
if (!bWantToMoveHorz) {
doSlowDownHorz();
}
if (!bWantToMoveVert) {
doSlowDownVert();
}
if ((!bWantToMoveHorz) && (!bWantToMoveVert)) {
setState("Idle");
} else {
doMove();
}
}
function doIdle() {
if ((!bWantToMoveHorz) && (!bWantToMoveVert)) {
doSlowDownHorz();
doSlowDownVert();
doMove();
} else if ((Math.abs(nSpeedX) > MIN_SPEED_FOR_WALK) || (Math.abs(nSpeedY) > MIN_SPEED_FOR_WALK)) {
setState("Walk");
}
}
function doPunchStart() {
if (isStateComplete()) {
doUnlockState();
setState("PunchEnd");
doLockState();
}
}
function doPunchEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doKickStart() {
if (isStateComplete()) {
doUnlockState();
setState("KickEnd");
doLockState();
}
}
function doKickEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doGroundKickStart() {
if (isStateComplete()) {
doUnlockState();
setState("GroundKickEnd");
doLockState();
}
}
function doGroundKickEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doJumpDive() {
doJumpDiveMoveTowardOpponent();
if (isStateComplete()) {
doUnlockState();
setState("JumpDiveEnd");
doLockState();
}
}
function doJumpDiveEnd() {
doJumpDiveEndMove();
if (isStateComplete()) {
doUnlockState();
setState("JumpDiveStandUp");
doLockState();
}
}
function doJumpDiveStandUp() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doThrowEndGround() {
doThrowEndGroundMove();
if (isStateComplete()) {
doUnlockState();
setState("Ground");
doLockState();
}
}
function doHitStand() {
doMove();
doSlowDownHorz();
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doHitGround() {
if (isStateComplete()) {
doUnlockState();
setState("Ground");
doLockState();
}
}
function doHitGroundFlat() {
doHitGround();
}
function doStruggleStart() {
if (isStateComplete()) {
doUnlockState();
setState("StruggleLoop");
doLockState();
}
}
function doStruggleLoop() {
oSoundManager.doGroan();
}
function doStruggleGrab() {
if (isStateComplete()) {
doUnlockState();
setState("GrabLoop");
doLockState();
}
}
function doGroundGrab() {
doStruggleGrab();
}
function doGrabLoop() {
}
function doThrowGround() {
if (isStateComplete()) {
doUnlockState();
setState("CallStart");
doLockState();
}
}
function doCallStart() {
if (isStateComplete()) {
nCallTimer = 0;
doUnlockState();
setState("CallLoop");
doLockState();
}
}
function doCallLoop() {
nCallTimer++;
if (isStateComplete() && (nCallTimer >= CALL_TIME_WAIT)) {
doUnlockState();
setState("CallEnd");
doLockState();
}
}
function doCallEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doPinHit() {
doPinHitMoveTowardOpponent();
if (isStateComplete()) {
doCheckPinHitAvailable();
}
}
function doPinHitEnd() {
if (isStateComplete()) {
doUnlockState();
setState("PinHitLoop");
doLockState();
}
}
function doPinHitLoop() {
}
function doPinHitRelease() {
if (isStateComplete()) {
doPinHitReleaseComplete();
}
}
function doKnockOutStart() {
if (isStateComplete()) {
doUnlockState();
setState("KnockOutFall");
doLockState();
}
}
function doKnockOutFall() {
if (isStateComplete()) {
doUnlockState();
setState("KnockOutEnd");
doLockState();
}
}
function doKnockOutEnd() {
if (isStateComplete()) {
doUnlockState();
setState("Ground");
doLockState();
}
}
function doGround() {
}
function doStandUp() {
if (isStateComplete()) {
doUnlockState();
setState("Idle");
}
}
function doStandUpFromPinStart() {
doWonStandMove();
if (isStateComplete()) {
doUnlockState();
setState("StandUpFromPinEnd");
doLockState();
}
}
function doStandUpFromPinEnd() {
if (isStateComplete()) {
doUnlockState();
setState("WinStart");
doLockState();
}
}
function doWinStart() {
if (isStateComplete()) {
doUnlockState();
setState("WinLoop");
doLockState();
}
}
function doWinLoop() {
nWinTimer++;
if (nWinTimer == WIN_WAIT_TIME) {
_global.C.doWonRound(nPlayerNum);
}
}
function doSuper1Start() {
if (isStateComplete()) {
doUnlockState();
setState("Super1Fall");
doLockState();
}
}
function doSuper2Start() {
if (isStateComplete()) {
doUnlockState();
setState("Super2Fall");
doLockState();
}
}
function doSuper1Fall() {
if (isStateComplete()) {
doUnlockState();
setState("Super1End");
doLockState();
}
}
function doSuper2Fall() {
if (isStateComplete()) {
doUnlockState();
setState("Super2End");
doLockState();
}
}
function doSuper1End() {
if (isStateComplete()) {
doUnlockState();
setState("CallStart");
doLockState();
}
}
function doSuper2End() {
if (isStateComplete()) {
doUnlockState();
setState("CallStart");
doLockState();
}
}
function doHidden() {
this["doHidden" + sHiddenReason];
}
function doHiddenStruggleLoop() {
oSoundManager.doGroan();
}
function doHiddenGrabLoop() {
}
function doHiddenPinHitLoop() {
oSoundManager.doGroan();
}
function doHiddenPinHitRelease() {
}
function doHiddenSuperMove() {
}
function doLoadStateAction() {
switch (__get__CurrentState()) {
case "Idle" :
nSpeedX = 0;
nSpeedY = 0;
var _local5 = mcRef._x;
var _local4 = mcRef._y;
if (_local4 > MainCTRL.nRING_BOTTOM) {
_local4 = MainCTRL.nRING_BOTTOM;
} else if (_local4 < MainCTRL.nRING_TOP) {
_local4 = MainCTRL.nRING_TOP;
}
mcRef._x = _local5;
mcRef._y = _local4;
break;
case "StandUp" :
nCurrentDamage = 0;
break;
case "GrabLoop" :
_global.C.Ambiance.doPositiveReaction();
_global.C.Ambiance.doRegainInterest();
doCheckGrabSpaceRemaining();
break;
case "StruggleStart" :
oSoundManager.doStruggleStart();
_global.C.Ambiance.doRegainInterest();
doPositionStruggle();
break;
case "JumpDive" :
oSoundManager.doJump();
doJumpDiveCalculations();
break;
case "JumpDiveEnd" :
doHitBalloon(GameCTRL.BALLOONS_GROUP_GROUNDHIT);
doJumpDiveEndCalculations();
break;
case "ThrowEndGround" :
oSoundManager.doKnockOut();
oSoundManager.doGroundImpact();
doThrowEndCalculations();
break;
case "Ground" :
if (!bGameComplete) {
doBeginStandUpProcess();
}
break;
case "KnockOutStart" :
oSoundManager.doKnockOut();
break;
case "KnockOutFall" :
_global.C.Ambiance.doRegainInterest();
doCheckKnockOutEndPosition();
break;
case "PinHit" :
oSoundManager.doJump();
doPinHitCalculations();
break;
case "PinHitEnd" :
_global.C.Ambiance.doPositiveReaction();
doCheckPinHitPosition();
break;
case "PinHitRelease" :
oSoundManager.doGroundImpact();
doHitBalloon(GameCTRL.BALLOONS_GROUP_PUNCH);
doCheckPinHitReleasePosition();
_global.C.doStopKoCountDown();
break;
case "KickEnd" :
doPunchKickHitBalloon(GameCTRL.BALLOONS_GROUP_KICK);
break;
case "PunchEnd" :
doPunchKickHitBalloon(GameCTRL.BALLOONS_GROUP_PUNCH);
break;
case "KnockOutEnd" :
_global.C.Ambiance.doPositiveReaction();
doHitBalloon(GameCTRL.BALLOONS_GROUP_GROUNDHIT);
break;
case "GroundKickEnd" :
_global.C.Ambiance.doPositiveReaction();
doHitBalloon(GameCTRL.BALLOONS_GROUP_KICK);
break;
case "StandUpFromPinStart" :
doWonStandCalculations();
break;
case "Super1Start" :
case "Super2Start" :
oSoundManager.doForce();
break;
case "ThrowGround" :
oSoundManager.doForce();
}
super.doLoadStateAction();
}
function doUnLoadStateAction() {
switch (__get__CurrentState()) {
case "JumpDive" :
oSoundManager.doGroundImpact();
_global.C.Ambiance.doRegainInterest();
_global.C.doShakeScreen(18);
doAddConsecutiveHit();
_global.P.getPlayer(nOpponentNum).doSufferHit(JUMP_DIVE_HIT_POINTS);
break;
case "PinHit" :
oSoundManager.doGroundImpact();
_global.C.Ambiance.doRegainInterest();
doHitBalloon(GameCTRL.BALLOONS_GROUP_GROUNDHIT);
_global.C.doShakeScreen(15);
doAddConsecutiveHit();
break;
case "KnockOutFall" :
oSoundManager.doGroundImpact();
_global.C.Ambiance.doRegainInterest();
_global.C.doShakeScreen(8);
break;
case "ThrowGround" :
oSoundManager.doYell();
_global.C.Ambiance.doRegainInterest();
_global.C.doShakeScreen(12);
doAddConsecutiveHit();
_global.P.getPlayer(nOpponentNum).doSufferHit(THROW_GROUND_HIT_POINTS);
doReplaceVisualAfterThrow();
doHitBalloon(GameCTRL.BALLOONS_GROUP_GROUNDHIT);
break;
case "PinHitRelease" :
_global.C.Ambiance.doPositiveReaction();
_global.C.Ambiance.doRegainInterest();
switch (Orientation) {
case ORIENTATION_LEFT :
doOrientRight();
break;
case ORIENTATION_RIGHT :
doOrientLeft();
}
break;
case "Super1Start" :
case "Super2Start" :
_global.C.Ambiance.doRegainInterest();
doCheckSuperMovePosition();
break;
case "Super1Fall" :
case "Super2Fall" :
oSoundManager.doGroundImpact();
_global.C.Ambiance.doPositiveReaction();
_global.P.getPlayer(nOpponentNum).doSufferHit(SUPER_MOVE_HIT_POINTS);
doHitBalloon(GameCTRL.BALLOONS_GROUP_SUPERMOVE);
break;
case "Super1End" :
case "Super2End" :
oSoundManager.doYell();
_global.C.Ambiance.doRegainInterest();
doPositionPlayerAfterSuperMove();
break;
case "Hidden" :
if (sHiddenReason == "PinHitRelease") {
oSoundManager.doYell();
} else {
if (sHiddenReason != "SuperMove") {
break;
}
}
}
super.doUnLoadStateAction();
}
function doAttack1() {
if (!checkStruggleCanStart()) {
var _local3 = false;
if (!Library.Utils.Tools.isItemInArray(STATES_GROUND, _global.P.getPlayer(nOpponentNum).CurrentState)) {
_local3 = true;
} else if ((Library.Utils.Tools.isItemInArray(STATES_GROUND, _global.P.getPlayer(nOpponentNum).CurrentState) && (Library.Utils.Tools.isItemInArray(STATES_IDLE, __get__CurrentState()))) && (getDistanceFromOpponent() < GROUND_GRAB_DISTANCE)) {
doGrabBegins(true, true);
_global.P.getPlayer(nOpponentNum).doGrabBegins(false, true);
} else if (getDistanceFromOpponent() < JUMP_DIVE_DISTANCE) {
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_JUMPDIVE);
}
setState("JumpDive");
doLockState();
} else {
_local3 = true;
}
if (_local3 && (Library.Utils.Tools.isItemInArray(STATES_IDLE, __get__CurrentState()))) {
setState("PunchStart");
doLockState();
if (checkOpponentHit()) {
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_PUNCH);
}
oSoundManager.doPunch();
doAddConsecutiveHit();
bCurrentPunchKickSuceed = true;
_global.P.getPlayer(nOpponentNum).doSufferHit(PUNCH_HIT_POINTS);
} else {
bCurrentPunchKickSuceed = false;
}
}
} else {
doStartStruggle();
}
}
function doAttack2() {
if (!checkStruggleCanStart()) {
var _local3 = false;
if (!Library.Utils.Tools.isItemInArray(STATES_GROUND, _global.P.getPlayer(nOpponentNum).CurrentState)) {
_local3 = true;
} else if (getDistanceFromOpponent() < GROUND_KICK_DISTANCE) {
setState("GroundKickStart");
oSoundManager.doKickGround();
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_KICK);
}
doAddConsecutiveHit();
doLockState();
_global.P.getPlayer(nOpponentNum).doSufferHit(KICK_HIT_POINTS);
} else {
_local3 = true;
}
if (_local3 && (Library.Utils.Tools.isItemInArray(STATES_IDLE, __get__CurrentState()))) {
setState("KickStart");
doLockState();
if (checkOpponentHit()) {
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_KICK);
}
oSoundManager.doKick();
bCurrentPunchKickSuceed = true;
doAddConsecutiveHit();
_global.P.getPlayer(nOpponentNum).doSufferHit(KICK_HIT_POINTS);
} else {
bCurrentPunchKickSuceed = false;
}
}
} else {
doStartStruggle();
}
}
function checkOpponentHit() {
var _local3 = false;
if (_global.P.getPlayer(nOpponentNum).HitZone.hitTest(mcRef.mcState.mcHitRef)) {
_local3 = true;
}
return(_local3);
}
function doJumpDiveCalculations() {
var _local3 = _global.P.getPlayer(nOpponentNum).BodyCoordinates.x - BodyCoordinates.x;
var _local4 = _global.P.getPlayer(nOpponentNum).BodyCoordinates.y - BodyCoordinates.y;
switch (Orientation) {
case ORIENTATION_RIGHT :
_local3 = _local3 - JUMP_DIVE_HIT_BUFFER;
break;
case ORIENTATION_LEFT :
_local3 = _local3 + JUMP_DIVE_HIT_BUFFER;
}
nJumpDiveMoveSpeedX = _local3 / nStateTotalFrame;
nJumpDiveMoveSpeedY = _local4 / nStateTotalFrame;
}
function doJumpDiveMoveTowardOpponent() {
mcRef._x = mcRef._x + nJumpDiveMoveSpeedX;
mcRef._y = mcRef._y + nJumpDiveMoveSpeedY;
}
function doJumpDiveEndCalculations() {
var _local2;
switch (Orientation) {
case ORIENTATION_RIGHT :
_local2 = -JUMP_DIVE_BACKUP_DIST;
break;
case ORIENTATION_LEFT :
_local2 = JUMP_DIVE_BACKUP_DIST;
}
nJumpDiveEndMoveSpeedX = _local2 / nStateTotalFrame;
}
function doJumpDiveEndMove() {
mcRef._x = mcRef._x + nJumpDiveEndMoveSpeedX;
}
function doPinOpponent() {
if (Library.Utils.Tools.isItemInArray(STATES_GROUND, _global.P.getPlayer(nOpponentNum).CurrentState)) {
if (getDistanceFromOpponent() < PIN_DISTANCE) {
setState("PinHit");
}
}
}
function doCheckPinHitAvailable() {
if (_global.P.getPlayer(nOpponentNum).CurrentState == "Ground") {
doEnterPinHit(true);
_global.P.getPlayer(nOpponentNum).doEnterPinHit(false);
} else {
setState("JumpDiveEnd");
}
}
function doCheckPinHitPosition() {
switch (_global.P.getPlayer(nOpponentNum).Orientation) {
case ORIENTATION_RIGHT :
doOrientRight();
break;
case ORIENTATION_LEFT :
doOrientLeft();
}
var _local3 = true;
var _local4;
var _local6;
var _local5;
var _local12 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcLimits1.getBounds(_global.P.Scene));
var _local11 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcLimits2.getBounds(_global.P.Scene));
var _local10;
var _local9;
if (_local12.x < _local11.x) {
_local10 = mcRef.mcState.mcLimits1;
_local9 = mcRef.mcState.mcLimits2;
} else {
_local10 = mcRef.mcState.mcLimits2;
_local9 = mcRef.mcState.mcLimits1;
}
while (_local3) {
_local4 = Library.Utils.MoreMath.getBoundsCenter(_local10.getBounds(_global.P.Scene));
_local6 = _local4.x;
_local5 = _local4.y;
_local3 = isPositionOutOfRingAxisX(_local6, _local5);
if (_local3) {
mcRef._x++;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:1, y:0});
}
}
_local3 = true;
while (_local3) {
_local4 = Library.Utils.MoreMath.getBoundsCenter(_local9.getBounds(_global.P.Scene));
_local6 = _local4.x;
_local5 = _local4.y;
_local3 = isPositionOutOfRingAxisX(_local6, _local5);
if (_local3) {
mcRef._x--;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:-1, y:0});
}
}
}
function doPinHitCalculations() {
var _local3 = _global.P.getPlayer(nOpponentNum).BodyCoordinates.x - BodyCoordinates.x;
var _local4 = _global.P.getPlayer(nOpponentNum).BodyCoordinates.y - BodyCoordinates.y;
switch (_global.P.getPlayer(nOpponentNum).Orientation) {
case ORIENTATION_RIGHT :
_local3 = _local3 - PIN_HIT_BUFFER;
break;
case ORIENTATION_LEFT :
_local3 = _local3 + PIN_HIT_BUFFER;
}
nPinHitMoveSpeedX = _local3 / nStateTotalFrame;
nPinHitMoveSpeedY = _local4 / nStateTotalFrame;
}
function doPinHitMoveTowardOpponent() {
mcRef._x = mcRef._x + nPinHitMoveSpeedX;
mcRef._y = mcRef._y + nPinHitMoveSpeedY;
}
function doCheckPinHitReleasePosition() {
var _local5 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcStandRef.getBounds(_global.P.Scene));
var _local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcGroundRef.getBounds(_global.P.Scene));
var _local7 = Math.min(_local5.x, _local4.x);
var _local8 = Math.max(_local5.x, _local4.x);
var _local6 = true;
var _local3;
while (_local6) {
_local5 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcStandRef.getBounds(_global.P.Scene));
_local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcGroundRef.getBounds(_global.P.Scene));
if (_local5.x < _local4.x) {
_local7 = _local5.x;
_local3 = _local5.y;
} else {
_local7 = _local4.x;
_local3 = _local4.y;
}
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
_local6 = isPositionOutOfRingAxisX(_local7, _local3);
if (_local6) {
mcRef._x++;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:1, y:0});
}
}
_local6 = true;
while (_local6) {
_local5 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcStandRef.getBounds(_global.P.Scene));
_local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcGroundRef.getBounds(_global.P.Scene));
if (_local5.x > _local4.x) {
_local8 = _local5.x;
_local3 = _local5.y;
} else {
_local8 = _local4.x;
_local3 = _local4.y;
}
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
_local6 = isPositionOutOfRingAxisX(_local8, _local3);
if (_local6) {
mcRef._x--;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:-1, y:0});
}
}
}
function doPinHitReleaseComplete() {
var _local5 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcStandRef.getBounds(_global.P.Scene));
var _local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcGroundRef.getBounds(_global.P.Scene));
_global.P.getPlayer(nOpponentNum).doReleasedFromPinHit(_local5);
var _local6 = _local4.x;
var _local3 = _local4.y;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
mcRef._x = _local6;
mcRef._y = _local3;
doUnlockState();
setState("Ground");
doLockState();
}
function doPositionOpponentForWon() {
var _local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcGroundRef.getBounds(_global.P.Scene));
var _local7 = _local4.x;
var _local3 = _local4.y;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
var _local6 = _local7 - _global.P.getPlayer(nOpponentNum).Coordinates.x;
var _local5 = _local3 - _global.P.getPlayer(nOpponentNum).Coordinates.y;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:_local6, y:_local5});
}
function doCheckKnockOutEndPosition() {
var _local3 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcRefPoint.getBounds(_global.P.Scene));
if (isPositionOutOfRingAxisX(_local3.x, _local3.y)) {
switch (Orientation) {
case ORIENTATION_LEFT :
doOrientRight();
break;
case ORIENTATION_RIGHT :
doOrientLeft();
}
}
}
function doRecoverDamage() {
nCurrentDamage = nCurrentDamage - DAMAGE_RECOVER_RATE;
if (nCurrentDamage < 0) {
nCurrentDamage = 0;
}
}
function doReceiveDamage(__nDamage) {
doResetConsecutiveHit();
nRealHealth = nRealHealth - __nDamage;
if (nRealHealth < 0) {
nRealHealth = 0;
nCurrentDamage = 0;
setState("KnockOutStart");
doLockState();
}
nCurrentDamage = nCurrentDamage + __nDamage;
if (nCurrentDamage >= DAMAGE_TILL_KNOCKOUT) {
nCurrentDamage = 0;
setState("KnockOutStart");
doLockState();
}
oHud.doSetEnergy(nRealHealth);
}
function doSlowDownHorz() {
nSpeedX = Library.Utils.MoreMath.getReachZero(nSpeedX, DECELERATION);
}
function doSlowDownVert() {
nSpeedY = Library.Utils.MoreMath.getReachZero(nSpeedY, DECELERATION);
}
function doDisplaceLeft() {
if (nSpeedX > 0) {
nSpeedX = nSpeedX - DECELERATION;
}
nSpeedX = nSpeedX - ACCELERATION_HORZ;
if (nSpeedX < (-MAX_SPEED_HORZ)) {
nSpeedX = -MAX_SPEED_HORZ;
}
}
function doDisplaceRight() {
if (nSpeedX < 0) {
nSpeedX = nSpeedX + DECELERATION;
}
nSpeedX = nSpeedX + ACCELERATION_HORZ;
if (nSpeedX > MAX_SPEED_HORZ) {
nSpeedX = MAX_SPEED_HORZ;
}
}
function doDisplaceUp() {
if (nSpeedY > 0) {
nSpeedY = nSpeedY - DECELERATION;
}
nSpeedY = nSpeedY - ACCELERATION_VERT;
if (nSpeedY < (-MAX_SPEED_VERT)) {
nSpeedY = -MAX_SPEED_VERT;
}
}
function doDisplaceDown() {
if (nSpeedY < 0) {
nSpeedY = nSpeedY + DECELERATION;
}
nSpeedY = nSpeedY + ACCELERATION_VERT;
if (nSpeedY > MAX_SPEED_VERT) {
nSpeedY = MAX_SPEED_VERT;
}
}
function doMove() {
if (nSpeedX != 0) {
doMoveHorz();
}
if (nSpeedY != 0) {
doMoveVert();
}
doFaceOpponent();
}
function doMoveHorz() {
var _local4 = mcRef._x + nSpeedX;
var _local3 = mcRef._y;
var _local2 = isValidPosition(_local4, _local3);
if (_local2) {
mcRef._x = mcRef._x + nSpeedX;
} else {
doSlowDownHorz();
}
}
function doMoveVert() {
var _local4 = mcRef._x;
var _local3 = mcRef._y + nSpeedY;
var _local2 = isValidPosition(_local4, _local3);
if (_local2) {
mcRef._y = mcRef._y + nSpeedY;
} else {
doSlowDownVert();
}
}
function doChangeDepth() {
var _local4 = Coordinates.y - _global.P.getPlayer(nOpponentNum).Coordinates.y;
var _local3 = Library.Utils.MoreMath.getPolarity(_local4);
if (_local3 == 1) {
if (UsedDepth < _global.P.getPlayer(nOpponentNum).UsedDepth) {
mcRef.swapDepths(_global.C.returnDepth("Characters"));
}
}
}
function doFaceOpponent() {
var _local4 = BodyCoordinates.x - _global.P.getPlayer(nOpponentNum).BodyCoordinates.x;
var _local3 = Library.Utils.MoreMath.getPolarity(_local4);
if (_local3 == -1) {
doOrientRight();
} else {
doOrientLeft();
}
}
function isValidPosition(__nX, __nY) {
var _local2 = true;
if (isPositionOutOfRing(__nX, __nY)) {
_local2 = false;
} else {
var _local3 = isPositionOverOpponent(Coordinates.x, Coordinates.y);
if (isPositionOverOpponent(__nX, __nY) && (!_local3)) {
_local2 = false;
}
}
return(_local2);
}
function isPositionOutOfRingAxisX(__nX, __nY) {
var _local2 = false;
if (_global.P.Scene.mcRingOutAxisX.hitTest(__nX, __nY, true)) {
_local2 = true;
}
return(_local2);
}
function isPositionOutOfRing(__nX, __nY) {
var _local2 = false;
if (_global.P.Scene.mcRingOutAxisY.hitTest(__nX, __nY, true)) {
_local2 = true;
} else if (_global.P.Scene.mcRingOutAxisX.hitTest(__nX, __nY, true)) {
_local2 = true;
}
return(_local2);
}
function isPositionOverOpponent(__nX, __nY) {
var _local3 = false;
var _local8 = __nX - Coordinates.x;
var _local9 = __nY - Coordinates.y;
var _local7 = Library.Utils.MoreMath.getBoundsCenter(FootZoneLeft.getBounds(_global.P.Scene));
_local7.x = _local7.x + _local8;
_local7.y = _local7.y + _local9;
var _local5 = Library.Utils.MoreMath.getBoundsCenter(FootZoneRight.getBounds(_global.P.Scene));
_local5.x = _local5.x + _local8;
_local5.y = _local5.y + _local9;
var _local6 = Library.Utils.MoreMath.getBoundsCenter(FootZoneTop.getBounds(_global.P.Scene));
_local6.x = _local6.x + _local8;
_local6.y = _local6.y + _local9;
var _local4 = Library.Utils.MoreMath.getBoundsCenter(FootZoneBottom.getBounds(_global.P.Scene));
_local4.x = _local4.x + _local8;
_local4.y = _local4.y + _local9;
var _local10 = _global.P.getPlayer(nOpponentNum).FootZone;
if (_local10.hitTest(_local7.x, _local7.y)) {
_local3 = true;
} else if (_local10.hitTest(_local5.x, _local5.y)) {
_local3 = true;
} else if (_local10.hitTest(_local6.x, _local6.y)) {
_local3 = true;
} else if (_local10.hitTest(_local4.x, _local4.y)) {
_local3 = true;
}
return(_local3);
}
function doStartStruggle() {
_global.P.getPlayer(nOpponentNum).doEnterStruggle();
var _local3 = (Coordinates.y + _global.P.getPlayer(nOpponentNum).Coordinates.y) / 2;
if (isValidPosition(mcRef._x, _local3)) {
mcRef._y = _local3;
}
setState("StruggleStart");
doLockState();
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_STRUGGLE);
}
_global.C.doManageStruggle(nPlayerNum);
}
function doPositionStruggle() {
var _local3 = true;
var _local4;
var _local6;
var _local5;
var _local12 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcLimits1.getBounds(_global.P.Scene));
var _local11 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcLimits2.getBounds(_global.P.Scene));
var _local10;
var _local9;
if (_local12.x < _local11.x) {
_local10 = mcRef.mcState.mcLimits1;
_local9 = mcRef.mcState.mcLimits2;
} else {
_local10 = mcRef.mcState.mcLimits2;
_local9 = mcRef.mcState.mcLimits1;
}
while (_local3) {
_local4 = Library.Utils.MoreMath.getBoundsCenter(_local10.getBounds(_global.P.Scene));
_local6 = _local4.x;
_local5 = _local4.y;
_local3 = isPositionOutOfRingAxisX(_local6, _local5);
if (_local3) {
mcRef._x++;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:1, y:0});
}
}
_local3 = true;
while (_local3) {
_local4 = Library.Utils.MoreMath.getBoundsCenter(_local9.getBounds(_global.P.Scene));
_local6 = _local4.x;
_local5 = _local4.y;
_local3 = isPositionOutOfRingAxisX(_local6, _local5);
if (_local3) {
mcRef._x--;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:-1, y:0});
}
}
}
function doStruggleKeyBash() {
_global.C.doTreatStruggleBash(nPlayerNum);
}
function checkStruggleCanStart() {
var _local3 = false;
if ((getDistanceFromOpponent() < STRUGGLE_DISTANCE) && (Library.Utils.Tools.isItemInArray(STATES_IDLE, __get__CurrentState()))) {
var _local4 = _global.P.getPlayer(nOpponentNum).checkDoEnterStruggle();
if (_local4) {
_local3 = true;
}
}
return(_local3);
}
function doGrabAction1() {
doUnlockState();
setState("ThrowGround");
doLockState();
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_THROW);
}
switch (Orientation) {
case ORIENTATION_LEFT :
doOrientRight();
_global.P.getPlayer(nOpponentNum).doOrientRight();
break;
case ORIENTATION_RIGHT :
doOrientLeft();
_global.P.getPlayer(nOpponentNum).doOrientLeft();
}
}
function doGrabAction2() {
doGrabAction1();
}
function doGrabOrientRight() {
doOrientLeft();
_global.P.getPlayer(nOpponentNum).doOrientLeft();
doCheckGrabSpaceRemaining();
}
function doGrabOrientLeft() {
doOrientRight();
_global.P.getPlayer(nOpponentNum).doOrientRight();
doCheckGrabSpaceRemaining();
}
function doCheckGrabSpaceRemaining() {
var _local3 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcLimitRefPoint.getBounds(_global.P.Scene));
if (isPositionOutOfRingAxisX(_local3.x, _local3.y)) {
switch (Orientation) {
case ORIENTATION_LEFT :
doOrientRight();
_global.P.getPlayer(nOpponentNum).doOrientRight();
break;
case ORIENTATION_RIGHT :
doOrientLeft();
_global.P.getPlayer(nOpponentNum).doOrientLeft();
}
}
}
function doReplaceVisualAfterThrow() {
var _local4 = mcRef.mcState.mcOpponentBodyRefPoint.getBounds(_global.P.Scene);
_global.P.getPlayer(nOpponentNum).doSwitchToGroundAfterThrow();
switch (Orientation) {
case ORIENTATION_LEFT :
_global.P.getPlayer(nOpponentNum).doOrientLeft();
break;
case ORIENTATION_RIGHT :
_global.P.getPlayer(nOpponentNum).doOrientRight();
}
var _local7 = (_local4.xMin + _local4.xMax) / 2;
var _local3 = (_local4.yMin + _local4.yMax) / 2;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
var _local6 = _local7 - _global.P.getPlayer(nOpponentNum).Coordinates.x;
var _local5 = _local3 - _global.P.getPlayer(nOpponentNum).Coordinates.y;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:_local6, y:_local5});
_local4 = mcRef.mcState.mcPlayertBodyRefPoint.getBounds(_global.P.Scene);
_local7 = (_local4.xMin + _local4.xMax) / 2;
_local3 = (_local4.yMin + _local4.yMax) / 2;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
mcRef._x = _local7;
mcRef._y = _local3;
}
function doThrowEndCalculations() {
var _local2;
switch (Orientation) {
case ORIENTATION_RIGHT :
_local2 = THROW_END_DIST;
break;
case ORIENTATION_LEFT :
_local2 = -THROW_END_DIST;
}
nThrowEndMoveSpeedX = _local2 / nStateTotalFrame;
}
function doThrowEndGroundMove() {
var _local3 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcPointRef.getBounds(_global.P.Scene));
if (!isPositionOutOfRingAxisX(_local3.x + nThrowEndMoveSpeedX, _local3.y)) {
mcRef._x = mcRef._x + nThrowEndMoveSpeedX;
}
}
function doSuperMove() {
if (bSpecialMoveAvailable) {
doPlayerUsedSpecialMove();
if (bAffectScore && (_global.P.getPlayer(nOpponentNum).Health > 0)) {
MainCTRL.__get__Instance().doAddPlayerScore(POINTS_FOR_SPECIAL_MOVE);
}
var _local3 = Library.Utils.MoreMath.getRandomRange(SUPER_MOVES_MIN, SUPER_MOVES_MAX);
_global.P.getPlayer(nOpponentNum).doEnterHiddenSuperMove();
doUnlockState();
setState(("Super" + _local3) + "Start");
doLockState();
}
}
function doCheckSuperMovePosition() {
var _local3 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcLimits.getBounds(_global.P.Scene));
if (isPositionOutOfRingAxisX(_local3.x, _local3.y)) {
switch (Orientation) {
case ORIENTATION_LEFT :
doOrientRight();
_global.P.getPlayer(nOpponentNum).doOrientLeft();
break;
case ORIENTATION_RIGHT :
doOrientLeft();
_global.P.getPlayer(nOpponentNum).doOrientRight();
}
}
}
function doPositionPlayerAfterSuperMove() {
switch (Orientation) {
case ORIENTATION_LEFT :
_global.P.getPlayer(nOpponentNum).doOrientRight();
break;
case ORIENTATION_RIGHT :
_global.P.getPlayer(nOpponentNum).doOrientLeft();
}
var _local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcGroundRef.getBounds(_global.P.Scene));
var _local7 = _local4.x;
var _local3 = _local4.y;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
var _local6 = _local7 - _global.P.getPlayer(nOpponentNum).Coordinates.x;
var _local5 = _local3 - _global.P.getPlayer(nOpponentNum).Coordinates.y;
_global.P.getPlayer(nOpponentNum).doApplyPositionTranform({x:_local6, y:_local5});
_global.P.getPlayer(nOpponentNum).doSwitchToGroundAfterSuperMove();
_local4 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcStandRef.getBounds(_global.P.Scene));
_local7 = _local4.x;
_local3 = _local4.y;
if (_local3 > MainCTRL.nRING_BOTTOM) {
_local3 = MainCTRL.nRING_BOTTOM;
} else if (_local3 < MainCTRL.nRING_TOP) {
_local3 = MainCTRL.nRING_TOP;
}
mcRef._x = _local7;
mcRef._y = _local3;
}
function doBeginStandUpProcess() {
if (oCurrentProgress == undefined) {
var _local4 = _global.C.returnDepth("HUDVisual");
var _local3 = _global.P.Scene.attachMovie("mcSimpleProgress", "mcProgress" + _local4, _local4);
_local3._x = BodyCoordinates.x - SimpleProgress.PROGRESS_PLAYER_RELATIVE_COORD.x;
_local3._y = BodyCoordinates.y - SimpleProgress.PROGRESS_PLAYER_RELATIVE_COORD.y;
nPreviousStandUpProgress = nPreviousStandUpProgress - STATUS_PROGRESS_REGAIN_REMOVE;
oCurrentProgress = new SimpleProgress(_local3, mx.utils.Delegate.create(this, doStartStandUp), nPreviousStandUpProgress, nRealHealth);
}
}
function doAddConsecutiveHit() {
nConsecutiveHits++;
doCheckConsecutiveHits();
}
function doResetConsecutiveHit() {
nConsecutiveHits = 0;
}
function doCheckConsecutiveHits() {
if (nConsecutiveHits >= CONSECUTIVES_HITS_FOR_SPECIAL) {
nConsecutiveHits = 0;
doAddSpecialMarker();
}
}
function doAddSpecialMarker() {
nSpecialMarkers++;
if (nSpecialMarkers >= MARKERS_TO_UNLOCK_SPECIAL) {
doUnlockSpecialMove();
}
}
function doUnlockSpecialMove() {
bSpecialMoveAvailable = true;
}
function doPlayerUsedSpecialMove() {
bSpecialMoveAvailable = false;
nSpecialMarkers = 0;
nConsecutiveHits = 0;
}
function doWonStandCalculations() {
var _local3;
var _local2 = Coordinates.y - WON_STAND_UP_MOVE_VERT;
if (isPositionOutOfRing(Coordinates.x, _local2)) {
_local3 = Coordinates.y + WON_STAND_UP_MOVE_VERT;
} else {
_local3 = _local2;
}
var _local4 = _local3 - Coordinates.y;
nWonStandMoveSpeedY = _local4 / nStateTotalFrame;
}
function doWonStandMove() {
if (UsedDepth < _global.P.getPlayer(nOpponentNum).UsedDepth) {
mcRef.swapDepths(_global.C.returnDepth("Characters"));
}
mcRef._y = mcRef._y + nWonStandMoveSpeedY;
}
function doPunchKickHitBalloon(__nContext) {
if (bCurrentPunchKickSuceed) {
doHitBalloon(__nContext);
}
}
function doHitBalloon(__nContext) {
var _local3 = Library.Utils.MoreMath.getBoundsCenter(mcRef.mcState.mcBalloonRef.getBounds(_global.P.Scene));
_global.C.doApplyHitBalloon(_local3, __nContext);
}
function doGroundKeyBash() {
oCurrentProgress.doReceiveBash();
}
function getDistanceFromOpponent() {
return(Library.Utils.MoreMath.getDistance(BodyCoordinates.x, BodyCoordinates.y, _global.P.getPlayer(nOpponentNum).BodyCoordinates.x, _global.P.getPlayer(nOpponentNum).BodyCoordinates.y));
}
static var STATES_GROUND = ["Ground", "HitGround", "HitGroundFlat", "KnockOut"];
static var STATES_IDLE = ["Idle", "Walk", "CallStart", "CallLoop", "CallEnd"];
static var ORIENTATION_LEFT = 1;
static var ORIENTATION_RIGHT = 2;
static var MAXIMUM_HEALTH = 100;
static var PUNCH_HIT_POINTS = 2;
static var KICK_HIT_POINTS = 5;
static var JUMP_DIVE_HIT_POINTS = 8;
static var SUPER_MOVE_HIT_POINTS = 22;
static var THROW_GROUND_HIT_POINTS = 9;
static var HIT_TO_PROGRESSREDUCER_RATIO = 3.5;
static var PIN_HIT_PROGRESS_REDUCE = 30;
static var DAMAGE_TILL_KNOCKOUT = 6;
static var DAMAGE_RECOVER_RATE = 0.1;
static var DAMAGE_REBOUND = 2.5;
static var KICK_REBOUND_FACTOR = 1.8;
static var GROUND_KICK_DISTANCE = 100;
static var GROUND_GRAB_DISTANCE = 100;
static var JUMP_DIVE_DISTANCE = 180;
static var STRUGGLE_DISTANCE = 100;
static var PIN_DISTANCE = 180;
static var MAX_SPEED_HORZ = 4;
static var MAX_SPEED_VERT = 4;
static var ACCELERATION_HORZ = 0.4;
static var ACCELERATION_VERT = 0.4;
static var DECELERATION = 1.2;
static var MIN_SPEED_FOR_WALK = 1;
static var STRUGGLE_TIMEOUT_REOUND = 6;
static var THROW_END_DIST = 60;
static var JUMP_DIVE_BACKUP_DIST = 85;
static var JUMP_DIVE_HIT_BUFFER = 35;
static var PIN_HIT_BUFFER = 35;
static var CALL_TIME_WAIT = 25;
static var WIN_WAIT_TIME = 65;
static var CONSECUTIVES_HITS_FOR_SPECIAL = 2;
static var MARKERS_TO_UNLOCK_SPECIAL = 5;
static var SUPER_MOVES_MIN = 1;
static var SUPER_MOVES_MAX = 2;
static var WON_STAND_UP_MOVE_VERT = 25;
static var STATUS_PROGRESS_REGAIN_REMOVE = 20;
static var POINTS_FOR_KICK = 90;
static var POINTS_FOR_PUNCH = 50;
static var POINTS_FOR_WINNING = 1500;
static var POINTS_FOR_START_PIN = 65;
static var POINTS_FOR_STAND_UP = 35;
static var POINTS_FOR_PIN_RELEASE = 280;
static var POINTS_FOR_STRUGGLE = 155;
static var POINTS_FOR_GRAB = 65;
static var POINTS_FOR_THROW = 45;
static var POINTS_FOR_SPECIAL_MOVE = 600;
static var POINTS_FOR_JUMPDIVE = 45;
}
Symbol 15 MovieClip [__Packages.Library.Sound.SoundItem] Frame 0
class Library.Sound.SoundItem
{
var sndObj, sLinkage, mcRef, nRemainingLoop, nCurrentVolume, nTargetVolume, nFadeRate, sCategory, bFadeAtEnd, bMuted, bPaused, bNeedFreshStart, nCurrentTime, aEventListeners, bStopAfterFade;
function SoundItem (__sndObject, __sLinkage, __nVolume, __nLoop, __sCategory, __mc) {
sndObj = __sndObject;
sLinkage = __sLinkage;
mcRef = __mc;
nRemainingLoop = __nLoop;
nCurrentVolume = __nVolume;
nTargetVolume = __nVolume;
nFadeRate = FADE_RATE;
sCategory = __sCategory;
bFadeAtEnd = false;
bMuted = false;
bPaused = false;
bNeedFreshStart = false;
sndObj.onSoundComplete = Library.Utils.Delegate.create(this, doSoundComplete);
sndObj.start(0, __nLoop);
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
nCurrentTime = 0;
aEventListeners = new Array();
}
function doEnterFrame() {
if (!bPaused) {
if (nCurrentTime > sndObj.position) {
nRemainingLoop--;
}
nCurrentTime = sndObj.position;
}
doCheckFadeAtEnd();
doManageFade();
}
function doAddListener(__oListener) {
aEventListeners.push(__oListener);
}
function doRemoveListener(__oListener) {
var _local2 = 0;
while (_local2 < aEventListeners.length) {
if (aEventListeners[_local2] == __oListener) {
delete aEventListeners[_local2];
aEventListeners.splice(_local2, 1);
}
_local2++;
}
}
function doSoundComplete() {
if (bNeedFreshStart && (nRemainingLoop > 1)) {
sndObj.start(0, nRemainingLoop - 1);
} else {
doManageEndEvent();
}
}
function doUpdateSound() {
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
}
function doMute() {
bMuted = true;
doUpdateSound();
}
function doUnMute() {
bMuted = false;
doUpdateSound();
}
function doPause() {
sndObj.stop();
bPaused = true;
}
function doResume() {
bPaused = false;
bNeedFreshStart = true;
sndObj.start(nCurrentTime / 1000, 1);
}
function doStop() {
sndObj.stop();
doManageEndEvent();
}
function doFadeTo(__nVolume, __bStopAndDelete) {
if (__bStopAndDelete == undefined) {
__bStopAndDelete = true;
}
bStopAfterFade = __bStopAndDelete;
nTargetVolume = __nVolume;
}
function setFadeRate(__nRate) {
if (__nRate == undefined) {
__nRate = FADE_RATE;
}
nFadeRate = __nRate;
}
function setFadeAtEnd(__bFadeAtEnd) {
bFadeAtEnd = true;
}
function setPan(__nPan) {
sndObj.setPan(__nPan);
}
function get Category() {
return(sCategory);
}
function get LinkageName() {
return(sLinkage);
}
function doDestroy() {
sndObj.stop();
delete sndObj;
mcRef.removeMovieClip();
}
function doCheckFadeAtEnd() {
if (bFadeAtEnd) {
if (nRemainingLoop == 1) {
if ((sndObj.duration - nCurrentTime) <= FADE_AT_END_TIME) {
doFadeTo(0);
}
}
}
}
function doManageEndEvent() {
var _local2 = 0;
while (_local2 < aEventListeners.length) {
aEventListeners[_local2].doSoundEvent(Library.Sound.SoundManager.EVENT_SOUND_COMPLETE, this);
_local2++;
}
aEventListeners = new Array();
mcRef.removeMovieClip();
delete mcRef;
delete aEventListeners;
delete sndObj.onSoundComplete;
delete sndObj;
}
function doManageFade() {
if (nCurrentVolume != nTargetVolume) {
nCurrentVolume = Library.Utils.MoreMath.getReachNum(nCurrentVolume, nTargetVolume, nFadeRate);
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
}
if ((nCurrentVolume <= 0) && (bStopAfterFade)) {
sndObj.stop();
doManageEndEvent();
}
}
function returnComputedVolume(__nVolume) {
var _local2;
if ((!bMuted) && (!Library.Sound.SoundManager.isCategoryMuted(sCategory))) {
var _local3 = Library.Sound.SoundManager.__get__MasterVolume() / 100;
var _local4 = Library.Sound.SoundManager.getCategoryVolume(sCategory) / 100;
_local2 = __nVolume;
_local2 = _local2 * _local4;
_local2 = _local2 * _local3;
} else {
_local2 = 0;
}
return(_local2);
}
static var FADE_RATE = 8;
static var FADE_AT_END_TIME = 800;
}
Symbol 16 MovieClip [__Packages.Library.Sound.SoundManager] Frame 0
class Library.Sound.SoundManager
{
static var aSounds, mcAttach, nSoundNum, aSoundCategories, nMasterVolume, oEnterFrameListener;
function SoundManager () {
}
static function doPlaySound(__sLinkage, __nVolume, __nLoop, __bUnique) {
return(doPlaySoundInCat(DEFAULT_CATEGORY, __sLinkage, __nVolume, __nLoop, __bUnique));
}
static function doPlaySoundInCat(__sCategoryName, __sLinkage, __nVolume, __nLoop, __bUnique) {
doCheckInit();
var _local1;
if (NewSoundAllowed) {
if (__nVolume == undefined) {
__nVolume = 100;
}
if (__nLoop == undefined) {
__nLoop = 1;
}
if (__bUnique == undefined) {
__bUnique = false;
}
var _local2;
if (__bUnique) {
var _local4 = isSoundPlaying(__sLinkage);
if (_local4.bPlaying) {
_local2 = false;
_local1 = _local4.oSound;
} else {
_local2 = true;
}
} else {
_local2 = true;
}
if (_local2) {
doManageCategory(__sCategoryName);
var _local5 = getMCForSound();
var _local3 = new Sound(_local5);
_local3.attachSound(__sLinkage);
if (_local3.duration != undefined) {
_local1 = new Library.Sound.SoundItem(_local3, __sLinkage, __nVolume, __nLoop, __sCategoryName, _local5);
}
_local1.doAddListener(Library.Sound.SoundManager);
aSounds.push(_local1);
}
}
return(_local1);
}
static function isSoundPlaying(__sLinkageName) {
var _local1 = new Object();
_local1.bPlaying = false;
_local1.oSound = undefined;
for (var _local3 in aSounds) {
if (aSounds[_local3].LinkageName == __sLinkageName) {
_local1.oSound = aSounds[_local3];
_local1.bPlaying = true;
}
}
return(_local1);
}
static function doManageExternalSound(__oSound) {
doCheckInit();
doManageCategory(__oSound.__get__Category());
__oSound.doAddListener(Library.Sound.SoundManager);
aSounds.push(__oSound);
}
static function getMCForSound() {
var _local1 = getNextDepth();
var _local2 = mcAttach.createEmptyMovieClip("Snd" + _local1, _local1);
return(_local2);
}
static function getNextDepth() {
nSoundNum++;
return(nSoundNum);
}
static function doInit(__mcAttach) {
mcAttach = __mcAttach;
if (!bInited) {
bInited = true;
nSoundNum = 0;
aSounds = new Array();
aSoundCategories = new Array();
nMasterVolume = 100;
_global.mx.transitions.OnEnterFrameBeacon.init();
oEnterFrameListener = new Object();
oEnterFrameListener.onEnterFrame = Library.Utils.Delegate.create(Library.Sound.SoundManager, doEnterFrame);
MovieClip.addListener(oEnterFrameListener);
}
}
static function doEnterFrame() {
for (var _local1 in aSounds) {
aSounds[_local1].doEnterFrame();
}
}
static function setCategoryVolume(__sCategoryName, __nVol) {
doManageCategory(__sCategoryName);
for (var _local3 in aSoundCategories) {
if (aSoundCategories[_local3].sName == __sCategoryName) {
aSoundCategories[_local3].nVolume = __nVol;
}
}
doUpdateAllSoundsVolume();
}
static function getCategoryVolume(__sCategoryName) {
doManageCategory(__sCategoryName);
var _local1;
for (var _local3 in aSoundCategories) {
if (aSoundCategories[_local3].sName == __sCategoryName) {
_local1 = aSoundCategories[_local3].nVolume;
}
}
return(_local1);
}
static function isCategoryMuted(__sCategoryName) {
doManageCategory(__sCategoryName);
var _local1;
for (var _local3 in aSoundCategories) {
if (aSoundCategories[_local3].sName == __sCategoryName) {
_local1 = aSoundCategories[_local3].bMuted;
}
}
return(_local1);
}
static function doSoundEvent(__nEvent, __oSound) {
if (!(__nEvent === EVENT_SOUND_COMPLETE)) {
} else {
var _local1 = false;
for (var _local3 in aSounds) {
if (!_local1) {
if (aSounds[_local3] == __oSound) {
_local1 = true;
delete aSounds[_local3];
aSounds.splice(Number(_local3), 1);
}
}
}
}
}
static function doMuteCategory(__sCategoryName) {
for (var _local2 in aSoundCategories) {
if (aSoundCategories[_local2].sName == __sCategoryName) {
aSoundCategories[_local2].bMuted = true;
}
}
doUpdateAllSoundsVolume();
}
static function doUnMuteCategory(__sCategoryName) {
for (var _local2 in aSoundCategories) {
if (aSoundCategories[_local2].sName == __sCategoryName) {
aSoundCategories[_local2].bMuted = false;
}
}
doUpdateAllSoundsVolume();
}
static function setMasterVolume(__nVol) {
nMasterVolume = __nVol;
doUpdateAllSoundsVolume();
}
static function get NewSoundAllowed() {
return(aSounds.length < MAX_SOUNDS_PLAYING);
}
static function get MasterVolume() {
return(nMasterVolume);
}
static function doRemoveListenerFromAllSounds(__oListener) {
for (var _local2 in aSounds) {
aSounds[_local2].doRemoveListener(__oListener);
}
}
static function doDestroy() {
doRemoveListenerFromAllSounds();
for (var _local1 in aSounds) {
aSounds[_local1].doDestroy();
}
}
static function doUpdateAllSoundsVolume() {
for (var _local1 in aSounds) {
aSounds[_local1].doUpdateSound();
}
}
static function doCheckInit() {
if (!bInited) {
}
}
static function doManageCategory(__sCategoryName) {
doCheckInit();
var _local1 = false;
for (var _local4 in aSoundCategories) {
if (aSoundCategories[_local4].sName == __sCategoryName) {
_local1 = true;
}
}
if (!_local1) {
var _local3 = new Object();
_local3.sName = __sCategoryName;
_local3.nVolume = 100;
_local3.bMuted = false;
aSoundCategories.push(_local3);
}
}
static var EVENT_SOUND_COMPLETE = 1;
static var DEFAULT_CATEGORY = "SFX";
static var MAX_SOUNDS_PLAYING = 8;
static var bInited = false;
}
Symbol 18 MovieClip [__Packages.PlayerSoundsManager] Frame 0
class PlayerSoundsManager
{
var nCurrentSoundsNum, oPlayerVoice, oKnockOut, oPlayerRef;
function PlayerSoundsManager () {
nCurrentSoundsNum = 0;
}
function doSoundEvent(__nEvent, __oSound) {
if (!(__nEvent === Library.Sound.SoundManager.EVENT_SOUND_COMPLETE)) {
} else {
nCurrentSoundsNum--;
if (oPlayerVoice == __oSound) {
delete oPlayerVoice;
} else if (oKnockOut == __oSound) {
delete oKnockOut;
}
}
}
function setPlayerRef(__oPlayerRef) {
oPlayerRef = __oPlayerRef;
}
function doPunch() {
if (canCreateSound()) {
var _local3 = "Punch" + Library.Utils.MoreMath.getRandomRange(1, 4);
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local3, 100, 1, true);
_local2.setFadeAtEnd(true);
_local2.setPan(returnCurrentPan());
_local2.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doKick() {
if (canCreateSound()) {
var _local3 = "Kick" + Library.Utils.MoreMath.getRandomRange(1, 4);
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local3, 100, 1, true);
_local2.setFadeAtEnd(true);
_local2.setPan(returnCurrentPan());
_local2.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doKickGround() {
if (canCreateSound()) {
var _local3 = "KickGround";
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local3, 100, 1, true);
_local2.setFadeAtEnd(true);
_local2.setPan(returnCurrentPan());
_local2.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doGroundImpact() {
if (canCreateSound()) {
var _local3 = "GroundImpact" + Library.Utils.MoreMath.getRandomRange(1, 3);
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local3, 100, 1, true);
_local2.setFadeAtEnd(true);
_local2.setPan(returnCurrentPan());
_local2.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doKnockOut() {
if (canCreateSound()) {
var _local2 = "KnockOut";
oKnockOut = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local2, 100, 1, true);
oKnockOut.setPan(returnCurrentPan());
oKnockOut.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doStruggleStart() {
if (canCreateSound()) {
var _local3 = "StruggleStart";
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local3, 100, 1, true);
_local2.setPan(returnCurrentPan());
_local2.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doYell() {
if (canCreateSound() && (oPlayerVoice == undefined)) {
var _local2;
if (isPlayerFemale()) {
_local2 = "FemaleYell" + String(Library.Utils.MoreMath.getRandomRange(1, 4));
} else {
_local2 = "MaleYell" + String(Library.Utils.MoreMath.getRandomRange(1, 13));
}
oPlayerVoice = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local2, 100, 1, true);
oPlayerVoice.setPan(returnCurrentPan());
oPlayerVoice.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doGroan() {
if (canCreateSound() && (oPlayerVoice == undefined)) {
var _local2;
if (isPlayerFemale()) {
_local2 = "FemaleGroan" + String(Library.Utils.MoreMath.getRandomRange(1, 2));
} else {
_local2 = "MaleGroan" + String(Library.Utils.MoreMath.getRandomRange(1, 5));
}
oPlayerVoice = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local2, 400, 1, true);
oPlayerVoice.setPan(returnCurrentPan());
oPlayerVoice.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doForce() {
if (canCreateSound() && (oPlayerVoice == undefined)) {
var _local2;
if (isPlayerFemale()) {
_local2 = "ForceFemale";
} else {
_local2 = "ForceMale";
}
oPlayerVoice = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local2, 300, 1, true);
oPlayerVoice.setPan(returnCurrentPan());
oPlayerVoice.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doJump() {
if (canCreateSound() && (oPlayerVoice == undefined)) {
var _local2 = "Jump";
oPlayerVoice = Library.Sound.SoundManager.doPlaySoundInCat("SFX", _local2, 100, 1, true);
oPlayerVoice.setPan(returnCurrentPan());
oPlayerVoice.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doStopKnockOut() {
oKnockOut.doFadeTo(0);
delete oKnockOut;
}
function doDelete() {
delete oPlayerRef;
}
function isPlayerFemale() {
var _local2 = oPlayerRef.__get__PlayerSkin().getPart("Head");
return(Library.Utils.Tools.isItemInArray(FEMALE_SKIN_HEADS, _local2));
}
function returnCurrentPan() {
var _local6;
var _local5 = oPlayerRef.__get__Coordinates().x;
var _local3 = _local5 - SCREEN_REFS.center;
var _local4 = SCREEN_REFS.center - SCREEN_REFS.left;
_local4 = _local4 * Library.Utils.MoreMath.getPolarity(_local3);
var _local2 = Math.abs(_local3 / _local4) * 100;
_local2 = _local2 * PAN_ATTENUATOR;
if (_local2 > MAX_SOUND_PERCENT_PER_CHANNEL) {
_local2 = MAX_SOUND_PERCENT_PER_CHANNEL;
}
_local2 = _local2 * Library.Utils.MoreMath.getPolarity(_local3);
return(_local2);
}
function canCreateSound() {
return(nCurrentSoundsNum < MAX_ALLOWED_SOUNDS);
}
static var SCREEN_REFS = {left:60, center:300, right:540};
static var MAX_SOUND_PERCENT_PER_CHANNEL = 70;
static var PAN_ATTENUATOR = 0.7;
static var FEMALE_SKIN_HEADS = [2];
static var MAX_ALLOWED_SOUNDS = 2;
}
Symbol 19 MovieClip [__Packages.BaseHud] Frame 0
class BaseHud extends Library.State
{
var nRealEnergy, nSmoothEnergy, mcRef, setState, nHead, isStateComplete, __get__CurrentState;
function BaseHud (__mcRef) {
super(__mcRef);
nRealEnergy = ENERGY_MAX;
nSmoothEnergy = ENERGY_MAX;
mcRef.mcState.mcSpecial1._visible = false;
mcRef.mcState.mcSpecial2._visible = false;
mcRef.mcState.mcSpecial3._visible = false;
mcRef.mcState.mcSpecial4._visible = false;
mcRef.mcState.mcSpecialIndicator._visible = false;
_global.C.addBroadcastObj(this);
setState("In");
}
function doEnterFrame() {
doUpdateEnergyVisual();
super.doEnterFrame();
}
function doSetHead(__nHead) {
nHead = __nHead;
mcRef.mcState.mcHead.gotoAndStop(__nHead);
}
function doSetEnergy(__nEnergy) {
nRealEnergy = __nEnergy;
}
function doDelete() {
_global.C.removeBroadcastObj(this);
}
function doIn() {
if (isStateComplete()) {
setState("Idle");
}
}
function doIdle() {
}
function doLoadStateAction() {
if (!(__get__CurrentState() === "Idle")) {
} else {
doSetHead(nHead);
}
mcRef.mcState.mcSpecial1._visible = false;
mcRef.mcState.mcSpecial2._visible = false;
mcRef.mcState.mcSpecial3._visible = false;
mcRef.mcState.mcSpecial4._visible = false;
mcRef.mcState.mcSpecialIndicator._visible = false;
super.doLoadStateAction();
}
function doUpdateEnergyVisual() {
if (nSmoothEnergy < nRealEnergy) {
nSmoothEnergy = nSmoothEnergy + VISUAL_UPDATE_RATE;
if (nSmoothEnergy > nRealEnergy) {
nSmoothEnergy = nRealEnergy;
}
} else if (nSmoothEnergy > nRealEnergy) {
nSmoothEnergy = nSmoothEnergy - VISUAL_UPDATE_RATE;
if (nSmoothEnergy < nRealEnergy) {
nSmoothEnergy = nRealEnergy;
}
}
mcRef.mcState.mcEnergy.gotoAndStop(Math.floor((ENERGY_MAX - nSmoothEnergy) + 1));
}
static var ENERGY_MAX = 100;
static var VISUAL_UPDATE_RATE = 0.6;
}
Symbol 20 MovieClip [__Packages.StruggleProgress] Frame 0
class StruggleProgress extends Library.State
{
var nCurrentStatus, nCurrentStatusVisual, nContextPolarity, nOwnerFatigue, nGuestFatigue, setState, isStateComplete, mcRef;
function StruggleProgress (__mcRef, __nOwnerFatigue, __nGuestFatigue, __nContextPolarity) {
super(__mcRef);
nCurrentStatus = 0;
nCurrentStatusVisual = 0;
nContextPolarity = __nContextPolarity;
if (__nOwnerFatigue < FATIGUE_AFFECT_TRIGGER) {
nOwnerFatigue = 1 - ((FATIGUE_AFFECT_TRIGGER - __nOwnerFatigue) / FATIGUE_AFFECT_TRIGGER);
if (nOwnerFatigue < FATIGUE_MINIMUM) {
nOwnerFatigue = FATIGUE_MINIMUM;
}
} else {
nOwnerFatigue = 1;
}
if (__nGuestFatigue < FATIGUE_AFFECT_TRIGGER) {
nGuestFatigue = 1 - ((FATIGUE_AFFECT_TRIGGER - __nGuestFatigue) / FATIGUE_AFFECT_TRIGGER);
if (nGuestFatigue < FATIGUE_MINIMUM) {
nGuestFatigue = FATIGUE_MINIMUM;
}
} else {
nGuestFatigue = 1;
}
_global.C.addBroadcastObj(this);
setState("In");
}
function doIn() {
if (isStateComplete()) {
setState("Idle");
}
}
function doOut() {
if (isStateComplete()) {
doDelete();
}
}
function doIdle() {
doTendToZero();
doChangeVisual();
checkStatus();
if (isStateComplete()) {
_global.C.doStruggleTimeOut();
}
}
function doReceiveBash(__nOrigin) {
if (__nOrigin == STRUGGLE_OWNER) {
nCurrentStatus = nCurrentStatus - ((POINTS_PER_BASH * nOwnerFatigue) * nContextPolarity);
} else {
nCurrentStatus = nCurrentStatus + ((POINTS_PER_BASH * nGuestFatigue) * nContextPolarity);
}
}
function doRemove() {
setState("Out");
}
function doDelete() {
_global.C.removeBroadcastObj(this);
mcRef.removeMovieClip();
delete mcRef;
}
function pause() {
mcRef.mcState.stop();
mcRef.mcState.mcIndicator.stop();
mcRef.mcState.mcIndicator.mcStarRotate.stop();
}
function unPause() {
if (mcRef.mcState.mcIndicator._currentframe != mcRef.mcState.mcIndicator._totalframes) {
mcRef.mcState.mcIndicator.play();
}
mcRef.mcState.play();
mcRef.mcState.mcIndicator.mcStarRotate.play();
}
function doTendToZero() {
nCurrentStatus = Library.Utils.MoreMath.getReachZero(nCurrentStatus, BACK_TO_ZERO_RATE);
}
function doChangeVisual() {
if (nCurrentStatusVisual < nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatusVisual + VISUAL_UPDATE_RATE;
if (nCurrentStatusVisual > nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatus;
}
} else if (nCurrentStatusVisual > nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatusVisual - VISUAL_UPDATE_RATE;
if (nCurrentStatusVisual < nCurrentStatus) {
nCurrentStatusVisual = nCurrentStatus;
}
}
mcRef.mcState.mcIndicator._x = nCurrentStatusVisual;
}
function checkStatus() {
if (Math.abs(nCurrentStatusVisual) >= POINTS_TO_WIN) {
var _local3;
var _local4 = nCurrentStatusVisual * nContextPolarity;
if (Library.Utils.MoreMath.getPolarity(_local4) == -1) {
_local3 = STRUGGLE_OWNER;
} else {
_local3 = STRUGGLE_GUEST;
}
_global.C.doStruggleComplete(_local3);
}
}
static var STRUGGLE_OWNER = 1;
static var STRUGGLE_GUEST = 2;
static var STRUGGLE_METER_CENTER = {x:300, y:60};
static var POINTS_TO_WIN = 55;
static var POINTS_PER_BASH = 5;
static var VISUAL_UPDATE_RATE = 1.8;
static var BACK_TO_ZERO_RATE = 0.15;
static var FATIGUE_MINIMUM = 0.075;
static var FATIGUE_AFFECT_TRIGGER = 75;
}
Symbol 21 MovieClip [__Packages.KOProgress] Frame 0
class KOProgress extends Library.State
{
var bMustContinue, nCurNumber, setState, isStateComplete, mcRef;
function KOProgress (__mcRef) {
super(__mcRef);
_global.C.addBroadcastObj(this);
bMustContinue = true;
nCurNumber = 1;
setState("In1");
}
function doStopCountDown() {
bMustContinue = false;
}
function doIn1() {
doManageIn();
}
function doIn2() {
doManageIn();
}
function doIn3() {
doManageIn();
}
function doIdle1() {
doManageIdle();
}
function doIdle2() {
doManageIdle();
}
function doIdle3() {
doManageIdle();
}
function doOut1() {
doManageOut();
}
function doOut2() {
doManageOut();
}
function doOut3() {
doManageOut();
}
function doKOIn() {
if (isStateComplete()) {
setState("KOIdle");
}
}
function doKOIdle() {
if (isStateComplete()) {
setState("KOOut");
}
}
function doKOOut() {
if (isStateComplete()) {
doRemove();
}
}
function doManageIn() {
if (isStateComplete()) {
setState("Idle" + nCurNumber);
}
}
function doManageIdle() {
if (isStateComplete() || (!bMustContinue)) {
if (bMustContinue) {
nCurNumber++;
if (nCurNumber <= 3) {
setState("In" + nCurNumber);
} else {
_global.C.doKoWonByOwner();
setState("KOIn");
}
} else {
setState("Out" + nCurNumber);
}
}
}
function doManageOut() {
if (isStateComplete()) {
doRemove();
}
}
function doRemove() {
mcRef.removeMovieClip();
_global.C.removeBroadcastObj(this);
}
static var KO_PROGRESS_CENTER = {x:300, y:55};
}
Symbol 22 MovieClip [__Packages.StartProgress] Frame 0
class StartProgress extends Library.State
{
var nCurNumber, setState, isStateComplete, mcRef;
function StartProgress (__mcRef) {
super(__mcRef);
_global.C.addBroadcastObj(this);
nCurNumber = 3;
setState("In3");
Library.Sound.SoundManager.doPlaySound("CountDown", 100, 1);
}
function doIn1() {
doManageIn();
}
function doIn2() {
doManageIn();
}
function doIn3() {
doManageIn();
}
function doIdle1() {
doManageIdle();
}
function doIdle2() {
doManageIdle();
}
function doIdle3() {
doManageIdle();
}
function doFightIn() {
if (isStateComplete()) {
setState("FightIdle");
}
}
function doFightIdle() {
if (isStateComplete()) {
setState("FightOut");
}
}
function doFightOut() {
if (isStateComplete()) {
doRemove();
}
}
function doManageIn() {
if (isStateComplete()) {
setState("Idle" + nCurNumber);
}
}
function doManageIdle() {
if (isStateComplete()) {
nCurNumber--;
if (nCurNumber >= 1) {
setState("In" + nCurNumber);
Library.Sound.SoundManager.doPlaySound("CountDown", 100, 1);
} else {
_global.C.doStartCountDownComplete();
setState("FightIn");
Library.Sound.SoundManager.doPlaySound("CountDownEnd", 100, 1);
}
}
}
function doRemove() {
mcRef.removeMovieClip();
_global.C.removeBroadcastObj(this);
}
static var FIGHT_PROGRESS_CENTER = {x:300, y:120};
}
Symbol 23 MovieClip [__Packages.AmbianceGenerator] Frame 0
class AmbianceGenerator
{
var nNextReaction, nCurrentFeeling, nCurrentSoundsNum, aCreatedSounds, bGameEnded, oBaseCrowd, oCheeringCrowd, oBoringCrowd;
function AmbianceGenerator () {
nNextReaction = Library.Utils.MoreMath.getRandomRange(REACTION_INTERVAL.min, REACTION_INTERVAL.max);
nCurrentFeeling = 0;
nCurrentSoundsNum = 0;
aCreatedSounds = new Array();
doCreateBaseCrowd();
bGameEnded = false;
_global.C.addBroadcastObj(this);
}
function doEnterFrame() {
if (!bGameEnded) {
nCurrentFeeling = nCurrentFeeling - FEELING_INTERSET_LOOSE_RATE;
if (nCurrentFeeling < FEELING_BOUNDS.min) {
nCurrentFeeling = FEELING_BOUNDS.min;
}
nNextReaction--;
if (nNextReaction <= 0) {
nNextReaction = Library.Utils.MoreMath.getRandomRange(REACTION_INTERVAL.min, REACTION_INTERVAL.max);
doReact();
}
}
}
function doGameEnded() {
bGameEnded = true;
nCurrentFeeling = FEELING_BOUNDS.center;
}
function doRegainInterest() {
nCurrentFeeling = nCurrentFeeling + FEELING_INTERSET_REGAIN_RATE;
if (nCurrentFeeling > FEELING_BOUNDS.max) {
nCurrentFeeling = FEELING_BOUNDS.max;
}
}
function doBeginMatch() {
doEncourage();
}
function doSoundEvent(__nEvent, __oSound) {
if (!(__nEvent === Library.Sound.SoundManager.EVENT_SOUND_COMPLETE)) {
} else {
nCurrentSoundsNum--;
if (__oSound == oBaseCrowd) {
delete oBaseCrowd;
} else if (__oSound == oCheeringCrowd) {
delete oCheeringCrowd;
oBaseCrowd.doFadeTo(65);
} else if (__oSound == oBoringCrowd) {
delete oBoringCrowd;
oBaseCrowd.doFadeTo(65);
}
for (var _local3 in aCreatedSounds) {
if (aCreatedSounds[_local3] == __oSound) {
delete aCreatedSounds[_local3];
aCreatedSounds.splice(_local3, 1);
}
}
}
}
function doPositiveReaction() {
if (canCreateSound()) {
var _local3 = "Reaction" + Library.Utils.MoreMath.getRandomRange(1, 3);
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("Ambiance", _local3, 0, 1, true);
_local2.setFadeRate(3);
_local2.setFadeAtEnd(true);
_local2.doFadeTo(100);
_local2.doAddListener(this);
aCreatedSounds.push(_local2);
nCurrentSoundsNum++;
}
}
function doDelete() {
for (var _local2 in aCreatedSounds) {
aCreatedSounds[_local2].doFadeTo(0);
aCreatedSounds[_local2].doRemoveListener(this);
delete aCreatedSounds[_local2];
aCreatedSounds.splice(_local2, 1);
}
oBaseCrowd.doFadeTo(0);
delete oBaseCrowd;
oCheeringCrowd.doFadeTo(0);
delete oCheeringCrowd;
oBoringCrowd.doFadeTo(0);
delete oBoringCrowd;
}
function doReact() {
if (!bGameEnded) {
if (nCurrentFeeling < NEUTRAL_FEELING_BOUNDS.min) {
doCreateBoringCrowd();
} else if (nCurrentFeeling > NEUTRAL_FEELING_BOUNDS.max) {
doCreateCheeringCrowd();
} else {
switch (Library.Utils.MoreMath.getRandomRange(1, 2)) {
case 1 :
doCrowdManCry();
break;
case 2 :
doEncourage();
}
}
}
}
function doCrowdManCry() {
if (canCreateSound()) {
var _local3 = "OnePerson" + Library.Utils.MoreMath.getRandomRange(1, 5);
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("Ambiance", _local3, 0, 1, true);
_local2.setFadeAtEnd(true);
_local2.doFadeTo(100);
_local2.doAddListener(this);
aCreatedSounds.push(_local2);
nCurrentSoundsNum++;
}
}
function doEncourage() {
if (canCreateSound()) {
var _local3 = "Encouragement" + Library.Utils.MoreMath.getRandomRange(1, 2);
var _local4 = Library.Utils.MoreMath.getRandomRange(ENCOURAGEMENT_NUM.min, ENCOURAGEMENT_NUM.max);
var _local2 = Library.Sound.SoundManager.doPlaySoundInCat("Ambiance", _local3, 0, _local4, true);
_local2.setFadeRate(3);
_local2.setFadeAtEnd(true);
_local2.doFadeTo(100);
_local2.doAddListener(this);
aCreatedSounds.push(_local2);
nCurrentSoundsNum++;
}
}
function doCreateCheeringCrowd() {
if (canCreateSound()) {
oCheeringCrowd = Library.Sound.SoundManager.doPlaySoundInCat("Ambiance", "CrowdCheering", 0, 1, true);
oCheeringCrowd.doFadeTo(65);
oCheeringCrowd.setFadeAtEnd(true);
oBoringCrowd.doFadeTo(0);
oBaseCrowd.doFadeTo(20, false);
oCheeringCrowd.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doCreateBoringCrowd() {
if (canCreateSound()) {
oBoringCrowd = Library.Sound.SoundManager.doPlaySoundInCat("Ambiance", "CrowdBoring", 0, 1, true);
oBoringCrowd.doFadeTo(65);
oBoringCrowd.setFadeAtEnd(true);
oCheeringCrowd.doFadeTo(0);
oBaseCrowd.doFadeTo(20, false);
oBoringCrowd.doAddListener(this);
nCurrentSoundsNum++;
}
}
function doCreateBaseCrowd() {
if (canCreateSound()) {
oBaseCrowd = Library.Sound.SoundManager.doPlaySoundInCat("Ambiance", "CrowdNeutral", 0, 99999, true);
oBaseCrowd.doFadeTo(65);
oBaseCrowd.doAddListener(this);
nCurrentSoundsNum++;
}
}
function canCreateSound() {
return(nCurrentSoundsNum < MAX_ALLOWED_SOUNDS);
}
static var MAX_ALLOWED_SOUNDS = 3;
static var FEELING_INTERSET_REGAIN_RATE = 18;
static var FEELING_INTERSET_LOOSE_RATE = 0.12;
static var FEELING_BOUNDS = {min:-100, center:0, max:100};
static var NEUTRAL_FEELING_BOUNDS = {min:-50, max:50};
static var ENCOURAGEMENT_NUM = {min:1, max:3};
static var REACTION_INTERVAL = {min:150, max:340};
}
Symbol 24 MovieClip [__Packages.PopUpBox] Frame 0
class PopUpBox extends Library.State
{
var setState, nTextFrame, mcRef, doEnterFrame, isStateComplete;
function PopUpBox (__mcRef, __nForcedFrame) {
super(__mcRef);
_global.C.addBroadcastObj(this);
setState("In");
if (__nForcedFrame == undefined) {
nTextFrame = Library.Utils.MoreMath.getRandomRange(1, mcRef.mcState.mcText._totalframes);
} else {
nTextFrame = __nForcedFrame;
}
mcRef.mcState.mcText.gotoAndStop(nTextFrame);
}
function doUnpausableEnterFrame() {
doEnterFrame();
}
function doClose() {
setState("Out");
}
function doRemove() {
mcRef.gotoAndStop(1);
_global.C.removeBroadcastObj(this);
}
function doIn() {
if (isStateComplete()) {
setState("Idle");
mcRef.mcState.mcText.gotoAndStop(nTextFrame);
}
}
function doOut() {
if (isStateComplete()) {
doRemove();
}
}
function doIdle() {
}
}
Symbol 25 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 26 MovieClip [__Packages.SimpleAnim] Frame 0
class SimpleAnim extends Library.State
{
var setState, isStateComplete, mcRef;
function SimpleAnim (__mcRef) {
super(__mcRef);
_global.C.addBroadcastObj(this);
setState("In");
}
function doIn() {
if (isStateComplete()) {
setState("Idle");
}
}
function doIdle() {
if (isStateComplete()) {
setState("Out");
}
}
function doOut() {
if (isStateComplete()) {
doRemove();
}
}
function doRemove() {
mcRef.removeMovieClip();
_global.C.removeBroadcastObj(this);
}
}
Symbol 27 MovieClip [__Packages.GameCTRL] Frame 0
class GameCTRL extends Library.State
{
var bTwoPlayer, bEasterEgg, bShaking, nInitialSceneX, mcRef, nInitialSceneY, oAmbiance, oStartProgress, bPaused, aListeners, oMenuPop, bKeyEE, aIndexSwapDepth, oStruggleManager, nStruggleHost, nCurrentShakeAmplitude, oKoManager, nKOHost, oWinLoosePop, bInit, mcGameScreen;
function GameCTRL (__mcRef, __bTwoPlayer) {
super(__mcRef);
_global.C = this;
bTwoPlayer = __bTwoPlayer;
bEasterEgg = false;
bShaking = false;
nInitialSceneX = mcRef._x;
nInitialSceneY = mcRef._y;
mcRef.onEnterFrame = mx.utils.Delegate.create(this, doEnterFrame);
initGameVars();
mcRef.mcOverLay.swapDepths(returnDepth("OverLay"));
doCreateStartAnim();
oAmbiance = new AmbianceGenerator();
}
function doStartCountDownComplete() {
delete oStartProgress;
_global.P.oDummyP1.doStartGame();
_global.P.oDummyP2.doStartGame();
oAmbiance.doBeginMatch();
}
function doOpenMenu() {
bPaused = true;
for (var _local3 in aListeners) {
aListeners[_local3].pause();
aListeners[_local3].doPause();
}
oMenuPop = new PopUpBox(_global.P.Stage.mcMenuPop);
}
function doCloseMenu() {
bPaused = false;
for (var _local2 in aListeners) {
aListeners[_local2].unPause();
aListeners[_local2].doResume();
}
oMenuPop.doClose();
}
function checkKeys() {
if (Key.isDown(66)) {
if (!bKeyEE) {
doEasterEgg();
}
bKeyEE = true;
} else {
bKeyEE = false;
}
}
function addBroadcastObj(__obj) {
aListeners.push(__obj);
}
function removeBroadcastObj(__obj) {
for (var _local3 in aListeners) {
if (aListeners[_local3] == __obj) {
delete aListeners[_local3];
aListeners.splice(_local3, 1);
}
}
}
function returnDepth(__sType) {
for (var _local3 in aIndexSwapDepth) {
if (aIndexSwapDepth[_local3].sType == __sType) {
aIndexSwapDepth[_local3].nCurrentDepth++;
if (aIndexSwapDepth[_local3].nCurrentDepth > aIndexSwapDepth[_local3].nLimitDepth) {
aIndexSwapDepth[_local3].nCurrentDepth = aIndexSwapDepth[_local3].nBaseDepth;
}
return(aIndexSwapDepth[_local3].nCurrentDepth);
}
}
}
function doManageStruggle(__nHostPlayerNum) {
var _local5 = mcRef.attachMovie("mcStruggleProgress", "mcTimer", returnDepth("HUDVisual"));
_local5._x = StruggleProgress.STRUGGLE_METER_CENTER.x;
_local5._y = StruggleProgress.STRUGGLE_METER_CENTER.y;
var _local8 = _global.P.getPlayer(__nHostPlayerNum).Health;
var _local6;
if (__nHostPlayerNum == 1) {
_local6 = 2;
} else {
_local6 = 1;
}
var _local3 = 1;
if ((__nHostPlayerNum == 1) && (_global.P.getPlayer(1).Orientation == 1)) {
_local3 = -1;
} else if ((__nHostPlayerNum == 2) && (_global.P.getPlayer(2).Orientation == 1)) {
_local3 = -1;
}
var _local7 = _global.P.getPlayer(_local6).Health;
oStruggleManager = new StruggleProgress(_local5, _local8, _local7, _local3);
nStruggleHost = __nHostPlayerNum;
}
function doStruggleComplete(__nWinner) {
var _local3 = false;
if (__nWinner == StruggleProgress.STRUGGLE_OWNER) {
_local3 = true;
}
_global.P.getPlayer(nStruggleHost).doStruggleEnded(_local3);
oStruggleManager.doRemove();
delete oStruggleManager;
}
function doStruggleTimeOut() {
MainCTRL.__get__Instance().getPlayer(1).doStruggleTimeOut();
MainCTRL.__get__Instance().getPlayer(2).doStruggleTimeOut();
oStruggleManager.doRemove();
delete oStruggleManager;
}
function doTreatStruggleBash(__nPlayerNum) {
var _local2;
if (__nPlayerNum == nStruggleHost) {
_local2 = StruggleProgress.STRUGGLE_OWNER;
} else {
_local2 = StruggleProgress.STRUGGLE_GUEST;
}
oStruggleManager.doReceiveBash(_local2);
}
function doShakeScreen(__nAmplitude) {
bShaking = true;
nCurrentShakeAmplitude = __nAmplitude;
}
function doApplyHitBalloon(__oCoords, __nContext) {
var _local2;
switch (__nContext) {
case BALLOONS_GROUP_PUNCH :
_local2 = HIT_BALLOONS_PUNCH;
break;
case BALLOONS_GROUP_KICK :
_local2 = HIT_BALLOONS_KICK;
break;
case BALLOONS_GROUP_GROUNDHIT :
_local2 = HIT_BALLOONS_GROUNDHIT;
break;
case BALLOONS_GROUP_SUPERMOVE :
_local2 = HIT_BALLOONS_SUPERMOVE;
}
var _local6 = Library.Utils.MoreMath.getRandomRange(0, _local2.length - 1);
var _local4 = _local2[_local6];
var _local5 = returnDepth("Hits");
var _local3 = mcRef.attachMovie(_local4, _local4 + _local5, _local5);
_local3._xscale = 50;
_local3._yscale = 50;
_local3._x = __oCoords.x;
_local3._y = __oCoords.y;
new SimpleAnim(_local3);
}
function doStartKoCountDown(__nAnimOwner) {
var _local2 = mcRef.attachMovie("mcKoProgress", "mcKoProgress", returnDepth("HUDVisual"));
_local2._x = KOProgress.KO_PROGRESS_CENTER.x;
_local2._y = KOProgress.KO_PROGRESS_CENTER.y;
oKoManager = new KOProgress(_local2);
nKOHost = __nAnimOwner;
}
function doStopKoCountDown() {
oKoManager.doStopCountDown();
delete oKoManager;
}
function doKoWonByOwner() {
delete oKoManager;
oAmbiance.doPositiveReaction();
_global.P.getPlayer(nKOHost).doWonGame();
oAmbiance.doGameEnded();
}
function doWonRound(__nWinner) {
if (!bTwoPlayer) {
if (__nWinner == HUMAN_PLAYER_NUM) {
oWinLoosePop = new PopUpBox(_global.P.Stage.mcWinPop);
} else {
oWinLoosePop = new PopUpBox(_global.P.Stage.mcLoosePop);
}
} else {
oWinLoosePop = new PopUpBox(_global.P.Stage.mc2PPop, __nWinner);
}
}
function doDeleteAll() {
_global.P.getPlayer(1).doDelete();
_global.P.getPlayer(2).doDelete();
removeBroadcastObj(_global.P.getPlayer(1));
removeBroadcastObj(_global.P.getPlayer(2));
aListeners = new Array();
delete aListeners;
delete mcRef.onEnterFrame;
delete _global.C;
oAmbiance.doDelete();
delete oAmbiance;
}
function get Ambiance() {
return(oAmbiance);
}
function doEnterFrame() {
if (bInit == false) {
bInit = true;
initGameLevel();
} else {
_global.objSnd.Fade();
if (bPaused == false) {
checkKeys();
for (var _local3 in aListeners) {
aListeners[_local3].doEnterFrame();
}
doManageShake();
} else {
for (var _local3 in aListeners) {
aListeners[_local3].doUnpausableEnterFrame();
}
}
}
}
function doCreateStartAnim() {
var _local2 = mcRef.attachMovie("mcFightProgress", "mcFightProgress", returnDepth("HUDVisual"));
_local2._x = StartProgress.FIGHT_PROGRESS_CENTER.x;
_local2._y = StartProgress.FIGHT_PROGRESS_CENTER.y;
oStartProgress = new StartProgress(_local2);
}
function initGameVars() {
bPaused = false;
aListeners = new Array();
mcGameScreen = _global.P.mcRef.mcState;
bInit = false;
aIndexSwapDepth = new Array();
aIndexSwapDepth[0] = {sType:"Characters", nCurrentDepth:100000, nBaseDepth:100000, nLimitDepth:899999};
aIndexSwapDepth[1] = {sType:"HUDVisual", nCurrentDepth:800000, nBaseDepth:900000, nLimitDepth:899999};
aIndexSwapDepth[3] = {sType:"Hits", nCurrentDepth:900000, nBaseDepth:1000000, nLimitDepth:999999};
aIndexSwapDepth[4] = {sType:"Remove", nCurrentDepth:1000000, nBaseDepth:1000000, nLimitDepth:1040000};
aIndexSwapDepth[5] = {sType:"OverLay", nCurrentDepth:1040000, nBaseDepth:1000000, nLimitDepth:1042000};
}
function initGameLevel() {
addBroadcastObj(_global.P.oDummyP1);
addBroadcastObj(_global.P.oDummyP2);
}
function doManageShake() {
if (bShaking) {
mcRef._x = nInitialSceneX + Library.Utils.MoreMath.getRandomRange(-nCurrentShakeAmplitude, nCurrentShakeAmplitude);
mcRef._y = nInitialSceneY + Library.Utils.MoreMath.getRandomRange(-nCurrentShakeAmplitude, nCurrentShakeAmplitude);
nCurrentShakeAmplitude = nCurrentShakeAmplitude - SHAKE_AMPLITUDE_REDUCE_RATE;
if (nCurrentShakeAmplitude <= 0) {
bShaking = false;
mcRef._x = nInitialSceneX;
mcRef._y = nInitialSceneY;
}
}
}
function doEasterEgg() {
bEasterEgg = !bEasterEgg;
if (bEasterEgg) {
mcRef.mcOverLay.gotoAndStop(2);
mcRef.mcRing.gotoAndStop(2);
var _local5 = [0.288617, 0.362593, 0.04879, 0, -80.95, 0.183617, 0.467593, 0.04879, 0, -80.95, 0.183617, 0.362593, 0.15379, 0, -20.95, 0, 0, 0, 1, 0];
var _local3 = new flash.filters.ColorMatrixFilter(_local5);
var _local4 = _global.P.Scene.P1;
_local4.filters = [_local3];
_local4 = _global.P.Scene.P2;
_local4.filters = [_local3];
} else {
mcRef.mcOverLay.gotoAndStop(1);
mcRef.mcRing.gotoAndStop(1);
var _local4 = _global.P.Scene.P1;
_local4.filters = [];
_local4 = _global.P.Scene.P2;
_local4.filters = [];
}
}
static var HUMAN_PLAYER_NUM = 1;
static var BALLOONS_GROUP_PUNCH = 1;
static var BALLOONS_GROUP_KICK = 2;
static var BALLOONS_GROUP_GROUNDHIT = 3;
static var BALLOONS_GROUP_SUPERMOVE = 4;
static var HIT_BALLOONS_PUNCH = ["mcHitAnime4", "mcHitAnime5", "mcHitAnime7"];
static var HIT_BALLOONS_KICK = ["mcHitAnime3", "mcHitAnime6", "mcHitAnime8"];
static var HIT_BALLOONS_GROUNDHIT = ["mcHitAnime1", "mcHitAnime2", "mcHitAnime6", "mcHitAnime7"];
static var HIT_BALLOONS_SUPERMOVE = ["mcHitAnime1", "mcHitAnime3", "mcHitAnime6"];
static var SHAKE_AMPLITUDE_REDUCE_RATE = 0.85;
}
Symbol 28 MovieClip [__Packages.SkinSelector] Frame 0
class SkinSelector
{
var mcRef, oDummySkinChoose;
function SkinSelector (__mcRef, __bTwoPlayer, __nPlayerTurn) {
mcRef = __mcRef;
initMainVar(__bTwoPlayer, __nPlayerTurn);
}
function initMainVar(__bTwoPlayer, __nPlayerTurn) {
oDummySkinChoose = new SkinSelectCharacter(mcRef.PSkinChoose);
if (__bTwoPlayer) {
oDummySkinChoose.__get__PlayerSkin().doCreateRandomSkin();
} else {
oDummySkinChoose.setSkin(MainCTRL.__get__Instance().oPlayerSkin);
}
mcRef.mc2P._visible = __bTwoPlayer;
mcRef.mc2P.gotoAndStop(__nPlayerTurn);
}
function setPartType(__mcVisual, __sType, __nPartIncrement) {
var _local3 = oDummySkinChoose.__get__PlayerSkin().getPart(__sType);
oDummySkinChoose.setPartType(__sType, _local3 + __nPartIncrement);
doUpdateVisual(__mcVisual, __sType);
}
function doUpdateVisual(__mcVisual, __sType) {
__mcVisual.mcLogo.gotoAndStop(oDummySkinChoose.__get__PlayerSkin().getPart(__sType));
}
function get Dummy() {
return(oDummySkinChoose);
}
function doDelete() {
oDummySkinChoose.doDelete();
delete oDummySkinChoose;
}
}
Symbol 30 MovieClip [__Packages.EnnemyList] Frame 0
class EnnemyList
{
static var oCtrl;
var aRandomEnnemiesNames, aEnnemies, bLocalPlayerLoad, nGeneratedOpponent, aTop20, nTopCounter;
function EnnemyList () {
aRandomEnnemiesNames = new Array();
aEnnemies = new Array();
oCtrl = this;
bLocalPlayerLoad = false;
nGeneratedOpponent = 0;
HighScores.requestScores();
HighScores.onSuccess = mx.utils.Delegate.create(this, onListLoaded);
}
static function get Instance() {
return(oCtrl);
}
function onListLoaded() {
aEnnemies = new Array();
aTop20 = HighScores.getHighScores().slice(0, 20);
nTopCounter = 0;
PlayerData.onLoaded = mx.utils.Delegate.create(this, onPlayerLineLoaded);
onPlayerLineLoaded();
}
function onPlayerLineLoaded() {
if (nTopCounter < aTop20.length) {
PlayerData.loadData(aTop20[nTopCounter].sName, aTop20[nTopCounter].nScore);
nTopCounter++;
} else {
onListLoadEnded();
}
}
function doCheckListLength() {
while (aEnnemies.length < 20) {
if (aRandomEnnemiesNames.length <= 0) {
doGenerateEnnemyNames();
}
var _local2 = new EnnemyInfo();
_local2.nRank = aEnnemies.length + 1;
var _local6 = Library.Utils.MoreMath.getRandomRange(0, aRandomEnnemiesNames.length - 1);
_local2.sName = aRandomEnnemiesNames[_local6];
aRandomEnnemiesNames.splice(_local6, 1);
_local2.nScore = -1;
_local2.oSkin = new Skin();
_local2.oSkin.doCreateRandomSkin();
var _local3 = 1;
var _local4 = 1;
var _local5 = 1;
for (var _local7 in ENNEMIES_TOP_SCORE) {
if (ENNEMIES_TOP_SCORE[_local7].nNum == _local2.nRank) {
_local3 = ENNEMIES_TOP_SCORE[_local7].nAgressivity;
_local4 = ENNEMIES_TOP_SCORE[_local7].nDefensivity;
_local5 = ENNEMIES_TOP_SCORE[_local7].nSmartness;
}
}
_local2.nAgressivity = _local3;
_local2.nDefensivity = _local4;
_local2.nSmartness = _local5;
aEnnemies.push(_local2);
}
}
function onListLoadEnded() {
delete PlayerData.onLoaded;
bLocalPlayerLoad = true;
PlayerData.loadData(MainCTRL.__get__Instance().sPlayerName, 0);
MainCTRL.__get__Instance().onEnnemyListLoaded();
doCheckListLength();
}
function doParseXML(_oXMLSkin) {
if (PlayerData.sUserName == MainCTRL.__get__Instance().sPlayerName) {
var _local8 = convertXMLToSkin(_oXMLSkin);
MainCTRL.__get__Instance().onPlayerSkinLoaded(_local8);
}
if (!bLocalPlayerLoad) {
var _local7 = 0;
var _local8 = convertXMLToSkin(_oXMLSkin);
var _local2 = new EnnemyInfo();
_local2.nRank = nTopCounter;
_local2.sName = PlayerData.sUserName;
_local2.nScore = PlayerData.nScore;
_local2.oSkin = _local8;
var _local3 = 1;
var _local4 = 1;
var _local5 = 1;
for (var _local6 in ENNEMIES_TOP_SCORE) {
if (ENNEMIES_TOP_SCORE[_local6].nNum == _local2.nRank) {
_local3 = ENNEMIES_TOP_SCORE[_local6].nAgressivity;
_local4 = ENNEMIES_TOP_SCORE[_local6].nDefensivity;
_local5 = ENNEMIES_TOP_SCORE[_local6].nSmartness;
}
}
_local2.nAgressivity = _local3;
_local2.nDefensivity = _local4;
_local2.nSmartness = _local5;
aEnnemies.push(_local2);
if (_local2.nRank > _local7) {
_local7 = _local2.nRank;
}
}
}
function getNextOpponent() {
var _local4;
if (aEnnemies.length > 0) {
var _local2 = 0;
var _local3 = 0;
for (var _local5 in aEnnemies) {
if (aEnnemies[_local5].nRank > _local2) {
_local2 = aEnnemies[_local5].nRank;
_local3 = _local5;
}
}
_local4 = aEnnemies[_local3];
aEnnemies.splice(_local3, 5);
} else {
nGeneratedOpponent++;
_local4 = getRandomGeneratedEnnemy();
_local4.nAgressivity = ENNEMIES_AFTER_TOP_BASE.nAgressivity + (ENNEMIES_AFTER_TOP_INCREMENT.nAgressivity * nGeneratedOpponent);
_local4.nDefensivity = ENNEMIES_AFTER_TOP_BASE.nDefensivity + (ENNEMIES_AFTER_TOP_INCREMENT.nDefensivity * nGeneratedOpponent);
_local4.nSmartness = ENNEMIES_AFTER_TOP_BASE.nSmartness + (ENNEMIES_AFTER_TOP_INCREMENT.nSmartness * nGeneratedOpponent);
}
return(_local4);
}
function getRandomGeneratedEnnemy() {
if (aRandomEnnemiesNames.length <= 0) {
doGenerateEnnemyNames();
}
var _local2 = new EnnemyInfo();
_local2.nRank = -1;
var _local3 = Library.Utils.MoreMath.getRandomRange(0, aRandomEnnemiesNames.length - 1);
_local2.sName = aRandomEnnemiesNames[_local3];
aRandomEnnemiesNames.splice(_local3, 1);
_local2.nScore = -1;
_local2.oSkin = new Skin();
_local2.oSkin.doCreateRandomSkin();
return(_local2);
}
function doGenerateEnnemyNames() {
aRandomEnnemiesNames = new Array();
for (var _local3 in NAMES_FIRST) {
for (var _local2 in NAMES_LAST) {
aRandomEnnemiesNames.push((NAMES_FIRST[_local3] + " ") + NAMES_LAST[_local2]);
}
}
}
function convertXMLToSkin(_oXMLSkin) {
_oXMLSkin.ignoreWhite = true;
var _local2 = _oXMLSkin.firstChild.childNodes[1];
var _local6 = _local2.attributes.torso;
var _local5 = _local2.attributes.head;
var _local4 = _local2.attributes.leg;
var _local3 = _local2.attributes.arm;
var _local1 = new Skin();
if ((((_local6 == undefined) || (_local5 == undefined)) || (_local4 == undefined)) || (_local3 == undefined)) {
_local1.doCreateRandomSkin();
} else {
_local1.setPart("Head", Number(_local5));
_local1.setPart("Torso", Number(_local6));
_local1.setPart("Arm", Number(_local3));
_local1.setPart("Leg", Number(_local4));
}
return(_local1);
}
function convertSkinToXml(__oSkin) {
var _local1 = "<skin head='" + String(__oSkin.getPart("Head"));
_local1 = _local1 + ("' torso='" + String(__oSkin.getPart("Torso")));
_local1 = _local1 + ("' arm='" + String(__oSkin.getPart("Arm")));
_local1 = _local1 + ("' leg='" + String(__oSkin.getPart("Leg")));
_local1 = _local1 + "' >";
return(_local1);
}
static var ENNEMY_LIST_URL = "./WackTop20.xml";
static var XML_ENTRIES_EXPECTED = 20;
static var NAMES_FIRST = ["The Ultimate", "Sugar Ray", "The Iron", "Hitman", "The Marvelous", "Bad Bones", "Banana", "The Giant", "The Mysterious", "The Beautiful"];
static var NAMES_LAST = ["X-terminator", "Crusher", "Valentine", "Beaver", "Ring Master", "Arms of Steel", "Snake Master", "Career Breaker", "Masked man", "USA Wonder", "Half man"];
static var ENNEMIES_AFTER_TOP_BASE = {nAgressivity:90, nDefensivity:95, nSmartness:85};
static var ENNEMIES_AFTER_TOP_INCREMENT = {nAgressivity:3, nDefensivity:4, nSmartness:5};
static var ENNEMIES_TOP_SCORE = [{nNum:1, nAgressivity:85, nDefensivity:90, nSmartness:75}, {nNum:2, nAgressivity:80, nDefensivity:85, nSmartness:70}, {nNum:3, nAgressivity:75, nDefensivity:80, nSmartness:65}, {nNum:4, nAgressivity:70, nDefensivity:75, nSmartness:60}, {nNum:5, nAgressivity:65, nDefensivity:70, nSmartness:55}, {nNum:6, nAgressivity:60, nDefensivity:65, nSmartness:50}, {nNum:7, nAgressivity:55, nDefensivity:60, nSmartness:45}, {nNum:8, nAgressivity:50, nDefensivity:55, nSmartness:40}, {nNum:9, nAgressivity:45, nDefensivity:50, nSmartness:35}, {nNum:10, nAgressivity:40, nDefensivity:45, nSmartness:30}, {nNum:11, nAgressivity:35, nDefensivity:40, nSmartness:25}, {nNum:12, nAgressivity:30, nDefensivity:35, nSmartness:20}, {nNum:13, nAgressivity:25, nDefensivity:30, nSmartness:15}, {nNum:14, nAgressivity:20, nDefensivity:25, nSmartness:12}, {nNum:15, nAgressivity:15, nDefensivity:20, nSmartness:10}, {nNum:16, nAgressivity:10, nDefensivity:15, nSmartness:8}, {nNum:17, nAgressivity:5, nDefensivity:10, nSmartness:6}, {nNum:18, nAgressivity:8, nDefensivity:8, nSmartness:4}, {nNum:19, nAgressivity:5, nDefensivity:5, nSmartness:2}, {nNum:20, nAgressivity:2, nDefensivity:2, nSmartness:2}];
}
Symbol 31 MovieClip [__Packages.PlayerData] Frame 0
class PlayerData
{
static var oXMLData, sCurrentServer, sUserName, nScore, onLoaded;
function PlayerData () {
}
static function init() {
oXMLData = new XML();
oXMLData.ignoreWhite = true;
sCurrentServer = HighScores.oProxyObj.getCurrServer();
}
static function loadData(_sUserName, _nScore) {
sUserName = _sUserName;
nScore = _nScore;
var _local1 = new XML();
_local1.onData = function (_sData) {
PlayerData.onRequest(_sData);
};
_local1.ignoreWhite = true;
_local1.load((("http://www.nick.com/common/profile/freetext/xml/getOther.jhtml?attName=" + sNICK_ATTRIBUTE_NAME) + "&username=") + _sUserName);
}
static function saveData(_sSkin) {
oXMLData = new XML(_sSkin);
oXMLData.onLoad = function (success) {
PlayerData.onSaved();
};
oXMLData.ignoreWhite = true;
oXMLData.sendAndLoad("http://www.nick.com/common/profile/freetext/xml/set.jhtml?_rawPost=true&attName=" + sNICK_ATTRIBUTE_NAME, oXMLData);
}
static function onRequest(_sData) {
if (oXMLData.firstChild.attributes.message != "empty") {
var _local1 = new XML(_sData);
EnnemyList.__get__Instance().doParseXML(_local1);
onLoaded(false);
} else {
onLoaded(true);
}
}
static var sNICK_ATTRIBUTE_NAME = "wack_wrestling";
}
Symbol 32 MovieClip [__Packages.EnnemyInfo] Frame 0
class EnnemyInfo
{
function EnnemyInfo () {
}
}
Symbol 33 MovieClip [__Packages.HumanPlayerHud] Frame 0
class HumanPlayerHud extends BaseHud
{
var bShowScore, nCurrentShownScore, mcRef, __get__CurrentState;
function HumanPlayerHud (__mcRef, __bShowScore) {
super(__mcRef);
bShowScore = __bShowScore;
nCurrentShownScore = 0;
doInitVisual();
}
function doEnterFrame() {
if (!bShowScore) {
mcRef.mcState.mcScore._visible = false;
} else {
doShowScore();
}
super.doEnterFrame();
}
function doSetOnMarker(__nMarker) {
mcRef.mcState["mcSpecial" + __nMarker].gotoAndStop(2);
}
function doClearAllMarkers() {
mcRef.mcState.mcSpecial1.gotoAndStop(1);
mcRef.mcState.mcSpecial2.gotoAndStop(1);
mcRef.mcState.mcSpecial3.gotoAndStop(1);
mcRef.mcState.mcSpecial4.gotoAndStop(1);
}
function doSetSpecialMarker(__bSpecialAvailable) {
var _local2 = 1;
if (__bSpecialAvailable) {
_local2 = 2;
}
mcRef.mcState.mcSpecialIndicator.gotoAndStop(_local2);
}
function pause() {
mcRef.mcState.mcSpecial1.mcEclair.mcAnim.stop();
mcRef.mcState.mcSpecial2.mcEclair.mcAnim.stop();
mcRef.mcState.mcSpecial3.mcEclair.mcAnim.stop();
mcRef.mcState.mcSpecial4.mcEclair.mcAnim.stop();
mcRef.mcState.mcSpecialIndicator.mcAnim.stop();
}
function unPause() {
mcRef.mcState.mcSpecial1.mcEclair.mcAnim.play();
mcRef.mcState.mcSpecial2.mcEclair.mcAnim.play();
mcRef.mcState.mcSpecial3.mcEclair.mcAnim.play();
mcRef.mcState.mcSpecial4.mcEclair.mcAnim.play();
mcRef.mcState.mcSpecialIndicator.mcAnim.play();
}
function doShowScore() {
nCurrentShownScore = Library.Utils.MoreMath.getReachNum(nCurrentShownScore, MainCTRL.__get__Instance().__get__Score(), SCORE_SPEED);
if (nCurrentShownScore <= (MainCTRL.__get__Instance().__get__Score() - 250)) {
nCurrentShownScore = nCurrentShownScore + 50;
}
mcRef.mcState.mcScore.txtScore.text = Library.Utils.Tools.getFormatedNumber(nCurrentShownScore, 7);
}
function doLoadStateAction() {
if (!(__get__CurrentState() === "Idle")) {
} else {
doInitVisual();
}
super.doLoadStateAction();
if (!bShowScore) {
mcRef.mcState.mcScore._visible = false;
}
mcRef.mcState.mcSpecial1._visible = true;
mcRef.mcState.mcSpecial2._visible = true;
mcRef.mcState.mcSpecial3._visible = true;
mcRef.mcState.mcSpecial4._visible = true;
mcRef.mcState.mcSpecialIndicator._visible = true;
}
function doInitVisual() {
mcRef.mcState.mcSpecial1._visible = true;
mcRef.mcState.mcSpecial2._visible = true;
mcRef.mcState.mcSpecial3._visible = true;
mcRef.mcState.mcSpecial4._visible = true;
mcRef.mcState.mcSpecialIndicator._visible = false;
mcRef.mcState.mcSpecial1.gotoAndStop(1);
mcRef.mcState.mcSpecial2.gotoAndStop(1);
mcRef.mcState.mcSpecial3.gotoAndStop(1);
mcRef.mcState.mcSpecial4.gotoAndStop(1);
mcRef.mcState.mcSpecialIndicator.gotoAndStop(1);
}
static var SCORE_SPEED = 3;
}
Symbol 34 MovieClip [__Packages.Library.Utils.KeysManager] Frame 0
class Library.Utils.KeysManager
{
var aKeys, oEnterFrameListener;
function KeysManager () {
aKeys = new Array();
mx.transitions.OnEnterFrameBeacon.init();
oEnterFrameListener = new Object();
oEnterFrameListener.onEnterFrame = Library.Utils.Delegate.create(this, doEnterFrame);
MovieClip.addListener(oEnterFrameListener);
}
function setListenerForKey(__oListener, __nKeyCode) {
var _local2 = false;
for (var _local6 in aKeys) {
if (aKeys[_local6].nCode == __nKeyCode) {
aKeys[_local6].aListeners.push(__oListener);
_local2 = true;
}
}
if (!_local2) {
var _local3 = new Object();
_local3.bPressed = false;
_local3.nCode = __nKeyCode;
_local3.aListeners = new Array();
_local3.aListeners.push(__oListener);
aKeys.push(_local3);
}
}
function doEnterFrame() {
for (var _local5 in aKeys) {
var _local3 = Key.isDown(aKeys[_local5].nCode);
if (aKeys[_local5].bPressed != _local3) {
aKeys[_local5].bPressed = _local3;
for (var _local4 in aKeys[_local5].aListeners) {
var _local2;
if (_local3) {
_local2 = EVENT_KEY_DOWN;
} else {
_local2 = EVENT_KEY_UP;
}
aKeys[_local5].aListeners[_local4].onKeyManagerEvent(_local2, aKeys[_local5].nCode);
}
}
}
}
function isKeyDown(__nKeyCode) {
return(Key.isDown(__nKeyCode));
}
function doDestroy() {
for (var _local3 in aKeys) {
for (var _local2 in aKeys[_local3].aListeners) {
delete aKeys[_local3].aListeners[_local2];
}
aKeys[_local3].aListeners = new Array();
delete aKeys[_local3].aListeners;
}
aKeys = new Array();
delete aKeys;
MovieClip.removeListener(this);
}
static var EVENT_KEY_DOWN = 1;
static var EVENT_KEY_UP = 2;
}
Symbol 35 MovieClip [__Packages.HumanPlayer] Frame 0
class HumanPlayer extends Player
{
var oKeys, nLeftCode, nRightCode, nUpCode, nDownCode, nAction1Code, nAction2Code, nAction3Code, bGameStarted, __get__CurrentState, doGrabOrientLeft, doDisplaceLeft, doGrabOrientRight, doDisplaceRight, bWantToMoveHorz, doDisplaceUp, doDisplaceDown, bWantToMoveVert, bAction1Toggle, bAction2Toggle, bAction3Toggle, sState, doAttack1, doStruggleKeyBash, doGrabAction1, doGroundKeyBash, sHiddenReason, doAttack2, doGrabAction2, doPinOpponent, doSuperMove, oHud, nSpecialMarkers, bSpecialMoveAvailable;
function HumanPlayer (__mcRef, __nPlayerNum) {
super(__mcRef, __nPlayerNum);
}
function doInitKeyListener() {
oKeys = new Library.Utils.KeysManager();
oKeys.setListenerForKey(this, nLeftCode);
oKeys.setListenerForKey(this, nRightCode);
oKeys.setListenerForKey(this, nUpCode);
oKeys.setListenerForKey(this, nDownCode);
oKeys.setListenerForKey(this, nAction1Code);
oKeys.setListenerForKey(this, nAction2Code);
oKeys.setListenerForKey(this, nAction3Code);
}
function doEnterFrame() {
if (bGameStarted) {
var _local4 = false;
if (oKeys.isKeyDown(nLeftCode)) {
if (__get__CurrentState() == "GrabLoop") {
doGrabOrientLeft();
} else {
doDisplaceLeft();
_local4 = true;
}
}
if (oKeys.isKeyDown(nRightCode)) {
if (__get__CurrentState() == "GrabLoop") {
doGrabOrientRight();
} else {
doDisplaceRight();
_local4 = true;
}
}
bWantToMoveHorz = _local4;
var _local3 = false;
if (oKeys.isKeyDown(nUpCode)) {
doDisplaceUp();
_local3 = true;
}
if (oKeys.isKeyDown(nDownCode)) {
doDisplaceDown();
_local3 = true;
}
bWantToMoveVert = _local3;
if (oKeys.isKeyDown(nAction1Code)) {
if (!bAction1Toggle) {
bAction1Toggle = true;
doAction1();
}
} else {
bAction1Toggle = false;
}
if (oKeys.isKeyDown(nAction2Code)) {
if (!bAction2Toggle) {
bAction2Toggle = true;
doAction2();
}
} else {
bAction2Toggle = false;
}
if (oKeys.isKeyDown(nAction3Code)) {
if (!bAction3Toggle) {
bAction3Toggle = true;
doAction3();
}
} else {
bAction3Toggle = false;
}
}
super.doEnterFrame();
}
function doAction1() {
switch (sState) {
case "Idle" :
case "Walk" :
doAttack1();
break;
case "StruggleLoop" :
doStruggleKeyBash();
break;
case "GrabLoop" :
doGrabAction1();
break;
case "Ground" :
doGroundKeyBash();
break;
case "Hidden" :
if (sHiddenReason == "StruggleLoop") {
doStruggleKeyBash();
}
if (sHiddenReason != "PinHitLoop") {
break;
}
doGroundKeyBash();
}
}
function doAction2() {
switch (sState) {
case "Idle" :
case "Walk" :
doAttack2();
break;
case "StruggleLoop" :
doStruggleKeyBash();
break;
case "GrabLoop" :
doGrabAction2();
break;
case "Ground" :
doGroundKeyBash();
break;
case "Hidden" :
if (sHiddenReason == "StruggleLoop") {
doStruggleKeyBash();
}
if (sHiddenReason != "PinHitLoop") {
break;
}
doGroundKeyBash();
}
}
function doAction3() {
switch (sState) {
case "Idle" :
case "Walk" :
doPinOpponent();
break;
case "GrabLoop" :
doSuperMove();
}
}
function doAddSpecialMarker() {
super.doAddSpecialMarker();
doUpdateSpecialMoveHumanVisual();
}
function doUnlockSpecialMove() {
super.doUnlockSpecialMove();
doUpdateSpecialMoveHumanVisual();
}
function doPlayerUsedSpecialMove() {
super.doPlayerUsedSpecialMove();
doUpdateSpecialMoveHumanVisual();
}
function doUpdateSpecialMoveHumanVisual() {
oHud.doClearAllMarkers();
var _local2 = 1;
while (_local2 <= nSpecialMarkers) {
oHud.doSetOnMarker(_local2);
_local2++;
}
oHud.doSetSpecialMarker(bSpecialMoveAvailable);
}
}
Symbol 36 MovieClip [__Packages.Human1] Frame 0
class Human1 extends HumanPlayer
{
var bAffectScore, nLeftCode, nRightCode, nUpCode, nDownCode, nAction1Code, nAction2Code, nAction3Code, doInitKeyListener;
function Human1 (__mcRef, __nPlayerNum, __bAffectScore) {
super(__mcRef, __nPlayerNum);
bAffectScore = __bAffectScore;
nLeftCode = 37;
nRightCode = 39;
nUpCode = 38;
nDownCode = 40;
nAction1Code = String("I").charCodeAt(0);
nAction2Code = String("O").charCodeAt(0);
nAction3Code = String("P").charCodeAt(0);
doInitKeyListener();
}
}
Symbol 37 MovieClip [__Packages.Human2] Frame 0
class Human2 extends HumanPlayer
{
var nLeftCode, nRightCode, nUpCode, nDownCode, nAction1Code, nAction2Code, nAction3Code, doInitKeyListener;
function Human2 (__mcRef, __nPlayerNum) {
super(__mcRef, __nPlayerNum);
nLeftCode = String("A").charCodeAt(0);
nRightCode = String("D").charCodeAt(0);
nUpCode = String("W").charCodeAt(0);
nDownCode = String("S").charCodeAt(0);
nAction1Code = String("1").charCodeAt(0);
nAction2Code = String("2").charCodeAt(0);
nAction3Code = String("3").charCodeAt(0);
doInitKeyListener();
}
}
Symbol 38 MovieClip [__Packages.AIPersonality] Frame 0
class AIPersonality
{
var nAggresivity, nDefensivity, nSmartness, aActiveBoosts;
function AIPersonality () {
nAggresivity = 0;
nDefensivity = 0;
nSmartness = 0;
aActiveBoosts = new Array();
}
function doEnterFrame() {
doCheckExpiredBoosts();
}
function doBoostAgressivity() {
doCreateNewBoost(BOOST_AGRESSIVITY_BASE, 0, 0);
}
function doBoostDefense() {
doCreateNewBoost(0, BOOST_DEFENSE_BASE, 0);
}
function doBoostSmartness() {
doCreateNewBoost(0, 0, BOOST_SMARTNESS_BASE);
}
function setSmartness(__nValue) {
nSmartness = __nValue;
}
function get Smartness() {
return(nSmartness);
}
function setAgressivity(__nValue) {
nAggresivity = __nValue;
}
function get Agressivity() {
return(nAggresivity);
}
function setDefensivity(__nValue) {
nDefensivity = __nValue;
}
function get Defensivity() {
return(nDefensivity);
}
function get BashGetUpInterval() {
var _local2 = returnComputedValue(GET_UP_BASH_INTERVAL, nDefensivity);
return(_local2);
}
function get BashWinStruggleInterval() {
var _local2 = returnComputedValue(STRUGGLE_BASH_INTERVAL, nAggresivity);
return(_local2);
}
function get ReactTime() {
var _local2 = returnComputedValue(REACT_TIME, nSmartness);
return(_local2);
}
function get ChasingCalculationTime() {
var _local2 = returnComputedValue(CHASE_REACT_TIME, nSmartness);
return(_local2);
}
function get DoDumbAction() {
var _local2 = returnComputedValue(DO_DUMB_ACTION, nSmartness);
return(isRandomLessThan(_local2));
}
function get SkipReact() {
var _local2 = returnComputedValue(SKIP_REACTION, nSmartness);
return(isRandomLessThan(_local2));
}
function get ChasePlayer() {
var _local2 = returnComputedValue(CHASE_PLAYER, nAggresivity);
return(isRandomLessThan(_local2));
}
function get PunchOpponent() {
var _local2 = returnComputedValue(PUNCH_PLAYER, nAggresivity);
return(isRandomLessThan(_local2));
}
function get KickOpponent() {
var _local2 = returnComputedValue(KICK_PLAYER, nAggresivity);
return(isRandomLessThan(_local2));
}
function get StartStruggle() {
var _local2 = returnComputedValue(START_STRUGGLE, nAggresivity);
return(isRandomLessThan(_local2));
}
function get GroundGrab() {
var _local2 = returnComputedValue(GROUND_GRAB, nSmartness);
return(isRandomLessThan(_local2));
}
function get GroundKick() {
var _local2 = returnComputedValue(GROUND_KICK_USE, nDefensivity);
return(isRandomLessThan(_local2));
}
function get JumpDive() {
var _local2 = returnComputedValue(JUMP_DIVE_USE, nDefensivity);
return(isRandomLessThan(_local2));
}
function get EfficientPinHit() {
var _local2 = returnComputedValue(EFFICIENT_PINHIT, nSmartness);
return(isRandomLessThan(_local2));
}
function get UselessPinHit() {
var _local2 = returnComputedValue(USELESS_PINHIT, nSmartness);
return(isRandomLessThan(_local2));
}
function get UseSuperMove() {
var _local2 = returnComputedValue(USE_SUPERMOVE, nSmartness);
return(isRandomLessThan(_local2));
}
function isRandomLessThan(__nNum) {
var _local2 = Library.Utils.MoreMath.getRandomRange(1, 100);
var _local1 = false;
if (_local2 <= __nNum) {
_local1 = true;
}
return(_local1);
}
function returnComputedValue(oTrait, nXVal) {
var _local2 = (oTrait.nProgress * (nXVal - oTrait.nProgressDelay)) + oTrait.nBase;
if (_local2 > oTrait.nMax) {
_local2 = oTrait.nMax;
} else if (_local2 < oTrait.nMin) {
_local2 = oTrait.nMin;
}
return(_local2);
}
function doCheckExpiredBoosts() {
for (var _local2 in aActiveBoosts) {
aActiveBoosts[_local2].nTimeLeft--;
if (aActiveBoosts[_local2].nTimeLeft <= 0) {
doApplyBoost(aActiveBoosts[_local2], BOOST_SUBSTRACT);
delete aActiveBoosts[_local2];
aActiveBoosts.splice(_local2, 1);
}
}
}
function doApplyBoost(_oBoost, _nOperation) {
var _local2;
switch (_nOperation) {
case BOOST_ADD :
_local2 = 1;
break;
case BOOST_SUBSTRACT :
_local2 = -1;
}
nAggresivity = nAggresivity + (_oBoost.nAggresivity * _local2);
nDefensivity = nDefensivity + (_oBoost.nDefensivity * _local2);
nSmartness = nSmartness + (_oBoost.nSmartness * _local2);
}
function doCreateNewBoost(_nAgressivity, _nDefense, _nSmartness) {
var _local2 = new Object();
_local2.nAggresivity = _nAgressivity;
_local2.nDefensivity = _nDefense;
_local2.nSmartness = _nSmartness;
_local2.nTimeLeft = BOOST_TIME_AFFECT;
doApplyBoost(_local2, BOOST_ADD);
aActiveBoosts.push(_local2);
}
static var BOOST_ADD = 1;
static var BOOST_SUBSTRACT = 2;
static var BOOST_AGRESSIVITY_BASE = 5;
static var BOOST_DEFENSE_BASE = 3;
static var BOOST_SMARTNESS_BASE = 3;
static var BOOST_TIME_AFFECT = 150;
static var CHASE_PLAYER = {nBase:30, nMin:30, nMax:95, nProgress:1.6, nProgressDelay:25};
static var CHASE_REACT_TIME = {nBase:28, nMin:3, nMax:28, nProgress:-0.24, nProgressDelay:0};
static var KICK_PLAYER = {nBase:40, nMin:40, nMax:100, nProgress:0.8, nProgressDelay:15};
static var PUNCH_PLAYER = {nBase:70, nMin:70, nMax:100, nProgress:0.4, nProgressDelay:0};
static var START_STRUGGLE = {nBase:10, nMin:10, nMax:100, nProgress:1, nProgressDelay:25};
static var REACT_TIME = {nBase:90, nMin:1, nMax:90, nProgress:-0.95, nProgressDelay:5};
static var SKIP_REACTION = {nBase:50, nMin:5, nMax:50, nProgress:-0.6, nProgressDelay:10};
static var DO_DUMB_ACTION = {nBase:35, nMin:0, nMax:35, nProgress:-0.5, nProgressDelay:10};
static var GET_UP_BASH_INTERVAL = {nBase:23, nMin:4, nMax:23, nProgress:-0.22, nProgressDelay:5};
static var STRUGGLE_BASH_INTERVAL = {nBase:22, nMin:0.5, nMax:30, nProgress:-0.3, nProgressDelay:15};
static var GROUND_GRAB = {nBase:30, nMin:30, nMax:100, nProgress:1.1, nProgressDelay:20};
static var JUMP_DIVE_USE = {nBase:45, nMin:45, nMax:80, nProgress:0.5, nProgressDelay:15};
static var GROUND_KICK_USE = {nBase:20, nMin:20, nMax:100, nProgress:0.9, nProgressDelay:30};
static var EFFICIENT_PINHIT = {nBase:20, nMin:20, nMax:100, nProgress:1.1, nProgressDelay:20};
static var USELESS_PINHIT = {nBase:80, nMin:0, nMax:80, nProgress:-1.3, nProgressDelay:30};
static var USE_SUPERMOVE = {nBase:65, nMin:65, nMax:100, nProgress:0.5, nProgressDelay:25};
}
Symbol 39 MovieClip [__Packages.ComputerPlayer] Frame 0
class ComputerPlayer extends Player
{
var nBashTimer, nReactTimer, sMindState, oPersonality, bGameStarted, doGroundKeyBash, doStruggleKeyBash, nChasingCalculationTimer, nOpponentNum, __get__BodyCoordinates, fChasingXAxisFunc, doDisplaceLeft, doDisplaceRight, fChasingYAxisFunc, doDisplaceUp, doDisplaceDown, bWantToMoveHorz, bWantToMoveVert, __get__CurrentState, sHiddenReason, bSpecialMoveAvailable, doSuperMove, doGrabAction1, doGrabAction2, getDistanceFromOpponent, doAttack1, doAttack2, doPinOpponent, setState, nCurrentDamage;
function ComputerPlayer (__mcRef, __nPlayerNum) {
super(__mcRef, __nPlayerNum);
nBashTimer = 0;
nReactTimer = 0;
sMindState = "Idle";
oPersonality = new AIPersonality();
}
function setAgressivity(__nValue) {
oPersonality.setAgressivity(__nValue);
}
function setDefensivity(__nValue) {
oPersonality.setDefensivity(__nValue);
}
function setSmartness(__nValue) {
oPersonality.setSmartness(__nValue);
}
function doEnterFrame() {
if (bGameStarted) {
doCheckNextReaction();
oPersonality.doEnterFrame();
this["doMind" + sMindState]();
}
super.doEnterFrame();
}
function doMindBashToGetUp() {
nBashTimer--;
if (nBashTimer <= 0) {
nBashTimer = oPersonality.BashGetUpInterval;
var _local2 = 1;
while (_local2 <= Library.Utils.MoreMath.getRandomRange(BASH_PER_TIME_GET_UP.nMin, BASH_PER_TIME_GET_UP.nMax)) {
doGroundKeyBash();
_local2++;
}
}
}
function doMindBashToWinStruggle() {
nBashTimer--;
if (nBashTimer <= 0) {
nBashTimer = oPersonality.BashWinStruggleInterval;
var _local2 = 1;
while (_local2 <= Library.Utils.MoreMath.getRandomRange(BASH_PER_TIME_STRUGGLE.nMin, BASH_PER_TIME_GET_UP.nMax)) {
doStruggleKeyBash();
_local2++;
}
}
}
function doMindIdle() {
}
function doMindChasePlayer() {
nChasingCalculationTimer--;
if (nChasingCalculationTimer <= 0) {
nChasingCalculationTimer = oPersonality.ChasingCalculationTime;
var _local3 = _global.P.getPlayer(nOpponentNum).BodyCoordinates;
_local3.x = _local3.x + (OPPONENT_FRONT_BUFFER * _global.P.getPlayer(nOpponentNum).Orientation);
if (_local3.x < __get__BodyCoordinates().x) {
fChasingXAxisFunc = doDisplaceLeft;
} else {
fChasingXAxisFunc = doDisplaceRight;
}
if (_local3.y < __get__BodyCoordinates().y) {
fChasingYAxisFunc = doDisplaceUp;
} else {
fChasingYAxisFunc = doDisplaceDown;
}
if (Math.abs(_local3.x - __get__BodyCoordinates().x) > MOVE_BUFFER_DIST) {
bWantToMoveHorz = true;
} else {
bWantToMoveHorz = false;
delete fChasingXAxisFunc;
}
if (Math.abs(_local3.y - __get__BodyCoordinates().y) > MOVE_BUFFER_DIST) {
bWantToMoveVert = true;
} else {
bWantToMoveVert = false;
delete fChasingYAxisFunc;
}
}
fChasingXAxisFunc();
fChasingYAxisFunc();
}
function doLoadStateAction() {
super.doLoadStateAction();
switch (__get__CurrentState()) {
case "GrabLoop" :
case "Ground" :
doSelectActionFromContext();
break;
case "Hidden" :
switch (sHiddenReason) {
case "SuperMove" :
case "StruggleLoop" :
doSelectActionFromContext();
}
}
}
function doUnLoadStateAction() {
super.doUnLoadStateAction();
if (!(__get__CurrentState() === "")) {
}
}
function doCheckNextReaction() {
nReactTimer--;
if (nReactTimer <= 0) {
var _local2;
_local2 = doReact();
if (_local2 || (oPersonality.__get__SkipReact())) {
nReactTimer = oPersonality.ReactTime;
}
}
}
function doReact() {
var _local2;
if (oPersonality.__get__DoDumbAction() && (__get__CurrentState() == "Idle")) {
doDumbAction();
_local2 = true;
} else {
_local2 = doSelectActionFromContext();
}
return(_local2);
}
function doSelectActionFromContext() {
var _local3 = false;
var _local4 = false;
if (isNeedToBashToGetUp()) {
sMindState = "BashToGetUp";
nBashTimer = Library.Utils.MoreMath.getRandomRange(0, oPersonality.__get__BashGetUpInterval());
_local3 = true;
} else if (isNeedToBashToWinStruggle()) {
sMindState = "BashToWinStruggle";
nBashTimer = Library.Utils.MoreMath.getRandomRange(0, oPersonality.__get__BashWinStruggleInterval());
_local3 = true;
} else if (__get__CurrentState() == "GrabLoop") {
if (bSpecialMoveAvailable && (oPersonality.__get__UseSuperMove())) {
var _local8 = __get__CurrentState();
doSuperMove();
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else {
var _local8 = __get__CurrentState();
switch (Library.Utils.MoreMath.getRandomRange(1, 2)) {
case 1 :
doGrabAction1();
break;
case 2 :
doGrabAction2();
}
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
}
} else if (Library.Utils.Tools.isItemInArray(Player.STATES_IDLE, _global.P.getPlayer(nOpponentNum).CurrentState)) {
if ((Math.abs(getDistanceFromOpponent()) <= Player.STRUGGLE_DISTANCE) && (oPersonality.__get__StartStruggle())) {
var _local8 = __get__CurrentState();
doAttack1();
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else if (Math.abs(getDistanceFromOpponent()) <= TRY_PUNCH_KICK_DIST) {
if (Math.abs(__get__BodyCoordinates().y - _global.P.getPlayer(nOpponentNum).BodyCoordinates.y) <= PUNCH_KICK_MAX_Y) {
var _local7 = false;
if (Math.abs(__get__BodyCoordinates().x - _global.P.getPlayer(nOpponentNum).BodyCoordinates.x) <= KICK_MAX_X) {
if (oPersonality.__get__KickOpponent()) {
var _local8 = __get__CurrentState();
doAttack2();
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else {
_local7 = true;
}
} else if (Math.abs(__get__BodyCoordinates().x - _global.P.getPlayer(nOpponentNum).BodyCoordinates.x) <= PUNCH_MAX_X) {
_local7 = true;
}
if (_local7) {
if (oPersonality.__get__PunchOpponent()) {
var _local8 = __get__CurrentState();
doAttack1();
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
}
}
} else {
_local4 = true;
}
} else {
_local4 = true;
}
} else {
_local4 = true;
}
if (_local4) {
var _local6 = false;
if (Library.Utils.Tools.isItemInArray(Player.STATES_GROUND, _global.P.getPlayer(nOpponentNum).CurrentState) && (Library.Utils.Tools.isItemInArray(Player.STATES_IDLE, __get__CurrentState()))) {
var _local5 = false;
if (getDistanceFromOpponent() < Player.PIN_DISTANCE) {
if (_global.P.getPlayer(nOpponentNum).Health <= CRITICAL_PINHIT_TRIGGER) {
_local5 = true;
} else if (_global.P.getPlayer(nOpponentNum).Health <= EFFICIENT_PINHIT_TRIGGER) {
if (oPersonality.__get__EfficientPinHit()) {
_local5 = true;
}
} else if (oPersonality.__get__UselessPinHit()) {
_local5 = true;
}
}
if (_local5) {
var _local8 = __get__CurrentState();
doPinOpponent();
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else if (getDistanceFromOpponent() < Player.GROUND_GRAB_DISTANCE) {
var _local8 = __get__CurrentState();
if (oPersonality.__get__GroundGrab()) {
doAttack1();
}
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else if (getDistanceFromOpponent() < Player.GROUND_KICK_DISTANCE) {
var _local8 = __get__CurrentState();
if (oPersonality.__get__GroundKick()) {
doAttack2();
}
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else if (getDistanceFromOpponent() < Player.JUMP_DIVE_DISTANCE) {
var _local8 = __get__CurrentState();
if (oPersonality.__get__JumpDive()) {
doAttack1();
}
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else {
_local6 = true;
}
} else if (!_local3) {
_local6 = true;
}
if (_local6) {
if (oPersonality.__get__ChasePlayer()) {
if (sMindState != "ChasePlayer") {
var _local8 = __get__CurrentState();
sMindState = "ChasePlayer";
nChasingCalculationTimer = oPersonality.ChasingCalculationTime;
if (_local8 != __get__CurrentState()) {
_local3 = true;
}
} else {
_local3 = true;
}
}
}
}
return(_local3);
}
function doDumbAction() {
var _local2 = Library.Utils.MoreMath.getRandomRange(1, 3);
switch (_local2) {
case 1 :
doAttack1();
break;
case 2 :
doAttack2();
break;
case 3 :
setState("CallStart");
}
}
function isNeedToBashToGetUp() {
var _local2 = false;
if (Library.Utils.Tools.isItemInArray(NEED_TO_BASH_GET_UP_STATES, __get__CurrentState())) {
_local2 = true;
} else if ((__get__CurrentState() == "Hidden") && (sHiddenReason == "PinHitLoop")) {
_local2 = true;
}
return(_local2);
}
function isNeedToBashToWinStruggle() {
var _local2 = false;
if (__get__CurrentState() == "StruggleLoop") {
_local2 = true;
} else if ((__get__CurrentState() == "Hidden") && (sHiddenReason == "StruggleLoop")) {
_local2 = true;
}
return(_local2);
}
function doReceiveDamage(__nDamage) {
super.doReceiveDamage(__nDamage);
if (nCurrentDamage >= (Player.DAMAGE_TILL_KNOCKOUT / KO_RATIO_FOR_REACT)) {
oPersonality.doBoostAgressivity();
oPersonality.doBoostDefense();
oPersonality.doBoostSmartness();
}
}
static var NEED_TO_BASH_GET_UP_STATES = ["Ground", "HitGround"];
static var BASH_PER_TIME_GET_UP = {nMin:1, nMax:4};
static var BASH_PER_TIME_STRUGGLE = {nMin:2, nMax:3};
static var TRY_PUNCH_KICK_DIST = 150;
static var PUNCH_KICK_MAX_Y = 30;
static var PUNCH_MAX_X = 130;
static var KICK_MAX_X = 125;
static var OPPONENT_FRONT_BUFFER = 30;
static var MOVE_BUFFER_DIST = 15;
static var KO_RATIO_FOR_REACT = 3;
static var EFFICIENT_PINHIT_TRIGGER = 40;
static var CRITICAL_PINHIT_TRIGGER = 10;
}
Symbol 291 Button
on (release) {
_global.P.doTitleStart(1);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 294 Button
on (release) {
_global.P.doTitleInstructions();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 297 Button
on (release) {
_global.P.doTitleHighScores();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 300 Button
on (release) {
_global.P.doTitleStart(2);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 323 Button
on (release) {
nextFrame();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 326 Button
on (release) {
prevFrame();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 385 Button
on (release) {
_global.P.doInstructionsEnd();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 413 Button
on (release) {
_global.P.doInstructionsEnd(2);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 416 Button
on (release) {
_global.P.doInstructionsEnd(1);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 417 Button
on (release) {
_global.P.doInstructionsEnd();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 418 MovieClip Frame 1
_global.P.doInstructionsPlayResume(this);
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 2
btnMask.useHandCursor = false;
if (_global.P.InstrFromGame) {
btnBack1._visible = false;
} else {
btnResume._visible = false;
}
btnBlock.useHandCursor = false;
Symbol 419 MovieClip Frame 3
if (_global.P.InstrFromGame) {
btnBack._visible = false;
mcGroup._visible = false;
} else {
btnBack2._visible = false;
btnResume._visible = false;
}
Symbol 449 Button
on (release) {
_global.SkinC.setPartType(this, this.sType, 1);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 450 Button
on (release) {
_global.SkinC.setPartType(this, this.sType, -1);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 461 Button
on (release) {
_global.P.doSkinChooseComplete();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 464 MovieClip Frame 1
this._visible = false;
Symbol 466 MovieClip Frame 1
this._visible = false;
Symbol 479 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 492 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 505 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 520 MovieClip Frame 1
_global.P.setPart(this, "Leg");
Symbol 535 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 569 MovieClip Frame 1
_global.P.setPart(this, "Head");
Symbol 582 MovieClip Frame 1
_global.P.setPart(this, "Leg");
Symbol 595 MovieClip Frame 1
_global.P.setPart(this, "Leg");
Symbol 608 MovieClip Frame 1
_global.P.setPart(this, "Leg");
Symbol 621 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 634 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 647 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 661 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 668 MovieClip Frame 1
_global.P.setPart(this, "Leg");
Symbol 681 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 694 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 703 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 713 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 720 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 726 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 736 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 749 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 770 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 784 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 791 MovieClip Frame 1
_global.P.setPart(this, "Leg");
Symbol 805 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 813 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 816 MovieClip Frame 1
_global.P.setPart(this, "Arm");
Symbol 834 MovieClip Frame 1
_global.P.setPart(this, "Torso");
Symbol 850 MovieClip Frame 1
_global.P.setPart(this, "Head");
Instance of Symbol 451 MovieClip in Symbol 863 MovieClip Frame 1
onClipEvent (load) {
this.sType = "Head";
_global.SkinC.doUpdateVisual(this, this.sType);
}
Instance of Symbol 451 MovieClip in Symbol 863 MovieClip Frame 1
onClipEvent (load) {
this.sType = "Arm";
_global.SkinC.doUpdateVisual(this, this.sType);
}
Instance of Symbol 451 MovieClip in Symbol 863 MovieClip Frame 1
onClipEvent (load) {
this.sType = "Torso";
_global.SkinC.doUpdateVisual(this, this.sType);
}
Instance of Symbol 451 MovieClip in Symbol 863 MovieClip Frame 1
onClipEvent (load) {
this.sType = "Leg";
_global.SkinC.doUpdateVisual(this, this.sType);
}
Symbol 868 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 1
this._visible = false;
Symbol 872 MovieClip Frame 1
this._visible = false;
Symbol 877 MovieClip Frame 1
stop();
Symbol 925 Button
on (release) {
if (_global.C.bPaused == false) {
_global.P.doButtonSound();
_global.C.doOpenMenu();
}
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 937 Button
on (release) {
_global.P.doNextOpponent();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 940 Button
on (release) {
_global.P.doNewGameAsk();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 941 MovieClip Frame 1
btnNext._visible = MainCTRL.Instance.isNextOpponentAvailable();
Symbol 942 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 943 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 944 MovieClip Frame 1
stop();
Symbol 955 Button
on (release) {
_global.P.doNewGameAsk(false);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 958 Button
on (release) {
_global.P.doGameHighScores();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 959 MovieClip Frame 1
btnSubmit._visible = MainCTRL.Instance.isScoreSubmitAllowed();
Symbol 961 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 962 MovieClip Frame 1
stop();
Symbol 966 Button
on (release) {
_global.C.doCloseMenu();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 967 Button
on (release) {
_global.P.doGameInstructions();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 971 Button
on (release) {
_global.P.doToggleMusicMute(this);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 974 Button
on (release) {
_global.P.doToggleMusicMute(this);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 975 MovieClip Frame 1
_global.P.doUpdateMusicMuteVisual(this);
Symbol 978 Button
on (release) {
_global.P.doToggleSoundMute(this);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 980 Button
on (release) {
_global.P.doToggleSoundMute(this);
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 981 MovieClip Frame 1
_global.P.doUpdateSoundMuteVisual(this);
Symbol 985 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 986 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 987 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 988 MovieClip Frame 1
stop();
Symbol 994 Button
on (release) {
_global.P.doNewGame();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 997 Button
on (release) {
_global.P.doCloseQuitPopUp();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 998 MovieClip Frame 1
btnSubmit._visible = MainCTRL.Instance.isScoreSubmitAllowed();
Symbol 1000 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 1002 MovieClip Frame 1
stop();
Symbol 1010 Button
on (release) {
_global.P.doNewGame();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 1013 Button
on (release) {
_global.P.do2PRematch();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 1016 MovieClip Frame 1
BB.useHandCursor = false;
Symbol 1017 MovieClip Frame 1
stop();
Symbol 1025 Button
on (release) {
_global.P.doButtonSound();
_global.P.doStartNextRound();
}
on (rollOver) {
_global.P.doButtonSound();
}
Symbol 1042 Button
on (release) {
_global.P.doNewGame();
_global.P.doButtonSound();
}
on (rollOver) {
_global.P.doButtonSound();
}