Frame 1
Stage.showMenu = false;
_focusrect = false;
Instance of Symbol 7 MovieClip "HighScore" in Frame 1
onClipEvent (load) {
function fStyleNumber(_nNumber, _nMinimumChar) {
_sNumber = String(_nNumber);
_sNewString = "";
_nlength = _sNumber.length;
_nlength = _nlength / 3;
if (_nlength <= 1) {
_sNewNumber = _sNumber;
if (_sNewNumber.length < _nMinimumChar) {
_sNewNumber = "0" + _sNewNumber;
}
return(_sNewNumber);
}
_nLoop = _nlength;
while (_nLoop > 1) {
_sNewString = (" " + _sNumber.substr(-3)) + _sNewString;
_sNumber = _sNumber.substr(0, -3);
_nLoop--;
}
_sNewNumber = _sNumber + _sNewString;
if (_sNewNumber.length < _nMinimumChar) {
_sNewNumber = "0" + _sNewNumber;
}
return(_sNewNumber);
}
function getScores() {
if (gProxyObj == undefined) {
listScores();
} else {
gProxyObj.getScores(cbFunc2);
}
}
function submitScore(theScore) {
gProxyObj.submitScore(theScore, cbFunc);
}
function initHiScores() {
gProxyObj.setGame_Id("sb_game3");
}
function getScoreString() {
var _local5 = "Oops! The high score list isn't available right now!";
if (gProxyObj != undefined) {
var _local7 = gProxyObj.getScoreCount();
if (_local7 > 0) {
var _local1;
var _local6;
var _local3;
var _local4;
_local5 = "";
_local1 = 0;
while (_local1 < _local7) {
_local6 = gProxyObj.getScoreItem(_local1);
_local3 = _local6[0];
_local4 = fStyleNumber(_local6[1]);
spaceNb = (35 - _local3.length) - _local4.length;
spaceTXT = "";
var _local2 = 0;
while (_local2 < spaceNb) {
spaceTXT = spaceTXT + " ";
_local2++;
}
if (_local1 < 9) {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
} else if (_local1 < 99) {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
} else {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
}
_local1++;
}
} else {
_local5 = "Whoops, the high scores seem to have escaped!";
}
}
return(_local5);
}
function listScores() {
_parent.ScrSubmit.txt_highScore.text = getScoreString();
}
function cbFunc(thisBool) {
if (thisBool) {
listScores();
} else {
_parent.ScrSubmit.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!";
}
}
function cbFunc2(thisBool) {
if (thisBool) {
listScores();
} else {
_parent.ScrSubmit.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!";
}
}
_global.HS = this;
}
Frame 2
if (_global.M == undefined) {
_global.M = new objGameParam(this);
}
_global.M.fDoSectionActions("LoadingScreen");
stop();
Frame 3
_global.HS.initHiScores();
_global.M.fDoSectionActions("TitleScreen");
Instance of Symbol 479 MovieClip "mcContSound" in Frame 3
onClipEvent (load) {
function ajustSoundEnd() {
soundEnd = false;
}
_visible = false;
_global.objSnd = this;
Items = new Object();
G_TabSonFade = new Array();
Mute = false;
bMusicPackPlaying = false;
soundEnd = false;
Sfx_BellMax = 100;
Sfx_SwingMaceMax = 100;
Sfx_MaceUpMax = 100;
Sfx_StunnedMax = 100;
Sfx_LoopMace1P1Max = 100;
Sfx_LoopMace1P2Max = 100;
Sfx_LoopMace2P1Max = 100;
Sfx_LoopMace2P2Max = 100;
Sfx_LoopMace3P1Max = 100;
Sfx_LoopMace3P2Max = 100;
Sfx_LoopMace4P1Max = 100;
Sfx_LoopMace4P2Max = 100;
Sfx_LoopMace5P1Max = 100;
Sfx_LoopMace5P2Max = 100;
Sfx_LoopMace6P1Max = 100;
Sfx_LoopMace6P2Max = 100;
Sfx_DribbleMax = 50;
Sfx_LetterCome1Max = 100;
Sfx_LetterCome2Max = 100;
Sfx_LetterCome3Max = 100;
Sfx_LetterCome4Max = 100;
Sfx_LetterCome5Max = 100;
Sfx_LetterCome6Max = 100;
Sfx_LetterOkMax = 80;
Sfx_LetterBadMax = 120;
Sfx_LetterGoMax = 100;
Sfx_LanceBallMax = 100;
Sfx_Ball1Max = 100;
Sfx_Ball2Max = 100;
Sfx_Ball3Max = 100;
Sfx_Ball4Max = 100;
Sfx_Ball5Max = 120;
Sfx_Ball6Max = 100;
Sfx_Ball7Max = 100;
Sfx_Ball8Max = 100;
Sfx_Ball9Max = 100;
Sfx_Ball10Max = 100;
Sfx_Ball11Max = 100;
Sfx_Ball12Max = 100;
Sfx_Ball13Max = 100;
Sfx_Ball14Max = 100;
Sfx_Ball15Max = 70;
Sfx_Ball16Max = 100;
Sfx_PlugComeMax = 100;
Sfx_PlugGoMax = 150;
Sfx_PotatoGoMax = 100;
Sfx_CursorGoMax = 120;
Sfx_DribbleModVol = true;
Sfx_LetterCome1ModVol = true;
Sfx_LetterCome2ModVol = true;
Sfx_LetterCome3ModVol = true;
Sfx_LetterCome4ModVol = true;
Sfx_LetterCome5ModVol = true;
Sfx_LetterCome6ModVol = true;
Sfx_LetterGoModVol = true;
Sfx_Ball1ModVol = true;
Sfx_Ball2ModVol = true;
Sfx_Ball3ModVol = true;
Sfx_Ball4ModVol = true;
Sfx_Ball5ModVol = true;
Sfx_Ball6ModVol = true;
Sfx_Ball7ModVol = true;
Sfx_Ball8ModVol = true;
Sfx_Ball9ModVol = true;
Sfx_Ball10ModVol = true;
Sfx_Ball11ModVol = true;
Sfx_Ball12ModVol = true;
Sfx_Ball13ModVol = true;
Sfx_Ball14ModVol = true;
Sfx_Ball15ModVol = true;
Sfx_Ball16ModVol = true;
Sfx_PlugComeModVol = true;
Sfx_PlugGoModVol = true;
Sfx_PotatoGoModVol = true;
Sfx_CursorGoModVol = true;
Controlled = new Array("sMu_Pack", "sMu_Game1", "sMu_Game2", "sMu_Game3", "sFx_btnOver1", "sFx_btnOver1b", "sFx_btnDown1", "sFx_Bubbles", "sFx_btnOver2", "sFx_Gary1", "sFx_Gary2", "sFx_Eyes", "sFx_crySB", "sFx_Splash1", "sFx_Splash2", "sFx_Scratch", "sFx_In", "sFx_Out", "sFx_GoodKey", "sFx_BadKey", "sFx_endItem", "sFx_SpinGun", "sFx_GunBack", "sFx_laughPat", "sFx_AddTime", "sFx_LoseTime", "sFx_Hit", "sFx_GunShoot", "sFx_ElecMotor", "sFx_ElectricShock", "sFx_ElectricShock2", "sFx_GoodCatch", "sFx_BadCatch", "sFx_Pop", "sFx_Duv", "sFx_SadPat", "sFx_YeeHaw", "sFx_happySB", "sFx_Bong", "sFx_sadViolon", "sFx_Violin", "sFx_Boing", "sFx_ThrowRing", "sFx_Sand", "sFx_Pts", "sFx_GlowRing", "sFx_unHappySB", "sFx_EelOut", "sFx_EelIn", "sFx_NagFish", "sFx_HammerDown", "sFx_HammerUp", "sFx_HammerPunch", "sFx_clicBtn", "sFx_YeahSB", "sFx_PickleFlip", "sFx_Pickle1", "sFx_Pickle2", "sFx_PickleThrow", "sFx_PickleLost", "sFx_Gulp", "sFx_Gonfle", "sFx_FishFly", "sFx_NonoSB", "Sfx_Bell", "Sfx_SwingMace", "Sfx_MaceUp", "Sfx_Stunned", "Sfx_LoopMace1P1", "Sfx_LoopMace1P2", "Sfx_LoopMace2P1", "Sfx_LoopMace2P2", "Sfx_LoopMace3P1", "Sfx_LoopMace3P2", "Sfx_LoopMace4P1", "Sfx_LoopMace4P2", "Sfx_LoopMace5P1", "Sfx_LoopMace5P2", "Sfx_LoopMace6P1", "Sfx_LoopMace6P2", "Sfx_Dribble", "Sfx_LetterCome1", "Sfx_LetterCome2", "Sfx_LetterCome3", "Sfx_LetterCome4", "Sfx_LetterCome5", "Sfx_LetterCome6", "Sfx_LetterOk", "Sfx_LetterBad", "Sfx_LetterGo", "Sfx_LanceBall", "Sfx_Ball1", "Sfx_Ball2", "Sfx_Ball3", "Sfx_Ball4", "Sfx_Ball5", "Sfx_Ball6", "Sfx_Ball7", "Sfx_Ball8", "Sfx_Ball9", "Sfx_Ball10", "Sfx_Ball11", "Sfx_Ball12", "Sfx_Ball13", "Sfx_Ball14", "Sfx_Ball15", "Sfx_Ball16", "Sfx_PlugCome", "Sfx_PlugGo", "Sfx_PotatoGo", "Sfx_CursorGo");
for (i in Controlled) {
this.createEmptyMovieClip(Controlled[i], i + 1);
this[Controlled[i]] = new Sound(this[Controlled[i]]);
this[Controlled[i]].attachSound(Controlled[i]);
this[Controlled[i]].Nom = Controlled[i];
this[Controlled[i]].onSoundComplete = function () {
Items[this.Nom].NbPlay--;
};
Items[Controlled[i]] = new Object();
Items[Controlled[i]].Nom = Controlled[i];
Items[Controlled[i]].Volume = 0;
Items[Controlled[i]].NbPlay = 0;
}
fPlaySounds = function (l_Name, l_Vol, l_NbLoop) {
Items[l_Name].NbPlay++;
if (this[l_Name + "ModVol"] == true) {
SetVolume(l_Name, l_Vol / Items[l_Name].NbPlay);
} else {
SetVolume(l_Name, l_Vol);
}
eval (l_Name).start(0, l_NbLoop);
};
fStopSounds = function (l_Name) {
SetVolume(l_Name, 0);
eval (l_Name).stop();
};
SetVolume = function (l_Name, l_Vol) {
Items[l_Name].Volume = l_Vol;
if (Mute) {
eval (l_Name).setVolume(0);
} else {
eval (l_Name).setVolume(l_Vol);
}
};
DoFade = function (l_Name, l_Vol, l_DirFade, l_SpdFade, l_Index) {
var _local1 = Items[l_Name].Volume;
if (l_DirFade == "In") {
if ((_local1 + l_SpdFade) < l_Vol) {
SetVolume(l_Name, _local1 + l_SpdFade);
} else {
SetVolume(l_Name, l_Vol);
G_TabSonFade.splice(l_Index, 1);
}
} else if ((_local1 - l_SpdFade) > l_Vol) {
SetVolume(l_Name, _local1 - l_SpdFade);
} else {
SetVolume(l_Name, l_Vol);
G_TabSonFade.splice(l_Index, 1);
if (l_Vol == 0) {
StopSound(l_Name);
}
}
};
Fade = function () {
for (i in G_TabSonFade) {
DoFade(G_TabSonFade[i][0], G_TabSonFade[i][1], G_TabSonFade[i][2], G_TabSonFade[i][3], i);
}
};
fDoMute = function () {
Mute = true;
for (i in Items) {
eval (Items[i].Nom).setVolume(0);
}
};
fUndoMute = function () {
Mute = false;
for (i in Items) {
SetVolume(Items[i].Nom, Items[i].Volume);
}
};
fPlaySoundsOneT = function (l_Name, l_Vol, l_NbLoop) {
if (!soundEnd) {
soundEnd = true;
SetVolume(l_Name, l_Vol);
eval (l_Name).start(0, l_NbLoop);
eval (l_Name).onSoundComplete = ajustSoundEnd;
}
};
}
Frame 4
_global.M.fDoSectionActions("HighScore");
Frame 5
_global.M.fDoSectionActions("PlayModeScreen");
Frame 6
_global.M.fDoSectionActions("SelectionScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 6
onClipEvent (load) {
function fInitGameplay() {
if (_global.objSnd.bMusicPackPlaying == false) {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Pack", 80, 99999);
}
_global.mcLevelScreen = _global.M.mcRef.mcSelectionScreen;
_global.M.mcRef.mcSelectionScreen.mcGameInfo.gotoAndStop("Empty" + _global.M.G_sPlayMode);
G_bInit = true;
objHUD.fInitHUD();
}
function fActiveGameButtons() {
var _local3 = 1;
while (_local3 <= 9) {
if (this["Game" + _local3] == "on") {
_global.C["btnGame" + _local3] = new objBtnSelect(_global.mcLevelScreen["btnGame" + _local3], _local3, true);
} else {
_global.C["btnGame" + _local3] = new objBtnSelect(_global.mcLevelScreen["btnGame" + _local3], _local3, false);
}
_local3++;
}
}
function fLoadBtnSetting() {
fActiveGameButtons();
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
var Game1 = "on";
var Game2 = "on";
var Game3 = "on";
var Game4 = "on";
var Game5 = "on";
var Game6 = "on";
var Game7 = "on";
var Game8 = "on";
var Game9 = "on";
with (_parent.objPopup) {
_x = 80;
_y = -58;
swapDepths(300000);
}
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
Frame 8
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 8
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game1", 50, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetSunday("Player1");
objHUD.fSetSunday("Player2");
objHUD.fSetTimer();
}
function fAddPoint(P_sPlayer, P_nPoint) {
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fAddSunday(P_sPlayer, P_nPoint) {
this["G_nSunday" + P_sPlayer] = this["G_nSunday" + P_sPlayer] + P_nPoint;
objHUD.fSetSunday(P_sPlayer);
}
function fTimeOut() {
_global.M.bKeyPaused = true;
if (_global.M.G_sPlayMode == "P2") {
if (G_nGameScorePlayer1 == G_nGameScorePlayer2) {
if (G_nTieTime < 1) {
_global.M.fPause(false);
fGetExtraTime();
objPopup.fSetState("StartTie");
} else if (_global.C.G_nTieTime == 1) {
if (G_nGameScorePlayer1 == 0) {
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndLose");
} else {
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndWin");
}
}
} else if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
}
} else {
objPopup.fSetWinner("Player1");
if (G_nGameScorePlayer1 != 0) {
objPlayerP1.fSetState("EndWin");
} else {
objPlayerP1.fSetState("EndLose");
}
}
}
function fGetExtraTime() {
objTimer.fAddTime(30000);
G_nTieTime++;
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G1_objPlayer(_global.mcLevelScreen.objPlayerP1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", _global.mcLevelScreen.mcKeyReelP1, _global.mcLevelScreen.objSundayP1);
fAddActiveElement(_global.C.objPlayerP1);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G1_objPlayer(_global.mcLevelScreen.objPlayerP1P, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", _global.mcLevelScreen.mcKeyReelP1, _global.mcLevelScreen.objSundayP1);
fAddActiveElement(_global.C.objPlayerP1);
fRemoveUnusedObject(2);
}
} else {
_global.C.objPlayerP1 = new G1_objPlayer(_global.mcLevelScreen.objPlayerP1, "ZXASDFQERO", _global.mcLevelScreen.mcKeyReelP1, _global.mcLevelScreen.objSundayP1);
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objPlayerP2 = new G1_objPlayer(_global.mcLevelScreen.objPlayerP2, "NMJKLUIPW", _global.mcLevelScreen.mcKeyReelP2, _global.mcLevelScreen.objSundayP2);
fAddActiveElement(_global.C.objPlayerP2);
fRemoveUnusedObject(3);
}
}
function fActiveSunday() {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objSundayP1 = new G1_objSunday(_global.mcLevelScreen.objSundayP1, "Player1");
fAddActiveElement(_global.C.objSundayP1);
} else {
_global.C.objSundayP1 = new G1_objSunday(_global.mcLevelScreen.objSundayP1, "Player1");
fAddActiveElement(_global.C.objSundayP1);
_global.C.objSundayP2 = new G1_objSunday(_global.mcLevelScreen.objSundayP2, "Player2");
fAddActiveElement(_global.C.objSundayP2);
}
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objSundayP2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objSundayP2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nSundayPlayer1 = 0;
var G_nSundayPlayer2 = 0;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var G_aDefaultTimer = [0, 3, 0];
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
var objTimer = new objTimer(null);
fAddActiveElement(objTimer);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyUp) {
if ((!_global.M.bPaused) && (!_global.M.bKeyPaused)) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKey();
} else {
_global.C.objPlayerP1.fCheckKey();
_global.C.objPlayerP2.fCheckKey();
}
}
}
Frame 9
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 9
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game2", 70, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetTimer();
}
function fAddPoint(P_sPlayer, P_nPoint) {
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
if (this["G_nGameScore" + P_sPlayer] < 0) {
this["G_nGameScore" + P_sPlayer] = 0;
}
objHUD.fSetGamePoint(P_sPlayer);
}
function fTimeOut() {
_global.M.bKeyPaused = true;
if (_global.M.G_sPlayMode == "P2") {
if (G_nGameScorePlayer1 == G_nGameScorePlayer2) {
if (G_nTieTime < 1) {
_global.M.fPause(false);
fGetExtraTime();
objPopup.fSetState("StartTie");
} else if (_global.C.G_nTieTime == 1) {
if (G_nGameScorePlayer1 == 0) {
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndLose");
} else {
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndWin");
}
}
} else if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
}
} else {
objPopup.fSetWinner("Player1");
if (G_nGameScorePlayer1 != 0) {
objPlayerP1.fSetState("EndWin");
} else {
objPlayerP1.fSetState("EndLose");
}
}
}
function fGetExtraTime() {
objTimer.fAddTime(30000);
G_nTieTime++;
}
function fActivePlayers() {
_global.mcLevelScreen.bkgMid.swapDepths(G_nIndexSwapDepth * 2);
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G2_objPlayer(_global.mcLevelScreen.objPlayerP1, "Player1", 83, 32, _global.mcLevelScreen.mcCrossHairP1);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G2_objPlayer(_global.mcLevelScreen.objPlayerP1P, "Player1", 83, 32, _global.mcLevelScreen.mcCrossHairP1);
fRemoveUnusedObject(2);
}
_global.mcLevelScreen.mcCrossHairP1.swapDepths(G_nIndexSwapDepthCrossHP1);
_global.C.objPlayerP1.mcRef.swapDepths(G_nIndexSwapDepthP1);
fAddActiveElement(_global.C.objPlayerP1);
} else {
_global.C.objPlayerP1 = new G2_objPlayer(_global.mcLevelScreen.objPlayerP1, "Player1", 83, 32, _global.mcLevelScreen.mcCrossHairP1);
_global.mcLevelScreen.mcCrossHairP1.swapDepths(G_nIndexSwapDepthCrossHP1);
_global.C.objPlayerP1.mcRef.swapDepths(G_nIndexSwapDepthP1);
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objPlayerP2 = new G2_objPlayer(_global.mcLevelScreen.objPlayerP2, "Player2", 38, 13, _global.mcLevelScreen.mcCrossHairP2);
_global.mcLevelScreen.mcCrossHairP2.swapDepths(G_nIndexSwapDepthCrossHP2);
_global.C.objPlayerP2.mcRef.swapDepths(G_nIndexSwapDepthP2);
fAddActiveElement(_global.C.objPlayerP2);
fRemoveUnusedObject(3);
}
}
function fActiveLevel() {
_global.C.objLevel = new G2_objLevel();
fAddActiveElement(_global.C.objLevel);
}
function fActiveTarget(P_sType, P_nPosX, P_nPosY, P_nStep, P_sDirection) {
var _local2 = "Target" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie(P_sType, _local2, G_nIndexSwapDepth);
_local3._x = P_nPosX;
_local3._y = P_nPosY;
_global.C[_local2] = new G2_objTarget(_local3, P_sType, P_nStep, P_sDirection);
fAddActiveElement(_global.C[_local2]);
G_nObjectIndent++;
G_nIndexSwapDepth++;
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.mcCrossHairP2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.mcCrossHairP2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nLimitTop = 50;
var G_nLimitBottom = 200;
var G_nIndexSwapDepthP1 = 500005;
var G_nIndexSwapDepthP2 = 500004;
var G_nIndexSwapDepthCrossHP1 = 500003;
var G_nIndexSwapDepthCrossHP2 = 500002;
var G_nTargetBad = 3;
var G_nTargetGood = 1;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var G_aDefaultTimer = [0, 3, 0];
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
var objTimer = new objTimer(null);
fAddActiveElement(objTimer);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if ((!_global.M.bPaused) && (!_global.M.bKeyPaused)) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyPressed();
} else {
_global.C.objPlayerP1.fCheckKeyPressed();
_global.C.objPlayerP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyUnPressed();
} else {
_global.C.objPlayerP1.fCheckKeyUnPressed();
_global.C.objPlayerP2.fCheckKeyUnPressed();
}
}
Frame 10
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 10
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game3", 100, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fInitTugMeter();
objHUD.fSetMultiplier();
}
function fAddPoint(P_sPlayer, P_nPoint) {
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
if (this["G_nGameScore" + P_sPlayer] < 0) {
this["G_nGameScore" + P_sPlayer] = 0;
}
objHUD.fSetGamePoint(P_sPlayer);
}
function fValidTugMeter(P_sPlayer) {
function player1Win() {
with (_global.C) {
_global.objSnd.fStopSounds("sFx_ElecMotor");
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
}
}
function player2Win() {
with (_global.C) {
_global.objSnd.fStopSounds("sFx_ElecMotor");
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
}
}
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
if (objHUD.mcRef.mcTug.mcTugMeter._currentframe == G_nP1Frame) {
player1Win();
}
} else if (objHUD.mcRef.mcTug.mcTugMeter._currentframe >= G_nMidFrame) {
player1Win();
}
} else if (objHUD.mcRef.mcTug.mcTugMeter._currentframe == G_nP1Frame) {
player2Win();
} else if (objHUD.mcRef.mcTug.mcTugMeter._currentframe == G_nP2Frame) {
player1Win();
}
}
function fActivePlayers() {
_global.mcLevelScreen.bkgMid.swapDepths(_global.mcLevelScreen.objPlayerP1.getDepth() + 100);
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G3_objPlayer(_global.mcLevelScreen.objPlayerP1, "Player1", 83, 70);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G3_objPlayer(_global.mcLevelScreen.objPlayerP1P, "Player1", 83, 70);
fRemoveUnusedObject(2);
}
fAddActiveElement(_global.C.objPlayerP1);
} else {
_global.C.objPlayerP1 = new G3_objPlayer(_global.mcLevelScreen.objPlayerP1, "Player1", 83, 70);
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objPlayerP2 = new G3_objPlayer(_global.mcLevelScreen.objPlayerP2, "Player2", 37, 39);
fAddActiveElement(_global.C.objPlayerP2);
fRemoveUnusedObject(3);
}
}
function fActiveLevel() {
_global.C.objLevel = new G3_objLevel();
fAddActiveElement(_global.C.objLevel);
}
function fActiveTarget(P_sType, P_nPosX, P_nPosY) {
var _local2 = "Target" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie(P_sType, _local2, G_nIndexSwapDepth);
_local3._x = P_nPosX;
_local3._y = P_nPosY;
_global.C[_local2] = new G3_objTarget(_local3, P_sType);
fAddActiveElement(_global.C[_local2]);
G_nObjectIndent++;
G_nIndexSwapDepth++;
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nLimitLeft = 0;
var G_nLimitRight = 300;
var G_nP1Frame = 1;
var G_nMidFrame = 51;
var G_nP2Frame = 101;
var G_nTugMeterMultifier = 1;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if (_global.M.bPaused == false) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyPressed();
} else {
_global.C.objPlayerP1.fCheckKeyPressed();
_global.C.objPlayerP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyUnPressed();
} else {
_global.C.objPlayerP1.fCheckKeyUnPressed();
_global.C.objPlayerP2.fCheckKeyUnPressed();
}
}
Frame 12
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 12
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game1", 50, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetRing("P1");
objHUD.fSetRing("P2");
}
function fManageMiss(sPlayerRef) {
if (_global.M.G_sPlayMode == "P1") {
if (G_nRingP1 > 1) {
G_nRingP1--;
objHUD.fSetRing(sPlayerRef);
} else {
G_nRingP1 = 0;
objHUD.fSetRing(sPlayerRef);
objPopup.fSetWinner("Player1");
if (_global.C.G_nGameScorePlayer1 != 0) {
objPlayerP1.fDoEndLevel("EndWin");
} else {
objPlayerP1.fDoEndLevel("EndLose");
}
}
} else if (this["G_nRing" + sPlayerRef] > 1) {
this["G_nRing" + sPlayerRef]--;
objHUD.fSetRing(sPlayerRef);
} else {
this["G_nRing" + sPlayerRef]--;
objHUD.fSetRing(sPlayerRef);
if (sPlayerRef == "P1") {
var _local4 = "P2";
}
if (sPlayerRef == "P2") {
var _local4 = "P1";
}
if (this["objPlayer" + _local4].sState == "WaitEnd") {
if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fDoEndLevel("EndWin");
objPlayerP2.fDoEndLevel("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fDoEndLevel("EndLose");
objPlayerP2.fDoEndLevel("EndWin");
} else if (G_nGameScorePlayer1 == 0) {
objPlayerP1.fDoEndLevel("EndLose");
objPlayerP2.fDoEndLevel("EndLose");
} else {
objPlayerP1.fDoEndLevel("EndWin");
objPlayerP2.fDoEndLevel("EndWin");
}
} else {
this["objPlayer" + sPlayerRef].fDoEndLevel("WaitEnd");
}
}
}
function fAddPoint(P_sPlayer, P_nPoint) {
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G4_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", 32, [30, 132, 232]);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G4_objPlayer(_global.mcLevelScreen.objPlayerP1P, "P1", 32, [30, 132, 232]);
fRemoveUnusedObject(2);
}
_global.C.objPlayerP1.mcRef.swapDepths(G_nIndexSwapDepth);
fAddActiveElement(_global.C.objPlayerP1);
G_nIndexSwapDepth++;
} else {
_global.C.objPlayerP1 = new G4_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", 32, [30, 132, 232]);
_global.C.objPlayerP1.mcRef.swapDepths(G_nIndexSwapDepth);
fAddActiveElement(_global.C.objPlayerP1);
G_nIndexSwapDepth++;
_global.C.objPlayerP2 = new G4_objPlayer(_global.mcLevelScreen.objPlayerP2, "P2", 13, [537, 435, 333]);
_global.C.objPlayerP2.mcRef.swapDepths(G_nIndexSwapDepth);
fAddActiveElement(_global.C.objPlayerP2);
fRemoveUnusedObject(3);
G_nIndexSwapDepth++;
}
}
function fActiveTarget(P_mcRef, P_nStep, P_sPlayerRef) {
var _local2 = "objTarget_" + G_nObjectIndent;
P_mcRef._name = _local2;
P_mcRef._xscale = (P_mcRef._yscale = G_nScaleStepTarget[P_nStep]);
P_mcRef.swapDepths(G_nIndexSwapDepthTarget[P_nStep]);
_global.C[_local2] = new G4_objTarget(P_mcRef, P_nStep, P_sPlayerRef);
fAddActiveElement(_global.C[_local2]);
G_nIndexSwapDepthTarget[P_nStep]++;
G_nObjectIndent++;
}
function fActiveRings(P_nPower, P_mcRefStart, P_sPlayer) {
var _local3 = P_mcRefStart.getBounds(_global.mcLevelScreen);
var _local2 = "objRing_" + G_nObjectIndent;
var _local4 = _global.mcLevelScreen.attachMovie("G4_mcRing", _local2, G_nIndexSwapDepthRing);
_global.C[_local2] = new G4_objRing(_local4, P_nPower, P_sPlayer);
_global.C[_local2].mcRef._x = (_local3.xMin + _local3.xMax) / 2;
_global.C[_local2].mcRef._y = _local3.yMax;
fAddActiveElement(_global.C[_local2]);
G_nIndexSwapDepthRing++;
G_nObjectIndent++;
}
function fAddBonusPointFX(P_nPoint, P_posX, P_posY) {
var _local2 = "mcBonusPoint" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie("mcBonusPoint", _local2, G_nIndexSwapDepth);
_global.C[_local2] = new G4_objBonusPoint(_local3, P_nPoint, P_posY);
fAddActiveElement(_global.C[_local2]);
_local3._x = P_posX;
_local3._y = P_posY;
G_nObjectIndent++;
G_nIndexSwapDepth++;
_global.objSnd.fPlaySounds("sFx_Pts", 100, 1);
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.PowerUpP2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.PowerUpP2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nRingP1 = 5;
var G_nRingP2 = 5;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepthRing = 4000;
var G_nIndexSwapDepth = 100000;
var G_nScaleStepTarget = [100, 80, 60];
var G_nIndexSwapDepthTarget = [3000, 2000, 1000, 100];
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if (_global.M.bPaused == false) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyPressed();
} else {
_global.C.objPlayerP1.fCheckKeyPressed();
_global.C.objPlayerP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyUnPressed();
} else {
_global.C.objPlayerP1.fCheckKeyUnPressed();
_global.C.objPlayerP2.fCheckKeyUnPressed();
}
}
Frame 13
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 13
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game2", 70, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetTimer();
}
function fAddPoint(P_sPlayer, P_nPoint) {
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fAddSunday(P_sPlayer, P_nPoint) {
this["G_nSunday" + P_sPlayer] = this["G_nSunday" + P_sPlayer] + P_nPoint;
objHUD.fSetSunday(P_sPlayer);
}
function fTimeOut() {
_global.M.bKeyPaused = true;
if (_global.M.G_sPlayMode == "P2") {
if (G_nGameScorePlayer1 == G_nGameScorePlayer2) {
if (G_nTieTime < 1) {
_global.M.fPause(false);
fGetExtraTime();
objPopup.fSetState("StartTie");
} else if (_global.C.G_nTieTime == 1) {
if (G_nGameScorePlayer1 == 0) {
objBPlayerP1.fSetState("EndLose");
objBPlayerP2.fSetState("EndLose");
} else {
objBPlayerP1.fSetState("EndWin");
objBPlayerP2.fSetState("EndWin");
}
}
} else if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objBPlayerP1.fSetState("EndWin");
objBPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objBPlayerP1.fSetState("EndLose");
objBPlayerP2.fSetState("EndWin");
}
} else {
objPopup.fSetWinner("Player1");
if (G_nGameScorePlayer1 != 0) {
objBPlayerP1.fSetState("EndWin");
} else {
objBPlayerP1.fSetState("EndLose");
}
}
}
function fGetExtraTime() {
objTimer.fAddTime(30000);
G_nTieTime++;
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G5_objPlayer(_global.mcLevelScreen.objPlayerP1, "ZXCASDQWE", "P1");
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objBPlayerP1 = new G5_objBackPlayer(_global.mcLevelScreen.objBPlayerP1, "P1");
fAddActiveElement(_global.C.objBPlayerP1);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G5_objPlayer(_global.mcLevelScreen.objPlayerP1P, "ZXCASDQWE", "P1");
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objBPlayerP1 = new G5_objBackPlayer(_global.mcLevelScreen.objBPlayerP1P, "P1");
fAddActiveElement(_global.C.objBPlayerP1);
fRemoveUnusedObject(2);
}
} else {
_global.C.objPlayerP1 = new G5_objPlayer(_global.mcLevelScreen.objPlayerP1, "ZXCASDQWE", "P1");
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objBPlayerP1 = new G5_objBackPlayer(_global.mcLevelScreen.objBPlayerP1, "P1");
fAddActiveElement(_global.C.objBPlayerP1);
_global.C.objPlayerP2 = new G5_objPlayer(_global.mcLevelScreen.objPlayerP2, "BNMHJKYUI", "P2");
fAddActiveElement(_global.C.objPlayerP2);
_global.C.objBPlayerP2 = new G5_objBackPlayer(_global.mcLevelScreen.objBPlayerP2, "P2");
fAddActiveElement(_global.C.objBPlayerP2);
fRemoveUnusedObject(3);
}
}
function fActiveLevel() {
_global.C.objLevel = new G5_objLevel();
fAddActiveElement(_global.C.objLevel);
}
function fActiveHoles() {
if (_global.M.G_sPlayMode == "P1") {
var _local2 = 1;
while (_local2 < 10) {
_global.C["objHoleP1_" + _local2] = new G5_objHole(_global.mcLevelScreen["mcHoleP1_" + _local2]);
fAddActiveElement(_global.C["objHoleP1_" + _local2]);
_local2++;
}
} else {
var _local2 = 1;
while (_local2 < 10) {
_global.C["objHoleP1_" + _local2] = new G5_objHole(_global.mcLevelScreen["mcHoleP1_" + _local2]);
fAddActiveElement(_global.C["objHoleP1_" + _local2]);
_local2++;
}
_local2 = 1;
while (_local2 < 10) {
_global.C["objHoleP2_" + _local2] = new G5_objHole(_global.mcLevelScreen["mcHoleP2_" + _local2]);
fAddActiveElement(_global.C["objHoleP2_" + _local2]);
_local2++;
}
}
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objBPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objBPlayerP2);
fRemoveHole();
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objBPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objBPlayerP2);
fRemoveHole();
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objBPlayerP1P);
}
}
function fRemoveHole() {
var _local2 = 1;
while (_local2 < 10) {
fRemoveInstance(_global.mcLevelScreen["mcHoleP2_" + _local2]);
_local2++;
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nSundayPlayer1 = 0;
var G_nSundayPlayer2 = 0;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var G_aDefaultTimer = [0, 3, 0];
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
var objTimer = new objTimer(null);
fAddActiveElement(objTimer);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyUp) {
if ((!_global.M.bPaused) && (!_global.M.bKeyPaused)) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKey();
} else {
_global.C.objPlayerP1.fCheckKey();
_global.C.objPlayerP2.fCheckKey();
}
}
}
Frame 14
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 14
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game3", 50, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetRing("P1");
objHUD.fSetRing("P2");
}
function fManageMiss(sPlayerRef) {
if (_global.M.G_sPlayMode == "P1") {
if (G_nRingP1 > 1) {
G_nRingP1--;
objHUD.fSetRing(sPlayerRef);
} else {
G_nRingP1 = 0;
objHUD.fSetRing(sPlayerRef);
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
}
} else if (this["G_nRing" + sPlayerRef] > 1) {
this["G_nRing" + sPlayerRef]--;
objHUD.fSetRing(sPlayerRef);
} else {
this["G_nRing" + sPlayerRef]--;
objHUD.fSetRing(sPlayerRef);
if (sPlayerRef == "P1") {
var _local4 = "P2";
}
if (sPlayerRef == "P2") {
var _local4 = "P1";
}
if (this["objPlayer" + _local4].sState == "WaitEnd") {
if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
} else {
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndWin");
}
} else {
this["objPlayer" + sPlayerRef].fSetState("WaitEnd");
}
}
}
function fAddPoint(P_sPlayer, P_nPoint) {
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G6_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", 83, 70);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G6_objPlayer(_global.mcLevelScreen.objPlayerP1P, "P1", 83, 70);
fRemoveUnusedObject(2);
}
_global.C.objPlayerP1.mcRef.swapDepths(G_nIndexSwapDepth);
fAddActiveElement(_global.C.objPlayerP1);
G_nIndexSwapDepth++;
} else {
_global.C.objPlayerP1 = new G6_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", 83, 70);
_global.C.objPlayerP1.mcRef.swapDepths(G_nIndexSwapDepth);
fAddActiveElement(_global.C.objPlayerP1);
G_nIndexSwapDepth++;
_global.C.objPlayerP2 = new G6_objPlayer(_global.mcLevelScreen.objPlayerP2, "P2", 37, 39);
_global.C.objPlayerP2.mcRef.swapDepths(G_nIndexSwapDepth);
fAddActiveElement(_global.C.objPlayerP2);
fRemoveUnusedObject(3);
G_nIndexSwapDepth++;
}
}
function fActiveTarget() {
function doActiveTarget(P_player) {
var _local4 = 1;
while (_local4 <= 3) {
var _local3 = 1;
while (_local3 <= 5) {
var _local2 = (((("fish" + P_player) + "_") + _local4) + "_") + _local3;
_global.C[_local2] = new G6_objTarget(_global.mcLevelScreen[_local2]);
fAddActiveElement(_global.C[_local2]);
_local3++;
}
_local4++;
}
}
doActiveTarget("P1");
if (_global.M.G_sPlayMode == "P2") {
doActiveTarget("P2");
}
}
function fAddBonusPointFX(P_nPoint, P_posX, P_posY) {
var _local2 = "mcBonusPoint" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie("mcBonusPoint", _local2, G_nIndexSwapDepth);
_global.C[_local2] = new G6_objBonusPoint(_local3, P_nPoint, P_posY);
fAddActiveElement(_global.C[_local2]);
_local3._x = P_posX;
_local3._y = P_posY;
G_nObjectIndent++;
G_nIndexSwapDepth++;
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nRingP1 = 3;
var G_nRingP2 = 3;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepthRing = 4000;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if (!_global.M.bPaused) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyPressed();
} else {
_global.C.objPlayerP1.fCheckKeyPressed();
_global.C.objPlayerP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyUnPressed();
} else {
_global.C.objPlayerP1.fCheckKeyUnPressed();
_global.C.objPlayerP2.fCheckKeyUnPressed();
}
}
Frame 16
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 16
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game1", 50, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetTimer();
}
function fAddPoint(P_sPlayer, P_nPoint) {
if (P_sPlayer == "P1") {
P_sPlayer = "Player1";
}
if (P_sPlayer == "P2") {
P_sPlayer = "Player2";
}
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fTimeOut() {
_global.M.bKeyPaused = true;
_global.C.objPlayerP1.fStopSndMace();
if (_global.M.G_sPlayMode == "P2") {
_global.C.objPlayerP2.fStopSndMace();
if (G_nGameScorePlayer1 == G_nGameScorePlayer2) {
if (G_nTieTime < 1) {
_global.M.fPause(false);
fGetExtraTime();
objPopup.fSetState("StartTie");
} else if (_global.C.G_nTieTime == 1) {
if (G_nGameScorePlayer1 == 0) {
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndLose");
} else {
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndWin");
}
}
} else if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
}
} else {
objPopup.fSetWinner("Player1");
if (G_nGameScorePlayer1 != 0) {
objPlayerP1.fSetState("EndWin");
} else {
objPlayerP1.fSetState("EndLose");
}
}
}
function fGetExtraTime() {
objTimer.fAddTime(30000);
G_nTieTime++;
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G7_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", 32);
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G7_objPlayer(_global.mcLevelScreen.objPlayerP1P, "P1", 32);
fRemoveUnusedObject(2);
}
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objBallP1 = new G7_objBall(_global.mcLevelScreen.objBallP1, "P1");
fAddActiveElement(_global.C.objBallP1);
_global.C.objBellP1 = new G7_objBell(_global.mcLevelScreen.objBellP1, "P1");
fAddActiveElement(_global.C.objBellP1);
_global.C.objTongueP1 = new G7_objTongue(_global.mcLevelScreen.objTongueP1, "P1");
fAddActiveElement(_global.C.objTongueP1);
} else {
_global.C.objPlayerP1 = new G7_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", 32);
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objPlayerP2 = new G7_objPlayer(_global.mcLevelScreen.objPlayerP2, "P2", 13);
fAddActiveElement(_global.C.objPlayerP2);
_global.C.objBallP1 = new G7_objBall(_global.mcLevelScreen.objBallP1, "P1");
fAddActiveElement(_global.C.objBallP1);
_global.C.objBallP2 = new G7_objBall(_global.mcLevelScreen.objBallP2, "P2");
fAddActiveElement(_global.C.objBallP2);
_global.C.objBellP1 = new G7_objBell(_global.mcLevelScreen.objBellP1, "P1");
fAddActiveElement(_global.C.objBellP1);
_global.C.objBellP2 = new G7_objBell(_global.mcLevelScreen.objBellP2, "P2");
fAddActiveElement(_global.C.objBellP2);
_global.C.objTongueP1 = new G7_objTongue(_global.mcLevelScreen.objTongueP1, "P1");
fAddActiveElement(_global.C.objTongueP1);
_global.C.objTongueP2 = new G7_objTongue(_global.mcLevelScreen.objTongueP2, "P2");
fAddActiveElement(_global.C.objTongueP2);
fRemoveUnusedObject(3);
}
}
function fActiveTarget() {
function doActiveTarget(P_player) {
var _local4 = 1;
while (_local4 <= 3) {
var _local3 = 1;
while (_local3 <= 5) {
var _local2 = (((("fish" + P_player) + "_") + _local4) + "_") + _local3;
_global.C[_local2] = new G7_objTarget(_global.mcLevelScreen[_local2]);
fAddActiveElement(_global.C[_local2]);
_local3++;
}
_local4++;
}
}
doActiveTarget("P1");
if (_global.M.G_sPlayMode == "P2") {
doActiveTarget("P2");
}
}
function fAddBonusPointFX(P_nPoint, P_posX, P_posY) {
var _local2 = "mcBonusPoint" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie("mcBonusPoint", _local2, G_nIndexSwapDepth);
_global.C[_local2] = new G7_objBonusPoint(_local3, P_nPoint, P_posY);
fAddActiveElement(_global.C[_local2]);
_local3._x = P_posX;
_local3._y = P_posY;
G_nObjectIndent++;
G_nIndexSwapDepth++;
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objBallP2);
fRemoveInstance(_global.mcLevelScreen.objBellP2);
fRemoveInstance(_global.mcLevelScreen.objTongueP2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objBallP2);
fRemoveInstance(_global.mcLevelScreen.objBellP2);
fRemoveInstance(_global.mcLevelScreen.objTongueP2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var G_aDefaultTimer = [0, 3, 0];
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
var objTimer = new objTimer();
fAddActiveElement(objTimer);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if ((!_global.M.bPaused) && (!_global.M.bKeyPaused)) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyPressed();
} else {
_global.C.objPlayerP1.fCheckKeyPressed();
_global.C.objPlayerP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyUnPressed();
} else {
_global.C.objPlayerP1.fCheckKeyUnPressed();
_global.C.objPlayerP2.fCheckKeyUnPressed();
}
}
Frame 17
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 17
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game2", 50, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
objHUD.fSetTimer();
}
function fAddPoint(P_sPlayer, P_nPoint) {
if (P_sPlayer == "P1") {
P_sPlayer = "Player1";
}
if (P_sPlayer == "P2") {
P_sPlayer = "Player2";
}
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fTimeOut() {
_global.M.bKeyPaused = true;
if (_global.M.G_sPlayMode == "P2") {
if (G_nGameScorePlayer1 == G_nGameScorePlayer2) {
if (G_nTieTime < 1) {
_global.M.fPause(false);
fGetExtraTime();
objPopup.fSetState("StartTie");
} else if (_global.C.G_nTieTime == 1) {
if (G_nGameScorePlayer1 == 0) {
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndLose");
} else {
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndWin");
}
}
} else if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
}
} else {
objPopup.fSetWinner("Player1");
if (G_nGameScorePlayer1 != 0) {
objPlayerP1.fSetState("EndWin");
} else {
objPlayerP1.fSetState("EndLose");
}
}
}
function fGetExtraTime() {
objTimer.fAddTime(30000);
G_nTieTime++;
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G8_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G8_objPlayer(_global.mcLevelScreen.objPlayerP1P, "P1", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
fRemoveUnusedObject(2);
}
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objMeterP1 = new G8_objMeter(_global.mcLevelScreen.objMeterP1, "P1");
fAddActiveElement(_global.C.objMeterP1);
_global.C.objBallFrontP1 = new G8_objBallFront(_global.mcLevelScreen.objBallFrontP1, "P1");
fAddActiveElement(_global.C.objBallFrontP1);
_global.C.objBallBackP1 = new G8_objBallBack(_global.mcLevelScreen.objBallBackP1, "P1");
fAddActiveElement(_global.C.objBallBackP1);
_global.C.objLetter1P1 = new G8_objLetter(_global.mcLevelScreen.objLetter1P1, "P1", 1);
fAddActiveElement(_global.C.objLetter1P1);
_global.C.objLetter2P1 = new G8_objLetter(_global.mcLevelScreen.objLetter2P1, "P1", 2);
fAddActiveElement(_global.C.objLetter2P1);
_global.C.objLetter3P1 = new G8_objLetter(_global.mcLevelScreen.objLetter3P1, "P1", 3);
fAddActiveElement(_global.C.objLetter3P1);
_global.C.objLetter4P1 = new G8_objLetter(_global.mcLevelScreen.objLetter4P1, "P1", 4);
fAddActiveElement(_global.C.objLetter4P1);
_global.C.objLetter5P1 = new G8_objLetter(_global.mcLevelScreen.objLetter5P1, "P1", 5);
fAddActiveElement(_global.C.objLetter5P1);
_global.C.objLetter6P1 = new G8_objLetter(_global.mcLevelScreen.objLetter6P1, "P1", 6);
fAddActiveElement(_global.C.objLetter6P1);
} else {
_global.C.objPlayerP1 = new G8_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1", "QWERASDFZX");
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objPlayerP2 = new G8_objPlayer(_global.mcLevelScreen.objPlayerP2, "P2", "POIULKJHMN");
fAddActiveElement(_global.C.objPlayerP2);
_global.C.objMeterP1 = new G8_objMeter(_global.mcLevelScreen.objMeterP1, "P1");
fAddActiveElement(_global.C.objMeterP1);
_global.C.objMeterP2 = new G8_objMeter(_global.mcLevelScreen.objMeterP2, "P2");
fAddActiveElement(_global.C.objMeterP2);
_global.C.objBallFrontP1 = new G8_objBallFront(_global.mcLevelScreen.objBallFrontP1, "P1");
fAddActiveElement(_global.C.objBallFrontP1);
_global.C.objBallFrontP2 = new G8_objBallFront(_global.mcLevelScreen.objBallFrontP2, "P2");
fAddActiveElement(_global.C.objBallFrontP2);
_global.C.objBallBackP1 = new G8_objBallBack(_global.mcLevelScreen.objBallBackP1, "P1");
fAddActiveElement(_global.C.objBallBackP1);
_global.C.objBallBackP2 = new G8_objBallBack(_global.mcLevelScreen.objBallBackP2, "P2");
fAddActiveElement(_global.C.objBallBackP2);
_global.C.objLetter1P1 = new G8_objLetter(_global.mcLevelScreen.objLetter1P1, "P1", 1);
fAddActiveElement(_global.C.objLetter1P1);
_global.C.objLetter2P1 = new G8_objLetter(_global.mcLevelScreen.objLetter2P1, "P1", 2);
fAddActiveElement(_global.C.objLetter2P1);
_global.C.objLetter3P1 = new G8_objLetter(_global.mcLevelScreen.objLetter3P1, "P1", 3);
fAddActiveElement(_global.C.objLetter3P1);
_global.C.objLetter4P1 = new G8_objLetter(_global.mcLevelScreen.objLetter4P1, "P1", 4);
fAddActiveElement(_global.C.objLetter4P1);
_global.C.objLetter5P1 = new G8_objLetter(_global.mcLevelScreen.objLetter5P1, "P1", 5);
fAddActiveElement(_global.C.objLetter5P1);
_global.C.objLetter6P1 = new G8_objLetter(_global.mcLevelScreen.objLetter6P1, "P1", 6);
fAddActiveElement(_global.C.objLetter6P1);
_global.C.objLetter1P2 = new G8_objLetter(_global.mcLevelScreen.objLetter1P2, "P2", 1);
fAddActiveElement(_global.C.objLetter1P2);
_global.C.objLetter2P2 = new G8_objLetter(_global.mcLevelScreen.objLetter2P2, "P2", 2);
fAddActiveElement(_global.C.objLetter2P2);
_global.C.objLetter3P2 = new G8_objLetter(_global.mcLevelScreen.objLetter3P2, "P2", 3);
fAddActiveElement(_global.C.objLetter3P2);
_global.C.objLetter4P2 = new G8_objLetter(_global.mcLevelScreen.objLetter4P2, "P2", 4);
fAddActiveElement(_global.C.objLetter4P2);
_global.C.objLetter5P2 = new G8_objLetter(_global.mcLevelScreen.objLetter5P2, "P2", 5);
fAddActiveElement(_global.C.objLetter5P2);
_global.C.objLetter6P2 = new G8_objLetter(_global.mcLevelScreen.objLetter6P2, "P2", 6);
fAddActiveElement(_global.C.objLetter6P2);
fRemoveUnusedObject(3);
}
}
function fActiveTarget() {
function doActiveTarget(P_player) {
var _local4 = 1;
while (_local4 <= 3) {
var _local3 = 1;
while (_local3 <= 5) {
var _local2 = (((("fish" + P_player) + "_") + _local4) + "_") + _local3;
_global.C[_local2] = new G8_objTarget(_global.mcLevelScreen[_local2]);
fAddActiveElement(_global.C[_local2]);
_local3++;
}
_local4++;
}
}
doActiveTarget("P1");
if (_global.M.G_sPlayMode == "P2") {
doActiveTarget("P2");
}
}
function fAddBonusPointFX(P_nPoint, P_posX, P_posY) {
var _local2 = "mcBonusPoint" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie("mcBonusPoint", _local2, G_nIndexSwapDepth);
_global.C[_local2] = new G8_objBonusPoint(_local3, P_nPoint, P_posY);
fAddActiveElement(_global.C[_local2]);
_local3._x = P_posX;
_local3._y = P_posY;
G_nObjectIndent++;
G_nIndexSwapDepth++;
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objBallFrontP2);
fRemoveInstance(_global.mcLevelScreen.objBallBackP2);
fRemoveInstance(_global.mcLevelScreen.objMeterP2);
fRemoveInstance(_global.mcLevelScreen.objLetter1P2);
fRemoveInstance(_global.mcLevelScreen.objLetter2P2);
fRemoveInstance(_global.mcLevelScreen.objLetter3P2);
fRemoveInstance(_global.mcLevelScreen.objLetter4P2);
fRemoveInstance(_global.mcLevelScreen.objLetter5P2);
fRemoveInstance(_global.mcLevelScreen.objLetter6P2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objBallFrontP2);
fRemoveInstance(_global.mcLevelScreen.objBallBackP2);
fRemoveInstance(_global.mcLevelScreen.objMeterP2);
fRemoveInstance(_global.mcLevelScreen.objLetter1P2);
fRemoveInstance(_global.mcLevelScreen.objLetter2P2);
fRemoveInstance(_global.mcLevelScreen.objLetter3P2);
fRemoveInstance(_global.mcLevelScreen.objLetter4P2);
fRemoveInstance(_global.mcLevelScreen.objLetter5P2);
fRemoveInstance(_global.mcLevelScreen.objLetter6P2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var G_aDefaultTimer = [0, 3, 0];
var G_Code65 = "A";
var G_Code66 = "B";
var G_Code67 = "C";
var G_Code68 = "D";
var G_Code69 = "E";
var G_Code70 = "F";
var G_Code71 = "G";
var G_Code72 = "H";
var G_Code73 = "I";
var G_Code74 = "J";
var G_Code75 = "K";
var G_Code76 = "L";
var G_Code77 = "M";
var G_Code78 = "N";
var G_Code79 = "O";
var G_Code80 = "P";
var G_Code81 = "Q";
var G_Code82 = "R";
var G_Code83 = "S";
var G_Code84 = "T";
var G_Code85 = "U";
var G_Code86 = "V";
var G_Code87 = "W";
var G_Code88 = "X";
var G_Code89 = "Y";
var G_Code90 = "Z";
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
var objTimer = new objTimer();
fAddActiveElement(objTimer);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if ((!_global.M.bPaused) && (!_global.M.bKeyPaused)) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyPressed();
} else {
_global.C.objPlayerP1.fCheckKeyPressed();
_global.C.objPlayerP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objPlayerP1.fCheckKeyUnPressed();
} else {
_global.C.objPlayerP1.fCheckKeyUnPressed();
_global.C.objPlayerP2.fCheckKeyUnPressed();
}
}
Frame 18
_global.M.fDoSectionActions("LevelScreen");
Instance of Symbol 585 MovieClip "mcContGame" in Frame 18
onClipEvent (load) {
function fInitGameplay() {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.fPlaySounds("sMu_Game3", 50, 99999);
objPopup.fSetState("Intro");
_global.mcLevelScreen = _global.M.mcRef.mcLevelScreen;
G_bInit = true;
objHUD.fInitHUD();
}
function fAddPoint(P_sPlayer, P_nPoint) {
if (P_sPlayer == "P1") {
P_sPlayer = "Player1";
}
if (P_sPlayer == "P2") {
P_sPlayer = "Player2";
}
this["G_nGameScore" + P_sPlayer] = this["G_nGameScore" + P_sPlayer] + P_nPoint;
objHUD.fSetGamePoint(P_sPlayer);
}
function fCheckEnd() {
if (_global.M.G_sPlayMode == "P2") {
if ((_global.C.objPlayerP1.nNbBall == 0) and (_global.C.objPlayerP2.nNbBall == 0)) {
_global.M.bKeyPaused = true;
if (G_nGameScorePlayer1 > G_nGameScorePlayer2) {
objPopup.fSetWinner("Player1");
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndLose");
} else if (G_nGameScorePlayer1 < G_nGameScorePlayer2) {
objPopup.fSetWinner("Player2");
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndWin");
} else if (G_nGameScorePlayer1 == 0) {
objPlayerP1.fSetState("EndLose");
objPlayerP2.fSetState("EndLose");
} else {
objPlayerP1.fSetState("EndWin");
objPlayerP2.fSetState("EndWin");
}
}
} else {
_global.M.bKeyPaused = true;
objPopup.fSetWinner("Player1");
if (G_nGameScorePlayer1 != 0) {
objPlayerP1.fSetState("EndWin");
} else {
objPlayerP1.fSetState("EndLose");
}
}
}
function fActivePlayers() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objPlayerP1 = new G9_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1");
fRemoveUnusedObject(1);
} else {
_global.C.objPlayerP1 = new G9_objPlayer(_global.mcLevelScreen.objPlayerP1P, "P1");
fRemoveUnusedObject(2);
}
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objCursorP1 = new G9_objCursor(_global.mcLevelScreen.objCursorP1, "P1", 83, 68);
fAddActiveElement(_global.C.objCursorP1);
_global.C.objBallP1 = new G9_objBall(_global.mcLevelScreen.objBallP1, "P1");
fAddActiveElement(_global.C.objBallP1);
_global.C.objBallIn1P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn1P1, "P1", 1);
fAddActiveElement(_global.C.objBallIn1P1);
_global.C.objBallIn2P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn2P1, "P1", 2);
fAddActiveElement(_global.C.objBallIn2P1);
_global.C.objBallIn3P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn3P1, "P1", 3);
fAddActiveElement(_global.C.objBallIn3P1);
_global.C.objBallIn4P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn4P1, "P1", 4);
fAddActiveElement(_global.C.objBallIn4P1);
_global.C.objBallIn5P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn5P1, "P1", 5);
fAddActiveElement(_global.C.objBallIn5P1);
_global.C.objBallIn6P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn6P1, "P1", 6);
fAddActiveElement(_global.C.objBallIn6P1);
_global.C.objBallIn7P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn7P1, "P1", 7);
fAddActiveElement(_global.C.objBallIn7P1);
_global.C.objBallIn8P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn8P1, "P1", 8);
fAddActiveElement(_global.C.objBallIn8P1);
_global.C.objBallIn9P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn9P1, "P1", 9);
fAddActiveElement(_global.C.objBallIn9P1);
_global.C.objBoardP1 = new G9_objBoard("P1");
fAddActiveElement(_global.C.objBoardP1);
_global.C.objPlug1P1 = new G9_objPlug(_global.mcLevelScreen.objPlug1P1, "P1", 1);
fAddActiveElement(_global.C.objPlug1P1);
_global.C.objPlug2P1 = new G9_objPlug(_global.mcLevelScreen.objPlug2P1, "P1", 2);
fAddActiveElement(_global.C.objPlug2P1);
_global.C.objPlug3P1 = new G9_objPlug(_global.mcLevelScreen.objPlug3P1, "P1", 3);
fAddActiveElement(_global.C.objPlug3P1);
_global.C.objPlug4P1 = new G9_objPlug(_global.mcLevelScreen.objPlug4P1, "P1", 4);
fAddActiveElement(_global.C.objPlug4P1);
_global.C.objPlug5P1 = new G9_objPlug(_global.mcLevelScreen.objPlug5P1, "P1", 5);
fAddActiveElement(_global.C.objPlug5P1);
_global.C.objPlug6P1 = new G9_objPlug(_global.mcLevelScreen.objPlug6P1, "P1", 6);
fAddActiveElement(_global.C.objPlug6P1);
_global.C.objPlug7P1 = new G9_objPlug(_global.mcLevelScreen.objPlug7P1, "P1", 7);
fAddActiveElement(_global.C.objPlug7P1);
_global.C.objPlug8P1 = new G9_objPlug(_global.mcLevelScreen.objPlug8P1, "P1", 8);
fAddActiveElement(_global.C.objPlug8P1);
_global.C.objPlug9P1 = new G9_objPlug(_global.mcLevelScreen.objPlug9P1, "P1", 9);
fAddActiveElement(_global.C.objPlug9P1);
} else {
_global.C.objPlayerP1 = new G9_objPlayer(_global.mcLevelScreen.objPlayerP1, "P1");
fAddActiveElement(_global.C.objPlayerP1);
_global.C.objPlayerP2 = new G9_objPlayer(_global.mcLevelScreen.objPlayerP2, "P2");
fAddActiveElement(_global.C.objPlayerP2);
_global.C.objCursorP1 = new G9_objCursor(_global.mcLevelScreen.objCursorP1, "P1", 83, 68);
fAddActiveElement(_global.C.objCursorP1);
_global.C.objCursorP2 = new G9_objCursor(_global.mcLevelScreen.objCursorP2, "P2", 40, 37);
fAddActiveElement(_global.C.objCursorP2);
_global.C.objBallP1 = new G9_objBall(_global.mcLevelScreen.objBallP1, "P1");
fAddActiveElement(_global.C.objBallP1);
_global.C.objBallP2 = new G9_objBall(_global.mcLevelScreen.objBallP2, "P2");
fAddActiveElement(_global.C.objBallP2);
_global.C.objBallIn1P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn1P1, "P1", 1);
fAddActiveElement(_global.C.objBallIn1P1);
_global.C.objBallIn2P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn2P1, "P1", 2);
fAddActiveElement(_global.C.objBallIn2P1);
_global.C.objBallIn3P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn3P1, "P1", 3);
fAddActiveElement(_global.C.objBallIn3P1);
_global.C.objBallIn4P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn4P1, "P1", 4);
fAddActiveElement(_global.C.objBallIn4P1);
_global.C.objBallIn5P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn5P1, "P1", 5);
fAddActiveElement(_global.C.objBallIn5P1);
_global.C.objBallIn6P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn6P1, "P1", 6);
fAddActiveElement(_global.C.objBallIn6P1);
_global.C.objBallIn7P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn7P1, "P1", 7);
fAddActiveElement(_global.C.objBallIn7P1);
_global.C.objBallIn8P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn8P1, "P1", 8);
fAddActiveElement(_global.C.objBallIn8P1);
_global.C.objBallIn9P1 = new G9_objBallIn(_global.mcLevelScreen.objBallIn9P1, "P1", 9);
fAddActiveElement(_global.C.objBallIn9P1);
_global.C.objBallIn1P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn1P2, "P2", 1);
fAddActiveElement(_global.C.objBallIn1P2);
_global.C.objBallIn2P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn2P2, "P2", 2);
fAddActiveElement(_global.C.objBallIn2P2);
_global.C.objBallIn3P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn3P2, "P2", 3);
fAddActiveElement(_global.C.objBallIn3P2);
_global.C.objBallIn4P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn4P2, "P2", 4);
fAddActiveElement(_global.C.objBallIn4P2);
_global.C.objBallIn5P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn5P2, "P2", 5);
fAddActiveElement(_global.C.objBallIn5P2);
_global.C.objBallIn6P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn6P2, "P2", 6);
fAddActiveElement(_global.C.objBallIn6P2);
_global.C.objBallIn7P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn7P2, "P2", 7);
fAddActiveElement(_global.C.objBallIn7P2);
_global.C.objBallIn8P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn8P2, "P2", 8);
fAddActiveElement(_global.C.objBallIn8P2);
_global.C.objBallIn9P2 = new G9_objBallIn(_global.mcLevelScreen.objBallIn9P2, "P2", 9);
fAddActiveElement(_global.C.objBallIn9P2);
_global.C.objBoardP1 = new G9_objBoard("P1");
fAddActiveElement(_global.C.objBoardP1);
_global.C.objPlug1P1 = new G9_objPlug(_global.mcLevelScreen.objPlug1P1, "P1", 1);
fAddActiveElement(_global.C.objPlug1P1);
_global.C.objPlug2P1 = new G9_objPlug(_global.mcLevelScreen.objPlug2P1, "P1", 2);
fAddActiveElement(_global.C.objPlug2P1);
_global.C.objPlug3P1 = new G9_objPlug(_global.mcLevelScreen.objPlug3P1, "P1", 3);
fAddActiveElement(_global.C.objPlug3P1);
_global.C.objPlug4P1 = new G9_objPlug(_global.mcLevelScreen.objPlug4P1, "P1", 4);
fAddActiveElement(_global.C.objPlug4P1);
_global.C.objPlug5P1 = new G9_objPlug(_global.mcLevelScreen.objPlug5P1, "P1", 5);
fAddActiveElement(_global.C.objPlug5P1);
_global.C.objPlug6P1 = new G9_objPlug(_global.mcLevelScreen.objPlug6P1, "P1", 6);
fAddActiveElement(_global.C.objPlug6P1);
_global.C.objPlug7P1 = new G9_objPlug(_global.mcLevelScreen.objPlug7P1, "P1", 7);
fAddActiveElement(_global.C.objPlug7P1);
_global.C.objPlug8P1 = new G9_objPlug(_global.mcLevelScreen.objPlug8P1, "P1", 8);
fAddActiveElement(_global.C.objPlug8P1);
_global.C.objPlug9P1 = new G9_objPlug(_global.mcLevelScreen.objPlug9P1, "P1", 9);
fAddActiveElement(_global.C.objPlug9P1);
_global.C.objBoardP2 = new G9_objBoard("P2");
fAddActiveElement(_global.C.objBoardP2);
_global.C.objPlug1P2 = new G9_objPlug(_global.mcLevelScreen.objPlug1P2, "P2", 1);
fAddActiveElement(_global.C.objPlug1P2);
_global.C.objPlug2P2 = new G9_objPlug(_global.mcLevelScreen.objPlug2P2, "P2", 2);
fAddActiveElement(_global.C.objPlug2P2);
_global.C.objPlug3P2 = new G9_objPlug(_global.mcLevelScreen.objPlug3P2, "P2", 3);
fAddActiveElement(_global.C.objPlug3P2);
_global.C.objPlug4P2 = new G9_objPlug(_global.mcLevelScreen.objPlug4P2, "P2", 4);
fAddActiveElement(_global.C.objPlug4P2);
_global.C.objPlug5P2 = new G9_objPlug(_global.mcLevelScreen.objPlug5P2, "P2", 5);
fAddActiveElement(_global.C.objPlug5P2);
_global.C.objPlug6P2 = new G9_objPlug(_global.mcLevelScreen.objPlug6P2, "P2", 6);
fAddActiveElement(_global.C.objPlug6P2);
_global.C.objPlug7P2 = new G9_objPlug(_global.mcLevelScreen.objPlug7P2, "P2", 7);
fAddActiveElement(_global.C.objPlug7P2);
_global.C.objPlug8P2 = new G9_objPlug(_global.mcLevelScreen.objPlug8P2, "P2", 8);
fAddActiveElement(_global.C.objPlug8P2);
_global.C.objPlug9P2 = new G9_objPlug(_global.mcLevelScreen.objPlug9P2, "P2", 9);
fAddActiveElement(_global.C.objPlug9P2);
fRemoveUnusedObject(3);
}
}
function fActiveTarget() {
function doActiveTarget(P_player) {
var _local4 = 1;
while (_local4 <= 3) {
var _local3 = 1;
while (_local3 <= 5) {
var _local2 = (((("fish" + P_player) + "_") + _local4) + "_") + _local3;
_global.C[_local2] = new G9_objTarget(_global.mcLevelScreen[_local2]);
fAddActiveElement(_global.C[_local2]);
_local3++;
}
_local4++;
}
}
doActiveTarget("P1");
if (_global.M.G_sPlayMode == "P2") {
doActiveTarget("P2");
}
}
function fAddBonusPointFX(P_nPoint, P_posX, P_posY) {
var _local2 = "mcBonusPoint" + G_nObjectIndent;
var _local3 = _global.mcLevelScreen.attachMovie("mcBonusPoint", _local2, G_nIndexSwapDepth);
_global.C[_local2] = new G9_objBonusPoint(_local3, P_nPoint, P_posY);
fAddActiveElement(_global.C[_local2]);
_local3._x = P_posX;
_local3._y = P_posY;
G_nObjectIndent++;
G_nIndexSwapDepth++;
}
function fRemoveUnusedObject(P_nCase) {
switch (P_nCase) {
case 1 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objCursorP2);
fRemoveInstance(_global.mcLevelScreen.objBallP2);
fRemoveInstance(_global.mcLevelScreen.objBallIn1P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn2P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn3P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn4P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn5P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn6P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn7P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn8P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn9P2);
fRemoveInstance(_global.mcLevelScreen.objBoardP2);
fRemoveInstance(_global.mcLevelScreen.objPlug1P2);
fRemoveInstance(_global.mcLevelScreen.objPlug2P2);
fRemoveInstance(_global.mcLevelScreen.objPlug3P2);
fRemoveInstance(_global.mcLevelScreen.objPlug4P2);
fRemoveInstance(_global.mcLevelScreen.objPlug5P2);
fRemoveInstance(_global.mcLevelScreen.objPlug6P2);
fRemoveInstance(_global.mcLevelScreen.objPlug7P2);
fRemoveInstance(_global.mcLevelScreen.objPlug8P2);
fRemoveInstance(_global.mcLevelScreen.objPlug9P2);
break;
case 2 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1);
fRemoveInstance(_global.mcLevelScreen.objPlayerP2);
fRemoveInstance(_global.mcLevelScreen.objCursorP2);
fRemoveInstance(_global.mcLevelScreen.objBallP2);
fRemoveInstance(_global.mcLevelScreen.objBallIn1P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn2P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn3P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn4P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn5P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn6P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn7P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn8P2);
fRemoveInstance(_global.mcLevelScreen.objBallIn9P2);
fRemoveInstance(_global.mcLevelScreen.objBoardP2);
fRemoveInstance(_global.mcLevelScreen.objPlug1P2);
fRemoveInstance(_global.mcLevelScreen.objPlug2P2);
fRemoveInstance(_global.mcLevelScreen.objPlug3P2);
fRemoveInstance(_global.mcLevelScreen.objPlug4P2);
fRemoveInstance(_global.mcLevelScreen.objPlug5P2);
fRemoveInstance(_global.mcLevelScreen.objPlug6P2);
fRemoveInstance(_global.mcLevelScreen.objPlug7P2);
fRemoveInstance(_global.mcLevelScreen.objPlug8P2);
fRemoveInstance(_global.mcLevelScreen.objPlug9P2);
break;
case 3 :
fRemoveInstance(_global.mcLevelScreen.objPlayerP1P);
}
}
function fAddActiveElement(P_objRef) {
G_aActiveElement.push(P_objRef);
}
function fCheckActiveElement() {
for (var _local1 in G_aActiveElement) {
if (G_aActiveElement[_local1] != undefined) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fCheckElementUnpausable() {
for (var _local1 in G_aActiveElement) {
if ((G_aActiveElement[_local1].bUnpausable == true) && (G_aActiveElement[_local1].bUnpausable != undefined)) {
G_aActiveElement[_local1].fDoAction();
}
}
}
function fRemoveActiveElement(P_objName, P_sNameArray) {
var _local3;
if (P_sNameArray == undefined) {
P_sNameArray = "G_aActiveElement";
}
for (var _local5 in this[P_sNameArray]) {
if (this[P_sNameArray][_local5].mcRef._name == P_objName) {
_local3 = _local5;
break;
}
}
this[P_sNameArray].splice(_local3, 1);
delete this[P_objName];
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(G_nIndexSwapDepthDeleting);
G_nIndexSwapDepthDeleting++;
P_mcRef.removeMovieClip();
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
fAddActiveElement(_global.C[P_mcRef._name]);
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
var _local3 = "objBubble" + _global.C.G_nObjectIndent;
_global.C.G_nObjectIndent++;
var _local2 = _global.mcLevelScreen.attachMovie("mcBubble", _local3, _global.C.G_nIndexSwapDepthBubble);
_local2._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local2._y = P_mcRef._y;
_global.C.G_nIndexSwapDepthBubble++;
if (_global.C.G_nIndexSwapDepthBubble > 12000) {
_global.C.G_nIndexSwapDepthBubble = 10000;
}
fAddBubble(_local2, P_sBubbleType);
}
_visible = false;
_global.C = this;
var G_nGameScorePlayer1 = 0;
var G_nGameScorePlayer2 = 0;
var G_bInit = false;
var G_bAllObjectActivated = false;
var G_aActiveElement = [];
var G_nObjectIndent = 1;
var G_nIndexSwapDepth = 100000;
var G_nIndexSwapDepthBubble = 10000;
var G_nIndexSwapDepthDeleting = 800000;
var G_nTieTime = 0;
var objPopup = new objPopup(_global.M.mcRef.objPopup);
fAddActiveElement(objPopup);
var objHUD = new objHUD(_global.M.mcRef.objHUD);
_global.C.fInitGameplay();
}
onClipEvent (enterFrame) {
if ((G_bInit == true) && (G_bAllObjectActivated == false)) {
switch (_global.M.G_sCurrentGame) {
case "Selection" :
fLoadBtnSetting();
G_bAllObjectActivated = true;
_global.M.fUnPause();
break;
case "G1" :
fActiveSunday();
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G2" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G3" :
fActivePlayers();
fActiveLevel();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G4" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G5" :
fActivePlayers();
fActiveLevel();
fActiveHoles();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G6" :
fActivePlayers();
fActiveTarget();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G7" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G8" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
break;
case "G9" :
fActivePlayers();
G_bAllObjectActivated = true;
_global.M.fPause(false);
}
} else if ((G_bInit == true) && (G_bAllObjectActivated)) {
if (_global.M.bPaused == false) {
fCheckActiveElement();
} else {
fCheckElementUnpausable();
}
}
}
onClipEvent (keyDown) {
if ((!_global.M.bPaused) && (!_global.M.bKeyPaused)) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objCursorP1.fCheckKeyPressed();
} else {
_global.C.objCursorP1.fCheckKeyPressed();
_global.C.objCursorP2.fCheckKeyPressed();
}
}
}
onClipEvent (keyUp) {
if (_global.M.G_sPlayMode == "P1") {
_global.C.objCursorP1.fCheckKeyUnPressed();
} else {
_global.C.objCursorP1.fCheckKeyUnPressed();
_global.C.objCursorP2.fCheckKeyUnPressed();
}
}
Frame 20
_global.M.fDoSectionActions("ResetGame");
Frame 21
_global.M.fDoSectionActions("ResetMainVar");
Symbol 4 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
Symbol 37 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.M.fUnPause();
}
Symbol 43 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.M.fReturnSelection();
_global.C.objHUD.fEnableButton(true);
_global.C.objPopup.fSetState("Idle");
}
Symbol 48 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.C.objPopup.fConfirmQuit();
}
Symbol 54 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.M.fHelp();
}
Symbol 60 Button
on (release) {
_global.objSnd.fDoMute();
nextFrame();
}
Symbol 64 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 1
stop();
Symbol 69 Button
on (release) {
_global.objSnd.fUndoMute();
prevFrame();
}
Symbol 70 MovieClip Frame 1
stop();
Instance of Symbol 64 MovieClip in Symbol 70 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 68 MovieClip in Symbol 70 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 64 MovieClip in Symbol 70 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 68 MovieClip in Symbol 70 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 77 MovieClip Frame 1
pts = _global.M.fTotScoreEndGame(this._name);
Symbol 87 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.M.fQuit();
_global.C.objPopup.fSetState("Idle");
}
Symbol 90 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.C.objPopup.fNoQuit();
}
Symbol 91 MovieClip Frame 1
stop();
if (_global.M.G_sPlayMode == "P1") {
mcHighScoreP2._visible = false;
mcHighScoreP1.sScore = _global.M.fStyleNumber(_global.M.fLoadHSSOMode("Player1"), 6);
} else {
mcHighScoreP1.sScore = _global.M.fStyleNumber(_global.M.fLoadHSSOMode("Player1"), 6);
mcHighScoreP2.sScore = _global.M.fStyleNumber(_global.M.fLoadHSSOMode("Player2"), 6);
}
Instance of Symbol 70 MovieClip in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
if (_global.objSnd.Mute) {
this.gotoAndStop("Off");
}
}
Symbol 91 MovieClip Frame 2
stop();
Symbol 93 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.C.objPopup.fSetState("MenuOpen");
}
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 7
if (_global.M.G_sCurrentCharacter == "Patrick") {
nextFrame();
} else {
stop();
}
Symbol 193 MovieClip Frame 23
if (_global.M.G_sCurrentCharacter == "Patrick") {
nextFrame();
} else {
stop();
}
Symbol 214 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_Gary1", 100, 1);
Symbol 214 MovieClip Frame 21
_global.objSnd.fPlaySounds("sFx_Gary1", 100, 1);
Symbol 214 MovieClip Frame 41
_global.objSnd.fPlaySounds("sFx_Gary1", 100, 1);
Symbol 214 MovieClip Frame 61
_global.objSnd.fPlaySounds("sFx_Gary2", 100, 1);
Symbol 214 MovieClip Frame 81
_global.objSnd.fPlaySounds("sFx_Gary1", 100, 1);
Symbol 214 MovieClip Frame 101
_global.objSnd.fPlaySounds("sFx_Gary1", 100, 1);
Symbol 214 MovieClip Frame 121
_global.objSnd.fPlaySounds("sFx_Gary1", 100, 1);
Symbol 214 MovieClip Frame 141
_global.objSnd.fPlaySounds("sFx_Gary2", 100, 1);
Symbol 219 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.C.objPopup.startGame();
btnResume._visible = false;
}
Symbol 220 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.C.objPopup.startGame();
btnResume._visible = false;
puff._visible = false;
}
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 7
if (_global.M.G_sCurrentCharacter == "Patrick") {
nextFrame();
} else {
stop();
}
Symbol 221 MovieClip Frame 23
if (_global.M.G_sCurrentCharacter == "Patrick") {
nextFrame();
} else {
stop();
}
Symbol 238 MovieClip Frame 11
stop();
Symbol 263 MovieClip Frame 13
stop();
Symbol 282 MovieClip Frame 13
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 1
stop();
_global.C.objPopup.fGetWinnerState();
Symbol 286 MovieClip Frame 3
stop();
_global.C.objPopup.fGetWinnerState();
Symbol 287 MovieClip Frame 1
_visible = false;
stop();
Symbol 287 MovieClip Frame 2
_visible = true;
Symbol 287 MovieClip Frame 104
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 3
mcState.gotoAndStop(_global.M.G_sCurrentGame);
Symbol 298 MovieClip Frame 5
mcState.gotoAndStop(_global.M.G_sCurrentGame + _global.M.G_sPlayMode);
Symbol 298 MovieClip Frame 6
mcBoard.gotoAndStop(_global.M.G_sCurrentGame + _global.M.G_sPlayMode);
Instance of Symbol 214 MovieClip "mcState" in Symbol 298 MovieClip Frame 6
onClipEvent (load) {
stop();
}
Symbol 2476 MovieClip [__Packages.objState] Frame 0
class objState extends MovieClip
{
var mcRef, bUnpausable, sState, nFrTotalAnim;
function objState (P_mcRef) {
super();
mcRef = P_mcRef;
bUnpausable = false;
}
function fDoAction() {
}
function fPause() {
mcRef.mcState.stop();
}
function fUnPause() {
mcRef.mcState.play();
}
function fSetState(P_sState) {
if (sState != P_sState) {
sState = P_sState;
mcRef.gotoAndStop(sState);
nFrTotalAnim = mcRef.mcState._totalframes;
fDoStateInit(sState);
}
}
function fDoStateInit() {
}
function get _sState() {
return(sState);
}
}
Symbol 2477 MovieClip [__Packages.objGameParam] Frame 0
class objGameParam extends objState
{
var mcRef, G_sCurrentGame, G_sPlayMode, bAbleToPause, bPaused, nStageWidth, nStageHeight, nStageFPS, sCurrentSection, G_nScorePlayer1, G_nScorePlayer2, G_sCurrentCharacter, G_sLeftDefCharacter, fSetState, bKeyPaused;
function objGameParam (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
fInitGameMain();
}
function fCreateHSSO(P_sScore, P_sPlayerUsed) {
var _local4 = "objSOFestival";
var _local3 = (((playMode() + "_") + G_sCurrentGame) + "_") + P_sPlayerUsed;
var _local2 = SharedObject.getLocal(_local4, "/");
if ((P_sScore > _local2.data[_local3]) || (_local2.data[_local3] == undefined)) {
_local2.data[_local3] = P_sScore;
}
_local2.flush();
}
function fLoadHSSOMode(P_sPlayerUsed, P_nCurrrentGame) {
var _local3 = "objSOFestival";
var _local5 = (((playMode() + "_G") + P_nCurrrentGame) + "_") + P_sPlayerUsed;
var _local4 = SharedObject.getLocal(_local3, "/");
var _local2 = _local4.data[_local5];
return(((_local2 == undefined) ? 0 : (_local2)));
}
function fTotScoreEndGame(P_Side) {
var _local4 = _global.M.fSubLastNumberChar(_global.M.G_sCurrentGame);
var _local3 = Number(_local4);
if (P_Side == "left") {
return(fLoadHSSOMode(_global.M.G_sCurrentCharacter, _local3));
}
return(fLoadHSSOMode("Patrick", _local3));
}
function playMode() {
if (G_sPlayMode == "P1") {
return("1P");
}
return("2P");
}
function fInitGameMain() {
bAbleToPause = true;
bPaused = true;
nStageWidth = 600;
nStageHeight = 300;
nStageFPS = 35;
sCurrentSection = "TitleScreen";
G_nScorePlayer1 = 0;
G_nScorePlayer2 = 0;
G_sPlayMode = "P1";
G_sCurrentCharacter = "SpongeBob";
G_sLeftDefCharacter = "Patrick";
G_sCurrentGame = "Selection";
}
function fDoSectionActions(P_sSection, P_mcScreen) {
fSetSection(P_sSection);
switch (P_sSection) {
case "LoadingScreen" :
_global.objLoad = new objLoader(mcRef, mcRef.mcLoadingScreen, "sPercent", mcRef.mcLoadingScreen.mcLoadBar);
break;
case "TitleScreen" :
delete _global.objLoad;
if (_global.objTrans == undefined) {
_global.objTrans = new objTransition(mcRef.mcTransition);
}
if (_global.objSnd.bMusicPackPlaying == false) {
stopAllSounds();
_global.objSnd.bMusicPackPlaying = true;
_global.objSnd.fPlaySounds("sMu_Pack", 80, 99999);
}
break;
case "SelectionScreen" :
break;
case "LevelScreen" :
break;
case "ResetGame" :
fSetState("SelectionScreen");
break;
case "ResetMainVar" :
fInitGameMain();
fSetState("TitleScreen");
}
}
function fPause(P_bShowHelp) {
bPaused = true;
bKeyPaused = true;
for (var _local3 in _global.C.G_aActiveElement) {
if (_global.C.G_aActiveElement[_local3] != undefined) {
_global.C.G_aActiveElement[_local3].fPause();
}
}
_global.C.objHUD.fPause();
if ((P_bShowHelp == true) || (P_bShowHelp == undefined)) {
_global.C.objPopup.fSetState("Help");
}
}
function fUnPause() {
bPaused = false;
bKeyPaused = false;
for (var _local3 in _global.C.G_aActiveElement) {
if (_global.C.G_aActiveElement[_local3] != undefined) {
_global.C.G_aActiveElement[_local3].fUnPause();
}
}
_global.C.objHUD.fUnPause();
_global.C.objPopup.fSetState("Idle");
}
function fManageEndLevel(P_nPlayer) {
fPause(false);
_global.C.objPopup.fSetState("EndLevel");
}
function fEndTieGame() {
_global.M.fPause(false);
_global.C.G_nTieTime = 2;
_global.C.objPopup.fSetState("StartTie");
}
function fPlayGame() {
fPause(false);
_global.objTrans.fSetTransition(G_sCurrentGame, true);
}
function fWin() {
if (_global.M.G_sPlayMode == "P1") {
_global.M.G_nScorePlayer1 = _global.M.G_nScorePlayer1 + _global.C.G_nGameScorePlayer1;
fCreateHSSO(_global.C.G_nGameScorePlayer1, G_sCurrentCharacter);
} else {
_global.M.G_nScorePlayer1 = _global.M.G_nScorePlayer1 + _global.C.G_nGameScorePlayer1;
_global.M.G_nScorePlayer2 = _global.M.G_nScorePlayer2 + _global.C.G_nGameScorePlayer2;
fCreateHSSO(_global.C.G_nGameScorePlayer1, G_sCurrentCharacter);
fCreateHSSO(_global.C.G_nGameScorePlayer2, G_sLeftDefCharacter);
}
G_sCurrentGame = "Selection";
_global.objTrans.fSetTransition("SelectionScreen", true);
}
function fQuit() {
fPause(false);
_global.objTrans.fSetTransition("ResetMainVar", true);
}
function fReturnSelection() {
fPause(false);
G_sCurrentGame = "Selection";
_global.objTrans.fSetTransition("ResetGame", true);
}
function fHelp() {
fPause(true);
}
function fPlayAgain() {
_global.objTrans.fSetTransition("UnloadVar", false);
}
function fMenu() {
if (bAbleToPause == true) {
fPause(false);
_global.C.objPopup.fSetState("StartMenu");
}
}
function fSetSection(P_sSection) {
sCurrentSection = P_sSection;
}
function fStyleNumber(l_nNumber, l_nMinimumChar) {
var _local6 = false;
var _local1 = String(l_nNumber);
var _local7 = _local1;
do {
if (_local1.length < l_nMinimumChar) {
_local6 = true;
_local7 = "0" + _local7;
}
} while (_local7.length < l_nMinimumChar);
_local1 = _local7;
var _local3 = "";
var _local5 = _local1.length;
_local5 = _local5 / 3;
if (_local5 <= 1) {
return(_local1);
}
var _local2 = _local5;
while (_local2 > 1) {
_local3 = (" " + _local1.substr(-3)) + _local3;
_local1 = _local1.substr(0, -3);
_local2--;
}
_local7 = _local1 + _local3;
return(_local7);
}
function fSubLastNumberChar(_sString) {
var _local3 = "";
var _local4 = _sString.length;
var _local1 = _local4 - 1;
while (_local1 >= 0) {
var _local2 = _sString.charAt(_local1);
if (isNaN(_local2)) {
return(_local3);
}
_local3 = _local2 + _local3;
_local1--;
}
}
function fSetHitTint(P_mcRef, P_sMode) {
switch (P_sMode) {
case "good" :
var _local1 = {ra:"100", rb:"-255", ga:"100", gb:"255", ba:"100", bb:"-255", aa:"100", ab:"0"};
break;
case "wrong" :
_local1 = {ra:"100", rb:"255", ga:"100", gb:"-255", ba:"100", bb:"-255", aa:"100", ab:"0"};
}
var _local2 = new Color(P_mcRef);
var _local3 = _local1;
_local2.setTransform(_local3);
}
}
Symbol 2478 MovieClip [__Packages.objLoader] Frame 0
class objLoader
{
var mcRefToLoad, mcRef, sTextField, mcAnimation, nDelayToDo, nDelayDone;
function objLoader (P_mcRefToLoad, P_mcRef, P_sTextField, P_mcAnimation) {
mcRefToLoad = P_mcRefToLoad;
mcRef = P_mcRef;
sTextField = P_sTextField;
mcAnimation = P_mcAnimation;
nDelayToDo = 5;
nDelayDone = 0;
mcRef.onEnterFrame = fPreloadGame;
}
function fPreloadGame() {
var _local2;
_local2 = (_global.objLoad.mcRefToLoad.getBytesLoaded() / _global.objLoad.mcRefToLoad.getBytesTotal()) * 100;
if (_local2 != 100) {
_local2 = Math.floor(_local2);
if (_global.objLoad.sTextField != undefined) {
_global.objLoad.mcRef[_global.objLoad.sTextField] = _local2;
}
if (_global.objLoad.mcAnimation != undefined) {
_global.objLoad.mcAnimation.gotoAndStop(_local2);
}
} else {
if (_global.objLoad.sTextField != undefined) {
_global.objLoad.mcRef[_global.objLoad.sTextField] = "100";
}
if (_global.objLoad.mcAnimation != undefined) {
_global.objLoad.mcAnimation.gotoAndStop(_global.objLoad.mcRef.mcAnimation._totalframes);
}
_global.objLoad.nDelayDone++;
if (_global.objLoad.nDelayDone >= _global.objLoad.nDelayToDo) {
_global.objLoad.mcRefToLoad.gotoAndStop("ResetMainVar");
}
}
}
}
Symbol 2479 MovieClip [__Packages.objTransition] Frame 0
class objTransition
{
var mcRef, sState, mcInsideMovieClip, sNextFrameLabel, bStopSound;
function objTransition (P_mcRef) {
mcRef = P_mcRef;
fSetState("Idle");
fInitTrans();
}
function fDoAction() {
this[sState]();
}
function fInitTrans() {
mcInsideMovieClip = undefined;
sNextFrameLabel = "";
bStopSound = false;
}
function Idle() {
}
function StartInterScreen() {
if (mcRef.mcState._currentframe >= mcRef.mcState._totalframes) {
fChangeLabel();
fSetState("EndInterScreen");
}
}
function EndInterScreen() {
if (mcRef.mcState._currentframe >= mcRef.mcState._totalframes) {
fSetState("Idle");
}
}
function fSetTransition(P_sNextLabel, P_bStopSound, P_mcInsideMovieClip) {
sNextFrameLabel = P_sNextLabel;
bStopSound = P_bStopSound;
mcInsideMovieClip = P_mcInsideMovieClip;
fSetState("StartInterScreen");
}
function fChangeLabel() {
if (mcInsideMovieClip != undefined) {
var _local3 = mcInsideMovieClip;
_local3.gotoAndStop(sNextFrameLabel);
mcInsideMovieClip = undefined;
} else {
_global.M.fSetState(sNextFrameLabel);
}
}
function fStopSound() {
if (bStopSound == true) {
bStopSound = false;
stopAllSounds();
}
}
function fSetState(P_sState) {
if (P_sState != "Idle") {
sState = P_sState;
mcRef.gotoAndStop(P_sState);
mcRef.onEnterFrame = mx.utils.Delegate.create(this, fDoAction);
} else {
sState = P_sState;
mcRef.gotoAndStop(P_sState);
delete mcRef.onEnterFrame;
}
}
function fDoStateInit() {
switch (sState) {
case "Idle" :
mcRef.stop();
break;
case "StartInterSCreen" :
fStopSound();
mcRef.LockBtn.useHandCursor = false;
break;
case "EndVision" :
}
}
}
Symbol 2480 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 2481 MovieClip [__Packages.objBubble] Frame 0
class objBubble extends objState
{
var mcRef, fSetState, sState, nSpeed;
function objBubble (P_mcRef, P_sTypeBubble) {
super(mcRef);
mcRef = P_mcRef;
fGetRandom();
fSetState("Idle");
mcRef.mcColor.gotoAndStop(P_sTypeBubble);
}
function fDoAction() {
this[sState]();
}
function fGetRandom() {
mcRef._x = mcRef._x + 2;
nSpeed = random(3) + 1;
mcRef._xscale = (mcRef._yscale = random(90) + 10);
}
function Idle() {
fMove();
}
function fMove() {
mcRef._y = mcRef._y - nSpeed;
mcRef._xscale = (mcRef._yscale = mcRef._yscale - (random(3) + 1));
if (mcRef._xscale <= 5) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
}
}
Symbol 2482 MovieClip [__Packages.objHUD] Frame 0
class objHUD extends objState
{
var mcRef, fSetState;
function objHUD (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
fSetState(_global.M.G_sCurrentGame + _global.M.G_sPlayMode);
}
function fDoAction() {
}
function fInitHUD() {
if (_global.M.sCurrentSection == "SelectionScreen") {
fSetPoint("Player1");
fSetPoint("Player2");
} else {
fSetGamePoint("Player1");
fSetGamePoint("Player2");
}
fSetPlayerName();
}
function fSetPoint(P_sPlayer) {
mcRef["sScore" + P_sPlayer] = _global.M.fStyleNumber(_global.M["G_nScore" + P_sPlayer]);
}
function fSetGamePoint(P_sPlayer) {
mcRef["sScore" + P_sPlayer] = _global.M.fStyleNumber(_global.C["G_nGameScore" + P_sPlayer]);
}
function fSetPlayerName(P_sPlayer) {
mcRef.sCharacter = _global.M.G_sCurrentCharacter + " :";
}
function fEnableButton(P_bEnable) {
mcRef.btnMenu.enabled = P_bEnable;
}
function fSetTimer() {
var _local5 = _global.C.G_aDefaultTimer[0];
var _local4 = _global.C.G_aDefaultTimer[1];
var _local3 = _global.C.G_aDefaultTimer[2];
mcRef.sTimer = (_global.M.fStyleNumber(_local4, 2) + ":") + _global.M.fStyleNumber(_local3, 2);
_global.C.objTimer.fSetTimer(_local5, _local4, _local3, 0, false, mcRef);
}
function fPause() {
var _local2 = 1;
while (_local2 <= 3) {
mcRef["mcHudItem_" + _local2].stop();
_local2++;
}
}
function fUnPause() {
var _local2 = 1;
while (_local2 <= 3) {
mcRef["mcHudItem_" + _local2].play();
_local2++;
}
}
function fSetSunday(P_sPlayer) {
mcRef["sSunday" + P_sPlayer] = _global.M.fStyleNumber(_global.C["G_nSunday" + P_sPlayer], 2);
}
function fSetMultiplier(P_sPlayer) {
mcRef.sMultiplier = _global.M.fStyleNumber(_global.C.G_nTugMeterMultifier, 2);
}
function fInitTugMeter() {
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
mcRef.mcTug.mcTugMeter.gotoAndStop(_global.C.G_nMidFrame);
} else {
mcRef.mcTug.mcTugMeter.gotoAndStop(_global.C.G_nP1Frame);
}
} else {
mcRef.mcTug.mcTugMeter.gotoAndStop(_global.C.G_nMidFrame);
}
}
function fChangeTugMeter(P_sPlayer) {
if (P_sPlayer == "Player1") {
var _local3 = mcRef.mcTug.mcTugMeter._currentframe + (1 * _global.C.G_nTugMeterMultifier);
if (_local3 > mcRef.mcTug.mcTugMeter._totalframes) {
_local3 = mcRef.mcTug.mcTugMeter._totalframes;
}
mcRef.mcTug.mcTugMeter.gotoAndStop(_local3);
} else {
var _local3 = mcRef.mcTug.mcTugMeter._currentframe - (1 * _global.C.G_nTugMeterMultifier);
if (_local3 < 1) {
_local3 = 1;
}
mcRef.mcTug.mcTugMeter.gotoAndStop(_local3);
}
if ((_global.M.G_sPlayMode == "P1") && (mcRef.mcTug.mcTugMeter._currentframe > _global.C.G_nMidFrame)) {
mcRef.mcTug.mcTugMeter.gotoAndStop(_global.C.G_nMidFrame);
}
_global.C.fValidTugMeter(P_sPlayer);
}
function fSetRing(P_sPlayer) {
mcRef["sRing" + P_sPlayer] = _global.M.fStyleNumber(_global.C["G_nRing" + P_sPlayer], 2);
}
function fSetPotato(P_nNbPotato, P_sPlayer) {
mcRef["sPotato" + P_sPlayer] = _global.M.fStyleNumber(P_nNbPotato, 2);
}
}
Symbol 2483 MovieClip [__Packages.objPopup] Frame 0
class objPopup extends objState
{
var mcRef, sCurrentWinner, WinnerStateDone, bUnpausable, fSetState, sState, nFrTotalAnim;
function objPopup (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
sCurrentWinner = "Player1";
WinnerStateDone = false;
bUnpausable = true;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
fBlockMouse();
}
function StartMenu() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("MenuOpen");
}
}
function MenuOpen() {
}
function EndMenu() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fUnPause();
}
}
function Help() {
}
function Intro() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fUnPause();
}
}
function EndLevel() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fWin();
fSetState("Idle");
}
}
function StartTie() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nTieTime > 1) {
if (_global.C.G_nGameScorePlayer1 == 0) {
fSetState("TieOpenLose");
} else {
fSetState("TieOpenLast");
}
} else {
fSetState("TieOpen");
}
}
}
function TieOpen() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("EndTie");
}
}
function TieOpenLast() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fWin();
fSetState("Idle");
}
}
function TieOpenLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fWin();
fSetState("Idle");
}
}
function EndTie() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fUnPause();
}
}
function fSetWinner(P_nWinner) {
sCurrentWinner = P_nWinner;
}
function fGetWinnerState() {
if (_global.M.G_sPlayMode == "P1") {
mcRef.mcState.mcBoard.gotoAndStop("Clear");
mcRef.mcState.gotoAndPlay(2);
} else if (sCurrentWinner == "Player1") {
mcRef.mcState.mcBoard.gotoAndStop("Win");
mcRef.mcState.gotoAndPlay(2);
mcRef.mcState2.mcBoard.gotoAndStop("Lose");
mcRef.mcState2.gotoAndPlay(2);
} else {
mcRef.mcState.mcBoard.gotoAndStop("Lose");
mcRef.mcState.gotoAndPlay(2);
mcRef.mcState2.mcBoard.gotoAndStop("Win");
mcRef.mcState2.gotoAndPlay(2);
}
if (!WinnerStateDone) {
WinnerStateDone = true;
fFindPrize();
mcRef.mcState.mcBoard.sScorePlayer = _global.C.G_nGameScorePlayer1;
mcRef.mcState2.mcBoard.sScorePlayer = _global.C.G_nGameScorePlayer2;
}
}
function fPause() {
}
function fUnPause() {
}
function fBlockMouse() {
if ((mcRef.mcBlocker.useHandCursor == true) && (sState != "Idle")) {
mcRef.mcBlocker.useHandCursor = false;
}
}
function fConfirmQuit() {
mcRef.mcState.gotoAndStop("Quit");
}
function fNoQuit() {
var _local3 = ((_global.M.G_sCurrentGame != "Selection") ? "Game" : "Selection");
mcRef.mcState.gotoAndStop(_local3);
}
function fFindPrize() {
var _local5 = ((sCurrentWinner == "Player1") ? "left" : "right");
var _local3 = _global.M.fTotScoreEndGame(_local5);
if (sCurrentWinner == "Player1") {
if (_global.C.G_nGameScorePlayer1 > _local3) {
mcRef.mcState.mcBoard.mcPrize.gotoAndStop("BigPrize");
_global.objSnd.fPlaySounds("sFx_AddTime", 100, 1);
} else if (_global.C.G_nGameScorePlayer1 != 0) {
var _local4 = randomNumber(1, 2);
mcRef.mcState.mcBoard.mcPrize.gotoAndStop("MedPrize_" + _local4);
_global.objSnd.fPlaySounds("sFx_AddTime", 100, 1);
}
} else if (_global.C.G_nGameScorePlayer2 > _local3) {
mcRef.mcState2.mcBoard.mcPrize.gotoAndStop("BigPrize");
_global.objSnd.fPlaySounds("sFx_AddTime", 100, 1);
} else if (_global.C.G_nGameScorePlayer2 != 0) {
var _local4 = randomNumber(1, 2);
mcRef.mcState2.mcBoard.mcPrize.gotoAndStop("MedPrize_" + _local4);
_global.objSnd.fPlaySounds("sFx_AddTime", 100, 1);
}
}
function randomNumber(min, max) {
var _local1 = Math.round(Math.random() * (max - min)) + min;
return(_local1);
}
function startGame() {
mcRef.mcState.play();
}
}
Symbol 2484 MovieClip [__Packages.objBtnSelect] Frame 0
class objBtnSelect
{
var nGameRef, bActive, mcRef, objName;
function objBtnSelect (P_mcRef, P_GameRef, P_Active) {
nGameRef = P_GameRef;
bActive = P_Active;
mcRef = P_mcRef;
mcRef.objName = mcRef._name;
mcRef.onRelease = fRelease;
mcRef.onRollOver = fRollOver;
mcRef.onRollOut = (mcRef.onReleaseOutside = fRollOut);
}
function fRelease() {
if (_global.M.bPaused == false) {
if (_global.C[objName].bActive) {
_global.M.G_sCurrentGame = "G" + _global.C[objName].nGameRef;
_global.M.fPlayGame();
}
}
}
function fRollOver() {
if (_global.M.bPaused == false) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver2", 70, 1);
if (_global.C[objName].bActive) {
_global.M.mcRef.mcSelectionScreen.mcGameInfo.gotoAndStop("Game" + _global.C[objName].nGameRef);
} else {
_global.C[objName].mcRef.useHandCursor = false;
_global.M.mcRef.mcSelectionScreen.mcGameInfo.gotoAndStop(("Game" + _global.C[objName].nGameRef) + "Soon");
}
}
}
function fRollOut() {
if (_global.M.bPaused == false) {
_global.M.mcRef.mcSelectionScreen.mcGameInfo.gotoAndStop("Empty" + _global.M.G_sPlayMode);
}
}
}
Symbol 2485 MovieClip [__Packages.G1_objSunday] Frame 0
class G1_objSunday extends objState
{
var mcRef, sPlayerRef, nSundayLevel, fSetState, sState, nFrTotalAnim;
function G1_objSunday (P_mcRef, P_sPlayerRef) {
super(mcRef);
mcRef = P_mcRef;
sPlayerRef = P_sPlayerRef;
nSundayLevel = 0;
fSetState("Level" + nSundayLevel);
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Level5() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nSundayLevel = 0;
fSetState("Level" + nSundayLevel);
_global.C.fAddSunday(sPlayerRef, 1);
_global.C.fAddPoint(sPlayerRef, 500);
}
}
function fAddLevel() {
nSundayLevel++;
fSetState("Level" + nSundayLevel);
_global.C.fAddPoint(sPlayerRef, 100);
}
}
Symbol 2486 MovieClip [__Packages.objTimer] Frame 0
class objTimer extends objState
{
var mcRef, fSetState, sState, nDelay, nTimeForLevel, nTickTime, mcRefToSet, nHour, nMinute, nSeconde, nCentieme, bShowCentieme, nTimerRef;
function objTimer (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
fSetState("Stop");
}
function fDoAction() {
this[sState]();
}
function Idle() {
var _local3 = Math.round(1000 / _global.M.nStageFPS);
nDelay++;
fAddTime(-_local3);
nTimeForLevel = nTimeForLevel + _local3;
if (nDelay == 2) {
nDelay = 0;
fSetTimeStyle();
}
}
function fAddTime(P_nTime) {
nTickTime = nTickTime + P_nTime;
}
function fSetTimer(P_nHour, P_nMinute, P_nSeconde, P_nCentieme, P_bShowCentieme, P_mcRef) {
nDelay = 0;
nTickTime = 0;
mcRefToSet = P_mcRef;
nHour = P_nHour;
nMinute = P_nMinute;
nSeconde = P_nSeconde;
nCentieme = P_nCentieme;
bShowCentieme = P_bShowCentieme;
fGetTickTime();
nTimerRef = 0;
nTimeForLevel = 0;
fSetState("Idle");
}
function fSetTimeStyle() {
var _local4 = "";
var _local5 = "";
var _local6 = "";
var _local7 = "";
var _local3 = nTickTime;
if (_local3 >= 0) {
if (_local3 >= 3600000) {
_local4 = Math.floor(_local3 / 3600000);
_local3 = _local3 - (_local4 * 3600000);
nHour = _local4;
_local4 = _global.M.fStyleNumber(_local4, 2);
}
if (_local3 >= 60000) {
_local5 = Math.floor(_local3 / 60000);
_local3 = _local3 - (_local5 * 60000);
nMinute = _local5;
_local5 = _global.M.fStyleNumber(_local5, 2);
} else {
nMinute = 0;
_local5 = "00";
}
if (_local3 >= 1000) {
_local6 = Math.floor(_local3 / 1000);
_local3 = _local3 - (_local6 * 1000);
nSeconde = _local6;
_local6 = _global.M.fStyleNumber(_local6, 2);
} else {
nSeconde = 0;
_local6 = "00";
}
if ((_local3 > 10) && (bShowCentieme == true)) {
_local7 = Math.floor(_local3 / 10);
_local3 = _local3 - (_local7 * 10);
nCentieme = _local7;
_local7 = _global.M.fStyleNumber(_local7, 2);
}
var _local8 = "";
if (_local4 != "") {
_local8 = _local4 + ":";
}
_local8 = _local8 + ((_local5 + ":") + _local6);
if (bShowCentieme == true) {
_local8 = _local8 + (":" + _local7);
}
mcRefToSet.sTimer = _local8;
} else {
var _local8 = 0;
nTickTime = 0;
mcRefToSet.sTimer = "00:00";
_global.C.fTimeOut();
}
}
function fGetTickTime() {
nTickTime = nTickTime + (nHour * 3600000);
nTickTime = nTickTime + (nMinute * 60000);
nTickTime = nTickTime + (nSeconde * 1000);
nTickTime = nTickTime + (nCentieme * 10);
}
function get _tMin() {
return(nMinute);
}
function get _tSec() {
return(nSeconde);
}
}
Symbol 2487 MovieClip [__Packages.G1_objPlayer] Frame 0
class G1_objPlayer extends objState
{
var mcRef, sPlayerLetter, mcKeyReelRef, mcSundayRef, nPlayerLetterMaxLength, fSetState, sState, nFrTotalAnim, fPause;
function G1_objPlayer (P_mcRef, P_sPlayerLetter, P_mcKeyReelRef, P_mcSundayRef) {
super(mcRef);
mcRef = P_mcRef;
sPlayerLetter = P_sPlayerLetter;
mcKeyReelRef = P_mcKeyReelRef;
mcSundayRef = P_mcSundayRef;
nPlayerLetterMaxLength = Math.floor(sPlayerLetter.length / 2);
fSetKeyLetter();
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Good1() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C[mcSundayRef._name].fAddLevel();
fSetState("Idle");
}
}
function Good2() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C[mcSundayRef._name].fAddLevel();
fSetState("Idle");
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else if (_global.C.G_nTieTime == 1) {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
function fCheckKey() {
if (((_global.C[mcSundayRef._name].nSundayLevel + 1) < 6) || (_global.C[mcSundayRef._name].sState != "Level5")) {
var _local3 = String.fromCharCode(Key.getCode());
if (sPlayerLetter.indexOf(_local3) != -1) {
fValidKeyPosition(_local3);
}
}
}
function fValidKeyPosition(P_sCurrentKey) {
if (mcKeyReelRef.mcKey1.sLetter == P_sCurrentKey) {
if ((sState == "Good1") || (sState == "Good2")) {
if (_global.C[mcSundayRef._name].nSundayLevel <= 3) {
_global.C[mcSundayRef._name].fAddLevel();
fMoveLetter();
}
if ((nPlayerLetterMaxLength < Math.floor(sPlayerLetter.length)) && ((_global.C[mcSundayRef._name].nSundayLevel + 1) == 5)) {
nPlayerLetterMaxLength++;
}
} else {
fSetState("Good" + (random(2) + 1));
fMoveLetter();
fMakeBubble();
if ((nPlayerLetterMaxLength < Math.floor(sPlayerLetter.length)) && ((_global.C[mcSundayRef._name].nSundayLevel + 1) == 5)) {
nPlayerLetterMaxLength++;
}
_global.objSnd.fPlaySounds("sFx_GoodKey", 150, 1);
}
} else {
_global.objSnd.fPlaySoundsOneT("sFx_BadKey", 100, 1);
}
}
function fSetKeyLetter() {
var _local2 = 1;
while (_local2 < 6) {
mcKeyReelRef["mcKey" + _local2].sLetter = sPlayerLetter.charAt(random(nPlayerLetterMaxLength));
_local2++;
}
}
function fMoveLetter() {
mcKeyReelRef.mcKey1.sLetter = mcKeyReelRef.mcKey2.sLetter;
mcKeyReelRef.mcKey2.sLetter = mcKeyReelRef.mcKey3.sLetter;
mcKeyReelRef.mcKey3.sLetter = mcKeyReelRef.mcKey4.sLetter;
mcKeyReelRef.mcKey4.sLetter = mcKeyReelRef.mcKey5.sLetter;
mcKeyReelRef.mcKey5.sLetter = sPlayerLetter.charAt(random(nPlayerLetterMaxLength));
}
function fMakeBubble() {
var _local3 = 0;
while (_local3 < 7) {
_global.C.fAttachBubble(mcKeyReelRef);
_local3++;
}
}
}
Symbol 2488 MovieClip [__Packages.G2_objPlayer] Frame 0
class G2_objPlayer extends objState
{
var mcRef, sPlayer, nSpeed, mcCrossHairRef, nKeyMove, nKeyShoot, bKeyMovePressed, bKeyShootPressed, gunInHand, shootDone, fSetState, sState, nFrTotalAnim;
function G2_objPlayer (P_mcRef, P_sPlayer, P_nKeyMove, P_nKeyShoot, P_mcCrossHairRef) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nSpeed = 10;
mcCrossHairRef = P_mcCrossHairRef;
nKeyMove = P_nKeyMove;
nKeyShoot = P_nKeyShoot;
bKeyMovePressed = false;
bKeyShootPressed = false;
gunInHand = false;
shootDone = false;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
fManageKeyAction();
}
function TakeGun() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Target");
gunInHand = true;
}
}
function Target() {
fManageKeyAction();
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else if (_global.C.G_nTieTime == 1) {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
function fManageKeyAction() {
if (gunInHand) {
if (bKeyMovePressed) {
fMove();
} else if (bKeyShootPressed) {
fShoot();
}
} else if (bKeyMovePressed) {
fSetState("TakeGun");
}
}
function fMove() {
if ((mcCrossHairRef._y - nSpeed) < _global.C.G_nLimitTop) {
mcRef.mcArm._rotation = 0;
mcCrossHairRef._y = _global.C.G_nLimitBottom;
} else {
mcCrossHairRef._y = mcCrossHairRef._y - nSpeed;
mcRef.mcArm._rotation = mcRef.mcArm._rotation - (((sPlayer == "Player1") && (_global.M.G_sCurrentCharacter == "SpongeBob")) ? 3.5 : 3);
}
}
function fShoot() {
var _local5 = ((mcRef.mcArm._currentframe == 1) ? false : true);
if ((!shootDone) && (!_local5)) {
var _local3 = false;
mcRef.mcArm.gotoAndStop("Shoot");
_global.objSnd.fPlaySounds("sFx_GunShoot", 100, 1);
for (var _local4 in _global.C.G_aActiveElement) {
if (_global.C.G_aActiveElement[_local4].bTarget) {
if (_global.C.G_aActiveElement[_local4].mcRef.hitTest(mcCrossHairRef._x, mcCrossHairRef._y, true)) {
_global.C.G_aActiveElement[_local4].fHitTest(sPlayer);
_local3 = true;
}
}
}
if (!_local3) {
fMakeBubble();
}
shootDone = true;
}
}
function fCheckKeyPressed() {
switch (Key.getCode()) {
case nKeyMove :
bKeyMovePressed = true;
break;
case nKeyShoot :
bKeyShootPressed = true;
}
}
function fCheckKeyUnPressed() {
switch (Key.getCode()) {
case nKeyMove :
bKeyMovePressed = false;
bKeyShootPressed = false;
break;
case nKeyShoot :
bKeyShootPressed = false;
shootDone = false;
}
}
function fMakeBubble() {
var _local3 = 0;
while (_local3 < 3) {
_global.C.fAttachBubble(mcCrossHairRef);
_local3++;
}
}
function fPause() {
if (sState == "Target") {
mcRef.mcArm.mcShoot.stop();
} else {
mcRef.mcState.stop();
}
}
function fUnPause() {
if (sState == "Target") {
mcRef.mcArm.mcShoot.play();
} else {
mcRef.mcState.play();
}
}
}
Symbol 2489 MovieClip [__Packages.G2_objLevel] Frame 0
class G2_objLevel
{
var nDelayTargetAppearToDo, nDelayTargetAppearDone;
function G2_objLevel () {
nDelayTargetAppearToDo = 100;
nDelayTargetAppearDone = 75;
}
function fDoAction() {
fManageDelay();
}
function fManageDelay() {
nDelayTargetAppearDone++;
if (nDelayTargetAppearDone >= nDelayTargetAppearToDo) {
nDelayTargetAppearToDo--;
if (nDelayTargetAppearToDo < 25) {
nDelayTargetAppearToDo = 25;
}
nDelayTargetAppearDone = 0;
fAddTarget();
}
}
function fAddTarget() {
switch (random(10)) {
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
var _local2 = "G2_mcTargetBad" + Number(random(_global.C.G_nTargetBad) + 1);
break;
case 7 :
_local2 = "G2_mcTargetGood" + Number(random(_global.C.G_nTargetGood) + 1);
break;
case 8 :
_local2 = "G2_mcTargetAddT";
break;
case 9 :
_local2 = "G2_mcTargetSubT";
}
var _local3 = random(4) + 1;
var _local4 = (_global.C.G_nLimitTop + 25) + random((_global.C.G_nLimitBottom - 25) - (_global.C.G_nLimitTop + 25));
_global.C.fActiveTarget(_local2, 40, _local4, _local3, "Right");
if (_global.M.G_sPlayMode == "P2") {
_local4 = (_global.C.G_nLimitTop + 25) + random((_global.C.G_nLimitBottom - 25) - (_global.C.G_nLimitTop + 25));
_global.C.fActiveTarget(_local2, 550, _local4, _local3, "Left");
}
}
}
Symbol 2490 MovieClip [__Packages.G2_objTarget] Frame 0
class G2_objTarget extends objState
{
var mcRef, sType, nStep, sDirection, nSpeed, bTarget, fSetState, sState, nFrTotalAnim;
function G2_objTarget (P_mcRef, P_sType, P_nStep, P_sDirection) {
super(mcRef);
mcRef = P_mcRef;
sType = P_sType;
nStep = P_nStep;
sDirection = P_sDirection;
nSpeed = random(3) + 3;
mcRef._xscale = (mcRef._yscale = 120 - (nStep * 20));
bTarget = true;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
fMove();
}
function Hit() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
}
function fMove() {
if (sDirection == "Right") {
mcRef._x = mcRef._x + nSpeed;
if (_global.M.G_sPlayMode == "P1") {
if (mcRef._x > 300) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
} else if (mcRef._x > 550) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
} else if (sDirection == "Left") {
mcRef._x = mcRef._x - nSpeed;
if (mcRef._x < 40) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
}
}
function fHitTest(P_sPlayerRef) {
switch (sType) {
case "G2_mcTargetBad1" :
case "G2_mcTargetBad2" :
case "G2_mcTargetBad3" :
_global.C.fAddPoint(P_sPlayerRef, 100 * nStep);
break;
case "G2_mcTargetGood1" :
_global.objSnd.fPlaySounds("sFx_LoseTime", 100, 1);
_global.C.fAddPoint(P_sPlayerRef, -150 * nStep);
break;
case "G2_mcTargetAddT" :
_global.objSnd.fPlaySounds("sFx_AddTime", 100, 1);
_global.C.objTimer.fAddTime(2000);
break;
case "G2_mcTargetSubT" :
_global.objSnd.fPlaySounds("sFx_LoseTime", 100, 1);
_global.C.objTimer.fAddTime(-5000);
}
bTarget = false;
fMakeBubble();
fSetState("Hit");
_global.objSnd.fPlaySounds("sFx_Hit", 120, 1);
}
function fMakeBubble() {
var _local3 = 0;
while (_local3 < 7) {
_global.C.fAttachBubble(mcRef);
_local3++;
}
}
}
Symbol 2491 MovieClip [__Packages.G3_objPlayer] Frame 0
class G3_objPlayer extends objState
{
var mcRef, sPlayer, nSpeed, nKeyMoveL, nKeyMoveR, bKeyMoveLPressed, bKeyMoveRPressed, bSndMotorON, nDelayStunToDo, nDelayStunDone, fSetState, sState, nFrTotalAnim;
function G3_objPlayer (P_mcRef, P_sPlayer, P_nKeyMoveL, P_nKeyMoveR) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nSpeed = 12;
nKeyMoveL = P_nKeyMoveL;
nKeyMoveR = P_nKeyMoveR;
bKeyMoveLPressed = false;
bKeyMoveRPressed = false;
bSndMotorON = false;
nDelayStunToDo = 100;
nDelayStunDone = 0;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
fManageKeyAction();
fValidHitTest();
fCheckWallSide();
}
function fValidHitTest() {
for (var _local3 in _global.C.G_aActiveElement) {
if (_global.C.G_aActiveElement[_local3].bTarget == true) {
if (mcRef.hitTest(_global.C.G_aActiveElement[_local3].mcRef._x, _global.C.G_aActiveElement[_local3].mcRef._y, true)) {
_global.C.G_aActiveElement[_local3].fHitTest(sPlayer);
}
}
}
}
function fCheckWallSide() {
if (sPlayer == "Player1") {
if (mcRef._x <= (_global.C.G_nLimitLeft + 25)) {
mcRef._x = _global.C.G_nLimitLeft + 25;
} else if (mcRef._x >= (_global.C.G_nLimitRight - 25)) {
mcRef._x = _global.C.G_nLimitRight - 25;
}
} else if (mcRef._x <= (_global.C.G_nLimitRight + 25)) {
mcRef._x = _global.C.G_nLimitRight + 25;
} else if (mcRef._x >= (_global.M.nStageWidth - 25)) {
mcRef._x = _global.M.nStageWidth - 25;
}
}
function Stun() {
fValidHitTest();
nDelayStunDone++;
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("StunIdle");
}
}
function StunIdle() {
fValidHitTest();
nDelayStunDone++;
if (nDelayStunDone >= nDelayStunToDo) {
nDelayStunDone = 0;
fSetState("Idle");
_global.objSnd.fStopSounds("sFx_ElectricShock2");
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.M.fManageEndLevel();
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fPause();
}
}
function fStun() {
fPlayMotorSound(false);
nDelayStunDone = 0;
fSetState("Stun");
}
function fManageKeyAction() {
if (bKeyMoveLPressed) {
fPlayMotorSound(true);
fMove("Left");
} else if (bKeyMoveRPressed) {
fPlayMotorSound(true);
fMove("Right");
} else {
fPlayMotorSound(false);
}
}
function fMove(P_sDirection) {
if (P_sDirection == "Left") {
mcRef._x = mcRef._x - nSpeed;
} else if (P_sDirection == "Right") {
mcRef._x = mcRef._x + nSpeed;
}
}
function fCheckKeyPressed() {
switch (Key.getCode()) {
case nKeyMoveL :
bKeyMoveLPressed = true;
break;
case nKeyMoveR :
bKeyMoveRPressed = true;
}
}
function fCheckKeyUnPressed() {
switch (Key.getCode()) {
case nKeyMoveL :
bKeyMoveLPressed = false;
break;
case nKeyMoveR :
bKeyMoveRPressed = false;
}
}
function fPlayMotorSound(p_Play) {
if (p_Play) {
if (!bSndMotorON) {
bSndMotorON = true;
_global.objSnd.fPlaySounds("sFx_ElecMotor", 100, 9999);
}
} else if (bSndMotorON) {
bSndMotorON = false;
_global.objSnd.fStopSounds("sFx_ElecMotor");
}
}
function fPause() {
mcRef.mcState.stop();
mcRef.mcState.wire.stop();
if (sState == "StunIdle") {
_global.objSnd.fStopSounds("sFx_ElectricShock2");
}
}
function fUnPause() {
mcRef.mcState.play();
mcRef.mcState.wire.play();
if (sState == "StunIdle") {
_global.objSnd.fPlaySounds("sFx_ElectricShock2", 120, 1);
}
}
}
Symbol 2492 MovieClip [__Packages.G3_objLevel] Frame 0
class G3_objLevel
{
var nDelayTargetAppearToDo, nDelayTargetAppearDone, nDelayTugMeterToDo, nDelayTugMeterDone, nDelayTugMeterMultiplierToDo, nDelayTugMeterMultiplierDone;
function G3_objLevel () {
nDelayTargetAppearToDo = 50;
nDelayTargetAppearDone = 50;
nDelayTugMeterToDo = 100;
nDelayTugMeterDone = 0;
nDelayTugMeterMultiplierToDo = 2100;
nDelayTugMeterMultiplierDone = 0;
}
function fDoAction() {
if (_global.M.G_sPlayMode == "P1") {
fManageTugMeterDelay();
fManageDelay();
} else {
fManageDelay();
}
fManageTugMeterMultiplier();
}
function fManageTugMeterMultiplier() {
if (_global.C.G_nTugMeterMultifier < 5) {
nDelayTugMeterMultiplierDone++;
if (nDelayTugMeterMultiplierDone >= nDelayTugMeterMultiplierToDo) {
nDelayTugMeterMultiplierDone = 0;
_global.C.G_nTugMeterMultifier++;
_global.C.objHUD.fSetMultiplier();
}
}
}
function fManageTugMeterDelay() {
nDelayTugMeterDone++;
if (nDelayTugMeterDone >= nDelayTugMeterToDo) {
nDelayTugMeterToDo--;
if (nDelayTugMeterToDo < 70) {
nDelayTugMeterToDo = 70;
}
nDelayTugMeterDone = 0;
fChangeTugMeter();
}
}
function fChangeTugMeter() {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.objHUD.fChangeTugMeter("Player2");
} else {
_global.C.objHUD.fChangeTugMeter("Player1");
}
}
function fManageDelay() {
nDelayTargetAppearDone++;
if (nDelayTargetAppearDone >= nDelayTargetAppearToDo) {
nDelayTargetAppearToDo--;
if (nDelayTargetAppearToDo < 15) {
nDelayTargetAppearToDo = 15;
}
nDelayTargetAppearDone = 0;
fAddTarget();
}
}
function fAddTarget() {
var _local3 = -30;
var _local4 = fReturnTargetType();
var _local5 = (_global.C.G_nLimitLeft + 25) + random((_global.C.G_nLimitRight - 25) - (_global.C.G_nLimitLeft + 25));
_global.C.fActiveTarget(_local4, _local5, _local3);
if (_global.M.G_sPlayMode == "P2") {
_local4 = fReturnTargetType();
_local5 = (_global.C.G_nLimitLeft + 25) + random((_global.C.G_nLimitRight - 25) - (_global.C.G_nLimitLeft + 25));
_global.C.fActiveTarget(_local4, _local5 + (_global.M.nStageWidth / 2), _local3);
}
}
function fReturnTargetType() {
if (_global.M.G_sPlayMode == "P1") {
var _local2 = 9;
} else {
var _local2 = 10;
}
switch (random(_local2)) {
case 0 :
case 1 :
case 2 :
case 3 :
var _local3 = "G3_mcTargetStar";
break;
case 4 :
case 5 :
case 6 :
case 7 :
_local3 = "G3_mcTargetStarP";
break;
case 8 :
_local3 = "G3_mcTargetJelly";
break;
case 9 :
_local3 = "G3_mcTargetEel";
}
return(_local3);
}
}
Symbol 2493 MovieClip [__Packages.G3_objTarget] Frame 0
class G3_objTarget extends objState
{
var mcRef, sType, nSpeed, nSpeedMax, bTarget, fSetState, sState, nFrTotalAnim;
function G3_objTarget (P_mcRef, P_sType) {
super(mcRef);
mcRef = P_mcRef;
sType = P_sType;
nSpeed = 0;
nSpeedMax = random(4) + 3;
bTarget = true;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
fMove();
}
function Hit() {
fMove();
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
}
function fMove() {
nSpeed = nSpeed + 0.1;
if (nSpeed >= nSpeedMax) {
nSpeed = nSpeedMax;
}
mcRef._y = mcRef._y + nSpeed;
if (mcRef._y >= (_global.M.nStageHeight + mcRef._height)) {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
fMakeBubbleTrail();
}
function fHitTest(P_sPlayerRef) {
switch (sType) {
case "G3_mcTargetStar" :
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter == "SpongeBob") {
_global.C.fAddPoint("Player1", 115);
_global.objSnd.fPlaySounds("sFx_GoodCatch", 100, 1);
} else {
_global.objSnd.fPlaySounds("sFx_BadCatch", 100, 1);
}
} else if (P_sPlayerRef == "Player1") {
_global.C.fAddPoint("Player1", 115);
_global.objSnd.fPlaySounds("sFx_GoodCatch", 100, 1);
} else {
_global.C.fAddPoint("Player1", 142);
_global.objSnd.fPlaySounds("sFx_BadCatch", 100, 1);
}
bTarget = false;
fMakeBubble();
fSetState("Hit");
_global.C.objHUD.fChangeTugMeter("Player1");
break;
case "G3_mcTargetStarP" :
if (_global.M.G_sPlayMode == "P1") {
if (_global.M.G_sCurrentCharacter != "SpongeBob") {
_global.objSnd.fPlaySounds("sFx_GoodCatch", 100, 1);
_global.C.fAddPoint("Player1", 115);
} else {
_global.objSnd.fPlaySounds("sFx_BadCatch", 100, 1);
}
} else if (P_sPlayerRef == "Player1") {
_global.C.fAddPoint("Player2", 142);
_global.objSnd.fPlaySounds("sFx_BadCatch", 100, 1);
} else {
_global.C.fAddPoint("Player2", 115);
_global.objSnd.fPlaySounds("sFx_GoodCatch", 100, 1);
}
bTarget = false;
fMakeBubble();
fSetState("Hit");
_global.C.objHUD.fChangeTugMeter("Player2");
break;
case "G3_mcTargetEel" :
if (P_sPlayerRef == "Player1") {
_global.C.objPlayerP2.fStun();
} else if (P_sPlayerRef == "Player2") {
_global.C.objPlayerP1.fStun();
}
_global.C.fAddPoint(P_sPlayerRef, 221);
bTarget = false;
fMakeBubble();
fSetState("Hit");
break;
case "G3_mcTargetJelly" :
if (P_sPlayerRef == "Player1") {
_global.C.objPlayerP1.fStun();
} else if (P_sPlayerRef == "Player2") {
_global.C.objPlayerP2.fStun();
}
_global.C.fAddPoint(P_sPlayerRef, 50);
bTarget = false;
fMakeBubble();
fSetState("Hit");
}
}
function fMakeBubbleTrail() {
if (random(20) >= 17) {
_global.C.fAttachBubble(mcRef);
}
}
function fMakeBubble() {
var _local3 = 0;
while (_local3 < 4) {
_global.C.fAttachBubble(mcRef);
_local3++;
}
}
}
Symbol 2494 MovieClip [__Packages.G4_objRing] Frame 0
class G4_objRing extends objState
{
var mcRef, sPlayerRef, nSpeed, nStep, fSetState, sState, nFrTotalAnim;
function G4_objRing (P_mcRef, P_nPower, P_sPlayer) {
super(mcRef);
mcRef = P_mcRef;
sPlayerRef = P_sPlayer;
nSpeed = P_nPower;
if ((nSpeed >= 3) && (nSpeed < 5)) {
nStep = 0;
}
if ((nSpeed >= 5) && (nSpeed < 8)) {
nStep = 1;
}
if ((nSpeed >= 8) && (nSpeed < 12)) {
nStep = 2;
}
if ((nSpeed >= 12) && (nSpeed < 14)) {
nStep = 3;
}
if (nSpeed >= 14) {
nStep = 4;
}
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
fMove();
fDetectDepth();
}
function Hit() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fManageMiss(sPlayerRef);
if (_global.C["G_nRing" + sPlayerRef] > 0) {
_global.C["objPlayer" + sPlayerRef].fSetState("Idle");
}
fRemove();
}
}
function fMove() {
nSpeed = nSpeed - 0.3;
mcRef._y = mcRef._y - nSpeed;
var _local2 = mcRef._xscale - 1.2;
if (_local2 < nScaleLimit[nStep]) {
_local2 = nScaleLimit[nStep];
}
mcRef._xscale = (mcRef._yscale = _local2);
fMakeBubble();
}
function fDetectDepth() {
if (nSpeed < 0) {
if ((nStep == 0) && (mcRef._y >= 300)) {
_global.objSnd.fStopSounds("sFx_ThrowRing");
fSetState("Hit");
return(undefined);
}
if ((nStep == 1) && (mcRef._y >= 275)) {
_global.objSnd.fStopSounds("sFx_ThrowRing");
fSetState("Hit");
return(undefined);
}
if ((nStep == 2) && (mcRef._y >= 230)) {
_global.objSnd.fStopSounds("sFx_ThrowRing");
fSetState("Hit");
return(undefined);
}
if ((nStep == 3) && (mcRef._y >= 205)) {
_global.objSnd.fStopSounds("sFx_ThrowRing");
mcRef.swapDepths(90);
fSetState("Hit");
return(undefined);
}
if ((nStep == 4) && (mcRef._y >= 180)) {
_global.objSnd.fStopSounds("sFx_ThrowRing");
mcRef.swapDepths(90);
fSetState("Hit");
return(undefined);
}
for (var _local3 in _global.C.G_aActiveElement) {
if (_global.C.G_aActiveElement[_local3].bTarget) {
if (_global.C.G_aActiveElement[_local3].mcRef.hitTest(mcRef)) {
_global.C.G_aActiveElement[_local3].fHitTest(this, nStep);
_global.objSnd.fStopSounds("sFx_ThrowRing");
}
}
}
}
}
function fRemove() {
_global.C.fRemoveActiveElement(mcRef._name);
_global.C.fRemoveInstance(mcRef);
}
function fMakeBubble() {
var _local3 = random(2);
if (_local3 == 1) {
_global.C.fAttachBubble(mcRef);
}
}
var nScaleLimit = [60, 50, 40, 30, 20];
}
Symbol 2495 MovieClip [__Packages.G4_objBonusPoint] Frame 0
class G4_objBonusPoint extends objState
{
var mcRef, nSpeed, nPoint, nStartY, fSetState, sState;
function G4_objBonusPoint (P_mcRef, P_nPoint, P_nStartY) {
super(mcRef);
mcRef = P_mcRef;
nSpeed = 1;
nPoint = P_nPoint;
nStartY = P_nStartY;
fSetState("Appear");
}
function fDoAction() {
this[sState]();
}
function Appear() {
fMove();
mcRef._xscale = (mcRef._yscale = mcRef._yscale + 10);
if (mcRef._xscale >= 100) {
fSetState("Move");
}
}
function Move() {
fMove();
if (mcRef._y < (nStartY - 125)) {
fSetState("Disappear");
}
}
function Disappear() {
fMove();
mcRef._alpha = mcRef._alpha - 7;
if (mcRef._alpha <= 0) {
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(mcRef._name);
}
}
function fMove() {
mcRef._y = mcRef._y - nSpeed;
nSpeed = nSpeed + 0.1;
if (nSpeed > 5) {
nSpeed = 5;
}
}
function fDoStateInit() {
switch (sState) {
case "Appear" :
mcRef._xscale = (mcRef._yscale = 0);
mcRef.sPoint = "+" + nPoint;
_global.C.fAddPoint(nPoint);
break;
case "Move" :
}
}
}
Symbol 2496 MovieClip [__Packages.G4_objPlayer] Frame 0
class G4_objPlayer extends objState
{
var mcRef, sPlayer, aPosX, nKeyPower, bKeyMovePower, nPower, nDelayPowerUpToDo, nDelayPowerUpDone, nOldPosition, refPowerUpBar, fSetState, sState, nFrTotalAnim;
function G4_objPlayer (P_mcRef, P_sPlayer, P_nKeyPower, P_aPosX) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
aPosX = P_aPosX;
nKeyPower = P_nKeyPower;
bKeyMovePower = false;
nPower = 3;
nDelayPowerUpToDo = 8;
nDelayPowerUpDone = 0;
nOldPosition = undefined;
refPowerUpBar = _global.mcLevelScreen["PowerUp" + sPlayer];
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function fGetPosition() {
var _local2;
var _local3 = 0;
do {
_local2 = random(3);
_local3++;
} while ((_local2 == nOldPosition) && (_local3 < 2));
nOldPosition = _local2;
mcRef._x = aPosX[_local2];
}
function Idle() {
fManageKeyAction();
}
function PowerUp() {
fManageKeyAction();
}
function StartThrow() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
refPowerUpBar._visible = false;
refPowerUpBar.gotoAndStop(1);
fThrow();
}
}
function Throw() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Waiting");
}
}
function Waiting() {
}
function WaitEnd() {
}
function fPoweringUp() {
nDelayPowerUpDone++;
if (nDelayPowerUpDone >= nDelayPowerUpToDo) {
nDelayPowerUpDone = 0;
nPower = mcRef.mcState._currentframe / 2;
if (nPower < 3) {
nPower = 3;
}
if (nPower > 15) {
nPower = 15;
}
mcRef.mcState.nextFrame();
refPowerUpBar.nextFrame();
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("StartThrow");
_global.objSnd.fPlaySounds("sFx_ThrowRing", 100, 1);
}
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
function fThrow() {
nDelayPowerUpToDo--;
if (nDelayPowerUpToDo < 2) {
nDelayPowerUpToDo = 2;
}
_global.C.fActiveRings(nPower, mcRef.mcState.mcNode, sPlayer);
fSetState("Throw");
nPower = 3;
}
function fManageKeyAction() {
if (bKeyMovePower && (sState == "Idle")) {
fSetState("PowerUp");
refPowerUpBar._visible = true;
} else if (bKeyMovePower && (sState == "PowerUp")) {
fPoweringUp();
} else if ((bKeyMovePower == false) && (sState == "PowerUp")) {
fSetState("StartThrow");
_global.objSnd.fPlaySounds("sFx_ThrowRing", 100, 1);
}
}
function fCheckKeyPressed() {
if (Key.getCode() == nKeyPower) {
bKeyMovePower = true;
}
}
function fCheckKeyUnPressed() {
if (Key.getCode() == nKeyPower) {
bKeyMovePower = false;
_global.objSnd.fStopSounds("sFx_PowerUp");
}
}
function fDoStateInit() {
switch (sState) {
case "PowerUp" :
mcRef.mcState.stop();
break;
case "Idle" :
fGetPosition();
}
}
function fPause() {
mcRef.mcState.stop();
if (sState == "EndWin") {
mcRef.mcState.ringG.glow.stop();
}
_global.objSnd.fStopSounds("sFx_PowerUp");
}
function fUnPause() {
mcRef.mcState.play();
if (sState == "EndWin") {
mcRef.mcState.ringG.glow.play();
}
}
function fDoEndLevel(p_State) {
mcRef._x = ((sPlayer == "P1") ? 200 : 500);
fSetState(p_State);
}
}
Symbol 2497 MovieClip [__Packages.G4_objTarget] Frame 0
class G4_objTarget extends objState
{
var mcRef, nStep, sPlayerRef, nPoint, bTarget, fSetState, sState, nFrTotalAnim;
function G4_objTarget (P_mcRef, P_nStep, P_sPlayerRef) {
super(mcRef);
mcRef = P_mcRef;
nStep = P_nStep;
sPlayerRef = P_sPlayerRef;
nPoint = nStep * 250;
bTarget = true;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Hit() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
if (_global.C["G_nRing" + sPlayerRef] > 0) {
_global.C["objPlayer" + sPlayerRef].fSetState("Idle");
}
}
}
function fHitTest(P_objRing, P_nStep) {
if (P_nStep == nStep) {
P_objRing.fRemove();
fSetState("Hit");
if (sPlayerRef == "P1") {
var _local4 = "Player1";
}
if (sPlayerRef == "P2") {
var _local4 = "Player2";
}
_global.C.fAddPoint(_local4, nPoint);
_global.C.fAddBonusPointFX(nPoint, mcRef._x, mcRef._y - mcRef._height);
} else if (P_objRing.mcRef.getDepth() > mcRef.getDepth()) {
P_objRing.mcRef.swapDepths(_global.C.G_nIndexSwapDepthTarget[nStep - 1]);
_global.C.G_nIndexSwapDepthTarget[nStep - 1]++;
}
}
}
Symbol 2498 MovieClip [__Packages.G5_objHole] Frame 0
class G5_objHole extends objState
{
static var shortStayUp;
var mcRef, fSetState, sState, nFrTotalAnim;
function G5_objHole (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
shortStayUp = false;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
checkStayUp();
}
function Idle() {
}
function EelOut() {
checkState();
}
function EelBonus() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function GaryOut() {
checkState();
}
function KrabOut() {
checkState();
}
function PlanktonOut() {
checkState();
}
function checkState() {
var _local2 = mcRef.mcState._currentframe;
if (shortStayUp && (_local2 == shortStayUpFrame)) {
mcRef.mcState.gotoAndPlay(shortStayUpGoTo);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function fHitSuccess(P_sPlayerRef) {
if (P_sPlayerRef == "P1") {
var _local3 = "Player1";
} else {
var _local3 = "Player2";
}
switch (sState) {
case "EelOut" :
_global.C.fAddPoint(_local3, 100);
break;
case "EelBonus" :
_global.C.fAddPoint(_local3, 10000);
_global.objSnd.fPlaySounds("sFx_endItem", 120, 1);
break;
case "GaryOut" :
_global.C.fAddPoint(_local3, -100);
_global.C["objPlayer" + P_sPlayerRef].fSetState("Disable");
_global.C["objBPlayer" + P_sPlayerRef].fSetState("Disable");
_global.objSnd.fPlaySounds("sFx_ElectricShock2", 120, 10);
break;
case "KrabOut" :
_global.C.objTimer.fAddTime(4000);
break;
case "PlanktonOut" :
_global.C.fAddPoint(_local3, 4000);
}
fSetState("Idle");
}
function checkStayUp() {
if (!shortStayUp) {
if (_global.C.objTimer._tMin == (switchStayUpAt - 1)) {
shortStayUp = true;
}
}
}
function fPause() {
if (sState == "EelBonus") {
_global.objSnd.fStopSounds("sFx_NagFish");
}
mcRef.mcState.stop();
}
static var switchStayUpAt = 2;
static var shortStayUpFrame = 45;
static var shortStayUpGoTo = 61;
}
Symbol 2499 MovieClip [__Packages.G5_objLevel] Frame 0
class G5_objLevel
{
var nDelayTargetAppearToDo, nDelayTargetAppearDone, specialEelDoneP1, specialEelDoneP2;
function G5_objLevel () {
nDelayTargetAppearToDo = 100;
nDelayTargetAppearDone = 100;
specialEelDoneP1 = false;
specialEelDoneP2 = false;
}
function fDoAction() {
fManageDelay();
}
function fManageDelay() {
nDelayTargetAppearDone++;
if (nDelayTargetAppearDone >= nDelayTargetAppearToDo) {
nDelayTargetAppearToDo--;
if (nDelayTargetAppearToDo < 15) {
nDelayTargetAppearToDo = 15;
}
nDelayTargetAppearDone = 0;
fAddTarget();
}
}
function fAddTarget() {
var _local4 = false;
while (_local4 == false) {
var _local3 = random(9) + 1;
if (_global.C["objHoleP1_" + _local3].sState == "Idle") {
fGetTargetType(_local3, "P1");
_local4 = true;
}
}
if (_global.M.G_sPlayMode == "P2") {
_local4 = false;
while (_local4 == false) {
var _local3 = random(9) + 1;
if (_global.C["objHoleP2_" + _local3].sState == "Idle") {
fGetTargetType(_local3, "P2");
_local4 = true;
}
}
}
}
function fGetTargetType(P_nObjHole, P_sPlayerRef) {
var _local5 = random(2);
var _local6 = (((!this["specialEelDone" + P_sPlayerRef]) && (_local5 == 1)) ? (random(15)) : (random(14)));
switch (_local6) {
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
case 7 :
case 8 :
_global.C[(("objHole" + P_sPlayerRef) + "_") + P_nObjHole].fSetState("EelOut");
break;
case 9 :
case 10 :
_global.C[(("objHole" + P_sPlayerRef) + "_") + P_nObjHole].fSetState("GaryOut");
break;
case 11 :
case 12 :
_global.C[(("objHole" + P_sPlayerRef) + "_") + P_nObjHole].fSetState("KrabOut");
break;
case 13 :
_global.C[(("objHole" + P_sPlayerRef) + "_") + P_nObjHole].fSetState("PlanktonOut");
break;
case 14 :
_global.C[(("objHole" + P_sPlayerRef) + "_") + P_nObjHole].fSetState("EelBonus");
this["specialEelDone" + P_sPlayerRef] = true;
}
}
}
Symbol 2500 MovieClip [__Packages.G5_objBackPlayer] Frame 0
class G5_objBackPlayer extends objState
{
var mcRef, sPlayerRef, fSetState, sState, nFrTotalAnim, fPause;
function G5_objBackPlayer (P_mcRef, P_sPlayerRef) {
super(mcRef);
mcRef = P_mcRef;
sPlayerRef = P_sPlayerRef;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Hit() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objPlayer" + sPlayerRef].fSetState("Hit");
mcRef.mcState.stop();
}
}
function HitGood() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function HitBad() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else if (_global.C.G_nTieTime == 1) {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
}
Symbol 2501 MovieClip [__Packages.G5_objPlayer] Frame 0
class G5_objPlayer extends objState
{
var mcRef, sPlayerLetter, sPlayerRef, nStartPosX, nStartPosY, nDelayFreezedDone, nDelayFreezedToDo, objCurrentHole, aHoleAssignedKey, fSetState, sState, nFrTotalAnim;
function G5_objPlayer (P_mcRef, P_sPlayerLetter, P_sPlayerRef) {
super(mcRef);
mcRef = P_mcRef;
sPlayerLetter = P_sPlayerLetter;
sPlayerRef = P_sPlayerRef;
nStartPosX = mcRef._x;
nStartPosY = mcRef._y;
nDelayFreezedDone = 0;
nDelayFreezedToDo = 200;
objCurrentHole = undefined;
aHoleAssignedKey = ["--", 1, 2, 3, 4, 5, 6, 7, 8, 9];
fSetKeyLetter();
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Hit() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (objCurrentHole.sState != "Idle") {
fSetState("HitSuccess");
_global.objSnd.fPlaySounds("sFx_HammerPunch", 200, 1);
_global.objSnd.fStopSounds("sFx_NagFish", 100, 1);
_global.C["objBPlayer" + sPlayerRef].fSetState("HitGood");
} else {
fSetState("Return");
_global.objSnd.fPlaySounds("sFx_HammerUp", 100, 1);
_global.C["objBPlayer" + sPlayerRef].fSetState("HitBad");
}
}
}
function HitSuccess() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fMakeBubble();
fSetState("Return");
_global.objSnd.fPlaySounds("sFx_HammerUp", 100, 1);
objCurrentHole.fHitSuccess(sPlayerRef);
}
}
function Return() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function Disable() {
nDelayFreezedDone++;
if (nDelayFreezedDone >= nDelayFreezedToDo) {
nDelayFreezedDone = 0;
fSetState("Idle");
_global.objSnd.fStopSounds("sFx_ElectricShock2");
_global.C["objBPlayer" + sPlayerRef].fSetState("Idle");
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
mcRef.mcState.stop();
}
}
function fCheckKey() {
if (sState == "Idle") {
var _local2 = String.fromCharCode(Key.getCode());
if (sPlayerLetter.indexOf(_local2) != -1) {
fValidKeyPosition(_local2);
}
}
}
function fValidKeyPosition(P_sCurrentKey) {
for (var _local4 in aHoleAssignedKey) {
if (_local4 > 0) {
if (aHoleAssignedKey[_local4] == P_sCurrentKey) {
objCurrentHole = _global.C[(("objHole" + sPlayerRef) + "_") + _local4];
mcRef._x = _global.C[(("objHole" + sPlayerRef) + "_") + _local4].mcRef._x;
mcRef._y = _global.C[(("objHole" + sPlayerRef) + "_") + _local4].mcRef._y - 10;
_global.C["objBPlayer" + sPlayerRef].fSetState("Hit");
break;
}
}
}
}
function fSetKeyLetter() {
var _local2 = 1;
while (_local2 < 10) {
aHoleAssignedKey[_local2] = sPlayerLetter.charAt(_local2 - 1);
_local2++;
}
}
function fMakeBubble() {
var _local3 = 0;
while (_local3 < 7) {
_global.C.fAttachBubble(objCurrentHole.mcRef);
_local3++;
}
}
function fDoStateInit() {
switch (sState) {
case "Idle" :
case "Disable" :
mcRef._x = nStartPosX;
mcRef._y = nStartPosY;
}
}
function fPause() {
mcRef.mcState.stop();
if (sState == "Disable") {
_global.objSnd.fStopSounds("sFx_ElectricShock2");
}
}
function fUnPause() {
mcRef.mcState.play();
if (sState == "Disable") {
_global.objSnd.fPlaySounds("sFx_ElectricShock2", 120, 10);
}
}
}
Symbol 2502 MovieClip [__Packages.G6_objTarget] Frame 0
class G6_objTarget extends objState
{
var mcRef, fishHit, fSetState, sState, nFrTotalAnim, depthIni, yInit;
function G6_objTarget (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
cntNewFish = 0;
fishHit = false;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Hit() {
fMakeBubble();
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
depthIni = mcRef.getDepth();
mcRef.swapDepths(mcRef._parent.getNextHighestDepth());
yInit = mcRef._y;
fSetState("FlyUp");
_global.objSnd.fPlaySounds("sFx_FishFly", 100, 1);
}
}
function FlyUp() {
mcRef._y--;
if (mcRef._y <= 0) {
fSetState("WaitFish");
}
}
function NewFish() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
fishHit = false;
}
}
function WaitFish() {
cntNewFish++;
if (cntNewFish == timeNewFish) {
mcRef._y = yInit;
mcRef.swapDepths(depthIni);
fSetState("NewFish");
_global.objSnd.fPlaySounds("sFx_Boing", 100, 1);
cntNewFish = 0;
}
}
function set _fishHit(p_fishHit) {
fishHit = p_fishHit;
//return(_fishHit);
}
function get _fishHit() {
return(fishHit);
}
function fMakeBubble() {
var _local3 = random(2);
if (_local3 == 1) {
_global.C.fAttachBubble(mcRef);
}
}
function fPlayIdleFish() {
if (sState == "Idle") {
mcRef.mcState.play();
}
_global.objSnd.fPlaySounds("sFx_NagFish", 20, 1);
}
static function fAnimFish(P_sPlayer) {
if (randomNumber(1, 20) == 5) {
var _local2 = randomNumber(1, 3);
var _local3 = randomNumber(1, 5);
_global.C[(((("fish" + P_sPlayer) + "_") + _local2) + "_") + _local3].fPlayIdleFish();
}
}
static function randomNumber(min, max) {
var _local1 = Math.round(Math.random() * (max - min)) + min;
return(_local1);
}
static var timeNewFish = 1800;
var cntNewFish = 0;
}
Symbol 2503 MovieClip [__Packages.G6_objPlayer] Frame 0
class G6_objPlayer extends objState
{
static var fishHit;
var mcRef, sPlayer, nKeyLeft, nKeyRight, keyLeftP, keyRightP, moveVertDone, moveVert, moveHoriz, fSetState, sState, rowHoriz, rowVert, nFrTotalAnim;
function G6_objPlayer (P_mcRef, P_sPlayer, P_nKeyLeft, P_nKeyRight) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nKeyLeft = P_nKeyLeft;
nKeyRight = P_nKeyRight;
keyLeftP = false;
keyRightP = false;
fishHit = 0;
moveVertDone = false;
moveVert = 0;
moveHoriz = centerHoriz;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
G6_objTarget.fAnimFish(sPlayer);
}
function Idle() {
fManageKeyAction();
}
function Throw() {
if (mcRef.mcState.mcStateT._currentframe >= mcRef.mcState.mcStateT._totalframes) {
fSetState("Idle");
var _local3 = _global.C[(((("fish" + sPlayer) + "_") + rowVert) + "_") + rowHoriz];
if (_local3._fishHit) {
_global.C.fManageMiss(sPlayer);
_global.objSnd.fPlaySounds("sFx_PickleLost", 100, 1);
} else {
var _local4 = ((sPlayer == "P1") ? "Player1" : "Player2");
_global.C.fAddPoint(_local4, nPoint);
_local3.fSetState("Hit");
_local3._fishHit = true;
fishHit++;
if (fishHit == totFish) {
fishHit = 0;
_global.C.fAddPoint(_local4, nBonusPoint);
}
}
}
}
function WaitEnd() {
}
function PlaceThrow() {
fManageKeyAction();
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
mcRef.mcState.stop();
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fPause(false);
_global.C.G_nTieTime = 2;
_global.C.objPopup.fSetState("StartTie");
} else {
_global.M.fManageEndLevel();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fPause();
}
}
function fManageKeyAction() {
if (((sState == "Idle") && (keyLeftP)) && (keyRightP)) {
moveVert = moveVert + ajustMoveVert;
fSetState("PlaceThrow");
_global.C["G_ProgressBar" + sPlayer].showProgress();
} else if ((keyLeftP && (keyRightP)) && (!moveVertDone)) {
moveVert = ((moveVert < maxVert) ? (moveVert + ajustMoveVert) : (maxVert));
_global.C["G_ProgressBar" + sPlayer].addToBar(moveVert, maxVert);
} else if (moveVert != 0) {
if (keyLeftP && (!keyRightP)) {
moveVertDone = true;
if (moveHoriz > 0) {
moveHoriz = moveHoriz - ajustMoveHoriz[fRowVert(moveVert) - 1];
_global.C["G_ProgressBar" + sPlayer].addToBar(moveHoriz, maxHoriz);
} else {
moveHoriz = 0;
}
} else if (keyRightP && (!keyLeftP)) {
moveVertDone = true;
if (moveHoriz < maxHoriz) {
moveHoriz = moveHoriz + ajustMoveHoriz[fRowVert(moveVert) - 1];
_global.C["G_ProgressBar" + sPlayer].addToBar(moveHoriz, maxHoriz);
} else {
moveHoriz = maxHoriz;
}
} else if (moveVert != 0) {
_global.C["G_ProgressBar" + sPlayer].removeProgress();
fFindFish(moveVert, moveHoriz);
moveVert = 0;
moveHoriz = centerHoriz;
fSetState("Throw");
moveVertDone = false;
}
}
}
function fCheckKeyPressed() {
if (Key.getCode() == nKeyLeft) {
keyLeftP = true;
}
if (Key.getCode() == nKeyRight) {
keyRightP = true;
}
}
function fCheckKeyUnPressed() {
if (!_global.M.bPaused) {
if (Key.getCode() == nKeyLeft) {
keyLeftP = false;
_global.C["G_ProgressBar" + sPlayer].switchProgress();
}
if (Key.getCode() == nKeyRight) {
keyRightP = false;
_global.C["G_ProgressBar" + sPlayer].switchProgress();
}
} else {
keyLeftP = false;
keyRightP = false;
}
}
function fDoStateInit() {
if (!(sState === "Throw")) {
} else {
mcRef.mcState.gotoAndStop((rowVert + "_") + rowHoriz);
_global.objSnd.fPlaySounds("sFx_PickleThrow", 100, 1);
}
}
function fFindFish(P_moveVert, P_moveHoriz) {
rowVert = fRowVert(P_moveVert);
rowHoriz = fRowHoriz(P_moveHoriz);
}
function fRowVert(P_moveVert) {
if (P_moveVert <= 5) {
return(1);
}
if (P_moveVert <= 10) {
return(2);
}
return(3);
}
function fRowHoriz(P_moveHoriz) {
if ((P_moveHoriz <= 25) && (P_moveHoriz >= 20)) {
return(5);
}
if (P_moveHoriz >= 15) {
return(4);
}
if (P_moveHoriz >= 10) {
return(3);
}
if (P_moveHoriz >= 5) {
return(2);
}
return(1);
}
function fPause() {
_global.objSnd.fStopSounds("sFx_FishFly");
if (sState == "Throw") {
mcRef.mcState.mcStateT.stop();
mcRef.mcState.mcStateT.mcPickle.stop();
} else {
if (sState == "PlaceThrow") {
_global.objSnd.fStopSounds("sFx_PowerUp");
_global.objSnd.fStopSounds("sFx_CrankMeter");
}
mcRef.mcState.stop();
}
}
function fUnPause() {
if (sState == "Throw") {
mcRef.mcState.mcStateT.play();
mcRef.mcState.mcStateT.mcPickle.play();
} else {
mcRef.mcState.play();
}
}
static var maxVert = 15;
static var maxHoriz = 25;
static var centerHoriz = 12;
var ajustMoveHoriz = [0.3, 0.2, 0.1];
var ajustMoveVert = 0.2;
static var nPoint = 400;
static var nBonusPoint = 5250;
static var totFish = 15;
}
Symbol 2504 MovieClip [__Packages.G6_objProgressBar] Frame 0
class G6_objProgressBar extends MovieClip
{
var mcRef, titleText, forPlayer;
function G6_objProgressBar () {
super();
}
function onLoad() {
initMeter();
}
function initMeter() {
mcRef = this;
mcRef._visible = false;
titleText = mcRef.txtTitle;
forPlayer = mcRef._name;
_global.C["G_ProgressBar" + forPlayer] = this;
}
function showProgress() {
titleText.text = "POWER";
mcRef._visible = true;
}
function removeProgress() {
mcRef._visible = false;
mcRef.gotoAndStop(1);
}
function switchProgress() {
if (mcRef._visible) {
titleText.text = "LEFT RIGHT";
}
}
function addToBar(p_atVal, p_maxVal) {
var _local2 = Math.ceil((p_atVal / p_maxVal) * 100);
mcRef.gotoAndStop(_local2);
}
}
Symbol 2505 MovieClip [__Packages.G7_objBall] Frame 0
class G7_objBall extends objState
{
var mcRef, sBall, nPtsStep1, nPtsStep2, nPtsStep3, nPtsStep4, nPtsStep5, nPtsStep6, nPtsStep7, fSetState, sState, nFrTotalAnim;
function G7_objBall (P_mcRef, P_sBall) {
super(mcRef);
mcRef = P_mcRef;
sBall = P_sBall;
nPtsStep1 = 11;
nPtsStep2 = 22;
nPtsStep3 = 55;
nPtsStep4 = 111;
nPtsStep5 = 222;
nPtsStep6 = 555;
nPtsStep7 = 1000;
fSetState("P0");
}
function fDoAction() {
this[sState]();
}
function P0() {
}
function P0ToP1() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsStep1);
_global.C.fAddBonusPointFX(nPtsStep1, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
fSetState("P1ToP0");
}
}
function P1ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
function P0ToP2() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsStep2);
_global.C.fAddBonusPointFX(nPtsStep2, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
fSetState("P2ToP0");
}
}
function P2ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
function P0ToP3() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsStep3);
_global.C.fAddBonusPointFX(nPtsStep3, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
fSetState("P3ToP0");
}
}
function P3ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
function P0ToP4() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsStep4);
_global.C.fAddBonusPointFX(nPtsStep4, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
fSetState("P4ToP0");
}
}
function P4ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
function P0ToP5() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsStep5);
_global.C.fAddBonusPointFX(nPtsStep5, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
fSetState("P5ToP0");
}
}
function P5ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
function P0ToP6() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsStep6);
_global.C.fAddBonusPointFX(nPtsStep6, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
fSetState("P6ToP0");
}
}
function P6ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
function P0ToP7() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBell" + sBall].fSetState("Ring");
_global.objSnd.fPlaySounds("Sfx_Bell", _global.objSnd.Sfx_BellMax, 0);
_global.C.fAddPoint(sBall, nPtsStep7);
_global.C.fAddBonusPointFX(nPtsStep7, _global.C["objPlayer" + sBall].mcRef._x, _global.C["objPlayer" + sBall].mcRef._y - 100);
if (sBall == "P1") {
if (_global.C.objPlayerP2 != undefined) {
_global.objSnd.fPlaySounds("Sfx_Stunned", _global.objSnd.Sfx_StunnedMax, 0);
_global.C.objPlayerP2.fSetState("Stunned");
}
} else {
_global.objSnd.fPlaySounds("Sfx_Stunned", _global.objSnd.Sfx_StunnedMax, 0);
_global.C.objPlayerP1.fSetState("Stunned");
}
fSetState("P7ToP0");
}
}
function P7ToP0() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("P0");
}
}
}
Symbol 2506 MovieClip [__Packages.G7_objBell] Frame 0
class G7_objBell extends objState
{
var mcRef, sBell, fSetState, sState, nFrTotalAnim;
function G7_objBell (P_mcRef, P_sBell) {
super(mcRef);
mcRef = P_mcRef;
sBell = P_sBell;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Ring() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
}
Symbol 2507 MovieClip [__Packages.G7_objPlayer] Frame 0
class G7_objPlayer extends objState
{
var mcRef, sPlayer, nHitKey, nHitKeyPress, nHitKeyRelease, nCurStep, nHitNeedStep1, nHitNeedStep2, nHitNeedStep3, nHitNeedStep4, nHitNeedStep5, nHitNeedStep6, nNbHit, nNextIncStep, nNbIncStep, fSetState, sState, nFrTotalAnim;
function G7_objPlayer (P_mcRef, P_sPlayer, P_nHitKey) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nHitKey = P_nHitKey;
nHitKeyPress = false;
nHitKeyRelease = true;
nCurStep = 0;
nHitNeedStep1 = 1;
nHitNeedStep2 = 2;
nHitNeedStep3 = 3;
nHitNeedStep4 = 4;
nHitNeedStep5 = 5;
nHitNeedStep6 = 6;
nNbHit = 0;
nNextIncStep = 1;
nNbIncStep = 1;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
if (nHitKeyPress and (_global.C["objBall" + sPlayer].sState == "P0")) {
nNbHit = 0;
fSetState("EndIdle");
}
}
function EndIdle() {
if (mcRef.mcState._currentframe == 10) {
_global.objSnd.fPlaySounds("Sfx_MaceUp", _global.objSnd.Sfx_MaceUpMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nCurStep = 1;
fSetState("Step1");
}
}
function Step1() {
if (nHitKeyPress and nHitKeyRelease) {
nHitKeyRelease = false;
nNbHit++;
}
if (nNbHit >= nHitNeedStep1) {
nNbHit = 0;
nCurStep = 2;
_global.objSnd.fPlaySounds("Sfx_LoopMace1" + sPlayer, _global.objSnd[("Sfx_LoopMace1" + sPlayer) + "Max"], 1000);
fSetState("Step2");
} else if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbHit = 0;
nCurStep = 0;
fSetState("P1ToHit");
}
}
function Step2() {
if (nHitKeyPress and nHitKeyRelease) {
nHitKeyRelease = false;
nNbHit++;
}
if (nNbHit >= nHitNeedStep2) {
nNbHit = 0;
nCurStep = 3;
_global.objSnd.fPlaySounds("Sfx_LoopMace2" + sPlayer, _global.objSnd[("Sfx_LoopMace2" + sPlayer) + "Max"], 1000);
_global.objSnd.fStopSounds("Sfx_LoopMace1" + sPlayer);
fSetState("Step3");
} else if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbHit = 0;
nCurStep = 0;
_global.objSnd.fStopSounds("Sfx_LoopMace1" + sPlayer);
fSetState("P2ToHit");
}
}
function Step3() {
if (nHitKeyPress and nHitKeyRelease) {
nHitKeyRelease = false;
nNbHit++;
}
if (nNbHit >= nHitNeedStep3) {
nNbHit = 0;
nCurStep = 4;
_global.objSnd.fPlaySounds("Sfx_LoopMace3" + sPlayer, _global.objSnd[("Sfx_LoopMace3" + sPlayer) + "Max"], 1000);
_global.objSnd.fStopSounds("Sfx_LoopMace2" + sPlayer);
fSetState("Step4");
} else if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbHit = 0;
nCurStep = 0;
_global.objSnd.fStopSounds("Sfx_LoopMace2" + sPlayer);
fSetState("P3ToHit");
}
}
function Step4() {
if (nHitKeyPress and nHitKeyRelease) {
nHitKeyRelease = false;
nNbHit++;
}
if (nNbHit >= nHitNeedStep4) {
nNbHit = 0;
nCurStep = 5;
_global.objSnd.fPlaySounds("Sfx_LoopMace4" + sPlayer, _global.objSnd[("Sfx_LoopMace4" + sPlayer) + "Max"], 1000);
_global.objSnd.fStopSounds("Sfx_LoopMace3" + sPlayer);
fSetState("Step5");
} else if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbHit = 0;
nCurStep = 0;
_global.objSnd.fStopSounds("Sfx_LoopMace3" + sPlayer);
fSetState("P4ToHit");
}
}
function Step5() {
if (nHitKeyPress and nHitKeyRelease) {
nHitKeyRelease = false;
nNbHit++;
}
if (nNbHit >= nHitNeedStep5) {
nNbHit = 0;
nCurStep = 6;
_global.objSnd.fPlaySounds("Sfx_LoopMace5" + sPlayer, _global.objSnd[("Sfx_LoopMace5" + sPlayer) + "Max"], 1000);
_global.objSnd.fStopSounds("Sfx_LoopMace4" + sPlayer);
fSetState("Step6");
} else if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbHit = 0;
nCurStep = 0;
_global.objSnd.fStopSounds("Sfx_LoopMace4" + sPlayer);
fSetState("P5ToHit");
}
}
function Step6() {
if (nHitKeyPress and nHitKeyRelease) {
nHitKeyRelease = false;
nNbHit++;
}
if (nNbHit >= nHitNeedStep6) {
nNbHit = 0;
nCurStep = 7;
_global.objSnd.fPlaySounds("Sfx_LoopMace6" + sPlayer, _global.objSnd[("Sfx_LoopMace6" + sPlayer) + "Max"], 1000);
_global.objSnd.fStopSounds("Sfx_LoopMace5" + sPlayer);
fSetState("Step7");
} else if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbHit = 0;
nCurStep = 0;
_global.objSnd.fStopSounds("Sfx_LoopMace5" + sPlayer);
fSetState("P6ToHit");
}
}
function Step7() {
if ((nNbHit >= nHitNeedStep6) or (mcRef.mcState._currentframe >= nFrTotalAnim)) {
nNbHit = 0;
nCurStep = 0;
_global.objSnd.fStopSounds("Sfx_LoopMace6" + sPlayer);
fSetState("P7ToHit");
}
}
function P1ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C["objBall" + sPlayer].sState == "P0") {
_global.C["objBall" + sPlayer].fSetState("P0ToP1");
}
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function P2ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBall" + sPlayer].fSetState("P0ToP2");
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function P3ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBall" + sPlayer].fSetState("P0ToP3");
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function P4ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBall" + sPlayer].fSetState("P0ToP4");
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function P5ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBall" + sPlayer].fSetState("P0ToP5");
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function P6ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBall" + sPlayer].fSetState("P0ToP6");
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function P7ToHit() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_SwingMace", _global.objSnd.Sfx_SwingMaceMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBall" + sPlayer].fSetState("P0ToP7");
_global.C["objTongue" + sPlayer].fSetState("Bounce");
fSetState("EndHit");
}
}
function EndHit() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fIncHitStep();
fSetState("Idle");
}
}
function Stunned() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nHitKeyPress = false;
nHitKeyRelease = true;
nNbHit = 0;
if (nCurStep == 0) {
fSetState("P1ToHit");
} else {
nCurStep = nCurStep - 2;
if (nCurStep < 1) {
nCurStep = 1;
}
fSetState("Step" + nCurStep);
}
}
}
function EndWin() {
var _local3 = mcRef.mcState._currentframe;
if ((_local3 == 25) && ((_global.M.G_sCurrentCharacter == "Patrick") || (sPlayer == "P2"))) {
_global.objSnd.fPlaySounds("sFx_Bong", 100, 0);
}
if (_local3 >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else if (_global.C.G_nTieTime == 1) {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
function fCheckKeyPressed() {
if (Key.getCode() == nHitKey) {
nHitKeyPress = true;
}
}
function fCheckKeyUnPressed() {
if (Key.getCode() == nHitKey) {
nHitKeyPress = false;
nHitKeyRelease = true;
}
}
function fIncHitStep() {
switch (nNextIncStep) {
case 1 :
nHitNeedStep1 + nNbIncStep;
nNextIncStep++;
break;
case 2 :
nHitNeedStep2 + nNbIncStep;
nNextIncStep++;
break;
case 3 :
nHitNeedStep3 + nNbIncStep;
nNextIncStep++;
break;
case 4 :
nHitNeedStep4 + nNbIncStep;
nNextIncStep++;
break;
case 5 :
nHitNeedStep5 + nNbIncStep;
nNextIncStep++;
break;
case 6 :
nHitNeedStep6 + nNbIncStep;
nNextIncStep = 1;
break;
}
}
function fPause() {
fStopSndMace();
mcRef.mcState.stop();
}
function fUnPause() {
switch (sState) {
case "Step2" :
_global.objSnd.fPlaySounds("Sfx_LoopMace1" + sPlayer, _global.objSnd[("Sfx_LoopMace1" + sPlayer) + "Max"], 1000);
break;
case "Step3" :
_global.objSnd.fPlaySounds("Sfx_LoopMace2" + sPlayer, _global.objSnd[("Sfx_LoopMace2" + sPlayer) + "Max"], 1000);
break;
case "Step4" :
_global.objSnd.fPlaySounds("Sfx_LoopMace3" + sPlayer, _global.objSnd[("Sfx_LoopMace3" + sPlayer) + "Max"], 1000);
break;
case "Step5" :
_global.objSnd.fPlaySounds("Sfx_LoopMace4" + sPlayer, _global.objSnd[("Sfx_LoopMace4" + sPlayer) + "Max"], 1000);
break;
case "Step6" :
_global.objSnd.fPlaySounds("Sfx_LoopMace5" + sPlayer, _global.objSnd[("Sfx_LoopMace5" + sPlayer) + "Max"], 1000);
break;
case "Step7" :
_global.objSnd.fPlaySounds("Sfx_LoopMace6" + sPlayer, _global.objSnd[("Sfx_LoopMace6" + sPlayer) + "Max"], 1000);
break;
}
mcRef.mcState.play();
}
function fStopSndMace() {
switch (sState) {
case "Step2" :
_global.objSnd.fStopSounds("Sfx_LoopMace1" + sPlayer);
break;
case "Step3" :
_global.objSnd.fStopSounds("Sfx_LoopMace2" + sPlayer);
break;
case "Step4" :
_global.objSnd.fStopSounds("Sfx_LoopMace3" + sPlayer);
break;
case "Step5" :
_global.objSnd.fStopSounds("Sfx_LoopMace4" + sPlayer);
break;
case "Step6" :
_global.objSnd.fStopSounds("Sfx_LoopMace5" + sPlayer);
break;
case "Step7" :
_global.objSnd.fStopSounds("Sfx_LoopMace6" + sPlayer);
break;
}
}
function fDoStateInit() {
}
}
Symbol 2508 MovieClip [__Packages.G7_objTongue] Frame 0
class G7_objTongue extends objState
{
var mcRef, sBell, fSetState, sState, nFrTotalAnim;
function G7_objTongue (P_mcRef, P_sBell) {
super(mcRef);
mcRef = P_mcRef;
sBell = P_sBell;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
}
function Bounce() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
}
Symbol 2509 MovieClip [__Packages.G7_objBonusPoint] Frame 0
class G7_objBonusPoint extends objState
{
var mcRef, nSpeed, nPoint, nStartY, fSetState, sState;
function G7_objBonusPoint (P_mcRef, P_nPoint, P_nStartY) {
super(mcRef);
mcRef = P_mcRef;
nSpeed = 1;
nPoint = P_nPoint;
nStartY = P_nStartY;
fSetState("Appear");
}
function fDoAction() {
this[sState]();
}
function Appear() {
fMove();
mcRef._xscale = (mcRef._yscale = mcRef._yscale + 10);
if (mcRef._xscale >= 100) {
fSetState("Move");
}
}
function Move() {
fMove();
if (mcRef._y < (nStartY - 125)) {
fSetState("Disappear");
}
}
function Disappear() {
fMove();
mcRef._alpha = mcRef._alpha - 7;
if (mcRef._alpha <= 0) {
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(mcRef._name);
}
}
function fMove() {
mcRef._y = mcRef._y - nSpeed;
nSpeed = nSpeed + 0.1;
if (nSpeed > 5) {
nSpeed = 5;
}
}
function fDoStateInit() {
switch (sState) {
case "Appear" :
mcRef._xscale = (mcRef._yscale = 0);
mcRef.sPoint = "+" + nPoint;
_global.C.fAddPoint(nPoint);
break;
case "Move" :
}
}
}
Symbol 2510 MovieClip [__Packages.G8_objLetter] Frame 0
class G8_objLetter extends objState
{
var mcRef, sPlayer, nIndex, sLetter, nStartScale, nActiveScale, fSetState, sState, nFrTotalAnim;
function G8_objLetter (P_mcRef, P_sPlayer, P_nIndex) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nIndex = P_nIndex;
sLetter = "";
nStartScale = mcRef._xscale;
nActiveScale = 180;
mcRef.sPlayer = sPlayer;
fSetState("Wait");
}
function fDoAction() {
this[sState]();
}
function Wait() {
if (_global.C["objPlayer" + sPlayer].sState == "Idle") {
switch (nIndex) {
case 1 :
sLetter = _global.C["objPlayer" + sPlayer].sLetter1;
_global.objSnd.fPlaySounds("Sfx_LetterCome1", _global.objSnd.Sfx_LetterCome1Max, 0);
fSetState("Appear");
break;
case 2 :
if (_global.C["objLetter1" + sPlayer].sState == "Idle") {
sLetter = _global.C["objPlayer" + sPlayer].sLetter2;
_global.objSnd.fPlaySounds("Sfx_LetterCome2", _global.objSnd.Sfx_LetterCome2Max, 0);
fSetState("Appear");
}
break;
case 3 :
if (_global.C["objLetter2" + sPlayer].sState == "Idle") {
sLetter = _global.C["objPlayer" + sPlayer].sLetter3;
_global.objSnd.fPlaySounds("Sfx_LetterCome3", _global.objSnd.Sfx_LetterCome3Max, 0);
fSetState("Appear");
}
break;
case 4 :
if (_global.C["objLetter3" + sPlayer].sState == "Idle") {
sLetter = _global.C["objPlayer" + sPlayer].sLetter4;
_global.objSnd.fPlaySounds("Sfx_LetterCome4", _global.objSnd.Sfx_LetterCome4Max, 0);
fSetState("Appear");
}
break;
case 5 :
if (_global.C["objLetter4" + sPlayer].sState == "Idle") {
sLetter = _global.C["objPlayer" + sPlayer].sLetter5;
_global.objSnd.fPlaySounds("Sfx_LetterCome5", _global.objSnd.Sfx_LetterCome5Max, 0);
fSetState("Appear");
}
break;
case 6 :
if (_global.C["objLetter5" + sPlayer].sState == "Idle") {
sLetter = _global.C["objPlayer" + sPlayer].sLetter6;
_global.objSnd.fPlaySounds("Sfx_LetterCome6", _global.objSnd.Sfx_LetterCome6Max, 0);
fSetState("Appear");
}
break;
}
}
}
function WaitIdle() {
WaitToGo("IdleGo");
}
function WaitSuccessIdle() {
WaitToGo("SuccessGo");
}
function WaitFailureIdle() {
WaitToGo("FailureGo");
}
function WaitToGo(l_NextAction) {
switch (nIndex) {
case 1 :
_global.objSnd.fPlaySounds("Sfx_LetterGo", _global.objSnd.Sfx_LetterGoMax, 0);
fSetState(l_NextAction);
break;
case 2 :
if (_global.C["objLetter1" + sPlayer].sState == "Wait") {
_global.objSnd.fPlaySounds("Sfx_LetterGo", _global.objSnd.Sfx_LetterGoMax, 0);
fSetState(l_NextAction);
}
break;
case 3 :
if (_global.C["objLetter2" + sPlayer].sState == "Wait") {
_global.objSnd.fPlaySounds("Sfx_LetterGo", _global.objSnd.Sfx_LetterGoMax, 0);
fSetState(l_NextAction);
}
break;
case 4 :
if (_global.C["objLetter3" + sPlayer].sState == "Wait") {
_global.objSnd.fPlaySounds("Sfx_LetterGo", _global.objSnd.Sfx_LetterGoMax, 0);
fSetState(l_NextAction);
}
break;
case 5 :
if (_global.C["objLetter4" + sPlayer].sState == "Wait") {
_global.objSnd.fPlaySounds("Sfx_LetterGo", _global.objSnd.Sfx_LetterGoMax, 0);
fSetState(l_NextAction);
}
break;
case 6 :
if (_global.C["objLetter5" + sPlayer].sState == "Wait") {
_global.objSnd.fPlaySounds("Sfx_LetterGo", _global.objSnd.Sfx_LetterGoMax, 0);
fSetState(l_NextAction);
}
break;
}
}
function IdleGo() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (nIndex == 6) {
_global.C["objPlayer" + sPlayer].fSetState("GetBall");
}
fSetState("Wait");
}
}
function SuccessGo() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (nIndex == 6) {
_global.C["objPlayer" + sPlayer].fSetState("GetBall");
}
fSetState("Wait");
}
}
function FailureGo() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (nIndex == 6) {
_global.C["objPlayer" + sPlayer].fSetState("GetBall");
}
fSetState("Wait");
}
}
function Appear() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
if (nIndex == 1) {
mcRef._xscale = nActiveScale;
mcRef._yscale = nActiveScale;
}
if (nIndex == 6) {
_global.C["objMeter" + sPlayer].sState = "PrepareMove";
}
}
}
function Success() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("SuccessIdle");
}
}
function Failure() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("FailureIdle");
}
}
function SuccessIdle() {
}
function FailureIdle() {
}
}
Symbol 2511 MovieClip [__Packages.G8_objPlayer] Frame 0
class G8_objPlayer extends objState
{
var mcRef, sPlayer, nHitKeyPress, nKeyPress, sPlayerLetter, sLetter1, sLetter2, sLetter3, sLetter4, sLetter5, sLetter6, fSetState, sState, nFrTotalAnim, fPause;
function G8_objPlayer (P_mcRef, P_sPlayer, P_sPlayerLetter) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nHitKeyPress = false;
nKeyPress = 0;
sPlayerLetter = P_sPlayerLetter;
sLetter1 = "";
sLetter2 = "";
sLetter3 = "";
sLetter4 = "";
sLetter5 = "";
sLetter6 = "";
SetLetters();
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Idle() {
if (mcRef.mcState._currentframe == 11) {
_global.objSnd.fPlaySounds("Sfx_Dribble", _global.objSnd.Sfx_DribbleMax, 0);
}
}
function StartShoot() {
if (mcRef.mcState._currentframe == 29) {
_global.objSnd.fPlaySounds("Sfx_LanceBall", _global.objSnd.Sfx_LanceBallMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if ((_global.C["objLetter6" + sPlayer].sState == "Success") or (_global.C["objLetter6" + sPlayer].sState == "SuccessIdle")) {
var _local3 = _global.C["objMeter" + sPlayer].nCurStep;
} else {
var _local3 = _global.C["objMeter" + sPlayer].nCurStep - 1;
}
_global.C["objBallFront" + sPlayer].fSetState("Move" + _local3);
fSetState("EndShoot");
}
}
function EndShoot() {
_global.C["objMeter" + sPlayer].nCurStep = 1;
fSetState("WaitBall");
}
function WaitBall() {
}
function GetBall() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
SetLetters();
fSetState("Idle");
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else if (_global.C.G_nTieTime == 1) {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
function fCheckKeyPressed() {
if (_global.C["objMeter" + sPlayer].sState == "Move") {
if (nHitKeyPress == false) {
nHitKeyPress = true;
nKeyPress = Key.getCode();
if (_global.C.objPlayerP2 != undefined) {
if (sPlayer == "P1") {
if ((((((nKeyPress == 65) or ((nKeyPress >= 68) and (nKeyPress <= 70))) or ((nKeyPress >= 81) and (nKeyPress <= 83))) or (nKeyPress == 87)) or (nKeyPress == 88)) or (nKeyPress == 90)) {
CheckKey();
}
} else if (((nKeyPress >= 72) and (nKeyPress <= 80)) or (nKeyPress == 85)) {
CheckKey();
}
} else {
CheckKey();
}
}
} else {
nHitKeyPress = false;
}
}
function fCheckKeyUnPressed() {
nHitKeyPress = false;
}
function CheckKey() {
var _local3 = _global.C["objMeter" + sPlayer].nCurStep;
var _local4 = _global.C[("objLetter" + _local3) + sPlayer].sLetter;
if (_global.C[("objLetter" + _local3) + sPlayer].sState == "Idle") {
if (_global.C["G_Code" + nKeyPress] == _local4) {
_global.objSnd.fPlaySounds("Sfx_LetterOk", _global.objSnd.Sfx_LetterOkMax, 0);
_global.C[("objLetter" + _local3) + sPlayer].fSetState("Success");
if (_local3 == 6) {
_global.C["objLetter6" + sPlayer].mcRef._xscale = _global.C["objLetter6" + sPlayer].nStartScale;
_global.C["objLetter6" + sPlayer].mcRef._yscale = _global.C["objLetter6" + sPlayer].nStartScale;
_global.C["objMeter" + sPlayer].fSetState("WaitEnd");
fSetState("StartShoot");
} else {
_global.C["objMeter" + sPlayer].ToNextStep();
}
} else {
_global.C[("objLetter" + _local3) + sPlayer].mcRef._xscale = _global.C[("objLetter" + _local3) + sPlayer].nStartScale;
_global.C[("objLetter" + _local3) + sPlayer].mcRef._yscale = _global.C[("objLetter" + _local3) + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C[("objLetter" + _local3) + sPlayer].fSetState("Failure");
_global.C["objMeter" + sPlayer].fSetState("WaitEnd");
fSetState("StartShoot");
}
}
}
function fDoStateInit() {
}
function SetLetters() {
var _local4 = sPlayerLetter;
var _local5 = -1;
var _local3 = 1;
while (_local3 <= 6) {
var _local2 = random(_local4.length);
if (_local2 == _local5) {
_local2++;
if (_local2 >= _local4.length) {
_local2 = 0;
}
}
this["sLetter" + _local3] = _local4.substring(_local2, _local2 + 1);
_local5 = _local2;
_local3++;
}
}
}
Symbol 2512 MovieClip [__Packages.G8_objBallFront] Frame 0
class G8_objBallFront extends objState
{
var mcRef, sBall, fSetState, sState, nFrTotalAnim;
function G8_objBallFront (P_mcRef, P_sBall) {
super(mcRef);
mcRef = P_mcRef;
sBall = P_sBall;
fSetState("PasLa");
}
function fDoAction() {
this[sState]();
}
function PasLa() {
}
function Move0() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe == 34) {
_global.objSnd.fPlaySounds("Sfx_Ball4", _global.objSnd.Sfx_Ball4Max, 0);
}
if (mcRef.mcState._currentframe == 51) {
_global.objSnd.fPlaySounds("Sfx_Ball13", _global.objSnd.Sfx_Ball13Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move0");
fSetState("PasLa");
}
}
function Move1() {
if (mcRef.mcState._currentframe == 17) {
_global.objSnd.fPlaySounds("Sfx_Ball3", _global.objSnd.Sfx_Ball3Max, 0);
}
if (mcRef.mcState._currentframe == 35) {
_global.objSnd.fPlaySounds("Sfx_Ball4", _global.objSnd.Sfx_Ball4Max, 0);
}
if (mcRef.mcState._currentframe == 52) {
_global.objSnd.fPlaySounds("Sfx_Ball15", _global.objSnd.Sfx_Ball15Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move1");
fSetState("PasLa");
}
}
function Move2() {
if (mcRef.mcState._currentframe == 5) {
_global.objSnd.fPlaySounds("Sfx_Ball1", _global.objSnd.Sfx_Ball1Max, 0);
}
if (mcRef.mcState._currentframe == 17) {
_global.objSnd.fPlaySounds("Sfx_Ball7", _global.objSnd.Sfx_Ball7Max, 0);
}
if (mcRef.mcState._currentframe == 34) {
_global.objSnd.fPlaySounds("Sfx_Ball9", _global.objSnd.Sfx_Ball9Max, 0);
}
if (mcRef.mcState._currentframe == 41) {
_global.objSnd.fPlaySounds("Sfx_Ball12", _global.objSnd.Sfx_Ball12Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move2");
fSetState("PasLa");
}
}
function Move3() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_Ball11", _global.objSnd.Sfx_Ball11Max, 0);
}
if (mcRef.mcState._currentframe == 6) {
_global.objSnd.fPlaySounds("Sfx_Ball12", _global.objSnd.Sfx_Ball12Max, 0);
}
if (mcRef.mcState._currentframe == 30) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move3");
fSetState("PasLa");
}
}
function Move4() {
if (mcRef.mcState._currentframe == 12) {
_global.objSnd.fPlaySounds("Sfx_Ball16", _global.objSnd.Sfx_Ball16Max, 0);
}
if (mcRef.mcState._currentframe == 13) {
_global.objSnd.fPlaySounds("Sfx_Ball12", _global.objSnd.Sfx_Ball12Max, 0);
}
if (mcRef.mcState._currentframe == 16) {
_global.objSnd.fPlaySounds("Sfx_Ball6", _global.objSnd.Sfx_Ball6Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move4");
fSetState("PasLa");
}
}
function Move5() {
if (mcRef.mcState._currentframe == 4) {
_global.objSnd.fPlaySounds("Sfx_Ball1", _global.objSnd.Sfx_Ball1Max, 0);
}
if (mcRef.mcState._currentframe == 17) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe == 34) {
_global.objSnd.fPlaySounds("Sfx_Ball2", _global.objSnd.Sfx_Ball2Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move5");
fSetState("PasLa");
}
}
function Move6() {
if (mcRef.mcState._currentframe == 8) {
_global.objSnd.fPlaySounds("Sfx_Ball8", _global.objSnd.Sfx_Ball8Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallBack" + sBall].fSetState("Move6");
fSetState("PasLa");
}
}
}
Symbol 2513 MovieClip [__Packages.G8_objBallBack] Frame 0
class G8_objBallBack extends objState
{
var mcRef, sBall, nPtsMove0, nPtsMove1, nPtsMove2, nPtsMove3, nPtsMove4, nPtsMove5, nPtsMove6, nRefPtsX, nRefPtsY, fSetState, sState, nFrTotalAnim;
function G8_objBallBack (P_mcRef, P_sBall) {
super(mcRef);
mcRef = P_mcRef;
sBall = P_sBall;
nPtsMove0 = 225;
nPtsMove1 = 42;
nPtsMove2 = 87;
nPtsMove3 = 174;
nPtsMove4 = 261;
nPtsMove5 = 348;
nPtsMove6 = 500;
nRefPtsX = _global.mcLevelScreen["RefPts" + sBall]._x;
nRefPtsY = _global.mcLevelScreen["RefPts" + sBall]._y;
fSetState("PasLa");
}
function fDoAction() {
this[sState]();
}
function PasLa() {
}
function Move0() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_Ball10", _global.objSnd.Sfx_Ball10Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (sBall == "P1") {
if (_global.C.objPlayerP2 != undefined) {
_global.C.fAddPoint("P2", nPtsMove0);
_global.C.fAddBonusPointFX(nPtsMove0, _global.C.objBallBackP2.nRefPtsX, _global.C.objBallBackP2.nRefPtsY);
}
} else {
_global.C.fAddPoint("P1", nPtsMove0);
_global.C.fAddBonusPointFX(nPtsMove0, _global.C.objBallBackP1.nRefPtsX, _global.C.objBallBackP1.nRefPtsY);
}
fSetState("PasLa");
}
}
function Move1() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_Ball9", _global.objSnd.Sfx_Ball9Max, 0);
}
if (mcRef.mcState._currentframe == 6) {
_global.objSnd.fPlaySounds("Sfx_Ball7", _global.objSnd.Sfx_Ball7Max, 0);
}
if (mcRef.mcState._currentframe == 11) {
_global.objSnd.fPlaySounds("Sfx_Ball3", _global.objSnd.Sfx_Ball3Max, 0);
}
if (mcRef.mcState._currentframe == 17) {
_global.objSnd.fPlaySounds("Sfx_Ball14", _global.objSnd.Sfx_Ball14Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsMove1);
_global.C.fAddBonusPointFX(nPtsMove1, nRefPtsX, nRefPtsY);
fSetState("PasLa");
}
}
function Move2() {
if (mcRef.mcState._currentframe == 16) {
_global.objSnd.fPlaySounds("Sfx_Ball14", _global.objSnd.Sfx_Ball15Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsMove2);
_global.C.fAddBonusPointFX(nPtsMove2, nRefPtsX, nRefPtsY);
fSetState("PasLa");
}
}
function Move3() {
if (mcRef.mcState._currentframe == 5) {
_global.objSnd.fPlaySounds("Sfx_Ball2", _global.objSnd.Sfx_Ball2Max, 0);
}
if (mcRef.mcState._currentframe == 13) {
_global.objSnd.fPlaySounds("Sfx_Ball14", _global.objSnd.Sfx_Ball14Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsMove3);
_global.C.fAddBonusPointFX(nPtsMove3, nRefPtsX, nRefPtsY);
fSetState("PasLa");
}
}
function Move4() {
if (mcRef.mcState._currentframe == 16) {
_global.objSnd.fPlaySounds("Sfx_Ball14", _global.objSnd.Sfx_Ball14Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsMove4);
_global.C.fAddBonusPointFX(nPtsMove4, nRefPtsX, nRefPtsY);
fSetState("PasLa");
}
}
function Move5() {
if (mcRef.mcState._currentframe == 5) {
_global.objSnd.fPlaySounds("Sfx_Ball14", _global.objSnd.Sfx_Ball14Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsMove5);
_global.C.fAddBonusPointFX(nPtsMove5, nRefPtsX, nRefPtsY);
fSetState("PasLa");
}
}
function Move6() {
if (mcRef.mcState._currentframe == 3) {
_global.objSnd.fPlaySounds("Sfx_Ball14", _global.objSnd.Sfx_Ball14Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fAddPoint(sBall, nPtsMove6);
_global.C.fAddBonusPointFX(nPtsMove6, nRefPtsX, nRefPtsY);
fSetState("PasLa");
}
}
}
Symbol 2514 MovieClip [__Packages.G8_objBonusPoint] Frame 0
class G8_objBonusPoint extends objState
{
var mcRef, nSpeed, nPoint, nStartY, fSetState, sState;
function G8_objBonusPoint (P_mcRef, P_nPoint, P_nStartY) {
super(mcRef);
mcRef = P_mcRef;
nSpeed = 1;
nPoint = P_nPoint;
nStartY = P_nStartY;
fSetState("Appear");
}
function fDoAction() {
this[sState]();
}
function Appear() {
fMove();
mcRef._xscale = (mcRef._yscale = mcRef._yscale + 10);
if (mcRef._xscale >= 100) {
fSetState("Move");
}
}
function Move() {
fMove();
if (mcRef._y < (nStartY - 125)) {
fSetState("Disappear");
}
}
function Disappear() {
fMove();
mcRef._alpha = mcRef._alpha - 7;
if (mcRef._alpha <= 0) {
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(mcRef._name);
}
}
function fMove() {
mcRef._y = mcRef._y - nSpeed;
nSpeed = nSpeed + 0.1;
if (nSpeed > 5) {
nSpeed = 5;
}
}
function fDoStateInit() {
switch (sState) {
case "Appear" :
mcRef._xscale = (mcRef._yscale = 0);
mcRef.sPoint = "+" + nPoint;
_global.C.fAddPoint(nPoint);
break;
case "Move" :
}
}
}
Symbol 2515 MovieClip [__Packages.G8_objMeter] Frame 0
class G8_objMeter extends objState
{
var mcRef, sPlayer, nCurDelay, nDelayMax, nSpeed, nSpeedDown, nPosY, nIncSpeed, nPosStep1, nPosStep2, nPosStep3, nPosStep4, nPosStep5, nPosStep6, nPosStep7, nCurStep, fSetState, sState;
function G8_objMeter (P_mcRef, P_sPlayer) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nCurDelay = 0;
nDelayMax = 0;
nSpeed = 0.2;
nSpeedDown = 4;
nPosY = 0;
nIncSpeed = 0.1;
nPosStep1 = 0;
nPosStep2 = -69;
nPosStep3 = -116;
nPosStep4 = -148;
nPosStep5 = -174;
nPosStep6 = -193;
nPosStep7 = -207;
nCurStep = 1;
fSetState("WaitLetter");
}
function fDoAction() {
this[sState]();
}
function WaitLetter() {
}
function WaitEnd() {
if (((_global.C["objBallFront" + sPlayer].sState == "PasLa") and (_global.C["objBallBack" + sPlayer].sState == "PasLa")) and (_global.C["objPlayer" + sPlayer].sState == "WaitBall")) {
ResetForNext();
fSetState("MoveDown");
}
}
function ResetForNext() {
var _local3 = 1;
while (_local3 <= 6) {
_global.C[("objLetter" + _local3) + sPlayer].fSetState("Wait" + _global.C[("objLetter" + _local3) + sPlayer].sState);
_local3++;
}
}
function PrepareMove() {
nCurDelay++;
if (nCurDelay >= nDelayMax) {
nCurDelay = 0;
fSetState("Move");
}
}
function Move() {
nPosY = nPosY - nSpeed;
mcRef.objBar._y = nPosY;
switch (nCurStep) {
case 1 :
if (nPosY <= nPosStep2) {
nPosY = nPosStep2;
mcRef.objBar._y = nPosY;
if (_global.C["objLetter1" + sPlayer].sState == "Idle") {
_global.C["objLetter1" + sPlayer].mcRef._xscale = _global.C["objLetter1" + sPlayer].nStartScale;
_global.C["objLetter1" + sPlayer].mcRef._yscale = _global.C["objLetter1" + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C["objLetter1" + sPlayer].fSetState("Failure");
_global.C["objPlayer" + sPlayer].fSetState("StartShoot");
fSetState("WaitEnd");
} else {
nCurStep = 2;
}
}
break;
case 2 :
if (nPosY <= nPosStep3) {
nPosY = nPosStep3;
mcRef.objBar._y = nPosY;
if (_global.C["objLetter2" + sPlayer].sState == "Idle") {
_global.C["objLetter2" + sPlayer].mcRef._xscale = _global.C["objLetter2" + sPlayer].nStartScale;
_global.C["objLetter2" + sPlayer].mcRef._yscale = _global.C["objLetter2" + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C["objLetter2" + sPlayer].fSetState("Failure");
_global.C["objPlayer" + sPlayer].fSetState("StartShoot");
fSetState("WaitEnd");
} else {
nCurStep = 3;
}
}
break;
case 3 :
if (nPosY <= nPosStep4) {
nPosY = nPosStep4;
mcRef.objBar._y = nPosY;
if (_global.C["objLetter3" + sPlayer].sState == "Idle") {
_global.C["objLetter3" + sPlayer].mcRef._xscale = _global.C["objLetter3" + sPlayer].nStartScale;
_global.C["objLetter3" + sPlayer].mcRef._yscale = _global.C["objLetter3" + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C["objLetter3" + sPlayer].fSetState("Failure");
_global.C["objPlayer" + sPlayer].fSetState("StartShoot");
fSetState("WaitEnd");
} else {
nCurStep = 4;
}
}
break;
case 4 :
if (nPosY <= nPosStep5) {
nPosY = nPosStep5;
mcRef.objBar._y = nPosY;
if (_global.C["objLetter4" + sPlayer].sState == "Idle") {
_global.C["objLetter4" + sPlayer].mcRef._xscale = _global.C["objLetter4" + sPlayer].nStartScale;
_global.C["objLetter4" + sPlayer].mcRef._yscale = _global.C["objLetter4" + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C["objLetter4" + sPlayer].fSetState("Failure");
_global.C["objPlayer" + sPlayer].fSetState("StartShoot");
fSetState("WaitEnd");
} else {
nCurStep = 5;
}
}
break;
case 5 :
if (nPosY <= nPosStep6) {
nPosY = nPosStep6;
mcRef.objBar._y = nPosY;
if (_global.C["objLetter5" + sPlayer].sState == "Idle") {
_global.C["objLetter5" + sPlayer].mcRef._xscale = _global.C["objLetter5" + sPlayer].nStartScale;
_global.C["objLetter5" + sPlayer].mcRef._yscale = _global.C["objLetter5" + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C["objLetter5" + sPlayer].fSetState("Failure");
_global.C["objPlayer" + sPlayer].fSetState("StartShoot");
fSetState("WaitEnd");
} else {
nCurStep = 6;
}
}
break;
case 6 :
if (nPosY <= nPosStep7) {
nPosY = nPosStep7;
mcRef.objBar._y = nPosY;
if (_global.C["objLetter6" + sPlayer].sState == "Idle") {
_global.C["objLetter6" + sPlayer].mcRef._xscale = _global.C["objLetter6" + sPlayer].nStartScale;
_global.C["objLetter6" + sPlayer].mcRef._yscale = _global.C["objLetter6" + sPlayer].nStartScale;
_global.objSnd.fPlaySounds("Sfx_LetterBad", _global.objSnd.Sfx_LetterBadMax, 0);
_global.C["objLetter6" + sPlayer].fSetState("Failure");
_global.C["objPlayer" + sPlayer].fSetState("StartShoot");
} else {
nCurStep = 7;
}
fSetState("WaitEnd");
}
break;
}
}
function MoveDown() {
nPosY = nPosY + nSpeedDown;
mcRef.objBar._y = nPosY;
if (nPosY > nPosStep1) {
nPosY = nPosStep1;
mcRef.objBar._y = nPosY;
nSpeed = nSpeed + nIncSpeed;
fSetState("WaitLetter");
}
}
function ToNextStep() {
_global.C[("objLetter" + nCurStep) + sPlayer].mcRef._xscale = _global.C[("objLetter" + nCurStep) + sPlayer].nStartScale;
_global.C[("objLetter" + nCurStep) + sPlayer].mcRef._yscale = _global.C[("objLetter" + nCurStep) + sPlayer].nStartScale;
nCurStep++;
_global.C[("objLetter" + nCurStep) + sPlayer].mcRef._xscale = _global.C[("objLetter" + nCurStep) + sPlayer].nActiveScale;
_global.C[("objLetter" + nCurStep) + sPlayer].mcRef._yscale = _global.C[("objLetter" + nCurStep) + sPlayer].nActiveScale;
nPosY = this["nPosStep" + nCurStep];
mcRef.objBar._y = nPosY;
}
}
Symbol 2516 MovieClip [__Packages.G9_objPlug] Frame 0
class G9_objPlug extends objState
{
var mcRef, sPlayer, nIdent, fSetState, sState, nFrTotalAnim;
function G9_objPlug (P_mcRef, P_sPlayer, P_nIdent) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nIdent = P_nIdent;
fSetState("PasLa");
}
function fDoAction() {
this[sState]();
}
function PasLa() {
}
function Idle() {
}
function ComeIn() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function GoAway() {
if (mcRef.mcState._currentframe == 33) {
_global.objSnd.fPlaySounds("Sfx_PlugGo", _global.objSnd.Sfx_PlugGoMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (nIdent == _global.C["objBoard" + sPlayer].nHoleBloc1) {
_global.C["objBoard" + sPlayer].nHoleBloc1 = 0;
} else if (nIdent == _global.C["objBoard" + sPlayer].nHoleBloc2) {
_global.C["objBoard" + sPlayer].nHoleBloc2 = 0;
}
fSetState("PasLa");
}
}
}
Symbol 2517 MovieClip [__Packages.G9_objBoard] Frame 0
class G9_objBoard extends objState
{
var mcRef, nHoleBloc1, nHoleBloc2, nLastBloc1, nLastBloc2, sPlayer;
function G9_objBoard (P_sPlayer) {
super(mcRef);
nHoleBloc1 = 0;
nHoleBloc2 = 0;
nLastBloc1 = 0;
nLastBloc2 = 0;
sPlayer = P_sPlayer;
}
function fDoAction() {
Wait();
}
function Wait() {
if (nHoleBloc1 == 0) {
BlocHole();
}
}
function BlocHole() {
var _local3 = random(9) + 1;
if (_local3 == nLastBloc1) {
_local3++;
if (_local3 >= 9) {
_local3 = 1;
}
}
_global.objSnd.fPlaySounds("Sfx_PlugCome", _global.objSnd.Sfx_PlugComeMax, 0);
_global.C[("objPlug" + _local3) + sPlayer].fSetState("ComeIn");
nHoleBloc1 = _local3;
nLastBloc1 = _local3;
if (_global.C["objCursor" + sPlayer].nNbLineDone >= 5) {
var _local4 = random(9) + 1;
if ((_local4 == nLastBloc2) or (_local4 == _local3)) {
_local4++;
if (_local4 >= 9) {
_local4 = 1;
}
}
_global.objSnd.fPlaySounds("Sfx_PlugCome", _global.objSnd.Sfx_PlugComeMax, 0);
_global.C[("objPlug" + _local4) + sPlayer].fSetState("ComeIn");
nHoleBloc2 = _local4;
nLastBloc2 = _local4;
}
}
function UnlockHole() {
_global.C[("objPlug" + nHoleBloc1) + sPlayer].fSetState("GoAway");
if (nHoleBloc2 != 0) {
_global.C[("objPlug" + nHoleBloc2) + sPlayer].fSetState("GoAway");
}
}
}
Symbol 2518 MovieClip [__Packages.G9_objPlayer] Frame 0
class G9_objPlayer extends objState
{
var mcRef, sPlayer, nNbIdleToShoot, nNbIdlePass, nNbBallMax, nNbBall, nNbBallIn, nFrPotato, mcRefBag, fSetState, sState, nFrTotalAnim, fPause;
function G9_objPlayer (P_mcRef, P_sPlayer) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nNbIdleToShoot = 2;
nNbIdlePass = 0;
nNbBallMax = 10;
nNbBall = 10;
nNbBallIn = 0;
nFrPotato = 1;
mcRefBag = undefined;
_global.C.objHUD.fSetPotato(nNbBall, sPlayer);
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function Wait() {
}
function Idle() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
nNbIdlePass++;
if (nNbIdlePass == nNbIdleToShoot) {
nNbIdlePass = 0;
fSetState("StartShoot");
}
}
}
function StartShoot() {
if (mcRef.mcState._currentframe == 63) {
_global.objSnd.fPlaySounds("Sfx_LanceBall", _global.objSnd.Sfx_LanceBallMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objCursor" + sPlayer].fSetShoot();
fSetState("EndShoot");
}
}
function EndShoot() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Wait");
}
}
function EndWin() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.C.G_nGameScorePlayer1 != _global.C.G_nGameScorePlayer2) {
_global.M.fManageEndLevel();
} else {
_global.M.fEndTieGame();
}
}
}
function EndLose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
if (_global.M.G_sPlayMode == "P1") {
_global.M.fManageEndLevel();
} else if (_global.C.G_nGameScorePlayer1 == _global.C.G_nGameScorePlayer2) {
_global.M.fEndTieGame();
} else {
fPause();
}
}
}
function fSetNext() {
nNbBall--;
_global.C.objHUD.fSetPotato(nNbBall, sPlayer);
fCalculFrPotato();
if (nNbBall == 0) {
_global.C["objCursor" + sPlayer].fSetState("GoAway");
fSetState("Wait");
} else {
fSetState("Idle");
}
}
function fCalculFrPotato() {
nFrPotato = (nNbBallMax - nNbBall) + 1;
}
}
Symbol 2519 MovieClip [__Packages.G9_objBall] Frame 0
class G9_objBall extends objState
{
var mcRef, sPlayer, fSetState, sState, nFrTotalAnim;
function G9_objBall (P_mcRef, P_sPlayer) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
fSetState("PasLa");
}
function fDoAction() {
this[sState]();
}
function PasLa() {
}
function ToHole1() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn1" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole1Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole2() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn2" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole2Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole3() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn3" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole3Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole4() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn4" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole4Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole5() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn5" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole5Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole6() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn6" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole6Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole7() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn7" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole7Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole8() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn8" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole8Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToHole9() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball5", _global.objSnd.Sfx_Ball5Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objBallIn9" + sPlayer].fSetState("Idle");
_global.C["objPlayer" + sPlayer].nNbBallIn++;
_global.C["objCursor" + sPlayer].fCloseShoot("bHole9Use");
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToBad1() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball4", _global.objSnd.Sfx_Ball4Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToBad2() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToBad3() {
if (mcRef.mcState._currentframe == 21) {
_global.objSnd.fPlaySounds("Sfx_Ball10", _global.objSnd.Sfx_Ball10Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToBad4() {
if (mcRef.mcState._currentframe == 18) {
_global.objSnd.fPlaySounds("Sfx_Ball7", _global.objSnd.Sfx_Ball7Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
function ToBad5() {
if (mcRef.mcState._currentframe == 14) {
_global.objSnd.fPlaySounds("Sfx_Ball3", _global.objSnd.Sfx_Ball3Max, 0);
}
if (mcRef.mcState._currentframe == 27) {
_global.objSnd.fPlaySounds("Sfx_Ball6", _global.objSnd.Sfx_Ball6Max, 0);
}
if (mcRef.mcState._currentframe == 38) {
_global.objSnd.fPlaySounds("Sfx_Ball10", _global.objSnd.Sfx_Ball10Max, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objPlayer" + sPlayer].fSetNext();
fSetState("PasLa");
}
}
}
Symbol 2520 MovieClip [__Packages.G9_objCursor] Frame 0
class G9_objCursor extends objState
{
var mcRef, sPlayer, nRLimit, nLLimit, nULimit, nDLimit, nKeyV, nKeyH, nKeyVPress, nKeyHPress, nGravitH, nGravitV, nIncGravit, nPlayerSpdH, nPlayerSpdV, nIncPlayerSpd, nSpdH, nSpdV, nGravitSpdMod, nIncGravitSpdMod, nPlayerSpdMod, nIncPlayerSpdMod, nPosX, nPosY, nDistHoleX, nDistHoleY, nCol1X1, nCol1X2, nCol2X1, nCol2X2, nCol3X1, nCol3X2, nRow1Y1, nRow1Y2, nRow2Y1, nRow2Y2, nRow3Y1, nRow3Y2, bHole1Use, bHole2Use, bHole3Use, bHole4Use, bHole5Use, bHole6Use, bHole7Use, bHole8Use, bHole9Use, nPtsIn3, nPtsIn4, nPtsIn5, nRefPtsX, nRefPtsY, nNbLineDone, fSetState, sState, nFrTotalAnim;
function G9_objCursor (P_mcRef, P_sPlayer, P_nKeyV, P_nKeyH) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nRLimit = _global.mcLevelScreen["RdLimit" + sPlayer]._x;
nLLimit = _global.mcLevelScreen["LuLimit" + sPlayer]._x;
nULimit = _global.mcLevelScreen["LuLimit" + sPlayer]._y;
nDLimit = _global.mcLevelScreen["RdLimit" + sPlayer]._y;
nKeyV = P_nKeyV;
nKeyH = P_nKeyH;
nKeyVPress = false;
nKeyHPress = false;
nGravitH = 2;
nGravitV = 2;
nIncGravit = 0.1;
nPlayerSpdH = 2;
nPlayerSpdV = 2;
nIncPlayerSpd = 0.1;
nSpdH = 0;
nSpdV = 0;
nGravitSpdMod = 0.2;
nIncGravitSpdMod = 0;
nPlayerSpdMod = 0.4;
nIncPlayerSpdMod = 0.1;
nPosX = mcRef._x;
nPosY = mcRef._y;
nDistHoleX = 22;
nDistHoleY = 20;
nCol1X1 = _global.mcLevelScreen["Hole1" + sPlayer]._x - nDistHoleX;
nCol1X2 = _global.mcLevelScreen["Hole1" + sPlayer]._x + nDistHoleX;
nCol2X1 = _global.mcLevelScreen["Hole2" + sPlayer]._x - nDistHoleX;
nCol2X2 = _global.mcLevelScreen["Hole2" + sPlayer]._x + nDistHoleX;
nCol3X1 = _global.mcLevelScreen["Hole3" + sPlayer]._x - nDistHoleX;
nCol3X2 = _global.mcLevelScreen["Hole3" + sPlayer]._x + nDistHoleX;
nRow1Y1 = _global.mcLevelScreen["Hole1" + sPlayer]._y - nDistHoleY;
nRow1Y2 = _global.mcLevelScreen["Hole1" + sPlayer]._y + nDistHoleY;
nRow2Y1 = _global.mcLevelScreen["Hole4" + sPlayer]._y - nDistHoleY;
nRow2Y2 = _global.mcLevelScreen["Hole4" + sPlayer]._y + nDistHoleY;
nRow3Y1 = _global.mcLevelScreen["Hole7" + sPlayer]._y - nDistHoleY;
nRow3Y2 = _global.mcLevelScreen["Hole7" + sPlayer]._y + nDistHoleY;
bHole1Use = false;
bHole2Use = false;
bHole3Use = false;
bHole4Use = false;
bHole5Use = false;
bHole6Use = false;
bHole7Use = false;
bHole8Use = false;
bHole9Use = false;
nPtsIn3 = 2500;
nPtsIn4 = 1600;
nPtsIn5 = 700;
nRefPtsX = _global.mcLevelScreen["RefPts" + sPlayer]._x;
nRefPtsY = _global.mcLevelScreen["RefPts" + sPlayer]._y;
nNbLineDone = 0;
fSetState("Move");
}
function fDoAction() {
this[sState]();
}
function Move() {
if (nKeyHPress) {
if (sPlayer == "P1") {
nSpdH = nSpdH + nPlayerSpdMod;
if (nSpdH > nPlayerSpdH) {
nSpdH = nPlayerSpdH;
}
} else {
nSpdH = nSpdH - nPlayerSpdMod;
if (nSpdH < (nPlayerSpdH * -1)) {
nSpdH = nPlayerSpdH * -1;
}
}
} else if (sPlayer == "P1") {
if (nSpdH > 0) {
nSpdH = nSpdH - nGravitSpdMod;
} else {
nSpdH = nSpdH - (nGravitSpdMod / 2);
}
if (nSpdH < (nGravitH * -1)) {
nSpdH = nGravitH * -1;
}
} else {
if (nSpdH < 0) {
nSpdH = nSpdH + nGravitSpdMod;
} else {
nSpdH = nSpdH + (nGravitSpdMod / 2);
}
if (nSpdH > nGravitH) {
nSpdH = nGravitH;
}
}
if ((nPosX + nSpdH) < nLLimit) {
nSpdH = 0;
nPosX = nLLimit;
} else if ((nPosX + nSpdH) > nRLimit) {
nSpdH = 0;
nPosX = nRLimit;
} else {
nPosX = nPosX + nSpdH;
}
mcRef._x = nPosX;
if (nKeyVPress) {
nSpdV = nSpdV + nPlayerSpdMod;
if (nSpdV > nPlayerSpdV) {
nSpdV = nPlayerSpdV;
}
} else {
if (nSpdV > 0) {
nSpdV = nSpdV - nGravitSpdMod;
} else {
nSpdV = nSpdV - (nGravitSpdMod / 2);
}
if (nSpdV < (nGravitV * -1)) {
nSpdV = nGravitV * -1;
}
}
if ((nPosY + nSpdV) < nULimit) {
nSpdV = 0;
nPosY = nULimit;
mcRef._y = nPosY;
} else if ((nPosY + nSpdV) > nDLimit) {
nSpdV = 0;
nPosY = nDLimit;
mcRef._y = nPosY;
} else {
nPosY = nPosY + nSpdV;
}
mcRef._y = nPosY;
}
function GoAway() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_CursorGo", _global.objSnd.Sfx_CursorGoMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fCheckEnd();
fSetState("PasLa");
}
}
function fSetShoot() {
if ((nPosX >= nCol1X1) and (nPosX <= nCol1X2)) {
if ((nPosY >= nRow1Y1) and (nPosY <= nRow1Y2)) {
if (((bHole1Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 1)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 1)) {
_global.C["objBall" + sPlayer].fSetState("ToHole1");
} else {
fSetShootOut();
}
} else if ((nPosY >= nRow2Y1) and (nPosY <= nRow2Y2)) {
if (((bHole4Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 4)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 4)) {
_global.C["objBall" + sPlayer].fSetState("ToHole4");
} else {
fSetShootOut();
}
} else if ((nPosY >= nRow3Y1) and (nPosY <= nRow3Y2)) {
if (((bHole7Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 7)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 7)) {
_global.C["objBall" + sPlayer].fSetState("ToHole7");
} else {
fSetShootOut();
}
} else {
fSetShootOut();
}
} else if ((nPosX >= nCol2X1) and (nPosX <= nCol2X2)) {
if ((nPosY >= nRow1Y1) and (nPosY <= nRow1Y2)) {
if (((bHole2Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 2)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 2)) {
_global.C["objBall" + sPlayer].fSetState("ToHole2");
} else {
fSetShootOut();
}
} else if ((nPosY >= nRow2Y1) and (nPosY <= nRow2Y2)) {
if (((bHole5Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 5)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 5)) {
_global.C["objBall" + sPlayer].fSetState("ToHole5");
} else {
fSetShootOut();
}
} else if ((nPosY >= nRow3Y1) and (nPosY <= nRow3Y2)) {
if (((bHole8Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 8)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 8)) {
_global.C["objBall" + sPlayer].fSetState("ToHole8");
} else {
fSetShootOut();
}
} else {
fSetShootOut();
}
} else if ((nPosX >= nCol3X1) and (nPosX <= nCol3X2)) {
if ((nPosY >= nRow1Y1) and (nPosY <= nRow1Y2)) {
if (((bHole3Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 3)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 3)) {
_global.C["objBall" + sPlayer].fSetState("ToHole3");
} else {
fSetShootOut();
}
} else if ((nPosY >= nRow2Y1) and (nPosY <= nRow2Y2)) {
if (((bHole6Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 6)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 6)) {
_global.C["objBall" + sPlayer].fSetState("ToHole6");
} else {
fSetShootOut();
}
} else if ((nPosY >= nRow3Y1) and (nPosY <= nRow3Y2)) {
if (((bHole9Use == false) and (_global.C["objBoard" + sPlayer].nHoleBloc1 != 9)) and (_global.C["objBoard" + sPlayer].nHoleBloc2 != 9)) {
_global.C["objBall" + sPlayer].fSetState("ToHole9");
} else {
fSetShootOut();
}
} else {
fSetShootOut();
}
} else {
fSetShootOut();
}
}
function fCloseShoot(l_sHole) {
this[l_sHole] = true;
if (((((((((bHole1Use and bHole2Use) and bHole3Use) or ((bHole4Use and bHole5Use) and bHole6Use)) or ((bHole7Use and bHole8Use) and bHole9Use)) or ((bHole1Use and bHole4Use) and bHole7Use)) or ((bHole2Use and bHole5Use) and bHole8Use)) or ((bHole3Use and bHole6Use) and bHole9Use)) or ((bHole1Use and bHole5Use) and bHole9Use)) or ((bHole3Use and bHole5Use) and bHole7Use)) {
fCompleteLine();
}
}
function fSetShootOut() {
var _local3 = random(5) + 1;
_global.C["objBall" + sPlayer].fSetState("ToBad" + _local3);
}
function fCompleteLine() {
nNbLineDone++;
var _local3 = 1;
while (_local3 <= 9) {
if (_global.C[("objBallIn" + _local3) + sPlayer].sState == "Idle") {
_global.C[("objBallIn" + _local3) + sPlayer].fSetState("GoAway");
}
_local3++;
}
if (_global.C["objPlayer" + sPlayer].nNbBallIn <= 5) {
_global.C.fAddPoint(sPlayer, this["nPtsIn" + _global.C["objPlayer" + sPlayer].nNbBallIn]);
_global.C.fAddBonusPointFX(this["nPtsIn" + _global.C["objPlayer" + sPlayer].nNbBallIn], nRefPtsX, nRefPtsY);
}
_global.C["objPlayer" + sPlayer].nNbBall = _global.C["objPlayer" + sPlayer].nNbBall + 3;
_global.C.objHUD.fSetPotato(_global.C["objPlayer" + sPlayer].nNbBall, sPlayer);
_global.C["objPlayer" + sPlayer].fCalculFrPotato();
_global.C["objPlayer" + sPlayer].mcRefBag.gotoAndStop(_global.C["objPlayer" + sPlayer].nFrPotato);
_global.C["objPlayer" + sPlayer].nNbBallIn = 0;
_global.C["objBoard" + sPlayer].UnlockHole();
nGravitH = nGravitH + nIncGravit;
nGravitV = nGravitV + nIncGravit;
nPlayerSpdH = nPlayerSpdH + nIncPlayerSpd;
nPlayerSpdV = nPlayerSpdV + nIncPlayerSpd;
nGravitSpdMod = nGravitSpdMod + nIncGravitSpdMod;
nPlayerSpdMod = nPlayerSpdMod + nIncPlayerSpdMod;
}
function fCheckKeyPressed() {
if (Key.getCode() == nKeyV) {
nKeyVPress = true;
}
if (Key.getCode() == nKeyH) {
nKeyHPress = true;
}
}
function fCheckKeyUnPressed() {
if (Key.getCode() == nKeyV) {
nKeyVPress = false;
}
if (Key.getCode() == nKeyH) {
nKeyHPress = false;
}
}
}
Symbol 2521 MovieClip [__Packages.G9_objBallIn] Frame 0
class G9_objBallIn extends objState
{
var mcRef, sPlayer, nIdent, fSetState, sState, nFrTotalAnim;
function G9_objBallIn (P_mcRef, P_sPlayer, P_nIdent) {
super(mcRef);
mcRef = P_mcRef;
sPlayer = P_sPlayer;
nIdent = P_nIdent;
fSetState("PasLa");
}
function fDoAction() {
this[sState]();
}
function PasLa() {
}
function Idle() {
}
function GoAway() {
if (mcRef.mcState._currentframe == 2) {
_global.objSnd.fPlaySounds("Sfx_PotatoGo", _global.objSnd.Sfx_PotatoGoMax, 0);
}
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C["objCursor" + sPlayer][("bHole" + nIdent) + "Use"] = false;
fSetState("PasLa");
}
}
}
Symbol 2522 MovieClip [__Packages.G9_objBonusPoint] Frame 0
class G9_objBonusPoint extends objState
{
var mcRef, nSpeed, nPoint, nStartY, fSetState, sState;
function G9_objBonusPoint (P_mcRef, P_nPoint, P_nStartY) {
super(mcRef);
mcRef = P_mcRef;
nSpeed = 1;
nPoint = P_nPoint;
nStartY = P_nStartY;
fSetState("Appear");
}
function fDoAction() {
this[sState]();
}
function Appear() {
fMove();
mcRef._xscale = (mcRef._yscale = mcRef._yscale + 10);
if (mcRef._xscale >= 100) {
fSetState("Move");
}
}
function Move() {
fMove();
if (mcRef._y < (nStartY - 125)) {
fSetState("Disappear");
}
}
function Disappear() {
fMove();
mcRef._alpha = mcRef._alpha - 7;
if (mcRef._alpha <= 0) {
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(mcRef._name);
}
}
function fMove() {
mcRef._y = mcRef._y - nSpeed;
nSpeed = nSpeed + 0.1;
if (nSpeed > 5) {
nSpeed = 5;
}
}
function fDoStateInit() {
switch (sState) {
case "Appear" :
mcRef._xscale = (mcRef._yscale = 0);
mcRef.sPoint = "+" + nPoint;
_global.C.fAddPoint(nPoint);
break;
case "Move" :
}
}
}
Symbol 335 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown1", 100, 1);
_global.objTrans.fSetTransition("PlayModeScreen", false);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 60, 1);
}
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 2
gotoAndStop (1);
Symbol 483 MovieClip Frame 40
stop();
Symbol 484 MovieClip Frame 30
stop();
Symbol 494 MovieClip Frame 40
stop();
Symbol 495 MovieClip Frame 30
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 2
fStopSound();
LockBtn.useHandCursor = false;
_global.objSnd.fPlaySounds("sFx_Bubbles", 100, 1);
Symbol 510 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown1", 100, 1);
_global.objTrans.fSetTransition("SelectionScreen", false);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 60, 1);
}
Symbol 518 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown1", 100, 1);
_parent.QuitConfirm.gotoAndStop(2);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 60, 1);
}
Symbol 526 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown1", 100, 1);
_global.HS.submitScore(_global.M.G_nScorePlayer1);
nextFrame();
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 60, 1);
}
Symbol 527 MovieClip Frame 1
stop();
Symbol 530 Button
on (press) {
ControlScroll.scrollDown = true;
}
on (release, releaseOutside) {
ControlScroll.scrollDown = false;
}
Symbol 531 Button
on (press) {
ControlScroll.scrollUp = true;
}
on (release, releaseOutside) {
ControlScroll.scrollUp = false;
}
Symbol 538 MovieClip Frame 1
sScorePlayer1 = _global.M.G_nScorePlayer1;
sCharacter = _global.M.G_sCurrentCharacter;
_global.HS.getScores();
Instance of Symbol 7 MovieClip "ControlScroll" in Symbol 538 MovieClip Frame 1
onClipEvent (load) {
scrollUp = false;
scrollDown = false;
}
onClipEvent (enterFrame) {
if (scrollUp == true) {
_parent.txt_highScore.scroll--;
} else if (scrollDown == true) {
_parent.txt_highScore.scroll++;
}
}
Symbol 541 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.M.fQuit();
}
Symbol 542 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_parent.gotoAndStop(1);
}
Symbol 543 MovieClip Frame 6
stop();
Symbol 544 MovieClip Frame 1
stop();
Symbol 544 MovieClip Frame 2
LockBtn.useHandCursor = false;
Symbol 558 Button
on (release) {
_global.M.G_sPlayMode = "P1";
_global.objSnd.fPlaySounds("sFx_btnDown1", 100, 1);
_global.objTrans.fSetTransition("Character", false, this);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1b", 60, 1);
}
Symbol 565 Button
on (release) {
_global.M.G_sPlayMode = "P2";
_global.objSnd.fPlaySounds("sFx_btnDown1", 100, 1);
_global.objTrans.fSetTransition("SelectionScreen", false);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 60, 1);
}
Symbol 578 Button
on (release) {
_global.M.G_sCurrentCharacter = "SpongeBob";
_global.objSnd.fPlaySounds("sFx_btnDown1", 120, 1);
_global.objTrans.fSetTransition("SelectionScreen", false);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 80, 1);
}
Symbol 582 Button
on (release) {
_global.M.G_sCurrentCharacter = "Patrick";
_global.objSnd.fPlaySounds("sFx_btnDown1", 120, 1);
_global.objTrans.fSetTransition("SelectionScreen", false);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 80, 1);
}
Symbol 583 MovieClip Frame 1
stop();
Symbol 627 MovieClip Frame 1
var infoScore = this._name.split("_");
pts = _global.M.fLoadHSSOMode(infoScore[0], infoScore[1]);
Symbol 645 MovieClip Frame 1
stop();
mcCharacter.gotoAndStop(_global.M.G_sCurrentCharacter);
Symbol 649 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown1", 120, 1);
_global.objTrans.fSetTransition("HighScores", false);
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 80, 1);
}
Symbol 650 MovieClip Frame 1
if (gProxyObj.getIsLoggedIn()) {
if (_global.M.G_nScorePlayer1 <= 0) {
nextFrame();
} else {
stop();
}
} else {
nextFrame();
}
Symbol 657 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_Pop", 100, 1);
_global.M.fMenu();
}
on (rollOver) {
_global.objSnd.fPlaySoundsOneT("sFx_btnOver1", 80, 1);
}
Symbol 692 MovieClip Frame 1
stop();
Symbol 721 MovieClip Frame 1
stop();
Symbol 800 MovieClip Frame 19
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 800 MovieClip Frame 215
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 800 MovieClip Frame 258
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 800 MovieClip Frame 454
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 800 MovieClip Frame 479
_global.objSnd.fPlaySounds("sFx_crySB", 100, 1);
Symbol 833 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_Splash1", 100, 1);
Symbol 858 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_Splash2", 200, 1);
Symbol 866 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_Splash2", 200, 1);
Symbol 866 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_happySB", 100, 1);
Symbol 871 MovieClip Frame 5
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 15
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 50
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 59
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 83
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 96
_global.objSnd.fPlaySounds("sFx_Scratch", 300, 1);
Symbol 898 MovieClip Frame 175
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 210
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 219
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 243
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 898 MovieClip Frame 256
_global.objSnd.fPlaySounds("sFx_Scratch", 300, 1);
Symbol 911 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_Splash1", 100, 1);
Symbol 920 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_Splash2", 100, 1);
Symbol 933 MovieClip Frame 12
_global.objSnd.fPlaySounds("sFx_Splash2", 100, 1);
Symbol 933 MovieClip Frame 13
_global.objSnd.fPlaySounds("sFx_laughPat", 100, 1);
Symbol 940 MovieClip Frame 5
_global.objSnd.fPlaySounds("sFx_SadPat", 100, 1);
Symbol 962 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_Out", 100, 1);
Symbol 962 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_In", 100, 1);
Symbol 963 MovieClip Frame 7
_global.objSnd.fPlaySounds("sFx_endItem", 100, 1);
Symbol 970 MovieClip [mcBubble] Frame 1
_global.C.fAddBubble(this);
Symbol 970 MovieClip [mcBubble] Frame 2
stop();
Symbol 971 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 996 MovieClip Frame 118
_global.objSnd.fPlaySounds("sFx_Boing", 50, 1);
Symbol 1025 MovieClip Frame 15
_parent.gotoAndStop("Idle");
Symbol 1026 MovieClip Frame 1
stop();
Symbol 1048 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_Violin", 100, 1);
Symbol 1071 MovieClip Frame 3
Symbol 1071 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_SadPat", 100, 1);
Symbol 1072 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_GunBack", 140, 1);
Symbol 1116 MovieClip Frame 17
_global.objSnd.fPlaySounds("sFx_GunBack", 120, 1);
Symbol 1116 MovieClip Frame 24
_global.objSnd.fPlaySounds("sFx_SpinGun", 120, 1);
Symbol 1116 MovieClip Frame 64
_global.objSnd.fPlaySounds("sFx_GunBack", 140, 1);
Symbol 1124 MovieClip Frame 15
_parent.gotoAndStop("Idle");
Symbol 1125 MovieClip Frame 1
stop();
Symbol 1262 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_In", 100, 1);
Symbol 1262 MovieClip Frame 12
_global.objSnd.fPlaySounds("sFx_YeeHaw", 140, 1);
Symbol 1262 MovieClip Frame 14
_global.objSnd.fPlaySounds("sFx_Bong", 120, 1);
Symbol 1263 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_sadViolon", 100, 1);
Symbol 1263 MovieClip Frame 7
_global.objSnd.fPlaySounds("sFx_btnOver2", 60, 1);
Symbol 1264 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_GunBack", 140, 1);
Symbol 1310 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 1391 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_ElectricShock", 140, 1);
Symbol 1391 MovieClip Frame 32
stop();
Symbol 1400 MovieClip Frame 9
_global.objSnd.fPlaySounds("sFx_Bong", 100, 1);
Symbol 1400 MovieClip Frame 10
_global.objSnd.fPlaySounds("sFx_laughPat", 100, 1);
Symbol 1402 MovieClip Frame 4
_global.objSnd.fPlaySounds("sFx_Boing", 100, 1);
Symbol 1403 MovieClip Frame 11
_global.objSnd.fPlaySounds("sFx_ElectricShock2", 120, 1);
Symbol 1429 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_ElectricShock", 140, 1);
Symbol 1429 MovieClip Frame 35
stop();
Symbol 1431 MovieClip Frame 9
_global.objSnd.fPlaySounds("sFx_Bong", 100, 1);
Symbol 1431 MovieClip Frame 10
_global.objSnd.fPlaySounds("sFx_happySB", 100, 1);
Symbol 1432 MovieClip Frame 4
_global.objSnd.fPlaySounds("sFx_Boing", 100, 1);
Symbol 1433 MovieClip Frame 11
_global.objSnd.fPlaySounds("sFx_ElectricShock2", 120, 1);
Symbol 1473 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 1481 MovieClip Frame 1
if (_parent._parent._parent._name != "mcCreature") {
_global.C[_parent._parent._parent._name].fChoosePiece(1, this);
} else {
_global.C[_parent._parent._parent._parent._name].fChoosePiece(1, this);
}
stop();
Symbol 1489 MovieClip Frame 1
if (_parent._parent._parent._name != "mcCreature") {
_global.C[_parent._parent._parent._name].fChoosePiece(1, this);
} else {
_global.C[_parent._parent._parent._parent._name].fChoosePiece(1, this);
}
stop();
Symbol 1494 MovieClip Frame 1
if (_parent._parent._parent._name != "mcCreature") {
_global.C[_parent._parent._parent._name].fChoosePiece(1, this);
} else {
_global.C[_parent._parent._parent._parent._name].fChoosePiece(1, this);
}
stop();
Symbol 1510 MovieClip Frame 1
stop();
Symbol 1540 MovieClip Frame 12
_global.objSnd.fPlaySounds("sFx_Violin", 100, 1);
Symbol 1547 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_Violin", 100, 1);
Symbol 1547 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_laughPat", 100, 1);
Symbol 1548 MovieClip Frame 1
stop();
Symbol 1610 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_sadViolon", 100, 1);
Symbol 1610 MovieClip Frame 34
_global.objSnd.fPlaySounds("sFx_unHappySB", 100, 1);
Symbol 1627 MovieClip Frame 11
_global.objSnd.fPlaySounds("sFx_Bong", 130, 1);
Symbol 1627 MovieClip Frame 31
_global.objSnd.fPlaySounds("sFx_GlowRing", 100, 1);
Symbol 1627 MovieClip Frame 35
_global.objSnd.fPlaySounds("sFx_happySB", 120, 1);
Symbol 1628 MovieClip Frame 1
stop();
Symbol 1635 MovieClip Frame 1
stop();
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 3, "P1");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 1, "P1");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 3, "P1");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 2, "P1");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 1, "P1");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 2, "P1");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 3, "P2");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 1, "P2");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 3, "P2");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 2, "P2");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 2, "P2");
}
Instance of Symbol 1510 MovieClip in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
_global.C.fActiveTarget(this, 1, "P2");
}
Instance of Symbol 1635 MovieClip "PowerUpP1" in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 1635 MovieClip "PowerUpP2" in Symbol 1636 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1638 MovieClip Frame 4
_global.objSnd.fPlaySounds("sFx_Sand", 80, 1);
Symbol 1638 MovieClip Frame 29
_global.objSnd.fPlaySounds("sFx_Sand", 80, 1);
Symbol 1642 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 1681 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_clicBtn", 200, 1);
Symbol 1690 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_YeahSB", 100, 1);
Symbol 1690 MovieClip Frame 12
_global.objSnd.fPlaySounds("sFx_Boing", 100, 1);
Symbol 1691 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_unHappySB", 100, 1);
Symbol 1691 MovieClip Frame 14
_global.objSnd.fPlaySounds("sFx_Eyes", 40, 1);
Symbol 1692 MovieClip Frame 1
stop();
Symbol 1710 MovieClip Frame 7
_global.objSnd.fPlaySounds("sFx_clicBtn", 200, 1);
Symbol 1716 MovieClip Frame 5
_global.objSnd.fPlaySounds("sFx_laughPat", 100, 1);
Symbol 1717 MovieClip Frame 4
_global.objSnd.fPlaySounds("sFx_SadPat", 100, 1);
Symbol 1718 MovieClip Frame 1
stop();
Symbol 1731 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_EelOut", 50, 1);
Symbol 1731 MovieClip Frame 61
Symbol 1734 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_EelOut", 50, 1);
Symbol 1734 MovieClip Frame 60
Symbol 1737 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_EelOut", 50, 1);
Symbol 1737 MovieClip Frame 62
Symbol 1740 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_EelOut", 50, 1);
Symbol 1740 MovieClip Frame 60
Symbol 1745 MovieClip Frame 2
_global.objSnd.fPlaySounds("sFx_EelOut", 50, 1);
Symbol 1745 MovieClip Frame 17
_global.objSnd.fPlaySounds("sFx_NagFish", 100, 10);
Symbol 1745 MovieClip Frame 46
_global.objSnd.fStopSounds("sFx_NagFish");
Symbol 1746 MovieClip Frame 1
stop();
Symbol 1791 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_HammerDown", 100, 1);
Symbol 1808 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_HammerDown", 100, 1);
Symbol 1824 MovieClip [progressBarP1] Frame 1
#initclip 49
Object.registerClass("progressBarP1", G6_objProgressBar);
#endinitclip
stop();
Symbol 1831 MovieClip [progressBarP2] Frame 1
#initclip 48
Object.registerClass("progressBarP2", G6_objProgressBar);
#endinitclip
stop();
Symbol 1848 MovieClip Frame 1
stop();
Symbol 1866 MovieClip Frame 8
_global.objSnd.fPlaySounds("sFx_Gulp", 100, 1);
Symbol 1866 MovieClip Frame 16
_global.objSnd.fPlaySounds("sFx_Gonfle", 100, 1);
Symbol 1869 MovieClip Frame 1
stop();
Symbol 1896 MovieClip Frame 5
Symbol 1902 MovieClip Frame 1
_global.objSnd.fPlaySounds("sFx_Pickle1", 100, 1);
Symbol 1902 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_Pickle2", 100, 1);
Symbol 1942 MovieClip Frame 4
_global.objSnd.fPlaySounds("sFx_sadViolon", 100, 1);
Symbol 1942 MovieClip Frame 7
_global.objSnd.fPlaySounds("sFx_NonoSB", 100, 1);
Symbol 1953 MovieClip Frame 9
_global.objSnd.fPlaySounds("sFx_YeahSB", 100, 1);
Symbol 1955 MovieClip Frame 1
stop();
Symbol 1962 MovieClip Frame 9
Symbol 1990 MovieClip Frame 5
_global.objSnd.fPlaySounds("sFx_PickleFlip", 100, 1);
Symbol 1990 MovieClip Frame 9
_global.objSnd.fPlaySounds("sFx_laughPat", 100, 1);
Symbol 1994 MovieClip Frame 6
_global.objSnd.fPlaySounds("sFx_SadPat", 100, 1);
Instance of Symbol 1824 MovieClip [progressBarP1] "P1" in Symbol 2013 MovieClip Frame 1
onClipEvent (load) {
this.initMeter();
}
Instance of Symbol 1831 MovieClip [progressBarP2] "P2" in Symbol 2013 MovieClip Frame 1
onClipEvent (load) {
this.initMeter();
}
Symbol 2015 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 2038 MovieClip Frame 1
stop();
Symbol 2059 MovieClip Frame 1
stop();
Symbol 2118 MovieClip Frame 1
stop();
Symbol 2214 MovieClip Frame 1
stop();
Symbol 2216 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 2361 MovieClip Frame 1
TxtLetter = _global.C[_parent._parent._name].sLetter;
Symbol 2375 MovieClip Frame 1
stop();
Symbol 2378 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 2414 MovieClip Frame 1
var l_sName = _parent._parent._name;
if (l_sName == "objPlayerP1P") {
l_sName = "objPlayerP1";
}
_global.C[l_sName].mcRefBag = this;
if (_global.C[l_sName].nFrPotato == undefined) {
stop();
} else {
gotoAndStop(_global.C[l_sName].nFrPotato);
}
Symbol 2430 MovieClip Frame 1
_global.C[_parent._parent._name].mcRefBag = this;
if (_global.C[_parent._parent._name].nFrPotato == undefined) {
stop();
} else {
gotoAndStop(_global.C[_parent._parent._name].nFrPotato);
}
Symbol 2470 MovieClip Frame 1
stop();
Symbol 2475 MovieClip Frame 1
_global.C.fRemoveInstance(this);