Frame 1
var _oPreloaderScreen = (new com.disney.gem.games.Pirates.screens.PreloaderScreen(mcScreens.mcPreloader));
com.sarbakan.BaseDisneyController.bDEBUG = false;
new com.disney.gem.games.Pirates.Controller(this, _oPreloaderScreen);
Symbol 22 MovieClip Frame 1
stop();
Symbol 1224 MovieClip [__Packages.com.sarbakan.BaseDisneyController] Frame 0
class com.sarbakan.BaseDisneyController
{
static var oInstance;
var mcTimeline, oPreloaderScreen, oMainBroadcaster, oFrameRate, aPopups, oTransitionManager, bSoundMuted, nLastSoundToggleTimer, bPaused, nGamePhase, oDXDControllerWrapper, 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;
_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();
}
function pause() {
bPaused = true;
oMainBroadcaster.broadcastMessage("onPause");
}
function unpause() {
bPaused = false;
oMainBroadcaster.broadcastMessage("onUnPause");
}
function togglePause() {
if (bPaused) {
unpause();
} else {
pause();
}
}
function getControllerMode() {
var _local1;
if (com.disney.gem.base.BaseObject == undefined) {
_local1 = nCONTROLLER_MODE_STANDALONE;
} else {
_local1 = nCONTROLLER_MODE_DXD;
}
return(_local1);
}
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);
} else {
trace(_sText);
}
}
function showScreen(_oScreenController, _bInOut, _sTransitionID, _fMidTransitionCallBack) {
if (oCurrentScreen) {
hideCurrentScreen(com.sarbakan.utils.Delegate.create(this, showScreen, _oScreenController, _bInOut), _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);
}
oMainBroadcaster.addListener(oCurrentScreen);
}
}
function hideCurrentScreen(_fHideCallBack, _sTransition) {
fScreenHideCallBack = _fHideCallBack;
if (_sTransition != undefined) {
oTransitionManager.playTransition(_sTransition, com.sarbakan.utils.Delegate.create(oCurrentScreen, oCurrentScreen.hide, com.sarbakan.utils.Delegate.create(this, onScreenHidden)));
} else {
oCurrentScreen.hide(com.sarbakan.utils.Delegate.create(this, onScreenHidden));
}
}
function showPopup(_oPopupController, _bInOut) {
var _local5 = false;
var _local2 = aPopups.length - 1;
while (_local2 >= 0) {
var _local3 = aPopups[_local2];
if (_oPopupController.getRef() == _local3.getRef()) {
_local5 = true;
_local3.destroy();
aPopups[_local2] = _oPopupController;
break;
}
_local2--;
}
if (!_local5) {
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 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 _local3 = [mcTimeline.mcPopups, mcTimeline.mcScreens];
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
for (var _local4 in _local3[_local2]) {
_local3[_local2][_local4].stop();
}
_local2--;
}
}
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 1225 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) {
onUpdate();
}
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 _local4 = false;
var _local3 = arguments.length - 1;
while (_local3 >= 0) {
if (arguments[_local3] == sState) {
_local4 = true;
break;
}
_local3--;
}
return(!_local4);
}
function destroy() {
delete mcRef;
}
function onUpdate() {
if (sNextState != undefined) {
this[("state_" + sState) + "_end"]();
sState = sNextState;
sNextState = undefined;
mcRef.gotoAndStop(sState);
this[("state_" + sState) + "_init"]();
}
this["state_" + sState]();
}
function onUpdatePaused() {
if (bPausable == false) {
onUpdate();
}
}
function onPause() {
if (bPausable) {
mcRef.mcState.stop();
}
}
function onUnPause() {
if (bPausable) {
mcRef.mcState.play();
}
}
}
Symbol 1226 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 _local3 in mcTransitionContainer) {
mcTransitionContainer[_local3].stop();
}
}
function playTransition(_sTransitionID, _fMiddleCallBack, _fEndCallBack) {
mcTransition = mcTransitionContainer["mc" + com.sarbakan.utils.MoreString.upperFirstChar(_sTransitionID)];
fMiddleCallBack = _fMiddleCallBack;
fEndCallBack = _fEndCallBack;
if (mcTransition == undefined) {
trace(("TransitionManager error: Unable to find mc" + com.sarbakan.utils.MoreString.upperFirstChar(_sTransitionID)) + " in transition movieclip");
} 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() {
mcRef.btBlocker.useHandCursor = false;
}
function state_out_init() {
mcRef.btBlocker.useHandCursor = false;
}
static var sSTATE_IN = "in";
static var sSTATE_OUT = "out";
static var sSTATE_HIDDEN = "hidden";
}
Symbol 1227 MovieClip [__Packages.com.sarbakan.utils.MoreString] Frame 0
class com.sarbakan.utils.MoreString
{
function MoreString () {
}
static function pad(_sToPad, _sCharPad, _nMinLength, _sSideToPad) {
var _local1 = String(_sToPad);
while (_local1.length < _nMinLength) {
if (_sSideToPad == "RIGHT") {
_local1 = _local1 + _sCharPad;
} else {
_local1 = _sCharPad + _local1;
}
}
return(_local1);
}
static function trim(_sToTrim, _sCharTrim, _sSideToTrim) {
var _local1 = String(_sToTrim);
if (_sSideToTrim == "RIGHT") {
while (_local1.substr(_local1.length - 2, 1) == _sCharTrim) {
_local1 = _local1.slice(-1);
}
} else {
while (_local1.substr(0, 1) == _sCharTrim) {
_local1 = _local1.slice(1);
}
}
return(_local1);
}
static function replace(_sString, _sFind, _sReplace) {
return(_sString.split(_sFind).join(_sReplace));
}
static function formatTime(_nTime) {
var _local2 = _nTime;
var _local1 = Math.floor(_local2 / 60);
var _local3 = Math.round(_local2 - (_local1 * 60));
return((pad(String(_local1), "0", 2) + ":") + pad(String(_local3), "0", 2));
}
static function formatNumber(__sNumber, __nMinimumChar) {
var _local1 = String(__sNumber);
var _local3 = "";
var _local4 = _local1.length;
_local4 = _local4 / 3;
var _local5;
var _local2;
if (_local4 <= 1) {
_local5 = _local1;
if (_local5.length < __nMinimumChar) {
_local5 = "0" + _local5;
}
} else {
_local2 = _local4;
while (_local2 > 1) {
_local3 = (" " + _local1.substr(-3)) + _local3;
_local1 = _local1.substr(0, -3);
_local2--;
}
_local5 = _local1 + _local3;
if (_local5.length < __nMinimumChar) {
_local5 = "0" + _local5;
}
}
return(_local5);
}
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) {
var _local5;
var _local3;
var _local2;
var _local1;
var _local6;
if (_bDecimalOpt == undefined) {
_local6 = true;
} else {
_local6 = _bDecimalOpt;
}
_local5 = String(_nMoney).split(".");
if (_local5[1] != undefined) {
_local3 = _local5[1].substr(0, 2);
switch (_local3.length) {
case 0 :
_local3 = _local3 + "00";
break;
case 1 :
_local3 = _local3 + "0";
break;
case 2 :
break;
default :
_local3 = "00";
}
} else {
_local3 = "00";
}
_local1 = _local5[0];
_local2 = "";
while (_local1.length > 3) {
_local2 = (_sDelimiteur + _local1.substr(_local1.length - 3)) + _local2;
_local1 = _local1.substr(0, _local1.length - 3);
}
_local2 = _local1 + _local2;
if (_local6) {
return(((_local2 + ".") + _local3) + "$");
}
return(_local2 + " $");
}
static function getOrdinalSuffix(_nNumber) {
var _local2;
var _local1 = String(_nNumber);
if (((_local1.substr(-2, 2) == 11) || (_local1.substr(-2, 2) == 12)) || (_local1.substr(-2, 2) == 13)) {
_local2 = "th";
} else if (_local1.substr(-1, 1) == 1) {
_local2 = "st";
} else if (_local1.substr(-1, 1) == 2) {
_local2 = "nd";
} else if (_local1.substr(-1, 1) == 3) {
_local2 = "rd";
} else {
_local2 = "th";
}
return(_local2);
}
}
Symbol 1228 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 gameLog(_sText) {
__owner.gameLog(_sText, "game");
}
}
Symbol 1229 MovieClip [__Packages.com.disney.gem.games.GameContainer] Frame 0
interface com.disney.gem.games.GameContainer
{
}
Symbol 1230 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 _local2 = new TextFormat();
_local2.font = DEBUG_FONT;
_local2.size = DEBUG_FONT_SIZE;
_local2.color = DEBUG_FONT_COLOR;
_local2.align = "right";
mcDebug.field.setNewTextFormat(_local2);
mcDebug.field.selectable = false;
mcDebug.createTextField("fieldShadow", 1, 1, 1, 400, 50);
var _local3 = new TextFormat();
_local3.font = DEBUG_FONT;
_local3.size = DEBUG_FONT_SIZE;
_local3.color = DEBUG_FONT_SHADOW_COLOR;
_local3.align = "right";
mcDebug.fieldShadow.setNewTextFormat(_local3);
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 _local3 = "";
var _local2 = String(nAverageFps).split(".");
if (_local2[1] == undefined) {
_local3 = nAverageFps + ".00";
} else if (_local2[1].length == 1) {
_local3 = (_local2[0] + ".0") + _local2[1];
} else {
_local3 = (_local2[0] + ".") + _local2[1].substr(0, 2);
}
return(_local3);
}
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 1231 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 _local2 = bInOut;
if (_bInOutOverride != undefined) {
_local2 = _bInOutOverride;
}
if (_local2) {
setState(sSTATE_OUT);
} else {
setState(sSTATE_HIDDEN, true);
fHideCallBack();
}
}
function getRef() {
return(mcRef);
}
function isInOutTransitionning() {
return(sState != sSTATE_IDLE);
}
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 1232 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 _local2 = function () {
var _local3 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local2 = arguments.callee.arg;
_local2 = _local2.concat(arguments);
return(_local4.apply(_local3, _local2));
};
_local2.target = obj;
_local2.func = func;
_local2.arg = arguments.slice(2);
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1233 MovieClip [__Packages.com.disney.gem.games.Pirates.Controller] Frame 0
class com.disney.gem.games.Pirates.Controller extends com.sarbakan.BaseDisneyController
{
static var oInstance;
var nNbLevels, bCreateGame, bStartNextLevel, nNbLifes, nScore, nTimeBonus, nModTimeBonus, hideCurrentScreen, mcTimeline, showScreen, allowInstructions, onGameStart, setLevel, setGamePhase, oTransitionManager, MusGame, nLevel, MusPack, pause, nGamePhase, unpause, oGame, Ambience, disallowInstructions, onGameEnd, oMainBroadcaster, onLevelStart, showPopup, bInstructionActive, bInstructionCanBeDisplayed, oMenu, showInstructions, hideInstructions, toggleSound;
function Controller (_mcTimeline, _oPreloaderScreen) {
super(_mcTimeline, _oPreloaderScreen);
nNbLevels = com.disney.gem.games.Pirates.GameData.NB_GAME_LEVELS;
bCreateGame = false;
bStartNextLevel = true;
oInstance = this;
nNbLifes = com.disney.gem.games.Pirates.GameData.MAX_LIFES;
nScore = 0;
nTimeBonus = 0;
nModTimeBonus = 25;
}
static function getInstance() {
return(oInstance);
}
function onPreloadingDone() {
hideCurrentScreen();
init();
}
function init() {
super.init();
var _local3 = mcTimeline.createEmptyMovieClip("mcSoundManager", 10);
com.sarbakan.sound.SoundManager.doInit(_local3);
com.sarbakan.sound.SoundManager.setCategoryVolume(sSOUND_CAT_MUSIC, nSOUND_VOLUME_MUSIC);
com.sarbakan.sound.SoundManager.setCategoryVolume(sSOUND_CAT_SOUND, nSOUND_VOLUME_SOUND);
startMusPack();
showScreen(new com.disney.gem.games.Pirates.screens.TitleScreen(mcTimeline.mcScreens.mcTitle));
allowInstructions();
}
function startNewGame() {
if ((mcTimeline.txtLevel.text != "") and (mcTimeline.txtLevel.text != undefined)) {
var _local2 = int(mcTimeline.txtLevel.text) - 1;
} else {
var _local2 = 0;
}
onGameStart();
setLevel(_local2);
startNextLevel();
}
function restartCurrentLevel() {
bStartNextLevel = false;
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME);
oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionClose), com.sarbakan.utils.Delegate.create(this, onLevelTransitionDone));
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
if (nNbLifes <= 0) {
MusGame.setFadeRate(10);
MusGame.doFadeTo(0);
} else {
nTimeBonus = com.disney.gem.games.Pirates.GameData["MAX_BONUS_LEVEL" + nLevel];
}
}
function startNextLevel() {
setLevel(nLevel + 1);
nTimeBonus = com.disney.gem.games.Pirates.GameData["MAX_BONUS_LEVEL" + nLevel];
if (nLevel <= nNbLevels) {
bStartNextLevel = true;
MusPack.setFadeRate(5);
MusPack.doFadeTo(0);
}
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME);
if (nLevel > 1) {
onLevelEnd();
}
oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionClose), com.sarbakan.utils.Delegate.create(this, onLevelTransitionDone));
}
function showInstructionsScreen() {
pause();
showScreen(new com.disney.gem.games.Pirates.screens.HelpScreen(mcTimeline.mcScreens.mcHelp), false, sTRANSITION_DEFAULT);
}
function hideInstructionsScreen() {
if (nGamePhase == com.sarbakan.BaseDisneyController.nGAME_PHASE_INGAME) {
unpause();
hideCurrentScreen(null, "default");
} else {
showScreen(new com.disney.gem.games.Pirates.screens.TitleScreen(mcTimeline.mcScreens.mcTitle), false, sTRANSITION_DEFAULT);
}
}
function onLevelTransitionClose() {
oGame.deleteObject();
hideCurrentScreen();
if ((nLevel <= nNbLevels) and (nNbLifes > 0)) {
bCreateGame = true;
if (bStartNextLevel == true) {
Ambience = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, "Ambience", 0, 10000, true);
Ambience.setFadeRate(10);
Ambience.doFadeTo(30);
callPopup("ShowLevel");
}
} else {
if (nNbLifes <= 0) {
disallowInstructions();
showScreen(new com.disney.gem.games.Pirates.screens.LooseScreen(mcTimeline.mcScreens.mcLoose), false);
onLevelEnd();
onGameEnd();
} else {
disallowInstructions();
showScreen(new com.disney.gem.games.Pirates.screens.WinScreen(mcTimeline.mcScreens.mcWin), false);
onLevelEnd();
onGameEnd();
}
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_PACKAGING);
}
}
function onLevelTransitionCloseToWin() {
oGame.deleteObject();
hideCurrentScreen();
showScreen(new com.disney.gem.games.Pirates.screens.WinLevelScreen(mcTimeline.mcScreens.mcWinLevel), false);
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_PACKAGING);
}
function onLevelTransitionDone() {
}
function createGame() {
oGame = new com.disney.gem.games.Pirates.GameEngine(this, mcTimeline.mcGame);
oMainBroadcaster.addListener(oGame);
oGame.init();
onLevelStart();
bCreateGame = false;
if (bStartNextLevel == false) {
unpause();
}
}
function onLevelEnd() {
super.onLevelEnd();
oMainBroadcaster.removeListener(oGame);
}
function reduceTimeBonus() {
nTimeBonus = nTimeBonus - nModTimeBonus;
if (nTimeBonus < 0) {
nTimeBonus = 0;
}
}
function showWinLevel() {
MusGame.setFadeRate(10);
MusGame.doFadeTo(0);
disallowInstructions();
oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionCloseToWin));
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
function returnToTitle() {
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_PACKAGING);
resetGame();
hideCurrentScreen();
allowInstructions();
showScreen(new com.disney.gem.games.Pirates.screens.TitleScreen(mcTimeline.mcScreens.mcTitle), false);
startMusPack();
}
function resetGame() {
bCreateGame = false;
bStartNextLevel = true;
oInstance = this;
nNbLifes = 5;
nScore = 0;
}
function doQuitGame() {
oGame.deleteObject();
hideCurrentScreen();
disallowInstructions();
showScreen(new com.disney.gem.games.Pirates.screens.LooseScreen(mcTimeline.mcScreens.mcLoose), false);
onLevelEnd();
onGameEnd();
setGamePhase(com.sarbakan.BaseDisneyController.nGAME_PHASE_PACKAGING);
}
function startMusPack() {
MusPack = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_MUSIC, "MusPack", com.disney.gem.games.Pirates.GameData.MUS_PACK_VOLUME, 10000, true);
}
function startMusGame() {
MusGame = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_MUSIC, "MusGame", com.disney.gem.games.Pirates.GameData.MUS_GAME_VOLUME, 10000, true);
Ambience.setFadeRate(2);
Ambience.doFadeTo(0);
}
function update() {
super.update();
if (bCreateGame == true) {
createGame();
}
}
function callPopup(_sPopupName) {
switch (_sPopupName) {
case "ShowLevel" :
disallowInstructions();
showPopup(new com.disney.gem.games.Pirates.popups.ShowLevel(mcTimeline.mcPopups.mcShowLevel));
break;
case "Menu" :
pause();
showPopup(new com.disney.gem.games.Pirates.popups.Menu(mcTimeline.mcPopups.mcMenu));
break;
case "Quit" :
disallowInstructions();
showPopup(new com.disney.gem.games.Pirates.popups.QuitConfirm(mcTimeline.mcPopups.mcQuitConfirm));
break;
}
}
function checkGlobalKeys() {
if (Key.isDown(com.sarbakan.BaseDisneyController.nKEY_INSTRUCTIONS)) {
if (!bInstructionActive) {
if (bInstructionCanBeDisplayed == true) {
if ((oMenu.sState != "hidden") and (oMenu.sState != undefined)) {
oMenu.onBtHelp();
} else {
if (oTransitionManager.isTransitionning() != true) {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
showInstructions();
}
}
} else {
if (oTransitionManager.isTransitionning() != true) {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
hideInstructions();
}
}
if (Key.isDown(com.sarbakan.BaseDisneyController.nKEY_SOUND)) {
toggleSound();
}
}
static var sTRANSITION_DEFAULT = "default";
static var sSOUND_CAT_MUSIC = "Music";
static var nSOUND_VOLUME_MUSIC = 100;
static var sSOUND_CAT_SOUND = "Sfx";
static var nSOUND_VOLUME_SOUND = 80;
}
Symbol 1234 MovieClip [__Packages.com.disney.gem.games.Pirates.GameEngine] Frame 0
class com.disney.gem.games.Pirates.GameEngine
{
var oController, mcGame, oGameScreen;
function GameEngine (_oController, _mcGame) {
oController = _oController;
mcGame = _mcGame;
}
function init() {
oGameScreen = new com.disney.gem.games.Pirates.screens.GameScreen(mcGame, "oGameScreen", oController);
}
function onUpdate() {
}
function onPause() {
}
function onUnPause() {
}
function onBtHelp() {
oController.showInstructions();
}
function deleteObject() {
oGameScreen.deleteObject();
}
}
Symbol 1235 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.GameScreen] Frame 0
class com.disney.gem.games.Pirates.screens.GameScreen extends com.sarbakan.utils.ScreenController
{
var sName, nIndexName, nIndexHitZoneDepth, nIndexDoorBackDepth, nIndexDoorItemDepth, aItemsToClean, oController, nLevel, mcRef, oLevelData, oInventory, oBackground, oActivationManager, oImpactManager, oPlayer, oTimer, sState;
function GameScreen (_mcRef, _sName) {
super(_mcRef);
sName = _sName;
nIndexName = 1;
nIndexHitZoneDepth = 10;
nIndexDoorBackDepth = 10;
nIndexDoorItemDepth = 10;
aItemsToClean = new Array();
oController = com.disney.gem.games.Pirates.Controller.getInstance();
nLevel = oController.getLevel();
setLevelData();
createInventory();
createBackgrounds();
createScreenObjects();
createTimer();
setObstaclesCounters();
setKeysCounters();
showLifes();
showScore();
mcRef.btMenu.onRelease = com.sarbakan.utils.Delegate.create(this, onBtMenu);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.btMenu);
mcRef.btReset.onRelease = com.sarbakan.utils.Delegate.create(this, onBtReset);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.btReset);
oController.oMainBroadcaster.addListener(this);
oController.pause();
}
function setLevelData() {
oLevelData = new Object();
var _local2 = 1;
while (_local2 <= com.disney.gem.games.Pirates.game_obj.lvls_data.PartsData["nNbPartsLevel" + nLevel]) {
oLevelData["Part" + _local2] = com.disney.gem.games.Pirates.game_obj.lvls_data.PartsData[((("giveLevel" + nLevel) + "Part") + _local2) + "Data"]();
_local2++;
}
}
function createInventory() {
oInventory = new com.disney.gem.games.Pirates.game_obj.Inventory(mcRef.mcInventory, "oInventory", this);
}
function createBackgrounds() {
mcRef.mcBg._x = 0;
mcRef.mcBg._y = 0;
oBackground = new com.disney.gem.games.Pirates.game_obj.Background(mcRef.mcBg, "oBackground", this);
oController.oMainBroadcaster.addListener(oBackground);
}
function createScreenObjects() {
var _local2 = new Array();
oActivationManager = new com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivationManager("oActivationBroadcaster", this);
oImpactManager = new com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactManager("oImpactManager", this);
for (var _local5 in oLevelData) {
for (var _local3 in oLevelData[_local5]) {
if (oLevelData[_local5][_local3].bGroundCollider == true) {
_local2.push(oLevelData[_local5][_local3]);
} else {
this["create" + oLevelData[_local5][_local3].sItemType](oLevelData[_local5][_local3]);
}
}
}
for (var _local4 in _local2) {
this["create" + _local2[_local4].sItemType](_local2[_local4]);
}
delete oLevelData;
oController.oMainBroadcaster.addListener(oBackground);
}
function createUpRightBlocker(_oItemData) {
_oItemData.nMinBoundX = 150;
_oItemData.nMinBoundY = 150;
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local3 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local3] = new com.disney.gem.games.Pirates.game_obj.scroll_sys.UpRightBlocker(_oItemData, _local3, this);
aItemsToClean.push(_local3);
nIndexName++;
}
function createUpLeftBlocker(_oItemData) {
_oItemData.nMinBoundX = 150;
_oItemData.nMinBoundY = 150;
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local3 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local3] = new com.disney.gem.games.Pirates.game_obj.scroll_sys.UpLeftBlocker(_oItemData, _local3, this);
aItemsToClean.push(_local3);
nIndexName++;
}
function createAllSideBlocker(_oItemData) {
_oItemData.nMinBoundX = 150;
_oItemData.nMinBoundY = 150;
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local3 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local3] = new com.disney.gem.games.Pirates.game_obj.scroll_sys.AllSideBlocker(_oItemData, _local3, this);
aItemsToClean.push(_local3);
nIndexName++;
}
function createKillingGround(_oItemData) {
_oItemData.nMinBoundY = 200;
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.KillingGround(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createRightDangerZone(_oItemData) {
_oItemData.sDirection = "Right";
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.DangerZone(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createLeftDangerZone(_oItemData) {
_oItemData.sDirection = "Left";
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.DangerZone(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createRightClimbingPlate(_oItemData) {
_oItemData.nMinBoundX = 150;
_oItemData.nMinBoundY = 150;
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local3 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local3] = new com.disney.gem.games.Pirates.game_obj.RightClimbingPlate(_oItemData, _local3, this);
aItemsToClean.push(_local3);
nIndexName++;
}
function createLeftClimbingPlate(_oItemData) {
_oItemData.nMinBoundX = 150;
_oItemData.nMinBoundY = 150;
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local3 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local3] = new com.disney.gem.games.Pirates.game_obj.LeftClimbingPlate(_oItemData, _local3, this);
aItemsToClean.push(_local3);
nIndexName++;
}
function createSoulType1(_oItemData) {
_oItemData.sStartState = "NotThereAtStart";
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = "o" + _oItemData.sName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.SoulType1(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createSoulType2(_oItemData) {
_oItemData.sStartState = "NotThereAtStart";
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = "o" + _oItemData.sName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.SoulType2(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createFire(_oItemData) {
_oItemData.sStartState = "NotThereAtStart";
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = "o" + _oItemData.sName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.Fire(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createObstacleHitZone(_oObstacle) {
var _local4 = {sItemType:_oObstacle.sAttachLink + "HitZone", nAttachDepth:nIndexHitZoneDepth, nPosX:_oObstacle.nPosX, nPosY:_oObstacle.nPosY, nScaleX:100, nScaleY:100, mcContainer:mcRef.mcBg.mcHitZones};
var _local2 = "oHitZone" + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.ObstacleHitZone(_local4, _local2, this, _oObstacle);
aItemsToClean.push(_local2);
nIndexName++;
nIndexHitZoneDepth++;
return(this[_local2]);
}
function createCellKey(_oItemData) {
if (_oItemData.mcContainer == undefined) {
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
}
var _local2 = "o" + _oItemData.sItemType;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.CellKey(_oItemData, _local2, this);
aItemsToClean.push(_local2);
}
function createYellowCellKey(_oItemData) {
createCellKey(_oItemData);
}
function createRedCellKey(_oItemData) {
createCellKey(_oItemData);
}
function createBlueCellKey(_oItemData) {
createCellKey(_oItemData);
}
function createGreenCellKey(_oItemData) {
createCellKey(_oItemData);
}
function createPinkCellKey(_oItemData) {
createCellKey(_oItemData);
}
function createOrangeCellKey(_oItemData) {
createCellKey(_oItemData);
}
function createDoorCellKey(_oDoorItemData, _oLinkDoor) {
var _local3 = {sItemType:_oDoorItemData.sItemType, nAttachDepth:nIndexDoorItemDepth, nPosX:_oLinkDoor.nPosX, nPosY:_oLinkDoor.nPosY, nScaleX:100, nScaleY:100, sColor:_oDoorItemData.sColor, mcContainer:mcRef.mcBg.mcDoorItems};
var _local2 = "o" + _local3.sItemType;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.DoorCellKey(_local3, _local2, this, _oLinkDoor);
aItemsToClean.push(_local2);
nIndexDoorItemDepth++;
}
function createDoor(_oItemData) {
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
_oItemData.sStartState = "Close";
_oItemData.nDoorBackDepth = nIndexDoorBackDepth;
_oItemData.mcDoorBackContainer = mcRef.mcBg.mcDoorBack;
nIndexDoorBackDepth++;
var _local3 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local3] = new com.disney.gem.games.Pirates.game_obj.Door(_oItemData, _local3, this);
aItemsToClean.push(_local3);
nIndexName++;
}
function createYellowDoor(_oItemData) {
createDoor(_oItemData);
}
function createRedDoor(_oItemData) {
createDoor(_oItemData);
}
function createBlueDoor(_oItemData) {
createDoor(_oItemData);
}
function createGreenDoor(_oItemData) {
createDoor(_oItemData);
}
function createPinkDoor(_oItemData) {
createDoor(_oItemData);
}
function createOrangeDoor(_oItemData) {
createDoor(_oItemData);
}
function createToken(_oItemData) {
_oItemData.mcContainer = mcRef.mcBg.mcBackIems;
var _local2 = ("o" + _oItemData.sItemType) + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.Token(_oItemData, _local2, this);
aItemsToClean.push(_local2);
nIndexName++;
}
function createDoorToken(_oDoorItemData, _oLinkDoor) {
var _local3 = {sItemType:_oDoorItemData.sItemType, nAttachDepth:nIndexDoorItemDepth, nPosX:_oLinkDoor.nPosX, nPosY:_oLinkDoor.nPosY, nScaleX:100, nScaleY:100, mcContainer:mcRef.mcBg.mcDoorItems};
var _local2 = ("o" + _local3.sItemType) + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.DoorToken(_local3, _local2, this, _oLinkDoor);
aItemsToClean.push(_local2);
nIndexDoorItemDepth++;
nIndexName++;
}
function createPrisoner(_oDoorItemData, _oLinkDoor) {
var _local3 = {sItemType:_oDoorItemData.sItemType, nAttachDepth:nIndexDoorItemDepth, nPosX:_oLinkDoor.nPosX, nPosY:_oLinkDoor.nPosY, nScaleX:100, nScaleY:100, mcContainer:mcRef.mcBg.mcDoorItems};
var _local2 = ("o" + _local3.sItemType) + nIndexName;
this[_local2] = new com.disney.gem.games.Pirates.game_obj.Prisoner(_local3, _local2, this, _oLinkDoor);
aItemsToClean.push(_local2);
nIndexDoorItemDepth++;
nIndexName++;
}
function createPrisoner1(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPrisoner2(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPrisoner3(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPrisoner4(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPrisoner5(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPrisoner6(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPrisoner7(_oDoorItemData, _oLinkDoor) {
createPrisoner(_oDoorItemData, _oLinkDoor);
}
function createPlayer(_oItemData) {
_oItemData.mcContainer = mcRef.mcBg.mcPlayerItem;
oPlayer = new com.disney.gem.games.Pirates.game_obj.Player(_oItemData, "oPlayer", this);
aItemsToClean.push("oPlayer");
oBackground.oPlayer = oPlayer;
}
function createTimer() {
oTimer = new com.disney.gem.games.Pirates.game_obj.Timer(mcRef.mcTimer, "oTimer", this);
}
function setObstaclesCounters() {
for (var _local3 in com.disney.gem.games.Pirates.game_obj.CountersData["DataLevel" + nLevel].oObstaclesData) {
var _local2 = com.disney.gem.games.Pirates.game_obj.CountersData["DataLevel" + nLevel].oObstaclesData[_local3];
this[_local2.sName].initCounterSet(_local2.oCounterSet);
}
}
function setKeysCounters() {
for (var _local3 in com.disney.gem.games.Pirates.game_obj.CountersData["DataLevel" + nLevel].oKeysData) {
var _local2 = com.disney.gem.games.Pirates.game_obj.CountersData["DataLevel" + nLevel].oKeysData[_local3];
this[_local2.sName].initCounterSet(_local2.oCounterSet);
}
}
function showLifes() {
mcRef.mcLifes.txtLifes = oController.nNbLifes;
}
function showScore() {
mcRef.mcScore.txtScore = com.sarbakan.utils.Tools.getFormatedNumber(oController.nScore, 1);
}
function onBtMenu() {
oController.callPopup("Menu");
}
function onBtReset() {
oPlayer.oControls.bControlsLock = true;
oPlayer.looseLife();
oController.pause();
oController.restartCurrentLevel();
}
function onUpdate() {
this["state_" + sState]();
}
function onUpdatePaused() {
onUpdate();
}
function setState(_sState) {
sState = _sState;
}
function deleteObject() {
oInventory.deleteObject();
oBackground.deleteObject();
oActivationManager.deleteObject();
oImpactManager.deleteObject();
oTimer.deleteObject();
for (var _local2 in aItemsToClean) {
this[aItemsToClean[_local2]].deleteObject();
}
oImpactManager.deleteObject();
oController.oMainBroadcaster.removeListener(this);
delete oController.oGame;
}
}
Symbol 1236 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Background] Frame 0
class com.disney.gem.games.Pirates.game_obj.Background extends com.sarbakan.utils.StateManaged
{
var oController, nLevel, sName, nPosX, nPosY, oOwner, bLoadingEnd, sAttachBgName, oPlayer, nLeftScreenX, nRightScreenX, nTopScreenY, nBottomScreenY, nCenterX, nCenterY, nLeftBound, nRightBound, nTopBound, nBottomBound, nDestX, nDestY, nMoveDelay, nStartSpd, nMinSpd, nMaxSpd, nSpd, nBaseMoveAmplitude, nMoveRatio, sRatioAxis, sDirMoveX, sDirMoveY, nMoveX, nMoveY, nCurrentMoveStep, sItemToShow, nTimeShowItem, bYSet, setPausable, setState, mcRef, oShowData, nMoveFrequency, nMoveAmplitude;
function Background (_mcRef, _sName, _oOwner) {
super(_mcRef);
oController = com.disney.gem.games.Pirates.Controller.getInstance();
nLevel = oController.getLevel();
sName = _sName;
nPosX = _mcRef._x;
nPosY = _mcRef._y;
oOwner = _oOwner;
bLoadingEnd = false;
sAttachBgName = "";
oPlayer = undefined;
nLeftScreenX = 0;
nRightScreenX = 580;
nTopScreenY = 0;
nBottomScreenY = 410;
nCenterX = nRightScreenX / 2;
nCenterY = nBottomScreenY / 2;
nLeftBound = 0;
nRightBound = 0;
nTopBound = 0;
nBottomBound = 0;
nDestX = 0;
nDestY = 0;
nMoveDelay = 0;
nStartSpd = 0;
nMinSpd = 1;
nMaxSpd = 0;
nSpd = 0;
nBaseMoveAmplitude = 0;
nMoveRatio = 1;
sRatioAxis = "";
sDirMoveX = "";
sDirMoveY = "";
nMoveX = 0;
nMoveY = 0;
nCurrentMoveStep = 0;
sItemToShow = "";
nTimeShowItem = 0;
bYSet = false;
attachLevelBg();
setPausable(false);
setState("FollowCharacter");
}
function state_FollowCharacter() {
if (nLevel > 1) {
var _local2 = oPlayer.nPosX + nPosX;
var _local4 = nCenterX - _local2;
nPosX = nPosX + _local4;
if (bYSet == false) {
var _local3 = oPlayer.nPosY + nPosY;
var _local5 = nCenterY - _local3;
nPosY = nPosY + _local5;
}
checkBounds();
mcRef._x = int(nPosX);
if (bYSet == false) {
mcRef._y = int(nPosY);
bYSet = true;
}
}
}
function state_MoveToItem() {
setMoveSpd();
setNextMove();
doMove();
checkDestination();
}
function state_ShowItem() {
nTimeShowItem--;
if ((nTimeShowItem <= 0) and (nCurrentMoveStep < oShowData.nNbSteps)) {
setMoveToItem();
}
}
function attachLevelBg() {
var _local2 = ("Level" + oOwner.nLevel) + "Bg";
sAttachBgName = ("mcLevel" + oOwner.nLevel) + "Bg";
mcRef.mcBgContainer.attachMovie(_local2, sAttachBgName, 10);
mcRef._x = nPosX;
mcRef._y = nPosY;
setBounds();
}
function setBounds() {
nLeftBound = mcRef.mcBgContainer[sAttachBgName].mcLeftDownBounds._x;
nRightBound = mcRef.mcBgContainer[sAttachBgName].mcRightUpBounds._x;
nTopBound = mcRef.mcBgContainer[sAttachBgName].mcRightUpBounds._y;
nBottomBound = mcRef.mcBgContainer[sAttachBgName].mcLeftDownBounds._y;
mcRef.mcBgContainer[sAttachBgName].mcLeftDownBounds.swapDepths(10);
mcRef.mcBgContainer[sAttachBgName].mcLeftDownBounds.removeMovieClip();
mcRef.mcBgContainer[sAttachBgName].mcRightUpBounds.swapDepths(10);
mcRef.mcBgContainer[sAttachBgName].mcRightUpBounds.removeMovieClip();
}
function checkBounds() {
var _local2 = nPosX + nLeftBound;
var _local3 = nPosX + nRightBound;
var _local5 = nPosY + nTopBound;
var _local4 = nPosY + nBottomBound;
if (_local2 > nLeftScreenX) {
nPosX = nPosX + (nLeftScreenX - _local2);
} else if (_local3 < nRightScreenX) {
nPosX = nPosX + (nRightScreenX - _local3);
}
if (_local5 > nTopScreenY) {
nPosY = nPosY + (nTopScreenY - _local5);
} else if (_local4 < nBottomScreenY) {
nPosY = nPosY + (nBottomScreenY - _local4);
}
}
function setItemsToShow(_oShowData) {
oShowData = _oShowData;
nCurrentMoveStep = 0;
setMoveToItem();
}
function setMoveToItem() {
nCurrentMoveStep++;
var _local7 = oShowData["Step" + nCurrentMoveStep].sItem;
var _local8 = oOwner[_local7];
var _local11 = _local8.nPosX + nPosX;
var _local12 = nCenterX - _local11;
nDestX = nPosX + _local12;
var _local10 = _local8.nPosY + nPosY;
var _local13 = nCenterY - _local10;
nDestY = nPosY + _local13;
var _local4 = nDestX + nLeftBound;
var _local5 = nDestX + nRightBound;
var _local9 = nDestY + nTopBound;
var _local6 = nDestY + nBottomBound;
if (_local4 > nLeftScreenX) {
nDestX = nDestX + (nLeftScreenX - _local4);
} else if (_local5 < nRightScreenX) {
nDestX = nDestX + (nRightScreenX - _local5);
}
if (_local9 > nTopScreenY) {
nDestY = nDestY + (nTopScreenY - _local9);
} else if (_local6 < nBottomScreenY) {
nDestY = nDestY + (nBottomScreenY - _local6);
}
if (nDestX > nPosX) {
sDirMoveX = "Right";
} else if (nDestX < nPosX) {
sDirMoveX = "Left";
} else {
sDirMoveX = "None";
}
if (nDestY > nPosY) {
sDirMoveY = "Down";
} else if (nDestY < nPosY) {
sDirMoveY = "Up";
} else {
sDirMoveY = "None";
}
var _local3 = Math.abs(nDestX - nPosX);
var _local2 = Math.abs(nDestY - nPosY);
if (_local3 > _local2) {
nMoveDelay = nPosX;
nMoveFrequency = Math.abs(2 * _local3);
nMoveAmplitude = Math.abs(nMoveFrequency / 20);
if (nMoveAmplitude < oShowData["Step" + nCurrentMoveStep].nMaxSpd) {
nMoveAmplitude = oShowData["Step" + nCurrentMoveStep].nMaxSpd;
}
nStartSpd = nMoveAmplitude / 2;
nMoveRatio = _local2 / _local3;
sRatioAxis = "Y";
} else {
nMoveDelay = nPosY;
nMoveFrequency = Math.abs(2 * _local2);
nMoveAmplitude = Math.abs(nMoveFrequency / 20);
if (nMoveAmplitude < oShowData["Step" + nCurrentMoveStep].nMaxSpd) {
nMoveAmplitude = oShowData["Step" + nCurrentMoveStep].nMaxSpd;
}
nStartSpd = nMoveAmplitude / 2;
nMoveRatio = _local3 / _local2;
sRatioAxis = "X";
}
sItemToShow = _local7;
nTimeShowItem = oShowData["Step" + nCurrentMoveStep].nTimeShowItem;
nMaxSpd = oShowData["Step" + nCurrentMoveStep].nMaxSpd;
nSpd = 0;
setState("MoveToItem");
}
function setMoveSpd() {
if (sRatioAxis == "X") {
if (sDirMoveY == "Down") {
nSpd = nMoveAmplitude * Math.sin(((Math.PI*2) / nMoveFrequency) * Math.abs(nPosY - nMoveDelay));
} else {
nSpd = nMoveAmplitude * Math.sin(((Math.PI*2) / nMoveFrequency) * Math.abs(nPosY - nMoveDelay));
}
} else if (sDirMoveX == "Right") {
nSpd = nMoveAmplitude * Math.sin(((Math.PI*2) / nMoveFrequency) * Math.abs(nPosX - nMoveDelay));
} else {
nSpd = nMoveAmplitude * Math.sin(((Math.PI*2) / nMoveFrequency) * Math.abs(nPosX - nMoveDelay));
}
nSpd = nSpd + nMinSpd;
if ((nMaxSpd != -1) and (nSpd > nMaxSpd)) {
nSpd = nMaxSpd;
}
}
function setNextMove() {
if (sRatioAxis == "X") {
if (sDirMoveY == "Down") {
nMoveY = nSpd;
} else {
nMoveY = -nSpd;
}
if (sDirMoveX == "Right") {
nMoveX = Math.abs(nMoveY) * nMoveRatio;
} else {
nMoveX = Math.abs(nMoveY) * (-nMoveRatio);
}
} else {
if (sDirMoveX == "Right") {
nMoveX = nSpd;
} else {
nMoveX = -nSpd;
}
if (sDirMoveY == "Down") {
nMoveY = Math.abs(nMoveX) * nMoveRatio;
} else {
nMoveY = Math.abs(nMoveX) * (-nMoveRatio);
}
}
}
function doMove() {
nPosX = nPosX + nMoveX;
nPosY = nPosY + nMoveY;
mcRef._x = int(nPosX);
mcRef._y = int(nPosY);
}
function checkDestination() {
var _local2 = false;
if (sRatioAxis == "Y") {
if (sDirMoveX == "Right") {
if (nPosX >= nDestX) {
nPosX = nDestX;
nPosY = nDestY;
_local2 = true;
}
} else if (nPosX <= nDestX) {
nPosX = nDestX;
nPosY = nDestY;
_local2 = true;
}
} else if (sDirMoveY == "Down") {
if (nPosY >= nDestY) {
nPosX = nDestX;
nPosY = nDestY;
_local2 = true;
}
} else if (nPosY <= nDestY) {
nPosX = nDestX;
nPosY = nDestY;
_local2 = true;
}
if (_local2 == true) {
nSpd = 0;
setState("ShowItem");
}
}
function deleteObject() {
delete oOwner[sName];
oController.oMainBroadcaster.removeListener(this);
}
}
Symbol 1237 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivationManager] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivationManager
{
var oController, oOwner, sName, oBackground, nScrWidth, nScrHeight, nTotalWidth, nTotalHeight, nTotalScrInX, nTotalScrInY, nActiveDist, nUpActiveLimit, nDwActiveLimit, nRActiveLimit, nLActiveLimit;
function ActivationManager (_sName, _oOwner) {
oController = com.disney.gem.games.Pirates.Controller.getInstance();
oOwner = _oOwner;
sName = _sName;
oBackground = oOwner.oBackground;
nScrWidth = 600;
nScrHeight = 400;
nTotalWidth = oBackground.mcRef._width;
nTotalHeight = oBackground.mcRef._height;
nTotalScrInX = int(nTotalWidth / nScrWidth) + 1;
nTotalScrInY = int(nTotalHeight / nScrHeight) + 1;
nActiveDist = 100;
nUpActiveLimit = oBackground.nPosY - nActiveDist;
nDwActiveLimit = (oBackground.nPosY + nScrHeight) + nActiveDist;
nRActiveLimit = (oBackground.nPosX + nScrWidth) + nActiveDist;
nLActiveLimit = oBackground.nPosX - nActiveDist;
oController.oMainBroadcaster.addListener(this);
}
function setScreenBroadcaster(_nScrX, _nScrY) {
this[(("oScreenBroadcaster" + _nScrX) + "_") + _nScrY] = new Object();
AsBroadcaster.initialize(this[(("oScreenBroadcaster" + _nScrX) + "_") + _nScrY]);
}
function doScreenBroadcast() {
var _local3 = int(oBackground.nPosX / nScrWidth) * -1;
if (oBackground.nPosX < 0) {
_local3++;
}
var _local2 = int(oBackground.nPosY / nScrHeight) * -1;
if (oBackground.nPosY < 0) {
_local2++;
}
this[(("oScreenBroadcaster" + (_local3 - 1)) + "_") + (_local2 - 1)].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + _local3) + "_") + (_local2 - 1)].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + (_local3 + 1)) + "_") + (_local2 - 1)].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + (_local3 - 1)) + "_") + _local2].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + _local3) + "_") + _local2].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + (_local3 + 1)) + "_") + _local2].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + (_local3 - 1)) + "_") + (_local2 + 1)].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + _local3) + "_") + (_local2 + 1)].broadcastMessage("checkActivate");
this[(("oScreenBroadcaster" + (_local3 + 1)) + "_") + (_local2 + 1)].broadcastMessage("checkActivate");
}
function addToBroadcast(_oItem, _nXCorner, _nYCorner) {
var _local3 = int(_nXCorner / nScrWidth) + 1;
var _local2 = int(_nYCorner / nScrHeight) + 1;
if (_nXCorner < 0) {
_local3 = _local3 - 2;
}
if (_nYCorner < 0) {
_local2 = _local2 - 2;
}
var _local4 = (("oScreenBroadcaster" + _local3) + "_") + _local2;
if (this[_local4] == undefined) {
setScreenBroadcaster(_local3, _local2);
}
this[_local4].addListener(_oItem);
return(_local4);
}
function removeToBroadcast(_oItem, _sBroadcasterName) {
this[_sBroadcasterName].removeListener(_oItem);
if (this[_sBroadcasterName]._listeners.length == 0) {
delete this[_sBroadcasterName];
}
}
function onUpdate() {
doScreenBroadcast();
}
function onUpdatePaused() {
onUpdate();
}
function deleteObject() {
delete oOwner[sName];
oController.oMainBroadcaster.removeListener(this);
}
}
Symbol 1238 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactManager] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactManager
{
var oImpactBroadcaster, oSlopeImpactBroadcaster, aItemsToValidate, aImpactItemsX, aImpactItemsY, nAngleMoveImpact, sName, oOwner;
function ImpactManager (_sName, _oOwner) {
oImpactBroadcaster = new Object();
AsBroadcaster.initialize(oImpactBroadcaster);
oSlopeImpactBroadcaster = new Object();
AsBroadcaster.initialize(oSlopeImpactBroadcaster);
aItemsToValidate = new Array();
aImpactItemsX = new Array();
aImpactItemsY = new Array();
nAngleMoveImpact = 1;
}
function addCollider(_oItem) {
oImpactBroadcaster.addListener(_oItem);
}
function removeCollider(_oItem) {
oImpactBroadcaster.removeListener(_oItem);
}
function addSlopeCollider(_oItem) {
oSlopeImpactBroadcaster.addListener(_oItem);
}
function removeSlopeCollider(_oItem) {
oSlopeImpactBroadcaster.removeListener(_oItem);
}
function addItemToValidate(_oItem) {
aItemsToValidate.push(_oItem);
}
function checkForImpact(_oMovingItem) {
var _local2;
var _local6;
var _local5;
var _local7;
var _local8;
var _local12;
var _local15;
for (var _local16 in oSlopeImpactBroadcaster._listeners) {
_local2 = _oMovingItem.returnImpactData();
if (_local2.nMaxMoveX > 0) {
_local6 = _local2.nPosX + _local2.nMaxMoveX;
_local5 = _local2.nPosX;
} else if (_local2.nMaxMoveX < 0) {
_local6 = _local2.nPosX;
_local5 = _local2.nPosX + _local2.nMaxMoveX;
} else {
_local6 = _local2.nPosX;
_local5 = _local2.nPosX;
}
if (_local2.nMaxMoveY > 0) {
_local8 = _local2.nPosY + _local2.nMaxMoveY;
_local7 = _local2.nPosY;
} else if (_local2.nMaxMoveY < 0) {
_local8 = _local2.nPosY;
_local7 = _local2.nPosY + _local2.nMaxMoveY;
} else {
_local8 = _local2.nPosY;
_local7 = _local2.nPosY;
}
var _local11 = oSlopeImpactBroadcaster._listeners[_local16].checkInReach(_local2, _local6, _local5, _local8, _local7);
if (_local11 == true) {
var _local10 = oSlopeImpactBroadcaster._listeners[_local16].giveSlopeData(_local2);
if ((_local12 == undefined) or ((_local10 != undefined) and (_local10.nYOnSlopeAtDest <= _local12))) {
_local12 = _local10.nYOnSlopeAtDest;
_local15 = _local10;
}
}
}
if (_local12 != undefined) {
if (_oMovingItem.nMaxMoveY > 0) {
var _local19 = _local12 - _oMovingItem.nPosY;
if (_local19 <= _oMovingItem.nMaxMoveY) {
_oMovingItem.nMaxMoveY = _local19;
if ((_oMovingItem.nMaxMoveX != 0) and (_local12 <= _oMovingItem.nPosY)) {
var _local17 = Math.pow(_oMovingItem.nMaxMoveX, 3) / (Math.pow(_oMovingItem.nMaxMoveX, 2) + Math.pow(_oMovingItem.nMaxMoveY, 2));
var _local18 = (_local17 / _oMovingItem.nMaxMoveX) * _oMovingItem.nMaxMoveY;
_oMovingItem.nMaxMoveX = _local17;
_oMovingItem.nMaxMoveY = _local18;
if (_local18 < 0) {
_oMovingItem.nMaxMoveY = _oMovingItem.nMaxMoveY - 1;
}
}
_oMovingItem.nRealMoveX = _oMovingItem.nMaxMoveX;
_oMovingItem.nRealMoveY = _oMovingItem.nMaxMoveY;
_local15.oItem.doImpactResult(_oMovingItem);
}
} else {
var _local19 = _local12 - _oMovingItem.nPosY;
if (_local12 <= _local2.nDestY) {
_oMovingItem.nMaxMoveY = _local19;
if ((_oMovingItem.nMaxMoveX != 0) and (_local12 <= _oMovingItem.nPosY)) {
var _local17 = Math.pow(_oMovingItem.nMaxMoveX, 3) / (Math.pow(_oMovingItem.nMaxMoveX, 2) + Math.pow(_oMovingItem.nMaxMoveY, 2));
var _local18 = (_local17 / _oMovingItem.nMaxMoveX) * _oMovingItem.nMaxMoveY;
_oMovingItem.nMaxMoveX = _local17;
_oMovingItem.nMaxMoveY = _local18;
if (_local18 < 0) {
_oMovingItem.nMaxMoveY = _oMovingItem.nMaxMoveY - 1;
}
}
_oMovingItem.nRealMoveX = _oMovingItem.nMaxMoveX;
_oMovingItem.nRealMoveY = _oMovingItem.nMaxMoveY;
_local15.oItem.doImpactResult(_oMovingItem);
}
}
}
_local2 = _oMovingItem.returnImpactData();
var _local21 = Math.abs(_local2.nMaxMoveX);
var _local20 = Math.abs(_local2.nMaxMoveY);
if (_local2.nMaxMoveX > 0) {
_local6 = _local2.nMaxMoveX + _local2.nRightHitBorder;
_local5 = _local2.nRightHitBorder;
} else if (_local2.nMaxMoveX < 0) {
_local6 = _local2.nLeftHitBorder;
_local5 = _local2.nMaxMoveX + _local2.nLeftHitBorder;
} else {
_local6 = _local2.nRightHitBorder;
_local5 = _local2.nLeftHitBorder;
}
if (_local2.nMaxMoveY > 0) {
_local8 = _local2.nMaxMoveY + _local2.nDownHitBorder;
_local7 = _local2.nDownHitBorder;
} else if (_local2.nMaxMoveY < 0) {
_local8 = _local2.nUpHitBorder;
_local7 = _local2.nMaxMoveY + _local2.nUpHitBorder;
} else {
_local8 = _local2.nDownHitBorder;
_local7 = _local2.nUpHitBorder;
}
_local6 = int(_local6 * 10) / 10;
_local5 = int(_local5 * 10) / 10;
_local8 = int(_local8 * 10) / 10;
_local7 = int(_local7 * 10) / 10;
var _local13;
if (_local2.nMaxMoveX == 0) {
_local13 = Math.abs(_local2.nMaxMoveY);
} else if (_local2.nMaxMoveY == 0) {
_local13 = Math.abs(_local2.nMaxMoveX);
} else if (Math.abs(_local2.nMaxMoveX) > Math.abs(_local2.nMaxMoveY)) {
_local13 = Math.abs(_local2.nMaxMoveX);
} else {
_local13 = Math.abs(_local2.nMaxMoveY);
}
var _local9 = new Array();
for (var _local16 in oImpactBroadcaster._listeners) {
if (oImpactBroadcaster._listeners[_local16].sName != _local2.sName) {
var _local11 = oImpactBroadcaster._listeners[_local16].checkInReach(_local2, _local6, _local5, _local8, _local7);
if (_local11 == true) {
var _local4 = oImpactBroadcaster._listeners[_local16].checkIfCanBeHit(_local2);
var _local14 = oImpactBroadcaster._listeners[_local16].confirmCanBeHit(_oMovingItem, _local4);
if (_local14 == true) {
if (Math.abs(_local4.nImpactDist) < _local13) {
_local13 = Math.abs(_local4.nImpactDist);
_local9.splice(0);
_local9.push(_local4);
} else if (Math.abs(_local4.nImpactDist) == _local13) {
_local9.push(_local4);
}
}
}
}
}
for (var _local16 in _local9) {
_local9[_local16].oItem.resolveHit(_oMovingItem, _local9[_local16]);
}
if (_oMovingItem.nRealMoveX > 0) {
_local6 = _oMovingItem.nRealMoveX + _local2.nRightHitBorder;
_local5 = _local2.nLeftHitBorder;
} else if (_oMovingItem.nRealMoveX < 0) {
_local6 = _local2.nRightHitBorder;
_local5 = _oMovingItem.nRealMoveX + _local2.nLeftHitBorder;
} else {
_local6 = _local2.nRightHitBorder;
_local5 = _local2.nLeftHitBorder;
}
if (_oMovingItem.nRealMoveY > 0) {
_local7 = _local2.nUpHitBorder;
_local8 = _oMovingItem.nRealMoveY + _local2.nDownHitBorder;
} else if (_oMovingItem.nRealMoveY < 0) {
_local7 = _oMovingItem.nRealMoveY + _local2.nUpHitBorder;
_local8 = _local2.nDownHitBorder;
} else {
_local8 = _local2.nDownHitBorder;
_local7 = _local2.nUpHitBorder;
}
for (var _local16 in aItemsToValidate) {
var _local11 = aItemsToValidate[_local16].checkInReachAfterMove(_oMovingItem, _local6, _local5, _local8, _local7);
if (_local11 == true) {
aItemsToValidate[_local16].resolveHitAfterMove(_oMovingItem, _local4);
}
}
aItemsToValidate.splice(0);
}
function deleteObject() {
delete oOwner[sName];
}
}
Symbol 1239 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ColliderItem] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ColliderItem extends com.sarbakan.utils.StateManaged
{
var oController, sName, oOwner, oImpactManager, sType, mcContainer, nAttachDepth, sAttachLink, sAttachName, nScaleX, nScaleY, nPosX, nPosY, mcRef, nUpBorder, nRightBorder, nDownBorder, nLeftBorder, nUpHitBorder, nDownHitBorder, nLeftHitBorder, nRightHitBorder, nMaxMoveY, nMaxMoveX;
function ColliderItem (_oItemData, _sName, _oOwner) {
super(undefined);
_oItemData.sItemName = _sName;
oController = com.disney.gem.games.Pirates.Controller.getInstance();
sName = _sName;
oOwner = _oOwner;
oImpactManager = oOwner.oImpactManager;
sType = _oItemData.sItemType;
mcContainer = _oItemData.mcContainer;
nAttachDepth = _oItemData.nAttachDepth;
sAttachLink = _oItemData.sItemType;
sAttachName = "mc" + (substring(sName, 2, -1));
nScaleX = _oItemData.nScaleX;
nScaleY = _oItemData.nScaleY;
nPosX = _oItemData.nPosX;
nPosY = _oItemData.nPosY;
attachItemMovie();
}
function attachItemMovie() {
mcContainer.attachMovie(sAttachLink, sAttachName, nAttachDepth);
mcRef = mcContainer[sAttachName];
mcRef._x = nPosX;
mcRef._y = nPosY;
mcRef._xscale = nScaleX;
mcRef._yscale = nScaleY;
setAsCollider();
}
function setAsCollider() {
nUpBorder = int((mcRef.mcRightUpBorder._y * nScaleY) / 100);
nRightBorder = int((mcRef.mcRightUpBorder._x * nScaleX) / 100);
nDownBorder = int((mcRef.mcLeftDownBorder._y * nScaleY) / 100);
nLeftBorder = int((mcRef.mcLeftDownBorder._x * nScaleX) / 100);
mcRef.mcLeftDownBorder.swapDepths(10);
mcRef.mcLeftDownBorder.removeMovieClip();
mcRef.mcRightUpBorder.swapDepths(10);
mcRef.mcRightUpBorder.removeMovieClip();
oImpactManager.addCollider(this);
}
function returnImpactData() {
setHitBorders();
var _local2 = {sName:sName, sType:sType, nPosX:nPosX, nPosY:nPosY, nMaxMoveX:nMaxMoveX, nMaxMoveY:nMaxMoveY, nDestX:nPosX + nMaxMoveX, nDestY:nPosY + nMaxMoveY, nRightBorder:nRightBorder, nLeftBorder:nLeftBorder, nDownBorder:nDownBorder, nUpBorder:nUpBorder, nRightHitBorder:nRightHitBorder, nLeftHitBorder:nLeftHitBorder, nDownHitBorder:nDownHitBorder, nUpHitBorder:nUpHitBorder};
return(_local2);
}
function setHitBorders() {
nRightHitBorder = nPosX + nRightBorder;
nLeftHitBorder = nPosX + nLeftBorder;
nDownHitBorder = nPosY + nDownBorder;
nUpHitBorder = nPosY + nUpBorder;
nRightHitBorder = int(nRightHitBorder * 10) / 10;
nLeftHitBorder = int(nLeftHitBorder * 10) / 10;
nDownHitBorder = int(nDownHitBorder * 10) / 10;
nUpHitBorder = int(nUpHitBorder * 10) / 10;
}
function checkInReach(_oMovingData, _nRightMoveBorder, _nLeftMoveBorder, _nDownMoveBorder, _nUpMoveBorder) {
var _local3 = false;
var _local4 = _oMovingData.sType;
if (com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactDefinition[_local4][sType] != undefined) {
setHitBorders();
if (_oMovingData.nMaxMoveX > 0) {
if ((nLeftHitBorder >= _nLeftMoveBorder) and (nLeftHitBorder < _nRightMoveBorder)) {
_oMovingData.bInXReach = true;
_local3 = true;
}
} else if (_oMovingData.nMaxMoveX < 0) {
if ((nRightHitBorder <= _nRightMoveBorder) and (nRightHitBorder > _nLeftMoveBorder)) {
_oMovingData.bInXReach = true;
_local3 = true;
}
}
if (_oMovingData.nMaxMoveY > 0) {
if ((nUpHitBorder >= _nUpMoveBorder) and (nUpHitBorder < _nDownMoveBorder)) {
_oMovingData.bInYReach = true;
_local3 = true;
}
} else if (_oMovingData.nMaxMoveY < 0) {
if ((nDownHitBorder <= _nDownMoveBorder) and (nDownHitBorder > _nUpMoveBorder)) {
_oMovingData.bInYReach = true;
_local3 = true;
}
}
}
return(_local3);
}
function checkIfCanBeHit(_oMovingData) {
var _local13 = false;
var _local16 = false;
if ((_oMovingData.bInXReach == true) and (_oMovingData.nMaxMoveX != 0)) {
if (_oMovingData.nMaxMoveX > 0) {
var _local4 = nLeftHitBorder - _oMovingData.nRightHitBorder;
_local4 = int(_local4 * 10) / 10;
var _local15 = "Left";
if (_local4 < 0) {
_local4 = 0;
}
} else if (_oMovingData.nMaxMoveX < 0) {
var _local4 = nRightHitBorder - _oMovingData.nLeftHitBorder;
_local4 = int(_local4 * 10) / 10;
var _local15 = "Right";
if (_local4 > 0) {
_local4 = 0;
}
}
var _local8 = _local4 / _oMovingData.nMaxMoveX;
if (_local8 < 0) {
_local8 = 0;
}
var _local17 = _oMovingData.nPosX + _local4;
_local17 = int(_local17 * 10) / 10;
var _local11 = _oMovingData.nPosY + (_oMovingData.nMaxMoveY * _local8);
_local11 = int(_local11 * 10) / 10;
if (((_local11 + _oMovingData.nDownBorder) > nUpHitBorder) and ((_local11 + _oMovingData.nUpBorder) < nDownHitBorder)) {
_local13 = true;
}
}
if ((_oMovingData.bInYReach == true) and (_oMovingData.nMaxMoveY != 0)) {
if (_oMovingData.nMaxMoveY > 0) {
var _local3 = nUpHitBorder - _oMovingData.nDownHitBorder;
_local3 = int(_local3 * 10) / 10;
var _local14 = "Up";
if (_local3 < 0) {
_local3 = 0;
}
} else if (_oMovingData.nMaxMoveY < 0) {
var _local3 = nDownHitBorder - _oMovingData.nUpHitBorder;
_local3 = int(_local3 * 10) / 10;
var _local14 = "Down";
if (_local3 > 0) {
_local3 = 0;
}
}
var _local7 = _local3 / _oMovingData.nMaxMoveY;
if (_local7 < 0) {
_local7 = 0;
}
var _local18 = _oMovingData.nPosY + _local3;
_local18 = int(_local18 * 10) / 10;
var _local12 = _oMovingData.nPosX + (_oMovingData.nMaxMoveX * _local7);
_local12 = int(_local12 * 10) / 10;
if (((_local12 + _oMovingData.nRightBorder) > nLeftHitBorder) and ((_local12 + _oMovingData.nLeftBorder) < nRightHitBorder)) {
_local16 = true;
}
}
if ((_local13 == true) or (_local16 == true)) {
var _local9;
var _local10;
var _local5;
var _local6;
if ((_local13 == true) and (_local16 == true)) {
if (_local3 < _local4) {
_local9 = _local3;
_local10 = _local7;
_local5 = "Y";
_local6 = _local14;
} else if (_local3 > _local4) {
_local9 = _local4;
_local10 = _local8;
_local5 = "X";
_local6 = _local15;
} else if (random(100) < 50) {
_local9 = _local4;
_local10 = _local8;
_local5 = "X";
_local6 = _local15;
} else {
_local9 = _local3;
_local10 = _local7;
_local5 = "Y";
_local6 = _local14;
}
} else if (_local13 == true) {
_local9 = _local4;
_local10 = _local8;
_local5 = "X";
_local6 = _local15;
} else {
_local9 = _local3;
_local10 = _local7;
_local5 = "Y";
_local6 = _local14;
}
var _local19 = {oItem:this, nImpactDist:_local9, nMovePercent:_local10, sImpactAxis:_local5, sImpactSide:_local6};
}
return(_local19);
}
function validateMove() {
oImpactManager.checkForImpact(this);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
}
function resolveHitAfterMove(_oMovingItem) {
}
function doImpactResult(_oMovingItem) {
}
function deleteObject() {
oImpactManager.removeCollider(this);
mcRef.removeMovieClip();
delete oOwner[sName];
oController.oMainBroadcaster.removeListener(this);
}
}
Symbol 1240 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactDefinition] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactDefinition
{
function ImpactDefinition () {
}
static var Player = {AllSideBlocker:true, UpLeftBlocker:true, UpRightBlocker:true, RightClimbingPlate:true, LeftClimbingPlate:true, SoulType1HitZone:true, SoulType2HitZone:true, FireHitZone:true, YellowCellKey:true, RedCellKey:true, BlueCellKey:true, GreenCellKey:true, PinkCellKey:true, OrangeCellKey:true, YellowDoor:true, RedDoor:true, BlueDoor:true, GreenDoor:true, PinkDoor:true, OrangeDoor:true, Token:true, KillingGround:true, RightDangerZone:true, LeftDangerZone:true};
}
Symbol 1241 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Player] Frame 0
class com.disney.gem.games.Pirates.game_obj.Player extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ColliderItem
{
var oControls, oInventory, nBaseSpdX, nMaxSpdX, nMinSpdX, nMinSpdY, bJumping, nJumpSpdX, nMinGroundSpdY, nMaxSpdY, nMinFallSpdY, nXAcceleration, nYAcceleration, nYDeceleration, nSpdX, nSpdY, nSpdXModifier, nStartFallSpdY, nJumpSpd, bOnGround, sDirection, nClimbStartDistY, nClimbEndDistX, nEndClimbY, nFrClimbSfx, oKeys, oKeyInUse, nFrGetKey, oFearObstacle, oDoor, bInDangerZone, sDangerDirection, nDangerZoneX, bWillBeAfraid, setState, oController, sState, stateFinished, nPosX, mcRef, nPosY, nMaxMoveX, nMaxMoveY, nRealMoveX, nRealMoveY, validateMove, sType, oOwner, bPausable;
function Player (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
oControls = new com.disney.gem.games.Pirates.game_obj.ControlsManager("oControlsManager", this);
oInventory = _oOwner.oInventory;
nBaseSpdX = 4.1;
nMaxSpdX = nBaseSpdX;
nMinSpdX = 0.1;
nMinSpdY = 0.5;
bJumping = false;
nJumpSpdX = 4.1;
nMinGroundSpdY = 5;
nMaxSpdY = 15;
nMinFallSpdY = 1;
nXAcceleration = 1.3;
nYAcceleration = 1.4;
nYDeceleration = 1.4;
nSpdX = 0;
nSpdY = 0;
nSpdXModifier = 1.2;
nStartFallSpdY = 2;
nJumpSpd = -25;
bOnGround = true;
sDirection = "Right";
nClimbStartDistY = 93;
nClimbEndDistX = 37;
nEndClimbY = 0;
nFrClimbSfx = 11;
oKeys = new Object();
oKeyInUse = undefined;
nFrGetKey = 13;
oFearObstacle = undefined;
oDoor = undefined;
bInDangerZone = false;
sDangerDirection = "";
nDangerZoneX = 0;
bWillBeAfraid = false;
setState("Idle", true);
oController.oMainBroadcaster.addListener(this);
}
function state_Idle() {
}
function state_StartIdle2() {
if ((stateFinished() == true) and (sState == "StartIdle2")) {
setState("Idle2");
}
}
function state_Idle2() {
if ((stateFinished() == true) and (sState == "Idle2")) {
nPosX = nDangerZoneX;
}
}
function state_Afraid_init() {
var _local1 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Afraid", com.disney.gem.games.Pirates.GameData.AFRAID_VOLUME);
}
function state_Afraid() {
if ((stateFinished() == true) and (sState == "Afraid")) {
setState("AfraidLoop", true);
}
}
function state_AfraidLoop() {
}
function state_StartRun() {
if ((stateFinished() == true) and (sState == "StartRun")) {
setState("Run");
}
}
function state_StartRun2() {
if ((stateFinished() == true) and (sState == "StartRun2")) {
setState("Run");
}
}
function state_Run() {
}
function state_EndRun() {
if ((stateFinished() == true) and (sState == "EndRun")) {
setState("Idle");
}
}
function state_StartJump() {
if ((stateFinished() == true) and (sState == "StartJump")) {
setState("Jump");
}
}
function state_Jump_init() {
bOnGround = false;
bJumping = true;
nSpdY = nJumpSpd;
}
function state_Jump() {
}
function state_StartFall() {
if ((stateFinished() == true) and (sState == "StartFall")) {
setState("Fall");
}
}
function state_Fall() {
}
function state_Land_init() {
var _local1 = random(75);
if (_local1 < 25) {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Land1", com.disney.gem.games.Pirates.GameData.LAND1_VOLUME);
} else if (_local1 < 50) {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Land2", com.disney.gem.games.Pirates.GameData.LAND2_VOLUME);
} else {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Land3", com.disney.gem.games.Pirates.GameData.LAND3_VOLUME);
}
}
function state_Land() {
if ((stateFinished() == true) and (sState == "Land")) {
setState("Idle");
}
}
function state_Climb_init() {
var _local1 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Grapple", com.disney.gem.games.Pirates.GameData.GRAPPLE_VOLUME);
}
function state_Climb() {
if (sDirection == "Right") {
nPosX = nPosX + (nClimbEndDistX / mcRef.mcState._totalframes);
} else {
nPosX = nPosX - (nClimbEndDistX / mcRef.mcState._totalframes);
}
if (mcRef.mcState._currentframe == nFrClimbSfx) {
var _local2 = random(75);
if (_local2 < 25) {
var _local3 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Climb1", com.disney.gem.games.Pirates.GameData.CLIMB1_VOLUME);
} else if (_local2 < 50) {
var _local3 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Climb2", com.disney.gem.games.Pirates.GameData.CLIMB2_VOLUME);
} else {
var _local3 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Climb3", com.disney.gem.games.Pirates.GameData.CLIMB3_VOLUME);
}
} else if ((stateFinished() == true) and (sState == "Climb")) {
nPosX = int(nPosX * 10) / 10;
nPosY = nEndClimbY;
mcRef._x = nPosX;
mcRef._y = nPosY;
bOnGround = true;
nSpdX = 0;
nSpdY = 0;
setState("Idle", true);
}
}
function state_GetKey() {
if ((mcRef.mcState._currentframe == nFrGetKey) and (sState == "GetKey")) {
getKey(oKeyInUse.sColor);
oKeyInUse.beGet();
} else if ((stateFinished() == true) and (sState == "GetKey")) {
setState("Idle");
}
}
function state_DropKey() {
if ((mcRef.mcState._currentframe == nFrGetKey) and (sState == "DropKey")) {
dropKey(oKeyInUse.sColor);
oKeyInUse.beDrop();
} else if ((stateFinished() == true) and (sState == "DropKey")) {
setState("Idle");
}
}
function state_OpenDoor_init() {
var _local1 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "UnlockCell", com.disney.gem.games.Pirates.GameData.UNLOCK_CELL_VOLUME);
}
function state_OpenDoor() {
if ((stateFinished() == true) and (sState == "OpenDoor")) {
dropKey(oDoor.sColor);
oDoor.setState("Opening");
if (oDoor.sColor == "Yellow") {
setState("WinLevel");
} else {
setState("Idle");
}
}
}
function state_WinLevel() {
if (stateFinished() == true) {
oController.pause();
oController.showWinLevel();
}
}
function changeDirection() {
if (sDirection == "Right") {
sDirection = "Left";
} else {
sDirection = "Right";
}
mcRef._xscale = mcRef._xscale - (mcRef._xscale * 2);
}
function applyGravity() {
if (sState != "StartJump") {
if (bOnGround == false) {
if ((nSpdY > 0) and ((((sState == "Idle") or (sState == "StartRun")) or (sState == "Run")) or (sState == "EndRun"))) {
setState("Fall");
} else if (((nSpdY > 0) and (sState != "StartFall")) and (sState != "Fall")) {
setState("StartFall");
} else if ((((nSpdY == nMaxSpdY) and (sState != "Jump")) and (sState != "StartFall")) and (sState != "Fall")) {
setState("Fall");
}
}
if (nSpdY > 0) {
bOnGround = false;
}
if (nSpdY == 0) {
if ((((sState == "StartJump") or (sState == "Jump")) or (sState == "StartFall")) or (sState == "Fall")) {
nSpdY = nMinSpdY;
} else {
nSpdY = nMinFallSpdY;
}
} else if (nSpdY < 0) {
nSpdY = nSpdY / nYDeceleration;
if (Math.abs(nSpdY) < nMinSpdY) {
nSpdY = 0;
}
} else if (nSpdY < nMaxSpdY) {
nSpdY = nSpdY * nYAcceleration;
if (nSpdY > nMaxSpdY) {
nSpdY = nMaxSpdY;
}
}
}
}
function reactToControls() {
switch (sState) {
case "Idle" :
if (bOnGround == true) {
if ((oControls.bUpPress == true) and (oControls.bUpRelease == true)) {
setJump();
} else if (oControls.bRightPress == true) {
if (sDirection == "Left") {
changeDirection();
}
setState("StartRun");
} else if (oControls.bLeftPress == true) {
if (sDirection == "Right") {
changeDirection();
}
setState("StartRun");
} else {
slowDownXSpeed();
}
}
break;
case "Idle2" :
if (bOnGround == true) {
if ((oControls.bUpPress == true) and (oControls.bUpRelease == true)) {
setJump();
} else if (oControls.bRightPress == true) {
if (sDangerDirection == "Left") {
if (sDirection == "Left") {
changeDirection();
}
setState("StartRun");
}
} else if (oControls.bLeftPress == true) {
if (sDangerDirection == "Right") {
if (sDirection == "Right") {
changeDirection();
}
setState("StartRun");
}
} else {
slowDownXSpeed();
}
}
break;
case "StartRun" :
case "StartRun2" :
if (bOnGround == true) {
if ((oControls.bUpPress == true) and (oControls.bUpRelease == true)) {
setJump();
} else if (oControls.bRightPress == true) {
if (sDirection == "Left") {
changeDirection();
}
setRightSpeed();
} else if (oControls.bLeftPress == true) {
if (sDirection == "Right") {
changeDirection();
}
setLeftSpeed();
} else {
slowDownXSpeed();
setState("EndRun");
}
}
break;
case "Run" :
if (bOnGround == true) {
if ((oControls.bUpPress == true) and (oControls.bUpRelease == true)) {
setJump();
} else if (oControls.bRightPress == true) {
if (sDirection == "Left") {
changeDirection();
}
setRightSpeed();
} else if (oControls.bLeftPress == true) {
if (sDirection == "Right") {
changeDirection();
}
setLeftSpeed();
} else {
slowDownXSpeed();
setState("EndRun");
}
}
break;
case "EndRun" :
if (bOnGround == true) {
if ((oControls.bUpPress == true) and (oControls.bUpRelease == true)) {
setJump();
} else if (oControls.bRightPress == true) {
if (sDirection == "Left") {
changeDirection();
}
} else if (oControls.bLeftPress == true) {
if (sDirection == "Right") {
changeDirection();
}
} else {
slowDownXSpeed();
}
}
break;
case "Jump" :
reactToControlInAir();
break;
case "StartFall" :
reactToControlInAir();
break;
case "Fall" :
reactToControlInAir();
break;
case "Land" :
if (bOnGround == true) {
if ((oControls.bUpPress == true) and (oControls.bUpRelease == true)) {
setJump();
}
}
break;
}
}
function reactToControlInAir() {
if (bOnGround == false) {
if (oControls.bRightPress == true) {
if (sDirection == "Left") {
changeDirection();
}
setRightSpeed();
} else if (oControls.bLeftPress == true) {
if (sDirection == "Right") {
changeDirection();
}
setLeftSpeed();
} else {
slowDownXSpeed();
}
} else {
slowDownXSpeed();
}
}
function setRightSpeed() {
if (bJumping == true) {
nMaxSpdX = nJumpSpdX;
} else {
nMaxSpdX = nBaseSpdX;
}
if (nSpdX == 0) {
nSpdX = nMinSpdX;
} else if (nSpdX < 0) {
nSpdX = 0;
} else if (nSpdX > nMaxSpdX) {
nSpdX = nMaxSpdX;
} else if (nSpdX < nMaxSpdX) {
if (bOnGround == true) {
nSpdX = nSpdX * nXAcceleration;
} else {
nSpdX = nMaxSpdX;
}
if (nSpdX > nMaxSpdX) {
nSpdX = nMaxSpdX;
}
}
}
function setLeftSpeed() {
if (bJumping == true) {
nMaxSpdX = nJumpSpdX;
} else {
nMaxSpdX = nBaseSpdX;
}
if (nSpdX == 0) {
nSpdX = -nMinSpdX;
} else if (nSpdX > 0) {
nSpdX = 0;
} else if (nSpdX < (-nMaxSpdX)) {
nSpdX = -nMaxSpdX;
} else if (nSpdX > (-nMaxSpdX)) {
if (bOnGround == true) {
nSpdX = nSpdX * nXAcceleration;
} else {
nSpdX = -nMaxSpdX;
}
if (nSpdX < (-nMaxSpdX)) {
nSpdX = -nMaxSpdX;
}
}
}
function slowDownXSpeed() {
nSpdX = 0;
}
function doMove() {
setMaxMove();
makeMoving();
}
function setMaxMove() {
nMaxMoveX = nSpdX;
nMaxMoveY = nSpdY;
nMaxMoveX = int(nMaxMoveX * 10) / 10;
nMaxMoveY = int(nMaxMoveY * 10) / 10;
nRealMoveX = nMaxMoveX;
nRealMoveY = nMaxMoveY;
}
function makeMoving() {
while ((nMaxMoveX != 0) or (nMaxMoveY != 0)) {
validateMove();
nPosX = nPosX + nRealMoveX;
nPosX = int(nPosX * 10) / 10;
nPosY = nPosY + nRealMoveY;
nPosY = int(nPosY * 10) / 10;
mcRef._x = nPosX;
mcRef._y = nPosY;
if (nMaxMoveX == nRealMoveX) {
nMaxMoveX = 0;
} else if (nMaxMoveX != 0) {
nMaxMoveX = nMaxMoveX - nRealMoveX;
}
if (nMaxMoveY == nRealMoveY) {
nMaxMoveY = 0;
} else if (nMaxMoveY != 0) {
nMaxMoveY = nMaxMoveY - nRealMoveY;
}
nRealMoveX = nMaxMoveX;
nRealMoveY = nMaxMoveY;
}
}
function setJump() {
setState("StartJump");
}
function setGroundHit() {
nSpdY = 0;
bOnGround = true;
if ((((sState == "StartJump") or (sState == "Jump")) or (sState == "StartFall")) or (sState == "Fall")) {
nSpdX = 0;
if (sState != "StartJump") {
setState("Land");
}
}
}
function setInDangerZone(_sZoneDirection, _nReplaceX) {
if (((((sState != "StartIdle2") and (sState != "Idle2")) and (sDirection == _sZoneDirection)) and (sState != "StartJump")) and (bWillBeAfraid == false)) {
sDangerDirection = _sZoneDirection;
nDangerZoneX = _nReplaceX;
if (sState != "Run") {
if (sDangerDirection == "Right") {
nPosX = nDangerZoneX - 5;
} else {
nPosX = nDangerZoneX + 5;
}
bInDangerZone = true;
nSpdX = 0;
nMaxMoveX = 0;
nRealMoveX = 0;
setState("StartIdle2");
} else if (sDangerDirection == "Right") {
nPosX = nDangerZoneX;
} else {
nPosX = nDangerZoneX;
}
}
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
return(true);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
var _local2 = _oMovingItem.sType;
if (com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactDefinition[_local2][sType] != undefined) {
}
}
function setClimb(_nEndClimbY) {
nEndClimbY = _nEndClimbY;
nPosY = nEndClimbY + nClimbStartDistY;
mcRef._y = nPosY;
nRealMoveY = 0;
setState("Climb");
}
function getKey(_sKeyColor) {
oKeys[_sKeyColor] = true;
oInventory.addKey(_sKeyColor);
}
function dropKey(_sKeyColor) {
oKeys[_sKeyColor] = false;
oInventory.removeKey(_sKeyColor);
}
function checkIfJumpingEnd() {
if (bJumping == true) {
if (((sState != "Jump") and (sState != "StartFall")) and (sState != "Fall")) {
bJumping = false;
}
}
}
function setGetKey(_oKey) {
nSpdX = 0;
oKeyInUse = _oKey;
setState("GetKey");
}
function setDropKey(_oKey) {
nSpdX = 0;
oKeyInUse = _oKey;
setState("DropKey");
}
function setBeAfraid(_oObstacle) {
oFearObstacle = _oObstacle;
}
function checkFear() {
if ((oFearObstacle != undefined) and (bOnGround == true)) {
if ((sDirection == "Right") and (nPosX > oFearObstacle.nPosX)) {
changeDirection();
} else if ((sDirection == "Left") and (nPosX < oFearObstacle.nPosX)) {
changeDirection();
}
oFearObstacle = undefined;
looseLife();
setState("Afraid");
}
}
function looseLife() {
oController.nNbLifes--;
oOwner.showLifes();
}
function getPts(_nPts) {
oController.nScore = oController.nScore + _nPts;
oOwner.showScore();
}
function loosePts(_nPts) {
oController.nScore = oController.nScore - _nPts;
if (oController.nScore < 0) {
oController.nScore = 0;
}
oOwner.showScore();
}
function setOpenDoor(_oDoor) {
nSpdX = 0;
oDoor = _oDoor;
setState("OpenDoor");
}
function checkInDangerZone() {
if (((bInDangerZone == true) and (sState == "Idle")) and (bWillBeAfraid == false)) {
setState("Idle2");
}
bInDangerZone = false;
}
function onUpdate() {
if (sState != "Climb") {
applyGravity();
doMove();
reactToControls();
checkIfJumpingEnd();
checkInDangerZone();
checkFear();
}
super.onUpdate();
}
function onUpdatePaused() {
if (bPausable == false) {
onUpdate();
}
}
function deleteObject() {
oControls.deleteObject();
super.deleteObject();
}
}
Symbol 1242 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.ControlsManager] Frame 0
class com.disney.gem.games.Pirates.game_obj.ControlsManager
{
var oController, sName, oOwner, oBackground, bControlsLock, bRightPress, bRightRelease, bLeftPress, bLeftRelease, bUpPress, bUpRelease, bSpacePress, bSpaceRelease;
function ControlsManager (_sName, _oOwner) {
oController = com.disney.gem.games.Pirates.Controller.getInstance();
sName = _sName;
oOwner = _oOwner;
oBackground = oOwner.oOwner.oBackground;
bControlsLock = false;
bRightPress = false;
bRightRelease = true;
bLeftPress = false;
bLeftRelease = true;
bUpPress = false;
bUpRelease = true;
bSpacePress = false;
bSpaceRelease = true;
oController.oMainBroadcaster.addListener(this);
}
function controlKeys() {
if (bControlsLock == false) {
if (Key.isDown(39)) {
if (bRightPress == false) {
bRightPress = true;
} else {
bRightRelease = false;
}
} else {
bRightPress = false;
bRightRelease = true;
}
if (Key.isDown(37)) {
if (bLeftPress == false) {
bLeftPress = true;
} else {
bLeftRelease = false;
}
} else {
bLeftPress = false;
bLeftRelease = true;
}
if (Key.isDown(38)) {
if (bUpPress == false) {
bUpPress = true;
} else {
bUpRelease = false;
}
} else {
bUpPress = false;
bUpRelease = true;
}
if (Key.isDown(32)) {
if (bSpacePress == false) {
bSpacePress = true;
} else {
bSpaceRelease = false;
}
} else {
bSpacePress = false;
bSpaceRelease = true;
}
} else {
bRightPress = false;
bRightRelease = true;
bLeftPress = false;
bLeftRelease = true;
bUpPress = false;
bUpRelease = true;
bSpacePress = false;
bSpaceRelease = true;
}
}
function lockControls() {
bControlsLock = true;
}
function onUpdate() {
controlKeys();
}
function onUpdatePaused() {
onUpdate();
}
function deleteObject() {
delete oOwner[sName];
oController.oMainBroadcaster.removeListener(this);
}
}
Symbol 1243 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 _local2 = 0;
while (_local2 < aEventListeners.length) {
if (aEventListeners[_local2] == _oListener) {
delete aEventListeners[_local2];
aEventListeners.splice(_local2, 1);
}
_local2++;
}
}
function doSoundComplete() {
if (bNeedFreshStart && (nRemainingLoop > 1)) {
sndObj.start(0, nRemainingLoop - 1);
} else {
doManageEndEvent();
}
}
function doUpdateSound() {
sndObj.setVolume(returnComputedVolume(nCurrentVolume));
}
function doMute() {
bMuted = true;
doUpdateSound();
}
function doUnMute() {
bMuted = false;
doUpdateSound();
}
function doPause() {
sndObj.stop();
bPaused = true;
}
function doResume() {
bPaused = false;
bNeedFreshStart = true;
sndObj.start(nCurrentTime / 1000, 1);
}
function doStart(_nLoop) {
if (_nLoop == undefined) {
_nLoop = 1;
}
if (sLinkage.indexOf(".mp3") != -1) {
sndObj.start(0.015, _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;
while (_local2 < aEventListeners.length) {
aEventListeners[_local2].doSoundEvent(com.sarbakan.sound.SoundManager.nEVENT_SOUND_COMPLETE, this);
_local2++;
}
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) {
var _local2;
if ((!bMuted) && (!com.sarbakan.sound.SoundManager.isCategoryMuted(sCategory))) {
var _local3 = com.sarbakan.sound.SoundManager.__get__MasterVolume() / 100;
var _local4 = com.sarbakan.sound.SoundManager.getCategoryVolume(sCategory) / 100;
_local2 = _nVolume;
_local2 = _local2 * _local4;
_local2 = _local2 * _local3;
} else {
_local2 = 0;
}
return(_local2);
}
static var nFADE_RATE = 8;
static var nFADE_AT_END_TIME = 800;
}
Symbol 1244 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();
var _local1;
if (NewSoundAllowed) {
if (_nVolume == undefined) {
_nVolume = 100;
}
if (_nLoop == undefined) {
_nLoop = 1;
}
if (_bUnique == undefined) {
_bUnique = false;
}
var _local2;
if (_bUnique) {
var _local4 = isSoundPlaying(_sLinkage);
if (_local4.bPlaying) {
_local2 = false;
_local1 = _local4.oSound;
} else {
_local2 = true;
}
} else {
_local2 = true;
}
if (_local2) {
doManageCategory(_sCategoryName);
var _local5 = getMCForSound();
var _local3 = new Sound(_local5);
_local3.attachSound(_sLinkage);
if (_local3.duration != undefined) {
_local1 = new com.sarbakan.sound.SoundItem(_local3, _sLinkage, _nVolume, _nLoop, _sCategoryName, _local5);
} else {
trace("**** BAD SOUND LINKAGE : " + _sLinkage);
}
_local1.doAddListener(com.sarbakan.sound.SoundManager);
aSounds.push(_local1);
}
} else {
trace("ERROR - ***** - MAX SOUND NUM REACHED : " + nMAX_SOUNDS_PLAYING);
}
return(_local1);
}
static function isSoundPlaying(_sLinkageName) {
var _local2 = new Object();
_local2.bPlaying = false;
_local2.oSound = undefined;
var _local1 = aSounds.length - 1;
while (_local1 >= 0) {
if (aSounds[_local1].LinkageName == _sLinkageName) {
_local2.oSound = aSounds[_local1];
_local2.bPlaying = true;
}
_local1--;
}
return(_local2);
}
function getPlayingQty(_sLinkageName) {
var _local2 = 0;
var _local1 = aSounds.length - 1;
while (_local1 >= 0) {
if (aSounds[_local1].LinkageName == _sLinkageName) {
_local2++;
}
_local1--;
}
return(_local2);
}
static function doManageExternalSound(_oSound) {
doCheckInit();
doManageCategory(_oSound.__get__Category());
_oSound.doAddListener(com.sarbakan.sound.SoundManager);
aSounds.push(_oSound);
}
static function getMCForSound() {
var _local1 = getNextDepth();
var _local2 = mcAttach.createEmptyMovieClip("Snd" + _local1, _local1);
return(_local2);
}
static function getNextDepth() {
nSoundNum++;
return(nSoundNum);
}
static function doInit(_mcAttach) {
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 _local1 = aSounds.length - 1;
while (_local1 >= 0) {
aSounds[_local1].doEnterFrame();
_local1--;
}
}
static function setCategoryVolume(_sCategoryName, _nVol) {
doManageCategory(_sCategoryName);
var _local1 = aSoundCategories.length - 1;
while (_local1 >= 0) {
if (aSoundCategories[_local1].sName == _sCategoryName) {
aSoundCategories[_local1].nVolume = _nVol;
}
_local1--;
}
doUpdateAllSoundsVolume();
}
static function getCategoryVolume(_sCategoryName) {
doManageCategory(_sCategoryName);
var _local2;
var _local1 = aSoundCategories.length - 1;
while (_local1 >= 0) {
if (aSoundCategories[_local1].sName == _sCategoryName) {
_local2 = aSoundCategories[_local1].nVolume;
}
_local1--;
}
return(_local2);
}
static function isCategoryMuted(_sCategoryName) {
doManageCategory(_sCategoryName);
var _local2;
var _local1 = aSoundCategories.length - 1;
while (_local1 >= 0) {
if (aSoundCategories[_local1].sName == _sCategoryName) {
_local2 = aSoundCategories[_local1].bMuted;
}
_local1--;
}
return(_local2);
}
static function doSoundEvent(_nEvent, _oSound) {
if (!(_nEvent === nEVENT_SOUND_COMPLETE)) {
} else {
var _local2 = false;
var _local1 = aSounds.length - 1;
while (_local1 >= 0) {
if (!_local2) {
if (aSounds[_local1] == _oSound) {
_local2 = true;
delete aSounds[_local1];
aSounds.splice(Number(_local1), 1);
}
}
_local1--;
}
}
}
static function doMuteCategory(_sCategoryName) {
var _local1 = aSoundCategories.length - 1;
while (_local1 >= 0) {
if (aSoundCategories[_local1].sName == _sCategoryName) {
aSoundCategories[_local1].bMuted = true;
}
_local1--;
}
doUpdateAllSoundsVolume();
}
static function doUnMuteCategory(_sCategoryName) {
var _local1 = aSoundCategories.length - 1;
while (_local1 >= 0) {
if (aSoundCategories[_local1].sName == _sCategoryName) {
aSoundCategories[_local1].bMuted = false;
}
_local1--;
}
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 _local1 = aSounds.length - 1;
while (_local1 >= 0) {
aSounds[_local1].doRemoveListener(_oListener);
_local1--;
}
}
static function doDestroy() {
doRemoveListenerFromAllSounds();
var _local1 = aSounds.length - 1;
while (_local1 >= 0) {
aSounds[_local1].doDestroy();
_local1--;
}
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 _local1 = aSounds.length - 1;
while (_local1 >= 0) {
aSounds[_local1].doUpdateSound();
_local1--;
}
}
static function doCheckInit() {
if (!bInited) {
trace("**** NORMAL SM ERROR, NEED TO INIT SOUND MANAGER FIRST");
}
}
static function doManageCategory(_sCategoryName) {
doCheckInit();
var _local2 = false;
var _local1 = aSoundCategories.length - 1;
while (_local1 >= 0) {
if (aSoundCategories[_local1].sName == _sCategoryName) {
_local2 = true;
}
_local1--;
}
if (!_local2) {
var _local4 = new Object();
_local4.sName = _sCategoryName;
_local4.nVolume = 100;
_local4.bMuted = false;
aSoundCategories.push(_local4);
}
}
static var nEVENT_SOUND_COMPLETE = 1;
static var sDEFAULT_CATEGORY = "SFX";
static var nMAX_SOUNDS_PLAYING = 8;
static var bInited = false;
}
Symbol 1245 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1246 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1247 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 _local1 = 0;
if (__nNum < 0) {
_local1 = -1;
} else if (__nNum > 0) {
_local1 = 1;
}
return(_local1);
}
static function getReachZero(__nNum, __nReducer) {
return(getReachNum(__nNum, 0, __nReducer));
}
static function getReachNum(__nNum, __nTargetNum, __nReducer) {
var _local1 = __nNum;
if (_local1 != __nTargetNum) {
if (_local1 < __nTargetNum) {
_local1 = _local1 + __nReducer;
if (_local1 > __nTargetNum) {
_local1 = __nTargetNum;
}
} else {
_local1 = _local1 - __nReducer;
if (_local1 < __nTargetNum) {
_local1 = __nTargetNum;
}
}
}
return(_local1);
}
static function getDistance(__nX1, __nY1, __nX2, __nY2) {
return(Math.sqrt(Math.pow(Math.abs(__nX2 - __nX1), 2) + Math.pow(Math.abs(__nY2 - __nY1), 2)));
}
static function 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 _local2;
var _local1;
var _local4;
var _local3;
_local2 = __nX2 - __nX1;
_local1 = __nY2 - __nY1;
_local4 = Math.atan2(_local1, _local2);
_local3 = getDegreeFromRadius(_local4);
return(_local3);
}
static function getCleanedAngle(_nAngle) {
while (_nAngle < 360) {
_nAngle = _nAngle + 360;
}
_nAngle = _nAngle % 360;
return(_nAngle);
}
static function getDegreeFromRadius(__nRadius) {
var _local1 = (__nRadius / MATH_PI) * 180;
return(_local1);
}
static function getRadianFromDegree(__nDegree) {
var _local1 = __nDegree * (MATH_PI / 180);
return(_local1);
}
static function getBoundsCenter(_oBox) {
var _local3 = (_oBox.xMin + _oBox.xMax) / 2;
var _local2 = (_oBox.yMin + _oBox.yMax) / 2;
return({x:_local3, y:_local2});
}
static var MATH_PI = Math.PI;
}
Symbol 1248 MovieClip [__Packages.com.disney.gem.games.Pirates.GameData] Frame 0
class com.disney.gem.games.Pirates.GameData
{
function GameData () {
}
static var NB_GAME_LEVELS = 7;
static var MAX_LIFES = 5;
static var MAX_BONUS_LEVEL1 = 5600;
static var MAX_BONUS_LEVEL2 = 6500;
static var MAX_BONUS_LEVEL3 = 7400;
static var MAX_BONUS_LEVEL4 = 7000;
static var MAX_BONUS_LEVEL5 = 8800;
static var MAX_BONUS_LEVEL6 = 8700;
static var MAX_BONUS_LEVEL7 = 11400;
static var MUS_PACK_VOLUME = 130;
static var MUS_GAME_VOLUME = 80;
static var AFRAID_VOLUME = 100;
static var AMBIENCE_VOLUME = 80;
static var BTN_CLICK_VOLUME = 80;
static var CLIMB1_VOLUME = 100;
static var CLIMB2_VOLUME = 100;
static var CLIMB3_VOLUME = 100;
static var DO_FEAR1_VOLUME = 100;
static var DO_FEAR2_VOLUME = 100;
static var FIRE_APPEAR_VOLUME = 60;
static var FIRE_DISAPPEAR_VOLUME = 60;
static var GET_KEY_VOLUME = 120;
static var GET_TOKEN_VOLUME = 80;
static var GRAPPLE_VOLUME = 100;
static var LAND1_VOLUME = 90;
static var LAND2_VOLUME = 90;
static var LAND3_VOLUME = 90;
static var SABRE_VOLUME = 100;
static var SOUL_APPEAR_VOLUME = 50;
static var SOUL_DISAPPEAR_VOLUME = 60;
static var TRANSIT_VOLUME = 80;
static var UNLOCK_CELL_VOLUME = 60;
}
Symbol 1249 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Timer] Frame 0
class com.disney.gem.games.Pirates.game_obj.Timer
{
var mcRef, sName, oOwner, nNbFrInSecond, nNbFrPass, nNbSeconds, nNbMinutes, oController;
function Timer (_mcRef, _sName, _oOwner) {
mcRef = _mcRef;
sName = _sName;
oOwner = _oOwner;
nNbFrInSecond = 30;
nNbFrPass = 0;
nNbSeconds = 0;
nNbMinutes = 0;
oController = com.disney.gem.games.Pirates.Controller.getInstance();
oController.oMainBroadcaster.addListener(this);
showTime();
}
function onUpdate() {
if ((nNbMinutes < 99) and (nNbSeconds < 99)) {
nNbFrPass++;
if (nNbFrPass >= nNbFrInSecond) {
nNbFrPass = 0;
nNbSeconds++;
oController.reduceTimeBonus();
if (nNbSeconds >= 60) {
nNbSeconds = 0;
nNbMinutes++;
}
}
showTime();
}
}
function showTime() {
if (nNbSeconds < 10) {
mcRef.txtSeconds = "0" + nNbSeconds;
} else {
mcRef.txtSeconds = nNbSeconds;
}
if (nNbMinutes < 10) {
mcRef.txtMinutes = "0" + nNbMinutes;
} else {
mcRef.txtMinutes = nNbMinutes;
}
}
function deleteObject() {
oController.oMainBroadcaster.removeListener(this);
delete oOwner[sName];
}
}
Symbol 1250 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Buttons] Frame 0
class com.disney.gem.games.Pirates.game_obj.Buttons
{
static var oClickCatchers, oClickSound, oRollSound;
function Buttons () {
}
static function patch(_oBtnRef) {
if (oClickCatchers == undefined) {
oClickCatchers = {};
}
var _local2 = com.sarbakan.utils.Delegate.create(com.disney.gem.games.Pirates.game_obj.Buttons, triggerEvent, _oBtnRef, "Release");
var _local4 = com.sarbakan.utils.Delegate.create(com.disney.gem.games.Pirates.game_obj.Buttons, triggerEvent, _oBtnRef, "RollOver");
var _local3 = com.sarbakan.utils.Delegate.create(com.disney.gem.games.Pirates.game_obj.Buttons, triggerEvent, _oBtnRef, "RollOut");
if (oClickCatchers[_oBtnRef] == undefined) {
oClickCatchers[_oBtnRef] = {mc:_oBtnRef, fOnRelease:undefined, bReleaseTriggered:false, fOnRollOver:undefined, bRollOverTriggered:false, fOnRollOut:undefined, bRollOutTriggered:false};
}
if (_oBtnRef.onRelease != _local2) {
oClickCatchers[_oBtnRef].fOnRelease = _oBtnRef.onPress;
_oBtnRef.onPress = _local2;
}
if (_oBtnRef.onRollOver != _local4) {
}
if (_oBtnRef.onRollOut != _local3) {
oClickCatchers[_oBtnRef].fOnRollOut = _oBtnRef.onRollOut;
_oBtnRef.onRollOut = _local3;
}
clearUnexistingButtons();
}
static function showAllCatchers() {
var _local1 = "";
var _local2 = 0;
for (var _local3 in oClickCatchers) {
_local2++;
_local1 = _local1 + "\t- catcher : ";
if (_local3.length > 40) {
_local1 = _local1 + ("_root[...]" + _local3.substr(_local3.length - 38, 38));
} else {
_local1 = _local1 + _local3;
}
_local1 = _local1 + ((" OnStage ? : " + ((oClickCatchers[_local3].mc._x != undefined) && (oClickCatchers[_local3].mc._y != undefined))) + newline);
}
_local1 = (("Click catchers amount : " + _local2) + "\n\r") + _local1;
}
static function triggerEvent(_sButtonId, _sEvent) {
if (oClickCatchers[_sButtonId][("b" + _sEvent) + "Triggered"] == false) {
oClickCatchers[_sButtonId][("b" + _sEvent) + "Triggered"] = true;
oClickCatchers[_sButtonId]["fOn" + _sEvent]();
onEvent(_sEvent);
oClickCatchers[_sButtonId][("b" + _sEvent) + "Triggered"] = false;
}
}
static function onEvent(_sEvent) {
switch (_sEvent) {
case "Release" :
if (oClickSound != undefined) {
oClickSound.doStop();
}
oClickSound = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "BtnClick", com.disney.gem.games.Pirates.GameData.BTN_CLICK_VOLUME, 0, false);
break;
case "RollOver" :
if (oRollSound != undefined) {
oRollSound.doStop();
}
break;
case "RollOut" :
}
}
static function clearUnexistingButtons() {
if (oClickCatchers != undefined) {
var _local1 = new Array();
for (var _local2 in oClickCatchers) {
if ((oClickCatchers[_local2].mc._x == undefined) && (oClickCatchers[_local2].mc._y == undefined)) {
_local1.push(_local2);
}
}
for (var _local2 in _local1) {
oClickCatchers[_local1[_local2]] = {};
delete oClickCatchers[_local1[_local2]];
}
}
}
static function doDestroy() {
oClickCatchers = {};
delete oClickCatchers;
}
}
Symbol 1251 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.PartsData] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.PartsData
{
function PartsData () {
}
static function giveLevel1Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level1Part1Data.oPartData);
}
static function giveLevel2Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level2Part1Data.oPartData);
}
static function giveLevel2Part2Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level2Part2Data.oPartData);
}
static function giveLevel3Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level3Part1Data.oPartData);
}
static function giveLevel3Part2Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level3Part2Data.oPartData);
}
static function giveLevel4Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level4Part1Data.oPartData);
}
static function giveLevel4Part2Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level4Part2Data.oPartData);
}
static function giveLevel5Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part1Data.oPartData);
}
static function giveLevel5Part2Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part2Data.oPartData);
}
static function giveLevel5Part3Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part3Data.oPartData);
}
static function giveLevel6Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part1Data.oPartData);
}
static function giveLevel6Part2Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part2Data.oPartData);
}
static function giveLevel6Part3Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part3Data.oPartData);
}
static function giveLevel7Part1Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part1Data.oPartData);
}
static function giveLevel7Part2Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part2Data.oPartData);
}
static function giveLevel7Part3Data() {
return(com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part3Data.oPartData);
}
static var nNbPartsLevel1 = 1;
static var nNbPartsLevel2 = 2;
static var nNbPartsLevel3 = 2;
static var nNbPartsLevel4 = 2;
static var nNbPartsLevel5 = 3;
static var nNbPartsLevel6 = 3;
static var nNbPartsLevel7 = 3;
}
Symbol 1252 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level1Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level1Part1Data
{
function Level1Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"UpLeftBlocker", nAttachDepth:10, nPosX:391, nPosY:167.9, nScaleX:303, nScaleY:82.6, bGroundCollider:false}, oItem2:{sIdentity:"oItem2", sItemType:"UpLeftBlocker", nAttachDepth:11, nPosX:241.1, nPosY:209.1, nScaleX:557.6, nScaleY:75, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:69.8, nPosY:279.5, nScaleX:140.6, nScaleY:243.4, bGroundCollider:false}, oItem4:{sIdentity:"oItem4", sItemType:"AllSideBlocker", nAttachDepth:13, nPosX:142.2, nPosY:339.5, nScaleX:113.7, nScaleY:92.3, bGroundCollider:false}, oItem5:{sIdentity:"oItem5", sItemType:"AllSideBlocker", nAttachDepth:14, nPosX:202.3, nPosY:377.5, nScaleX:502.8, nScaleY:97.2, bGroundCollider:false}, oItem6:{sIdentity:"oItem6", sItemType:"AllSideBlocker", nAttachDepth:15, nPosX:-11.5, nPosY:-39.6, nScaleX:39.6, nScaleY:560.9, bGroundCollider:false}, oItem7:{sIdentity:"oItem7", sItemType:"AllSideBlocker", nAttachDepth:16, nPosX:565.3, nPosY:-41.2, nScaleX:41.9, nScaleY:611.1, bGroundCollider:false}, oItem8:{sIdentity:"oItem8", sItemType:"AllSideBlocker", nAttachDepth:17, nPosX:-11.5, nPosY:290.3, nScaleX:39.6, nScaleY:493.1, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"AllSideBlocker", nAttachDepth:18, nPosX:75.8, nPosY:405.5, nScaleX:34.3, nScaleY:302, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"AllSideBlocker", nAttachDepth:19, nPosX:474.3, nPosY:398.5, nScaleX:39.8, nScaleY:313.8, bGroundCollider:false}, oItem11:{sIdentity:"oItem11", sItemType:"AllSideBlocker", nAttachDepth:20, nPosX:565.3, nPosY:308.7, nScaleX:41.9, nScaleY:463.3, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"KillingGround", nAttachDepth:21, nPosX:-4.4, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem13:{sIdentity:"oItem13", sItemType:"KillingGround", nAttachDepth:22, nPosX:489.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"RightClimbingPlate", nAttachDepth:23, nPosX:241.1, nPosY:209, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"RightClimbingPlate", nAttachDepth:24, nPosX:69.8, nPosY:279.4, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"LeftClimbingPlate", nAttachDepth:25, nPosX:503.9, nPosY:377.4, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"LeftClimbingPlate", nAttachDepth:26, nPosX:154, nPosY:279.4, nScaleX:100, nScaleY:61.9, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"RightDangerZone", nAttachDepth:27, nPosX:142, nPosY:268.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"LeftDangerZone", nAttachDepth:28, nPosX:58.3, nPosY:268.2, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"LeftDangerZone", nAttachDepth:29, nPosX:229.7, nPosY:197.9, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"LeftDangerZone", nAttachDepth:30, nPosX:379.7, nPosY:156.4, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"RightDangerZone", nAttachDepth:31, nPosX:198, nPosY:328.2, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"RightDangerZone", nAttachDepth:32, nPosX:492.1, nPosY:365.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"SoulType1", nAttachDepth:33, nPosX:341.2, nPosY:207, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem25:{sIdentity:"oItem25", sItemType:"Fire", nAttachDepth:34, nPosX:294, nPosY:378, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem26:{sIdentity:"oItem26", sItemType:"Fire", nAttachDepth:35, nPosX:409, nPosY:378, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle2"}, oItem27:{sIdentity:"oItem27", sItemType:"YellowDoor", nAttachDepth:36, nPosX:477, nPosY:324.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem28:{sIdentity:"oItem28", sItemType:"YellowCellKey", nAttachDepth:37, nPosX:520.9, nPosY:115.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem29:{sIdentity:"oItem29", sItemType:"Token", nAttachDepth:38, nPosX:351.1, nPosY:337.1, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"Player", nAttachDepth:39, nPosX:134.3, nPosY:279.3, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1253 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level2Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level2Part1Data
{
function Level2Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"AllSideBlocker", nAttachDepth:10, nPosX:-1.6, nPosY:-28.9, nScaleX:42.2, nScaleY:585.7, bGroundCollider:false}, oItem4:{sIdentity:"oItem4", sItemType:"UpLeftBlocker", nAttachDepth:13, nPosX:535.3, nPosY:249.1, nScaleX:411.8, nScaleY:41.6, bGroundCollider:false}, oItem5:{sIdentity:"oItem5", sItemType:"AllSideBlocker", nAttachDepth:14, nPosX:182.8, nPosY:328.9, nScaleX:429.3, nScaleY:142.5, bGroundCollider:false}, oItem6:{sIdentity:"oItem6", sItemType:"AllSideBlocker", nAttachDepth:15, nPosX:436, nPosY:395.7, nScaleX:446.8, nScaleY:201.4, bGroundCollider:false}, oItem7:{sIdentity:"oItem7", sItemType:"AllSideBlocker", nAttachDepth:16, nPosX:86.8, nPosY:182.6, nScaleX:181.6, nScaleY:426.7, bGroundCollider:false}, oItem8:{sIdentity:"oItem8", sItemType:"UpRightBlocker", nAttachDepth:17, nPosX:186.8, nPosY:182.6, nScaleX:422.8, nScaleY:46.5, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"AllSideBlocker", nAttachDepth:21, nPosX:-5.6, nPosY:311, nScaleX:42.2, nScaleY:458.9, bGroundCollider:false}, oItem13:{sIdentity:"oItem13", sItemType:"AllSideBlocker", nAttachDepth:22, nPosX:90.8, nPosY:412.6, nScaleX:41.6, nScaleY:289.9, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"KillingGround", nAttachDepth:25, nPosX:9.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"RightClimbingPlate", nAttachDepth:28, nPosX:535.3, nPosY:249, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"LeftClimbingPlate", nAttachDepth:29, nPosX:440.5, nPosY:182.5, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"RightClimbingPlate", nAttachDepth:30, nPosX:86.8, nPosY:182.5, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"LeftClimbingPlate", nAttachDepth:31, nPosX:440.3, nPosY:328.8, nScaleX:99.9, nScaleY:68.2, bGroundCollider:false}, oItem27:{sIdentity:"oItem27", sItemType:"RightDangerZone", nAttachDepth:36, nPosX:427.3, nPosY:171.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem28:{sIdentity:"oItem28", sItemType:"LeftDangerZone", nAttachDepth:37, nPosX:75.4, nPosY:171.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem29:{sIdentity:"oItem29", sItemType:"RightDangerZone", nAttachDepth:38, nPosX:427.9, nPosY:317, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem33:{sIdentity:"oItem33", sItemType:"LeftDangerZone", nAttachDepth:42, nPosX:523.8, nPosY:237.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem35:{sIdentity:"oItem35", sItemType:"Fire", nAttachDepth:44, nPosX:301, nPosY:329.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle4"}, oItem37:{sIdentity:"oItem37", sItemType:"Fire", nAttachDepth:46, nPosX:163.9, nPosY:183.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem40:{sIdentity:"oItem40", sItemType:"RedDoor", nAttachDepth:49, nPosX:225.1, nPosY:275.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem43:{sIdentity:"oItem43", sItemType:"YellowCellKey", nAttachDepth:52, nPosX:252.4, nPosY:126.9, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem45:{sIdentity:"oItem45", sItemType:"Token", nAttachDepth:54, nPosX:110.7, nPosY:122.7, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem46:{sIdentity:"oItem46", sItemType:"Player", nAttachDepth:55, nPosX:387.3, nPosY:327.7, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1254 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level2Part2Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level2Part2Data
{
function Level2Part2Data () {
}
static var oPartData = {oItem2:{sIdentity:"oItem2", sItemType:"AllSideBlocker", nAttachDepth:11, nPosX:999.3, nPosY:251.8, nScaleX:136.8, nScaleY:311.4, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:787.7, nPosY:323.3, nScaleX:367.3, nScaleY:35.6, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"AllSideBlocker", nAttachDepth:18, nPosX:1142.4, nPosY:-36, nScaleX:35.8, nScaleY:543.8, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"AllSideBlocker", nAttachDepth:19, nPosX:773.2, nPosY:249.1, nScaleX:37.6, nScaleY:562.8, bGroundCollider:false}, oItem11:{sIdentity:"oItem11", sItemType:"AllSideBlocker", nAttachDepth:20, nPosX:1142.4, nPosY:274, nScaleX:35.8, nScaleY:521.2, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"AllSideBlocker", nAttachDepth:23, nPosX:675, nPosY:425.7, nScaleX:39, nScaleY:268.3, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"AllSideBlocker", nAttachDepth:24, nPosX:1039.3, nPosY:421.8, nScaleX:63.4, nScaleY:275.1, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"KillingGround", nAttachDepth:26, nPosX:693.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"KillingGround", nAttachDepth:27, nPosX:1064.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"LeftClimbingPlate", nAttachDepth:32, nPosX:704, nPosY:395.6, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"LeftClimbingPlate", nAttachDepth:33, nPosX:795.8, nPosY:249, nScaleX:99.9, nScaleY:75.9, bGroundCollider:false}, oItem25:{sIdentity:"oItem25", sItemType:"RightClimbingPlate", nAttachDepth:34, nPosX:999.3, nPosY:251.7, nScaleX:99.9, nScaleY:73.3, bGroundCollider:false}, oItem26:{sIdentity:"oItem26", sItemType:"LeftClimbingPlate", nAttachDepth:35, nPosX:1081.3, nPosY:251.7, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"RightDangerZone", nAttachDepth:39, nPosX:691.4, nPosY:384.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem31:{sIdentity:"oItem31", sItemType:"RightDangerZone", nAttachDepth:40, nPosX:783.2, nPosY:238.2, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem32:{sIdentity:"oItem32", sItemType:"RightDangerZone", nAttachDepth:41, nPosX:1069.1, nPosY:240.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem34:{sIdentity:"oItem34", sItemType:"LeftDangerZone", nAttachDepth:43, nPosX:987.9, nPosY:240.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem36:{sIdentity:"oItem36", sItemType:"Fire", nAttachDepth:45, nPosX:695.8, nPosY:249.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem38:{sIdentity:"oItem38", sItemType:"SoulType1", nAttachDepth:47, nPosX:905.7, nPosY:320.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle7"}, oItem39:{sIdentity:"oItem39", sItemType:"SoulType2", nAttachDepth:48, nPosX:609.8, nPosY:395.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle6"}, oItem41:{sIdentity:"oItem41", sItemType:"YellowDoor", nAttachDepth:50, nPosX:1045.2, nPosY:200.5, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem42:{sIdentity:"oItem42", sItemType:"RedCellKey", nAttachDepth:51, nPosX:759.1, nPosY:174.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem44:{sIdentity:"oItem44", sItemType:"Token", nAttachDepth:53, nPosX:684.3, nPosY:338.8, nScaleX:100, nScaleY:100, bGroundCollider:false}};
}
Symbol 1255 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level3Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level3Part1Data
{
function Level3Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"UpLeftBlocker", nAttachDepth:10, nPosX:84.2, nPosY:180.8, nScaleX:290.5, nScaleY:151.4, bGroundCollider:false}, oItem2:{sIdentity:"oItem2", sItemType:"AllSideBlocker", nAttachDepth:11, nPosX:84.3, nPosY:393.1, nScaleX:628.6, nScaleY:70.8, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:455, nPosY:393.1, nScaleX:723.4, nScaleY:71.2, bGroundCollider:false}, oItem8:{sIdentity:"oItem8", sItemType:"AllSideBlocker", nAttachDepth:17, nPosX:-11, nPosY:-32.4, nScaleX:51.8, nScaleY:433.5, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"AllSideBlocker", nAttachDepth:18, nPosX:-11, nPosY:227.5, nScaleX:51.8, nScaleY:598.3, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"UpRightBlocker", nAttachDepth:19, nPosX:252.2, nPosY:180.8, nScaleX:268.7, nScaleY:90.2, bGroundCollider:false}, oItem11:{sIdentity:"oItem11", sItemType:"UpRightBlocker", nAttachDepth:20, nPosX:408.4, nPosY:224, nScaleX:502.2, nScaleY:79.4, bGroundCollider:false}, oItem13:{sIdentity:"oItem13", sItemType:"AllSideBlocker", nAttachDepth:22, nPosX:87.3, nPosY:423.1, nScaleX:41.9, nScaleY:272.7, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"KillingGround", nAttachDepth:24, nPosX:6.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"RightClimbingPlate", nAttachDepth:28, nPosX:84.2, nPosY:180.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"RightClimbingPlate", nAttachDepth:29, nPosX:84.3, nPosY:393, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"RightDangerZone", nAttachDepth:32, nPosX:400.4, nPosY:170.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"LeftDangerZone", nAttachDepth:33, nPosX:73.1, nPosY:170.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem25:{sIdentity:"oItem25", sItemType:"LeftDangerZone", nAttachDepth:34, nPosX:72.7, nPosY:382.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem32:{sIdentity:"oItem32", sItemType:"Fire", nAttachDepth:41, nPosX:236.3, nPosY:393.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle4"}, oItem35:{sIdentity:"oItem35", sItemType:"Fire", nAttachDepth:44, nPosX:394.8, nPosY:393.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle5"}, oItem37:{sIdentity:"oItem37", sItemType:"Fire", nAttachDepth:46, nPosX:184.3, nPosY:180.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem38:{sIdentity:"oItem38", sItemType:"RedDoor", nAttachDepth:47, nPosX:131.7, nPosY:341.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem40:{sIdentity:"oItem40", sItemType:"BlueDoor", nAttachDepth:49, nPosX:499.8, nPosY:341.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem42:{sIdentity:"oItem42", sItemType:"YellowCellKey", nAttachDepth:51, nPosX:357.1, nPosY:116.8, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem43:{sIdentity:"oItem43", sItemType:"BlueCellKey", nAttachDepth:52, nPosX:322.1, nPosY:323, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem44:{sIdentity:"oItem44", sItemType:"Token", nAttachDepth:53, nPosX:127.5, nPosY:121.7, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem45:{sIdentity:"oItem45", sItemType:"Player", nAttachDepth:54, nPosX:554.6, nPosY:223.9, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1256 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level3Part2Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level3Part2Data
{
function Level3Part2Data () {
}
static var oPartData = {oItem4:{sIdentity:"oItem4", sItemType:"AllSideBlocker", nAttachDepth:13, nPosX:872.1, nPosY:325.3, nScaleX:297.1, nScaleY:183.8, bGroundCollider:false}, oItem5:{sIdentity:"oItem5", sItemType:"AllSideBlocker", nAttachDepth:14, nPosX:1096.3, nPosY:-26.3, nScaleX:45.6, nScaleY:328.9, bGroundCollider:false}, oItem6:{sIdentity:"oItem6", sItemType:"AllSideBlocker", nAttachDepth:15, nPosX:1123.6, nPosY:182.1, nScaleX:51, nScaleY:667.3, bGroundCollider:false}, oItem7:{sIdentity:"oItem7", sItemType:"UpLeftBlocker", nAttachDepth:16, nPosX:872.3, nPosY:164.2, nScaleX:445.8, nScaleY:45, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"UpRightBlocker", nAttachDepth:21, nPosX:702.5, nPosY:253.1, nScaleX:174, nScaleY:31, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"AllSideBlocker", nAttachDepth:23, nPosX:1024.1, nPosY:335.3, nScaleX:35.6, nScaleY:428.8, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"KillingGround", nAttachDepth:25, nPosX:1040.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"RightClimbingPlate", nAttachDepth:26, nPosX:872.3, nPosY:164.2, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"LeftClimbingPlate", nAttachDepth:27, nPosX:806.8, nPosY:253, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"RightClimbingPlate", nAttachDepth:30, nPosX:872.1, nPosY:325.2, nScaleX:99.9, nScaleY:69.6, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"LeftClimbingPlate", nAttachDepth:31, nPosX:1050.3, nPosY:325.2, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem26:{sIdentity:"oItem26", sItemType:"RightDangerZone", nAttachDepth:35, nPosX:696.1, nPosY:213.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem27:{sIdentity:"oItem27", sItemType:"RightDangerZone", nAttachDepth:36, nPosX:794.2, nPosY:242.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem28:{sIdentity:"oItem28", sItemType:"LeftDangerZone", nAttachDepth:37, nPosX:860.5, nPosY:314.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem29:{sIdentity:"oItem29", sItemType:"RightDangerZone", nAttachDepth:38, nPosX:1038, nPosY:314.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"LeftDangerZone", nAttachDepth:39, nPosX:861.2, nPosY:152.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem31:{sIdentity:"oItem31", sItemType:"SoulType1", nAttachDepth:40, nPosX:654.1, nPosY:220.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle2"}, oItem33:{sIdentity:"oItem33", sItemType:"SoulType1", nAttachDepth:42, nPosX:918.7, nPosY:322.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle7"}, oItem34:{sIdentity:"oItem34", sItemType:"SoulType2", nAttachDepth:43, nPosX:639.8, nPosY:392.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle6"}, oItem36:{sIdentity:"oItem36", sItemType:"Fire", nAttachDepth:45, nPosX:910.1, nPosY:164.8, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem39:{sIdentity:"oItem39", sItemType:"YellowDoor", nAttachDepth:48, nPosX:1003.6, nPosY:273.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem41:{sIdentity:"oItem41", sItemType:"RedCellKey", nAttachDepth:50, nPosX:1003.1, nPosY:90.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}};
}
Symbol 1257 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level4Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level4Part1Data
{
function Level4Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"AllSideBlocker", nAttachDepth:10, nPosX:-11, nPosY:-19.5, nScaleX:48.2, nScaleY:517.1, bGroundCollider:false}, oItem2:{sIdentity:"oItem2", sItemType:"AllSideBlocker", nAttachDepth:11, nPosX:75.7, nPosY:274.7, nScaleX:294.1, nScaleY:281.3, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:245.8, nPosY:320.9, nScaleX:87, nScaleY:204.5, bGroundCollider:false}, oItem4:{sIdentity:"oItem4", sItemType:"AllSideBlocker", nAttachDepth:13, nPosX:287.8, nPosY:360.8, nScaleX:670.4, nScaleY:137.9, bGroundCollider:false}, oItem6:{sIdentity:"oItem6", sItemType:"UpLeftBlocker", nAttachDepth:15, nPosX:389, nPosY:202.7, nScaleX:275.7, nScaleY:46.7, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"AllSideBlocker", nAttachDepth:23, nPosX:-11, nPosY:270.5, nScaleX:48.2, nScaleY:526.7, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"AllSideBlocker", nAttachDepth:24, nPosX:79.7, nPosY:434.7, nScaleX:34.3, nScaleY:253.2, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"UpRightBlocker", nAttachDepth:25, nPosX:547, nPosY:202.7, nScaleX:226.6, nScaleY:46.7, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"KillingGround", nAttachDepth:26, nPosX:-0.4, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"RightClimbingPlate", nAttachDepth:28, nPosX:389.1, nPosY:202.6, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"RightClimbingPlate", nAttachDepth:32, nPosX:75.7, nPosY:274.6, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem26:{sIdentity:"oItem26", sItemType:"RightDangerZone", nAttachDepth:35, nPosX:240.1, nPosY:263.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem27:{sIdentity:"oItem27", sItemType:"LeftDangerZone", nAttachDepth:36, nPosX:64.3, nPosY:263.6, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem28:{sIdentity:"oItem28", sItemType:"RightDangerZone", nAttachDepth:37, nPosX:285.8, nPosY:309.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem29:{sIdentity:"oItem29", sItemType:"LeftDangerZone", nAttachDepth:38, nPosX:377.9, nPosY:191.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem35:{sIdentity:"oItem35", sItemType:"SoulType1", nAttachDepth:44, nPosX:533.4, nPosY:200, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem37:{sIdentity:"oItem37", sItemType:"Fire", nAttachDepth:46, nPosX:454.5, nPosY:361.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem38:{sIdentity:"oItem38", sItemType:"Fire", nAttachDepth:47, nPosX:595.3, nPosY:361.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle4"}, oItem42:{sIdentity:"oItem42", sItemType:"GreenCellKey", nAttachDepth:51, nPosX:435.8, nPosY:152.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}, oItem45:{sIdentity:"oItem45", sItemType:"BlueDoor", nAttachDepth:54, nPosX:111.8, nPosY:223.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem47:{sIdentity:"oItem47", sItemType:"Token", nAttachDepth:56, nPosX:527.3, nPosY:300.4, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem48:{sIdentity:"oItem48", sItemType:"Player", nAttachDepth:57, nPosX:592, nPosY:200.8, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1258 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level4Part2Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level4Part2Data
{
function Level4Part2Data () {
}
static var oPartData = {oItem5:{sIdentity:"oItem5", sItemType:"AllSideBlocker", nAttachDepth:14, nPosX:682.6, nPosY:417.5, nScaleX:642.5, nScaleY:43.5, bGroundCollider:false}, oItem7:{sIdentity:"oItem7", sItemType:"UpLeftBlocker", nAttachDepth:16, nPosX:749.2, nPosY:132.4, nScaleX:435.9, nScaleY:32.6, bGroundCollider:false}, oItem8:{sIdentity:"oItem8", sItemType:"AllSideBlocker", nAttachDepth:17, nPosX:991.2, nPosY:132.4, nScaleX:118.1, nScaleY:249, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"AllSideBlocker", nAttachDepth:18, nPosX:1057.2, nPosY:132.4, nScaleX:34.8, nScaleY:517.2, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"UpLeftBlocker", nAttachDepth:19, nPosX:749.2, nPosY:271.4, nScaleX:531.5, nScaleY:32.6, bGroundCollider:false}, oItem11:{sIdentity:"oItem11", sItemType:"AllSideBlocker", nAttachDepth:20, nPosX:1150.6, nPosY:-18.9, nScaleX:27.8, nScaleY:516, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"AllSideBlocker", nAttachDepth:21, nPosX:1152.6, nPosY:289.1, nScaleX:27.8, nScaleY:492.5, bGroundCollider:false}, oItem13:{sIdentity:"oItem13", sItemType:"AllSideBlocker", nAttachDepth:22, nPosX:1053.2, nPosY:422.4, nScaleX:34.8, nScaleY:273.9, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"KillingGround", nAttachDepth:27, nPosX:1069.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"LeftClimbingPlate", nAttachDepth:29, nPosX:682.5, nPosY:202.6, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"RightClimbingPlate", nAttachDepth:30, nPosX:749.2, nPosY:132.3, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"RightClimbingPlate", nAttachDepth:31, nPosX:749.2, nPosY:271.3, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"LeftClimbingPlate", nAttachDepth:33, nPosX:689.9, nPosY:360.7, nScaleX:99.9, nScaleY:56.8, bGroundCollider:false}, oItem25:{sIdentity:"oItem25", sItemType:"LeftClimbingPlate", nAttachDepth:34, nPosX:1078, nPosY:132.3, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"RightDangerZone", nAttachDepth:39, nPosX:670.4, nPosY:192.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem31:{sIdentity:"oItem31", sItemType:"RightDangerZone", nAttachDepth:40, nPosX:677.8, nPosY:349.6, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem32:{sIdentity:"oItem32", sItemType:"LeftDangerZone", nAttachDepth:41, nPosX:737.5, nPosY:260, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem33:{sIdentity:"oItem33", sItemType:"LeftDangerZone", nAttachDepth:42, nPosX:737.5, nPosY:121, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem34:{sIdentity:"oItem34", sItemType:"RightDangerZone", nAttachDepth:43, nPosX:1066.1, nPosY:121.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem36:{sIdentity:"oItem36", sItemType:"SoulType2", nAttachDepth:45, nPosX:846.2, nPosY:418.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle5"}, oItem39:{sIdentity:"oItem39", sItemType:"SoulType1", nAttachDepth:48, nPosX:934.6, nPosY:132.5, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle2"}, oItem40:{sIdentity:"oItem40", sItemType:"YellowCellKey", nAttachDepth:49, nPosX:978.4, nPosY:349.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem41:{sIdentity:"oItem41", sItemType:"BlueCellKey", nAttachDepth:50, nPosX:816, nPosY:83.3, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem43:{sIdentity:"oItem43", sItemType:"YellowDoor", nAttachDepth:52, nPosX:1035.9, nPosY:81.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem44:{sIdentity:"oItem44", sItemType:"RedDoor", nAttachDepth:53, nPosX:943.1, nPosY:219.9, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem46:{sIdentity:"oItem46", sItemType:"GreenDoor", nAttachDepth:55, nPosX:645.1, nPosY:151.8, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}};
}
Symbol 1259 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part1Data
{
function Level5Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"AllSideBlocker", nAttachDepth:10, nPosX:-1.9, nPosY:-16.2, nScaleX:41.5, nScaleY:502.9, bGroundCollider:false}, oItem2:{sIdentity:"oItem2", sItemType:"UpLeftBlocker", nAttachDepth:11, nPosX:303.7, nPosY:184.2, nScaleX:118.8, nScaleY:57.3, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:122.5, nPosY:358.9, nScaleX:554, nScaleY:36.3, bGroundCollider:false}, oItem4:{sIdentity:"oItem4", sItemType:"AllSideBlocker", nAttachDepth:13, nPosX:439.4, nPosY:314, nScaleX:108.1, nScaleY:97.6, bGroundCollider:false}, oItem5:{sIdentity:"oItem5", sItemType:"AllSideBlocker", nAttachDepth:14, nPosX:493.1, nPosY:257.9, nScaleX:693.8, nScaleY:105.1, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"AllSideBlocker", nAttachDepth:18, nPosX:-3.9, nPosY:274.8, nScaleX:41.5, nScaleY:519.1, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"UpRightBlocker", nAttachDepth:19, nPosX:96.5, nPosY:184.4, nScaleX:221.5, nScaleY:55.3, bGroundCollider:false}, oItem11:{sIdentity:"oItem11", sItemType:"AllSideBlocker", nAttachDepth:20, nPosX:96.5, nPosY:184.4, nScaleX:56.4, nScaleY:416.6, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"AllSideBlocker", nAttachDepth:25, nPosX:100.5, nPosY:418.4, nScaleX:56.4, nScaleY:280.6, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"UpRightBlocker", nAttachDepth:27, nPosX:357.2, nPosY:184.2, nScaleX:118.8, nScaleY:57.3, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"KillingGround", nAttachDepth:28, nPosX:17.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"RightClimbingPlate", nAttachDepth:30, nPosX:303.7, nPosY:184.1, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"LeftClimbingPlate", nAttachDepth:31, nPosX:229.3, nPosY:184.3, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"RightClimbingPlate", nAttachDepth:32, nPosX:96.5, nPosY:184.3, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"LeftClimbingPlate", nAttachDepth:33, nPosX:428.4, nPosY:184.1, nScaleX:99.9, nScaleY:57.4, bGroundCollider:false}, oItem25:{sIdentity:"oItem25", sItemType:"RightClimbingPlate", nAttachDepth:34, nPosX:493.1, nPosY:257.8, nScaleX:99.9, nScaleY:57.3, bGroundCollider:false}, oItem27:{sIdentity:"oItem27", sItemType:"RightDangerZone", nAttachDepth:36, nPosX:216.8, nPosY:173.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem28:{sIdentity:"oItem28", sItemType:"LeftDangerZone", nAttachDepth:37, nPosX:85, nPosY:173, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem29:{sIdentity:"oItem29", sItemType:"LeftDangerZone", nAttachDepth:38, nPosX:292.2, nPosY:172.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"LeftDangerZone", nAttachDepth:39, nPosX:428, nPosY:302.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem31:{sIdentity:"oItem31", sItemType:"LeftDangerZone", nAttachDepth:40, nPosX:481.7, nPosY:246.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem32:{sIdentity:"oItem32", sItemType:"RightDangerZone", nAttachDepth:41, nPosX:415.9, nPosY:173, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem37:{sIdentity:"oItem37", sItemType:"SoulType1", nAttachDepth:46, nPosX:265.7, nPosY:357.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle2"}, oItem38:{sIdentity:"oItem38", sItemType:"Fire", nAttachDepth:47, nPosX:208.5, nPosY:184.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem44:{sIdentity:"oItem44", sItemType:"Fire", nAttachDepth:53, nPosX:398.5, nPosY:184.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle8"}, oItem45:{sIdentity:"oItem45", sItemType:"RedDoor", nAttachDepth:54, nPosX:126.1, nPosY:132.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem46:{sIdentity:"oItem46", sItemType:"BlueDoor", nAttachDepth:55, nPosX:332.1, nPosY:132.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem47:{sIdentity:"oItem47", sItemType:"YellowDoor", nAttachDepth:56, nPosX:189.9, nPosY:307.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem50:{sIdentity:"oItem50", sItemType:"PinkCellKey", nAttachDepth:59, nPosX:330.1, nPosY:303.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Pink"}, oItem53:{sIdentity:"oItem53", sItemType:"Player", nAttachDepth:62, nPosX:541.3, nPosY:256.6, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1260 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part2Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part2Data
{
function Level5Part2Data () {
}
static var oPartData = {oItem6:{sIdentity:"oItem6", sItemType:"AllSideBlocker", nAttachDepth:15, nPosX:902.6, nPosY:257.9, nScaleX:588.5, nScaleY:97.6, bGroundCollider:false}, oItem39:{sIdentity:"oItem39", sItemType:"Fire", nAttachDepth:48, nPosX:859, nPosY:257.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem40:{sIdentity:"oItem40", sItemType:"Fire", nAttachDepth:49, nPosX:989, nPosY:257.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle4"}, oItem43:{sIdentity:"oItem43", sItemType:"SoulType1", nAttachDepth:52, nPosX:670.1, nPosY:255.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle9"}, oItem48:{sIdentity:"oItem48", sItemType:"GreenDoor", nAttachDepth:57, nPosX:1137.9, nPosY:205.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}, oItem52:{sIdentity:"oItem52", sItemType:"Token", nAttachDepth:61, nPosX:924.1, nPosY:205.4, nScaleX:100, nScaleY:100, bGroundCollider:false}};
}
Symbol 1261 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part3Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level5Part3Data
{
function Level5Part3Data () {
}
static var oPartData = {oItem7:{sIdentity:"oItem7", sItemType:"AllSideBlocker", nAttachDepth:16, nPosX:1245, nPosY:309.2, nScaleX:107.4, nScaleY:97.6, bGroundCollider:false}, oItem8:{sIdentity:"oItem8", sItemType:"AllSideBlocker", nAttachDepth:17, nPosX:1301.4, nPosY:353.4, nScaleX:586.8, nScaleY:135.6, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"AllSideBlocker", nAttachDepth:21, nPosX:1619.1, nPosY:-27.6, nScaleX:221.8, nScaleY:371.4, bGroundCollider:false}, oItem13:{sIdentity:"oItem13", sItemType:"UpLeftBlocker", nAttachDepth:22, nPosX:1334.1, nPosY:176.4, nScaleX:665.3, nScaleY:46.7, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"AllSideBlocker", nAttachDepth:23, nPosX:1724.1, nPosY:192.4, nScaleX:46.9, nScaleY:656.8, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"RightClimbingPlate", nAttachDepth:24, nPosX:1334.1, nPosY:176.3, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"AllSideBlocker", nAttachDepth:26, nPosX:1625.4, nPosY:356.4, nScaleX:39.1, nScaleY:388.9, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"KillingGround", nAttachDepth:29, nPosX:1643.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem26:{sIdentity:"oItem26", sItemType:"LeftClimbingPlate", nAttachDepth:35, nPosX:1653.4, nPosY:353.3, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem33:{sIdentity:"oItem33", sItemType:"RightDangerZone", nAttachDepth:42, nPosX:1243.5, nPosY:246.6, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem34:{sIdentity:"oItem34", sItemType:"RightDangerZone", nAttachDepth:43, nPosX:1297.2, nPosY:297.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem35:{sIdentity:"oItem35", sItemType:"RightDangerZone", nAttachDepth:44, nPosX:1641.3, nPosY:342, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem36:{sIdentity:"oItem36", sItemType:"LeftDangerZone", nAttachDepth:45, nPosX:1322.7, nPosY:165.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem41:{sIdentity:"oItem41", sItemType:"Fire", nAttachDepth:50, nPosX:1411, nPosY:175.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle7"}, oItem42:{sIdentity:"oItem42", sItemType:"Fire", nAttachDepth:51, nPosX:1551, nPosY:353.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle6"}, oItem49:{sIdentity:"oItem49", sItemType:"PinkDoor", nAttachDepth:58, nPosX:1590.3, nPosY:124.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Pink"}, oItem51:{sIdentity:"oItem51", sItemType:"RedCellKey", nAttachDepth:60, nPosX:1632.7, nPosY:275.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem54:{sIdentity:"oItem54", sItemType:"SoulType1", nAttachDepth:63, nPosX:1500.3, nPosY:174.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle5"}};
}
Symbol 1262 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part1Data
{
function Level6Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"AllSideBlocker", nAttachDepth:10, nPosX:-4.6, nPosY:-26.9, nScaleX:35.9, nScaleY:556.1, bGroundCollider:false}, oItem2:{sIdentity:"oItem2", sItemType:"AllSideBlocker", nAttachDepth:11, nPosX:6.5, nPosY:282.9, nScaleX:169.7, nScaleY:259, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:185.9, nPosY:359.7, nScaleX:713.3, nScaleY:131.1, bGroundCollider:false}, oItem7:{sIdentity:"oItem7", sItemType:"AllSideBlocker", nAttachDepth:16, nPosX:412.4, nPosY:-22.9, nScaleX:64.9, nScaleY:384.3, bGroundCollider:false}, oItem8:{sIdentity:"oItem8", sItemType:"UpLeftBlocker", nAttachDepth:17, nPosX:185.9, nPosY:200.8, nScaleX:409.6, nScaleY:32.4, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"UpRightBlocker", nAttachDepth:18, nPosX:426.9, nPosY:200.8, nScaleX:442, nScaleY:32.4, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"AllSideBlocker", nAttachDepth:24, nPosX:187.9, nPosY:419.7, nScaleX:47.5, nScaleY:278.3, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"AllSideBlocker", nAttachDepth:25, nPosX:76.5, nPosY:422.9, nScaleX:46.9, nScaleY:273, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"AllSideBlocker", nAttachDepth:26, nPosX:583.5, nPosY:422.9, nScaleX:46.9, nScaleY:273, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"KillingGround", nAttachDepth:32, nPosX:98.6, nPosY:569.7, nScaleX:112.6, nScaleY:99.9, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"RightClimbingPlate", nAttachDepth:39, nPosX:185.9, nPosY:200.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem31:{sIdentity:"oItem31", sItemType:"RightClimbingPlate", nAttachDepth:40, nPosX:185.9, nPosY:359.6, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem40:{sIdentity:"oItem40", sItemType:"LeftClimbingPlate", nAttachDepth:49, nPosX:108.2, nPosY:282.8, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem41:{sIdentity:"oItem41", sItemType:"LeftDangerZone", nAttachDepth:50, nPosX:174.5, nPosY:189.4, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem42:{sIdentity:"oItem42", sItemType:"RightDangerZone", nAttachDepth:51, nPosX:95.6, nPosY:272, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem43:{sIdentity:"oItem43", sItemType:"LeftDangerZone", nAttachDepth:52, nPosX:174.5, nPosY:348.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem55:{sIdentity:"oItem55", sItemType:"SoulType1", nAttachDepth:64, nPosX:59.4, nPosY:281.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem56:{sIdentity:"oItem56", sItemType:"Fire", nAttachDepth:65, nPosX:388.9, nPosY:359, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem62:{sIdentity:"oItem62", sItemType:"PinkDoor", nAttachDepth:71, nPosX:372.8, nPosY:148.9, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Pink"}, oItem63:{sIdentity:"oItem63", sItemType:"OrangeDoor", nAttachDepth:72, nPosX:303.3, nPosY:148.9, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Orange"}, oItem68:{sIdentity:"oItem68", sItemType:"BlueCellKey", nAttachDepth:77, nPosX:582.4, nPosY:311.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem69:{sIdentity:"oItem69", sItemType:"GreenCellKey", nAttachDepth:78, nPosX:497.1, nPosY:135.5, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}, oItem71:{sIdentity:"oItem71", sItemType:"Token", nAttachDepth:80, nPosX:554.1, nPosY:147.1, nScaleX:100, nScaleY:100, bGroundCollider:false}};
}
Symbol 1263 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part2Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part2Data
{
function Level6Part2Data () {
}
static var oPartData = {oItem4:{sIdentity:"oItem4", sItemType:"AllSideBlocker", nAttachDepth:13, nPosX:692.1, nPosY:359.7, nScaleX:594, nScaleY:131.1, bGroundCollider:false}, oItem5:{sIdentity:"oItem5", sItemType:"AllSideBlocker", nAttachDepth:14, nPosX:764.6, nPosY:283.7, nScaleX:351.1, nScaleY:138.6, bGroundCollider:false}, oItem6:{sIdentity:"oItem6", sItemType:"AllSideBlocker", nAttachDepth:15, nPosX:1130.9, nPosY:359.7, nScaleX:712.1, nScaleY:131.1, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"UpLeftBlocker", nAttachDepth:19, nPosX:1048.4, nPosY:200.1, nScaleX:537.6, nScaleY:33.6, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"AllSideBlocker", nAttachDepth:27, nPosX:694.1, nPosY:419.7, nScaleX:39.6, nScaleY:278.4, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"AllSideBlocker", nAttachDepth:28, nPosX:1021.1, nPosY:419.7, nScaleX:39.6, nScaleY:278.4, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"AllSideBlocker", nAttachDepth:29, nPosX:1132.9, nPosY:419.7, nScaleX:47.4, nScaleY:278.4, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"KillingGround", nAttachDepth:33, nPosX:603.6, nPosY:569.7, nScaleX:109.1, nScaleY:99.9, bGroundCollider:false}, oItem25:{sIdentity:"oItem25", sItemType:"KillingGround", nAttachDepth:34, nPosX:1042.6, nPosY:569.7, nScaleX:106.8, nScaleY:99.9, bGroundCollider:false}, oItem27:{sIdentity:"oItem27", sItemType:"RightClimbingPlate", nAttachDepth:36, nPosX:1048.4, nPosY:200, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem28:{sIdentity:"oItem28", sItemType:"LeftClimbingPlate", nAttachDepth:37, nPosX:692, nPosY:200.7, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem32:{sIdentity:"oItem32", sItemType:"RightClimbingPlate", nAttachDepth:41, nPosX:692.1, nPosY:359.6, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem33:{sIdentity:"oItem33", sItemType:"RightClimbingPlate", nAttachDepth:42, nPosX:764.6, nPosY:283.6, nScaleX:99.9, nScaleY:77.7, bGroundCollider:false}, oItem34:{sIdentity:"oItem34", sItemType:"RightClimbingPlate", nAttachDepth:43, nPosX:1130.9, nPosY:359.6, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem37:{sIdentity:"oItem37", sItemType:"LeftClimbingPlate", nAttachDepth:46, nPosX:1048.4, nPosY:359.6, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem38:{sIdentity:"oItem38", sItemType:"LeftClimbingPlate", nAttachDepth:47, nPosX:975.1, nPosY:283.6, nScaleX:99.9, nScaleY:78.1, bGroundCollider:false}, oItem39:{sIdentity:"oItem39", sItemType:"LeftClimbingPlate", nAttachDepth:48, nPosX:613.8, nPosY:359.6, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem44:{sIdentity:"oItem44", sItemType:"RightDangerZone", nAttachDepth:53, nPosX:601.2, nPosY:348.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem45:{sIdentity:"oItem45", sItemType:"LeftDangerZone", nAttachDepth:54, nPosX:681.2, nPosY:348.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem46:{sIdentity:"oItem46", sItemType:"RightDangerZone", nAttachDepth:55, nPosX:678.9, nPosY:189.4, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem47:{sIdentity:"oItem47", sItemType:"LeftDangerZone", nAttachDepth:56, nPosX:753.1, nPosY:272.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem48:{sIdentity:"oItem48", sItemType:"RightDangerZone", nAttachDepth:57, nPosX:962.4, nPosY:272.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem49:{sIdentity:"oItem49", sItemType:"RightDangerZone", nAttachDepth:58, nPosX:1036, nPosY:348.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem50:{sIdentity:"oItem50", sItemType:"LeftDangerZone", nAttachDepth:59, nPosX:1037, nPosY:188.9, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem51:{sIdentity:"oItem51", sItemType:"LeftDangerZone", nAttachDepth:60, nPosX:1119.5, nPosY:348.4, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem57:{sIdentity:"oItem57", sItemType:"SoulType2", nAttachDepth:66, nPosX:638.1, nPosY:199.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle2"}, oItem58:{sIdentity:"oItem58", sItemType:"SoulType2", nAttachDepth:67, nPosX:924.2, nPosY:281.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle6"}, oItem59:{sIdentity:"oItem59", sItemType:"SoulType1", nAttachDepth:68, nPosX:1175.2, nPosY:357.6, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle4"}, oItem64:{sIdentity:"oItem64", sItemType:"YellowDoor", nAttachDepth:73, nPosX:804.1, nPosY:232, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem73:{sIdentity:"oItem73", sItemType:"Player", nAttachDepth:82, nPosX:866.2, nPosY:282.5, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1264 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part3Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level6Part3Data
{
function Level6Part3Data () {
}
static var oPartData = {oItem11:{sIdentity:"oItem11", sItemType:"UpRightBlocker", nAttachDepth:20, nPosX:1360.4, nPosY:200.1, nScaleX:329.5, nScaleY:33.6, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"AllSideBlocker", nAttachDepth:21, nPosX:1342.1, nPosY:-19.5, nScaleX:64.6, nScaleY:378.7, bGroundCollider:false}, oItem13:{sIdentity:"oItem13", sItemType:"AllSideBlocker", nAttachDepth:22, nPosX:1714.1, nPosY:-19.5, nScaleX:42.9, nScaleY:525.3, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"AllSideBlocker", nAttachDepth:23, nPosX:1631, nPosY:283.3, nScaleX:163.3, nScaleY:258.2, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"AllSideBlocker", nAttachDepth:30, nPosX:1527.9, nPosY:419.7, nScaleX:47.4, nScaleY:278.4, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"AllSideBlocker", nAttachDepth:31, nPosX:1634, nPosY:431.3, nScaleX:38.1, nScaleY:258.2, bGroundCollider:false}, oItem26:{sIdentity:"oItem26", sItemType:"KillingGround", nAttachDepth:35, nPosX:1550.6, nPosY:569.7, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem29:{sIdentity:"oItem29", sItemType:"LeftClimbingPlate", nAttachDepth:38, nPosX:1558, nPosY:200, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem35:{sIdentity:"oItem35", sItemType:"RightClimbingPlate", nAttachDepth:44, nPosX:1631, nPosY:283.2, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem36:{sIdentity:"oItem36", sItemType:"LeftClimbingPlate", nAttachDepth:45, nPosX:1558.2, nPosY:359.6, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem52:{sIdentity:"oItem52", sItemType:"RightDangerZone", nAttachDepth:61, nPosX:1545.7, nPosY:348.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem53:{sIdentity:"oItem53", sItemType:"LeftDangerZone", nAttachDepth:62, nPosX:1619.6, nPosY:272.2, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem54:{sIdentity:"oItem54", sItemType:"RightDangerZone", nAttachDepth:63, nPosX:1545.2, nPosY:188.9, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem60:{sIdentity:"oItem60", sItemType:"Fire", nAttachDepth:69, nPosX:1427.8, nPosY:359.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle5"}, oItem61:{sIdentity:"oItem61", sItemType:"Fire", nAttachDepth:70, nPosX:1213.9, nPosY:199.9, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle7"}, oItem65:{sIdentity:"oItem65", sItemType:"BlueDoor", nAttachDepth:74, nPosX:1299.2, nPosY:149, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem66:{sIdentity:"oItem66", sItemType:"GreenDoor", nAttachDepth:75, nPosX:1422.2, nPosY:149, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}, oItem67:{sIdentity:"oItem67", sItemType:"RedDoor", nAttachDepth:76, nPosX:1300.3, nPosY:305.5, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem70:{sIdentity:"oItem70", sItemType:"OrangeCellKey", nAttachDepth:79, nPosX:1674.3, nPosY:225.5, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Orange"}, oItem72:{sIdentity:"oItem72", sItemType:"Token", nAttachDepth:81, nPosX:1601.9, nPosY:120, nScaleX:100, nScaleY:100, bGroundCollider:false}};
}
Symbol 1265 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part1Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part1Data
{
function Level7Part1Data () {
}
static var oPartData = {oItem1:{sIdentity:"oItem1", sItemType:"AllSideBlocker", nAttachDepth:10, nPosX:108, nPosY:-30.4, nScaleX:51.9, nScaleY:299.9, bGroundCollider:false}, oItem2:{sIdentity:"oItem2", sItemType:"UpRightBlocker", nAttachDepth:11, nPosX:117.6, nPosY:142.7, nScaleX:515.7, nScaleY:27.6, bGroundCollider:false}, oItem3:{sIdentity:"oItem3", sItemType:"AllSideBlocker", nAttachDepth:12, nPosX:-9.2, nPosY:153.3, nScaleX:51.9, nScaleY:496.2, bGroundCollider:false}, oItem4:{sIdentity:"oItem4", sItemType:"AllSideBlocker", nAttachDepth:13, nPosX:94.6, nPosY:282.1, nScaleX:41.6, nScaleY:280.2, bGroundCollider:false}, oItem5:{sIdentity:"oItem5", sItemType:"UpRightBlocker", nAttachDepth:14, nPosX:115.6, nPosY:282.1, nScaleX:550.1, nScaleY:24.3, bGroundCollider:false}, oItem6:{sIdentity:"oItem6", sItemType:"AllSideBlocker", nAttachDepth:15, nPosX:110.3, nPosY:420.6, nScaleX:702, nScaleY:24.3, bGroundCollider:false}, oItem7:{sIdentity:"oItem7", sItemType:"AllSideBlocker", nAttachDepth:16, nPosX:515.9, nPosY:354.6, nScaleX:340.5, nScaleY:161.3, bGroundCollider:false}, oItem9:{sIdentity:"oItem9", sItemType:"UpLeftBlocker", nAttachDepth:18, nPosX:515.9, nPosY:204.7, nScaleX:523.4, nScaleY:24.9, bGroundCollider:false}, oItem27:{sIdentity:"oItem27", sItemType:"AllSideBlocker", nAttachDepth:36, nPosX:-13.2, nPosY:433.3, nScaleX:51.9, nScaleY:255.3, bGroundCollider:false}, oItem28:{sIdentity:"oItem28", sItemType:"AllSideBlocker", nAttachDepth:37, nPosX:98.6, nPosY:443.1, nScaleX:41.6, nScaleY:239.1, bGroundCollider:false}, oItem32:{sIdentity:"oItem32", sItemType:"KillingGround", nAttachDepth:41, nPosX:11.6, nPosY:569.7, nScaleX:110.8, nScaleY:99.9, bGroundCollider:false}, oItem33:{sIdentity:"oItem33", sItemType:"RightClimbingPlate", nAttachDepth:42, nPosX:94.6, nPosY:282, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem34:{sIdentity:"oItem34", sItemType:"LeftClimbingPlate", nAttachDepth:43, nPosX:444.6, nPosY:282, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem35:{sIdentity:"oItem35", sItemType:"LeftClimbingPlate", nAttachDepth:44, nPosX:425.8, nPosY:142.6, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem36:{sIdentity:"oItem36", sItemType:"RightClimbingPlate", nAttachDepth:45, nPosX:515.9, nPosY:354.5, nScaleX:99.9, nScaleY:65.2, bGroundCollider:false}, oItem37:{sIdentity:"oItem37", sItemType:"RightClimbingPlate", nAttachDepth:46, nPosX:515.9, nPosY:204.6, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem46:{sIdentity:"oItem46", sItemType:"RightDangerZone", nAttachDepth:55, nPosX:432.3, nPosY:271.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem47:{sIdentity:"oItem47", sItemType:"LeftDangerZone", nAttachDepth:56, nPosX:83.4, nPosY:271.1, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem48:{sIdentity:"oItem48", sItemType:"RightDangerZone", nAttachDepth:57, nPosX:413.8, nPosY:131.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem49:{sIdentity:"oItem49", sItemType:"LeftDangerZone", nAttachDepth:58, nPosX:504.8, nPosY:343.4, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem50:{sIdentity:"oItem50", sItemType:"LeftDangerZone", nAttachDepth:59, nPosX:504.5, nPosY:193.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem59:{sIdentity:"oItem59", sItemType:"SoulType2", nAttachDepth:68, nPosX:310.6, nPosY:284.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle12"}, oItem60:{sIdentity:"oItem60", sItemType:"Fire", nAttachDepth:69, nPosX:477.6, nPosY:421.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle8"}, oItem61:{sIdentity:"oItem61", sItemType:"Fire", nAttachDepth:70, nPosX:272.7, nPosY:142.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle1"}, oItem62:{sIdentity:"oItem62", sItemType:"Fire", nAttachDepth:71, nPosX:530.3, nPosY:205, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle2"}, oItem68:{sIdentity:"oItem68", sItemType:"SoulType1", nAttachDepth:77, nPosX:594.3, nPosY:204.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle3"}, oItem73:{sIdentity:"oItem73", sItemType:"BlueDoor", nAttachDepth:82, nPosX:186, nPosY:90, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Blue"}, oItem79:{sIdentity:"oItem79", sItemType:"PinkCellKey", nAttachDepth:88, nPosX:563.2, nPosY:306.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Pink"}, oItem82:{sIdentity:"oItem82", sItemType:"Token", nAttachDepth:91, nPosX:155.3, nPosY:361.8, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem83:{sIdentity:"oItem83", sItemType:"Token", nAttachDepth:92, nPosX:213.6, nPosY:361.8, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem84:{sIdentity:"oItem84", sItemType:"Token", nAttachDepth:93, nPosX:115.5, nPosY:230.6, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem87:{sIdentity:"oItem87", sItemType:"Player", nAttachDepth:96, nPosX:356.9, nPosY:142.6, nScaleX:100, nScaleY:100, bGroundCollider:true}};
}
Symbol 1266 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part2Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part2Data
{
function Level7Part2Data () {
}
static var oPartData = {oItem8:{sIdentity:"oItem8", sItemType:"AllSideBlocker", nAttachDepth:17, nPosX:792, nPosY:354.6, nScaleX:333.3, nScaleY:161.3, bGroundCollider:false}, oItem10:{sIdentity:"oItem10", sItemType:"UpRightBlocker", nAttachDepth:19, nPosX:795, nPosY:204.7, nScaleX:525.5, nScaleY:24.9, bGroundCollider:false}, oItem11:{sIdentity:"oItem11", sItemType:"UpLeftBlocker", nAttachDepth:20, nPosX:1098, nPosY:280.1, nScaleX:543.1, nScaleY:23.2, bGroundCollider:false}, oItem12:{sIdentity:"oItem12", sItemType:"UpRightBlocker", nAttachDepth:21, nPosX:1112.1, nPosY:241.6, nScaleX:138.8, nScaleY:76.9, bGroundCollider:false}, oItem14:{sIdentity:"oItem14", sItemType:"AllSideBlocker", nAttachDepth:23, nPosX:986.1, nPosY:420.5, nScaleX:566.1, nScaleY:51.5, bGroundCollider:false}, oItem20:{sIdentity:"oItem20", sItemType:"AllSideBlocker", nAttachDepth:29, nPosX:1098, nPosY:204.7, nScaleX:35, nScaleY:136.6, bGroundCollider:false}, oItem25:{sIdentity:"oItem25", sItemType:"AllSideBlocker", nAttachDepth:34, nPosX:695.5, nPosY:440.5, nScaleX:34.4, nScaleY:243.3, bGroundCollider:false}, oItem26:{sIdentity:"oItem26", sItemType:"AllSideBlocker", nAttachDepth:35, nPosX:794, nPosY:444.6, nScaleX:34.1, nScaleY:236.4, bGroundCollider:false}, oItem31:{sIdentity:"oItem31", sItemType:"KillingGround", nAttachDepth:40, nPosX:711.6, nPosY:569.7, nScaleX:100, nScaleY:99.9, bGroundCollider:false}, oItem38:{sIdentity:"oItem38", sItemType:"RightClimbingPlate", nAttachDepth:47, nPosX:792, nPosY:354.5, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem41:{sIdentity:"oItem41", sItemType:"LeftClimbingPlate", nAttachDepth:50, nPosX:720.1, nPosY:354.5, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem42:{sIdentity:"oItem42", sItemType:"LeftClimbingPlate", nAttachDepth:51, nPosX:991.9, nPosY:354.5, nScaleX:99.9, nScaleY:67.2, bGroundCollider:false}, oItem51:{sIdentity:"oItem51", sItemType:"RightDangerZone", nAttachDepth:60, nPosX:708, nPosY:343.8, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem52:{sIdentity:"oItem52", sItemType:"LeftDangerZone", nAttachDepth:61, nPosX:780.6, nPosY:343.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem53:{sIdentity:"oItem53", sItemType:"RightDangerZone", nAttachDepth:62, nPosX:979.7, nPosY:343.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem54:{sIdentity:"oItem54", sItemType:"RightDangerZone", nAttachDepth:63, nPosX:1106.7, nPosY:193.7, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem58:{sIdentity:"oItem58", sItemType:"RightDangerZone", nAttachDepth:67, nPosX:1182.8, nPosY:230.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem63:{sIdentity:"oItem63", sItemType:"Fire", nAttachDepth:72, nPosX:1088.5, nPosY:205.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle6"}, oItem64:{sIdentity:"oItem64", sItemType:"Fire", nAttachDepth:73, nPosX:1135.2, nPosY:420.8, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle11"}, oItem66:{sIdentity:"oItem66", sItemType:"SoulType2", nAttachDepth:75, nPosX:668.8, nPosY:354.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle9"}, oItem67:{sIdentity:"oItem67", sItemType:"SoulType1", nAttachDepth:76, nPosX:831.1, nPosY:355.3, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle10"}, oItem69:{sIdentity:"oItem69", sItemType:"SoulType1", nAttachDepth:78, nPosX:946.6, nPosY:203.8, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle5"}, oItem70:{sIdentity:"oItem70", sItemType:"SoulType2", nAttachDepth:79, nPosX:771.1, nPosY:204.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle4"}, oItem74:{sIdentity:"oItem74", sItemType:"GreenDoor", nAttachDepth:83, nPosX:682.1, nPosY:152.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}, oItem75:{sIdentity:"oItem75", sItemType:"OrangeDoor", nAttachDepth:84, nPosX:859.7, nPosY:152.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Orange"}, oItem76:{sIdentity:"oItem76", sItemType:"PinkDoor", nAttachDepth:85, nPosX:1031.7, nPosY:152.1, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Pink"}, oItem80:{sIdentity:"oItem80", sItemType:"GreenCellKey", nAttachDepth:89, nPosX:939.4, nPosY:306.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Green"}, oItem81:{sIdentity:"oItem81", sItemType:"OrangeCellKey", nAttachDepth:90, nPosX:1150.6, nPosY:198.4, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Orange"}};
}
Symbol 1267 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part3Data] Frame 0
class com.disney.gem.games.Pirates.game_obj.lvls_data.Level7Part3Data
{
function Level7Part3Data () {
}
static var oPartData = {oItem13:{sIdentity:"oItem13", sItemType:"AllSideBlocker", nAttachDepth:22, nPosX:1641.4, nPosY:216.9, nScaleX:162.9, nScaleY:116.2, bGroundCollider:false}, oItem15:{sIdentity:"oItem15", sItemType:"AllSideBlocker", nAttachDepth:24, nPosX:1408.5, nPosY:420.5, nScaleX:379.7, nScaleY:51.5, bGroundCollider:false}, oItem16:{sIdentity:"oItem16", sItemType:"AllSideBlocker", nAttachDepth:25, nPosX:1315.3, nPosY:-10.3, nScaleX:56.1, nScaleY:261.4, bGroundCollider:false}, oItem17:{sIdentity:"oItem17", sItemType:"UpRightBlocker", nAttachDepth:26, nPosX:1315.3, nPosY:138.2, nScaleX:423, nScaleY:34.9, bGroundCollider:false}, oItem18:{sIdentity:"oItem18", sItemType:"AllSideBlocker", nAttachDepth:27, nPosX:1719.4, nPosY:2, nScaleX:46.8, nScaleY:425.7, bGroundCollider:false}, oItem19:{sIdentity:"oItem19", sItemType:"AllSideBlocker", nAttachDepth:28, nPosX:1719.4, nPosY:284.7, nScaleX:46.8, nScaleY:503.2, bGroundCollider:false}, oItem21:{sIdentity:"oItem21", sItemType:"UpRightBlocker", nAttachDepth:30, nPosX:1405.5, nPosY:280.1, nScaleX:543.1, nScaleY:23.2, bGroundCollider:false}, oItem22:{sIdentity:"oItem22", sItemType:"AllSideBlocker", nAttachDepth:31, nPosX:1604.5, nPosY:430.5, nScaleX:48.4, nScaleY:260.1, bGroundCollider:false}, oItem23:{sIdentity:"oItem23", sItemType:"AllSideBlocker", nAttachDepth:32, nPosX:1409.5, nPosY:440.5, nScaleX:34.4, nScaleY:243.3, bGroundCollider:false}, oItem24:{sIdentity:"oItem24", sItemType:"AllSideBlocker", nAttachDepth:33, nPosX:1300.5, nPosY:440.5, nScaleX:34.4, nScaleY:243.3, bGroundCollider:false}, oItem29:{sIdentity:"oItem29", sItemType:"KillingGround", nAttachDepth:38, nPosX:1628.6, nPosY:569.7, nScaleX:110.3, nScaleY:99.9, bGroundCollider:false}, oItem30:{sIdentity:"oItem30", sItemType:"KillingGround", nAttachDepth:39, nPosX:1316.6, nPosY:569.7, nScaleX:114.5, nScaleY:99.9, bGroundCollider:false}, oItem39:{sIdentity:"oItem39", sItemType:"RightClimbingPlate", nAttachDepth:48, nPosX:1408.5, nPosY:420.4, nScaleX:99.9, nScaleY:99.9, bGroundCollider:false}, oItem40:{sIdentity:"oItem40", sItemType:"RightClimbingPlate", nAttachDepth:49, nPosX:1641.4, nPosY:216.8, nScaleX:99.9, nScaleY:64.2, bGroundCollider:false}, oItem43:{sIdentity:"oItem43", sItemType:"LeftClimbingPlate", nAttachDepth:52, nPosX:1325.7, nPosY:420.4, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem44:{sIdentity:"oItem44", sItemType:"LeftClimbingPlate", nAttachDepth:53, nPosX:1636.3, nPosY:420.4, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem45:{sIdentity:"oItem45", sItemType:"LeftClimbingPlate", nAttachDepth:54, nPosX:1568.5, nPosY:138.1, nScaleX:99.9, nScaleY:100, bGroundCollider:false}, oItem55:{sIdentity:"oItem55", sItemType:"RightDangerZone", nAttachDepth:64, nPosX:1313.6, nPosY:409.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem56:{sIdentity:"oItem56", sItemType:"RightDangerZone", nAttachDepth:65, nPosX:1624.2, nPosY:409.2, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem57:{sIdentity:"oItem57", sItemType:"RightDangerZone", nAttachDepth:66, nPosX:1556, nPosY:127.3, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem65:{sIdentity:"oItem65", sItemType:"Fire", nAttachDepth:74, nPosX:1352.7, nPosY:280.2, nScaleX:100, nScaleY:100, bGroundCollider:false, sName:"Obstacle7"}, oItem71:{sIdentity:"oItem71", sItemType:"LeftDangerZone", nAttachDepth:80, nPosX:1630.5, nPosY:205.6, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem72:{sIdentity:"oItem72", sItemType:"LeftDangerZone", nAttachDepth:81, nPosX:1397.2, nPosY:409.5, nScaleX:73.9, nScaleY:73.9, bGroundCollider:false}, oItem77:{sIdentity:"oItem77", sItemType:"YellowDoor", nAttachDepth:86, nPosX:1390.3, nPosY:85.7, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Yellow"}, oItem78:{sIdentity:"oItem78", sItemType:"RedDoor", nAttachDepth:87, nPosX:1585, nPosY:369, nScaleX:100, nScaleY:100, bGroundCollider:false, sColor:"Red"}, oItem85:{sIdentity:"oItem85", sItemType:"Token", nAttachDepth:94, nPosX:1497, nPosY:88.1, nScaleX:100, nScaleY:100, bGroundCollider:false}, oItem86:{sIdentity:"oItem86", sItemType:"Token", nAttachDepth:95, nPosX:1680.5, nPosY:166.1, nScaleX:100, nScaleY:100, bGroundCollider:false}};
}
Symbol 1268 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Inventory] Frame 0
class com.disney.gem.games.Pirates.game_obj.Inventory
{
var mcRef, sName, oOwner, aKeys;
function Inventory (_mcRef, _sName, _oOwner) {
mcRef = _mcRef;
sName = _sName;
oOwner = _oOwner;
aKeys = new Array();
showKeys();
}
function showKeys() {
var _local2 = 0;
while (_local2 < 6) {
if (aKeys[_local2] != undefined) {
mcRef["mcKey" + (_local2 + 1)].gotoAndStop(aKeys[_local2]);
} else {
mcRef["mcKey" + (_local2 + 1)].gotoAndStop("NoKey");
}
_local2++;
}
}
function addKey(_sKeyColor) {
aKeys.push(_sKeyColor);
showKeys();
}
function removeKey(_sKeyColor) {
var _local3 = false;
var _local2 = 0;
while ((_local3 == false) and (_local2 < aKeys.length)) {
if (aKeys[_local2] == _sKeyColor) {
aKeys.splice(_local2, 1);
_local3 = true;
}
_local2++;
}
showKeys();
}
function deleteObject() {
delete oOwner[sName];
}
}
Symbol 1269 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedItem] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedItem extends com.sarbakan.utils.StateManaged
{
var oController, sName, nPosX, nPosY, oOwner, oActivationManager, oBackground, sType, mcContainer, nAttachDepth, sAttachLink, sAttachName, nScaleX, nScaleY, nMinBoundX, nMinBoundY, bFixItem, sState, setState, mcRef, oBounds, nDistUpSide, nDistDownSide, nDistRightSide, nDistLeftSide, sLUBroadcaster, sRUBroadcaster, sLDBroadcaster, sRDBroadcaster;
function ActivatedItem (_oItemData, _sName, _oOwner) {
super(undefined);
_oItemData.sItemName = _sName;
oController = com.disney.gem.games.Pirates.Controller.getInstance();
sName = _sName;
nPosX = _oItemData.nPosX;
nPosY = _oItemData.nPosY;
oOwner = _oOwner;
oActivationManager = oOwner.oActivationManager;
oBackground = oOwner.oBackground;
sType = _oItemData.sItemType;
mcContainer = _oItemData.mcContainer;
nAttachDepth = _oItemData.nAttachDepth;
sAttachLink = _oItemData.sItemType;
sAttachName = "mc" + (substring(sName, 2, -1));
nPosX = _oItemData.nPosX;
nPosY = _oItemData.nPosY;
nScaleX = _oItemData.nScaleX;
nScaleY = _oItemData.nScaleY;
if (_oItemData.nMinBoundX != undefined) {
nMinBoundX = _oItemData.nMinBoundX;
} else {
nMinBoundX = 0;
}
if (_oItemData.nMinBoundY != undefined) {
nMinBoundY = _oItemData.nMinBoundY;
} else {
nMinBoundY = 0;
}
bFixItem = false;
if (_oItemData.sStartState != undefined) {
sState = _oItemData.sStartState;
} else {
sState = "Idle";
}
activateItem();
setState(sState);
}
function state_Idle() {
checkDesactivate();
}
function setBounds() {
if (mcRef._parent != undefined) {
oBounds = mcRef.getBounds(mcRef._parent);
if (oBounds.xMin > (nPosX - nMinBoundX)) {
oBounds.xMin = nPosX - nMinBoundX;
}
if (oBounds.xMax < (nPosX + nMinBoundX)) {
oBounds.xMax = nPosX + nMinBoundX;
}
if (oBounds.yMin > (nPosY - nMinBoundY)) {
oBounds.yMin = nPosY - nMinBoundY;
}
if (oBounds.yMax < (nPosY + nMinBoundY)) {
oBounds.yMax = nPosY + nMinBoundY;
}
nDistUpSide = nPosY - oBounds.yMin;
nDistDownSide = oBounds.yMax - nPosY;
nDistRightSide = oBounds.xMax - nPosX;
nDistLeftSide = nPosX - oBounds.xMin;
}
}
function addActivateBroadcast() {
sLUBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMin, oBounds.yMin);
sRUBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMax, oBounds.yMin);
sLDBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMin, oBounds.yMax);
sRDBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMax, oBounds.yMax);
}
function checkDesactivate() {
if (bFixItem == false) {
setBounds();
}
var _local3 = nPosX + oBackground.nPosX;
var _local2 = nPosY + oBackground.nPosY;
var _local5 = _local3 - nDistLeftSide;
var _local6 = _local3 + nDistRightSide;
var _local4 = _local2 - nDistUpSide;
var _local7 = _local2 + nDistDownSide;
if ((((_local6 < oActivationManager.nLActiveLimit) or (_local5 > oActivationManager.nRActiveLimit)) or (_local7 < oActivationManager.nUpActiveLimit)) or (_local4 > oActivationManager.nDwActiveLimit)) {
desactivateItem();
}
}
function checkActivate() {
var _local3 = nPosX + oBackground.nPosX;
var _local2 = nPosY + oBackground.nPosY;
var _local5 = _local3 - nDistLeftSide;
var _local6 = _local3 + nDistRightSide;
var _local4 = _local2 - nDistUpSide;
var _local7 = _local2 + nDistDownSide;
if ((((_local6 < oActivationManager.nLActiveLimit) or (_local5 > oActivationManager.nRActiveLimit)) or (_local7 < oActivationManager.nUpActiveLimit)) or (_local4 > oActivationManager.nDwActiveLimit)) {
} else {
activateItem();
}
}
function activateItem() {
attachItemMovie();
setBounds();
oActivationManager.removeToBroadcast(this, sLUBroadcaster);
oActivationManager.removeToBroadcast(this, sRUBroadcaster);
oActivationManager.removeToBroadcast(this, sLDBroadcaster);
oActivationManager.removeToBroadcast(this, sRDBroadcaster);
if (mcRef.mcForm != undefined) {
bFixItem = true;
mcRef.mcForm.swapDepths(10);
mcRef.mcForm.removeMovieClip();
}
setState(sState, true);
oController.oMainBroadcaster.addListener(this);
}
function attachItemMovie() {
mcContainer.attachMovie(sAttachLink, sAttachName, nAttachDepth);
mcRef = mcContainer[sAttachName];
mcRef._x = nPosX;
mcRef._y = nPosY;
mcRef._xscale = nScaleX;
mcRef._yscale = nScaleY;
}
function desactivateItem() {
mcRef.removeMovieClip();
oController.oMainBroadcaster.removeListener(this);
addActivateBroadcast();
}
function deleteObject() {
mcRef.removeMovieClip();
delete oOwner[sName];
oController.oMainBroadcaster.removeListener(this);
}
}
Symbol 1270 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedItem
{
var nUpBorder, nScaleY, mcRef, nRightBorder, nScaleX, nDownBorder, nLeftBorder, oImpactManager, oOwner, nUpHitBorder, nDownHitBorder, nLeftHitBorder, nRightHitBorder, nMaxMoveY, nPosY, nMaxMoveX, nPosX, sType, sName;
function ActivatedColliderItem (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function attachItemMovie() {
super.attachItemMovie();
setAsCollider();
}
function setAsCollider() {
nUpBorder = int((mcRef.mcRightUpBorder._y * nScaleY) / 100);
nRightBorder = int((mcRef.mcRightUpBorder._x * nScaleX) / 100);
nDownBorder = int((mcRef.mcLeftDownBorder._y * nScaleY) / 100);
nLeftBorder = int((mcRef.mcLeftDownBorder._x * nScaleX) / 100);
mcRef.mcLeftDownBorder.swapDepths(10);
mcRef.mcLeftDownBorder.removeMovieClip();
mcRef.mcRightUpBorder.swapDepths(10);
mcRef.mcRightUpBorder.removeMovieClip();
if (oImpactManager == undefined) {
oImpactManager = oOwner.oImpactManager;
}
oImpactManager.addCollider(this);
}
function returnImpactData() {
setHitBorders();
var _local2 = {sName:sName, sType:sType, nPosX:nPosX, nPosY:nPosY, nMaxMoveX:nMaxMoveX, nMaxMoveY:nMaxMoveY, nDestX:nPosX + nMaxMoveX, nDestY:nPosY + nMaxMoveY, nRightBorder:nRightBorder, nLeftBorder:nLeftBorder, nDownBorder:nDownBorder, nUpBorder:nUpBorder, nRightHitBorder:nRightHitBorder, nLeftHitBorder:nLeftHitBorder, nDownHitBorder:nDownHitBorder, nUpHitBorder:nUpHitBorder};
return(_local2);
}
function setHitBorders() {
nRightHitBorder = nPosX + nRightBorder;
nLeftHitBorder = nPosX + nLeftBorder;
nDownHitBorder = nPosY + nDownBorder;
nUpHitBorder = nPosY + nUpBorder;
nRightHitBorder = int(nRightHitBorder * 10) / 10;
nLeftHitBorder = int(nLeftHitBorder * 10) / 10;
nDownHitBorder = int(nDownHitBorder * 10) / 10;
nUpHitBorder = int(nUpHitBorder * 10) / 10;
}
function checkInReach(_oMovingData, _nRightMoveBorder, _nLeftMoveBorder, _nDownMoveBorder, _nUpMoveBorder) {
var _local3 = false;
var _local4 = _oMovingData.sType;
if (com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactDefinition[_local4][sType] != undefined) {
setHitBorders();
if (_oMovingData.nMaxMoveX > 0) {
if ((nLeftHitBorder >= _nLeftMoveBorder) and (nLeftHitBorder < _nRightMoveBorder)) {
_oMovingData.bInXReach = true;
_local3 = true;
}
} else if (_oMovingData.nMaxMoveX < 0) {
if ((nRightHitBorder <= _nRightMoveBorder) and (nRightHitBorder > _nLeftMoveBorder)) {
_oMovingData.bInXReach = true;
_local3 = true;
}
}
if (_oMovingData.nMaxMoveY > 0) {
if ((nUpHitBorder >= _nUpMoveBorder) and (nUpHitBorder < _nDownMoveBorder)) {
_oMovingData.bInYReach = true;
_local3 = true;
}
} else if (_oMovingData.nMaxMoveY < 0) {
if ((nDownHitBorder <= _nDownMoveBorder) and (nDownHitBorder > _nUpMoveBorder)) {
_oMovingData.bInYReach = true;
_local3 = true;
}
}
}
return(_local3);
}
function checkIfCanBeHit(_oMovingData) {
var _local13 = false;
var _local16 = false;
if ((_oMovingData.bInXReach == true) and (_oMovingData.nMaxMoveX != 0)) {
if (_oMovingData.nMaxMoveX > 0) {
var _local4 = nLeftHitBorder - _oMovingData.nRightHitBorder;
_local4 = int(_local4 * 10) / 10;
var _local15 = "Left";
if (_local4 < 0) {
_local4 = 0;
}
} else if (_oMovingData.nMaxMoveX < 0) {
var _local4 = nRightHitBorder - _oMovingData.nLeftHitBorder;
_local4 = int(_local4 * 10) / 10;
var _local15 = "Right";
if (_local4 > 0) {
_local4 = 0;
}
}
var _local8 = _local4 / _oMovingData.nMaxMoveX;
if (_local8 < 0) {
_local8 = 0;
}
var _local17 = _oMovingData.nPosX + _local4;
_local17 = int(_local17 * 10) / 10;
var _local11 = _oMovingData.nPosY + (_oMovingData.nMaxMoveY * _local8);
_local11 = int(_local11 * 10) / 10;
if (((_local11 + _oMovingData.nDownBorder) > nUpHitBorder) and ((_local11 + _oMovingData.nUpBorder) < nDownHitBorder)) {
_local13 = true;
}
}
if ((_oMovingData.bInYReach == true) and (_oMovingData.nMaxMoveY != 0)) {
if (_oMovingData.nMaxMoveY > 0) {
var _local3 = nUpHitBorder - _oMovingData.nDownHitBorder;
_local3 = int(_local3 * 10) / 10;
var _local14 = "Up";
if (_local3 < 0) {
_local3 = 0;
}
} else if (_oMovingData.nMaxMoveY < 0) {
var _local3 = nDownHitBorder - _oMovingData.nUpHitBorder;
_local3 = int(_local3 * 10) / 10;
var _local14 = "Down";
if (_local3 > 0) {
_local3 = 0;
}
}
var _local7 = _local3 / _oMovingData.nMaxMoveY;
if (_local7 < 0) {
_local7 = 0;
}
var _local18 = _oMovingData.nPosY + _local3;
_local18 = int(_local18 * 10) / 10;
var _local12 = _oMovingData.nPosX + (_oMovingData.nMaxMoveX * _local7);
_local12 = int(_local12 * 10) / 10;
if (((_local12 + _oMovingData.nRightBorder) > nLeftHitBorder) and ((_local12 + _oMovingData.nLeftBorder) < nRightHitBorder)) {
_local16 = true;
}
}
if ((_local13 == true) or (_local16 == true)) {
var _local9;
var _local10;
var _local5;
var _local6;
if ((_local13 == true) and (_local16 == true)) {
if (_local3 < _local4) {
_local9 = _local3;
_local10 = _local7;
_local5 = "Y";
_local6 = _local14;
} else if (_local3 > _local4) {
_local9 = _local4;
_local10 = _local8;
_local5 = "X";
_local6 = _local15;
} else if (random(100) < 50) {
_local9 = _local4;
_local10 = _local8;
_local5 = "X";
_local6 = _local15;
} else {
_local9 = _local3;
_local10 = _local7;
_local5 = "Y";
_local6 = _local14;
}
} else if (_local13 == true) {
_local9 = _local4;
_local10 = _local8;
_local5 = "X";
_local6 = _local15;
} else {
_local9 = _local3;
_local10 = _local7;
_local5 = "Y";
_local6 = _local14;
}
var _local19 = {oItem:this, nImpactDist:_local9, nMovePercent:_local10, sImpactAxis:_local5, sImpactSide:_local6};
}
return(_local19);
}
function desactivateItem() {
super.desactivateItem();
oImpactManager.removeCollider(this);
}
function validateMove() {
oImpactManager.checkForImpact(this);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
}
function resolveHitAfterMove(_oMovingItem) {
}
function doImpactResult(_oMovingItem) {
}
function deleteObject() {
super.deleteObject();
oImpactManager.removeCollider(this);
}
}
Symbol 1271 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.UpRightBlocker] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.UpRightBlocker extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem
{
function UpRightBlocker (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
if ((_oImpactCheckResult.sImpactSide == "Up") or (_oImpactCheckResult.sImpactSide == "Right")) {
return(true);
}
return(false);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
if (_oImpactCheckResult.sImpactSide == "Up") {
_oMovingItem.nRealMoveY = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveY = 0;
_oMovingItem.nRealMoveX = 0;
doImpactResult(_oMovingItem, _oImpactCheckResult);
} else if (_oImpactCheckResult.sImpactSide == "Right") {
_oMovingItem.nRealMoveX = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveX = 0;
if (_oMovingItem.sState == "Slide") {
_oMovingItem.nSpdX = 0;
}
if ((_oMovingItem.bOnGround == false) or (_oMovingItem.nMaxMoveY < 0)) {
_oMovingItem.nRealMoveY = 0;
} else {
_oMovingItem.nRealMoveY = 0;
_oMovingItem.nMaxMoveY = 0;
}
_oMovingItem.setWallHit();
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.setGroundHit();
}
}
Symbol 1272 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.UpLeftBlocker] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.UpLeftBlocker extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem
{
function UpLeftBlocker (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
if ((_oImpactCheckResult.sImpactSide == "Up") or (_oImpactCheckResult.sImpactSide == "Left")) {
return(true);
}
return(false);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
if (_oImpactCheckResult.sImpactSide == "Up") {
_oMovingItem.nRealMoveY = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveY = 0;
_oMovingItem.nRealMoveX = 0;
doImpactResult(_oMovingItem, _oImpactCheckResult);
} else if (_oImpactCheckResult.sImpactSide == "Left") {
_oMovingItem.nRealMoveX = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveX = 0;
if (_oMovingItem.sState == "Slide") {
_oMovingItem.nSpdX = 0;
}
if ((_oMovingItem.bOnGround == false) or (_oMovingItem.nMaxMoveY < 0)) {
_oMovingItem.nRealMoveY = 0;
} else {
_oMovingItem.nRealMoveY = 0;
_oMovingItem.nMaxMoveY = 0;
}
_oMovingItem.setWallHit();
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.setGroundHit();
}
}
Symbol 1273 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.AllSideBlocker] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.AllSideBlocker extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem
{
function AllSideBlocker (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
return(true);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
if (_oImpactCheckResult.sImpactAxis == "Y") {
_oMovingItem.nRealMoveY = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveY = 0;
_oMovingItem.nSpdY = 0;
_oMovingItem.nRealMoveX = 0;
} else if (_oImpactCheckResult.sImpactAxis == "X") {
_oMovingItem.nRealMoveX = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveX = 0;
if ((_oMovingItem.bOnGround == false) or (_oMovingItem.nMaxMoveY < 0)) {
_oMovingItem.nRealMoveY = 0;
} else {
_oMovingItem.nRealMoveY = 0;
_oMovingItem.nMaxMoveY = 0;
}
_oMovingItem.setWallHit();
}
doImpactResult(_oMovingItem, _oImpactCheckResult);
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if (_oImpactCheckResult.sImpactSide == "Up") {
_oMovingItem.setGroundHit();
}
}
}
Symbol 1274 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.KillingGround] Frame 0
class com.disney.gem.games.Pirates.game_obj.KillingGround extends com.disney.gem.games.Pirates.game_obj.scroll_sys.AllSideBlocker
{
var oController;
function KillingGround (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.oControls.bControlsLock = true;
_oMovingItem.looseLife();
oController.pause();
oController.restartCurrentLevel();
}
}
Symbol 1275 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem
{
var sType, setHitBorders, nDownHitBorder, nUpHitBorder, nRightHitBorder, nLeftHitBorder, oImpactManager;
function InsideCollider (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function checkInReach(_oMovingData, _nRightMoveBorder, _nLeftMoveBorder, _nDownMoveBorder, _nUpMoveBorder) {
var _local3 = false;
var _local4 = _oMovingData.sType;
if (com.disney.gem.games.Pirates.game_obj.scroll_sys.ImpactDefinition[_local4][sType] != undefined) {
setHitBorders();
if ((((_oMovingData.nRightHitBorder >= nLeftHitBorder) and (_oMovingData.nLeftHitBorder <= nRightHitBorder)) and (_oMovingData.nDownHitBorder >= nUpHitBorder)) and (_oMovingData.nUpHitBorder <= nDownHitBorder)) {
_oMovingData.bInXReach = true;
_oMovingData.bInYReach = true;
_local3 = true;
}
}
return(_local3);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
oImpactManager.addItemToValidate(this);
return(false);
}
function checkInReachAfterMove(_oMovingItem, _nRightMoveBorder, _nLeftMoveBorder, _nDownMoveBorder, _nUpMoveBorder) {
var _local2 = false;
if ((((_oMovingItem.nRightHitBorder >= nLeftHitBorder) and (_oMovingItem.nLeftHitBorder <= nRightHitBorder)) and (_oMovingItem.nDownHitBorder >= nUpHitBorder)) and (_oMovingItem.nUpHitBorder <= nDownHitBorder)) {
_local2 = true;
}
return(_local2);
}
function resolveHitAfterMove(_oMovingItem, _oImpactCheckResult) {
doImpactResult(_oMovingItem, _oImpactCheckResult);
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
}
}
Symbol 1276 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.DangerZone] Frame 0
class com.disney.gem.games.Pirates.game_obj.DangerZone extends com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider
{
var sDirection, nDownHitBorder, nUpHitBorder, nRightHitBorder, nLeftHitBorder;
function DangerZone (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
sDirection = _oItemData.sDirection;
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if ((_oMovingItem.nPosY >= nUpHitBorder) and (_oMovingItem.nPosY <= nDownHitBorder)) {
if ((_oMovingItem.sType == "Player") and (_oMovingItem.bOnGround == true)) {
if (sDirection == "Right") {
_oMovingItem.setInDangerZone(sDirection, nRightHitBorder);
} else {
_oMovingItem.setInDangerZone(sDirection, nLeftHitBorder);
}
}
}
}
}
Symbol 1277 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.UpBlocker] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.UpBlocker extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedColliderItem
{
function UpBlocker (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
if (_oImpactCheckResult.sImpactSide == "Up") {
return(true);
}
return(false);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
if (_oImpactCheckResult.sImpactSide == "Up") {
_oMovingItem.nRealMoveY = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveY = 0;
_oMovingItem.nRealMoveX = 0;
doImpactResult(_oMovingItem, _oImpactCheckResult);
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.setGroundHit();
}
}
Symbol 1278 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.RightClimbingPlate] Frame 0
class com.disney.gem.games.Pirates.game_obj.RightClimbingPlate extends com.disney.gem.games.Pirates.game_obj.scroll_sys.UpBlocker
{
var nPosY;
function RightClimbingPlate (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
if (((_oImpactCheckResult.sImpactSide == "Up") and (_oMovingItem.sDirection == "Right")) and (_oMovingItem.nSpdX > 0)) {
return(true);
}
return(false);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.nRealMoveY = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveY = 0;
_oMovingItem.nRealMoveX = 0;
doImpactResult(_oMovingItem, _oImpactCheckResult);
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.setClimb(nPosY);
}
}
Symbol 1279 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.LeftClimbingPlate] Frame 0
class com.disney.gem.games.Pirates.game_obj.LeftClimbingPlate extends com.disney.gem.games.Pirates.game_obj.scroll_sys.UpBlocker
{
var nPosY;
function LeftClimbingPlate (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
}
function confirmCanBeHit(_oMovingItem, _oImpactCheckResult) {
if (((_oImpactCheckResult.sImpactSide == "Up") and (_oMovingItem.sDirection == "Left")) and (_oMovingItem.nSpdX < 0)) {
return(true);
}
return(false);
}
function resolveHit(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.nRealMoveY = _oImpactCheckResult.nImpactDist;
_oMovingItem.nMaxMoveY = 0;
_oMovingItem.nRealMoveX = 0;
doImpactResult(_oMovingItem, _oImpactCheckResult);
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
_oMovingItem.setClimb(nPosY);
}
}
Symbol 1280 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedPaternItem] Frame 0
class com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedPaternItem extends com.sarbakan.utils.StateManaged
{
var oController, sName, nPosX, nPosY, oOwner, oActivationManager, oBackground, sType, mcContainer, nAttachDepth, sAttachLink, sAttachName, nScaleX, nScaleY, nMinBoundX, nMinBoundY, bFixItem, sState, bActive, nCurrentFrame, setState, mcRef, oBounds, nDistUpSide, nDistDownSide, nDistRightSide, nDistLeftSide, sLUBroadcaster, sRUBroadcaster, sLDBroadcaster, sRDBroadcaster, sNextState;
function ActivatedPaternItem (_oItemData, _sName, _oOwner) {
super(undefined);
_oItemData.sItemName = _sName;
oController = com.disney.gem.games.Pirates.Controller.getInstance();
sName = _sName;
nPosX = _oItemData.nPosX;
nPosY = _oItemData.nPosY;
oOwner = _oOwner;
oActivationManager = oOwner.oActivationManager;
oBackground = oOwner.oBackground;
sType = _oItemData.sItemType;
mcContainer = _oItemData.mcContainer;
nAttachDepth = _oItemData.nAttachDepth;
sAttachLink = _oItemData.sItemType;
sAttachName = "mc" + (substring(sName, 2, -1));
nPosX = _oItemData.nPosX;
nPosY = _oItemData.nPosY;
nScaleX = _oItemData.nScaleX;
nScaleY = _oItemData.nScaleY;
if (_oItemData.nMinBoundX != undefined) {
nMinBoundX = _oItemData.nMinBoundX;
} else {
nMinBoundX = 0;
}
if (_oItemData.nMinBoundY != undefined) {
nMinBoundY = _oItemData.nMinBoundY;
} else {
nMinBoundY = 0;
}
bFixItem = false;
if (_oItemData.sStartState != undefined) {
sState = _oItemData.sStartState;
} else {
sState = "Idle";
}
bActive = false;
nCurrentFrame = 0;
activateItem();
oController.oMainBroadcaster.addListener(this);
setState(sState);
}
function state_Idle() {
}
function addToBroadcast() {
_global.P.oPackBroadcaster.addListener(this);
}
function removeFromBroadcast() {
_global.P.oPackBroadcaster.removeListener(this);
}
function setBounds() {
if (mcRef._parent != undefined) {
oBounds = mcRef.getBounds(mcRef._parent);
if (oBounds.xMin > (nPosX - nMinBoundX)) {
oBounds.xMin = nPosX - nMinBoundX;
}
if (oBounds.xMax < (nPosX + nMinBoundX)) {
oBounds.xMax = nPosX + nMinBoundX;
}
if (oBounds.yMin > (nPosY - nMinBoundY)) {
oBounds.yMin = nPosY - nMinBoundY;
}
if (oBounds.yMax < (nPosY + nMinBoundY)) {
oBounds.yMax = nPosY + nMinBoundY;
}
nDistUpSide = nPosY - oBounds.yMin;
nDistDownSide = oBounds.yMax - nPosY;
nDistRightSide = oBounds.xMax - nPosX;
nDistLeftSide = nPosX - oBounds.xMin;
}
}
function addActivateBroadcast() {
sLUBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMin, oBounds.yMin);
sRUBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMax, oBounds.yMin);
sLDBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMin, oBounds.yMax);
sRDBroadcaster = oActivationManager.addToBroadcast(this, oBounds.xMax, oBounds.yMax);
}
function checkDesactivate() {
if (bFixItem == false) {
setBounds();
}
var _local3 = nPosX + oBackground.nPosX;
var _local2 = nPosY + oBackground.nPosY;
var _local5 = _local3 - nDistLeftSide;
var _local6 = _local3 + nDistRightSide;
var _local4 = _local2 - nDistUpSide;
var _local7 = _local2 + nDistDownSide;
if ((((_local6 < oActivationManager.nLActiveLimit) or (_local5 > oActivationManager.nRActiveLimit)) or (_local7 < oActivationManager.nUpActiveLimit)) or (_local4 > oActivationManager.nDwActiveLimit)) {
desactivateItem();
}
}
function checkActivate() {
var _local3 = nPosX + oBackground.nPosX;
var _local2 = nPosY + oBackground.nPosY;
var _local5 = _local3 - nDistLeftSide;
var _local6 = _local3 + nDistRightSide;
var _local4 = _local2 - nDistUpSide;
var _local7 = _local2 + nDistDownSide;
if ((((_local6 < oActivationManager.nLActiveLimit) or (_local5 > oActivationManager.nRActiveLimit)) or (_local7 < oActivationManager.nUpActiveLimit)) or (_local4 > oActivationManager.nDwActiveLimit)) {
} else {
activateItem();
}
}
function activateItem() {
attachItemMovie();
setBounds();
oActivationManager.removeToBroadcast(this, sLUBroadcaster);
oActivationManager.removeToBroadcast(this, sRUBroadcaster);
oActivationManager.removeToBroadcast(this, sLDBroadcaster);
oActivationManager.removeToBroadcast(this, sRDBroadcaster);
if (mcRef.mcForm != undefined) {
bFixItem = true;
mcRef.mcForm.swapDepths(10);
mcRef.mcForm.removeMovieClip();
}
bActive = true;
setState(sState, true);
}
function attachItemMovie() {
mcContainer.attachMovie(sAttachLink, sAttachName, nAttachDepth);
mcRef = mcContainer[sAttachName];
mcRef._x = nPosX;
mcRef._y = nPosY;
mcRef._xscale = nScaleX;
mcRef._yscale = nScaleY;
}
function desactivateItem() {
bActive = false;
mcRef.removeMovieClip();
addActivateBroadcast();
}
function onUpdate() {
if (this["nNbFr" + sState] != undefined) {
nCurrentFrame++;
}
if (sNextState != undefined) {
this[("state_" + sState) + "_end"]();
sState = sNextState;
sNextState = undefined;
mcRef.gotoAndStop(sState);
this[("state_" + sState) + "_init"]();
}
this["state_" + sState]();
if (bActive == true) {
checkDesactivate();
}
}
function stateFinished() {
if (bActive == true) {
return(mcRef.mcState._currentframe == mcRef.mcState._totalframes);
}
return(nCurrentFrame == this["nNbFr" + sState]);
}
function deleteObject() {
mcRef.removeMovieClip();
delete oOwner[sName];
oController.oMainBroadcaster.removeListener(this);
}
}
Symbol 1281 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Obstacle] Frame 0
class com.disney.gem.games.Pirates.game_obj.Obstacle extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedPaternItem
{
var nNbFrNotThere, nNbFrAppear, nNbFrIdle, nNbFrDisappear, nFrCallFear, nOnCounter, nOnOffCounter, nOffCounter, sStatus, nCurrentFrame, bActive, mcRef, stateFinished, oOwner, oController, oHitZone, sState, onUpdate;
function Obstacle (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
nNbFrNotThere = 100;
nNbFrAppear = 15;
nNbFrIdle = 50;
nNbFrDisappear = 15;
nFrCallFear = 2;
nOnCounter = 0;
nOnOffCounter = 0;
nOffCounter = 0;
sStatus = "Off";
createHitZone();
}
function state_Appear_init() {
if ((bActive == true) and (nCurrentFrame != 0)) {
mcRef.mcState.gotoAndPlay(nCurrentFrame);
}
}
function state_Appear() {
if (stateFinished() == true) {
nCurrentFrame = 0;
if (sStatus == "Off") {
setState("Disappear");
} else {
setState("Idle");
}
}
}
function state_Idle_init() {
if ((bActive == true) and (nCurrentFrame != 0)) {
mcRef.mcState.gotoAndPlay(nCurrentFrame);
}
}
function state_Idle() {
if (sStatus == "Off") {
nCurrentFrame = 0;
setState("Disappear");
} else if (stateFinished() == true) {
nCurrentFrame = 0;
if (sStatus != "On") {
setState("Disappear");
}
}
}
function state_IdleEnd() {
}
function state_DoFear() {
if (mcRef.mcState._currentframe == nFrCallFear) {
oOwner.oPlayer.setBeAfraid(this);
} else if (stateFinished() == true) {
oController.restartCurrentLevel();
oController.pause();
}
}
function state_Disappear_init() {
if ((bActive == true) and (nCurrentFrame != 0)) {
mcRef.mcState.gotoAndPlay(nCurrentFrame);
}
}
function state_Disappear() {
if (stateFinished() == true) {
nCurrentFrame = 0;
if (sStatus == "On") {
setState("Appear");
} else {
setState("NotThere");
}
}
}
function state_NotThere_init() {
if ((bActive == true) and (nCurrentFrame != 0)) {
mcRef.mcState.gotoAndPlay(nCurrentFrame);
}
}
function state_NotThere() {
if (sStatus == "On") {
nCurrentFrame = 0;
setState("Appear");
} else if (stateFinished() == true) {
nCurrentFrame = 0;
if (sStatus != "Off") {
setState("Appear");
}
}
}
function state_NotThereAtStart() {
nCurrentFrame = 0;
if (sStatus == "Off") {
setState("NotThere");
} else {
setState("Idle");
}
}
function createHitZone() {
oHitZone = oOwner.createObstacleHitZone(this);
}
function initCounterSet(_oCounterSet) {
nOnCounter = _oCounterSet.nOnCounter;
nOnOffCounter = _oCounterSet.nOnOffCounter;
nOffCounter = _oCounterSet.nOffCounter;
setStatus();
}
function recieveCounter(_oCounterData) {
switch (_oCounterData.sAffectedCounter) {
case "On" :
nOnCounter = nOnCounter + _oCounterData.nCounterModifier;
break;
case "OnOff" :
nOnOffCounter = nOnOffCounter + _oCounterData.nCounterModifier;
break;
case "Off" :
nOffCounter = nOffCounter + _oCounterData.nCounterModifier;
break;
}
setStatus();
}
function looseCounter(_oCounterData) {
switch (_oCounterData.sAffectedCounter) {
case "On" :
nOnCounter = nOnCounter - _oCounterData.nCounterModifier;
break;
case "OnOff" :
nOnOffCounter = nOnOffCounter - _oCounterData.nCounterModifier;
break;
case "Off" :
nOffCounter = nOffCounter - _oCounterData.nCounterModifier;
break;
}
setStatus();
}
function setStatus() {
if ((nOffCounter > nOnOffCounter) and (nOffCounter > nOnCounter)) {
sStatus = "Off";
} else if (nOnOffCounter > nOnCounter) {
sStatus = "OnOff";
} else {
sStatus = "On";
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if (_oMovingItem.sName == "oPlayer") {
_oMovingItem.oControls.bControlsLock = true;
_oMovingItem.nSpdX = 0;
_oMovingItem.bWillBeAfraid = true;
oHitZone.removeFromCollider();
setState("DoFear");
}
}
function setState(_sState, _bInstant) {
super.setState(_sState, _bInstant);
if (_sState == "Idle") {
oHitZone.addToCollider();
} else if (_sState == "Disappear") {
oHitZone.removeFromCollider();
}
}
function onUpdatePaused() {
if (sState == "NotThereAtStart") {
onUpdate();
}
}
}
Symbol 1282 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.SoulType1] Frame 0
class com.disney.gem.games.Pirates.game_obj.SoulType1 extends com.disney.gem.games.Pirates.game_obj.Obstacle
{
var nNbFrNotThere, nNbFrAppear, nNbFrIdle, nNbFrDisappear, nFrCallFear, mcRef, oHitZone, setState;
function SoulType1 (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
nNbFrNotThere = 180;
nNbFrAppear = 23;
nNbFrIdle = 240;
nNbFrDisappear = 25;
nFrCallFear = 25;
}
function state_Appear_init() {
super.state_Appear_init();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "SoulAppear", com.disney.gem.games.Pirates.GameData.SOUL_APPEAR_VOLUME);
}
function state_Disappear_init() {
super.state_Disappear_init();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "SoulDisappear", com.disney.gem.games.Pirates.GameData.SOUL_DISAPPEAR_VOLUME);
}
function state_DoFear() {
super.state_DoFear();
if (mcRef.mcState._currentframe == 15) {
var _local3 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Sabre", com.disney.gem.games.Pirates.GameData.SABRE_VOLUME);
var _local4 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "DoFear1", com.disney.gem.games.Pirates.GameData.DO_FEAR1_VOLUME);
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if ((_oMovingItem.sName == "oPlayer") and (_oMovingItem.bOnGround == true)) {
_oMovingItem.oControls.bControlsLock = true;
_oMovingItem.nSpdX = 0;
_oMovingItem.bWillBeAfraid = true;
oHitZone.removeFromCollider();
setState("DoFear");
}
}
}
Symbol 1283 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.SoulType2] Frame 0
class com.disney.gem.games.Pirates.game_obj.SoulType2 extends com.disney.gem.games.Pirates.game_obj.Obstacle
{
var nNbFrNotThere, nNbFrAppear, nNbFrIdle, nNbFrDisappear, nFrCallFear, mcRef, oHitZone, setState;
function SoulType2 (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
nNbFrNotThere = 180;
nNbFrAppear = 23;
nNbFrIdle = 270;
nNbFrDisappear = 25;
nFrCallFear = 32;
}
function state_Appear_init() {
super.state_Appear_init();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "SoulAppear", com.disney.gem.games.Pirates.GameData.SOUL_APPEAR_VOLUME);
}
function state_Disappear_init() {
super.state_Disappear_init();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "SoulDisappear", com.disney.gem.games.Pirates.GameData.SOUL_DISAPPEAR_VOLUME);
}
function state_DoFear() {
super.state_DoFear();
if (mcRef.mcState._currentframe == 24) {
var _local3 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Sabre", com.disney.gem.games.Pirates.GameData.SABRE_VOLUME);
var _local4 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "DoFear2", com.disney.gem.games.Pirates.GameData.DO_FEAR2_VOLUME);
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if ((_oMovingItem.sName == "oPlayer") and (_oMovingItem.bOnGround == true)) {
_oMovingItem.oControls.bControlsLock = true;
_oMovingItem.nSpdX = 0;
_oMovingItem.bWillBeAfraid = true;
oHitZone.removeFromCollider();
setState("DoFear");
}
}
}
Symbol 1284 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Fire] Frame 0
class com.disney.gem.games.Pirates.game_obj.Fire extends com.disney.gem.games.Pirates.game_obj.Obstacle
{
var nNbFrNotThere, nNbFrAppear, nNbFrIdle, nNbFrDisappear, nFrCallFear;
function Fire (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
nNbFrNotThere = 120;
nNbFrAppear = 24;
nNbFrIdle = 100;
nNbFrDisappear = 40;
nFrCallFear = 7;
}
function state_DoFear_init() {
var _local1 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "FireAppear", com.disney.gem.games.Pirates.GameData.FIRE_APPEAR_VOLUME);
}
function state_Appear_init() {
super.state_Appear_init();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "FireAppear", com.disney.gem.games.Pirates.GameData.FIRE_APPEAR_VOLUME);
}
function state_Disappear_init() {
super.state_Disappear_init();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "FireDisappear", com.disney.gem.games.Pirates.GameData.FIRE_DISAPPEAR_VOLUME);
}
}
Symbol 1285 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.ObstacleHitZone] Frame 0
class com.disney.gem.games.Pirates.game_obj.ObstacleHitZone extends com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider
{
var oLinkObstacle, bIsCollider, mcContainer, sAttachLink, sAttachName, nAttachDepth, mcRef, nPosX, nPosY, nScaleX, nScaleY, oImpactManager, nUpBorder, nRightBorder, nDownBorder, nLeftBorder, oOwner;
function ObstacleHitZone (_oItemData, _sName, _oOwner, _oLinkObstacle) {
super(_oItemData, _sName, _oOwner);
oLinkObstacle = _oLinkObstacle;
bIsCollider = false;
}
function attachItemMovie() {
mcContainer.attachMovie(sAttachLink, sAttachName, nAttachDepth);
mcRef = mcContainer[sAttachName];
mcRef._x = nPosX;
mcRef._y = nPosY;
mcRef._xscale = nScaleX;
mcRef._yscale = nScaleY;
setAsCollider();
if (bIsCollider == false) {
oImpactManager.removeCollider(this);
}
}
function addToCollider() {
if (bIsCollider == false) {
oImpactManager.addCollider(this);
bIsCollider = true;
}
}
function removeFromCollider() {
if (bIsCollider == true) {
oImpactManager.removeCollider(this);
bIsCollider = false;
}
}
function setAsCollider() {
nUpBorder = int((mcRef.mcRightUpBorder._y * nScaleY) / 100);
nRightBorder = int((mcRef.mcRightUpBorder._x * nScaleX) / 100);
nDownBorder = int((mcRef.mcLeftDownBorder._y * nScaleY) / 100);
nLeftBorder = int((mcRef.mcLeftDownBorder._x * nScaleX) / 100);
mcRef.mcLeftDownBorder.swapDepths(10);
mcRef.mcLeftDownBorder.removeMovieClip();
mcRef.mcRightUpBorder.swapDepths(10);
mcRef.mcRightUpBorder.removeMovieClip();
if (oImpactManager == undefined) {
oImpactManager = oOwner.oImpactManager;
}
}
function desactivateItem() {
super.desactivateItem();
if (bIsCollider == true) {
bIsCollider = false;
oImpactManager.removeCollider(this);
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
oLinkObstacle.doImpactResult(_oMovingItem, _oImpactCheckResult);
}
}
Symbol 1286 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.CellKey] Frame 0
class com.disney.gem.games.Pirates.game_obj.CellKey extends com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider
{
var sColor, bKeyIn, oCountersData, stateFinished, setState, checkDesactivate, sState, oOwner;
function CellKey (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
sColor = _oItemData.sColor;
bKeyIn = true;
oCountersData = new Object();
}
function state_Get() {
if (stateFinished() == true) {
bKeyIn = false;
removeCounters();
setState("NotThere");
}
}
function state_Drop() {
if (stateFinished() == true) {
bKeyIn = true;
giveCounters();
setState("Idle");
}
}
function state_NotThere() {
checkDesactivate();
}
function initCounterSet(_oCounterSet) {
for (var _local3 in _oCounterSet) {
oCountersData[_oCounterSet[_local3].sAffectedItem] = new Object();
oCountersData[_oCounterSet[_local3].sAffectedItem] = _oCounterSet[_local3];
}
giveCounters();
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if (((_oMovingItem.sType == "Player") and (_oMovingItem.oControls.bSpacePress == true)) and (_oMovingItem.oControls.bSpaceRelease == true)) {
if ((bKeyIn == true) and (sState == "Idle")) {
_oMovingItem.setGetKey(this);
} else if ((_oMovingItem.oKeys[sColor] == true) and (sState == "NotThere")) {
_oMovingItem.setDropKey(this);
}
}
}
function beGet() {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "GetKey", com.disney.gem.games.Pirates.GameData.GET_KEY_VOLUME);
setState("Get");
}
function beDrop() {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "GetKey", com.disney.gem.games.Pirates.GameData.GET_KEY_VOLUME);
setState("Drop");
}
function giveCounters() {
for (var _local2 in oCountersData) {
oOwner[oCountersData[_local2].sAffectedItem].recieveCounter(oCountersData[_local2]);
}
}
function removeCounters() {
for (var _local2 in oCountersData) {
oOwner[oCountersData[_local2].sAffectedItem].looseCounter(oCountersData[_local2]);
}
}
}
Symbol 1287 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.DoorCellKey] Frame 0
class com.disney.gem.games.Pirates.game_obj.DoorCellKey extends com.disney.gem.games.Pirates.game_obj.CellKey
{
var oLinkDoor, sState, bKeyIn, sColor;
function DoorCellKey (_oItemData, _sName, _oOwner, _oLinkDoor) {
super(_oItemData, _sName, _oOwner);
oLinkDoor = _oLinkDoor;
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if ((((_oMovingItem.sType == "Player") and (_oMovingItem.oControls.bSpacePress == true)) and (_oMovingItem.oControls.bSpaceRelease == true)) and (oLinkDoor.sState == "Open")) {
if ((bKeyIn == true) and (sState == "Idle")) {
_oMovingItem.setGetKey(this);
} else if ((_oMovingItem.oKeys[sColor] == true) and (sState == "NotThere")) {
_oMovingItem.setDropKey(this);
}
}
}
}
Symbol 1288 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Door] Frame 0
class com.disney.gem.games.Pirates.game_obj.Door extends com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider
{
var nLevel, sColor, nDoorBackDepth, mcDoorBackContainer, checkDesactivate, stateFinished, oImpactManager, setState, oOwner, sType, mcDoorBackMovie, nPosX, nPosY;
function Door (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
nLevel = _oOwner.nLevel;
sColor = _oItemData.sColor;
nDoorBackDepth = _oItemData.nDoorBackDepth;
mcDoorBackContainer = _oItemData.mcDoorBackContainer;
attachDoorBackMovie();
createInDoorItem();
}
function state_Close() {
checkDesactivate();
}
function state_Opening() {
if (stateFinished() == true) {
oImpactManager.removeCollider(this);
setState("Open");
}
}
function state_Open_init() {
if (sColor == "Yellow") {
oOwner.oPlayer.setState("WinLevel");
}
}
function state_Open() {
checkDesactivate();
}
function attachItemMovie() {
super.attachItemMovie();
if (mcDoorBackContainer != undefined) {
attachDoorBackMovie();
}
}
function createInDoorItem() {
if (com.disney.gem.games.Pirates.game_obj.DoorItemsData["DataLevel" + nLevel][sType] != undefined) {
oOwner["create" + com.disney.gem.games.Pirates.game_obj.DoorItemsData["DataLevel" + nLevel][sType].sItemBehind](com.disney.gem.games.Pirates.game_obj.DoorItemsData["DataLevel" + nLevel][sType], this);
}
}
function attachDoorBackMovie() {
var _local2 = ("mc" + sType) + "DoorBack";
mcDoorBackContainer.attachMovie("DoorBack", _local2, nDoorBackDepth);
mcDoorBackMovie = mcDoorBackContainer[_local2];
mcDoorBackMovie._x = nPosX;
mcDoorBackMovie._y = nPosY;
}
function desactivateItem() {
super.desactivateItem();
mcDoorBackMovie.removeMovieClip();
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if ((((_oMovingItem.sType == "Player") and (_oMovingItem.oControls.bSpacePress == true)) and (_oMovingItem.oControls.bSpaceRelease == true)) and (_oMovingItem.oKeys[sColor] == true)) {
_oMovingItem.setOpenDoor(this);
}
}
}
Symbol 1289 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.DoorItemsData] Frame 0
class com.disney.gem.games.Pirates.game_obj.DoorItemsData
{
function DoorItemsData () {
}
static var DataLevel1 = {YellowDoor:{sItemBehind:"Prisoner1", sItemType:"Prisoner1"}};
static var DataLevel2 = {RedDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, YellowDoor:{sItemBehind:"Prisoner2", sItemType:"Prisoner2"}};
static var DataLevel3 = {BlueDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, RedDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, YellowDoor:{sItemBehind:"Prisoner3", sItemType:"Prisoner3"}};
static var DataLevel4 = {BlueDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, RedDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, GreenDoor:{sItemBehind:"DoorCellKey", sItemType:"RedCellKey", sColor:"Red"}, YellowDoor:{sItemBehind:"Prisoner4", sItemType:"Prisoner4"}};
static var DataLevel5 = {BlueDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, RedDoor:{sItemBehind:"DoorCellKey", sItemType:"GreenCellKey", sColor:"Green"}, GreenDoor:{sItemBehind:"DoorCellKey", sItemType:"BlueCellKey", sColor:"Blue"}, PinkDoor:{sItemBehind:"DoorCellKey", sItemType:"YellowCellKey", sColor:"Yellow"}, YellowDoor:{sItemBehind:"Prisoner5", sItemType:"Prisoner5"}};
static var DataLevel6 = {BlueDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, RedDoor:{sItemBehind:"DoorCellKey", sItemType:"YellowCellKey", sColor:"Yellow"}, GreenDoor:{sItemBehind:"DoorCellKey", sItemType:"PinkCellKey", sColor:"Pink"}, PinkDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, OrangeDoor:{sItemBehind:"DoorCellKey", sItemType:"RedCellKey", sColor:"Red"}, YellowDoor:{sItemBehind:"Prisoner6", sItemType:"Prisoner6"}};
static var DataLevel7 = {BlueDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, RedDoor:{sItemBehind:"DoorToken", sItemType:"Token"}, GreenDoor:{sItemBehind:"DoorCellKey", sItemType:"BlueCellKey", sColor:"Blue"}, PinkDoor:{sItemBehind:"DoorCellKey", sItemType:"RedCellKey", sColor:"Red"}, OrangeDoor:{sItemBehind:"DoorCellKey", sItemType:"YellowCellKey", sColor:"Yellow"}, YellowDoor:{sItemBehind:"Prisoner7", sItemType:"Prisoner7"}};
}
Symbol 1290 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Token] Frame 0
class com.disney.gem.games.Pirates.game_obj.Token extends com.disney.gem.games.Pirates.game_obj.scroll_sys.InsideCollider
{
var nPtsValue, stateFinished, deleteObject, oImpactManager, setState;
function Token (_oItemData, _sName, _oOwner) {
super(_oItemData, _sName, _oOwner);
nPtsValue = 1000;
}
function state_Get() {
if (stateFinished() == true) {
deleteObject();
}
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if (_oMovingItem.sType == "Player") {
_oMovingItem.getPts(nPtsValue);
oImpactManager.removeCollider(this);
setState("Get");
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "GetToken", com.disney.gem.games.Pirates.GameData.GET_TOKEN_VOLUME);
}
}
}
Symbol 1291 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.DoorToken] Frame 0
class com.disney.gem.games.Pirates.game_obj.DoorToken extends com.disney.gem.games.Pirates.game_obj.Token
{
var oLinkDoor, nPtsValue, oImpactManager, setState;
function DoorToken (_oItemData, _sName, _oOwner, _oLinkDoor) {
super(_oItemData, _sName, _oOwner);
oLinkDoor = _oLinkDoor;
}
function doImpactResult(_oMovingItem, _oImpactCheckResult) {
if ((_oMovingItem.sType == "Player") and (oLinkDoor.sState == "Open")) {
_oMovingItem.getPts(nPtsValue);
oImpactManager.removeCollider(this);
setState("Get");
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "GetToken", com.disney.gem.games.Pirates.GameData.GET_TOKEN_VOLUME);
}
}
}
Symbol 1292 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.Prisoner] Frame 0
class com.disney.gem.games.Pirates.game_obj.Prisoner extends com.disney.gem.games.Pirates.game_obj.scroll_sys.ActivatedItem
{
var oLinkDoor;
function Prisoner (_oItemData, _sName, _oOwner, _oLinkDoor) {
super(_oItemData, _sName, _oOwner);
oLinkDoor = _oLinkDoor;
}
}
Symbol 1293 MovieClip [__Packages.com.disney.gem.games.Pirates.game_obj.CountersData] Frame 0
class com.disney.gem.games.Pirates.game_obj.CountersData
{
function CountersData () {
}
static var DataLevel1 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle2:{sName:"oObstacle2", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}}, oKeysData:{oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"On", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle2", sAffectedCounter:"On", nCounterModifier:1}}}}};
static var DataLevel2 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle4:{sName:"oObstacle4", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle6:{sName:"oObstacle6", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle7:{sName:"oObstacle7", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}}, oKeysData:{oDataRedCellKey:{sName:"oRedCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"Off", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle6", sAffectedCounter:"On", nCounterModifier:1}, oSet4:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}}}, oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle3", sAffectedCounter:"On", nCounterModifier:1}}}}};
static var DataLevel3 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle2:{sName:"oObstacle2", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle4:{sName:"oObstacle4", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle5:{sName:"oObstacle5", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle6:{sName:"oObstacle6", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle7:{sName:"oObstacle7", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}}, oKeysData:{oDataRedCellKey:{sName:"oRedCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle3", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle5", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:2}}}, oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle3", sAffectedCounter:"Off", nCounterModifier:2}, oSet3:{sAffectedItem:"oObstacle5", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataBlueCellKey:{sName:"oBlueCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle7", sAffectedCounter:"Off", nCounterModifier:1}}}}};
static var DataLevel4 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle2:{sName:"oObstacle2", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle4:{sName:"oObstacle4", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle5:{sName:"oObstacle5", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}}, oKeysData:{oDataRedCellKey:{sName:"oRedCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"On", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle2", sAffectedCounter:"On", nCounterModifier:1}}}, oDataBlueCellKey:{sName:"oBlueCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle5", sAffectedCounter:"On", nCounterModifier:1}}}, oDataGreenCellKey:{sName:"oGreenCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle2", sAffectedCounter:"Off", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle3", sAffectedCounter:"On", nCounterModifier:1}}}}};
static var DataLevel5 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle2:{sName:"oObstacle2", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle4:{sName:"oObstacle4", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle5:{sName:"oObstacle5", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle6:{sName:"oObstacle6", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle7:{sName:"oObstacle7", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle8:{sName:"oObstacle8", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle9:{sName:"oObstacle9", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}}, oKeysData:{oDataRedCellKey:{sName:"oRedCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle4", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle5", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet4:{sAffectedItem:"oObstacle6", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet5:{sAffectedItem:"oObstacle7", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"On", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataBlueCellKey:{sName:"oBlueCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle5", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle7", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataGreenCellKey:{sName:"oGreenCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle2", sAffectedCounter:"On", nCounterModifier:1}}}, oDataPinkCellKey:{sName:"oPinkCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle3", sAffectedCounter:"On", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle4", sAffectedCounter:"On", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle6", sAffectedCounter:"On", nCounterModifier:2}, oSet4:{sAffectedItem:"oObstacle7", sAffectedCounter:"Off", nCounterModifier:1}}}}};
static var DataLevel6 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle2:{sName:"oObstacle2", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle4:{sName:"oObstacle4", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle5:{sName:"oObstacle5", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle6:{sName:"oObstacle6", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle7:{sName:"oObstacle7", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}}, oKeysData:{oDataRedCellKey:{sName:"oRedCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle3", sAffectedCounter:"Off", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle6", sAffectedCounter:"Off", nCounterModifier:2}}}, oDataBlueCellKey:{sName:"oBlueCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle2", sAffectedCounter:"On", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataGreenCellKey:{sName:"oGreenCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle3", sAffectedCounter:"On", nCounterModifier:1}}}, oDataPinkCellKey:{sName:"oPinkCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle4", sAffectedCounter:"On", nCounterModifier:2}}}, oDataOrangeCellKey:{sName:"oOrangeCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}}}}};
static var DataLevel7 = {oObstaclesData:{oDataObstacle1:{sName:"oObstacle1", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle2:{sName:"oObstacle2", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle3:{sName:"oObstacle3", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle4:{sName:"oObstacle4", oCounterSet:{nOnCounter:1, nOnOffCounter:0, nOffCounter:0}}, oDataObstacle5:{sName:"oObstacle5", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle6:{sName:"oObstacle6", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle7:{sName:"oObstacle7", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle8:{sName:"oObstacle8", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle9:{sName:"oObstacle9", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle10:{sName:"oObstacle10", oCounterSet:{nOnCounter:0, nOnOffCounter:0, nOffCounter:1}}, oDataObstacle11:{sName:"oObstacle11", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}, oDataObstacle12:{sName:"oObstacle12", oCounterSet:{nOnCounter:0, nOnOffCounter:1, nOffCounter:0}}}, oKeysData:{oDataRedCellKey:{sName:"oRedCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"On", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle2", sAffectedCounter:"Off", nCounterModifier:2}, oSet3:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}}}, oDataYellowCellKey:{sName:"oYellowCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle8", sAffectedCounter:"Off", nCounterModifier:2}}}, oDataBlueCellKey:{sName:"oBlueCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle1", sAffectedCounter:"OnOff", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle2", sAffectedCounter:"On", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle3", sAffectedCounter:"Off", nCounterModifier:1}, oSet4:{sAffectedItem:"oObstacle6", sAffectedCounter:"OnOff", nCounterModifier:2}, oSet5:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}}}, oDataGreenCellKey:{sName:"oGreenCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle8", sAffectedCounter:"On", nCounterModifier:2}, oSet3:{sAffectedItem:"oObstacle10", sAffectedCounter:"On", nCounterModifier:1}, oSet4:{sAffectedItem:"oObstacle11", sAffectedCounter:"On", nCounterModifier:1}}}, oDataPinkCellKey:{sName:"oPinkCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle3", sAffectedCounter:"Off", nCounterModifier:1}, oSet2:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle10", sAffectedCounter:"Off", nCounterModifier:1}}}, oDataOrangeCellKey:{sName:"oOrangeCellKey", oCounterSet:{oSet1:{sAffectedItem:"oObstacle3", sAffectedCounter:"Off", nCounterModifier:2}, oSet2:{sAffectedItem:"oObstacle4", sAffectedCounter:"Off", nCounterModifier:1}, oSet3:{sAffectedItem:"oObstacle7", sAffectedCounter:"On", nCounterModifier:1}, oSet4:{sAffectedItem:"oObstacle8", sAffectedCounter:"On", nCounterModifier:2}}}}};
}
Symbol 1294 MovieClip [__Packages.com.sarbakan.utils.Tools] Frame 0
class com.sarbakan.utils.Tools
{
function Tools () {
}
static function isItemInArray(_aArray, _oItem) {
var _local3 = false;
var _local1 = _aArray.length - 1;
while (_local1 >= 0) {
if (_aArray[_local1] == _oItem) {
_local3 = true;
}
_local1--;
}
return(_local3);
}
static function doCopyArray(_aArraySource) {
var _local3 = new Array();
var _local1 = 0;
_local1 = 0;
while (_local1 < _aArraySource.length) {
if (_aArraySource[_local1] instanceof Array) {
_local3.push(doCopyArray(_aArraySource[_local1]));
} else {
_local3.push(_aArraySource[_local1]);
}
_local1++;
}
return(_local3);
}
static function getFormatedNumber(_nNumber, _nMinimumChar) {
return(returnFormatedNumber(_nNumber, _nMinimumChar));
}
static function returnFormatedNumber(_nNumber, _nMinimumChar) {
var _local1 = String(_nNumber);
while (_local1.length < _nMinimumChar) {
_local1 = "0" + _local1;
}
var _local3 = new Array();
var _local6 = _local1.length - 1;
var _local2;
_local2 = 0;
while (_local2 <= _local6) {
var _local5 = _local1.charAt(_local2);
_local3.push(_local5);
_local2++;
}
_local1 = "";
var _local4 = 0;
_local2 = _local3.length - 1;
while (_local2 >= 0) {
if (((_local4 % 3) == 0) && (_local4 != 0)) {
_local1 = "," + _local1;
}
_local1 = _local3[_local2] + _local1;
_local4++;
_local2--;
}
return(_local1);
}
static function getFormatedTime(_nTime, _bIncludeMilliseconds, _bShowMinutes) {
if (_bIncludeMilliseconds == undefined) {
_bIncludeMilliseconds = false;
}
if (_bShowMinutes == undefined) {
_bShowMinutes = true;
}
var _local6 = false;
if (_nTime < 0) {
_local6 = true;
_nTime = Math.abs(_nTime);
}
var _local4 = Math.floor(_nTime / 1000);
var _local3;
if (_bIncludeMilliseconds) {
var _local5;
if (_nTime >= 1000) {
_local5 = _nTime % (_local4 * 1000);
} else {
_local5 = _nTime;
}
_local3 = String(_local5).substr(0, 2);
if (_local3.length <= 1) {
_local3 = "0" + _local3;
}
}
var _local7 = Math.floor(_local4 / 60);
var _local8 = Math.floor(_local4 % 60);
var _local11 = "";
var _local9 = "";
if (_local8 < 10) {
_local9 = "0";
}
if (_local7 < 10) {
_local11 = "0";
}
var _local1 = "";
if (_bShowMinutes) {
_local1 = _local1 + String((_local11 + _local7) + ":");
}
_local1 = _local1 + (_local9 + _local8);
if (_bIncludeMilliseconds) {
_local1 = _local1 + (":" + _local3);
}
if (_local6) {
_local1 = "-" + _local1;
}
return(_local1);
}
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 1295 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.TitleScreen] Frame 0
class com.disney.gem.games.Pirates.screens.TitleScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function TitleScreen (_mcRef) {
super(_mcRef);
}
function onBtHelp() {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
oController.showInstructions();
}
function onPressBtPlay() {
var _local1 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "BtnClick", com.disney.gem.games.Pirates.GameData.BTN_CLICK_VOLUME);
}
function onBtPlay() {
oController.startNewGame();
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
function state_idle_init() {
mcRef.mcState.mcContent.btHelp.onRelease = com.sarbakan.utils.Delegate.create(this, onBtHelp);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btHelp);
mcRef.mcState.mcContent.btPlay.onRelease = com.sarbakan.utils.Delegate.create(this, onBtPlay);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btPlay);
}
}
Symbol 1296 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.HelpScreen] Frame 0
class com.disney.gem.games.Pirates.screens.HelpScreen extends com.sarbakan.utils.ScreenController
{
var mcRef, oController;
function HelpScreen (_mcRef) {
super(_mcRef);
}
function onBtNext() {
mcRef.mcState.mcContent.nextFrame();
mcRef.mcState.mcContent.btBack.onRelease = com.sarbakan.utils.Delegate.create(this, onBtBack);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btBack);
mcRef.mcState.mcContent.btPlay.onRelease = com.sarbakan.utils.Delegate.create(this, onBtPlay);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btPlay);
}
function onBtBack() {
mcRef.mcState.mcContent.prevFrame();
mcRef.mcState.mcContent.btNext.onRelease = com.sarbakan.utils.Delegate.create(this, onBtNext);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btNext);
}
function onBtPlay() {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
oController.hideInstructions();
}
function state_idle_init() {
mcRef.mcState.mcContent.btNext.onRelease = com.sarbakan.utils.Delegate.create(this, onBtNext);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btNext);
}
}
Symbol 1297 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.LooseScreen] Frame 0
class com.disney.gem.games.Pirates.screens.LooseScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function LooseScreen (_mcRef) {
super(_mcRef);
oController = com.disney.gem.games.Pirates.Controller.getInstance();
}
function onBtTryAgain() {
oController.oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionClose));
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
function state_idle_init() {
oController.startMusPack();
oController.setScore(oController.nScore);
mcRef.mcState.mcContent.txtScore = com.sarbakan.utils.Tools.getFormatedNumber(oController.nScore, 1);
mcRef.mcState.mcContent.btTryAgain.onRelease = com.sarbakan.utils.Delegate.create(this, onBtTryAgain);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btTryAgain);
}
function onLevelTransitionClose() {
oController.returnToTitle();
}
}
Symbol 1298 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.WinScreen] Frame 0
class com.disney.gem.games.Pirates.screens.WinScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function WinScreen (_mcRef) {
super(_mcRef);
oController = com.disney.gem.games.Pirates.Controller.getInstance();
}
function onBtPlayAgain() {
oController.oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionClose));
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
function state_idle_init() {
oController.setScore(oController.nScore);
mcRef.mcState.mcContent.txtScore = com.sarbakan.utils.Tools.getFormatedNumber(oController.nScore, 1);
mcRef.mcState.mcContent.btPlayAgain.onRelease = com.sarbakan.utils.Delegate.create(this, onBtPlayAgain);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btPlayAgain);
}
function onLevelTransitionClose() {
oController.returnToTitle();
}
}
Symbol 1299 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.WinLevelScreen] Frame 0
class com.disney.gem.games.Pirates.screens.WinLevelScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function WinLevelScreen (_mcRef) {
super(_mcRef);
oController = com.disney.gem.games.Pirates.Controller.getInstance();
}
function onBtContinu() {
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
oController.startNextLevel();
}
function state_idle_init() {
oController.startMusPack();
mcRef.mcState.mcContent.btContinu.onRelease = com.sarbakan.utils.Delegate.create(this, onBtContinu);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcContent.btContinu);
mcRef.mcState.mcContent.txtCurrentScore = com.sarbakan.utils.Tools.getFormatedNumber(oController.nScore, 1);
mcRef.mcState.mcContent.txtTimeBonus = com.sarbakan.utils.Tools.getFormatedNumber(oController.nTimeBonus, 1);
oController.nScore = oController.nScore + oController.nTimeBonus;
oController.setScore(oController.nScore);
mcRef.mcState.mcContent.txtNewScore = com.sarbakan.utils.Tools.getFormatedNumber(oController.nScore, 1);
}
function onLevelTransitionClose() {
}
}
Symbol 1300 MovieClip [__Packages.com.disney.gem.games.Pirates.popups.ShowLevel] Frame 0
class com.disney.gem.games.Pirates.popups.ShowLevel extends com.sarbakan.utils.ScreenController
{
var sName, oController, mcRef, stateFinished, setState;
function ShowLevel (_mcRef, _sName) {
super(_mcRef);
sName = _sName;
oController = com.disney.gem.games.Pirates.Controller.getInstance();
}
function state_in_init() {
mcRef.mcState.txtLevelFront = "\u30EC\u30D9\u30EB " + oController.getLevel();
mcRef.mcState.txtLevelBack = "\u30EC\u30D9\u30EB " + oController.getLevel();
}
function state_idle_init() {
mcRef.mcState.txtLevelFront = "\u30EC\u30D9\u30EB " + oController.getLevel();
mcRef.mcState.txtLevelBack = "\u30EC\u30D9\u30EB " + oController.getLevel();
}
function state_idle() {
if (stateFinished() == true) {
setState("out");
}
}
function state_out_init() {
mcRef.mcState.txtLevelFront = "\u30EC\u30D9\u30EB " + oController.getLevel();
mcRef.mcState.txtLevelBack = "\u30EC\u30D9\u30EB " + oController.getLevel();
}
function state_out() {
if (stateFinished() == true) {
oController.startMusGame();
oController.unpause();
oController.allowInstructions();
}
super.state_out();
}
}
Symbol 1301 MovieClip [__Packages.com.disney.gem.games.Pirates.popups.Menu] Frame 0
class com.disney.gem.games.Pirates.popups.Menu extends com.sarbakan.utils.ScreenController
{
var oController, sName, sClosingBtn, setState, mcRef, stateFinished;
function Menu (_mcRef, _sName) {
super(_mcRef);
oController = com.disney.gem.games.Pirates.Controller.getInstance();
com.disney.gem.games.Pirates.Controller(oController).oMenu = this;
sName = _sName;
sClosingBtn = "";
}
function onBtResume() {
sClosingBtn = "Resume";
setState("out");
}
function onBtHelp() {
sClosingBtn = "Help";
oController.showInstructions();
oController.oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionClose));
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
function onBtSound() {
com.disney.gem.games.Pirates.Controller(oController).toggleSound();
updateSoundGroup();
}
function onBtQuit() {
oController.callPopup("Quit");
}
function state_in_init() {
updateSoundGroup();
}
function state_idle_init() {
updateSoundGroup();
mcRef.mcState.btResume.onRelease = com.sarbakan.utils.Delegate.create(this, onBtResume);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.btResume);
mcRef.mcState.btHelp.onRelease = com.sarbakan.utils.Delegate.create(this, onBtHelp);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.btHelp);
mcRef.mcState.btQuit.onRelease = com.sarbakan.utils.Delegate.create(this, onBtQuit);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.btQuit);
}
function state_out_init() {
updateSoundGroup();
}
function state_out() {
if (stateFinished() == true) {
if (sClosingBtn == "Resume") {
sClosingBtn = "";
oController.unpause();
}
}
super.state_out();
}
function updateSoundGroup() {
var _local2 = "On";
if (com.disney.gem.games.Pirates.Controller(oController).bSoundMuted) {
_local2 = "Off";
}
mcRef.mcState.mcSoundToggle.gotoAndStop(_local2);
delete mcRef.mcState.mcSoundToggle.btSound.onRelease;
mcRef.mcState.mcSoundToggle.btSound.onRelease = com.sarbakan.utils.Delegate.create(this, onBtSound);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.mcSoundToggle.btSound);
}
function onLevelTransitionClose() {
if (sClosingBtn == "Help") {
setState("out");
oController.showScreen(new com.disney.gem.games.Pirates.screens.HelpScreen(oController.mcTimeline.mcScreens.mcHelp), false);
}
}
}
Symbol 1302 MovieClip [__Packages.com.disney.gem.games.Pirates.popups.QuitConfirm] Frame 0
class com.disney.gem.games.Pirates.popups.QuitConfirm extends com.sarbakan.utils.ScreenController
{
var sName, oController, setState, mcRef, stateFinished;
function QuitConfirm (_mcRef, _sName) {
super(_mcRef);
sName = _sName;
oController = com.disney.gem.games.Pirates.Controller.getInstance();
}
function onBtYes() {
oController.MusGame.setFadeRate(10);
oController.MusGame.doFadeTo(0);
oController.oTransitionManager.playTransition("default", com.sarbakan.utils.Delegate.create(this, onLevelTransitionClose));
var _local2 = com.sarbakan.sound.SoundManager.doPlaySoundInCat(com.disney.gem.games.Pirates.Controller.sSOUND_CAT_SOUND, "Transit", com.disney.gem.games.Pirates.GameData.TRANSIT_VOLUME);
}
function onBtNo() {
setState("out");
}
function state_in_init() {
}
function state_idle_init() {
mcRef.mcState.btYes.onRelease = com.sarbakan.utils.Delegate.create(this, onBtYes);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.btYes);
mcRef.mcState.btNo.onRelease = com.sarbakan.utils.Delegate.create(this, onBtNo);
com.disney.gem.games.Pirates.game_obj.Buttons.patch(mcRef.mcState.btNo);
}
function state_out_init() {
}
function state_out() {
super.state_out();
if (stateFinished() == true) {
oController.allowInstructions();
}
}
function onLevelTransitionClose() {
for (var _local2 in oController.aPopups) {
oController.aPopups[_local2].setState(com.sarbakan.utils.ScreenController.sSTATE_HIDDEN, true);
oController.aPopups[_local2].fHideCallBack();
}
oController.doQuitGame();
}
}
Symbol 1303 MovieClip [__Packages.com.disney.gem.games.Pirates.screens.PreloaderScreen] Frame 0
class com.disney.gem.games.Pirates.screens.PreloaderScreen extends com.sarbakan.utils.ScreenController
{
var oController, mcRef;
function PreloaderScreen (_mcRef) {
super(_mcRef);
}
function state_idle() {
var _local2 = oController.mcTimeline.getBytesLoaded() / oController.mcTimeline.getBytesTotal();
mcRef.mcState.mcBar.gotoAndStop(Math.round(_local2 * 100));
if (_local2 == 1) {
oController.onPreloadingDone();
}
}
}
Symbol 584 MovieClip Frame 1
stop();
Symbol 950 MovieClip Frame 1
stop();
Symbol 1049 MovieClip Frame 1
stop();
Symbol 1051 MovieClip Frame 10
LockBtn.useHandCursor = false;
Symbol 1143 MovieClip Frame 10
LockBtn.useHandCursor = false;
Symbol 1143 MovieClip Frame 20
LockBtn.useHandCursor = false;
Symbol 1143 MovieClip Frame 30
LockBtn.useHandCursor = false;
Symbol 1154 MovieClip Frame 10
LockBtn.useHandCursor = false;
Symbol 1154 MovieClip Frame 20
LockBtn.useHandCursor = false;
Symbol 1154 MovieClip Frame 30
LockBtn.useHandCursor = false;
Symbol 1162 MovieClip Frame 10
LockBtn.useHandCursor = false;
Symbol 1162 MovieClip Frame 20
LockBtn.useHandCursor = false;
Symbol 1162 MovieClip Frame 30
LockBtn.useHandCursor = false;
Symbol 1177 MovieClip Frame 10
LockBtn.useHandCursor = false;
Symbol 1177 MovieClip Frame 20
LockBtn.useHandCursor = false;
Instance of Symbol 1181 MovieClip in Symbol 1182 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10);
this.removeMovieClip();
}