Frame 2
var my_lv = new LoadVars();
var currUrl = _url.toLowerCase();
my_lv.onLoad = function (success) {
if (success) {
if (Define.ENABLE_PROTECTION && ((this.variable1 != "gromenauerl") || (_root.currUrl.indexOf("www.newgrounds.com") <= 0))) {
_root.gotoAndStop("not_allowed");
}
} else if (Define.ENABLE_PROTECTION) {
_root.gotoAndStop("not_allowed");
}
};
if (Define.ENABLE_PROTECTION) {
my_lv.load("http://www.freecreationgames.net/files/games/xxxyyyzzz.txt");
}
stop();
Frame 10
stop();
Frame 21
Frame 37
stop();
Frame 46
stop();
Frame 47
nmSounds = new Array();
nmSoundsBackground = new Array();
nmSoundEnabled = true;
nmPreviousSoundLoaded = -1;
nmCurrentSoundLoaded = 0;
nmCurrentSoundPlayer = 0;
var gSoundIsFinished = true;
loadGameSound = function (nindex) {
var _local2 = new Sound();
nmPreviousSoundLoaded = nmCurrentSoundLoaded;
switch (nindex) {
case Define.SOUNDS_MELODIA_MENU :
_local2.attachSound("melodiamenu");
break;
case Define.SOUNDS_SELECCION :
_local2.attachSound("tonoseleccion");
break;
case Define.SOUNDS_INICIO_NIVEL :
_local2.attachSound("melodiainicionivel");
break;
case Define.SOUNDS_VICTORIA :
_local2.attachSound("melodiavictoria");
break;
case Define.SOUNDS_DERROTA :
_local2.attachSound("melodiaderrota");
break;
case Define.SOUNDS_FX_BOING :
_local2.attachSound("Boing");
_local2.onSoundComplete = function () {
_root.gSoundIsFinished = true;
};
break;
case Define.SOUNDS_FX_HOLE_CLOSING :
_local2.attachSound("HoleBackground");
break;
case Define.SOUNDS_VOICE_1 :
_local2.attachSound("voice1");
break;
case Define.SOUNDS_VOICE_2 :
_local2.attachSound("voice2");
break;
case Define.SOUNDS_VOICE_3 :
_local2.attachSound("voice3");
break;
case Define.SOUNDS_VOICE_4 :
_local2.attachSound("voice4");
break;
case Define.SOUNDS_VOICE_5 :
_local2.attachSound("voice5");
break;
case Define.SOUNDS_VOICE_6 :
_local2.attachSound("voice6");
break;
case Define.SOUNDS_VOICE_7 :
_local2.attachSound("voice7");
break;
case Define.SOUNDS_VOICE_8 :
_local2.attachSound("voice8");
break;
case Define.SOUNDS_VOICE_9 :
_local2.attachSound("voice9");
break;
case Define.SOUNDS_VOICE_10 :
_local2.attachSound("voice10");
break;
case Define.SOUNDS_VOICE_11 :
_local2.attachSound("voice11");
break;
case Define.SOUNDS_VOICE_12 :
_local2.attachSound("voice12");
break;
case Define.SOUNDS_VOICE_13 :
_local2.attachSound("voice13");
break;
case Define.SOUNDS_VOICE_14 :
_local2.attachSound("voice14");
break;
case Define.SOUNDS_VOICE_15 :
_local2.attachSound("voice15");
break;
case Define.SOUNDS_VOICE_16 :
_local2.attachSound("voice16");
break;
case Define.SOUNDS_VOICE_17 :
_local2.attachSound("voice17");
break;
case Define.SOUNDS_VOICE_18 :
_local2.attachSound("voice18");
}
_root.nmCurrentSoundLoaded = _root.nmCurrentSoundLoaded + 1;
nmSounds.push(_local2);
};
getSoundIdentificator = function (nindex) {
switch (nindex) {
case Define.SOUNDS_MELODIA_MENU :
return("melodiamenu");
case Define.SOUNDS_SELECCION :
return("tonoseleccion");
case Define.SOUNDS_INICIO_NIVEL :
return("melodiainicionivel");
case Define.SOUNDS_VICTORIA :
return("melodiavictoria");
case Define.SOUNDS_DERROTA :
return("melodiaderrota");
case Define.SOUNDS_FX_BOING :
return("Boing");
case Define.SOUNDS_FX_HOLE_CLOSING :
return("HoleBackground");
case Define.SOUNDS_VOICE_1 :
return("voice1");
case Define.SOUNDS_VOICE_2 :
return("voice2");
case Define.SOUNDS_VOICE_3 :
return("voice3");
case Define.SOUNDS_VOICE_4 :
return("voice4");
case Define.SOUNDS_VOICE_5 :
return("voice5");
case Define.SOUNDS_VOICE_6 :
return("voice6");
case Define.SOUNDS_VOICE_7 :
return("voice7");
case Define.SOUNDS_VOICE_8 :
return("voice8");
case Define.SOUNDS_VOICE_9 :
return("voice9");
case Define.SOUNDS_VOICE_10 :
return("voice10");
case Define.SOUNDS_VOICE_11 :
return("voice11");
case Define.SOUNDS_VOICE_12 :
return("voice12");
case Define.SOUNDS_VOICE_13 :
return("voice13");
case Define.SOUNDS_VOICE_14 :
return("voice14");
case Define.SOUNDS_VOICE_15 :
return("voice15");
case Define.SOUNDS_VOICE_16 :
return("voice16");
case Define.SOUNDS_VOICE_17 :
return("voice17");
case Define.SOUNDS_VOICE_18 :
return("voice18");
}
return("nulo");
};
stopGameSounds = function () {
var _local1 = 0;
while (_local1 < nmSounds.length) {
nmSounds[_local1].stop(getSoundIdentificator(_local1));
_local1++;
}
};
playGameSound = function (nindex, iter) {
nmCurrentSoundPlayer = nindex;
if (nmSoundEnabled == true) {
nmSounds[nindex].start(0, iter);
}
};
playGameSoundStops = function (nindex, iter) {
nmCurrentSoundPlayer = nindex;
if (nmSoundEnabled == true) {
stopGameSounds();
nmSounds[nindex].start(0, iter);
}
};
playGameSoundStops_AndWaitToFinish = function (nindex, iter) {
if (gSoundIsFinished) {
gSoundIsFinished = false;
nmCurrentSoundPlayer = nindex;
if (nmSoundEnabled == true) {
stopGameSounds();
nmSounds[nindex].start(0, iter);
}
}
};
loadGameSoundBackground = function (nindex) {
var _local1 = new Sound();
switch (nindex) {
case Define.SOUNDS_LOOP_1 :
_local1.attachSound("loop_1");
break;
case Define.SOUNDS_LOOP_2 :
_local1.attachSound("loop_2");
break;
case Define.SOUNDS_LOOP_3 :
_local1.attachSound("loop_3");
break;
case Define.SOUNDS_LOOP_4 :
_local1.attachSound("loop_4");
}
nmSoundsBackground.push(_local1);
};
stopGameSoundsBackground = function () {
var _local1 = 0;
while (_local1 < nmSoundsBackground.length) {
nmSoundsBackground[_local1].stop();
_local1++;
}
};
playGameSoundBackground = function (nindex, iter) {
if (nmSoundEnabled == true) {
nmSoundsBackground[nindex].start(0, 1000);
}
};
totalLevelsGolfAdventure = Define.TOTAL_NUMBER_OF_LEVELS;
var listLevelScore;
var listLevelHits;
loadGameData = function () {
listLevelScore = new Array();
listLevelHits = new Array();
var _local1 = 0;
while (_local1 < totalLevelsGolfAdventure) {
listLevelScore.push(-1);
listLevelHits.push(-1);
_local1++;
}
nmTotalLevelDone = 0;
var _local2 = SharedObject.getLocal(nmRecordStoreName);
gTutorialHasBeenPlayed = _local2.data.levelData.tutorialPlayed;
if (isNaN(gTutorialHasBeenPlayed)) {
gTutorialHasBeenPlayed = 0;
}
nmDifficultySetted = _local2.data.levelData.difficultySetted;
if (isNaN(nmDifficultySetted)) {
nmDifficultySetted = 1;
} else if ((nmDifficultySetted < 0) || (nmDifficultySetted > 4)) {
nmDifficultySetted = 1;
}
_local1 = 0;
while (_local1 < totalLevelsGolfAdventure) {
listLevelScore[_local1] = _local2.data.levelData.listLevelScore[_local1];
if (!isNaN(listLevelScore[_local1])) {
nmTotalLevelDone++;
}
_local1++;
}
_local1 = 0;
while (_local1 < totalLevelsGolfAdventure) {
listLevelHits[_local1] = _local2.data.levelData.listLevelHits[_local1];
_local1++;
}
if (nmTotalLevelDone >= totalLevelsGolfAdventure) {
nmTotalLevelDone = totalLevelsGolfAdventure - 1;
}
};
saveGameData = function () {
var _local1 = new Object();
_local1.tutorialPlayed = gTutorialHasBeenPlayed;
_local1.difficultySetted = nmDifficultySetted;
_local1.listLevelScore = listLevelScore;
_local1.listLevelHits = listLevelHits;
var _local2 = SharedObject.getLocal(nmRecordStoreName);
_local2.data.levelData = _local1;
_local2.flush();
};
saveGameDataLevel = function () {
if (!isNaN(listLevelScore[gCurrentLevel])) {
var _local3 = new Date();
var _local2 = _local3.getTime();
timeDoneInCurrentLevel = Math.floor((_local2 - nmInitialTime) / 1000);
var _local4 = _root.instGame.setLevelDifficulty(_root.gCurrentLevel) - _root.instGame.gNumberHitsAvailable;
if (listLevelHits[gCurrentLevel] > _local4) {
listLevelHits[gCurrentLevel] = _local4;
listLevelScore[gCurrentLevel] = timeDoneInCurrentLevel;
}
} else {
var _local3 = new Date();
var _local2 = _local3.getTime();
timeDoneInCurrentLevel = Math.floor((_local2 - nmInitialTime) / 1000);
var _local4 = _root.instGame.setLevelDifficulty(_root.gCurrentLevel) - _root.instGame.gNumberHitsAvailable;
listLevelHits[gCurrentLevel] = _local4;
listLevelScore[gCurrentLevel] = timeDoneInCurrentLevel;
}
};
changeGameState = function (newState) {
gGeneralIterator = 0;
gLastState = gState;
gState = newState;
if (Define.DEBUG_STATES_MAIN) {
switch (gState) {
case Define.STATEGENERAL_MENU :
trace("_root.gState=Define.STATEGENERAL_MENU");
break;
case Define.STATEGENERAL_PAUSE :
trace("_root.gState=Define.STATEGENERAL_PAUSE");
break;
case Define.STATEGENERAL_GAME :
trace("_root.gState=Define.STATEGENERAL_GAME");
break;
case Define.STATEGENERAL_RESULT :
trace("_root.gState=Define.STATEGENERAL_RESULT");
}
}
};
mainGeneralLogic = function () {
_root.onEnterFrame = function () {
switch (gState) {
case Define.STATEGENERAL_MENU :
break;
case Define.STATEGENERAL_PAUSE :
if (gGeneralIterator < 10) {
gGeneralIterator++;
}
switch (gGeneralIterator) {
case 1 :
instClipMenuGame._visible = true;
instClipMenuGame.gotoAndPlay("pause");
_root.instGame.changeGeneralGameState(Define.STATE_GAME_PAUSE);
break;
case 2 :
gGeneralIterator = 1;
break;
default :
_root.instGame.changeGeneralGameState(Define.STATE_GAME_RUN);
instClipMenuGame.gotoAndStop("vacio");
instClipMenuGame._visible = false;
changeGameState(Define.STATEGENERAL_GAME);
gGeneralIterator = 6;
}
break;
case Define.STATEGENERAL_GAME :
if (gGeneralIterator < 10) {
gGeneralIterator++;
}
switch (gGeneralIterator) {
case 1 :
instClipMenuResultGame._visible = true;
instClipMenuResultGame.gotoAndStop("loading");
break;
case 2 :
if (instClipMenuGame._visible) {
instClipMenuGame.gotoAndStop("vacio");
instClipMenuGame._visible = false;
}
break;
case 3 :
_root.instGame.initGame();
var _local2 = new Date();
nmInitialTime = _local2.getTime();
break;
}
break;
case Define.STATEGENERAL_RESULT :
gGeneralIterator++;
switch (gGeneralIterator) {
case 1 :
instClipMenuResultGame._visible = true;
if (_root.instGame.gNumberHolesLeft <= 0) {
instClipMenuResultGame.gotoAndPlay("victoria");
} else {
instClipMenuResultGame.gotoAndPlay("derrota");
}
break;
case 2 :
break;
}
}
};
};
initGameStart = function (numberLevelToLoad) {
changeGameState(Define.STATEGENERAL_GAME);
switch (numberLevelToLoad) {
case 3 :
case 7 :
case 11 :
case 15 :
_root.gTimeAttackMode = true;
break;
default :
_root.gTimeAttackMode = false;
}
gCurrentLevel = numberLevelToLoad;
};
nmRecordStoreName = Define.CLOSING_DIMENSIONS_RECORDSET;
instClipMenuResultGame.gotoAndStop("parar");
instClipMenuResultGame._visible = false;
var nmLevelToShow = 0;
var nmTotalLevelDone = 0;
var nmInitialTime;
var timeDoneInCurrentLevel;
var gCurrentLevel = 1;
var gGeneralIterator = 0;
var gState;
var gLastState;
var gTutorialHasBeenPlayed = 0;
var gIsHistoryMode = true;
var nmDifficultySetted = 0;
loadGameSound(Define.SOUNDS_MELODIA_MENU);
loadGameSound(Define.SOUNDS_SELECCION);
loadGameSound(Define.SOUNDS_INICIO_NIVEL);
loadGameSound(Define.SOUNDS_VICTORIA);
loadGameSound(Define.SOUNDS_DERROTA);
loadGameSound(Define.SOUNDS_FX_BOING);
loadGameSound(Define.SOUNDS_FX_HOLE_CLOSING);
loadGameSound(Define.SOUNDS_VOICE_1);
loadGameSound(Define.SOUNDS_VOICE_2);
loadGameSound(Define.SOUNDS_VOICE_3);
loadGameSound(Define.SOUNDS_VOICE_4);
loadGameSound(Define.SOUNDS_VOICE_5);
loadGameSound(Define.SOUNDS_VOICE_6);
loadGameSound(Define.SOUNDS_VOICE_7);
loadGameSound(Define.SOUNDS_VOICE_8);
loadGameSound(Define.SOUNDS_VOICE_9);
loadGameSound(Define.SOUNDS_VOICE_10);
loadGameSound(Define.SOUNDS_VOICE_11);
loadGameSound(Define.SOUNDS_VOICE_12);
loadGameSound(Define.SOUNDS_VOICE_13);
loadGameSound(Define.SOUNDS_VOICE_14);
loadGameSound(Define.SOUNDS_VOICE_15);
loadGameSound(Define.SOUNDS_VOICE_16);
loadGameSound(Define.SOUNDS_VOICE_17);
loadGameSound(Define.SOUNDS_VOICE_18);
loadGameSoundBackground(Define.SOUNDS_LOOP_1);
loadGameSoundBackground(Define.SOUNDS_LOOP_2);
loadGameSoundBackground(Define.SOUNDS_LOOP_3);
loadGameSoundBackground(Define.SOUNDS_LOOP_4);
changeGameState(Define.STATEGENERAL_MENU);
loadGameData();
mainGeneralLogic();
var gQualitySetted = 2;
_root._quality = "HIGH";
stop();
Symbol 41 MovieClip [iconLevel] Frame 1
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 2
stop();
Symbol 51 MovieClip Frame 3
stop();
Symbol 51 MovieClip Frame 4
stop();
Symbol 51 MovieClip Frame 5
stop();
Symbol 52 MovieClip Frame 1
instLetreroLevel.onRelease = function () {
this._alpha = 100;
gotoAndPlay ("Seccion2");
};
instLetreroLevel.gotoAndStop(Math.floor(_root.gCurrentLevel / 2) + 1);
instLetreroLevel.instTextLevel.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.gCurrentLevel];
instLetreroLevel.instTextLevelName.text = "Difficulty " + Define.getDifficulty(_root.nmDifficultySetted);
instLetreroLevel._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLetreroLevel.onEnterFrame = function () {
this._x = this._x - (601 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 52 MovieClip Frame 21
delete instLetreroLevel.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 0;
instLetreroLevel.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instLetreroLevel.onRollOut = function () {
activeChangeColor = -1;
};
instLetreroLevel.onEnterFrame = function () {
if (activeChangeColor == 0) {
this._alpha = this._alpha - 5;
if (this._alpha < 10) {
this._alpha = 100;
}
this._width = this._width - factorEscalaContraccion;
this.shiftInX = this.shiftInX + (factorEscalaContraccion / 2);
this._x = this._x + (factorEscalaContraccion / 2);
if (this._width < (((this._width + (this.shiftInX * 2)) * 60) / 100)) {
this._alpha = 100;
this._width = this._width + (2 * this.shiftInX);
this._x = this._x - this.shiftInX;
this.shiftInX = 0;
}
} else {
this._alpha = 100;
this._width = this._width + (2 * this.shiftInX);
this._x = this._x - this.shiftInX;
this.shiftInX = 0;
}
};
stop();
Symbol 52 MovieClip Frame 22
delete instLetreroLevel.onEnterFrame;
totalNumberFramesAnimationMainMenu = 20;
instLetreroLevel.onEnterFrame = function () {
this._x = this._x - (670 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha - (100 / totalNumberFramesAnimationMainMenu);
if (this._alpha < 5) {
_root.instGame.changeGeneralGameState(Define.STATE_GAME_PRESENTATION_2);
}
};
Symbol 52 MovieClip Frame 44
stop();
Symbol 57 MovieClip Frame 1
onEnterFrame = function () {
instAguja._rotation++;
};
stop();
Symbol 70 MovieClip [gameClipBallQuiet] Frame 19
gotoAndPlay ("normal");
Symbol 70 MovieClip [gameClipBallQuiet] Frame 25
gotoAndPlay ("normal");
Symbol 83 MovieClip [gameClipBallRunning] Frame 19
gotoAndPlay ("normal");
Symbol 83 MovieClip [gameClipBallRunning] Frame 23
gotoAndPlay ("normal");
Symbol 96 MovieClip [gameClipBallVictory] Frame 19
gotoAndPlay ("normal");
Symbol 96 MovieClip [gameClipBallVictory] Frame 23
gotoAndPlay ("normal");
Symbol 105 MovieClip [gameClipBallLose] Frame 19
gotoAndPlay ("normal");
Symbol 105 MovieClip [gameClipBallLose] Frame 23
gotoAndPlay ("normal");
Symbol 127 MovieClip [gameclipHole] Frame 50
gotoAndPlay ("quiet");
Symbol 127 MovieClip [gameclipHole] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 127 MovieClip [gameclipHole] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 127 MovieClip [gameclipHole] Frame 120
_visible = false;
stop();
Symbol 136 MovieClip [gameclipHole2] Frame 50
gotoAndPlay ("quiet");
Symbol 136 MovieClip [gameclipHole2] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 136 MovieClip [gameclipHole2] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 136 MovieClip [gameclipHole2] Frame 120
_visible = false;
stop();
Symbol 143 MovieClip [gameclipHole3] Frame 50
gotoAndPlay ("quiet");
Symbol 143 MovieClip [gameclipHole3] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 143 MovieClip [gameclipHole3] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 143 MovieClip [gameclipHole3] Frame 120
_visible = false;
stop();
Symbol 150 MovieClip [gameclipHole4] Frame 50
gotoAndPlay ("quiet");
Symbol 150 MovieClip [gameclipHole4] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 150 MovieClip [gameclipHole4] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 150 MovieClip [gameclipHole4] Frame 121
_visible = false;
stop();
Symbol 157 MovieClip [gameclipHole5] Frame 50
gotoAndPlay ("quiet");
Symbol 157 MovieClip [gameclipHole5] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 157 MovieClip [gameclipHole5] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 157 MovieClip [gameclipHole5] Frame 121
_visible = false;
stop();
Symbol 164 MovieClip [gameclipHole6] Frame 50
gotoAndPlay ("quiet");
Symbol 164 MovieClip [gameclipHole6] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 164 MovieClip [gameclipHole6] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 164 MovieClip [gameclipHole6] Frame 120
_visible = false;
stop();
Symbol 171 MovieClip [gameclipHole7] Frame 50
gotoAndPlay ("quiet");
Symbol 171 MovieClip [gameclipHole7] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 171 MovieClip [gameclipHole7] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 171 MovieClip [gameclipHole7] Frame 120
_visible = false;
stop();
Symbol 176 MovieClip [gameclipHole8] Frame 50
gotoAndPlay ("quiet");
Symbol 176 MovieClip [gameclipHole8] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 176 MovieClip [gameclipHole8] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 176 MovieClip [gameclipHole8] Frame 119
_visible = false;
stop();
Symbol 183 MovieClip [gameclipHole9] Frame 50
gotoAndPlay ("quiet");
Symbol 183 MovieClip [gameclipHole9] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 183 MovieClip [gameclipHole9] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 183 MovieClip [gameclipHole9] Frame 120
_visible = false;
stop();
Symbol 192 MovieClip [gameclipHole10] Frame 50
gotoAndPlay ("quiet");
Symbol 192 MovieClip [gameclipHole10] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 192 MovieClip [gameclipHole10] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 192 MovieClip [gameclipHole10] Frame 122
_visible = false;
stop();
Symbol 203 MovieClip [gameclipHole11] Frame 50
gotoAndPlay ("quiet");
Symbol 203 MovieClip [gameclipHole11] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 203 MovieClip [gameclipHole11] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 203 MovieClip [gameclipHole11] Frame 121
_visible = false;
stop();
Symbol 210 MovieClip [gameclipHole12] Frame 50
gotoAndPlay ("quiet");
Symbol 210 MovieClip [gameclipHole12] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 210 MovieClip [gameclipHole12] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 210 MovieClip [gameclipHole12] Frame 120
_visible = false;
stop();
Symbol 220 MovieClip [gameclipHoleBoss01] Frame 50
gotoAndPlay ("quiet");
Symbol 220 MovieClip [gameclipHoleBoss01] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 220 MovieClip [gameclipHoleBoss01] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 220 MovieClip [gameclipHoleBoss01] Frame 120
_visible = false;
stop();
Symbol 229 MovieClip [gameclipHoleBoss02] Frame 50
gotoAndPlay ("quiet");
Symbol 229 MovieClip [gameclipHoleBoss02] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 229 MovieClip [gameclipHoleBoss02] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 229 MovieClip [gameclipHoleBoss02] Frame 120
_visible = false;
stop();
Symbol 238 MovieClip [gameclipHoleBoss03] Frame 50
gotoAndPlay ("quiet");
Symbol 238 MovieClip [gameclipHoleBoss03] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 20) {
_xscale = (_xscale + 20);
_yscale = (_yscale + 20);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 25);
}
if (_yscale > 10) {
_yscale = (_yscale - 25);
}
}
};
Symbol 238 MovieClip [gameclipHoleBoss03] Frame 90
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 238 MovieClip [gameclipHoleBoss03] Frame 120
_visible = false;
stop();
Symbol 259 MovieClip [gameclipHoleBoss04] Frame 50
gotoAndPlay ("quiet");
Symbol 259 MovieClip [gameclipHoleBoss04] Frame 51
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 25) {
_xscale = (_xscale + 25);
_yscale = (_yscale + 25);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 20);
}
if (_yscale > 10) {
_yscale = (_yscale - 20);
}
}
};
Symbol 259 MovieClip [gameclipHoleBoss04] Frame 120
_visible = false;
stop();
Symbol 259 MovieClip [gameclipHoleBoss04] Frame 121
play();
contador_frames = 0;
onEnterFrame = function () {
contador_frames++;
if (contador_frames < 25) {
_xscale = (_xscale + 25);
_yscale = (_yscale + 25);
} else {
if (_xscale > 10) {
_xscale = (_xscale - 20);
}
if (_yscale > 10) {
_yscale = (_yscale - 20);
}
}
};
Symbol 259 MovieClip [gameclipHoleBoss04] Frame 163
_xscale = 100;
_yscale = 100;
delete onEnterFrame;
Symbol 259 MovieClip [gameclipHoleBoss04] Frame 255
_visible = false;
stop();
Symbol 261 MovieClip Frame 1
stop();
Symbol 261 MovieClip Frame 10
instIconPlayer.gotoAndStop(1);
stop();
Symbol 261 MovieClip Frame 21
instGameHole.gotoAndStop(1);
stop();
Symbol 262 MovieClip [gameClip] Frame 1
function frameRateController() {
}
function changeFrameRate(p_frameRate) {
gFramerate = p_frameRate;
clearInterval(tweenFaster);
_root.instGame.tweenFaster = setInterval(timelineFaster, gEfectiveFrameRate);
}
function timelineFaster() {
nextFrame();
mainGameLogic();
updateAfterEvent();
}
changeGeneralGameState = function (newState) {
gIterator = 0;
gLastStateGame = gStateGame;
gStateGame = newState;
if (Define.DEBUG_GENERAL) {
switch (gStateGame) {
case Define.STATE_GAME_PRE_LOADING :
trace("gStateGame=STATE_GAME_PRE_LOADING");
break;
case Define.STATE_GAME_LOADING :
trace("gStateGame=STATE_GAME_LOADING");
break;
case Define.STATE_GAME_PRESENTATION :
trace("gStateGame=STATE_GAME_PRESENTATION");
break;
case Define.STATE_GAME_RUN :
trace("gStateGame=STATE_GAME_RUN");
break;
case Define.STATE_GAME_VICTORY :
trace("gStateGame=STATE_GAME_VICTORY");
break;
case Define.STATE_GAME_LOSE :
trace("gStateGame=STATE_GAME_LOSE");
break;
case Define.STATE_GAME_PAUSE :
trace("gStateGame=STATE_GAME_PAUSE");
break;
default :
trace("gStateGame=NONE");
}
}
};
setLevelDifficulty = function (p_level) {
var _local2;
switch (p_level) {
case 0 :
_local2 = 3;
instHoleNumber.instGameHole.gotoAndStop(1);
break;
case 1 :
_local2 = 5;
instHoleNumber.instGameHole.gotoAndStop(2);
break;
case 2 :
_local2 = 5;
instHoleNumber.instGameHole.gotoAndStop(3);
break;
case 3 :
instHoleNumber.instGameHole.gotoAndStop(13);
_local2 = 100000 /* 0x0186A0 */;
if (_root.gIsHistoryMode) {
gCurrentLimitTimeAttack = 55000;
} else {
gCurrentLimitTimeAttack = 50000;
}
break;
case 4 :
_local2 = 7;
instHoleNumber.instGameHole.gotoAndStop(4);
break;
case 5 :
_local2 = 9;
instHoleNumber.instGameHole.gotoAndStop(5);
break;
case 6 :
_local2 = 11;
instHoleNumber.instGameHole.gotoAndStop(6);
break;
case 7 :
instHoleNumber.instGameHole.gotoAndStop(14);
_local2 = 100000 /* 0x0186A0 */;
if (_root.gIsHistoryMode) {
gCurrentLimitTimeAttack = (45 + Define.EXTRA_TIME_FOR_TIMEATTACK) * 1000;
} else {
gCurrentLimitTimeAttack = (40 + Define.EXTRA_TIME_FOR_TIMEATTACK) * 1000;
}
break;
case 8 :
_local2 = 10;
instHoleNumber.instGameHole.gotoAndStop(7);
break;
case 9 :
_local2 = 12;
instHoleNumber.instGameHole.gotoAndStop(8);
break;
case 10 :
_local2 = 12;
instHoleNumber.instGameHole.gotoAndStop(9);
break;
case 11 :
instHoleNumber.instGameHole.gotoAndStop(15);
_local2 = 100000 /* 0x0186A0 */;
if (_root.gIsHistoryMode) {
gCurrentLimitTimeAttack = (40 + Define.EXTRA_TIME_FOR_TIMEATTACK) * 1000;
} else {
gCurrentLimitTimeAttack = (35 + Define.EXTRA_TIME_FOR_TIMEATTACK) * 1000;
}
break;
case 12 :
instHoleNumber.instGameHole.gotoAndStop(10);
_local2 = 12;
break;
case 13 :
instHoleNumber.instGameHole.gotoAndStop(11);
_local2 = 16;
break;
case 14 :
instHoleNumber.instGameHole.gotoAndStop(12);
_local2 = 27;
break;
case 15 :
instHoleNumber.instGameHole.gotoAndStop(16);
_local2 = 100000 /* 0x0186A0 */;
if (_root.gIsHistoryMode) {
gCurrentLimitTimeAttack = (35 + Define.EXTRA_TIME_FOR_TIMEATTACK) * 1000;
} else {
gCurrentLimitTimeAttack = (30 + Define.EXTRA_TIME_FOR_TIMEATTACK) * 1000;
}
break;
default :
_local2 = 100000 /* 0x0186A0 */;
gCurrentLimitTimeAttack = 45000;
}
switch (_root.nmDifficultySetted) {
case 0 :
_local2 = _local2 + 4;
if (_root.gTimeAttackMode && (_root.gIsHistoryMode)) {
gCurrentLimitTimeAttack = gCurrentLimitTimeAttack + 10000;
}
break;
case 2 :
_local2 = _local2 - 2;
if (_root.gTimeAttackMode && (_root.gIsHistoryMode)) {
gCurrentLimitTimeAttack = gCurrentLimitTimeAttack - 5000;
}
break;
case 3 :
_local2 = _local2 + 6;
if (!(_root.gTimeAttackMode && (_root.gIsHistoryMode))) {
break;
}
gCurrentLimitTimeAttack = gCurrentLimitTimeAttack + 20000;
}
return(_local2);
};
getNearestHole = function (p_pos) {
var _local5 = -1;
var _local3 = 100000000 /* 0x5F5E100 */;
var _local1 = 0;
while (_local1 < gHoles.length) {
if (gHoles[_local1]._active) {
var _local2 = gWorld.accionBuscarCamino(Math.floor(p_pos.x / gWorld._blockSizeX), Math.floor(p_pos.y / gWorld._blockSizeY), Math.floor(gHoles[_local1]._pos.x / gWorld._blockSizeX), Math.floor(gHoles[_local1]._pos.y / gWorld._blockSizeY));
if (_local2 < _local3) {
_local3 = _local2;
_local5 = _local1;
}
}
_local1++;
}
return(gHoles[_local5]._pos);
};
zoomLogic = function (p_value) {
var _local1 = true;
var _local2 = 0;
if (Key.isDown(87) || (p_value == 1)) {
if (world._xscale < 100) {
world._xscale++;
} else {
_local2 = 1;
}
if (world._yscale < 100) {
world._yscale++;
} else {
_local2 = 1;
}
gWorld._iFrontierXHigh = ((gWorld._widthMatrix * gWorld._blockSizeX) * (world._xscale / 100)) - gWorld._iFrontierXLow;
gWorld._iFrontierYHigh = ((gWorld._heightMatrix * gWorld._blockSizeY) * (world._yscale / 100)) - gWorld._iFrontierYLow;
if (gWorld._iFrontierXHigh < gWorld._iFrontierXLow) {
gWorld._iFrontierXHigh = gWorld._iFrontierXLow;
}
if (gWorld._iFrontierYHigh < gWorld._iFrontierYLow) {
gWorld._iFrontierYHigh = gWorld._iFrontierYLow;
}
gIteratorZoomIn++;
_local1 = false;
}
if ((gIteratorZoomIn > 0) && (_local1 == true)) {
gIteratorZoomIn = 0;
}
_local1 = true;
if (Key.isDown(83) || (p_value == 2)) {
world._xscale--;
if (((gWorld._widthMatrix * gWorld._blockSizeX) * (world._xscale / 100)) < Stage.width) {
_local2 = 2;
world._xscale++;
}
world._yscale--;
if (((gWorld._heightMatrix * gWorld._blockSizeY) * (world._yscale / 100)) < Stage.height) {
_local2 = 2;
world._yscale++;
}
gWorld._iFrontierXHigh = ((gWorld._widthMatrix * gWorld._blockSizeX) * (world._xscale / 100)) - gWorld._iFrontierXLow;
gWorld._iFrontierYHigh = ((gWorld._heightMatrix * gWorld._blockSizeY) * (world._yscale / 100)) - gWorld._iFrontierYLow;
if (gWorld._iFrontierXHigh < gWorld._iFrontierXLow) {
gWorld._iFrontierXHigh = gWorld._iFrontierXLow;
}
if (gWorld._iFrontierYHigh < gWorld._iFrontierYLow) {
gWorld._iFrontierYHigh = gWorld._iFrontierYLow;
}
gIteratorZoomOut++;
_local1 = false;
}
if ((gIteratorZoomOut > 0) && (_local1 == true)) {
gIteratorZoomOut = 0;
}
return(_local2);
};
initGame = function () {
changeGeneralGameState(Define.STATE_GAME_PRE_LOADING);
switch (_root.gCurrentLevel) {
case 3 :
case 7 :
case 11 :
case 15 :
_root.gTimeAttackMode = true;
break;
default :
_root.gTimeAttackMode = false;
}
nmCurrentLevel = _root.gCurrentLevel;
};
mainGameLogic = function () {
switch (gStateGame) {
case Define.STATE_GAME_PRE_LOADING :
if (gIterator < 10) {
gIterator++;
}
if (!Define.ENABLE_XML_INTEGRATED) {
if (gIterator == 1) {
gWorld = new Worldmap(this, world, nmCurrentLevel, new flash.geom.Point(100, 100), new flash.geom.Point(Stage.width, Stage.height), 1);
}
} else {
gWorld = new Worldmap(this, world, nmCurrentLevel, new flash.geom.Point(100, 100), new flash.geom.Point(Stage.width, Stage.height), 1);
changeGeneralGameState(Define.STATE_GAME_LOADING);
}
break;
case Define.STATE_GAME_LOADING :
gWorld.initAI();
var _local9 = "nmProtagonist";
world.attachMovie("gameclipBall", _local9, Define.DEPTH_BALL_PROTAGONIST);
var _local13 = world[_local9];
gProtagonist = new cObject(gWorld, _local13, _local9);
gProtagonist.init(new flash.geom.Point((gWorld._pointInitialBall.x * gWorld._blockSizeX) + (gWorld._blockSizeX / 2), (gWorld._pointInitialBall.y * gWorld._blockSizeY) + (gWorld._blockSizeY / 2)), 0, 5);
var _local8 = Define.DEPTH_HOLES;
gHoles = new Array();
var _local4 = 0;
while (_local4 < gWorld._listOfHoles.length) {
var _local3 = "nmHole" + _local4;
world.attachMovie("gameHole", _local3, _local8 + _local4);
var _local5 = world[_local3];
var _local6 = new flash.geom.Point((gWorld._listOfHoles[_local4].x * gWorld._blockSizeX) + (gWorld._blockSizeX / 2), (gWorld._listOfHoles[_local4].y * gWorld._blockSizeY) + (gWorld._blockSizeY / 2));
gHoles.push(new cHole(gWorld, _local5, _local3, _local6, nmCurrentLevel));
if (_root.gTimeAttackMode) {
if (_local4 > 0) {
gCurrentHoleActiveTimeAttackMode = 0;
gHoles[_local4].setActivation(false);
}
}
_local4++;
}
gNumberHolesLeft = gWorld._listOfHoles.length;
instHoleNumber.instText.text = "HOLES " + gNumberHolesLeft;
gNumberHitsAvailable = setLevelDifficulty(_root.gCurrentLevel);
if (!_root.gTimeAttackMode) {
_root.instGame.instLimitNumber._visible = true;
_root.instGame.instLimitNumber.instText.text = "HITS " + gNumberHitsAvailable;
_root.instGame.instTimerAttackText._visible = false;
} else {
_root.instGame.instLimitNumber._visible = false;
_root.instGame.instTimerAttackText._visible = true;
gTimerOfTimeAttack = gCurrentLimitTimeAttack;
gLastTimerOfTimeAttack = -1;
_root.instGame.instTimerAttackText.instText.text = "TIME " + Math.floor(gTimerOfTimeAttack / 1000);
_root.instGame.instTimerAttackText._x = 18;
_root.instGame.instTimerAttackText._y = 0.2;
}
world._xscale = 100;
world._yscale = 100;
changeGeneralGameState(Define.STATE_GAME_PRESENTATION);
gAcumOfNumberFrameRate = 0;
gIteratorOfFrameRate = 0;
gEfectiveFrameRate = Define.NORMAL_FRAME_RATE;
_root.playGameSoundStops(Define.SOUNDS_INICIO_NIVEL, 1);
break;
case Define.STATE_GAME_PRESENTATION :
if (gIterator < 10) {
gIterator++;
}
if (gIterator == 1) {
_root.instClipMenuResultGame.gotoAndStop("parar");
_root.instClipMenuResultGame._visible = false;
}
if (zoomLogic(2) == 2) {
if (instClipPresentationLevel._visible == false) {
instClipPresentationLevel._visible = true;
instClipPresentationLevel.gotoAndPlay("Seccion1");
}
}
gProtagonist.logic();
break;
case Define.STATE_GAME_PRESENTATION_2 :
if (!_root.gTimeAttackMode) {
zoomLogic(1);
}
gProtagonist.logic();
if (((world._xscale == 100) && (world._yscale == 100)) || (_root.gTimeAttackMode)) {
instClipPresentationLevel.gotoAndStop("vacio");
instClipPresentationLevel._visible = false;
changeGeneralGameState(Define.STATE_GAME_RUN);
var _local11 = new Date();
_root.nmInitialTime = _local11.getTime();
gHitsDoneForTimeAttack = 0;
gNumberOfHolesClosedTimerAttack = 0;
switch (nmCurrentLevel) {
case 0 :
case 1 :
case 2 :
case 3 :
_root.playGameSoundBackground(Define.SOUNDS_LOOP_1, 1);
break;
case 4 :
case 5 :
case 6 :
case 7 :
_root.playGameSoundBackground(Define.SOUNDS_LOOP_2, 1);
break;
case 8 :
case 9 :
case 10 :
case 11 :
_root.playGameSoundBackground(Define.SOUNDS_LOOP_3, 1);
break;
case 12 :
case 13 :
case 14 :
case 15 :
_root.playGameSoundBackground(Define.SOUNDS_LOOP_4, 1);
}
}
break;
case Define.STATE_GAME_RUN :
frameRateController();
zoomLogic(-1);
var _local14 = gProtagonist.logic();
var _local7 = 0;
_local4 = 0;
while (_local4 < gHoles.length) {
_local7 = _local7 + gHoles[_local4].logic();
_local4++;
}
if (_local7 > 0) {
changeGeneralGameState(Define.STATE_GAME_WAIT_HOLE);
gProtagonist._clip._visible = false;
return(undefined);
}
if (_local14 == 1) {
if (gNumberHolesLeft <= 0) {
changeGeneralGameState(Define.STATE_GAME_VICTORY);
_root.stopGameSoundsBackground();
break;
}
if (gNumberHitsAvailable <= 0) {
changeGeneralGameState(Define.STATE_GAME_LOSE);
_root.stopGameSoundsBackground();
} else {
if (_root.gTimeAttackMode) {
var _local12 = new Date();
var _local10 = _local12.getTime();
if (gLastTimerOfTimeAttack > 0) {
gTimerOfTimeAttack = gTimerOfTimeAttack - Math.abs(_local10 - gLastTimerOfTimeAttack);
if (gTimerOfTimeAttack >= 0) {
_root.instGame.instTimerAttackText.instText.text = "TIME " + Math.floor(gTimerOfTimeAttack / 1000);
}
}
gLastTimerOfTimeAttack = _local10;
if (gTimerOfTimeAttack <= 0) {
gNumberHitsAvailable = 0;
if (gProtagonist._state == cObject.STATE_BALL_QUIET) {
gProtagonist.changeState(cObject.STATE_BALL_LOSE);
changeGeneralGameState(Define.STATE_GAME_LOSE);
_root.stopGameSoundsBackground();
}
}
}
if (Key.isDown(13)) {
changeGeneralGameState(Define.STATE_GAME_PAUSE);
_root.changeGameState(Define.STATEGENERAL_PAUSE);
}
break;
_local7 = 0;
_local4 = 0;
while (_local4 < gHoles.length) {
_local7 = _local7 + gHoles[_local4].logic();
_local4++;
}
if (_local7 == 0) {
gLastTimerOfTimeAttack = -1;
gNumberHolesLeft--;
instHoleNumber.instText.text = "HOLES " + gNumberHolesLeft;
changeGeneralGameState(Define.STATE_GAME_RUN);
gProtagonist._clip._visible = true;
}
break;
if (gIterator < 10) {
gIterator++;
}
if (gIterator == 1) {
}
if (((world._xscale == 100) && (world._yscale == 100)) && (gProtagonist._state == cObject.STATE_BALL_FINISH)) {
_root.changeGameState(Define.STATEGENERAL_RESULT);
changeGeneralGameState(Define.STATE_GAME_PAUSE);
} else {
gProtagonist.logic();
zoomLogic(1);
}
break;
if (gIterator < 10) {
gIterator++;
}
if (gIterator == 1) {
}
if (((world._xscale == 100) && (world._yscale == 100)) && (gProtagonist._state == cObject.STATE_BALL_FINISH)) {
_root.changeGameState(Define.STATEGENERAL_RESULT);
changeGeneralGameState(Define.STATE_GAME_PAUSE);
} else {
gProtagonist.logic();
zoomLogic(1);
}
break;
}
}
if (_root.gTimeAttackMode) {
var _local12 = new Date();
var _local10 = _local12.getTime();
if (gLastTimerOfTimeAttack > 0) {
gTimerOfTimeAttack = gTimerOfTimeAttack - Math.abs(_local10 - gLastTimerOfTimeAttack);
if (gTimerOfTimeAttack >= 0) {
_root.instGame.instTimerAttackText.instText.text = "TIME " + Math.floor(gTimerOfTimeAttack / 1000);
}
}
gLastTimerOfTimeAttack = _local10;
if (gTimerOfTimeAttack <= 0) {
gNumberHitsAvailable = 0;
if (gProtagonist._state == cObject.STATE_BALL_QUIET) {
gProtagonist.changeState(cObject.STATE_BALL_LOSE);
changeGeneralGameState(Define.STATE_GAME_LOSE);
_root.stopGameSoundsBackground();
}
}
}
if (Key.isDown(13)) {
changeGeneralGameState(Define.STATE_GAME_PAUSE);
_root.changeGameState(Define.STATEGENERAL_PAUSE);
}
break;
case Define.STATE_GAME_WAIT_HOLE :
_local7 = 0;
_local4 = 0;
while (_local4 < gHoles.length) {
_local7 = _local7 + gHoles[_local4].logic();
_local4++;
}
if (_local7 == 0) {
gLastTimerOfTimeAttack = -1;
gNumberHolesLeft--;
instHoleNumber.instText.text = "HOLES " + gNumberHolesLeft;
changeGeneralGameState(Define.STATE_GAME_RUN);
gProtagonist._clip._visible = true;
}
break;
case Define.STATE_GAME_VICTORY :
if (gIterator < 10) {
gIterator++;
}
if (gIterator == 1) {
}
if (((world._xscale == 100) && (world._yscale == 100)) && (gProtagonist._state == cObject.STATE_BALL_FINISH)) {
_root.changeGameState(Define.STATEGENERAL_RESULT);
changeGeneralGameState(Define.STATE_GAME_PAUSE);
} else {
gProtagonist.logic();
zoomLogic(1);
}
break;
case Define.STATE_GAME_LOSE :
if (gIterator < 10) {
gIterator++;
}
if (gIterator == 1) {
}
if (((world._xscale == 100) && (world._yscale == 100)) && (gProtagonist._state == cObject.STATE_BALL_FINISH)) {
_root.changeGameState(Define.STATEGENERAL_RESULT);
changeGeneralGameState(Define.STATE_GAME_PAUSE);
} else {
gProtagonist.logic();
zoomLogic(1);
}
break;
case Define.STATE_GAME_PAUSE :
}
};
var gWorld;
var gHoles;
var gProtagonist;
var gNumberHitsAvailable;
var gNumberHolesLeft;
var gStateGame = -1;
var gLastStateGame = -1;
var nmCurrentLevel = 0;
var gFramerate = Define.NORMAL_FRAME_RATE;
var a_Size_Interpolation;
var b_Size_Interpolation;
var gIteratorZoomIn = 0;
var gIteratorZoomOut = 0;
var gZoomFrames = 100;
var gCurrentHoleActiveTimeAttackMode = 0;
var gCurrentLimitTimeAttack;
var gTimerOfTimeAttack;
var gLastTimerOfTimeAttack = -1;
var gHitsDoneForTimeAttack = 0;
var gNumberOfHolesClosedTimerAttack = 0;
var gEfectiveFrameRate = Define.NORMAL_FRAME_RATE;
var gTimeDif;
var gLastTimeCycleBefore = -1;
var gTimeTotalDone = 0;
var gAcumTimeToSecond = 0;
var gAcumOfNumberFrameRate = 0;
var gIteratorOfFrameRate = 0;
var gTimeacumFramerate = -1;
var tweenFaster = setInterval(timelineFaster, gFramerate);
instClipPresentationLevel._visible = false;
instClipPresentationLevel.gotoAndStop("vacio");
instLimitNumber.gotoAndStop("hits");
instTimerAttackText.gotoAndStop("timer");
instHoleNumber.gotoAndStop("holes");
stop();
Symbol 275 MovieClip [cargador] Frame 1
kabiertos = int(_root.getBytesLoaded() / 1024);
ktotal = int(_root.getBytesTotal() / 1024);
porcentaje = int((kabiertos * 100) / ktotal);
instLoadingBarProgress.instText.text = ("LOADING " + porcentaje) + "%";
instLoadingBarProgress.instMaskLoadingBarProgress._xscale = porcentaje;
if (kabiertos >= ktotal) {
if (Define.ENABLE_PROTECTION && ((_root.my_lv.variable1 != "gromenauerl") || (_root.currUrl.indexOf("www.newgrounds.com") <= 0))) {
_root.gotoAndStop("not_allowed");
} else {
_root.gotoAndStop("mochiad");
}
}
Symbol 549 MovieClip [__Packages.Define] Frame 0
class Define
{
function Define () {
}
static function getDirection(posOrigin, posDestination) {
var _local4;
var _local3;
if ((posOrigin.x == posDestination.x) && (posOrigin.y == posDestination.y)) {
return(DIRECTION_NONE);
}
_local4 = posOrigin.x - posDestination.x;
_local3 = posOrigin.y - posDestination.y;
if (Math.abs(_local4) > Math.abs(_local3)) {
if (_local4 > 0) {
return(DIRECTION_LEFT);
}
return(DIRECTION_RIGHT);
}
if (_local3 > 0) {
return(DIRECTION_UP);
}
return(DIRECTION_DOWN);
}
static function getDirectionPlus(posOrigin, posDestination) {
var _local2 = posOrigin.x - posDestination.x;
var _local1 = posOrigin.y - posDestination.y;
if (_local2 == 0) {
if (_local1 > 0) {
return(DIRECTION_UP);
}
return(DIRECTION_DOWN);
}
if (_local1 == 0) {
if (_local2 > 0) {
return(DIRECTION_LEFT);
}
return(DIRECTION_RIGHT);
}
if (_local2 > 0) {
if (_local1 > 0) {
return(DIRECTION_UP_LEFT);
}
return(DIRECTION_DOWN_LEFT);
}
if (_local1 > 0) {
return(DIRECTION_UP_RIGHT);
}
return(DIRECTION_DOWN_RIGHT);
}
static function getDirectionOpposite(direccion) {
switch (direccion) {
case DIRECTION_UP :
return(DIRECTION_DOWN);
case DIRECTION_DOWN :
return(DIRECTION_UP);
case DIRECTION_RIGHT :
return(DIRECTION_LEFT);
case DIRECTION_LEFT :
return(DIRECTION_RIGHT);
case DIRECTION_UP_LEFT :
return(DIRECTION_DOWN_RIGHT);
case DIRECTION_UP_RIGHT :
return(DIRECTION_DOWN_LEFT);
case DIRECTION_DOWN_LEFT :
return(DIRECTION_UP_RIGHT);
case DIRECTION_DOWN_RIGHT :
return(DIRECTION_UP_LEFT);
}
return(DIRECTION_NONE);
}
static function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
static function incrementAngle(p_yaw, p_incr) {
return(p_yaw + p_incr);
}
static function getRadians(valueGrad) {
return((valueGrad * Math.PI) / 180);
}
static function getGrados(valueRad) {
return((valueRad * 180) / Math.PI);
}
static function movePointYaw(pos, yaw, stepLength) {
var _local1 = new flash.geom.Point(pos.x, pos.y);
_local1.x = _local1.x + (stepLength * Math.cos(yaw));
_local1.y = _local1.y + (stepLength * Math.sin(yaw));
return(_local1);
}
static function distancePoint(posA, posB) {
return(flash.geom.Point.distance(posA, posB));
}
static function moveDirection(posMove, directionMove, stepLength) {
var _local1 = new flash.geom.Point(posMove.x, posMove.y);
switch (directionMove) {
case DIRECTION_LEFT :
_local1.x = _local1.x - stepLength;
break;
case DIRECTION_RIGHT :
_local1.x = _local1.x + stepLength;
break;
case DIRECTION_UP :
_local1.y = _local1.y - stepLength;
break;
case DIRECTION_DOWN :
_local1.y = _local1.y + stepLength;
break;
case DIRECTION_UP_LEFT :
_local1.x = _local1.x - stepLength;
_local1.y = _local1.y - stepLength;
break;
case DIRECTION_UP_RIGHT :
_local1.x = _local1.x + stepLength;
_local1.y = _local1.y - stepLength;
break;
case DIRECTION_DOWN_LEFT :
_local1.x = _local1.x - stepLength;
_local1.y = _local1.y + stepLength;
break;
case DIRECTION_DOWN_RIGHT :
_local1.x = _local1.x + stepLength;
_local1.y = _local1.y + stepLength;
}
return(_local1);
}
static function moveDirectionPlus(posMove, directionMove, stepLength, stepXDif, stepYDif) {
var _local1 = new flash.geom.Point(posMove.x, posMove.y);
switch (directionMove) {
case DIRECTION_LEFT :
if (stepXDif > stepLength) {
_local1.x = _local1.x - stepLength;
} else {
_local1.x = _local1.x - stepXDif;
}
break;
case DIRECTION_RIGHT :
if (stepXDif > stepLength) {
_local1.x = _local1.x + stepLength;
} else {
_local1.x = _local1.x + stepXDif;
}
break;
case DIRECTION_UP :
if (stepYDif > stepLength) {
_local1.y = _local1.y - stepLength;
} else {
_local1.y = _local1.y - stepYDif;
}
break;
case DIRECTION_DOWN :
if (stepYDif > stepLength) {
_local1.y = _local1.y + stepLength;
} else {
_local1.y = _local1.y + stepYDif;
}
break;
case DIRECTION_UP_LEFT :
if (stepXDif > stepLength) {
_local1.x = _local1.x - stepLength;
} else {
_local1.x = _local1.x - stepXDif;
}
if (stepYDif > stepLength) {
_local1.y = _local1.y - stepLength;
} else {
_local1.y = _local1.y - stepYDif;
}
break;
case DIRECTION_UP_RIGHT :
if (stepXDif > stepLength) {
_local1.x = _local1.x + stepLength;
} else {
_local1.x = _local1.x + stepXDif;
}
if (stepYDif > stepLength) {
_local1.y = _local1.y - stepLength;
} else {
_local1.y = _local1.y - stepYDif;
}
break;
case DIRECTION_DOWN_LEFT :
if (stepXDif > stepLength) {
_local1.x = _local1.x - stepLength;
} else {
_local1.x = _local1.x - stepXDif;
}
if (stepYDif > stepLength) {
_local1.y = _local1.y + stepLength;
} else {
_local1.y = _local1.y + stepYDif;
}
break;
case DIRECTION_DOWN_RIGHT :
if (stepXDif > stepLength) {
_local1.x = _local1.x + stepLength;
} else {
_local1.x = _local1.x + stepXDif;
}
if (stepYDif > stepLength) {
_local1.y = _local1.y + stepLength;
} else {
_local1.y = _local1.y + stepYDif;
}
}
return(_local1);
}
static function getOrientationToPoint(p_posOrigin, p_posGoal) {
return(Math.atan2(p_posGoal.y - p_posOrigin.y, p_posGoal.x - p_posOrigin.x));
}
static function moveYaw(p_pos, p_yaw, p_stepLength) {
return(new flash.geom.Point(p_pos.x + (p_stepLength * Math.cos(p_yaw)), p_pos.y + (p_stepLength * Math.sin(p_yaw))));
}
static function isInsideBox(p_pos, p_x_origin, p_y_origin, p_x_end, p_y_end) {
return((((p_pos.x > p_x_origin) && (p_pos.y > p_y_origin)) && (p_pos.x < p_x_end)) && (p_pos.y < p_y_end));
}
static function askDirectionPoint(p_pos, p_yaw, p_objetive) {
var _local4 = new Array(p_pos.x, 0, p_pos.y);
var _local8 = new Array(p_pos.x + Math.cos(p_yaw), 0, p_pos.y + Math.sin(p_yaw));
var _local7 = new Array(p_pos.x, 1, p_pos.y);
var _local3 = new Array(0, 0, 0);
var _local2 = new Array(0, 0, 0);
var _local1 = new Array(0, 0, 0);
_local3[0] = _local8[0] - _local4[0];
_local3[1] = _local8[1] - _local4[1];
_local3[2] = _local8[2] - _local4[2];
_local2[0] = _local7[0] - _local4[0];
_local2[1] = _local7[1] - _local4[1];
_local2[2] = _local7[2] - _local4[2];
_local1[0] = (_local3[1] * _local2[2]) - (_local3[2] * _local2[1]);
_local1[1] = (_local3[2] * _local2[0]) - (_local3[0] * _local2[2]);
_local1[2] = (_local3[0] * _local2[1]) - (_local3[1] * _local2[0]);
var _local5 = Math.sqrt(((_local1[0] * _local1[0]) + (_local1[1] * _local1[1])) + (_local1[2] * _local1[2]));
if (_local5 == 0) {
_local1[0] = 0;
_local1[1] = 0;
_local1[2] = 0;
} else {
_local1[0] = _local1[0] / _local5;
_local1[1] = _local1[1] / _local5;
_local1[2] = _local1[2] / _local5;
}
var _local9 = -(((_local1[0] * _local4[0]) + (_local1[1] * _local4[1])) + (_local1[2] * _local4[2]));
return(((p_objetive.x * _local1[0]) + (p_objetive.y * _local1[2])) + _local9);
}
static function getDistancePlanePoint(p_pos, p_yaw, p_objetive) {
var _local4 = new Array(p_pos.x, 0, p_pos.y);
var _local8 = new Array(p_pos.x + Math.cos(p_yaw + (Math.PI/2)), 0, p_pos.y + Math.sin(p_yaw + (Math.PI/2)));
var _local7 = new Array(p_pos.x, 1, p_pos.y);
var _local3 = new Array(0, 0, 0);
var _local2 = new Array(0, 0, 0);
var _local1 = new Array(0, 0, 0);
_local3[0] = _local8[0] - _local4[0];
_local3[1] = _local8[1] - _local4[1];
_local3[2] = _local8[2] - _local4[2];
_local2[0] = _local7[0] - _local4[0];
_local2[1] = _local7[1] - _local4[1];
_local2[2] = _local7[2] - _local4[2];
_local1[0] = (_local3[1] * _local2[2]) - (_local3[2] * _local2[1]);
_local1[1] = (_local3[2] * _local2[0]) - (_local3[0] * _local2[2]);
_local1[2] = (_local3[0] * _local2[1]) - (_local3[1] * _local2[0]);
var _local5 = Math.sqrt(((_local1[0] * _local1[0]) + (_local1[1] * _local1[1])) + (_local1[2] * _local1[2]));
if (_local5 == 0) {
_local1[0] = 0;
_local1[1] = 0;
_local1[2] = 0;
} else {
_local1[0] = _local1[0] / _local5;
_local1[1] = _local1[1] / _local5;
_local1[2] = _local1[2] / _local5;
}
var _local9 = -(((_local1[0] * _local4[0]) + (_local1[1] * _local4[1])) + (_local1[2] * _local4[2]));
return(Math.abs(((p_objetive.x * _local1[0]) + (p_objetive.y * _local1[2])) + _local9));
}
static function getDifficulty(p_difficulty) {
switch (p_difficulty) {
case 0 :
return("EASY");
case 1 :
return("NORMAL");
case 2 :
return("HARD");
case 3 :
return("VERY EASY");
}
}
static var CLOSING_DIMENSIONS_RECORDSET = "ClosingDimensionAg";
static var ENABLE_XML_INTEGRATED = true;
static var ENABLE_PROTECTION = false;
static var DEBUG_STATES_MAIN = false;
static var DEBUG_GENERAL = false;
static var DEBUG_XML_LOAD = false;
static var DEBUG_HISTORY_BOSS_LEVELS = false;
static var DEBUG_BALL = false;
static var ENABLE_LOCKER = true;
static var EXTRA_TIME_FOR_TIMEATTACK = 5;
static var NORMAL_FRAME_RATE = 6;
static var TOTAL_NUMBER_OF_LEVELS = 16;
static var LENGTH_HOLE_COLLISION = 30;
static var CONSTANT_GRAVITY = 1;
static var CONSTANT_MEDIUM_RESISTANCE = 0.99;
static var CONSTANT_BALL_RADIUS = 10;
static var CONSTANT_BALL_WIDTH = 20;
static var CONSTANT_ENERGY_KEEP = 0.999;
static var CONSTANT_INITIAL_VELOCITY = 15;
static var STATEGENERAL_MENU = 0;
static var STATEGENERAL_PAUSE = 1;
static var STATEGENERAL_GAME = 2;
static var STATEGENERAL_RESULT = 3;
static var STATE_GAME_PRE_LOADING = 0;
static var STATE_GAME_LOADING = 1;
static var STATE_GAME_PRESENTATION = 2;
static var STATE_GAME_PRESENTATION_2 = 3;
static var STATE_GAME_RUN = 4;
static var STATE_GAME_WAIT_HOLE = 5;
static var STATE_GAME_VICTORY = 6;
static var STATE_GAME_LOSE = 7;
static var STATE_GAME_PAUSE = 8;
static var DEPTH_BALL_TRAJECTORY = 500;
static var DEPTH_BALL_PROTAGONIST = 1000;
static var DEPTH_HOLES = 2000;
static var DIRECTION_LEFT = 0;
static var DIRECTION_RIGHT = 1;
static var DIRECTION_UP = 2;
static var DIRECTION_DOWN = 3;
static var DIRECTION_UP_LEFT = 4;
static var DIRECTION_UP_RIGHT = 5;
static var DIRECTION_DOWN_LEFT = 6;
static var DIRECTION_DOWN_RIGHT = 7;
static var DIRECTION_NONE = -1;
static var SOUNDS_MELODIA_MENU = 0;
static var SOUNDS_SELECCION = 1;
static var SOUNDS_INICIO_NIVEL = 2;
static var SOUNDS_VICTORIA = 3;
static var SOUNDS_DERROTA = 4;
static var SOUNDS_FX_BOING = 5;
static var SOUNDS_FX_HOLE_CLOSING = 6;
static var SOUNDS_VOICE_1 = 7;
static var SOUNDS_VOICE_2 = 8;
static var SOUNDS_VOICE_3 = 9;
static var SOUNDS_VOICE_4 = 10;
static var SOUNDS_VOICE_5 = 11;
static var SOUNDS_VOICE_6 = 12;
static var SOUNDS_VOICE_7 = 13;
static var SOUNDS_VOICE_8 = 14;
static var SOUNDS_VOICE_9 = 15;
static var SOUNDS_VOICE_10 = 16;
static var SOUNDS_VOICE_11 = 17;
static var SOUNDS_VOICE_12 = 18;
static var SOUNDS_VOICE_13 = 19;
static var SOUNDS_VOICE_14 = 20;
static var SOUNDS_VOICE_15 = 21;
static var SOUNDS_VOICE_16 = 22;
static var SOUNDS_VOICE_17 = 23;
static var SOUNDS_VOICE_18 = 24;
static var SOUNDS_LOOP_1 = 0;
static var SOUNDS_LOOP_2 = 1;
static var SOUNDS_LOOP_3 = 2;
static var SOUNDS_LOOP_4 = 3;
static var LEVEL_TEXT_DESCRIPTIONS = ["Forest: Sweet Melody", "Forest: Fresh Air", "Forest: Beautiful Day", "Forest: BOSS BATTLE", "Cave: Inside the earth", "Cave: Deeper and deeper", "Cave: Where is the light", "Cave: BOSS BATTLE", "Graveyard: Anyboby live here?", "Graveyard: Visiting the ancestors", "Graveyard: Dark Night", "Graveyard: BOSS BATTLE", "Castle: Behind the walls", "Castle: The truth is near", "Castle: Who said fear?", "Castle: BOSS BATTLE"];
}
Symbol 550 MovieClip [__Packages.cObject] Frame 0
class cObject
{
var _gWorld, _clip, _myName, _clipTrayectory, _active, _pos, _posLast, _posLastLast, _posInitial, _vel, _velocityInitial, _angleInitial, _damp, _radius, _lastValueColision, _colourTrayectory, _redTrayectory, _blueTrayectory, _greenTrayectory, _lastState, _state, _iterator;
function cObject (gWorld, clip, myName) {
_gWorld = gWorld;
_clip = clip;
_myName = myName;
_root.instGame.world.createEmptyMovieClip("trayectoy", Define.DEPTH_BALL_TRAJECTORY);
_clipTrayectory = _root.instGame.world.trayectoy;
_active = false;
}
function init(pos) {
_pos = new flash.geom.Point(pos.x, pos.y);
_posLast = new flash.geom.Point(pos.x, pos.y);
_posLastLast = new flash.geom.Point(pos.x, pos.y);
_posInitial = new flash.geom.Point(pos.x, pos.y);
_vel = new flash.geom.Point(0, 1);
_velocityInitial = Define.CONSTANT_INITIAL_VELOCITY;
_angleInitial = 45;
_damp = new flash.geom.Point(Define.CONSTANT_ENERGY_KEEP, Define.CONSTANT_ENERGY_KEEP);
_active = true;
_clip._x = _pos.x;
_clip._y = _pos.y;
_radius = Define.CONSTANT_BALL_WIDTH / 2;
_lastValueColision = Worldmap.COLISION_TYPE_EMPTY;
_colourTrayectory = 0;
_redTrayectory = 0;
_blueTrayectory = 0;
_greenTrayectory = 0;
changeState(STATE_BALL_RUN);
}
function freeResources() {
_active = false;
_clip._visible = false;
_clip.removeMovieClip();
}
function changeState(newstate) {
_lastState = _state;
_state = newstate;
_iterator = 0;
}
function controlInput() {
if (_root.instGame.gStateGame == Define.STATE_GAME_RUN) {
if (Key.isDown(39)) {
_angleInitial = _angleInitial + 1;
}
if (Key.isDown(37)) {
_angleInitial = _angleInitial - 1;
}
if (Key.isDown(38)) {
_velocityInitial = _velocityInitial + 0.5;
if (_velocityInitial > ((7 * _gWorld._blockSizeX) / 10)) {
_velocityInitial = (7 * _gWorld._blockSizeX) / 10;
}
}
if (Key.isDown(40)) {
_velocityInitial = _velocityInitial - 0.5;
if (_velocityInitial < 0.5) {
_velocityInitial = 0.5;
}
}
if (Key.isDown(32)) {
_vel.x = _velocityInitial * Math.cos(Define.getRadians(_angleInitial));
_vel.y = _velocityInitial * Math.sin(Define.getRadians(_angleInitial));
_damp.x = Define.CONSTANT_ENERGY_KEEP;
_damp.y = Define.CONSTANT_ENERGY_KEEP;
_root.instGame.gNumberHitsAvailable--;
if (!_root.gTimeAttackMode) {
_root.instGame.instLimitNumber.instText.text = "HITS " + _root.instGame.gNumberHitsAvailable;
}
return(true);
}
}
_root.instGame.instTmpVelocity.text = "" + _velocityInitial;
_root.instGame.instTmpAngle.text = "" + _angleInitial;
return(false);
}
function updateColisionAngle(p_angle, p_widthShift, p_heightShift) {
var _local4 = _pos.x - (_pos.x + p_widthShift);
var _local3 = _pos.y - (_pos.y + p_heightShift);
var _local2 = (p_angle * Math.PI) / 180;
var _local7 = (Math.cos(_local2) * _local4) + (Math.sin(_local2) * _local3);
var _local5 = (Math.cos(_local2) * _local3) - (Math.sin(_local2) * _local4);
var _local8 = (Math.cos(_local2) * _vel.x) + (Math.sin(_local2) * _vel.y);
var _local6 = (Math.cos(_local2) * _vel.y) - (Math.sin(_local2) * _vel.x);
_local5 = -(Define.CONSTANT_BALL_WIDTH / 2);
_local6 = _local6 * -0.9;
_local4 = (Math.cos(_local2) * _local7) - (Math.sin(_local2) * _local5);
_local3 = (Math.cos(_local2) * _local5) + (Math.sin(_local2) * _local7);
_vel.x = (Math.cos(_local2) * _local8) - (Math.sin(_local2) * _local6);
_vel.y = (Math.cos(_local2) * _local6) + (Math.sin(_local2) * _local8);
_pos.x = (_pos.x + p_widthShift) + _local4;
_pos.y = (_pos.y + p_heightShift) + _local3;
}
function moveBall(p_apply) {
_posLastLast.x = _pos.x;
_posLastLast.y = _pos.y;
_vel.x = _vel.x * Define.CONSTANT_MEDIUM_RESISTANCE;
_vel.y = _vel.y * Define.CONSTANT_MEDIUM_RESISTANCE;
_vel.y = _vel.y + Define.CONSTANT_GRAVITY;
var _local6 = new flash.geom.Point(_pos.x, _pos.y);
var _local8 = Worldmap.COLISION_TYPE_EMPTY;
var _local7 = 10;
if (!p_apply) {
_local7 = 1;
}
var _local4 = Math.abs(_radius * Math.SQRT1_2);
var _local9 = 0;
while (_local9 < _local7) {
_local6.x = _local6.x + (_vel.x / _local7);
_local6.y = _local6.y + (_vel.y / _local7);
var _local5 = 0;
while (_local5 < 8) {
var _local3 = new flash.geom.Point(_local6.x, _local6.y);
switch (_local5) {
case 0 :
_local3.x = _local3.x + _radius;
break;
case 1 :
_local3.x = _local3.x - _radius;
break;
case 2 :
_local3.y = _local3.y - _radius;
break;
case 3 :
_local3.y = _local3.y + _radius;
break;
case 4 :
_local3.x = _local3.x + _local4;
_local3.y = _local3.y + _local4;
break;
case 5 :
_local3.x = _local3.x + _local4;
_local3.y = _local3.y - _local4;
break;
case 6 :
_local3.x = _local3.x - _local4;
_local3.y = _local3.y + _local4;
break;
case 7 :
_local3.x = _local3.x - _local4;
_local3.y = _local3.y - _local4;
}
_local8 = _gWorld.isCollision(_local3, new flash.geom.Point(_vel.x / _local7, _vel.y / _local7));
if (_local8 != Worldmap.COLISION_TYPE_EMPTY) {
break;
}
_local5++;
}
if (_local8 != Worldmap.COLISION_TYPE_EMPTY) {
break;
}
_posLastLast.x = _posLast.x;
_posLastLast.y = _posLast.y;
_posLast.x = _pos.x;
_posLast.y = _pos.y;
_pos.x = _local6.x;
_pos.y = _local6.y;
if (p_apply) {
_clip._x = _pos.x;
_clip._y = _pos.y;
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if (_posLast.x != _pos.x) {
if (_posLast.x < _pos.x) {
_clip.instAnimationBall._rotation = _clip.instAnimationBall._rotation + 2;
} else {
_clip.instAnimationBall._rotation = _clip.instAnimationBall._rotation - 2;
}
}
}
}
_local9++;
}
var _local11 = 1;
switch (_local8) {
case Worldmap.COLISION_TYPE_2 :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
updateColisionAngle(315, _radius * Math.SQRT1_2, _radius * 0.707106781186547);
break;
case Worldmap.COLISION_TYPE_3 :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
updateColisionAngle(225, _radius * Math.SQRT1_2, (-_radius) * 0.707106781186547);
break;
case Worldmap.COLISION_TYPE_4 :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
updateColisionAngle(45, (-(_radius - _local11)) * Math.SQRT1_2, (_radius - _local11) * 0.707106781186547);
break;
case Worldmap.COLISION_TYPE_5 :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
updateColisionAngle(135, (-(_radius + _local11)) * Math.SQRT1_2, (-(_radius + _local11)) * 0.707106781186547);
break;
case Worldmap.COLISION_TYPE_UP :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
_vel.y = _vel.y * (-_damp.y);
_damp.y = _damp.y / 1.15;
break;
case Worldmap.COLISION_TYPE_DOWN :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
_vel.y = _vel.y * (-_damp.y);
_damp.y = _damp.y / 1.15;
break;
case Worldmap.COLISION_TYPE_LEFT :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
_vel.x = _vel.x * (-_damp.x);
_damp.x = _damp.x / 1.15;
break;
case Worldmap.COLISION_TYPE_RIGHT :
if ((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN)) {
if ((_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION) && (_root.instGame.gStateGame != Define.STATE_GAME_PRESENTATION_2)) {
_root.playGameSoundStops(Define.SOUNDS_FX_BOING, 1);
}
_clip.instAnimationBall.gotoAndPlay("special");
}
_vel.x = _vel.x * (-_damp.x);
_damp.x = _damp.x / 1.15;
break;
default :
_posLastLast.x = _posLast.x;
_posLastLast.y = _posLast.y;
_posLast.x = _pos.x;
_posLast.y = _pos.y;
_pos.x = _local6.x;
_pos.y = _local6.y;
if (!p_apply) {
break;
}
_clip._x = _pos.x;
_clip._y = _pos.y;
if (!((_state == STATE_BALL_RUN) || (_state == STATE_BALL_WIN))) {
break;
}
if (_posLast.x == _pos.x) {
break;
}
if (_posLast.x < _pos.x) {
_clip.instAnimationBall._rotation = _clip.instAnimationBall._rotation + 2;
} else {
_clip.instAnimationBall._rotation = _clip.instAnimationBall._rotation - 2;
}
}
return(_local8);
}
function showTrayectory() {
var _posLastSecurity = (new flash.geom.Point(_posLast.x, _posLast.y));
var _posSecurity = (new flash.geom.Point(_pos.x, _pos.y));
var _velSecurity = (new flash.geom.Point(_vel.x, _vel.y));
_vel.x = _velocityInitial * Math.cos(Define.getRadians(_angleInitial));
_vel.y = _velocityInitial * Math.sin(Define.getRadians(_angleInitial));
_damp.x = Define.CONSTANT_ENERGY_KEEP;
_damp.y = Define.CONSTANT_ENERGY_KEEP;
_clipTrayectory._x = _clip._x;
_clipTrayectory._y = _clip._y;
_clipTrayectory.clear();
_redTrayectory = 0;
_blueTrayectory = 0;
_greenTrayectory = 0;
_colourTrayectory = 0;
with (_clipTrayectory) {
lineStyle(10, 255, 100);
moveTo(_root.instGame.gProtagonist._pos.x - _root.instGame.gProtagonist._clip._x, _root.instGame.gProtagonist._pos.y - _root.instGame.gProtagonist._clip._y);
}
do {
var typeCol = moveBall(false);
with (_clipTrayectory) {
lineStyle(10, 255, 100);
lineTo(_root.instGame.gProtagonist._pos.x - _root.instGame.gProtagonist._clip._x, _root.instGame.gProtagonist._pos.y - _root.instGame.gProtagonist._clip._y);
}
var my_color = new Color(_clipTrayectory);
var myColorTransform = {ra:0, rb:0, ga:0, gb:0, ba:50, bb:244, aa:10, ab:100};
my_color.setTransform(myColorTransform);
} while (typeCol == Worldmap.COLISION_TYPE_EMPTY);
_posLast.x = _posLastSecurity.x;
_posLast.y = _posLastSecurity.y;
_pos.x = _posSecurity.x;
_pos.y = _posSecurity.y;
_vel.x = _velSecurity.x;
_vel.y = _velSecurity.y;
}
function isInsideScreen() {
var _local2 = Define.CONSTANT_BALL_WIDTH >> 1;
var _local3 = Define.CONSTANT_BALL_WIDTH >> 1;
return(((((_clip._x - (_gWorld._myCamera.x - (_gWorld._screenSize.x >> 1))) > 0) && ((_clip._y - (_gWorld._myCamera.y - (_gWorld._screenSize.y >> 1))) > 0)) && ((_clip._x - (_gWorld._myCamera.x + (_gWorld._screenSize.x >> 1))) < _gWorld._screenSize.x)) && ((_clip._y - (_gWorld._myCamera.y + (_gWorld._screenSize.y >> 1))) < _gWorld._screenSize.y));
}
function desactiveElement() {
if (_active == true) {
_active = false;
_clip._visible = false;
}
}
function setActiveElement() {
_active = true;
_clip._visible = true;
}
function logic() {
if (!_active) {
return(0);
}
if (Define.DEBUG_BALL) {
trace("cObject.logic: CLASS PROTAGONIST");
}
switch (_state) {
case STATE_BALL_PRESENTATION :
if (_iterator < 10) {
_iterator++;
}
if (_iterator == 1) {
_clip.gotoAndStop("quiet");
_clip.instAnimationBall.gotoAndPlay("normal");
}
break;
case STATE_BALL_QUIET :
if (_iterator < 10) {
_iterator++;
}
if (_iterator == 1) {
_clip.gotoAndStop("quiet");
_angleInitial = -45;
_velocityInitial = Define.CONSTANT_INITIAL_VELOCITY;
var _local4 = _root.instGame.getNearestHole(_pos);
if (_local4.x < _pos.x) {
_angleInitial = -135;
} else {
_angleInitial = -45;
}
}
if (controlInput()) {
changeState(STATE_BALL_RUN);
_clipTrayectory.clear();
return(undefined);
}
showTrayectory();
break;
case STATE_BALL_RUN :
if (_iterator < 10) {
_iterator++;
}
if (_iterator == 1) {
_clipTrayectory.clear();
_clip.gotoAndStop("running");
_root.instGame.gHitsDoneForTimeAttack++;
_clip.instAnimationBall.gotoAndPlay("normal");
}
var _local3 = moveBall(true);
if (_root.instGame.gNumberHolesLeft <= 0) {
changeState(STATE_BALL_WIN);
_lastValueColision = _local3;
return(1);
}
var _local5 = Math.abs(_vel.x) + Math.abs(_vel.y);
var _local6 = flash.geom.Point.distance(_pos, _posLastLast);
if ((_local3 == Worldmap.COLISION_TYPE_UP) && (_lastValueColision == Worldmap.COLISION_TYPE_UP)) {
if (_root.instGame.gNumberHitsAvailable <= 0) {
changeState(STATE_BALL_LOSE);
_lastValueColision = _local3;
return(1);
}
changeState(STATE_BALL_QUIET);
_clip.gotoAndStop("quiet");
_lastValueColision = _local3;
return(0);
}
_lastValueColision = _local3;
break;
case STATE_BALL_WIN :
if (_iterator < 10) {
_iterator++;
}
if (_iterator == 1) {
_clipTrayectory.clear();
_clip.gotoAndStop("victory");
_clip.instAnimationBall.gotoAndPlay("normal");
}
_local3 = moveBall(true);
_local5 = Math.abs(_vel.x) + Math.abs(_vel.y);
_local6 = flash.geom.Point.distance(_pos, _posLastLast);
if ((_local3 == Worldmap.COLISION_TYPE_UP) && (_lastValueColision == Worldmap.COLISION_TYPE_UP)) {
changeState(STATE_BALL_FINISH);
}
_lastValueColision = _local3;
break;
case STATE_BALL_LOSE :
if (_iterator < 10) {
_iterator++;
}
if (_iterator == 1) {
_clipTrayectory.clear();
_clip.gotoAndStop("lose");
_clip.instAnimationBall.gotoAndPlay("normal");
}
_local3 = moveBall(true);
if (((Math.abs(_vel.x) + Math.abs(_vel.y)) < 4) && (_local3 == Worldmap.COLISION_TYPE_UP)) {
changeState(STATE_BALL_FINISH);
}
break;
case STATE_BALL_FINISH :
break;
}
_gWorld.changeCamera(Math.floor(_pos.x * (_gWorld._world._xscale / 100)), Math.floor(_pos.y * (_gWorld._world._yscale / 100)));
return(0);
}
static var STATE_BALL_PRESENTATION = 0;
static var STATE_BALL_QUIET = 1;
static var STATE_BALL_RUN = 2;
static var STATE_BALL_WIN = 3;
static var STATE_BALL_LOSE = 4;
static var STATE_BALL_FINISH = 5;
}
Symbol 551 MovieClip [__Packages.Worldmap] Frame 0
class Worldmap
{
var _game, _world, _matrixLevel, _currentLevel, _myCamera, _myLastCamera, _screenSize, _screenWidthDiv2, _screenHeightDiv2, _iFrontierXLow, _iFrontierYLow, _modeOfTiles, _pointInitialBall, _listOfHoles, _listOfHolesToOrder, _listDefineOrder, _docxml, _widthMatrix, _heightMatrix, _blockSizeX, _blockSizeY, _numberOfRenderLayers, _iFrontierXHigh, _iFrontierYHigh, _bitmapDataTileMap, _bitmapDataGlobalMap, _matrizAI, _totalCellMatriz;
function Worldmap (game, world, currentLevel, myCamera, screenSize, modeOfTiles) {
_game = game;
_world = world;
_matrixLevel = new Array();
_currentLevel = currentLevel;
_myCamera = new flash.geom.Point(myCamera.x, myCamera.y);
_myLastCamera = new flash.geom.Point(myCamera.x, myCamera.y);
_screenSize = new flash.geom.Point(screenSize.x, screenSize.y);
_screenWidthDiv2 = _screenSize.x / 2;
_screenHeightDiv2 = _screenSize.y / 2;
_iFrontierXLow = _screenWidthDiv2;
_iFrontierYLow = _screenHeightDiv2;
_modeOfTiles = modeOfTiles;
_pointInitialBall = new flash.geom.Point(-1, -1);
_listOfHoles = new Array();
_listOfHolesToOrder = new Array();
_listDefineOrder = new Array();
if (!Define.ENABLE_XML_INTEGRATED) {
_docxml = new XML();
_docxml.ignoreWhite = true;
_docxml.onLoad = function () {
var _local15;
var _local13;
var _local21;
var _local20;
var _local19;
var _local18;
var _local22;
var _local23;
var _local4 = 0;
while (_local4 < _root.instGame.gWorld._docxml.firstChild.childNodes.length) {
if (Define.DEBUG_XML_LOAD) {
trace((("Propiedad(" + _local4) + ")=") + _root.instGame.gWorld._docxml.firstChild.childNodes[_local4].attributes.name);
}
var _local6 = _root.instGame.gWorld._docxml.firstChild.childNodes[_local4].firstChild.nodeValue;
if (Define.DEBUG_XML_LOAD) {
trace((("Dato(" + _local4) + ")=") + _local6);
}
switch (_local4) {
case 0 :
_root.instGame.gWorld._widthMatrix = new Number(_local6);
break;
case 1 :
_root.instGame.gWorld._heightMatrix = new Number(_local6);
break;
case 2 :
_root.instGame.gWorld._blockSizeX = new Number(_local6);
break;
case 3 :
_root.instGame.gWorld._blockSizeY = new Number(_local6);
break;
case 4 :
_local15 = _local6.split(",");
break;
case 5 :
if (Define.DEBUG_XML_LOAD) {
trace((("Propiedad RENDER(" + _local4) + ")=") + _root.instGame.gWorld._docxml.firstChild.childNodes[_local4].attributes.numberlayers);
}
_root.instGame.gWorld._numberOfRenderLayers = new Number(_root.instGame.gWorld._docxml.firstChild.childNodes[_local4].attributes.numberlayers);
_local13 = _local6.split(",");
}
_local4++;
}
var _local12 = Number(_root.instGame.gWorld._widthMatrix) * Number(_root.instGame.gWorld._heightMatrix);
_root.instGame.gWorld._matrixLevel = new Array(_local12);
var _local3 = 1;
while (_local3 <= _local12) {
var _local9 = new Array(_root.instGame.gWorld._numberOfRenderLayers + 1);
var _local5 = new Number(_local15[_local3]);
if (_local5 == Worldmap.COLISION_TYPE_BALL) {
_root.instGame.gWorld._pointInitialBall.x = Math.floor(_local3 / _root.instGame.gWorld._heightMatrix);
_root.instGame.gWorld._pointInitialBall.y = Math.floor(_local3 % _root.instGame.gWorld._heightMatrix) - 1;
_local5 = Worldmap.COLISION_TYPE_EMPTY;
}
if (_local5 == Worldmap.COLISION_TYPE_HOLE) {
_local5 = Worldmap.COLISION_TYPE_EMPTY;
_root.instGame.gWorld._listOfHoles.push(new flash.geom.Point(Math.floor(_local3 / _root.instGame.gWorld._heightMatrix), Math.floor(_local3 % _root.instGame.gWorld._heightMatrix) - 1));
}
if (_local5 > Worldmap.COLISION_TYPE_HOLE) {
if (Define.DEBUG_HISTORY_BOSS_LEVELS) {
if (_root.instGame.gWorld._listOfHolesToOrder.length < 1) {
_root.instGame.gWorld._listOfHolesToOrder.push(new flash.geom.Point(Math.floor(_local3 / _root.instGame.gWorld._heightMatrix), Math.floor(_local3 % _root.instGame.gWorld._heightMatrix) - 1));
_root.instGame.gWorld._listDefineOrder.push(new Number(_local5));
}
} else {
_root.instGame.gWorld._listOfHolesToOrder.push(new flash.geom.Point(Math.floor(_local3 / _root.instGame.gWorld._heightMatrix), Math.floor(_local3 % _root.instGame.gWorld._heightMatrix) - 1));
_root.instGame.gWorld._listDefineOrder.push(new Number(_local5));
}
_local5 = Worldmap.COLISION_TYPE_EMPTY;
}
_local9[0] = new Number(_local5);
var _local2 = 0;
while (_local2 < _root.instGame.gWorld._numberOfRenderLayers) {
var _local10 = new Number(_local13[_local3 + (_local12 * _local2)]);
_local9[_local2 + 1] = new Number(_local10);
_local2++;
}
_root.instGame.gWorld._matrixLevel[_local3 - 1] = _local9;
_local3++;
}
_root.instGame.gWorld._iFrontierXHigh = (_root.instGame.gWorld._widthMatrix * _root.instGame.gWorld._blockSizeX) - _root.instGame.gWorld._iFrontierXLow;
_root.instGame.gWorld._iFrontierYHigh = (_root.instGame.gWorld._heightMatrix * _root.instGame.gWorld._blockSizeY) - _root.instGame.gWorld._iFrontierYLow;
switch (_root.gCurrentLevel) {
case 0 :
case 1 :
case 2 :
case 3 :
_root.instGame.gWorld.buildBoardBitmapData("tilemap1");
break;
case 4 :
case 5 :
case 6 :
case 7 :
_root.instGame.gWorld.buildBoardBitmapData("tilemap2");
break;
case 8 :
case 9 :
case 10 :
case 11 :
_root.instGame.gWorld.buildBoardBitmapData("tilemap3");
break;
case 12 :
case 13 :
case 14 :
case 15 :
_root.instGame.gWorld.buildBoardBitmapData("tilemap4");
}
var _local14 = 0;
while ((_root.instGame.gWorld._listDefineOrder.length > 0) && (_local14 < 50)) {
_local14++;
var _local8 = -1;
var _local11 = 99999 /* 0x01869F */;
var _local7 = new flash.geom.Point(0, 0);
var _local2 = 0;
while (_local2 < _root.instGame.gWorld._listDefineOrder.length) {
if (_root.instGame.gWorld._listDefineOrder[_local2] < _local11) {
_local8 = _local2;
_local11 = _root.instGame.gWorld._listDefineOrder[_local2];
_local7.x = _root.instGame.gWorld._listOfHolesToOrder[_local2].x;
_local7.y = _root.instGame.gWorld._listOfHolesToOrder[_local2].y;
}
_local2++;
}
if (_local8 != -1) {
_root.instGame.gWorld._listOfHolesToOrder.splice(_local8, 1);
_root.instGame.gWorld._listDefineOrder.splice(_local8, 1);
_root.instGame.gWorld._listOfHoles.push(new flash.geom.Point(_local7.x, _local7.y));
}
}
if (!Define.DEBUG_HISTORY_BOSS_LEVELS) {
switch (_root.gCurrentLevel) {
case 3 :
case 7 :
case 11 :
case 15 :
if (_root.gIsHistoryMode) {
var _local16 = _root.instGame.gWorld._listOfHoles.length;
var _local17 = Math.floor((3 * _local16) / 4);
_local16 = _local16 - _local17;
_root.instGame.gWorld._listOfHoles.splice(_local17, _local16);
}
break;
}
}
_root.instGame.changeGeneralGameState(Define.STATE_GAME_LOADING);
};
_docxml.load(("levelsgolf/level" + (_currentLevel + 1)) + ".xml");
} else {
_docxml = new XML(cXml.XML_LEVELS[_currentLevel]);
_docxml.ignoreWhite = true;
var _local16;
var _local14;
var _local26;
var _local25;
var _local24;
var _local23;
var _local28;
var _local29;
var _local5 = 0;
while (_local5 < _docxml.firstChild.childNodes.length) {
if (Define.DEBUG_XML_LOAD) {
trace((("Propiedad(" + _local5) + ")=") + _docxml.firstChild.childNodes[_local5].attributes.name);
}
var _local7 = _docxml.firstChild.childNodes[_local5].firstChild.nodeValue;
if (Define.DEBUG_XML_LOAD) {
trace((("Dato(" + _local5) + ")=") + _local7);
}
switch (_local5) {
case 0 :
_widthMatrix = new Number(_local7);
break;
case 1 :
_heightMatrix = new Number(_local7);
break;
case 2 :
_blockSizeX = new Number(_local7);
break;
case 3 :
_blockSizeY = new Number(_local7);
break;
case 4 :
_local16 = _local7.split(",");
break;
case 5 :
if (Define.DEBUG_XML_LOAD) {
trace((("Propiedad RENDER(" + _local5) + ")=") + _docxml.firstChild.childNodes[_local5].attributes.numberlayers);
}
_numberOfRenderLayers = new Number(_docxml.firstChild.childNodes[_local5].attributes.numberlayers);
_local14 = _local7.split(",");
}
_local5++;
}
var _local13 = Number(_widthMatrix) * Number(_heightMatrix);
_matrixLevel = new Array(_local13);
var _local4 = 1;
while (_local4 <= _local13) {
var _local10 = new Array(_numberOfRenderLayers + 1);
var _local6 = new Number(_local16[_local4]);
if (_local6 == COLISION_TYPE_BALL) {
_pointInitialBall.x = Math.floor(_local4 / _heightMatrix);
_pointInitialBall.y = Math.floor(_local4 % _heightMatrix) - 1;
_local6 = COLISION_TYPE_EMPTY;
}
if (_local6 == COLISION_TYPE_HOLE) {
_local6 = COLISION_TYPE_EMPTY;
_listOfHoles.push(new flash.geom.Point(Math.floor(_local4 / _heightMatrix), Math.floor(_local4 % _heightMatrix) - 1));
}
if (_local6 > COLISION_TYPE_HOLE) {
if (Define.DEBUG_HISTORY_BOSS_LEVELS) {
if (_listOfHolesToOrder.length < 1) {
_listOfHolesToOrder.push(new flash.geom.Point(Math.floor(_local4 / _heightMatrix), Math.floor(_local4 % _heightMatrix) - 1));
_listDefineOrder.push(new Number(_local6));
}
} else {
_listOfHolesToOrder.push(new flash.geom.Point(Math.floor(_local4 / _heightMatrix), Math.floor(_local4 % _heightMatrix) - 1));
_listDefineOrder.push(new Number(_local6));
}
_local6 = COLISION_TYPE_EMPTY;
}
_local10[0] = new Number(_local6);
var _local3 = 0;
while (_local3 < _numberOfRenderLayers) {
var _local11 = new Number(_local14[_local4 + (_local13 * _local3)]);
_local10[_local3 + 1] = new Number(_local11);
_local3++;
}
_matrixLevel[_local4 - 1] = _local10;
_local4++;
}
_iFrontierXHigh = (_widthMatrix * _blockSizeX) - _iFrontierXLow;
_iFrontierYHigh = (_heightMatrix * _blockSizeY) - _iFrontierYLow;
switch (_root.gCurrentLevel) {
case 0 :
case 1 :
case 2 :
case 3 :
buildBoardBitmapData("tilemap1");
break;
case 4 :
case 5 :
case 6 :
case 7 :
buildBoardBitmapData("tilemap2");
break;
case 8 :
case 9 :
case 10 :
case 11 :
buildBoardBitmapData("tilemap3");
break;
case 12 :
case 13 :
case 14 :
case 15 :
buildBoardBitmapData("tilemap4");
}
var _local15 = 0;
while ((_listDefineOrder.length > 0) && (_local15 < 50)) {
_local15++;
var _local9 = -1;
var _local12 = 99999 /* 0x01869F */;
var _local8 = new flash.geom.Point(0, 0);
var _local3 = 0;
while (_local3 < _listDefineOrder.length) {
if (_listDefineOrder[_local3] < _local12) {
_local9 = _local3;
_local12 = _listDefineOrder[_local3];
_local8.x = _listOfHolesToOrder[_local3].x;
_local8.y = _listOfHolesToOrder[_local3].y;
}
_local3++;
}
if (_local9 != -1) {
_listOfHolesToOrder.splice(_local9, 1);
_listDefineOrder.splice(_local9, 1);
_listOfHoles.push(new flash.geom.Point(_local8.x, _local8.y));
}
}
if (!Define.DEBUG_HISTORY_BOSS_LEVELS) {
switch (_root.gCurrentLevel) {
case 3 :
case 7 :
case 11 :
case 15 :
if (_root.gIsHistoryMode) {
var _local17 = _listOfHoles.length;
var _local19 = Math.floor((3 * _local17) / 4);
_local17 = _local17 - _local19;
_listOfHoles.splice(_local19, _local17);
}
break;
}
}
}
}
function freeResources() {
_root.instGame.gProtagonist.freeResources();
_root.instGame.gProtagonist = null;
var _local3 = 0;
while (_local3 < _root.instGame.gHoles.length) {
_root.instGame.gHoles[_local3].freeResources();
_root.instGame.gHoles[_local3] = null;
_local3++;
}
_root.instGame.gHoles = null;
_bitmapDataTileMap = null;
_bitmapDataGlobalMap = null;
}
function changeCamera(px, py) {
_myLastCamera.x = _myCamera.x;
_myLastCamera.y = _myCamera.y;
_myCamera.x = px;
_myCamera.y = py;
switch (_modeOfTiles) {
case 0 :
case 1 :
if (Math.abs(px) < _iFrontierXLow) {
_myCamera.x = _iFrontierXLow;
}
if (Math.abs(py) < _iFrontierYLow) {
_myCamera.y = _iFrontierYLow;
}
if (Math.abs(px) > _iFrontierXHigh) {
_myCamera.x = _iFrontierXHigh;
}
if (Math.abs(py) > _iFrontierYHigh) {
_myCamera.y = _iFrontierYHigh;
}
_world._x = (-_myCamera.x) + _screenWidthDiv2;
_world._y = (-_myCamera.y) + _screenHeightDiv2;
}
}
function getPointMatrix(pos) {
var _local2 = new flash.geom.Point(Math.floor(pos.x / _blockSizeX), Math.floor(pos.y / _blockSizeY));
return(_local2);
}
function getContent(p_pos, p_layer) {
if (p_pos.x < 0) {
return(COLISION_TYPE_1);
}
if (p_pos.y < 0) {
return(COLISION_TYPE_1);
}
if (p_pos.x >= _widthMatrix) {
return(COLISION_TYPE_1);
}
if (p_pos.y >= _heightMatrix) {
return(COLISION_TYPE_1);
}
return(_matrixLevel[(p_pos.x * _heightMatrix) + p_pos.y][p_layer]);
}
function getMaximumLayerValue(p_pos) {
var _local3 = (p_pos.x * _heightMatrix) + p_pos.y;
var _local2 = _numberOfRenderLayers;
while (_local2 >= 1) {
if (_matrixLevel[_local3][_local2] > 0) {
return(_local2 - 1);
}
_local2--;
}
return(-1);
}
function isCollision(posTest, vel) {
var _local10;
var _local9;
var _local3 = Math.floor(posTest.x / _blockSizeX);
var _local4 = Math.floor(posTest.y / _blockSizeY);
var _local11 = _matrixLevel[(_local3 * _heightMatrix) + _local4][0];
if (_local11 == COLISION_TYPE_EMPTY) {
return(COLISION_TYPE_EMPTY);
}
if (_local11 == COLISION_TYPE_1) {
var _local2 = new flash.geom.Point(posTest.x, posTest.y);
do {
_local2.x = _local2.x - (vel.x / 10);
_local2.y = _local2.y - (vel.y / 10);
} while (getContent(getPointMatrix(_local2), 0) != COLISION_TYPE_EMPTY);
var _local7 = Math.floor(_local2.x / _blockSizeX);
var _local8 = Math.floor(_local2.y / _blockSizeY);
if ((_local7 == (_local3 - 1)) && (_local8 == _local4)) {
return(COLISION_TYPE_LEFT);
}
if ((_local7 == (_local3 + 1)) && (_local8 == _local4)) {
return(COLISION_TYPE_RIGHT);
}
if ((_local7 == _local3) && (_local8 == (_local4 - 1))) {
return(COLISION_TYPE_UP);
}
if ((_local7 == _local3) && (_local8 == (_local4 + 1))) {
return(COLISION_TYPE_DOWN);
}
if ((_local7 == (_local3 - 1)) && (_local8 == (_local4 - 1))) {
if (getContent(new flash.geom.Point(_local3 - 1, _local4), 0) == COLISION_TYPE_EMPTY) {
return(COLISION_TYPE_LEFT);
}
return(COLISION_TYPE_UP);
}
if ((_local7 == (_local3 + 1)) && (_local8 == (_local4 - 1))) {
if (getContent(new flash.geom.Point(_local3 + 1, _local4), 0) == COLISION_TYPE_EMPTY) {
return(COLISION_TYPE_RIGHT);
}
return(COLISION_TYPE_UP);
}
if ((_local7 == (_local3 - 1)) && (_local8 == (_local4 + 1))) {
if (getContent(new flash.geom.Point(_local3 - 1, _local4), 0) == COLISION_TYPE_EMPTY) {
return(COLISION_TYPE_LEFT);
}
return(COLISION_TYPE_DOWN);
}
if ((_local7 == (_local3 + 1)) && (_local8 == (_local4 + 1))) {
if (getContent(new flash.geom.Point(_local3 + 1, _local4), 0) == COLISION_TYPE_EMPTY) {
return(COLISION_TYPE_RIGHT);
}
return(COLISION_TYPE_DOWN);
}
}
if (_local11 == COLISION_TYPE_2) {
_local10 = posTest.x - (_local3 * _blockSizeX);
_local9 = _blockSizeY - (posTest.y - (_local4 * _blockSizeY));
if (testColisionDiagonal(315, _local10, _local9)) {
return(COLISION_TYPE_2);
}
return(COLISION_TYPE_EMPTY);
}
if (_local11 == COLISION_TYPE_3) {
_local10 = posTest.x - (_local3 * _blockSizeX);
_local9 = _blockSizeY - (posTest.y - (_local4 * _blockSizeY));
if (testColisionDiagonal(225, _local10, _local9)) {
return(COLISION_TYPE_3);
}
return(COLISION_TYPE_EMPTY);
}
if (_local11 == COLISION_TYPE_4) {
_local10 = posTest.x - (_local3 * _blockSizeX);
_local9 = _blockSizeY - (posTest.y - (_local4 * _blockSizeY));
if (testColisionDiagonal(45, _local10, _local9)) {
return(COLISION_TYPE_4);
}
return(COLISION_TYPE_EMPTY);
}
if (_local11 == COLISION_TYPE_5) {
_local10 = posTest.x - (_local3 * _blockSizeX);
_local9 = _blockSizeY - (posTest.y - (_local4 * _blockSizeY));
if (testColisionDiagonal(135, _local10, _local9)) {
return(COLISION_TYPE_5);
}
return(COLISION_TYPE_EMPTY);
}
return(COLISION_TYPE_EMPTY);
}
function testColisionDiagonal(grad, posTest_x, posTest_y) {
var _local2 = 0;
switch (grad) {
case 45 :
_local2 = (((-_blockSizeY) * posTest_x) + ((-_blockSizeX) * posTest_y)) + (_blockSizeX * _blockSizeY);
break;
case 135 :
_local2 = (_blockSizeY * posTest_x) + ((-_blockSizeX) * posTest_y);
break;
case 225 :
_local2 = ((_blockSizeY * posTest_x) + (_blockSizeX * posTest_y)) - (_blockSizeX * _blockSizeY);
break;
case 315 :
_local2 = ((-_blockSizeY) * posTest_x) + (_blockSizeX * posTest_y);
}
return(_local2 > 0);
}
function renderCell(i, j, posCellScreen, layer) {
var _local4 = (i * _heightMatrix) + j;
var _local5;
if (layer == -1) {
var _local3 = -1;
i = _numberOfRenderLayers;
while (i >= 1) {
_local3 = _matrixLevel[_local4][i];
if (_local3 > 0) {
break;
}
i--;
}
_local5 = _local3;
} else {
_local5 = 0;
if (_matrixLevel[_local4][layer + 1] > 0) {
_local5 = _matrixLevel[_local4][layer + 1];
}
}
if (_local5 > 0) {
_local5 = _local5 - 1;
var _local8 = Math.floor(_local5 / 6);
var _local7 = Math.floor(_local5 % 6);
_bitmapDataGlobalMap.copyPixels(_bitmapDataTileMap, new flash.geom.Rectangle(_local8 * _blockSizeX, _local7 * _blockSizeY, _blockSizeX, _blockSizeY), posCellScreen, _bitmapDataTileMap, new flash.geom.Point(0, 0), true);
}
}
function getDirectionDestination(origin, destination) {
var _local2 = getPointMatrix(origin);
var _local3 = getPointMatrix(destination);
var _local4 = (_local2.x * _heightMatrix) + _local2.y;
var _local5 = (_local3.x * _heightMatrix) + _local3.y;
return(0);
}
function buildBoardBitmapData(linkageId) {
_bitmapDataTileMap = flash.display.BitmapData.loadBitmap(linkageId);
_bitmapDataGlobalMap = new flash.display.BitmapData(_blockSizeX * _widthMatrix, _blockSizeY * _heightMatrix, true);
var _local4 = 0;
while (_local4 < _widthMatrix) {
var _local3 = 0;
while (_local3 < _heightMatrix) {
var _local2 = 0;
while (_local2 < _numberOfRenderLayers) {
renderCell(_local4, _local3, new flash.geom.Point(_local4 * _blockSizeX, _local3 * _blockSizeY), _local2);
_local2++;
}
_local3++;
}
_local4++;
}
_world.attachBitmap(_bitmapDataGlobalMap, 0);
}
function getScreenPoint(ppos) {
var _local2 = new flash.geom.Point(ppos.x, ppos.y);
_local2.x = _local2.x - _myCamera.x;
_local2.y = _local2.y - _myCamera.y;
_local2.x = _local2.x + (_screenSize.x >> 1);
_local2.y = _local2.y + (_screenSize.y >> 1);
return(_local2);
}
function getWorldPoint(ppos) {
var _local2 = new flash.geom.Point(ppos.x, ppos.y);
_local2.x = _local2.x + _myCamera.x;
_local2.y = _local2.y + _myCamera.y;
_local2.x = _local2.x - (_screenSize.x >> 1);
_local2.y = _local2.y - (_screenSize.y >> 1);
return(_local2);
}
function setElementScreenPoint(p_clip, p_pos) {
var _local2 = getScreenPoint(p_pos);
p_clip._x = _local2.x;
p_clip._y = _local2.y;
}
function initAI() {
var _local2;
_matrizAI = new Array();
_totalCellMatriz = 120;
_local2 = 0;
while (_local2 < _totalCellMatriz) {
_matrizAI.push([-1, -1, Define.DIRECTION_NONE, -1, 1000000, -1, -1]);
_local2++;
}
}
function accionCalcularDireccionCoordenadas(x_o, y_o, x_d, y_d) {
if (y_o > y_d) {
return(Define.DIRECTION_UP);
}
if (y_o < y_d) {
return(Define.DIRECTION_DOWN);
}
if (x_o < x_d) {
return(Define.DIRECTION_RIGHT);
}
if (x_o > x_d) {
return(Define.DIRECTION_LEFT);
}
return(Define.DIRECTION_NONE);
}
function accionDistanciaCoordenadas(x_o, y_o, x_d, y_d) {
return(Math.abs(x_o - x_d) + Math.abs(y_o - y_d));
}
function accionHijoCorrecto(pos_x, pos_y, tamanyo_matriz) {
var _local6;
var _local2;
if ((pos_x < 0) || (pos_x >= _widthMatrix)) {
return(0);
}
if ((pos_y < 0) || (pos_y >= _heightMatrix)) {
return(0);
}
var _local7 = new flash.geom.Point(pos_x, pos_y);
_local6 = getContent(_local7, 0);
if (_local6 == COLISION_TYPE_1) {
return(0);
}
_local2 = 0;
while (_local2 <= tamanyo_matriz) {
if ((_matrizAI[_local2][0] == pos_x) && (_matrizAI[_local2][1] == pos_y)) {
return(0);
}
_local2++;
}
return(1);
}
function accionBuscarCamino(x_ori, y_ori, x_des, y_des) {
var _local3;
var _local6;
var _local11;
var _local7;
var _local5;
var _local4;
var _local2;
var _local12;
var _local8;
_local3 = 0;
while (_local3 < _totalCellMatriz) {
_matrizAI[_local3][0] = -1;
_matrizAI[_local3][1] = -1;
_matrizAI[_local3][2] = Define.DIRECTION_NONE;
_matrizAI[_local3][3] = -1;
_matrizAI[_local3][4] = 1000000 /* 0x0F4240 */;
_matrizAI[_local3][5] = -1;
_matrizAI[_local3][6] = 0;
_local3++;
}
_local2 = 0;
_matrizAI[_local2][0] = x_ori;
_matrizAI[_local2][1] = y_ori;
_matrizAI[_local2][2] = 1;
_matrizAI[_local2][3] = Define.DIRECTION_NONE;
if ((x_des == Define.DIRECTION_NONE) && (y_des == Define.DIRECTION_NONE)) {
_matrizAI[_local2][4] = 0;
} else {
_matrizAI[_local2][4] = accionDistanciaCoordenadas(x_ori, y_ori, x_des, y_des);
}
_matrizAI[_local2][5] = -1;
_matrizAI[_local2][6] = 0;
_local3 = 0;
do {
_local11 = 0;
if (_local2 > (_totalCellMatriz - 40)) {
return(100000000);
}
_local12 = 1000000 /* 0x0F4240 */;
_local3 = -1;
_local6 = 0;
while (_local6 <= _local2) {
if (_matrizAI[_local6][2] == 1) {
if (_matrizAI[_local6][4] < _local12) {
_local3 = _local6;
_local12 = _matrizAI[_local6][4];
}
}
_local6++;
}
if (_local3 == -1) {
return(100000000);
}
_local8 = _local3;
if ((_matrizAI[_local3][0] == x_des) && (_matrizAI[_local3][1] == y_des)) {
return(_matrizAI[_local8][6]);
}
_matrizAI[_local8][2] = 0;
_local5 = _matrizAI[_local3][0];
_local4 = _matrizAI[_local3][1] + 1;
if (accionHijoCorrecto(_local5, _local4, _local2) == 1) {
if (_matrizAI[_local8][3] == Define.DIRECTION_NONE) {
_local7 = Define.DIRECTION_DOWN;
} else {
_local7 = _matrizAI[_local8][3];
}
_local2++;
_matrizAI[_local2][0] = _local5;
_matrizAI[_local2][1] = _local4;
_matrizAI[_local2][2] = 1;
_matrizAI[_local2][3] = _local7;
if ((x_des == Define.DIRECTION_NONE) && (y_des == Define.DIRECTION_NONE)) {
_matrizAI[_local2][4] = 0;
} else {
_matrizAI[_local2][4] = accionDistanciaCoordenadas(_local5, _local4, x_des, y_des);
}
_matrizAI[_local2][5] = _local3;
_matrizAI[_local2][6] = _matrizAI[_local3][6] + 1;
_local11++;
}
_local5 = _matrizAI[_local3][0];
_local4 = _matrizAI[_local3][1] - 1;
if (accionHijoCorrecto(_local5, _local4, _local2) == 1) {
if (_matrizAI[_local8][3] == Define.DIRECTION_NONE) {
_local7 = Define.DIRECTION_UP;
} else {
_local7 = _matrizAI[_local8][3];
}
_local2++;
_matrizAI[_local2][0] = _local5;
_matrizAI[_local2][1] = _local4;
_matrizAI[_local2][2] = 1;
_matrizAI[_local2][3] = _local7;
if ((x_des == Define.DIRECTION_NONE) && (y_des == Define.DIRECTION_NONE)) {
_matrizAI[_local2][4] = 0;
} else {
_matrizAI[_local2][4] = accionDistanciaCoordenadas(_local5, _local4, x_des, y_des);
}
_matrizAI[_local2][5] = _local3;
_matrizAI[_local2][6] = _matrizAI[_local3][6] + 1;
_local11++;
}
_local5 = _matrizAI[_local3][0] - 1;
_local4 = _matrizAI[_local3][1];
if (accionHijoCorrecto(_local5, _local4, _local2) == 1) {
if (_matrizAI[_local8][3] == Define.DIRECTION_NONE) {
_local7 = Define.DIRECTION_LEFT;
} else {
_local7 = _matrizAI[_local8][3];
}
_local2++;
_matrizAI[_local2][0] = _local5;
_matrizAI[_local2][1] = _local4;
_matrizAI[_local2][2] = 1;
_matrizAI[_local2][3] = _local7;
if ((x_des == Define.DIRECTION_NONE) && (y_des == Define.DIRECTION_NONE)) {
_matrizAI[_local2][4] = 0;
} else {
_matrizAI[_local2][4] = accionDistanciaCoordenadas(_local5, _local4, x_des, y_des);
}
_matrizAI[_local2][5] = _local3;
_matrizAI[_local2][6] = _matrizAI[_local3][6] + 1;
_local11++;
}
_local5 = _matrizAI[_local3][0] + 1;
_local4 = _matrizAI[_local3][1];
if (accionHijoCorrecto(_local5, _local4, _local2) == 1) {
if (_matrizAI[_local8][3] == Define.DIRECTION_NONE) {
_local7 = Define.DIRECTION_RIGHT;
} else {
_local7 = _matrizAI[_local8][3];
}
_local2++;
_matrizAI[_local2][0] = _local5;
_matrizAI[_local2][1] = _local4;
_matrizAI[_local2][2] = 1;
_matrizAI[_local2][3] = _local7;
if ((x_des == Define.DIRECTION_NONE) && (y_des == Define.DIRECTION_NONE)) {
_matrizAI[_local2][4] = 0;
} else {
_matrizAI[_local2][4] = accionDistanciaCoordenadas(_local5, _local4, x_des, y_des);
}
_matrizAI[_local2][5] = _local3;
_matrizAI[_local2][6] = _matrizAI[_local3][6] + 1;
_local11++;
}
} while (true);
}
static var COLISION_TYPE_EMPTY = 0;
static var COLISION_TYPE_1 = 1;
static var COLISION_TYPE_2 = 2;
static var COLISION_TYPE_3 = 3;
static var COLISION_TYPE_4 = 4;
static var COLISION_TYPE_5 = 5;
static var COLISION_TYPE_BALL = 6;
static var COLISION_TYPE_HOLE = 7;
static var COLISION_TYPE_UP = 6;
static var COLISION_TYPE_DOWN = 7;
static var COLISION_TYPE_LEFT = 8;
static var COLISION_TYPE_RIGHT = 9;
}
Symbol 552 MovieClip [__Packages.cXml] Frame 0
!!!ERROR
Symbol 553 MovieClip [__Packages.cHole] Frame 0
!!!ERROR
Symbol 285 MovieClip Frame 126
_root.gotoAndStop("logo");
Symbol 331 MovieClip [clipLogo] Frame 1
_root.mySoundTmpLogo.attachSound("logomelody");
_root.mySoundTmpLogo.start(0, 1);
Symbol 331 MovieClip [clipLogo] Frame 220
stop();
_root.gotoAndPlay("intro");
Symbol 378 MovieClip Frame 174
stop();
Symbol 385 MovieClip Frame 60
stop();
Symbol 386 MovieClip Frame 582
_root.gotoAndPlay("main");
Symbol 387 MovieClip Frame 400
stop();
Symbol 395 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 10
stop();
Symbol 395 MovieClip Frame 20
stop();
Symbol 395 MovieClip Frame 30
stop();
Symbol 398 MovieClip Frame 1
this.instRotableCircle.gotoAndStop("rojo");
Instance of Symbol 395 MovieClip "instRotableCircle" in Symbol 398 MovieClip Frame 1
/* no clip actions */
Symbol 398 MovieClip Frame 10
this.instRotableCircle.gotoAndStop("verde");
Symbol 398 MovieClip Frame 20
this.instRotableCircle.gotoAndStop("azul");
Symbol 398 MovieClip Frame 30
this.instRotableCircle.gotoAndStop("blanco");
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 11
stop();
Symbol 406 MovieClip Frame 21
stop();
Symbol 406 MovieClip Frame 31
stop();
Symbol 425 MovieClip [clipStatsInformation] Frame 1
stop();
Symbol 425 MovieClip [clipStatsInformation] Frame 11
_alpha = 75;
stop();
Symbol 425 MovieClip [clipStatsInformation] Frame 25
stop();
Symbol 438 Button
on (release) {
var nameWrited = new String(instTextName.text);
var nameToSend = new String("");
var z = 0;
while (z < nameWrited.length) {
var charTmp = new Number(nameWrited.charCodeAt(z));
if ((((charTmp >= 65) && (charTmp <= 90)) || ((charTmp >= 97) && (charTmp <= 122))) || ((charTmp >= 48) && (charTmp <= 57))) {
nameToSend = nameToSend + nameWrited.charAt(z);
}
z++;
}
if (nameToSend.length > 1) {
var my_lv = new LoadVars();
my_lv.onLoad = function (success) {
switch (_root.gCurrentLevel) {
case 3 :
getURL ("http://www.freecreationgames.net/?q=node/30", "_blank");
break;
case 7 :
getURL ("http://www.freecreationgames.net/?q=node/31", "_blank");
break;
case 11 :
getURL ("http://www.freecreationgames.net/?q=node/32", "_blank");
break;
case 15 :
getURL ("http://www.freecreationgames.net/?q=node/33", "_blank");
}
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_parent.instSubmitHighscore._visible = false;
};
var diffTmp = 0;
switch (_root.gCurrentLevel) {
case 3 :
diffTmp = 0;
break;
case 7 :
diffTmp = 1;
break;
case 11 :
diffTmp = 2;
break;
case 15 :
diffTmp = 3;
}
my_lv.load((((((((("http://www.freecreationgames.net/ClosingDimensionsInsert.php?type_closingdim=44&name=" + nameToSend) + "&timedone=") + _root.gPutoTimeDoneInTimeAttack) + "&holesdone=") + _root.instGame.gNumberOfHolesClosedTimerAttack) + "&hitsdone=") + _root.instGame.gHitsDoneForTimeAttack) + "&difficultydone=") + diffTmp);
}
}
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 13
instButtonNewGame.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instGame.gTutorial = true;
_root.initGameStart(0);
};
stop();
Symbol 445 MovieClip Frame 29
instExit1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuResultGame._alpha = 100;
_root.instClipMenuResultGame._visible = false;
_root.instGame.gWorld.freeResources();
_root.instGame.gGameIsRunning = false;
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("mainMenu");
};
instNext1.onRelease = function () {
_root.instGame.gWorld.freeResources();
if (_root.gCurrentLevel < (Define.TOTAL_NUMBER_OF_LEVELS - 1)) {
_root.gCurrentLevel++;
switch (_root.gCurrentLevel) {
case 3 :
case 7 :
case 11 :
case 15 :
_root.gTimeAttackMode = true;
break;
default :
_root.gTimeAttackMode = false;
}
_root.changeGameState(Define.STATEGENERAL_GAME);
} else {
gotoAndPlay ("finJuego");
}
};
instLabelVictoria.gotoAndStop("verde");
instExit1.gotoAndStop("verde");
instNext1.gotoAndStop("verde");
instLabelVictoria.instBigText.text = "Congratulations";
instExit1.instTextButton.text = "Exit";
instNext1.instTextButton.text = "Next";
instLabelVictoria._alpha = 0;
instExit1._alpha = 0;
instNext1._alpha = 0;
if (_root.gTimeAttackMode && (!_root.gIsHistoryMode)) {
instNext1._visible = false;
}
totalNumberFramesAnimationMainMenu = 20;
instLabelVictoria.onEnterFrame = function () {
this._y = this._y + (120 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExit1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNext1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instResultTime.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
_root.playGameSound(Define.SOUNDS_VICTORIA, 1);
_root.saveGameDataLevel();
_root.saveGameData();
Symbol 445 MovieClip Frame 49
delete instLabelVictoria.onEnterFrame;
delete instExit1.onEnterFrame;
delete instNext1.onEnterFrame;
delete instResultTime.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
if (!_root.gTimeAttackMode) {
instClipStatsInformation._visible = false;
instSubmitHighscore._visible = false;
} else {
if (!_root.gIsHistoryMode) {
instNext1._visible = false;
}
instClipStatsInformation._visible = true;
instClipStatsInformation._alpha = 100;
instClipStatsInformation._x = 0;
instClipStatsInformation._y = 191.7;
instSubmitHighscore._visible = true;
instSubmitHighscore._alpha = 100;
instSubmitHighscore._x = 200;
instSubmitHighscore._y = 376;
instClipStatsInformation.gotoAndStop("highscore");
instClipStatsInformation.instIconLevel.gotoAndStop(_root.gCurrentLevel + 1);
instClipStatsInformation.instTextDay.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.gCurrentLevel];
var nmCurrentDataTime = new Date();
var tmpCurTime = nmCurrentDataTime.getTime();
_root.gPutoTimeDoneInTimeAttack = Math.floor(tmpCurTime - _root.nmInitialTime);
instClipStatsInformation.instTextHolesClosed.text = "" + _root.instGame.gNumberOfHolesClosedTimerAttack;
var hitsDoneInTimeAttack = _root.instGame.gHitsDoneForTimeAttack;
var minutesScore = Math.floor((_root.gPutoTimeDoneInTimeAttack / 1000) / 60);
var secondsScore = Math.floor((_root.gPutoTimeDoneInTimeAttack / 1000) % 60);
instClipStatsInformation.instTextTime.text = (("" + minutesScore) + ":") + secondsScore;
instClipStatsInformation.instTextStars.text = "" + hitsDoneInTimeAttack;
}
instExit1.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instExit1.onRollOut = function () {
activeChangeColor = -1;
};
instNext1.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNext1.onRollOut = function () {
activeChangeColor = -1;
};
instExit1.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNext1.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 445 MovieClip Frame 51
instExit2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuResultGame._alpha = 100;
_root.instClipMenuResultGame._visible = false;
_root.instGame.gWorld.freeResources();
_root.instGame.gGameIsRunning = false;
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("mainMenu");
};
instRetry2.onRelease = function () {
_root.instGame.gWorld.freeResources();
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.changeGameState(Define.STATEGENERAL_GAME);
gotoAndStop ("parar");
};
instLabelDerrota1.gotoAndStop("rojo");
instExit2.gotoAndStop("rojo");
instRetry2.gotoAndStop("rojo");
instLabelDerrota1.instBigText.text = "Sorry";
instExit2.instTextButton.text = "Exit";
instRetry2.instTextButton.text = "Retry";
instLabelDerrota1._alpha = 0;
instExit2._alpha = 0;
instRetry2._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLabelDerrota1.onEnterFrame = function () {
this._y = this._y + (120 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExit2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instRetry2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
_root.playGameSound(Define.SOUNDS_DERROTA, 1);
Symbol 445 MovieClip Frame 71
delete instLabelDerrota1.onEnterFrame;
delete instExit2.onEnterFrame;
delete instRetry2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
if ((!_root.gTimeAttackMode) || (_root.gIsHistoryMode)) {
instClipStatsInformation._visible = false;
instSubmitHighscore._visible = false;
} else {
instClipStatsInformation._visible = true;
instClipStatsInformation._alpha = 100;
instClipStatsInformation._x = 0;
instClipStatsInformation._y = 191.7;
instSubmitHighscore._visible = true;
instSubmitHighscore._alpha = 100;
instSubmitHighscore._x = 200;
instSubmitHighscore._y = 376;
instClipStatsInformation.gotoAndStop("highscore");
instClipStatsInformation.instIconLevel.gotoAndStop(_root.gCurrentLevel + 1);
instClipStatsInformation.instTextDay.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.gCurrentLevel];
var nmCurrentDataTime = new Date();
var tmpCurTime = nmCurrentDataTime.getTime();
_root.gPutoTimeDoneInTimeAttack = Math.floor(tmpCurTime - _root.nmInitialTime);
instClipStatsInformation.instTextHolesClosed.text = "" + _root.instGame.gNumberOfHolesClosedTimerAttack;
var hitsDoneInTimeAttack = _root.instGame.gHitsDoneForTimeAttack;
var minutesScore = Math.floor((_root.gPutoTimeDoneInTimeAttack / 1000) / 60);
var secondsScore = Math.floor((_root.gPutoTimeDoneInTimeAttack / 1000) % 60);
instClipStatsInformation.instTextTime.text = (("" + minutesScore) + ":") + secondsScore;
instClipStatsInformation.instTextStars.text = "" + hitsDoneInTimeAttack;
}
instExit2.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instExit2.onRollOut = function () {
activeChangeColor = -1;
};
instRetry2.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instRetry2.onRollOut = function () {
activeChangeColor = -1;
};
instExit2.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instRetry2.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 445 MovieClip Frame 74
instExitToCredits.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuResultGame._alpha = 100;
_root.instClipMenuResultGame._visible = false;
_root.instGame.gGameIsRunning = false;
_root.instGame.gWorld.freeResources();
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("about");
};
instLabelEndGame.gotoAndStop("rojo");
instExitToCredits.gotoAndStop("rojo");
instLabelEndGame.instBigText.text = "Game Complete";
instExitToCredits.instTextButton.text = "Exit";
instLabelEndGame._alpha = 0;
instExitToCredits._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLabelEndGame.onEnterFrame = function () {
this._y = this._y + (120 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExitToCredits.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 445 MovieClip Frame 95
delete instLabelEndGame.onEnterFrame;
delete instExitToCredits.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instExitToCredits.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instExitToCredits.onRollOut = function () {
activeChangeColor = -1;
};
instExitToCredits.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
if (stepLength < 25) {
stepLength = stepLength + 0.2;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
if (stepLength > 4) {
stepLength = stepLength - 0.2;
}
}
};
instGameNews_Armor.onRelease = function () {
getURL ("http://armorblog.com/", "_blank");
};
instMoreFun_Armor.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
instGameNews_Armor.gotoAndStop("azul");
instMoreFun_Armor.gotoAndStop("azul");
instGameNews_Armor.instTextButton.text = "Gaming News";
instMoreFun_Armor.instTextButton.text = "More Fun";
instGameNews_Armor.onRollOver = function () {
activeChangeColor = 4;
this.shiftInX = 0;
};
instGameNews_Armor.onRollOut = function () {
activeChangeColor = -1;
};
instMoreFun_Armor.onRollOver = function () {
activeChangeColor = 5;
this.shiftInX = 0;
};
instMoreFun_Armor.onRollOut = function () {
activeChangeColor = -1;
};
instGameNews_Armor.onEnterFrame = function () {
if (activeChangeColor == 4) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instMoreFun_Armor.onEnterFrame = function () {
if (activeChangeColor == 5) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 445 MovieClip Frame 101
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 7
stop();
Symbol 548 MovieClip Frame 1
instGameNews_Armor.onRelease = function () {
getURL ("http://armorblog.com/", "_blank");
};
instMoreFun_Armor.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
instButtonPlay.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("menuPlay");
};
instButtonSettings.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("settings");
};
instButtonHelp.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help");
};
instButtonAbout.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("about");
};
instButtonPlay.gotoAndStop("rojo");
instButtonSettings.gotoAndStop("rojo");
instButtonHelp.gotoAndStop("rojo");
instButtonAbout.gotoAndStop("rojo");
instGameNews_Armor.gotoAndStop("azul");
instMoreFun_Armor.gotoAndStop("azul");
instButtonPlay.instTextButton.text = "PLAY";
instButtonSettings.instTextButton.text = "SETTINGS";
instButtonHelp.instTextButton.text = "HELP";
instButtonAbout.instTextButton.text = "ABOUT";
instGameNews_Armor.instTextButton.text = "Gaming News";
instMoreFun_Armor.instTextButton.text = "More Fun";
instButtonPlay._alpha = 0;
instButtonSettings._alpha = 0;
instButtonHelp._alpha = 0;
instButtonAbout._alpha = 0;
instGameNews_Armor._alpha = 0;
instMoreFun_Armor._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instButtonPlay.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonSettings.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonHelp.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonAbout.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instGameNews_Armor.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instMoreFun_Armor.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
_root.playGameSoundStops(Define.SOUNDS_MELODIA_MENU, 1);
_root.changeGameState(Define.STATEGENERAL_MENU);
Symbol 548 MovieClip Frame 23
delete instButtonPlay.onEnterFrame;
delete instButtonSettings.onEnterFrame;
delete instButtonHelp.onEnterFrame;
delete instButtonAbout.onEnterFrame;
delete instGameNews_Armor.onEnterFrame;
delete instMoreFun_Armor.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonPlay.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instButtonPlay.onRollOut = function () {
activeChangeColor = -1;
};
instButtonSettings.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonSettings.onRollOut = function () {
activeChangeColor = -1;
};
instButtonHelp.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instButtonHelp.onRollOut = function () {
activeChangeColor = -1;
};
instButtonAbout.onRollOver = function () {
activeChangeColor = 3;
this.shiftInX = 0;
};
instButtonAbout.onRollOut = function () {
activeChangeColor = -1;
};
instGameNews_Armor.onRollOver = function () {
activeChangeColor = 4;
this.shiftInX = 0;
};
instGameNews_Armor.onRollOut = function () {
activeChangeColor = -1;
};
instMoreFun_Armor.onRollOver = function () {
activeChangeColor = 5;
this.shiftInX = 0;
};
instMoreFun_Armor.onRollOut = function () {
activeChangeColor = -1;
};
instButtonPlay.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonSettings.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonHelp.onEnterFrame = function () {
if (activeChangeColor == 2) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonAbout.onEnterFrame = function () {
if (activeChangeColor == 3) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instGameNews_Armor.onEnterFrame = function () {
if (activeChangeColor == 4) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instMoreFun_Armor.onEnterFrame = function () {
if (activeChangeColor == 5) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 26
instButtonNewGame.onRelease = function () {
_root.gIsHistoryMode = true;
gotoAndPlay ("basicInstructions");
};
instButtonMenuLoad.onRelease = function () {
_root.gIsHistoryMode = true;
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.loadGameData();
_root.nmLevelToShow = 0;
gotoAndPlay ("menuLoad");
};
instButtonSurvival.onRelease = function () {
gotoAndPlay ("menuSurvival");
};
instButtonBack.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("mainMenu");
};
instButtonNewGame.gotoAndStop("azul");
instButtonMenuLoad.gotoAndStop("azul");
instButtonSurvival.gotoAndStop("azul");
instButtonBack.gotoAndStop("azul");
instButtonNewGame.instTextButton.text = "NEW GAME";
instButtonMenuLoad.instTextButton.text = "LOAD GAME";
instButtonSurvival.instTextButton.text = "BOSS GAME";
instButtonBack.instTextButton.text = "BACK";
instButtonNewGame._alpha = 0;
instButtonMenuLoad._alpha = 0;
instButtonSurvival._alpha = 0;
instButtonBack._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instButtonNewGame.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonMenuLoad.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonSurvival.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonBack.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 47
delete instButtonNewGame.onEnterFrame;
delete instButtonMenuLoad.onEnterFrame;
delete instButtonSurvival.onEnterFrame;
delete instButtonBack.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonNewGame.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instButtonNewGame.onRollOut = function () {
activeChangeColor = -1;
};
instButtonMenuLoad.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonMenuLoad.onRollOut = function () {
activeChangeColor = -1;
};
instButtonBack.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instButtonBack.onRollOut = function () {
activeChangeColor = -1;
};
instButtonSurvival.onRollOver = function () {
activeChangeColor = 3;
this.shiftInX = 0;
};
instButtonSurvival.onRollOut = function () {
activeChangeColor = -1;
};
instButtonNewGame.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonMenuLoad.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonBack.onEnterFrame = function () {
if (activeChangeColor == 2) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonSurvival.onEnterFrame = function () {
if (activeChangeColor == 3) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 51
instBeginPlay.gotoAndStop("azul");
instBeginPlay.instTextButton.text = "PLAY";
instBeginPlay.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instGame.gTutorial = true;
_root.initGameStart(0);
};
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBeginPlay.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBeginPlay.onRollOut = function () {
activeChangeColor = -1;
};
instBeginPlay.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 66
if (_root.nmTotalLevelDone >= 3) {
instSurvival1.onRelease = function () {
_root.gIsHistoryMode = false;
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.initGameStart(3);
};
}
if (_root.nmTotalLevelDone >= 7) {
instSurvival2.onRelease = function () {
_root.gIsHistoryMode = false;
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.initGameStart(7);
};
}
if (_root.nmTotalLevelDone >= 11) {
instSurvival3.onRelease = function () {
_root.gIsHistoryMode = false;
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.initGameStart(11);
};
}
if (_root.nmTotalLevelDone >= 15) {
instSurvival4.onRelease = function () {
_root.gIsHistoryMode = false;
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.initGameStart(15);
};
}
instSeeHighscore1.onRelease = function () {
getURL ("http://www.freecreationgames.net/?q=node/30", "_blank");
};
instSeeHighscore2.onRelease = function () {
getURL ("http://www.freecreationgames.net/?q=node/31", "_blank");
};
instSeeHighscore3.onRelease = function () {
getURL ("http://www.freecreationgames.net/?q=node/32", "_blank");
};
instSeeHighscore4.onRelease = function () {
getURL ("http://www.freecreationgames.net/?q=node/33", "_blank");
};
instSurvivalBack.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("menuPlay");
};
instSurvival1.gotoAndStop(17);
instSurvival2.gotoAndStop(18);
instSurvival3.gotoAndStop(19);
instSurvival4.gotoAndStop(20);
if (_root.nmTotalLevelDone >= 3) {
instSurvival1.instIconText.text = "BOSS LEVEL FOREST";
} else {
instSurvival1.instIconText.text = "LOCKED";
}
if (_root.nmTotalLevelDone >= 7) {
instSurvival2.instIconText.text = "BOSS LEVEL CAVE";
} else {
instSurvival2.instIconText.text = "LOCKED";
}
if (_root.nmTotalLevelDone >= 11) {
instSurvival3.instIconText.text = "BOSS LEVEL GRAVEYARD";
} else {
instSurvival3.instIconText.text = "LOCKED";
}
if (_root.nmTotalLevelDone >= 15) {
instSurvival4.instIconText.text = "BOSS LEVEL CASTLE";
} else {
instSurvival4.instIconText.text = "LOCKED";
}
instSeeHighscore1.gotoAndStop("verde");
instSeeHighscore2.gotoAndStop("verde");
instSeeHighscore3.gotoAndStop("verde");
instSeeHighscore4.gotoAndStop("verde");
instSurvivalBack.gotoAndStop("azul");
instSurvival1.instTextButton.text = "EASY";
instSurvival2.instTextButton.text = "NORMAL";
instSurvival3.instTextButton.text = "HARD";
instSurvival4.instTextButton.text = "CRAZY";
instSeeHighscore1.instLongTextButton.text = "SEE HIGHSCORE EASY";
instSeeHighscore2.instLongTextButton.text = "SEE HIGHSCORE NORMAL";
instSeeHighscore3.instLongTextButton.text = "SEE HIGHSCORE HARD";
instSeeHighscore4.instLongTextButton.text = "SEE HIGHSCORE CRAZY";
instSurvivalBack.instTextButton.text = "BACK";
instSurvival1._alpha = 0;
instSurvival2._alpha = 0;
instSurvival3._alpha = 0;
instSurvival4._alpha = 0;
instSeeHighscore1._alpha = 0;
instSeeHighscore2._alpha = 0;
instSeeHighscore3._alpha = 0;
instSeeHighscore4._alpha = 0;
instSurvivalBack._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instSurvival1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSurvival2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSurvival3.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSurvival4.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSeeHighscore1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSeeHighscore2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSeeHighscore3.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSeeHighscore4.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSurvivalBack.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 87
delete instSurvival1.onEnterFrame;
delete instSurvival2.onEnterFrame;
delete instSurvival3.onEnterFrame;
delete instSurvival4.onEnterFrame;
delete instSeeHighscore1.onEnterFrame;
delete instSeeHighscore2.onEnterFrame;
delete instSeeHighscore3.onEnterFrame;
delete instSeeHighscore4.onEnterFrame;
delete instSurvivalBack.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSurvival1.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instSurvival1.onRollOut = function () {
activeChangeColor = -1;
};
instSurvival2.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instSurvival2.onRollOut = function () {
activeChangeColor = -1;
};
instSurvival3.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instSurvival3.onRollOut = function () {
activeChangeColor = -1;
};
instSurvival4.onRollOver = function () {
activeChangeColor = 3;
this.shiftInX = 0;
};
instSurvival4.onRollOut = function () {
activeChangeColor = -1;
};
instSurvivalBack.onRollOver = function () {
activeChangeColor = 4;
this.shiftInX = 0;
};
instSurvivalBack.onRollOut = function () {
activeChangeColor = -1;
};
instSeeHighscore1.onRollOver = function () {
activeChangeColor = 5;
this.shiftInX = 0;
};
instSeeHighscore1.onRollOut = function () {
activeChangeColor = -1;
};
instSeeHighscore2.onRollOver = function () {
activeChangeColor = 6;
this.shiftInX = 0;
};
instSeeHighscore2.onRollOut = function () {
activeChangeColor = -1;
};
instSeeHighscore3.onRollOver = function () {
activeChangeColor = 7;
this.shiftInX = 0;
};
instSeeHighscore3.onRollOut = function () {
activeChangeColor = -1;
};
instSeeHighscore4.onRollOver = function () {
activeChangeColor = 8;
this.shiftInX = 0;
};
instSeeHighscore4.onRollOut = function () {
activeChangeColor = -1;
};
instSurvival1.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSurvival2.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSurvival3.onEnterFrame = function () {
if (activeChangeColor == 2) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSurvival4.onEnterFrame = function () {
if (activeChangeColor == 3) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSurvivalBack.onEnterFrame = function () {
if (activeChangeColor == 4) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSeeHighscore1.onEnterFrame = function () {
if (activeChangeColor == 5) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSeeHighscore2.onEnterFrame = function () {
if (activeChangeColor == 6) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSeeHighscore3.onEnterFrame = function () {
if (activeChangeColor == 7) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instSeeHighscore4.onEnterFrame = function () {
if (activeChangeColor == 8) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 92
limitOfLevelsDoneLoadLevel = _root.nmTotalLevelDone + 1;
delete instSelectedLevel.onRelease;
delete instBackLevel.onRelease;
delete instNextLevel.onRelease;
delete instSelectLevelEntry1.onRelease;
delete instSelectLevelEntry2.onRelease;
delete instSelectedLevel.onEnterFrame;
delete instBackLevel.onEnterFrame;
delete instNextLevel.onEnterFrame;
delete instSelectLevelEntry1.onEnterFrame;
delete instSelectLevelEntry2.onEnterFrame;
instSelectedLevel._y = -80;
instSelectedLevel.gotoAndStop("azul");
instBackLevel.gotoAndStop("azul");
instNextLevel.gotoAndStop("azul");
setElementsVisibility = function (optionVisibility) {
instSelectedLevel._visible = optionVisibility;
instBackLevel._visible = optionVisibility;
instNextLevel._visible = optionVisibility;
instSelectLevelEntry1._visible = optionVisibility;
instSelectLevelEntry2._visible = optionVisibility;
};
setElementsVisibility(true);
instBackLevel.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if ((_root.nmLevelToShow - 2) < 0) {
gotoAndPlay ("menuPlay");
} else {
_root.nmLevelToShow = _root.nmLevelToShow - 2;
gotoAndPlay ("menuLoad");
}
};
instNextLevel.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if ((_root.nmLevelToShow + 2) > _root.nmTotalLevelDone) {
gotoAndPlay ("menuPlay");
} else {
_root.nmLevelToShow = _root.nmLevelToShow + 2;
gotoAndPlay ("menuLoad");
}
};
instSelectLevelEntry1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
setElementsVisibility(false);
_root.gTimeAttackMode = false;
_root.gIsHistoryMode = true;
_root.initGameStart(_root.nmLevelToShow);
};
instSelectLevelEntry2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
setElementsVisibility(false);
_root.gTimeAttackMode = false;
_root.gIsHistoryMode = true;
_root.initGameStart(_root.nmLevelToShow + 1);
};
setElementsVisibility(false);
instSelectedLevel._visible = true;
instBackLevel._visible = true;
instNextLevel._visible = true;
instSelectedLevel.instBigText.text = "Select Level";
if ((_root.nmLevelToShow - 2) < 0) {
instBackLevel.instTextButton.text = "Exit";
} else {
instBackLevel.instTextButton.text = "Previous";
}
if ((_root.nmLevelToShow + 2) >= limitOfLevelsDoneLoadLevel) {
instNextLevel.instTextButton.text = "Exit";
} else {
instNextLevel.instTextButton.text = "Next";
}
if (_root.nmLevelToShow < limitOfLevelsDoneLoadLevel) {
instSelectLevelEntry1._visible = true;
if (!isNaN(_root.listLevelScore[_root.nmLevelToShow])) {
instSelectLevelEntry1.gotoAndStop("stadistics");
instSelectLevelEntry1.instIconLevel.gotoAndStop(_root.nmLevelToShow + 1);
instSelectLevelEntry1.instTextDay.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.nmLevelToShow];
instSelectLevelEntry1.instTextTime.text = (("" + Math.floor(_root.listLevelScore[_root.nmLevelToShow] / 60)) + ":") + Math.floor(_root.listLevelScore[_root.nmLevelToShow] % 60);
instSelectLevelEntry1.instTextStars.text = "" + _root.listLevelHits[_root.nmLevelToShow];
} else {
instSelectLevelEntry1.gotoAndStop("newDay");
instSelectLevelEntry1.instIconLevel.gotoAndStop(_root.nmLevelToShow + 1);
instSelectLevelEntry1.instTextDay.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.nmLevelToShow];
}
}
if ((_root.nmLevelToShow + 1) < limitOfLevelsDoneLoadLevel) {
instSelectLevelEntry2._visible = true;
if (!isNaN(_root.listLevelScore[_root.nmLevelToShow + 1])) {
instSelectLevelEntry2.gotoAndStop("stadistics");
instSelectLevelEntry2.instIconLevel.gotoAndStop(_root.nmLevelToShow + 2);
instSelectLevelEntry2.instTextDay.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.nmLevelToShow + 1];
instSelectLevelEntry2.instTextTime.text = (("" + Math.floor(_root.listLevelScore[_root.nmLevelToShow + 1] / 60)) + ":") + Math.floor(_root.listLevelScore[_root.nmLevelToShow + 1] % 60);
instSelectLevelEntry2.instTextStars.text = "" + _root.listLevelHits[_root.nmLevelToShow + 1];
} else {
instSelectLevelEntry2.gotoAndStop("newDay");
instSelectLevelEntry2.instIconLevel.gotoAndStop(_root.nmLevelToShow + 2);
instSelectLevelEntry2.instTextDay.text = Define.LEVEL_TEXT_DESCRIPTIONS[_root.nmLevelToShow + 1];
}
}
instSelectedLevel._alpha = 0;
instBackLevel._alpha = 0;
instNextLevel._alpha = 0;
instSelectLevelEntry1._alpha = 0;
instSelectLevelEntry2._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instSelectedLevel.onEnterFrame = function () {
this._y = this._y + (100 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackLevel.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextLevel.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instSelectLevelEntry1.onEnterFrame = function () {
if (_root.nmLevelToShow < limitOfLevelsDoneLoadLevel) {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
}
};
instSelectLevelEntry2.onEnterFrame = function () {
if ((_root.nmLevelToShow + 1) < limitOfLevelsDoneLoadLevel) {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
}
};
Symbol 548 MovieClip Frame 113
limitOfLevelsDoneLoadLevel = _root.nmTotalLevelDone + 1;
delete instSelectedLevel.onEnterFrame;
delete instBackLevel.onEnterFrame;
delete instNextLevel.onEnterFrame;
delete instSelectLevelEntry1.onEnterFrame;
delete instSelectLevelEntry2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 5;
instBackLevel.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackLevel.onRollOut = function () {
activeChangeColor = -1;
};
instNextLevel.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextLevel.onRollOut = function () {
activeChangeColor = -1;
};
applyMovementRotation = function (nmElementRotableCircle, numeroActivacion) {
if (activeChangeColor == numeroActivacion) {
nmElementRotableCircle._alpha = nmElementRotableCircle._alpha - factorEscalaContraccion;
if (nmElementRotableCircle._alpha < 10) {
nmElementRotableCircle._alpha = 100;
}
nmElementRotableCircle._rotation = nmElementRotableCircle._rotation + factorEscalaContraccion;
if (nmElementRotableCircle._rotation > 360) {
nmElementRotableCircle._rotation = 0;
}
} else {
nmElementRotableCircle._alpha = 100;
nmElementRotableCircle._rotation = 0;
}
};
instBackLevel.onEnterFrame = function () {
applyMovementRotation(this.instRotableCircle, 0);
};
instNextLevel.onEnterFrame = function () {
applyMovementRotation(this.instRotableCircle, 1);
};
stop();
Symbol 548 MovieClip Frame 114
instButtonSound.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if (_root.nmSoundEnabled == false) {
_root.nmSoundEnabled = true;
this.instTextButton.text = "SOUND ON";
} else {
_root.nmSoundEnabled = false;
this.instTextButton.text = "SOUND OFF";
_root.stopGameSounds();
}
};
instButtonDifficulty.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.nmDifficultySetted = _root.nmDifficultySetted + 1;
if (_root.nmDifficultySetted > 3) {
_root.nmDifficultySetted = 0;
}
_root.saveGameData();
switch (_root.nmDifficultySetted) {
case 0 :
this.instLongTextButton.text = "\nDIFFICULTY EASY";
break;
case 1 :
this.instLongTextButton.text = "\nDIFFICULTY NORMAL";
break;
case 2 :
this.instLongTextButton.text = "\nDIFFICULTY HARD";
break;
case 3 :
this.instLongTextButton.text = "\nDIFFICULTY VERY EASY";
}
};
instButtonBack.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("mainMenu");
};
instButtonQuality.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gQualitySetted = _root.gQualitySetted + 1;
if (_root.gQualitySetted > 2) {
_root.gQualitySetted = 0;
}
switch (_root.gQualitySetted) {
case 0 :
_root._quality = "LOW";
this.instLongTextButton.text = "\nLOW QUALITY";
break;
case 1 :
_root._quality = "MEDIUM";
this.instLongTextButton.text = "\nMEDIUM QUALITY";
break;
case 2 :
_root._quality = "HIGH";
this.instLongTextButton.text = "\nHIGH QUALITY";
}
};
instTitleSettings.gotoAndStop("verde");
instButtonDifficulty.gotoAndStop("verde");
instButtonSound.gotoAndStop("verde");
instButtonBack.gotoAndStop("rojo");
instButtonQuality.gotoAndStop("verde");
instTitleSettings.instBigText.text = "SETTINGS";
switch (_root.nmDifficultySetted) {
case 0 :
instButtonDifficulty.instLongTextButton.text = "\nDIFFICULTY EASY";
break;
case 1 :
instButtonDifficulty.instLongTextButton.text = "\nDIFFICULTY NORMAL";
break;
case 2 :
instButtonDifficulty.instLongTextButton.text = "\nDIFFICULTY HARD";
break;
case 3 :
instButtonDifficulty.instLongTextButton.text = "\nDIFFICULTY VERY EASY";
}
switch (_root.gQualitySetted) {
case 0 :
instButtonQuality.instLongTextButton.text = "\nLOW QUALITY";
break;
case 1 :
instButtonQuality.instLongTextButton.text = "\nMEDIUM QUALITY";
break;
case 2 :
instButtonQuality.instLongTextButton.text = "\nHIGH QUALITY";
}
if (_root.nmSoundEnabled == 0) {
instButtonSound.instTextButton.text = "SOUND OFF";
} else {
instButtonSound.instTextButton.text = "SOUND ON";
}
instButtonBack.instTextButton.text = "BACK";
instTitleSettings._alpha = 0;
instButtonSound._alpha = 0;
instButtonBack._alpha = 0;
instButtonDifficulty._alpha = 0;
instButtonQuality._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleSettings.onEnterFrame = function () {
this._y = this._y + (128 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonDifficulty.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonSound.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonBack.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonQuality.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 135
delete instTitleSettings.onEnterFrame;
delete instButtonDifficulty.onEnterFrame;
delete instButtonSound.onEnterFrame;
delete instButtonBack.onEnterFrame;
delete instButtonQuality.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonDifficulty.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instButtonDifficulty.onRollOut = function () {
activeChangeColor = -1;
};
instButtonSound.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonSound.onRollOut = function () {
activeChangeColor = -1;
};
instButtonBack.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instButtonBack.onRollOut = function () {
activeChangeColor = -1;
};
instButtonQuality.onRollOver = function () {
activeChangeColor = 3;
this.shiftInX = 0;
};
instButtonQuality.onRollOut = function () {
activeChangeColor = -1;
};
instButtonDifficulty.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonSound.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonBack.onEnterFrame = function () {
if (activeChangeColor == 2) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonQuality.onEnterFrame = function () {
if (activeChangeColor == 3) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 140
instBackHelp0.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if (_root.gState == Define.STATEGENERAL_MENU) {
gotoAndPlay ("mainMenu");
} else {
gotoAndPlay ("pause");
}
};
instNextHelp0.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help2");
};
instTitleHelp0.gotoAndStop("azul");
instExplanationHelp0.gotoAndStop("azul");
instBackHelp0.gotoAndStop("azul");
instNextHelp0.gotoAndStop("azul");
instTitleHelp0.instBigText.text = "HELP 1 OF 4";
instExplanationHelp0.instText.text = "Bouncy's reality has been INFECTED by HOLES of a CORRUPTED DIMENSION";
instBackHelp0.instTextButton.text = "EXIT";
instNextHelp0.instTextButton.text = "NEXT";
instTitleHelp0._alpha = 0;
instExplanationHelp0._alpha = 0;
instBackHelp0._alpha = 0;
instNextHelp0._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleHelp0.onEnterFrame = function () {
this._y = this._y + (128 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExplanationHelp0.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackHelp0.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextHelp0.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 161
delete instTitleHelp0.onEnterFrame;
delete instExplanationHelp0.onEnterFrame;
delete instBackHelp0.onEnterFrame;
delete instNextHelp0.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instGameClipBallHelp.gotoAndStop("lose");
intGameHoleHelp1.gotoAndStop(1);
intGameHoleHelp2.gotoAndStop(2);
intGameHoleHelp3.gotoAndStop(3);
intGameHoleHelp4.gotoAndStop(4);
instBackHelp0.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackHelp0.onRollOut = function () {
activeChangeColor = -1;
};
instNextHelp0.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextHelp0.onRollOut = function () {
activeChangeColor = -1;
};
instBackHelp0.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNextHelp0.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 163
instBackHelp2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help");
};
instNextHelp2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help3");
};
instTitleHelp2.gotoAndStop("azul");
instExplanationHelp2.gotoAndStop("azul");
instBackHelp2.gotoAndStop("azul");
instNextHelp2.gotoAndStop("azul");
instTitleHelp2.instBigText.text = "HELP 2 OF 4";
instExplanationHelp2.instText.text = "Bouncy must TOUCH the HOLES in order to CLOSE them";
instBackHelp2.instTextButton.text = "BACK";
instNextHelp2.instTextButton.text = "NEXT";
instTitleHelp2._alpha = 0;
instExplanationHelp2._alpha = 0;
instBackHelp2._alpha = 0;
instNextHelp2._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleHelp2.onEnterFrame = function () {
this._y = this._y + (128 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExplanationHelp2.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackHelp2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextHelp2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 184
delete instTitleHelp2.onEnterFrame;
delete instExplanationHelp2.onEnterFrame;
delete instBackHelp2.onEnterFrame;
delete instNextHelp2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instGameClipBallHelp2.gotoAndStop("quiet");
instGameHoleHelp.gotoAndStop(2);
instBackHelp2.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackHelp2.onRollOut = function () {
activeChangeColor = -1;
};
instNextHelp2.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextHelp2.onRollOut = function () {
activeChangeColor = -1;
};
instCell.onEnterFrame = function () {
if (Key.isDown(38)) {
this._y = this._y - 4;
}
if (Key.isDown(40)) {
this._y = this._y + 4;
}
if (Key.isDown(37)) {
this._x = this._x - 4;
}
if (Key.isDown(39)) {
this._x = this._x + 4;
}
};
instBackHelp2.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNextHelp2.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 186
instBackHelp3.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help2");
};
instNextHelp3.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help4");
};
instTitleHelp3.gotoAndStop("azul");
instExplanationHelp3.gotoAndStop("azul");
instBackHelp3.gotoAndStop("azul");
instNextHelp3.gotoAndStop("azul");
instTitleHelp3.instBigText.text = "HELP 3 OF 4";
instBackHelp3.instTextButton.text = "BACK";
instNextHelp3.instTextButton.text = "NEXT";
instTitleHelp3._alpha = 0;
instExplanationHelp3._alpha = 0;
instBackHelp3._alpha = 0;
instNextHelp3._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleHelp3.onEnterFrame = function () {
this._y = this._y + (128 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExplanationHelp3.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackHelp3.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextHelp3.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 207
delete instTitleHelp3.onEnterFrame;
delete instExplanationHelp3.onEnterFrame;
delete instBackHelp3.onEnterFrame;
delete instNextHelp3.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBackHelp3.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackHelp3.onRollOut = function () {
activeChangeColor = -1;
};
instNextHelp3.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextHelp3.onRollOut = function () {
activeChangeColor = -1;
};
instBackHelp3.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNextHelp3.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 211
instBackHelp4.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help3");
};
instNextHelp4.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if (_root.gState == Define.STATEGENERAL_MENU) {
gotoAndPlay ("mainMenu");
} else {
gotoAndPlay ("pause");
}
};
instTitleHelp4.gotoAndStop("azul");
instExplanationHelp4.gotoAndStop("azul");
instBackHelp4.gotoAndStop("azul");
instNextHelp4.gotoAndStop("azul");
instTitleHelp4.instBigText.text = "HELP 4 OF 4";
instExplanationHelp4.instText.text = "You will need to play with the ZOOM in order to see ALL THE MAP OF THE LEVEL";
instBackHelp4.instTextButton.text = "BACK";
instNextHelp4.instTextButton.text = "EXIT";
instTitleHelp4._alpha = 0;
instExplanationHelp4._alpha = 0;
instBackHelp4._alpha = 0;
instNextHelp4._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleHelp4.onEnterFrame = function () {
this._y = this._y + (128 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExplanationHelp4.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackHelp4.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextHelp4.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 232
delete instTitleHelp4.onEnterFrame;
delete instExplanationHelp4.onEnterFrame;
delete instBackHelp4.onEnterFrame;
delete instNextHelp4.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBackHelp4.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackHelp4.onRollOut = function () {
activeChangeColor = -1;
};
instNextHelp4.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextHelp4.onRollOut = function () {
activeChangeColor = -1;
};
instBackHelp4.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNextHelp4.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 236
instBackAbout.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("mainMenu");
};
instNextAbout.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("about2");
};
instTitleAbout.gotoAndStop("azul");
instBackAbout.gotoAndStop("azul");
instNextAbout.gotoAndStop("azul");
instTitleAbout.instBigText.text = "TEAM";
instBackAbout.instTextButton.text = "BACK";
instNextAbout.instTextButton.text = "NEXT";
instTitleAbout._alpha = 0;
instCreditDesigner._alpha = 0;
instCreditArtist._alpha = 0;
instCreditMusician._alpha = 0;
instBackAbout._alpha = 0;
instNextAbout._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleAbout.onEnterFrame = function () {
this._y = this._y + (100 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instCreditDesigner.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instCreditArtist.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instCreditMusician.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackAbout.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextAbout.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 257
delete instTitleAbout.onEnterFrame;
delete instCreditDesigner.onEnterFrame;
delete instCreditArtist.onEnterFrame;
delete instCreditMusician.onEnterFrame;
delete instBackAbout.onEnterFrame;
delete instNextAbout.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBackAbout.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackAbout.onRollOut = function () {
activeChangeColor = -1;
};
instNextAbout.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextAbout.onRollOut = function () {
activeChangeColor = -1;
};
instBackAbout.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNextAbout.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 261
instBackAbout2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("about");
};
instNextAbout2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("mainMenu");
};
instTitleCredits2.gotoAndStop("azul");
instBackAbout2.gotoAndStop("azul");
instNextAbout2.gotoAndStop("azul");
instTitleCredits2.instBigText.text = "CONTACT";
instFondoAbout2.gotoAndStop("creditos");
instBackAbout2.instTextButton.text = "BACK";
instNextAbout2.instTextButton.text = "EXIT";
instTitleCredits2._alpha = 0;
instFondoAbout2._alpha = 0;
instBackAbout2._alpha = 0;
instNextAbout2._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleCredits2.onEnterFrame = function () {
this._y = this._y + (118 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instFondoAbout2.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackAbout2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextAbout2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 283
delete instTitleCredits2.onEnterFrame;
delete instFondoAbout2.onEnterFrame;
delete instBackAbout2.onEnterFrame;
delete instNextAbout2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBackAbout2.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackAbout2.onRollOut = function () {
activeChangeColor = -1;
};
instNextAbout2.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextAbout2.onRollOut = function () {
activeChangeColor = -1;
};
instBackAbout2.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instNextAbout2.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 285
stop();
Symbol 548 MovieClip Frame 290
instButtonContinue.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGeneralIterator = 2;
if (_root.gTimeAttackMode) {
var _local2 = new Date();
_root.instGame.gLastTimerOfTimeAttack = _local2.getTime();
}
};
instButtonRestart.onRelease = function () {
_root.instGame.gWorld.freeResources();
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.changeGameState(Define.STATEGENERAL_GAME);
_root.stopGameSoundsBackground();
};
instButtonHelp.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help");
};
instButtonExit.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.stopGameSoundsBackground();
_root.instGame.gGameIsRunning = false;
_root.instGame.gWorld.freeResources();
_root.changeGeneralState(Define.STATEGENERAL_MENU);
this._visible = true;
gotoAndPlay ("mainMenu");
};
instLabelPause.gotoAndStop("azul");
instButtonContinue.gotoAndStop("azul");
instButtonRestart.gotoAndStop("azul");
instButtonHelp.gotoAndStop("azul");
instButtonExit.gotoAndStop("azul");
instLabelPause.instBigText.text = "PAUSE";
instButtonContinue.instTextButton.text = "CONTINUE";
instButtonRestart.instTextButton.text = "RESTART";
instButtonHelp.instTextButton.text = "HELP";
instButtonExit.instTextButton.text = "EXIT";
instBackgroundPause._alpha = 0;
instLabelPause._alpha = 0;
instButtonContinue._alpha = 0;
instButtonRestart._alpha = 0;
instButtonHelp._alpha = 0;
instButtonExit._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instBackgroundPause.onEnterFrame = function () {
this._alpha = this._alpha + (80 / totalNumberFramesAnimationMainMenu);
};
instLabelPause.onEnterFrame = function () {
this._y = this._y + (272 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonContinue.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonRestart.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonHelp.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonExit.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 548 MovieClip Frame 310
delete instBackgroundPause.onEnterFrame;
delete instLabelPause.onEnterFrame;
delete instButtonContinue.onEnterFrame;
delete instButtonRestart.onEnterFrame;
delete instButtonHelp.onEnterFrame;
delete instButtonExit.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonContinue.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instButtonContinue.onRollOut = function () {
activeChangeColor = -1;
};
instButtonHelp.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonHelp.onRollOut = function () {
activeChangeColor = -1;
};
instButtonExit.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instButtonExit.onRollOut = function () {
activeChangeColor = -1;
};
instButtonContinue.onEnterFrame = function () {
if (activeChangeColor == 0) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonHelp.onEnterFrame = function () {
if (activeChangeColor == 1) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
instButtonExit.onEnterFrame = function () {
if (activeChangeColor == 2) {
this.instRotableCircle._alpha = this.instRotableCircle._alpha - factorEscalaContraccion;
if (this.instRotableCircle._alpha < 10) {
this.instRotableCircle._alpha = 100;
}
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._alpha = 100;
this.instRotableCircle._rotation = 0;
}
};
stop();
Symbol 548 MovieClip Frame 311
stop();