Frame 1
var _oPreloaderScreen = (new com.disney.gem.games.poohAnubis.screens.PreloaderScreen(mcScreens.mcPreloader));
com.sarbakan.BaseDisneyController.bDEBUG = false;
new com.disney.gem.games.poohAnubis.Controller(this, _oPreloaderScreen);
Symbol 731 MovieClip [__Packages.com.sarbakan.utils.StateManaged] Frame 0
class com.sarbakan.utils.StateManaged
{
var mcRef, bPausable, sNextState, sState;
function StateManaged (_mcRef) {
setMC(_mcRef);
setPausable(true);
}
function setMC(_mcRef) {
mcRef = _mcRef;
}
function setPausable(_bPausable) {
bPausable = _bPausable;
}
function setState(_sState, _bInstant, _bForce) {
sNextState = _sState;
if (_bInstant) {
checkStateChange();
}
if (_bForce) {
mcRef.mcState.gotoAndPlay(1);
}
}
function getState() {
return(sState);
}
function stateStarting() {
return(mcRef.mcState._currentframe == 1);
}
function stateFinished() {
return(mcRef.mcState._currentframe == mcRef.mcState._totalframes);
}
function stateCurrentFrame() {
return(mcRef.mcState._currentframe);
}
function stateIsNot() {
var _local2 = false;
var _local3 = arguments.length - 1;
for ( ; _local3 >= 0 ; _local3--) {
if (arguments[_local3] == sState) {
_local2 = true;
break;
}
}
return(!_local2);
}
function destroy() {
delete mcRef;
}
function get Mc() {
return(mcRef);
}
function onUpdate() {
checkStateChange();
this["state_" + sState]();
}
function checkStateChange() {
if ((sNextState != undefined) && (sNextState != sState)) {
this[("state_" + sState) + "_end"]();
sState = sNextState;
sNextState = undefined;
mcRef.gotoAndStop(sState);
this[("state_" + sState) + "_init"]();
}
}
function onUpdatePaused() {
if (bPausable == false) {
onUpdate();
}
}
function onPause() {
if (bPausable) {
mcRef.mcState.stop();
}
}
function onUnPause() {
if (bPausable) {
mcRef.mcState.play();
}
}
}
Symbol 732 MovieClip [__Packages.com.sarbakan.utils.ScreenController] Frame 0
class com.sarbakan.utils.ScreenController extends com.sarbakan.utils.StateManaged
{
var setMC, setState, setPausable, oController, bInOut, fHideCallBack, mcRef, sState, stateFinished;
function ScreenController (_mcRef) {
super();
setMC(_mcRef);
setState(sSTATE_HIDDEN);
setPausable(false);
}
function setGameController(_oController) {
oController = _oController;
}
function show(_bInOut) {
bInOut = _bInOut;
if (bInOut) {
setState(sSTATE_IN, true);
} else {
setState(sSTATE_IDLE, true);
}
}
function hide(_fHideCallBack, _bInOutOverride) {
fHideCallBack = _fHideCallBack;
var _local4 = bInOut;
if (_bInOutOverride != undefined) {
_local4 = _bInOutOverride;
}
if (_local4) {
setState(sSTATE_OUT);
} else {
setState(sSTATE_HIDDEN, true);
fHideCallBack();
}
}
function getRef() {
return(mcRef);
}
function isInOutTransitionning() {
return((sState == sSTATE_IN) || (sState == sSTATE_OUT));
}
function state_in() {
if (stateFinished()) {
setState(sSTATE_IDLE);
}
}
function state_out() {
if (stateFinished()) {
setState(sSTATE_HIDDEN, true);
fHideCallBack();
}
}
function state_in_init() {
mcRef.btBlocker.useHandCursor = false;
}
function state_idle_init() {
mcRef.btBlocker.useHandCursor = false;
}
function state_out_init() {
mcRef.btBlocker.useHandCursor = false;
}
static var sSTATE_HIDDEN = "hidden";
static var sSTATE_IN = "in";
static var sSTATE_IDLE = "idle";
static var sSTATE_OUT = "out";
}
Symbol 733 MovieClip [__Packages.com.disney.gem.games.poohAnubis.screens.PreloaderScreen] Frame 0
class com.disney.gem.games.poohAnubis.screens.PreloaderScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function PreloaderScreen (_mcRef) {
super(_mcRef);
}
function state_idle() {
var _local2 = com.disney.gem.games.poohAnubis.Controller(oController).mcTimeline.getBytesLoaded() / com.disney.gem.games.poohAnubis.Controller(oController).mcTimeline.getBytesTotal();
mcRef.mcState.txtLoading.text = Math.round(_local2 * 100) + "%";
if (_local2 == 1) {
com.disney.gem.games.poohAnubis.Controller(oController).onPreloadingDone();
}
}
}
Symbol 734 MovieClip [__Packages.com.sarbakan.BaseDisneyController] Frame 0
class com.sarbakan.BaseDisneyController
{
static var oInstance;
var mcTimeline, oPreloaderScreen, oMainBroadcaster, oFrameRate, aPopups, oTransitionManager, bSoundMuted, nLastSoundToggleTimer, bPaused, oDXDControllerWrapper, nGamePhase, oCurrentScreen, fScreenShowTransitionCallBack, fScreenHideCallBack, nLevel, nScore, bInstructionCanBeDisplayed, bInstructionActive, nLastUpdateTimer;
function BaseDisneyController (_mcTimeline, _oPreloaderScreen) {
oInstance = this;
mcTimeline = _mcTimeline;
_mcTimeline.stop();
oPreloaderScreen = _oPreloaderScreen;
oMainBroadcaster = new Object();
AsBroadcaster.initialize(oMainBroadcaster);
oMainBroadcaster.addListener(this);
if (bDEBUG) {
oFrameRate = new com.sarbakan.utils.FrameRateDisplayer(_mcTimeline, nFRAME_RATE, nGAME_STAGE_WIDTH);
oMainBroadcaster.addListener(oFrameRate);
} else {
Stage.showMenu = false;
mcTimeline._focusrect = false;
}
aPopups = new Array();
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
setDXDCallback();
} else {
initStandAloneController();
}
}
static function getInstance() {
return(oInstance);
}
function init() {
setGamePhase(nGAME_PHASE_PACKAGING);
stopScreenContainers();
oTransitionManager = new com.sarbakan.utils.TransitionManager(mcTimeline.mcTransitions);
oMainBroadcaster.addListener(oTransitionManager);
bSoundMuted = false;
nLastSoundToggleTimer = getTimer();
}
function update(_nElapsed) {
if (bPaused) {
oMainBroadcaster.broadcastMessage("onUpdatePaused", _nElapsed);
} else {
oMainBroadcaster.broadcastMessage("onUpdate", _nElapsed);
}
checkGlobalKeys();
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
bSoundMuted = oDXDControllerWrapper.isMuted();
}
}
function pause() {
if (!bPaused) {
bPaused = true;
oMainBroadcaster.broadcastMessage("onPause");
}
}
function unpause() {
if (bPaused) {
bPaused = false;
oMainBroadcaster.broadcastMessage("onUnPause");
}
}
function togglePause() {
if (bPaused) {
unpause();
} else {
pause();
}
}
function getControllerMode() {
if (com.disney.gem.base.BaseObject == undefined) {
var _local2 = nCONTROLLER_MODE_STANDALONE;
} else {
var _local2 = nCONTROLLER_MODE_DXD;
}
return(_local2);
}
function setGamePhase(_nPhase) {
nGamePhase = _nPhase;
switch (_nPhase) {
case nGAME_PHASE_PRELOADER :
mcTimeline.gotoAndStop("preloader");
break;
case nGAME_PHASE_PACKAGING :
mcTimeline.gotoAndStop("packaging");
break;
case nGAME_PHASE_INGAME :
mcTimeline.gotoAndStop("game");
}
}
function getGamePhase() {
return(nGamePhase);
}
function gameLog(_sText) {
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
oDXDControllerWrapper.gameLog(_sText);
}
}
function showScreen(_oScreenController, _bInOut, _sTransitionID, _fMidTransitionCallBack) {
if (oCurrentScreen) {
hideCurrentScreen(com.sarbakan.utils.Delegate.create(this, showScreen, _oScreenController, _bInOut, null, _fMidTransitionCallBack), _sTransitionID);
} else {
oCurrentScreen = _oScreenController;
oCurrentScreen.setGameController(this);
if (_sTransitionID != undefined) {
fScreenShowTransitionCallBack = _fMidTransitionCallBack;
oTransitionManager.playTransition(_sTransitionID, com.sarbakan.utils.Delegate.create(this, onScreenShowTransitionMiddle, _bInOut));
} else {
oCurrentScreen.show(_bInOut);
_fMidTransitionCallBack();
}
oMainBroadcaster.addListener(oCurrentScreen);
}
}
function hideCurrentScreen(_fHideCallBack, _sTransition, _fEndCallBack) {
fScreenHideCallBack = _fHideCallBack;
if (_sTransition != undefined) {
oTransitionManager.playTransition(_sTransition, com.sarbakan.utils.Delegate.create(oCurrentScreen, oCurrentScreen.hide, com.sarbakan.utils.Delegate.create(this, onScreenHidden)), _fEndCallBack);
} else {
oCurrentScreen.hide(com.sarbakan.utils.Delegate.create(this, onScreenHidden));
}
}
function showPopup(_oPopupController, _bInOut) {
var _local4 = false;
var _local5 = aPopups.length - 1;
for ( ; _local5 >= 0 ; _local5--) {
var _local6 = aPopups[_local5];
if (_oPopupController.getRef() == _local6.getRef()) {
_local4 = true;
_local6.destroy();
oMainBroadcaster.removeListener(_local6);
aPopups[_local5] = _oPopupController;
break;
}
}
if (!_local4) {
aPopups.push(_oPopupController);
}
_oPopupController.setGameController(this);
_oPopupController.show(_bInOut);
oMainBroadcaster.addListener(_oPopupController);
}
function setLevel(_nLevel) {
nLevel = _nLevel;
}
function getLevel() {
return(nLevel);
}
function setScore(_nScore) {
nScore = _nScore;
}
function increaseScore(_nIncrement) {
nScore = nScore + _nIncrement;
}
function getScore() {
return(nScore);
}
function allowInstructions() {
bInstructionCanBeDisplayed = true;
}
function disallowInstructions() {
bInstructionCanBeDisplayed = false;
}
function showInstructions() {
if (canShowInstructions()) {
bInstructionActive = true;
showInstructionsScreen();
}
}
function hideInstructions() {
if (canHideInstructions()) {
bInstructionActive = false;
hideInstructionsScreen();
}
}
function toggleSound() {
if ((getTimer() - nLastSoundToggleTimer) >= nSOUND_TOGGLE_DELAY) {
bSoundMuted = !bSoundMuted;
nLastSoundToggleTimer = getTimer();
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
oDXDControllerWrapper.toggleSound();
} else {
toggleSoundStandalone();
}
}
}
function onPreloadingDone() {
hideCurrentScreen();
init();
}
function onGameStart() {
setLevel(1);
setScore(0);
}
function onLevelStart() {
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
oDXDControllerWrapper.startLevel(nLevel, nScore);
}
}
function onLevelEnd() {
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
oDXDControllerWrapper.endLevel(nLevel, nScore);
}
}
function onGameEnd() {
if (getControllerMode() == nCONTROLLER_MODE_DXD) {
oDXDControllerWrapper.endGame(nLevel, nScore);
}
}
function onTransitionStart(_mcTransition) {
}
function onTransitionMiddle(_mcTransition) {
}
function onEnterFrame() {
var _local2 = getTimer();
update(_local2 - nLastUpdateTimer);
nLastUpdateTimer = _local2;
}
function onScreenShowTransitionMiddle(_bInOut) {
fScreenShowTransitionCallBack();
oCurrentScreen.show(_bInOut);
}
function onScreenHidden() {
oMainBroadcaster.removeListener(oCurrentScreen);
delete oCurrentScreen;
fScreenHideCallBack();
}
function setDXDCallback() {
mcTimeline.init = com.sarbakan.utils.Delegate.create(this, initDXDController);
}
function initDXDController(_oOwner) {
oDXDControllerWrapper = new com.sarbakan.DXDControllerWrapper(this, mcTimeline, _oOwner);
return(oDXDControllerWrapper);
}
function initStandAloneController() {
mcTimeline.onEnterFrame = com.sarbakan.utils.Delegate.create(this, onEnterFrame);
nLastUpdateTimer = getTimer();
initPreloader();
}
function initPreloader() {
setGamePhase(nGAME_PHASE_PRELOADER);
showScreen(oPreloaderScreen);
}
function checkGlobalKeys() {
if (Key.isDown(nKEY_INSTRUCTIONS)) {
if (!bInstructionActive) {
showInstructions();
} else {
hideInstructions();
}
}
if (Key.isDown(nKEY_SOUND)) {
toggleSound();
}
}
function toggleSoundStandalone() {
var _local2 = new Sound(mcTimeline);
if (!bSoundMuted) {
_local2.setVolume(100);
} else {
_local2.setVolume(0);
}
}
function canShowInstructions() {
return((!bInstructionActive) && (bInstructionCanBeDisplayed && ((!oCurrentScreen.isInOutTransitionning()) && (!oTransitionManager.isTransitionning()))));
}
function canHideInstructions() {
return(bInstructionActive && (bInstructionCanBeDisplayed && ((!oCurrentScreen.isInOutTransitionning()) && (!oTransitionManager.isTransitionning()))));
}
function showInstructionsScreen() {
}
function hideInstructionsScreen() {
}
function stopScreenContainers() {
var _local2 = [mcTimeline.mcPopups, mcTimeline.mcScreens];
var _local3 = _local2.length - 1;
for ( ; _local3 >= 0 ; _local3--) {
for (var j in _local2[_local3]) {
_local2[_local3][j].stop();
}
}
}
static var bDEBUG = true;
static var nFRAME_RATE = 30;
static var nCONTROLLER_MODE_STANDALONE = 1;
static var nCONTROLLER_MODE_DXD = 2;
static var nGAME_PHASE_PRELOADER = 1;
static var nGAME_PHASE_PACKAGING = 2;
static var nGAME_PHASE_INGAME = 3;
static var nKEY_INSTRUCTIONS = 72;
static var nKEY_SOUND = 77;
static var nGAME_STAGE_WIDTH = 580;
static var nGAME_STAGE_HEIGHT = 400;
static var nSOUND_TOGGLE_DELAY = 100;
}
Symbol 735 MovieClip [__Packages.com.sarbakan.utils.TransitionManager] Frame 0
class com.sarbakan.utils.TransitionManager extends com.sarbakan.utils.StateManaged
{
var setPausable, mcTransitionContainer, mcTransition, fMiddleCallBack, fEndCallBack, bTransitionning, setMC, setState, stateFinished, mcRef;
function TransitionManager (_mcTransition) {
super();
setPausable(false);
mcTransitionContainer = _mcTransition;
for (var i in mcTransitionContainer) {
mcTransitionContainer[i].stop();
}
}
function playTransition(_sTransitionID, _fMiddleCallBack, _fEndCallBack) {
mcTransition = mcTransitionContainer["mc" + com.sarbakan.utils.MoreString.upperFirstChar(_sTransitionID)];
fMiddleCallBack = _fMiddleCallBack;
fEndCallBack = _fEndCallBack;
if (mcTransition == undefined) {
} else {
bTransitionning = true;
setMC(mcTransition);
setState(sSTATE_IN);
}
}
function isTransitionning() {
return(bTransitionning);
}
function state_in() {
if (stateFinished()) {
setState(sSTATE_OUT);
fMiddleCallBack();
}
}
function state_out() {
if (stateFinished()) {
bTransitionning = false;
setState(sSTATE_HIDDEN);
fEndCallBack();
}
}
function state_in_init() {
com.sarbakan.BaseDisneyController.getInstance().onTransitionStart(mcTransition);
mcRef.btBlocker.useHandCursor = false;
}
function state_out_init() {
com.sarbakan.BaseDisneyController.getInstance().onTransitionMiddle(mcTransition);
mcRef.btBlocker.useHandCursor = false;
}
static var sSTATE_IN = "in";
static var sSTATE_OUT = "out";
static var sSTATE_HIDDEN = "hidden";
}
Symbol 736 MovieClip [__Packages.com.sarbakan.utils.MoreString] Frame 0
class com.sarbakan.utils.MoreString
{
function MoreString () {
}
static function pad(_sToPad, _sCharPad, _nMinLength, _sSideToPad) {
var _local6 = String(_sToPad);
while (_local6.length < _nMinLength) {
if (_sSideToPad == "RIGHT") {
_local6 = _local6 + _sCharPad;
} else {
_local6 = _sCharPad + _local6;
}
}
return(_local6);
}
static function trim(_sToTrim, _sCharTrim, _sSideToTrim) {
var _local5 = String(_sToTrim);
if (_sSideToTrim == "RIGHT") {
while (_local5.substr(_local5.length - 2, 1) == _sCharTrim) {
_local5 = _local5.slice(-1);
}
} else {
while (_local5.substr(0, 1) == _sCharTrim) {
_local5 = _local5.slice(1);
}
}
return(_local5);
}
static function replace(_sString, _sFind, _sReplace) {
return(_sString.split(_sFind).join(_sReplace));
}
static function formatTime(_nTime) {
var _local3 = _nTime;
var _local4 = Math.floor(_local3 / 60);
var _local5 = Math.round(_local3 - (_local4 * 60));
return((pad(String(_local4), "0", 2) + ":") + pad(String(_local5), "0", 2));
}
static function formatNumber(__sNumber, __nMinimumChar) {
var _local4 = String(__sNumber);
var _local5 = "";
var _local6 = _local4.length;
_local6 = _local6 / 3;
if (_local6 <= 1) {
var _local7 = _local4;
if (_local7.length < __nMinimumChar) {
_local7 = "0" + _local7;
}
} else {
var _local8 = _local6;
for ( ; _local8 > 1 ; _local8--) {
_local5 = (" " + _local4.substr(-3)) + _local5;
_local4 = _local4.substr(0, -3);
}
var _local7 = _local4 + _local5;
if (_local7.length < __nMinimumChar) {
_local7 = "0" + _local7;
}
}
return(_local7);
}
static function upperFirstChar(_sString) {
return(_sString.substr(0, 1).toUpperCase() + _sString.substr(1));
}
static function lowerFirstChar(_sString) {
return(_sString.substr(0, 1).toLowerCase() + _sString.substr(1));
}
static function convertToBoolean(_sString) {
return(_sString.toLowerCase() == "true");
}
static function formatMoney(_nMoney, _sDelimiteur, _bDecimalOpt) {
if (_bDecimalOpt == undefined) {
var _local9 = true;
} else {
var _local9 = _bDecimalOpt;
}
var _local5 = String(_nMoney).split(".");
if (_local5[1] != undefined) {
var _local6 = _local5[1].substr(0, 2);
switch (_local6.length) {
case 0 :
_local6 = _local6 + "00";
break;
case 1 :
_local6 = _local6 + "0";
break;
case 2 :
break;
default :
_local6 = "00";
}
} else {
var _local6 = "00";
}
var _local8 = _local5[0];
var _local7 = "";
while (_local8.length > 3) {
_local7 = (_sDelimiteur + _local8.substr(_local8.length - 3)) + _local7;
_local8 = _local8.substr(0, _local8.length - 3);
}
_local7 = _local8 + _local7;
if (_local9) {
return(((_local7 + ".") + _local6) + "$");
}
return(_local7 + " $");
}
static function getOrdinalSuffix(_nNumber) {
var _local4 = String(_nNumber);
if ((_local4.substr(-2, 2) == 11) || ((_local4.substr(-2, 2) == 12) || (_local4.substr(-2, 2) == 13))) {
var _local3 = "th";
} else if (_local4.substr(-1, 1) == 1) {
var _local3 = "st";
} else if (_local4.substr(-1, 1) == 2) {
var _local3 = "nd";
} else if (_local4.substr(-1, 1) == 3) {
var _local3 = "rd";
} else {
var _local3 = "th";
}
return(_local3);
}
}
Symbol 737 MovieClip [__Packages.com.sarbakan.DXDControllerWrapper] Frame 0
class com.sarbakan.DXDControllerWrapper extends com.disney.gem.games.BaseGameController
{
var oRealController, __owner;
function DXDControllerWrapper (_oRealController, _mcTimeline, _oOwner) {
super(_mcTimeline, _oOwner);
oRealController = _oRealController;
}
function init() {
super.init();
oRealController.init();
}
function update(_nElapsed) {
oRealController.update(_nElapsed);
}
function toggleSound() {
__owner.onToggleSound();
}
function isMuted() {
return(!__owner.__soundOn);
}
function gameLog(_sText) {
__owner.gameLog(_sText, "game");
}
}
Symbol 738 MovieClip [__Packages.com.disney.gem.games.GameContainer] Frame 0
class com.disney.gem.games.GameContainer
{
function GameContainer () {
}
}
Symbol 739 MovieClip [__Packages.com.sarbakan.utils.FrameRateDisplayer] Frame 0
class com.sarbakan.utils.FrameRateDisplayer
{
var nMovieFPS, nUpdateCounter, nAverageFps, nCurrentFPS, nUpdateCount, mcDebug, nLastGetTimer;
function FrameRateDisplayer (_mcTimeline, _nMovieFPS, _nStageWidth) {
nMovieFPS = _nMovieFPS;
nUpdateCounter = 0;
nAverageFps = 0;
nCurrentFPS = nMovieFPS;
reset();
startDebug(_mcTimeline, _nStageWidth);
}
function get fps() {
return(nCurrentFPS);
}
function onUpdate() {
if ((++nUpdateCount) == nMovieFPS) {
computeFrameRate();
updateDebug();
}
}
function onUpdatePaused() {
onUpdate();
}
function startDebug(_mcTimeline, _nStageWidth) {
mcDebug = _mcTimeline.createEmptyMovieClip("PerformanceWatcherDebug", DEBUG_DEPTH);
mcDebug._x = (_nStageWidth - DEBUG_RIGHT_MARGIN) - 400;
mcDebug._y = DEBUG_TOP_MARGIN;
mcDebug.createTextField("field", 2, 0, 0, 400, 50);
var _local4 = new TextFormat();
_local4.font = DEBUG_FONT;
_local4.size = DEBUG_FONT_SIZE;
_local4.color = DEBUG_FONT_COLOR;
_local4.align = "right";
mcDebug.field.setNewTextFormat(_local4);
mcDebug.field.selectable = false;
mcDebug.createTextField("fieldShadow", 1, 1, 1, 400, 50);
var _local5 = new TextFormat();
_local5.font = DEBUG_FONT;
_local5.size = DEBUG_FONT_SIZE;
_local5.color = DEBUG_FONT_SHADOW_COLOR;
_local5.align = "right";
mcDebug.fieldShadow.setNewTextFormat(_local5);
mcDebug.fieldShadow.selectable = false;
}
function reset() {
nUpdateCount = 0;
nLastGetTimer = getTimer();
}
function computeFrameRate() {
var _local2 = getTimer() - nLastGetTimer;
var _local3 = _local2 / 1000;
nCurrentFPS = Math.round(nMovieFPS / _local3);
reset();
}
function updateDebug() {
if (mcDebug != undefined) {
nUpdateCounter++;
var _local2 = ((nCurrentFPS + " fps (avg ") + getAverage()) + ")";
mcDebug.field.text = _local2;
mcDebug.fieldShadow.text = _local2;
}
}
function getAverage() {
nAverageFps = nAverageFps + ((nCurrentFPS - nAverageFps) * (1 / nUpdateCounter));
var _local2 = "";
var _local3 = String(nAverageFps).split(".");
if (_local3[1] == undefined) {
_local2 = nAverageFps + ".00";
} else if (_local3[1].length == 1) {
_local2 = (_local3[0] + ".0") + _local3[1];
} else {
_local2 = (_local3[0] + ".") + _local3[1].substr(0, 2);
}
return(_local2);
}
static var DEBUG_DEPTH = 123456;
static var DEBUG_RIGHT_MARGIN = 0;
static var DEBUG_TOP_MARGIN = 0;
static var DEBUG_FONT = "Verdana";
static var DEBUG_FONT_SIZE = 10;
static var DEBUG_FONT_COLOR = 16777215;
static var DEBUG_FONT_SHADOW_COLOR = 0;
}
Symbol 740 MovieClip [__Packages.com.sarbakan.utils.Delegate] Frame 0
class com.sarbakan.utils.Delegate extends Object
{
var func;
function Delegate () {
super();
}
function DelegateArgs(f) {
func = f;
}
static function create(obj, func) {
var _local4 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
var _local4 = arguments.callee.arg;
_local4 = _local4.concat(arguments);
return(_local3.apply(_local2, _local4));
};
_local4.target = obj;
_local4.func = func;
_local4.arg = arguments.slice(2);
return(_local4);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 741 MovieClip [__Packages.com.disney.gem.games.poohAnubis.Controller] Frame 0
class com.disney.gem.games.poohAnubis.Controller extends com.sarbakan.BaseDisneyController
{
var showScreen, mcTimeline, allowInstructions, onGameStart, setLevel, bPaused, unpause, setGamePhase, nLevel, oGame, oMainBroadcaster, hideCurrentScreen, onLevelStart, oTransitionManager, onLevelEnd, pause, nGamePhase, oMusicPack, getLevel, showPopup, disallowInstructions;
function Controller (_mcTimeline, _oPreloaderScreen) {
super(_mcTimeline, _oPreloaderScreen);
com.sarbakan.sound.SoundManager.doInit(_mcTimeline.createEmptyMovieClip(sMC_SOUND_NAME, nMC_SOUND_DEPTH));
com.sarbakan.sound.SoundManager.setCategoryVolume(sSOUND_CAT_MUSIC, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_MUSIC);
com.sarbakan.sound.SoundManager.setCategoryVolume(sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
}
static function getInstance() {
return(com.disney.gem.games.poohAnubis.Controller(com.sarbakan.BaseDisneyController.oInstance));
}
function init() {
super.init();
showTitleScreen();
}
function showTitleScreen(_bShowTransition) {
if (_bShowTransition) {
showScreen(new com.disney.gem.games.poohAnubis.screens.TitleScreen(mcTimeline.mcScreens.mcTitle), false, sTRANSITION_DEFAULT);
playTransitionSound();
} else {
showScreen(new com.disney.gem.games.poohAnubis.screens.TitleScreen(mcTimeline.mcScreens.mcTitle));
}
startPackMusic();
allowInstructions();
}
function startNewGame() {
onGameStart();
setLevel(0);
startNextLevel();
}
function startNextLevel() {
if (bPaused) {
unpause();
}
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME);
setLevel(nLevel + 1);
oGame = new com.disney.gem.games.poohAnubis.GameEngine(this, mcTimeline.mcGame);
oMainBroadcaster.addListener(oGame);
hideCurrentScreen(undefined, sTRANSITION_DEFAULT, com.sarbakan.utils.Delegate.create(this, transitionDone));
playTransitionSound();
stopPackMusic();
onLevelStart();
oGame.startGameMusic();
}
function restartLevel() {
oTransitionManager.playTransition(sTRANSITION_DEFAULT, com.sarbakan.utils.Delegate.create(this, prepareSameLevel));
onLevelEnd();
playTransitionSound();
}
function transitionDone() {
oGame.transitionDone();
allowInstructions();
}
function showInstructionsScreen() {
pause();
showScreen(new com.disney.gem.games.poohAnubis.screens.HelpScreen(mcTimeline.mcScreens.mcHelp), false, sTRANSITION_DEFAULT);
playTransitionSound();
}
function hideInstructionsScreen() {
if (nGamePhase == com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME) {
unpause();
hideCurrentScreen(null, sTRANSITION_DEFAULT);
playTransitionSound();
} else {
startNewGame();
}
}
function applyRollSound(_oButton) {
_oButton.onRollOver = com.sarbakan.utils.Delegate.create(this, playRollSound);
}
function doSoundEvent(_nEvent, _oSound) {
if (_nEvent == com.sarbakan.sound.SoundManager.nEVENT_SOUND_COMPLETE) {
if (_oSound == oMusicPack) {
delete oMusicPack;
}
}
}
function onGameLose() {
showScreen(new com.disney.gem.games.poohAnubis.screens.TitleScreen(mcTimeline.mcScreens.mcTitle), false, sTRANSITION_DEFAULT, com.sarbakan.utils.Delegate.create(this, cleanGame));
oGame.stopGameMusic();
startPackMusic();
oGame.stopBee();
}
function onGameWon() {
if (getLevel() < com.disney.gem.games.poohAnubis.GameEngine.aLEVEL_LINKAGES.length) {
showPopup(new com.disney.gem.games.poohAnubis.popups.LevelTransition(mcTimeline.mcPopups.mcLevelTransition), true);
onLevelEnd();
oGame.stopGameMusic();
startPackMusic();
} else {
showScreen(new com.disney.gem.games.poohAnubis.screens.EndScreen(mcTimeline.mcScreens.mcWin), false, sTRANSITION_DEFAULT, com.sarbakan.utils.Delegate.create(this, cleanGame));
playTransitionSound();
startPackMusic();
}
disallowInstructions();
}
function playTransitionSound() {
com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_TRANSITION, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
}
function startPackMusic() {
if (oMusicPack == undefined) {
oMusicPack = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_MUSIC, com.disney.gem.games.poohAnubis.GameData.sMUSIC_PACK, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_MUSIC, 99999999);
oMusicPack.doAddListener(this);
}
oMusicPack.doFadeTo(100);
}
function stopPackMusic() {
oMusicPack.doFadeTo(0);
}
function playRollSound() {
var _local2 = com.sarbakan.sound.SoundManager.isSoundPlaying(com.disney.gem.games.poohAnubis.GameData.sSOUND_ROLL);
if (_local2.bPlaying) {
com.sarbakan.sound.SoundItem(_local2.oSound).doStop();
}
com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_ROLL, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
}
function playClickSound() {
var _local2 = com.sarbakan.sound.SoundManager.isSoundPlaying(com.disney.gem.games.poohAnubis.GameData.sSOUND_CLICK);
if (_local2.bPlaying) {
com.sarbakan.sound.SoundItem(_local2.oSound).doStop();
}
com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_CLICK, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
}
function cleanGame() {
oMainBroadcaster.removeListener(oGame);
oGame.destroy();
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_PACKAGING);
}
function prepareNextLevel() {
setLevel(getLevel() + 1);
cleanGame();
if (bPaused) {
unpause();
}
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME);
oGame = new com.disney.gem.games.poohAnubis.GameEngine(this, mcTimeline.mcGame, false);
onLevelStart();
stopPackMusic();
oGame.startGameMusic();
oMainBroadcaster.addListener(oGame);
}
function prepareSameLevel() {
setLevel(getLevel());
oGame.stopGameMusic();
cleanGame();
if (bPaused) {
unpause();
}
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME);
oGame = new com.disney.gem.games.poohAnubis.GameEngine(this, mcTimeline.mcGame, false);
onLevelStart();
oMainBroadcaster.addListener(oGame);
oGame.transitionDone();
stopPackMusic();
oGame.startGameMusic();
allowInstructions();
}
static var sTRANSITION_DEFAULT = "default";
static var sSOUND_CAT_SOUND = "SFX";
static var sSOUND_CAT_MUSIC = "Music";
static var sMC_SOUND_NAME = "mcSoundManager";
static var nMC_SOUND_DEPTH = 80000;
}
Symbol 742 MovieClip [__Packages.com.disney.gem.games.poohAnubis.GameEngine] Frame 0
class com.disney.gem.games.poohAnubis.GameEngine
{
var oController, mcGame, nDepth, aSprites, bGameEnded, bGameLost, bInit, bActivatePlayer, nTimer, oGridManager, mcLevelConst, oStartingPos, oArrivalPoint, oPlayer, oBees, oEndingPoint, oMusicGame;
function GameEngine (_oController, _mcGame) {
oController = _oController;
mcGame = _mcGame;
nDepth = nSTARTING_DEPTH;
mcGame.mcHud.txtScore.text = oController.getScore();
mcGame.mcHud.txtLevel.text = oController.getLevel();
mcGame.mcHud.btMenu.onRelease = com.sarbakan.utils.Delegate.create(this, onBtMenu);
oController.applyRollSound(mcGame.mcHud.btMenu);
mcGame.mcHud.btRestart.onRelease = com.sarbakan.utils.Delegate.create(this, onBtRestart);
oController.applyRollSound(mcGame.mcHud.btRestart);
var _local4 = mcGame.createEmptyMovieClip(sGRID_NAME, nDepth);
_local4._x = oGRID_COORDS.x;
_local4._y = oGRID_COORDS.y;
nDepth++;
aSprites = new Array();
bGameEnded = false;
bGameLost = false;
bInit = false;
bActivatePlayer = false;
nTimer = 0;
oGridManager = new com.disney.gem.games.poohAnubis.game.GridManager(this, _local4);
mcLevelConst = mcGame.attachMovie(aLEVEL_LINKAGES[oController.getLevel() - 1], aLEVEL_LINKAGES[oController.getLevel() - 1], nDepth);
mcLevelConst._x = mcLevelConst._x + (mcLevelConst._width / 2);
mcLevelConst._y = mcLevelConst._y + (mcLevelConst._height / 2);
nDepth++;
MovieClip(mcGame.mcHud).swapDepths(nHUD_DEPTH);
mcGame.mcBackground.gotoAndStop(com.disney.gem.games.poohAnubis.Controller.getInstance().getLevel());
var _local5 = com.disney.gem.games.poohAnubis.GameData.aBEES_OFFSCREEN_TIME[oController.getLevel() - 1] + com.disney.gem.games.poohAnubis.GameData.aBEES_HOVER_TIME[oController.getLevel() - 1];
var _local6 = Math.round((com.disney.gem.games.poohAnubis.GameData.aBEES_OFFSCREEN_TIME[oController.getLevel() - 1] * 100) / _local5);
var _local7 = Math.round((MovieClip(mcGame.mcHud.mcBeeTimer)._totalframes * _local6) / 100);
mcGame.mcHud.mcBeeTimerCurstor.gotoAndStop(_local7);
mcGame.mcHud.mcBeeTimer.stop();
}
function init() {
bInit = true;
mcLevelConst.removeMovieClip();
var _local2 = new flash.geom.Point(oStartingPos.x * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth, oStartingPos.y * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth);
var _local3 = new flash.geom.Point(oArrivalPoint.OccupiedCells[0].x * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth, oArrivalPoint.OccupiedCells[0].y * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth);
var _local4 = com.sarbakan.utils.MoreMath.getAngle(_local2.x, _local2.y, _local3.x, _local3.y);
if ((_local4 > -135) && (_local4 <= -45)) {
var _local5 = com.disney.gem.games.poohAnubis.game.Player.sDIRECTION_UP;
} else if ((_local4 > -45) && (_local4 <= 45)) {
var _local5 = com.disney.gem.games.poohAnubis.game.Player.sDIRECTION_RIGHT;
} else if ((_local4 > 45) && (_local4 <= 135)) {
var _local5 = com.disney.gem.games.poohAnubis.game.Player.sDIRECTION_DOWN;
} else {
var _local5 = com.disney.gem.games.poohAnubis.game.Player.sDIRECTION_LEFT;
}
var _local6 = mcGame.attachMovie(sLINKAGE_PLAYER, sLINKAGE_PLAYER + nDepth, nDepth);
_local6._x = ((oStartingPos.x + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local6._y = ((oStartingPos.y + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
oPlayer = new com.disney.gem.games.poohAnubis.game.Player(_local6, oStartingPos.x, oStartingPos.y, com.disney.gem.games.poohAnubis.GameData.nID_PLAYER, this, _local5);
oController.oMainBroadcaster.addListener(oPlayer);
updatePlayerDepth(oPlayer);
nDepth++;
var _local7 = mcGame.attachMovie(sLINKAGE_BEES, sLINKAGE_BEES + nDepth, nBEES_DEPTH);
oBees = new com.disney.gem.games.poohAnubis.game.Bees(_local7, this);
oController.oMainBroadcaster.addListener(oBees);
nDepth++;
}
function get stageRef() {
return(mcGame);
}
function addDynamicElement(_nObjectID, _mcRef) {
var _local4 = Math.floor(_mcRef._x / com.disney.gem.games.poohAnubis.game.GridManager.cellWidth);
var _local5 = Math.floor(_mcRef._y / com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth);
var _local6 = new Array();
switch (_nObjectID) {
case com.disney.gem.games.poohAnubis.GameData.nID_STARTING_POINT :
oStartingPos = new flash.geom.Point(_local4, _local5);
break;
case com.disney.gem.games.poohAnubis.GameData.nID_ARIVAL_POINT :
oEndingPoint = new flash.geom.Point(_local4, _local5);
_local6.push(new flash.geom.Point(_local4, _local5));
var _local8 = mcGame.attachMovie(sLINKAGE_ARRIVAL, sLINKAGE_ARRIVAL + nDepth, nDepth);
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
oArrivalPoint = new com.disney.gem.games.poohAnubis.game.sprites.ArrivalPoint(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_ARIVAL_POINT);
com.disney.gem.games.poohAnubis.Controller.getInstance().oMainBroadcaster.addListener(oArrivalPoint);
updateObjectDepth(oArrivalPoint);
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_ROCK :
_local6.push(new flash.geom.Point(_local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_ROCK, sLINKAGE_ROCK + nDepth, nDepth);
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.Rock(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_ROCK));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_LOG :
_local6.push(new flash.geom.Point(_local4, _local5));
_local6.push(getAdjacentCell(_mcRef, _local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_LOG, sLINKAGE_LOG + nDepth, nDepth);
_local8._rotation = _mcRef._rotation;
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.Log(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_LOG));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_WATER_SMALL :
_local6.push(new flash.geom.Point(_local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_WATERSPILL_SMALL, sLINKAGE_WATERSPILL_SMALL + nDepth, nDepth);
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.Waterspill(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_WATER_SMALL));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_WATER_BIG :
_local6.push(new flash.geom.Point(_local4, _local5));
_local6.push(getAdjacentCell(_mcRef, _local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_WATERSPILL_BIG, sLINKAGE_WATERSPILL_BIG + nDepth, nDepth);
_local8._rotation = _mcRef._rotation;
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.Waterspill(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_WATER_BIG));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_SMALL :
_local6.push(new flash.geom.Point(_local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_HONEYPSILL_SMALL, sLINKAGE_HONEYPSILL_SMALL + nDepth, nDepth);
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.HoneySpill(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_SMALL));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_BIG :
_local6.push(new flash.geom.Point(_local4, _local5));
_local6.push(getAdjacentCell(_mcRef, _local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_HONEYPSILL_BIG, sLINKAGE_HONEYPSILL_BIG + nDepth, nDepth);
_local8._rotation = _mcRef._rotation;
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.HoneySpill(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_BIG));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_WHEELBARROW :
_local6.push(new flash.geom.Point(_local4, _local5));
_local6.push(getAdjacentCell(_mcRef, _local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_WHEELBARROW, sLINKAGE_WHEELBARROW + nDepth, nDepth);
_local8._rotation = _mcRef._rotation;
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.WheelBarrow(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_WHEELBARROW));
nDepth++;
break;
case com.disney.gem.games.poohAnubis.GameData.nID_HONEY_POT :
_local6.push(new flash.geom.Point(_local4, _local5));
_local8 = mcGame.attachMovie(sLINKAGE_HONEY_POT, sLINKAGE_HONEY_POT + nDepth, nDepth);
_local8._x = ((_local4 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
_local8._y = ((_local5 + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
aSprites.push(new com.disney.gem.games.poohAnubis.game.sprites.HoneyPot(_local8, _local6, com.disney.gem.games.poohAnubis.GameData.nID_HONEY_POT));
updateObjectDepth(aSprites[aSprites.length - 1]);
nDepth++;
}
}
function get EndingCoord() {
return(oEndingPoint);
}
function arrivalFound() {
oArrivalPoint.hit();
}
function onGameWin() {
bGameEnded = true;
oController.onGameWon();
stopGameMusic();
}
function stopBee() {
oBees.stopIdleSound();
}
function onGameLose() {
if (!bGameLost) {
onBtRestart();
bGameLost = true;
}
}
function get GameEnded() {
return(bGameEnded);
}
function get PlayerObj() {
return(oPlayer);
}
function playerMoveDone() {
oBees.resetPos();
}
function get Timer() {
return(nTimer);
}
function transitionDone() {
bActivatePlayer = true;
}
function stopGameMusic() {
oMusicGame.doFadeTo(0);
}
function startGameMusic() {
if (oMusicGame == undefined) {
oMusicGame = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_MUSIC, com.disney.gem.games.poohAnubis.GameData.sMUSIC_GAME, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_MUSIC, 9999999);
oMusicGame.doAddListener(this);
}
oMusicGame.doFadeTo(100);
}
function destroy() {
oController.oMainBroadcaster.removeListener(oPlayer);
oController.oMainBroadcaster.removeListener(oBees);
oController.oMainBroadcaster.removeListener(oArrivalPoint);
var _local2 = 0;
for ( ; _local2 < aSprites.length ; _local2++) {
com.disney.gem.games.poohAnubis.game.sprites.BaseSprite(aSprites[_local2]).destroy();
}
oPlayer.destroy();
com.disney.gem.games.poohAnubis.game.GridManager.destroy();
delete oGridManager;
delete oPlayer;
delete oStartingPos;
delete oEndingPoint;
}
function onUpdate() {
if (!bInit) {
init();
}
if (bActivatePlayer && (bInit)) {
oPlayer.transitionDone();
bActivatePlayer = false;
}
checkTimer();
}
function onPause() {
}
function onUnPause() {
}
function onBtMenu() {
oController.pause();
oController.showPopup(new com.disney.gem.games.poohAnubis.popups.MenuPopup(oController.mcTimeline.mcPopups.mcMenu), true);
oController.playClickSound();
oBees.stopIdleSound(true);
}
function onBtRestart() {
bGameEnded = true;
stopBee();
oPlayer.stopPushingSound();
oController.restartLevel();
oController.playClickSound();
}
function getAdjacentCell(_mcRef, _nXcoord, _nYcoord) {
if (_mcRef._rotation == 0) {
var _local5 = new flash.geom.Point(_nXcoord, _nYcoord - 1);
} else if (_mcRef._rotation == 90) {
var _local5 = new flash.geom.Point(_nXcoord + 1, _nYcoord);
} else if (_mcRef._rotation == 180) {
var _local5 = new flash.geom.Point(_nXcoord, _nYcoord + 1);
} else if (_mcRef._rotation == -90) {
var _local5 = new flash.geom.Point(_nXcoord - 1, _nYcoord);
}
return(_local5);
}
function checkTimer() {
if (!bGameEnded) {
nTimer++;
mcGame.mcHud.txtTimer.text = com.sarbakan.utils.Tools.getFormatedTime((nTimer * 1000) / 30, false, true);
var _local2 = com.disney.gem.games.poohAnubis.GameData.aBEES_OFFSCREEN_TIME[oController.getLevel() - 1] + com.disney.gem.games.poohAnubis.GameData.aBEES_HOVER_TIME[oController.getLevel() - 1];
var _local3 = Math.round(((nTimer / 30) * 100) / _local2);
var _local4 = Math.round((MovieClip(mcGame.mcHud.mcBeeTimer)._totalframes * _local3) / 100);
mcGame.mcHud.mcBeeTimer.gotoAndStop(_local4);
if ((((nTimer / 30) % com.disney.gem.games.poohAnubis.GameData.aBEES_OFFSCREEN_TIME[oController.getLevel() - 1]) == 0) && ((nTimer != 0) && (!oBees.HiddenStatus))) {
oBees.appear(com.disney.gem.games.poohAnubis.GameData.aBEES_HOVER_TIME[oController.getLevel() - 1]);
}
if (_local3 >= 100) {
bGameEnded = true;
oBees.attack();
oPlayer.attacked();
}
}
}
function updatePlayerDepth(_oPlayer) {
var _local3 = _oPlayer.OccupiedCells;
var _local4 = _local3[0].y + 1;
var _local5 = _local3[0].x + 1;
_oPlayer.Mc.swapDepths((nDepth + (_local4 * nDEPTH_PER_ROW)) + (_local5 * nDEPTH_PER_COLUMNS));
nDepth++;
}
function updateObjectDepth(_oObject) {
var _local3 = _oObject.OccupiedCells;
var _local4 = _local3[0].y + 1;
var _local5 = _local3[0].x + 1;
_oObject.Mc.swapDepths((nDepth + (_local4 * nDEPTH_PER_ROW)) + (_local5 * nDEPTH_PER_COLUMNS));
nDepth++;
}
static var sGRID_NAME = "mcGrid";
static var oGRID_COORDS = new flash.geom.Point(100, 13);
static var nSTARTING_DEPTH = 1;
static var nDEPTH_PER_ROW = 10000;
static var nDEPTH_PER_COLUMNS = 100;
static var nBEES_DEPTH = 999999;
static var nHUD_DEPTH = 9999999;
static var aLEVEL_LINKAGES = ["_mcLevel1", "_mcLevel2", "_mcLevel3", "_mcLevel4", "_mcLevel5", "_mcLevel6", "_mcLevel7", "_mcLevel8", "_mcLevel9", "_mcLevel10"];
static var sLINKAGE_BEES = "mcBees";
static var sLINKAGE_PLAYER = "mcPlayer";
static var sLINKAGE_ROCK = "mcRock";
static var sLINKAGE_HONEY_POT = "mcHoneyPot";
static var sLINKAGE_HONEYPSILL_SMALL = "mcHoneyspillSmall";
static var sLINKAGE_HONEYPSILL_BIG = "mcHoneyspillBig";
static var sLINKAGE_WATERSPILL_SMALL = "mcWaterspillSmall";
static var sLINKAGE_WATERSPILL_BIG = "mcWaterspillBig";
static var sLINKAGE_LOG = "mcLog";
static var sLINKAGE_WHEELBARROW = "mcWheelBarrow";
static var sLINKAGE_ARRIVAL = "mcArrival";
}
Symbol 743 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.GridManager] Frame 0
class com.disney.gem.games.poohAnubis.game.GridManager
{
static var oGameController, mcGrid, aCells, nCellWidth, nCellHeigth;
function GridManager (_oGameController, _mcGrid) {
oGameController = _oGameController;
mcGrid = _mcGrid;
aCells = new Array();
initCells();
}
static function __get__allCells() {
var _local2 = new Array();
var _local3 = 0;
for ( ; _local3 < aCells.length ; _local3++) {
var _local4 = 0;
for ( ; _local4 < aCells[_local3].length ; _local4++) {
_local2.push(aCells[_local3][_local4]);
}
}
return(_local2);
}
static function __get__allCellsArray() {
return(aCells);
}
static function __get__allFreeCells() {
var _local2 = new Array();
var _local3 = 0;
for ( ; _local3 < aCells.length ; _local3++) {
var _local4 = 0;
for ( ; _local4 < aCells[_local3].length ; _local4++) {
if (com.disney.gem.games.poohAnubis.game.GridCell(aCells[_local3][_local4]).isFree()) {
_local2.push(aCells[_local3][_local4]);
}
}
}
return(_local2);
}
static function __get__allOccupiedCells() {
var _local2 = new Array();
var _local3 = 0;
for ( ; _local3 < aCells.length ; _local3++) {
var _local4 = 0;
for ( ; _local4 < aCells[_local3].length ; _local4++) {
if (!com.disney.gem.games.poohAnubis.game.GridCell(aCells[_local3][_local4]).isFree()) {
_local2.push(aCells[_local3][_local4]);
}
}
}
return(_local2);
}
static function getRandomFreeCells(_nCells) {
var _local3 = allFreeCells;
var _local4 = new Array();
var _local5 = 0;
for ( ; _local5 < _nCells ; _local5++) {
if (_local3.length > 0) {
var _local6 = Math.floor(Math.random() * _local3.length);
_local4.push(_local3[_local6]);
_local3.splice(_local6, 1);
} else {
break;
}
}
return(_local4);
}
static function __get__cellWidth() {
return(nCellWidth);
}
static function __get__cellHeigth() {
return(nCellHeigth);
}
static function getCellByCoords(_nXCoord, _nYCoord) {
return(aCells[_nXCoord][_nYCoord]);
}
static function __get__Ref() {
return(mcGrid);
}
static function destroy() {
var _local2 = 0;
for ( ; _local2 < aCells.length ; _local2++) {
var _local3 = 0;
for ( ; _local3 < aCells[_local2].length ; _local3++) {
com.disney.gem.games.poohAnubis.game.GridCell(aCells[_local2][_local3]).destroy();
}
}
aCells = new Array();
delete aCells;
}
function initCells() {
var _local2 = 0;
var _local3 = 0;
var _local4 = new Array();
var _local5 = nSTARTING_DEPTH + 1;
var _local6 = 0;
for ( ; _local6 < (com.disney.gem.games.poohAnubis.GameData.nGRID_CELLS_WIDTH * com.disney.gem.games.poohAnubis.GameData.nGRID_CELLS_HEIGHT) ; _local6++) {
var _local7 = mcGrid.attachMovie(sCELL_LINKAGE, sCELL_LINKAGE + _local5, _local5);
if (nCellWidth == undefined) {
nCellWidth = _local7._width - 1;
nCellHeigth = _local7._height - 1;
}
_local7._x = _local2 * nCellWidth;
_local7._y = _local3 * nCellHeigth;
_local4.push(new com.disney.gem.games.poohAnubis.game.GridCell(oGameController, _local7, _local2, _local3));
_local5++;
_local3++;
if (_local3 >= com.disney.gem.games.poohAnubis.GameData.nGRID_CELLS_HEIGHT) {
_local3 = 0;
_local2++;
aCells.push(_local4);
_local4 = new Array();
}
}
}
static var sCELL_LINKAGE = "mcCell";
static var nSTARTING_DEPTH = 1;
}
Symbol 744 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.GridCell] Frame 0
class com.disney.gem.games.poohAnubis.game.GridCell
{
var mcRef, nPosX, nPosY, aOccupier;
function GridCell (_oGamecController, _mcRef, _nPosX, _nPosY) {
mcRef = _mcRef;
nPosX = _nPosX;
nPosY = _nPosY;
aOccupier = new Array();
setCellState(sSTATE_IDLE);
}
function setOccupier(_oGridObject) {
aOccupier.push(_oGridObject);
}
function getOccupier() {
return(aOccupier);
}
function removeOccupier(_oGridObject) {
var _local3 = 0;
for ( ; _local3 < aOccupier.length ; _local3++) {
if (aOccupier[_local3] == _oGridObject) {
aOccupier.splice(_local3, 1);
break;
}
}
}
function isFree() {
var _local2 = false;
if (aOccupier.length == 0) {
_local2 = true;
}
return(_local2);
}
function get xCoord() {
return(nPosX);
}
function get yCoord() {
return(nPosY);
}
function setXcoord(_nXcoord) {
nPosX = _nXcoord;
}
function setYcoord(_nYcoord) {
nPosY = _nYcoord;
}
function get Ref() {
return(mcRef);
}
function destroy() {
aOccupier = new Array();
delete aOccupier;
}
function setCellState(_sSTATE) {
mcRef.gotoAndStop(_sSTATE);
}
static var sSTATE_IDLE = "Idle";
}
Symbol 745 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.BaseSprite] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.BaseSprite extends com.sarbakan.utils.StateManaged
{
var aOccupiedCells, nObjectID;
function BaseSprite (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef);
aOccupiedCells = _aOccupiedCells;
nObjectID = _nID;
var _local6 = 0;
for ( ; _local6 < aOccupiedCells.length ; _local6++) {
var _local7 = flash.geom.Point(aOccupiedCells[_local6]);
var _local8 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(_local7.x, _local7.y);
_local8.setOccupier(this);
}
}
function get Type() {
return(nObjectID);
}
function get OccupiedCells() {
return(aOccupiedCells);
}
function resetOccupiedCell() {
var _local2 = 0;
for ( ; _local2 < aOccupiedCells.length ; _local2++) {
com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(aOccupiedCells[_local2]).x, flash.geom.Point(aOccupiedCells[_local2]).y).removeOccupier(this);
}
aOccupiedCells = new Array();
}
function setOccupiedCell(_aOccupiedCells) {
var _local3 = 0;
for ( ; _local3 < _aOccupiedCells.length ; _local3++) {
aOccupiedCells.push(_aOccupiedCells[_local3]);
var _local4 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(_aOccupiedCells[_local3]).x, flash.geom.Point(_aOccupiedCells[_local3]).y);
_local4.setOccupier(this);
}
}
function destroy() {
super.destroy();
aOccupiedCells = new Array();
delete aOccupiedCells;
}
}
Symbol 746 MovieClip [__Packages.com.disney.gem.games.poohAnubis.GameData] Frame 0
class com.disney.gem.games.poohAnubis.GameData
{
function GameData () {
}
static var nGRID_CELLS_WIDTH = 9;
static var nGRID_CELLS_HEIGHT = 9;
static var nID_HONEY_POT = 1;
static var nID_ROCK = 2;
static var nID_WATER_BIG = 3;
static var nID_WATER_SMALL = 4;
static var nID_HONEY_SPILL_BIG = 5;
static var nID_HONEY_SPILL_SMALL = 6;
static var nID_STARTING_POINT = 7;
static var nID_ARIVAL_POINT = 8;
static var nID_LOG = 9;
static var nID_WHEELBARROW = 10;
static var nID_PLAYER = 11;
static var nBEE_CIRCLE_DEGREES = 360;
static var nBEE_MOVING_SPEED_MIN = 2;
static var nBEE_MOVING_SPEED_MAX = 6;
static var nBEE_RADIUS_MAX = 200;
static var nBEE_RADIUS_MIN = 30;
static var aBEES_OFFSCREEN_TIME = [25, 40, 60, 75, 95, 105, 115, 120, 130, 140];
static var aBEES_HOVER_TIME = [15, 20, 25, 30, 35, 40, 45, 50, 55, 60];
static var nTIMER_HURT_WATER = 30;
static var nTIMER_HURT_HONEY = 60;
static var nTIMER_PRESS_ANY_KEY = 60;
static var nSOUND_VOLUME_MUSIC = 100;
static var nSOUND_VOLUME_SOUND = 100;
static var sMUSIC_GAME = "MusicGame.wav";
static var sMUSIC_PACK = "MusicPack.wav";
static var sSOUND_TRANSITION = "Transition.wav";
static var sSOUND_ROLL = "ButtonRoll.wav";
static var sSOUND_CLICK = "ButtonClick.wav";
static var sSOUND_PLAYER_FALL_H = "PlayerFallH.wav";
static var sSOUND_PLAYER_FALL_W = "PlayerFallW.wav";
static var sSOUND_PLAYER_WIN = "PlayerBalloon.wav";
static var sSOUND_PLAYER_PUSH = "PlayerPush.wav";
static var sSOUND_BEES_IDLE = "BeesIdle.wav";
static var sSOUND_BEES_APPEAR = "BeesAppear.wav";
static var sSOUND_BEES_ATTACK = "BeesAttack.wav";
}
Symbol 747 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.Player] Frame 0
class com.disney.gem.games.poohAnubis.game.Player extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
var sCurrentDirection, oGameEngine, nTimerHurt, bIsMoving, bGameStarted, oPushingSound, oTargetCoord, oPushedSprite, stateFinished, aOccupiedCells, mcRef, resetOccupiedCell, setOccupiedCell, oLastCoord, bPushing, sState;
function Player (_mcRef, _nStartingCoordX, _nStartingCoordY, _nID, _oEngine, _sStartingDirection) {
super(_mcRef, new Array(new flash.geom.Point(_nStartingCoordX, _nStartingCoordY)), _nID);
sCurrentDirection = _sStartingDirection;
oGameEngine = _oEngine;
nTimerHurt = 0;
bIsMoving = false;
bGameStarted = false;
setState(sSTATE_IDLE);
}
function onUpdate() {
super.onUpdate();
checkKeys();
checkTimer();
}
function attacked() {
setState(sSTATE_ATTACKED, true);
}
function transitionDone() {
bGameStarted = true;
}
function stopPushingSound() {
oPushingSound.doStop();
}
function destroy() {
super.destroy();
delete oTargetCoord;
delete oPushedSprite;
}
function state_PushUP() {
state_Walk();
}
function state_PushDOWN() {
state_Walk();
}
function state_PushLEFT() {
state_Walk();
}
function state_PushRIGHT() {
state_Walk();
}
function state_WalkUP() {
state_Walk();
}
function state_WalkDOWN() {
state_Walk();
}
function state_WalkLEFT() {
state_Walk();
}
function state_WalkRIGHT() {
state_Walk();
}
function state_Walk() {
if (stateFinished()) {
var _local2 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(aOccupiedCells[0]).x, flash.geom.Point(aOccupiedCells[0]).y);
var _local3 = com.disney.gem.games.poohAnubis.game.sprites.BaseSprite(_local2.getOccupier()[0]);
if ((flash.geom.Point(aOccupiedCells[0]).x == oGameEngine.EndingCoord.x) && (flash.geom.Point(aOccupiedCells[0]).y == oGameEngine.EndingCoord.y)) {
setState(sSTATE_WIN);
oGameEngine.arrivalFound();
oGameEngine.stopBee();
com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_WIN, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
} else if ((_local3.Type == com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_BIG) || (_local3.Type == com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_SMALL)) {
setState(sSTATE_FALL_HONEY);
com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_FALL_H, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
} else if ((_local3.Type == com.disney.gem.games.poohAnubis.GameData.nID_WATER_BIG) || (_local3.Type == com.disney.gem.games.poohAnubis.GameData.nID_WATER_SMALL)) {
setState(sSTATE_FALL_WATER);
com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_FALL_W, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
} else {
if ((!Key.isDown(Key.UP)) && ((!Key.isDown(Key.DOWN)) && ((!Key.isDown(Key.LEFT)) && (!Key.isDown(Key.RIGHT))))) {
setState(sSTATE_IDLE);
}
oGameEngine.playerMoveDone();
oGameEngine.updatePlayerDepth(this);
bIsMoving = false;
}
if (oPushedSprite != undefined) {
switch (sCurrentDirection) {
case sDIRECTION_DOWN :
var _local5 = new flash.geom.Point(flash.geom.Point(oPushedSprite.OccupiedCells[0]).x, flash.geom.Point(oPushedSprite.OccupiedCells[0]).y);
var _local4 = new flash.geom.Point(_local5.x, _local5.y + 1);
break;
case sDIRECTION_UP :
var _local6 = new flash.geom.Point(flash.geom.Point(oPushedSprite.OccupiedCells[0]).x, flash.geom.Point(oPushedSprite.OccupiedCells[0]).y);
_local4 = new flash.geom.Point(_local6.x, _local6.y - 1);
break;
case sDIRECTION_LEFT :
var _local7 = new flash.geom.Point(flash.geom.Point(oPushedSprite.OccupiedCells[0]).x, flash.geom.Point(oPushedSprite.OccupiedCells[0]).y);
_local4 = new flash.geom.Point(_local7.x - 1, _local7.y);
break;
case sDIRECTION_RIGHT :
var _local8 = new flash.geom.Point(flash.geom.Point(oPushedSprite.OccupiedCells[0]).x, flash.geom.Point(oPushedSprite.OccupiedCells[0]).y);
_local4 = new flash.geom.Point(_local8.x + 1, _local8.y);
}
oPushedSprite.resetOccupiedCell();
oPushedSprite.setOccupiedCell(new Array(_local4));
oGameEngine.updateObjectDepth(oPushedSprite);
stopPushingSound();
}
mcRef._x = oTargetCoord.x;
mcRef._y = oTargetCoord.y;
oPushedSprite = undefined;
} else {
switch (sCurrentDirection) {
case sDIRECTION_DOWN :
var _local9 = com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / MovieClip(mcRef.mcState)._totalframes;
mcRef._y = mcRef._y + _local9;
oPushedSprite.Mc._y = oPushedSprite.Mc._y + _local9;
break;
case sDIRECTION_UP :
var _local10 = com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / MovieClip(mcRef.mcState)._totalframes;
mcRef._y = mcRef._y - _local10;
oPushedSprite.Mc._y = oPushedSprite.Mc._y - _local10;
break;
case sDIRECTION_LEFT :
var _local11 = com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / MovieClip(mcRef.mcState)._totalframes;
mcRef._x = mcRef._x - _local11;
oPushedSprite.Mc._x = oPushedSprite.Mc._x - _local11;
break;
case sDIRECTION_RIGHT :
var _local12 = com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / MovieClip(mcRef.mcState)._totalframes;
mcRef._x = mcRef._x + _local12;
oPushedSprite.Mc._x = oPushedSprite.Mc._x + _local12;
}
}
}
function state_FallWaterUP() {
state_FallWater();
}
function state_FallWaterDOWN() {
state_FallWater();
}
function state_FallWaterLEFT() {
state_FallWater();
}
function state_FallWaterRIGHT() {
state_FallWater();
}
function state_FallWater() {
if (stateFinished()) {
setState(sSTATE_APPEAR);
nTimerHurt = com.disney.gem.games.poohAnubis.GameData.nTIMER_HURT_WATER;
}
}
function state_FallHoneyUP() {
state_FallHoney();
}
function state_FallHoneyDOWN() {
state_FallHoney();
}
function state_FallHoneyLEFT() {
state_FallHoney();
}
function state_FallHoneyRIGHT() {
state_FallHoney();
}
function state_FallHoney() {
if (stateFinished()) {
setState(sSTATE_APPEAR);
nTimerHurt = com.disney.gem.games.poohAnubis.GameData.nTIMER_HURT_HONEY;
}
}
function state_WinUP() {
state_Win();
}
function state_WinDOWN() {
state_Win();
}
function state_WinLEFT() {
state_Win();
}
function state_WinRIGHT() {
state_Win();
}
function state_Win() {
if (stateFinished()) {
if (!oGameEngine.GameEnded) {
oGameEngine.onGameWin();
mcRef.mcState.stop();
}
}
}
function state_AppearUP_init() {
state_Appear_init();
}
function state_AppearDOWN_init() {
state_Appear_init();
}
function state_AppearLEFT_init() {
state_Appear_init();
}
function state_AppearRIGHT_init() {
state_Appear_init();
}
function state_Appear_init() {
resetOccupiedCell();
setOccupiedCell(new Array(oLastCoord));
mcRef._x = ((oLastCoord.x + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellWidth) + (com.disney.gem.games.poohAnubis.GameEngine.oGRID_COORDS.x - (com.disney.gem.games.poohAnubis.game.GridManager.cellWidth / 2));
mcRef._y = ((oLastCoord.y + 1) * com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth) + (com.disney.gem.games.poohAnubis.GameEngine.oGRID_COORDS.y - (com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth / 2));
}
function state_AttackedUP() {
state_Attacked();
}
function state_AttackedDOWN() {
state_Attacked();
}
function state_AttackedLEFT() {
state_Attacked();
}
function state_AttackedRIGHT() {
state_Attacked();
}
function state_Attacked() {
if (stateFinished()) {
oGameEngine.onGameLose();
mcRef.mcState.stop();
}
}
function setState(_sState) {
var _local4 = _sState + sCurrentDirection;
super.setState(_local4);
}
function checkMoveValidity(_oTargetCell, _sTargetDirection) {
var _local4 = true;
if (_oTargetCell == undefined) {
_local4 = false;
} else {
var _local5 = com.disney.gem.games.poohAnubis.game.sprites.BaseSprite(_oTargetCell.getOccupier()[0]);
if (_local5.Type == com.disney.gem.games.poohAnubis.GameData.nID_HONEY_POT) {
var _local6 = true;
switch (_sTargetDirection) {
case sDIRECTION_DOWN :
var _local7 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(_oTargetCell.xCoord, _oTargetCell.yCoord + 1);
if ((_local7 == undefined) || (!_local7.isFree())) {
_local6 = false;
}
break;
case sDIRECTION_UP :
var _local8 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(_oTargetCell.xCoord, _oTargetCell.yCoord - 1);
if ((_local8 == undefined) || (!_local8.isFree())) {
_local6 = false;
}
break;
case sDIRECTION_LEFT :
var _local9 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(_oTargetCell.xCoord - 1, _oTargetCell.yCoord);
if ((_local9 == undefined) || (!_local9.isFree())) {
_local6 = false;
}
break;
case sDIRECTION_RIGHT :
var _local10 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(_oTargetCell.xCoord + 1, _oTargetCell.yCoord);
if (!((_local10 == undefined) || (!_local10.isFree()))) {
break;
}
_local6 = false;
}
if (_local6) {
oPushedSprite = _local5;
bPushing = true;
} else {
_local4 = false;
bPushing = false;
}
} else {
if ((_local5.Type == com.disney.gem.games.poohAnubis.GameData.nID_LOG) || ((_local5.Type == com.disney.gem.games.poohAnubis.GameData.nID_ROCK) || (_local5.Type == com.disney.gem.games.poohAnubis.GameData.nID_WHEELBARROW))) {
_local4 = false;
}
bPushing = false;
}
}
return(_local4);
}
function checkKeys() {
if ((!oGameEngine.GameEnded) && ((!isHurt()) && ((!bIsMoving) && (bGameStarted)))) {
if (Key.isDown(Key.DOWN)) {
var _local2 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(aOccupiedCells[0]).x, flash.geom.Point(aOccupiedCells[0]).y + 1);
if (checkMoveValidity(_local2, sDIRECTION_DOWN)) {
sCurrentDirection = sDIRECTION_DOWN;
if (bPushing) {
setState(sSTATE_PUSH);
oPushingSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_PUSH, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND, 999999);
} else {
setState(sSTATE_WALK);
}
bIsMoving = true;
oTargetCoord = new flash.geom.Point(mcRef._x, mcRef._y + com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth);
oLastCoord = flash.geom.Point(aOccupiedCells[0]);
resetOccupiedCell();
aOccupiedCells.push(new flash.geom.Point(_local2.xCoord, _local2.yCoord));
} else {
bIsMoving = false;
setState(sSTATE_IDLE);
}
} else if (Key.isDown(Key.UP)) {
var _local3 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(aOccupiedCells[0]).x, flash.geom.Point(aOccupiedCells[0]).y - 1);
if (checkMoveValidity(_local3, sDIRECTION_UP)) {
sCurrentDirection = sDIRECTION_UP;
if (bPushing) {
setState(sSTATE_PUSH);
oPushingSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_PUSH, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND, 999999);
} else {
setState(sSTATE_WALK);
}
bIsMoving = true;
oTargetCoord = new flash.geom.Point(mcRef._x, mcRef._y - com.disney.gem.games.poohAnubis.game.GridManager.cellHeigth);
oLastCoord = flash.geom.Point(aOccupiedCells[0]);
resetOccupiedCell();
aOccupiedCells.push(new flash.geom.Point(_local3.xCoord, _local3.yCoord));
} else {
bIsMoving = false;
setState(sSTATE_IDLE);
}
} else if (Key.isDown(Key.LEFT)) {
var _local4 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(aOccupiedCells[0]).x - 1, flash.geom.Point(aOccupiedCells[0]).y);
if (checkMoveValidity(_local4, sDIRECTION_LEFT)) {
sCurrentDirection = sDIRECTION_LEFT;
if (bPushing) {
setState(sSTATE_PUSH);
oPushingSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_PUSH, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND, 999999);
} else {
setState(sSTATE_WALK);
}
bIsMoving = true;
oTargetCoord = new flash.geom.Point(mcRef._x - com.disney.gem.games.poohAnubis.game.GridManager.cellWidth, mcRef._y);
oLastCoord = flash.geom.Point(aOccupiedCells[0]);
resetOccupiedCell();
aOccupiedCells.push(new flash.geom.Point(_local4.xCoord, _local4.yCoord));
} else {
bIsMoving = false;
setState(sSTATE_IDLE);
}
} else if (Key.isDown(Key.RIGHT)) {
var _local5 = com.disney.gem.games.poohAnubis.game.GridManager.getCellByCoords(flash.geom.Point(aOccupiedCells[0]).x + 1, flash.geom.Point(aOccupiedCells[0]).y);
if (checkMoveValidity(_local5, sDIRECTION_RIGHT)) {
sCurrentDirection = sDIRECTION_RIGHT;
if (bPushing) {
setState(sSTATE_PUSH);
oPushingSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_PLAYER_PUSH, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND, 999999);
} else {
setState(sSTATE_WALK);
}
bIsMoving = true;
oTargetCoord = new flash.geom.Point(mcRef._x + com.disney.gem.games.poohAnubis.game.GridManager.cellWidth, mcRef._y);
oLastCoord = flash.geom.Point(aOccupiedCells[0]);
resetOccupiedCell();
aOccupiedCells.push(new flash.geom.Point(_local5.xCoord, _local5.yCoord));
} else {
bIsMoving = false;
setState(sSTATE_IDLE);
}
}
}
}
function isFalling() {
var _local2 = false;
if ((sState == sSTATE_FALL_HONEY) || ((sState == sSTATE_FALL_WATER) || (sState == sSTATE_APPEAR))) {
_local2 = true;
}
return(_local2);
}
function isHurt() {
return((sState == "AppearUP") || ((sState == "AppearDOWN") || ((sState == "AppearLEFT") || (sState == "AppearRIGHT"))));
}
function checkTimer() {
if (nTimerHurt > 0) {
nTimerHurt--;
if (nTimerHurt <= 0) {
setState(sSTATE_IDLE);
bIsMoving = false;
}
}
}
static var sSTATE_IDLE = "Idle";
static var sSTATE_WIN = "Win";
static var sSTATE_WALK = "Walk";
static var sSTATE_FALL_WATER = "FallWater";
static var sSTATE_FALL_HONEY = "FallHoney";
static var sSTATE_PUSH = "Push";
static var sSTATE_APPEAR = "Appear";
static var sSTATE_ATTACKED = "Attacked";
static var sDIRECTION_UP = "UP";
static var sDIRECTION_DOWN = "DOWN";
static var sDIRECTION_LEFT = "LEFT";
static var sDIRECTION_RIGHT = "RIGHT";
}
Symbol 748 MovieClip [__Packages.com.sarbakan.sound.SoundItem] Frame 0
class com.sarbakan.sound.SoundItem
{
var sndObj, sLinkage, mcRef, nRemainingLoop, nCurrentVolume, nTargetVolume, nFadeRate, sCategory, bFadeAtEnd, bMuted, bPaused, bNeedFreshStart, nCurrentTime, aEventListeners, bStopAfterFade;
function SoundItem (_sndObject, _sLinkage, _nVolume, _nLoop, _sCategory, _mc) {
sndObj = _sndObject;
sLinkage = _sLinkage;
mcRef = _mc;
nRemainingLoop = _nLoop;
nCurrentVolume = _nVolume;
nTargetVolume = _nVolume;
nFadeRate = nFADE_RATE;
sCategory = _sCategory;
bFadeAtEnd = false;
bMuted = false;
bPaused = false;
bNeedFreshStart = false;
sndObj.onSoundComplete = com.sarbakan.utils.Delegate.create(this, doSoundComplete);
doStart(_nLoop);
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
nCurrentTime = 0;
aEventListeners = new Array();
}
function doEnterFrame() {
if (!bPaused) {
if (nCurrentTime > sndObj.position) {
nRemainingLoop--;
}
nCurrentTime = sndObj.position;
}
doCheckFadeAtEnd();
doManageFade();
}
function doAddListener(_oListener) {
aEventListeners.push(_oListener);
}
function doRemoveListener(_oListener) {
var _local3 = 0;
for ( ; _local3 < aEventListeners.length ; _local3++) {
if (aEventListeners[_local3] == _oListener) {
delete aEventListeners[_local3];
aEventListeners.splice(_local3, 1);
}
}
}
function doSoundComplete() {
if (bNeedFreshStart && (nRemainingLoop > 1)) {
sndObj.start(0, nRemainingLoop - 1);
} else {
doManageEndEvent();
}
}
function doUpdateSound() {
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
}
function doMute() {
bMuted = true;
doUpdateSound();
}
function doUnMute() {
bMuted = false;
doUpdateSound();
}
function doPause() {
sndObj.stop();
bPaused = true;
}
function doResume() {
bPaused = false;
bNeedFreshStart = true;
sndObj.start(nCurrentTime / 1000, 1);
}
function doStart(_nLoop) {
if (_nLoop == undefined) {
_nLoop = 1;
}
if (sLinkage.indexOf(".mp3") != -1) {
sndObj.start(15 / 1000, _nLoop);
} else {
sndObj.start(0, _nLoop);
}
}
function doStop() {
sndObj.stop();
doManageEndEvent();
}
function doFadeTo(_nVolume, _bStopAndDelete) {
if (_bStopAndDelete == undefined) {
_bStopAndDelete = true;
}
bStopAfterFade = _bStopAndDelete;
nTargetVolume = _nVolume;
}
function setFadeRate(_nRate) {
if (_nRate == undefined) {
_nRate = nFADE_RATE;
}
nFadeRate = _nRate;
}
function setFadeAtEnd(_bFadeAtEnd) {
bFadeAtEnd = true;
}
function setPan(_nPan) {
sndObj.setPan(_nPan);
}
function get Category() {
return(sCategory);
}
function get LinkageName() {
return(sLinkage);
}
function doDestroy() {
sndObj.stop();
delete sndObj;
mcRef.removeMovieClip();
}
function doCheckFadeAtEnd() {
if (bFadeAtEnd) {
if (nRemainingLoop == 1) {
if ((sndObj.duration - nCurrentTime) <= nFADE_AT_END_TIME) {
doFadeTo(0);
}
}
}
}
function doManageEndEvent() {
var _local2 = 0;
for ( ; _local2 < aEventListeners.length ; _local2++) {
aEventListeners[_local2].doSoundEvent(com.sarbakan.sound.SoundManager.nEVENT_SOUND_COMPLETE, this);
}
aEventListeners = new Array();
mcRef.removeMovieClip();
delete mcRef;
delete aEventListeners;
delete sndObj.onSoundComplete;
delete sndObj;
}
function doManageFade() {
if (nCurrentVolume != nTargetVolume) {
nCurrentVolume = com.sarbakan.utils.MoreMath.getReachNum(nCurrentVolume, nTargetVolume, nFadeRate);
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
}
if ((nCurrentVolume <= 0) && (bStopAfterFade)) {
sndObj.stop();
doManageEndEvent();
}
}
function returnComputedVolume(_nVolume) {
if ((!bMuted) && (!com.sarbakan.sound.SoundManager.isCategoryMuted(sCategory))) {
var _local4 = com.sarbakan.sound.SoundManager.MasterVolume / 100;
var _local5 = com.sarbakan.sound.SoundManager.getCategoryVolume(sCategory) / 100;
var _local3 = _nVolume;
_local3 = _local3 * _local5;
_local3 = _local3 * _local4;
} else {
var _local3 = 0;
}
return(_local3);
}
static var nFADE_RATE = 8;
static var nFADE_AT_END_TIME = 800;
}
Symbol 749 MovieClip [__Packages.com.sarbakan.sound.SoundManager] Frame 0
class com.sarbakan.sound.SoundManager
{
static var aSounds, mcAttach, nSoundNum, aSoundCategories, nMasterVolume, oEnterFrameListener;
function SoundManager () {
}
static function doPlaySound(_sLinkage, _nVolume, _nLoop, _bUnique) {
return(doPlaySoundInCat(sDEFAULT_CATEGORY, _sLinkage, _nVolume, _nLoop, _bUnique));
}
static function doPlaySoundInCat(_sCategoryName, _sLinkage, _nVolume, _nLoop, _bUnique) {
doCheckInit();
if (NewSoundAllowed) {
if (_nVolume == undefined) {
_nVolume = 100;
}
if (_nLoop == undefined) {
_nLoop = 1;
}
if (_bUnique == undefined) {
_bUnique = false;
}
if (_bUnique) {
var _local9 = isSoundPlaying(_sLinkage);
if (_local9.bPlaying) {
var _local8 = false;
var _local7 = _local9.oSound;
} else {
var _local8 = true;
}
} else {
var _local8 = true;
}
if (_local8) {
doManageCategory(_sCategoryName);
var _local10 = getMCForSound();
var _local11 = new Sound(_local10);
_local11.attachSound(_sLinkage);
if (_local11.duration != undefined) {
var _local7 = new com.sarbakan.sound.SoundItem(_local11, _sLinkage, _nVolume, _nLoop, _sCategoryName, _local10);
}
_local7.doAddListener(com.sarbakan.sound.SoundManager);
aSounds.push(_local7);
}
}
return(_local7);
}
static function isSoundPlaying(_sLinkageName) {
var _local3 = new Object();
_local3.bPlaying = false;
_local3.oSound = undefined;
var _local4 = aSounds.length - 1;
for ( ; _local4 >= 0 ; _local4--) {
if (aSounds[_local4].LinkageName == _sLinkageName) {
_local3.oSound = aSounds[_local4];
_local3.bPlaying = true;
}
}
return(_local3);
}
function getPlayingQty(_sLinkageName) {
var _local3 = 0;
var _local4 = aSounds.length - 1;
for ( ; _local4 >= 0 ; _local4--) {
if (aSounds[_local4].LinkageName == _sLinkageName) {
_local3++;
}
}
return(_local3);
}
static function doManageExternalSound(_oSound) {
doCheckInit();
doManageCategory(_oSound.Category);
_oSound.doAddListener(com.sarbakan.sound.SoundManager);
aSounds.push(_oSound);
}
static function getMCForSound() {
var _local2 = getNextDepth();
var _local3 = mcAttach.createEmptyMovieClip("Snd" + _local2, _local2);
return(_local3);
}
static function getNextDepth() {
nSoundNum++;
return(nSoundNum);
}
static function doInit(_mcAttach) {
if (!bInited) {
mcAttach = _mcAttach;
bInited = true;
nSoundNum = 0;
aSounds = new Array();
aSoundCategories = new Array();
nMasterVolume = 100;
mx.transitions.OnEnterFrameBeacon.init();
oEnterFrameListener = new Object();
oEnterFrameListener.onEnterFrame = com.sarbakan.utils.Delegate.create(com.sarbakan.sound.SoundManager, doEnterFrame);
MovieClip.addListener(oEnterFrameListener);
}
}
static function doEnterFrame() {
var _local2 = aSounds.length - 1;
for ( ; _local2 >= 0 ; _local2--) {
aSounds[_local2].doEnterFrame();
}
}
static function setCategoryVolume(_sCategoryName, _nVol) {
doManageCategory(_sCategoryName);
var _local4 = aSoundCategories.length - 1;
for ( ; _local4 >= 0 ; _local4--) {
if (aSoundCategories[_local4].sName == _sCategoryName) {
aSoundCategories[_local4].nVolume = _nVol;
}
}
doUpdateAllSoundsVolume();
}
static function getCategoryVolume(_sCategoryName) {
doManageCategory(_sCategoryName);
var _local4 = aSoundCategories.length - 1;
for ( ; _local4 >= 0 ; _local4--) {
if (aSoundCategories[_local4].sName == _sCategoryName) {
var _local3 = aSoundCategories[_local4].nVolume;
}
}
return(_local3);
}
static function isCategoryMuted(_sCategoryName) {
doManageCategory(_sCategoryName);
var _local4 = aSoundCategories.length - 1;
for ( ; _local4 >= 0 ; _local4--) {
if (aSoundCategories[_local4].sName == _sCategoryName) {
var _local3 = aSoundCategories[_local4].bMuted;
}
}
return(_local3);
}
static function doSoundEvent(_nEvent, _oSound) {
if (!(_nEvent === nEVENT_SOUND_COMPLETE)) {
} else {
var _local4 = false;
var _local5 = aSounds.length - 1;
for ( ; _local5 >= 0 ; _local5--) {
if (!_local4) {
if (aSounds[_local5] == _oSound) {
_local4 = true;
delete aSounds[_local5];
aSounds.splice(Number(_local5), 1);
}
}
}
}
}
static function doMuteCategory(_sCategoryName) {
var _local3 = aSoundCategories.length - 1;
for ( ; _local3 >= 0 ; _local3--) {
if (aSoundCategories[_local3].sName == _sCategoryName) {
aSoundCategories[_local3].bMuted = true;
}
}
doUpdateAllSoundsVolume();
}
static function doUnMuteCategory(_sCategoryName) {
var _local3 = aSoundCategories.length - 1;
for ( ; _local3 >= 0 ; _local3--) {
if (aSoundCategories[_local3].sName == _sCategoryName) {
aSoundCategories[_local3].bMuted = false;
}
}
doUpdateAllSoundsVolume();
}
static function setMasterVolume(_nVol) {
nMasterVolume = _nVol;
doUpdateAllSoundsVolume();
}
static function __get__NewSoundAllowed() {
return(aSounds.length < nMAX_SOUNDS_PLAYING);
}
static function __get__MasterVolume() {
return(nMasterVolume);
}
static function doRemoveListenerFromAllSounds(_oListener) {
var _local3 = aSounds.length - 1;
for ( ; _local3 >= 0 ; _local3--) {
aSounds[_local3].doRemoveListener(_oListener);
}
}
static function doDestroy() {
doRemoveListenerFromAllSounds();
var _local2 = aSounds.length - 1;
for ( ; _local2 >= 0 ; _local2--) {
aSounds[_local2].doDestroy();
}
mcAttach.removeMovieClip();
delete mcAttach;
nSoundNum = 0;
bInited = false;
nMasterVolume = 100;
delete aSounds;
delete aSoundCategories;
delete oEnterFrameListener;
}
static function __get__Inited() {
return(bInited);
}
static function doUpdateAllSoundsVolume() {
var _local2 = aSounds.length - 1;
for ( ; _local2 >= 0 ; _local2--) {
aSounds[_local2].doUpdateSound();
}
}
static function doCheckInit() {
if (!bInited) {
}
}
static function doManageCategory(_sCategoryName) {
doCheckInit();
var _local3 = false;
var _local4 = aSoundCategories.length - 1;
for ( ; _local4 >= 0 ; _local4--) {
if (aSoundCategories[_local4].sName == _sCategoryName) {
_local3 = true;
}
}
if (!_local3) {
var _local5 = new Object();
_local5.sName = _sCategoryName;
_local5.nVolume = 100;
_local5.bMuted = false;
aSoundCategories.push(_local5);
}
}
static var nEVENT_SOUND_COMPLETE = 1;
static var sDEFAULT_CATEGORY = "SFX";
static var nMAX_SOUNDS_PLAYING = 32;
static var bInited = false;
}
Symbol 750 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local2 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local2);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
}
Symbol 751 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local3 = _listeners;
var _local4 = _local3.length;
while (_local4--) {
if (_local3[_local4] == o) {
_local3.splice(_local4, 1);
if (!_local3.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local2 = String(arguments.shift());
var _local3 = _listeners.concat();
var _local4 = _local3.length;
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
_local3[_local5][_local2].apply(_local3[_local5], arguments);
}
}
}
Symbol 752 MovieClip [__Packages.com.sarbakan.utils.MoreMath] Frame 0
class com.sarbakan.utils.MoreMath
{
function MoreMath () {
}
static function getRandomRange(__nMin, __nMax) {
return(Math.floor(Math.random() * ((__nMax + 1) - __nMin)) + __nMin);
}
static function getPolarity(__nNum) {
var _local3 = 0;
if (__nNum < 0) {
_local3 = -1;
} else if (__nNum > 0) {
_local3 = 1;
}
return(_local3);
}
static function getReachZero(__nNum, __nReducer) {
return(getReachNum(__nNum, 0, __nReducer));
}
static function getReachNum(__nNum, __nTargetNum, __nReducer) {
var _local5 = __nNum;
if (_local5 != __nTargetNum) {
if (_local5 < __nTargetNum) {
_local5 = _local5 + __nReducer;
if (_local5 > __nTargetNum) {
_local5 = __nTargetNum;
}
} else {
_local5 = _local5 - __nReducer;
if (_local5 < __nTargetNum) {
_local5 = __nTargetNum;
}
}
}
return(_local5);
}
static function getDistance(__nX1, __nY1, __nX2, __nY2) {
return(Math.sqrt(Math.pow(Math.abs(__nX2 - __nX1), 2) + Math.pow(Math.abs(__nY2 - __nY1), 2)));
}
static function getManhattanDistance(_x1, _y1, _x2, _y2) {
return(Math.abs(_x1 - _x2) + Math.abs(_y1 - _y2));
}
static function getHypotenuse(__nDX, __nDY) {
return(Math.sqrt(Math.pow(__nDX, 2) + Math.pow(__nDY, 2)));
}
static function getAngle(__nX1, __nY1, __nX2, __nY2) {
var _local6 = __nX2 - __nX1;
var _local7 = __nY2 - __nY1;
var _local8 = Math.atan2(_local7, _local6);
var _local9 = getDegreeFromRadius(_local8);
return(_local9);
}
static function getCleanedAngle(_nAngle) {
while (_nAngle < 360) {
_nAngle = _nAngle + 360;
}
_nAngle = _nAngle % 360;
return(_nAngle);
}
static function getDegreeFromRadius(__nRadius) {
var _local3 = (__nRadius / MATH_PI) * 180;
return(_local3);
}
static function getRadianFromDegree(__nDegree) {
var _local3 = __nDegree * (MATH_PI / 180);
return(_local3);
}
static function getBoundsCenter(_oBox) {
var _local3 = (_oBox.xMin + _oBox.xMax) / 2;
var _local4 = (_oBox.yMin + _oBox.yMax) / 2;
return({x:_local3, y:_local4});
}
static var MATH_PI = Math.PI;
}
Symbol 753 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.Bees] Frame 0
class com.disney.gem.games.poohAnubis.game.Bees extends com.sarbakan.utils.StateManaged
{
var setState, oGameEngine, nCurrentAngle, bSpawned, mcRef, bRestartSound, nHoverTime, oIdleSound, stateFinished, sState;
function Bees (_mcRef, _oEngine) {
super(_mcRef);
setState(sSTATE_IDLE);
oGameEngine = _oEngine;
nCurrentAngle = 0;
bSpawned = false;
mcRef._visible = false;
bRestartSound = false;
}
function appear(_nHoverTimer) {
mcRef._visible = true;
setState(sSTATE_APPEAR);
nHoverTime = _nHoverTimer;
bSpawned = true;
com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_BEES_APPEAR, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
}
function attack() {
oIdleSound.doStop();
com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_BEES_ATTACK, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND);
setState(sSTATE_ATTACK);
}
function get HiddenStatus() {
return(bSpawned);
}
function resetPos() {
}
function stopIdleSound(_bPause) {
oIdleSound.doStop();
nHoverTime = undefined;
if ((_bPause != undefined) && (_bPause && (bSpawned))) {
bRestartSound = true;
}
}
function destroy() {
delete oGameEngine;
}
function onUpdate() {
super.onUpdate();
checkHoverTime();
checkMovement();
}
function onUnPause() {
super.onUnPause();
if (bRestartSound) {
bRestartSound = false;
oIdleSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_BEES_IDLE, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND, 999999);
}
}
function state_Appear() {
if (stateFinished()) {
setState(sSTATE_IDLE);
}
}
function state_Idle_init() {
if (bSpawned) {
oIdleSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.poohAnubis.Controller.sSOUND_CAT_SOUND, com.disney.gem.games.poohAnubis.GameData.sSOUND_BEES_IDLE, com.disney.gem.games.poohAnubis.GameData.nSOUND_VOLUME_SOUND, 999999);
}
}
function checkHoverTime() {
if (nHoverTime != undefined) {
nHoverTime--;
}
}
function checkMovement() {
if (sState != sSTATE_ATTACK) {
var _local2 = com.disney.gem.games.poohAnubis.GameData.aBEES_OFFSCREEN_TIME[com.disney.gem.games.poohAnubis.Controller.getInstance().getLevel() - 1] + com.disney.gem.games.poohAnubis.GameData.aBEES_HOVER_TIME[com.disney.gem.games.poohAnubis.Controller.getInstance().getLevel() - 1];
var _local3 = Math.round(((oGameEngine.Timer / 30) * 100) / _local2);
var _local4 = Math.round(com.disney.gem.games.poohAnubis.GameData.nBEE_RADIUS_MAX - (((com.disney.gem.games.poohAnubis.GameData.nBEE_RADIUS_MAX - com.disney.gem.games.poohAnubis.GameData.nBEE_RADIUS_MIN) * _local3) / 100));
var _local5 = Math.round(com.disney.gem.games.poohAnubis.GameData.nBEE_MOVING_SPEED_MIN - (((com.disney.gem.games.poohAnubis.GameData.nBEE_MOVING_SPEED_MIN - com.disney.gem.games.poohAnubis.GameData.nBEE_MOVING_SPEED_MAX) * _local3) / 100));
var _local6 = new flash.geom.Point(oGameEngine.PlayerObj.Mc._x, oGameEngine.PlayerObj.Mc._y);
var _local7 = nCurrentAngle * (Math.PI / 180);
var _local8 = Math.cos(_local7) * _local4;
var _local9 = Math.sin(_local7) * _local4;
var _local10 = _local6.clone();
_local10.x = _local10.x - _local8;
_local10.y = _local10.y - _local9;
mcRef._x = _local10.x;
mcRef._y = _local10.y;
nCurrentAngle = nCurrentAngle + _local5;
if (nCurrentAngle > com.disney.gem.games.poohAnubis.GameData.nBEE_CIRCLE_DEGREES) {
nCurrentAngle = 0;
}
} else {
mcRef._x = mcRef._x + getReachNum(mcRef._x, oGameEngine.PlayerObj.Mc._x, oGameEngine.PlayerObj.Mc.mcState._totalframes - oGameEngine.PlayerObj.Mc.mcState._currentframe);
mcRef._y = mcRef._y + getReachNum(mcRef._y, oGameEngine.PlayerObj.Mc._y, oGameEngine.PlayerObj.Mc.mcState._totalframes - oGameEngine.PlayerObj.Mc.mcState._currentframe);
}
}
function getReachNum(__nNum, __nTargetNum, __nReducer) {
var _local5 = __nNum;
if (_local5 != __nTargetNum) {
_local5 = Math.round((__nTargetNum - __nNum) / __nReducer);
}
return(_local5);
}
static var sSTATE_IDLE = "Idle";
static var sSTATE_ATTACK = "Attack";
static var sSTATE_APPEAR = "Appear";
}
Symbol 754 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.ArrivalPoint] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.ArrivalPoint extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
var setState, stateFinished, mcRef;
function ArrivalPoint (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
setState(sSTATE_IDLE);
}
function hit() {
setState(sSTATE_CAUGHT);
}
function state_Caught() {
if (stateFinished()) {
mcRef.mcState.stop();
}
}
static var sSTATE_IDLE = "Idle";
static var sSTATE_CAUGHT = "Caught";
}
Symbol 755 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.Rock] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.Rock extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
function Rock (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
}
}
Symbol 756 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.Log] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.Log extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
function Log (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
}
}
Symbol 757 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.Waterspill] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.Waterspill extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
function Waterspill (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
}
}
Symbol 758 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.HoneySpill] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.HoneySpill extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
function HoneySpill (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
}
}
Symbol 759 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.WheelBarrow] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.WheelBarrow extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
function WheelBarrow (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
}
}
Symbol 760 MovieClip [__Packages.com.disney.gem.games.poohAnubis.game.sprites.HoneyPot] Frame 0
class com.disney.gem.games.poohAnubis.game.sprites.HoneyPot extends com.disney.gem.games.poohAnubis.game.sprites.BaseSprite
{
var Mc;
function HoneyPot (_mcRef, _aOccupiedCells, _nID) {
super(_mcRef, _aOccupiedCells, _nID);
Mc.mcState.gotoAndStop(Math.ceil(Math.random() * Mc.mcState._totalframes));
}
}
Symbol 761 MovieClip [__Packages.com.disney.gem.games.poohAnubis.popups.MenuPopup] Frame 0
class com.disney.gem.games.poohAnubis.popups.MenuPopup extends com.sarbakan.utils.ScreenController
{
var oController, hide, mcRef;
function MenuPopup (_mcRef) {
super(_mcRef);
}
function onBtSound() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).toggleSound();
updateSoundGroup();
}
function onBtHelp() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).allowInstructions();
com.disney.gem.games.poohAnubis.Controller(oController).showInstructions();
hide(null, true);
}
function onBtQuit() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).showPopup(new com.disney.gem.games.poohAnubis.popups.ConfirmPopup(com.disney.gem.games.poohAnubis.Controller(oController).mcTimeline.mcPopups.mcConfirm, this), true);
}
function onBtResume() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).unpause();
hide();
com.disney.gem.games.poohAnubis.Controller(oController).allowInstructions();
}
function state_in_init() {
super.state_in_init();
setBts();
com.disney.gem.games.poohAnubis.Controller(oController).disallowInstructions();
}
function state_idle_init() {
super.state_idle_init();
setBts();
}
function state_out_init() {
super.state_out_init();
setBts();
}
function setBts() {
mcRef.mcState.mcContent.btHelp.onRelease = com.sarbakan.utils.Delegate.create(this, onBtHelp);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btHelp);
mcRef.mcState.mcContent.btQuit.onRelease = com.sarbakan.utils.Delegate.create(this, onBtQuit);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btQuit);
mcRef.mcState.mcContent.btResume.onRelease = com.sarbakan.utils.Delegate.create(this, onBtResume);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btResume);
updateSoundGroup();
}
function updateSoundGroup() {
var _local2 = "On";
if (com.disney.gem.games.poohAnubis.Controller(oController).bSoundMuted) {
_local2 = "Off";
}
mcRef.mcState.mcContent.mcSoundToggle.gotoAndStop(_local2);
mcRef.mcState.mcContent.mcSoundToggle.btSound.onRelease = com.sarbakan.utils.Delegate.create(this, onBtSound);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.mcSoundToggle.btSound);
}
}
Symbol 762 MovieClip [__Packages.com.disney.gem.games.poohAnubis.popups.ConfirmPopup] Frame 0
class com.disney.gem.games.poohAnubis.popups.ConfirmPopup extends com.sarbakan.utils.ScreenController
{
var oMenuOrigin, hide, oController, mcRef;
function ConfirmPopup (_mcRef, _oMenuOrigin) {
super(_mcRef);
oMenuOrigin = _oMenuOrigin;
}
function onBtNo() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
hide();
}
function onBtYes() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
hide();
com.disney.gem.games.poohAnubis.Controller(oController).onGameLose();
oMenuOrigin.hide();
}
function state_in_init() {
super.state_in_init();
setBts();
}
function state_idle_init() {
super.state_idle_init();
setBts();
}
function state_out_init() {
super.state_out_init();
setBts();
}
function setBts() {
mcRef.mcState.mcContent.btYes.onRelease = com.sarbakan.utils.Delegate.create(this, onBtYes);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btYes);
mcRef.mcState.mcContent.btNo.onRelease = com.sarbakan.utils.Delegate.create(this, onBtNo);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btNo);
}
}
Symbol 763 MovieClip [__Packages.com.sarbakan.utils.Tools] Frame 0
class com.sarbakan.utils.Tools
{
function Tools () {
}
static function isItemInArray(_aArray, _oItem) {
var _local4 = false;
var _local5 = _aArray.length - 1;
for ( ; _local5 >= 0 ; _local5--) {
if (_aArray[_local5] == _oItem) {
_local4 = true;
}
}
return(_local4);
}
static function doCopyArray(_aArraySource) {
var _local3 = new Array();
var _local4 = 0;
_local4 = 0;
for ( ; _local4 < _aArraySource.length ; _local4++) {
if (_aArraySource[_local4] instanceof Array) {
_local3.push(doCopyArray(_aArraySource[_local4]));
} else {
_local3.push(_aArraySource[_local4]);
}
}
return(_local3);
}
static function getFormatedNumber(_nNumber, _nMinimumChar) {
return(returnFormatedNumber(_nNumber, _nMinimumChar));
}
static function returnFormatedNumber(_nNumber, _nMinimumChar) {
var _local4 = String(_nNumber);
while (_local4.length < _nMinimumChar) {
_local4 = "0" + _local4;
}
var _local5 = new Array();
var _local6 = _local4.length - 1;
var _local7 = 0;
for ( ; _local7 <= _local6 ; _local7++) {
var _local8 = _local4.charAt(_local7);
_local5.push(_local8);
}
_local4 = "";
var _local9 = 0;
_local7 = _local5.length - 1;
for ( ; _local7 >= 0 ; _local7--) {
if (((_local9 % 3) == 0) && (_local9 != 0)) {
_local4 = "," + _local4;
}
_local4 = _local5[_local7] + _local4;
_local9++;
}
return(_local4);
}
static function getFormatedTime(_nTime, _bIncludeMilliseconds, _bShowMinutes) {
if (_bIncludeMilliseconds == undefined) {
_bIncludeMilliseconds = false;
}
if (_bShowMinutes == undefined) {
_bShowMinutes = true;
}
var _local5 = false;
if (_nTime < 0) {
_local5 = true;
_nTime = Math.abs(_nTime);
}
var _local6 = Math.floor(_nTime / 1000);
if (_bIncludeMilliseconds) {
if (_nTime >= 1000) {
var _local8 = _nTime % (_local6 * 1000);
} else {
var _local8 = _nTime;
}
var _local7 = String(_local8).substr(0, 2);
if (_local7.length <= 1) {
_local7 = "0" + _local7;
}
}
var _local9 = Math.floor(_local6 / 60);
var _local10 = Math.floor(_local6 % 60);
var _local11 = "";
var _local12 = "";
if (_local10 < 10) {
_local12 = "0";
}
if (_local9 < 10) {
_local11 = "0";
}
var _local13 = "";
if (_bShowMinutes) {
_local13 = _local13 + String((_local11 + _local9) + ":");
}
_local13 = _local13 + (_local12 + _local10);
if (_bIncludeMilliseconds) {
_local13 = _local13 + (":" + _local7);
}
if (_local5) {
_local13 = "-" + _local13;
}
return(_local13);
}
static function getTrimmedString(_sStr) {
while (_sStr.charAt(0) == " ") {
_sStr = _sStr.substring(1, _sStr.length);
}
while (_sStr.charAt(_sStr.length - 1) == " ") {
_sStr = _sStr.substring(0, _sStr.length - 1);
}
return(_sStr);
}
}
Symbol 764 MovieClip [__Packages.com.disney.gem.games.poohAnubis.screens.TitleScreen] Frame 0
class com.disney.gem.games.poohAnubis.screens.TitleScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function TitleScreen (_mcRef) {
super(_mcRef);
}
function onBtHelp() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).showInstructions();
}
function onBtPlay() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).startNewGame();
}
function state_idle_init() {
super.state_idle_init();
mcRef.mcState.mcContent.btHelp.onRelease = com.sarbakan.utils.Delegate.create(this, onBtHelp);
mcRef.mcState.mcContent.btPlay.onRelease = com.sarbakan.utils.Delegate.create(this, onBtPlay);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btHelp);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.mcContent.btPlay);
}
}
Symbol 765 MovieClip [__Packages.com.disney.gem.games.poohAnubis.screens.HelpScreen] Frame 0
class com.disney.gem.games.poohAnubis.screens.HelpScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function HelpScreen (_mcRef) {
super(_mcRef);
}
function onBtBack() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).hideInstructions();
}
function onBtPlay() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).hideInstructions();
}
function state_idle_init() {
super.state_idle_init();
mcRef.mcState.btBack.onRelease = com.sarbakan.utils.Delegate.create(this, onBtBack);
mcRef.mcState.btPlay.onRelease = com.sarbakan.utils.Delegate.create(this, onBtPlay);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.btBack);
}
}
Symbol 766 MovieClip [__Packages.com.disney.gem.games.poohAnubis.popups.LevelTransition] Frame 0
class com.disney.gem.games.poohAnubis.popups.LevelTransition extends com.sarbakan.utils.ScreenController
{
var hide, oController, nCurrentLevel, nTimerWarning, stateFinished, mcRef;
function LevelTransition (_mcRef) {
super(_mcRef);
}
function onUpdate() {
super.onUpdate();
checkTimer();
}
function onBtPlay() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
hide();
oController.prepareNextLevel();
}
function onKeyDown() {
onBtPlay();
Key.removeListener(this);
}
function state_in_init() {
super.state_in_init();
nCurrentLevel = com.disney.gem.games.poohAnubis.Controller(oController).getLevel();
setBts();
}
function state_idle_init() {
super.state_idle_init();
setBts();
nTimerWarning = com.disney.gem.games.poohAnubis.GameData.nTIMER_PRESS_ANY_KEY;
}
function state_out_init() {
super.state_out_init();
setBts();
}
function state_out() {
super.state_out();
if (stateFinished()) {
com.disney.gem.games.poohAnubis.Controller.getInstance().transitionDone();
}
}
function setBts() {
mcRef.mcState.mcContent.gotoAndStop(nCurrentLevel);
mcRef.mcState.mcWarning._visible = false;
}
function checkTimer() {
if ((nTimerWarning > 0) && (nTimerWarning != undefined)) {
nTimerWarning--;
if (nTimerWarning == 0) {
activatePressAny();
}
}
}
function activatePressAny() {
Key.addListener(this);
mcRef.mcState.mcWarning._visible = true;
}
}
Symbol 767 MovieClip [__Packages.com.disney.gem.games.poohAnubis.screens.EndScreen] Frame 0
class com.disney.gem.games.poohAnubis.screens.EndScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function EndScreen (_mcRef) {
super(_mcRef);
}
function onBtPlay() {
com.disney.gem.games.poohAnubis.Controller.getInstance().playClickSound();
com.disney.gem.games.poohAnubis.Controller(oController).showTitleScreen(true);
}
function state_idle_init() {
super.state_idle_init();
mcRef.mcState.btPlay.onRelease = com.sarbakan.utils.Delegate.create(this, onBtPlay);
com.disney.gem.games.poohAnubis.Controller.getInstance().applyRollSound(mcRef.mcState.btPlay);
}
}
Symbol 181 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_HONEY_POT, this);
Symbol 183 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_ROCK, this);
Symbol 187 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_WATER_BIG, this);
Symbol 189 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_WATER_SMALL, this);
Symbol 194 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_BIG, this);
Symbol 196 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_HONEY_SPILL_SMALL, this);
Symbol 198 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_STARTING_POINT, this);
Symbol 200 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_ARIVAL_POINT, this);
Symbol 202 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_LOG, this);
Symbol 204 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_WHEELBARROW, this);
Instance of Symbol 236 MovieClip "mcState" in Symbol 237 MovieClip [mcRock] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 239 MovieClip "mcState" in Symbol 240 MovieClip [mcWaterspillBig] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 242 MovieClip "mcState" in Symbol 243 MovieClip [mcHoneyspillBig] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 244 MovieClip "mcState" in Symbol 245 MovieClip [mcLog] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 246 MovieClip "mcState" in Symbol 247 MovieClip [mcWheelBarrow] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 249 MovieClip "mcState" in Symbol 250 MovieClip [mcWaterspillSmall] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 251 MovieClip "mcState" in Symbol 252 MovieClip [mcHoneyspillSmall] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 254 MovieClip in Symbol 255 MovieClip [mcCell] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 635 MovieClip Frame 1
com.disney.gem.games.poohAnubis.Controller.getInstance().oGame.addDynamicElement(com.disney.gem.games.poohAnubis.GameData.nID_WHEELBARROW, this);