Frame 2
stop();
Frame 7
stop();
Frame 13
var mySoundTmpLogo = new Sound();
stop();
Instance of Symbol 134 MovieClip [clipLogo] in Frame 13
on (press) {
_root.mySoundTmpLogo.stop();
_root.gotoAndPlay("main");
}
Frame 20
var nmSounds = new Array();
var nmSoundEnabled = true;
var nmPreviousSoundLoaded = -1;
var nmCurrentSoundLoaded = 0;
var nmCurrentSoundPlayer = 0;
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_BONUS :
_local2.attachSound("bonusMelody");
break;
case Define.SOUNDS_FX_STAR_CAPTURED :
_local2.attachSound("meteorImpact");
break;
case Define.SOUNDS_FX_METEOR_IMPACT :
_local2.attachSound("starCaptured");
}
_root.nmCurrentSoundLoaded = _root.nmCurrentSoundLoaded + 1;
nmSounds.push(_local2);
};
stopGameSounds = function () {
var _local1 = 0;
while (_local1 < nmSounds.length) {
nmSounds[_local1].stop();
_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);
}
};
loadGameData = function () {
gListLevelTimeScore = new Array();
gListLevelStarsScore = new Array();
gListLevelBonusScore = new Array();
var _local1 = 0;
while (_local1 < Define.TOTAL_NUMBER_OF_LEVELS) {
gListLevelTimeScore.push(-1);
gListLevelStarsScore.push(-1);
gListLevelBonusScore.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 > 3)) {
nmDifficultySetted = 1;
}
_local1 = 0;
while (_local1 < Define.TOTAL_NUMBER_OF_LEVELS) {
gListLevelTimeScore[_local1] = _local2.data.levelData.gListLevelTimeScore[_local1];
if (!isNaN(gListLevelTimeScore[_local1])) {
nmTotalLevelDone++;
}
_local1++;
}
_local1 = 0;
while (_local1 < Define.TOTAL_NUMBER_OF_LEVELS) {
gListLevelStarsScore[_local1] = _local2.data.levelData.gListLevelStarsScore[_local1];
_local1++;
}
_local1 = 0;
while (_local1 < Define.TOTAL_NUMBER_OF_LEVELS) {
gListLevelBonusScore[_local1] = _local2.data.levelData.gListLevelBonusScore[_local1];
_local1++;
}
if (nmTotalLevelDone >= Define.TOTAL_NUMBER_OF_LEVELS) {
nmTotalLevelDone = Define.TOTAL_NUMBER_OF_LEVELS - 1;
}
};
saveGameData = function () {
var _local1 = new Object();
_local1.tutorialPlayed = gTutorialHasBeenPlayed;
_local1.difficultySetted = nmDifficultySetted;
_local1.gListLevelTimeScore = gListLevelTimeScore;
_local1.gListLevelStarsScore = gListLevelStarsScore;
_local1.gListLevelBonusScore = gListLevelBonusScore;
var _local2 = SharedObject.getLocal(nmRecordStoreName);
_local2.data.levelData = _local1;
_local2.flush();
};
saveGameDataLevel = function () {
if (!isNaN(gListLevelTimeScore[nmCurrentLevel])) {
if (gListLevelTimeScore[nmCurrentLevel] > gTimeTotalDone) {
gListLevelTimeScore[nmCurrentLevel] = gTimeTotalDone;
}
if (gListLevelStarsScore[nmCurrentLevel] > gStarsCollected) {
gListLevelStarsScore[nmCurrentLevel] = gStarsCollected;
}
if (gListLevelBonusScore[nmCurrentLevel] < gBonusCollected) {
gListLevelBonusScore[nmCurrentLevel] = gBonusCollected;
}
} else {
gListLevelTimeScore[nmCurrentLevel] = gTimeTotalDone;
gListLevelStarsScore[nmCurrentLevel] = gStarsCollected;
gListLevelBonusScore[nmCurrentLevel] = gBonusCollected;
nmTotalLevelDone++;
}
};
changeGeneralGameState = function (newState) {
gIterator = 0;
gLastStateGame = gStateGame;
gStateGame = newState;
if (Define.DEBUG_GENERAL) {
switch (gStateGame) {
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_RUN_PAUSE :
trace("gStateGame=STATE_GAME_RUN_PAUSE");
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_MENU :
trace("gStateGame=STATE_GAME_MENU");
}
}
};
buildInput = function () {
world.onKeyDown = function () {
var _local1 = Key.getCode() - 64;
gGestor.testKeyCode(_local1);
};
Key.addListener(world);
};
initGame = function (p_numberLevel) {
nmCurrentLevel = p_numberLevel;
gGestor = new cGestorObjects(world);
changeGeneralGameState(Define.STATE_GAME_LOADING);
_root.onEnterFrame = function () {
mainGameLogic();
};
};
mainGameLogic = function () {
switch (gStateGame) {
case Define.STATE_GAME_LOADING :
if (gIterator < 10) {
gIterator++;
}
switch (gIterator) {
case 1 :
instClipMenuResultGame._visible = true;
instClipMenuResultGame.gotoAndStop("loading");
break;
default :
if ((nmCurrentLevel == 0) && (gHasBeenPreviouslyPlayedTutorial == false)) {
gIsPlayingTutorial = true;
world.instBackgroundAllStars._visible = false;
} else {
world.instBackgroundAllStars._visible = true;
}
gGestor.init(nmCurrentLevel);
var _local2 = "earth";
world.attachMovie("earthClip", _local2, Define.LAYER_EARTH);
world[_local2]._x = -78;
world[_local2]._y = 614.1;
gTimeTotalDone = 0;
gStarsCollected = 0;
gBonusCollected = 0;
instClipMenuResultGame._visible = false;
instInfoGameClip._visible = true;
instClipMenuGame._visible = false;
instPanelInformation._visible = false;
changeGeneralGameState(Define.STATE_GAME_PRESENTATION);
}
break;
case Define.STATE_GAME_PRESENTATION :
if (gIterator < 10) {
gIterator++;
}
switch (gIterator) {
case 1 :
instClipPresentationLevel._visible = true;
instClipPresentationLevel.gotoAndPlay("Seccion1");
break;
case 2 :
gIterator = 1;
break;
case 3 :
_root.playGameSoundStops(Define.SOUNDS_INICIO_NIVEL, 1);
gGestor._sun.changeState(Define.STATE_SUN_PRESENTATION);
break;
default :
gGestor._sun.logic();
if (gGestor._sun._state == Define.STATE_SUN_QUIET) {
if (gGestor._blackHole._state != Define.STATE_BLACKHOLE_PRESENTATION) {
gGestor._blackHole.changeState(Define.STATE_BLACKHOLE_PRESENTATION);
}
}
gGestor._blackHole.logic();
if (gGestor._blackHole._state != Define.STATE_BLACKHOLE_QUIET) {
break;
}
if ((nmCurrentLevel == 0) && (gHasBeenPreviouslyPlayedTutorial == false)) {
gHasBeenPreviouslyPlayedTutorial = true;
changeGeneralGameState(Define.STATE_GAME_TUTORIAL1);
} else {
changeGeneralGameState(Define.STATE_GAME_RUN);
}
buildInput();
}
break;
case Define.STATE_GAME_RUN :
switch (gGestor.logic()) {
case 0 :
gGestor.freeResources();
changeGeneralGameState(Define.STATE_GAME_VICTORY);
instPanelInformation._visible = false;
instClipMenuResultGame._visible = true;
instClipMenuResultGame.gotoAndPlay("victoria");
saveGameDataLevel();
saveGameData();
break;
case 1 :
gGestor.freeResources();
changeGeneralGameState(Define.STATE_GAME_LOSE);
instPanelInformation._visible = false;
instClipMenuResultGame._visible = true;
instClipMenuResultGame.gotoAndPlay("derrota");
break;
}
break;
case Define.STATE_GAME_RUN_PAUSE :
break;
case Define.STATE_GAME_VICTORY :
break;
case Define.STATE_GAME_LOSE :
break;
case Define.STATE_GAME_MENU :
gLastStateGame = Define.STATE_GAME_MENU;
break;
case Define.STATE_GAME_TUTORIAL1 :
if (gIterator < 10) {
gIterator++;
}
if (!(gIterator === 1)) {
} else {
instClipTutorial._visible = true;
instClipTutorial.gotoAndPlay("tutorial1");
gGestor._state = Define.STATE_GESTOROBJECTS_TUTORIAL1;
}
gGestor.logic();
break;
case Define.STATE_GAME_TUTORIAL2 :
if (gIterator < 10) {
gIterator++;
}
if (!(gIterator === 1)) {
} else {
gGestor._state = Define.STATE_GESTOROBJECTS_TUTORIAL2;
}
gGestor.logic();
if (gStarsCollected >= 2) {
changeGeneralGameState(Define.STATE_GAME_TUTORIAL3);
}
break;
case Define.STATE_GAME_TUTORIAL3 :
if (gIterator < 10) {
gIterator++;
}
if (!(gIterator === 1)) {
} else {
instClipTutorial.gotoAndPlay("tutorial3");
gGestor._state = Define.STATE_GESTOROBJECTS_TUTORIAL3;
spacePressedTutorial = false;
backSpacePressedTutorial = false;
enterPressedTutorial = false;
shiftPressedTutorial = false;
}
if (Key.isDown(32) || (Key.isDown(39))) {
spacePressedTutorial = true;
}
if (Key.isDown(8) || (Key.isDown(37))) {
backSpacePressedTutorial = true;
}
if (Key.isDown(13) || (Key.isDown(40))) {
enterPressedTutorial = true;
}
if (Key.isDown(16) || (Key.isDown(38))) {
shiftPressedTutorial = true;
}
gGestor.logic();
if ((((spacePressedTutorial == true) && (backSpacePressedTutorial == true)) && (enterPressedTutorial == true)) && (shiftPressedTutorial == true)) {
changeGeneralGameState(Define.STATE_GAME_TUTORIAL4);
}
break;
case Define.STATE_GAME_TUTORIAL4 :
if (gIterator < 10) {
gIterator++;
}
if (!(gIterator === 1)) {
} else {
instClipTutorial.gotoAndPlay("tutorial4");
gGestor._state = Define.STATE_GESTOROBJECTS_TUTORIAL4;
gNumberOfEnemiesGenerated = 0;
}
gGestor.logic();
break;
case Define.STATE_GAME_TUTORIAL5 :
if (gIterator < 10) {
gIterator++;
}
if (!(gIterator === 1)) {
} else {
instClipTutorial.gotoAndPlay("tutorial5");
gGestor._state = Define.STATE_GESTOROBJECTS_TUTORIAL5;
gTutorialHasBeenPlayed = 1;
saveGameData();
}
gGestor.logic();
}
};
var gStateGame;
var gLastStateGame;
var gIterator = 0;
var gGestor;
var nmCurrentLevel = 0;
var gTimeTotalDone = 0;
var gStarsCollected = 0;
var gBonusCollected = 0;
var gListLevelTimeScore;
var gListLevelStarsScore;
var gListLevelBonusScore;
var nmTotalLevelDone;
var gTutorialHasBeenPlayed;
var nmDifficultySetted;
var nmRecordStoreName = new String("SunStoriesD");
var nmLevelToShow = 0;
var gHasBeenPreviouslyPlayedTutorial = false;
var gIsPlayingTutorial = false;
var spacePressedTutorial = false;
var backSpacePressedTutorial = false;
var enterPressedTutorial = false;
var shiftPressedTutorial = false;
var gNumberOfEnemiesGenerated = 0;
instClipMenuResultGame._visible = false;
instInfoGameClip._visible = false;
instPanelInformation._visible = false;
instClipPresentationLevel.gotoAndStop("vacio");
instClipPresentationLevel._visible = false;
instClipTutorial._visible = false;
loadGameData();
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_BONUS);
loadGameSound(Define.SOUNDS_FX_STAR_CAPTURED);
loadGameSound(Define.SOUNDS_FX_METEOR_IMPACT);
var gQualitySetted = 1;
_root._quality = "MEDIUM";
stop();
Symbol 28 MovieClip Frame 60
gotoAndPlay (50);
Symbol 32 MovieClip [clipFlecha] Frame 1
stop();
Symbol 32 MovieClip [clipFlecha] Frame 2
stop();
Symbol 37 MovieClip [keyBoardClip] Frame 1
stop();
Symbol 37 MovieClip [keyBoardClip] Frame 9
stop();
Symbol 54 MovieClip [clipStatsInformation] Frame 1
stop();
Symbol 54 MovieClip [clipStatsInformation] Frame 3
stop();
Symbol 67 MovieClip Frame 20
stop();
Symbol 87 MovieClip [sunClip] Frame 12
gotoAndPlay ("presentation");
Symbol 87 MovieClip [sunClip] Frame 25
gotoAndPlay ("quiet");
Symbol 87 MovieClip [sunClip] Frame 37
gotoAndPlay ("follow");
Symbol 87 MovieClip [sunClip] Frame 49
gotoAndPlay ("victory");
Symbol 87 MovieClip [sunClip] Frame 62
gotoAndPlay ("lose");
Symbol 89 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) {
_root.gotoAndStop("logo");
}
Symbol 510 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 randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
static function getRadians(valueGrad) {
return((valueGrad * (Math.PI*2)) / 360);
}
static function getGrados(valueRad) {
return((valueRad * 360) / (Math.PI*2));
}
static function movePoint(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 getDay(p_day) {
switch (p_day) {
case 0 :
return("MONDAY");
case 1 :
return("TUESDAY");
case 2 :
return("WEDNESDAY");
case 3 :
return("THURSDAY");
case 4 :
return("FRIDAY");
case 5 :
return("SATURDAY");
}
return("SUNDAY");
}
static function getDificulty(p_difficulty) {
switch (p_difficulty) {
case 0 :
return("DIFFICULTY EASY");
case 1 :
return("DIFFICULTY NORMAL");
case 2 :
return("DIFFICULTY HARD");
case 3 :
return("DIFFICULTY CRAZY");
}
}
static var TOTAL_NUMBER_OF_LEVELS = 7;
static var MAX_NUMBER_OF_STARS = 10;
static var MAX_NUMBER_OF_ENEMIES = 30;
static var TOTAL_SIZE_PERCENTAGE_SUN = 100;
static var TOTAL_SIZE_PERCENTAGE_BLACK_HOLE = 100;
static var TIMEOUT_TO_THINK_BLACK_HOLE = 1000;
static var DEBUG_STATES_MAIN = false;
static var DEBUG_GENERAL = false;
static var DEBUG_XML_LOAD = false;
static var DEBUG_AI_MATRIX = false;
static var DEBUG_INITIALITZATION_COBJECT = false;
static var DEBUG_INITIALITZATION_CPERSONAJE = false;
static var DEBUG_STAR_GENERATION = false;
static var DEBUG_ENEMY_GENERATION = false;
static var DEBUG_BLACKHOLE_NORMAL = false;
static var DEBUG_FIND_WORD = false;
static var LAYER_TRIANGLE_RAY = 500;
static var LAYER_TRIANGLE_BLACK_HOLE = 750;
static var LAYER_SUN = 1000;
static var LAYER_BLACKHOLE = 2000;
static var LAYER_STARS = 3000;
static var LAYER_ENEMIES = 4000;
static var LAYER_EARTH = 5000;
static var STATE_GAME_LOADING = 0;
static var STATE_GAME_PRESENTATION = 1;
static var STATE_GAME_RUN = 2;
static var STATE_GAME_RUN_PAUSE = 3;
static var STATE_GAME_VICTORY = 4;
static var STATE_GAME_LOSE = 5;
static var STATE_GAME_MENU = 6;
static var STATE_GAME_TUTORIAL1 = 7;
static var STATE_GAME_TUTORIAL2 = 8;
static var STATE_GAME_TUTORIAL3 = 9;
static var STATE_GAME_TUTORIAL4 = 10;
static var STATE_GAME_TUTORIAL5 = 11;
static var STATE_GESTOROBJECTS_RUN = 0;
static var STATE_GESTOROBJECTS_VICTORY = 1;
static var STATE_GESTOROBJECTS_LOSE = 2;
static var STATE_GESTOROBJECTS_TUTORIAL1 = 3;
static var STATE_GESTOROBJECTS_TUTORIAL2 = 4;
static var STATE_GESTOROBJECTS_TUTORIAL3 = 5;
static var STATE_GESTOROBJECTS_TUTORIAL4 = 6;
static var STATE_GESTOROBJECTS_TUTORIAL5 = 7;
static var STATE_SUN_NONE = -1;
static var STATE_SUN_PRESENTATION = 0;
static var STATE_SUN_QUIET = 1;
static var STATE_SUN_FOLLOWSTAR = 2;
static var STATE_SUN_GROW = 3;
static var STATE_SUN_SHRINK = 4;
static var STATE_SUN_VICTORY = 5;
static var STATE_SUN_LOSE = 6;
static var STATE_STAR_NONE = 0;
static var STATE_STAR_RUN = 1;
static var STATE_STAR_CAPTURED = 2;
static var STATE_STAR_DISAPPEAR = 3;
static var STATE_ENEMY_NONE = 0;
static var STATE_ENEMY_RUN = 1;
static var STATE_ENEMY_CAPTURED = 2;
static var STATE_ENEMY_DISAPPEAR = 3;
static var STATE_BLACKHOLE_PRESENTATION = 0;
static var STATE_BLACKHOLE_QUIET = 1;
static var STATE_BLACKHOLE_FOLLOWSTAR = 2;
static var STATE_BLACKHOLE_GROW = 3;
static var STATE_BLACKHOLE_SHRINK = 4;
static var STATE_BLACKHOLE_VICTORY = 5;
static var STATE_BLACKHOLE_LOSE = 6;
static var STATE_BLACKHOLE_NONE = -1;
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_BONUS = 5;
static var SOUNDS_FX_STAR_CAPTURED = 6;
static var SOUNDS_FX_METEOR_IMPACT = 7;
}
Symbol 511 MovieClip [__Packages.cGestorObjects] Frame 0
class cGestorObjects
{
var _iterator, _gWorld, _sun, _blackHole, _listStars, _listEnemies, _distanceStepBlachHoleBack, _distanceStepBlachHoleForward, _currentLevel, _totalTimeToDoLevel, _speedStars, _speedEnemies, _timoutStars, _timoutEnemies, _wordList, _isLetterKeyOnScreen, _lastTimeCycleBefore, _initialTimoutStars, _initialTimoutEnemies, _numberStars, _numberEnemies, _initialTimeStars, _initialTimeEnemies, _state, _dayNumberCaractersFound, _dayOfWeek, _dayArrayCodes, _dayFound;
function cGestorObjects (gWorld) {
_iterator = 0;
_gWorld = gWorld;
}
function freeResources() {
var _local2;
_sun.freeResources();
_blackHole.freeResources();
_local2 = 0;
while (_local2 < _listStars.length) {
_listStars[_local2].freeResources();
_local2++;
}
_local2 = 0;
while (_local2 < _listEnemies.length) {
_listEnemies[_local2].freeResources();
_local2++;
}
_listStars.splice(0, _listStars.length);
_listEnemies.splice(0, _listEnemies.length);
}
function init(nivel_par) {
var _local3;
var _local21;
var _local6;
var _local7;
var _local4;
var _local5;
var _local14 = false;
_distanceStepBlachHoleBack = 10;
_distanceStepBlachHoleForward = 10;
_currentLevel = nivel_par;
if (_root.gIsPlayingTutorial == true) {
_totalTimeToDoLevel = 360000 /* 0x057E40 */;
_local6 = 0;
_local7 = 10;
_local4 = 7;
_local5 = 3;
_distanceStepBlachHoleBack = 10;
_distanceStepBlachHoleForward = 10;
_speedStars = 4;
_speedEnemies = 4;
_timoutStars = 5000;
_timoutEnemies = 2000;
_wordList = new Array(5);
_wordList[0] = new String("MONDAY");
_wordList[1] = new String("FIRST");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
} else {
switch (_currentLevel) {
case 0 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 175000 /* 0x02AB98 */;
_local6 = 0;
_local7 = 5;
_local4 = 8;
_local5 = 3;
_distanceStepBlachHoleBack = 10;
_distanceStepBlachHoleForward = 10;
_speedStars = 5;
_speedEnemies = 6;
_timoutStars = 3500;
_timoutEnemies = 3500;
break;
case 1 :
_totalTimeToDoLevel = 150000 /* 0x0249F0 */;
_local6 = 0;
_local7 = 5;
_local4 = 8;
_local5 = 3;
_distanceStepBlachHoleBack = 10;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 6;
_timoutStars = 4000;
_timoutEnemies = 3000;
break;
case 2 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 4;
_local4 = 8;
_local5 = 3;
_distanceStepBlachHoleBack = 10;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 6;
_timoutStars = 4000;
_timoutEnemies = 3000;
break;
case 3 :
_totalTimeToDoLevel = 100000 /* 0x0186A0 */;
_local6 = 0;
_local7 = 4;
_local4 = 9;
_local5 = 3;
_distanceStepBlachHoleBack = 10;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 6;
_timoutStars = 4000;
_timoutEnemies = 3000;
}
_wordList = new Array(5);
_wordList[0] = new String("MONDAY");
_wordList[1] = new String("FIRST");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
break;
case 1 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 155000 /* 0x025D78 */;
_local6 = 0;
_local7 = 5;
_local4 = 8;
_local5 = 4;
_distanceStepBlachHoleBack = 8;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 7;
_timoutStars = 3000;
_timoutEnemies = 3000;
break;
case 1 :
_totalTimeToDoLevel = 130000 /* 0x01FBD0 */;
_local6 = 0;
_local7 = 5;
_local4 = 8;
_local5 = 4;
_distanceStepBlachHoleBack = 8;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 8;
_timoutStars = 4000;
_timoutEnemies = 2600;
break;
case 2 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 4;
_local4 = 8;
_local5 = 4;
_distanceStepBlachHoleBack = 8;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 8;
_timoutStars = 3600;
_timoutEnemies = 2600;
break;
case 3 :
_totalTimeToDoLevel = 100000 /* 0x0186A0 */;
_local6 = 0;
_local7 = 4;
_local4 = 8;
_local5 = 4;
_distanceStepBlachHoleBack = 8;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 8;
_timoutStars = 3600;
_timoutEnemies = 2600;
}
_wordList = new Array(5);
_wordList[0] = new String("TUESDAY");
_wordList[1] = new String("SECOND");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
break;
case 2 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 175000 /* 0x02AB98 */;
_local6 = 0;
_local7 = 5;
_local4 = 9;
_local5 = 6;
_distanceStepBlachHoleBack = 6;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 8;
_timoutStars = 3400;
_timoutEnemies = 2600;
break;
case 1 :
_totalTimeToDoLevel = 150000 /* 0x0249F0 */;
_local6 = 0;
_local7 = 4;
_local4 = 9;
_local5 = 6;
_distanceStepBlachHoleBack = 6;
_distanceStepBlachHoleForward = 10;
_speedStars = 6;
_speedEnemies = 8;
_timoutStars = 3600;
_timoutEnemies = 2200;
break;
case 2 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 3.5;
_local4 = 9;
_local5 = 7;
_distanceStepBlachHoleBack = 6;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 3200;
_timoutEnemies = 2100;
break;
case 3 :
_totalTimeToDoLevel = 100000 /* 0x0186A0 */;
_local6 = 0;
_local7 = 3.5;
_local4 = 9;
_local5 = 7;
_distanceStepBlachHoleBack = 6;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 3200;
_timoutEnemies = 2100;
}
_wordList = new Array(5);
_wordList[0] = new String("WEDNESDAY");
_wordList[1] = new String("THIRD");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
break;
case 3 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 150000 /* 0x0249F0 */;
_local6 = 0;
_local7 = 4;
_local4 = 10;
_local5 = 6;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 3000;
_timoutEnemies = 2400;
break;
case 1 :
_totalTimeToDoLevel = 125000 /* 0x01E848 */;
_local6 = 0;
_local7 = 4;
_local4 = 10;
_local5 = 6;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 3400;
_timoutEnemies = 2000;
break;
case 2 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 3;
_local4 = 10;
_local5 = 6;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 8;
_speedEnemies = 9;
_timoutStars = 2800;
_timoutEnemies = 1800;
break;
case 3 :
_totalTimeToDoLevel = 100000 /* 0x0186A0 */;
_local6 = 0;
_local7 = 3;
_local4 = 10;
_local5 = 6;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 8;
_speedEnemies = 9;
_timoutStars = 2800;
_timoutEnemies = 1800;
}
_wordList = new Array(5);
_wordList[0] = new String("THURSDAY");
_wordList[1] = new String("FOURTH");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
break;
case 4 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 175000 /* 0x02AB98 */;
_local6 = 0;
_local7 = 3;
_local4 = 10;
_local5 = 7;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 3000;
_timoutEnemies = 2000;
break;
case 1 :
_totalTimeToDoLevel = 165000 /* 0x028488 */;
_local6 = 0;
_local7 = 3;
_local4 = 10;
_local5 = 7;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 3200;
_timoutEnemies = 1800;
break;
case 2 :
_totalTimeToDoLevel = 150000 /* 0x0249F0 */;
_local6 = 0;
_local7 = 2.4;
_local4 = 11;
_local5 = 8;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 2600;
_timoutEnemies = 1500;
break;
case 3 :
_totalTimeToDoLevel = 130000 /* 0x01FBD0 */;
_local6 = 0;
_local7 = 2.4;
_local4 = 11;
_local5 = 8;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 7;
_speedEnemies = 9;
_timoutStars = 2600;
_timoutEnemies = 1500;
}
_wordList = new Array(5);
_wordList[0] = new String("FRIDAY");
_wordList[1] = new String("FIFTH");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
break;
case 5 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 180000 /* 0x02BF20 */;
_local6 = 0;
_local7 = 3;
_local4 = 12;
_local5 = 7;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 8;
_speedEnemies = 9;
_timoutStars = 2400;
_timoutEnemies = 1600;
break;
case 1 :
_totalTimeToDoLevel = 190000 /* 0x02E630 */;
_local6 = 0;
_local7 = 3;
_local4 = 12;
_local5 = 7;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 8;
_speedEnemies = 9;
_timoutStars = 2800;
_timoutEnemies = 1400;
break;
case 2 :
_totalTimeToDoLevel = 145000 /* 0x023668 */;
_local6 = 0;
_local7 = 2.2;
_local4 = 12;
_local5 = 8;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 9;
_speedEnemies = 10;
_timoutStars = 2400;
_timoutEnemies = 1200;
break;
case 3 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 2.2;
_local4 = 12;
_local5 = 8;
_distanceStepBlachHoleBack = 4;
_distanceStepBlachHoleForward = 10;
_speedStars = 9;
_speedEnemies = 10;
_timoutStars = 2400;
_timoutEnemies = 1200;
}
_wordList = new Array(5);
_wordList[0] = new String("SATURDAY");
_wordList[1] = new String("SIXTH");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
break;
case 6 :
switch (_root.nmDifficultySetted) {
case 0 :
_totalTimeToDoLevel = 190000 /* 0x02E630 */;
_local6 = 0;
_local7 = 3;
_local4 = 12;
_local5 = 8;
_distanceStepBlachHoleBack = 2;
_distanceStepBlachHoleForward = 10;
_local14 = true;
_speedStars = 6;
_speedEnemies = 10;
_timoutStars = 2500;
_timoutEnemies = 3000;
break;
case 1 :
_totalTimeToDoLevel = 190000 /* 0x02E630 */;
_local6 = 0;
_local7 = 3;
_local4 = 12;
_local5 = 10;
_distanceStepBlachHoleBack = 2;
_distanceStepBlachHoleForward = 10;
_local14 = true;
_speedStars = 6;
_speedEnemies = 14;
_timoutStars = 3000;
_timoutEnemies = 2000;
break;
case 2 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 2.2;
_local4 = 12;
_local5 = 11;
_distanceStepBlachHoleBack = 2;
_distanceStepBlachHoleForward = 10;
_local14 = true;
_speedStars = 8;
_speedEnemies = 14;
_timoutStars = 3200;
_timoutEnemies = 1500;
break;
case 3 :
_totalTimeToDoLevel = 120000 /* 0x01D4C0 */;
_local6 = 0;
_local7 = 2;
_local4 = 12;
_local5 = 12;
_distanceStepBlachHoleBack = 2;
_distanceStepBlachHoleForward = 10;
_local14 = true;
_speedStars = 8;
_speedEnemies = 14;
_timoutStars = 3100;
_timoutEnemies = 1400;
}
_wordList = new Array(5);
_wordList[0] = new String("SUNDAY");
_wordList[1] = new String("FINAL");
_wordList[2] = new String("DAY");
_wordList[3] = new String("OF");
_wordList[4] = new String("WEEK");
}
}
_isLetterKeyOnScreen = false;
_lastTimeCycleBefore = -1;
setUpNewStringName();
var _local17 = _totalTimeToDoLevel / 1000;
_root.instInfoGameClip.instTime.text = (Math.floor(_local17 / 60) + ":") + Math.floor(_local17 % 60);
_initialTimoutStars = _timoutStars / 2;
_initialTimoutEnemies = _timoutEnemies / 2;
var _local16 = "sun";
_gWorld.attachMovie("sunClip", _local16, Define.LAYER_SUN);
var _local19 = _gWorld[_local16];
_sun = new cSun(-1, this, _gWorld, _local19, _local16, new flash.geom.Point(Stage.width / 4, Stage.height - 10), 0, -1, _local4, _local6, _local7);
var _local15 = "blackHole";
_gWorld.attachMovie("blackHoleClip", _local15, Define.LAYER_BLACKHOLE);
var _local18 = _gWorld[_local15];
_blackHole = new cBlackHole(-1, this, _gWorld, _local18, _local15, new flash.geom.Point((3 * Stage.width) / 4, Stage.height / 2), 0, -1, _local5, _local14);
_numberStars = Define.MAX_NUMBER_OF_STARS;
_numberEnemies = Define.MAX_NUMBER_OF_ENEMIES;
_initialTimeStars = new Date().getTime();
_initialTimeEnemies = new Date().getTime();
_listStars = new Array(_numberStars);
var _local12 = Define.LAYER_STARS;
_local3 = 0;
while (_local3 < _numberStars) {
var _local9 = "star" + _local3;
_gWorld.attachMovie("starClip", _local9, _local12);
var _local11 = _gWorld[_local9];
_listStars[_local3] = new cStar(_local3, this, _gWorld, _local11, _local9, new flash.geom.Point(0, 0), 0, -1, 10);
_local12++;
_local3++;
}
_listEnemies = new Array(_numberEnemies);
var _local13 = Define.LAYER_ENEMIES;
_local3 = 0;
while (_local3 < _numberEnemies) {
var _local8 = "enemy" + _local3;
_gWorld.attachMovie("enemyClip", _local8, _local13);
var _local10 = _gWorld[_local8];
_listEnemies[_local3] = new cEnemy(-1, this, _gWorld, _local10, _local8, new flash.geom.Point(0, 0), 0, -1, 10);
_local13++;
_local3++;
}
_state = Define.STATE_GESTOROBJECTS_RUN;
_iterator = 0;
}
function testKeyCode(keyCode) {
var _local2;
_local2 = 0;
while (_local2 < _listStars.length) {
var _local3 = _listStars[_local2];
if (_local3._active == true) {
if (_local3._letter == keyCode) {
_sun.insertNewStarToFollow(_local2);
break;
}
}
_local2++;
}
}
function setUpNewStringName() {
if (_wordList.length > 0) {
_dayNumberCaractersFound = 0;
_dayOfWeek = new String(_wordList[0]);
_wordList.splice(0, 1);
_dayArrayCodes = new Array(_dayOfWeek.length);
_dayFound = new String("");
var _local3 = 0;
while (_local3 < _dayOfWeek.length) {
_dayArrayCodes[_local3] = _dayOfWeek.charCodeAt(_local3) - 64;
_dayFound = _dayFound + "-";
_local3++;
}
_root.instInfoGameClip.instDayInfo.text = _dayOfWeek;
_root.instInfoGameClip.instDayFound.text = _dayFound;
}
}
function testDayOfWeek(keyCode) {
var _local3;
if (_dayNumberCaractersFound < _dayOfWeek.length) {
_local3 = 0;
while (_local3 < _dayOfWeek.length) {
if (Define.DEBUG_FIND_WORD) {
trace((("El codigo origen=" + keyCode) + " codigo destino =") + _dayOfWeek.charCodeAt(_local3));
}
if (_dayOfWeek.charCodeAt(_local3) == keyCode) {
if (_dayFound.charCodeAt(_local3) != keyCode) {
if (_local3 < (_dayFound.length - 1)) {
_dayFound = (_dayFound.substr(0, _local3) + _dayOfWeek.charAt(_local3)) + _dayFound.substr(_local3 + 1, _dayFound.length);
} else {
_dayFound = _dayFound.substr(0, _dayFound.length - 1) + _dayOfWeek.charAt(_local3);
}
_root.instInfoGameClip.instDayFound.text = _dayFound;
_dayNumberCaractersFound++;
break;
}
}
_local3++;
}
if (_dayNumberCaractersFound == _dayOfWeek.length) {
_root.gBonusCollected++;
_root.playGameSoundStops(Define.SOUNDS_FX_BONUS, 1);
_sun.activeSuperSunRays(1500, 3);
return(true);
}
return(false);
}
return(false);
}
function insertNewStar() {
var _local2;
_local2 = 0;
while (_local2 < _listStars.length) {
if (_listStars[_local2]._active == false) {
_listStars[_local2].initialitzation(_speedStars);
return(true);
}
_local2++;
}
return(false);
}
function generateStar(nmTimeTemporal) {
if ((nmTimeTemporal - _initialTimeStars) > _timoutStars) {
if (Define.DEBUG_STAR_GENERATION) {
trace("cGestorObjects:generateStar: Timout generation");
}
if (insertNewStar() == true) {
if (Define.DEBUG_STAR_GENERATION) {
trace("cGestorObjects:generateStar: Inserted a new star");
}
_timoutStars = _timoutStars - 50;
if (_timoutStars < _initialTimoutStars) {
_timoutStars = _initialTimoutStars;
}
_initialTimeStars = nmTimeTemporal;
}
}
}
function insertNewEnemy(pos, yaw, stepLength) {
var _local2;
_local2 = 0;
while (_local2 < _listEnemies.length) {
if (_listEnemies[_local2]._active == false) {
_listEnemies[_local2].initialitzation(_currentLevel, pos, yaw, stepLength);
return(true);
}
_local2++;
}
return(false);
}
function generateEnemy(nmTimeTemporal) {
if ((nmTimeTemporal - _initialTimeEnemies) > _timoutEnemies) {
if (_blackHole._isGoalSetUp == -1) {
_blackHole._active = true;
_blackHole._clip._visible = true;
if (_root.gIsPlayingTutorial == true) {
_root.gNumberOfEnemiesGenerated++;
}
if (_blackHole._isBattle == true) {
_blackHole.initPosYawSpeed2(_speedEnemies, _sun._pos);
} else {
_blackHole.initPosYawSpeed(_speedEnemies);
}
_blackHole._isGoalSetUp = 0;
_blackHole._yawGoal = _blackHole._yaw;
_blackHole._pointOrigin = Define.movePoint(_blackHole._pos, _blackHole._yaw, -(_distanceStepBlachHoleBack * _blackHole._initialStepLength));
_blackHole._pos.x = _blackHole._pointOrigin.x;
_blackHole._pos.y = _blackHole._pointOrigin.y;
_blackHole._clip._x = _blackHole._pos.x;
_blackHole._clip._y = _blackHole._pos.y;
_blackHole._pointGoal = Define.movePoint(_blackHole._pos, _blackHole._yaw, _distanceStepBlachHoleForward * _blackHole._initialStepLength);
_blackHole._speedGoal = _blackHole._stepLength;
_blackHole._stepLength = _blackHole._initialStepLength;
if (Define.DEBUG_BLACKHOLE_NORMAL) {
trace((((((("cGestorObjects: posOrigin=" + _blackHole._pointOrigin.toString()) + ";posGoal=") + _blackHole._pointGoal.toString()) + ";yaw=") + _blackHole._yaw) + ";stepLength=") + _blackHole._stepLength);
}
_timoutEnemies = _timoutEnemies - 50;
if (_timoutEnemies < _initialTimoutEnemies) {
_timoutEnemies = _initialTimoutEnemies;
}
_initialTimeEnemies = nmTimeTemporal;
}
}
}
function logic() {
var _local3;
var _local5;
var _local4 = new Date().getTime();
switch (_state) {
case Define.STATE_GESTOROBJECTS_RUN :
_local5 = _local4 - _lastTimeCycleBefore;
if (_lastTimeCycleBefore != -1) {
_totalTimeToDoLevel = _totalTimeToDoLevel - _local5;
_root.gTimeTotalDone = _root.gTimeTotalDone + _local5;
var _local6 = _totalTimeToDoLevel / 1000;
if (_totalTimeToDoLevel < 0) {
_sun.changeState(Define.STATE_SUN_LOSE);
_root.instInfoGameClip.instTime.text = "00:00";
} else {
_root.instInfoGameClip.instTime.text = (Math.floor(_local6 / 60) + ":") + Math.floor(_local6 % 60);
}
}
_lastTimeCycleBefore = _local4;
generateStar(_local4);
generateEnemy(_local4);
_sun.logic();
_blackHole.logic(_local5);
_local3 = 0;
while (_local3 < _listStars.length) {
if (_listStars[_local3]._active) {
_listStars[_local3].logic();
}
_local3++;
}
_local3 = 0;
while (_local3 < _listEnemies.length) {
if (_listEnemies[_local3]._active) {
_listEnemies[_local3].logic();
}
_local3++;
}
return(-1);
case Define.STATE_GESTOROBJECTS_VICTORY :
_sun.logic();
_blackHole.logic(-1);
_local3 = 0;
while (_local3 < _listStars.length) {
if (_listStars[_local3]._active) {
_listStars[_local3].logic();
}
_local3++;
}
_local3 = 0;
while (_local3 < _listEnemies.length) {
if (_listEnemies[_local3]._active) {
_listEnemies[_local3].logic();
}
_local3++;
}
if (_sun._state == Define.STATE_SUN_NONE) {
if (_iterator < 50) {
_iterator++;
}
if (_iterator == 1) {
_root.instPanelInformation._alpha = 0;
_root.instPanelInformation._visible = true;
_root.instPanelInformation.gotoAndStop("azul");
_root.instPanelInformation.instSmallText.text = "";
}
if (_iterator == 12) {
_root.instPanelInformation.instSmallText.text = ("CONGRATULATIONS\n YOU BRING THE LIGHT ON " + Define.getDay(_currentLevel)) + "\nPress Spacebar to Continue";
}
_root.instPanelInformation._alpha = 2 * _iterator;
}
if (Key.isDown(32) && (_sun._state == Define.STATE_SUN_NONE)) {
_root.gTimeTotalDone = Math.floor(_root.gTimeTotalDone / 1000);
_state = -1;
return(0);
}
return(-1);
case Define.STATE_GESTOROBJECTS_LOSE :
_sun.logic();
_blackHole.logic(-1);
_local3 = 0;
while (_local3 < _listStars.length) {
if (_listStars[_local3]._active) {
_listStars[_local3].logic();
}
_local3++;
}
_local3 = 0;
while (_local3 < _listEnemies.length) {
if (_listEnemies[_local3]._active) {
_listEnemies[_local3].logic();
}
_local3++;
}
if (_blackHole._state == Define.STATE_BLACKHOLE_NONE) {
if (_iterator < 50) {
_iterator++;
}
if (_iterator == 1) {
_root.instPanelInformation._alpha = 0;
_root.instPanelInformation._visible = true;
_root.instPanelInformation.gotoAndStop("rojo");
_root.instPanelInformation.instSmallText.text = "";
}
if (_iterator == 12) {
if (_totalTimeToDoLevel > 0) {
_root.instPanelInformation.instSmallText.text = "SORRY\n BLACK HOLE HAS BRING THE ETERNAL NIGHT\nPress Spacebar to Continue";
} else {
_root.instPanelInformation.instSmallText.text = "SORRY\n THE TIME RUN OUT TO LIGHT THE WORLD\nPress Spacebar to Continue";
}
}
_root.instPanelInformation._alpha = 2 * _iterator;
}
if (Key.isDown(32) && (_blackHole._state == Define.STATE_BLACKHOLE_NONE)) {
_root.gTimeTotalDone = Math.floor(_root.gTimeTotalDone / 1000);
_state = -1;
return(1);
}
return(-1);
case Define.STATE_GESTOROBJECTS_TUTORIAL1 :
case Define.STATE_GESTOROBJECTS_TUTORIAL2 :
case Define.STATE_GESTOROBJECTS_TUTORIAL3 :
case Define.STATE_GESTOROBJECTS_TUTORIAL4 :
case Define.STATE_GESTOROBJECTS_TUTORIAL5 :
_local5 = _local4 - _lastTimeCycleBefore;
if (_lastTimeCycleBefore != -1) {
_totalTimeToDoLevel = _totalTimeToDoLevel - _local5;
_root.gTimeTotalDone = _root.gTimeTotalDone + _local5;
var _local6 = _totalTimeToDoLevel / 1000;
if (_totalTimeToDoLevel < 0) {
_sun.changeState(Define.STATE_SUN_LOSE);
_root.instInfoGameClip.instTime.text = "00:00";
} else {
_root.instInfoGameClip.instTime.text = (Math.floor(_local6 / 60) + ":") + Math.floor(_local6 % 60);
}
}
_lastTimeCycleBefore = _local4;
if (_state == Define.STATE_GESTOROBJECTS_TUTORIAL2) {
generateStar(_local4);
}
if (_state == Define.STATE_GESTOROBJECTS_TUTORIAL4) {
if (_root.gNumberOfEnemiesGenerated < 5) {
generateEnemy(_local4);
}
}
_sun.logic();
if (_state == Define.STATE_GESTOROBJECTS_TUTORIAL4) {
if (_blackHole._clip._visible == false) {
_blackHole._clip._visible = true;
}
_blackHole.logic(-1);
} else {
_blackHole._clip._visible = false;
}
_local3 = 0;
while (_local3 < _listStars.length) {
if (_listStars[_local3]._active) {
_listStars[_local3].logic();
}
_local3++;
}
_local3 = 0;
while (_local3 < _listEnemies.length) {
if (_listEnemies[_local3]._active) {
_listEnemies[_local3].logic();
}
_local3++;
}
return(-1);
case Define.STATE_GESTOROBJECTS_TUTORIAL4 :
return(-1);
case Define.STATE_GESTOROBJECTS_TUTORIAL5 :
return(-1);
}
}
}
Symbol 512 MovieClip [__Packages.CObject] Frame 0
class CObject
{
var _id, _cGestor, _gWorld, _clip, _myName, _type, _pos, _yaw, _life, _initialLife, _attackPower, _impact, _inmunity, _rangeExecution, _active, _iterator, _stepLength, _initialStepLength, _lastState, _state, _yawLast;
function CObject () {
}
function init(id, cGestor, gWorld, clip, myName, type, pos, yaw, life, attackPower, rangeExecution, stepLength) {
_id = id;
_cGestor = cGestor;
_gWorld = gWorld;
_clip = clip;
_myName = myName;
_type = type;
_pos = new flash.geom.Point(pos.x, pos.y);
_yaw = yaw;
_life = life;
_initialLife = _life;
_attackPower = attackPower;
_impact = 0;
_inmunity = 0;
_rangeExecution = rangeExecution;
_active = true;
_iterator = 0;
_stepLength = stepLength;
_initialStepLength = stepLength;
_clip._x = _pos.x;
_clip._y = _pos.y;
if (Define.DEBUG_INITIALITZATION_COBJECT) {
trace((("CObject: Inicializamos algo (" + myName) + ")=") + _pos.toString());
}
}
function initPosYawSpeed(rangeSpeed) {
var _local2 = Define.randRange(0, 7);
_stepLength = Define.randRange(rangeSpeed / 3, rangeSpeed);
switch (_local2) {
case 0 :
_pos.y = 0;
_pos.x = Define.randRange(5, Stage.width / 2);
_yaw = Define.getRadians(Define.randRange(10, 80));
break;
case 1 :
_pos.y = 0;
_pos.x = Define.randRange(Stage.width / 2, Stage.width - 5);
_yaw = Define.getRadians(Define.randRange(100, 170));
break;
case 2 :
_pos.y = Define.randRange(5, Stage.height / 2);
_pos.x = Stage.width;
_yaw = Define.getRadians(Define.randRange(100, 170));
break;
case 3 :
_pos.y = Define.randRange(Stage.height / 2, Stage.height - 5);
_pos.x = Stage.width;
_yaw = Define.getRadians(Define.randRange(190, 260));
break;
case 4 :
_pos.y = Stage.height;
_pos.x = Define.randRange(Stage.width / 2, Stage.width - 5);
_yaw = Define.getRadians(Define.randRange(200, 260));
break;
case 5 :
_pos.y = Stage.height;
_pos.x = Define.randRange(5, Stage.width / 2);
_yaw = Define.getRadians(Define.randRange(280, 340));
break;
case 6 :
_pos.y = Define.randRange(Stage.height / 2, Stage.height - 5);
_pos.x = 0;
_yaw = Define.getRadians(Define.randRange(280, 350));
break;
case 7 :
_pos.y = Define.randRange(5, Stage.height / 2);
_pos.x = 0;
_yaw = Define.getRadians(Define.randRange(10, 80));
}
if (Define.DEBUG_STAR_GENERATION) {
_pos.y = Stage.height / 2;
_pos.x = Stage.width / 2;
}
}
function initPosYawSpeed2(rangeSpeed, posObjetive) {
_stepLength = Define.randRange(rangeSpeed / 3, rangeSpeed);
var _local6 = flash.geom.Point.distance(_pos, posObjetive);
var _local4 = posObjetive.x - _pos.x;
var _local3 = posObjetive.y - _pos.y;
_yaw = Math.atan2(_local3, _local4);
}
function freeResources() {
_clip.removeMovieClip();
}
function changeState(newState) {
_lastState = _state;
_state = newState;
_iterator = 0;
}
function changeDirection(newDirection) {
_yaw = _yawLast;
_yaw = newDirection;
}
function moveNext(reallyMove) {
var _local2 = new flash.geom.Point(_pos.x, _pos.y);
_local2.x = _local2.x + (_stepLength * Math.cos(_yaw));
_local2.y = _local2.y + (_stepLength * Math.sin(_yaw));
if ((((_local2.x < 0) || (_local2.y < 0)) || (_local2.x > Stage.width)) || (_local2.y > Stage.height)) {
return(false);
}
if (reallyMove) {
_pos.x = _local2.x;
_pos.y = _local2.y;
_clip._x = _pos.x;
_clip._y = _pos.y;
}
return(true);
}
function moveStep(stepToMove) {
var _local2 = new flash.geom.Point(_pos.x, _pos.y);
_local2.x = _local2.x + (stepToMove * Math.cos(_yaw));
_local2.y = _local2.y + (stepToMove * Math.sin(_yaw));
_pos.x = _local2.x;
_pos.y = _local2.y;
_clip._x = _pos.x;
_clip._y = _pos.y;
if ((((_local2.x < 0) || (_local2.y < 0)) || (_local2.x > Stage.width)) || (_local2.y > Stage.height)) {
return(false);
}
return(true);
}
function setUpYawToPoint(posGoal) {
var _local3 = posGoal.x - _pos.x;
var _local2 = posGoal.y - _pos.y;
_yaw = Math.atan2(_local2, _local3);
}
}
Symbol 513 MovieClip [__Packages.cSun] Frame 0
class cSun extends CObject
{
var init, _totalNumberOfStars, _listGoalStars, _superRays, changeState, _mustGrow, _mustShrink, _sizePercentage, _stepToGrow, _pos, _myName, _clip, _cGestor, _yaw, _activeSunSuperRays, _initShrinkSunSuperRays, _raysLength, _stepDecrementRay, _iterator, _state, _impact, setUpYawToPoint, moveNext, _stepLength, _initialStepLength, moveStep;
function cSun (id, cGestor, gWorld, clip, myName, pos, yaw, life, stepLength, sizePercentage, stepToGrow) {
super();
init(id, cGestor, gWorld, clip, myName, -1, pos, yaw, life, -1, -1, stepLength);
_totalNumberOfStars = 0;
_listGoalStars = new Array(Define.MAX_NUMBER_OF_STARS);
var _local4;
_local4 = 0;
while (_local4 < Define.MAX_NUMBER_OF_STARS) {
_listGoalStars[_local4] = -1;
_local4++;
}
_root.world.createEmptyMovieClip("triangulito", Define.LAYER_TRIANGLE_RAY);
_root.world.createEmptyMovieClip("ray1", Define.LAYER_TRIANGLE_RAY + 1);
_root.world.createEmptyMovieClip("ray2", Define.LAYER_TRIANGLE_RAY + 2);
_root.world.createEmptyMovieClip("ray3", Define.LAYER_TRIANGLE_RAY + 3);
_root.world.createEmptyMovieClip("ray4", Define.LAYER_TRIANGLE_RAY + 4);
_superRays = new Array(4);
_superRays[0] = 0;
_superRays[1] = (Math.PI/2);
_superRays[2] = Math.PI;
_superRays[3] = 4.71238898038469;
changeState(Define.STATE_SUN_NONE);
_mustGrow = 0;
_mustShrink = 0;
_sizePercentage = sizePercentage;
_stepToGrow = stepToGrow;
applyPercentageOverSize();
if (Define.DEBUG_INITIALITZATION_CPERSONAJE) {
trace((("cSun: Continuamos inicializacion (" + _myName) + ")=") + _pos.toString());
}
}
function insertNewStarToFollow(indexOfStar) {
_listGoalStars[_totalNumberOfStars] = indexOfStar;
_totalNumberOfStars++;
}
function applyPercentageOverSize() {
_clip._xscale = 25 + _sizePercentage;
_clip._yscale = 25 + _sizePercentage;
_root.world.gotoAndStop(_sizePercentage + 1);
}
function removeStarToFollow() {
var _local2;
_local2 = 0;
while (_local2 < _totalNumberOfStars) {
_listGoalStars[_local2] = _listGoalStars[_local2 + 1];
_local2++;
}
_listGoalStars[_totalNumberOfStars - 1] = -1;
_totalNumberOfStars--;
}
function setUpYawToStar() {
var _local2 = _cGestor._listStars[_listGoalStars[0]];
var _local3 = flash.geom.Point.distance(_pos, _local2._pos);
var _local5 = _local2._pos.x - _pos.x;
var _local4 = _local2._pos.y - _pos.y;
if (_local2._active == false) {
_local3 = -1;
}
_yaw = Math.atan2(_local4, _local5);
return(_local3);
}
function activeSuperSunRays(sizeToTake, stepDecrementRay) {
_activeSunSuperRays = sizeToTake;
_initShrinkSunSuperRays = _activeSunSuperRays / 5;
_raysLength = _initShrinkSunSuperRays;
_stepDecrementRay = stepDecrementRay;
}
function makeSuperSunRays() {
var generalIncrement = 0.196349540849362;
_superRays[0] = _superRays[0] + generalIncrement;
with (_root.world.ray1) {
clear();
lineStyle(1, 9934743, 100);
var angleRayX = _root.gGestor._sun._superRays[0];
var oneSideAngle = (angleRayX + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (_root.gGestor._sun._sizePercentage >> 1) + 1);
var posEx2 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (-(_root.gGestor._sun._sizePercentage >> 1)) + 1);
var posEx3 = Define.movePoint(_root.gGestor._sun._pos, angleRayX, _root.gGestor._sun._raysLength);
beginFill(16776960);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
_superRays[1] = _superRays[1] + generalIncrement;
with (_root.world.ray2) {
clear();
lineStyle(1, 9934743, 100);
var angleRayX = _root.gGestor._sun._superRays[1];
var oneSideAngle = (angleRayX + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (_root.gGestor._sun._sizePercentage >> 1) + 1);
var posEx2 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (-(_root.gGestor._sun._sizePercentage >> 1)) + 1);
var posEx3 = Define.movePoint(_root.gGestor._sun._pos, angleRayX, _root.gGestor._sun._raysLength);
beginFill(16776960);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
_superRays[2] = _superRays[2] + generalIncrement;
with (_root.world.ray3) {
clear();
lineStyle(1, 9934743, 100);
var angleRayX = _root.gGestor._sun._superRays[2];
var oneSideAngle = (angleRayX + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (_root.gGestor._sun._sizePercentage >> 1) + 1);
var posEx2 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (-(_root.gGestor._sun._sizePercentage >> 1)) + 1);
var posEx3 = Define.movePoint(_root.gGestor._sun._pos, angleRayX, _root.gGestor._sun._raysLength);
beginFill(16776960);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
_superRays[3] = _superRays[3] + generalIncrement;
with (_root.world.ray4) {
clear();
lineStyle(1, 9934743, 100);
var angleRayX = _root.gGestor._sun._superRays[3];
var oneSideAngle = (angleRayX + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (_root.gGestor._sun._sizePercentage >> 1) + 1);
var posEx2 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (-(_root.gGestor._sun._sizePercentage >> 1)) + 1);
var posEx3 = Define.movePoint(_root.gGestor._sun._pos, angleRayX, _root.gGestor._sun._raysLength);
beginFill(16776960);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
}
function logic() {
if (_iterator < 100) {
_iterator++;
} else {
_iterator = 10;
}
if (_activeSunSuperRays > 0) {
_activeSunSuperRays = _activeSunSuperRays - _stepDecrementRay;
if ((_activeSunSuperRays <= 0) && (_state != Define.STATE_SUN_VICTORY)) {
_cGestor.setUpNewStringName();
}
if (_activeSunSuperRays < _initShrinkSunSuperRays) {
_raysLength = _raysLength - _stepDecrementRay;
}
if (_raysLength > 0) {
makeSuperSunRays();
} else {
with (_root.world.ray1) {
clear();
}
with (_root.world.ray2) {
clear();
}
with (_root.world.ray3) {
clear();
}
with (_root.world.ray4) {
clear();
}
}
}
if (_mustGrow > 0) {
if ((_iterator % 3) == 0) {
_mustGrow--;
_cGestor._blackHole._impact = 1;
if (_mustGrow == 0) {
if (_state != Define.STATE_SUN_VICTORY) {
_iterator = 1;
}
}
_sizePercentage++;
if (_sizePercentage > Define.TOTAL_SIZE_PERCENTAGE_SUN) {
if (_state != Define.STATE_SUN_VICTORY) {
changeState(Define.STATE_SUN_VICTORY);
}
} else {
applyPercentageOverSize();
}
}
}
if (_impact > 0) {
_mustShrink = _mustShrink + _impact;
_impact = 0;
_clip.gotoAndPlay("lose");
}
if (_mustShrink > 0) {
if ((_iterator % 3) == 0) {
_mustShrink--;
_cGestor._blackHole._mustGrow++;
if (_mustShrink == 0) {
if (_state != Define.STATE_SUN_LOSE) {
_iterator = 1;
}
}
_sizePercentage--;
if (_sizePercentage < 0) {
if (_state != Define.STATE_SUN_LOSE) {
changeState(Define.STATE_SUN_LOSE);
}
} else {
applyPercentageOverSize();
}
}
}
if (_state == Define.STATE_SUN_NONE) {
return(undefined);
}
switch (_state) {
case Define.STATE_SUN_PRESENTATION :
if (_iterator == 1) {
_clip.gotoAndPlay("presentation");
applyPercentageOverSize();
}
var posCenter = (new flash.geom.Point(Stage.width / 4, Stage.height / 2));
setUpYawToPoint(posCenter);
moveNext(true);
if (flash.geom.Point.distance(_pos, posCenter) < (_stepLength + 6)) {
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_QUIET);
return;
}
return;
case Define.STATE_SUN_QUIET :
if (_iterator == 1) {
_clip.gotoAndPlay("quiet");
}
if (Key.isDown(32) || (Key.isDown(39))) {
var posDestination = (new flash.geom.Point(_pos.x + (_stepLength * 2), _pos.y));
if (posDestination.x > Stage.width) {
_pos.x = 0;
_clip._x = 0;
} else {
setUpYawToPoint(posDestination);
moveStep(_stepLength);
}
}
if (Key.isDown(8) || (Key.isDown(37))) {
var posDestination = (new flash.geom.Point(_pos.x - (_stepLength * 2), _pos.y));
if (posDestination.x < 0) {
_pos.x = Stage.width;
_clip._x = Stage.width;
} else {
setUpYawToPoint(posDestination);
moveStep(_stepLength);
}
}
if (Key.isDown(13) || (Key.isDown(40))) {
var posDestination = (new flash.geom.Point(_pos.x, _pos.y + (_stepLength * 2)));
if (posDestination.y > Stage.height) {
_pos.y = 0;
_clip._y = 0;
} else {
setUpYawToPoint(posDestination);
moveStep(_stepLength);
}
}
if (Key.isDown(16) || (Key.isDown(38))) {
var posDestination = (new flash.geom.Point(_pos.x, _pos.y - (_stepLength * 2)));
if (posDestination.y < 0) {
_pos.y = Stage.height;
_clip._y = Stage.height;
} else {
setUpYawToPoint(posDestination);
moveStep(_stepLength);
}
}
if (_totalNumberOfStars > 0) {
changeState(Define.STATE_SUN_FOLLOWSTAR);
} else {
return;
if (_iterator == 1) {
_clip.gotoAndPlay("follow");
}
if (_iterator == 1) {
if (_totalNumberOfStars > 1) {
var nextStepLength = (_initialStepLength + ((_initialStepLength * _totalNumberOfStars) / 3));
if (nextStepLength > _stepLength) {
_stepLength = nextStepLength;
}
}
}
var distanceFromStar = setUpYawToStar();
moveNext(true);
with (_root.world.triangulito) {
clear();
lineStyle(1, 9934743, 100);
var oneSideAngle = (_root.gGestor._sun._yaw + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (_root.gGestor._sun._sizePercentage >> 2) + 1);
var posEx2 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (-(_root.gGestor._sun._sizePercentage >> 2)) + 1);
var refStartmp = _root.gGestor._listStars[_root.gGestor._sun._listGoalStars[0]];
var posEx3 = (new flash.geom.Point(refStartmp._pos.x, refStartmp._pos.y));
beginFill(16711680);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
if ((distanceFromStar == -1) || (_cGestor._listStars[_listGoalStars[0]]._isCaptured == true)) {
removeStarToFollow();
if (_totalNumberOfStars > 0) {
with (_root.world.triangulito) {
clear();
}
changeState(Define.STATE_SUN_FOLLOWSTAR);
return;
}
with (_root.world.triangulito) {
clear();
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_QUIET);
} else if (distanceFromStar < (_stepLength + 6)) {
_root.playGameSound(Define.SOUNDS_FX_STAR_CAPTURED, 1);
_cGestor._listStars[_listGoalStars[0]]._isCaptured = true;
_cGestor.testDayOfWeek(_cGestor._listStars[_listGoalStars[0]]._letter + 64);
removeStarToFollow();
_mustGrow = _stepToGrow;
_clip.gotoAndPlay("victory");
if (_totalNumberOfStars > 0) {
with (_root.world.triangulito) {
clear();
}
changeState(Define.STATE_SUN_FOLLOWSTAR);
return;
}
with (_root.world.triangulito) {
clear();
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_QUIET);
} else {
return;
if (_iterator == 1) {
_cGestor._state = Define.STATE_GESTOROBJECTS_VICTORY;
_root.playGameSoundStops(Define.SOUNDS_VICTORIA, 1);
activeSuperSunRays(2500, 20);
_cGestor._blackHole.changeState(Define.STATE_BLACKHOLE_LOSE);
_clip.gotoAndPlay("victory");
with (_root.world.triangulito) {
clear();
}
}
var posCenter = (new flash.geom.Point(Stage.width >> 1, Stage.height >> 1));
setUpYawToPoint(posCenter);
if (flash.geom.Point.distance(_pos, posCenter) > (_stepLength + 6)) {
moveNext(true);
_stepLength = _initialStepLength;
} else if (_activeSunSuperRays < 10) {
changeState(Define.STATE_SUN_NONE);
}
return;
if (_iterator == 1) {
_stepLength = _initialStepLength / 2;
_cGestor._state = Define.STATE_GESTOROBJECTS_LOSE;
_root.playGameSoundStops(Define.SOUNDS_DERROTA, 1);
_cGestor._blackHole.changeState(Define.STATE_BLACKHOLE_VICTORY);
_impact = 100;
_activeSunSuperRays = _initShrinkSunSuperRays - 10;
_clip.gotoAndPlay("lose");
with (_root.world.triangulito) {
clear();
}
}
var posOutScreen = (new flash.geom.Point(Stage.width / 2, Stage.height + 100));
setUpYawToPoint(posOutScreen);
moveStep(_stepLength);
if (flash.geom.Point.distance(_pos, posOutScreen) >= (_stepLength + 6)) {
break;
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_NONE);
return;
}
}
case Define.STATE_SUN_FOLLOWSTAR :
if (_iterator == 1) {
_clip.gotoAndPlay("follow");
}
if (_iterator == 1) {
if (_totalNumberOfStars > 1) {
var nextStepLength = (_initialStepLength + ((_initialStepLength * _totalNumberOfStars) / 3));
if (nextStepLength > _stepLength) {
_stepLength = nextStepLength;
}
}
}
var distanceFromStar = setUpYawToStar();
moveNext(true);
with (_root.world.triangulito) {
clear();
lineStyle(1, 9934743, 100);
var oneSideAngle = (_root.gGestor._sun._yaw + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (_root.gGestor._sun._sizePercentage >> 2) + 1);
var posEx2 = Define.movePoint(_root.gGestor._sun._pos, oneSideAngle, (-(_root.gGestor._sun._sizePercentage >> 2)) + 1);
var refStartmp = _root.gGestor._listStars[_root.gGestor._sun._listGoalStars[0]];
var posEx3 = (new flash.geom.Point(refStartmp._pos.x, refStartmp._pos.y));
beginFill(16711680);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
if ((distanceFromStar == -1) || (_cGestor._listStars[_listGoalStars[0]]._isCaptured == true)) {
removeStarToFollow();
if (_totalNumberOfStars > 0) {
with (_root.world.triangulito) {
clear();
}
changeState(Define.STATE_SUN_FOLLOWSTAR);
return;
}
with (_root.world.triangulito) {
clear();
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_QUIET);
} else if (distanceFromStar < (_stepLength + 6)) {
_root.playGameSound(Define.SOUNDS_FX_STAR_CAPTURED, 1);
_cGestor._listStars[_listGoalStars[0]]._isCaptured = true;
_cGestor.testDayOfWeek(_cGestor._listStars[_listGoalStars[0]]._letter + 64);
removeStarToFollow();
_mustGrow = _stepToGrow;
_clip.gotoAndPlay("victory");
if (_totalNumberOfStars > 0) {
with (_root.world.triangulito) {
clear();
}
changeState(Define.STATE_SUN_FOLLOWSTAR);
return;
}
with (_root.world.triangulito) {
clear();
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_QUIET);
} else {
return;
if (_iterator == 1) {
_cGestor._state = Define.STATE_GESTOROBJECTS_VICTORY;
_root.playGameSoundStops(Define.SOUNDS_VICTORIA, 1);
activeSuperSunRays(2500, 20);
_cGestor._blackHole.changeState(Define.STATE_BLACKHOLE_LOSE);
_clip.gotoAndPlay("victory");
with (_root.world.triangulito) {
clear();
}
}
var posCenter = (new flash.geom.Point(Stage.width >> 1, Stage.height >> 1));
setUpYawToPoint(posCenter);
if (flash.geom.Point.distance(_pos, posCenter) > (_stepLength + 6)) {
moveNext(true);
_stepLength = _initialStepLength;
} else if (_activeSunSuperRays < 10) {
changeState(Define.STATE_SUN_NONE);
}
return;
if (_iterator == 1) {
_stepLength = _initialStepLength / 2;
_cGestor._state = Define.STATE_GESTOROBJECTS_LOSE;
_root.playGameSoundStops(Define.SOUNDS_DERROTA, 1);
_cGestor._blackHole.changeState(Define.STATE_BLACKHOLE_VICTORY);
_impact = 100;
_activeSunSuperRays = _initShrinkSunSuperRays - 10;
_clip.gotoAndPlay("lose");
with (_root.world.triangulito) {
clear();
}
}
var posOutScreen = (new flash.geom.Point(Stage.width / 2, Stage.height + 100));
setUpYawToPoint(posOutScreen);
moveStep(_stepLength);
if (flash.geom.Point.distance(_pos, posOutScreen) >= (_stepLength + 6)) {
break;
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_NONE);
return;
}
case Define.STATE_SUN_VICTORY :
if (_iterator == 1) {
_cGestor._state = Define.STATE_GESTOROBJECTS_VICTORY;
_root.playGameSoundStops(Define.SOUNDS_VICTORIA, 1);
activeSuperSunRays(2500, 20);
_cGestor._blackHole.changeState(Define.STATE_BLACKHOLE_LOSE);
_clip.gotoAndPlay("victory");
with (_root.world.triangulito) {
clear();
}
}
var posCenter = (new flash.geom.Point(Stage.width >> 1, Stage.height >> 1));
setUpYawToPoint(posCenter);
if (flash.geom.Point.distance(_pos, posCenter) > (_stepLength + 6)) {
moveNext(true);
_stepLength = _initialStepLength;
} else if (_activeSunSuperRays < 10) {
changeState(Define.STATE_SUN_NONE);
}
return;
case Define.STATE_SUN_LOSE :
if (_iterator == 1) {
_stepLength = _initialStepLength / 2;
_cGestor._state = Define.STATE_GESTOROBJECTS_LOSE;
_root.playGameSoundStops(Define.SOUNDS_DERROTA, 1);
_cGestor._blackHole.changeState(Define.STATE_BLACKHOLE_VICTORY);
_impact = 100;
_activeSunSuperRays = _initShrinkSunSuperRays - 10;
_clip.gotoAndPlay("lose");
with (_root.world.triangulito) {
clear();
}
}
var posOutScreen = (new flash.geom.Point(Stage.width / 2, Stage.height + 100));
setUpYawToPoint(posOutScreen);
moveStep(_stepLength);
if (flash.geom.Point.distance(_pos, posOutScreen) >= (_stepLength + 6)) {
break;
}
_stepLength = _initialStepLength;
changeState(Define.STATE_SUN_NONE);
return;
}
}
}
Symbol 514 MovieClip [__Packages.cStar] Frame 0
class cStar extends CObject
{
var init, _active, _isCaptured, _clip, _mustBeRemovedIfCatched, changeState, _pos, _myName, _cGestor, _letter, _indexToRemoveLetter, initPosYawSpeed, _yaw, _stepLength, _state, moveNext;
function cStar (id, cGestor, gWorld, clip, myName, pos, yaw, life, stepLength) {
super();
init(id, cGestor, gWorld, clip, myName, -1, pos, yaw, life, -1, -1, stepLength);
_active = false;
_isCaptured = false;
_clip._visible = false;
_mustBeRemovedIfCatched = false;
changeState(Define.STATE_STAR_NONE);
if (Define.DEBUG_INITIALITZATION_CPERSONAJE) {
trace((("cStar: Continuamos inicializacion (" + _myName) + ")=") + _pos.toString());
}
}
function initialitzation(rangeSpeed) {
_active = true;
_clip._visible = true;
_isCaptured = false;
var _local3 = false;
if ((Define.randRange(0, 10) < 7) || (_cGestor._isLetterKeyOnScreen == true)) {
do {
_letter = Define.randRange(1, 26);
if ((_letter < 1) || (_letter > 26)) {
_letter = 26;
}
_local3 = false;
var _local2 = 0;
while (_local2 < _cGestor._dayArrayCodes.length) {
if (_cGestor._dayArrayCodes[_local2] == _letter) {
_local3 = true;
break;
}
_local2++;
}
} while (_local3 == true);
} else if (_cGestor._dayArrayCodes.length > 0) {
_indexToRemoveLetter = Define.randRange(0, _cGestor._dayArrayCodes.length - 1);
_letter = _cGestor._dayArrayCodes[_indexToRemoveLetter];
if ((_letter < 1) || (_letter > 26)) {
_letter = 26;
}
_mustBeRemovedIfCatched = true;
_cGestor._isLetterKeyOnScreen = true;
}
_clip.gotoAndStop(_letter);
initPosYawSpeed(rangeSpeed);
if (Define.DEBUG_STAR_GENERATION) {
trace((((("cStar: Parameters of new star _stepLength=" + _stepLength) + ",_pos=") + _pos.toString()) + ",_yaw=") + Define.getGrados(_yaw));
}
changeState(Define.STATE_STAR_RUN);
}
function logic() {
switch (_state) {
case Define.STATE_STAR_RUN :
if (moveNext(true) == false) {
if (_mustBeRemovedIfCatched == true) {
_mustBeRemovedIfCatched = false;
_cGestor._isLetterKeyOnScreen = false;
}
changeState(Define.STATE_STAR_DISAPPEAR);
break;
}
if (Define.DEBUG_STAR_GENERATION) {
trace("cStar: Logic:_pos=" + _pos.toString());
}
if (_isCaptured == true) {
_root.gStarsCollected++;
if (_mustBeRemovedIfCatched == true) {
_cGestor._isLetterKeyOnScreen = false;
_mustBeRemovedIfCatched = false;
_cGestor._dayArrayCodes.splice(_indexToRemoveLetter, 1);
}
changeState(Define.STATE_STAR_CAPTURED);
} else {
break;
_active = false;
_isCaptured = false;
_clip._visible = false;
changeState(Define.STATE_STAR_NONE);
break;
_active = false;
_isCaptured = false;
_clip._visible = false;
changeState(Define.STATE_STAR_NONE);
break;
}
case Define.STATE_STAR_CAPTURED :
_active = false;
_isCaptured = false;
_clip._visible = false;
changeState(Define.STATE_STAR_NONE);
break;
case Define.STATE_STAR_DISAPPEAR :
_active = false;
_isCaptured = false;
_clip._visible = false;
changeState(Define.STATE_STAR_NONE);
break;
case Define.STATE_STAR_NONE :
}
}
}
Symbol 515 MovieClip [__Packages.cBlackHole] Frame 0
class cBlackHole extends CObject
{
var init, _active, _clip, changeState, _isBattle, _isGoalSetUp, _pointGoal, _sizePercentage, _mustGrow, _mustShrink, _timeAcum, _initialTimeout, _timeoutLimit, _timeToCatchStar, _pos, _myName, setUpYawToPoint, moveStep, _stepLength, _cGestor, _yawGoal, _speedGoal, _pointOrigin, _iterator, _starGoal, _yaw, _state, _impact, _initialStepLength;
function cBlackHole (id, cGestor, gWorld, clip, myName, pos, yaw, life, stepLength, isBattle) {
super();
init(id, cGestor, gWorld, clip, myName, -1, pos, yaw, life, -1, -1, stepLength);
_active = true;
_clip._visible = true;
changeState(Define.STATE_BLACKHOLE_NONE);
_root.world.createEmptyMovieClip("triangulooscuro", Define.LAYER_TRIANGLE_BLACK_HOLE);
_isBattle = isBattle;
_isGoalSetUp = -1;
_pointGoal = new flash.geom.Point(-1, -1);
_sizePercentage = 100;
_mustGrow = 0;
_mustShrink = 0;
_timeAcum = 0;
_initialTimeout = Define.TIMEOUT_TO_THINK_BLACK_HOLE;
_timeoutLimit = Define.TIMEOUT_TO_THINK_BLACK_HOLE / 2;
_timeToCatchStar = 4000;
_clip.gotoAndPlay("quiet");
applyPercentageOverSize();
if (Define.DEBUG_INITIALITZATION_CPERSONAJE) {
trace((("cBlackHole: Continuamos inicializacion (" + _myName) + ")=") + _pos.toString());
}
}
function applyPercentageOverSize() {
_clip._xscale = 40 + _sizePercentage;
_clip._yscale = 40 + _sizePercentage;
}
function throwMeorit() {
switch (_isGoalSetUp) {
case 0 :
setUpYawToPoint(_pointGoal);
moveStep(_stepLength);
if (flash.geom.Point.distance(_pos, _pointGoal) < (_stepLength + 6)) {
_isGoalSetUp = 1;
_pos.x = _pointGoal.x;
_pos.y = _pointGoal.y;
_cGestor.insertNewEnemy(_pointGoal, _yawGoal, _speedGoal);
}
return(true);
case 1 :
setUpYawToPoint(_pointOrigin);
moveStep(_stepLength);
if (flash.geom.Point.distance(_pos, _pointOrigin) < (_stepLength + 6)) {
_isGoalSetUp = -1;
if (_isBattle == false) {
_pos.x = -100;
_pos.y = -100;
_clip._x = _pos.x;
_clip._y = _pos.y;
_active = false;
_clip._visible = false;
} else {
_iterator = 0;
}
}
return(true);
}
return(false);
}
function setUpYawToStar() {
var _local2 = flash.geom.Point.distance(_pos, _starGoal._pos);
var _local4 = _starGoal._pos.x - _pos.x;
var _local3 = _starGoal._pos.y - _pos.y;
if (_starGoal._active == false) {
_local2 = -1;
}
_yaw = Math.atan2(_local3, _local4);
return(_local2);
}
function logic(timeDif) {
if (_iterator < 100) {
_iterator++;
} else {
_iterator = 10;
}
if (_mustGrow > 0) {
if ((_iterator % 3) == 0) {
_mustGrow--;
if (_mustGrow == 0) {
if ((_state != Define.STATE_BLACKHOLE_VICTORY) && (_state != Define.STATE_BLACKHOLE_LOSE)) {
_iterator = 1;
}
}
_sizePercentage++;
if (_sizePercentage > Define.TOTAL_SIZE_PERCENTAGE_BLACK_HOLE) {
_sizePercentage = Define.TOTAL_SIZE_PERCENTAGE_BLACK_HOLE;
}
applyPercentageOverSize();
}
}
if (_impact > 0) {
_mustShrink = _mustShrink + _impact;
_impact = 0;
_clip.gotoAndPlay("lose");
}
if (_mustShrink > 0) {
if ((_iterator % 3) == 0) {
_mustShrink--;
if (_mustShrink == 0) {
if ((_state != Define.STATE_BLACKHOLE_VICTORY) && (_state != Define.STATE_BLACKHOLE_LOSE)) {
_iterator = 1;
}
}
_sizePercentage--;
if (_sizePercentage < 0) {
_sizePercentage = 0;
}
applyPercentageOverSize();
}
}
switch (_state) {
case Define.STATE_BLACKHOLE_PRESENTATION :
if (_iterator == 1) {
_clip.gotoAndPlay("presentation");
}
if (_isBattle == false) {
var posOutScreen = (new flash.geom.Point(Stage.width + 100, Stage.height / 2));
setUpYawToPoint(posOutScreen);
moveStep(_stepLength);
if (flash.geom.Point.distance(_pos, posOutScreen) < (_stepLength + 6)) {
_stepLength = _initialStepLength;
changeState(Define.STATE_BLACKHOLE_QUIET);
return;
}
} else {
changeState(Define.STATE_BLACKHOLE_QUIET);
}
return;
case Define.STATE_BLACKHOLE_QUIET :
if (_iterator == 1) {
_clip.gotoAndPlay("quiet");
}
if (_isBattle == false) {
throwMeorit();
} else {
_timeAcum = _timeAcum + timeDif;
_timeToCatchStar = _timeToCatchStar - timeDif;
if ((throwMeorit() == false) || (_timeToCatchStar < 0)) {
_isGoalSetUp = -1;
if ((_timeAcum > _initialTimeout) || (_timeToCatchStar < 0)) {
_timeToCatchStar = 4000;
_timeAcum = 0;
if (_initialTimeout > _timeoutLimit) {
_initialTimeout = _initialTimeout - 5;
}
if (Define.randRange(0, 10) > 4) {
if (_cGestor._listStars[0]._active == true) {
_starGoal = _cGestor._listStars[0];
changeState(Define.STATE_BLACKHOLE_FOLLOWSTAR);
}
}
} else {
if (_iterator == 1) {
switch (Define.randRange(0, 3)) {
case 0 :
_yaw = 0;
break;
case 1 :
_yaw = (Math.PI/2);
break;
case 2 :
_yaw = Math.PI;
break;
case 3 :
_yaw = 4.71238898038469;
}
_stepLength = _initialStepLength / 2;
}
moveStep(_stepLength);
if (_pos.x < 0) {
_pos.x = Stage.width;
}
if (_pos.y < 0) {
_pos.y = Stage.height;
}
if (_pos.x > Stage.width) {
_pos.x = 0;
}
if (_pos.y > Stage.height) {
_pos.y = 0;
}
}
}
}
return;
case Define.STATE_BLACKHOLE_FOLLOWSTAR :
if (_iterator == 1) {
_clip.gotoAndPlay("follow");
_stepLength = _initialStepLength;
}
var distanceFromStar = setUpYawToStar();
moveStep(_stepLength);
with (_root.world.triangulooscuro) {
clear();
lineStyle(1, 9934743, 100);
var oneSideAngle = (_root.gGestor._blackHole._yaw + Define.getRadians(90));
var posEx1 = Define.movePoint(_root.gGestor._blackHole._pos, oneSideAngle, (_root.gGestor._blackHole._sizePercentage >> 2) + 1);
var posEx2 = Define.movePoint(_root.gGestor._blackHole._pos, oneSideAngle, (-(_root.gGestor._blackHole._sizePercentage >> 2)) + 1);
var refStartmp = _root.gGestor._blackHole._starGoal;
var posEx3 = (new flash.geom.Point(refStartmp._pos.x, refStartmp._pos.y));
beginFill(0);
moveTo(posEx1.x, posEx1.y);
lineTo(posEx3.x, posEx3.y);
lineTo(posEx2.x, posEx2.y);
lineTo(posEx1.x, posEx1.y);
endFill();
}
if ((distanceFromStar == -1) || (_starGoal._isCaptured == true)) {
with (_root.world.triangulooscuro) {
clear();
}
_stepLength = _initialStepLength;
changeState(Define.STATE_BLACKHOLE_QUIET);
} else if (distanceFromStar < (_stepLength + 6)) {
_starGoal._pos.x = -200;
_starGoal._pos.y = -200;
_clip.gotoAndPlay("victory");
with (_root.world.triangulooscuro) {
clear();
}
_stepLength = _initialStepLength;
changeState(Define.STATE_BLACKHOLE_QUIET);
} else {
return;
if (_iterator == 1) {
_active = true;
_clip._visible = true;
_clip.gotoAndPlay("victory");
_pos.x = Stage.width + 100;
_pos.y = Stage.height / 2;
_clip._x = _pos.x;
_clip._y = _pos.y;
with (_root.world.triangulooscuro) {
clear();
}
}
var posCenter = (new flash.geom.Point(Stage.width / 2, Stage.height / 2));
setUpYawToPoint(posCenter);
if (flash.geom.Point.distance(_pos, posCenter) > (_stepLength + 6)) {
moveStep(_stepLength);
} else {
changeState(Define.STATE_BLACKHOLE_NONE);
}
return;
if (_iterator == 1) {
_clip.gotoAndPlay("lose");
with (_root.world.triangulooscuro) {
clear();
}
}
if ((_iterator % 2) == 0) {
_sizePercentage--;
}
if (_sizePercentage < -40) {
changeState(Define.STATE_BLACKHOLE_NONE);
} else {
applyPercentageOverSize();
}
}
case Define.STATE_BLACKHOLE_VICTORY :
if (_iterator == 1) {
_active = true;
_clip._visible = true;
_clip.gotoAndPlay("victory");
_pos.x = Stage.width + 100;
_pos.y = Stage.height / 2;
_clip._x = _pos.x;
_clip._y = _pos.y;
with (_root.world.triangulooscuro) {
clear();
}
}
var posCenter = (new flash.geom.Point(Stage.width / 2, Stage.height / 2));
setUpYawToPoint(posCenter);
if (flash.geom.Point.distance(_pos, posCenter) > (_stepLength + 6)) {
moveStep(_stepLength);
} else {
changeState(Define.STATE_BLACKHOLE_NONE);
}
return;
case Define.STATE_BLACKHOLE_LOSE :
if (_iterator == 1) {
_clip.gotoAndPlay("lose");
with (_root.world.triangulooscuro) {
clear();
}
}
if ((_iterator % 2) == 0) {
_sizePercentage--;
}
if (_sizePercentage < -40) {
changeState(Define.STATE_BLACKHOLE_NONE);
} else {
applyPercentageOverSize();
}
}
}
}
Symbol 516 MovieClip [__Packages.cEnemy] Frame 0
class cEnemy extends CObject
{
var init, _active, _clip, changeState, _pos, _myName, _type, _enemyRadius, _enemyName, _enemyDamage, _yaw, _stepLength, initPosYawSpeed, _state, moveNext, _cGestor, _iterator;
function cEnemy (id, cGestor, gWorld, clip, myName, pos, yaw, life, stepLength) {
super();
init(id, cGestor, gWorld, clip, myName, -1, pos, yaw, life, -1, -1, stepLength);
_active = false;
_clip._visible = false;
changeState(Define.STATE_ENEMY_NONE);
if (Define.DEBUG_INITIALITZATION_CPERSONAJE) {
trace((("cEnemy: Continuamos inicializacion (" + _myName) + ")=") + _pos.toString());
}
}
function initialitzation(levelCurrent, pos, yaw, stepLength) {
_active = true;
_clip._visible = true;
switch (levelCurrent) {
case 0 :
_type = 0;
break;
case 1 :
_type = Define.randRange(0, 1);
break;
case 2 :
_type = Define.randRange(0, 2);
break;
case 3 :
_type = Define.randRange(0, 3);
break;
case 4 :
_type = Define.randRange(0, 4);
break;
default :
_type = Define.randRange(0, 5);
}
switch (_type) {
case 0 :
_enemyRadius = 15;
_enemyName = "meteorSmall";
_enemyDamage = 3;
break;
case 1 :
_enemyRadius = 35;
_enemyName = "meteorBig";
_enemyDamage = 6;
break;
case 2 :
_enemyRadius = 20;
_enemyName = "spaceShipAlien";
_enemyDamage = 4;
break;
case 3 :
_enemyRadius = 25;
_enemyName = "spaceShipHuman";
_enemyDamage = 5;
break;
case 4 :
_enemyRadius = 20;
_enemyName = "human";
_enemyDamage = 4;
break;
case 5 :
_enemyRadius = 25;
_enemyName = "alien";
_enemyDamage = 5;
}
_clip.gotoAndPlay(_enemyName);
_pos = pos;
_yaw = yaw;
_stepLength = stepLength;
if (Define.DEBUG_ENEMY_GENERATION) {
trace((((("cEnemy: Parameters of new star _stepLength=" + _stepLength) + ",_pos=") + _pos.toString()) + ",_yaw=") + Define.getGrados(_yaw));
}
changeState(Define.STATE_ENEMY_RUN);
}
function initialitzation2(levelCurrent, rangeSpeed) {
_active = true;
_clip._visible = true;
switch (levelCurrent) {
case 0 :
_type = 0;
break;
case 1 :
_type = Define.randRange(0, 1);
break;
case 2 :
_type = Define.randRange(0, 2);
break;
case 3 :
_type = Define.randRange(0, 3);
break;
case 4 :
_type = Define.randRange(0, 4);
break;
default :
_type = Define.randRange(0, 5);
}
switch (_type) {
case 0 :
_enemyRadius = 15;
_enemyName = "meteorSmall";
_enemyDamage = 3;
break;
case 1 :
_enemyRadius = 35;
_enemyName = "meteorBig";
_enemyDamage = 6;
break;
case 2 :
_enemyRadius = 20;
_enemyName = "spaceShipAlien";
_enemyDamage = 4;
break;
case 3 :
_enemyRadius = 25;
_enemyName = "spaceShipHuman";
_enemyDamage = 5;
break;
case 4 :
_enemyRadius = 20;
_enemyName = "human";
_enemyDamage = 4;
break;
case 5 :
_enemyRadius = 25;
_enemyName = "alien";
_enemyDamage = 5;
}
_clip.gotoAndPlay(_enemyName);
initPosYawSpeed(rangeSpeed);
if (Define.DEBUG_ENEMY_GENERATION) {
trace((((("cEnemy: Parameters of new star _stepLength=" + _stepLength) + ",_pos=") + _pos.toString()) + ",_yaw=") + Define.getGrados(_yaw));
}
changeState(Define.STATE_ENEMY_RUN);
}
function logic() {
switch (_state) {
case Define.STATE_ENEMY_RUN :
if (moveNext(true) == false) {
changeState(Define.STATE_ENEMY_DISAPPEAR);
break;
}
if (Define.DEBUG_ENEMY_GENERATION) {
trace("cEnemy: Logic:_pos=" + _pos.toString());
}
var _local3 = flash.geom.Point.distance(_cGestor._sun._pos, _pos);
if (_cGestor._sun._activeSunSuperRays > 0) {
if (_local3 < ((_enemyRadius + _cGestor._sun._raysLength) - 20)) {
if (_cGestor._state != Define.STATE_GESTOROBJECTS_VICTORY) {
_root.playGameSound(Define.SOUNDS_FX_METEOR_IMPACT, 1);
}
changeState(Define.STATE_ENEMY_CAPTURED);
break;
}
} else if (_local3 < ((_enemyRadius + _cGestor._sun._clip._xscale) - 5)) {
_cGestor._sun._impact = _enemyDamage;
if (_cGestor._state != Define.STATE_GESTOROBJECTS_VICTORY) {
_root.playGameSound(Define.SOUNDS_FX_METEOR_IMPACT, 1);
}
changeState(Define.STATE_ENEMY_CAPTURED);
} else {
break;
_iterator++;
if (_iterator == 1) {
_clip.gotoAndPlay(_enemyName + "_Explosion");
}
if (_clip._visible == false) {
changeState(Define.STATE_ENEMY_DISAPPEAR);
} else {
break;
_active = false;
_clip._visible = false;
changeState(Define.STATE_ENEMY_NONE);
break;
}
}
case Define.STATE_ENEMY_CAPTURED :
_iterator++;
if (_iterator == 1) {
_clip.gotoAndPlay(_enemyName + "_Explosion");
}
if (_clip._visible == false) {
changeState(Define.STATE_ENEMY_DISAPPEAR);
} else {
break;
_active = false;
_clip._visible = false;
changeState(Define.STATE_ENEMY_NONE);
break;
}
case Define.STATE_ENEMY_DISAPPEAR :
_active = false;
_clip._visible = false;
changeState(Define.STATE_ENEMY_NONE);
break;
case Define.STATE_ENEMY_NONE :
}
}
}
Symbol 134 MovieClip [clipLogo] Frame 45
_root.mySoundTmpLogo.attachSound("logomelody");
_root.mySoundTmpLogo.start(0, 1);
Symbol 134 MovieClip [clipLogo] Frame 280
stop();
_root.gotoAndPlay("main");
Symbol 231 MovieClip [world] Frame 1
stop();
Symbol 241 MovieClip [infoGameClip] Frame 1
instPauseClip.onPress = function () {
if (_root.gStateGame == Define.STATE_GAME_RUN) {
_root.playGameSoundStops(Define.SOUNDS_SELECCION, 1);
_root.changeGeneralGameState(Define.STATE_GAME_RUN_PAUSE);
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("pause");
}
};
stop();
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 11
stop();
Symbol 248 MovieClip Frame 21
stop();
Symbol 248 MovieClip Frame 31
stop();
Symbol 264 MovieClip Frame 44
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
Symbol 277 MovieClip Frame 3
stop();
Symbol 277 MovieClip Frame 4
stop();
Symbol 277 MovieClip Frame 5
stop();
Symbol 277 MovieClip Frame 6
stop();
Symbol 277 MovieClip Frame 7
stop();
Symbol 278 MovieClip Frame 1
instLetreroLevel.onKeyDown = function () {
this._alpha = 100;
gotoAndPlay ("Seccion2");
};
Key.addListener(instLetreroLevel);
instLetreroLevel.gotoAndStop(_root.nmCurrentLevel + 1);
instLetreroLevel.instTextLevel.text = "" + Define.getDay(_root.nmCurrentLevel);
instLetreroLevel.instTextDifficulty.text = "" + Define.getDificulty(_root.nmDifficultySetted);
instLetreroLevel._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLetreroLevel.onEnterFrame = function () {
this._x = this._x - (Stage.width / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 278 MovieClip Frame 21
delete instLetreroLevel.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 0;
instLetreroLevel.onRollOver = function () {
};
instLetreroLevel.onRollOut = function () {
};
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 278 MovieClip Frame 22
delete instLetreroLevel.onEnterFrame;
totalNumberFramesAnimationMainMenu = 20;
instLetreroLevel.onEnterFrame = function () {
this._x = this._x - (Stage.width / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha - (100 / totalNumberFramesAnimationMainMenu);
if (this._alpha < 5) {
_root.gIterator = 2;
this._visible = false;
}
};
Symbol 278 MovieClip Frame 44
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 10
stop();
Symbol 286 MovieClip Frame 20
stop();
Symbol 286 MovieClip Frame 30
stop();
Symbol 367 MovieClip Frame 1
this.instRotableCircle.gotoAndStop("rojo");
Instance of Symbol 286 MovieClip "instRotableCircle" in Symbol 367 MovieClip Frame 1
/* no clip actions */
Symbol 367 MovieClip Frame 10
this.instRotableCircle.gotoAndStop("verde");
Symbol 367 MovieClip Frame 19
this.instRotableCircle.gotoAndStop("azul");
Symbol 367 MovieClip Frame 28
this.instRotableCircle.gotoAndStop("blanco");
Symbol 396 MovieClip [blackHoleClip] Frame 12
gotoAndPlay ("presentation");
Symbol 396 MovieClip [blackHoleClip] Frame 25
gotoAndPlay ("quiet");
Symbol 396 MovieClip [blackHoleClip] Frame 37
gotoAndPlay ("follow");
Symbol 396 MovieClip [blackHoleClip] Frame 49
gotoAndPlay ("victory");
Symbol 396 MovieClip [blackHoleClip] Frame 62
gotoAndPlay ("lose");
Symbol 427 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 10
instExit1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuResultGame._alpha = 100;
_root.instClipMenuResultGame._visible = false;
_root.gGestor.freeResources();
_root.changeGeneralGameState(Define.STATE_GAME_MENU);
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("mainMenu");
};
instNext1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if (_root.nmCurrentLevel < (Define.TOTAL_NUMBER_OF_LEVELS - 1)) {
_root.nmCurrentLevel++;
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
} else {
gotoAndPlay ("finJuego");
}
};
instLabelVictoria.gotoAndStop("azul");
instExit1.gotoAndStop("azul");
instNext1.gotoAndStop("azul");
instClipStatsInformation.instTextDay.text = Define.getDay(_root.nmCurrentLevel);
instClipStatsInformation.instTextTime.text = (("" + Math.floor(_root.gTimeTotalDone / 60)) + ":") + (_root.gTimeTotalDone % 60);
instClipStatsInformation.instTextStars.text = "" + _root.gStarsCollected;
instClipStatsInformation.instTextBonus.text = "" + _root.gBonusCollected;
instLabelVictoria.instBigText.text = "Congratulations";
instExit1.instTextButton.text = "Exit";
instNext1.instTextButton.text = "Next";
instLabelVictoria._alpha = 0;
instExit1._alpha = 0;
instNext1._alpha = 0;
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);
};
Symbol 427 MovieClip Frame 30
delete instLabelVictoria.onEnterFrame;
delete instExit1.onEnterFrame;
delete instNext1.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSun.gotoAndPlay("victory");
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 427 MovieClip Frame 32
instExit2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuResultGame._alpha = 100;
_root.instClipMenuResultGame._visible = false;
_root.gGestor.freeResources();
_root.changeGeneralGameState(Define.STATE_GAME_MENU);
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("mainMenu");
};
instRetry2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
};
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);
};
Symbol 427 MovieClip Frame 52
delete instLabelDerrota1.onEnterFrame;
delete instExit2.onEnterFrame;
delete instRetry2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBlackHole.gotoAndPlay("victory");
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 427 MovieClip Frame 54
instExitToCredits.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuResultGame._alpha = 100;
_root.instClipMenuResultGame._visible = false;
_root.gGestor.freeResources();
_root.changeGeneralGameState(Define.STATE_GAME_MENU);
_root.instClipMenuGame._visible = true;
_root.instClipMenuGame.gotoAndPlay("about");
};
instLabelEndGame.gotoAndStop("rojo");
instExitToCredits.gotoAndStop("rojo");
if (Define.TOTAL_NUMBER_OF_LEVELS < 7) {
instLabelEndGame.instBigText.text = "Demo Complete";
instExitToCredits.instTextButton.text = "Exit";
} else {
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 427 MovieClip Frame 74
delete instLabelEndGame.onEnterFrame;
delete instExitToCredits.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSun.gotoAndPlay("quiet");
stateSun = 0;
instBlackHole.gotoAndPlay("quiet");
stateBlackHole = 0;
instSun.onRollOver = function () {
if (stateSun == 0) {
stateSun = 1;
this.gotoAndPlay("victory");
}
};
instSun.onRollOut = function () {
if (stateSun == 1) {
stateSun = 0;
this.gotoAndPlay("quiet");
}
};
instBlackHole.onRollOver = function () {
if (stateBlackHole == 0) {
stateBlackHole = 1;
this.gotoAndPlay("victory");
}
};
instBlackHole.onRollOut = function () {
if (stateBlackHole == 1) {
stateBlackHole = 0;
this.gotoAndPlay("quiet");
}
};
waypoints = new Array([200, 160], [200, 440], [640, 440], [640, 160]);
stepLength = 5;
instLetter1.gotoAndStop(Define.randRange(1, 25));
instLetter1.iterator = 0;
instLetter1.state = 0;
instLetter1.currentWaypoint = 0;
instLetter1._y = waypoints[instLetter1.currentWaypoint][1];
instLetter2.gotoAndStop(Define.randRange(1, 25));
instLetter2.iterator = 0;
instLetter2.state = 0;
instLetter2.currentWaypoint = 0;
instLetter2._y = waypoints[instLetter2.currentWaypoint][1];
instLetter3.gotoAndStop(Define.randRange(1, 25));
instLetter3.iterator = 0;
instLetter3.state = 0;
instLetter3.currentWaypoint = 1;
instLetter3._x = waypoints[instLetter3.currentWaypoint][0];
instLetter4.gotoAndStop(Define.randRange(1, 25));
instLetter4.iterator = 0;
instLetter4.state = 0;
instLetter4.currentWaypoint = 1;
instLetter4._x = waypoints[instLetter4.currentWaypoint][0];
instLetter5.gotoAndStop(Define.randRange(1, 25));
instLetter5.iterator = 0;
instLetter5.state = 0;
instLetter5.currentWaypoint = 2;
instLetter5._y = waypoints[instLetter5.currentWaypoint][1];
instLetter6.gotoAndStop(Define.randRange(1, 25));
instLetter6.iterator = 0;
instLetter6.state = 0;
instLetter6.currentWaypoint = 2;
instLetter6._y = waypoints[instLetter6.currentWaypoint][1];
instLetter7.gotoAndStop(Define.randRange(1, 25));
instLetter7.iterator = 0;
instLetter7.state = 0;
instLetter7.currentWaypoint = 3;
instLetter7._x = waypoints[instLetter7.currentWaypoint][0];
instLetter8.gotoAndStop(Define.randRange(1, 25));
instLetter8.iterator = 0;
instLetter8.state = 0;
instLetter8.currentWaypoint = 3;
instLetter8._x = waypoints[instLetter8.currentWaypoint][0];
followWaypoint = function (enemy) {
var _local3 = Math.abs(enemy._x - waypoints[enemy.currentWaypoint][0]) + Math.abs(enemy._y - waypoints[enemy.currentWaypoint][1]);
if (_local3 < (stepLength * 2)) {
enemy._x = waypoints[enemy.currentWaypoint][0];
enemy._y = waypoints[enemy.currentWaypoint][1];
enemy.currentWaypoint++;
enemy.iterator = 0;
if (enemy.currentWaypoint >= waypoints.length) {
enemy.currentWaypoint = 0;
}
}
enemy.iterator++;
var _local2 = new flash.geom.Point(enemy._x, enemy._y);
var _local5 = new flash.geom.Point(waypoints[enemy.currentWaypoint][0], waypoints[enemy.currentWaypoint][1]);
var _local4 = Define.getDirection(_local2, _local5);
switch (_local4) {
case Define.DIRECTION_LEFT :
enemy._x = enemy._x - stepLength;
break;
case Define.DIRECTION_RIGHT :
enemy._x = enemy._x + stepLength;
break;
case Define.DIRECTION_UP :
enemy._y = enemy._y - stepLength;
break;
case Define.DIRECTION_DOWN :
enemy._y = enemy._y + stepLength;
}
};
instLetter1.onEnterFrame = function () {
followWaypoint(this);
};
instLetter2.onEnterFrame = function () {
followWaypoint(this);
};
instLetter3.onEnterFrame = function () {
followWaypoint(this);
};
instLetter4.onEnterFrame = function () {
followWaypoint(this);
};
instLetter5.onEnterFrame = function () {
followWaypoint(this);
};
instLetter6.onEnterFrame = function () {
followWaypoint(this);
};
instLetter7.onEnterFrame = function () {
followWaypoint(this);
};
instLetter8.onEnterFrame = function () {
followWaypoint(this);
};
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;
}
}
};
stop();
Symbol 427 MovieClip Frame 80
stop();
Symbol 437 MovieClip Frame 40
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 7
stop();
Symbol 464 MovieClip Frame 18
stop();
Symbol 499 MovieClip [enemyClip] Frame 1
this.onEnterFrame = function () {
_rotation = (_rotation + 2);
};
Symbol 499 MovieClip [enemyClip] Frame 14
gotoAndPlay ("meteorSmall");
Symbol 499 MovieClip [enemyClip] Frame 15
delete this.onEnterFrame;
Symbol 499 MovieClip [enemyClip] Frame 34
_visible = false;
stop();
Symbol 499 MovieClip [enemyClip] Frame 35
this.onEnterFrame = function () {
_rotation = (_rotation + 2);
};
Symbol 499 MovieClip [enemyClip] Frame 49
gotoAndPlay ("meteorBig");
Symbol 499 MovieClip [enemyClip] Frame 50
delete this.onEnterFrame;
Symbol 499 MovieClip [enemyClip] Frame 69
_visible = false;
stop();
Symbol 499 MovieClip [enemyClip] Frame 70
this.onEnterFrame = function () {
_rotation = (_rotation + 2);
};
Symbol 499 MovieClip [enemyClip] Frame 84
gotoAndPlay ("spaceShipAlien");
Symbol 499 MovieClip [enemyClip] Frame 85
delete this.onEnterFrame;
Symbol 499 MovieClip [enemyClip] Frame 104
_visible = false;
stop();
Symbol 499 MovieClip [enemyClip] Frame 105
this.onEnterFrame = function () {
_rotation = (_rotation + 2);
};
Symbol 499 MovieClip [enemyClip] Frame 119
gotoAndPlay ("spaceShipHuman");
Symbol 499 MovieClip [enemyClip] Frame 120
delete this.onEnterFrame;
Symbol 499 MovieClip [enemyClip] Frame 140
_visible = false;
stop();
Symbol 499 MovieClip [enemyClip] Frame 141
this.onEnterFrame = function () {
_rotation = (_rotation + 2);
};
Symbol 499 MovieClip [enemyClip] Frame 155
gotoAndPlay ("alien");
Symbol 499 MovieClip [enemyClip] Frame 156
delete this.onEnterFrame;
Symbol 499 MovieClip [enemyClip] Frame 175
_visible = false;
stop();
Symbol 499 MovieClip [enemyClip] Frame 176
this.onEnterFrame = function () {
_rotation = (_rotation + 2);
};
Symbol 499 MovieClip [enemyClip] Frame 190
gotoAndPlay ("human");
Symbol 499 MovieClip [enemyClip] Frame 191
delete this.onEnterFrame;
Symbol 499 MovieClip [enemyClip] Frame 210
_visible = false;
stop();
Symbol 500 MovieClip Frame 1
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");
instButtonPlay.instTextButton.text = "PLAY";
instButtonSettings.instTextButton.text = "SETTINGS";
instButtonHelp.instTextButton.text = "HELP";
instButtonAbout.instTextButton.text = "ABOUT";
instButtonPlay._alpha = 0;
instButtonSettings._alpha = 0;
instButtonHelp._alpha = 0;
instButtonAbout._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instButtonPlay.onEnterFrame = function () {
this._y = this._y + (169.6 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonSettings.onEnterFrame = function () {
this._x = this._x - (179 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonHelp.onEnterFrame = function () {
this._x = this._x - (179 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonAbout.onEnterFrame = function () {
this._y = this._y - (194 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
_root.playGameSoundStops(Define.SOUNDS_MELODIA_MENU, 1);
Symbol 500 MovieClip Frame 22
delete instButtonPlay.onEnterFrame;
delete instButtonSettings.onEnterFrame;
delete instButtonHelp.onEnterFrame;
delete instButtonAbout.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;
};
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;
}
};
stop();
Symbol 500 MovieClip Frame 25
instButtonNewGame.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instGame.gTutorial = true;
_root.initGame(0);
};
instButtonMenuLoad.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.loadGameData();
gotoAndPlay ("menuLoad");
};
instButtonBack.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("mainMenu");
};
instButtonNewGame.gotoAndStop("azul");
instButtonMenuLoad.gotoAndStop("azul");
instButtonBack.gotoAndStop("azul");
instButtonNewGame.instTextButton.text = "NEW GAME";
instButtonMenuLoad.instTextButton.text = "LOAD GAME";
instButtonBack.instTextButton.text = "BACK";
instButtonNewGame._alpha = 0;
instButtonMenuLoad._alpha = 0;
instButtonBack._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instButtonNewGame.onEnterFrame = function () {
this._x = this._x - (201 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonMenuLoad.onEnterFrame = function () {
this._x = this._x - (201 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonBack.onEnterFrame = function () {
this._x = this._x - (201 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 500 MovieClip Frame 46
delete instButtonNewGame.onEnterFrame;
delete instButtonMenuLoad.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;
};
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;
}
};
stop();
Symbol 500 MovieClip Frame 50
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.gHasBeenPreviouslyPlayedTutorial = true;
_root.initGame(_root.nmLevelToShow);
};
instSelectLevelEntry2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
setElementsVisibility(false);
_root.gHasBeenPreviouslyPlayedTutorial = true;
_root.initGame(_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.gListLevelTimeScore[_root.nmLevelToShow])) {
instSelectLevelEntry1.gotoAndStop("stadistics");
instSelectLevelEntry1.instTextDay.text = Define.getDay(_root.nmLevelToShow);
instSelectLevelEntry1.instTextTime.text = (("" + Math.floor(_root.gListLevelTimeScore[_root.nmLevelToShow] / 60)) + ":") + Math.floor(_root.gListLevelTimeScore[_root.nmLevelToShow] % 60);
instSelectLevelEntry1.instTextStars.text = "" + _root.gListLevelStarsScore[_root.nmLevelToShow];
instSelectLevelEntry1.instTextBonus.text = "" + _root.gListLevelBonusScore[_root.nmLevelToShow];
} else {
instSelectLevelEntry1.gotoAndStop("newDay");
instSelectLevelEntry1.instTextDay.text = Define.getDay(_root.nmLevelToShow);
}
}
if ((_root.nmLevelToShow + 1) < limitOfLevelsDoneLoadLevel) {
instSelectLevelEntry2._visible = true;
if (!isNaN(_root.gListLevelTimeScore[_root.nmLevelToShow + 1])) {
instSelectLevelEntry2.gotoAndStop("stadistics");
instSelectLevelEntry2.instTextDay.text = Define.getDay(_root.nmLevelToShow + 1);
instSelectLevelEntry2.instTextTime.text = (("" + Math.floor(_root.gListLevelTimeScore[_root.nmLevelToShow + 1] / 60)) + ":") + Math.floor(_root.gListLevelTimeScore[_root.nmLevelToShow + 1] % 60);
instSelectLevelEntry2.instTextStars.text = "" + _root.gListLevelStarsScore[_root.nmLevelToShow + 1];
instSelectLevelEntry2.instTextBonus.text = "" + _root.gListLevelBonusScore[_root.nmLevelToShow + 1];
} else {
instSelectLevelEntry2.gotoAndStop("newDay");
instSelectLevelEntry2.instTextDay.text = Define.getDay(_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 500 MovieClip Frame 71
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 500 MovieClip Frame 72
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;
}
this.instLongTextButton.text = newline + Define.getDificulty(_root.nmDifficultySetted);
};
instButtonBack.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.saveGameData();
if (_root.gLastStateGame == Define.STATE_GAME_RUN) {
gotoAndPlay ("pause");
} else {
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("verde");
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 CRAZY";
}
if (_root.nmSoundEnabled == 0) {
instButtonSound.instTextButton.text = "SOUND OFF";
} else {
instButtonSound.instTextButton.text = "SOUND ON";
}
instButtonBack.instTextButton.text = "BACK";
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";
}
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._x = this._x + (300.1 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonSound.onEnterFrame = function () {
this._x = this._x - (255.8 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instButtonBack.onEnterFrame = function () {
this._y = this._y - (232 / totalNumberFramesAnimationMainMenu);
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 500 MovieClip Frame 93
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 500 MovieClip Frame 98
instBackHelp0.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if (_root.gLastStateGame == Define.STATE_GAME_RUN) {
gotoAndPlay ("pause");
} else {
gotoAndPlay ("mainMenu");
}
};
instNextHelp0.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help1");
};
instTitleHelp0.gotoAndStop("azul");
instExplanationHelp0.gotoAndStop("azul");
instBackHelp0.gotoAndStop("azul");
instNextHelp0.gotoAndStop("azul");
instTitleHelp0.instBigText.text = "HELP 1 OF 5";
instExplanationHelp0.instText.text = "You are a small SUN that must collect stars to GROW and LIGHT the SKY";
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 500 MovieClip Frame 119
delete instTitleHelp0.onEnterFrame;
delete instExplanationHelp0.onEnterFrame;
delete instBackHelp0.onEnterFrame;
delete instNextHelp0.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSun.gotoAndPlay("presentation");
instLetter1.gotoAndStop(Define.randRange(1, 25));
instLetter2.gotoAndStop(Define.randRange(1, 25));
instLetter3.gotoAndStop(Define.randRange(1, 25));
instLetter4.gotoAndStop(Define.randRange(1, 25));
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 500 MovieClip Frame 121
instBackHelp1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help");
};
instNextHelp1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help2");
};
instTitleHelp1.gotoAndStop("azul");
instExplanationHelp1.gotoAndStop("azul");
instBackHelp1.gotoAndStop("azul");
instNextHelp1.gotoAndStop("azul");
instTitleHelp1.instBigText.text = "HELP 2 OF 5";
instExplanationHelp1.instText.text = "To get the STARS you will have to PRESS the letters in the KEYBOARD\n C'MON TEST IT NOW ;)";
instBackHelp1.instTextButton.text = "BACK";
instNextHelp1.instTextButton.text = "NEXT";
instTitleHelp1._alpha = 0;
instExplanationHelp1._alpha = 0;
instBackHelp1._alpha = 0;
instNextHelp1._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instTitleHelp1.onEnterFrame = function () {
this._y = this._y + (128 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instExplanationHelp1.onEnterFrame = function () {
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instBackHelp1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation + (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instNextHelp1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 500 MovieClip Frame 142
delete instTitleHelp1.onEnterFrame;
delete instExplanationHelp1.onEnterFrame;
delete instBackHelp1.onEnterFrame;
delete instNextHelp1.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instKeyboard.onKeyDown = function () {
var _local2 = Key.getCode() - 64;
if ((_root.instClipMenuGame.instLetter1.letter == _local2) && (_root.instClipMenuGame.instLetter1._alpha == 100)) {
_root.instClipMenuGame.instLetter1._alpha = 90;
return(undefined);
}
if ((_root.instClipMenuGame.instLetter2.letter == _local2) && (_root.instClipMenuGame.instLetter2._alpha == 100)) {
_root.instClipMenuGame.instLetter2._alpha = 90;
return(undefined);
}
if ((_root.instClipMenuGame.instLetter3.letter == _local2) && (_root.instClipMenuGame.instLetter3._alpha == 100)) {
_root.instClipMenuGame.instLetter3._alpha = 90;
return(undefined);
}
if ((_root.instClipMenuGame.instLetter4.letter == _local2) && (_root.instClipMenuGame.instLetter4._alpha == 100)) {
_root.instClipMenuGame.instLetter4._alpha = 90;
return(undefined);
}
};
Key.addListener(instKeyboard);
instLetter1.letter = Define.randRange(1, 25);
instLetter1.gotoAndStop(instLetter1.letter);
instLetter2.letter = Define.randRange(1, 25);
instLetter2.gotoAndStop(instLetter2.letter);
instLetter3.letter = Define.randRange(1, 25);
instLetter3.gotoAndStop(instLetter3.letter);
instLetter4.letter = Define.randRange(1, 25);
instLetter4.gotoAndStop(instLetter4.letter);
instBackHelp1.onRollOver = function () {
activeChangeColor = 0;
this.shiftInX = 0;
};
instBackHelp1.onRollOut = function () {
activeChangeColor = -1;
};
instNextHelp1.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instNextHelp1.onRollOut = function () {
activeChangeColor = -1;
};
instLetter1.onEnterFrame = function () {
if (this._alpha < 100) {
if (this._alpha > 0) {
this._alpha--;
}
}
};
instLetter2.onEnterFrame = function () {
if (this._alpha < 100) {
if (this._alpha > 0) {
this._alpha--;
}
}
};
instLetter3.onEnterFrame = function () {
if (this._alpha < 100) {
if (this._alpha > 0) {
this._alpha--;
}
}
};
instLetter4.onEnterFrame = function () {
if (this._alpha < 100) {
if (this._alpha > 0) {
this._alpha--;
}
}
};
instBackHelp1.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;
}
};
instNextHelp1.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 500 MovieClip Frame 145
instBackHelp2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help1");
};
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 3 OF 5";
instExplanationHelp2.instText.text = "You can move the SUN with the KEYBOARD KEYS:\n BACKSPACE: Left - SPACE: Rigth\n SHIFT: Up - ENTER: Down\n ...or ARROW KEYS(by user demand) \nC'MON TEST IT NOW ;)";
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 500 MovieClip Frame 166
delete instTitleHelp2.onEnterFrame;
delete instExplanationHelp2.onEnterFrame;
delete instBackHelp2.onEnterFrame;
delete instNextHelp2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSun.gotoAndPlay("quiet");
instKeyboard.gotoAndStop("move");
stepLength = 5;
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;
};
instSun.onEnterFrame = function () {
if (Key.isDown(32) || (Key.isDown(39))) {
var _local2 = new flash.geom.Point(this._x + (stepLength * 2), this._y);
if (_local2.x > Stage.width) {
this._x = 0;
} else {
this._x = _local2.x;
this._y = _local2.y;
}
}
if (Key.isDown(8) || (Key.isDown(37))) {
var _local2 = new flash.geom.Point(this._x - (stepLength * 2), this._y);
if (_local2.x < 0) {
this._x = Stage.width;
} else {
this._x = _local2.x;
this._y = _local2.y;
}
}
if (Key.isDown(13) || (Key.isDown(40))) {
var _local2 = new flash.geom.Point(this._x, this._y + (stepLength * 2));
if (_local2.y > Stage.height) {
this._y = 0;
} else {
this._x = _local2.x;
this._y = _local2.y;
}
}
if (Key.isDown(16) || (Key.isDown(38))) {
var _local2 = new flash.geom.Point(this._x, this._y - (stepLength * 2));
if (_local2.y < 0) {
this._y = Stage.height;
} else {
this._x = _local2.x;
this._y = _local2.y;
}
}
};
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 500 MovieClip Frame 168
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 4 OF 5";
instExplanationHelp3.instText.text = "But, it won't be so easy, an evil BLACK HOLE will throw meteors and others things from other dimensions to STOP the SUN GROW";
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 500 MovieClip Frame 189
delete instTitleHelp3.onEnterFrame;
delete instExplanationHelp3.onEnterFrame;
delete instBackHelp3.onEnterFrame;
delete instNextHelp3.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instBlackHole.gotoAndPlay("presentation");
instMeteo1.gotoAndPlay("meteorSmall");
instMeteo2.gotoAndPlay("meteorBig");
instMeteo3.gotoAndPlay("meteorSmall");
instMeteo4.gotoAndPlay("meteorBig");
instMeteo5.gotoAndPlay("meteorSmall");
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;
};
contadorBatDirection = 1;
contadorBatSteps = 0;
instBat.onEnterFrame = function () {
contadorBatSteps = contadorBatSteps + 4;
if (contadorBatSteps > 150) {
contadorBatSteps = 0;
if (contadorBatDirection == 1) {
contadorBatDirection = -1;
} else {
contadorBatDirection = 1;
}
}
if (contadorBatDirection > 0) {
this._x = this._x + 4;
} else {
this._x = this._x - 4;
}
};
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 500 MovieClip Frame 193
instBackHelp4.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help3");
};
instNextHelp4.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
if (_root.gLastStateGame == Define.STATE_GAME_RUN) {
gotoAndPlay ("pause");
} else {
gotoAndPlay ("mainMenu");
}
};
instTitleHelp4.gotoAndStop("azul");
instExplanationHelp4.gotoAndStop("azul");
instBackHelp4.gotoAndStop("azul");
instNextHelp4.gotoAndStop("azul");
instTitleHelp4.instBigText.text = "HELP 5 OF 5";
instExplanationHelp4.instText.text = "Help the SUN to brings the LIGHT to the WORLD";
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 500 MovieClip Frame 214
delete instTitleHelp4.onEnterFrame;
delete instExplanationHelp4.onEnterFrame;
delete instBackHelp4.onEnterFrame;
delete instNextHelp4.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSun.gotoAndPlay("presentation");
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 500 MovieClip Frame 218
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");
instCreditDesigner.gotoAndStop("azul");
instCreditArtist.gotoAndStop("azul");
instCreditMusician.gotoAndStop("azul");
instBackAbout.gotoAndStop("azul");
instNextAbout.gotoAndStop("azul");
instTitleAbout.instBigText.text = "TEAM";
instCreditDesigner.instLongTextButton.text = "DESIGNER: FREE CREATOR";
instCreditArtist.instLongTextButton.text = "ART: XIMO FERRER";
instCreditMusician.instLongTextButton.text = "MUSIC: DANIEL MART\u00CDN";
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._x = this._x + (372 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instCreditArtist.onEnterFrame = function () {
this._x = this._x - (354.2 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
instCreditMusician.onEnterFrame = function () {
this._y = this._y - (280 / totalNumberFramesAnimationMainMenu);
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
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 500 MovieClip Frame 239
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;
};
designerActivated = 0;
musicianActivated = 0;
artistActivated = 0;
instCreditDesigner.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
designerActivated = (designerActivated + 1) % 2;
};
instCreditArtist.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
artistActivated = (artistActivated + 1) % 2;
};
instCreditMusician.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
musicianActivated = (musicianActivated + 1) % 2;
};
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;
}
};
instCreditDesigner.onEnterFrame = function () {
if (designerActivated == 1) {
this.play();
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._rotation = 0;
this.stop();
}
};
instCreditArtist.onEnterFrame = function () {
if (artistActivated == 1) {
this.play();
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._rotation = 0;
this.stop();
}
};
instCreditMusician.onEnterFrame = function () {
if (musicianActivated == 1) {
this.play();
this.instRotableCircle._rotation = this.instRotableCircle._rotation + factorEscalaContraccion;
if (this.instRotableCircle._rotation > 360) {
this.instRotableCircle._rotation = 0;
}
} else {
this.instRotableCircle._rotation = 0;
this.stop();
}
};
stop();
Symbol 500 MovieClip Frame 243
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 500 MovieClip Frame 265
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 500 MovieClip Frame 267
stop();
Symbol 500 MovieClip Frame 272
instButtonContinue.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.instClipMenuGame.gotoAndPlay("vacio");
_root.instClipMenuGame._visible = false;
_root.changeGeneralGameState(Define.STATE_GAME_RUN);
};
instButtonHelp.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("help");
};
instButtonExit.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGestor.freeResources();
_root.changeGeneralGameState(Define.STATE_GAME_MENU);
_root.instClipMenuGame._visible = true;
gotoAndPlay ("mainMenu");
};
instButtonSettings.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
gotoAndPlay ("settings");
};
instLabelPause.gotoAndStop("azul");
instButtonContinue.gotoAndStop("azul");
instButtonHelp.gotoAndStop("azul");
instButtonExit.gotoAndStop("azul");
instButtonSettings.gotoAndStop("azul");
instLabelPause.instBigText.text = "PAUSE";
instButtonContinue.instTextButton.text = "CONTINUE";
instButtonHelp.instTextButton.text = "HELP";
instButtonExit.instTextButton.text = "EXIT";
instButtonSettings.instTextButton.text = "SETTINGS";
instBackgroundPause._alpha = 0;
instLabelPause._alpha = 0;
instButtonContinue._alpha = 0;
instButtonHelp._alpha = 0;
instButtonExit._alpha = 0;
instButtonSettings._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);
};
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);
};
instButtonSettings.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (100 / totalNumberFramesAnimationMainMenu);
};
Symbol 500 MovieClip Frame 292
delete instBackgroundPause.onEnterFrame;
delete instLabelPause.onEnterFrame;
delete instButtonContinue.onEnterFrame;
delete instButtonHelp.onEnterFrame;
delete instButtonExit.onEnterFrame;
delete instButtonSettings.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;
};
instButtonSettings.onRollOver = function () {
activeChangeColor = 3;
this.shiftInX = 0;
};
instButtonSettings.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;
}
};
instButtonSettings.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 500 MovieClip Frame 293
stop();
Symbol 506 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 2
stop();
Symbol 506 MovieClip Frame 3
stop();
Symbol 506 MovieClip Frame 4
stop();
Symbol 506 MovieClip Frame 5
stop();
Symbol 509 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 10
instSkip0.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGestor.freeResources();
_root.gIsPlayingTutorial = false;
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
gotoAndPlay ("vacio");
};
instButtonNextTutorial0.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.changeGeneralGameState(Define.STATE_GAME_TUTORIAL2);
gotoAndPlay ("tutorial2");
};
instLabelInformationTutorial0.gotoAndStop("azul");
instButtonNextTutorial0.gotoAndStop("azul");
instSkip0.gotoAndStop("azul");
instLabelInformationTutorial0.instSmallText.text = "You are this small SUN which must COLLECT STARS to LIGHT the WORLD";
instButtonNextTutorial0.instTextButton.text = "NEXT";
instSkip0.instLongTextButton.text = "SKIP TUTORIAL";
instLabelInformationTutorial0._alpha = 0;
instButtonNextTutorial0._alpha = 0;
instSkip0._alpha = 0;
if (_root.gTutorialHasBeenPlayed == 0) {
instSkip0._visible = false;
}
totalNumberFramesAnimationMainMenu = 20;
instLabelInformationTutorial0.onEnterFrame = function () {
this._y = this._y + (130 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instButtonNextTutorial0.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instSkip0.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instBackgroundTutorial._alpha = 20;
Symbol 509 MovieClip Frame 31
delete instLabelInformationTutorial0.onEnterFrame;
delete instButtonNextTutorial0.onEnterFrame;
delete instSkip0.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonNextTutorial0.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonNextTutorial0.onRollOut = function () {
activeChangeColor = -1;
};
instSkip0.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instSkip0.onRollOut = function () {
activeChangeColor = -1;
};
instButtonNextTutorial0.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;
}
};
instSkip0.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 509 MovieClip Frame 35
instLabelInformationTutorial1.gotoAndStop("azul");
instLabelInformationTutorial1.instSmallText.text = "To make GROW the SUN you must COLLECT STARS typing the letters inside them. COME ON, GET SOME STARS!";
instLabelInformationTutorial1._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLabelInformationTutorial1.onEnterFrame = function () {
this._y = this._y + (130 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instSkip1.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGestor.freeResources();
_root.gIsPlayingTutorial = false;
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
gotoAndPlay ("vacio");
};
instSkip1.gotoAndStop("azul");
instSkip1.instLongTextButton.text = "SKIP TUTORIAL";
instSkip1._alpha = 0;
if (_root.gTutorialHasBeenPlayed == 0) {
instSkip1._visible = false;
}
instSkip1.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
Symbol 509 MovieClip Frame 56
delete instLabelInformationTutorial1.onEnterFrame;
delete instSkip1.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSkip1.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instSkip1.onRollOut = function () {
activeChangeColor = -1;
};
instSkip1.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 509 MovieClip Frame 60
instLabelInformationTutorial2.gotoAndStop("azul");
instLabelInformationTutorial2.instSmallText.text = "Try to move the SUN with the KEYBOARD KEYS:\n BACKSPACE: Left - SPACE: Right\n SHIFT: Up - ENTER: Down\n ...or ARROW KEYS(by user demand)";
instLabelInformationTutorial2._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLabelInformationTutorial2.onEnterFrame = function () {
this._y = this._y + (130 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instSkip2.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGestor.freeResources();
_root.gIsPlayingTutorial = false;
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
gotoAndPlay ("vacio");
};
instSkip2.gotoAndStop("azul");
instSkip2.instLongTextButton.text = "SKIP TUTORIAL";
instSkip2._alpha = 0;
if (_root.gTutorialHasBeenPlayed == 0) {
instSkip2._visible = false;
}
instSkip2.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
Symbol 509 MovieClip Frame 80
delete instLabelInformationTutorial2.onEnterFrame;
delete instSkip2.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instSkip2.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instSkip2.onRollOut = function () {
activeChangeColor = -1;
};
instSkip2.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 509 MovieClip Frame 85
instButtonNextTutorial3.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.changeGeneralGameState(Define.STATE_GAME_TUTORIAL5);
gotoAndPlay ("tutorial5");
};
instLabelInformationTutorial3.gotoAndStop("azul");
instButtonNextTutorial3.gotoAndStop("azul");
instLabelInformationTutorial3.instSmallText.text = "The evil BLACK HOLE will throw you things to STOP SUN'S GROW";
instButtonNextTutorial3.instTextButton.text = "NEXT";
instLabelInformationTutorial3._alpha = 0;
instButtonNextTutorial3._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLabelInformationTutorial3.onEnterFrame = function () {
this._y = this._y + (130 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instButtonNextTutorial3.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instSkip3.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGestor.freeResources();
_root.gIsPlayingTutorial = false;
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
gotoAndPlay ("vacio");
};
instSkip3.gotoAndStop("azul");
instSkip3.instLongTextButton.text = "SKIP TUTORIAL";
instSkip3._alpha = 0;
if (_root.gTutorialHasBeenPlayed == 0) {
instSkip3._visible = false;
}
instSkip3.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
Symbol 509 MovieClip Frame 105
delete instLabelInformationTutorial3.onEnterFrame;
delete instButtonNextTutorial3.onEnterFrame;
delete instSkip3.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonNextTutorial3.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonNextTutorial3.onRollOut = function () {
activeChangeColor = -1;
};
instSkip3.onRollOver = function () {
activeChangeColor = 2;
this.shiftInX = 0;
};
instSkip3.onRollOut = function () {
activeChangeColor = -1;
};
instButtonNextTutorial3.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;
}
};
instSkip3.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 509 MovieClip Frame 110
instButtonPlay.onRelease = function () {
_root.playGameSound(Define.SOUNDS_SELECCION, 1);
_root.gGestor.freeResources();
_root.gIsPlayingTutorial = false;
_root.changeGeneralGameState(Define.STATE_GAME_LOADING);
gotoAndPlay ("vacio");
};
instLabelInformationTutorial4.gotoAndStop("azul");
instButtonNextTutorial4.gotoAndStop("azul");
instButtonPlay.gotoAndStop("azul");
instBackgroundTutorial.gotoAndStop("azul");
instLabelInformationTutorial4.instSmallText.text = "You can get a SPECIAL BONUS if you get ALL the letters of this WORD";
instButtonPlay.instTextButton.text = "PLAY";
instLabelInformationTutorial3._alpha = 0;
instButtonPlay._alpha = 0;
totalNumberFramesAnimationMainMenu = 20;
instLabelInformationTutorial4.onEnterFrame = function () {
this._y = this._y + (130 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
instButtonPlay.onEnterFrame = function () {
this.instRotableCircle._rotation = this.instRotableCircle._rotation - (360 / totalNumberFramesAnimationMainMenu);
this._alpha = this._alpha + (60 / totalNumberFramesAnimationMainMenu);
};
Symbol 509 MovieClip Frame 131
delete instLabelInformationTutorial4.onEnterFrame;
delete instButtonPlay.onEnterFrame;
activeChangeColor = -1;
factorEscalaContraccion = 4;
instButtonPlay.onRollOver = function () {
activeChangeColor = 1;
this.shiftInX = 0;
};
instButtonPlay.onRollOut = function () {
activeChangeColor = -1;
};
instButtonPlay.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();