Frame 1
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
this.scaleContent = false;
this.onEnterFrame = function () {
var _local3 = this.getBytesTotal();
var _local4 = this.getBytesLoaded();
var _local2 = Math.floor((_local4 * 100) / _local3);
this.mc_mainwindow.mc_loadbutton.mc_loadingbar.gotoAndStop(_local2);
this.mc_mainwindow.mc_loadingtypo.dt_percentage.text = String(_local2);
if (_local4 == _local3) {
peanut.System.SoundEngine.Initialize(this.mc_ImEmpty.createEmptyMovieClip("Sounds", this.mc_ImEmpty.getNextHighestDepth()));
this.gotoAndStop("main");
delete this.onEnterFrame;
}
};
stop();
stop();
Frame 40
template.Storage.GetInstanceOf().Reset();
template.Storage.GetInstanceOf().__set__LevelStorage(0);
template.GameManager2.GetInstance().OnShutdown();
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(true);
template.SoundLoader.GetInstance().LoadIntroSound();
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
template.SoundLoader.GetInstance().music = true;
this.mc_mainwindow.gotoAndPlay(34);
if (_root.runOnce == undefined) {
_root.runOnce = false;
}
stop();
Frame 41
Frame 50
template.GameManager2.GetInstance().OnShutdown();
template.GameManager2.GetInstance();
if (!_root.runOnce) {
onEnterFrame = function () {
template.GameManager2.GetInstance().Update();
};
_root.runOnce = true;
}
stop();
Symbol 12 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 2
stop();
Symbol 28 MovieClip Frame 3
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 7
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 1
stop();
Symbol 71 MovieClip [Main] Frame 1
stop();
Symbol 89 MovieClip [DisparoAni02] Frame 14
stop();
Symbol 90 MovieClip [Bullet] Frame 1
stop();
Symbol 90 MovieClip [Bullet] Frame 2
stop();
Symbol 102 MovieClip Frame 25
stop();
Symbol 134 MovieClip Frame 100
stop();
Symbol 144 MovieClip Frame 8
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 3
stop();
Symbol 149 MovieClip Frame 1
bolitas.setMask(mascarabolitas);
Symbol 149 MovieClip Frame 33
stop();
Symbol 149 MovieClip Frame 39
stop();
Instance of Symbol 148 MovieClip in Symbol 149 MovieClip Frame 39
on (release) {
_root.gotoAndStop("game");
}
Symbol 1021 MovieClip [__Packages.peanut.System.SoundEngine] Frame 0
class peanut.System.SoundEngine
{
static var mc, sounds, soundMuted, sfx_volume, bkg_volume;
function SoundEngine () {
}
static function Initialize(_mc) {
var _local1;
var _local2;
if (initialized) {
return(undefined);
}
mc = _mc;
sounds = new Array(MAX_CHANNELS + 1);
soundMuted = false;
sfx_volume = MAX_VOLUME;
bkg_volume = MAX_VOLUME;
_local1 = 0;
while (_local1 < MAX_CHANNELS) {
_local2 = mc.createEmptyMovieClip(("sfx_channel_" + _local1).toString(), BASE_DEPTH + _local1);
sounds[_local1] = new Object();
sounds[_local1].snd = null;
sounds[_local1].name = "";
_local1++;
}
_local2 = mc.createEmptyMovieClip("sfx_channel_" + MAX_CHANNELS, BASE_DEPTH + MAX_CHANNELS);
sounds[MAX_CHANNELS] = new Object();
sounds[MAX_CHANNELS].snd = null;
sounds[MAX_CHANNELS].name = "";
initialized = true;
}
static function ResetSoundSlot(ind) {
for (var _local2 in mc) {
if (typeof(mc[_local2]) == "movieclip") {
if (_local2 == ("sfx_channel_" + ind).toString()) {
break;
}
}
}
sounds[ind].snd.stop(sounds[ind].name);
delete sounds[ind].snd;
sounds[ind].snd = new Sound(mc[_local2]);
sounds[ind].name = "";
}
static function LoadSFX(soundName) {
var _local1;
_local1 = 0;
while (_local1 < MAX_CHANNELS) {
if ((sounds[_local1].name == soundName) && (sounds[_local1].snd.duration == sounds[_local1].snd.position)) {
return(_local1);
}
_local1++;
}
_local1 = 0;
while (_local1 < MAX_CHANNELS) {
if ((sounds[_local1].snd.duration == undefined) || (sounds[_local1].snd.duration == sounds[_local1].snd.position)) {
break;
}
_local1++;
}
if (_local1 == MAX_CHANNELS) {
return(-1);
}
ResetSoundSlot(_local1);
sounds[_local1].name = soundName;
sounds[_local1].snd.attachSound(soundName);
sounds[_local1].snd.stop(soundName);
return(_local1);
}
static function LoadBKG(soundName) {
if (sounds[MAX_CHANNELS].name != soundName) {
ResetSoundSlot(MAX_CHANNELS);
sounds[MAX_CHANNELS].name = soundName;
sounds[MAX_CHANNELS].snd.attachSound(soundName);
sounds[MAX_CHANNELS].snd.stop(soundName);
}
}
static function PlaySFX(ind, loopSound) {
if ((ind >= MAX_CHANNELS) || (ind < 0)) {
return(undefined);
}
if (soundMuted) {
sounds[ind].snd.setVolume(0);
} else {
sounds[ind].snd.setVolume(sfx_volume);
}
if (!loopSound) {
sounds[ind].snd.start(0, 1);
} else {
sounds[ind].snd.start(0, MAX_REPEATS);
}
}
static function PlayBKG() {
if (soundMuted) {
sounds[MAX_CHANNELS].snd.setVolume(0);
} else {
sounds[MAX_CHANNELS].snd.setVolume(bkg_volume);
}
sounds[MAX_CHANNELS].snd.start(0, MAX_REPEATS);
}
static function StopSFX(ind) {
if ((ind >= MAX_CHANNELS) || (ind < 0)) {
return(undefined);
}
if (sounds[ind].name != "") {
sounds[ind].snd.stop(sounds[ind].name);
}
}
static function StopAllSFX() {
var _local1 = 0;
while (_local1 < MAX_CHANNELS) {
StopSFX(_local1);
_local1++;
}
}
static function StopBKG() {
if (sounds[MAX_CHANNELS].name != "") {
sounds[MAX_CHANNELS].snd.stop(sounds[MAX_CHANNELS].name);
}
}
static function get SFXVolume() {
return(sfx_volume);
}
static function set SFXVolume(nValue) {
var _local1;
sfx_volume = nValue;
_local1 = 0;
while (_local1 < MAX_CHANNELS) {
sounds[_local1].snd.setVolume(sfx_volume);
_local1++;
}
//return(SFXVolume);
}
static function get BKGVolume() {
return(bkg_volume);
}
static function set BKGVolume(nValue) {
bkg_volume = nValue;
sounds[MAX_CHANNELS].snd.setVolume(bkg_volume);
//return(BKGVolume);
}
static function get Muted() {
return(soundMuted);
}
static function set Muted(nValue) {
var _local1;
soundMuted = nValue;
if (soundMuted) {
_local1 = 0;
while (_local1 <= MAX_CHANNELS) {
sounds[_local1].snd.setVolume(0);
_local1++;
}
} else {
_local1 = 0;
while (_local1 < MAX_CHANNELS) {
sounds[_local1].snd.setVolume(sfx_volume);
_local1++;
}
sounds[MAX_CHANNELS].snd.setVolume(bkg_volume);
}
//return(Muted);
}
static function SetIndividualVolume(ind, percent) {
if (soundMuted || (sounds[ind].name == "")) {
return(undefined);
}
if (ind < MAX_CHANNELS) {
sounds[ind].snd.setVolume((percent * sfx_volume) / MAX_VOLUME);
} else {
sounds[MAX_CHANNELS].snd.setVolume((percent * bkg_volume) / MAX_VOLUME);
}
}
static function Reset() {
for (var _local2 in sounds) {
sounds[_local2].snd.stop();
delete sounds[_local2].snd;
delete sounds[_local2];
}
for (var _local1 in mc) {
if (typeof(mc[_local1]) == "movieclip") {
if (_local1.substring(0, 11) == "sfx_channel") {
mc[_local1].swapDepths(MAX_CHANNELS + 1);
mc[_local1].removeMovieClip();
}
}
}
delete sounds;
initialized = false;
Initialize(mc);
}
static function GetSound(i) {
return(sounds[i]);
}
static var MAX_VOLUME = 100;
static var MAX_CHANNELS = 64;
static var BASE_DEPTH = -16384;
static var MAX_REPEATS = 9999;
static var initialized = false;
}
Symbol 1022 MovieClip [__Packages.template.GameManager2] Frame 0
class template.GameManager2
{
var _firstLifeItem, _secondLifeItem, _mc, _fadePutin;
function GameManager2 (mc, interfaceMC) {
InitializeThis();
_firstLifeItem = false;
_secondLifeItem = false;
_mc = mc.createEmptyMovieClip("game", mc.getNextHighestDepth());
_levelLoader = new template.Level.LevelLoader(_mc);
_levelLoader.__set__ActualLevel(template.Storage.GetInstanceOf().LevelStorage);
_levelLoader.Load(4, 0.7);
_percentageOffset = (_levelLoader.__get__ActualLevel() * 5) + 60;
if (_levelLoader.__get__ActualLevel() != 6) {
var _local3 = 0;
while (_local3 < MAX_ENEMY_1) {
var _local4 = _mc.getNextHighestDepth();
var _local5 = _mc.attachMovie("Enemy", "Spore" + _local4, _local4);
template.Characters.EnemyManager.GetInstance().SetEnemy(_local5);
_local3++;
}
}
_fadePutin = new peanut.FX.Transition(_root, peanut.FX.Transition.BACKWARD, new flash.geom.Rectangle(Stage.width, Stage.height), 0, 10, 100);
template.Characters.BulletManager.GetInstance().SetScreenParameters(Stage.width, Stage.height, _mc);
template.Characters.BulletManager.GetInstance().Start(MAX_ENEMY_1, MAX_ENEMY_1);
if (_levelLoader.__get__ActualLevel() != 6) {
template.Characters.EnemyManager.GetInstance().SetScreenParameters(Stage.width, Stage.height, _mc);
template.Characters.EnemyManager.GetInstance().Start(MAX_ENEMY_1);
}
var _local6 = _mc.attachMovie("MovieClipAnimations", "mc_ben", _mc.getNextHighestDepth());
_cBen = new template.Characters.BenCharacter(_mc._xmouse, _mc._ymouse, _local6);
_cBen._inputType = template.Storage.GetInstanceOf().InputType;
_hudMC = interfaceMC;
template.Characters.EnemyManager.GetInstance().__set__PlayerInstance(_cBen);
_local6 = _mc.attachMovie("INSTRUCCIONES_mc", "mc_help", _mc.getNextHighestDepth());
var _local9 = _mc.attachMovie("OBJETIVO_mc", "mc_objectives", _mc.getNextHighestDepth());
var _local7 = _root.attachMovie("PERDISTE_mc", "mc_loser", _root.getNextHighestDepth());
var _local10 = _mc.attachMovie("GANASTE_MC", "mc_win", _mc.getNextHighestDepth());
var _local8 = _mc.attachMovie("NUMERO DE NIVEL_MC", "mc_stage", _mc.getNextHighestDepth());
_interface = new template.Interface.Interface(_hudMC, _cBen, _local6, _local9, _local7, _local10, _local8);
template.Characters.CollisionManager.__get__Instance().Reset();
template.Characters.CollisionManager.__get__Instance().SetGroupMax(5);
template.Characters.CollisionManager.__get__Instance().Register(_cBen, 0);
_interface.__set__ObjectivesFlag(template.Storage.GetInstanceOf().ObjFlag);
template.Storage.GetInstanceOf().__set__LevelStorage(_interface.Level);
_levelLoader.__set__ActualLevel(template.Storage.GetInstanceOf().LevelStorage);
var _local3 = 0;
while (_local3 < MAX_ENEMY_1) {
if (template.Storage.GetInstanceOf().__get__LevelStorage() != 6) {
template.Characters.CollisionManager.__get__Instance().Register(template.Characters.EnemyManager.GetInstance().GetSpore(_local3), 2);
}
_local3++;
}
_local3 = 0;
while (_local3 < MAX_ENEMY_1) {
if (template.Storage.GetInstanceOf().__get__LevelStorage() != 6) {
template.Characters.CollisionManager.__get__Instance().Register(template.Characters.EnemyManager.GetInstance().GetEnemy(_local3), 2);
}
_local3++;
}
_local3 = 0;
while (_local3 < MAX_ENEMY_1) {
template.Characters.CollisionManager.__get__Instance().Register(template.Characters.BulletManager.GetInstance().GetEnemyBullet(_local3), 3);
_local3++;
}
_local3 = 0;
while (_local3 < MAX_ENEMY_1) {
template.Characters.CollisionManager.__get__Instance().Register(template.Characters.BulletManager.GetInstance().GetPlayerBullet(_local3), 3);
_local3++;
}
_stateMachine = 3;
if (template.Storage.GetInstanceOf().__get__ObjFlag() == true) {
_stateMachine = 1;
}
if (_levelLoader.__get__ActualLevel() == 6) {
template.Characters.EnemyManager.GetInstance().OnShutdown();
}
if (template.Storage.GetInstanceOf().__get__LevelStorage() == 6) {
_testBoss = new template.Characters.Boss(300, 200, _mc.attachMovie("bossLib", "bossLib", _mc.getNextHighestDepth()));
_testBoss.__get__MC()._visible = false;
_testBoss.__set__Enable(false);
}
}
function get Boss() {
return(_testBoss);
}
function get PercentageOffset() {
return(_percentageOffset);
}
function set PercentageOffset(nVal) {
_percentageOffset = nVal;
//return(PercentageOffset);
}
function get Level() {
return(_levelLoader);
}
function get Ben() {
return(_cBen);
}
function get Distance() {
var _local2 = _cBen.__get__MC().getBounds(_levelLoader.__get__SBKGMC());
return(_local2.xMin);
}
function OnShutdown() {
_mc.swapDepths(0);
_mc.removeMovieClip();
_fadePutin.reset();
_interface.OnShutdown();
if (_testBoss) {
_testBoss.Reset();
delete _testBoss;
_testBoss = null;
}
template.Characters.EnemyManager.GetInstance().OnShutdown();
template.Characters.BulletManager.GetInstance().OnShutdown();
_levelLoader.OnShutdown();
_cBen.OnShutdown();
delete _cBen;
template.Item.ItemManager.__get__Instance().OnShutdown();
template.SoundLoader.GetInstance().exitMusic = true;
template.Characters.CollisionManager.__get__Instance()().Reset();
Reset();
}
function InitializeThis() {
_mc.swapDepths(0);
_mc.removeMovieClip();
_interface.OnShutdown();
if (_testBoss) {
_testBoss.Reset();
delete _testBoss;
_testBoss = null;
}
delete _cBen;
_levelLoader.OnShutdown();
template.Characters.EnemyManager.GetInstance().OnShutdown();
template.Characters.BulletManager.GetInstance().OnShutdown();
_cBen.OnShutdown();
template.Item.ItemManager.__get__Instance().OnShutdown();
template.Characters.CollisionManager.__get__Instance().Reset();
}
function get HUDMC() {
return(_hudMC);
}
function get Interface() {
return(_interface);
}
static function GetInstance() {
if (_instanceOf == null) {
_instanceOf = new template.GameManager2(_root.mc_ImEmpty, _root.mc_interface);
}
return(_instanceOf);
}
static function Reset() {
_instanceOf = null;
}
function set StateMachine(sMachine) {
_stateMachine = sMachine;
//return(StateMachine);
}
function get StateMachine() {
return(_stateMachine);
}
function Update(Void) {
switch (_stateMachine) {
case 0 :
if (template.Storage.GetInstanceOf().__get__ObjFlag() == false) {
_interface.InitObjectives();
template.Storage.GetInstanceOf().__set__ObjFlag(_interface.ObjectivesFlag);
}
break;
case 1 :
if ((!_interface.__get__IsOnPause()) && (_cBen.__get__EnterLevelFlag())) {
_interface.StageBanner();
_interface.Update();
_cBen.Update();
template.Characters.BulletManager.GetInstance().Update();
template.Item.ItemManager.__get__Instance().GeneratePowder();
template.Item.ItemManager.__get__Instance().Update();
if ((_cBen.__get__Health() < 30) && (template.Storage.GetInstanceOf().__get__LevelStorage() > 5)) {
template.Item.ItemManager.__get__Instance().GenerateLife();
}
if (template.Storage.GetInstanceOf().__get__LevelStorage() == 6) {
if (_testBoss) {
_testBoss.Update();
_testBoss.__get__MC()._visible = true;
_testBoss.__set__Enable(true);
if (_testBoss.__get__HP() < 5) {
if (_cBen.__get__Health() < 2) {
_cBen.__set__Health(2);
}
if (_testBoss.__get__MC().mc._currentframe == _testBoss.__get__MC().mc._totalframes) {
_cBen.ExitLevel();
}
}
}
} else {
template.Characters.EnemyManager.GetInstance().Update();
}
if (_levelLoader.__get__ActualLevel() == 6) {
_interface.__set__MapMarkerScroll(391);
}
if (_levelLoader.__get__ActualLevel() != 6) {
template.Characters.EnemyManager.GetInstance().__set__StopScroll(_cBen.HoldBen);
}
_cBen._inputType = template.Storage.GetInstanceOf().InputType;
if (!_cBen.__get__HoldBen()) {
_levelLoader.UpdateLevelScroll();
}
if (_levelLoader.__get__ActualLevel() != _interface.__get__Level()) {
if (template.Characters.EnemyManager.GetInstance().__get__EnemyCount() >= _percentageOffset) {
_cBen.ExitLevel();
if (_cBen.__get__ExitLevelFlag() == true) {
_levelLoader.__set__ActualLevel(_interface.Level);
template.Storage.GetInstanceOf().__set__LevelStorage(_interface.Level);
var _local2 = template.Storage.GetInstanceOf().__get__LevelStorage();
if (template.Storage.GetInstanceOf().__get__LevelStorage() == 7) {
_stateMachine = 6;
}
switch (_local2) {
case 1 :
_stateMachine = 25;
break;
case 3 :
_stateMachine = 25;
break;
case 5 :
_stateMachine = 25;
break;
case 0 :
_stateMachine = 3;
break;
case 2 :
_stateMachine = 3;
break;
case 4 :
_stateMachine = 3;
break;
case 6 :
_stateMachine = 3;
}
_interface.__set__IsOnPause(false);
}
} else {
_cBen.ExitLevel();
if (_cBen.__get__ExitLevelFlag() == true) {
_interface.Level = _interface.Level - 1;
_interface.SLevel = _interface.SLevel - 1;
_levelLoader.__set__ActualLevel(_interface.Level);
template.Storage.GetInstanceOf().__set__LevelStorage(_levelLoader.ActualLevel);
_stateMachine = 4;
_interface.__set__IsOnPause(false);
}
}
}
if (_testBoss) {
if ((_cBen.__get__Health() < 2) && (_testBoss.__get__HP() > 5)) {
if (_cBen.__get__MC().mc_anim._currentframe == (_cBen.__get__MC().mc_anim._totalframes - 1)) {
template.SoundLoader.GetInstance()._benKO = true;
_cBen.__get__MC()._visible = false;
_stateMachine = 4;
}
} else if ((_cBen.__get__Health() < 2) && (_testBoss.__get__HP() < 5)) {
_cBen.__set__Health(2);
}
}
if (_cBen.__get__Health() < 2) {
if (_cBen.__get__MC().mc_anim._currentframe == (_cBen.__get__MC().mc_anim._totalframes - 1)) {
template.SoundLoader.GetInstance()._benKO = true;
_cBen.__get__MC()._visible = false;
_stateMachine = 4;
}
}
if (((_interface.__get__MapMarkerScroll() >= 330) && (!_firstLifeItem)) && (template.Storage.GetInstanceOf().__get__LevelStorage() != 6)) {
template.Item.ItemManager.__get__Instance().GenerateLife();
_firstLifeItem = true;
}
template.Characters.CollisionManager.__get__Instance().Check(0, 3);
template.Characters.CollisionManager.__get__Instance().Check(0, 2);
if (template.Storage.GetInstanceOf().__get__LevelStorage() == 6) {
template.Characters.CollisionManager.__get__Instance().Check(3, 0);
}
template.Characters.CollisionManager.__get__Instance().Check(0, 1);
template.Characters.CollisionManager.__get__Instance().Check(3, 2);
template.SoundLoader.GetInstance().Update();
} else {
if (!_cBen.__get__EnterLevelFlag()) {
_cBen.EnterLevel();
}
if (_interface.__get__MapMarkerScroll() >= 390) {
if (_cBen.__get__Health() > 2) {
_cBen.ExitLevel();
_levelLoader.UpdateLevelScroll();
template.Characters.BulletManager.GetInstance().OnEOL();
if (_levelLoader.__get__ActualLevel() != 6) {
template.Characters.EnemyManager.GetInstance().__set__EOL(true);
}
if (_levelLoader.__get__ActualLevel() != 6) {
template.Characters.EnemyManager.GetInstance().Update();
}
}
}
}
break;
case 2 :
OnShutdown();
break;
case 3 :
_interface.LevelTransition();
_interface.__get__TransMC()._visible = _stageTrans;
_stateMachine = 7;
break;
case 4 :
_interface.__set__IsOnPause(true);
_interface.GameOver();
break;
case 5 :
_interface.__set__IsOnPause(false);
_stateMachine = 2;
break;
case 6 :
_testBoss.__get__MC()._visible = false;
_interface.WinnerScreen();
break;
case 7 :
if (_interface.__get__Level() == 7) {
_stateMachine = 6;
}
if (_interface.__get__TransMC()._currentframe == _interface.__get__TransMC()._totalframes) {
_interface.__get__TransMC().removeMovieClip();
if (template.Storage.GetInstanceOf().__get__ObjFlag() == false) {
_stateMachine = 0;
} else {
_stateMachine = 2;
}
}
break;
case 32 :
break;
case 25 :
_fadePutin.start();
if (!_fadePutin.finished) {
break;
}
_stageTrans = false;
_stateMachine = 3;
}
}
var _stateMachine = 0;
static var _instanceOf = null;
var _levelLoader = null;
var _cBen = null;
var _interface = null;
var _hudMC = null;
var MAX_ENEMY_1 = 20;
var _stageTrans = true;
var _percentageOffset = 0;
var _testBoss = null;
}
Symbol 1023 MovieClip [__Packages.peanut.FX.Transition] Frame 0
class peanut.FX.Transition
{
var _mc, _parent_mc, finished;
function Transition (mParent, nDirection, area, colour, alphaPerFrame, maxAlpha) {
var _local3 = mParent.getNextHighestDepth();
_mc = mParent.createEmptyMovieClip("Transition" + _local3, _local3);
_parent_mc = mParent;
_mc.moveTo(area.left, area.top);
_mc.beginFill(colour);
_mc.lineTo(area.right, area.top);
_mc.lineTo(area.right, area.bottom);
_mc.lineTo(area.left, area.bottom);
_mc.endFill();
finished = true;
if ((nDirection == BACKWARD) || (nDirection == BACKANDFORTH)) {
_mc._alpha = 0;
}
_mc.FadeDirection = nDirection;
_mc.alphaQ = alphaPerFrame;
_mc.rObject = this;
_mc.looped = false;
_mc.maxAlpha = ((maxAlpha < 100) ? (maxAlpha) : 100);
}
function start() {
trace("Estoy corriendo en alguna parte: " + _mc);
if (!finished) {
return(undefined);
}
_mc.onEnterFrame = function () {
if ((((this._alpha - this.alphaQ) > 0) && (this.FadeDirection == peanut.FX.Transition.FORWARD)) || ((((this._alpha - this.alphaQ) > 0) && (this.FadeDirection == peanut.FX.Transition.BACKANDFORTH)) && (this.looped == true))) {
this._alpha = this._alpha - this.alphaQ;
}
if ((((this._alpha - this.alphaQ) < this.maxAlpha) && (this.FadeDirection == peanut.FX.Transition.BACKWARD)) || ((((this._alpha - this.alphaQ) < this.maxAlpha) && (this.FadeDirection == peanut.FX.Transition.BACKANDFORTH)) && (this.looped == false))) {
this._alpha = this._alpha + this.alphaQ;
} else {
this.looped = true;
}
if (((((this._alpha - this.alphaQ) <= 0) && (this.FadeDirection == peanut.FX.Transition.FORWARD)) || (((this._alpha + this.alphaQ) >= this.maxAlpha) && (this.FadeDirection == peanut.FX.Transition.BACKWARD))) || ((((this._alpha - this.alphaQ) <= 0) && (this.FadeDirection == peanut.FX.Transition.BACKANDFORTH)) && (this.looped == true))) {
this.rObject.finished = true;
this.onEnterFrame = null;
if ((this.FadeDirection == peanut.FX.Transition.FORWARD) || (this.FadeDirection == peanut.FX.Transition.BACKANDFORTH)) {
this._visible = false;
}
}
};
}
function set alphaQ(iVal) {
_mc.alphaQ = iVal;
//return(alphaQ);
}
function get alphaQ() {
return(_mc.alphaQ);
}
function show(nVal) {
_mc._visible = nVal;
}
function reset() {
_mc._visible = true;
_mc.looped = false;
_mc._alpha = ((_mc.FadeDirection == FORWARD) ? 100 : 0);
finished = true;
}
function destroy() {
_mc.removeMovieClip();
}
static var FORWARD = 0;
static var BACKWARD = 1;
static var BACKANDFORTH = 2;
}
Symbol 1024 MovieClip [__Packages.template.Level.LevelLoader] Frame 0
class template.Level.LevelLoader
{
var _actualLevel;
function LevelLoader (levelMC) {
_levelMC = levelMC;
_levelSBKG = new peanut.BKG.ScrolledBackground(_levelMC, Stage.width, Stage.height);
_levelPBKG = new peanut.BKG.ParallaxBackground(_levelMC);
}
function Load(firstHorSpeedPBKG, hSpeedSBKG) {
switch (_actualLevel) {
case 0 :
_levelPBKG.addElement(["Symbol 2"], 600, 400, 0, 400);
_levelPBKG.addElement(["Symbol 1"], 1011, 400, 0, 400);
_levelPBKG.getElement(0).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(0).applyFilters();
_levelPBKG.getElement(1).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(1).applyFilters();
_levelPBKG.__set__firstHorSpeed(firstHorSpeedPBKG);
_levelSBKG.addElement("Symbol 3", 0, 0);
_levelSBKG.__set__hSpeed(hSpeedSBKG);
break;
case 1 :
_levelPBKG.addElement(["Symbol 2"], 600, 400, 0, 400);
_levelPBKG.addElement(["Symbol 1"], 1011, 400, 0, 400);
_levelPBKG.getElement(0).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(0).applyFilters();
_levelPBKG.getElement(1).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(1).applyFilters();
_levelPBKG.__set__firstHorSpeed(firstHorSpeedPBKG);
_levelSBKG.addElement("Symbol 3", 0, 0);
_levelSBKG.__set__hSpeed(hSpeedSBKG);
break;
case 2 :
_levelPBKG.addElement(["ParallaxBKGFungus"], 962, 172, 0, 400);
_levelPBKG.getElement(0).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(0).applyFilters();
_levelPBKG.__set__firstHorSpeed(firstHorSpeedPBKG);
_levelSBKG.addElement("ScrolledBKGFungus", 0, 0);
_levelSBKG.__set__hSpeed(hSpeedSBKG);
break;
case 3 :
_levelPBKG.addElement(["ParallaxBKGFungus"], 962, 172, 0, 400);
_levelPBKG.getElement(0).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(0).applyFilters();
_levelPBKG.__set__firstHorSpeed(firstHorSpeedPBKG);
_levelSBKG.addElement("ScrolledBKGFungus", 0, 0);
_levelSBKG.__set__hSpeed(hSpeedSBKG);
break;
case 4 :
_levelPBKG.addElement(["PBKGLevel3"], 1350, 400, 0, 400);
_levelPBKG.getElement(0).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(0).applyFilters();
_levelPBKG.__set__firstHorSpeed(firstHorSpeedPBKG);
_levelSBKG.addElement("SBKGLevel3", 0, 0);
_levelSBKG.__set__hSpeed(hSpeedSBKG);
break;
case 5 :
_levelPBKG.addElement(["PBKGLevel3"], 1350, 400, 0, 400);
_levelPBKG.getElement(0).addFilter(new flash.filters.BlurFilter(2, 0, 5));
_levelPBKG.getElement(0).applyFilters();
_levelPBKG.__set__firstHorSpeed(firstHorSpeedPBKG);
_levelSBKG.addElement("SBKGLevel3", 0, 0);
_levelSBKG.__set__hSpeed(hSpeedSBKG);
break;
case 6 :
_levelPBKG.destroy();
_levelSBKG.addElement("SBKGLevel3", 0, 0);
}
}
function UpdateLevelScroll() {
if (_actualLevel != 6) {
_levelPBKG.hScroll(peanut.BKG.Background.RIGHT);
_levelSBKG.hScroll(peanut.BKG.Background.RIGHT);
}
}
function get ActualLevel() {
return(_actualLevel);
}
function set ActualLevel(actualLevel) {
if (actualLevel == (MAX_LEVEL + 1)) {
template.GameManager2.GetInstance().__set__StateMachine(6);
} else {
_actualLevel = actualLevel;
}
//return(ActualLevel);
}
function get ScrolledBackgroundWidth() {
return(_levelSBKG.getElement(0)._width);
}
function get ScrolledBackgroundHeight() {
return(_levelSBKG.getElement(0)._width);
}
function get LevelMC() {
return(_levelMC);
}
function OnShutdown(Void) {
_levelMC.swapDepths(0);
_levelMC.removeMovieClip();
_levelSBKG.destroy();
_levelPBKG.destroy();
}
function get SBKGMC() {
return(_levelSBKG.getElement(0));
}
var _levelPBKG = null;
var _levelSBKG = null;
var MAX_LEVEL = 7;
var _levelMC = null;
}
Symbol 1025 MovieClip [__Packages.peanut.BKG.Background] Frame 0
class peanut.BKG.Background
{
var m_parent_mc, m_nIndex, m_aElements, m_container_mc;
function Background (mParent) {
var _local2 = mParent.getNextHighestDepth();
m_parent_mc = mParent;
m_nIndex = 0;
m_aElements = new Array();
m_container_mc = m_parent_mc.createEmptyMovieClip("m_container_mc" + _local2, _local2);
}
function addElement(sClass, nX, nY) {
var _local2 = m_container_mc.getNextHighestDepth();
m_aElements[m_nIndex] = m_container_mc.attachMovie(sClass, sClass + _local2, _local2);
m_aElements[m_nIndex]._x = nX;
m_aElements[m_nIndex]._y = nY;
m_aElements[m_nIndex].m_nX = nX;
m_aElements[m_nIndex].m_nY = nY;
m_nIndex++;
}
function getElement(nIndex) {
return(m_aElements[nIndex]);
}
function removeElement(nVal) {
m_aElements[nVal].removeMovieClip();
m_nIndex--;
}
function insertElement(nVal) {
m_aElements[nVal].removeMovieClip();
m_nIndex--;
}
function get mc() {
return(m_container_mc);
}
function destroy() {
var _local2 = 0;
while (_local2 < m_nIndex) {
m_aElements[_local2].removeMovieClip();
_local2++;
}
delete m_aElements;
}
static var LEFT = 1;
static var RIGHT = -1;
static var DOWN = 1;
static var UP = -1;
}
Symbol 1026 MovieClip [__Packages.peanut.BKG.ParallaxBackground] Frame 0
class peanut.BKG.ParallaxBackground extends peanut.BKG.Background
{
var m_nMult, m_container_mc, m_nIndex, m_aElements, m_nWidth, m_nHeight, m_nYMax, __get__firstHorSpeed, __get__lastHorSpeed, __get__firstVerSpeed, __get__lastVerSpeed;
function ParallaxBackground (mParent) {
super(mParent);
m_nMult = 2;
}
function addElement(sClass, nTileHorLimit, nTileVerLimit, nX, nY) {
m_aElements[m_nIndex] = new peanut.BKG.TiledBackground(m_container_mc, sClass, nTileHorLimit, nTileVerLimit, nX, nY);
m_aElements[m_nIndex].hSpeed = 0;
if (!m_nIndex) {
m_nWidth = m_aElements[m_nIndex].getMc(0)._width;
m_nHeight = m_aElements[m_nIndex].getMc(0)._height;
m_nYMax = Math.abs(nY);
}
m_nIndex++;
}
function getElement(iIndex) {
return(m_aElements[iIndex]);
}
function set speedMult(iVal) {
m_nMult = iVal;
//return(speedMult);
}
function get speedMult() {
return(m_nMult);
}
function set firstHorSpeed(nVal) {
var _local3 = nVal;
var _local2 = 0;
while (_local2 < m_nIndex) {
m_aElements[_local2].hSpeed = _local3;
_local3 = _local3 * m_nMult;
_local2++;
}
//return(__get__firstHorSpeed());
}
function set lastHorSpeed(nVal) {
var _local3 = nVal;
var _local2 = m_nIndex - 1;
while (_local2 >= 0) {
m_aElements[_local2].hSpeed = _local3;
_local3 = _local3 / m_nMult;
_local2--;
}
//return(__get__lastHorSpeed());
}
function set firstVerSpeed(nVal) {
var _local3 = nVal;
var _local2 = 0;
while (_local2 < m_nIndex) {
m_aElements[_local2].vSpeed = _local3;
_local3 = _local3 * m_nMult;
_local2++;
}
//return(__get__firstVerSpeed());
}
function set lastVerSpeed(nVal) {
var _local3 = nVal;
var _local2 = m_nIndex - 1;
while (_local2 >= 0) {
m_aElements[_local2].vSpeed = _local3;
_local3 = _local3 / m_nMult;
_local2--;
}
//return(__get__lastVerSpeed());
}
function hScroll(nDir) {
var _local2;
_local2 = 0;
while (_local2 < m_nIndex) {
m_aElements[_local2].hScroll(nDir);
_local2++;
}
}
function vScroll(nDir) {
var _local2 = m_aElements[0].vSpeed;
if (nDir == peanut.BKG.Background.DOWN) {
if ((m_container_mc._y - _local2) > 0) {
m_container_mc._y = m_container_mc._y - _local2;
}
} else if ((m_container_mc._y + _local2) < m_nYMax) {
m_container_mc._y = m_container_mc._y + _local2;
}
}
function stopAllElements() {
var _local2;
_local2 = 0;
while (_local2 < m_nIndex) {
m_aElements[_local2].hSpeed = (m_aElements[_local2].vSpeed = 0);
_local2++;
}
}
function destroy() {
var _local2;
_local2 = 0;
while (_local2 < m_nIndex) {
m_aElements[_local2].destroy();
_local2++;
}
}
}
Symbol 1027 MovieClip [__Packages.peanut.BKG.TiledBackground] Frame 0
class peanut.BKG.TiledBackground extends peanut.BKG.Background
{
var m_nCant, m_nLoop, m_nXMax, m_nYMax, m_nX, m_nY, m_aFilters, m_nHspeed, m_nVspeed, m_aClass, m_nCurrentDir, m_nActual, m_nNext, m_container_mc, m_aElements, m_nIndex, m_nLast, m_prev_mc;
function TiledBackground (mParent, aClass, nTileHorLimit, nTileVerLimit, nX, nY) {
super(mParent);
m_nCant = aClass.length;
m_nLoop = 0;
m_nXMax = nTileHorLimit;
m_nYMax = nTileVerLimit;
m_nX = nX;
m_nY = nY;
m_aFilters = new Array();
m_nHspeed = (m_nVspeed = 10);
m_aClass = new Array(m_nCant);
var _local3 = 0;
while (_local3 < m_nCant) {
m_aClass[_local3] = new String(aClass[_local3]);
_local3++;
}
m_nCurrentDir = peanut.BKG.Background.RIGHT;
m_nActual = 0;
m_nNext = 1;
var _local5 = m_container_mc.getNextHighestDepth();
m_aElements[m_nActual] = m_container_mc.attachMovie(aClass[m_nActual], "m_aElements" + m_nActual, _local5);
m_aElements[m_nActual]._x = nX;
m_aElements[m_nActual]._y = nY;
m_nIndex++;
_local5++;
if (m_aFilters.length) {
m_aElements[m_nActual].filter = m_aFilters;
}
if (m_nCant == 1) {
m_aClass[m_nNext] = m_aClass[0];
m_nCant = 2;
}
m_nLast = m_nCant - 1;
m_aElements[m_nNext] = m_container_mc.attachMovie(m_aClass[m_nNext], "m_aElements" + m_nNext, _local5);
m_aElements[m_nNext]._x = nTileHorLimit;
m_aElements[m_nNext]._y = nY;
m_nIndex++;
}
function hScroll(nDir) {
var _local4;
var _local3;
_local4 = m_container_mc.getNextHighestDepth();
if (nDir != m_nCurrentDir) {
m_nCurrentDir = nDir;
m_prev_mc = m_aElements[m_nNext];
if (nDir == peanut.BKG.Background.RIGHT) {
m_nNext = ((m_nActual < m_nLast) ? (m_nActual + 1) : 0);
} else {
m_nNext = ((!m_nActual) ? (m_nLast) : (m_nActual - 1));
}
m_aElements[m_nNext] = m_container_mc.attachMovie(m_aClass[m_nNext], "m_aElements" + m_nNext, _local4);
_local3 = ((nDir == peanut.BKG.Background.RIGHT) ? (m_aElements[m_nActual]._x + m_aElements[m_nActual]._width) : (m_aElements[m_nActual]._x - m_aElements[m_nActual]._width));
m_aElements[m_nNext]._x = _local3;
m_aElements[m_nNext]._y = m_nY;
}
if (((nDir == peanut.BKG.Background.RIGHT) && ((m_aElements[m_nActual]._x - m_nHspeed) <= (-m_nXMax))) || ((nDir == peanut.BKG.Background.LEFT) && ((m_aElements[m_nActual]._x + m_nHspeed) >= m_nXMax))) {
m_aElements[m_nActual].removeMovieClip();
m_nActual = m_nNext;
if (nDir == peanut.BKG.Background.RIGHT) {
if (m_nActual == m_nLast) {
m_nNext = 0;
} else {
m_nNext = m_nActual + 1;
}
} else if (!m_nActual) {
m_nNext = m_nLast;
} else {
m_nNext = m_nActual - 1;
}
m_aElements[m_nNext] = m_container_mc.attachMovie(m_aClass[m_nNext], "m_aElements" + m_nNext, _local4 + 1);
m_aElements[m_nNext].filters = m_aFilters;
_local3 = ((nDir == peanut.BKG.Background.RIGHT) ? ((m_aElements[m_nActual]._x + m_aElements[m_nActual]._width) - 3) : (m_aElements[m_nActual]._x - m_aElements[m_nActual]._width));
m_aElements[m_nNext]._x = _local3;
m_aElements[m_nNext]._y = m_nY;
m_nLoop++;
}
if (((nDir == peanut.BKG.Background.RIGHT) && (m_prev_mc._x <= (-m_nXMax))) || ((nDir == peanut.BKG.Background.LEFT) && (m_prev_mc._x >= m_nXMax))) {
m_prev_mc.removeMovieClip();
delete m_prev_mc;
}
m_aElements[m_nActual]._x = m_aElements[m_nActual]._x + (m_nHspeed * nDir);
m_aElements[m_nNext]._x = m_aElements[m_nNext]._x + (m_nHspeed * nDir);
m_prev_mc._x = m_prev_mc._x + (m_nHspeed * nDir);
}
function vScroll(nDir) {
if (nDir == peanut.BKG.Background.DOWN) {
if ((m_container_mc._y - m_nVspeed) > 0) {
m_container_mc._y = m_container_mc._y - m_nVspeed;
}
} else if ((m_container_mc._y + m_nVspeed) < (m_container_mc._height - m_nYMax)) {
m_container_mc._y = m_container_mc._y + m_nVspeed;
}
}
function get lastTile() {
return(m_nLast);
}
function set lastTile(iVal) {
if (((m_aClass[0] != m_aClass[1]) && (iVal < m_nCant)) && (iVal > 0)) {
m_nLast = iVal;
}
//return(lastTile);
}
function get loop() {
return(m_nLoop);
}
function set loop(iVal) {
m_nLoop = iVal;
//return(loop);
}
function get mc() {
return(m_aElements[m_nActual]);
}
function getMc(nVal) {
return(m_aElements[nVal]);
}
function get hSpeed() {
return(m_nHspeed);
}
function set hSpeed(iVal) {
m_nHspeed = iVal;
//return(hSpeed);
}
function get vSpeed() {
return(m_nVspeed);
}
function set vSpeed(iVal) {
m_nVspeed = iVal;
//return(vSpeed);
}
function swapTiles(nTile1, nTile2) {
if ((((m_aClass[0] != m_aClass[1]) && (nTile1 != nTile2)) && (nTile1 >= 0)) && (nTile2 < m_nCant)) {
var _local4 = m_aClass[nTile1];
m_aClass[nTile1] = m_aClass[nTile2];
m_aClass[nTile2] = _local4;
}
}
function destroy() {
var _local2 = 0;
while (_local2 < m_nCant) {
m_aElements[_local2].removeMovieClip();
_local2++;
}
delete m_aElements;
}
function addFilter(oFilter) {
m_aFilters.push(oFilter);
}
function applyFilters() {
m_aElements[m_nActual].filters = m_aFilters;
m_aElements[m_nNext].filters = m_aFilters;
}
function getFilter(nIdx) {
return(m_aFilters[nIdx]);
}
}
Symbol 1028 MovieClip [__Packages.peanut.BKG.ScrolledBackground] Frame 0
class peanut.BKG.ScrolledBackground extends peanut.BKG.Background
{
var m_nWidth, m_nHeight, m_nHspeed, m_nVspeed, m_container_mc, m_nIndex, m_aElements, m_nXMax;
function ScrolledBackground (mParent, nWidth, nHeight) {
super(mParent);
m_nWidth = nWidth;
m_nHeight = nHeight;
}
function get hSpeed() {
return(m_nHspeed);
}
function set hSpeed(nVal) {
m_nHspeed = nVal;
//return(hSpeed);
}
function get vSpeed() {
return(m_nVspeed);
}
function set vSpeed(nVal) {
m_nVspeed = nVal;
//return(vSpeed);
}
function addElement(sClass, nX, nY) {
var _local2 = m_container_mc.getNextHighestDepth();
m_aElements[m_nIndex] = m_container_mc.attachMovie(sClass, sClass + _local2, _local2);
m_aElements[m_nIndex]._x = nX;
m_aElements[m_nIndex]._y = nY;
m_aElements[m_nIndex].m_nX = nX;
m_aElements[m_nIndex].m_nY = nY;
if (!m_nIndex) {
m_nXMax = m_aElements[0]._width;
}
m_nIndex++;
}
function hScroll(nDir) {
if (nDir == peanut.BKG.Background.LEFT) {
if ((m_container_mc._x + m_nHspeed) < 0) {
m_container_mc._x = m_container_mc._x + m_nHspeed;
}
} else if ((m_container_mc._x - m_nHspeed) > (m_nWidth - m_nXMax)) {
m_container_mc._x = m_container_mc._x - m_nHspeed;
}
}
function vScroll(nDir) {
if (nDir == peanut.BKG.Background.DOWN) {
if ((m_container_mc._y - m_nVspeed) >= ((m_container_mc._height - m_nHeight) - 1)) {
m_container_mc._y = m_container_mc._y - m_nVspeed;
}
} else if ((m_container_mc._y + m_nVspeed) < 0) {
m_container_mc._y = m_container_mc._y + m_nVspeed;
}
}
function get Width() {
return(m_nWidth);
}
function get Height() {
return(m_nHeight);
}
}
Symbol 1029 MovieClip [__Packages.template.Characters.BenCharacter] Frame 0
class template.Characters.BenCharacter
{
var _enable, _collisionId, _trappedPos, _trapped, _released;
function BenCharacter (posX, posY, benMovieClip) {
_posX = posX;
_posY = posY;
_meAndMouseDif = new flash.geom.Point(0, 0);
_benMovieClip = benMovieClip;
_benMovieClip._visible = false;
_benMovieClip.mc_colbox._visible = false;
_benMovieClip._x = _posX;
_benMovieClip._y = _posY;
_benStateMachine = new Array();
FillStateMachine(Void);
_benMovieClip.gotoAndStop(_benStateMachine[_actualAnim]);
_enable = true;
_collisionId = 0;
_trappedPos = new flash.geom.Point();
_trapped = false;
_released = false;
}
function EnterLevel() {
_benMovieClip._y = Stage.height * 0.5;
_benMovieClip._x = -200;
_benMovieClip._visble = true;
_benHP = 100;
if (_benMovieClip._x != (Stage.width * 0.5)) {
_benMovieClip._x = _benMovieClip._x + _enterLevelSpeed;
}
_enterLevel = true;
if (template.Storage.GetInstanceOf().__get__LevelStorage() == 6) {
BossAnim();
}
}
function BossAnim() {
_benMovieClip.gotoAndStop("BenResize");
if (_benMovieClip.mc_anim._currentframe == _benMovieClip.mc_anim._totalframes) {
_benMovieClip._xscale = 80;
_benMovieClip._yscale = 80;
}
}
function ExitLevel() {
_flickeringCount = 0;
if (template.Storage.GetInstanceOf().__get__LevelStorage() > 5) {
_benMovieClip._xscale = 80;
_enterLevelSpeed = 125;
}
if (!_exitLevel) {
_benMovieClip._visible = true;
}
_benMovieClip.gotoAndStop("BenFlying");
_benMovieClip._rotation = 0;
if (_benMovieClip._x < (Stage.width + 50)) {
template.SoundLoader.GetInstance().Update();
_benMovieClip._x = _benMovieClip._x + (_enterLevelSpeed / 25);
}
if (_benMovieClip._x >= (Stage.width + 40)) {
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_exitLevel = true;
}
}
function get ExitLevelFlag() {
return(_exitLevel);
}
function get EnterLevelFlag() {
return(_enterLevel);
}
function get Enable() {
return(_enable);
}
function FillStateMachine(Void) {
_benStateMachine[BEN_IDLE] = "BenFlying";
_benStateMachine[BEN_IS_HIT] = "BenIsHit";
_benStateMachine[BEN_IS_KO1] = "BenKO1";
_benStateMachine[BEN_IS_ATTACKING] = "BenAttacking";
_benStateMachine[BEN_IS_TRANSFORMING] = "BenTransformation";
_benStateMachine[BEN_IS_SHAKEN] = "BenShaken";
_benStateMachine[BEN_IS_KO2] = "BenKO2";
_benStateMachine[BEN_IS_TRAPPED] = "BenIsTrapped";
_benStateMachine[BEN_IS_HIT2] = "BenIsHit2";
}
function UpdateAnimations(Void) {
if (_benMovieClip.mc_anim._currentFrame >= _benMovieClip.mc_anim._totalframes) {
_actualAnim = BEN_IDLE;
}
if (_actualAnim == BEN_IDLE) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IDLE]);
}
if (_actualAnim == BEN_IS_HIT) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_HIT]);
}
if (_actualAnim == BEN_IS_KO1) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_KO1]);
}
if (_actualAnim == BEN_IS_KO2) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_KO2]);
}
if (_actualAnim == BEN_IS_TRANSFORMING) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_TRANSFORMING]);
}
if (_actualAnim == BEN_IS_SHAKEN) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_SHAKEN]);
}
if (_actualAnim == BEN_IS_TRAPPED) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_TRAPPED]);
}
if (_actualAnim == BEN_IS_ATTACKING) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_ATTACKING]);
}
if (_actualAnim == BEN_IS_HIT2) {
_benMovieClip.gotoAndStop(_benStateMachine[BEN_IS_HIT2]);
}
if (_trapped) {
_enable = false;
_trappedPos.x = _benMovieClip._x;
_trappedPos.y = _benMovieClip._y;
_trapped = false;
_benMovieClip._visible = false;
if (!_soundFlag) {
template.SoundLoader.GetInstance()._swallowSound = true;
_soundFlag = true;
}
}
if (_released) {
_enable = true;
template.SoundLoader.GetInstance()._spitSound = true;
_benMovieClip._x = _trappedPos.x;
_benMovieClip._y = _trappedPos.y;
_released = false;
_benMovieClip._visible = true;
_soundFlag = false;
}
}
function Update(Void) {
if (_benHP < 3) {
_actualAnim = BEN_IS_TRANSFORMING;
}
UpdateAnimations(Void);
if (!_holdBen) {
UpdateShot(Void);
UpdateBenMovements(Void);
}
if (_holdBen) {
template.SoundLoader.GetInstance()._insectSound = true;
}
if (_inmune) {
Inmune();
}
}
function OnShutdown() {
_benMovieClip.swapDepths(0);
_benMovieClip.removeMovieClip();
_inputType = template.Storage.GetInstanceOf().InputType;
_enterLevel = false;
_exitLevel = false;
}
function UpdateBenMovements(Void) {
if (_benMovieClip._x > (Stage.width - 60)) {
_benMovieClip._x = Stage.width - 60;
}
_meAndMouseDif.x = _benMovieClip._x - _xmouse;
_meAndMouseDif.y = _benMovieClip._y - _ymouse;
if (_benMovieClip._rotation > 15) {
_benMovieClip._rotation = _benMovieClip._rotation - 2;
}
if (_benMovieClip._rotation < -15) {
_benMovieClip._rotation = _benMovieClip._rotation + 2;
}
if ((_benMovieClip._y > 220) && (template.Storage.GetInstanceOf().__get__LevelStorage() > 5)) {
_benMovieClip._y = 220;
}
if (_benMovieClip._x > (_xmouse + 20)) {
_benMovieClip._rotation = _benMovieClip._rotation - 2;
}
if (_benMovieClip._x < (_xmouse - 20)) {
_benMovieClip._rotation = _benMovieClip._rotation + 2;
}
if ((_benMovieClip._y == ((Stage.height * 0.5) + 50)) || (_benMovieClip._y == ((Stage.height * 0.5) - 50))) {
_benMovieClip._rotation = 0;
}
if ((_benMovieClip._x == ((Stage.width * 0.5) + 50)) || (_benMovieClip._x == ((Stage.width * 0.5) - 50))) {
_benMovieClip._rotation = 0;
}
if (_enableMouse) {
if ((Math.abs(_meAndMouseDif.x) < 1) && (Math.abs(_meAndMouseDif.y) < 1)) {
_benMovieClip._rotation = 0;
_benMovieClip._x = _xmouse;
_benMovieClip._y = _ymouse;
} else {
_benMovieClip._x = _benMovieClip._x - (_meAndMouseDif.x * 0.5);
_benMovieClip._y = _benMovieClip._y - (_meAndMouseDif.y * 0.5);
}
if (template.Storage.GetInstanceOf().__get__LevelStorage() > 5) {
if ((_benMovieClip._x > _xmouse) && (_flipOnce)) {
_benMovieClip._xscale = _benMovieClip._xscale * -1;
_flipOnce = false;
}
if ((_benMovieClip._x < _xmouse) && (!_flipOnce)) {
_benMovieClip._xscale = _benMovieClip._xscale * -1;
_flipOnce = true;
}
}
}
if (_enableKey) {
if (peanut.System.Input.getAction() & peanut.System.StateMachine.ACTION_RIGHT) {
_benMovieClip._x = _benMovieClip._x + 5;
}
if (peanut.System.Input.getAction() & peanut.System.StateMachine.ACTION_LEFT) {
_benMovieClip._x = _benMovieClip._x - 5;
}
if (peanut.System.Input.getAction() & peanut.System.StateMachine.ACTION_DOWN) {
_benMovieClip._y = _benMovieClip._y + 5;
}
if (peanut.System.Input.getAction() & peanut.System.StateMachine.ACTION_UP) {
_benMovieClip._y = _benMovieClip._y - 5;
}
if (peanut.System.Input.getAction() & (peanut.System.StateMachine.ACTION_UP | peanut.System.StateMachine.ACTION_LEFT)) {
_benMovieClip._y = _benMovieClip._y - 5;
_benMovieClip._x = _benMovieClip._x - 5;
}
if (peanut.System.Input.getAction() & (peanut.System.StateMachine.ACTION_DOWN | peanut.System.StateMachine.ACTION_LEFT)) {
_benMovieClip._y = _benMovieClip._y + 5;
_benMovieClip._x = _benMovieClip._x - 5;
}
if (peanut.System.Input.getAction() & (peanut.System.StateMachine.ACTION_UP | peanut.System.StateMachine.ACTION_RIGHT)) {
_benMovieClip._y = _benMovieClip._y - 5;
_benMovieClip._x = _benMovieClip._x + 5;
}
if (peanut.System.Input.getAction() & (peanut.System.StateMachine.ACTION_DOWN | peanut.System.StateMachine.ACTION_RIGHT)) {
_benMovieClip._y = _benMovieClip._y + 5;
_benMovieClip._x = _benMovieClip._x + 5;
}
}
switch (_inputType) {
case 0 :
_enableMouse = true;
template.Storage.GetInstanceOf().__set__InputType(_inputType);
break;
case 1 :
_enableKey = true;
template.Storage.GetInstanceOf().__set__InputType(_inputType);
}
if (!_exitLevel) {
if (_benMovieClip._y <= 60) {
_benMovieClip._y = 60;
_benMovieClip._rotation = 0;
}
if (_benMovieClip._y >= 340) {
_benMovieClip._y = 340;
_benMovieClip._rotation = 0;
}
if (_benMovieClip._x < 20) {
_benMovieClip._x = 20;
_benMovieClip._rotation = 0;
}
} else {
_benMovieClip._visible = false;
}
}
function FlagSwitcher() {
function SwitchMe() {
this._shotFlag = true;
clearInterval(this._intervalId);
}
_intervalId = setInterval(mx.utils.Delegate.create(this, SwitchMe), _intervalTime);
}
function UpdateShot(Void) {
if (_benHP > 2) {
if (((peanut.System.Input.getAction() & peanut.System.StateMachine.ACTION_SPECIAL) && (_shotFlag == true)) && (_powderAmount > 1)) {
_intervalTime = 200;
_actualAnim = BEN_IS_ATTACKING;
_powderAmount = _powderAmount - 0.5;
if (_flipOnce) {
template.Characters.BulletManager.GetInstance().BenFire(_benMovieClip._x - 12, _benMovieClip._y);
} else {
template.Characters.BulletManager.GetInstance().BenFire(_benMovieClip._x - _benMovieClip._width, _benMovieClip._y);
}
template.SoundLoader.GetInstance()._shotSound = true;
_shotFlag = false;
FlagSwitcher();
} else if ((peanut.System.Input.__get__StoppedActions() == peanut.System.StateMachine.ACTION_SPECIAL) && (_powderAmount > 1)) {
_actualAnim = BEN_IS_ATTACKING;
_powderAmount--;
if (_flipOnce) {
template.Characters.BulletManager.GetInstance().BenFire(_benMovieClip._x - 12, _benMovieClip._y);
} else {
template.Characters.BulletManager.GetInstance().BenFire(_benMovieClip._x - _benMovieClip._width, _benMovieClip._y);
}
} else if ((peanut.System.Input.getAction() == peanut.System.StateMachine.ACTION_SPECIAL) && (_powderAmount <= 1)) {
template.GameManager2.GetInstance().__get__Interface().__get__InterfaceMC().mc_powderbar.mc_powderlevel1._visible = true;
template.GameManager2.GetInstance().__get__Interface().__get__InterfaceMC().mc_powderbar.mc_powderlevel1.play();
template.SoundLoader.GetInstance()._emptySound = true;
}
}
}
function Inmune() {
_inmuneTimer++;
if (_holdBen) {
_holdBen = false;
}
if (_inmuneTimer >= _inmuneMax) {
_inmuneTimer = 0;
_benMovieClip._visible = !_benMovieClip._visible;
_flickeringCount++;
}
if (_flickeringCount >= _flickeringMax) {
_flickeringCount = 0;
_benMovieClip._visible = true;
_inmune = false;
}
}
function get PosX() {
return(_posX);
}
function set PosX(nX) {
_posX = nX;
//return(PosX);
}
function get PosY() {
return(_posY);
}
function set PosY(nY) {
_posY = nY;
//return(PosY);
}
function get ActualAnim() {
return(_actualAnim);
}
function set ActualAnim(actualAnim) {
_actualAnim = actualAnim;
//return(ActualAnim);
}
function get Trapped() {
return(_trapped);
}
function set Trapped(trapped) {
_trapped = trapped;
//return(Trapped);
}
function get Released() {
return(_released);
}
function set Released(released) {
_released = released;
//return(Released);
}
function get Health() {
return(_benHP);
}
function set Health(powerUp) {
_benHP = powerUp;
//return(Health);
}
function get Powder() {
return(_powderAmount);
}
function set Powder(powderAmount) {
_powderAmount = powderAmount;
//return(Powder);
}
function get MC() {
return(_benMovieClip);
}
function set HoldBen(holdState) {
_holdBen = holdState;
//return(HoldBen);
}
function get HoldBen() {
return(_holdBen);
}
function get Inmunity() {
return(_inmune);
}
function set Inmunity(inmune) {
_inmune = inmune;
//return(Inmunity);
}
function OnCollide(incoming) {
if (!_inmune) {
if (template.Characters.Boss(incoming).__get__Name() == "Boss") {
if (!_inmune) {
_inmune = true;
}
_benHP = _benHP - 20;
incoming.MC.gotoAndStop("BulletExplosion");
template.SoundLoader.GetInstance()._bulletHitSound = true;
_actualAnim = BEN_IS_HIT;
}
if (incoming.CollisionId == 3) {
if (!_inmune) {
_inmune = true;
}
_benHP = _benHP - 20;
if (_inmune == true) {
incoming.MC.gotoAndStop("BulletExplosion");
}
template.SoundLoader.GetInstance()._bulletHitSound = true;
_actualAnim = BEN_IS_HIT;
}
if (incoming.CollisionId == 2) {
if ((incoming.Type == 4) || (incoming.Type == 6)) {
template.SoundLoader.GetInstance()._enemyHitSound = true;
_inmune = true;
_benHP = _benHP - 30;
_actualAnim = BEN_IS_HIT2;
_holdBen = true;
}
}
}
if (incoming.CollisionId == 1) {
_powderItem = true;
}
}
var _powderItem = false;
var _halfStageHeight = Stage.height * 0.5;
var _halfStageWidth = Stage.width * 0.5;
var _holdBen = false;
var _meAndMouseDif = null;
var _powderAmount = 101;
var _intervalTime = 300;
var _shotFlag = true;
var _intervalId = 0;
var _shotArray = null;
var _benStateMachine = null;
var _incremental = 0.1;
var _posX = 0;
var _posY = 0;
var _benMovieClip = null;
var _index = 0;
var _speedX = 0;
var _speedY = 0;
var _benHP = 100;
var _speed = 20;
var _enterLevelSpeed = 250;
var _inmune = true;
var _inmuneTimer = 0;
var _inmuneMax = 1;
var _flickeringCount = 0;
var _flickeringMax = 30;
static var _enterLevel = false;
static var _exitLevel = false;
var _soundFlag = false;
var _inputType = 0;
var _enableKey = false;
var _enableMouse = false;
var _flipOnce = true;
var BEN_IDLE = 0;
var BEN_IS_HIT = 1;
var BEN_IS_KO1 = 2;
var BEN_IS_ATTACKING = 3;
var BEN_IS_TRANSFORMING = 4;
var BEN_IS_SHAKEN = 5;
var BEN_IS_KO2 = 6;
var BEN_IS_TRAPPED = 7;
var BEN_IS_HIT2 = 8;
var _actualAnim = 0;
}
Symbol 1030 MovieClip [__Packages.template.Storage] Frame 0
class template.Storage
{
function Storage () {
_levelStorage = 0;
_objFlag = false;
}
static function GetInstanceOf() {
if (_storage == null) {
_storage = new template.Storage();
}
return(_storage);
}
function get LevelStorage() {
return(_levelStorage);
}
function set LevelStorage(levelToStore) {
_levelStorage = levelToStore;
//return(LevelStorage);
}
function get ObjFlag() {
return(_objFlag);
}
function set ObjFlag(objFlag) {
_objFlag = objFlag;
//return(ObjFlag);
}
function Reset() {
_storage = null;
}
function get InputType() {
return(_inputType);
}
function set InputType(itype) {
_inputType = itype;
//return(InputType);
}
static var _storage = null;
var _levelStorage = 0;
var _inputType = 0;
var _objFlag = false;
}
Symbol 1031 MovieClip [__Packages.template.SoundLoader] Frame 0
class template.SoundLoader
{
static var _soundIndex, _instance;
var music, exitMusic, _shotSound, _shotSound2, _deathSound, _swallowSound, _spitSound, _insectSound, _emptySound, _powderItem, _lifeItem, _bulletHitSound, _enemyHitSound, _benKO;
function SoundLoader () {
_soundIndex = new Array();
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("aleteo loop"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("arroja talco"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("se agota talco"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("power up1"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("power up2"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("enemybullet hit"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("sonido golpe2.wav"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("sonido pierde.wav"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("malo lanza disparo"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("malo se seca"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("lo chupa planta"));
_soundIndex.push(peanut.System.SoundEngine.LoadSFX("lo escupe la planta"));
music = true;
exitMusic = true;
_shotSound = false;
_shotSound2 = false;
_deathSound = false;
_swallowSound = false;
_spitSound = false;
_insectSound = false;
_shotSound = false;
_emptySound = false;
_powderItem = false;
_lifeItem = false;
_bulletHitSound = false;
_enemyHitSound = false;
_benKO = false;
}
function RestoreVolume() {
}
function LoadIntroSound() {
_soundIndex.push(peanut.System.SoundEngine.LoadBKG("pierde"));
peanut.System.SoundEngine.__set__BKGVolume(100);
peanut.System.SoundEngine.PlayBKG();
}
function StopIntroSound() {
peanut.System.SoundEngine.StopBKG();
}
static function GetInstance() {
if (!_instance) {
_instance = new template.SoundLoader();
}
return(_instance);
}
function Update() {
if ((_insectSound == false) && (template.GameManager2.GetInstance().__get__Interface().__get__IsOnPause() == false)) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[0], true);
_insectSound = true;
}
if (_shotSound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[1], false);
_shotSound = false;
}
if (_emptySound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[2], false);
_emptySound = false;
}
if (_powderItem) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[3], false);
_powderItem = false;
}
if (_lifeItem) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[4], false);
_lifeItem = false;
}
if (_bulletHitSound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[5], false);
_bulletHitSound = false;
}
if (_enemyHitSound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[6], false);
_enemyHitSound = false;
}
if (_benKO) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[7], false);
_benKO = false;
}
if (_shotSound2) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[8], false);
_shotSound2 = false;
}
if (_deathSound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[9], false);
_deathSound = false;
}
if (_swallowSound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[10], false);
_swallowSound = false;
}
if (_spitSound) {
peanut.System.SoundEngine.PlaySFX(_soundIndex[11], false);
_spitSound = false;
}
if ((template.GameManager2.GetInstance().__get__Interface().__get__IsOnPause() == false) && ((template.GameManager2.GetInstance().__get__StateMachine() != 6) || (template.GameManager2.GetInstance().__get__StateMachine() != 4))) {
if (music) {
StopIntroSound();
_soundIndex.push(peanut.System.SoundEngine.LoadBKG("BKGSound2"));
peanut.System.SoundEngine.__set__BKGVolume(100);
peanut.System.SoundEngine.PlayBKG();
music = false;
}
} else {
music = true;
}
if (template.GameManager2.GetInstance().__get__StateMachine() == 6) {
peanut.System.SoundEngine.LoadBKG("gana");
peanut.System.SoundEngine.__set__BKGVolume(100);
peanut.System.SoundEngine.PlayBKG();
}
if (template.GameManager2.GetInstance().__get__StateMachine() == 4) {
peanut.System.SoundEngine.StopBKG();
peanut.System.SoundEngine.LoadBKG("BKGSound2");
peanut.System.SoundEngine.__set__BKGVolume(100);
peanut.System.SoundEngine.PlayBKG();
}
if (template.GameManager2.GetInstance().__get__StateMachine() != 1) {
peanut.System.SoundEngine.StopAllSFX();
}
}
}
Symbol 1032 MovieClip [__Packages.peanut.System.StateMachine] Frame 0
class peanut.System.StateMachine
{
function StateMachine () {
}
static var STATE_IDLE = 0;
static var STATE_WALK = 1;
static var STATE_WALK_BACK = 2;
static var STATE_JUMP = 3;
static var STATE_JUMP_FRONT = 4;
static var STATE_JUMP_BACK = 5;
static var STATE_JUMP_KICK = 6;
static var STATE_JUMP_KICK_FRONT = 7;
static var STATE_JUMP_KICK_BACK = 8;
static var STATE_JUMP_INTRO = 9;
static var STATE_JUMP_SP1 = 10;
static var STATE_KICK = 11;
static var STATE_KICK_UP = 12;
static var STATE_KICK_DOWN = 13;
static var STATE_PUNCH = 14;
static var STATE_PUNCH_UP = 15;
static var STATE_PUNCH_DOWN = 16;
static var STATE_DOWN = 17;
static var STATE_DOWN_FINISH = 18;
static var STATE_SP1 = 19;
static var STATE_SP2 = 20;
static var STATE_SP3 = 21;
static var STATE_BLOCK = 22;
static var STATE_HIT = 23;
static var STATE_HIT_UP = 24;
static var STATE_HIT_DOWN = 25;
static var STATE_DEFEATED = 26;
static var STATE_WIN = 27;
static var STATE_LOSE = 28;
static var STATE_HIT_HI = 29;
static var STATE_HIT_HI_UP = 30;
static var STATE_HIT_HI_DOWN = 31;
static var STATE_HIT_JUMP = 32;
static var STATE_HIT_HI_UP2 = 33;
static var STATE_INTRO = 34;
static var STATE_THROW = 35;
static var STATE_THROWED = 36;
static var STATE_UPPERCUT = 37;
static var STATE_SLIDE_DOWN = 38;
static var STATE_BLOCK_DOWN = 39;
static var ACTION_NONE = 0;
static var ACTION_UP = 1;
static var ACTION_DOWN = 2;
static var ACTION_RIGHT = 4;
static var ACTION_LEFT = 8;
static var ACTION_KICK = 16;
static var ACTION_PUNCH = 32;
static var ACTION_HIT = 64;
static var ACTION_HIT_UP = 128;
static var ACTION_HIT_DOWN = 256;
static var ACTION_HI = 512;
static var ACTION_HIT_JUMP = 1024;
static var ACTION_HIT_UP2 = 2048;
static var ACTION_SPECIAL = 4096;
static var ACTION_SPECIAL2 = 8192;
static var DIRECTION_LEFT = 0;
static var DIRECTION_RIGHT = 1;
static var POSITION_MIDDLE = 0;
static var POSITION_UP = 1;
static var POSITION_DOWN = 2;
}
Symbol 1033 MovieClip [__Packages.peanut.System.Input] Frame 0
class peanut.System.Input extends peanut.System.StateMachine
{
function Input () {
super();
}
static function getAction() {
currentAction = peanut.System.StateMachine.ACTION_NONE;
if (Key.isDown(Z) || (Key.isDown(LeftMouseButton))) {
currentAction = currentAction | peanut.System.StateMachine.ACTION_SPECIAL;
}
if (Key.isDown(A)) {
currentAction = currentAction | peanut.System.StateMachine.STATE_SP1;
}
if (Key.isDown(S)) {
currentAction = currentAction | peanut.System.StateMachine.STATE_SP2;
}
if (Key.isDown(D)) {
currentAction = currentAction | peanut.System.StateMachine.STATE_SP3;
}
if (Key.isDown(End)) {
currentAction = currentAction | peanut.System.StateMachine.ACTION_KICK;
}
if (Key.isDown(Up)) {
currentAction = currentAction | peanut.System.StateMachine.ACTION_UP;
}
if (Key.isDown(Down)) {
currentAction = currentAction | peanut.System.StateMachine.ACTION_DOWN;
}
if (Key.isDown(Left)) {
currentAction = currentAction | peanut.System.StateMachine.ACTION_LEFT;
}
if (Key.isDown(Right)) {
currentAction = currentAction | peanut.System.StateMachine.ACTION_RIGHT;
}
return(currentAction);
}
static function get StoppedActions() {
var _local1 = currentAction;
var _local2;
_local2 = (_local1 ^ lastAction) & lastAction;
lastAction = _local1;
return(_local2);
}
static var LeftMouseButton = 1;
static var RightMouseButton = 2;
static var A = 65;
static var B = 66;
static var C = 67;
static var D = 68;
static var E = 69;
static var F = 70;
static var G = 71;
static var H = 72;
static var I = 73;
static var J = 74;
static var K = 75;
static var L = 76;
static var M = 77;
static var N = 78;
static var O = 79;
static var P = 80;
static var Q = 81;
static var R = 82;
static var S = 83;
static var T = 84;
static var U = 85;
static var V = 86;
static var W = 87;
static var X = 88;
static var Y = 89;
static var Z = 90;
static var n0 = 48;
static var n1 = 49;
static var n2 = 50;
static var n3 = 51;
static var n4 = 52;
static var n5 = 53;
static var n6 = 54;
static var n7 = 55;
static var n8 = 56;
static var n9 = 57;
static var a = 65;
static var b = 66;
static var c = 67;
static var d = 68;
static var e = 69;
static var f = 70;
static var g = 71;
static var h = 72;
static var i = 73;
static var j = 74;
static var k = 75;
static var l = 76;
static var m = 77;
static var n = 78;
static var o = 79;
static var p = 80;
static var q = 81;
static var r = 82;
static var s = 83;
static var t = 84;
static var u = 85;
static var v = 86;
static var w = 87;
static var x = 88;
static var y = 89;
static var z = 90;
static var np0 = 96;
static var np1 = 97;
static var np2 = 98;
static var np3 = 99;
static var np4 = 100;
static var np5 = 101;
static var np6 = 102;
static var np7 = 103;
static var np8 = 104;
static var np9 = 105;
static var Multiply = 106;
static var Add = 107;
static var Enter = 13;
static var Subtract = 109;
static var Decimal = 110;
static var Divide = 111;
static var F1 = 112;
static var F2 = 113;
static var F3 = 114;
static var F4 = 115;
static var F5 = 116;
static var F6 = 117;
static var F7 = 118;
static var F8 = 119;
static var F9 = 120;
static var F11 = 122;
static var F12 = 123;
static var F13 = 124;
static var F14 = 125;
static var F15 = 126;
static var Backspace = 8;
static var Tab = 9;
static var Shift = 16;
static var Control = 17;
static var CapsLock = 20;
static var Esc = 27;
static var Spacebar = 32;
static var PageUp = 33;
static var PageDown = 34;
static var End = 35;
static var Home = 36;
static var Left = 37;
static var Up = 38;
static var Right = 39;
static var Down = 40;
static var Insert = 45;
static var Delete = 46;
static var NumLock = 144;
static var ScrLk = 145;
static var currentAction = peanut.System.StateMachine.ACTION_NONE;
static var lastAction = peanut.System.StateMachine.ACTION_NONE;
}
Symbol 1034 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1035 MovieClip [__Packages.template.Characters.BulletManager] Frame 0
class template.Characters.BulletManager
{
var __get__PlayerInstance, _screenWidth, _screenHeight, _bulletMax, _pBulletMax, _bulletMovieClip, _bulletPool, _playerBullet, _bulletToFire;
function BulletManager () {
Reset();
}
function set PlayerInstance(player1) {
_playerInstance = player1;
//return(__get__PlayerInstance());
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function SetScreenParameters(sWidth, sHeight, root) {
_containerMovieClip = root;
_screenWidth = sWidth;
_screenHeight = sHeight;
}
function Start(bulletMax, pBulletMax, enemyType) {
_bulletMax = bulletMax;
_pBulletMax = pBulletMax;
var _local2 = 0;
while (_local2 < _bulletMax) {
_bulletMovieClip = _containerMovieClip.attachMovie("Bullet", "Bullet_0" + _local2, _containerMovieClip.getNextHighestDepth());
if (enemyType == 0) {
_bulletMovieClip.gotoAndStop(1);
}
if (enemyType == 1) {
_bulletMovieClip.gotoAndStop("ExplosionBullet");
}
_bulletPool[_local2] = new template.Characters.Bullet(_bulletMovieClip, _screenWidth, _screenHeight);
_bulletPool[_local2].EnemyType = true;
_local2++;
}
_local2 = 0;
while (_local2 < _pBulletMax) {
_bulletMovieClip = _containerMovieClip.attachMovie("FallingDust", "pBullet_0" + _local2, _containerMovieClip.getNextHighestDepth());
_playerBullet[_local2] = new template.Characters.Bullet(_bulletMovieClip, _screenWidth, _screenHeight);
_playerBullet[_local2].PlayerType = true;
_playerBullet[_local2].MC.mc_colbox._visible = false;
_local2++;
}
}
static function GetInstance(Void) {
if (_instance == null) {
_instance = new template.Characters.BulletManager();
}
return(_instance);
}
function Reset() {
_bulletPool = new Array();
_playerBullet = new Array();
}
function OnShutdown() {
var _local2 = 0;
while (_local2 < _playerBullet.length) {
_bulletPool[_local2].MC.swapDepths(0);
_bulletPool[_local2].MC.removeMovieClip();
_playerBullet[_local2].MC.swapDepths(0);
_playerBullet[_local2].MC.removeMovieClip();
_local2++;
}
delete _bulletPool;
delete _playerBullet;
_bulletPool = null;
_playerBullet = null;
_bulletMovieClip.swapDepths(0);
_bulletMovieClip.removeMovieClip();
_bulletMovieClip = null;
delete _instance;
delete _playerInstance;
}
function BenFire(posX, posY) {
var _local2 = 0;
while (_local2 < _pBulletMax) {
if (_playerBullet[_local2].Enable == false) {
_bulletToFire = _local2;
break;
}
_local2++;
}
_playerBullet[_bulletToFire].Start(posX + 60, posY - 20);
_playerBullet[_bulletToFire].MC.swapDepths(1000);
}
function Fire(posX, posY, rot, rotOffset, speed, enemyType) {
var _local2 = 0;
while (_local2 < _bulletMax) {
if (_bulletPool[_local2].Enable == false) {
_bulletToFire = _local2;
_local2 = _bulletMax;
}
_local2++;
}
_bulletPool[_bulletToFire].Start(posX, posY, rot, rotOffset, speed, enemyType);
}
function Update() {
var _local2 = 0;
while (_local2 < _bulletMax) {
if (_bulletPool[_local2].Enable == true) {
_bulletPool[_local2].Move();
}
_local2++;
}
_local2 = 0;
while (_local2 < _pBulletMax) {
if (_playerBullet[_local2].Enable == true) {
if ((_playerInstance.__get__Health() < 3) || (template.GameManager2.GetInstance().__get__StateMachine() != 1)) {
_playerBullet[_local2].MC._visible = false;
_playerBullet[_local2].MC.removeMovieClip();
OnShutdown();
}
_playerBullet[_local2].Move();
}
_local2++;
}
}
function OnEOL() {
var _local2 = 0;
while (_local2 < _bulletMax) {
if (_bulletPool[_local2].Enable == true) {
_bulletPool[_local2].MC._visible = false;
}
_local2++;
}
_local2 = 0;
while (_local2 < _pBulletMax) {
if (_playerBullet[_local2].Enable == true) {
_playerBullet[_local2].MC._visible = false;
}
_local2++;
}
}
function GetEnemyBullet(nElement) {
return(_bulletPool[nElement]);
}
function GetPlayerBullet(nElement) {
return(_playerBullet[nElement]);
}
var _containerMovieClip = null;
static var _instance = null;
var _playerInstance = null;
}
Symbol 1036 MovieClip [__Packages.template.Characters.Bullet] Frame 0
class template.Characters.Bullet
{
var _life, _powderSpeed, _dir, _enable, _frame, _playerType, _enemyType, _oldPos, _collisionId, __get__PlayerType, __get__EnemyType, _rot, _speed;
function Bullet (bulletmc, screenWidth, screenHeight) {
_bulletMc = bulletmc;
bulletmc._visible = false;
_bulletMc.mc_colbox._visible = false;
_bulletMc._visible = false;
_life = 100;
_powderSpeed = 5;
_dir = new flash.geom.Point();
_enable = false;
_frame = new flash.geom.Point(screenWidth, screenHeight);
_playerType = false;
_enemyType = false;
_oldPos = new flash.geom.Point();
}
function get CollisionId() {
return(_collisionId);
}
function get Enable() {
return(_enable);
}
function set Enable(enable) {
_enable = enable;
//return(Enable);
}
function get MC() {
return(_bulletMc);
}
function set PlayerType(type) {
_playerType = type;
//return(__get__PlayerType());
}
function set EnemyType(type) {
_enemyType = type;
//return(__get__EnemyType());
}
function CalculateFrame() {
if ((_bulletMc._x > 0) && (_bulletMc._x < _frame.x)) {
if ((_bulletMc._y > 0) && (_bulletMc._y < _frame.y)) {
return(true);
}
}
return(false);
}
function Start(posX, posY, rot, rotOffset, speed) {
if (_enemyType) {
_enable = true;
_bulletMc._visible = true;
_rot = (rot - rotOffset) * (Math.PI/180);
_bulletMc._x = posX;
_bulletMc._y = posY;
_dir.x = Math.sin(_rot);
_dir.y = Math.cos(_rot);
_bulletMc._x = _bulletMc._x + (_dir.x * 50);
_bulletMc._y = _bulletMc._y + (_dir.y * 50);
_collisionId = 3;
_speed = speed;
}
if (_playerType) {
_enable = true;
_bulletMc._visible = true;
_bulletMc._x = posX;
_bulletMc._y = posY;
_collisionId = 5;
}
}
function Move() {
if (_enemyType) {
_oldPos.x = _bulletMc._x;
_oldPos.y = _bulletMc._y;
_dir.x = Math.sin(_rot);
_dir.y = Math.cos(_rot);
_bulletMc._x = _bulletMc._x + (_dir.x * _speed);
_bulletMc._y = _bulletMc._y + (_dir.y * _speed);
if ((_oldPos.x == _bulletMc._x) && (_oldPos.y == _bulletMc._y)) {
Reset();
return(undefined);
}
_life--;
}
if (_playerType) {
if (template.Storage.GetInstanceOf().__get__LevelStorage() <= 5) {
_bulletMc._x = _bulletMc._x - (_powderSpeed * 0.7);
_bulletMc._y = _bulletMc._y + (_powderSpeed * 1.5);
} else {
_bulletMc._y = _bulletMc._y + (_powderSpeed * 1.5);
}
}
if ((CalculateFrame() == false) || (_life <= 0)) {
Reset();
}
}
function OnCollide(incoming) {
if (incoming.CollisionId == 0) {
Reset();
}
if ((incoming.CollisionId == 2) && (_collisionId == 5)) {
if (incoming.IsDead == false) {
if (incoming.Type != 4) {
Reset();
}
}
}
}
function Reset() {
_bulletMc.gotoAndStop("ExplosionBullet");
_enable = false;
_bulletMc._visible = false;
_dir = new flash.geom.Point();
_life = 100;
_powderSpeed = 7.5;
}
var _bulletMc = null;
}
Symbol 1037 MovieClip [__Packages.template.Characters.Boss] Frame 0
class template.Characters.Boss
{
function Boss (x, y, mc) {
_xPos = x;
_yPos = y;
_bossMC = mc;
_bossMC._x = _xPos;
_bossMC._y = _yPos;
_actualState = template.BossList.IDLE;
_global.clearInterval(_shotIntervalID);
_global.clearInterval(_timeoutID);
_positionOffset = new flash.geom.Point(0, 0);
_tentacleOne = new flash.geom.Point(0, 0);
_tentacleTwo = new flash.geom.Point(0, 0);
_tentacleThree = new flash.geom.Point(0, 0);
_tentacleFour = new flash.geom.Point(0, 0);
_tentacleFive = new flash.geom.Point(0, 0);
template.Characters.CollisionManager.__get__Instance().RegisterBoss(this);
_hp = 100;
}
function Update(Void) {
if (_enable) {
UpdateAnimState();
if (_hp < 1) {
_actualState = template.BossList.DIE;
}
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function Shot() {
if (_actualState == template.BossList.IDLE) {
switch (randRange(1, 5)) {
case 1 :
_global.clearInterval(_timeoutID);
_bossMC.mc.mc_nipple1.gotoAndStop("Shoot");
_positionOffset.x = _bossMC.mc.mc_nipple1.mc._x;
_positionOffset.y = _bossMC.mc.mc_nipple1.mc._y;
_bossMC.mc.mc_nipple1.mc.localToGlobal(_positionOffset);
_timeoutID = _global.setTimeout(mx.utils.Delegate.create(this, function () {
this._bossMC.mc.mc_nipple1.mc.play();
}), 200);
var _local3 = 90;
while (_local3 <= 270) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, _local3, 0, 11, 1);
template.SoundLoader.GetInstance()._shotSound2 = true;
_local3 = _local3 + 30;
}
break;
case 2 :
_global.clearInterval(_timeoutID);
_bossMC.mc.mc_nipple2.gotoAndStop("Shoot");
_positionOffset.x = _bossMC.mc.mc_nipple2.mc._x;
_positionOffset.y = _bossMC.mc.mc_nipple2.mc._y;
_bossMC.mc.mc_nipple2.mc.localToGlobal(_positionOffset);
_timeoutID = _global.setTimeout(mx.utils.Delegate.create(this, function () {
this._bossMC.mc.mc_nipple2.mc.play();
}), 200);
_local3 = 90;
while (_local3 <= 270) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, _local3, 0, 11, 1);
template.SoundLoader.GetInstance()._shotSound2 = true;
_local3 = _local3 + 30;
}
break;
case 3 :
_global.clearInterval(_timeoutID);
_bossMC.mc.mc_nipple3.gotoAndStop("Shoot");
_positionOffset.x = _bossMC.mc.mc_nipple3.mc._x;
_positionOffset.y = _bossMC.mc.mc_nipple3.mc._y;
_bossMC.mc.mc_nipple3.mc.localToGlobal(_positionOffset);
_timeoutID = _global.setTimeout(mx.utils.Delegate.create(this, function () {
this._bossMC.mc.mc_nipple3.mc.play();
}), 200);
_local3 = 90;
while (_local3 <= 270) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x + 30, _positionOffset.y + 30, _local3, 0, 11, 1);
template.SoundLoader.GetInstance()._shotSound2 = true;
_local3 = _local3 + 30;
}
break;
case 4 :
_global.clearInterval(_timeoutID);
_bossMC.mc.mc_nipple4.gotoAndStop("Shoot");
_positionOffset.x = _bossMC.mc.mc_nipple4.mc._x;
_positionOffset.y = _bossMC.mc.mc_nipple4.mc._y;
_bossMC.mc.mc_nipple4.mc.localToGlobal(_positionOffset);
_timeoutID = _global.setTimeout(mx.utils.Delegate.create(this, function () {
this._bossMC.mc.mc_nipple4.mc.play();
}), 200);
_local3 = 90;
while (_local3 <= 270) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, _local3, 0, 11, 1);
template.SoundLoader.GetInstance()._shotSound2 = true;
_local3 = _local3 + 30;
}
break;
case 5 :
_global.clearInterval(_timeoutID);
_bossMC.mc.mc_nipple5.gotoAndStop("Shoot");
_positionOffset.x = _bossMC.mc.mc_nipple5.mc._x;
_positionOffset.y = _bossMC.mc.mc_nipple5.mc._y;
_bossMC.mc.mc_nipple5.mc.localToGlobal(_positionOffset);
_local3 = 90;
while (_local3 <= 270) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, _local3, 0, 11, 1);
template.SoundLoader.GetInstance()._shotSound2 = true;
_local3 = _local3 + 30;
}
_timeoutID = _global.setTimeout(mx.utils.Delegate.create(this, function () {
this._bossMC.mc.mc_nipple5.mc.play();
}), 200);
}
_global.clearInterval(_shotIntervalID);
_shootOnce = true;
}
}
function UpdateAnimState() {
switch (_actualState) {
case template.BossList.ENTER :
_bossMC.gotoAndStop(_actualState);
_bossMC.mc.play();
if (_bossMC.mc._currentframe == _bossMC.mc._totalframes) {
_actualState = template.BossList.IDLE;
}
break;
case template.BossList.IDLE :
_bossMC.gotoAndStop(_actualState);
if (_shootOnce) {
_shotIntervalID = _global.setInterval(mx.utils.Delegate.create(this, Shot), 2000);
_shootOnce = false;
}
if (_onceTimeout) {
_global.setTimeout(mx.utils.Delegate.create(this, function () {
this._actualState = template.BossList.MOUTH_OPEN;
}), 15000);
_onceTimeout = false;
}
break;
case template.BossList.MOUTH_OPEN :
_playMeOnce = true;
_bossMC.mc.mc_nipple1.gotoAndStop("Idle");
_bossMC.mc.mc_nipple2.gotoAndStop("Idle");
_bossMC.mc.mc_nipple3.gotoAndStop("Idle");
_bossMC.mc.mc_nipple4.gotoAndStop("Idle");
_bossMC.mc.mc_nipple5.gotoAndStop("Idle");
_global.clearInterval(_timeoutID);
if (!_onceTimeout) {
_bossMC.gotoAndStop(_actualState);
_global.setTimeout(mx.utils.Delegate.create(this, function () {
switch (this.randRange(1, 2)) {
case 1 :
this._actualState = template.BossList.ATTACK_TWO;
break;
case 2 :
this._actualState = template.BossList.ATTACK_THREE;
}
}), 1000);
_onceTimeout = true;
}
break;
case template.BossList.MOUTH_TENTACLES :
_bossMC.mc.mc_nipple1.gotoAndStop("Idle");
_bossMC.mc.mc_nipple2.gotoAndStop("Idle");
_bossMC.mc.mc_nipple3.gotoAndStop("Idle");
_bossMC.mc.mc_nipple4.gotoAndStop("Idle");
_bossMC.mc.mc_nipple5.gotoAndStop("Idle");
_playMeOnce = true;
_bossMC.gotoAndStop(_actualState);
break;
case template.BossList.ATTACK_TWO :
if (_playMeOnce) {
template.SoundLoader.GetInstance()._swallowSound = true;
_playMeOnce = false;
}
_bossMC.mc.mc_nipple1.gotoAndStop("Idle");
_bossMC.mc.mc_nipple2.gotoAndStop("Idle");
_bossMC.mc.mc_nipple3.gotoAndStop("Idle");
_bossMC.mc.mc_nipple4.gotoAndStop("Idle");
_bossMC.mc.mc_nipple5.gotoAndStop("Idle");
_bossMC.gotoAndStop(_actualState);
_tentacleOne.x = _bossMC.mc.tentacles.mc_tentacleOne._x;
_tentacleOne.y = _bossMC.mc.tentacles.mc_tentacleOne._y;
_bossMC.mc.tentacles.mc_tentacleOne.localToGlobal(_tentacleOne);
_tentacleTwo.x = _bossMC.mc.tentacles.mc_tentacleTwo._x;
_tentacleTwo.y = _bossMC.mc.tentacles.mc_tentacleTwo._y;
_bossMC.mc.tentacles.mc_tentacleTwo.localToGlobal(_tentacleTwo);
_tentacleThree.x = _bossMC.mc.tentacles.mc_tentacleThree._x;
_tentacleThree.y = _bossMC.mc.tentacles.mc_tentacleThree._y;
_bossMC.mc.tentacles.mc_tentacleThree.localToGlobal(_tentacleThree);
_tentacleFour.x = _bossMC.mc.tentacles.mc_tentacleFour._x;
_tentacleFour.y = _bossMC.mc.tentacles.mc_tentacleFour._y;
_bossMC.mc.tentacles.mc_tentacleFour.localToGlobal(_tentacleFour);
_tentacleFive.x = _bossMC.mc.tentacles.mc_tentacleFive._x;
_tentacleFive.y = _bossMC.mc.tentacles.mc_tentacleFive._y;
_bossMC.mc.tentacles.mc_tentacleFive.localToGlobal(_tentacleFive);
if (_bossMC.mc._currentframe == _bossMC.mc._totalframes) {
_actualState = template.BossList.TENTACLE_IN;
}
break;
case template.BossList.ATTACK_THREE :
if (_playMeOnce) {
template.SoundLoader.GetInstance()._swallowSound = true;
_playMeOnce = false;
}
_bossMC.mc.mc_nipple1.gotoAndStop("Idle");
_bossMC.mc.mc_nipple2.gotoAndStop("Idle");
_bossMC.mc.mc_nipple3.gotoAndStop("Idle");
_bossMC.mc.mc_nipple4.gotoAndStop("Idle");
_bossMC.mc.mc_nipple5.gotoAndStop("Idle");
_bossMC.gotoAndStop(_actualState);
if (_bossMC.mc._currentframe == _bossMC.mc._totalframes) {
_actualState = template.BossList.TENTACLE_IN;
}
break;
case template.BossList.TENTACLE_IN :
_bossMC.gotoAndStop(_actualState);
if (_bossMC.mc._currentframe == _bossMC.mc._totalframes) {
_actualState = template.BossList.IDLE;
}
break;
case template.BossList.DIE :
template.SoundLoader.GetInstance()._deathSound = true;
template.Storage.GetInstanceOf().__set__LevelStorage(7);
_bossMC.gotoAndStop(_actualState);
}
}
function OnCollide(incoming, t) {
switch (t) {
case 1 :
if (_bossMC.mc.mc_nipple1._currentframe == 2) {
_hp = _hp - 5;
_bossMC.mc.mc_nipple1.gotoAndStop("Hit");
}
break;
case 2 :
if (_bossMC.mc.mc_nipple2._currentframe == 2) {
_hp = _hp - 5;
_bossMC.mc.mc_nipple2.gotoAndStop("Hit");
}
break;
case 3 :
if (_bossMC.mc.mc_nipple3._currentframe == 2) {
_hp = _hp - 5;
_bossMC.mc.mc_nipple3.gotoAndStop("Hit");
}
break;
case 4 :
if (_bossMC.mc.mc_nipple4._currentframe == 2) {
_hp = _hp - 5;
_bossMC.mc.mc_nipple4.gotoAndStop("Hit");
}
break;
case 5 :
if (_bossMC.mc.mc_nipple5._currentframe != 2) {
break;
}
_hp = _hp - 5;
_bossMC.mc.mc_nipple5.gotoAndStop("Hit");
}
}
function get Enable() {
return(_enable);
}
function set Enable(enable) {
_enable = enable;
//return(Enable);
}
function get MC() {
return(_bossMC);
}
function get BadAssColBox() {
return(_bossMC.mc_colbox);
}
function get NippleColBox1() {
return(_bossMC.mc.mc_nipple1.mc.mc_colbox);
}
function get NippleColBox2() {
return(_bossMC.mc.mc_nipple2.mc.mc_colbox);
}
function get NippleColBox3() {
return(_bossMC.mc.mc_nipple3.mc.mc_colbox);
}
function get NippleColBox4() {
return(_bossMC.mc.mc_nipple4.mc.mc_colbox);
}
function get NippleColBox5() {
return(_bossMC.mc.mc_nipple5.mc.mc_colbox);
}
function get tOneMC() {
return(_bossMC.mc.tentacles.mc_tentacleOne);
}
function get tTwoMC() {
return(_bossMC.mc.tentacles.mc_tentacleTwo);
}
function get tThreeMC() {
return(_bossMC.mc.tentacles.mc_tentacleThree);
}
function get tFourMC() {
return(_bossMC.mc.tentacles.mc_tentacleFour);
}
function get tFiveMC() {
return(_bossMC.mc.tentacles.mc_tentacleFive);
}
function get tOnePos() {
return(_tentacleOne);
}
function get tTwoPos() {
return(_tentacleTwo);
}
function get tThreePos() {
return(_tentacleThree);
}
function get tFourPos() {
return(_tentacleFour);
}
function get tFivePos() {
return(_tentacleFive);
}
function get Name() {
return(_bossName);
}
function get State() {
return(_actualState);
}
function get HP() {
return(_hp);
}
function Reset() {
_global.clearInterval(_shotIntervalID);
_global.clearInterval(_timeoutID);
_bossMC.swapDepths(0);
_bossMC.removeMovieClip();
}
var _playMeOnce = true;
var _enable = false;
var _xPos = -1;
var _yPos = -1;
var _onceTimeout = true;
var _bossMC = null;
var _actualState = "";
var _positionOffset = null;
var _shotIntervalID = -1;
var _timeoutID = -1;
var _shootOnce = true;
var _tentacleOne = null;
var _tentacleTwo = null;
var _tentacleThree = null;
var _tentacleFour = null;
var _tentacleFive = null;
var _bossName = "Boss";
var _hp = -1;
}
Symbol 1038 MovieClip [__Packages.template.BossList] Frame 0
class template.BossList
{
function BossList () {
}
static var ENTER = "Enters";
static var IDLE = "Idle";
static var MOUTH_OPEN = "MouthOpen";
static var MOUTH_TENTACLES = "MouthTentacles";
static var DIE = "Death";
static var TENTACLE_IN = "TentacleIn";
static var ATTACK_TWO = "AttackTwo";
static var ATTACK_THREE = "AttackThree";
}
Symbol 1039 MovieClip [__Packages.template.Characters.CollisionManager] Frame 0
class template.Characters.CollisionManager
{
function CollisionManager () {
Reset();
}
static function get Instance() {
if (!_instanceOf) {
_instanceOf = new template.Characters.CollisionManager();
}
return(_instanceOf);
}
function SetGroupMax(groupMax) {
var _local2 = 0;
while (_local2 < groupMax) {
_listContainer[_local2] = new Array();
_local2++;
}
}
function Register(collidableObject, thingType) {
_listContainer[thingType].push(collidableObject);
}
function RegisterBoss(boss) {
_bossContainer.push(boss);
}
function Check(groupAlpha, groupBeta) {
var _local2 = 0;
while (_local2 < _listContainer[groupAlpha].length) {
var _local4 = 0;
while (_local4 < _listContainer[groupBeta].length) {
if (_listContainer[groupAlpha][_local2].Enable) {
if (_listContainer[groupBeta][_local4].Enable) {
if (_listContainer[groupBeta][_local4].Type == 4) {
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_listContainer[groupBeta][_local4].MC.mc_colbox2)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_listContainer[groupBeta][_local4]));
_listContainer[groupBeta][_local4].OnCollide(Object(_listContainer[groupAlpha][_local2]));
}
}
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_listContainer[groupBeta][_local4].MC.mc_colbox)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_listContainer[groupBeta][_local4]));
_listContainer[groupBeta][_local4].OnCollide(Object(_listContainer[groupAlpha][_local2]));
}
}
}
if (_bossContainer[0].Enable) {
if (_listContainer[groupAlpha][_local2].CollisionId == 5) {
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_bossContainer[0].NippleColBox1)) {
_bossContainer[0].OnCollide(Object(_listContainer[groupAlpha][_local2]), 1);
}
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_bossContainer[0].NippleColBox2)) {
_bossContainer[0].OnCollide(Object(_listContainer[groupAlpha][_local2]), 2);
}
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_bossContainer[0].NippleColBox3)) {
_bossContainer[0].OnCollide(Object(_listContainer[groupAlpha][_local2]), 3);
}
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_bossContainer[0].NippleColBox4)) {
_bossContainer[0].OnCollide(Object(_listContainer[groupAlpha][_local2]), 4);
}
if (_listContainer[groupAlpha][_local2].MC.mc_colbox.hitTest(_bossContainer[0].NippleColBox5)) {
_bossContainer[0].OnCollide(Object(_listContainer[groupAlpha][_local2]), 5);
}
}
if ((_bossContainer[0].State == template.BossList.ATTACK_TWO) || (_bossContainer[0].State == template.BossList.ATTACK_THREE)) {
if (_bossContainer[0].tOneMC.colbox.hitTest(_listContainer[groupAlpha][_local2].MC._x, _listContainer[groupAlpha][_local2].MC._y, true)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_bossContainer[0]));
}
if (_bossContainer[0].tTwoMC.colbox.hitTest(_listContainer[groupAlpha][_local2].MC._x, _listContainer[groupAlpha][_local2].MC._y, true)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_bossContainer[0]));
}
if (_bossContainer[0].tThreeMC.colbox.hitTest(_listContainer[groupAlpha][_local2].MC._x, _listContainer[groupAlpha][_local2].MC._y, true)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_bossContainer[0]));
}
if (_bossContainer[0].tFourMC.colbox.hitTest(_listContainer[groupAlpha][_local2].MC._x, _listContainer[groupAlpha][_local2].MC._y, true)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_bossContainer[0]));
}
if (_bossContainer[0].tFiveMC.colbox.hitTest(_listContainer[groupAlpha][_local2].MC._x, _listContainer[groupAlpha][_local2].MC._y, true)) {
_listContainer[groupAlpha][_local2].OnCollide(Object(_bossContainer[0]));
}
}
}
_local4++;
}
_local2++;
}
}
function Reset() {
delete _bossContainer;
delete _listOne;
delete _listTwo;
delete _listThree;
delete _listContainer;
_listOne = new Array();
_listTwo = new Array();
_listThree = new Array();
_listContainer = new Array();
_bossContainer = new Array();
_instanceOf = null;
}
static var _instanceOf = null;
var _listOne = null;
var _listTwo = null;
var _listThree = null;
var _listContainer = null;
var MAX_MCS_LIST1 = 10;
var MAX_MCS_LIST2 = 50;
var _indexA = 0;
var _bossContainer = null;
var _indexB = 0;
}
Symbol 1040 MovieClip [__Packages.template.Interface.Interface] Frame 0
class template.Interface.Interface
{
var play, __get__ObjFlag;
function Interface (interfaceMC, benMC, helpMC, objectivesMC, loserMC, winnerMC, stageMC) {
_interfaceMC = interfaceMC;
_isALoser = false;
_benMC = benMC;
_helpMC = helpMC;
_winnerMC = winnerMC;
_objectivesMC = objectivesMC;
_loserMC = loserMC;
_stageMC = stageMC;
InitVolumeBar();
InitHelp();
_level = _levelStorage;
_interfaceMC._visible = true;
_interfaceMC.bossBar._visible = false;
_winnerMC._visible = false;
_objectivesMC._visible = false;
_loserMC._visible = false;
_stageMC._visible = false;
var _local2 = new TextFormat();
_local2.font = "Helvetica Neue";
_local2.size = 14;
_loserMC.mc_typoloser.typo.dt_typo.setTextFormat(_local2);
_loserMC.mc_typoloser.typo.dt_typo._quality = "HIGH";
}
function UpdateSporeBar(Void) {
var _local2 = template.Characters.EnemyManager.GetInstance().__get__EnemyCount();
_interfaceMC.mc_sporebar.gotoAndStop(Math.round(_local2));
}
function SetSporeMarker(markPercentage) {
_interfaceMC.mc_sporemarker._x = ((68 * markPercentage) / 100) + 472;
}
function UpdateBossBar() {
_interfaceMC.bossBar._visible = true;
var _local2 = 100 - template.GameManager2.GetInstance().__get__Boss().__get__HP();
if (_local2 < 1) {
_local2 = 1;
}
_interfaceMC.bossBar.gotoAndStop(_local2);
}
function UpdateHealth() {
var _local2 = _benMC.__get__Health();
if (_local2 > 101) {
_interfaceMC.mc_healthbar.gotoAndPlay(100);
_interfaceMC.mc_healthbar.mc_colorhpbar.gotoAndPlay(100);
}
_interfaceMC.mc_healthbar.gotoAndStop(101 - Math.round(_local2));
_interfaceMC.mc_healthbar.mc_colorhpbar.gotoAndStop(101 - Math.round(_local2));
if (_benMC.__get__ExitLevelFlag() == true) {
_interfaceMC.mc_healthbar.gotoAndStop(100);
_interfaceMC.mc_healthbar.mc_colorhpbar.gotoAndStop(100);
}
}
function UpdatePowder() {
var _local2 = _benMC.__get__Powder();
_interfaceMC.mc_powderbar._visible = true;
_interfaceMC.mc_powderfont.mc_powderdfont.text = String(1 - Math.round(_local2));
_interfaceMC.mc_powderbar.gotoAndStop(100 - Math.round(_local2));
}
function get ObjectivesFlag() {
return(_objFlag);
}
function set ObjectivesFlag(objFlag) {
_objFlag = objFlag;
//return(ObjectivesFlag);
}
function InitObjectives(Void) {
if (template.GameManager2.GetInstance().__get__StateMachine() != 0) {
_objectivesMC._visible = false;
}
if (template.GameManager2.GetInstance().__get__StateMachine() == 0) {
_objectivesMC._visible = true;
} else {
_objectivesMC._visible = false;
}
_objectivesMC._x = Stage.width * 0.5;
_objectivesMC._y = Stage.height * 0.5;
_objectivesMC.gotoAndStop("Objectives");
_objFlag = true;
}
function helpFunction() {
if (template.GameManager2.GetInstance().__get__StateMachine() != 0) {
if (template.Storage.GetInstanceOf().__get__InputType() == 0) {
_helpMC.gotoAndStop("mouseInstructions");
}
if (template.Storage.GetInstanceOf().__get__InputType() == 1) {
_helpMC.gotoAndStop("keyInstructions");
}
if (!template.Characters.EnemyManager.GetInstance().__get__EOL()) {
if (!_isOnPause) {
if (_helpMC._visible) {
play();
_isOnPause = true;
_isOnHelp = true;
_helpMC._x = Stage.width * 0.5;
_helpMC._y = Stage.height * 0.5;
_helpMC.helpInstanceMC._visible = true;
_helpMC.helpInstanceMC.gotoAndPlay(1);
} else {
if (template.Storage.GetInstanceOf().__get__InputType() == 0) {
_helpMC.helpInstanceMC.gotoAndPlay(1);
_helpMC._visible = true;
_isOnPause = true;
_isOnHelp = true;
}
if (template.Storage.GetInstanceOf().__get__InputType() == 1) {
_helpMC.helpInstanceMC.gotoAndPlay(1);
_helpMC._visible = true;
_isOnPause = true;
_isOnHelp = true;
}
}
}
}
}
}
function get InterfaceMC() {
return(_interfaceMC);
}
function InitHelp() {
_interfaceMC.mc_helpbutton.onRelease = mx.utils.Delegate.create(_interfaceMC.mc_helpbutton, helpFunction);
}
function InitVolumeBar() {
_interfaceMC.mc_volumebutton.mc_invisbutton.onPress = function () {
this._parent.play();
this._parent.mc_soundmarker.onEnterFrame = function () {
var _local2 = new flash.geom.Point(0, _ymouse);
this._parent.globalToLocal(_local2);
if (_local2.y > -30.1) {
_local2.y = -30.1;
}
if (_local2.y < -83.4) {
_local2.y = -83.4;
}
peanut.System.SoundEngine.__set__SFXVolume(((Math.abs(_local2.y) * 100) / 53.3) - 56.5);
peanut.System.SoundEngine.__set__BKGVolume(((Math.abs(_local2.y) * 100) / 53.3) - 56.5);
this._parent.mc_soundmarker._visible = true;
this._parent.mc_soundmarker._y = _local2.y;
};
};
_interfaceMC.mc_volumebutton.mc_invisbutton.onRelease = (_interfaceMC.mc_volumebutton.mc_invisbutton.onReleaseOutside = function () {
this._parent.mc_soundmarker._visible = false;
this._parent.gotoAndStop(1);
delete this._parent.mc_soundmarker.onEnterFrame;
});
}
function OnShutdown() {
_interfaceMC.mc_sporebar.gotoAndStop(1);
_interfaceMC.mc_sporebar.removeMovieClip();
_interfaceMC.removeMovieClip();
_objectivesMC.removeMovieClip();
_helpMC.removeMovieClip();
_transitionMC.removeMovieClip();
_level = 0;
_loserMC.removeMovieClip();
_stageMC.swapDepths(0);
_stageMC.removeMovieClip();
_winnerMC.removeMovieClip();
_interfaceMC = null;
_objectivesMC = null;
_helpMC = null;
_stageMC = null;
_transitionMC = null;
_loserMC = null;
_winnerMC = null;
_benMC = null;
}
function GameOver() {
Mouse.show();
_isALoser = true;
if (_loserMC._currentframe == 1) {
_loserMC._x = Stage.width * 0.5;
_loserMC._y = Stage.height * 0.5;
_loserMC._visible = true;
_loserMC.play();
}
if (_benMC.__get__Health() < 2) {
_benMC.__get__MC()._visible = false;
_loserMC.mc_typoloser.gotoAndStop("lost2");
} else {
_benMC.__get__MC()._visible = false;
_loserMC.mc_typoloser.gotoAndStop("lost1");
}
}
function StageBanner() {
switch (_level) {
case 0 :
_stageMC.mc_stagetypo.dt_level.text = "THE FOREST";
_stageMC.mc_stagetypo.dt_stage.text = "STAGE 1";
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC._visible = true;
_stageMC.gotoAndStop();
break;
case 1 :
_stageMC.mc_stagetypo.dt_level.text = "THE FOREST";
_stageMC.mc_stagetypo.dt_stage.text = "STAGE 2";
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC._visible = true;
_stageMC.gotoAndStop();
break;
case 2 :
_stageMC.mc_stagetypo.dt_level.text = "THE VALLEY";
_stageMC.mc_stagetypo.dt_stage.text = "STAGE 1";
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC._visible = true;
_stageMC.gotoAndStop();
break;
case 3 :
_stageMC.mc_stagetypo.dt_level.text = "THE VALLEY";
_stageMC.mc_stagetypo.dt_stage.text = "STAGE 2";
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC._visible = true;
_stageMC.gotoAndStop();
break;
case 4 :
_stageMC.mc_stagetypo.dt_level.text = "THE CAVE";
_stageMC.mc_stagetypo.dt_stage.text = "STAGE 1";
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC._visible = true;
_stageMC.gotoAndStop();
break;
case 5 :
_stageMC.mc_stagetypo.dt_level.text = "THE CAVE";
_stageMC.mc_stagetypo.dt_stage.text = "STAGE 2";
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC._visible = true;
_stageMC.gotoAndStop();
break;
case 6 :
_stageMC._visible = false;
_stageMC._x = Stage.width * 0.5;
_stageMC._y = Stage.height * 0.5;
_stageMC.gotoAndStop();
}
}
function LevelTransition() {
_transitionMC = _root.attachMovie("TRANSICION_MC", "mc_transition", _root.getNextHighestDepth());
_transitionMC._x = Stage.width * 0.5;
_transitionMC._y = Stage.height * 0.5;
_transitionMC.play();
}
function get TransMC() {
return(_transitionMC);
}
function UpdateMapMarker() {
_percentage = (template.GameManager2.GetInstance().__get__Level().__get__ScrolledBackgroundWidth() / template.GameManager2.GetInstance().__get__Distance()) * 100;
Math.round(_percentage);
if (_interfaceMC.mc_mapmark._x >= MAX_MAP_POS_X) {
_isOnPause = true;
if (_benMC.__get__ExitLevelFlag() == true) {
_interfaceMC.mc_healthbar.gotoAndStop(100);
_level++;
_levelStorage = _level;
_interfaceMC.mc_mapmark._x = 211.4;
}
}
if ((_percentage < _previousPercentage) || (((_percentage > 104) && (!_benMC.__get__HoldBen())) && (_interfaceMC.mc_mapmark._x < MAX_MAP_POS_X))) {
_interfaceMC.mc_mapmark._x = _interfaceMC.mc_mapmark._x + _mapMarkerSpeed;
}
}
function Update() {
if (template.GameManager2.GetInstance().__get__Boss()) {
UpdateBossBar();
}
SetSporeMarker(template.GameManager2.GetInstance().__get__PercentageOffset());
if (template.Storage.GetInstanceOf().__get__LevelStorage() != 6) {
UpdateMapMarker();
}
UpdateHealth();
UpdateSporeBar();
UpdatePowder();
}
function WinnerScreen() {
Mouse.show();
_winnerMC._x = Stage.width * 0.5;
_winnerMC._y = Stage.height * 0.5;
_winnerMC._visible = true;
_interfaceMC._visible = false;
_level = 0;
_levelStorage = 0;
_winnerMC.play();
}
function set ObjFlag(obj) {
_objFlag = obj;
//return(__get__ObjFlag());
}
function get HelpMC() {
return(_helpMC);
}
function get IsOnPause() {
return(_isOnPause);
}
function set IsOnPause(pauseThis) {
_isOnPause = pauseThis;
//return(IsOnPause);
}
function get SLevel() {
return(_levelStorage);
}
function set SLevel(SLevel) {
_levelStorage = SLevel;
//return(this.SLevel);
}
function get Level() {
return(_level);
}
function set Level(Level) {
_level = Level;
//return(this.Level);
}
function get LoserMC() {
return(_loserMC);
}
function get ObjMC() {
return(_objectivesMC);
}
function get MapMarkerScroll() {
return(_interfaceMC.mc_mapmark._x);
}
function set MapMarkerScroll(mapMark) {
_interfaceMC.mc_mapmark._x = mapMark;
//return(MapMarkerScroll);
}
var _transFlag = false;
static var _isOnPause = false;
var _isOnHelp = false;
var _isALoser = false;
var _helpHandler = null;
static var _helpMC = null;
var _percentage = 0;
static var _levelStorage = 0;
var _previousPercentage = 0;
var _interfaceMC = null;
var _objectivesMC = null;
var _benMC = null;
var MAX_MAP_POS_X = 390;
var _mapMarkerSpeed = 0.15;
var _initPosX = 0;
static var _objFlag = false;
static var _level = 0;
var _loserMC = null;
var _transitionMC = null;
var _winnerMC = null;
var _stageMC = null;
var _inputType = 0;
}
Symbol 1041 MovieClip [__Packages.template.Characters.EnemyManager] Frame 0
class template.Characters.EnemyManager
{
static var _stopScroll, _sporeIndex, _enemyMax, _index, _generate, _sporeTimer, _intervalId, _generateIndex;
var __get__PlayerInstance, _screenWidth, _screenHeight, _sporeMax, _shooterProbability, _sporeOnce, _maxSporeTimer, _releaseWave, _waveTimer, _internalTimer, _doRandom, _maxWaveTimer, _waveIndex, _waveCount, _randomCount;
function EnemyManager () {
Reset();
}
function set EnemyCount(e) {
_sporePool[0].EnemyCount = e;
//return(EnemyCount);
}
function get EnemyCount() {
return(_sporePool[0].EnemyCount);
}
function set PlayerInstance(player1) {
_playerInstance = player1;
//return(__get__PlayerInstance());
}
function set StopScroll(stopIt) {
_stopScroll = stopIt;
//return(StopScroll);
}
function get StopScroll() {
return(_stopScroll);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function GetEnemy(thisElement) {
return(_enemyPool[thisElement]);
}
function GetSpore(thisElement) {
return(_sporePool[thisElement]);
}
function SetScreenParameters(sWidth, sHeight, root) {
_containerMovieClip = root;
_screenWidth = sWidth;
_screenHeight = sHeight;
}
function SetEnemy(enemymc) {
_sporePool[_sporeIndex] = new template.Characters.Enemy(enemymc);
_sporePool[_sporeIndex].Type = 0;
_sporePool[_sporeIndex].MC.mc_colbox._visible = false;
_sporeIndex++;
_sporeMax = _sporeIndex;
}
function Start(enemyMax) {
_enemyMax = enemyMax;
var _local2 = 0;
while (_local2 < enemyMax) {
_enemyMovieClip = _containerMovieClip.attachMovie("Enemy", "Enemy_0" + _local2, _containerMovieClip.getNextHighestDepth());
_enemyMovieClip.mc_colbox._visible = false;
_enemyPool[_local2] = new template.Characters.Enemy(_enemyMovieClip);
_enemyPool[_local2].MC.mc_colbox._visible = false;
_local2++;
}
}
static function GetInstance(Void) {
if (_instance == null) {
_instance = new template.Characters.EnemyManager();
}
return(_instance);
}
function Reset() {
_shooterProbability = randRange(0, 100);
_enemyPool = new Array();
_sporePool = new Array();
_levelCurrentEnemies = new Array();
_index = 0;
_generate = false;
_sporeOnce = false;
_sporeTimer = 0;
_sporeIndex = 0;
_intervalId = 0;
_generateIndex = 0;
_maxSporeTimer = randRange(2, 35);
_releaseWave = randRange(20, 50);
_sporePoint = new flash.geom.Point();
_wavePoint = new flash.geom.Point();
_waveTimer = 0;
_internalTimer = 0;
_doRandom = false;
_maxWaveTimer = 350;
_waveIndex = 0;
_waveCount = 0;
_stopScroll = false;
}
function OnShutdown() {
_sporePool[0].EnemyCount = 0;
var _local2 = 0;
while (_local2 < _sporePool.length) {
_sporePool[_local2].MC.swapDepths(0);
_sporePool[_local2].MC.removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < _enemyPool.length) {
_enemyPool[_local2].MC.swapDepths(0);
_enemyPool[_local2].MC.removeMovieClip();
_local2++;
}
_enemyMovieClip.swapDepths(0);
_enemyMovieClip.removeMovieClip();
delete _enemyPool;
delete _sporePool;
_enemyMovieClip = null;
delete _instance;
}
function GenerateWaves() {
_internalTimer++;
if (_doRandom == false) {
_randomCount = randRange(1, 3);
_doRandom = true;
}
if (_internalTimer >= _releaseWave) {
_internalTimer = 0;
_releaseWave = randRange(20, 50);
if (_enemyPool[_waveIndex].Enable) {
var _local2 = 0;
while (_local2 < _enemyMax) {
if (_enemyPool[_local2].Enable == false) {
_waveIndex = _local2;
break;
}
_local2++;
}
}
_wavePoint.x = _screenWidth + 50;
_wavePoint.y = _screenHeight;
var _local3 = template.GameManager2.GetInstance().__get__Level().__get__ActualLevel() + 3;
((_local3 > 6) ? (_local3 = 6) : ());
_enemyPool[_waveIndex].Type = randRange(1, _local3);
if (_enemyPool[_waveIndex].Type == 3) {
_enemyPool[_waveIndex].Height = _screenHeight;
_enemyPool[_waveIndex].Width = _screenWidth;
}
_enemyPool[_waveIndex].Start(_wavePoint.clone());
if (_waveCount >= _randomCount) {
_generate = false;
_doRandom = false;
_waveTimer = 0;
_waveCount = 0;
_sporeTimer = 0;
_maxWaveTimer = 350 + randRange(10, 25);
} else {
_waveCount++;
}
}
}
function GenerateSpore() {
if (_sporePool[_generateIndex].Enable == false) {
_sporePoint.x = _screenWidth + 50;
_sporePoint.y = _screenHeight + randRange(110, 290);
_sporePool[_generateIndex].Start(_sporePoint.clone());
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect3 = new peanut.FX.ColorEffect(_sporePool[_generateIndex].MC);
_colorEffect3.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect3 = new peanut.FX.ColorEffect(_sporePool[_generateIndex].MC);
_colorEffect3.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect3 = new peanut.FX.ColorEffect(_sporePool[_generateIndex].MC);
_colorEffect3.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect3 = new peanut.FX.ColorEffect(_sporePool[_generateIndex].MC);
_colorEffect3.HSBC(100, 30, -21, -17);
}
if (_generateIndex >= (_sporeMax - 1)) {
_generateIndex = 0;
} else {
_generateIndex++;
}
}
}
function Update() {
if (!_eol) {
if (_stopScroll == false) {
_sporeTimer++;
if (_sporeTimer > _maxSporeTimer) {
GenerateSpore();
_sporeTimer = 0;
_maxSporeTimer = randRange(10, 15);
}
_waveTimer++;
if (_waveTimer > _releaseWave) {
_generate = true;
}
if (_generate) {
GenerateWaves();
}
}
}
var _local3 = 0;
while (_local3 < _enemyMax) {
if (_enemyPool[_local3]._enable == true) {
_enemyPool[_local3].Move(_playerInstance);
if (_enemyPool[_local3].MC._x <= -150) {
_enemyPool[_local3].Enable = false;
if (!_eol) {
_enemyPool[_local3].Reset();
}
}
}
_local3++;
}
var _local2 = 0;
while (_local2 < _sporeMax) {
if (_sporePool[_local2]._enable == true) {
_sporePool[_local2].Move(_playerInstance);
if (_sporePool[_local2].MC._x <= -50) {
_sporePool[_local2].Enable = false;
if (!_eol) {
_sporePool[_local2].Reset();
}
}
}
_local2++;
}
}
function EOLMove() {
var _local3 = 0;
while (_local3 < _enemyMax) {
if (_enemyPool[_local3]._enable == true) {
_enemyPool[_local3]._x = _enemyPool[_local3]._x - 20;
if (_enemyPool[_local3].MC._x <= -150) {
_enemyPool[_local3].Enable = false;
if (!_eol) {
_enemyPool[_local3].Reset();
}
}
}
_local3++;
}
var _local2 = 0;
while (_local2 < _sporeMax) {
if (_sporePool[_local2]._enable == true) {
_sporePool[_local2]._x = _sporePool[_local2]._x - 20;
if (_sporePool[_local2].MC._x <= -50) {
_sporePool[_local2].Enable = false;
if (!_eol) {
_sporePool[_local2].Reset();
}
}
}
_local2++;
}
}
function get EOL() {
return(_eol);
}
function set EOL(eol) {
_eol = eol;
//return(EOL);
}
function GetElement(xElement, wich) {
if (wich) {
return(_enemyPool[xElement]);
}
return(_sporePool[xElement]);
}
var _playerInstance = null;
var _enemyTemp = null;
var _colorArray1 = null;
var _colorEffect3 = null;
var _enemyPool = null;
var _levelCurrentEnemies = null;
var _wavePoint = null;
var _enemyMovieClip = null;
var _containerMovieClip = null;
static var _instance = null;
var _sporePool = null;
var _sporeTemp = null;
static var _sporePoint = null;
var _eol = false;
}
Symbol 1042 MovieClip [__Packages.template.Characters.Enemy] Frame 0
class template.Characters.Enemy
{
static var _grabOnce;
var _enable, _enemyType, _enemyOnStage, _enemyDeath, _stopScroll, _coolDown, _shotTimer, _shooting, _hitted, _once, _dieOnce, _collisionId, _speed, _tentacleIdleSound, _swallowHelper, _prevEnemyType, _screenWidth, _screenHeight, _rotationOffset, _radius, _soundFlag;
function Enemy (enemymc) {
_grabOnce = false;
_enable = false;
_enemyMc = enemymc;
enemymc._visible = false;
enemymc.mc_colbox._visible = false;
_enemyMc.mc_colbox._visible = false;
_enemyType = -1;
_enemyOnStage = false;
_health = 6;
_enemyDeath = false;
_delta = new flash.geom.Point();
_center = new flash.geom.Point();
_positionOffset = new flash.geom.Point();
_stopScroll = false;
_coolDown = randRange(5, 20);
_shotTimer = 0;
_shooting = false;
_hitted = false;
_once = false;
_dieOnce = false;
_collisionId = 2;
_speed = 10;
_tentacleIdleSound = false;
_swallowHelper = false;
}
function get EnemyCount() {
return(_enemyCount);
}
function set EnemyCount(enemyCount) {
_enemyCount = enemyCount;
//return(EnemyCount);
}
function get PrevType() {
return(_prevEnemyType);
}
function get Type() {
return(_enemyType);
}
function set Type(etype) {
(_prevEnemyType = _enemyType);
(_enemyType = etype);
//return(Type);
}
function set MC(enemymc) {
_enemyMc = enemymc;
//return(MC);
}
function get MC() {
return(_enemyMc);
}
function set OnStage(onStage) {
_enemyOnStage = onStage;
//return(OnStage);
}
function get OnStage() {
return(_enemyOnStage);
}
function set Enable(enable) {
_enable = enable;
//return(Enable);
}
function get Enable() {
return(_enable);
}
function set Width(screenwidth) {
_screenWidth = screenwidth;
//return(Width);
}
function get Width() {
return(_screenWidth);
}
function set Height(screenheight) {
_screenHeight = screenheight;
//return(Height);
}
function get Height() {
return(_screenHeight);
}
function get CollisionId() {
return(_collisionId);
}
function get IsDead() {
return(_enemyDeath);
}
function Aim(thisX, thisY, ClockWise) {
_center.x = _positionOffset.x;
_center.y = _positionOffset.y;
_delta.x = _enemyMc._x - thisX;
_delta.y = _enemyMc._y - thisY;
_delta.normalize;
if (ClockWise == true) {
var _local2 = Math.atan2(_delta.y, _delta.x);
_local2 = ((_local2 * 57.2957795130823) - _rotationOffset) - 90;
} else {
var _local2 = Math.atan2(-_delta.y, -_delta.x);
_local2 = ((_local2 * -57.2957795130823) - _rotationOffset) - 90;
}
if (Math.abs(_local2) < 60) {
return(_local2);
}
var _local2 = 60;
return(_local2);
}
function CalculateRange(posX, posY) {
_center.x = _positionOffset.x;
_center.y = _positionOffset.y;
_delta.x = _center.x - posX;
_delta.y = _center.y - posY;
_delta.x = _delta.x * _delta.x;
_delta.y = _delta.y * _delta.y;
if ((_radius * _radius) > (_delta.x + _delta.y)) {
return(true);
}
return(false);
}
function CalculateFrame() {
if ((_enemyMc._x > 0) && (_enemyMc._x < _screenWidth)) {
return(true);
}
return(false);
}
function Start(point) {
_enable = true;
_enemyMc._visible = true;
_enemyMc._x = point.x;
_enemyMc._y = point.y;
_health = 3;
switch (_enemyType) {
case 0 :
_health = 1;
break;
case 1 :
_enemyMc._y = _enemyMc._y - randRange(10, 90);
_radius = 400;
break;
case 2 :
_radius = 75;
_enemyMc._y = _enemyMc._y - randRange(5, 15);
break;
case 3 :
_rotationOffset = 30;
_radius = 600;
_enemyMc._y = _enemyMc._y - randRange(40, 80);
break;
case 4 :
_enemyMc._y = _enemyMc._y - randRange(180, 210);
break;
case 5 :
_radius = 100;
_enemyMc._y = _enemyMc._y + 225;
break;
case 6 :
_enemyMc._y = _enemyMc._y - randRange(0, 250);
}
}
function Move(BenCharacter1) {
UpdateSound();
if (BenCharacter1.__get__HoldBen() == false) {
_enemyMc._x = _enemyMc._x - _speed;
}
switch (_enemyType) {
case 0 :
if (_enemyDeath == false) {
_enemyMc.gotoAndStop("Spore");
_enemyMc.EnemyAnim.gotoAndStop(1);
} else {
if (!_dieOnce) {
_enemyMc.EnemyAnim.play();
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
_dieOnce = true;
_enemyMc.EnemyAnim.gotoAndStop(18);
}
}
break;
case 1 :
_positionOffset.x = _enemyMc._x;
_positionOffset.y = _enemyMc._y - 180;
_testRadius._x = _positionOffset.x;
_testRadius._y = _positionOffset.y;
if (_enemyDeath == false) {
_enemyMc.gotoAndStop("ExplosivePlantIdle");
_enemyMc.EnemyAnim.gotoAndStop(1);
if (CalculateRange(BenCharacter1.__get__MC()._x, BenCharacter1.__get__MC()._y) == true) {
_enemyDeath = true;
}
} else {
_enemyMc.EnemyAnim.play();
if (_enemyMc.EnemyAnim._currentframe == 10) {
var _local3 = 90;
while (_local3 <= 270) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, _local3, 0, _speed * 1.1, 1);
_local3 = _local3 + 30;
}
template.SoundLoader.GetInstance()._shotSound2 = true;
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
_enemyMc.EnemyAnim.gotoAndStop(39);
}
}
break;
case 2 :
_positionOffset.x = _enemyMc._x;
_positionOffset.y = _enemyMc._y - 120;
if (BenCharacter1.__get__Inmunity() == true) {
_radius = 0;
} else {
_radius = 75;
}
if ((!_enemyDeath) && (!_hitted)) {
if ((_inRange == false) && (!template.Characters.EnemyManager.GetInstance().__get__EOL())) {
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("LowGrabberIdle");
} else {
_enemyMc.gotoAndStop("LowPlantIdle");
}
if (CalculateRange(BenCharacter1.__get__MC()._x, BenCharacter1.__get__MC()._y) == true) {
if (BenCharacter1.__get__HoldBen() == false) {
_inRange = true;
BenCharacter1.__set__HoldBen(true);
BenCharacter1.__set__Trapped(true);
}
_radius = 0;
}
}
if ((_inRange == true) && (!template.Characters.EnemyManager.GetInstance().__get__EOL())) {
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("LowGrabberAttack");
} else {
_enemyMc.gotoAndStop("LowPlantCatch");
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
BenCharacter1.__set__HoldBen(false);
BenCharacter1.Health = BenCharacter1.Health - 30;
BenCharacter1.__set__Inmunity(true);
BenCharacter1.__set__Released(true);
_enemyMc.EnemyAnim.stop();
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("LowGrabberIdle");
} else {
_enemyMc.gotoAndStop("LowPlantIdle");
}
_inRange = false;
}
}
}
if (_enemyDeath) {
_hitted = false;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("LowGrabberDrying");
}
_enemyMc.gotoAndStop("LowPlantDrying");
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
Reset();
}
}
if (_hitted) {
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("LowGrabberHit");
} else {
_enemyMc.gotoAndStop("LowPlantHit");
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
_hitted = false;
}
}
break;
case 3 :
if (!_shooting) {
_shotTimer++;
}
if ((!_hitted) && (!_enemyDeath)) {
_enemyMc.gotoAndStop("ShooterAttack");
_enemyMc.EnemyAnim.ShooterHead.stop(1);
if (BenCharacter1.__get__MC()._x < _enemyMc._x) {
_positionOffset.x = _enemyMc._x - 7;
_positionOffset.y = _enemyMc._y - 38;
_enemyMc._xscale = -Math.abs(_enemyMc._xscale);
if (CalculateFrame()) {
_enemyMc.EnemyAnim.ShooterHead._rotation = Aim(BenCharacter1.__get__MC()._x, BenCharacter1.__get__MC()._y, false);
if (_shotTimer > _coolDown) {
_shotTimer = 0;
_shooting = true;
}
if (_shooting) {
_enemyMc.EnemyAnim.ShooterHead.play();
if (_enemyMc.EnemyAnim.ShooterHead._currentframe == _enemyMc.EnemyAnim.ShooterHead._totalframes) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, _enemyMc.EnemyAnim.ShooterHead._rotation - _rotationOffset, 118, (_speed * 1.5) - 2.5, 0);
template.SoundLoader.GetInstance()._shotSound2 = true;
_shooting = false;
}
}
}
} else {
_positionOffset.x = _enemyMc._x + 7;
_positionOffset.y = _enemyMc._y - 38;
_enemyMc._xscale = Math.abs(_enemyMc._xscale);
if (CalculateFrame()) {
_enemyMc.EnemyAnim.ShooterHead._rotation = Aim(BenCharacter1.__get__MC()._x, BenCharacter1.__get__MC()._y, true);
if (_shotTimer > _coolDown) {
_shotTimer = 0;
_shooting = true;
}
if (_shooting) {
_enemyMc.EnemyAnim.ShooterHead.play();
if (_enemyMc.EnemyAnim.ShooterHead._currentframe == _enemyMc.EnemyAnim.ShooterHead._totalframes) {
template.Characters.BulletManager.GetInstance().Fire(_positionOffset.x, _positionOffset.y, (-_enemyMc.EnemyAnim.ShooterHead._rotation) - 100, 112, _speed - 2.5, 0);
template.SoundLoader.GetInstance()._shotSound2 = true;
_shooting = false;
}
}
}
}
}
if (_enemyDeath) {
_hitted = false;
_enemyMc.gotoAndStop("ShooterDrying");
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
Reset();
}
}
if (_hitted) {
_enemyMc.gotoAndStop("ShooterHit");
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
_hitted = false;
_enemyMc.gotoAndStop("ShooterAttack");
}
}
break;
case 4 :
if (_enemyDeath == false) {
_enemyMc.gotoAndStop("HigherPlantIdle");
} else {
_enemyMc.EnemyAnim.play();
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
Reset();
}
}
break;
case 5 :
if (BenCharacter1.__get__Inmunity() == true) {
_radius = 0;
} else {
_radius = 100;
}
_positionOffset.x = _enemyMc._x;
_positionOffset.y = _enemyMc._y - 450;
_testRadius._x = _positionOffset.x;
_testRadius._y = _positionOffset.y;
if ((!_enemyDeath) && (!_hitted)) {
if ((_inRange == false) && (!template.Characters.EnemyManager.GetInstance().__get__EOL())) {
_enemyMc._visible = true;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("HigherPlantIdle2");
} else {
_enemyMc.gotoAndStop("HighPlantIdle");
}
if (CalculateRange(BenCharacter1.__get__MC()._x, BenCharacter1.__get__MC()._y) == true) {
if (BenCharacter1.__get__Inmunity() == false) {
_health = 99;
if (!_enemyDeath) {
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("HigherPlantAttack2");
} else {
_enemyMc.gotoAndStop("HighPlantAttack");
}
_inRange = true;
if (_enemyMc.EnemyAnim._currentframe == 5) {
BenCharacter1.__set__HoldBen(true);
BenCharacter1.__set__Trapped(true);
_radius = 0;
}
} else {
_inRange = false;
}
}
}
}
if ((_inRange == true) && (!template.Characters.EnemyManager.GetInstance().__get__EOL())) {
_enemyDeath = false;
_hitted = false;
_enemyMc.EnemyAnim.play();
if (_enemyMc.EnemyAnim._currentframe <= 27) {
_health = 99;
if (_enemyMc.EnemyAnim._currentframe == 5) {
BenCharacter1.__set__HoldBen(true);
BenCharacter1.__set__Trapped(true);
}
if (!_swallowHelper) {
_swallowHelper = true;
}
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
if (!_enemyDeath) {
_health = 99;
BenCharacter1.Health = BenCharacter1.Health - 30;
BenCharacter1.__set__Released(true);
BenCharacter1.__set__HoldBen(false);
BenCharacter1.__set__Inmunity(true);
_inRange = false;
_swallowHelper = false;
template.SoundLoader.GetInstance()._spitSound = true;
} else {
BenCharacter1.__set__Released(true);
BenCharacter1.__set__HoldBen(false);
BenCharacter1.__set__Inmunity(true);
_health = 3;
}
}
}
}
if (_enemyDeath) {
_hitted = false;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("HigherPlantDrying2");
} else {
_enemyMc.gotoAndStop("HighPlantDrying");
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
Reset();
}
}
if (_hitted) {
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("HigherPlantHit2");
} else {
_enemyMc.gotoAndStop("HighPlantHit");
}
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
_hitted = false;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() > 3) {
_enemyMc.gotoAndStop("HigherPlantAttack2");
} else {
_enemyMc.gotoAndStop("HighPlantAttack");
}
}
}
break;
case 6 :
if ((!_hitted) && (!_enemyDeath)) {
_enemyMc.gotoAndStop("EyePlantIdle");
}
if (_enemyDeath) {
_hitted = false;
_enemyMc.gotoAndStop("EyePlantDrying");
if (_enemyMc.EnemyAnim._currentframe == _enemyMc.EnemyAnim._totalframes) {
Reset();
}
}
if (!_hitted) {
break;
}
_enemyMc.gotoAndStop("EyePlantHit");
if (_enemyMc.EnemyAnim._currentframe != _enemyMc.EnemyAnim._totalframes) {
break;
}
_hitted = false;
_enemyMc.gotoAndStop("EyePlantIdle");
}
if (_health <= 0) {
if (!_once) {
template.SoundLoader.GetInstance()._deathSound = true;
_once = true;
}
_enemyDeath = true;
}
}
function UpdateSound(Void) {
}
function OnCollide(incoming) {
if (incoming.CollisionId == 5) {
if ((!_enemyDeath) && (!_hitted)) {
switch (_enemyType) {
case 0 :
break;
case 1 :
}
}
_hitted = true;
if (_enemyType != 4) {
_health--;
}
}
}
function Reset() {
if (_enemyDeath == true) {
_enemyCount++;
}
_soundFlag = true;
_grabOnce = false;
_enemyMc._x = -300;
_enemyMc._y = -50;
_enable = false;
_enemyDeath = false;
_enemyMc._visible = false;
_health = 6;
_inRange = false;
_shotTimer = 0;
_shooting = false;
_hitted = false;
_once = false;
_dieOnce = false;
_stopScroll = false;
_tentacleIdleSound = false;
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var _testRadius = null;
static var _enemyCount = 0;
var _enemyMc = null;
var _health = 0;
var _delta = null;
var _center = null;
var _positionOffset = null;
var _inRange = false;
}
Symbol 1043 MovieClip [__Packages.peanut.FX.ColorEffect] Frame 0
class peanut.FX.ColorEffect
{
var mc, mcColor, mcMatrix, bevel, intervalID, color, blink_state, filter;
function ColorEffect (_mc) {
mc = _mc;
mcColor = new Color(mc);
mcMatrix = new peanut.FX.ColorMatrix();
bevel = new flash.filters.BevelFilter();
intervalID = undefined;
color = COLOR_NONE;
blink_state = 0;
}
function startBlink(_time, _color) {
if (intervalID == undefined) {
intervalID = setInterval(blink, _time, this, _color);
}
}
function setColor(_color) {
color = _color;
mcColor.setTransform(color);
}
function stopBlink() {
clearInterval(intervalID);
intervalID = undefined;
color = COLOR_NONE;
mcColor.setTransform(color);
}
function startRandomBlink(_time, _colors) {
intervalID = setInterval(random_blink, _time, this, _colors);
}
function startFireLight(_time, _color, _angle) {
bevel.distance = 3;
bevel.angle = _angle;
bevel.highlightColor = _color;
bevel.highlightAlpha = 0.4;
bevel.shadowColor = 0;
bevel.shadowAlpha = 0.1;
bevel.blurX = 0;
bevel.blurX = 0;
bevel.quality = 1;
bevel.strength = 1;
intervalID = setInterval(fire_light, _time, this, _color);
}
function blink(s, _color) {
if (s.blink_state == 0) {
s.color = _color;
s.blink_state = 1;
} else {
s.color = COLOR_NONE;
s.blink_state = 0;
}
s.mcColor.setTransform(s.color);
}
function random_blink(s, _colors) {
var _local2;
_local2 = random(_colors.length + 1);
if (_local2 == _colors.length) {
s.color = COLOR_NONE;
} else {
s.color = _colors[_local2];
}
s.mcColor.setTransform(s.color);
}
function fire_light(s, _color) {
s.bevel.distance = random(4);
s.mc.filters = [s.bevel];
}
function Hue(n) {
mcMatrix.adjustHue(n);
filter = new flash.filters.ColorMatrixFilter(mcMatrix);
mc.filters = Array(filter);
}
function Saturation(n) {
mcMatrix.adjustSaturation;
filter = new flash.filters.ColorMatrixFilter(mcMatrix);
mc.filters = Array(filter);
}
function Brightness(n) {
mcMatrix.adjustBrightness(n);
filter = new flash.filters.ColorMatrixFilter(mcMatrix);
mc.filters = Array(filter);
}
function Contrast(n) {
mcMatrix.adjustContrast(n);
filter = new flash.filters.ColorMatrixFilter(mcMatrix);
mc.filters = Array(filter);
}
function HSBC(H, S, B, C) {
mcMatrix.adjustColor(B, C, S, H);
filter = new flash.filters.ColorMatrixFilter(mcMatrix);
mc.filters = Array(filter);
}
function cleanValue(p_val, p_limit) {
return(Math.min(p_limit, Math.max(-p_limit, p_val)));
}
function stopFireLight() {
clearInterval(intervalID);
}
static function setShadow(mc_, angulo, blur, alpha, distance_, inner) {
var _local1 = new flash.filters.DropShadowFilter();
var _local2;
_local1.distance = distance_;
_local1.angle = angulo;
_local1.color = 0;
_local1.alpha = alpha;
_local1.blurX = blur;
_local1.blurY = blur;
_local1.quality = 1;
_local1.strength = 1;
_local1.inner = inner;
_local2 = mc_.filters;
_local2.push(_local1);
mc_.filters = _local2;
}
static function setGlow(mc_, color_, blur_, alpha_, inner_) {
var _local2;
var _local1 = new flash.filters.GlowFilter();
_local1.knockout = false;
_local1.color = color_;
_local1.alpha = alpha_;
_local1.blurX = blur_;
_local1.blurY = blur_;
_local1.quality = 3;
_local1.strength = 1;
_local1.inner = inner_;
_local2 = mc_.filters;
_local2.push(_local1);
mc_.filters = _local2;
}
static var COLOR_NONE = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
static var COLOR_RED2 = {ra:"50", rb:"255", ga:"20", gb:"50", ba:"12", bb:"50", aa:"40", ab:"70"};
static var COLOR_WHITE = {ra:"100", rb:"80", ga:"100", gb:"80", ba:"100", bb:"80", aa:"80", ab:"90"};
static var COLOR_BLACK = {ra:"80", rb:"0", ga:"80", gb:"0", ba:"80", bb:"0", aa:"100", ab:"20"};
static var COLOR_RED = {ra:"100", rb:"0", ga:"80", gb:"0", ba:"80", bb:"0", aa:"100", ab:"20"};
static var COLOR_ORANGE = {ra:"100", rb:"0", ga:"80", gb:"0", ba:"80", bb:"0", aa:"100", ab:"20"};
static var COLOR_YELLOW = {ra:"100", rb:"0", ga:"90", gb:"0", ba:"70", bb:"0", aa:"100", ab:"20"};
}
Symbol 1044 MovieClip [__Packages.peanut.FX.ColorMatrix] Frame 0
class peanut.FX.ColorMatrix extends Array
{
var join, slice;
function ColorMatrix (p_matrix) {
super();
p_matrix = fixMatrix(p_matrix);
copyMatrix(((p_matrix.length == LENGTH) ? (p_matrix) : (IDENTITY_MATRIX)));
}
function adjustColor(p_brightness, p_contrast, p_saturation, p_hue) {
adjustHue(p_hue);
adjustContrast(p_contrast);
adjustBrightness(p_brightness);
adjustSaturation(p_saturation);
}
function adjustBrightness(p_val) {
p_val = cleanValue(p_val, 100);
if ((p_val == 0) || (isNaN(p_val))) {
return(undefined);
}
multiplyMatrix([1, 0, 0, 0, p_val, 0, 1, 0, 0, p_val, 0, 0, 1, 0, p_val, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
}
function adjustContrast(p_val) {
p_val = cleanValue(p_val, 100);
if ((p_val == 0) || (isNaN(p_val))) {
return(undefined);
}
var _local2;
if (p_val < 0) {
_local2 = 127 + ((p_val / 100) * 127);
} else {
_local2 = p_val % 1;
if (_local2 == 0) {
_local2 = DELTA_INDEX[p_val];
} else {
_local2 = (DELTA_INDEX[p_val << 0] * (1 - _local2)) + (DELTA_INDEX[(p_val << 0) + 1] * _local2);
}
_local2 = (_local2 * 127) + 127;
}
multiplyMatrix([_local2 / 127, 0, 0, 0, 0.5 * (127 - _local2), 0, _local2 / 127, 0, 0, 0.5 * (127 - _local2), 0, 0, _local2 / 127, 0, 0.5 * (127 - _local2), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
}
function adjustSaturation(p_val) {
p_val = cleanValue(p_val, 100);
if ((p_val == 0) || (isNaN(p_val))) {
return(undefined);
}
var _local2 = 1 + ((p_val > 0) ? ((3 * p_val) / 100) : (p_val / 100));
var _local5 = 0.3086;
var _local4 = 0.6094;
var _local6 = 0.082;
multiplyMatrix([(_local5 * (1 - _local2)) + _local2, _local4 * (1 - _local2), _local6 * (1 - _local2), 0, 0, _local5 * (1 - _local2), (_local4 * (1 - _local2)) + _local2, _local6 * (1 - _local2), 0, 0, _local5 * (1 - _local2), _local4 * (1 - _local2), (_local6 * (1 - _local2)) + _local2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
}
function adjustHue(p_val) {
p_val = (cleanValue(p_val, 180) / 180) * Math.PI;
if ((p_val == 0) || (isNaN(p_val))) {
return(undefined);
}
var _local3 = Math.cos(p_val);
var _local2 = Math.sin(p_val);
var _local5 = 0.213;
var _local4 = 0.715;
var _local6 = 0.072;
multiplyMatrix([(_local5 + (_local3 * (1 - _local5))) + (_local2 * (-_local5)), (_local4 + (_local3 * (-_local4))) + (_local2 * (-_local4)), (_local6 + (_local3 * (-_local6))) + (_local2 * (1 - _local6)), 0, 0, (_local5 + (_local3 * (-_local5))) + (_local2 * 0.143), (_local4 + (_local3 * (1 - _local4))) + (_local2 * 0.14), (_local6 + (_local3 * (-_local6))) + (_local2 * -0.283), 0, 0, (_local5 + (_local3 * (-_local5))) + (_local2 * (-(1 - _local5))), (_local4 + (_local3 * (-_local4))) + (_local2 * _local4), (_local6 + (_local3 * (1 - _local6))) + (_local2 * _local6), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
}
function concat(p_matrix) {
p_matrix = fixMatrix(p_matrix);
if (p_matrix.length != LENGTH) {
return(undefined);
}
multiplyMatrix(p_matrix);
}
function clone() {
return(new peanut.FX.ColorMatrix(this));
}
function toString() {
return(("ColorMatrix [ " + join(" , ")) + " ]");
}
function toArray() {
return(slice(0, 20));
}
function copyMatrix(p_matrix) {
var _local3 = LENGTH;
var _local2 = 0;
while (_local2 < _local3) {
this[_local2] = p_matrix[_local2];
_local2++;
}
}
function multiplyMatrix(p_matrix) {
var _local6 = [];
var _local5 = 0;
while (_local5 < 5) {
var _local3 = 0;
while (_local3 < 5) {
_local6[_local3] = this[_local3 + (_local5 * 5)];
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
var _local4 = 0;
var _local2 = 0;
while (_local2 < 5) {
_local4 = _local4 + (p_matrix[_local3 + (_local2 * 5)] * _local6[_local2]);
_local2++;
}
this[_local3 + (_local5 * 5)] = _local4;
_local3++;
}
_local5++;
}
}
function cleanValue(p_val, p_limit) {
return(Math.min(p_limit, Math.max(-p_limit, p_val)));
}
function fixMatrix(p_matrix) {
if (p_matrix instanceof peanut.FX.ColorMatrix) {
p_matrix = p_matrix.slice(0);
}
if (p_matrix.length < LENGTH) {
p_matrix = p_matrix.slice(0, p_matrix.length).concat(IDENTITY_MATRIX.slice(p_matrix.length, LENGTH));
} else if (p_matrix.length > LENGTH) {
p_matrix = p_matrix.slice(0, LENGTH);
}
return(p_matrix);
}
static var DELTA_INDEX = [0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11, 0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.2, 0.21, 0.22, 0.24, 0.25, 0.27, 0.28, 0.3, 0.32, 0.34, 0.36, 0.38, 0.4, 0.42, 0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68, 0.71, 0.74, 0.77, 0.8, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10];
static var IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
static var LENGTH = IDENTITY_MATRIX.length;
}
Symbol 1045 MovieClip [__Packages.template.Item.ItemManager] Frame 0
class template.Item.ItemManager
{
function ItemManager (root) {
_powder = new template.Item.Item(root.attachMovie("POWER UP TALCO", "mc_powder", root.getNextHighestDepth()), 0);
template.Characters.CollisionManager.__get__Instance().Register(_powder, 1);
_life = new template.Item.Item(root.attachMovie("POWER UP VIDA COMPLETO", "mc_life", root.getNextHighestDepth()), 1);
template.Characters.CollisionManager.__get__Instance().Register(_life, 1);
_powder.__get__MC()._visible = true;
_life.__get__MC()._visible = true;
}
static function get Instance() {
if (!_instanceOf) {
_instanceOf = new template.Item.ItemManager(_root.mc_ImEmpty);
}
return(_instanceOf);
}
function GeneratePowder(Void) {
_powder.__get__MC()._visible = true;
if (template.GameManager2.GetInstance().__get__Interface().__get__IsOnPause() || (template.GameManager2.GetInstance().__get__StateMachine() != 1)) {
_powder.__get__MC()._visible = false;
}
if (template.GameManager2.GetInstance().__get__Ben().__get__Powder() < 20) {
_powder.__get__MC()._visible = true;
_powder.__get__MC()._x = _powder.__get__MC()._x - 2;
}
}
function GenerateLife(Void) {
_life.__get__MC()._visible = true;
_life.Start();
}
function Update(Void) {
if (template.GameManager2.GetInstance().__get__Interface().__get__IsOnPause() || (template.GameManager2.GetInstance().__get__StateMachine() != 1)) {
_life.__get__MC()._visible = false;
}
if (_life.__get__Enable()) {
_life.__get__MC()._x = _life.__get__MC()._x - 2;
}
}
function OnShutdown() {
_life.__get__MC().swapDepths(0);
_powder.__get__MC().swapDepths(0);
_powder.__get__MC().removeMovieClip();
_life.__get__MC().removeMovieClip();
_instanceOf = null;
}
static var _instanceOf = null;
var _powder = null;
var _life = null;
}
Symbol 1046 MovieClip [__Packages.template.Item.Item] Frame 0
class template.Item.Item
{
var _enable, _collisionId, _type;
function Item (itemMC, type) {
_itemMC = itemMC;
if (type == 0) {
_enable = true;
}
_posVector = new flash.geom.Point(Stage.width + _offset, Stage.height * 0.5);
_itemMC._x = _posVector.x;
_itemMC._y = _posVector.y;
_itemMC.mc_colbox._visible = false;
_itemMC._visible = true;
_collisionId = 1;
_type = type;
}
function get Enable() {
return(_enable);
}
function set Enable(enable) {
_enable = enable;
//return(Enable);
}
function get CollisionId() {
return(_collisionId);
}
function Start() {
_enable = true;
}
function get MC() {
return(_itemMC);
}
function OnCollide(incoming) {
var _local3 = template.GameManager2.GetInstance().__get__Interface().__get__InterfaceMC().mc_healthbar;
if (_type == 0) {
_itemMC._x = Stage.width + 50;
_itemMC._visible = false;
incoming.Powder = 101;
template.SoundLoader.GetInstance()._powderItem = true;
} else if (_type == 1) {
if (incoming.Health < 101) {
incoming.Health = incoming.Health + 50;
if (incoming.Health > 101) {
incoming.Health = 101;
}
template.SoundLoader.GetInstance()._lifeItem = true;
_local3.gotoAndPlay(incoming.Health);
_enable = false;
}
_itemMC._x = _posVector.x;
_itemMC._y = _posVector.y;
_itemMC._visible = false;
}
}
function get Type() {
return(_type);
}
var _itemMC = null;
var _offset = 50;
var _posVector = null;
var _speedX = 5;
var _itemType = 0;
}
Symbol 232 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 25
stop();
Symbol 280 MovieClip Frame 40
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 1
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 2
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 3
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 4
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 5
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 6
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 7
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 8
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 9
stop();
Symbol 286 MovieClip [MovieClipAnimations] Frame 10
stop();
Symbol 295 MovieClip Frame 10
stop();
Symbol 296 MovieClip [POWER UP TALCO] Frame 1
stop();
Symbol 296 MovieClip [POWER UP TALCO] Frame 2
stop();
Symbol 303 MovieClip Frame 11
stop();
Symbol 304 MovieClip [POWER UP VIDA COMPLETO] Frame 1
stop();
Symbol 304 MovieClip [POWER UP VIDA COMPLETO] Frame 2
stop();
Symbol 325 MovieClip Frame 8
stop();
Symbol 326 MovieClip Frame 1
lineas.setMask(masklineas);
Symbol 330 MovieClip Frame 8
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 2
stop();
Symbol 332 MovieClip Frame 3
stop();
Symbol 338 MovieClip Frame 8
stop();
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 2
stop();
Symbol 342 MovieClip Frame 3
stop();
Symbol 388 MovieClip Frame 1
stop();
Symbol 401 MovieClip Frame 29
stop();
Instance of Symbol 332 MovieClip in Symbol 401 MovieClip Frame 29
/* no clip actions */
Instance of Symbol 342 MovieClip in Symbol 401 MovieClip Frame 29
on (release) {
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._parent._visible = false;
}
Instance of Symbol 342 MovieClip in Symbol 401 MovieClip Frame 31
on (release) {
trace("pepe");
}
Instance of Symbol 332 MovieClip in Symbol 401 MovieClip Frame 32
on (release) {
trace("pito");
}
Symbol 401 MovieClip Frame 38
stop();
Symbol 401 MovieClip Frame 44
stop();
Symbol 409 MovieClip Frame 20
stop();
Symbol 412 MovieClip Frame 17
stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 2
stop();
Symbol 434 MovieClip Frame 8
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 2
stop();
Symbol 436 MovieClip Frame 3
stop();
Symbol 439 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 2
stop();
Symbol 439 MovieClip Frame 3
stop();
Symbol 440 MovieClip [PERDISTE_mc] Frame 1
stop();
Symbol 440 MovieClip [PERDISTE_mc] Frame 29
stop();
Instance of Symbol 436 MovieClip in Symbol 440 MovieClip [PERDISTE_mc] Frame 29
on (release) {
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
template.GameManager2.GetInstance().__get__Interface().LevelTransition();
_root.gotoAndStop("main");
}
Instance of Symbol 439 MovieClip in Symbol 440 MovieClip [PERDISTE_mc] Frame 29
on (release) {
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
template.GameManager2.GetInstance().__set__StateMachine(2);
template.GameManager2.GetInstance().__get__Interface().__set__MapMarkerScroll(211.4);
template.SoundLoader.GetInstance().music = true;
}
Instance of Symbol 436 MovieClip in Symbol 440 MovieClip [PERDISTE_mc] Frame 32
on (release) {
trace("pito");
}
Instance of Symbol 439 MovieClip in Symbol 440 MovieClip [PERDISTE_mc] Frame 33
on (release) {
trace("pepe");
}
Symbol 440 MovieClip [PERDISTE_mc] Frame 44
stop();
Symbol 468 MovieClip Frame 8
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 2
stop();
Symbol 472 MovieClip Frame 3
stop();
Symbol 476 MovieClip Frame 7
stop();
Symbol 478 MovieClip Frame 1
stop();
Symbol 478 MovieClip Frame 2
stop();
Instance of Symbol 476 MovieClip in Symbol 478 MovieClip Frame 2
on (press) {
GameManager2.GetInstance().OnShutdown();
_root.gotoAndStop("main");
}
Symbol 478 MovieClip Frame 3
stop();
Instance of Symbol 472 MovieClip in Symbol 485 MovieClip Frame 7
on (release) {
trace("pepe");
}
Instance of Symbol 478 MovieClip in Symbol 485 MovieClip Frame 15
on (press) {
_root.gotoAndStop("main");
}
Symbol 485 MovieClip Frame 17
stop();
Instance of Symbol 472 MovieClip in Symbol 485 MovieClip Frame 17
on (press) {
GameManager2.GetInstance().OnShutdown();
Storage.GetInstanceOf().Reset();
_root.gotoAndStop("main");
}
Symbol 543 MovieClip Frame 40
stop();
Symbol 648 MovieClip Frame 16
stop();
Symbol 649 MovieClip Frame 16
stop();
Symbol 666 MovieClip Frame 18
stop();
Symbol 667 MovieClip Frame 18
stop();
Symbol 674 MovieClip Frame 18
stop();
Symbol 700 MovieClip Frame 24
stop();
Symbol 701 MovieClip Frame 25
stop();
Symbol 745 MovieClip Frame 24
stop();
Symbol 746 MovieClip Frame 24
stop();
Symbol 809 MovieClip Frame 18
stop();
Symbol 824 MovieClip Frame 32
gotoAndPlay (15);
Symbol 825 MovieClip Frame 52
stop();
Symbol 832 MovieClip Frame 32
gotoAndPlay (15);
Symbol 836 MovieClip [Enemy] Frame 1
stop();
Symbol 836 MovieClip [Enemy] Frame 2
stop();
Symbol 836 MovieClip [Enemy] Frame 3
stop();
Instance of Symbol 543 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 3
onClipEvent (load) {
var _colorEffect2 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect2 = new peanut.FX.ColorEffect(this);
_colorEffect2.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect2 = new peanut.FX.ColorEffect(this);
_colorEffect2.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect2 = new peanut.FX.ColorEffect(this);
_colorEffect2.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect2 = new peanut.FX.ColorEffect(this);
_colorEffect2.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 4
stop();
Instance of Symbol 576 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 4
onClipEvent (load) {
var _colorEffect1 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 1) {
_colorEffect1 = new peanut.FX.ColorEffect(this);
_colorEffect1.HSBC(4, -68, -31, 2);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect1 = new peanut.FX.ColorEffect(this);
_colorEffect1.HSBC(46, -67, -58, -30);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect1 = new peanut.FX.ColorEffect(this);
_colorEffect1.HSBC(46, -67, -58, -30);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect1 = new peanut.FX.ColorEffect(this);
_colorEffect1.HSBC(130, -65, -49, -15);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect1 = new peanut.FX.ColorEffect(this);
_colorEffect1.HSBC(130, -65, -49, -15);
}
}
Symbol 836 MovieClip [Enemy] Frame 5
stop();
Instance of Symbol 615 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 5
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 6
stop();
Instance of Symbol 622 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 6
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 7
stop();
Instance of Symbol 635 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 7
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 8
stop();
Instance of Symbol 649 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 8
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 9
stop();
Instance of Symbol 653 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 9
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 10
stop();
Instance of Symbol 667 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 10
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 11
stop();
Instance of Symbol 668 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 11
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 12
stop();
Instance of Symbol 674 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 12
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 13
stop();
Instance of Symbol 675 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 13
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 14
stop();
Instance of Symbol 678 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 14
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 15
stop();
Instance of Symbol 622 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 15
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 16
stop();
Instance of Symbol 678 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 16
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 836 MovieClip [Enemy] Frame 17
stop();
Symbol 836 MovieClip [Enemy] Frame 18
stop();
Symbol 836 MovieClip [Enemy] Frame 19
stop();
Symbol 836 MovieClip [Enemy] Frame 20
stop();
Symbol 836 MovieClip [Enemy] Frame 21
stop();
Symbol 836 MovieClip [Enemy] Frame 22
stop();
Symbol 836 MovieClip [Enemy] Frame 23
stop();
Symbol 836 MovieClip [Enemy] Frame 24
stop();
Symbol 836 MovieClip [Enemy] Frame 25
stop();
Symbol 836 MovieClip [Enemy] Frame 26
stop();
Symbol 836 MovieClip [Enemy] Frame 27
stop();
Symbol 836 MovieClip [Enemy] Frame 28
stop();
Instance of Symbol 835 MovieClip "EnemyAnim" in Symbol 836 MovieClip [Enemy] Frame 28
onClipEvent (load) {
var _colorEffect4 = null;
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 2) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 3) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(9, 0, -38, 11);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 4) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
if (template.GameManager2.GetInstance().__get__Interface().__get__Level() == 5) {
_colorEffect4 = new peanut.FX.ColorEffect(this);
_colorEffect4.HSBC(100, 30, -21, -17);
}
}
Symbol 845 MovieClip [NUMERO DE NIVEL_MC] Frame 56
stop();
Symbol 861 MovieClip Frame 1
stop();
Symbol 861 MovieClip Frame 2
stop();
Symbol 861 MovieClip Frame 3
stop();
Symbol 865 MovieClip Frame 1
stop();
Symbol 865 MovieClip Frame 2
stop();
Symbol 865 MovieClip Frame 3
stop();
Instance of Symbol 861 MovieClip in Symbol 866 MovieClip Frame 1
on (release) {
template.GameManager2.GetInstance().__set__StateMachine(1);
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._parent._visible = false;
}
Instance of Symbol 865 MovieClip in Symbol 866 MovieClip Frame 1
on (release) {
_parent._parent._parent.gotoAndStop("Objectives");
}
Symbol 876 MovieClip Frame 1
stop();
Symbol 876 MovieClip Frame 2
stop();
Symbol 882 MovieClip Frame 1
stop();
Symbol 882 MovieClip Frame 2
stop();
Instance of Symbol 876 MovieClip "mouse" in Symbol 883 MovieClip Frame 1
on (release) {
template.GameManager2.GetInstance().__get__Ben()._inputType = 0;
this.gotoAndStop("On");
_parent.keyboard.gotoAndStop("Off");
}
Instance of Symbol 882 MovieClip "keyboard" in Symbol 883 MovieClip Frame 1
on (release) {
template.GameManager2.GetInstance().__get__Ben()._inputType = 1;
this.gotoAndStop("On");
_parent.mouse.gotoAndStop("Off");
}
Symbol 893 MovieClip Frame 29
stop();
Instance of Symbol 436 MovieClip in Symbol 893 MovieClip Frame 29
on (press) {
template.GameManager2.GetInstance().__set__StateMachine(1);
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._visible = false;
}
Instance of Symbol 436 MovieClip in Symbol 893 MovieClip Frame 32
on (release) {
trace("pito");
}
Symbol 893 MovieClip Frame 44
stop();
Symbol 896 MovieClip Frame 1
stop();
Symbol 896 MovieClip Frame 2
stop();
Symbol 896 MovieClip Frame 3
stop();
Instance of Symbol 439 MovieClip in Symbol 897 MovieClip Frame 1
on (release) {
template.GameManager2.GetInstance().__set__StateMachine(1);
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._parent._visible = false;
}
Instance of Symbol 896 MovieClip in Symbol 897 MovieClip Frame 1
on (release) {
_parent._parent._parent.gotoAndStop("Options");
}
Symbol 901 MovieClip Frame 29
stop();
Instance of Symbol 436 MovieClip in Symbol 901 MovieClip Frame 29
on (press) {
template.GameManager2.GetInstance().__set__StateMachine(1);
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._visible = false;
}
Instance of Symbol 439 MovieClip in Symbol 901 MovieClip Frame 31
on (release) {
trace("pepe");
}
Instance of Symbol 436 MovieClip in Symbol 901 MovieClip Frame 32
on (release) {
trace("pito");
}
Symbol 901 MovieClip Frame 44
stop();
Symbol 902 MovieClip [OBJETIVO_mc] Frame 1
stop();
Symbol 902 MovieClip [OBJETIVO_mc] Frame 2
stop();
Symbol 904 MovieClip Frame 1
stop();
Symbol 904 MovieClip Frame 29
stop();
Instance of Symbol 332 MovieClip in Symbol 904 MovieClip Frame 29
on (release) {
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._parent._visible = false;
}
Instance of Symbol 342 MovieClip in Symbol 904 MovieClip Frame 29
on (release) {
template.GameManager2.GetInstance().__get__Interface().__set__IsOnPause(false);
_parent._parent._visible = false;
}
Instance of Symbol 342 MovieClip in Symbol 904 MovieClip Frame 31
on (release) {
trace("pepe");
}
Instance of Symbol 332 MovieClip in Symbol 904 MovieClip Frame 32
on (release) {
trace("pito");
}
Symbol 904 MovieClip Frame 38
stop();
Symbol 904 MovieClip Frame 44
stop();
Symbol 905 MovieClip [INSTRUCCIONES_mc] Frame 1
stop();
Symbol 905 MovieClip [INSTRUCCIONES_mc] Frame 2
stop();
Symbol 935 MovieClip Frame 5
stop();
Symbol 938 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 2
stop();
Symbol 938 MovieClip Frame 3
stop();
Symbol 957 MovieClip Frame 1
this.gotoAndPlay(Math.round(Math.random() * this._totalframes));
Symbol 960 MovieClip Frame 15
stop();
Symbol 961 MovieClip Frame 15
stop();
Symbol 978 MovieClip Frame 15
stop();
Symbol 979 MovieClip Frame 17
stop();
Symbol 982 MovieClip Frame 25
stop();
Symbol 993 MovieClip Frame 50
stop();
Symbol 994 MovieClip [bossLib] Frame 1
stop();
Symbol 994 MovieClip [bossLib] Frame 2
stop();
Symbol 994 MovieClip [bossLib] Frame 3
stop();
Symbol 994 MovieClip [bossLib] Frame 4
stop();
Symbol 994 MovieClip [bossLib] Frame 5
stop();
Symbol 994 MovieClip [bossLib] Frame 6
stop();
Symbol 994 MovieClip [bossLib] Frame 7
stop();
Symbol 994 MovieClip [bossLib] Frame 8
stop();
Symbol 994 MovieClip [bossLib] Frame 9
stop();