Frame 1
function OnGotoGame() {
trace("OnStartGame");
_tracker = new GameTrack_AS2(10000);
gotoAndPlay (3);
}
function OnGotoInstructions() {
gotoAndPlay (12);
}
function OnGotoOptions() {
gotoAndPlay (10);
}
fscommand ("allowscale", false);
this._lockroot = true;
trace("On frame 1");
var musicBarValue = 90;
var soundBarValue = 90;
var difficultLevel = 2;
var _levelNum = 1;
var _labelLevelNum = 1;
var _score = 0;
var _sumTime = 0;
var _totalDisabledBombs = 0;
var _totalBombs = 0;
var _bonusCompleted = 0;
var _totalBonusCount = 0;
var _liveCount = 3;
var _language = 2;
var _musicEnabled = true;
var _bonusTime;
var _bonusLives;
var _macWin = true;
var _winBonus;
var _blooUsed = false;
var _sndNextLevel = new Sound(_root.mciMusicCh0);
var _sndNextLevelIsPlaying = false;
_sndNextLevel.stop();
_sndNextLevel.attachSound("sndNextLevel.wav");
var _sndGameOver = new Sound(_root.mciMusicCh0);
var _sndGameOverIsPlaying = false;
_sndGameOver.stop();
_sndGameOver.attachSound("sndGameOver.wav");
var _sndEndBonus = new Sound(_root.mciMusicCh0);
var _sndEndBonusIsPlaying = false;
_sndEndBonus.stop();
_sndEndBonus.attachSound("sndEndBonus.wav");
var _sndIntro = new Sound(_root.mciMusicCh0);
var _sndIntroIsPlaying = false;
_sndIntro.stop();
_sndIntro.attachSound("sndFosterOriginal.wav");
var _sndLoopCounter = new Sound(_root.mciSoundCh0);
var _sndLoopCounterIsPlaying = false;
_sndLoopCounter.stop();
_sndLoopCounter.attachSound("loopcounter.wav");
var _sndLife = new Sound(_root.mciSoundCh0);
var _sndLifeIsPlaying = false;
_sndLife.stop();
_sndLife.attachSound("life.wav");
var _introFirstTime = true;
var _tracker;
stop();
cmdSkipIntro.onRelease = function () {
stopAllSounds();
gotoAndPlay (11);
};
Frame 2
stop();
Frame 3
gotoAndStop (4);
stop();
Frame 4
var gGame = new Game(mciGameFlowRoot);
_sndIntro.stop();
_sndIntroIsPlaying = false;
gGame.OnStartGame();
stop();
onEnterFrame = function () {
gGame.OnFrame();
};
Frame 5
if (_musicEnabled) {
_sndNextLevel.setVolume(_root.musicBarValue);
_sndNextLevel.start(0, 1000);
_sndNextLevelIsPlaying = true;
}
stop();
onEnterFrame = function () {
if (_musicEnabled && (_sndNextLevelIsPlaying == false)) {
_sndNextLevel.setVolume(_root.musicBarValue);
_sndNextLevel.start(0, 1000);
_sndNextLevelIsPlaying = true;
} else if ((_musicEnabled == false) && (_sndNextLevelIsPlaying)) {
_sndNextLevel.stop();
_sndNextLevelIsPlaying = false;
}
};
Frame 6
if (_musicEnabled) {
_sndGameOver.setVolume(_root.musicBarValue);
_sndGameOver.start(0, 1000);
_sndGameOverIsPlaying = true;
}
stop();
onEnterFrame = function () {
if (_musicEnabled && (_sndGameOverIsPlaying == false)) {
_sndGameOver.setVolume(_root.musicBarValue);
_sndGameOver.start(0, 1000);
_sndGameOverIsPlaying = true;
} else if ((_musicEnabled == false) && (_sndGameOverIsPlaying)) {
_sndGameOver.stop();
_sndGameOverIsPlaying = false;
}
};
Frame 7
_totalBonusCount++;
var mapName;
if (_levelNum == 3) {
mapName = "foster1.xmap";
} else if (_levelNum == 6) {
mapName = "foster2.xmap";
} else if (_levelNum == 9) {
mapName = "foster3.xmap";
} else if (_levelNum == 12) {
mapName = "foster4.xmap";
} else {
var rnd = Math.random();
if (rnd <= 0.25) {
mapName = "foster1.xmap";
} else if (rnd <= 0.5) {
mapName = "foster2.xmap";
} else if (rnd <= 0.75) {
mapName = "foster3.xmap";
} else {
mapName = "foster4.xmap";
}
}
var gMiniGame = new MiniGameFlow(mciMiniGame, mapName);
gMiniGame.LoadMap();
if (_root._introFirstTime == false) {
_root.gotoAndStop(8);
}
_root._introFirstTime = false;
stop();
onEnterFrame = function () {
gMiniGame.OnFrame();
gMiniGame.CheckInput();
};
Frame 8
var mapLoaded = gMiniGame.StartGame();
stop();
onEnterFrame = function () {
if (mapLoaded == false) {
mapLoaded = gMiniGame.StartGame();
}
gMiniGame.OnFrame();
gMiniGame.CheckInput();
};
Frame 9
if (_musicEnabled) {
_sndEndBonus.setVolume(_root.musicBarValue);
_sndEndBonus.start(0, 1000);
_sndEndBonusIsPlaying = true;
}
stop();
onEnterFrame = function () {
if (_musicEnabled && (_sndEndBonusIsPlaying == false)) {
_sndEndBonus.setVolume(_root.musicBarValue);
_sndEndBonus.start(0, 1000);
_sndEndBonusIsPlaying = true;
} else if ((_musicEnabled == false) && (_sndEndBonusIsPlaying)) {
_sndEndBonus.stop();
_sndEndBonusIsPlaying = false;
}
};
Frame 10
stop();
Frame 11
_levelNum = 1;
_labelLevelNum = 1;
_score = 0;
_sumTime = 0;
_totalDisabledBombs = 0;
_totalBombs = 0;
_bonusCompleted = 0;
_totalBonusCount = 0;
_liveCount = 3;
_introFirstTime = true;
_blooUsed = false;
if (_musicEnabled && (_sndIntroIsPlaying == false)) {
_sndIntro.stop();
_sndIntro.setVolume(_root.musicBarValue);
_sndIntro.start(0, 1000);
_sndIntroIsPlaying = true;
}
stop();
Frame 12
trace("On frame 12");
stop();
Symbol 39 MovieClip Frame 1
_parent._parent.blu_manos._visible = false;
_parent._parent.blu._visible = true;
Symbol 39 MovieClip Frame 13
_parent._parent.blu_manos._visible = true;
Symbol 39 MovieClip Frame 14
_parent.gotoAndStop(2);
Symbol 40 MovieClip Frame 1
_parent._parent.blu_manos._visible = true;
_parent._parent.blu._visible = true;
Symbol 43 MovieClip Frame 20
stop();
Symbol 44 MovieClip Frame 1
_parent._parent.blu_manos._visible = true;
_parent._parent.blu._visible = true;
Symbol 44 MovieClip Frame 6
_parent._parent.blu_manos._visible = false;
Symbol 45 MovieClip Frame 1
_parent._parent.blu_manos._visible = false;
_parent._parent.blu._visible = true;
Symbol 45 MovieClip Frame 40
_parent._parent.blu_manos._visible = false;
_parent._parent.blu._visible = false;
stop();
Symbol 46 MovieClip Frame 1
_parent._parent.blu_manos._visible = true;
_parent._parent.blu._visible = true;
_parent._parent.blu_manos.gotoAndPlay("corre");
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 2
stop();
Symbol 47 MovieClip Frame 3
stop();
Symbol 47 MovieClip Frame 4
stop();
Symbol 47 MovieClip Frame 5
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 1
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 2
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 3
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 4
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 5
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 6
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 7
stop();
Symbol 61 MovieClip [mcLeftEgg1] Frame 8
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 1
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 2
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 3
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 4
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 5
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 6
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 7
stop();
Symbol 77 MovieClip [mcRightEgg1] Frame 8
stop();
Symbol 90 MovieClip Frame 215
gotoAndPlay (1);
Symbol 90 MovieClip Frame 223
gotoAndPlay ("corre");
Symbol 94 MovieClip Frame 29
gotoAndStop (1);
Symbol 95 MovieClip Frame 51
gotoAndStop (1);
Symbol 110 MovieClip [mcLeftEgg2] Frame 1
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 2
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 3
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 4
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 5
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 6
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 7
stop();
Symbol 110 MovieClip [mcLeftEgg2] Frame 8
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 1
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 2
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 3
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 4
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 5
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 6
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 7
stop();
Symbol 119 MovieClip [mcRightEgg2] Frame 8
stop();
Symbol 120 MovieClip Frame 8
stop();
Symbol 120 MovieClip Frame 15
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 3
stop();
Symbol 129 MovieClip Frame 4
stop();
Symbol 129 MovieClip Frame 5
stop();
Symbol 129 MovieClip Frame 6
stop();
Symbol 129 MovieClip Frame 7
stop();
Symbol 129 MovieClip Frame 8
stop();
Symbol 130 MovieClip Frame 1
var _eggColor;
Symbol 130 MovieClip Frame 3
mciRightEgg.gotoAndStop(_eggColor);
Symbol 130 MovieClip Frame 5
mciEgg.gotoAndStop(_eggColor);
Symbol 130 MovieClip Frame 10
stop();
Symbol 141 MovieClip Frame 1
var _eggColor;
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 141 MovieClip Frame 10
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 141 MovieClip Frame 16
stop();
Symbol 143 MovieClip Frame 1
var _eggColor;
Symbol 143 MovieClip Frame 7
mciEgg.gotoAndStop(_eggColor);
Symbol 143 MovieClip Frame 13
stop();
Symbol 153 MovieClip Frame 12
stop();
stop();
Symbol 155 MovieClip Frame 37
gotoAndStop (1);
Symbol 157 MovieClip Frame 29
gotoAndStop (1);
Symbol 159 MovieClip Frame 51
trace("Termina animaci\u00F3n");
gotoAndStop (1);
Symbol 185 MovieClip Frame 8
stop();
Symbol 185 MovieClip Frame 15
stop();
Symbol 196 MovieClip Frame 1
var _eggColor;
Symbol 196 MovieClip Frame 3
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 196 MovieClip Frame 5
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 196 MovieClip Frame 10
stop();
Symbol 198 MovieClip Frame 1
var _eggColor;
mciEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 5
mciEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 8
mciEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 10
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 11
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 13
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 14
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 15
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 198 MovieClip Frame 16
stop();
Symbol 200 MovieClip Frame 1
var _eggColor;
Symbol 200 MovieClip Frame 6
mciRightEgg.gotoAndStop(_eggColor);
mciLeftEgg.gotoAndStop(_eggColor);
Symbol 200 MovieClip Frame 7
mciEgg.gotoAndStop(_eggColor);
Symbol 200 MovieClip Frame 9
mciEgg.gotoAndStop(_eggColor);
Symbol 200 MovieClip Frame 12
mciEgg.gotoAndStop(_eggColor);
Symbol 200 MovieClip Frame 13
stop();
Symbol 202 MovieClip Frame 12
stop();
Symbol 216 MovieClip Frame 56
gotoAndStop (1);
Symbol 235 MovieClip Frame 58
stop();
Symbol 236 MovieClip [mcMac] Frame 1
stop();
Symbol 363 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 2
stop();
Symbol 363 MovieClip Frame 3
stop();
Symbol 363 MovieClip Frame 4
stop();
Symbol 363 MovieClip Frame 5
stop();
Symbol 363 MovieClip Frame 6
stop();
Symbol 363 MovieClip Frame 7
stop();
Symbol 363 MovieClip Frame 8
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 1
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 2
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 3
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 4
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 5
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 6
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 7
stop();
Symbol 373 MovieClip [mcLeftEgg1] Frame 8
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 1
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 2
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 3
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 4
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 5
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 6
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 7
stop();
Symbol 381 MovieClip [mcRightEgg1] Frame 8
stop();
Symbol 407 MovieClip Frame 54
stop();
Symbol 408 MovieClip Frame 71
Symbol 428 Button
on (release) {
gotoAndStop (2);
}
Symbol 434 Button
on (release) {
gotoAndStop (1);
}
Symbol 444 MovieClip Frame 1
stop();
cmdMenu.onRelease = function () {
_root.gotoAndStop(11);
};
Symbol 444 MovieClip Frame 2
stop();
Symbol 445 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 445 MovieClip [mcBonusOver] Frame 10
mciFrame.mciScore.txtTime.text = String(_time);
mciFrame.mciScore.txtScore.text = String(_time * 50);
mciFrame.mciLives.txtLives.text = String(_lives);
Symbol 445 MovieClip [mcBonusOver] Frame 24
stop();
Symbol 466 MovieClip Frame 29
gotoAndStop (1);
Symbol 467 MovieClip Frame 33
gotoAndStop (1);
Symbol 468 MovieClip Frame 31
gotoAndStop (1);
Symbol 472 MovieClip Frame 35
gotoAndStop (1);
Symbol 474 MovieClip Frame 41
gotoAndStop (1);
Symbol 491 MovieClip Frame 44
stop();
Symbol 492 MovieClip Frame 45
stop();
Symbol 502 MovieClip Frame 31
stop();
Symbol 519 MovieClip Frame 35
stop();
Symbol 522 MovieClip Frame 35
stop();
Symbol 524 MovieClip Frame 35
stop();
Symbol 526 MovieClip Frame 35
stop();
Symbol 528 MovieClip Frame 35
stop();
Symbol 531 MovieClip Frame 35
stop();
Symbol 533 MovieClip Frame 35
stop();
Symbol 535 MovieClip Frame 35
stop();
Symbol 544 MovieClip Frame 1
stop();
Symbol 544 MovieClip Frame 2
stop();
Symbol 544 MovieClip Frame 3
stop();
Symbol 544 MovieClip Frame 4
stop();
Symbol 544 MovieClip Frame 5
stop();
Symbol 544 MovieClip Frame 6
stop();
Symbol 544 MovieClip Frame 7
stop();
Symbol 544 MovieClip Frame 8
stop();
Symbol 548 MovieClip Frame 1
var _eggColor;
Symbol 548 MovieClip Frame 2
mciEgg.gotoAndStop(_eggColor);
Symbol 548 MovieClip Frame 3
mciEgg.gotoAndStop(_eggColor);
Symbol 548 MovieClip Frame 4
mciEgg.gotoAndStop(_eggColor);
Symbol 548 MovieClip Frame 27
stop();
Symbol 584 MovieClip Frame 1
cmdNext.onRelease = function () {
trace("BonusOver:cmdNext.onRelease");
_root._levelNum++;
_root.gotoAndStop(3);
};
Symbol 585 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 585 MovieClip [mcBonusOver] Frame 10
mciFrame.mciScore.txtTime.text = String(_time);
mciFrame.mciScore.txtScore.text = String(_time * 50);
mciFrame.mciLives.txtLives.text = String(_lives);
Symbol 585 MovieClip [mcBonusOver] Frame 24
stop();
Symbol 602 MovieClip Frame 34
stop();
Symbol 612 MovieClip [mcEgg] Frame 1
stop();
Symbol 612 MovieClip [mcEgg] Frame 2
stop();
Symbol 612 MovieClip [mcEgg] Frame 3
stop();
Symbol 612 MovieClip [mcEgg] Frame 4
stop();
Symbol 612 MovieClip [mcEgg] Frame 5
stop();
Symbol 612 MovieClip [mcEgg] Frame 6
stop();
Symbol 612 MovieClip [mcEgg] Frame 7
stop();
Symbol 612 MovieClip [mcEgg] Frame 8
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 1
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 2
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 3
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 4
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 5
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 6
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 7
stop();
Symbol 620 MovieClip [mcRightEgg1] Frame 8
stop();
Symbol 636 MovieClip [mcSpider] Frame 1
stop();
Symbol 636 MovieClip [mcSpider] Frame 2
stop();
Symbol 636 MovieClip [mcSpider] Frame 3
stop();
Symbol 675 MovieClip [mcBloo] Frame 1
stop();
Symbol 675 MovieClip [mcBloo] Frame 2
stop();
Symbol 675 MovieClip [mcBloo] Frame 3
stop();
Symbol 675 MovieClip [mcBloo] Frame 4
stop();
Symbol 675 MovieClip [mcBloo] Frame 5
stop();
Symbol 689 MovieClip [mcStuff] Frame 1
stop();
Symbol 689 MovieClip [mcStuff] Frame 2
stop();
Symbol 689 MovieClip [mcStuff] Frame 3
stop();
Symbol 689 MovieClip [mcStuff] Frame 4
stop();
Symbol 689 MovieClip [mcStuff] Frame 5
stop();
Symbol 689 MovieClip [mcStuff] Frame 6
stop();
Symbol 689 MovieClip [mcStuff] Frame 7
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 1
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 2
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 3
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 4
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 5
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 6
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 7
stop();
Symbol 718 MovieClip [mcRightEgg1] Frame 8
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 1
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 2
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 3
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 4
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 5
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 6
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 7
stop();
Symbol 726 MovieClip [mcLeftEgg1] Frame 8
stop();
Symbol 752 MovieClip Frame 1
stop();
Symbol 752 MovieClip Frame 2
stop();
Symbol 752 MovieClip Frame 3
stop();
Symbol 752 MovieClip Frame 4
stop();
Symbol 752 MovieClip Frame 5
stop();
Symbol 752 MovieClip Frame 6
stop();
Symbol 752 MovieClip Frame 7
stop();
Symbol 752 MovieClip Frame 8
stop();
Symbol 766 MovieClip Frame 54
stop();
Symbol 767 MovieClip Frame 71
Symbol 780 Button
on (release) {
gotoAndStop (2);
}
Symbol 794 Button
on (release) {
_root.OnGotoGame();
}
Symbol 795 Button
on (release) {
gotoAndStop (1);
}
Symbol 796 MovieClip Frame 1
stop();
cmdMenu.onRelease = function () {
_root.gotoAndStop(11);
};
Symbol 796 MovieClip Frame 2
stop();
cmdMenu.onRelease = function () {
_root.gotoAndStop(11);
};
Symbol 797 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 797 MovieClip [mcBonusOver] Frame 10
mciFrame.mciScore.txtTime.text = String(_time);
mciFrame.mciScore.txtScore.text = String(_time * 50);
mciFrame.mciLives.txtLives.text = String(_lives);
Symbol 797 MovieClip [mcBonusOver] Frame 24
stop();
Symbol 835 MovieClip Frame 1
var _isDragging = false;
mciMusicBar._x = -90 + (_root.musicBarValue * 2);
mciSoundBar._x = -90 + (_root.soundBarValue * 2);
var _mouseListener = new Object();
_mouseListener.onMouseDown = function () {
var _local2 = 300;
var _local3 = 200;
if ((((((mciMusicBar._x + _local2) - 15) <= _root._xmouse) && (_root._xmouse <= ((mciMusicBar._x + _local2) + 15))) && ((mciMusicBar._y + _local3) <= _root._ymouse)) && (_root._ymouse <= ((mciMusicBar._y + _local3) + 30))) {
mciMusicBar.startDrag(true, -90, -48, 90, -48);
}
if ((((((mciSoundBar._x + _local2) - 15) <= _root._xmouse) && (_root._xmouse <= ((mciSoundBar._x + _local2) + 15))) && ((mciSoundBar._y + _local3) <= _root._ymouse)) && (_root._ymouse <= ((mciSoundBar._y + _local3) + 30))) {
mciSoundBar.startDrag(true, -90, 6, 90, 6);
}
_isDragging = true;
};
_mouseListener.onMouseUp = function () {
mciMusicBar.stopDrag();
mciSoundBar.stopDrag();
_root.soundBarValue = Math.floor((mciSoundBar._x + 90) / 2);
_root.musicBarValue = Math.floor((mciMusicBar._x + 90) / 2);
_isDragging = false;
};
_mouseListener.onMouseMove = function () {
if (_isDragging) {
_root.musicBarValue = Math.floor((mciMusicBar._x + 90) / 2);
_root._sndIntro.setVolume(_root.musicBarValue);
}
};
Mouse.addListener(_mouseListener);
stop();
mciEasy.onRelease = function () {
_root.difficultLevel = 1;
};
mciMedium.onRelease = function () {
_root.difficultLevel = 2;
};
mciDifficult.onRelease = function () {
_root.difficultLevel = 3;
};
cmdMenu.onRelease = function () {
Mouse.removeListener(_mouseListener);
_root.gotoAndStop(11);
};
cmdCancelar.onRelease = function () {
_root.soundBarValue = 90;
_root.musicBarValue = 90;
_root.difficultLevel = 2;
Mouse.removeListener(_mouseListener);
_root.gotoAndStop(11);
};
onEnterFrame = function () {
mciButtonFrame1._visible = _root.difficultLevel == 1;
mciButtonFrame2._visible = _root.difficultLevel == 2;
mciButtonFrame3._visible = _root.difficultLevel == 3;
};
Symbol 836 MovieClip [mcOpciones] Frame 24
stop();
Symbol 838 MovieClip [mcRightEgg1] Frame 1
stop();
Symbol 840 MovieClip [mcLeftEgg1] Frame 1
stop();
Symbol 881 MovieClip Frame 1
stop();
Symbol 881 MovieClip Frame 2
stop();
Symbol 882 MovieClip Frame 1
var keyListener = new Object();
Key.addListener(keyListener);
stop();
cmdNext.onRelease = function () {
Key.removeListener(keyListener);
_root._sndLoopCounter.stop();
_root._sndLoopCounterIsPlaying = false;
_root._levelNum++;
_root.gotoAndStop(3);
};
keyListener.onKeyDown = function () {
if (Key.getAscii() == 32) {
Key.removeListener(keyListener);
_root._sndLoopCounter.stop();
_root._sndLoopCounterIsPlaying = false;
_root._levelNum++;
_root.gotoAndStop(3);
}
};
Symbol 883 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 883 MovieClip [mcBonusOver] Frame 10
mciFrame.mciScore.txtTime.text = String(_time);
mciFrame.mciScore.txtScore.text = 0;
mciFrame.mciLives.txtLives.text = 0;
if (_root._winBonus) {
trace("Win Bonus");
mciFrame.bloo.gotoAndPlay(1);
} else {
trace("Lose Bonus");
mciFrame.bloo.gotoAndPlay(2);
}
Symbol 883 MovieClip [mcBonusOver] Frame 24
var _state = 0;
var _inc = ((_time * 50) / 30);
var _acumScore = 0;
var _finalScore = (_time * 50);
var _waitAcum = 0;
var _waitFrames = 15;
stop();
onEnterFrame = function () {
if (_state == 0) {
if (_root._musicEnabled) {
_root._sndLoopCounter.setVolume(_root.musicBarValue);
_root._sndLoopCounter.start(0, 1000);
_root._sndLoopCounterIsPlaying = true;
}
_state = 1;
} else if (_state == 1) {
if ((_acumScore + _inc) >= _finalScore) {
_acumScore = _finalScore;
_state = 2;
} else {
_acumScore = _acumScore + Math.floor(_inc);
}
mciFrame.mciScore.txtScore.text = String(_acumScore);
} else if (_state == 2) {
_root._sndLoopCounter.stop();
_root._sndLoopCounterIsPlaying = false;
_state = 3;
_waitAcum = 0;
} else if (_state == 3) {
_waitAcum++;
if (_waitAcum > _waitFrames) {
if (_root._musicEnabled) {
_root._sndLife.start();
}
mciFrame.mciLives.txtLives.text = String(_lives);
_state = 4;
}
}
};
Symbol 904 MovieClip Frame 1
var keyListener = new Object();
Key.addListener(keyListener);
stop();
cmdNext.onRelease = function () {
Key.removeListener(keyListener);
_root.gotoAndStop(8);
};
keyListener.onKeyDown = function () {
if (Key.getAscii() == 32) {
Key.removeListener(keyListener);
_root.gotoAndStop(8);
}
};
Symbol 918 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 918 MovieClip [mcBonusOver] Frame 10
mciFrame.mciScore.txtTime.text = String(_time);
mciFrame.mciScore.txtScore.text = String(_time * 50);
mciFrame.mciLives.txtLives.text = String(_lives);
Symbol 918 MovieClip [mcBonusOver] Frame 24
stop();
Symbol 939 MovieClip [mcMusicPause] Frame 1
mciPlay._visible = false;
mciMusicDisabled._visible = !_root._musicEnabled;
_pauseEnable = false;
_musicEnable = _root._musicEnabled;
cmdMute.onRelease = function () {
mciMusicDisabled._visible = _musicEnable;
_musicEnable = !_musicEnable;
_root._musicEnabled = _musicEnable;
};
cmdPause.onRelease = function () {
mciPlay._visible = !_pauseEnable;
_pauseEnable = !_pauseEnable;
};
Symbol 940 MovieClip [mcMiniGame] Frame 1
txtLevel.text = String(_root._levelNum);
txtLives.text = String(_root._liveCount);
Symbol 988 MovieClip Frame 53
if (_root._macWin) {
gotoAndPlay ("mac_festeja");
} else {
gotoAndPlay ("mac_triste");
}
Symbol 988 MovieClip Frame 107
gotoAndPlay (1);
Symbol 988 MovieClip Frame 118
stop();
Symbol 989 MovieClip Frame 1
txtScore.text = 0;
txtLevel.text = 0;
txtBonusCompleted.text = 0;
var _inc = 20;
var _state = 0;
var _waitAcum = 0;
var _waitFrames = 15;
var _acumScore = 0;
var _finalScore = _root._score;
var keyListener = new Object();
Key.addListener(keyListener);
stop();
cmdNext.onRelease = function () {
Key.removeListener(keyListener);
_root._sndLoopCounter.stop();
_root._sndLoopCounterIsPlaying = false;
_root.gotoAndStop(11);
};
keyListener.onKeyDown = function () {
if (Key.getAscii() == 32) {
Key.removeListener(keyListener);
_root._sndLoopCounter.stop();
_root._sndLoopCounterIsPlaying = false;
_root.gotoAndStop(11);
}
};
onEnterFrame = function () {
if (_state == 0) {
_waitAcum++;
if (_waitAcum > _waitFrames) {
_waitAcum = 0;
if (_root._musicEnabled) {
_root._sndLoopCounter.setVolume(_root.musicBarValue);
_root._sndLoopCounter.start(0, 1000);
_root._sndLoopCounterIsPlaying = true;
}
_state = 1;
}
} else if (_state == 1) {
if ((_acumScore + _inc) >= _finalScore) {
_root._sndLoopCounter.stop();
_root._sndLoopCounterIsPlaying = false;
_acumScore = _finalScore;
_state = 2;
} else {
_acumScore = _acumScore + _inc;
}
txtScore.text = String(_acumScore);
} else if (_state == 2) {
_waitAcum++;
if (_waitAcum > 10) {
_waitAcum = 0;
_acumScore = 0;
_finalScore = _root._labelLevelNum;
_state = 3;
}
} else if (_state == 3) {
_waitAcum++;
if (_waitAcum > 4) {
_waitAcum = 0;
_acumScore++;
if (_acumScore >= _finalScore) {
txtLevel.text = String(_finalScore);
_state = 4;
} else {
txtLevel.text = String(_acumScore);
_root._sndLife.start();
}
}
} else if (_state == 4) {
_waitAcum++;
if (_waitAcum > 10) {
_waitAcum = 0;
_acumScore = 0;
_finalScore = _root._bonusCompleted;
_state = 5;
}
} else if (_state == 5) {
_waitAcum++;
if (_waitAcum > 4) {
_waitAcum = 0;
_acumScore++;
if (_acumScore >= _finalScore) {
txtBonusCompleted.text = Math.floor(_finalScore);
_state = 6;
} else {
txtBonusCompleted.text = String(_acumScore);
_root._sndLife.start();
}
}
}
};
Symbol 990 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 990 MovieClip [mcBonusOver] Frame 10
Symbol 990 MovieClip [mcBonusOver] Frame 24
stop();
Symbol 1033 MovieClip Frame 1
var keyListener = new Object();
Key.addListener(keyListener);
stop();
cmdNext.onRelease = function () {
Key.removeListener(keyListener);
_root._levelNum++;
_root.gotoAndStop(3);
};
keyListener.onKeyDown = function () {
if (Key.getAscii() == 32) {
Key.removeListener(keyListener);
_root._levelNum++;
_root.gotoAndStop(3);
}
};
Symbol 1034 MovieClip [mcBonusOver] Frame 1
var _time = _root._bonusTime;
var _lives = _root._bonusLives;
Symbol 1034 MovieClip [mcBonusOver] Frame 2
mciLevelCompletedFrame.mciLevelCompleted.txtLevelCompleted1.text = StringRes.StrLevelCompleted(_root._labelLevelNum);
mciLevelCompletedFrame.mciLevelCompleted.txtLevelCompleted2.text = StringRes.StrLevelCompleted(_root._labelLevelNum);
Symbol 1034 MovieClip [mcBonusOver] Frame 24
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 1
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 2
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 3
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 4
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 5
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 6
stop();
Symbol 1047 MovieClip [mcStuff2] Frame 7
stop();
Symbol 1056 MovieClip Frame 1
stop();
Symbol 1056 MovieClip Frame 11
stop();
Symbol 1056 MovieClip Frame 18
gotoAndStop (1);
Symbol 1070 MovieClip [mcRightEgg1] Frame 1
stop();
Symbol 1072 MovieClip [mcLeftEgg1] Frame 1
stop();
Symbol 1080 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 1082 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 1085 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 1087 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 1090 MovieClip [Defaults] Frame 1
#initclip 67
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 1091 MovieClip [UIObjectExtensions] Frame 1
#initclip 68
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 1092 MovieClip [UIObject] Frame 1
#initclip 69
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 1095 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 1096 MovieClip [FocusRect] Frame 1
#initclip 70
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 1097 MovieClip [FocusManager] Frame 1
#initclip 71
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 1098 MovieClip [UIComponentExtensions] Frame 1
#initclip 72
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 1099 MovieClip [UIComponent] Frame 1
#initclip 73
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 1100 MovieClip [SimpleButton] Frame 1
#initclip 74
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 1101 MovieClip [Border] Frame 1
#initclip 75
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 1102 MovieClip [RectBorder] Frame 1
#initclip 76
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 1103 MovieClip [ButtonSkin] Frame 1
#initclip 77
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 1104 MovieClip [Button] Frame 1
#initclip 78
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 1100 MovieClip [SimpleButton] in Symbol 1104 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 1354 MovieClip Frame 528
_root.gotoAndStop(11);
Symbol 1465 MovieClip [__Packages.StringRes] Frame 0
class StringRes
{
static var _secretWord, _currentWord, _secretWordFound, _secretWordSilva, _secretWordWings;
function StringRes () {
}
static function get StrLevel() {
if (_root._language == 1) {
return("Nivel");
}
if (_root._language == 2) {
return("Level");
}
return("Nivel");
}
static function StrLevelCompleted(num) {
if (_root._language == 1) {
return(("NIVEL " + String(num)) + " SUPERADO");
}
if (_root._language == 2) {
return(("LEVEL " + String(num)) + " COMPLETED");
}
return(("NIVEL " + String(num)) + " SUPERADO");
}
static function SetMagicWord() {
_secretWord = new Array();
_currentWord = new Array();
_secretWordFound = false;
var _local3 = "";
if (_root._language == 1) {
_local3 = "equipo";
} else if (_root._language == 2) {
_local3 = "team";
} else {
_local3 = "time";
}
var _local2 = 0;
while (_local2 < _local3.length) {
_secretWord[_local2] = _local3.charCodeAt(_local2);
_local2++;
}
}
static function IsTheSecretWord(code) {
_currentWord.push(code);
var _local3 = 0;
var _local2 = 0;
while (_local2 < _currentWord.length) {
if (_currentWord[_local2] == _secretWord[_local3]) {
_local3++;
} else {
_local3 = 0;
}
_local2++;
}
if (_local3 == _secretWord.length) {
if (_root._blooUsed) {
trace("Ok, but bloo was already used");
return(undefined);
}
_secretWordFound = true;
_root._blooUsed = true;
_currentWord = new Array();
return(true);
}
return(false);
}
static function SecretWordFound() {
if (_secretWordFound) {
_secretWordFound = false;
return(true);
}
}
static function SetMagicWordSilva() {
_secretWordSilva = new Array();
var _local2 = "silva";
var _local1 = 0;
while (_local1 < _local2.length) {
_secretWordSilva[_local1] = _local2.charCodeAt(_local1);
_local1++;
}
}
static function IsTheSecretWordSilva(code) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < _currentWord.length) {
if (_currentWord[_local1] == _secretWordSilva[_local2]) {
_local2++;
} else {
_local2 = 0;
}
_local1++;
}
if (_local2 == _secretWordSilva.length) {
_currentWord = new Array();
return(true);
}
return(false);
}
static function SetMagicWordWings() {
_secretWordWings = new Array();
var _local2 = "wings";
var _local1 = 0;
while (_local1 < _local2.length) {
_secretWordWings[_local1] = _local2.charCodeAt(_local1);
_local1++;
}
}
static function IsTheSecretWordWings(code) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < _currentWord.length) {
if (_currentWord[_local1] == _secretWordWings[_local2]) {
_local2++;
} else {
_local2 = 0;
}
_local1++;
}
if (_local2 == _secretWordWings.length) {
trace("Wings code activated");
_currentWord = new Array();
return(true);
}
return(false);
}
}
Symbol 1466 MovieClip [__Packages.GameTrack_AS2] Frame 0
class GameTrack_AS2
{
var trkConnection;
function GameTrack_AS2 (level) {
trkConnection = new LocalConnection();
loadMovieNum ("tracker.swf", level);
}
function sendEventReplay() {
trackNewEvent("replay");
}
function sendEventWin() {
trackNewEvent("win");
}
function sendEventLose() {
trackNewEvent("lose");
}
function sendEventCustom(event) {
trackNewEvent("cust_" + event);
}
function trackNewEvent(eventName) {
trkConnection.send("trkConnection", "sendTracking", eventName);
}
}
Symbol 1467 MovieClip [__Packages.Game] Frame 0
class Game
{
var _myroot, _gameState, _gameFlow;
function Game (root) {
_myroot = root;
_gameState = NOT_STARTED;
_gameFlow = new GameFlow(root);
_gameFlow.OnRestartGameFlow();
_gameState = GAME_FLOW;
}
function OnStartGame() {
}
function OnRestartGame() {
_gameState = GAME_FLOW;
_gameFlow.OnRestartGameFlow();
trace("OnRestartGame");
}
function OnFrame() {
CheckInput();
if (_gameState == GAME_FLOW) {
_gameFlow.OnFrame(DELTA_T);
}
}
function CheckInput() {
}
function PrepareNewLevel() {
_gameFlow.PrepareNewLevel();
}
static var DELTA_T = 33;
static var NOT_STARTED = 0;
static var BILLBOARD_LOAD = 1;
static var BILLBOARD_LOADING = 2;
static var BILLBOARD_SHOW = 3;
static var GAME_PRESENTATION = 4;
static var GAME_INSTRUCTIONS = 5;
static var GAME_FLOW = 6;
}
Symbol 1468 MovieClip [__Packages.GameFlow] Frame 0
class GameFlow
{
static var instance, _myroot;
var _scoreBoard, _bg0, _bg2, _bg3, _bg4, _enterTheQuake, _haloLight, _crateList, _crateCount, _wildo, _mac, _macCollide, _coco, _eggCollection, _bombCollection, _fader, _timerOfThrowBomb, _timerOfLosingLife, _timerOfNextStageChange, _musicLoop, _sndBloo, _musicEnabled, _pause, _keyListener, _state, _keyPressed, _keyJumpPressed, _keyGetBombPressed, _keyDropEgg, _keyDownPressed, _loseOnExplode, _totalBombsToCatch, _firstTimeMeasure;
function GameFlow (root) {
instance = this;
_myroot = root;
Globals.gSoundManager = new AnaCondaFlash.SoundManager();
Globals.gMusicManager = new AnaCondaFlash.SoundManager();
_scoreBoard = new ScoreBoard(root);
_bg0 = new AnaCondaFlash.Backdrop(_myroot.mciBg0Holder, "mcBg0", 0.5, -305.2, 0);
_bg2 = new AnaCondaFlash.Backdrop(_myroot.mciBg2Holder, "mcBg2", 0.7, -427.3, 0);
_bg3 = new AnaCondaFlash.Backdrop(_myroot.mciBg3Holder, "mcBg3", 1, -710.45, -100);
_bg3._x = -100;
_bg4 = new AnaCondaFlash.Backdrop(_myroot.mciBg4Holder, "mcBg4", 1.78, -1070, 0);
_bg4._offsety = 240;
_bg4._x = 0;
_enterTheQuake = new AnaCondaFlash.EarthQuake(_myroot);
var _local4 = _bg3.GetMovieClip();
_haloLight = new HaloLight(_local4.mciHalo);
_crateList = new Array();
_crateCount = 0;
_crateList[0] = new Crate(_myroot.mciObjects, "mciCrate1", 600, 2);
_crateList[1] = new Crate(_myroot.mciObjects, "mciCrate2", 500, 3);
_crateList[2] = new Crate(_myroot.mciObjects, "mciCrate3", 600, 2);
_crateList[3] = new Crate(_myroot.mciObjects, "mciCrate4", 700, 4);
_crateList[4] = new Crate(_myroot.mciObjects, "mciCrate5", 800, 5);
_wildo = new Wildo(_myroot.mciObjects, "mcWildo");
_mac = new Mac(_myroot.mciObjects, "mcMac");
_macCollide = new MacCollide(_mac, _crateList, FLOOR_Y_POS);
_macCollide.SetCrateCount(_crateCount);
_coco = new Coco(_myroot.mciObjects, "mcCoco");
_coco.SetCrateList(_crateList);
_mac.SetMacCollide(_macCollide);
_eggCollection = new EggCollection(_myroot.mciObjects);
_coco.SetEggCollection(_eggCollection);
_mac.SetEggCollection(_eggCollection);
_bombCollection = new BombCollection(_myroot.mciObjects);
_mac.SetBombCollection(_bombCollection);
_fader = new Fader(_myroot.mciFader);
AnaCondaFlash.Viewport._x = (AnaCondaFlash.Viewport._y = 0);
AnaCondaFlash.Viewport._width = 600;
AnaCondaFlash.Viewport._height = 400;
_timerOfThrowBomb = new AnaCondaFlash.TimerVar(3000, 0);
_timerOfLosingLife = new AnaCondaFlash.TimerVar(1400, 0);
_timerOfNextStageChange = new AnaCondaFlash.TimerVar(1400, 0);
_musicLoop = Globals.gMusicManager.CreateSoundEx(_root.mciMusicCh1, "tema1 sin bat.wav");
_sndBloo = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh1, "cae blue1.wav");
if (_root._musicEnabled == undefined) {
trace("Warning: MusicEnabled undefined");
_root._musicEnabled = true;
}
_musicEnabled = _root._musicEnabled;
_myroot.mciPauseMusic._musicEnable = _root._musicEnabled;
Globals.gMusicManager.Mute(!_root._musicEnabled);
Globals.gSoundManager.Mute(!_root._musicEnabled);
Globals.gMusicManager.__set__masterVolume(_root.musicBarValue);
Globals.gSoundManager.__set__masterVolume(_root.soundBarValue);
trace("Volumen de m\u00FAsica: " + _root.musicBarValue);
trace("Volumen de sonido: " + _root.soundBarValue);
trace("Nivel de dificultad: " + _root.difficultLevel);
if (_root.difficultLevel == 1) {
BombCollection.NORMAL_DT_DIV = 3;
BombCollection.OFFSET_X_CATCH_BOMB = 40;
BombCollection.OFFSET_Y_CATCH_BOMB = 50;
BombCollection.TIME_OF_EXPLODE = 1600;
_mac.MAX_SPEED_X = 0.2;
_timeOfAnimThrowBomb = 250;
} else if (_root.difficultLevel == 2) {
BombCollection.NORMAL_DT_DIV = 2;
BombCollection.OFFSET_X_CATCH_BOMB = 30;
BombCollection.OFFSET_Y_CATCH_BOMB = 40;
BombCollection.TIME_OF_EXPLODE = 1000;
_mac.MAX_SPEED_X = 0.3;
_timeOfAnimThrowBomb = 400;
} else {
BombCollection.NORMAL_DT_DIV = 1.5;
BombCollection.OFFSET_X_CATCH_BOMB = 30;
BombCollection.OFFSET_Y_CATCH_BOMB = 40;
BombCollection.TIME_OF_EXPLODE = 800;
_mac.MAX_SPEED_X = 0.3;
_timeOfAnimThrowBomb = 400;
}
_pause = false;
StringRes.SetMagicWord();
StringRes.SetMagicWordWings();
_keyListener = new Object();
_keyListener.onKeyDown = function () {
var _local1 = Key.getAscii();
if ((_local1 < 65) || (_local1 > 122)) {
return(undefined);
}
StringRes.IsTheSecretWord(_local1);
if (StringRes.IsTheSecretWordWings(_local1)) {
GameFlow.instance._mac.TakeWingShoes(true);
}
};
Key.addListener(_keyListener);
}
function OnRestartGameFlow() {
_state = GAME_PLAYING;
_musicLoop.Stop();
_musicLoop.PlayLoop();
_keyPressed = false;
AnaCondaFlash.Viewport._x = 0;
AnaCondaFlash.Viewport._y = 0;
_keyJumpPressed = false;
_keyGetBombPressed = false;
_keyDropEgg = false;
_keyDownPressed = false;
trace("Nivel Actual: " + _root._labelLevelNum);
_loseOnExplode = true;
_totalBombsToCatch = 6;
_scoreBoard.Reset();
_scoreBoard.SetTotalBombs(_totalBombsToCatch);
_scoreBoard.SetLevelNum(_root._labelLevelNum);
_scoreBoard.__set__liveCount(_root._liveCount);
trace("Score: " + _root._score);
_scoreBoard.SetScore(_root._score);
ResetCrateList();
SetInitialPlayersPos();
_coco.Pause(false);
var _local3 = new Date();
_firstTimeMeasure = _local3.getTime();
PrepareNewLevel();
trace("-------------");
}
function OnLoseLife() {
_coco.Pause(false);
_timerOfThrowBomb.SetFor(3000);
_musicLoop.Stop();
_musicLoop.PlayLoop();
_keyPressed = false;
AnaCondaFlash.Viewport._x = 0;
AnaCondaFlash.Viewport._y = 0;
_keyJumpPressed = false;
_keyGetBombPressed = false;
_keyDropEgg = false;
SetInitialPlayersPos();
}
function OnFrame(dt) {
if (StringRes.SecretWordFound()) {
_sndBloo.Play();
_mac.BlooGetIn();
}
CheckMusicPause();
if (_pause) {
return(undefined);
}
if (_state == GAME_OVER) {
return(undefined);
}
if (_state == GAME_LOSING_LIFE) {
_timerOfLosingLife.Frame(dt);
if (_timerOfLosingLife.Get() == false) {
_fader.FadeOut(2000);
_scoreBoard.LoseALife();
if (_scoreBoard.__get__liveCount() != 0) {
OnLoseLife();
_state = GAME_PLAYING;
} else {
OnGameLost();
}
}
} else if (_state == GAME_WINNING) {
_mac.Frame(dt);
_macCollide.Check(dt);
_timerOfNextStageChange.Frame(dt);
if (_timerOfNextStageChange.Get() == false) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(GOTO_NEXT_LEVEL_FRAME);
}
return(undefined);
}
CheckInput();
_fader.Frame(dt);
AnaCondaFlash.Viewport.Frame(dt);
_bg0.Frame(dt);
_bg2.Frame(dt);
_bg3.Frame(dt);
_mac.Frame(dt);
_macCollide.Check(dt);
_coco.Frame(dt);
_wildo.Frame(dt);
_bg4.Frame(dt);
_haloLight.Frame(dt);
_enterTheQuake.Frame(dt);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].Frame(dt);
_local3++;
}
_eggCollection.Frame(dt);
_bombCollection.Frame(dt);
if (_mac._deltaX != 0) {
var _local5 = AnaCondaFlash.Viewport.ToScreenX(_mac.__get__x());
var _local6 = AnaCondaFlash.Viewport.ToScreenY(_mac.__get__y());
if ((_local5 < 200) && (AnaCondaFlash.Viewport._x > 0)) {
AnaCondaFlash.Viewport._x = AnaCondaFlash.Viewport._x + _mac._deltaX;
} else if ((_local5 > 400) && ((AnaCondaFlash.Viewport._x + AnaCondaFlash.Viewport._width) < 1200)) {
AnaCondaFlash.Viewport._x = AnaCondaFlash.Viewport._x + _mac._deltaX;
}
}
_timerOfThrowBomb.Frame(dt);
if (_timerOfThrowBomb.Get() == false) {
ThrowBombToRight();
_timerOfThrowBomb.SetFor(6000);
}
}
function CheckInput() {
if (Key.isDown(KC_MOVE_RIGHT)) {
_mac.StartMoveRight();
} else if (Key.isDown(KC_MOVE_LEFT)) {
_mac.StartMoveLeft();
} else {
_mac.StopMove();
}
if (Key.isDown(KC_MOVE_DOWN)) {
if (!_keyDownPressed) {
_mac.IncreaseFriction();
_keyDownPressed = true;
}
} else if (_keyDownPressed) {
_mac.RestoreNormalFriction();
_keyDownPressed = false;
}
if (Key.isDown(KC_JUMP)) {
if (!_keyJumpPressed) {
_mac.StartJump();
_keyJumpPressed = true;
}
} else if (_keyJumpPressed) {
_mac.StopJump();
_keyJumpPressed = false;
}
if (Key.isDown(KC_CLOSE_EGG)) {
if (!_keyGetBombPressed) {
_mac.CloseEgg();
_keyGetBombPressed = true;
}
} else if (_keyGetBombPressed) {
_keyGetBombPressed = false;
}
}
function SetInitialPlayersPos() {
_mac.__set__x(200);
_mac.__set__y(FLOOR_Y_POS);
_mac.Reset();
_wildo.Reset();
_coco.Reset();
_bombCollection.Reset();
_eggCollection.Reset();
_timerOfThrowBomb.Force(true);
}
function ThrowBombToRight() {
_wildo.ThrowBomb(Wildo.RIGHT);
_bombCollection.ThrowBombToRight(Wildo.WILDO_X_LEFT_HAND_POS, Wildo.WILDO_Y_HAND_POS, _timeOfAnimThrowBomb);
}
function ThrowBombToLeft() {
_wildo.ThrowBomb(Wildo.LEFT);
_bombCollection.ThrowBombToLeft(Wildo.WILDO_X_RIGHT_HAND_POS, Wildo.WILDO_Y_HAND_POS, _timeOfAnimThrowBomb);
}
function CheckMusicPause() {
if (_myroot.mciPauseMusic._musicEnable == undefined) {
return(undefined);
}
if (_musicEnabled != _myroot.mciPauseMusic._musicEnable) {
if (_myroot.mciPauseMusic._musicEnable) {
Globals.gMusicManager.Mute(false);
Globals.gSoundManager.Mute(false);
} else {
Globals.gMusicManager.Mute(true);
Globals.gSoundManager.Mute(true);
}
_musicEnabled = _myroot.mciPauseMusic._musicEnable;
_root._musicEnabled = _myroot.mciPauseMusic._musicEnable;
}
if (_pause != _myroot.mciPauseMusic._pauseEnable) {
if (_myroot.mciPauseMusic._pauseEnable) {
}
_pause = _myroot.mciPauseMusic._pauseEnable;
_mac.Pause(_pause);
_coco.Pause(_pause);
_wildo.Pause(_pause);
_bombCollection.Pause(_pause);
}
}
function OnBombExplote(posx) {
_enterTheQuake.Quake(1000, 5);
if (_loseOnExplode) {
if (_mac.BlooIsVisible()) {
_mac.BlooGetOut();
} else {
if (_mac._x < posx) {
_mac.LoseToLeft();
} else {
_mac.LoseToRight();
}
_timerOfLosingLife.Set();
_state = GAME_LOSING_LIFE;
}
}
}
function OnCatchBomb(onAir) {
_scoreBoard.CatchBomb(onAir);
if (_scoreBoard.GetBombsLeft() == 0) {
OnGameWin();
}
}
function OnGameLost() {
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(GAMEOVER_FRAME);
_state = GAME_OVER;
_musicLoop.Stop();
_coco.Pause(true);
trace("Game Over");
_root._score = _scoreBoard.GetScore();
_root._liveCount = _scoreBoard.liveCount;
_root._totalDisabledBombs = _root._totalDisabledBombs + _scoreBoard.GetBombDisabledCount();
_root._totalBombs = _root._totalBombs + (_scoreBoard.GetBombDisabledCount() + 1);
if (_root._totalDisabledBombs > 20) {
_root._macWin = true;
} else {
_root._macWin = false;
}
var _local3 = new Date();
_root._sumTime = _root._sumTime + ((_local3.getTime() - _firstTimeMeasure) / 1000);
}
function OnGameWin() {
_mac.Win();
_timerOfNextStageChange.Set();
_coco.Pause(true);
_state = GAME_WINNING;
_root._score = _scoreBoard.GetScore();
_root._liveCount = _scoreBoard.liveCount;
_root._totalDisabledBombs = _root._totalDisabledBombs + _scoreBoard.GetBombDisabledCount();
_root._totalBombs = _root._totalBombs + _scoreBoard.GetTotalBombCount();
var _local3 = new Date();
_root._sumTime = _root._sumTime + ((_local3.getTime() - _firstTimeMeasure) / 1000);
}
function PrepareNewLevel() {
_state = GAME_PLAYING;
_timerOfThrowBomb.SetFor(3000);
_musicLoop.Stop();
_musicLoop.PlayLoop();
_keyPressed = false;
AnaCondaFlash.Viewport._x = 0;
AnaCondaFlash.Viewport._y = 0;
_keyJumpPressed = false;
_keyGetBombPressed = false;
_keyDropEgg = false;
SetInitialPlayersPos();
if (_root._levelNum == 1) {
ResetCrateList();
_root._labelLevelNum = 1;
} else if (_root._levelNum == 2) {
ResetCrateList();
_crateCount = 1;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(600, 2);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 8;
_root._labelLevelNum = 2;
} else if (_root._levelNum == 3) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(MINIGAME_FRAME);
} else if (_root._levelNum == 4) {
ResetCrateList();
_crateCount = 2;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 2);
_crateList[1].SetPosAndHeight(900, 2);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum = 3;
} else if (_root._levelNum == 5) {
ResetCrateList();
_crateCount = 3;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 1);
_crateList[1].SetPosAndHeight(900, 2);
_crateList[2].SetPosAndHeight(600, 3);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum = 4;
} else if (_root._levelNum == 6) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(MINIGAME_FRAME);
} else if (_root._levelNum == 7) {
ResetCrateList();
_crateCount = 2;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 2);
_crateList[1].SetPosAndHeight(900, 4);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum = 5;
} else if (_root._levelNum == 8) {
ResetCrateList();
_crateCount = 3;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 1);
_crateList[1].SetPosAndHeight(600, 2);
_crateList[2].SetPosAndHeight(900, 4);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum = 6;
} else if (_root._levelNum == 9) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(MINIGAME_FRAME);
} else if (_root._levelNum == 10) {
ResetCrateList();
_crateCount = 4;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 1);
_crateList[1].SetPosAndHeight(900, 3);
_crateList[2].SetPosAndHeight(600, 3);
_crateList[3].SetPosAndHeight(450, 1);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum = 7;
} else if (_root._levelNum == 11) {
ResetCrateList();
_crateCount = 4;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 3);
_crateList[1].SetPosAndHeight(900, 1);
_crateList[2].SetPosAndHeight(600, 1);
_crateList[3].SetPosAndHeight(450, 3);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum = 8;
} else if (_root._levelNum == 12) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(MINIGAME_FRAME);
} else if ((_root._levelNum == 13) || (_root._levelNum == 14)) {
ResetCrateList();
_crateCount = 4;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 4);
_crateList[1].SetPosAndHeight(450, 3);
_crateList[2].SetPosAndHeight(600, 2);
_crateList[3].SetPosAndHeight(750, 4);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
if (_root._levelNum == 13) {
_root._labelLevelNum = 9;
} else {
_root._labelLevelNum = 10;
}
} else if (_root._levelNum == 15) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(MINIGAME_FRAME);
} else if ((_root._levelNum == 16) || (_root._levelNum == 17)) {
ResetCrateList();
_crateCount = 4;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 4);
_crateList[1].SetPosAndHeight(450, 3);
_crateList[2].SetPosAndHeight(600, 3);
_crateList[3].SetPosAndHeight(750, 4);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
if (_root._levelNum == 16) {
_root._labelLevelNum = 11;
} else {
_root._labelLevelNum = 12;
}
} else if (_root._levelNum == 18) {
_musicLoop.Stop();
Key.removeListener(_keyListener);
Globals.gSoundManager.StopAll();
_root.gotoAndStop(MINIGAME_FRAME);
} else {
ResetCrateList();
_crateCount = 5;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
_crateList[0].SetPosAndHeight(300, 2);
_crateList[1].SetPosAndHeight(450, 3);
_crateList[2].SetPosAndHeight(600, 4);
_crateList[3].SetPosAndHeight(750, 3);
_crateList[4].SetPosAndHeight(900, 2);
var _local3 = 0;
while (_local3 < _crateCount) {
_crateList[_local3].SetVisible(true);
_local3++;
}
_totalBombsToCatch = 10;
_root._labelLevelNum++;
}
_scoreBoard.SetLevelNum(_root._labelLevelNum);
_scoreBoard.SetTotalBombs(_totalBombsToCatch);
}
function ResetCrateList() {
var _local2 = 0;
while (_local2 < _crateCount) {
_crateList[_local2].SetVisible(false);
_local2++;
}
_crateCount = 0;
_macCollide.SetCrateCount(_crateCount);
_coco.SetCrateCount(_crateCount);
}
static var GOTO_NEXT_LEVEL_FRAME = 5;
static var GAMEOVER_FRAME = 6;
static var MINIGAME_FRAME = 7;
static var FLOOR_Y_POS = 380;
static var KC_MOVE_LEFT = 37;
static var KC_MOVE_RIGHT = 39;
static var KC_JUMP = 38;
static var KC_CLOSE_EGG = 32;
static var KC_MOVE_DOWN = 40;
static var GAME_PLAYING = 0;
static var GAME_LOSING_LIFE = 1;
static var GAME_WINNING = 2;
static var GAME_OVER = 3;
var _timeOfAnimThrowBomb = 400;
}
Symbol 1469 MovieClip [__Packages.AnaCondaFlash.Backdrop] Frame 0
class AnaCondaFlash.Backdrop
{
var _refMovieClip;
function Backdrop (mcTargetClip, mcName, distance, minPos, maxPos) {
_refMovieClip = mcTargetClip.attachMovie(mcName, mcName + "i", mcTargetClip.getNextHighestDepth());
_distance = distance;
_minPos = minPos;
_maxPos = maxPos;
}
function Frame(dt) {
super.Frame(dt);
var _local3 = (AnaCondaFlash.Viewport.ToScreenX(_x) + _offsetx) * _distance;
if ((_minPos <= _local3) && (_local3 <= _maxPos)) {
_refMovieClip._x = _local3;
}
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(_y) + _offsety;
}
function GetMovieClip() {
return(_refMovieClip);
}
function PrintPos(bkg) {
trace((("Backdrop " + bkg) + " x: ") + _refMovieClip._x);
}
var _offsetx = 0;
var _offsety = 0;
var _x = 0;
var _y = 0;
var _distance = 1;
var _minPos = 0;
var _maxPos = 0;
}
Symbol 1470 MovieClip [__Packages.AnaCondaFlash.Viewport] Frame 0
class AnaCondaFlash.Viewport
{
static var _x, _y, _isMoving, _movDir, _speed, _len, _lenAccum, _width, _height;
function Viewport () {
}
static function ToScreenX(x) {
return(x - _x);
}
static function ToScreenY(y) {
return(y - _y);
}
static function ToWorldX(x) {
return(x + _x);
}
static function ToWorldY(y) {
return(y + _y);
}
static function Frame(dt) {
var _local2;
var _local1;
if (_isMoving) {
_local2 = (_speed * Math.cos(_movDir)) * dt;
_local1 = (_speed * Math.sin(_movDir)) * dt;
_x = _x + _local2;
_y = _y + _local1;
if (_len != 0) {
_lenAccum = _lenAccum + ((_local2 * _local2) + (_local1 * _local1));
if (_lenAccum >= (_len * _len)) {
_isMoving = false;
_len = (_lenAccum = 0);
trace("viewport stop");
}
}
}
}
static function StartMoveTo(dir, spd, len) {
_isMoving = true;
_movDir = -dir;
_speed = spd;
_len = len;
_lenAccum = 0;
}
static function StopMove() {
_isMoving = false;
}
static function CheckIn(x, y, w, h) {
if (((_x <= x) && (x <= (_x + _width))) || ((_x <= (x + w)) && ((x + w) <= (_x + _width)))) {
if (((_y <= y) && (y <= (_y + _height))) || ((_y <= (y + h)) && ((y + h) <= (_y + _height)))) {
return(true);
}
}
return(false);
}
}
Symbol 1471 MovieClip [__Packages.AnaCondaFlash.Sprite] Frame 0
class AnaCondaFlash.Sprite
{
var _refTargetClip, _refMovieClip, _isMoving, _vx, _vy, _ax, _ay, _maxSpeedX, _maxSpeedY, _friction, _gy;
function Sprite (mcTarget) {
_refTargetClip = mcTarget;
_refMovieClip = null;
_isMoving = false;
_vx = (_vy = 0);
_ax = (_ay = 0);
_maxSpeedX = MAX_SPEED_X;
_maxSpeedY = MAX_SPEED_Y;
_friction = FRICTION_COEF;
_gy = GRAVITY;
}
function Frame(dt) {
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(_x) + _offsetx;
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(_y) + _offsety;
}
function SetPosX(pos) {
_x = (_xprev = pos);
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(pos);
}
function SetPosY(pos) {
_y = (_yprev = pos);
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(pos);
}
function SetPos(posx, posy) {
_x = (_xprev = posx);
_y = (_yprev = posy);
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(posx);
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(posy);
}
function GetWidth() {
if (_refMovieClip != null) {
return(_refMovieClip._width);
}
}
function GetHeight() {
if (_refMovieClip != null) {
return(_refMovieClip._height);
}
}
function RestorePrevPosition() {
_x = _xprev;
_y = _yprev;
}
function RestorePrevXPosition() {
_x = _xprev;
}
function RestorePrevYPosition() {
_y = _yprev;
}
function StorePrevPosition() {
_xprev = _x;
_yprev = _y;
}
function StorePrevXPosition() {
_xprev = _x;
}
function StorePrevYPosition() {
_yprev = _y;
}
function get visible() {
return(_refMovieClip._visible);
}
function set visible(val) {
_refMovieClip._visible = val;
//return(visible);
}
function StopMove() {
_isMoving = false;
_ax = 0;
}
function set x(val) {
_x = (_xprev = val);
//return(x);
}
function set y(val) {
_y = (_yprev = val);
//return(y);
}
function get x() {
return(_x);
}
function get y() {
return(_y);
}
var MAX_SPEED_X = 0.3;
var MAX_SPEED_Y = 0.2;
var FRICTION_COEF = 0.006;
var GRAVITY = -0.001;
var _offsetx = 0;
var _offsety = 0;
var _x = 0;
var _y = 0;
var _xprev = 0;
var _yprev = 0;
var _dirAng = 0;
var _spd = 0.2;
}
Symbol 1472 MovieClip [__Packages.Mac] Frame 0
class Mac extends AnaCondaFlash.Sprite
{
var _refMovieClip, _x, _y, _offsetx, _offsety, _timerOfAccel, _timerOfDuration, _timerOfTakingEgg, _timerOfClosingEgg, _timerOfDropingEgg, _timerOfExplotingEgg, _timerOfBlooIsGettingOut, _lookingLeft, _timerOfIdle, _soundOpenEgg1, _soundOpenEgg2, _soundCloseEgg1, _soundCloseEgg2, _hasWings, _macCollide, _hasSkate, _currentState, _currentEggColor, _hasEgg, _currentAnim, _vx, _gy, _vxi, _vyi, _vy, _ax, _maxSpeedX, _maxSpeedY, _ay, _friction, _eggCollection, _eggNumTaked, _win, _waitingFloor, _deltaX, _currentPowerUp, _blooVisible, _isMoving, _checkTouchingFloor, _jumpAccel, GetWidth, GRAVITY, MAX_SPEED_X, MAX_SPEED_Y, FRICTION_COEF, _bombCollection;
function Mac (mcTargetClip, mcName) {
super(mcTargetClip);
_refMovieClip = mcTargetClip.attachMovie(mcName, mcName + "i", mcTargetClip.getNextHighestDepth());
_refMovieClip.mac.stop();
_x = 0;
_y = 0;
_offsetx = 0;
_offsety = 0;
_timerOfAccel = new AnaCondaFlash.TimerVar(200, 0);
_timerOfDuration = new AnaCondaFlash.TimerVar(4000, 0);
_timerOfTakingEgg = new AnaCondaFlash.TimerVar(300, 0);
_timerOfClosingEgg = new AnaCondaFlash.TimerVar(200, 0);
_timerOfDropingEgg = new AnaCondaFlash.TimerVar(300, 0);
_timerOfExplotingEgg = new AnaCondaFlash.TimerVar(300, 0);
_timerOfBlooIsGettingOut = new AnaCondaFlash.TimerVar(1400, 0);
_lookingLeft = false;
_timerOfIdle = new AnaCondaFlash.TimerVar(3000, 0);
_timerOfIdle.Set();
_soundOpenEgg1 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "abre huevo1.wav");
_soundOpenEgg2 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "abre huevo2.wav");
_soundCloseEgg1 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "cierra huevo1.wav");
_soundCloseEgg2 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "cierra huevo 2.wav");
_hasWings = false;
Reset();
}
function SetMacCollide(collider) {
_macCollide = collider;
}
function PlayAnim(id) {
var _local2 = 0;
if ((((id != ANM_WIN) && (id != ANM_LOSE_RIGHT)) && (id != ANM_LOSE_LEFT)) && (_hasSkate)) {
_local2 = SKATE_ANIM_OFFSET;
}
if (id == ANM_STOP) {
BlooIdle();
if (_lookingLeft) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1 + _local2);
} else {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1 + _local2);
}
} else if (id == ANM_IDLE_1) {
BlooIdle();
if (_lookingLeft) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1 + _local2);
} else {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1 + _local2);
}
} else if (id == ANM_IDLE_2) {
BlooIdle();
if (_lookingLeft) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_2 + _local2);
} else {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_2 + _local2);
}
} else if (id == ANM_IDLE_3) {
BlooIdle();
if (_lookingLeft) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_3 + _local2);
} else {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_IDLE_3 + _local2);
}
} else if (id == ANM_CLOSE_EGG) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1 + _local2);
if (_currentState != STA_JUMP) {
_refMovieClip.gotoAndStop(ANMFRM_CLOSE_EGG + _local2);
} else {
_refMovieClip.gotoAndStop(ANMFRM_JUMP_RIGHT_AND_CLOSE + _local2);
}
_refMovieClip.mac.mciRightEgg.gotoAndStop(_currentEggColor);
_refMovieClip.mac.mciLeftEgg.gotoAndStop(_currentEggColor);
_refMovieClip.mac.mciEgg.gotoAndStop(_currentEggColor);
_refMovieClip.mac._eggColor = _currentEggColor;
}
_refMovieClip.mac.mciLeftEgg._visible = _hasEgg;
_refMovieClip.mac.mciRightEgg._visible = _hasEgg;
_refMovieClip.mac.mciLeftWing._visible = _hasWings;
_refMovieClip.mac.mciRightWing._visible = _hasWings;
if (id == _currentAnim) {
return(undefined);
}
if (id == ANM_RUN_RIGHT) {
BlooRun();
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_RUN_RIGHT + _local2);
_refMovieClip.mac.mciLeftEgg._visible = _hasEgg;
_refMovieClip.mac.mciRightEgg._visible = _hasEgg;
_refMovieClip.mac.mciLeftWing._visible = _hasWings;
_refMovieClip.mac.mciRightWing._visible = _hasWings;
} else if (id == ANM_RUN_LEFT) {
BlooRun();
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_RUN_RIGHT + _local2);
_refMovieClip.mac.mciLeftEgg._visible = _hasEgg;
_refMovieClip.mac.mciRightEgg._visible = _hasEgg;
_refMovieClip.mac.mciLeftWing._visible = _hasWings;
_refMovieClip.mac.mciRightWing._visible = _hasWings;
} else if (id == ANM_JUMP) {
BlooScares();
if (_lookingLeft) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_JUMP_RIGHT + _local2);
} else {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_JUMP_RIGHT + _local2);
}
_refMovieClip.mac.mciLeftEgg._visible = _hasEgg;
_refMovieClip.mac.mciRightEgg._visible = _hasEgg;
_refMovieClip.mac.mciLeftWing._visible = _hasWings;
_refMovieClip.mac.mciRightWing._visible = _hasWings;
} else if (id == ANM_TAKE_EGG) {
_refMovieClip.gotoAndStop(ANMFRM_TAKE_EGG + _local2);
} else if (id == ANM_DROP_EGG) {
_vx = _vx * 0.1;
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG + _local2);
} else if (id == ANM_WIN) {
_refMovieClip.gotoAndStop(ANMFRM_WIN);
} else if (id == ANM_LOSE_RIGHT) {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_LOSE);
} else if (id == ANM_LOSE_LEFT) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_LOSE);
}
_refMovieClip.mac.mciLeftWing._visible = _hasWings;
_refMovieClip.mac.mciRightWing._visible = _hasWings;
_refMovieClip.mac.mciRightEgg.gotoAndStop(_currentEggColor);
_refMovieClip.mac.mciLeftEgg.gotoAndStop(_currentEggColor);
_refMovieClip.mac.mciEgg.gotoAndStop(_currentEggColor);
_refMovieClip.mac._eggColor = _currentEggColor;
_currentAnim = id;
}
function Turn(side) {
if (((side == LEFT) && (_refMovieClip._xscale > 0)) || ((side == RIGHT) && (_refMovieClip._xscale < 0))) {
_refMovieClip._xscale = -_refMovieClip._xscale;
_lookingLeft = !_lookingLeft;
}
}
function StopAnim() {
_refMovieClip.mac.gotoAndStop(1);
}
function UpdatePosition(dt) {
var _local3 = _gy;
_vxi = _vx;
_vyi = _vy;
var _local4 = _vxi + (_ax * dt);
if (((-_maxSpeedX) <= _local4) && (_local4 <= _maxSpeedX)) {
_vx = _vxi + (_ax * dt);
} else if (_local4 < 0) {
_vx = -_maxSpeedX;
} else {
_vx = _maxSpeedX;
}
if ((_vyi + ((_ay + _local3) * dt)) < _maxSpeedY) {
_vy = _vyi + ((_ay + _local3) * dt);
} else {
_vy = _maxSpeedY;
}
if (_vx > 0) {
_vx = _vx - ((Math.abs(_vx) * _friction) * dt);
if (_vx < 0) {
_vx = 0;
}
} else {
_vx = _vx + ((Math.abs(_vx) * _friction) * dt);
if (_vx > 0) {
_vx = 0;
}
}
var _local5 = (_x + (_vxi * dt)) + (((_ax * dt) * dt) / 2);
_x = _local5;
_y = _y - ((_vyi * dt) + ((((_ay + _local3) * dt) * dt) / 2));
if ((-0.001 < _vx) && (_vx < 0.001)) {
_vx = 0;
}
if ((-0.001 < _vy) && (_vy < 0.001)) {
_vy = 0;
}
}
function Frame(dt) {
if (_currentState == STA_IDLE) {
_timerOfIdle.Frame(dt);
if (_timerOfIdle.GetAndSet() == false) {
if (Math.random() > 0.5) {
PlayAnim(ANM_IDLE_2);
} else {
PlayAnim(ANM_IDLE_3);
}
}
} else if (_currentState == STA_TAKING_EGG) {
_timerOfTakingEgg.Frame(dt);
if (_timerOfTakingEgg.GetAndSet() == false) {
SetState(STA_IDLE);
}
} else if (_currentState == STA_CLOSING_EGG) {
_timerOfClosingEgg.Frame(dt);
if (_timerOfClosingEgg.GetAndSet() == false) {
CatchBomb();
}
} else if (_currentState == STA_DROPING_EGG) {
_timerOfDropingEgg.Frame(dt);
if (_timerOfDropingEgg.Get() == false) {
_refMovieClip.mac.mciEgg._visible = false;
_eggCollection.ExploteEgg(_eggNumTaked, _x, _y);
_eggNumTaked = -1;
_hasEgg = false;
_timerOfExplotingEgg.Set();
SetState(STA_EXPLOTING_EGG);
}
} else if (_currentState == STA_EXPLOTING_EGG) {
_timerOfExplotingEgg.Frame(dt);
if (_timerOfExplotingEgg.Get() == false) {
if (_win) {
SetState(STA_WIN);
PlayAnim(ANM_WIN);
} else {
SetState(STA_IDLE);
}
}
} else if (_currentState == STA_BLOO_IS_GOING_OUT) {
_timerOfBlooIsGettingOut.Frame(dt);
if (_timerOfBlooIsGettingOut.Get() == false) {
trace("Retorno a IDLE");
SetState(STA_IDLE);
}
}
if (_macCollide._isCollidingY && (_waitingFloor)) {
DropEgg();
_waitingFloor = false;
}
var _local6 = _x;
UpdatePosition(dt);
_deltaX = _x - _local6;
_timerOfAccel.Frame(dt);
_timerOfDuration.Frame(dt);
if (_hasEgg == false) {
var _local5 = _eggCollection.CanTakeEggAt(_x, _y);
if (_local5 != -1) {
TakeEgg(_local5);
}
}
var _local4 = _eggCollection.CanTakePowAt(_x, _y);
if (_local4 != -1) {
TakePow(_local4);
}
if (_timerOfAccel.Get() == false) {
_ay = 0;
_ax = 0;
}
if ((_currentPowerUp != NONE) && (_timerOfDuration.Get() == false)) {
SetPowerUp(NONE);
}
super.Frame(dt);
}
function SetState(sta) {
if (sta == STA_IDLE) {
_timerOfIdle.Force(true);
}
_currentState = sta;
}
function GetState() {
return(_currentState);
}
function Reset() {
_hasEgg = false;
_eggNumTaked = -1;
SetPowerUp(NONE);
_vx = (_vy = 0);
_ax = (_ay = 0);
_deltaX = 0;
StopMove();
PlayAnim(ANM_STOP);
_currentState = STA_IDLE;
_waitingFloor = false;
_blooVisible = false;
_refMovieClip.silva_mc._visible = false;
_refMovieClip.blu.gotoAndStop(1);
_refMovieClip.blu_manos.gotoAndStop(1);
_refMovieClip.blu.blu.gotoAndStop(1);
_win = false;
}
function StartMoveLeft() {
if ((((((_currentState == STA_TAKING_EGG) || (_currentState == STA_DROPING_EGG)) || (_currentState == STA_EXPLOTING_EGG)) || (_currentState == STA_WIN)) || (_currentState == STA_LOSE)) || (_currentState == STA_BLOO_IS_GOING_OUT)) {
return(undefined);
}
_isMoving = true;
_ax = -0.005;
if (_currentState == STA_CLOSING_EGG) {
return(undefined);
}
if ((_currentState != STA_JUMP) && (_currentState != STA_START_JUMP)) {
PlayAnim(ANM_RUN_LEFT);
SetState(STA_RUN_LEFT);
} else {
Turn(LEFT);
}
}
function StartMoveRight() {
if ((((((_currentState == STA_TAKING_EGG) || (_currentState == STA_DROPING_EGG)) || (_currentState == STA_EXPLOTING_EGG)) || (_currentState == STA_WIN)) || (_currentState == STA_LOSE)) || (_currentState == STA_BLOO_IS_GOING_OUT)) {
return(undefined);
}
_isMoving = true;
_ax = 0.005;
if (_currentState == STA_CLOSING_EGG) {
return(undefined);
}
if ((_currentState != STA_JUMP) && (_currentState != STA_START_JUMP)) {
PlayAnim(ANM_RUN_RIGHT);
SetState(STA_RUN_RIGHT);
} else {
Turn(RIGHT);
}
}
function StartJump() {
if (((_currentState == STA_WIN) || (_currentState == STA_LOSE)) || (_currentState == STA_DROPING_EGG)) {
return(undefined);
}
_timerOfAccel.Set();
if (_macCollide._isCollidingY || (!_checkTouchingFloor)) {
_ay = _jumpAccel;
if (_currentState == STA_RUN_RIGHT) {
_ax = _jumpAccel / 2;
} else if (_currentState == STA_RUN_LEFT) {
_ax = (-_jumpAccel) / 2;
}
PlayAnim(ANM_JUMP);
SetState(STA_START_JUMP);
}
}
function StopJump() {
}
function StopMove() {
super.StopMove();
if ((((((_currentState == STA_TAKING_EGG) || (_currentState == STA_CLOSING_EGG)) || (_currentState == STA_DROPING_EGG)) || (_currentState == STA_EXPLOTING_EGG)) || (_currentState == STA_WIN)) || (_currentState == STA_LOSE)) {
return(undefined);
}
if ((_currentState != STA_IDLE) && (_currentState != STA_JUMP)) {
PlayAnim(ANM_STOP);
SetState(STA_IDLE);
}
}
function GetLeftPos() {
return(_x - ((GetWidth() * 0.4) / 2));
}
function GetRightPos() {
return(_x + ((GetWidth() * 0.4) / 2));
}
function SetPowerUp(pu) {
_timerOfDuration.Force(true);
_currentPowerUp = pu;
_checkTouchingFloor = true;
_gy = GRAVITY;
_jumpAccel = JUMP_ACCEL;
_maxSpeedX = MAX_SPEED_X;
_maxSpeedY = MAX_SPEED_Y;
_friction = FRICTION_COEF;
_hasSkate = false;
if (_currentPowerUp == LOW_GRAVITY) {
_gy = GRAVITY / 2;
_jumpAccel = JUMP_ACCEL * 1.2;
_maxSpeedY = MAX_SPEED_Y * 1.2;
} else if (_currentPowerUp == WING_SHOES) {
_jumpAccel = JUMP_ACCEL / 8;
_checkTouchingFloor = false;
} else if (_currentPowerUp == SKATE_OR_DIE) {
_maxSpeedY = MAX_SPEED_Y * 1.3;
_maxSpeedX = MAX_SPEED_X * 1.1;
_friction = 0.002;
_hasSkate = true;
PlayAnim(ANM_IDLE_1);
_timerOfDuration.SetFor(10000);
} else if (_currentPowerUp == LOW_SPEED) {
_maxSpeedX = MAX_SPEED_X / 3;
} else if (_currentPowerUp == SLOW_MOTION) {
_bombCollection.SlowMotion(5000);
} else if (_currentPowerUp == BONUS_1) {
trace("Bonus 1");
ScoreBoard.instance.AddToScore(20);
} else if (_currentPowerUp == BONUS_2) {
trace("Bonus 2");
ScoreBoard.instance.AddToScore(50);
} else {
ScoreBoard.instance.SetPowerUp(-1);
}
}
function IsJumping() {
return(_currentState == STA_JUMP);
}
function OnJumpStop() {
SetState(STA_IDLE);
PlayAnim(ANM_STOP);
}
function TakeEgg(eggTaked) {
if ((_currentState == STA_BLOO_IS_GOING_OUT) || (_currentState == STA_WIN)) {
return(undefined);
}
_hasEgg = true;
_eggNumTaked = eggTaked;
_eggCollection.TakeEgg(eggTaked);
_currentEggColor = _eggCollection.GetEggColor(eggTaked);
PlayAnim(ANM_TAKE_EGG);
_refMovieClip.mac.mciLeftEgg._visible = _hasEgg;
_refMovieClip.mac.mciRightEgg._visible = _hasEgg;
SetState(STA_TAKING_EGG);
PlayOpenEggSound();
}
function TakePow(powTaked) {
if (_currentState == STA_BLOO_IS_GOING_OUT) {
return(undefined);
}
_eggCollection.TakePow(powTaked);
var _local2 = _eggCollection.GetPowCode(powTaked);
SetPowerUp(_local2);
if ((_local2 != BONUS_1) && (_local2 != BONUS_2)) {
ScoreBoard.instance.SetPowerUp(_local2);
}
}
function CloseEgg() {
if (_currentState == STA_BLOO_IS_GOING_OUT) {
return(undefined);
}
if (!_hasEgg) {
return(undefined);
}
if ((((_currentState == STA_CLOSING_EGG) || (_currentState == STA_DROPING_EGG)) || (_currentState == STA_WIN)) || (_currentState == STA_LOSE)) {
return(undefined);
}
PlayAnim(ANM_CLOSE_EGG);
SetState(STA_CLOSING_EGG);
PlayCloseEggSound();
}
function CatchBomb() {
if (_currentState == STA_BLOO_IS_GOING_OUT) {
return(undefined);
}
var _local2 = _bombCollection.CanCatchBombAt(_x, _y - 32);
if (_local2 != -1) {
_bombCollection.CatchBomb(_local2, _y < MAC_Y_POS);
if (_y < MAC_Y_POS) {
_waitingFloor = true;
} else {
DropEgg();
}
} else {
SetState(STA_IDLE);
}
}
function DropEgg() {
if (_currentState == STA_BLOO_IS_GOING_OUT) {
return(undefined);
}
if (!_hasEgg) {
return(undefined);
}
_timerOfDropingEgg.Set();
SetState(STA_DROPING_EGG);
PlayAnim(ANM_DROP_EGG);
_refMovieClip.mac.mciLeftEgg._visible = _hasEgg;
_refMovieClip.mac.mciRightEgg._visible = _hasEgg;
}
function TakeSkate(val) {
_hasSkate = val;
}
function TakeWingShoes(val) {
_hasWings = val;
_checkTouchingFloor = !val;
_refMovieClip.mac.mciLeftWing._visible = _hasWings;
_refMovieClip.mac.mciRightWing._visible = _hasWings;
}
function SetEggCollection(ref) {
_eggCollection = ref;
}
function SetBombCollection(ref) {
_bombCollection = ref;
}
function PlayOpenEggSound() {
if (Math.random() <= 0.5) {
_soundOpenEgg1.Play();
} else {
_soundOpenEgg2.Play();
}
}
function PlayCloseEggSound() {
if (Math.random() <= 0.5) {
_soundCloseEgg1.Play();
} else {
_soundCloseEgg2.Play();
}
}
function Win() {
_win = true;
}
function Lose() {
SetState(STA_LOSE);
PlayAnim(ANM_LOSE_RIGHT);
}
function LoseToLeft() {
SetState(STA_LOSE);
PlayAnim(ANM_LOSE_LEFT);
}
function LoseToRight() {
SetState(STA_LOSE);
PlayAnim(ANM_LOSE_RIGHT);
}
function Pause(val) {
if (val) {
_refMovieClip.mac.stop();
} else {
_refMovieClip.mac.play();
}
}
function IncreaseFriction() {
if (_currentPowerUp == SKATE_OR_DIE) {
_friction = 0.003;
} else {
_friction = FRICTION_COEF * 2;
}
}
function RestoreNormalFriction() {
if (_currentPowerUp == SKATE_OR_DIE) {
_friction = 0.0005;
} else {
_friction = FRICTION_COEF;
}
}
function BlooGetIn() {
_blooVisible = true;
_refMovieClip.blu_manos.gotoAndStop(1);
_refMovieClip.blu.gotoAndStop(1);
_refMovieClip.blu.blu.gotoAndPlay(1);
}
function BlooGetOut() {
_refMovieClip.blu_manos.gotoAndStop(4);
_refMovieClip.blu.gotoAndStop(4);
_refMovieClip.blu.blu.gotoAndPlay(1);
_blooVisible = false;
SetState(STA_BLOO_IS_GOING_OUT);
_timerOfBlooIsGettingOut.Set();
var _local2 = 0;
if ((((_currentAnim != ANM_WIN) && (_currentAnim != ANM_LOSE_RIGHT)) && (_currentAnim != ANM_LOSE_LEFT)) && (_hasSkate)) {
_local2 = SKATE_ANIM_OFFSET;
}
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1 + _local2);
}
function BlooRun() {
if (!_blooVisible) {
return(undefined);
}
_refMovieClip.blu_manos.gotoAndStop(5);
_refMovieClip.blu.gotoAndStop(5);
_refMovieClip.blu.blu.gotoAndPlay(1);
}
function BlooIdle() {
if (!_blooVisible) {
return(undefined);
}
_refMovieClip.blu_manos.gotoAndStop(2);
_refMovieClip.blu.gotoAndStop(2);
_refMovieClip.blu.blu.gotoAndPlay(1);
}
function BlooScares() {
if (!_blooVisible) {
return(undefined);
}
_refMovieClip.blu_manos.gotoAndStop(3);
_refMovieClip.blu.gotoAndStop(3);
_refMovieClip.blu.blu.gotoAndPlay(1);
}
function BlooIsVisible() {
return(_blooVisible);
}
function ShowSilva() {
_refMovieClip.silva_mc._visible = true;
}
static var MAC_Y_POS = 380;
static var LEFT = 0;
static var RIGHT = 1;
static var SKATE_ANIM_OFFSET = 9;
static var ANMFRM_IDLE_1 = 1;
static var ANMFRM_IDLE_2 = 2;
static var ANMFRM_IDLE_3 = 3;
static var ANMFRM_RUN_RIGHT = 4;
static var ANMFRM_JUMP_RIGHT = 5;
static var ANMFRM_JUMP_RIGHT_AND_CLOSE = 6;
static var ANMFRM_TAKE_EGG = 7;
static var ANMFRM_CLOSE_EGG = 8;
static var ANMFRM_DROP_EGG = 9;
static var ANMFRM_SKATE_IDLE_1 = 10;
static var ANMFRM_SKATE_IDLE_2 = 11;
static var ANMFRM_SKATE_IDLE_3 = 12;
static var ANMFRM_SKATE_RUN_RIGHT = 13;
static var ANMFRM_SKATE_JUMP_RIGHT = 14;
static var ANMFRM_SKATE_JUMP_RIGHT_2 = 15;
static var ANMFRM_SKATE_TAKE_EGG = 16;
static var ANMFRM_SKATE_CATCH_BOMB = 17;
static var ANMFRM_SKATE_DROP_EGG = 18;
static var ANMFRM_WIN = 20;
static var ANMFRM_LOSE = 21;
static var ANM_STOP = 0;
static var ANM_STOP_RIGHT = 1;
static var ANM_STOP_LEFT = 2;
static var ANM_IDLE_1 = 3;
static var ANM_IDLE_1_RIGHT = 4;
static var ANM_IDLE_1_LEFT = 5;
static var ANM_IDLE_2 = 6;
static var ANM_IDLE_2_RIGHT = 7;
static var ANM_IDLE_2_LEFT = 8;
static var ANM_IDLE_3 = 9;
static var ANM_IDLE_3_RIGHT = 10;
static var ANM_IDLE_3_LEFT = 11;
static var ANM_RUN_RIGHT = 12;
static var ANM_RUN_LEFT = 13;
static var ANM_JUMP = 14;
static var ANM_JUMP_RIGHT = 15;
static var ANM_JUMP_LEFT = 16;
static var ANM_TAKE_EGG = 17;
static var ANM_CLOSE_EGG = 18;
static var ANM_DROP_EGG = 19;
static var ANM_WIN = 20;
static var ANM_LOSE_RIGHT = 21;
static var ANM_LOSE_LEFT = 22;
static var STA_IDLE = 0;
static var STA_RUN_RIGHT = 1;
static var STA_RUN_LEFT = 2;
static var STA_JUMP = 3;
static var STA_START_JUMP = 4;
static var STA_TAKING_EGG = 5;
static var STA_CLOSING_EGG = 6;
static var STA_DROPING_EGG = 7;
static var STA_EXPLOTING_EGG = 8;
static var STA_WIN = 9;
static var STA_LOSE = 10;
static var STA_CATCHING_BOMB = 11;
static var STA_BLOO_IS_GOING_OUT = 12;
static var NONE = 0;
static var WING_SHOES = 1;
static var SLOW_MOTION = 2;
static var LOW_SPEED = 3;
static var BONUS_1 = 4;
static var BONUS_2 = 5;
static var LOW_GRAVITY = 6;
static var SKATE_OR_DIE = 7;
static var JUMP_ACCEL = 0.02;
}
Symbol 1473 MovieClip [__Packages.AnaCondaFlash.TimerVar] Frame 0
class AnaCondaFlash.TimerVar
{
var _switchTime, _penaltyTime, _accumTime, _state;
function TimerVar (t1, t2) {
_switchTime = t1;
_penaltyTime = t2;
Reset();
}
function Reset() {
_accumTime = 0;
_state = 0;
}
function Frame(dt) {
if (_state == 1) {
_accumTime = _accumTime + dt;
if (_accumTime > _switchTime) {
_accumTime = 0;
_val = false;
if (_penaltyTime > 0) {
_state = 2;
} else {
_state = 0;
}
}
} else if (_state == 2) {
_accumTime = _accumTime + dt;
if (_accumTime > _penaltyTime) {
_accumTime = 0;
_state = 0;
}
}
}
function Set() {
if (_state == 0) {
_val = true;
_state = 1;
}
}
function SetFor(t1) {
_switchTime = t1;
if (_state == 0) {
_val = true;
_state = 1;
}
}
function Force(val) {
_val = val;
_state = 1;
_accumTime = 0;
}
function GetAndSet() {
var _local2 = _val;
if (_state == 0) {
_val = true;
_state = 1;
}
return(_local2);
}
function Get() {
return(_val);
}
function get value() {
return(_val);
}
var _val = false;
}
Symbol 1474 MovieClip [__Packages.MacCollide] Frame 0
class MacCollide
{
var _mac, _crateList, _isCollidingX, _isCollidingY, _timerOfWallCollide, _crateCount, _collidingYAt, _collidingXAt;
function MacCollide (mac, cl, ypos) {
_mac = mac;
_crateList = cl;
_floorY = ypos;
_isCollidingX = false;
_isCollidingY = false;
_timerOfWallCollide = new AnaCondaFlash.TimerVar(200, 600);
}
function SetCrateCount(num) {
_crateCount = num;
}
function SetFloor(ypos) {
_floorY = ypos;
}
function IsCollidingX() {
return(_isCollidingX);
}
function IsCollidingY() {
return(_isCollidingY);
}
function IsColliding() {
return(IsCollidingX() || (IsCollidingY()));
}
function Check(dt) {
_isCollidingX = false;
_timerOfWallCollide.Frame(dt);
if (_timerOfWallCollide.Get() == false) {
_isCollidingY = false;
}
if (_mac.__get__y() >= _floorY) {
_isCollidingY = true;
_collidingYAt = _floorY;
_mac.__set__y(_collidingYAt);
_mac._vy = 0;
if (_mac.GetState() == Mac.STA_START_JUMP) {
_mac.SetState(Mac.STA_JUMP);
} else if (_mac.IsJumping()) {
_mac.OnJumpStop();
}
}
if (_mac.__get__x() < (World._left + (_mac.GetWidth() / 2))) {
_isCollidingX = true;
_collidingXAt = World._left + (_mac.GetWidth() / 2);
_mac.__set__x(_collidingXAt);
_mac._deltaX = 0;
_mac._vx = 0;
_isCollidingY = true;
_timerOfWallCollide.Set();
} else if (_mac.__get__x() > (World._right - (_mac.GetWidth() / 2))) {
_isCollidingX = true;
_collidingXAt = World._right - (_mac.GetWidth() / 2);
_mac.__set__x(_collidingXAt);
_mac._deltaX = 0;
_mac._vx = 0;
_isCollidingY = true;
_timerOfWallCollide.Set();
}
var _local2 = 0;
while (_local2 < _crateCount) {
if (_isCollidingY || (_mac.__get__y() > ((Mac.MAC_Y_POS - _crateList[_local2]._height) + 20))) {
if (_crateList[_local2].CheckCollideX(_mac)) {
_isCollidingX = true;
if (_crateList[_local2]._x < _mac.__get__x()) {
_collidingXAt = (_crateList[_local2]._x + (_crateList[_local2]._width / 2)) + (_mac.GetWidth() / 4);
} else {
_collidingXAt = (_crateList[_local2]._x - (_crateList[_local2]._width / 2)) - (_mac.GetWidth() / 4);
}
_mac.__set__x(_collidingXAt);
_mac._deltaX = 0;
_mac._vx = 0;
return(undefined);
}
} else if (_crateList[_local2].CheckCollideY(_mac)) {
_isCollidingY = true;
_collidingYAt = _crateList[_local2]._y - _crateList[_local2]._height;
_mac.__set__y(_collidingYAt);
_mac._vy = 0;
if (_mac.GetState() == Mac.STA_START_JUMP) {
_mac.SetState(Mac.STA_JUMP);
} else if (_mac.IsJumping()) {
_mac.OnJumpStop();
}
return(undefined);
}
_local2++;
}
}
var _floorY = 0;
}
Symbol 1475 MovieClip [__Packages.World] Frame 0
class World
{
function World () {
}
static var _left = 0;
static var _right = 1160;
}
Symbol 1476 MovieClip [__Packages.BombCollection] Frame 0
class BombCollection
{
var _bombList, _trails, _timerOfThrowing, _timerOfSloMo, _soundTakeOnAir, _soundBooom, _soundBounce1, _soundBounce2, _soundMecha, _dtDiv, _state, _throwingPosX, _throwingPosY, _throwToLeft;
function BombCollection (mcTargetMovieClip) {
_bombList = new Array(MAX_BOMB_COUNT);
_trails = new Trails(mcTargetMovieClip);
var _local3 = 0;
while (_local3 < _bombList.length) {
_bombList[_local3] = new Bomb(mcTargetMovieClip, "mcBomb", "mcBomb" + _local3, TIME_OF_EXPLODE);
_local3++;
}
_timerOfThrowing = new AnaCondaFlash.TimerVar(1000, 0);
_timerOfSloMo = new AnaCondaFlash.TimerVar(5000, 0);
_soundTakeOnAir = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "TakeBombOnAir-fx23.wav");
_soundBooom = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "bomba sola.wav");
_soundBounce1 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "bomba cae al piso.wav");
_soundBounce2 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "bomba cae al piso2.wav");
_soundMecha = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "mecha2.wav");
_local3 = 0;
while (_local3 < _bombList.length) {
_bombList[_local3]._soundBooom = _soundBooom;
_bombList[_local3]._soundBounce1 = _soundBounce1;
_bombList[_local3]._soundBounce2 = _soundBounce2;
_bombList[_local3]._soundMecha = _soundMecha;
_local3++;
}
Reset();
}
function Reset() {
var _local2 = 0;
while (_local2 < _bombList.length) {
_bombList[_local2].Reset();
_local2++;
}
_dtDiv = NORMAL_DT_DIV;
_timerOfThrowing.Reset();
_state = STA_IDLE;
}
function Frame(dt) {
var _local2 = 0;
while (_local2 < _bombList.length) {
_bombList[_local2].Frame(dt / _dtDiv);
_local2++;
}
if (_state == STA_WAITING_TO_THROW) {
_timerOfThrowing.Frame(dt / _dtDiv);
if (_timerOfThrowing.Get() == false) {
var _local4 = GetNewBomb();
_bombList[_local4].SetPos(_throwingPosX, _throwingPosY);
var _local6 = 0.3 + (Math.random() * 0.2);
var _local5 = 0.45 + (Math.random() * 0.25);
if (_throwToLeft) {
_bombList[_local4].ApplyImpulse(-_local6, _local5);
} else {
_bombList[_local4].ApplyImpulse(_local6, _local5);
}
_trails.SetBomb(_bombList[_local4]);
_state = STA_IDLE;
}
}
if (_dtDiv == SLOMO_DT_DIV) {
_timerOfSloMo.Frame(dt);
if (_timerOfSloMo.Get() == false) {
_dtDiv = NORMAL_DT_DIV;
}
}
_trails.Frame(dt / _dtDiv);
}
function ThrowBombToLeft(posx, posy, timer) {
_throwingPosX = posx;
_throwingPosY = posy;
_throwToLeft = true;
_timerOfThrowing.SetFor(timer);
_state = STA_WAITING_TO_THROW;
}
function ThrowBombToRight(posx, posy, timer) {
_throwingPosX = posx;
_throwingPosY = posy;
_throwToLeft = false;
_timerOfThrowing.SetFor(timer);
_state = STA_WAITING_TO_THROW;
}
function GetNewBomb() {
var _local2 = 0;
while (_local2 < _bombList.length) {
if (_bombList[_local2].IsIdle()) {
_bombList[_local2].GetReady();
return(_local2);
}
_local2++;
}
}
function CanCatchBombAt(posx, posy) {
var _local4 = OFFSET_X_CATCH_BOMB;
var _local3 = OFFSET_Y_CATCH_BOMB;
var _local2 = 0;
while (_local2 < _bombList.length) {
if ((_bombList[_local2].visible == true) && (_bombList[_local2].IsExploding() == false)) {
if (((_bombList[_local2]._x - _local4) <= posx) && (posx <= (_bombList[_local2]._x + _local4))) {
if (((_bombList[_local2]._y - _local3) <= posy) && (posy <= (_bombList[_local2]._y + _local3))) {
return(_local2);
}
}
}
_local2++;
}
return(-1);
}
function CatchBomb(bomb, onAir) {
_bombList[bomb].visible = false;
_bombList[bomb].Taked();
GameFlow.instance.OnCatchBomb(onAir);
if (onAir) {
_soundTakeOnAir.Play();
}
}
function SlowMotion(time) {
_dtDiv = SLOMO_DT_DIV;
_timerOfSloMo.SetFor(time);
}
function Pause(val) {
var _local2 = 0;
while (_local2 < _bombList.length) {
_bombList[_local2].Pause(val);
_local2++;
}
}
static var MAX_BOMB_COUNT = 10;
static var NORMAL_DT_DIV = 2;
static var SLOMO_DT_DIV = 4;
static var TIME_OF_EXPLODE = 1000;
static var OFFSET_X_CATCH_BOMB = 30;
static var OFFSET_Y_CATCH_BOMB = 40;
static var STA_IDLE = 0;
static var STA_WAITING_TO_THROW = 1;
}
Symbol 1477 MovieClip [__Packages.Trails] Frame 0
class Trails
{
var _target_mc, _trails_mc, _trail_world_x, _trail_world_y, _bomb, _timerOfApplyTrail, _applyTrailNum, _enabled;
function Trails (target_mc) {
_target_mc = target_mc;
_trails_mc = new Array(MAX_TRAILS);
_trail_world_x = new Array(MAX_TRAILS);
_trail_world_y = new Array(MAX_TRAILS);
var _local2 = 0;
while (_local2 < MAX_TRAILS) {
_trails_mc[_local2] = _target_mc.attachMovie("mcAlphaTrail", "trail" + String(_local2), _target_mc.getNextHighestDepth());
_local2++;
}
_bomb = null;
_timerOfApplyTrail = new AnaCondaFlash.TimerVar(60, 0);
Reset();
}
function SetBomb(bomb) {
_bomb = bomb;
_applyTrailNum = 0;
Reset();
}
function Reset() {
_enabled = true;
_applyTrailNum = 0;
var _local2 = 0;
while (_local2 < MAX_TRAILS) {
_trails_mc[_local2]._visible = false;
_trails_mc[_local2]._alpha = 100;
_trails_mc[_local2]._xscale = 120;
_trails_mc[_local2]._yscale = 120;
_local2++;
}
}
function Frame(dt) {
if (_bomb == null) {
return(undefined);
}
if (_enabled) {
_timerOfApplyTrail.Frame(dt);
if (_timerOfApplyTrail.GetAndSet() == false) {
ShowTrail(_applyTrailNum);
_applyTrailNum++;
if (_applyTrailNum == MAX_TRAILS) {
_applyTrailNum = 0;
}
}
var _local2 = 0;
while (_local2 < MAX_TRAILS) {
if (_trails_mc[_local2]._visible) {
_trails_mc[_local2]._alpha = _trails_mc[_local2]._alpha - 4;
_trails_mc[_local2]._xscale = _trails_mc[_local2]._xscale - 4;
_trails_mc[_local2]._yscale = _trails_mc[_local2]._yscale - 4;
_trails_mc[_local2]._x = AnaCondaFlash.Viewport.ToScreenX(_trail_world_x[_local2]);
_trails_mc[_local2]._y = AnaCondaFlash.Viewport.ToScreenY(_trail_world_y[_local2]);
}
_local2++;
}
if (_bomb.IsAlive() == false) {
_local2 = 0;
while (_local2 < MAX_TRAILS) {
_trails_mc[_local2]._visible = false;
_local2++;
}
_enabled = false;
}
}
}
function ShowTrail(idx) {
_trail_world_x[idx] = _bomb._x;
_trail_world_y[idx] = _bomb._y;
_trails_mc[idx]._x = AnaCondaFlash.Viewport.ToScreenX(_trail_world_x[idx]);
_trails_mc[idx]._y = AnaCondaFlash.Viewport.ToScreenY(_trail_world_y[idx]);
_trails_mc[idx]._visible = true;
_trails_mc[idx]._xscale = 120;
_trails_mc[idx]._yscale = 120;
_trails_mc[idx]._alpha = ALPHA_DEC;
}
static var MAX_TRAILS = 10;
static var ALPHA_DEC = 80;
}
Symbol 1478 MovieClip [__Packages.Bomb] Frame 0
class Bomb extends AnaCondaFlash.Sprite
{
var _refMovieClip, _timerOfExplote, _timerOfDisappear, _state, _soundMecha, _gy, _vxi, _vx, _vyi, _vy, _ax, _ay, _x, _y, _soundBooom, _visible, _soundBounce1, _soundBounce2;
function Bomb (mcTargetClip, mcName, mcInstanceName, timeOfExlpode) {
super();
_refMovieClip = mcTargetClip.attachMovie(mcName, mcInstanceName, mcTargetClip.getNextHighestDepth());
_timerOfExplote = new AnaCondaFlash.TimerVar(timeOfExlpode, 0);
_timerOfDisappear = new AnaCondaFlash.TimerVar(300, 0);
Reset();
}
function GetMovieClip() {
return(_refMovieClip);
}
function Reset() {
visible = (false);
_state = STA_NONE;
_soundMecha.Stop();
_timerOfExplote.Reset();
_timerOfDisappear.Reset();
}
function GetReady() {
_refMovieClip._x = -100;
visible = (false);
_state = STA_FLYING;
PlayAnim(ANM_FLYING);
_soundMecha.PlayLoop();
_timerOfExplote.Reset();
_timerOfDisappear.Reset();
}
function UpdatePosition(dt) {
var _local3 = _gy;
_vxi = _vx;
_vyi = _vy;
_vx = _vxi + (_ax * dt);
_vy = _vyi + ((_ay + _local3) * dt);
_x = (_x + (_vxi * dt)) + (((_ax * dt) * dt) / 2);
_y = _y - ((_vyi * dt) + ((((_ay + _local3) * dt) * dt) / 2));
if (_y > Mac.MAC_Y_POS) {
_vy = -0.5 * _vy;
_vx = 0.35 * _vx;
_y = Mac.MAC_Y_POS;
if ((_state == STA_FLYING) || (_state == STA_ON_FLOOR)) {
PlayBoundSound();
}
if (_state == STA_FLYING) {
_state = STA_ON_FLOOR;
Explote();
}
}
if ((-0.001 < _vx) && (_vx < 0.001)) {
_vx = 0;
}
if ((-0.001 < _vy) && (_vy < 0.001)) {
_vy = 0;
}
}
function Frame(dt) {
if (_state == STA_NONE) {
return(undefined);
}
if ((_y != Mac.MAC_Y_POS) && ((_state == STA_FLYING) || (_state == STA_ON_FLOOR))) {
_refMovieClip._rotation = _refMovieClip._rotation + 6;
}
UpdatePosition(dt);
if (_state == STA_ON_FLOOR) {
_timerOfExplote.Frame(dt);
if (_timerOfExplote.Get() == false) {
PlayAnim(ANM_EXPLODE);
_state = STA_EXPLODING;
_timerOfDisappear.Set();
_soundMecha.Stop();
_soundBooom.Play();
}
} else if (_state == STA_EXPLODING) {
_timerOfDisappear.Frame(dt);
if (_timerOfDisappear.Get() == false) {
visible = (false);
GameFlow.instance.OnBombExplote(_x);
_state = STA_NONE;
}
}
super.Frame(dt);
}
function PlayAnim(id) {
if (id == ANM_FLYING) {
_refMovieClip.gotoAndStop(ANM_FLYING);
} else if (id == ANM_EXPLODE) {
_refMovieClip._rotation = 0;
_refMovieClip.gotoAndStop(ANM_EXPLODE);
}
}
function get visible() {
return(_visible);
}
function set visible(val) {
_visible = val;
_refMovieClip.gotoAndStop(ANM_FLYING);
_refMovieClip._visible = val;
//return(visible);
}
function SetPos(posx, posy) {
_state = STA_FLYING;
_x = posx;
_y = posy;
_visible = true;
PlayAnim(ANM_FLYING);
_refMovieClip._visible = true;
}
function ApplyImpulse(vx, vy) {
_vx = vx;
_vy = vy;
}
function IsInWorld() {
if ((_x < World._left) || (_x > World._right)) {
return(false);
}
return(true);
}
function Explote() {
_timerOfExplote.Set();
}
function IsIdle() {
return(_state == STA_NONE);
}
function PlayBoundSound() {
if (Math.random() <= 0.5) {
_soundBounce1.Play();
} else {
_soundBounce2.Play();
}
}
function Pause(val) {
if (val) {
_refMovieClip.bomb.stop();
_soundMecha.Mute(true);
} else {
_refMovieClip.bomb.play();
_soundMecha.Mute(false);
}
}
function Taked() {
_state = STA_NONE;
_soundMecha.Stop();
}
function IsAlive() {
return((_state == STA_FLYING) || (_state == STA_ON_FLOOR));
}
function IsExploding() {
return(_state == STA_EXPLODING);
}
static var STA_NONE = 0;
static var STA_FLYING = 1;
static var STA_ON_FLOOR = 2;
static var STA_EXPLODING = 3;
static var ANM_FLYING = 1;
static var ANM_EXPLODE = 2;
}
Symbol 1479 MovieClip [__Packages.AnaCondaFlash.SoundEx] Frame 0
class AnaCondaFlash.SoundEx
{
var _snd, _name, _mute, _loop, _playing_sound;
function SoundEx (ref, sndName) {
_snd = new Sound(ref);
_snd.stop();
_snd.attachSound(sndName);
_name = sndName;
_mute = false;
_loop = false;
}
function set volume(val) {
_snd.setVolume(val);
//return(volume);
}
function get volume() {
return(_snd.getVolume());
}
function set pan(val) {
_snd.setPan(val);
//return(pan);
}
function get pan() {
return(_snd.getPan());
}
function Play() {
_playing_sound = true;
if (_mute) {
return(undefined);
}
_snd.start();
_loop = false;
}
function PlayLoop() {
_playing_sound = true;
if (_mute) {
return(undefined);
}
_snd.start(0, 99999);
_loop = true;
}
function IsPlaying() {
return(_playing_sound);
}
function Stop() {
_snd.stop();
_playing_sound = false;
}
function FadeIn(time) {
}
function FadeOut(time) {
}
function Mute(val) {
_mute = val;
if (_mute) {
_snd.stop();
} else if (_playing_sound) {
if (_loop) {
PlayLoop();
} else {
Play();
}
}
}
}
Symbol 1480 MovieClip [__Packages.Globals] Frame 0
class Globals
{
function Globals () {
}
}
Symbol 1481 MovieClip [__Packages.AnaCondaFlash.SoundManager] Frame 0
class AnaCondaFlash.SoundManager
{
var _soundList, _soundCount, _mute, _masterVolume;
function SoundManager () {
_soundList = new Array();
_soundCount = 0;
_mute = false;
_masterVolume = 100;
}
function CreateSoundEx(ref, sndName) {
_soundList[_soundCount] = new AnaCondaFlash.SoundEx(ref, sndName);
_soundList[_soundCount].volume = _masterVolume;
_soundCount++;
return(_soundList[_soundCount - 1]);
}
function Play(whichSound) {
_soundList[whichSound].Play();
}
function Stop(whichSound) {
_soundList[whichSound].Stop();
}
function StopAll() {
trace("StopAll. len: " + _soundList.length);
var _local2 = 0;
while (_local2 < _soundList.length) {
_soundList[_local2].Stop();
_local2++;
}
}
function Mute(val) {
_mute = val;
var _local2 = 0;
while (_local2 < _soundList.length) {
_soundList[_local2].Mute(_mute);
_local2++;
}
}
function get masterVolume() {
return(_masterVolume);
}
function set masterVolume(val) {
_masterVolume = val;
var _local2 = 0;
while (_local2 < _soundList.length) {
_soundList[_local2].volume = _masterVolume;
_local2++;
}
//return(masterVolume);
}
}
Symbol 1482 MovieClip [__Packages.EggCollection] Frame 0
class EggCollection
{
var _eggList, _powerUpList, _soundExplode, _soundTakePow, _soundPowBounce;
function EggCollection (mcTargetMovieClip) {
_eggList = new Array(MAX_EGG_COUNT);
_powerUpList = new Array(MAX_EGG_COUNT);
var _local3 = 0;
while (_local3 < _eggList.length) {
_eggList[_local3] = new Egg(mcTargetMovieClip, "mcEgg", String("egg" + _local3), 0);
_powerUpList[_local3] = new PowerUp(mcTargetMovieClip, "mcStuff2", String("pow" + _local3), 0);
_local3++;
}
_soundExplode = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh2, "explo interior1.wav");
_soundTakePow = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh2, "TakePow-fx19.wav");
_soundPowBounce = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh2, "PowBounce-fx10.wav");
_local3 = 0;
while (_local3 < _powerUpList.length) {
_powerUpList[_local3].SetBounceSound(_soundPowBounce);
_local3++;
}
Reset();
}
function Reset() {
var _local2 = 0;
while (_local2 < _eggList.length) {
_eggList[_local2].Reset();
_powerUpList[_local2].Reset();
_local2++;
}
}
function Add(col, pos) {
var _local2 = 0;
while (_local2 < _eggList.length) {
if (_eggList[_local2].IsDead()) {
_eggList[_local2].Set(col, pos, EGG_TIME_TO_LIVE);
return(undefined);
}
_local2++;
}
_eggList[0].Set(col, pos, EGG_TIME_TO_LIVE);
return(undefined);
}
function Frame(dt) {
var _local2 = 0;
while (_local2 < _eggList.length) {
_eggList[_local2].Frame(dt);
_powerUpList[_local2].Frame(dt);
_local2++;
}
}
function SetEgg(col, pos) {
var _local2 = GetNewEgg();
if (_local2 != -1) {
_eggList[_local2].Set(col, pos, EGG_TIME_TO_LIVE);
return(true);
}
return(false);
}
function GetNewEgg() {
var _local2 = 0;
while (_local2 < _eggList.length) {
if ((_eggList[_local2].taked == false) && (_powerUpList[_local2]._active == false)) {
_powerUpList[_local2].Reset();
return(_local2);
}
_local2++;
}
return(-1);
}
function CanTakeEggAt(posx, posy) {
var _local2 = 0;
while (_local2 < _eggList.length) {
if ((_eggList[_local2].taked == false) && (_eggList[_local2].visible)) {
if ((_eggList[_local2].leftpos <= posx) && (posx <= _eggList[_local2].rightpos)) {
if (((_eggList[_local2]._y - 10) <= posy) && (posy <= (_eggList[_local2]._y + 10))) {
return(_local2);
}
}
}
_local2++;
}
return(-1);
}
function CanTakePowAt(posx, posy) {
var _local2 = 0;
while (_local2 < _powerUpList.length) {
if (_powerUpList[_local2].IsTakeable()) {
if ((_powerUpList[_local2].leftpos <= posx) && (posx <= _powerUpList[_local2].rightpos)) {
if (((_powerUpList[_local2]._y - 10) <= posy) && (posy <= (_powerUpList[_local2]._y + 10))) {
_soundTakePow.Play();
return(_local2);
}
}
}
_local2++;
}
return(-1);
}
function TakeEgg(num) {
_eggList[num].taked = true;
_powerUpList[num].Set(_eggList[num]._x);
}
function TakePow(num) {
_powerUpList[num].Take();
}
function GetEggColor(num) {
return(_eggList[num]._color);
}
function ExploteEgg(num, posx, posy) {
_eggList[num].taked = false;
_soundExplode.Play();
return(_eggList[num].Explote(posx, posy));
}
function GetPowCode(num) {
return(_powerUpList[num].GetCode());
}
static var MAX_EGG_COUNT = 10;
static var EGG_TIME_TO_LIVE = 12000;
}
Symbol 1483 MovieClip [__Packages.Egg] Frame 0
class Egg extends AnaCondaFlash.Sprite
{
var _refMovieClip, _explodingEggClip, _x, _y, _state, _taked, _explode_posx, _explode_posy, _ttl, _color;
function Egg (mcTargetClip, mcName, instanceName, posx) {
super();
_refMovieClip = mcTargetClip.attachMovie(mcName, instanceName, mcTargetClip.getNextHighestDepth());
_explodingEggClip = mcTargetClip.attachMovie("mcExplodingEgg", "e" + instanceName, mcTargetClip.getNextHighestDepth());
_x = posx;
_y = EGG_Y_POS;
Reset();
}
function GetMovieClip() {
return(_refMovieClip);
}
function Reset() {
_refMovieClip._visible = false;
_explodingEggClip._visible = false;
_explodingEggClip.stop();
_state = EGG_IDLE;
_taked = false;
_explode_posx = 0;
_explode_posy = 0;
}
function Frame(dt) {
if ((!_refMovieClip._visible) && (!_explodingEggClip._visible)) {
return(undefined);
}
_ttl = _ttl - dt;
if (_ttl < 0) {
_refMovieClip._visible = false;
}
super.Frame(dt);
if (_explodingEggClip._visible) {
_explodingEggClip._x = AnaCondaFlash.Viewport.ToScreenX(_explode_posx);
_explodingEggClip._y = AnaCondaFlash.Viewport.ToScreenY(_explode_posy);
}
}
function get visible() {
return(_refMovieClip._visible);
}
function set visible(val) {
_refMovieClip._visible = val;
//return(visible);
}
function Set(col, posx, ttl) {
_x = posx;
_y = EGG_Y_POS;
_color = col;
_ttl = ttl;
_refMovieClip.gotoAndStop(col);
_refMovieClip._visible = true;
}
function get leftpos() {
return(_x - (_refMovieClip._width / 2));
}
function get rightpos() {
return(_x + (_refMovieClip._width / 2));
}
function Explote(posx, posy) {
_explode_posx = posx;
_explode_posy = posy;
_explodingEggClip._x = AnaCondaFlash.Viewport.ToScreenX(posx);
_explodingEggClip._y = AnaCondaFlash.Viewport.ToScreenY(posy);
_explodingEggClip._visible = true;
_refMovieClip._visible = false;
_explodingEggClip.mciEgg.gotoAndStop(1);
_explodingEggClip.mciEgg.mciEgg.gotoAndStop(_color);
_explodingEggClip.mciEgg.mciEgg._eggColor = _color;
_explodingEggClip.mciEgg.play();
}
function get taked() {
return(_taked);
}
function set taked(val) {
_taked = val;
visible = (false);
//return(taked);
}
function IsIdle() {
return((_visible == false) && (_taked == false));
}
static var EGG_Y_POS = 380;
static var EGG_IDLE = 0;
static var EGG_EXPLOTE = 1;
}
Symbol 1484 MovieClip [__Packages.PowerUp] Frame 0
class PowerUp extends AnaCondaFlash.Sprite
{
var _refMovieClip, _x, _y, _offsetx, _offsety, _timerOfAppearing, _timerOfLive, _timerOfTilt, _state, _tiltCount, _active, _isMoving, _gy, _vxi, _vx, _vyi, _vy, _ax, _ay, _soundBounce, _powCode;
function PowerUp (mcTargetClip, mcName) {
super(mcTargetClip);
_refMovieClip = mcTargetClip.attachMovie(mcName, mcName + "i", mcTargetClip.getNextHighestDepth());
_refMovieClip.stop();
_x = 0;
_y = 0;
_offsetx = 0;
_offsety = 0;
_timerOfAppearing = new AnaCondaFlash.TimerVar(400, 0);
_timerOfLive = new AnaCondaFlash.TimerVar(3500, 0);
_timerOfTilt = new AnaCondaFlash.TimerVar(150, 0);
Reset();
}
function Reset() {
_refMovieClip._visible = false;
_state = STA_NOT_ACTIVE;
_tiltCount = 0;
_active = false;
_isMoving = true;
}
function UpdatePosition(dt) {
if (!_isMoving) {
return(undefined);
}
var _local3 = _gy;
_vxi = _vx;
_vyi = _vy;
_vx = _vxi + (_ax * dt);
_vy = _vyi + ((_ay + _local3) * dt);
_x = (_x + (_vxi * dt)) + (((_ax * dt) * dt) / 2);
_y = _y - ((_vyi * dt) + ((((_ay + _local3) * dt) * dt) / 2));
if (_y > POW_Y_POS) {
_vy = -0.3 * _vy;
_y = POW_Y_POS;
if (_vy < 0.008) {
_vy = 0;
_isMoving = false;
}
_soundBounce.Play();
}
if ((-0.001 < _vx) && (_vx < 0.001)) {
_vx = 0;
}
if ((-0.001 < _vy) && (_vy < 0.001)) {
_vy = 0;
}
}
function Frame(dt) {
if (_active == false) {
return(undefined);
}
UpdatePosition(dt);
super.Frame(dt);
if (_state == STA_APPEARING) {
_timerOfAppearing.Frame(dt);
_timerOfLive.Frame(dt);
if (_timerOfAppearing.Get() == false) {
_state = STA_NORMAL;
}
} else if (_state == STA_NORMAL) {
_timerOfLive.Frame(dt);
if (_timerOfLive.Get() == false) {
_state = STA_DISAPPEARING;
}
} else if (_state == STA_DISAPPEARING) {
_timerOfTilt.Frame(dt);
if (_timerOfTilt.GetAndSet() == false) {
_refMovieClip._visible = !_refMovieClip._visible;
_tiltCount++;
if (_tiltCount == MAX_TILT_COUNT) {
_active = false;
_refMovieClip._visible = false;
_state = STA_NOT_ACTIVE;
}
}
}
}
function ApplyImpulse(vx, vy) {
_vx = vx;
_vy = vy;
}
function Set(posx) {
var _local2 = Math.random();
if (_local2 <= 0.05) {
_powCode = POW_SKATE_OR_DIE;
} else if (_local2 <= 0.15) {
_powCode = POW_SLOW;
} else if (_local2 <= 0.25) {
_powCode = POW_SLOWMOTION;
} else if (_local2 <= 0.35) {
_powCode = POW_BONUS_2;
} else if (_local2 <= 0.5) {
_powCode = POW_BONUS_1;
} else {
_powCode = POW_NONE;
_state = STA_NOT_ACTIVE;
}
if (_powCode != POW_NONE) {
_active = true;
_x = posx;
_y = POW_Y_POS;
ApplyImpulse(0, 0.6);
_refMovieClip._visible = true;
_refMovieClip.gotoAndStop(_powCode);
_state = STA_APPEARING;
_timerOfAppearing.Force(true);
_timerOfLive.Force(true);
}
}
function get leftpos() {
return(_x - (_refMovieClip._width / 2));
}
function get rightpos() {
return(_x + (_refMovieClip._width / 2));
}
function Take() {
_active = false;
_refMovieClip._visible = false;
}
function GetCode() {
return(_powCode);
}
function IsTakeable() {
return((_active && (_state != STA_APPEARING)) && (_powCode != POW_NONE));
}
function SetBounceSound(snd) {
_soundBounce = snd;
}
static var POW_Y_POS = 380;
static var MAX_TILT_COUNT = 10;
static var POW_NONE = 0;
static var POW_WING_SHOES = 1;
static var POW_SLOWMOTION = 2;
static var POW_SLOW = 3;
static var POW_BONUS_1 = 4;
static var POW_BONUS_2 = 5;
static var POW_LOW_GRAVITY = 6;
static var POW_SKATE_OR_DIE = 7;
static var STA_NOT_ACTIVE = 0;
static var STA_APPEARING = 1;
static var STA_NORMAL = 2;
static var STA_DISAPPEARING = 3;
}
Symbol 1485 MovieClip [__Packages.ScoreBoard] Frame 0
class ScoreBoard
{
static var instance;
var _myroot, _liveCount, _score, _levelNum, _bombCount, _totalBombs, _currentPow;
function ScoreBoard (localroot) {
instance = this;
_myroot = localroot;
Reset();
}
function Reset() {
_liveCount = 3;
_score = 0;
_levelNum = 1;
_bombCount = 0;
_myroot.txtLevel.text = String(_levelNum);
_myroot.txtScore.text = _score;
_myroot.txtLives.text = String(_liveCount);
_myroot.txtBombCounter.text = String(_bombCount);
_myroot.txtBombCounterLeft.text = "/" + String(_totalBombs);
SetPowerUp(-1);
_myroot.mciPowerUpFrame._visible = false;
}
function SetScore(val) {
_score = val;
_myroot.txtScore.text = _score;
}
function AddToScore(val) {
_score = _score + val;
_myroot.txtScore.text = _score;
}
function GetScore() {
return(_score);
}
function set liveCount(val) {
_liveCount = val;
_myroot.txtLives.text = String(_liveCount);
//return(liveCount);
}
function get liveCount() {
return(_liveCount);
}
function SetPowerUp(pow) {
if ((_currentPow == pow) && (_currentPow == -1)) {
return(undefined);
}
_currentPow = pow;
if (_currentPow != -1) {
if (_myroot.mciPowerUpFrame._visible == false) {
_myroot.mciPowerUpFrame._visible = true;
}
_myroot.mciPowerUpFrame.gotoAndPlay(2);
_myroot.mciCurrentPowerUp.gotoAndStop(pow);
_myroot.mciCurrentPowerUp._visible = true;
} else {
_myroot.mciCurrentPowerUp._visible = false;
_myroot.mciPowerUpFrame.gotoAndPlay(11);
}
}
function Frame(dt) {
}
function CatchBomb(onAir) {
if (!onAir) {
_score = _score + 10;
} else {
_score = _score + 20;
}
_bombCount++;
_myroot.txtScore.text = _score;
_myroot.txtBombCounter.text = String(_bombCount);
_myroot.txtBombCounterLeft.text = "/" + String(_totalBombs);
}
function LoseALife() {
_liveCount--;
_myroot.txtLives.text = String(_liveCount);
}
function SetTotalBombs(val) {
_totalBombs = val;
_myroot.txtBombCounter.text = String(_bombCount);
_myroot.txtBombCounterLeft.text = "/" + String(_totalBombs);
}
function GetBombsLeft() {
return(_totalBombs - _bombCount);
}
function GetBombDisabledCount() {
return(_bombCount);
}
function GetTotalBombCount() {
return(_totalBombs);
}
function SetLevelNum(num) {
_levelNum = num;
_myroot.txtLevel.text = String(_levelNum);
_bombCount = 0;
_myroot.txtBombCounter.text = String(_bombCount);
_myroot.txtBombCounterLeft.text = "/" + String(_totalBombs);
}
}
Symbol 1486 MovieClip [__Packages.Coco] Frame 0
class Coco extends AnaCondaFlash.Sprite
{
var _refMovieClip, _timerOfIdle, _timerOfWalk, _timerOfDropEgg, _timerOfDroppingEgg, _timerOfEndDroppingEgg, _offsetx, _offsety, _soundCoco1, _soundCoco2, _soundCoco3, _soundPoneHuevo, _x, _y, StopMove, _state, _colorOfCurrentEgg, _currentAnim, _eggCollection, _crateList, _crateCount;
function Coco (mcTargetClip, mcName) {
super(mcTargetClip);
_refMovieClip = mcTargetClip.attachMovie(mcName, mcName + "i", mcTargetClip.getNextHighestDepth());
_refMovieClip.coco.stop();
_timerOfIdle = new AnaCondaFlash.TimerVar(MIN_IDLE + (MAXSUM_IDLE * Math.random()), 0);
_timerOfWalk = new AnaCondaFlash.TimerVar(MIN_WALK + (MAXSUM_WALK * Math.random()), 0);
_timerOfDropEgg = new AnaCondaFlash.TimerVar(MIN_DROP_EGG + (MAXSUM_DROP_EGG * Math.random()), 0);
_timerOfDroppingEgg = new AnaCondaFlash.TimerVar(DROPPING_EGG, 0);
_timerOfEndDroppingEgg = new AnaCondaFlash.TimerVar(END_DROPPING_EGG, 0);
_offsetx = 0;
_offsety = 0;
_soundCoco1 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh1, "coco1.wav");
_soundCoco2 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh1, "coco2.wav");
_soundCoco3 = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh1, "coco3.wav");
_soundPoneHuevo = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh1, "pone huevo.wav");
Reset();
}
function Reset() {
_x = START_POS_X;
_y = START_POS_Y;
StopMove();
PlayAnim(ANM_STOP);
_state = STA_DROP_EGG;
_timerOfIdle.Force(true);
_timerOfWalk.Force(true);
_timerOfDropEgg.Force(true);
_timerOfDroppingEgg.Force(true);
_timerOfEndDroppingEgg.Force(true);
_timerOfIdle.SetFor(MIN_IDLE + (MAXSUM_IDLE * Math.random()), 0);
_timerOfWalk.SetFor(MIN_WALK + (MAXSUM_WALK * Math.random()), 0);
_timerOfDropEgg.SetFor(MIN_DROP_EGG + (MAXSUM_DROP_EGG * Math.random()), 0);
_timerOfDroppingEgg.SetFor(DROPPING_EGG, 0);
_timerOfEndDroppingEgg.SetFor(END_DROPPING_EGG, 0);
}
function PlayAnim(id) {
if (id == ANM_STOP) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1);
} else if (id == ANM_IDLE_1) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1);
} else if (id == ANM_IDLE_2) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_2);
} else if (id == ANM_IDLE_3) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_3);
} else if (id == ANM_WALK_LEFT) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_RUN_LEFT);
} else if (id == ANM_WALK_RIGHT) {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_RUN_LEFT);
} else if (id == ANM_DROP_EGG) {
if (_colorOfCurrentEgg == ColorEnum.RED) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_RED);
} else if (_colorOfCurrentEgg == ColorEnum.BLUE) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_BLUE);
} else if (_colorOfCurrentEgg == ColorEnum.YELLOW) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_YELLOW);
} else if (_colorOfCurrentEgg == ColorEnum.ORANGE) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_ORANGE);
} else if (_colorOfCurrentEgg == ColorEnum.GREEN) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_GREEN);
} else if (_colorOfCurrentEgg == ColorEnum.PURPLE) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_PURPLE);
} else if (_colorOfCurrentEgg == ColorEnum.PINK) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_PINK);
} else if (_colorOfCurrentEgg == ColorEnum.CYAN) {
_refMovieClip.gotoAndStop(ANMFRM_DROP_EGG_CYAN);
}
}
_currentAnim = id;
}
function Turn(side) {
if (((side == RIGHT) && (_refMovieClip._xscale > 0)) || ((side == LEFT) && (_refMovieClip._xscale < 0))) {
_refMovieClip._xscale = -_refMovieClip._xscale;
}
}
function StopAnim() {
_refMovieClip.coco.gotoAndStop(1);
}
function UpdatePosition(dt) {
if (_state == STA_WALK_LEFT) {
_x = _x - (dt * SPEED);
} else if (_state == STA_WALK_RIGHT) {
_x = _x + (dt * SPEED);
}
}
function Frame(dt) {
_timerOfIdle.Frame(dt);
_timerOfWalk.Frame(dt);
_timerOfDropEgg.Frame(dt);
_timerOfDroppingEgg.Frame(dt);
_timerOfEndDroppingEgg.Frame(dt);
UpdatePosition(dt);
if (_state == STA_START_IDLE) {
var _local4 = Math.random();
if (_local4 <= 0.33) {
PlayAnim(ANM_IDLE_1);
} else if (_local4 <= 0.66) {
PlayAnim(ANM_IDLE_2);
} else {
PlayCocoSound();
PlayAnim(ANM_IDLE_3);
}
_state = STA_IDLE;
_timerOfIdle.Force(true);
_timerOfIdle.SetFor(MIN_IDLE + (MAXSUM_IDLE * Math.random()));
} else if (_state == STA_IDLE) {
if (_timerOfDropEgg.Get() == false) {
if (CanDropEgg()) {
_timerOfDropEgg.SetFor(MIN_DROP_EGG + (MAXSUM_DROP_EGG * Math.random()));
_state = STA_DROP_EGG;
} else {
_state = STA_WALK_LEFT;
PlayAnim(ANM_WALK_LEFT);
}
} else if (_timerOfIdle.Get() == false) {
_timerOfIdle.SetFor(MIN_IDLE + (MAXSUM_IDLE * Math.random()));
var _local5 = Math.random();
if (_local5 <= 0.5) {
_state = STA_WALK_LEFT;
PlayAnim(ANM_WALK_LEFT);
} else {
_state = STA_WALK_RIGHT;
PlayAnim(ANM_WALK_RIGHT);
}
}
} else if ((_state == STA_WALK_LEFT) || (_state == STA_WALK_RIGHT)) {
if (_timerOfDropEgg.Get() == false) {
if (CanDropEgg()) {
_timerOfDropEgg.SetFor(MIN_DROP_EGG + (MAXSUM_DROP_EGG * Math.random()));
_state = STA_DROP_EGG;
} else {
_state = STA_WALK_LEFT;
PlayAnim(ANM_WALK_LEFT);
}
} else if (_timerOfWalk.Get() == false) {
_timerOfWalk.SetFor(MIN_WALK + (MAXSUM_WALK * Math.random()));
_state = STA_START_IDLE;
}
CheckMapLimits(dt);
} else if (_state == STA_DROP_EGG) {
_state = STA_DROPPING_EGG;
_timerOfDroppingEgg.Set();
_colorOfCurrentEgg = ColorEnum.GetRandom();
PlayAnim(ANM_DROP_EGG);
} else if (_state == STA_DROPPING_EGG) {
if (_timerOfDroppingEgg.Get() == false) {
_state = STA_END_DROPPING_EGG;
DropEgg();
_soundPoneHuevo.Play();
_timerOfEndDroppingEgg.Set();
}
} else if (_state == STA_END_DROPPING_EGG) {
if (_timerOfEndDroppingEgg.Get() == false) {
_state = STA_START_IDLE;
}
}
super.Frame(dt);
}
function CheckMapLimits(dt) {
if ((_x - (_refMovieClip._width / 2)) < (World._left + 200)) {
_state = STA_WALK_RIGHT;
PlayAnim(ANM_WALK_RIGHT);
} else if ((_x + (_refMovieClip._width / 2)) > World._right) {
_state = STA_WALK_LEFT;
PlayAnim(ANM_WALK_LEFT);
}
}
function SetEggCollection(ref) {
_eggCollection = ref;
}
function DropEgg() {
_eggCollection.SetEgg(_colorOfCurrentEgg, _x);
}
function PlayCocoSound() {
var _local2 = Math.random();
if (_local2 <= 0.33) {
_soundCoco1.Play();
} else if (_local2 <= 0.66) {
_soundCoco2.Play();
} else {
_soundCoco3.Play();
}
}
function Pause(val) {
if (val) {
_refMovieClip.coco.stop();
} else {
_refMovieClip.coco.play();
}
}
function SetCrateList(crateList) {
_crateList = crateList;
}
function SetCrateCount(val) {
_crateCount = val;
}
function CanDropEgg() {
var _local2 = 0;
while (_local2 < _crateCount) {
if (((_crateList[_local2]._x - (_crateList[_local2]._width / 2)) <= _x) && (_x <= (_crateList[_local2]._x + (_crateList[_local2]._width / 2)))) {
return(false);
}
_local2++;
}
return(true);
}
static var START_POS_X = 800;
static var START_POS_Y = 380;
static var SPEED = 0.1;
static var LEFT = 0;
static var RIGHT = 1;
static var MIN_IDLE = 600;
static var MAXSUM_IDLE = 1000;
static var MIN_WALK = 4000;
static var MAXSUM_WALK = 3000;
static var MIN_DROP_EGG = 4000;
static var MAXSUM_DROP_EGG = 1500;
static var DROPPING_EGG = 800;
static var END_DROPPING_EGG = 200;
static var STA_START_IDLE = 0;
static var STA_IDLE = 1;
static var STA_WALK_RIGHT = 2;
static var STA_WALK_LEFT = 3;
static var STA_DROP_EGG = 4;
static var STA_DROPPING_EGG = 5;
static var STA_END_DROPPING_EGG = 6;
static var ANMFRM_IDLE_1 = 1;
static var ANMFRM_IDLE_2 = 2;
static var ANMFRM_IDLE_3 = 3;
static var ANMFRM_RUN_LEFT = 4;
static var ANMFRM_DROP_EGG_RED = 5;
static var ANMFRM_DROP_EGG_BLUE = 6;
static var ANMFRM_DROP_EGG_YELLOW = 7;
static var ANMFRM_DROP_EGG_ORANGE = 8;
static var ANMFRM_DROP_EGG_GREEN = 9;
static var ANMFRM_DROP_EGG_PURPLE = 10;
static var ANMFRM_DROP_EGG_PINK = 11;
static var ANMFRM_DROP_EGG_CYAN = 12;
static var ANM_STOP = 0;
static var ANM_IDLE_1 = 1;
static var ANM_IDLE_2 = 2;
static var ANM_IDLE_3 = 3;
static var ANM_WALK_LEFT = 4;
static var ANM_WALK_RIGHT = 5;
static var ANM_DROP_EGG = 6;
}
Symbol 1487 MovieClip [__Packages.ColorEnum] Frame 0
class ColorEnum
{
function ColorEnum () {
}
static function GetRandom() {
return((Math.floor(Math.random() * 10) % 8) + 1);
}
static var RED = 1;
static var BLUE = 2;
static var YELLOW = 3;
static var ORANGE = 4;
static var GREEN = 5;
static var PURPLE = 6;
static var PINK = 7;
static var CYAN = 8;
}
Symbol 1488 MovieClip [__Packages.Wildo] Frame 0
class Wildo extends AnaCondaFlash.Sprite
{
var _refMovieClip, _x, _y, _offsetx, _offsety, _timerOfIdle, _soundThrowBomb, StopMove, _state, _currentAnim;
function Wildo (mcTargetClip, mcName) {
super(mcTargetClip);
_refMovieClip = mcTargetClip.attachMovie(mcName, mcName + "i", mcTargetClip.getNextHighestDepth());
_x = START_POS_X_LEFT;
_y = 0;
_offsetx = 0;
_offsety = 0;
_timerOfIdle = new AnaCondaFlash.TimerVar(MIN_IDLE, 0);
_soundThrowBomb = Globals.gSoundManager.CreateSoundEx(_root.mciSoundCh3, "wildo tirabomba.wav");
Reset();
}
function Reset() {
_y = START_POS_Y;
StopMove();
PlayAnim(ANM_IDLE);
_state = STA_START_IDLE;
_timerOfIdle.Reset();
}
function PlayAnim(id) {
_refMovieClip.gotoAndPlay(ANMFRM_IDLE_1);
if (id == ANM_IDLE) {
var _local3 = Math.random();
if (_local3 <= 0.33) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_1);
} else if (_local3 <= 0.66) {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_2);
} else {
_refMovieClip.gotoAndStop(ANMFRM_IDLE_3);
}
} else if (id == ANM_THROW_BOMB_TO_LEFT) {
_refMovieClip.gotoAndStop(ANMFRM_THROW_BOMB_LEFT);
} else if (id == ANM_THROW_BOMB_TO_RIGHT) {
_refMovieClip.gotoAndStop(ANMFRM_THROW_BOMB_RIGHT);
}
_currentAnim = id;
}
function Turn(side) {
if (((side == RIGHT) && (_refMovieClip._xscale > 0)) || ((side == LEFT) && (_refMovieClip._xscale < 0))) {
_refMovieClip._xscale = -_refMovieClip._xscale;
}
}
function Frame(dt) {
_timerOfIdle.Frame(dt);
if (_state == STA_START_IDLE) {
} else if (_state == STA_IDLE) {
} else if (_state == STA_START_THROW_BOMB) {
} else if (_state == STA_THROWING_BOMB) {
}
super.Frame(dt);
}
function ThrowBomb(dirTo) {
if (dirTo == LEFT) {
_x = START_POS_X_RIGHT;
PlayAnim(ANM_THROW_BOMB_TO_LEFT);
} else {
_x = START_POS_X_LEFT;
PlayAnim(ANM_THROW_BOMB_TO_RIGHT);
}
_soundThrowBomb.Play();
}
function GoIdle() {
PlayAnim(ANM_IDLE);
}
function Pause(val) {
if (val) {
_refMovieClip.wildo.stop();
} else {
_refMovieClip.wildo.play();
}
}
static var START_POS_Y = 370;
static var START_POS_X_LEFT = 40;
static var START_POS_X_RIGHT = 1160;
static var WILDO_Y_HAND_POS = 240;
static var WILDO_X_RIGHT_HAND_POS = 1060;
static var WILDO_X_LEFT_HAND_POS = 140;
static var MIN_IDLE = 1000;
static var MAXSUM_IDLE = 1000;
static var LEFT = 0;
static var RIGHT = 1;
static var STA_START_IDLE = 0;
static var STA_IDLE = 1;
static var STA_START_THROW_BOMB = 2;
static var STA_THROWING_BOMB = 3;
static var ANMFRM_IDLE_1 = 1;
static var ANMFRM_IDLE_2 = 2;
static var ANMFRM_IDLE_3 = 3;
static var ANMFRM_THROW_BOMB_LEFT = 4;
static var ANMFRM_THROW_BOMB_RIGHT = 5;
static var ANM_IDLE = 0;
static var ANM_THROW_BOMB_TO_LEFT = 1;
static var ANM_THROW_BOMB_TO_RIGHT = 2;
}
Symbol 1489 MovieClip [__Packages.AnaCondaFlash.Plane2] Frame 0
class AnaCondaFlash.Plane2
{
var _p0, _n, _p1;
function Plane2 () {
_p0 = new AnaCondaFlash.Vector2();
_n = new AnaCondaFlash.Vector2();
_p1 = new AnaCondaFlash.Vector2();
}
function Set(p0, p1) {
_p0.Set(p0);
_p1.Set(p1);
var _local2 = new AnaCondaFlash.Vector2();
_local2._x = p1._x - p0._x;
_local2._y = p1._y - p0._y;
_n._x = (-_local2._y) / _local2.Length();
_n._y = _local2._x / _local2.Length();
}
function ClassifyPoint(p) {
var _local2 = new AnaCondaFlash.Vector2();
_local2._x = p._x - _p0._x;
_local2._y = p._y - _p0._y;
return(_local2.Dot(_n));
}
function ClassifyPointN(px, py) {
var _local2 = new AnaCondaFlash.Vector2();
_local2._x = px - _p0._x;
_local2._y = py - _p0._y;
return(_local2.Dot(_n));
}
function DrawDebug() {
if (_mc == null) {
_mc = _root.createEmptyMovieClip("debugmc", _root.getNextHighestDepth());
} else {
_mc.removeMovieClip();
}
_mc.lineStyle(5, 16711935, 100);
_mc.moveTo(_p0._x, _p0._y);
_mc.lineTo(_p1._x, _p1._y);
}
var _mc = null;
}
Symbol 1490 MovieClip [__Packages.AnaCondaFlash.Vector2] Frame 0
class AnaCondaFlash.Vector2
{
var _x, _y;
function Vector2 (x, y) {
_x = x;
_y = y;
}
function Set(v) {
_x = v._x;
_y = v._y;
}
function Set2n(x, y) {
_x = x;
_y = y;
}
function Length() {
return(Math.sqrt((_x * _x) + (_y * _y)));
}
function Lerp(v1, v2, k) {
_x = v1._x + ((v2._x - v1._x) * k);
_y = v1._y + ((v2._y - v1._y) * k);
return(this);
}
function Dot(v) {
return((_x * v._x) + (_y * v._y));
}
}
Symbol 1491 MovieClip [__Packages.HaloLight] Frame 0
class HaloLight
{
var _refMovieClip, _timerOfLight, _timerOfLight2, _state;
function HaloLight (mcTargetClip) {
_refMovieClip = mcTargetClip;
_timerOfLight = new AnaCondaFlash.TimerVar(3000, 600);
_timerOfLight2 = new AnaCondaFlash.TimerVar(150, 100);
_timerOfLight.Set();
}
function Frame(dt) {
_timerOfLight.Frame(dt);
if (_timerOfLight.GetAndSet() == false) {
_state = STA_FLASHING;
_timerOfLight2.Frame(dt);
if (_timerOfLight2.GetAndSet() == false) {
_refMovieClip._visible = !_refMovieClip._visible;
}
} else {
_state = STA_NORMAL;
_refMovieClip._visible = true;
}
}
static var STA_NORMAL = 0;
static var STA_FLASHING = 1;
}
Symbol 1492 MovieClip [__Packages.AnaCondaFlash.EarthQuake] Frame 0
class AnaCondaFlash.EarthQuake
{
var _refMovieClip, _timerOfQuake, _power, _dir, _state, _originalX, _originalY;
function EarthQuake (ref) {
_refMovieClip = ref;
_timerOfQuake = new AnaCondaFlash.TimerVar(DEF_TIME, 0);
_power = 0;
_dir = false;
_state = STA_IDLE;
}
function Quake(time, pow) {
_timerOfQuake.SetFor(time);
_power = pow;
_originalX = _refMovieClip._x;
_originalY = _refMovieClip._y;
_dir = false;
_state = STA_QUAKE;
}
function Frame(dt) {
if (_state == STA_QUAKE) {
if (_dir) {
_refMovieClip._x = _originalX + (Math.random() * _power);
_refMovieClip._y = _originalY + (Math.random() * _power);
} else {
_refMovieClip._x = _originalX - (Math.random() * _power);
_refMovieClip._y = _originalY - (Math.random() * _power);
}
_dir = !_dir;
_timerOfQuake.Frame(dt);
if (_timerOfQuake.Get() == false) {
_state = STA_END_OF_QUAKE;
}
} else if (_state == STA_END_OF_QUAKE) {
_refMovieClip._x = _originalX;
_refMovieClip._y = _originalY;
_state = STA_IDLE;
}
}
static var DEF_TIME = 1000;
static var STA_IDLE = 0;
static var STA_QUAKE = 1;
static var STA_END_OF_QUAKE = 2;
}
Symbol 1493 MovieClip [__Packages.Fader] Frame 0
class Fader
{
var _ref_mc, _deltaAlpha;
function Fader (ref) {
_ref_mc = ref;
_ref_mc._visible = false;
}
function Frame(dt) {
if (_ref_mc._visible) {
_ref_mc._alpha = _ref_mc._alpha - (_deltaAlpha * dt);
if (_ref_mc._alpha <= 0) {
_ref_mc._visible = false;
}
}
}
function FadeOut(t) {
_ref_mc._visible = true;
_ref_mc._alpha = 80;
_deltaAlpha = 80 / t;
}
}
Symbol 1494 MovieClip [__Packages.Crate] Frame 0
class Crate
{
var _refTargetClip, _refMovieClip, _x, _y, _width, _height, _blocksHeight;
function Crate (mcTarget, mcName, xpos, blockHeight) {
_refTargetClip = mcTarget;
_refMovieClip = _refTargetClip.attachMovie("mcCrate", mcName, _refTargetClip.getNextHighestDepth());
_refMovieClip.gotoAndStop(blockHeight);
_refMovieClip._visible = false;
_x = xpos;
_y = CRATE_Y_POS;
_width = CREATE_WIDTH;
_height = _refMovieClip._height - 3;
_blocksHeight = blockHeight;
}
function SetPosAndHeight(posx, blockHeight) {
_x = posx;
_refMovieClip.gotoAndStop(blockHeight);
_height = _refMovieClip._height - 3;
_blocksHeight = blockHeight;
}
function SetVisible(val) {
_refMovieClip._visible = val;
}
function Frame(dt) {
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(_x);
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(_y);
}
function CheckCollideX(player) {
if (player.__get__y() >= (_y - _height)) {
if ((((_x - (_width / 2)) <= player.GetLeftPos()) && (player.GetLeftPos() <= (_x + (_width / 2)))) || (((_x - (_width / 2)) <= player.GetRightPos()) && (player.GetRightPos() <= (_x + (_width / 2))))) {
return(true);
}
}
return(false);
}
function CheckCollideY(player) {
if ((((_x - (_width / 2)) <= player.GetLeftPos()) && (player.GetLeftPos() <= (_x + (_width / 2)))) || (((_x - (_width / 2)) <= player.GetRightPos()) && (player.GetRightPos() <= (_x + (_width / 2))))) {
if (player.__get__y() >= (_y - _height)) {
return(true);
}
}
return(false);
}
static var CRATE_Y_POS = 380;
static var CREATE_WIDTH = 45;
static var CREATE_HEIGHT = 40.5;
}
Symbol 1495 MovieClip [__Packages.MiniGameFlow] Frame 0
class MiniGameFlow
{
var _myroot, _mapName, _gameState, _simpleMap, _mapBg, _mapLoader, _map, _bloo, _spider, _planeTop, _planeRight, _planeLeft, _planeBottom, _timerOfWinLose, _soundLoop, _soundLose, _soundWin, _musicEnabled, _pause, _keyPressed, _secs, _frameCounter;
function MiniGameFlow (myroot, mapName) {
_myroot = myroot;
trace("Nombre de mapa pasado como par\u00E1metro: " + mapName);
trace("Nombre de mapa html parameter: " + _root.mapName);
_mapName = mapName;
MiniGameGlobals.gSoundManager = new AnaCondaFlash.SoundManager();
MiniGameGlobals.gMusicManager = new AnaCondaFlash.SoundManager();
_gameState = NOT_STARTED;
_simpleMap = new AnaCondaFlash.SimpleMapData(3, 3, 256, 256);
_mapBg = new AnaCondaFlash.Map(_simpleMap);
_mapLoader = new AnaCondaFlash.AmeLoader();
_map = new AnaCondaFlash.Map(_mapLoader);
_bloo = new MiniGameBloo(_myroot.mciObjects, _mapLoader, _map, "mcBloo");
_spider = new MiniGameSpider(_myroot.mciObjects, _mapLoader, _map, "mcSpider");
_spider.TargetSprite(_bloo);
AnaCondaFlash.Viewport._x = (AnaCondaFlash.Viewport._y = 0);
AnaCondaFlash.Viewport._width = 600;
AnaCondaFlash.Viewport._height = 400;
_planeTop = new AnaCondaFlash.Plane2();
_planeRight = new AnaCondaFlash.Plane2();
_planeLeft = new AnaCondaFlash.Plane2();
_planeBottom = new AnaCondaFlash.Plane2();
var _local6 = new AnaCondaFlash.Vector2(0, 180);
var _local5 = new AnaCondaFlash.Vector2(600, 180);
var _local4 = new AnaCondaFlash.Vector2(0, 220);
var _local3 = new AnaCondaFlash.Vector2(600, 220);
_planeTop.Set(_local6, _local5);
_planeBottom.Set(_local3, _local4);
_local6.Set2n(200, 0);
_local5.Set2n(200, 400);
_local4.Set2n(400, 0);
_local3.Set2n(400, 400);
_planeLeft.Set(_local5, _local6);
_planeRight.Set(_local4, _local3);
_myroot.txtLevel.text = (StringRes.__get__StrLevel() + " ") + String(_root._levelNum);
_timerOfWinLose = new AnaCondaFlash.TimerVar(1400, 0);
_soundLoop = MiniGameGlobals.gMusicManager.CreateSoundEx(_root.mciMusicCh1, "loopMiniGame.wav");
_soundLose = MiniGameGlobals.gSoundManager.CreateSoundEx(_root.mciSoundCh0, "lose.wav");
_soundWin = MiniGameGlobals.gSoundManager.CreateSoundEx(_root.mciSoundCh1, "win.wav");
_musicEnabled = _root._musicEnabled;
_myroot.mciPauseMusic._musicEnable = _root._musicEnabled;
MiniGameGlobals.gMusicManager.Mute(!_root._musicEnabled);
MiniGameGlobals.gSoundManager.Mute(!_root._musicEnabled);
_pause = false;
}
function LoadMap() {
_gameState = LOADING_MAP;
}
function StartGame() {
if ((_gameState == MAP_LOADED) || (_gameState == GAME_FLOW)) {
OnRestartGame();
_soundLoop.PlayLoop();
return(true);
}
return(false);
}
function OnRestartGame() {
AnaCondaFlash.Viewport._x = 0;
AnaCondaFlash.Viewport._y = 0;
_keyPressed = false;
SetInitialPlayersPos();
_gameState = GAME_FLOW;
_secs = 10;
_frameCounter = 0;
_myroot.txtTime.text = Math.floor(_secs);
trace("OnRestartGame");
}
function OnFrame() {
CheckMusicPause();
if (_gameState == LOADING_MAP) {
OnLoadMap();
} else if (_gameState == PARSING_MAP) {
OnParseMap();
} else if (_gameState == BUILD_MAP) {
OnBuildMap(_myroot.mciMap, _myroot.mciBg);
_gameState = MAP_LOADED;
} else if (_gameState == MAP_LOADED) {
OnGameFlow(_myroot.mciMap, _myroot.mciBg, _cMovieDeltaT);
} else if (_gameState == GAME_FLOW) {
OnGameFlow(_myroot.mciMap, _myroot.mciBg, _cMovieDeltaT);
} else if (_gameState == GAME_OVER_WINNING) {
_timerOfWinLose.Frame(_cMovieDeltaT);
if (_timerOfWinLose.Get() == false) {
_gameState = GAME_OVER_WIN;
var _local3 = Number(_myroot.txtTime.text);
_root._bonusTime = _myroot.txtTime.text;
_root._score = _root._score + (_local3 * 50);
if (_local3 >= 5) {
_root._bonusLives = 2;
} else if (_local3 > 0) {
_root._bonusLives = 1;
} else {
_root._bonusLives = 0;
}
_root._liveCount = _root._liveCount + _root._bonusLives;
_root.gotoAndStop(WIN_BONES_STAGE_FRAME);
}
} else if (_gameState == GAME_OVER_LOSING) {
_timerOfWinLose.Frame(_cMovieDeltaT);
if (_timerOfWinLose.Get() == false) {
_gameState = GAME_OVER_LOSE;
_root._bonusTime = 0;
_root._bonusLives = 0;
_root.gotoAndStop(WIN_BONES_STAGE_FRAME);
}
}
}
function CheckInput() {
if (Key.isDown(49)) {
if (!_keyPressed) {
OnRestartGame();
_keyPressed = true;
}
} else if (Key.isDown(50)) {
if (!_keyPressed) {
OnGameWin();
_keyPressed = true;
}
} else if (Key.isDown(51)) {
if (!_keyPressed) {
OnGameLost();
_keyPressed = true;
}
} else {
_keyPressed = false;
}
if (_pause) {
return(undefined);
}
if (Key.isDown(38)) {
_bloo.StartMoveUp();
} else if (Key.isDown(40)) {
_bloo.StartMoveDown();
} else if (Key.isDown(39)) {
_bloo.StartMoveRight();
} else if (Key.isDown(37)) {
_bloo.StartMoveLeft();
} else {
return(undefined);
}
}
function OnLoadMap() {
_mapLoader.Load(_mapName);
_gameState = PARSING_MAP;
}
function OnParseMap() {
if (_mapLoader.IsLoaded()) {
_mapLoader.Parse();
_gameState = BUILD_MAP;
}
}
function OnBuildMap(targetClip, targetClipBg) {
_map._x = 0;
_map._y = 0;
_map.BuildMap(targetClip, "mcBlocks", "blk_");
_mapBg._x = 0;
_mapBg._y = 0;
_mapBg.BuildMap(targetClipBg, "mcBackground", "bg_");
_gameState = GAME_FLOW;
}
function SetInitialPlayersPos() {
var _local2 = _mapLoader.FindBlockByFloat1Value(BLOO_START_POINT);
if (_local2 != null) {
var _local3 = _map.GetWorldCoordsFromRowCol(_local2[0], _local2[1], 0);
_bloo._x = _local3[0];
_bloo._y = _local3[1];
_bloo.Reset();
trace((("Bloo start: " + _local3[0]) + " , ") + _local3[1]);
CenterViewportFor(_bloo._x, _bloo._y);
} else {
trace("WARNING: Cannot find Bloo start point in the map");
}
_local2 = _mapLoader.FindBlockByFloat1Value(SPIDER_START_POINT);
if (_local2 != null) {
var _local3 = _map.GetWorldCoordsFromRowCol(_local2[0], _local2[1], 0);
_spider._x = _local3[0];
_spider._y = _local3[1];
_spider.Reset();
trace((("Spider start: " + _local3[0]) + " , ") + _local3[1]);
} else {
trace("WARNING: Cannot find Spider start point in the map");
}
LetOneMac();
}
function OnGameFlow(targetClip, targetClipBg, dt) {
if (_pause) {
return(undefined);
}
_secs = _secs - (dt / 1000);
if (_secs < 0) {
_secs = 0;
}
_frameCounter++;
if (_frameCounter == 20) {
_myroot.txtTime.text = Math.floor(_secs);
_frameCounter = 0;
}
AnaCondaFlash.Viewport.Frame(dt);
_mapBg.DrawMap(targetClipBg);
_map.DrawMap(targetClip);
if (_gameState == MAP_LOADED) {
return(undefined);
}
_bloo.CheckMapPosition();
_bloo.FixPositionForCurrentState();
_bloo.Frame(dt);
_spider.CheckMapPosition();
_spider.FixPositionForCurrentState();
_spider.Frame(dt);
var _local3 = AnaCondaFlash.Viewport.ToScreenX(_bloo._x);
var _local2 = AnaCondaFlash.Viewport.ToScreenY(_bloo._y);
if (_planeTop.ClassifyPointN(_local3, _local2) < 0) {
var _local5 = Math.floor(AnaCondaFlash.Viewport._y / _mapLoader._tileheight);
if (_local5 > -1) {
AnaCondaFlash.Viewport._y = AnaCondaFlash.Viewport._y - _SCROLL_SPEED;
}
} else if (_planeBottom.ClassifyPointN(_local3, _local2) < 0) {
var _local8 = (_map._rowFrom + Math.ceil(AnaCondaFlash.Viewport._height / _mapLoader._tileheight)) + 1;
if (_local8 != (_mapLoader._tilecounty + 1)) {
AnaCondaFlash.Viewport._y = AnaCondaFlash.Viewport._y + _SCROLL_SPEED;
}
}
if (_planeLeft.ClassifyPointN(_local3, _local2) < 0) {
var _local7 = Math.floor(AnaCondaFlash.Viewport._x / _mapLoader._tilewidth);
if (_local7 > -1) {
AnaCondaFlash.Viewport._x = AnaCondaFlash.Viewport._x - _SCROLL_SPEED;
}
} else if (_planeRight.ClassifyPointN(_local3, _local2) < 0) {
var _local6 = (_map._colFrom + Math.ceil(AnaCondaFlash.Viewport._width / _mapLoader._tilewidth)) + 1;
if (_local6 != (_mapLoader._tilecountx + 1)) {
AnaCondaFlash.Viewport._x = AnaCondaFlash.Viewport._x + _SCROLL_SPEED;
}
}
if (_bloo.__get__MacWasReached()) {
OnGameWin();
} else if ((Math.abs(_bloo._x - _spider._x) < 20) && (Math.abs(_bloo._y - _spider._y) < 20)) {
OnGameLost();
}
}
function OnGameLost() {
_timerOfWinLose.Set();
_gameState = GAME_OVER_LOSING;
_bloo.Lose();
_soundLoop.Stop();
_soundLose.Play();
_spider.StopSound();
_root._winBonus = false;
trace("Game Over");
}
function OnGameWin() {
_timerOfWinLose.Set();
_gameState = GAME_OVER_WINNING;
_bloo.Win();
_soundLoop.Stop();
_soundWin.Play();
_spider.StopSound();
_root._winBonus = true;
_root._bonusCompleted++;
trace("Win");
}
function CenterViewportFor(x, y) {
AnaCondaFlash.Viewport._x = x - (AnaCondaFlash.Viewport._width / 2);
AnaCondaFlash.Viewport._y = y - (AnaCondaFlash.Viewport._height / 2);
}
function LetOneMac() {
var _local4 = 0;
var _local3 = 0;
while (_local3 < _mapLoader._tilecounty) {
var _local2 = 0;
while (_local2 < _mapLoader._tilecountx) {
if (_mapLoader._block[_local3][_local2] == MAC_BLOCK_ID) {
_mapLoader._block[_local3][_local2] = 0;
}
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < _mapLoader._tilecounty) {
var _local2 = 0;
while (_local2 < _mapLoader._tilecountx) {
if (_mapLoader._blockFloat1[_local3][_local2] == 3) {
_local4++;
}
_local2++;
}
_local3++;
}
var _local5 = Math.floor((Math.random() * 10) % _local4);
trace(("Se encontraron : " + _local4) + " Macs");
trace("Elijo mac: " + _local5);
_local4 = 0;
_local3 = 0;
while (_local3 < _mapLoader._tilecounty) {
var _local2 = 0;
while (_local2 < _mapLoader._tilecountx) {
if (_mapLoader._blockFloat1[_local3][_local2] == 3) {
if (_local5 == _local4) {
_mapLoader._block[_local3][_local2] = MAC_BLOCK_ID;
}
_local4++;
}
_local2++;
}
_local3++;
}
}
function CheckMusicPause() {
if (_musicEnabled != _myroot.mciPauseMusic._musicEnable) {
if (_myroot.mciPauseMusic._musicEnable) {
trace("Se activa m\u00FAsica");
MiniGameGlobals.gMusicManager.Mute(false);
MiniGameGlobals.gSoundManager.Mute(false);
} else {
trace("Se apaga la m\u00FAsica");
MiniGameGlobals.gMusicManager.Mute(true);
MiniGameGlobals.gSoundManager.Mute(true);
}
_musicEnabled = _myroot.mciPauseMusic._musicEnable;
_root._musicEnabled = _musicEnabled;
}
if (_pause != _myroot.mciPauseMusic._pauseEnable) {
if (_myroot.mciPauseMusic._pauseEnable) {
}
_pause = _myroot.mciPauseMusic._pauseEnable;
_bloo.Pause(_pause);
_spider.Pause(_pause);
}
}
static var WIN_BONES_STAGE_FRAME = 9;
static var MAC_BLOCK_ID = 45;
static var NOT_STARTED = 0;
static var LOADING_MAP = 1;
static var PARSING_MAP = 2;
static var BUILD_MAP = 3;
static var GAME_FLOW = 4;
static var PAUSED = 5;
static var GAME_OVER_WINNING = 6;
static var GAME_OVER_LOSING = 7;
static var GAME_OVER_WIN = 8;
static var GAME_OVER_LOSE = 9;
static var MAP_LOADED = 10;
static var BLOO_START_POINT = 1;
static var SPIDER_START_POINT = 2;
static var _cMovieDeltaT = 33;
static var _SCROLL_SPEED = 6.5;
}
Symbol 1496 MovieClip [__Packages.AnaCondaFlash.MapData] Frame 0
class AnaCondaFlash.MapData
{
function MapData () {
}
}
Symbol 1497 MovieClip [__Packages.AnaCondaFlash.SimpleMapData] Frame 0
class AnaCondaFlash.SimpleMapData extends AnaCondaFlash.MapData
{
var _tilecountx, _tilecounty, _tilewidth, _tileheight, _block;
function SimpleMapData (bw, bh, tw, th) {
super();
_tilecountx = bw;
_tilecounty = bh;
_tilewidth = tw;
_tileheight = th;
_block = new Array(_tilecounty);
var _local4 = 0;
while (_local4 < _tilecounty) {
_block[_local4] = new Array(_tilecountx);
var _local3 = 0;
while (_local3 < _tilecountx) {
_block[_local4][_local3] = 0;
_local3++;
}
_local4++;
}
}
}
Symbol 1498 MovieClip [__Packages.AnaCondaFlash.Map] Frame 0
class AnaCondaFlash.Map
{
var _mapData, _x, _y, _maxMovieClipCount, _mcBlocks;
function Map (mapData) {
_mapData = mapData;
_x = 0;
_y = 0;
_maxMovieClipCount = 0;
}
function BuildMap(targetClip, mcBlocksName, instancePrefix) {
var _local6 = Math.ceil(AnaCondaFlash.Viewport._width / _mapData._tilewidth) + 1;
var _local7 = Math.ceil(AnaCondaFlash.Viewport._height / _mapData._tileheight) + 1;
_maxMovieClipCount = _local6 * _local7;
_mcBlocks = new Array(_maxMovieClipCount);
var _local2 = 0;
while (_local2 < _maxMovieClipCount) {
_mcBlocks[_local2] = targetClip.attachMovie(mcBlocksName, instancePrefix + _local2, _local2);
_mcBlocks[_local2]._visible = false;
_local2++;
}
trace("MaxMovieClipCount: " + _maxMovieClipCount);
}
function DrawMap(targetClip) {
_rowFrom = Math.floor(AnaCondaFlash.Viewport._y / _mapData._tileheight);
_rowFrom = AnaCondaFlash.Util.ClampTo(_rowFrom, 0, _mapData._tilecounty);
_rowTo = (_rowFrom + Math.ceil(AnaCondaFlash.Viewport._height / _mapData._tileheight)) + 1;
_rowTo = AnaCondaFlash.Util.ClampTo(_rowTo, 0, _mapData._tilecounty);
_colFrom = Math.floor(AnaCondaFlash.Viewport._x / _mapData._tilewidth);
_colFrom = AnaCondaFlash.Util.ClampTo(_colFrom, 0, _mapData._tilecountx);
_colTo = (_colFrom + Math.ceil(AnaCondaFlash.Viewport._width / _mapData._tilewidth)) + 1;
_colTo = AnaCondaFlash.Util.ClampTo(_colTo, 0, _mapData._tilecountx);
var _local3 = 0;
var _local4 = _rowFrom;
while (_local4 < _rowTo) {
var _local2 = _colFrom;
while (_local2 < _colTo) {
_mcBlocks[_local3]._x = AnaCondaFlash.Viewport.ToScreenX(_local2 * _mapData._tilewidth);
_mcBlocks[_local3]._y = AnaCondaFlash.Viewport.ToScreenY(_local4 * _mapData._tileheight);
_mcBlocks[_local3].gotoAndStop(_mapData._block[_local4][_local2] + 1);
_mcBlocks[_local3]._visible = true;
_local3++;
_local2++;
}
_local4++;
}
var _local5 = _local3;
while (_local5 < _maxMovieClipCount) {
_mcBlocks[_local5]._visible = false;
_local5++;
}
}
function GetWorldCoordsFromRowCol(row, col, pos) {
var _local2 = new Array(2);
_local2[0] = _x + (col * _mapData._tilewidth);
_local2[1] = _y + (row * _mapData._tileheight);
if (pos == 0) {
_local2[0] = _local2[0] + (_mapData._tilewidth / 2);
_local2[1] = _local2[1] + (_mapData._tileheight / 2);
} else if (pos == 2) {
_local2[0] = _local2[0] + _mapData._tilewidth;
} else if (pos == 3) {
_local2[1] = _local2[1] + _mapData._tileheight;
} else if (pos == 4) {
_local2[0] = _local2[0] + _mapData._tilewidth;
_local2[1] = _local2[1] + _mapData._tileheight;
}
return(_local2);
}
function GetRowColFromWorldCoords(x, y) {
var _local2 = new Array(2);
_local2[0] = Math.floor((y - _y) / _mapData._tileheight);
_local2[0] = AnaCondaFlash.Util.ClampTo(_local2[0], 0, _mapData._tilecounty);
_local2[1] = Math.floor((x - _x) / _mapData._tilewidth);
_local2[1] = AnaCondaFlash.Util.ClampTo(_local2[1], 0, _mapData._tilecountx);
return(_local2);
}
var _rowFrom = 0;
var _rowTo = 0;
var _colFrom = 0;
var _colTo = 0;
}
Symbol 1499 MovieClip [__Packages.AnaCondaFlash.Util] Frame 0
class AnaCondaFlash.Util
{
function Util () {
}
static function ClampTo(val, min, max) {
if (val < min) {
return(min);
}
if (val > max) {
return(max);
}
return(val);
}
static function Min(n1, n2) {
if (n1 < n2) {
return(n1);
}
return(n2);
}
static function Max(n1, n2) {
if (n1 > n2) {
return(n1);
}
return(n2);
}
static var _cDoublePi = 6.28318530717959 /* Math.PI*2 */;
}
Symbol 1500 MovieClip [__Packages.AnaCondaFlash.AmeLoader] Frame 0
class AnaCondaFlash.AmeLoader extends AnaCondaFlash.MapData
{
var _strvalues, _floatvalues, _xmlParser, _magic, _version, _mapname, _template, _boolvalues, _bitmap, _colorkey, _bitmapwidth, _bitmapheight, _tilewidth, _tileheight, _tilecountx, _tilecounty, _block, _blockFlags, _blockFloat1, _blockDepth;
function AmeLoader () {
super();
_strvalues = new Array(2);
_floatvalues = new Array(4);
_xmlParser = new XML();
}
function Load(filename) {
_xmlParser.ignoreWhite = true;
_xmlParser.load(filename);
}
function IsLoaded() {
return(_xmlParser.loaded);
}
function Parse() {
if (!_xmlParser.loaded) {
return(false);
}
trace("AmeLoader::map loaded");
var _local4 = _xmlParser.firstChild;
_magic = Number(_local4.attributes.magic);
_version = Number(_local4.attributes.version);
_mapname = _local4.attributes.name;
_template = _local4.attributes.template;
_boolvalues = Number(_local4.attributes.boolvalues);
_strvalues[0] = _local4.attributes.strvalues1;
_strvalues[1] = _local4.attributes.strvalues2;
_floatvalues[0] = Number(_local4.attributes.fvalues1);
_floatvalues[1] = Number(_local4.attributes.fvalues2);
_floatvalues[2] = Number(_local4.attributes.fvalues3);
_floatvalues[3] = Number(_local4.attributes.fvalues4);
_bitmap = _local4.attributes.bitmap;
_colorkey = Number(_local4.attributes.colorkey);
_bitmapwidth = Number(_local4.attributes.bitmapwidth);
_bitmapheight = Number(_local4.attributes.bitmapheight);
_tilewidth = Number(_local4.attributes.tilewidth);
_tileheight = Number(_local4.attributes.tileheight);
_tilecountx = Number(_local4.attributes.tilecountx);
_tilecounty = Number(_local4.attributes.tilecounty);
_block = new Array(_tilecounty);
_blockFlags = new Array(_tilecounty);
_blockFloat1 = new Array(_tilecounty);
_blockDepth = new Array(_tilecounty);
var _local2 = 0;
while (_local2 < _tilecounty) {
_block[_local2] = new Array(_tilecountx);
_blockFlags[_local2] = Array(_tilecountx);
_blockFloat1[_local2] = new Array(_tilecountx);
_blockDepth[_local2] = new Array(_tilecountx);
var _local3 = 0;
while (_local3 < _tilecountx) {
_block[_local2][_local3] = new Array();
_block[_local2][_local3] = Number(_local4.childNodes[(_local2 * _tilecountx) + _local3].attributes.tilenum);
_blockFlags[_local2][_local3] = Number(_local4.childNodes[(_local2 * _tilecountx) + _local3].attributes.boolvalues);
_blockFloat1[_local2][_local3] = Number(_local4.childNodes[(_local2 * _tilecountx) + _local3].attributes.fvalues1);
_local3++;
}
_local2++;
}
return(true);
}
function GetBlockFlag(row, col, flag) {
var _local2 = Math.pow(2, flag);
if (((_blockFlags[row][col] & _local2) && (_local2)) == 0) {
return(false);
}
return(true);
}
function FindBlockByTileNum(id) {
var _local4 = 0;
while (_local4 < _tilecounty) {
var _local2 = 0;
while (_local2 < _tilecountx) {
if (_block[_local4][_local2] == id) {
var _local3 = new Array(2);
_local3[0] = _local4;
_local3[1] = _local2;
return(_local3);
}
_local2++;
}
_local4++;
}
return(null);
}
function FindBlockByBoolValue(id) {
}
function FindBlockByFloat1Value(val) {
var _local4 = 0;
while (_local4 < _tilecounty) {
var _local2 = 0;
while (_local2 < _tilecountx) {
if (_blockFloat1[_local4][_local2] == val) {
var _local3 = new Array(2);
_local3[0] = _local4;
_local3[1] = _local2;
return(_local3);
}
_local2++;
}
_local4++;
}
return(null);
}
function FindBlockByStringValue(id) {
}
}
Symbol 1501 MovieClip [__Packages.AnaCondaFlash.SimpleSprite] Frame 0
class AnaCondaFlash.SimpleSprite
{
var _refTargetClip, _refMovieClip, _isMoving;
function SimpleSprite (mcTarget) {
_refTargetClip = mcTarget;
_refMovieClip = null;
_isMoving = false;
}
function Frame(dt) {
if (_isMoving) {
StorePrevPosition();
_x = _x + ((_spd * dt) * Math.cos(_dirAng));
_y = _y + ((_spd * dt) * Math.sin(_dirAng));
}
}
function SetPosX(pos) {
_x = pos;
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(pos);
}
function SetPosY(pos) {
_y = pos;
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(pos);
}
function SetPos(posx, posy) {
_x = posx;
_y = posy;
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(posx);
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(posy);
}
function GetWidth() {
if (_refMovieClip != null) {
return(_refMovieClip._width);
}
}
function GetHeight() {
if (_refMovieClip != null) {
return(_refMovieClip._height);
}
}
function RestorePrevPosition() {
_x = _xprev;
_y = _yprev;
}
function StorePrevPosition() {
_xprev = _x;
_yprev = _y;
}
function get visible() {
return(_refMovieClip._visible);
}
function set visible(val) {
_refMovieClip._visible = val;
//return(visible);
}
function StartMoveTo(ang) {
_isMoving = true;
_dirAng = ang;
}
function StopMove() {
_isMoving = false;
}
var _offsetx = 0;
var _offsety = 0;
var _x = 0;
var _y = 0;
var _xprev = 0;
var _yprev = 0;
var _dirAng = 0;
var _spd = 0.2;
}
Symbol 1502 MovieClip [__Packages.AnaCondaFlash.SpriteMap] Frame 0
class AnaCondaFlash.SpriteMap extends AnaCondaFlash.SimpleSprite
{
var _mapData, _map, _offsetx, _x, _refMovieClip, _offsety, _y;
function SpriteMap (mcTargetClip, mapData, map) {
super(mcTargetClip);
_mapData = mapData;
_map = map;
}
function Frame(dt) {
super.Frame(dt);
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(_x) + _offsetx;
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(_y) + _offsety;
}
function SetPos(posx, posy) {
super.SetPos(posx, posy);
_refMovieClip._x = AnaCondaFlash.Viewport.ToScreenX(_x) + _offsetx;
_refMovieClip._y = AnaCondaFlash.Viewport.ToScreenY(_y) + _offsety;
}
function GetScreenPos() {
var _local2;
_local2[0] = AnaCondaFlash.Viewport.ToScreenX(_x) + _offsetx;
_local2[1] = AnaCondaFlash.Viewport.ToScreenY(_y) + _offsety;
return(_local2);
}
}
Symbol 1503 MovieClip [__Packages.MiniGamePlayer] Frame 0
class MiniGamePlayer extends AnaCondaFlash.SpriteMap
{
var _refMovieClip, _rowcolPrev, _offsetx, _offsety, _currentState, _map, _mapData, _x, _y, _rowcol, StartMoveTo;
function MiniGamePlayer (mcTargetClip, mapData, map, mcName) {
super(mcTargetClip, mapData, map);
_refMovieClip = mcTargetClip.attachMovie(mcName, mcName + "i", mcTargetClip.getNextHighestDepth());
_rowcolPrev = new Array(2);
_rowcolPrev[0] = 0;
_rowcolPrev[1] = 0;
_offsetx = 0;
_offsety = 0;
Reset();
}
function StopAnim() {
PlayAnim(ANM_IDLE);
}
function CheckMapPosition() {
var _local3 = GetCheckPosition(_currentState);
if (_local3 != null) {
var _local2 = _map.GetRowColFromWorldCoords(_local3[0], _local3[1]);
if ((_mapData._block[_local2[0]][_local2[1]] != 0) && (_mapData._block[_local2[0]][_local2[1]] != MiniGameFlow.MAC_BLOCK_ID)) {
FixPosition();
StopMove();
}
}
}
function NextBlockIsValid(moveDir) {
var _local3 = GetCheckPosition(moveDir);
if (_local3 != null) {
var _local2 = _map.GetRowColFromWorldCoords(_local3[0], _local3[1]);
if ((_mapData._block[_local2[0]][_local2[1]] == 0) || (_mapData._block[_local2[0]][_local2[1]] == MiniGameFlow.MAC_BLOCK_ID)) {
return(true);
}
return(false);
}
return(false);
}
function GetCheckPosition(moveDir) {
var _local2 = new Array(2);
if (moveDir == STA_RUN_UP) {
_local2[0] = _x;
_local2[1] = (_y - (_mapData._tileheight / 2)) - 1;
} else if (moveDir == STA_RUN_DOWN) {
_local2[0] = _x;
_local2[1] = (_y + (_mapData._tileheight / 2)) + 1;
} else if (moveDir == STA_RUN_LEFT) {
_local2[0] = (_x - (_mapData._tilewidth / 2)) - 1;
_local2[1] = _y;
} else if (moveDir == STA_RUN_RIGHT) {
_local2[0] = (_x + (_mapData._tilewidth / 2)) + 1;
_local2[1] = _y;
} else {
return(null);
}
return(_local2);
}
function FixPosition() {
var _local2 = _map.GetRowColFromWorldCoords(_x, _y);
var _local3 = _map.GetWorldCoordsFromRowCol(_local2[0], _local2[1], 0);
_x = _local3[0];
_y = _local3[1];
}
function FixPositionForCurrentState() {
var _local2 = _map.GetRowColFromWorldCoords(_x, _y);
var _local3 = _map.GetWorldCoordsFromRowCol(_local2[0], _local2[1], 0);
if ((_currentState == STA_RUN_UP) || (_currentState == STA_RUN_DOWN)) {
_x = _local3[0];
} else if ((_currentState == STA_RUN_LEFT) || (_currentState == STA_RUN_RIGHT)) {
_y = _local3[1];
}
}
function Frame(dt) {
super.Frame(dt);
_rowcol = _map.GetRowColFromWorldCoords(_x, _y);
if ((_rowcol[0] != _rowcolPrev[0]) || (_rowcol[1] != _rowcolPrev[1])) {
OnBlockChange();
_rowcolPrev[0] = _rowcol[0];
_rowcolPrev[1] = _rowcol[1];
}
}
function Reset() {
StopMove();
_currentState = STA_IDLE;
}
function PlayAnim(id) {
}
function StartMoveUp() {
if ((_currentState == ANM_WIN) || (_currentState == ANM_LOSE)) {
return(undefined);
}
if (NextBlockIsValid(STA_RUN_UP)) {
StartMoveTo(-1.5707);
PlayAnim(ANM_WALK_UP);
_currentState = STA_RUN_UP;
}
}
function StartMoveDown() {
if ((_currentState == ANM_WIN) || (_currentState == ANM_LOSE)) {
return(undefined);
}
if (NextBlockIsValid(STA_RUN_DOWN)) {
StartMoveTo(1.5707);
PlayAnim(ANM_WALK_DOWN);
_currentState = STA_RUN_DOWN;
}
}
function StartMoveLeft() {
if ((_currentState == ANM_WIN) || (_currentState == ANM_LOSE)) {
return(undefined);
}
if (NextBlockIsValid(STA_RUN_LEFT)) {
StartMoveTo(3.1415);
PlayAnim(ANM_WALK_LEFT);
_currentState = STA_RUN_LEFT;
}
}
function StartMoveRight() {
if ((_currentState == ANM_WIN) || (_currentState == ANM_LOSE)) {
return(undefined);
}
if (NextBlockIsValid(STA_RUN_RIGHT)) {
StartMoveTo(0);
PlayAnim(ANM_WALK_RIGHT);
_currentState = STA_RUN_RIGHT;
}
}
function StopMove() {
super.StopMove();
if ((_currentState == ANM_WIN) || (_currentState == ANM_LOSE)) {
return(undefined);
}
PlayAnim(ANM_IDLE);
_currentState = STA_IDLE;
}
function OnBlockChange() {
}
static var ANM_IDLE = 0;
static var ANM_WALK_UP = 1;
static var ANM_WALK_DOWN = 2;
static var ANM_WALK_LEFT = 3;
static var ANM_WALK_RIGHT = 4;
static var ANM_WIN = 5;
static var ANM_LOSE = 6;
static var STA_IDLE = 0;
static var STA_RUN_UP = 1;
static var STA_RUN_RIGHT = 2;
static var STA_RUN_DOWN = 3;
static var STA_RUN_LEFT = 4;
static var STA_WIN = 5;
static var STA_LOSE = 6;
}
Symbol 1504 MovieClip [__Packages.MiniGameBloo] Frame 0
class MiniGameBloo extends MiniGamePlayer
{
var _rowcol, _mapData, _lookingLeft, _currentAnim, _refMovieClip, _currentState;
function MiniGameBloo (mcTargetClip, mapData, map, mcName) {
super(mcTargetClip, mapData, map, mcName);
Reset();
}
function OnBlockChange() {
if (_mapData._block[_rowcol[0]][_rowcol[1]] == MiniGameFlow.MAC_BLOCK_ID) {
_macWasReached = true;
}
}
function get MacWasReached() {
return(_macWasReached);
}
function Reset() {
super.Reset();
_macWasReached = false;
PlayAnim(MiniGamePlayer.ANM_IDLE);
_lookingLeft = true;
}
function PlayAnim(id) {
if (id == _currentAnim) {
return(undefined);
}
if (id == MiniGamePlayer.ANM_IDLE) {
_refMovieClip.gotoAndStop(ANMFRM_RUN_FRONT);
_refMovieClip.bloo.stop();
} else if (id == MiniGamePlayer.ANM_WALK_DOWN) {
_refMovieClip.gotoAndStop(ANMFRM_RUN_FRONT);
} else if (id == MiniGamePlayer.ANM_WALK_UP) {
_refMovieClip.gotoAndStop(ANMFRM_RUN_BACK);
} else if (id == MiniGamePlayer.ANM_WALK_LEFT) {
Turn(LEFT);
_refMovieClip.gotoAndStop(ANMFRM_RUN_LEFT);
} else if (id == MiniGamePlayer.ANM_WALK_RIGHT) {
Turn(RIGHT);
_refMovieClip.gotoAndStop(ANMFRM_RUN_LEFT);
} else if (id == MiniGamePlayer.ANM_WIN) {
_refMovieClip.gotoAndStop(ANMFRM_WIN);
} else if (id == MiniGamePlayer.ANM_LOSE) {
_refMovieClip.gotoAndStop(ANMFRM_LOSE);
}
_currentAnim = id;
}
function Turn(side) {
if (((side == LEFT) && (_refMovieClip._xscale < 0)) || ((side == RIGHT) && (_refMovieClip._xscale > 0))) {
_refMovieClip._xscale = -_refMovieClip._xscale;
_lookingLeft = !_lookingLeft;
}
}
function Win() {
_currentState = MiniGamePlayer.STA_WIN;
PlayAnim(MiniGamePlayer.ANM_WIN);
}
function Lose() {
_currentState = MiniGamePlayer.STA_LOSE;
PlayAnim(MiniGamePlayer.ANM_LOSE);
}
function Pause(val) {
if (val) {
_refMovieClip.bloo.eyes.stop();
_refMovieClip.bloo.stop();
} else {
_refMovieClip.bloo.eyes.play();
_refMovieClip.bloo.play();
}
}
var _macWasReached = false;
static var LEFT = 0;
static var RIGHT = 1;
static var ANMFRM_RUN_FRONT = 1;
static var ANMFRM_RUN_BACK = 2;
static var ANMFRM_RUN_LEFT = 3;
static var ANMFRM_WIN = 4;
static var ANMFRM_LOSE = 5;
}
Symbol 1505 MovieClip [__Packages.MiniGameSpider] Frame 0
class MiniGameSpider extends MiniGamePlayer
{
var _timerToThink, _soundCrunch, _target, _currentAnim, _lookingLeft, NextBlockIsValid, _currentState, _spd, StartMoveUp, StartMoveDown, StartMoveLeft, StartMoveRight, _rowcol, _mapData, _refMovieClip;
function MiniGameSpider (mcTargetClip, mapData, map, mcName) {
super(mcTargetClip, mapData, map, mcName);
_timerToThink = new AnaCondaFlash.TimerVar(_timeToThink, 0);
_soundCrunch = MiniGameGlobals.gMusicManager.CreateSoundEx(_root.mciSoundCh2, "spider.wav");
}
function TargetSprite(spr) {
_target = spr;
}
function Reset() {
super.Reset();
_currentAnim = MiniGamePlayer.ANM_IDLE;
_lookingLeft = true;
_soundCrunch.PlayLoop();
}
function Frame(dt) {
super.Frame(dt);
_timerToThink.Frame(dt);
if (NextBlockIsValid(_currentState) == false) {
SetNewDir(true);
}
if (BlooOnSight()) {
_iaState = PERSUIT;
_spd = SPEED_ANGRY;
StartMoveFromState(GetBlooDir());
} else {
_iaState = SEARCH;
_spd = SPEED_NORMAL;
}
}
function StartMoveFromState(state) {
if (state == MiniGamePlayer.STA_RUN_UP) {
StartMoveUp();
} else if (state == MiniGamePlayer.STA_RUN_DOWN) {
StartMoveDown();
} else if (state == MiniGamePlayer.STA_RUN_LEFT) {
StartMoveLeft();
} else if (state == MiniGamePlayer.STA_RUN_RIGHT) {
StartMoveRight();
}
}
function Think() {
if (_currentState == MiniGamePlayer.STA_IDLE) {
StartMoveFromState(GetRandomDir());
}
}
function SetNewDir(avoidSameDir) {
if (avoidSameDir) {
var _local2 = Math.random();
if ((0 <= _local2) && (_local2 < 0.4)) {
StartMoveFromState(GetCWDir(_currentState));
} else if ((0.4 <= _local2) && (_local2 < 0.8)) {
StartMoveFromState(GetCCWDir(_currentState));
} else {
StartMoveFromState(GetOpositeDir(_currentState));
}
} else {
var _local2 = Math.random();
if ((0 <= _local2) && (_local2 < 0.25)) {
StartMoveFromState(GetCWDir(_currentState));
} else if ((0.25 <= _local2) && (_local2 < 0.5)) {
StartMoveFromState(GetCCWDir(_currentState));
}
}
}
function GetCWDir(dir) {
if (dir == MiniGamePlayer.STA_RUN_UP) {
return(MiniGamePlayer.STA_RUN_RIGHT);
}
if (dir == MiniGamePlayer.STA_RUN_RIGHT) {
return(MiniGamePlayer.STA_RUN_DOWN);
}
if (dir == MiniGamePlayer.STA_RUN_DOWN) {
return(MiniGamePlayer.STA_RUN_LEFT);
}
if (dir == MiniGamePlayer.STA_RUN_LEFT) {
return(MiniGamePlayer.STA_RUN_UP);
}
return(GetRandomDir());
}
function GetCCWDir(dir) {
if (dir == MiniGamePlayer.STA_RUN_UP) {
return(MiniGamePlayer.STA_RUN_LEFT);
}
if (dir == MiniGamePlayer.STA_RUN_LEFT) {
return(MiniGamePlayer.STA_RUN_DOWN);
}
if (dir == MiniGamePlayer.STA_RUN_DOWN) {
return(MiniGamePlayer.STA_RUN_RIGHT);
}
if (dir == MiniGamePlayer.STA_RUN_RIGHT) {
return(MiniGamePlayer.STA_RUN_UP);
}
return(GetRandomDir());
}
function GetOpositeDir(dir) {
if (dir == MiniGamePlayer.STA_RUN_UP) {
return(MiniGamePlayer.STA_RUN_DOWN);
}
if (dir == MiniGamePlayer.STA_RUN_DOWN) {
return(MiniGamePlayer.STA_RUN_UP);
}
if (dir == MiniGamePlayer.STA_RUN_LEFT) {
return(MiniGamePlayer.STA_RUN_RIGHT);
}
if (dir == MiniGamePlayer.STA_RUN_RIGHT) {
return(MiniGamePlayer.STA_RUN_LEFT);
}
return(GetRandomDir());
}
function GetRandomDir() {
var _local1 = Math.random();
if ((0 <= _local1) && (_local1 < 0.25)) {
return(MiniGamePlayer.STA_RUN_UP);
}
if ((0.25 <= _local1) && (_local1 < 0.5)) {
return(MiniGamePlayer.STA_RUN_RIGHT);
}
if ((0.5 <= _local1) && (_local1 < 0.75)) {
return(MiniGamePlayer.STA_RUN_DOWN);
}
return(MiniGamePlayer.STA_RUN_LEFT);
}
function BlooOnSight() {
var _local4;
var _local5;
var _local7 = new AnaCondaFlash.Vector2(_target._rowcol[0], _target._rowcol[1]);
var _local6 = new AnaCondaFlash.Vector2(_rowcol[0], _rowcol[1]);
var _local3 = new AnaCondaFlash.Vector2();
var _local9 = Math.abs(_target._rowcol[0] - _rowcol[0]) + Math.abs(_target._rowcol[1] - _rowcol[1]);
var _local8 = 1 / _local9;
var _local2 = 0;
while (_local2 <= 1) {
_local3.Lerp(_local7, _local6, _local2);
_local4 = Math.floor(_local3._x);
_local5 = Math.floor(_local3._y);
if ((_mapData._block[_local4][_local5] != 0) && (_mapData._block[_local4][_local5] != MiniGameFlow.MAC_BLOCK_ID)) {
return(false);
}
_local2 = _local2 + _local8;
}
return(true);
}
function GetBlooDir() {
if (_target._rowcol[0] == _rowcol[0]) {
if (_target._rowcol[1] < _rowcol[1]) {
return(MiniGamePlayer.STA_RUN_LEFT);
}
return(MiniGamePlayer.STA_RUN_RIGHT);
}
if (_target._rowcol[0] < _rowcol[0]) {
return(MiniGamePlayer.STA_RUN_UP);
}
return(MiniGamePlayer.STA_RUN_DOWN);
}
function GetBlooOrientation() {
var _local3 = _target._rowcol[0] - _rowcol[0];
var _local2 = _target._rowcol[1] - _rowcol[1];
if (Math.abs(_local3) > Math.abs(_local2)) {
if (_local3 > 0) {
return(MiniGamePlayer.STA_RUN_UP);
}
return(MiniGamePlayer.STA_RUN_DOWN);
}
if (_local2 > 0) {
return(MiniGamePlayer.STA_RUN_RIGHT);
}
return(MiniGamePlayer.STA_RUN_LEFT);
}
function OnBlockChange() {
if ((_currentState == MiniGamePlayer.STA_RUN_UP) || (_currentState == MiniGamePlayer.STA_RUN_DOWN)) {
var _local2 = Math.random();
if (NextBlockIsValid(MiniGamePlayer.STA_RUN_LEFT) && (NextBlockIsValid(MiniGamePlayer.STA_RUN_RIGHT))) {
if ((0 <= _local2) && (_local2 < 0.25)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_LEFT);
} else if ((0.25 <= _local2) && (_local2 < 0.5)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_RIGHT);
}
} else if (NextBlockIsValid(MiniGamePlayer.STA_RUN_LEFT)) {
if ((0 <= _local2) && (_local2 < 0.33)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_LEFT);
}
} else if (NextBlockIsValid(MiniGamePlayer.STA_RUN_RIGHT)) {
if ((0 <= _local2) && (_local2 < 0.33)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_RIGHT);
}
}
} else if ((_currentState == MiniGamePlayer.STA_RUN_LEFT) || (_currentState == MiniGamePlayer.STA_RUN_RIGHT)) {
var _local2 = Math.random();
if (NextBlockIsValid(MiniGamePlayer.STA_RUN_UP) && (NextBlockIsValid(MiniGamePlayer.STA_RUN_DOWN))) {
if ((0 <= _local2) && (_local2 < 0.25)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_UP);
} else if ((0.25 <= _local2) && (_local2 < 0.5)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_DOWN);
}
} else if (NextBlockIsValid(MiniGamePlayer.STA_RUN_UP)) {
if ((0 <= _local2) && (_local2 < 0.33)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_UP);
}
} else if (NextBlockIsValid(MiniGamePlayer.STA_RUN_DOWN)) {
if ((0 <= _local2) && (_local2 < 0.33)) {
StartMoveFromState(MiniGamePlayer.STA_RUN_DOWN);
}
}
}
}
function PlayAnim(id) {
if (id == _currentAnim) {
return(undefined);
}
if (id == MiniGamePlayer.ANM_IDLE) {
_refMovieClip.gotoAndStop(ANMFRM_RUN_FRONT);
_refMovieClip.spider.stop();
} else if (id == MiniGamePlayer.ANM_WALK_DOWN) {
_refMovieClip.spider.stop();
_refMovieClip.gotoAndStop(ANMFRM_RUN_FRONT);
_refMovieClip.spider.play();
} else if (id == MiniGamePlayer.ANM_WALK_UP) {
_refMovieClip.spider.stop();
_refMovieClip.gotoAndStop(ANMFRM_RUN_BACK);
_refMovieClip.spider.play();
} else if (id == MiniGamePlayer.ANM_WALK_LEFT) {
Turn(LEFT);
_refMovieClip.spider.stop();
_refMovieClip.gotoAndStop(ANMFRM_RUN_RIGHT);
_refMovieClip.spider.play();
} else if (id == MiniGamePlayer.ANM_WALK_RIGHT) {
Turn(RIGHT);
_refMovieClip.spider.stop();
_refMovieClip.gotoAndStop(ANMFRM_RUN_RIGHT);
_refMovieClip.spider.play();
}
_currentAnim = id;
}
function Turn(side) {
if (((side == LEFT) && (_refMovieClip._xscale > 0)) || ((side == RIGHT) && (_refMovieClip._xscale < 0))) {
_refMovieClip._xscale = -_refMovieClip._xscale;
_lookingLeft = !_lookingLeft;
}
}
function Pause(val) {
if (val) {
_refMovieClip.spider.stop();
_soundCrunch.Mute(true);
} else {
_refMovieClip.spider.play();
_soundCrunch.Mute(false);
}
}
function StopSound() {
_refMovieClip.spider.stop();
_soundCrunch.Stop();
}
static var LEFT = 0;
static var RIGHT = 1;
static var ANMFRM_RUN_FRONT = 1;
static var ANMFRM_RUN_BACK = 2;
static var ANMFRM_RUN_RIGHT = 3;
var _timeToThink = 600;
static var IDLE = 0;
static var SEARCH = 1;
static var PERSUIT = 2;
static var LOST = 3;
static var NORMAL = 0;
static var ANGRY = 1;
static var VERY_ANGRY = 2;
static var SPEED_NORMAL = 0.16;
static var SPEED_ANGRY = 0.21;
static var SPEED_VERY_ANGRY = 0.35;
var _iaState = IDLE;
var _iaSubState = NORMAL;
}
Symbol 1506 MovieClip [__Packages.MiniGameGlobals] Frame 0
class MiniGameGlobals
{
function MiniGameGlobals () {
}
}
Symbol 1073 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.0.377";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 1074 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.0.377";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 1075 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState(__state);
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.0.377";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 1076 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initIcon, getState, enabled, phase, labelPath, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, initializing, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
_local3._visible = true;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
_local2.visible = false;
} else {
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(labelPath.text);
}
function get label() {
return(labelPath.text);
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.0.377";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 1105 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 1106 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 1107 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 1108 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 1109 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent == undefined) {
_local1[eventObj.type](eventObj);
} else {
_local1.handleEvent(eventObj);
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
}
Symbol 1110 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 1111 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 1112 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local4 = mx.core.UIObject.prototype;
var _local8 = mx.skins.SkinElement.prototype;
addGeometry(_local8, _local4);
mx.events.UIEventDispatcher.initialize(_local4);
var _local12 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local4);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local4.getTopLevel;
_local5.createLabel = _local4.createLabel;
_local5.createObject = _local4.createObject;
_local5.createClassObject = _local4.createClassObject;
_local5.createEmptyObject = _local4.createEmptyObject;
_local5.destroyObject = _local4.destroyObject;
_local5.__getTextFormat = _local4.__getTextFormat;
_local5._getTextFormat = _local4._getTextFormat;
_local5.getStyleName = _local4.getStyleName;
_local5.getStyle = _local4.getStyle;
var _local6 = TextField.prototype;
addGeometry(_local6, _local4);
_local6.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local6.move = _local8.move;
_local6.setSize = _local8.setSize;
_local6.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local6.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local6.setColor = function (color) {
this.textColor = color;
};
_local6.getStyle = _local5.getStyle;
_local6.__getTextFormat = _local4.__getTextFormat;
_local6.setValue = function (v) {
this.text = v;
};
_local6.getValue = function () {
return(this.text);
};
_local6.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local6._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local6.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local6.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
_root.addProperty("width", function () {
return(Stage.width);
}, null);
_root.addProperty("height", function () {
return(Stage.height);
}, null);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 1113 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 1114 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 1115 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 1116 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, lastXMouse, lastYMouse, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastXMouse, lastYMouse, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastXMouse = _root._xmouse;
lastYMouse = _root._ymouse;
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.0.377";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1117 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 1118 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 1119 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local1 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local1._setStyle;
_local2.changeTextStyleInChildren = _local1.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local1.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local1.notifyStyleChangeInChildren;
_local2.setStyle = _local1.setStyle;
var _local3 = TextField.prototype;
_local3.setStyle = _local2.setStyle;
_local3.changeTextStyleInChildren = _local1.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 1120 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 1121 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 1122 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.0.377";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 1123 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.0.377";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1124 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 1374 MovieClip Frame 20
stop();
Symbol 1375 MovieClip Frame 6
Symbol 1405 MovieClip Frame 44
Symbol 1430 MovieClip Frame 17
stop();
Symbol 1458 MovieClip Frame 34
stop();
mciPlay.onRelease = function () {
_root.OnGotoGame();
};
mciOptions.onRelease = function () {
_root.OnGotoOptions();
};
mciInstructions.onRelease = function () {
_root.OnGotoInstructions();
};
Symbol 1463 MovieClip Frame 73
stop();
Symbol 1464 MovieClip Frame 1
stop();