Frame 1
Stage.showMenu = false;
_focusrect = false;
Frame 2
stop();
Instance of Symbol 71 MovieClip "contLoading" in Frame 2
onClipEvent (load) {
function fPreloadGame() {
var _local2 = (_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100;
if (_local2 != 100) {
_local2 = Math.floor(_local2);
_parent.mcLoadingScreen.sPercent = _local2;
_parent.mcLoadingScreen.mcLoadBar.gotoAndStop(_local2);
} else {
_parent.mcLoadingScreen.sPercent = "100";
_parent.mcLoadingScreen.mcLoadBar.gotoAndStop(100);
nDelay++;
if (nDelay > 4) {
_parent.gotoAndStop("Loaded");
}
}
}
_visible = false;
var nDelay = 0;
}
onClipEvent (enterFrame) {
fPreloadGame();
}
Instance of Symbol 101 MovieClip in Frame 8
onClipEvent (load) {
_visible = false;
_global.objSnd = this;
Items = new Object();
G_TabSonFade = new Array();
Mute = false;
bMusicPackPlaying = false;
Controlled = new Array("sMu_game", "sMu_tts", "sFx_btnOver", "sFx_btnDown", "sFx_brick", "sFx_brickUnder", "sFx_wall", "sFx_Bonus", "sFx_btnOverMenu", "sFx_btnDownMenu", "sFx_transition", "sFx_harpoon", "sFx_gary", "sFx_SBLaugh", "sFx_SBLaugh2", "sFx_SBLose", "sFx_intro", "sFx_SBAyaye", "sFx_ExtraBall", "sFx_expand", "sFx_shrink", "sFx_SBYeh", "sFx_SBHow", "sFx_paddle0", "sFx_paddle1", "sFx_paddle2", "sFx_paddle3", "sFx_paddle4");
for (i in Controlled) {
this.createEmptyMovieClip(Controlled[i], i + 1);
this[Controlled[i]] = new Sound(Controlled[i]);
this[Controlled[i]].attachSound(Controlled[i]);
Items[Controlled[i]] = new Object();
Items[Controlled[i]].Nom = Controlled[i];
Items[Controlled[i]].Volume = 0;
}
fPlaySounds = function (l_Name, l_Vol, l_NbLoop) {
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) {
fStopSounds(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);
}
};
fCreateEnterframe = function () {
if (this.onEnterFrame == undefined) {
this.onEnterFrame = function () {
_global.objSnd.Fade();
};
}
};
fDeleteEnterframe = function () {
delete this.onEnterFrame;
};
}
Frame 9
stop();
if (_global.Param == undefined) {
_global.Param = new obj_MainParam(this);
}
_global.Param.fDoSectionActions("Loaded");
Instance of Symbol 282 MovieClip "mcPopup" in Frame 9
/* no clip actions */
Frame 16
_global.Param.fDoSectionActions("Title");
Frame 25
_global.Param.fDoSectionActions("Help");
Frame 35
_global.Param.fDoSectionActions("Game");
Instance of Symbol 438 MovieClip "mcContGame" in Frame 35
onClipEvent (keyDown) {
if (_global.Param.bPaused == false) {
_global.C.fCheckKeyPressed();
}
}
onClipEvent (keyUp) {
_global.C.fCheckKeyUnPressed();
}
Frame 45
play();
Frame 46
_global.Param.fDoSectionActions("GameUnload");
stop();
Frame 55
_global.Param.fDoSectionActions("WinScreen");
Frame 65
_global.Param.fDoSectionActions("LoseScreen");
Frame 75
_global.Param.fDoSectionActions("HighScore");
Frame 85
_global.Param.fDoSectionActions("UnloadVar");
Symbol 6 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
Symbol 820 MovieClip [__Packages.objState] Frame 0
class objState
{
var mcRef, sState, nFrTotalAnim;
function objState (P_mcRef) {
mcRef = P_mcRef;
}
function fDoAction() {
this[sState]();
}
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() {
}
}
Symbol 821 MovieClip [__Packages.obj_MainParam] Frame 0
class obj_MainParam extends objState
{
var mcRef, bPaused, nStageWidth, nStageHeight, nHUDWidth, nStageFPS, sCurrentSection, nPlayerScore, nLevelStart, nNextLevel, nLevelMax, nPosY, nArmoredDelay, nHarpoonStart, nHoneyStart, aSpeed, aBonusPercent, aGameplay, sState, fSetState;
function obj_MainParam (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
fInitGameMain();
}
function fInitGameMain() {
bPaused = true;
nStageWidth = 450;
nStageHeight = 500;
nHUDWidth = 100;
nStageFPS = 35;
sCurrentSection = "Loaded";
nPlayerScore = 0;
nLevelStart = 1;
nNextLevel = nLevelStart;
nLevelMax = 32;
nPosY = 460;
nArmoredDelay = nStageFPS * 10;
nHarpoonStart = 5;
nHoneyStart = 3;
aSpeed = [6, 8, 10];
aBonusPercent = [70, 70, 80, 90, 90, 80, 40, 70, 70];
aGameplay = [0, nNextLevel, 3];
}
function fDoSectionActions(P_sSection, P_mcScreen) {
fSetSection(P_sSection);
switch (P_sSection) {
case "Loaded" :
if (_global.objTrans == undefined) {
_global.objTrans = new obj_Transition(mcRef.mcTransition);
}
if (_global.objPopup == undefined) {
_global.objPopup = new obj_Popup(mcRef.mcPopup);
}
if (_global.objHS == undefined) {
_global.objHS = new objHSNick();
}
_global.objTrans.fSetTransition("UnloadVar");
break;
case "Title" :
if (_global.objSnd.bMusicPackPlaying == false) {
_global.objSnd.fCreateEnterframe();
_global.objSnd.bMusicPackPlaying = true;
_global.objSnd.fPlaySounds("sMu_tts", 0, 99999);
_global.objSnd.G_TabSonFade.push(["sMu_tts", 40, "In", 5]);
}
break;
case "Game" :
_global.objTrans.fSetState("IdleTransition");
mcRef.mcState.gotoAndStop(aGameplay[1] + 1);
_global.objSnd.fDeleteEnterframe();
_global.objHUD = new obj_HUD(mcRef.mcHUD);
_global.C = new obj_GameParam(mcRef.mcContGame);
_global.objSnd.fPlaySounds("sFx_intro", 100, 1);
if (_global.objSnd.bMusicPackPlaying) {
_global.objSnd.bMusicPackPlaying = false;
_global.objSnd.G_TabSonFade.push(["sMu_tts", 0, "Out", 5]);
_global.objSnd.fPlaySounds("sMu_game", 0, 99999);
_global.objSnd.G_TabSonFade.push(["sMu_game", 40, "In", 4]);
}
break;
case "GameUnload" :
sState = "ClearingVar";
mcRef.gotoAndStop("Game");
break;
case "WinScreen" :
case "LoseScreen" :
mcRef.mcState.sScore = fStyleNumber(aGameplay[0]);
if (_global.objHS.bHSAvailable) {
_global.objHS.fDoHSInit();
} else {
mcRef.btnViewHS._visible = false;
mcRef.btnSubmitHS._visible = false;
}
if (P_sSection == "WinScreen") {
_global.objSnd.fPlaySounds("sFx_SBLaugh", 100, 1);
} else {
_global.objSnd.fPlaySounds("sFx_SBLose", 100, 1);
}
if (_global.objSnd.bMusicPackPlaying == false) {
_global.objSnd.fCreateEnterframe();
_global.objSnd.bMusicPackPlaying = true;
_global.objSnd.G_TabSonFade.push(["sMu_game", 0, "Out", 5]);
_global.objSnd.fPlaySounds("sMu_tts", 0, 99999);
_global.objSnd.G_TabSonFade.push(["sMu_tts", 40, "In", 5]);
}
break;
case "HighScore" :
mcRef.mcState.sScore = fStyleNumber(aGameplay[0]);
_global.objHS.fSetHSBoard(mcRef.mcState.mcHS);
if (_global.objHS.bGetHS == true) {
_global.objHS.bGetHS = false;
_global.objHS.getScores();
}
if (_global.objHS.bSubmitHS == true) {
_global.objHS.bSubmitHS = false;
mcRef.btnSubmitHS._visible = false;
_global.objHS.submitScore(aGameplay[0]);
}
break;
case "UnloadVar" :
delete _global.C;
delete _global.objHUD;
delete _global.objLoad;
fSetState("Title");
fInitGameMain();
}
}
function fDoSectionActionsUnload(P_sSection, P_mcScreen) {
if (!(P_sSection === "Game")) {
} else {
delete _global.C;
delete _global.objHUD;
_global.objPopup.fSetState("Idle");
}
}
function fNextLevel() {
nNextLevel++;
if (nNextLevel > nLevelMax) {
var _local2 = random(24) + 9;
while (_local2 != aGameplay[1]) {
_local2 = random(24) + 9;
}
aGameplay[1] = _local2;
} else {
aGameplay[1]++;
}
}
function fManageBonusSetting() {
if (aBonusPercent[0] > 20) {
aBonusPercent[0]--;
}
if (aBonusPercent[1] > 30) {
aBonusPercent[1]--;
}
if (aBonusPercent[2] > 25) {
aBonusPercent[2]--;
}
if (aBonusPercent[3] < 100) {
aBonusPercent[3]++;
}
if (aBonusPercent[4] > 30) {
aBonusPercent[4]--;
}
if (aBonusPercent[5] < 100) {
aBonusPercent[5]++;
}
if (aBonusPercent[6] > 20) {
aBonusPercent[6]--;
}
if (aBonusPercent[7] > 25) {
aBonusPercent[7]--;
}
if (aBonusPercent[8] < 100) {
aBonusPercent[8]++;
}
}
function fPause() {
bPaused = true;
_global.C.mBroadcaster.broadcastMessage("fPause");
}
function fUnPause() {
bPaused = false;
_global.C.mBroadcaster.broadcastMessage("fUnPause");
_global.objPopup.fSetState("Idle");
}
function fQuit() {
fPause();
if (nNextLevel >= 8) {
_global.objTrans.fSetTransition("WinScreen");
} else {
_global.objTrans.fSetTransition("LoseScreen");
}
}
function fPlayAgain() {
_global.objTrans.fSetTransition("UnloadVar");
}
function fHelp() {
_global.objPopup.fSetState("Help");
}
function fResumeHelp() {
if (sCurrentSection == "Game") {
_global.objPopup.fSetState("MenuOpen");
} else {
_global.objTrans.fSetTransition("Game");
}
}
function fResume() {
_global.objPopup.fSetState("EndMenu");
}
function fMenu() {
fPause();
_global.objPopup.fSetState("StartMenu");
}
function fSetSection(P_sSection) {
sCurrentSection = P_sSection;
}
function fStyleNumber(P_nNumber, P_nMinimumChar) {
var _local6 = false;
var _local1 = String(P_nNumber);
var _local7 = _local1;
do {
if (_local1.length < P_nMinimumChar) {
_local6 = true;
_local7 = "0" + _local7;
}
} while (_local7.length < P_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(P_sString) {
var _local3 = "";
var _local4 = P_sString.length;
var _local1 = _local4 - 1;
while (_local1 >= 0) {
var _local2 = P_sString.charAt(_local1);
if (isNaN(_local2)) {
return(_local3);
}
_local3 = _local2 + _local3;
_local1--;
}
}
}
Symbol 822 MovieClip [__Packages.obj_Transition] Frame 0
class obj_Transition
{
var mcRef, sState, mcInsideMovieClip, sNextFrameLabel, bStopSound;
function obj_Transition (P_mcRef) {
mcRef = P_mcRef;
fSetState("Idle");
fInitTrans();
}
function fDoAction() {
this[sState]();
}
function fInitTrans() {
mcInsideMovieClip = undefined;
sNextFrameLabel = "";
bStopSound = false;
}
function Idle() {
}
function StartTransition() {
if (mcRef.mcState._currentframe >= mcRef.mcState._totalframes) {
fChangeLabel();
fSetState("EndTransition");
}
}
function IdleTransition() {
if (mcRef.mcState._currentframe >= mcRef.mcState._totalframes) {
fSetState("EndTransition");
}
}
function EndTransition() {
if (mcRef.mcState._currentframe >= mcRef.mcState._totalframes) {
fSetState("Idle");
_global.Param.fUnPause();
}
}
function fSetTransition(P_sNextLabel, P_mcInsideMovieClip) {
sNextFrameLabel = P_sNextLabel;
if (P_mcInsideMovieClip != undefined) {
mcInsideMovieClip = P_mcInsideMovieClip;
}
fSetState("StartTransition");
}
function fChangeLabel() {
_global.Param.fDoSectionActionsUnload(_global.Param.sCurrentSection);
if (mcInsideMovieClip != undefined) {
var _local3 = mcInsideMovieClip;
_local3.gotoAndStop(sNextFrameLabel);
mcInsideMovieClip = undefined;
} else {
_global.Param.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;
}
fDoStateInit();
}
function fDoStateInit() {
mcRef.LockBtn.useHandCursor = false;
switch (sState) {
case "Idle" :
mcRef.stop();
break;
case "StartTransition" :
_global.objSnd.fPlaySounds("sFx_transition", 100, 1);
fStopSound();
}
}
}
Symbol 823 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 824 MovieClip [__Packages.obj_Popup] Frame 0
class obj_Popup extends objState
{
var mcRef, fSetState, sState, nFrTotalAnim;
function obj_Popup (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
fSetState("Idle");
}
function fDoAction() {
this[sState]();
}
function fDoUnpausableAction() {
this[sState]();
}
function StartMenu() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("MenuOpen");
}
}
function MenuOpen() {
}
function EndMenu() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.Param.fUnPause();
}
}
function Help() {
}
function fDoStateInit() {
mcRef.mcBlocker.useHandCursor = false;
switch (sState) {
case "Idle" :
break;
case "StartMenu" :
break;
case "MenuOpen" :
break;
case "EndMenu" :
_global.objSnd.fPlaySounds("sFx_menuOut", 90, 1);
}
}
}
Symbol 825 MovieClip [__Packages.objHSNick] Frame 0
class objHSNick
{
var bHSAvailable, bTestHighScore, bSubmitHS, bGetHS, sGameID, mcHSZone, NoTxtField, NameTxtField, ScoreTxtField;
function objHSNick () {
bHSAvailable = true;
bTestHighScore = false;
bSubmitHS = false;
bGetHS = false;
sGameID = "sb_smashout";
mcHSZone = undefined;
if (bTestHighScore == true) {
_global.gProxyObj.setServer("www.nick.com");
_global.gProxyObj.setScreenName("programmer");
_global.gProxyObj.setIsLoggedIn(true);
}
}
function getScores() {
if (_global.gProxyObj == undefined) {
listScores();
} else {
_global.gProxyObj.getScores(cbFunc2);
}
}
function submitScore(theScore) {
NoTxtField.text = "";
NameTxtField.text = "The high score list is updating!";
ScoreTxtField.text = "";
_global.gProxyObj.submitScore(theScore, cbFunc);
}
function initHiScores() {
_global.gProxyObj.setGame_Id(sGameID);
}
function getScoreString() {
NoTxtField = mcHSZone.txtHSNumber;
NameTxtField = mcHSZone.txtHSName;
ScoreTxtField = mcHSZone.txtHSScore;
var _local11 = "Oops! The high score list is not available right now!";
if (_global.gProxyObj != undefined) {
var _local7 = _global.gProxyObj.getScoreCount();
if (_local7 > 0) {
var _local3;
var _local4;
var _local5;
var _local6;
_local11 = "";
var _local10 = "";
var _local9 = "";
var _local8 = "";
_local3 = 0;
while (_local3 < _local7) {
_local4 = _global.gProxyObj.getScoreItem(_local3);
_local5 = _local4[0];
_local6 = _global.Param.fStyleNumber(_local4[1]);
_local10 = _local10 + ((_local3 + 1) + newline);
_local9 = _local9 + (_local5 + newline);
_local8 = _local8 + ((_local6 + " pts") + newline);
_local3++;
}
NoTxtField.text = _local10;
NameTxtField.text = _local9;
ScoreTxtField.text = _local8;
} else {
NameTxtField.text = "Oops! The high score list is not available right now!";
}
} else {
NameTxtField.text = "Oops! The high score list is not available right now!";
}
return(_local11);
}
function listScores() {
getScoreString();
}
function cbFunc(thisBool) {
if (thisBool) {
_global.objHS.listScores();
} else {
_global.objHS.NameTxtField.text = "Oops! The high score list is not available right now!";
}
}
function cbFunc2(thisBool) {
if (thisBool) {
_global.objHS.listScores();
} else {
_global.objHS.NameTxtField.text = "Oops! The high score list is not available right now!";
}
}
function fDoHSInit() {
initHiScores();
if (_global.gProxyObj.getIsLoggedIn()) {
_global.Param.mcRef.btnSubmitHS._visible = true;
} else {
_global.Param.mcRef.btnSubmitHS._visible = false;
}
}
function fDoSubmitHS() {
_global.objTrans.fSetTransition("HighScore");
bSubmitHS = true;
}
function fDoViewHS() {
_global.objTrans.fSetTransition("HighScore");
bGetHS = true;
}
function fSetHSBoard(P_mcRef) {
if (_global.gProxyObj.getIsLoggedIn()) {
_global.Param.mcRef.btnSubmitHS._visible = true;
} else {
_global.Param.mcRef.btnSubmitHS._visible = false;
}
mcHSZone = P_mcRef;
}
}
Symbol 826 MovieClip [__Packages.obj_HUD] Frame 0
class obj_HUD extends objState
{
var mcRef;
function obj_HUD (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
}
function fInitHUD() {
fSetPoint();
fSetLevel();
fSetLive();
fSetCombo();
}
function fSetPoint() {
mcRef._sScore = _global.Param.fStyleNumber(_global.Param.aGameplay[0], 6);
}
function fSetCombo() {
mcRef._sCombo = _global.Param.fStyleNumber(_global.C.nCombo);
mcRef._sComboMax = _global.Param.fStyleNumber(_global.C.nComboMax);
}
function fSetLevel() {
mcRef._sLevel = _global.Param.fStyleNumber(_global.Param.nNextLevel, 2);
}
function fSetLive() {
mcRef._sLive = _global.Param.fStyleNumber(_global.Param.aGameplay[2], 2);
}
function fSetHarpoon(P_bSwitch, P_nNumber) {
if (P_bSwitch) {
mcRef.mcBonusHarpoon.gotoAndStop("Enabled");
if (P_nNumber < 2) {
mcRef.mcBonusHarpoon.sHarpoonTxt.text = P_nNumber;
mcRef.mcBonusHarpoon.sHarpoon = "Harpoon";
} else {
mcRef.mcBonusHarpoon.sHarpoonTxt.text = P_nNumber;
mcRef.mcBonusHarpoon.sHarpoon = "Harpoons";
}
} else {
mcRef.mcBonusHarpoon.gotoAndStop("Disabled");
}
}
function fSetArmor(P_bSwitch) {
if (P_bSwitch) {
mcRef.mcBonusArmor.gotoAndStop("Enabled");
} else {
mcRef.mcBonusArmor.gotoAndStop("Disabled");
}
}
function fSetHoney(P_bSwitch) {
if (P_bSwitch) {
mcRef.mcBonusHoney.gotoAndStop("Enabled");
} else {
mcRef.mcBonusHoney.gotoAndStop("Disabled");
}
}
}
Symbol 827 MovieClip [__Packages.obj_GameParam] Frame 0
class obj_GameParam extends objState
{
var mcRef, bInit, mBroadcaster, nObjectIndex, nPointToHad, nGravity, nLimitLeftX, nLimitRightX, aBrick, aBall, aKeys, nBrickNumber, aSpeed, nCombo, nComboMax, aIndexSwapDepth;
function obj_GameParam (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
mcRef.onEnterFrame = mx.utils.Delegate.create(this, fEnterFrame);
fInitGameVars();
}
function fEnterFrame() {
if (bInit == false) {
bInit = true;
fInitGameLevel();
} else if (_global.Param.bPaused == false) {
_global.objSnd.Fade();
fCheckPointToHad();
mBroadcaster.broadcastMessage("fDoAction");
} else {
_global.objSnd.Fade();
mBroadcaster.broadcastMessage("fDoUnpausableAction");
}
}
function fInitGameVars() {
nObjectIndex = 1;
nPointToHad = 0;
nGravity = 0.3;
nLimitLeftX = 0;
nLimitRightX = _global.Param.nStageWidth - _global.Param.nHUDWidth;
aBrick = new Array();
aBall = new Array();
aKeys = [0, 0, 0, 0, 0, 0];
nBrickNumber = 0;
aSpeed = new Array(3);
fResetSpeed();
nCombo = 0;
nComboMax = 0;
mBroadcaster = new Object();
AsBroadcaster.initialize(mBroadcaster);
bInit = false;
aIndexSwapDepth = new Array();
aIndexSwapDepth[0] = {sType:"Enemy", nCurrentDepth:100000, nBaseDepth:100000, nLimitDepth:199999};
aIndexSwapDepth[1] = {sType:"BonusItem", nCurrentDepth:200000, nBaseDepth:200000, nLimitDepth:399999};
aIndexSwapDepth[3] = {sType:"Player", nCurrentDepth:400000, nBaseDepth:400000, nLimitDepth:400000};
aIndexSwapDepth[2] = {sType:"Particle", nCurrentDepth:500000, nBaseDepth:500000, nLimitDepth:599999};
aIndexSwapDepth[4] = {sType:"Remove", nCurrentDepth:800000, nBaseDepth:800000, nLimitDepth:810000};
}
function fInitGameLevel() {
_global.objHUD.fInitHUD();
fAddBroadcastObj(_global.objPopup);
fActivePaddle();
fActiveBall();
fActiveExtraBall();
fDistibuteBonus();
fActiveEasterEgg();
_global.Param.fPause();
}
function fAddBroadcastObj(P_obj) {
mBroadcaster.addListener(P_obj);
}
function fRemoveBroadcastObj(P_obj) {
mBroadcaster.removeListener(P_obj);
}
function fResetSpeed() {
aSpeed[0] = _global.Param.aSpeed[0];
aSpeed[1] = _global.Param.aSpeed[1];
aSpeed[2] = _global.Param.aSpeed[2];
}
function fManageEndLevel(P_sMode) {
_global.Param.fPause();
_global.Param.fManageBonusSetting();
for (var _local2 in _global.Param.aSpeed) {
_global.Param.aSpeed[_local2] = _global.Param.aSpeed[_local2] + 0.05;
}
_global.Param.fNextLevel();
_global.objTrans.fSetTransition("GameUnload");
}
function fManagePoint(P_nPoint) {
nPointToHad = nPointToHad + P_nPoint;
}
function fCheckPointToHad() {
if (nPointToHad > 0) {
var _local2 = 30;
if (nPointToHad < _local2) {
fAddPoint(nPointToHad);
nPointToHad = 0;
} else {
nPointToHad = nPointToHad - _local2;
fAddPoint(_local2);
}
}
}
function fAddPoint(P_nPoint) {
_global.Param.aGameplay[0] = _global.Param.aGameplay[0] + P_nPoint;
_global.objHUD.fSetPoint();
}
function fManageCombo(P_nCombo) {
if (P_nCombo == 0) {
nCombo = 0;
} else {
nCombo = nCombo + P_nCombo;
if (nCombo > nComboMax) {
nComboMax = nCombo;
}
}
_global.objHUD.fSetCombo();
}
function fManageLive(P_nLive) {
_global.Param.aGameplay[2] = _global.Param.aGameplay[2] + P_nLive;
if (_global.Param.aGameplay[2] < 0) {
_global.C.objPaddle.fSetState("Lose" + _global.C.objPaddle.nBarWide);
} else {
_global.objSnd.fPlaySounds("sFx_SBAyaye", 50, 1);
_global.objHUD.fSetLive();
}
}
function fDistibuteBonus() {
var _local6 = 5;
var _local5 = ["Harpoon", "Armor", "Honey", "SpeedUp", "SpeedDown", "Point", "Live", "WideUp", "WideDown"];
if (aBrick.length > 5) {
while (_local6 > 0) {
var _local4 = random(aBrick.length);
if (aBrick[_local4].sBonusType == undefined) {
var _local3 = random(_local5.length);
if (random(100) <= _global.Param.aBonusPercent[_local3]) {
aBrick[_local4].sBonusType = _local5[_local3];
_local6--;
}
}
}
}
}
function fRemoveInstance(P_mcRef) {
P_mcRef.swapDepths(fReturnDepth("Remove"));
P_mcRef.removeMovieClip();
}
function fReturnDepth(P_sType) {
for (var _local3 in aIndexSwapDepth) {
if (aIndexSwapDepth[_local3].sType == P_sType) {
aIndexSwapDepth[_local3].nCurrentDepth++;
if (aIndexSwapDepth[_local3].nCurrentDepth > aIndexSwapDepth[_local3].nLimitDepth) {
aIndexSwapDepth[_local3].nCurrentDepth = aIndexSwapDepth[_local3].nBaseDepth;
}
return(aIndexSwapDepth[_local3].nCurrentDepth);
}
}
}
function fCheckKeyPressed() {
switch (Key.getCode()) {
case 39 :
_global.C.aKeys[0] = 1;
break;
case 37 :
_global.C.aKeys[1] = 1;
break;
case 32 :
_global.C.aKeys[2] = 1;
break;
case 67 :
_global.C.aKeys[3] = 1;
}
}
function fCheckKeyUnPressed() {
switch (Key.getCode()) {
case 39 :
_global.C.aKeys[0] = 0;
break;
case 37 :
_global.C.aKeys[1] = 0;
break;
case 32 :
_global.C.aKeys[2] = 0;
break;
case 67 :
_global.C.aKeys[3] = 0;
}
}
function fActivePaddle() {
_global.C.objPaddle = new PaddleClass(_global.Param.mcRef.mcState.objPaddle);
mBroadcaster.addListener(_global.C.objPaddle);
}
function fActiveBall() {
_global.C.objBall = new BallClass(_global.Param.mcRef.mcState.objBall, false);
aBall.push(_global.C.objBall);
mBroadcaster.addListener(_global.C.objBall);
}
function fAddExtraBall(P_mcRef) {
var _local3 = "ExtraBall" + nObjectIndex;
P_mcRef._name = _local3;
_global.C[_local3] = new BallClass(P_mcRef, true);
aBall.push(_global.C[_local3]);
nObjectIndex++;
}
function fActiveEasterEgg() {
_global.C.objEasterEgg = new EasterEggClass(_global.Param.mcRef.mcState.objEasterEgg);
mBroadcaster.addListener(_global.C.objEasterEgg);
}
function fAddBrick(P_mcRef, P_sType, P_sColor) {
var _local3 = "Brick" + nObjectIndex;
P_mcRef._name = _local3;
_global.C[_local3] = new objBrick(P_mcRef, P_sType, P_sColor);
aBrick.push(_global.C[_local3]);
nObjectIndex++;
}
function fAddBonus(P_mcRef, P_sType) {
_global.C[P_mcRef._name] = new objBonus(P_mcRef, P_sType);
mBroadcaster.addListener(_global.C[P_mcRef._name]);
}
function fAddBubble(P_mcRef, P_sBubbleType) {
_global.C[P_mcRef._name] = new objBubble(P_mcRef, P_sBubbleType);
mBroadcaster.addListener(_global.C[P_mcRef._name]);
}
function fAddHarpoon(P_mcRef) {
_global.C[P_mcRef._name] = new objHarpoon(P_mcRef);
mBroadcaster.addListener(_global.C[P_mcRef._name]);
}
function fActiveExtraBall() {
for (var _local3 in _global.C.aBall) {
if (_global.C.aBall[_local3].mcRef._name != "objBall") {
_global.C.aBall[_local3].fActive();
aBrick.push(_global.C.aBall[_local3]);
mBroadcaster.addListener(_global.C.aBall[_local3]);
}
}
}
function fAttachBonus(P_mcRef, P_sBonusType) {
if (P_sBonusType != undefined) {
var _local4 = "objBonus" + nObjectIndex;
var _local3 = _global.Param.mcRef.mcState.attachMovie("mcBonus" + P_sBonusType, _local4, fReturnDepth("BonusItem"));
_local3._x = P_mcRef._x;
_local3._y = P_mcRef._y;
nObjectIndex++;
}
}
function fAttachBubble(P_mcRef, P_sBubbleType) {
if (random(10) == 0) {
var _local4 = "objBubble" + nObjectIndex;
var _local3 = _global.Param.mcRef.mcState.attachMovie("mcBubble", _local4, fReturnDepth("Particle"));
_local3._x = P_mcRef._x + (random(4) * (random(3) - 1));
_local3._y = P_mcRef._y;
fAddBubble(_local3, P_sBubbleType);
nObjectIndex++;
}
}
function fAttachHarpoon(P_mcRef) {
var _local3 = P_mcRef.getBounds(_global.Param.mcRef.mcState);
var _local5 = "objHarpoon" + nObjectIndex;
var _local4 = _global.Param.mcRef.mcState.attachMovie("mcBallHarpoon", _local5, fReturnDepth("BonusItem"));
_local4._x = (_local3.xMin + _local3.xMax) / 2;
_local4._y = _local3.yMin - 25;
nObjectIndex++;
}
function fAddBrickExplodeSFX(P_mcRef, P_sColor, P_sSide) {
var _local6 = 1;
while (_local6 <= 2) {
var _local5 = "Particle" + nObjectIndex;
var _local3 = _global.Param.mcRef.mcState.attachMovie("mcParticle", _local5, fReturnDepth("Particle"));
_local3._rotation = random(360);
_local3._xscale = (_local3._yscale = random(70) + 30);
switch (P_sSide) {
case "Right" :
_local3._x = P_mcRef._x + random(P_mcRef._width / 2);
_local3._y = P_mcRef._y;
var _local7 = 1;
if (random(2) == 1) {
_local7 = -1;
}
this[_local5] = new obj_Particle(_local3, random(7) + 1, (5 + random(5)) * _local7, -1);
break;
case "Left" :
_local3._x = P_mcRef._x + random(P_mcRef._width / 2);
_local3._y = P_mcRef._y;
_local7 = 1;
if (random(2) == 1) {
_local7 = -1;
}
this[_local5] = new obj_Particle(_local3, random(7) + 1, (5 + random(5)) * _local7, 1);
break;
case "Top" :
_local3._x = P_mcRef._x + random(P_mcRef._width / 2);
_local3._y = P_mcRef._y;
_local7 = 1;
if (random(2) == 1) {
_local7 = -1;
}
this[_local5] = new obj_Particle(_local3, random(7) + 1, 5 + random(5), _local7);
break;
case "Bottom" :
_local3._x = P_mcRef._x + random(P_mcRef._width / 2);
_local3._y = P_mcRef._y;
_local7 = 1;
if (random(2) == 1) {
_local7 = -1;
}
this[_local5] = new obj_Particle(_local3, random(7) + 1, -5 + random(5), _local7);
}
_local3.gotoAndStop(P_sColor);
fAddBroadcastObj(this[_local5]);
nObjectIndex++;
_local6++;
}
}
function fRemoveActiveElement(P_objName) {
delete this[P_objName];
}
function fRemoveBrick(P_objName) {
var _local4;
for (var _local5 in aBrick) {
if (aBrick[_local5].mcRef._name == P_objName) {
_local4 = _local5;
break;
}
}
aBrick.splice(_local4, 1);
if (_global.C[P_objName].bExtraBall != true) {
mBroadcaster.removeListener(this[P_objName]);
delete this[P_objName];
}
}
function fDeleteBrick(P_nNumber) {
nBrickNumber = nBrickNumber - P_nNumber;
if (nBrickNumber == 0) {
_global.C.objPaddle.fSetState("Win" + _global.C.objPaddle.nBarWide);
}
}
function fRemoveBall(P_objName) {
var _local3;
for (var _local4 in aBall) {
if (aBall[_local4].mcRef._name == P_objName) {
_local3 = _local4;
break;
}
}
aBall.splice(_local3, 1);
mBroadcaster.removeListener(this[P_objName]);
delete this[P_objName];
}
}
Symbol 828 MovieClip [__Packages.PaddleClass] Frame 0
class PaddleClass extends objState
{
var mcRef, nSpeed, nBarWide, Idle0, Idle1, Idle2, Hit0, Hit1, Hit2, Transit1_0, Transit0_1, Transit1_2, Transit2_1, Win0, Win1, Win2, Lose0, Lose1, Lose2, bPowerHarpoon, bPowerHoneyPot, bThrowMouseUp, bReachRightLimit, bReachLeftLimit, aWalkPath, nWalkIndex, nFrTotalAnim, fSetState, nNumberHarpoon, nNumberHoney, sState;
function PaddleClass (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
mcRef._x = 175;
mcRef._y = _global.Param.nPosY;
nSpeed = 13;
nBarWide = 1;
fGetNewWide(0);
Idle0 = mx.utils.Delegate.create(this, Idle);
Idle1 = mx.utils.Delegate.create(this, Idle);
Idle2 = mx.utils.Delegate.create(this, Idle);
Hit0 = mx.utils.Delegate.create(this, Hit);
Hit1 = mx.utils.Delegate.create(this, Hit);
Hit2 = mx.utils.Delegate.create(this, Hit);
Transit1_0 = mx.utils.Delegate.create(this, Transit);
Transit0_1 = mx.utils.Delegate.create(this, Transit);
Transit1_2 = mx.utils.Delegate.create(this, Transit);
Transit2_1 = mx.utils.Delegate.create(this, Transit);
Win0 = mx.utils.Delegate.create(this, Win);
Win1 = mx.utils.Delegate.create(this, Win);
Win2 = mx.utils.Delegate.create(this, Win);
Lose0 = mx.utils.Delegate.create(this, Lose);
Lose1 = mx.utils.Delegate.create(this, Lose);
Lose2 = mx.utils.Delegate.create(this, Lose);
bPowerHarpoon = false;
bPowerHoneyPot = false;
bThrowMouseUp = true;
bReachRightLimit = false;
bReachLeftLimit = false;
aWalkPath = [0, 2, 3, 4, 3, 2, 0, -2, -3, -4, -3, -2];
nWalkIndex = 6;
}
function fPause() {
mcRef.mcState.stop();
mcRef.mcStateHarpoon.stop();
}
function fUnPause() {
mcRef.mcState.play();
if (mcRef.mcStateHarpoon._currentframe > 1) {
mcRef.mcStateHarpoon.play();
}
}
function fCheckKeys() {
if (_global.C.aKeys[0] && (_global.C.aKeys[1] == false)) {
fMove("Right");
} else if ((_global.C.aKeys[0] == false) && (_global.C.aKeys[1])) {
fMove("Left");
}
if (_global.C.aKeys[2]) {
fThrow();
} else if (_global.C.aKeys[2] == false) {
bThrowMouseUp = true;
}
}
function Idle() {
fCheckKeys();
}
function Win() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fManageEndLevel();
fSetState("Wait");
}
}
function Lose() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.Param.fQuit();
fSetState("Wait");
}
}
function Hit() {
fCheckKeys();
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle" + nBarWide);
}
}
function Transit() {
fCheckKeys();
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle" + nBarWide);
}
}
function fThrow() {
var _local3 = false;
for (var _local4 in _global.C.aBall) {
if ((_global.C.aBall[_local4].sState.indexOf("Idle") != -1) && (_global.C.aBall[_local4].sState.indexOf("Disabled") == -1)) {
_local3 = true;
}
}
if (_local3) {
fThrowBall();
} else if (bPowerHarpoon && (bThrowMouseUp)) {
if (mcRef.mcStateHarpoon._currentframe == 1) {
fThrowHarpoon();
}
}
}
function fThrowBall() {
bThrowMouseUp = false;
for (var _local3 in _global.C.aBall) {
if ((_global.C.aBall[_local3].sState.indexOf("Idle") != -1) && (_global.C.aBall[_local3].sState.indexOf("Disabled") == -1)) {
_global.C.aBall[_local3].fGetSpinning();
}
}
fSetState("Idle" + nBarWide);
}
function fThrowHarpoon() {
bThrowMouseUp = false;
nNumberHarpoon--;
_global.objSnd.fPlaySounds("sFx_harpoon", 50, 1);
mcRef.mcStateHarpoon.play();
if (nNumberHarpoon <= 0) {
_global.objHUD.fSetHarpoon(false);
fGetHarpoon(false);
} else {
_global.objHUD.fSetHarpoon(true, nNumberHarpoon);
}
}
function fMakeBallWin() {
_global.C.mBroadcaster.broadcastMessage("fMakeObjectDisappear");
}
function fManageHit(P_sSide, P_obj) {
if ((P_sSide == "Right") || (P_sSide == "Left")) {
if (P_obj.bExtraBall == false) {
_global.C.fManageCombo(0);
}
var _local5 = P_obj.nAngle / Math.abs(P_obj.nAngle);
P_obj.fChangeAngle((-(180 - Math.abs(P_obj.nAngle))) * _local5);
_global.objSnd.fPlaySounds("sFx_paddle" + random(5), 50, 1);
} else if (P_sSide == "Top") {
if (bPowerHoneyPot) {
nNumberHoney--;
if (nNumberHoney <= 0) {
fGetHoney(false);
}
P_obj.fGetStick();
_global.objSnd.fPlaySounds("sFx_SBLaugh2", 50, 1);
} else {
if (P_obj.bExtraBall == false) {
_global.C.fManageCombo(0);
}
fGetHitAngle(P_sSide, P_obj);
_global.objSnd.fPlaySounds("sFx_paddle" + random(5), 40, 1);
}
}
if (sState.indexOf("Idle") != -1) {
fSetState("Hit" + nBarWide);
}
}
function fGetHitAngle(P_sSide, P_obj) {
if ((P_obj.nAngle <= 0) && (P_obj.nAngle >= -90)) {
if (_global.C.aKeys[0] && (_global.C.aKeys[1] == false)) {
P_obj.nAngle = -35 - random(Math.abs(P_obj.nAngle));
if (P_obj.nAngle > -35) {
P_obj.nAngle = -35;
}
if ((P_obj.nAngle > -75) && (P_obj.nAngle < -105)) {
P_obj.nAngle = -75;
}
P_obj.fChangeAngle(-P_obj.nAngle);
} else if ((_global.C.aKeys[0] == false) && (_global.C.aKeys[1])) {
P_obj.nAngle = -75 + random(Math.abs(-75 - P_obj.nAngle));
if (P_obj.nAngle < -75) {
P_obj.nAngle = -75;
}
if ((P_obj.nAngle > -75) && (P_obj.nAngle < -105)) {
P_obj.nAngle = -75;
}
P_obj.fChangeAngle(-P_obj.nAngle);
} else {
P_obj.fChangeAngle(-P_obj.nAngle);
}
} else if ((P_obj.nAngle <= -90) && (P_obj.nAngle >= -180)) {
if (_global.C.aKeys[0] && (_global.C.aKeys[1] == false)) {
P_obj.nAngle = -115 + random(Math.abs(-115 - P_obj.nAngle));
if (P_obj.nAngle > -115) {
P_obj.nAngle = -115;
}
if ((P_obj.nAngle > -75) && (P_obj.nAngle < -105)) {
P_obj.nAngle = -105;
}
P_obj.fChangeAngle(-P_obj.nAngle);
} else if ((_global.C.aKeys[0] == false) && (_global.C.aKeys[1])) {
P_obj.nAngle = -155 + random(Math.abs(P_obj.nAngle));
if (P_obj.nAngle > -155) {
P_obj.nAngle = -155;
}
if ((P_obj.nAngle > -75) && (P_obj.nAngle < -105)) {
P_obj.nAngle = -105;
}
P_obj.fChangeAngle(-P_obj.nAngle);
} else {
P_obj.fChangeAngle(-P_obj.nAngle);
}
}
}
function fMove(P_sMode) {
if (P_sMode == "Left") {
if (((mcRef._x - (mcRef._width / 2)) - nSpeed) < (_global.C.nLimitLeftX + 1)) {
var _local3 = (mcRef._x - (mcRef._width / 2)) - (_global.C.nLimitLeftX + 1);
mcRef._x = mcRef._x - _local3;
if (bReachLeftLimit == false) {
fMakeBallFollow(false, Math.abs(_local3));
}
bReachLeftLimit = true;
} else {
fWalkUD("Left");
bReachLeftLimit = false;
bReachRightLimit = false;
mcRef._x = mcRef._x - nSpeed;
fMakeBallFollow(false, nSpeed);
}
} else if (P_sMode == "Right") {
if (((mcRef._x + (mcRef._width / 2)) + nSpeed) > (_global.C.nLimitRightX - 1)) {
var _local3 = (_global.C.nLimitRightX - 1) - (mcRef._x + (mcRef._width / 2));
mcRef._x = mcRef._x + _local3;
if (bReachRightLimit == false) {
fMakeBallFollow(true, Math.abs(_local3));
}
bReachRightLimit = true;
} else {
fWalkUD("Right");
bReachLeftLimit = false;
bReachRightLimit = false;
mcRef._x = mcRef._x + nSpeed;
fMakeBallFollow(true, nSpeed);
}
}
}
function fWalkUD(P_sSide) {
mcRef._y = _global.Param.nPosY + aWalkPath[nWalkIndex];
if (P_sSide == "Right") {
nWalkIndex++;
if (nWalkIndex > aWalkPath.length) {
nWalkIndex = 0;
}
} else {
nWalkIndex--;
if (nWalkIndex < 0) {
nWalkIndex = aWalkPath.length;
}
}
}
function fMakeBallFollow(P_bAdd, P_nDistance) {
for (var _local4 in _global.C.aBall) {
if ((_global.C.aBall[_local4].sState.indexOf("Idle") != -1) && (_global.C.aBall[_local4].sState.indexOf("Disabled") == -1)) {
if (P_bAdd) {
_global.C.aBall[_local4].mcRef._x = _global.C.aBall[_local4].mcRef._x + P_nDistance;
} else {
_global.C.aBall[_local4].mcRef._x = _global.C.aBall[_local4].mcRef._x - P_nDistance;
}
}
}
}
function fGetHarpoon(P_bSwitch) {
if (P_bSwitch) {
nNumberHarpoon = _global.Param.nHarpoonStart;
_global.objHUD.fSetHarpoon(true, nNumberHarpoon);
if (bPowerHarpoon == false) {
bPowerHarpoon = true;
}
} else {
_global.objHUD.fSetHarpoon(false);
bPowerHarpoon = false;
}
}
function fGetHoney(P_bSwitch) {
if (P_bSwitch) {
nNumberHoney = _global.Param.nHoneyStart;
if (bPowerHoneyPot == false) {
bPowerHoneyPot = true;
_global.objHUD.fSetHoney(true);
_global.C.mBroadcaster.broadcastMessage("fGetSticky");
}
} else {
_global.objHUD.fSetHoney(false);
bPowerHoneyPot = false;
_global.C.mBroadcaster.broadcastMessage("fGetSticky");
}
}
function fGetNewWide(P_nNumber) {
if (P_nNumber == 0) {
fSetState("Idle" + nBarWide);
} else if (sState.indexOf("Transit") == -1) {
if (((P_nNumber == -1) && (nBarWide >= 1)) || ((P_nNumber == 1) && (nBarWide <= 1))) {
var _local4 = nBarWide;
nBarWide = nBarWide + P_nNumber;
if (nBarWide <= 0) {
nBarWide = 0;
} else if (nBarWide >= 2) {
nBarWide = 2;
}
if (P_nNumber == 1) {
_global.objSnd.fPlaySounds("sFx_expand", 50, 1);
} else if (P_nNumber == -1) {
_global.objSnd.fPlaySounds("sFx_shrink", 40, 1);
}
fSetState((("Transit" + _local4) + "_") + nBarWide);
fRearrangeBall(_local4, nBarWide);
}
}
}
function fRearrangeBall(P_oldWide, P_newWide) {
if (P_oldWide != P_newWide) {
if (P_newWide > P_oldWide) {
var _local4 = 1;
} else {
var _local4 = -1;
}
for (var _local5 in _global.C.aBall) {
if ((_global.C.aBall[_local5].sState.indexOf("Idle") != -1) && (_global.C.aBall[_local5].sState.indexOf("Disabled") == -1)) {
var _local3 = Math.abs(_global.C.aBall[_local5].mcRef._x - mcRef._x);
if (_global.C.aBall[_local5].mcRef._x >= mcRef._x) {
_global.C.aBall[_local5].mcRef._x = _global.C.aBall[_local5].mcRef._x + (_local3 * _local4);
if ((_global.C.aBall[_local5].mcRef._x + _global.C.aBall[_local5].nWidth) >= (_global.C.nLimitRightX - 1)) {
_global.C.aBall[_local5].mcRef._x = (_global.C.nLimitRightX - 1) - _global.C.aBall[_local5].nWidth;
}
} else {
_global.C.aBall[_local5].mcRef._x = _global.C.aBall[_local5].mcRef._x - (_local3 * _local4);
if ((_global.C.aBall[_local5].mcRef._x - _global.C.aBall[_local5].nWidth) <= (_global.C.nLimitLeftX + 1)) {
_global.C.aBall[_local5].mcRef._x = (_global.C.nLimitLeftX + 1) + _global.C.aBall[_local5].nWidth;
}
}
}
}
}
}
function fResetPaddle() {
if (nBarWide == 2) {
fGetNewWide(-1);
} else if (nBarWide == 0) {
fGetNewWide(1);
} else {
nBarWide = 1;
fGetNewWide(0);
}
_global.C.fManageCombo(0);
fGetHarpoon(false);
fGetHoney(false);
}
function fDoStateInit() {
switch (sState) {
case "Win0" :
case "Win1" :
case "Win2" :
_global.objSnd.fPlaySounds("sFx_SBYeh", 50, 1);
fMakeBallWin();
break;
case "Lose0" :
case "Lose1" :
case "Lose2" :
_global.objSnd.fPlaySounds("sFx_SBHow", 50, 1);
fMakeBallWin();
}
}
}
Symbol 829 MovieClip [__Packages.objDetect] Frame 0
class objDetect extends objState
{
var mcRef, bHitNothing, aObjectCollide, fSetState, bExtraBall, nWidth, nAngle, nHeight, bPowerArmor, nSpeed;
function objDetect (P_mcRef) {
super(mcRef);
bHitNothing = true;
aObjectCollide = [];
}
function fDetectCollision() {
bHitNothing = true;
fHitBrick();
fHitPaddle();
fHitStageBorder();
if (bHitNothing) {
fMove();
}
}
function fDetectHarpoonCollision() {
bHitNothing = true;
fHitBrick();
if (bHitNothing) {
fMove();
} else {
fSetState("Explode");
}
}
function fHitPaddle() {
aObjectCollide = [];
fDetectObjectSide(_global.C.objPaddle, true);
fGetNearestObject();
}
function fHitStageBorder() {
if (mcRef._y > (_global.Param.nPosY + 100)) {
bHitNothing = false;
if (bExtraBall != true) {
_global.C.fManageLive(-1);
fResetBall();
} else {
fRemoveExtraBall();
}
} else if (mcRef._x > (_global.C.nLimitRightX - nWidth)) {
bHitNothing = false;
mcRef._x = (_global.C.nLimitRightX - nWidth) - 1;
var _local3 = nAngle / Math.abs(nAngle);
fChangeAngle((180 - Math.abs(nAngle)) * _local3);
_global.objSnd.fPlaySounds("sFx_wall", 50, 1);
} else if (mcRef._x < (_global.C.nLimitLeftX + nWidth)) {
bHitNothing = false;
mcRef._x = (_global.C.nLimitLeftX + nWidth) + 1;
var _local3 = nAngle / Math.abs(nAngle);
fChangeAngle((180 - Math.abs(nAngle)) * _local3);
_global.objSnd.fPlaySounds("sFx_wall", 50, 1);
} else if (mcRef._y < nHeight) {
bHitNothing = false;
mcRef._y = nHeight + 1;
fChangeAngle(-nAngle);
_global.objSnd.fPlaySounds("sFx_wall", 50, 1);
}
}
function fHitBrick() {
aObjectCollide = [];
var _local3 = true;
for (var _local4 in _global.C.aBrick) {
if (_global.C.aBrick[_local4].sState.indexOf("Idle") != -1) {
fDetectObjectSide(_global.C.aBrick[_local4]);
if (_global.C.aBrick[_local4].sType == "Invulnerable") {
_local3 = false;
}
}
}
if ((bPowerArmor == true) && (_local3)) {
fGetAllLinedObject();
} else {
fGetNearestObject();
}
}
function fGetNearestObject() {
if (aObjectCollide.length != 0) {
var _local4;
var _local5;
for (var _local6 in aObjectCollide) {
var _local3 = aObjectCollide[_local6][4];
if ((_local3 < _local4) || (_local4 == undefined)) {
_local4 = _local3;
_local5 = aObjectCollide[_local6];
}
}
bHitNothing = false;
mcRef._x = _local5[1];
mcRef._y = _local5[2];
_local5[0].fManageHit(_local5[3], _global.C[mcRef._name]);
}
}
function fGetAllLinedObject() {
for (var _local3 in aObjectCollide) {
aObjectCollide[_local3][0].fManageHit(aObjectCollide[_local3][3], _global.C[mcRef._name]);
}
bHitNothing = true;
}
function fDetectObjectSide(P_obj, P_bPaddle) {
var _local13 = nAngle * (Math.PI/180);
var _local17 = 1 * Math.cos(_local13);
var _local16 = 1 * Math.sin(_local13);
var _local18 = nSpeed * _local17;
var _local19 = nSpeed * _local16;
var _local4 = P_obj.mcRef._x;
var _local11 = P_obj.mcRef._y;
var _local3 = P_obj.mcRef._width / 2;
var _local12 = P_obj.mcRef._height / 2;
var _local10 = mcRef._x;
var _local9 = mcRef._y;
var _local15 = mcRef._x - _local18;
var _local14 = mcRef._y - _local19;
var _local7 = fGetSlope(_local10, _local9, _local15, _local14);
var _local8 = _local9 - (_local7 * _local10);
if (P_bPaddle == true) {
var _local5 = new Object();
_local3 = P_obj.mcRef.mcPaddle._width / 2;
_local12 = P_obj.mcRef.mcPaddle._height / 2;
_local5 = new Object();
if (_global.C.G_aKeys[0] && (_global.C.G_aKeys[1] == false)) {
if (_global.C.objPaddle.bReachRightLimit == false) {
_local5.nLeft = _local4 - _local3;
_local5.nRight = _local4 + _local3;
} else {
_local5.nLeft = (_local4 - _local3) - nWidth;
_local5.nRight = (_local4 + _local3) + nWidth;
}
} else if ((_global.C.G_aKeys[0] == false) && (_global.C.G_aKeys[1])) {
if (_global.C.objPaddle.bReachLeftLimit == false) {
_local5.nLeft = _local4 - _local3;
_local5.nRight = _local4 + _local3;
} else {
_local5.nLeft = _local4 - _local3;
_local5.nRight = _local4 + _local3;
}
} else {
_local5.nLeft = _local4 - _local3;
_local5.nRight = _local4 + _local3;
}
_local5.nBottom = _local11 + _local12;
_local5.nTop = _global.Param.nPosY;
} else {
var _local5 = new Object();
_local5.nLeft = _local4 - _local3;
_local5.nRight = _local4 + _local3;
_local5.nBottom = _local11 + _local12;
_local5.nTop = _local11 - _local12;
}
if ((nAngle >= 0) && (nAngle <= 90)) {
fDetectBottomSide(_local9, _local7, _local8, _local5, P_obj);
fDetectRightSide(_local10, _local7, _local8, _local5, P_obj);
} else if ((nAngle >= 90) && (nAngle <= 180)) {
fDetectBottomSide(_local9, _local7, _local8, _local5, P_obj);
fDetectLeftSide(_local10, _local7, _local8, _local5, P_obj);
} else if ((nAngle <= 0) && (nAngle >= -90)) {
fDetectTopSide(_local9, _local7, _local8, _local5, P_obj);
fDetectRightSide(_local10, _local7, _local8, _local5, P_obj);
} else if ((nAngle <= -90) && (nAngle >= -180)) {
fDetectTopSide(_local9, _local7, _local8, _local5, P_obj);
fDetectLeftSide(_local10, _local7, _local8, _local5, P_obj);
}
}
function fGetSlope(X1, Y1, X2, Y2) {
var _local2 = (Y2 - Y1) / (X2 - X1);
if ((_local2 == Infinity) || (_local2 == (-Infinity))) {
_local2 = mcRef._y;
}
return(_local2);
}
function fDetectRightSide(X1, nPente, nOriginY, objBBox, P_obj) {
if (X1 >= objBBox.nRight) {
var _local3 = (nPente * objBBox.nRight) + nOriginY;
if ((_local3 >= objBBox.nTop) && (_local3 <= objBBox.nBottom)) {
var _local4 = Math.sqrt(Math.pow(objBBox.nRight - X1, 2) + Math.pow(_local3 - mcRef._y, 2));
if (_local4 < nSpeed) {
aObjectCollide.push([P_obj, objBBox.nRight, _local3, "Right", _local4]);
}
}
}
}
function fDetectBottomSide(Y1, nPente, nOriginY, objBBox, P_obj) {
if (Y1 >= objBBox.nBottom) {
var _local3 = (objBBox.nBottom - nOriginY) / nPente;
if ((_local3 >= objBBox.nLeft) && (_local3 <= objBBox.nRight)) {
var _local4 = Math.sqrt(Math.pow(_local3 - mcRef._x, 2) + Math.pow(objBBox.nBottom - Y1, 2));
if (_local4 < nSpeed) {
aObjectCollide.push([P_obj, _local3, objBBox.nBottom, "Bottom", _local4]);
}
}
}
}
function fDetectLeftSide(X1, nPente, nOriginY, objBBox, P_obj) {
if (X1 <= objBBox.nLeft) {
var _local3 = (nPente * objBBox.nLeft) + nOriginY;
if ((_local3 >= objBBox.nTop) && (_local3 <= objBBox.nBottom)) {
var _local4 = Math.sqrt(Math.pow(objBBox.nLeft - X1, 2) + Math.pow(_local3 - mcRef._y, 2));
if (_local4 < nSpeed) {
aObjectCollide.push([P_obj, objBBox.nLeft, _local3, "Left", _local4]);
}
}
}
}
function fDetectTopSide(Y1, nPente, nOriginY, objBBox, P_obj) {
if (Y1 <= objBBox.nTop) {
var _local3 = (objBBox.nTop - nOriginY) / nPente;
if ((_local3 >= objBBox.nLeft) && (_local3 <= objBBox.nRight)) {
var _local4 = Math.sqrt(Math.pow(_local3 - mcRef._x, 2) + Math.pow(objBBox.nTop - Y1, 2));
if (_local4 < nSpeed) {
aObjectCollide.push([P_obj, _local3, objBBox.nTop, "Top", _local4]);
}
}
}
}
function fChangeAngle() {
}
function fResetBall() {
}
function fMove() {
}
function fRemoveExtraBall() {
}
}
Symbol 830 MovieClip [__Packages.BallClass] Frame 0
class BallClass extends objDetect
{
var mcRef, nWidth, nHeight, SpinStick, SpinStickArmored, WinStick, WinArmored, WinStickArmored, bExtraBall, bPowerArmor, nAngle, fSetState, nDelayArmoredDone, nDelayArmoredToDo, nSpeedIndex, fDetectCollision, nFrTotalAnim, sState, bHitNothing, nVelocity_x, nVelocity_y, nSpeed;
function BallClass (P_mcRef, P_bExtraBall) {
super(mcRef);
mcRef = P_mcRef;
nWidth = (mcRef._width / 2) - 3;
nHeight = (mcRef._height / 2) - 3;
SpinStick = mx.utils.Delegate.create(this, Spin);
SpinStickArmored = mx.utils.Delegate.create(this, SpinArmored);
WinStick = mx.utils.Delegate.create(this, Win);
WinArmored = mx.utils.Delegate.create(this, Win);
WinStickArmored = mx.utils.Delegate.create(this, Win);
bExtraBall = P_bExtraBall;
if (bExtraBall) {
bPowerArmor = true;
nAngle = 45;
fSetState("Disabled_Idle");
} else {
fResetBall();
nDelayArmoredDone = 0;
nDelayArmoredToDo = _global.Param.nArmoredDelay;
mcRef._y = _global.Param.nPosY - 5;
}
}
function fResetBall() {
if (_global.Param.aGameplay[2] >= 0) {
_global.C.fResetSpeed();
mcRef._x = _global.C.objPaddle.mcRef._x;
fGetStick();
nSpeedIndex = 1;
fGetNewSpeed(0);
fGetArmor(false);
_global.C.objPaddle.fResetPaddle();
}
}
function fMakeObjectDisappear() {
fGetNextState("Win");
}
function fActive() {
nSpeedIndex = 1;
fGetNewSpeed(0);
}
function Spin() {
fDetectCollision();
}
function SpinArmored() {
fDetectCollision();
fDelayArmored();
}
function Win() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
_global.C.fRemoveBall(mcRef._name);
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
}
}
function fManageHit(P_sSide, P_obj) {
P_obj.fAddSpeed();
if (sState == "Disabled_Idle") {
switch (P_sSide) {
case "Left" :
nAngle = P_obj.nAngle - 10;
break;
case "Right" :
nAngle = P_obj.nAngle + 10;
break;
case "Bottom" :
nAngle = -55;
break;
case "Top" :
nAngle = 145;
}
_global.C.fRemoveBrick(mcRef._name);
}
_global.objSnd.fPlaySounds("sFx_ExtraBall", 50, 1);
fGetNextState("Spin");
if ((P_sSide == "Right") || (P_sSide == "Left")) {
fChangeAngle(nAngle);
} else if ((P_sSide == "Top") || (P_sSide == "Bottom")) {
fChangeAngle(-nAngle);
}
if ((P_sSide == "Right") || (P_sSide == "Left")) {
var _local5 = P_obj.nAngle / Math.abs(P_obj.nAngle);
P_obj.fChangeAngle((180 - Math.abs(P_obj.nAngle)) * _local5);
} else if ((P_sSide == "Top") || (P_sSide == "Bottom")) {
P_obj.fChangeAngle(-P_obj.nAngle);
}
}
function fGetNextState(P_sStateBase) {
if ((bPowerArmor && (_global.C.objPaddle.bPowerHoneyPot)) && (bExtraBall == false)) {
fSetState(P_sStateBase + "StickArmored");
} else if ((bPowerArmor && (_global.C.objPaddle.bPowerHoneyPot == false)) && (bExtraBall == false)) {
fSetState(P_sStateBase + "Armored");
} else if (((bPowerArmor == false) || (bExtraBall)) && (_global.C.objPaddle.bPowerHoneyPot)) {
fSetState(P_sStateBase + "Stick");
} else {
fSetState(P_sStateBase);
}
}
function fGetStick() {
fGetNextState("Idle");
bHitNothing = false;
if (mcRef._x < (_global.C.objPaddle.mcRef._x - (_global.C.objPaddle.mcRef._width / 2))) {
mcRef._x = _global.C.objPaddle.mcRef._x - (_global.C.objPaddle.mcRef._width / 2);
} else if (mcRef._x > (_global.C.objPaddle.mcRef._x + (_global.C.objPaddle.mcRef._width / 2))) {
mcRef._x = _global.C.objPaddle.mcRef._x + (_global.C.objPaddle.mcRef._width / 2);
}
mcRef._y = _global.Param.nPosY - 5;
}
function fGetSticky() {
if (sState.indexOf("Disabled") == -1) {
if (sState.indexOf("Idle") != -1) {
fGetNextState("Idle");
} else {
fGetNextState("Spin");
}
}
}
function fGetSpinning() {
if (bExtraBall == false) {
fGetNextState("Spin");
fChangeAngle(45);
} else {
fGetNextState("Spin");
fChangeAngle(135);
}
}
function fMove() {
mcRef._x = mcRef._x - nVelocity_x;
mcRef._y = mcRef._y - nVelocity_y;
if (bExtraBall == false) {
_global.C.fAttachBubble(mcRef, "Ball");
} else {
_global.C.fAttachBubble(mcRef, "ExtraBall");
}
}
function fChangeAngle(P_nAngle) {
nAngle = P_nAngle;
var _local2 = nAngle * (Math.PI/180);
var _local4 = 1 * Math.cos(_local2);
var _local3 = 1 * Math.sin(_local2);
nVelocity_x = nSpeed * _local4;
nVelocity_y = nSpeed * _local3;
}
function fGetArmor(P_bSwitch) {
if (P_bSwitch) {
nDelayArmoredDone = 0;
if (bPowerArmor == false) {
_global.objHUD.fSetArmor(true);
bPowerArmor = true;
}
} else {
_global.objHUD.fSetArmor(false);
bPowerArmor = false;
nDelayArmoredDone = 0;
}
if (sState.indexOf("Idle") != -1) {
fGetNextState("Idle");
} else {
fGetNextState("Spin");
}
}
function fDelayArmored() {
nDelayArmoredDone++;
if (nDelayArmoredDone >= nDelayArmoredToDo) {
fGetArmor(false);
fGetSticky();
}
}
function fGetNewSpeed(P_nNumber) {
nSpeedIndex = nSpeedIndex + P_nNumber;
if (nSpeedIndex <= 0) {
nSpeedIndex = 0;
} else if (nSpeedIndex >= 2) {
nSpeedIndex = 2;
}
nSpeed = _global.C.aSpeed[nSpeedIndex];
if (bExtraBall == false) {
for (var _local4 in _global.C.aBall) {
if (_global.C.aBall[_local4].mcRef._name != "objBall") {
_global.C.aBall[_local4].fGetNewSpeed(P_nNumber);
}
}
}
}
function fAddSpeed() {
if (bExtraBall == false) {
var _local4 = 0.04;
for (var _local3 in _global.Param.aSpeed) {
_global.C.aSpeed[_local3] = _global.C.aSpeed[_local3] + _local4;
}
fGetNewSpeed(0);
} else {
var _local4 = 0.04;
nSpeed = nSpeed + _local4;
}
}
function fRemoveExtraBall() {
var _local3 = mcRef._name;
_global.C.fRemoveBall(_local3);
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
}
Symbol 831 MovieClip [__Packages.EasterEggClass] Frame 0
class EasterEggClass extends objState
{
var mcRef, fSetState, nFrTotalAnim;
function EasterEggClass (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
fSetState("Empty");
}
function Idle() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Disappear");
}
}
function Appear() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Idle");
}
}
function Disappear() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
fSetState("Empty");
}
}
function Empty() {
fCheckKeys();
}
function fCheckKeys() {
if (_global.C.aKeys[3] == true) {
fSetState("Appear");
}
}
}
Symbol 832 MovieClip [__Packages.objBrick] Frame 0
class objBrick extends objState
{
var mcRef, sType, sColor, sBonusType, fSetState, nNumberHitDone, nNumberHitToDo, nPoint;
function objBrick (P_mcRef, P_sType, P_sColor) {
super(mcRef);
mcRef = P_mcRef;
sType = P_sType;
sColor = P_sColor;
sBonusType = undefined;
fSetState("Idle");
nNumberHitDone = 1;
mcRef.mcState.gotoAndStop(nNumberHitDone);
if (sType != "Invulnerable") {
_global.C.nBrickNumber++;
}
fGetProps();
}
function fExplode() {
_global.C.fDeleteBrick(1);
if ((_global.C.objPaddle.sState.indexOf("Win") == -1) && (_global.C.objPaddle.sState.indexOf("Lose") == -1)) {
_global.C.fAttachBonus(mcRef, sBonusType);
}
_global.C.fRemoveBrick(mcRef._name);
var _local3 = mcRef._name;
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
function fManageHit(P_sSide, P_obj) {
nNumberHitDone++;
switch (sType) {
case "Invulnerable" :
_global.objSnd.fPlaySounds("sFx_wall", 50, 1);
break;
case "Normal" :
if (P_sSide == "Bottom") {
_global.objSnd.fPlaySounds("sFx_brickUnder", 50, 1);
} else {
_global.objSnd.fPlaySounds("sFx_brick", 50, 1);
}
if (P_obj.bExtraBall == false) {
_global.C.fManageCombo(1);
}
if (nNumberHitDone > nNumberHitToDo) {
if (P_obj.bExtraBall) {
_global.C.fManagePoint(nPoint);
} else {
_global.C.fManagePoint(nPoint + (nPoint * _global.C.nCombo));
}
_global.C.fAddBrickExplodeSFX(mcRef, sColor, P_sSide);
fExplode();
}
break;
case "Multiple" :
if (P_sSide == "Bottom") {
_global.objSnd.fPlaySounds("sFx_brickUnder", 50, 1);
} else {
_global.objSnd.fPlaySounds("sFx_brick", 50, 1);
}
if (P_obj.bExtraBall == false) {
_global.C.fManageCombo(1);
}
if (nNumberHitDone > nNumberHitToDo) {
if (P_obj.bExtraBall) {
_global.C.fManagePoint(nPoint);
} else {
_global.C.fManagePoint(nPoint + (nPoint * _global.C.nCombo));
}
_global.C.fAddBrickExplodeSFX(mcRef, sColor, P_sSide);
fExplode();
} else {
mcRef.mcState.gotoAndStop(nNumberHitDone);
}
}
P_obj.fAddSpeed();
if ((P_obj.bPowerArmor == false) || (sType == "Invulnerable")) {
if ((P_sSide == "Right") || (P_sSide == "Left")) {
var _local5 = P_obj.nAngle / Math.abs(P_obj.nAngle);
P_obj.fChangeAngle((180 - Math.abs(P_obj.nAngle)) * _local5);
} else if ((P_sSide == "Top") || (P_sSide == "Bottom")) {
P_obj.fChangeAngle(-P_obj.nAngle);
}
}
}
function fGetProps() {
switch (sType) {
case "Normal" :
nPoint = 25;
break;
case "Multiple" :
nPoint = 50;
}
nNumberHitToDo = mcRef.mcState._totalframes;
}
}
Symbol 833 MovieClip [__Packages.objBonus] Frame 0
class objBonus extends objState
{
var mcRef, sType, nSpeed, bPicked, fSetState, nFrTotalAnim, nPoint;
function objBonus (P_mcRef, P_sType) {
super(mcRef);
mcRef = P_mcRef;
sType = P_sType;
nSpeed = 4;
bPicked = false;
fSetState("Idle");
}
function Idle() {
fMove();
}
function Explode() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
var _local3 = mcRef._name;
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
}
function fMove() {
nSpeed = nSpeed - 0.2;
mcRef._y = mcRef._y - nSpeed;
if (bPicked == false) {
if ((_global.C.objPaddle.sState.indexOf("Win") == -1) && (_global.C.objPaddle.sState.indexOf("Lose") == -1)) {
if (mcRef.hitTest(_global.C.objPaddle.mcRef)) {
fManageHit();
} else if (mcRef._y >= (_global.Param.nPosY + 100)) {
var _local3 = mcRef._name;
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
}
}
_global.C.fAttachBubble(mcRef, "Bonus");
}
function fManageHit() {
switch (sType) {
case "Harpoon" :
nPoint = 250;
_global.C.objPaddle.fGetHarpoon(true);
break;
case "Armor" :
nPoint = 200;
_global.C.objBall.fGetArmor(true);
break;
case "Honey" :
nPoint = 150;
_global.C.objPaddle.fGetHoney(true);
break;
case "SpeedUp" :
nPoint = 300;
_global.C.objBall.fGetNewSpeed(1);
break;
case "SpeedDown" :
nPoint = 0;
_global.C.objBall.fGetNewSpeed(-1);
break;
case "Live" :
nPoint = 1500;
_global.C.fManageLive(1);
break;
case "Point" :
nPoint = 3000;
break;
case "WideUp" :
nPoint = 250;
_global.C.objPaddle.fGetNewWide(1);
break;
case "WideDown" :
nPoint = 0;
_global.C.objPaddle.fGetNewWide(-1);
break;
}
_global.objSnd.fPlaySounds("sFx_Bonus", 50, 1);
_global.C.fManagePoint(nPoint);
fSetState("Explode");
}
function fMakeObjectDisappear() {
Explode();
}
}
Symbol 834 MovieClip [__Packages.objBubble] Frame 0
class objBubble extends objState
{
var mcRef, fSetState, nSpeed;
function objBubble (P_mcRef, P_sTypeBubble) {
super(mcRef);
mcRef = P_mcRef;
fGetRandom();
fSetState("Idle");
mcRef.mcColor.gotoAndStop(P_sTypeBubble);
}
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(1) + 1));
if (mcRef._xscale <= 5) {
var _local3 = mcRef._name;
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
}
}
Symbol 835 MovieClip [__Packages.objHarpoon] Frame 0
class objHarpoon extends objDetect
{
var mcRef, nWidth, nHeight, nSpeed, nAngle, fSetState, fDetectHarpoonCollision, nFrTotalAnim;
function objHarpoon (P_mcRef) {
super(mcRef);
mcRef = P_mcRef;
nWidth = 0;
nHeight = 0;
nSpeed = 15;
nAngle = 90;
fSetState("Idle");
_global.objSounds.fPlaySounds("sFx_throw", 50, 1);
}
function Idle() {
fDetectHarpoonCollision();
}
function Explode() {
if (mcRef.mcState._currentframe >= nFrTotalAnim) {
var _local3 = mcRef._name;
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
}
function fMove() {
var _local4 = nAngle * (Math.PI/180);
var _local5 = 1 * Math.sin(_local4);
var _local3 = _local5 * nSpeed;
mcRef._y = mcRef._y - _local3;
_global.C.fAttachBubble(mcRef, "Ball");
}
function fMakeObjectDisappear() {
Explode();
}
}
Symbol 836 MovieClip [__Packages.obj_Particle] Frame 0
class obj_Particle extends objState
{
var mcRef, nSpeedX, nDirectionX, nSpeedY, oStageBounds, fSetState;
function obj_Particle (P_mcRef, P_nSpeedX, P_nSpeedY, P_nDirectionX) {
super();
mcRef = P_mcRef;
nSpeedX = P_nSpeedX;
nDirectionX = P_nDirectionX;
nSpeedY = P_nSpeedY;
oStageBounds = new Object();
oStageBounds.nLeft = _global.C.nLimitLeftX + (mcRef._width / 2);
oStageBounds.nTop = 0;
oStageBounds.nRight = _global.C.nLimitRightX - (mcRef._width / 2);
oStageBounds.nBottom = _global.Param.nPosY + 100;
fSetState("Idle");
}
function Idle() {
nSpeedX = nSpeedX - 0.1;
if (nSpeedX < 1) {
nSpeedX = 1;
}
nSpeedY = nSpeedY + _global.C.nGravity;
fDetectCollider("X", nSpeedX * nDirectionX);
fDetectCollider("Y", nSpeedY, false);
mcRef._rotation = mcRef._rotation + (8 * nDirectionX);
fSetScaleDown();
}
function fSetDirectionX(P_nDirection) {
nDirectionX = P_nDirection;
}
function fDetectCollider(P_sCoor, P_nMoveValue, P_bCheckHitArea) {
if (P_sCoor == "X") {
if ((mcRef._x + P_nMoveValue) <= oStageBounds.nLeft) {
fHitLimit("Left", P_nMoveValue);
} else if ((mcRef._x + P_nMoveValue) >= oStageBounds.nRight) {
fHitLimit("Right", P_nMoveValue);
} else {
mcRef._x = mcRef._x + P_nMoveValue;
}
} else if (P_sCoor == "Y") {
if ((mcRef._y + P_nMoveValue) <= oStageBounds.nTop) {
fHitLimit("Top", P_nMoveValue);
} else if ((P_bCheckHitArea == false) && ((mcRef._y + P_nMoveValue) >= (oStageBounds.nBottom + mcRef._height))) {
fHitLimit("Bottom", P_nMoveValue);
} else if (P_bCheckHitArea && (P_nMoveValue > 0)) {
var _local9 = false;
var _local8;
var _local11 = mcRef._y;
var _local10 = mcRef._y + P_nMoveValue;
var _local4 = _local11;
while (_local4 <= _local10) {
var _local3 = {x:0, y:0};
_local3.x = mcRef._x;
_local3.y = _local4;
_global.C.objBKG.mcRef.localToGlobal(_local3);
if (_global.C.objBKG.mcRef.mcBKGHitArea.hitTest(_local3.x, _local3.y, true)) {
_local9 = true;
_local8 = _local4;
break;
}
_local4++;
}
if (_local9) {
mcRef._y = _local8;
fHitLimit("Bottom", P_nMoveValue);
} else {
mcRef._y = mcRef._y + P_nMoveValue;
}
} else {
mcRef._y = mcRef._y + P_nMoveValue;
}
}
}
function fHitLimit(P_sLimit, P_nMoveValue) {
switch (P_sLimit) {
case "Left" :
mcRef._x = oStageBounds.nLeft;
fSetDirectionX(-nDirectionX);
break;
case "Top" :
mcRef._y = oStageBounds.nTop;
nSpeedY = (-P_nMoveValue) * 0.5;
break;
case "Right" :
mcRef._x = oStageBounds.nRight;
fSetDirectionX(-nDirectionX);
break;
case "Bottom" :
mcRef._y = oStageBounds.nBottom;
nSpeedY = (-P_nMoveValue) * 0.5;
}
}
function fSetScaleDown() {
var _local2 = mcRef._xscale - 1.5;
mcRef._xscale = (mcRef._yscale = _local2);
if (_local2 <= 5) {
fRemoveInstance();
}
}
function fRemoveInstance() {
var _local3 = mcRef._name;
_global.C.fRemoveBroadcastObj(this);
_global.C.fRemoveInstance(mcRef);
_global.C.fRemoveActiveElement(_local3);
}
}
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
gotoAndStop (1);
Symbol 115 Button
on (release) {
_global.objSnd.fDoMute();
nextFrame();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 121 Button
on (release) {
_global.objSnd.fUndoMute();
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
prevFrame();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 126 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
_global.Param.fResume();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 129 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
_global.Param.fHelp();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 132 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
_global.objPopup.fSetState("QuitOpen");
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Instance of Symbol 123 MovieClip in Symbol 133 MovieClip Frame 1
onClipEvent (load) {
if (_global.objSnd.Mute) {
nextFrame();
} else {
stop();
}
}
Symbol 141 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
_global.Param.fQuit();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 144 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
_global.objPopup.fSetState("MenuOpen");
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 181 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
_global.Param.fResumeHelp();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 196 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
nextFrame();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 280 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
prevFrame();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 281 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 1
sLevel = _global.Param.fStyleNumber(_global.Param.nNextLevel, 2);
Symbol 340 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
_global.objTrans.fSetTransition("Game");
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 354 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
_global.objTrans.fSetTransition("Help");
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 370 MovieClip [mcBallHarpoon] Frame 1
_global.C.fAddHarpoon(this);
Symbol 370 MovieClip [mcBallHarpoon] Frame 2
stop();
Symbol 390 MovieClip [mcBonusHarpoon] Frame 2
_global.C.fAddBonus(this, "Harpoon");
Symbol 395 MovieClip [mcBonusArmor] Frame 2
_global.C.fAddBonus(this, "Armor");
Symbol 400 MovieClip [mcBonusHoney] Frame 2
_global.C.fAddBonus(this, "Honey");
Symbol 405 MovieClip [mcBonusSpeedUp] Frame 2
_global.C.fAddBonus(this, "SpeedUp");
Symbol 410 MovieClip [mcBonusLive] Frame 2
_global.C.fAddBonus(this, "Live");
Symbol 415 MovieClip [mcBonusSpeedDown] Frame 2
_global.C.fAddBonus(this, "SpeedDown");
Symbol 420 MovieClip [mcBonusPoint] Frame 2
_global.C.fAddBonus(this, "Point");
Symbol 425 MovieClip [mcBonusWideUp] Frame 2
_global.C.fAddBonus(this, "WideUp");
Symbol 430 MovieClip [mcBonusWideDown] Frame 2
_global.C.fAddBonus(this, "WideDown");
Symbol 434 MovieClip Frame 1
stop();
Symbol 435 MovieClip [mcBubble] Frame 1
_global.C.fAddBubble(this);
Symbol 435 MovieClip [mcBubble] Frame 2
stop();
Symbol 436 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 464 MovieClip Frame 1
_visible = false;
Symbol 474 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 9
_global.C.fAttachHarpoon(this);
Symbol 569 MovieClip Frame 1
_global.C.fRemoveInstance(this);
Symbol 574 MovieClip Frame 1
_global.C.fAddBrick(this, "Normal", "Blue");
Symbol 574 MovieClip Frame 2
stop();
Symbol 579 MovieClip Frame 1
_global.C.fAddBrick(this, "Normal", "Red");
Symbol 579 MovieClip Frame 2
stop();
Symbol 599 MovieClip Frame 1
_global.C.fAddExtraBall(this);
Symbol 607 MovieClip Frame 1
_global.C.fAddBrick(this, "Multiple", "Yellow");
Symbol 607 MovieClip Frame 2
stop();
Symbol 633 MovieClip Frame 1
_global.C.fAddBrick(this, "Multiple", "Orange");
Symbol 633 MovieClip Frame 2
stop();
Symbol 644 MovieClip Frame 1
_global.C.fAddBrick(this, "Multiple", "Pink");
Symbol 644 MovieClip Frame 2
stop();
Symbol 653 MovieClip Frame 1
_global.C.fAddBrick(this, "Multiple", "Green");
Symbol 653 MovieClip Frame 2
stop();
Symbol 666 MovieClip Frame 1
_global.C.fAddBrick(this, "Multiple", "Purple");
Symbol 666 MovieClip Frame 2
stop();
Symbol 670 MovieClip Frame 1
_global.C.fAddBrick(this, "Invulnerable");
Symbol 698 MovieClip Frame 1
stop();
Symbol 705 MovieClip Frame 1
stop();
Symbol 714 MovieClip Frame 1
stop();
Symbol 727 Button
on (release) {
_global.objSounds.fPlaySounds("sFx_btnDown", 100, 1);
_global.Param.fMenu();
}
on (rollOver) {
_global.objSounds.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 757 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
_global.objHS.fDoViewHS();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 772 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
_global.objHS.fDoSubmitHS();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 786 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
_global.Param.fPlayAgain();
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}
Symbol 809 Button
on (press) {
ControlScroll.scrollUp = true;
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
}
on (release, releaseOutside) {
ControlScroll.scrollUp = false;
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Symbol 810 Button
on (press) {
ControlScroll.scrollDown = true;
_global.objSnd.fPlaySounds("sFx_btnDownMenu", 100, 1);
}
on (release, releaseOutside) {
ControlScroll.scrollDown = false;
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOverMenu", 100, 1);
}
Instance of Symbol 803 MovieClip "ControlScroll" in Symbol 812 MovieClip Frame 1
onClipEvent (load) {
scrollUp = false;
scrollDown = false;
}
onClipEvent (enterFrame) {
if (scrollUp == true) {
_parent.txtHSNumber.scroll--;
_parent.txtHSName.scroll--;
_parent.txtHSScore.scroll--;
} else if (scrollDown == true) {
_parent.txtHSNumber.scroll++;
_parent.txtHSName.scroll++;
_parent.txtHSScore.scroll++;
}
}
Instance of Symbol 105 MovieClip in Symbol 818 MovieClip Frame 1
/* no clip actions */
Symbol 819 Button
on (release) {
_global.objSnd.fPlaySounds("sFx_btnDown", 100, 1);
btnSubmitHS._visible = false;
_global.objHS.submitScore(_global.Param.aGameplay[0]);
}
on (rollOver) {
_global.objSnd.fPlaySounds("sFx_btnOver", 100, 1);
}