Frame 1
_global.theStage = this;
stop();
Instance of Symbol 23 MovieClip in Frame 1
onClipEvent (enterFrame) {
var l_pc = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (l_pc == 100) {
_parent.gotoAndStop("LoadingStepTwo");
} else {
this.gotoAndStop(l_pc);
}
this.pc = l_pc + "%";
}
Instance of Symbol 26 MovieClip in Frame 2
onClipEvent (load) {
function getScores() {
if (gProxyObj == undefined) {
listScores();
} else {
gProxyObj.getScores(cbFunc2);
}
}
function submitScore() {
if (gProxyObj == undefined) {
listScores();
} else {
gProxyObj.submitScore(_global.C.oScore.points, cbFunc);
}
}
function initHiScores() {
gProxyObj.setGame_Id("dp_out");
_global.C.isLoggedIn = gProxyObj.getIsLoggedIn();
if (gProxyObj == undefined) {
_global.C.isLoggedIn = false;
}
Debug.trace("_global.C.isLoggedIn: " + _global.C.isLoggedIn);
}
function listScores() {
if (gProxyObj == undefined) {
_global.theStage.screen.txtLoading.text = "Oops! The high score list isn\u2019t available right now!";
} else {
writeList(_global.theStage.screen);
_global.theStage.screen.btnScroll.onPress = mx.utils.Delegate.create(this, scrollDragPress);
_global.theStage.screen.btnScroll.onRelease = mx.utils.Delegate.create(this, scrollDragRelease);
_global.theStage.screen.btnScroll.onReleaseOutside = mx.utils.Delegate.create(this, scrollDragRelease);
_global.theStage.screen.btnScroll.onEnterFrame = mx.utils.Delegate.create(this, scrollDrag);
}
}
function cbFunc(thisBool) {
Debug.trace("cbFunc");
if (thisBool) {
listScores();
} else {
_global.theStage.screen.txtLoading.text = "Oops! The high score list isn\u2019t available right now!";
_global.theStage.screen.btnScroll = false;
}
}
function cbFunc2(thisBool) {
Debug.trace("cbFunc2");
if (thisBool) {
listScores();
} else {
_global.theStage.screen.txtLoading.text = "Oops! The high score list isn\u2019t available right now!";
_global.theStage.screen.btnScroll = false;
}
}
function writeList(l_mcTarget) {
parseList();
var _local9 = 15;
var _local10 = 0;
var _local8 = "_hsItem20";
var _local7 = "_hsItem100";
var _local3;
var _local5;
var _local4;
var _local2;
l_mcTarget.txtLoading.text = "";
var _local1 = 0;
while (_local1 < gProxyObj.getScoreCount()) {
l_oTempFighter = new Object();
l_aTempData = gProxyObj.getScoreItem(_local1);
l_oTempFighter.name = l_aTempData[0];
l_oTempFighter.score = l_aTempData[1];
_local2 = new Object();
_local2._x = _local9;
_local2._y = _local10 + (_local1 * 24);
if (_local1 < 20) {
_local3 = _local8;
} else {
_local3 = _local7;
}
_local5 = l_mcTarget.hsList.scoreListNormal.attachMovie(_local3, "player" + _local1, _local1 + 5, _local2);
_local4 = l_mcTarget.hsList.scoreListShadow.attachMovie(_local3, "player" + _local1, _local1 + 5, _local2);
_local5.txtPlayer.text = l_oTempFighter.name;
_local4.txtPlayer.text = l_oTempFighter.name;
_local5.txtScore.text = l_oTempFighter.score;
_local4.txtScore.text = l_oTempFighter.score;
_local1++;
}
mcList = l_mcTarget.hsList;
mcList.initY = 110;
mcList.maxY = (mcList.initY - mcList._height) + 215;
}
function init() {
initHiScores();
_global.SoundCTRL.playSound("MusicPackaging", MUSIC_VOLUME, 100000);
goToScreen("TitleCard");
oScore = new ffa.ScoreDisplay();
}
function mute() {
SoundActive = false;
_global.SoundCTRL.muteAllSounds();
_global.menu.sousMenu.gotoAndStop(2);
}
function unmute() {
SoundActive = true;
_global.SoundCTRL.unmuteAllSounds();
_global.menu.sousMenu.gotoAndStop(1);
}
function initGame(bPlayAgain, nLevel) {
Life = 3;
oScore.resetGlobal();
Level = nLevel;
goToScreen("Game_LEVEL" + Level, true);
_global.SoundCTRL.fadeOutSound("MusicPackaging");
if ((Level == 1) || (Level == 2)) {
_global.SoundCTRL.playSound("MusicInGame", MUSIC_VOLUME, 1000);
} else if (Level == 3) {
_global.SoundCTRL.playSound("MusicFreakshow", MUSIC_VOLUME, 1000);
}
GameActive = true;
}
function endGame(endType) {
Score = _global.Game.Pers.Point;
_global.Game.destroyAll();
if (endType == "lose") {
goToScreen("BadEnding", true);
if ((Level == 1) || (Level == 2)) {
_global.SoundCTRL.fadeOutSound("MusicInGame");
} else if (Level == 3) {
_global.SoundCTRL.fadeOutSound("MusicFreakshow");
}
_global.SoundCTRL.playSound("BadEnding", MUSIC_VOLUME, 0);
calculateBonus(true);
} else {
goToScreen("GoodEnding", true);
_global.SoundCTRL.fadeOutSound("MusicFreakshow");
_global.SoundCTRL.playSound("GoodEnding", MUSIC_VOLUME, 0);
calculateBonus(false);
}
}
function nextLevel() {
Life = _global.Game.Pers.oLifeBar.getEnergy();
_global.Game.destroyAll();
Level++;
_global.Transition.gotoAndStop("Transition");
NextScreen = "Game_LEVEL" + Level;
Reset = true;
if (Level == 3) {
_global.SoundCTRL.fadeOutSound("MusicInGame");
_global.SoundCTRL.playSound("MusicFreakshow", MUSIC_VOLUME, 10000);
}
}
function goodEndingButton(l_bSubmit) {
bSubmit = l_bSubmit;
goToScreen("HighScores");
_global.SoundCTRL.playSound("MusicPackaging", MUSIC_VOLUME, 100000);
}
function badEndingButton(l_bSubmit) {
bSubmit = l_bSubmit;
goToScreen("HighScores");
_global.SoundCTRL.playSound("MusicPackaging", MUSIC_VOLUME, 100000);
}
function submitScoreAndHide() {
submitScore();
_global.theStage.screen.submitScore._visible = false;
}
function quitConfirm() {
_global.Popup.gotoAndStop("QuitConfirm");
_global.Popup.disable.enabled = false;
}
function quit() {
goToScreen("TitleCard");
if ((Level == 1) || (Level == 2)) {
_global.SoundCTRL.fadeOutSound("MusicInGame");
} else if (Level == 3) {
_global.SoundCTRL.fadeOutSound("MusicFreakshow");
}
_global.SoundCTRL.playSound("MusicPackaging", MUSIC_VOLUME, 100000);
}
function quitCancel() {
_global.Popup.gotoAndStop("Sleep");
}
function showHelp(inGame) {
if (inGame) {
_global.menu.btnClose.enabled = false;
_global.menu.sousMenu.gotoAndStop(3);
_global.Popup.gotoAndStop("Instructions1");
_global.Popup.btnPlay._visible = false;
_global.Popup.btnBackToTitleCard._visible = false;
_global.Popup.btnNextInstructions._visible = false;
_global.Popup.btnPlayInstructions._visible = false;
} else {
_global.Popup.gotoAndStop("Instructions1");
_global.Popup.btnBackToGame._visible = false;
_global.theStage.gotoAndStop("Reset");
}
}
function hideHelp() {
_global.Popup.gotoAndStop("Sleep");
_global.menu.btnClose.enabled = true;
_global.menu.sousMenu.gotoAndStop(1);
}
function goToScreen(Screen, ResetLevel) {
_global.Transition.gotoAndStop("Transition");
LastScreen = NextScreen;
NextScreen = Screen;
Reset = ResetLevel;
}
function resetScreen() {
if (Reset) {
_root.gotoAndStop("Reset");
}
_global.Popup.gotoAndStop(1);
}
function showScreen() {
_global.theStage.gotoAndStop(NextScreen);
if ((NextScreen == "GoodEnding") || (NextScreen == "BadEnding")) {
oScore.showTotal(_global.theStage.screen.score);
if (!isLoggedIn) {
_global.theStage.screen.submitScore._visible = false;
} else {
_global.theStage.screen.submitScore._visible = true;
}
} else if (NextScreen == "HighScores") {
switch (LastScreen) {
case "GoodEnding" :
_global.theStage.screen.btnBack._visible = false;
_global.theStage.screen.btnPlayAgain._visible = true;
_global.theStage.screen.btnTryAgain._visible = false;
if (bSubmit || (!isLoggedIn)) {
_global.theStage.screen.submitScore._visible = false;
} else {
_global.theStage.screen.submitScore._visible = true;
}
break;
case "BadEnding" :
_global.theStage.screen.btnBack._visible = false;
_global.theStage.screen.btnPlayAgain._visible = false;
_global.theStage.screen.btnTryAgain._visible = true;
if (bSubmit || (!isLoggedIn)) {
_global.theStage.screen.submitScore._visible = false;
} else {
_global.theStage.screen.submitScore._visible = true;
}
break;
default :
_global.theStage.screen.btnBack._visible = true;
_global.theStage.screen.btnPlayAgain._visible = false;
_global.theStage.screen.btnTryAgain._visible = false;
_global.theStage.screen.submitScore._visible = false;
}
if (bSubmit) {
bSubmit = false;
submitScore();
} else {
getScores();
}
}
}
function scrollDrag() {
var _local2 = _global.theStage.screen.btnScroll;
var _local3 = _global.theStage.screen.hsList;
var _local5;
var _local4;
if (_local2.bDrag) {
_local4 = Math.round(((_local2._y - 100) / 155) * 100);
_local5 = 60 - ((_local3._height - 210) * (_local4 / 100));
_local3._y = _local5;
}
}
function scrollDragPress() {
var _local2 = _global.theStage.screen.btnScroll;
var _local3 = _global.theStage.screen.hsList;
_local2.startDrag(false, _local2._x, 100, _local2._x, 255);
_local2.bDrag = true;
}
function scrollDragRelease() {
var _local2 = _global.theStage.screen.btnScroll;
var _local3 = _global.theStage.screen.hsList;
_local2.stopDrag();
_local2.bDrag = false;
}
function openMenu() {
_global.Game.broadcastMessage("pause", true);
_global.menu.gotoAndPlay("Opens");
}
function closeMenu() {
_global.Game.broadcastMessage("resume", true);
_global.menu.gotoAndPlay("Closes");
}
function endLevel(CurrentPoint, CurrentLife) {
Life = CurrentLife;
Score = CurrentPoint;
_global.Popup.gotoAndStop(Level + "End");
}
function endTransition() {
_global.Transition.gotoAndStop("Sleep");
}
function ActivateHud() {
_global.menu.btnMenu.enabled = true;
}
function DesactivateHud() {
_global.menu.btnMenu.enabled = false;
}
_global.C = this;
MUSIC_VOLUME = 40;
var Reset = false;
var Time = 0;
var NextScreen = "";
var GameActive = false;
var SoundActive = true;
var TotalScore = 0;
var bSubmit = false;
}
Instance of Symbol 33 MovieClip "Transition" in Frame 2
onClipEvent (load) {
_global.Transition = this;
}
Instance of Symbol 188 MovieClip "Popup" in Frame 2
onClipEvent (load) {
_global.Popup = this;
}
Instance of Symbol 224 MovieClip in Frame 3
onClipEvent (load) {
_global.SoundCTRL = new SoundController(this);
}
Frame 5
_global.C.init();
Frame 21
stop();
Frame 31
stop();
Instance of Symbol 2041 MovieClip in Frame 31
onClipEvent (load) {
this._xscale = 100;
this._yscale = 100;
this._x = 0;
this._y = -320;
this.Control.nLevel = 1;
}
Instance of Symbol 2087 MovieClip "menu" in Frame 31
onClipEvent (load) {
_global.menu = this;
}
Frame 41
stop();
Instance of Symbol 2283 MovieClip in Frame 41
onClipEvent (load) {
this._xscale = 100;
this._yscale = 100;
this._x = 0;
this._y = -250;
this.Control.nLevel = 2;
}
Frame 51
stop();
Instance of Symbol 2676 MovieClip in Frame 51
onClipEvent (load) {
this._xscale = 100;
this._yscale = 100;
this._x = 0;
this._y = -250;
this.Control.nLevel = 3;
}
Frame 61
stop();
Frame 71
stop();
Frame 81
stop();
Symbol 26 MovieClip Frame 2
stop();
Symbol 30 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
on (keyPress "<Space>") {
return(undefined);
}
Symbol 32 MovieClip Frame 2
_global.C.resetScreen();
Symbol 32 MovieClip Frame 4
_global.C.showScreen();
Symbol 32 MovieClip Frame 6
_global.C.endTransition();
Symbol 33 MovieClip Frame 1
gotoAndStop ("Sleep");
Instance of Symbol 32 MovieClip "state" in Symbol 33 MovieClip Frame 11
onClipEvent (load) {
this.frame = 1;
}
Symbol 33 MovieClip Frame 20
gotoAndStop ("Sleep");
Symbol 44 Button
on (release) {
gotoAndStop ("Sleep");
_global.theStage.gotoAndStop("StoryLine");
}
Symbol 124 Button
on (release) {
_global.C.goToScreen("TitleCard", true);
}
Symbol 128 Button
on (release) {
gotoAndStop ("Instructions2");
}
Symbol 129 Button
on (release) {
_global.C.hideHelp();
}
Symbol 135 Button
on (release) {
_global.C.showHelp();
}
Symbol 168 Button
on (release) {
_global.C.goToScreen("TitleCard", true);
}
Symbol 179 Button
on (release) {
_global.C.quit();
}
Symbol 181 Button
on (release) {
_parent.play();
}
Symbol 187 MovieClip Frame 1
btnMask._visible = false;
btnMask.enabled = false;
Symbol 187 MovieClip Frame 20
stop();
Symbol 187 MovieClip Frame 31
_global.C.quitCancel();
Symbol 188 MovieClip Frame 1
gotoAndStop ("Sleep");
Symbol 188 MovieClip Frame 38
gotoAndStop ("Sleep");
Symbol 2739 MovieClip [__Packages.Debug] Frame 0
class Debug
{
static var lc;
function Debug () {
}
static function clear() {
lc = new LocalConnection();
lc.send("trace", "clear");
}
static function setLevel(pLvl) {
level = pLvl;
}
static function trace(pMsg, pLvl) {
var _local1;
if (pLvl != undefined) {
_local1 = pLvl;
} else {
_local1 = level;
}
lc = new LocalConnection();
lc.send("trace", "trace", pMsg, _local1);
}
static function traceObject(o, pRecurseDepth, pLvl, pIndent) {
var _local7;
var _local5;
var _local6;
if (pLvl != undefined) {
_local6 = pLvl;
} else {
_local6 = level;
}
if (pRecurseDepth == undefined) {
_local7 = 0;
} else {
_local7 = pRecurseDepth;
}
if (pIndent == undefined) {
_local5 = 0;
} else {
_local5 = pIndent;
}
for (var _local8 in o) {
var _local3 = "";
var _local1 = 0;
while (_local1 < _local5) {
_local3 = _local3 + " ";
_local1++;
}
var _local2 = o[_local8].toString();
if (o[_local8] instanceof Array) {
_local2 = "[Array]";
}
if (_local2 == "[object Object]") {
_local2 = "[Object]";
}
trace(((_local3 + _local8) + ": ") + _local2, _local6);
if (_local7 > 0) {
traceObject(o[_local8], _local7 - 1, _local6, _local5 + 1);
}
}
}
static var level = 0;
static var DEBUG = 0;
static var INFO = 1;
static var WARN = 2;
static var ERROR = 3;
static var FATAL = 4;
}
Symbol 2740 MovieClip [__Packages.ffa.ScoreDisplay] Frame 0
class ffa.ScoreDisplay
{
var mcScore, nPoints, nEnnemyBeated, nCombo, nLevel, nTimeElapsed, nLifeRemaining, nEnergyRemaining;
function ScoreDisplay () {
resetGlobal();
}
function init(l_mcContainer) {
mcScore = l_mcContainer;
mcScore.gotoAndPlay("Idle");
mcScore.anim.score.text = com.sarbakan.utils.StringComplex.pad(nPoints, 8);
}
function resetGlobal() {
nPoints = 0;
resetLevel();
}
function resetLevel(l_nLevel) {
nEnnemyBeated = 0;
nCombo = 0;
nLevel = l_nLevel;
}
function addPoints(l_nAmount) {
nPoints = nPoints + l_nAmount;
mcScore.anim.score.text = com.sarbakan.utils.StringComplex.pad(nPoints, 8);
mcScore.gotoAndPlay("Add");
}
function addEnnemyBeated(l_nAmount) {
nEnnemyBeated = nEnnemyBeated + l_nAmount;
addPoints(l_nAmount * 1000);
}
function addCombo(l_nComboSequence) {
var _local3;
var _local2 = 1;
while (_local2 <= l_nComboSequence) {
_local3 = _local2 * 1000;
addPoints(_local3);
_local2++;
}
nCombo++;
}
function setTimeElapsed(l_nTime) {
nTimeElapsed = l_nTime;
}
function setLifeRemaining(l_nLife, l_nEnergy) {
nLifeRemaining = l_nLife;
nEnergyRemaining = l_nEnergy;
}
function showStats(l_mcContainer) {
var _local4;
var _local3;
var _local7;
var _local8;
var _local5;
_local4 = (nLifeRemaining + (nEnergyRemaining / 10)) * 10000;
_local7 = 10000;
var _local6 = 750000 /* 0x0B71B0 */;
if (nTimeElapsed > 600) {
_local3 = 0;
} else {
_local3 = Math.round((nTimeElapsed * 5000000000) / Math.pow(nTimeElapsed, 2.75));
if (_local3 > _local6) {
_local3 = _local6;
}
}
_local5 = ((_local4 + _local7) + _local3) + nPoints;
trace("*****LifeBonus: " + _local4);
trace("*****LevelBonus: " + _local7);
trace("*****TimeBonus: " + _local3);
trace("*****StunnedEnnemies: " + nEnnemyBeated);
trace("*****CombosPerformed: " + nCombo);
trace("*****TotalPoints: " + _local5);
nPoints = _local5;
l_mcContainer.stunnedEnnemies.text = com.sarbakan.utils.StringComplex.pad(nEnnemyBeated, 6);
l_mcContainer.stunnedEnnemies_shadow.text = com.sarbakan.utils.StringComplex.pad(nEnnemyBeated, 6);
l_mcContainer.combos.text = com.sarbakan.utils.StringComplex.pad(nCombo, 6);
l_mcContainer.combos_shadow.text = com.sarbakan.utils.StringComplex.pad(nCombo, 6);
l_mcContainer.energyBonus.text = com.sarbakan.utils.StringComplex.pad(_local4, 6);
l_mcContainer.energyBonus_shadow.text = com.sarbakan.utils.StringComplex.pad(_local4, 6);
l_mcContainer.timeBonus.text = com.sarbakan.utils.StringComplex.pad(_local3, 6);
l_mcContainer.timeBonus_shadow.text = com.sarbakan.utils.StringComplex.pad(_local3, 6);
l_mcContainer.time.text = com.sarbakan.utils.StringComplex.formatTime(nTimeElapsed);
l_mcContainer.time_shadow.text = com.sarbakan.utils.StringComplex.formatTime(nTimeElapsed);
l_mcContainer.total.text = com.sarbakan.utils.StringComplex.pad(_local5, 8);
l_mcContainer.total_shadow.text = com.sarbakan.utils.StringComplex.pad(_local5, 8);
}
function showTotal(l_mcContainer) {
l_mcContainer.total.text = com.sarbakan.utils.StringComplex.pad(nPoints, 8);
}
function get points() {
return(nPoints);
}
}
Symbol 2741 MovieClip [__Packages.com.sarbakan.utils.StringComplex] Frame 0
class com.sarbakan.utils.StringComplex
{
function StringComplex () {
}
static function pad(l_nToPad, l_nMinLength) {
var _local1 = String(l_nToPad);
while (_local1.length < l_nMinLength) {
_local1 = "0" + _local1;
}
return(_local1);
}
static function formatTime(l_nTime) {
var _local2 = l_nTime;
var _local1 = Math.floor(_local2 / 60);
var _local3 = Math.round(_local2 - (_local1 * 60));
return((pad(_local1, 2) + ":") + pad(_local3, 2));
}
}
Symbol 2742 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 2743 MovieClip [__Packages.SoundController] Frame 0
class SoundController
{
var mcSoundFX, SOUND_FADE_SPEED, bMute;
function SoundController (l_mcContainer) {
l_mcContainer.createEmptyMovieClip("soundFX", 2);
l_mcContainer.createEmptyMovieClip("music", 3);
mcSoundFX = l_mcContainer.soundFX;
SOUND_FADE_SPEED = 5;
bMute = false;
}
function clearSound() {
for (var _local2 in mcSoundFX) {
mcSoundFX[_local2].onEnterFrame = function () {
this.oSound.setVolume(this.oSound.getVolume() - this.oSound.SOUND_FADE_SPEED);
if (this.oSound.getVolume() <= 0) {
this.oSound.stop();
this.removeMovieClip();
}
};
}
}
function fadeOutSound(l_sLinkage) {
mcSoundFX["oClip" + l_sLinkage].onEnterFrame = function () {
this.oSound.setVolume(this.oSound.getVolume() - this.oSound.SOUND_FADE_SPEED);
if (this.oSound.getVolume() <= 0) {
this.oSound.stop();
this.removeMovieClip();
}
};
}
function stopSound(l_sID) {
bMute = false;
mcSoundFX["oClip" + l_sID].oSound.setVolume(0);
}
function muteAllSounds() {
bMute = true;
for (var _local2 in mcSoundFX) {
mcSoundFX[_local2].initVolume = mcSoundFX[_local2].oSound.getVolume();
mcSoundFX[_local2].onEnterFrame = function () {
this.oSound.setVolume(this.oSound.getVolume() - this.oSound.SOUND_FADE_SPEED);
if (this.oSound.getVolume() <= 0) {
delete this.onEnterFrame;
}
};
}
}
function unmuteAllSounds() {
bMute = false;
for (var _local2 in mcSoundFX) {
mcSoundFX[_local2].onEnterFrame = function () {
this.oSound.setVolume(this.oSound.getVolume() + this.oSound.SOUND_FADE_SPEED);
if (this.oSound.getVolume() >= this.initVolume) {
delete this.onEnterFrame;
}
};
}
}
function playSound(l_sLinkage, l_nVolume, l_nLoop, l_bUnique) {
nNextDepth++;
if (l_nLoop == undefined) {
l_nLoop = 0;
}
if (mcSoundFX["oClip" + l_sLinkage] == undefined) {
mcSoundFX.createEmptyMovieClip("oClip" + l_sLinkage, nNextDepth);
var l_oClip = mcSoundFX["oClip" + l_sLinkage];
} else if (!l_bUnique) {
mcSoundFX.createEmptyMovieClip("oClip" + nNextDepth, nNextDepth);
var l_oClip = mcSoundFX["oClip" + nNextDepth];
}
l_oClip.oSound = new Sound(l_oClip);
var _local2 = l_oClip.oSound;
_local2.attachSound(l_sLinkage);
_local2.onSoundComplete = function () {
l_oClip.removeMovieClip();
delete l_oClip;
};
_local2.maxVolume = l_nVolume;
_local2.SOUND_FADE_SPEED = SOUND_FADE_SPEED;
if (bMute) {
l_oClip.initVolume = l_nVolume;
_local2.setVolume(0);
} else {
_local2.setVolume(l_nVolume);
}
_local2.start(0, l_nLoop);
return(_local2);
}
static var nNextDepth = 0;
}
Symbol 2744 MovieClip [__Packages.com.sarbakan.utils.Stater] Frame 0
class com.sarbakan.utils.Stater
{
var bPaused, sCurrentState, dispatchEvent, mcContainer, nFrTotalAnim;
function Stater () {
mx.events.EventDispatcher.initialize(this);
mx.transitions.OnEnterFrameBeacon.init();
MovieClip.addListener(this);
bPaused = false;
}
function setState(l_sState) {
var _local2;
if (sCurrentState != l_sState) {
dispatchEvent({type:"changeState", target:this, newState:l_sState, oldState:sCurrentState});
sCurrentState = l_sState;
_local2 = mcContainer._currentframe;
mcContainer.gotoAndStop(sCurrentState);
if (mcContainer._currentframe == _local2) {
mcContainer.gotoAndStop("Idle");
}
nFrTotalAnim = mcContainer.state._totalframes;
}
}
function onEnterFrame() {
actions();
}
function getState() {
return(sCurrentState);
}
function actions() {
this[sCurrentState]();
}
function destroy() {
MovieClip.removeListener(this);
}
function pause() {
bPaused = true;
}
function resume() {
bPaused = false;
}
}
Symbol 2745 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 2746 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 2747 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 2748 MovieClip [__Packages.ffa.ScrollerElement] Frame 0
class ffa.ScrollerElement extends com.sarbakan.utils.Stater
{
var oScroller, oPers, oCollider, nPosX, nPosY, bActionPause, bAnimPause, addListener, nTrueX, nTrueY, bHitGround, nSpdY, nWidthOutLeft, nWidthOutRight, setState, nMoveX, nSpdX, nMoveY, mcContainer, bFlipped, getState, removeListener;
function ScrollerElement (l_oPosition, l_oScroller, l_oPers, l_oCollider) {
super();
ffa.Info.init();
AsBroadcaster.initialize(this);
oScroller = l_oScroller;
oPers = l_oPers;
oCollider = l_oCollider;
nPosX = l_oPosition.x;
nPosY = l_oPosition.y;
bActionPause = false;
bAnimPause = false;
_global.Game.addListener(this);
addListener(_global.Game);
pause(true);
}
function checkGround() {
var _local2 = oCollider.Sol;
if (_local2.hitTest(nTrueX, nTrueY, true)) {
bHitGround = true;
} else {
while (_local2.hitTest(nTrueX, nTrueY + nSpdY, true) && (nSpdY > 0)) {
nSpdY--;
bHitGround = true;
}
}
}
function checkSleep() {
if ((nPosX <= (oScroller.nInvertedPosX - nWidthOutLeft)) || (nPosX >= (oScroller.nInvertedPosX + nWidthOutRight))) {
setState("Sleep");
}
}
function checkActive() {
if ((nPosX >= (oScroller.nInvertedPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nInvertedPosX + nWidthOutRight))) {
Activate();
}
}
function Activate() {
setState("Idle");
}
function setMove() {
nMoveX = nSpdX;
nMoveY = nSpdY;
}
function moveToPos() {
setMove();
if ((nMoveY != 0) || (nMoveX != 0)) {
nPosX = nPosX + nMoveX;
nPosY = nPosY + nMoveY;
mcContainer._parent._x = nPosX;
mcContainer._parent._y = nPosY;
}
}
function setFlipped(l_bFlipped) {
if (l_bFlipped) {
mcContainer._xscale = Math.abs(mcContainer._xscale) * -1;
} else {
mcContainer._xscale = Math.abs(mcContainer._xscale);
}
bFlipped = l_bFlipped;
}
function setTruePos() {
if (getState() != "Sleep") {
nTrueX = nPosX + oScroller.nPosX;
nTrueY = nPosY + oScroller.nPosY;
}
}
function destroy() {
_global.Game.removeListener(this);
removeListener(_global.Game);
super.destroy();
mcContainer._parent.removeMovieClip();
}
function pause(l_bAnim) {
bActionPause = true;
if (l_bAnim) {
mcContainer.state.stop();
}
bAnimPause = l_bAnim;
}
function resume() {
bActionPause = false;
if (bAnimPause) {
mcContainer.state.play();
}
bAnimPause = false;
}
function replace(l_nX, l_nY) {
nPosX = nPosX + l_nX;
mcContainer._parent._x = nPosX;
nPosY = nPosY + l_nY;
mcContainer._parent._y = nPosY;
}
function replaceToPos() {
mcContainer._parent._x = nPosX;
mcContainer._parent._y = nPosY;
}
function actions() {
if (!bAnimPause) {
setTruePos();
super.actions();
} else {
mcContainer.state.stop();
}
}
static var bDEBUG = false;
}
Symbol 2749 MovieClip [__Packages.ffa.Info] Frame 0
class ffa.Info
{
static var nWidth, nHeight, nFrameRate;
function Info () {
}
static function init() {
nWidth = 600;
nHeight = 300;
nFrameRate = 30;
}
static function get WIDTH() {
return(nWidth);
}
static function get HEIGHT() {
return(nHeight);
}
static function get FRAME_RATE() {
return(nFrameRate);
}
}
Symbol 2750 MovieClip [__Packages.ffa.ennemy.Ennemy] Frame 0
class ffa.ennemy.Ennemy extends ffa.ScrollerElement
{
var nHurtLoop, nHurtLoopMax, checkActive, nFrTotalAnim, mcContainer, setState, destroy, bFlipped, nGetHitLeft, nGetHitRight, nGetHitTop, oPers, nPosX, nPosY;
function Ennemy (l_oPosition, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
nHurtLoop = 0;
nHurtLoopMax = 1;
}
function Sleep() {
checkActive();
}
function Die() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("Dead");
}
}
function Dead() {
mcContainer._parent.removeMovieClip();
destroy();
}
function setFlipped(l_bFlipped) {
super.setFlipped(l_bFlipped);
initGetHurtZone();
}
function initHurt() {
}
function initGetHurtZone() {
if (bFlipped) {
nGetHitLeft = mcContainer.HitFront._x;
nGetHitRight = -1 * mcContainer.HitBack._x;
} else {
nGetHitLeft = -1 * mcContainer.HitBack._x;
nGetHitRight = mcContainer.HitFront._x;
}
nGetHitTop = mcContainer.HitTop._y;
}
function checkGetHurt() {
if (oPers.CanHit) {
trace("Right here! ");
if (bDEBUG) {
mcContainer._parent._parent.clear();
mcContainer._parent._parent.lineStyle(5, 255);
mcContainer._parent._parent.moveTo(nPosX + nGetHitRight, nPosY);
mcContainer._parent._parent.lineTo(nPosX - nGetHitLeft, nPosY);
mcContainer._parent._parent.lineTo(nPosX - nGetHitLeft, nPosY + nGetHitTop);
mcContainer._parent._parent.lineTo(nPosX + nGetHitRight, nPosY + nGetHitTop);
mcContainer._parent._parent.lineTo(nPosX + nGetHitRight, nPosY);
}
if ((oPers.HitPointY <= nPosY) && (oPers.HitPointY >= (nPosY + nGetHitTop))) {
if (((oPers.HitPointX <= (nPosX + nGetHitRight)) && (oPers.HitPointX >= (nPosX - nGetHitLeft))) && (oPers.Dir == "D")) {
oPers.CanHit = false;
setFlipped(true);
initHurt();
return(true);
}
if (((oPers.HitPointX >= (nPosX - nGetHitLeft)) && (oPers.HitPointX <= (nPosX + nGetHitRight))) and (oPers.Dir == "G")) {
oPers.CanHit = false;
setFlipped(false);
initHurt();
return(true);
}
}
}
return(false);
}
function checkTarget() {
if ((oPers.PosX >= nPosX) && (bFlipped)) {
setFlipped(false);
} else if ((oPers.PosX <= nPosX) && (!bFlipped)) {
setFlipped(true);
}
}
static var bDEBUG = false;
}
Symbol 2751 MovieClip [__Packages.ffa.ennemy.GWT] Frame 0
class ffa.ennemy.GWT extends ffa.ennemy.Ennemy
{
var sDepth, oScreen, bBeatThemUp, nBeatThemUpOrder, nFrFire, nElement, nPosXFront, nPosYFront, nTargetFrontY, nPosXParallax, nPosYParallax, nEnergy, mcContainerFront, mcContainerParallax, nPosX, nPosY, nFlyToFrontCount, mcContainer, nWidthOutLeft, nWidthOutRight, sGun, bFlipped, nFrontKickDistance, nFrontKickDelay, nFrontKickDelayCount, nHurtLoopMax, nHurtLoop, nSpdYFall, nSpdYFly, nSpdYFlyMax, nMoveX, nMoveY, nSpdX, nSpdY, bWaitForTutorial, initGetHurtZone, oBeam, sChargeType, nChargeDistance, nQuickChargeFr, StraightGunCharge, UpperGunCharge, CrouchedLowerGunCharge, StraightGunAttack, UpperGunAttack, CrouchedLowerGunAttack, sTarget, sBeamColor, nTryRange, nChargeCountDown, oPers, broadcastMessage, moveToPos, checkTarget, bActionPause, checkGetHurt, nFrTotalAnim, bHitGround, sLastHit, oScroller, getState, destroy, setFlipped, bAnimPause;
function GWT (l_mcAttachTargetFront, l_mcAttachTargetParallax, l_oPosition, l_sGunColor, l_sShieldColor, l_oScroller, l_oPers, l_oCollider, l_oScreen, l_sDepth, l_bBeatThemUp) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
var _local4;
var _local5 = nGWT;
nGWT++;
sDepth = l_sDepth;
oScreen = l_oScreen;
bBeatThemUp = l_bBeatThemUp;
nBeatThemUpOrder = 0;
nFrFire = 0;
_local4 = "GWT" + _local5;
nElement = _local5;
nPosXFront = l_oPosition.x;
nPosYFront = l_oPosition.y;
nTargetFrontY = l_oPosition.y;
if (!bBeatThemUp) {
nPosXParallax = (l_oPosition.x / 2) - 150;
} else {
nPosXParallax = l_oPosition.x / 2;
}
nPosYParallax = 345;
nEnergy = 85;
l_mcAttachTargetFront.attachMovie("GWT", _local4, _local5 * 2, {_x:nPosXFront, _y:nPosYFront});
mcContainerFront = l_mcAttachTargetFront[_local4].Obj;
l_mcAttachTargetParallax.attachMovie("GWT", _local4, (_local5 * 2) + 500, {_x:nPosXParallax, _y:nPosYParallax});
mcContainerParallax = l_mcAttachTargetParallax[_local4].Obj;
mcContainerParallax._xscale = 35;
mcContainerParallax._yscale = 35;
if (sDepth == "Parallax") {
nPosX = nPosXParallax;
nPosY = nPosYParallax;
nFlyToFrontCount = 40;
mcContainer = mcContainerParallax;
} else {
nPosX = nPosXFront;
nPosY = nPosYFront;
mcContainer = mcContainerFront;
}
nWidthOutLeft = (0 + (mcContainer._width / 2)) + ACTIVATION_GAP;
nWidthOutRight = (600 + (mcContainer._width / 2)) + ACTIVATION_GAP;
setState("Sleep");
sGun = "WithGun";
bFlipped = false;
nFrontKickDistance = 120;
nFrontKickDelay = 15;
nFrontKickDelayCount = 0;
nHurtLoopMax = 3;
nHurtLoop = 0;
nSpdYFall = 5;
nSpdYFly = -2;
nSpdYFlyMax = -10;
nMoveX = 0;
nMoveY = 0;
nSpdX = 0;
nSpdY = 0;
bWaitForTutorial = false;
initGetHurtZone();
initGunHandle(l_sGunColor);
}
function initHitZone(l_mcAttachTarget, l_mcReference) {
var _local5 = l_mcReference._rotation;
var _local4 = bFlipped;
var _local3;
var _local6;
if (_local4) {
_local3 = (nPosX - l_mcReference._x) - l_mcReference._parent._x;
} else {
_local3 = (nPosX + l_mcReference._x) + l_mcReference._parent._x;
}
_local6 = (nPosY + l_mcReference._y) + l_mcReference._parent._y;
oBeam.launch(_local5, _local3, _local6, _local4);
}
function initGunHandle(l_sType) {
sChargeType = "";
nChargeDistance = 500;
nQuickChargeFr = 25;
StraightGunCharge = mx.utils.Delegate.create(this, GunCharge);
UpperGunCharge = mx.utils.Delegate.create(this, GunCharge);
CrouchedLowerGunCharge = mx.utils.Delegate.create(this, GunCharge);
StraightGunAttack = mx.utils.Delegate.create(this, GunAttack);
UpperGunAttack = mx.utils.Delegate.create(this, GunAttack);
CrouchedLowerGunAttack = mx.utils.Delegate.create(this, GunAttack);
if (l_sType == "red") {
sTarget = "Daniel";
sBeamColor = "Red";
} else if (l_sType == "green") {
sTarget = "Danny";
sBeamColor = "Green";
} else {
sTarget = "All";
sBeamColor = "Combined";
}
oBeam = new ffa.Beam(ffa.Info.__get__WIDTH() * 4, 11, 75, 70);
nTryRange = 15;
nChargeCountDown = Math.round(CHARGE_TIME + (Math.random() * 25));
}
function initGunCharge(l_sChargeType) {
sChargeType = l_sChargeType;
setState(sChargeType + "GunCharge");
if (oPers.CanBeHit) {
mcContainer.state.Beam.color.gotoAndPlay(nQuickChargeFr);
mcContainer.state.gotoAndPlay(nQuickChargeFr);
}
}
function initGunAttack() {
nFrFire = 0;
setState(sChargeType + "GunAttack");
initHitZone(mcContainer._parent._parent, mcContainer.state.Beam);
}
function set waitForTutorial(l_bWait) {
bWaitForTutorial = l_bWait;
//return(waitForTutorial);
}
function get waitForTutorial() {
return(bWaitForTutorial);
}
function Dead() {
broadcastMessage("onGWTDie", nBeatThemUpOrder, true);
super.Dead();
}
function Out() {
switchDepth();
moveToPos();
}
function IdleWithGun() {
checkSleep();
checkTarget();
if ((oPers.Etat != "Die") && (!bActionPause)) {
if (sDepth == "Front") {
if ((!checkFrontKick()) && (!bWaitForTutorial)) {
checkCharge();
}
checkGetHurt();
} else {
checkFlyToFront();
}
}
}
function IdleWithoutGun() {
checkSleep();
checkTarget();
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("JetpackStart" + sGun);
} else {
checkGetHurt();
}
}
function JetpackStartWithGun() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("JetpackIdle" + sGun);
nSpdY = nSpdYFly;
}
}
function JetpackStartWithoutGun() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("JetpackIdle" + sGun);
nSpdY = nSpdYFly * 2;
}
}
function JetpackIdleWithoutGun() {
nSpdY = nSpdY * 1.4;
if (nSpdY < (nSpdYFlyMax * 2)) {
nSpdY = nSpdYFlyMax * 2;
}
checkFlyOut();
moveToPos();
}
function JetpackIdleWithGun() {
if (sDepth == "Parallax") {
nSpdY = nSpdY * 1.2;
if (nSpdY < nSpdYFlyMax) {
nSpdY = nSpdYFlyMax;
}
mcContainer._xscale = mcContainer._xscale + 0.75;
mcContainer._yscale = mcContainer._yscale + 0.75;
checkFlyOut();
moveToPos();
} else {
checkGround();
moveToPos();
if (bHitGround) {
setState("JetpackLanding");
}
}
}
function JetpackLanding() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("Idle" + sGun);
nSpdY = 0;
}
}
function GunCharge() {
if (mcContainer.state._currentframe == (nQuickChargeFr + 1)) {
_global.SoundCTRL.playSound("GWT_Charge", 40, 0);
}
if (mcContainer.state._currentframe == nFrTotalAnim) {
initGunAttack();
}
checkGetHurt();
}
function GunAttack() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
mcContainer.state.stop();
}
nFrFire++;
if ((nFrFire > FIRE_TIME) || (bActionPause)) {
nFrFire = 0;
setState("Idle" + sGun);
nChargeCountDown = Math.round(CHARGE_TIME + (Math.random() * 25));
} else {
checkGetHurt();
checkHit();
}
}
function BackgroundFall() {
if (sDepth == "Front") {
checkFlyOut();
moveToPos();
} else {
if (nPosY > 320) {
setState("BackgroundFallEnd");
}
mcContainer._xscale = mcContainer._xscale - 0.4;
mcContainer._yscale = mcContainer._yscale - 0.4;
moveToPos();
}
}
function BackgroundFallEnd() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
mcContainer.state.stop();
mcContainer._parent.cacheAsBitmap = true;
setState("BackgroundJunk");
broadcastMessage("onGWTDie", nBeatThemUpOrder, true);
trace("Die" + this);
}
}
function BackgroundJunk() {
checkSleep();
}
function HurtWithGun() {
if ((oPers.Etat != "JumpKick") && (checkGetHurt())) {
oPers.nHitCombo++;
nHurtLoop = 0;
} else if (mcContainer.state._currentframe == nFrTotalAnim) {
nHurtLoop++;
if (nHurtLoop == nHurtLoopMax) {
nChargeCountDown = Math.round(CHARGE_TIME + (Math.random() * 25));
nFrontKickDelayCount = 10;
oPers.nHitCombo = 0;
oPers.bComboSwitch = false;
nHurtLoop = 0;
setState("Idle" + sGun);
}
}
}
function HurtWithoutGun() {
if ((oPers.Etat != "JumpKick") && (checkGetHurt())) {
oPers.Combo++;
mcContainer.state.gotoAndPlay(1);
} else if (mcContainer.state._currentframe == nFrTotalAnim) {
nHurtLoop++;
if (nHurtLoop == (nHurtLoopMax + 5)) {
nChargeCountDown = Math.round(CHARGE_TIME + (Math.random() * 25));
nFrontKickDelayCount = 0;
oPers.nHitCombo = 0;
nHurtLoop = 0;
setState("JetpackStart" + sGun);
if ((((sLastHit != "MegaChargedUppercut") && (sLastHit != "HardFrontKick")) && (sLastHit != "ComboSpinPunch")) && (sLastHit != "ComboBlast")) {
setState("FrontKick" + sGun);
}
}
}
}
function HurtLoosesGun() {
mcContainer.state.Gun.gotoAndStop(sBeamColor);
if (checkGetHurt()) {
oPers.Combo++;
} else if (mcContainer.state._currentframe == nFrTotalAnim) {
nChargeCountDown = Math.round(CHARGE_TIME + (Math.random() * 25));
nFrontKickDelayCount = 0;
oPers.Combo = 0;
setState("Idle" + sGun);
}
}
function FrontKickWithGun() {
var _local3;
var _local4;
var _local5 = mcContainer.state.bAttack;
if (_local5) {
if (bFlipped) {
_local3 = nPosX - mcContainer.state.nDistAttackX;
_local4 = nPosY + mcContainer.state.nDistAttackY;
} else {
_local3 = nPosX + mcContainer.state.nDistAttackX;
_local4 = nPosY + mcContainer.state.nDistAttackY;
}
if ((_local4 <= oPers.PosY) && (_local4 >= (oPers.PosY - oPers.nGetHitTop))) {
if (((oPers.Dir == "D") && (_local3 <= (oPers.PosX + oPers.nGetHitRight))) && (_local3 >= (oPers.PosX - oPers.nGetHitLeft))) {
if (oPers.CanBeHit) {
_global.SoundCTRL.playSound("Danny_LowKick", 90, 0);
}
if (bFlipped) {
oPers.Dir = "D";
} else {
oPers.Dir = "G";
}
oPers.GetHit(30);
} else if (((oPers.Dir == "G") && (_local3 <= (oPers.PosX + oPers.nGetHitRight))) && (_local3 >= (oPers.PosX - oPers.nGetHitLeft))) {
if (oPers.CanBeHit) {
_global.SoundCTRL.playSound("Danny_LowKick", 90, 0);
}
if (bFlipped) {
oPers.Dir = "D";
} else {
oPers.Dir = "G";
}
oPers.GetHit(30);
}
}
}
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("Idle" + sGun);
}
checkGetHurt();
}
function FrontKickWithoutGun() {
var _local3;
var _local4;
var _local5 = mcContainer.state.bAttack;
if (_local5) {
if (bFlipped) {
_local3 = nPosX - mcContainer.state.nDistAttackX;
_local4 = nPosY + mcContainer.state.nDistAttackY;
} else {
_local3 = nPosX + mcContainer.state.nDistAttackX;
_local4 = nPosY + mcContainer.state.nDistAttackY;
}
if ((_local4 <= oPers.PosY) && (_local4 >= (oPers.PosY - oPers.nGetHitTop))) {
if (((oPers.Dir == "D") && (_local3 <= (oPers.PosX + oPers.nGetHitRight))) && (_local3 >= (oPers.PosX - oPers.nGetHitLeft))) {
if (oPers.CanBeHit) {
_global.SoundCTRL.playSound("Danny_LowKick", 90, 0);
}
if (bFlipped) {
oPers.Dir = "D";
} else {
oPers.Dir = "G";
}
oPers.GetHit(30);
} else if (((oPers.Dir == "G") && (_local3 <= (oPers.PosX + oPers.nGetHitRight))) && (_local3 >= (oPers.PosX - oPers.nGetHitLeft))) {
if (oPers.CanBeHit) {
_global.SoundCTRL.playSound("Danny_LowKick", 90, 0);
}
if (bFlipped) {
oPers.Dir = "D";
} else {
oPers.Dir = "G";
}
oPers.GetHit(30);
}
}
}
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("JetpackStart" + sGun);
}
checkGetHurt();
}
function checkFrontKick() {
if (oPers.CanBeHit) {
if ((nPosY <= (oPers.PosY + 10)) && (nPosY >= (oPers.PosY - oPers.nGetHitTop))) {
if (bFlipped && (Math.abs(oPers.PosX - nPosX) <= nFrontKickDistance)) {
nFrontKickDelayCount++;
if (nFrontKickDelayCount >= nFrontKickDelay) {
nFrontKickDelayCount = 0;
_global.SoundCTRL.playSound("Danny_AnticPunch", 90, 0);
setState("FrontKick" + sGun);
}
return(true);
}
if ((!bFlipped) && (Math.abs(nPosX - oPers.PosX) <= nFrontKickDistance)) {
nFrontKickDelayCount++;
if (nFrontKickDelayCount >= nFrontKickDelay) {
nFrontKickDelayCount = 0;
_global.SoundCTRL.playSound("Danny_AnticPunch", 90, 0);
setState("FrontKick" + sGun);
}
return(true);
}
if (nFrontKickDelayCount > 0) {
nFrontKickDelayCount--;
}
}
}
return(false);
}
function checkCharge() {
var _local2 = (nPosY - oBeam.__get__defaultY()) - oBeam.__get__width();
var _local3 = nPosY - oBeam.__get__defaultY();
if (nChargeCountDown == 0) {
if (((_local2 - nTryRange) <= oPers.PosY) && ((_local2 + nTryRange) >= (oPers.PosY - oPers.nGetHitTop))) {
if ((bFlipped && (Math.abs(oPers.PosX - nPosX) <= nChargeDistance)) && (Math.abs(oPers.PosX - nPosX) > oBeam.__get__defaultX())) {
initGunCharge("Straight");
} else if (((!bFlipped) && (Math.abs(nPosX - oPers.PosX) <= nChargeDistance)) && (Math.abs(oPers.PosX - nPosX) > oBeam.__get__defaultX())) {
initGunCharge("Straight");
}
} else if ((_local2 >= oPers.PosY) && ((_local2 - (nChargeDistance * 0.4)) <= oPers.PosY)) {
if (bFlipped && (Math.abs(oPers.PosX - nPosX) <= (nChargeDistance * 0.6))) {
initGunCharge("Upper");
} else if ((!bFlipped) && (Math.abs(nPosX - oPers.PosX) <= (nChargeDistance * 0.6))) {
initGunCharge("Upper");
}
} else if ((_local3 <= oPers.PosY) && ((_local3 + (nChargeDistance * 0.4)) >= oPers.PosY)) {
if (bFlipped && (Math.abs(oPers.PosX - nPosX) <= (nChargeDistance * 0.7))) {
initGunCharge("CrouchedLower");
} else if ((!bFlipped) && (Math.abs(nPosX - oPers.PosX) <= (nChargeDistance * 0.7))) {
initGunCharge("CrouchedLower");
}
}
} else if (nChargeCountDown > 0) {
nChargeCountDown--;
}
}
function checkHit() {
var _local11;
var _local5;
var _local4;
var _local2;
var _local3;
var _local8;
var _local6;
var _local9;
var _local7;
var _local10;
oBeam.update();
_local11 = (mcContainer.state.Beam._xscale / 100) * (mcContainer.state._xscale / 100);
mcContainer.state.Beam.color._height = (oBeam.__get__length() * _local11) * (oBeam.__get__scaleProgress() / 100);
if ((sTarget == oPers.Perso) || (sTarget == "All")) {
_local5 = oPers.PosX;
_local4 = oPers.PosY;
_local2 = oPers.PosX;
_local3 = oPers.PosY - oPers.nGetHitTop;
_local8 = oBeam.startX;
_local6 = oBeam.startY;
_local9 = oBeam.endX;
_local7 = oBeam.endY;
if (ffa.ennemy.Ennemy.bDEBUG) {
mcContainer._parent._parent.clear();
mcContainer._parent._parent.lineStyle(5, 255);
mcContainer._parent._parent.moveTo(_local8, _local6);
mcContainer._parent._parent.lineTo(_local9, _local7);
mcContainer._parent._parent.moveTo(_local5, _local4);
mcContainer._parent._parent.lineTo(_local2, _local3);
}
_local10 = com.sarbakan.utils.Trig.lineIntersect(_local8, _local6, _local9, _local7, _local5, _local4, _local2, _local3).intersect;
if (_local10) {
oPers.GetHit();
}
}
}
function checkGround() {
if ((nPosY + nSpdY) >= nTargetFrontY) {
super.checkGround();
}
}
function checkActive() {
if (nEnergy > 0) {
if (sDepth == "Front") {
if ((nPosX >= (oScroller.nInvertedPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nInvertedPosX + nWidthOutRight))) {
if (!bBeatThemUp) {
Activate();
}
}
} else if ((nPosX >= (oScroller.nParallaxPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nParallaxPosX + nWidthOutRight))) {
Activate();
}
}
}
function checkSleep() {
if (sDepth == "Front") {
if ((nPosX <= (oScroller.nInvertedPosX - nWidthOutLeft)) || (nPosX >= (oScroller.nInvertedPosX + nWidthOutRight))) {
setState("Sleep");
}
} else if ((nPosX <= (oScroller.nParallaxPosX - nWidthOutLeft)) || (nPosX >= (oScroller.nParallaxPosX + nWidthOutRight))) {
if (getState() == "BackgroundJunk") {
destroy();
} else {
setState("Sleep");
}
}
}
function checkFlyToFront() {
if (!bBeatThemUp) {
nFlyToFrontCount--;
if (nFlyToFrontCount <= 0) {
setState("JetpackStart" + sGun);
}
}
}
function checkFlyOut() {
if (nPosY < 0) {
setState("Out");
}
}
function setState(l_sState) {
if (sDepth == "Parallax") {
mcContainer = mcContainerParallax;
mcContainerFront.gotoAndStop("Sleep");
} else if (sDepth == "Front") {
mcContainer = mcContainerFront;
mcContainerParallax.gotoAndStop("Sleep");
}
super.setState(l_sState);
mcContainer.state.Gun.gotoAndStop(sBeamColor);
mcContainer.state.Beam.gotoAndStop(sBeamColor);
}
function Activate() {
setState("Idle" + sGun);
if (sDepth == "Parallax") {
mcContainer.state.stop();
mcContainer._parent.cacheAsBitmap = true;
}
}
function KillAllGWT() {
destroy();
}
function initHurt() {
trace("Hurt?" + oPers.CanHit);
if (getState() != ("Hurt" + sGun)) {
_global.SoundCTRL.playSound("GWT_Hurt", 90, 0);
}
nFrontKickDelayCount = 0;
oPers.setComboHit();
sLastHit = oPers.Etat;
switch (oPers.Etat) {
case "ComboSpinPunch" :
case "ComboBlast" :
nEnergy = nEnergy - 35;
if (nEnergy > 0) {
if (sGun == "WithGun") {
sGun = "WithoutGun";
setState("HurtLoosesGun");
} else {
setState("Hurt" + sGun);
}
} else {
setState("Die");
}
break;
case "MegaChargedUppercut" :
case "HardFrontKick" :
nEnergy = nEnergy - 35;
if (nEnergy > 0) {
if (sGun == "WithGun") {
sGun = "WithoutGun";
setState("HurtLoosesGun");
} else {
setState("Hurt" + sGun);
}
} else {
nSpdY = -30;
_global.SoundCTRL.playSound("GWT_BackgroundFall", 90, 0);
setState("BackgroundFall");
}
break;
case "JumpKick" :
nEnergy = nEnergy - 25;
oPers.initJumpKickBounce();
setState("Hurt" + sGun);
if (nEnergy <= 0) {
_global.SoundCTRL.playSound("GWT_Die", 90, 0);
setState("Die");
}
break;
default :
nEnergy = nEnergy - 5;
setState("Hurt" + sGun);
if (nEnergy > 0) {
break;
}
_global.SoundCTRL.playSound("GWT_Die", 90, 0);
setState("Die");
}
}
function switchDepth() {
if (sDepth == "Parallax") {
sDepth = "Front";
nPosX = nPosXFront;
nPosY = -300;
nSpdY = 20;
setState("JetpackIdle" + sGun);
setFlipped(false);
} else if ((sDepth == "Front") && (nEnergy < 0)) {
sDepth = "Parallax";
nPosX = (nPosX / 2) + ((Math.random() * 150) - 50);
nPosY = -500;
nSpdY = 20;
setFlipped(false);
setState("BackgroundFall");
mcContainer._xscale = 50;
mcContainer._yscale = 50;
} else {
broadcastMessage("onGWTDie", nBeatThemUpOrder, false);
super.Dead();
}
}
function beatIt(l_nBeatThemUpOrder) {
bBeatThemUp = false;
nBeatThemUpOrder = l_nBeatThemUpOrder;
if (sDepth == "Front") {
nPosX = nPosXFront;
nPosY = -300;
nSpdY = 20;
setState("JetpackIdle" + sGun);
setFlipped(false);
moveToPos();
}
}
function pause(l_bAnim) {
if (l_bAnim) {
mcContainer.state.Beam.color.stop();
}
super.pause(l_bAnim);
}
function resume() {
if (getState().indexOf("GunAttack") != -1) {
bActionPause = false;
if (bAnimPause) {
if (mcContainer.state._currentframe < nFrTotalAnim) {
mcContainer.state.play();
}
}
bAnimPause = false;
} else if (getState() != "BackgroundJunk") {
if (bAnimPause) {
mcContainer.state.Beam.color.play();
}
super.resume();
} else if (getState() == "BackgroundJunk") {
bAnimPause = false;
bActionPause = false;
}
}
function toString() {
return(mcContainer._parent._name);
}
static var FIRE_TIME = 50;
static var CHARGE_TIME = 25;
static var ACTIVATION_GAP = 25;
static var nGWT = 0;
}
Symbol 2752 MovieClip [__Packages.ffa.Beam] Frame 0
class ffa.Beam
{
var nLength, nWidth, nDefaultX, nDefaultY, nXBeamStart, nYBeamStart, nScaleProgress, nXBeamEnd, nYBeamEnd;
function Beam (l_nLength, l_nWidth, l_nDefaultX, l_nDefaultY) {
nLength = l_nLength;
nWidth = l_nWidth;
nDefaultX = l_nDefaultX;
nDefaultY = l_nDefaultY;
}
function launch(l_nRotation, l_nStartPosX, l_nStartPosY, l_bFlipped) {
nXBeamStart = l_nStartPosX;
nYBeamStart = l_nStartPosY;
nScaleProgress = 5;
if (Math.round(l_nRotation) == 90) {
if (l_bFlipped) {
nXBeamEnd = l_nStartPosX - nLength;
nYBeamEnd = l_nStartPosY;
} else {
nXBeamEnd = l_nStartPosX + nLength;
nYBeamEnd = l_nStartPosY;
}
} else {
l_nRotation = l_nRotation - 180;
if (!l_bFlipped) {
l_nRotation = l_nRotation * -1;
}
nXBeamEnd = l_nStartPosX + (nLength * Math.sin((l_nRotation * Math.PI) / 180));
nYBeamEnd = l_nStartPosY + (nLength * Math.cos((l_nRotation * Math.PI) / 180));
}
}
function update() {
if (nScaleProgress < 100) {
nScaleProgress = nScaleProgress + 15;
}
if (nScaleProgress > 100) {
nScaleProgress = 100;
}
}
function get defaultX() {
return(nDefaultX);
}
function get defaultY() {
return(nDefaultY);
}
function get length() {
return(nLength);
}
function get width() {
return(nWidth);
}
function get startX() {
return(nXBeamStart);
}
function get startY() {
return(nYBeamStart);
}
function get endX() {
return(nXBeamEnd);
}
function get endY() {
return(nYBeamEnd);
}
function get scaleProgress() {
return(nScaleProgress);
}
}
Symbol 2753 MovieClip [__Packages.ffa.background.Screen] Frame 0
class ffa.background.Screen
{
var oScreenGroup, oPers, oScroller, mcParallax, mcGWT, mcCollider, mcContainer, nCameraMinPauseX, nCameraMaxPauseX, bReady, aADSD, aGWT, aTatoo, nCurrentAction, aAction, startDialog, queueDialog, bLockGWT, bBeatThemUp, nSimultaneous, aRealGWT, nID, aBonus, nEnnemyBeated, nCurrentBeatThemUpEnnemy, nEnergyBefore;
function Screen (l_mcContainer, l_oScreenGroup, l_mcMainContainer, l_oScroller, l_oPers) {
oScreenGroup = l_oScreenGroup;
oPers = l_oPers;
oScroller = l_oScroller;
mcParallax = l_mcMainContainer.Parallax;
mcGWT = l_mcMainContainer.GWT;
mcCollider = l_mcMainContainer.Collider;
mcContainer = l_mcContainer;
nCameraMinPauseX = -1;
nCameraMaxPauseX = -1;
if (mcContainer._currentframe == 2) {
bReady = true;
} else {
aADSD = new Array();
aGWT = new Array();
aTatoo = new Array();
mcContainer.gotoAndStop(2);
mcContainer.cacheAsBitmap = true;
bReady = false;
nCurrentAction = 0;
aAction = new Array();
}
startDialog = mx.utils.Delegate.create(_global.Game.oDialog, _global.Game.oDialog.startDialog);
queueDialog = mx.utils.Delegate.create(_global.Game.oDialog, _global.Game.oDialog.queueDialog);
bLockGWT = false;
bBeatThemUp = false;
_global.Game.oDialog.addListener(this);
}
function registerGWT(l_oPointInit) {
var _local2 = new Object();
_local2.pt = l_oPointInit;
_local2.id = aGWT.length;
aGWT.push(_local2);
}
function registerADSD(l_oADSD) {
aADSD.push(l_oADSD);
}
function registerTatoo(l_oTatoo) {
aTatoo.push(l_oTatoo);
}
function generate() {
var _local2;
if (!bBeatThemUp) {
_local2 = oScreenGroup.GWTRule;
} else {
_local2 = oScreenGroup.BeathThemUpGWTRule;
}
generateNormalGWT(_local2);
replaceADSD();
replaceTatoo();
}
function generateNormalGWT(l_aGWTRule) {
var _local4;
var _local12;
var _local15;
var _local8 = 0;
var _local3;
var _local6;
var _local5;
var _local7;
if (aGWT.length > 0) {
for (var _local11 in aGWT) {
aGWT[_local11].gunColor = randomColor(["green", "combined", "red"]);
aGWT[_local11].depth = randomDepth();
}
if (l_aGWTRule.length > 0) {
var _local9 = 0;
while (_local9 < l_aGWTRule.length) {
_local4 = l_aGWTRule[_local9];
switch (_local4.type) {
case "GWT" :
while (aGWT.length > _local4.max) {
_local12 = Math.floor(Math.random() * aGWT.length) - 1;
aGWT[_local12].removeFromList = true;
aGWT.sortOn("removeFromList");
aGWT.pop();
}
while ((aGWT.length < _local4.min) && (bBeatThemUp)) {
_local7 = new Object();
for (var _local13 in aGWT[_local8]) {
_local7[_local13] = aGWT[_local8][_local13];
}
_local7.id = aGWT.length;
aGWT.push(_local7);
_local8++;
}
break;
case "gunColor" :
_local3 = new Array();
_local6 = new Array();
for (var _local11 in aGWT) {
_local5 = aGWT[_local11];
if (_local5.gunColor == _local4.gunColor) {
_local3.push(_local5);
} else {
_local6.push(_local5);
}
}
while (_local3.length > _local4.max) {
do {
_local3[_local3.length - 1].gunColor = randomColor(_local4.colorRange);
} while (_local3[_local3.length - 1].gunColor == _local4.gunColor);
_local6.push(_local3.pop());
}
aGWT = _local3.concat(_local6);
break;
case "depth" :
_local3 = new Array();
_local6 = new Array();
for (var _local11 in aGWT) {
_local5 = aGWT[_local11];
if (_local5.depth == _local4.depth) {
_local3.push(_local5);
} else {
_local6.push(_local5);
}
}
while (_local3.length > _local4.max) {
do {
_local3[_local3.length - 1].depth = randomDepth();
} while (_local3[_local3.length - 1].depth == _local4.depth);
_local6.push(_local3.pop());
}
aGWT = _local3.concat(_local6);
break;
case "simultaneous" :
nSimultaneous = _local4.max;
}
_local9++;
}
}
aRealGWT = new Array();
aGWT.sortOn("id");
var _local11 = 0;
while (_local11 < aGWT.length) {
var _local10 = new Object();
_local5 = aGWT[_local11];
_local10.x = _local5.pt.x + mcContainer._x;
_local10.y = _local5.pt.y + mcContainer._y;
aRealGWT.push(new ffa.ennemy.GWT(mcGWT, mcParallax, _local10, _local5.gunColor, _local5.shieldColor, oScroller, oPers, mcCollider, this, _local5.depth, bBeatThemUp));
_global.Game.addListener(aRealGWT[aRealGWT.length - 1]);
if (bLockGWT) {
aRealGWT[aRealGWT.length - 1].waitForTutorial = true;
aRealGWT[aRealGWT.length - 1].addListener(this);
}
_local11++;
}
}
}
function randomColor(l_aColorRange) {
var _local1 = Math.floor(Math.random() * l_aColorRange.length);
return(l_aColorRange[_local1]);
}
function randomDepth() {
var _local1 = Math.floor(Math.random() * 2);
switch (_local1) {
case 0 :
return("Front");
case 1 :
return("Parallax");
}
}
function replaceADSD() {
for (var _local2 in aADSD) {
aADSD[_local2].replace(mcContainer._x, mcContainer._y);
}
}
function replaceTatoo() {
for (var _local2 in aTatoo) {
aTatoo[_local2].replace(mcContainer._x, mcContainer._y);
}
}
function addDialog(l_oDialogData) {
var _local2 = new Object();
_local2 = l_oDialogData;
_local2.type = "Dialog";
aAction.push(_local2);
}
function addFirstFight() {
var _local2 = new Object();
_local2.type = "FirstFight";
bLockGWT = true;
aAction.push(_local2);
}
function addAction(l_oAction) {
aAction.push(l_oAction);
switch (l_oAction.type) {
case "LydiaFlees" :
_global.Game.Lydia.setNewPos((l_oAction.screen * 600) - 100, 580);
break;
case "LydiaPrepareCombat" :
_global.Game.Lydia.setNewPos((l_oAction.screen * 600) - 250, 580);
aAction.pop();
break;
case "LifeBonus" :
if (!_global.Game.LifeBonusTaken) {
nCameraMinPauseX = l_oAction.min;
nCameraMaxPauseX = l_oAction.max;
} else {
aAction.pop();
}
break;
}
}
function initFirstFight() {
bLockGWT = false;
nextAction();
}
function setPauseLimit(l_nMin, l_nMax) {
nCameraMinPauseX = l_nMin;
nCameraMaxPauseX = l_nMax;
}
function checkPauseLimit(l_nPosX) {
var _local2;
l_nPosX = l_nPosX + 301;
if (((nCameraMinPauseX != -1) && (nCameraMaxPauseX != -1)) && (nCurrentAction == 0)) {
if (Math.ceil(l_nPosX / 600) == nID) {
_local2 = (l_nPosX + 600) % 600;
if ((_local2 > nCameraMinPauseX) && (_local2 < nCameraMaxPauseX)) {
return(true);
}
}
}
return(false);
}
function addBeatThemUp(l_oAction) {
bBeatThemUp = true;
aAction.push(l_oAction);
}
function addBonus(l_oBonus) {
aBonus.push(l_oBonus);
l_oBonus.addListener(this);
}
function onLifeTaken() {
trace("Yo");
_global.Game.LifeBonusTaken = true;
}
function nextAction() {
var _local4 = 0;
var _local3;
trace((id + " ") + aAction[nCurrentAction].type);
switch (aAction[nCurrentAction].type) {
case "Dialog" :
startDialog(aAction[nCurrentAction]);
nCurrentAction++;
while (aAction[nCurrentAction].type == "Dialog") {
queueDialog(aAction[nCurrentAction]);
nCurrentAction++;
}
switch (aAction[nCurrentAction - 1].id) {
case "10_end_0" :
this["closeDialog_" + aAction[nCurrentAction - 1].id] = mx.utils.Delegate.create(oScroller, oScroller.switchToNextScreenGroup);
break;
default :
if (!aAction[nCurrentAction]) {
break;
}
this["closeDialog_" + aAction[nCurrentAction - 1].id] = mx.utils.Delegate.create(this, nextAction);
}
break;
case "FirstFight" :
aRealGWT[0].waitForTutorial = false;
break;
case "LydiaFlees" :
_global.Game.Lydia.initFleesWithCapeOn(this);
nCurrentAction++;
break;
case "LydiaHides" :
_global.Game.Lydia.setNewPos(0, 0);
nCurrentAction++;
nextAction();
break;
case "LydiaUncloak" :
_global.Game.Lydia.initUncloak(this);
nCurrentAction++;
break;
case "LydiaMoveToTop" :
_global.Game.Lydia.initMoveToTop(this);
nCurrentAction++;
break;
case "LockCamera" :
_local3 = (((aAction[nCurrentAction].lockedScreen - 1) * 600) - aAction[nCurrentAction].lockedScreen) * -1;
oScroller.setLimit(oScreenGroup.__get__maxDown(), oScreenGroup.__get__maxUp(), _local3, _local3);
nCurrentAction++;
nextAction();
break;
case "UnlockCamera" :
oScroller.initCameraToScreen();
nCurrentAction++;
nextAction();
break;
case "BeatThemUp" :
initBeatThemUp();
break;
case "NextScreenGroup" :
oScroller.switchToNextScreenGroup();
nCurrentAction++;
break;
case undefined :
break;
case "SpaceShuttlePassBackground" :
_global.Game.Shuttle.addListener(this);
_global.Game[aAction[nCurrentAction].type]();
nCurrentAction++;
nextAction();
break;
case "FreakshowTakeGem" :
_global.Game.Freakshow.addListener(this);
_global.Game[aAction[nCurrentAction].type]();
nCurrentAction++;
nextAction();
break;
case "Wait" :
nCurrentAction++;
break;
case "SpaceShuttleCrash" :
_global.Game.Shuttle.addListener(this);
_global.Game[aAction[nCurrentAction].type](this, aAction[nCurrentAction]);
nCurrentAction++;
nextAction();
break;
default :
_global.Game[aAction[nCurrentAction].type](this, aAction[nCurrentAction]);
nCurrentAction++;
nextAction();
}
}
function LockCamera(l_nLockedScreen) {
var _local2 = (((l_nLockedScreen - 1) * 600) - l_nLockedScreen) * -1;
oScroller.setLimit(oScreenGroup.__get__maxDown(), oScreenGroup.__get__maxUp(), _local2, _local2);
}
function onFirstAidKitTaken() {
if (aAction[nCurrentAction].type == "BeatThemUp") {
nextAction();
}
}
function onFreakshowTookGem() {
nextAction();
}
function onFreakshowFreakDanny() {
nextAction();
}
function onFreakshowDie() {
nextAction();
}
function onShuttleGoOffScreen() {
nextAction();
}
function onShuttleCrash() {
nextAction();
}
function setLydiaScreenLimit() {
var _local2 = (((id - 1) * 600) - id) * -1;
if (id == 51) {
oScroller.setLimit(oScreenGroup.__get__maxDown(), oScreenGroup.__get__maxUp() + 50, _local2, _local2);
}
}
function setLydiaUnlockedCameraLimit() {
oScroller.setLimit(oScreenGroup.__get__maxDown(), oScreenGroup.__get__maxUp() + 50, oScreenGroup.__get__maxLeft(), oScreenGroup.__get__maxRight());
}
function initBeatThemUp() {
_global.Game.oOverlays.setState("BeatThemUp");
_global.Game.oOverlays.addListener(this);
}
function BeatThemUpComplete() {
nEnnemyBeated = 0;
nCurrentBeatThemUpEnnemy = 0;
nEnergyBefore = oPers.oEnergyBar.getEnergy();
var _local2 = nEnnemyBeated;
while (_local2 < (nSimultaneous + nEnnemyBeated)) {
aRealGWT[_local2].beatIt(_local2);
aRealGWT[_local2].addListener(this);
nCurrentBeatThemUpEnnemy++;
_local2++;
}
}
function PerfectComplete() {
nCurrentAction++;
nextAction();
}
function beatThemUpNextEnnemy() {
aRealGWT[nCurrentBeatThemUpEnnemy].beatIt(nCurrentBeatThemUpEnnemy);
aRealGWT[nCurrentBeatThemUpEnnemy].addListener(this);
nCurrentBeatThemUpEnnemy++;
}
function onGWTDie(l_nBeatThemUpOrder) {
switch (aAction[nCurrentAction].type) {
case "FirstFight" :
nCurrentAction++;
nextAction();
break;
case "BeatThemUp" :
nEnnemyBeated++;
if (nEnnemyBeated < aRealGWT.length) {
beatThemUpNextEnnemy();
} else if (nEnergyBefore == oPers.oEnergyBar.getEnergy()) {
_global.Game.oOverlays.setState("Perfect");
_global.Game.oOverlays.addListener(this);
_global.C.oScore.addPoints(10000);
} else {
nCurrentAction++;
nextAction();
}
}
}
function destroy() {
for (var _local2 in aRealGWT) {
aRealGWT[_local2].destroy();
delete aRealGWT[_local2];
}
for (var _local2 in aTatoo) {
aTatoo[_local2].destroy();
delete aTatoo[_local2];
}
for (var _local2 in aADSD) {
aADSD[_local2].destroy();
delete aADSD[_local2];
}
mcContainer.gotoAndStop(3);
mcContainer.cacheAsBitmap = false;
}
function set ready(l_bReady) {
bReady = l_bReady;
//return(ready);
}
function get ready() {
return(bReady);
}
function get name() {
return(mcContainer._name);
}
function set id(l_nID) {
_global["Screen" + nID] = this;
nID = l_nID;
//return(id);
}
function get id() {
return(nID);
}
}
Symbol 2754 MovieClip [__Packages.ffa.background.ScreenGroup] Frame 0
class ffa.background.ScreenGroup
{
var sName, sType, bBeatThemUpNext, bSpecialRuleActive, aScreen, aSpecialRule, aGWTRule, aBeatThemUpGWTRule, nFirstScreen, nLastScreen, nScreenWidth, nScreenHeight, nMaxDown, nMaxUp, nMaxLeft, nMaxRight, oScroller;
function ScreenGroup (l_sName, l_sType) {
sName = l_sName;
sType = l_sType;
bBeatThemUpNext = false;
bSpecialRuleActive = true;
}
function init(l_nFirstScreen, l_nLastScreen, l_nScreenWidth, l_nScreenHeight) {
aScreen = new Array();
aSpecialRule = new Array();
aGWTRule = new Array();
aBeatThemUpGWTRule = new Array();
nFirstScreen = l_nFirstScreen;
nLastScreen = l_nLastScreen;
nScreenWidth = l_nScreenWidth;
nScreenHeight = l_nScreenHeight;
initBorder();
}
function initBorder() {
nMaxDown = 0 + (nScreenHeight / 2);
nMaxUp = -(nScreenHeight / 2);
nMaxLeft = (((nLastScreen - 1) * nScreenWidth) - nLastScreen) * -1;
if (nFirstScreen > 1) {
nMaxRight = ((nFirstScreen - 1) * nScreenWidth) * -1;
} else {
nMaxRight = 0;
}
}
function addEnnemyRule(l_oRule, l_sTarget) {
switch (l_sTarget) {
case "GWT" :
aGWTRule.push(l_oRule);
break;
case "Tatoos" :
}
}
function addSpecialRule(l_oRule, l_sTarget) {
var _local3 = aSpecialRule[l_oRule.screen - (firstScreen - 1)];
if (!_local3) {
aSpecialRule[l_oRule.screen - (firstScreen - 1)] = new Array();
}
aSpecialRule[l_oRule.screen - (firstScreen - 1)].push(l_oRule);
}
function addBeatThemUpRule(l_oRule, l_sTarget) {
switch (l_sTarget) {
case "GWT" :
aBeatThemUpGWTRule.push(l_oRule);
break;
case "Tatoos" :
}
}
function activate(l_mcContainer, l_mcMainContainer, l_oScroller, l_oPers, l_bSpecialRule) {
oScroller = l_oScroller;
trace(("------" + name) + "------");
var _local6;
var _local3;
var _local2;
var _local8;
var _local4;
aScreen = new Array();
if (l_bSpecialRule) {
bSpecialRuleActive = !l_bSpecialRule;
}
trace("bSpecialRuleActive: " + bSpecialRuleActive);
_local6 = firstScreen;
while (_local6 <= lastScreen) {
if ((!bBeatThemUpNext) || (_local6 < lastScreen)) {
_local3 = new ffa.background.Screen(l_mcContainer[_local6], this, l_mcMainContainer, l_oScroller, l_oPers);
aScreen.push(_local3);
if (bSpecialRuleActive) {
_local8 = aSpecialRule[_local6 - (firstScreen - 1)];
_local3.__set__id(_local6);
if (_local8) {
var _local7 = 0;
while (_local7 < _local8.length) {
_local4 = _local8[_local7];
switch (_local4.type) {
case "Dialog" :
_local2 = ffa.DialogData.getDialog(_local4.level, _local4.screen + "_init");
var _local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = (_local4.screen + "_init_") + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
if (_local4.min) {
_local3.setPauseLimit(_local4.min, _local4.max);
}
break;
case "FirstFight" :
_local3.addFirstFight();
_local2 = ffa.DialogData.getDialog(_local4.level, _local4.screen + "_end");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = (_local4.screen + "_end_") + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "LydiaFlees" :
_local3.addAction(_local4);
_local2 = ffa.DialogData.getDialog(_local4.level, _local4.screen + "_end");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = (_local4.screen + "_end_") + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "LydiaUncloak" :
_local3.addAction(_local4);
_local2 = ffa.DialogData.getDialog(_local4.level, "Lydia_uncloaked");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = "Lydia_uncloaked_" + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "LydiaMoveToTop" :
_local3.addAction(_local4);
_local2 = ffa.DialogData.getDialog(_local4.level, "Lydia_sendTatoos");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = "Lydia_sendTatoos_" + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "SpaceShuttlePassFront" :
_local3.addAction(_local4);
_local3.addAction({type:"Wait"});
_local2 = ffa.DialogData.getDialog(_local4.level, "SpaceShuttle_pass");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = "SpaceShuttle_pass_" + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "FreakshowTakeGem" :
_local3.addAction(_local4);
_local3.addAction({type:"Wait"});
_local2 = ffa.DialogData.getDialog(_local4.level, "Freakshow_takeGem");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = "Freakshow_takeGem_" + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "FreakshowAttack" :
_local3.addAction(_local4);
_local3.addAction({type:"Wait"});
_local2 = ffa.DialogData.getDialog(_local4.level, "Freakshow_attack");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = "Freakshow_attack_" + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
break;
case "BeatThemUp" :
_local2 = ffa.DialogData.getDialog(0, "firstAid_1");
_local5 = 0;
while (_local5 < _local2.length) {
_local2[_local5].id = "firstAid_1_" + _local5;
_local3.addDialog(_local2[_local5]);
_local5++;
}
_local3.addAction({type:"FirstAidKit"});
_local3.addAction({type:"Wait"});
_local3.addBeatThemUp(_local4);
break;
case "LockCamera" :
_local3.addAction(_local4);
_local3.setPauseLimit(_local4.min, _local4.max);
break;
default :
_local3.addAction(_local4);
}
_local7++;
}
_local3.__set__id(_local6);
}
}
if (l_mcContainer[_local6 + "_alt"] != undefined) {
aScreen.push(new ffa.background.Screen(l_mcContainer[_local6 + "_alt"], this, l_mcMainContainer, l_oScroller, l_oPers));
}
}
_local6++;
}
}
function checkReady(l_sName) {
var _local2 = true;
for (var _local4 in aScreen) {
if (l_sName == aScreen[_local4].name) {
aScreen[_local4].ready = true;
}
if (!aScreen[_local4].ready) {
_local2 = false;
}
}
if (_local2) {
generate();
}
return(_local2);
}
function checkCameraPause(l_nPosX) {
for (var _local3 in aScreen) {
if (aScreen[_local3].checkPauseLimit(l_nPosX)) {
aScreen[_local3].nextAction();
return(true);
}
}
}
function clean() {
var _local2 = 0;
while (_local2 < (aScreen.length - 1)) {
aScreen[_local2].destroy();
delete aScreen[_local2];
_local2++;
}
aScreen = new Array();
}
function destroy() {
var _local2 = 0;
while (_local2 < aScreen.length) {
aScreen[_local2].destroy();
delete aScreen[_local2];
_local2++;
}
aScreen = new Array();
}
function generate() {
oScroller.initCameraToScreen();
for (var _local2 in aScreen) {
aScreen[_local2].generate();
}
}
function getScreen(l_sName) {
for (var _local3 in aScreen) {
if (l_sName == aScreen[_local3].name) {
return(aScreen[_local3]);
}
}
}
function get GWTRule() {
return(aGWTRule);
}
function get BeathThemUpGWTRule() {
return(aBeatThemUpGWTRule);
}
function get maxLeft() {
return(nMaxLeft);
}
function get maxRight() {
return(nMaxRight);
}
function get maxUp() {
return(nMaxUp);
}
function get maxDown() {
return(nMaxDown);
}
function get firstScreen() {
return(nFirstScreen);
}
function get lastScreen() {
return(nLastScreen);
}
function mustInitNext() {
return(bBeatThemUpNext);
}
function get beatThemUpScreen() {
if (sType == "Beat Them Up") {
return(true);
}
return(false);
}
function get normalScreen() {
if (sType == "Normal") {
return(true);
}
return(false);
}
function get name() {
return(sName);
}
}
Symbol 2755 MovieClip [__Packages.ffa.background.MainScroller] Frame 0
class ffa.background.MainScroller
{
var mcContainer, oPers, nPosX, nPosY, nParallaxPosX, nParallaxPosY, nMoveX, nMoveY, bLoading, nLoadCountDown, nCurrentScreenGroup, nMaxDown, nMaxUp, nMaxLeft, nMaxRight, nInvertedPosX, nInvertedPosY, nCenterX, nCenterY, nSpdXRight, nSpdXLeft, nSpdYDown, nSpdYUp, bMoveAuto, aScreenGroup, broadcastMessage, addListener;
function MainScroller (l_mcContainer, l_nPosX, l_nPosY, l_oPers) {
ffa.Info.init();
AsBroadcaster.initialize(this);
mcContainer = l_mcContainer;
oPers = l_oPers;
nPosX = l_nPosX;
nPosY = l_nPosY;
nParallaxPosX = 0;
nParallaxPosY = 0;
nMoveX = 0;
nMoveY = 0;
bLoading = true;
nLoadCountDown = 0;
nCurrentScreenGroup = 0;
nMaxDown = 0;
nMaxUp = 0;
nMaxLeft = 0;
nMaxRight = 0;
nInvertedPosX = nPosX * -1;
nInvertedPosY = nPosY * -1;
nCenterX = 300;
nCenterY = 125;
nSpdXRight = 15;
nSpdXLeft = -15;
nSpdYDown = 20;
nSpdYUp = -20;
bMoveAuto = false;
aScreenGroup = new Array();
}
function actions() {
if (!bLoading) {
checkScreenGroup();
checkScreenRule();
scroll();
} else if (nLoadCountDown > 0) {
nLoadCountDown--;
} else {
bLoading = false;
mcContainer._parent._parent.levelLoader.gotoAndStop("Empty");
_global.Game.broadcastMessage("resume");
_global.Game.switchControlMode("Game");
}
}
function resetAllScreen() {
for (var _local2 in mcContainer) {
mcContainer[_local2].gotoAndStop(3);
mcContainer[_local2 + "_alt"].gotoAndStop(3);
}
}
function resetAllScreenGroup() {
for (var _local2 in aScreenGroup) {
aScreenGroup[_local2].destroy();
}
mcContainer._parent.Collider.clear();
}
function resetScreenGroup(l_nScreenGroup) {
aScreenGroup[l_nScreenGroup].destroy();
}
function cleanLastScreenGroup(l_nScreenGroup) {
aScreenGroup[l_nScreenGroup].clean();
}
function addScreenGroup(l_oGroup) {
aScreenGroup.push(l_oGroup);
}
function setLimit(l_nMaxDown, l_nMaxUp, l_nMaxLeft, l_nMaxRight) {
nMaxDown = l_nMaxDown;
nMaxUp = l_nMaxUp;
nMaxLeft = l_nMaxLeft;
nMaxRight = l_nMaxRight;
scroll();
}
function initCameraToScreen() {
var _local3;
var _local2;
nMaxDown = aScreenGroup[nCurrentScreenGroup].maxDown;
nMaxUp = aScreenGroup[nCurrentScreenGroup].maxUp;
nMaxLeft = aScreenGroup[nCurrentScreenGroup].maxLeft;
nMaxRight = aScreenGroup[nCurrentScreenGroup].maxRight;
if (bMoveAuto) {
_local3 = nMaxRight;
_local2 = nMaxUp;
bMoveAuto = false;
mcContainer._parent._x = Math.floor(_local3);
mcContainer._parent.Parallax._x = Math.floor(_local3 / -2);
nPosX = mcContainer._parent._x;
nParallaxPosX = mcContainer._parent.Parallax._x;
nInvertedPosX = nPosX * -1;
mcContainer._parent._y = Math.floor(_local2);
mcContainer._parent.Parallax._y = Math.floor(_local2 / -2);
nPosY = mcContainer._parent._y;
nParallaxPosY = mcContainer._parent.Parallax._y;
nInvertedPosY = nPosY * -1;
broadcastMessage("CameraSkip");
}
scroll();
}
function activateScreenGroup(l_bSpecialRule) {
bLoading = true;
mcContainer._parent._parent.levelLoader.gotoAndStop("Load");
_global.Game.broadcastMessage("pause", true);
_global.Game.switchControlMode("Pause");
nLoadCountDown = 20;
addListener(aScreenGroup[nCurrentScreenGroup]);
aScreenGroup[nCurrentScreenGroup].activate(mcContainer, mcContainer._parent, this, oPers, l_bSpecialRule);
}
function checkScreenGroup() {
}
function checkScreenRule() {
if (aScreenGroup[nCurrentScreenGroup].checkCameraPause(nInvertedPosX)) {
return(true);
}
}
function switchToNextScreenGroup() {
cleanLastScreenGroup(nCurrentScreenGroup);
nCurrentScreenGroup++;
activateScreenGroup();
}
function get currentScreenGroup() {
return(aScreenGroup[nCurrentScreenGroup]);
}
function get currentScreenGroupNum() {
return(nCurrentScreenGroup);
}
function get nextScreenGroup() {
return(aScreenGroup[nCurrentScreenGroup + 1]);
}
function get maxUp() {
return(nMaxUp);
}
function get maxDown() {
return(nMaxDown);
}
function goto(l_oDestination, l_bSpecialRule) {
switch (l_oDestination.type) {
case "group" :
nCurrentScreenGroup = l_oDestination.group - 1;
bMoveAuto = true;
activateScreenGroup(l_bSpecialRule);
break;
default :
}
}
function scroll() {
if ((nPosY <= nMaxDown) and (nPosY >= nMaxUp)) {
if (oPers.TrueX > (nCenterX + 1)) {
if ((!oPers.HitGrd) && (oPers.TrueY >= ffa.Info.__get__HEIGHT())) {
nSpdXLeft = -30;
nSpdXRight = 30;
} else if (oPers.SpdXNow > 0) {
nSpdXLeft = (oPers.SpdXNow * -1) - 5;
} else if (oPers.SpdXNow < 0) {
nSpdXRight = (oPers.SpdXNow * -1) + 5;
} else {
nSpdXLeft = -8;
nSpdXRight = 8;
}
if (nPosX < nMaxLeft) {
if ((nPosX + nSpdXRight) > nMaxLeft) {
nMoveX = nMaxLeft - nPosX;
} else {
nMoveX = nSpdXRight;
}
} else {
if ((nCenterX - oPers.TrueX) > nSpdXLeft) {
nMoveX = nCenterX - oPers.TrueX;
} else {
nMoveX = nSpdXLeft;
}
if ((nPosX + nMoveX) < nMaxLeft) {
nMoveX = nMaxLeft - nPosX;
}
}
} else if (oPers.TrueX < (nCenterX - 1)) {
if ((!oPers.HitGrd) && (oPers.TrueY >= ffa.Info.__get__HEIGHT())) {
nSpdXLeft = -30;
nSpdXRight = 30;
} else if (oPers.SpdXNow > 0) {
nSpdXLeft = (oPers.SpdXNow * -1) - 5;
} else if (oPers.SpdXNow < 0) {
nSpdXRight = (oPers.SpdXNow * -1) + 5;
} else {
nSpdXLeft = -8;
nSpdXRight = 8;
}
if (nPosX > nMaxRight) {
if ((nPosX + nSpdXLeft) < nMaxRight) {
nMoveX = nMaxRight - nPosX;
} else {
nMoveX = nSpdXLeft;
}
} else {
if ((nCenterX - oPers.TrueX) < nSpdXRight) {
nMoveX = nCenterX - oPers.TrueX;
} else {
nMoveX = nSpdXRight;
}
if ((nPosX + nMoveX) > nMaxRight) {
nMoveX = nMaxRight - nPosX;
}
}
} else {
if ((oPers.HitGrd == false) and (oPers.TrueY >= 300)) {
nSpdXLeft = -30;
nSpdXRight = 30;
} else if (oPers.SpdXNow > 0) {
nSpdXLeft = (oPers.SpdXNow * -1) - 5;
} else if (oPers.SpdXNow < 0) {
nSpdXRight = (oPers.SpdXNow * -1) + 5;
} else {
nSpdXLeft = -8;
nSpdXRight = 8;
}
if (nPosX < nMaxLeft) {
if ((nPosX + nSpdXRight) > nMaxLeft) {
nMoveX = nMaxLeft - nPosX;
} else {
nMoveX = nSpdXRight;
}
} else if (nPosX > nMaxRight) {
if ((nPosX + nSpdXLeft) < nMaxRight) {
nMoveX = nMaxRight - nPosX;
} else {
nMoveX = nSpdXLeft;
}
}
}
}
if ((nPosX <= nMaxRight) and (nPosX >= nMaxLeft)) {
if (oPers.TrueY > (nCenterY + 1)) {
if (oPers.SpdYNow > 0) {
nSpdYUp = (oPers.SpdYNow * -1) - 5;
} else if (oPers.SpdYNow < 0) {
nSpdYDown = (oPers.SpdYNow * -1) + 5;
} else {
nSpdYUp = -5;
nSpdYDown = 5;
}
if (nPosY < nMaxUp) {
if ((nPosY + nSpdYDown) > nMaxUp) {
nMoveY = nMaxUp - nPosY;
} else {
nMoveY = nSpdYDown;
}
} else {
if ((nCenterY - oPers.TrueY) > nSpdYUp) {
nMoveY = nCenterY - oPers.TrueY;
} else {
nMoveY = nSpdYUp;
}
if ((nPosY + nMoveY) < nMaxUp) {
nMoveY = nMaxUp - nPosY;
}
}
} else if (oPers.TrueY < (nCenterY - 1)) {
if (oPers.SpdYNow > 0) {
nSpdYUp = (oPers.SpdYNow * -1) - 5;
} else if (oPers.SpdYNow < 0) {
nSpdYDown = (oPers.SpdYNow * -1) + 5;
} else {
nSpdYUp = -5;
nSpdYDown = 5;
}
if (nPosY > nMaxDown) {
if ((nPosY + nSpdYUp) < nMaxDown) {
nMoveY = nMaxDown - nPosY;
} else {
nMoveY = nSpdYUp;
}
} else {
if ((nCenterY - oPers.TrueY) < nSpdYDown) {
nMoveY = nCenterY - oPers.TrueY;
} else {
nMoveY = nSpdYDown;
}
if ((nPosY + nMoveY) > nMaxDown) {
nMoveY = nMaxDown - nPosY;
}
}
} else {
if (oPers.SpdYNow > 0) {
nSpdYUp = (oPers.SpdYNow * -1) - 5;
} else if (oPers.SpdYNow < 0) {
nSpdYDown = (oPers.SpdYNow * -1) + 5;
} else {
nSpdYUp = -5;
nSpdYDown = 5;
}
if (nPosY < nMaxUp) {
if ((nPosY + nSpdYDown) > nMaxUp) {
nMoveY = nMaxDown - nPosY;
} else {
nMoveY = nSpdYDown;
}
} else if (nPosY > nMaxDown) {
if ((nPosY + nSpdYUp) < nMaxDown) {
nMoveY = nMaxDown - nPosY;
} else {
nMoveY = nSpdYUp;
}
}
}
}
mcContainer._parent._x = Math.floor(mcContainer._parent._x + nMoveX);
mcContainer._parent.Parallax._x = Math.floor(mcContainer._parent._x / -2);
nPosX = mcContainer._parent._x;
nParallaxPosX = mcContainer._parent.Parallax._x;
nInvertedPosX = nPosX * -1;
nMoveX = 0;
mcContainer._parent._y = Math.floor(mcContainer._parent._y + nMoveY);
mcContainer._parent.Parallax._y = Math.floor(mcContainer._parent._y / -2);
nPosY = mcContainer._parent._y;
nParallaxPosY = mcContainer._parent.Parallax._y;
nInvertedPosY = nPosY * -1;
nMoveY = 0;
}
}
Symbol 2756 MovieClip [__Packages.ffa.DialogData] Frame 0
class ffa.DialogData
{
static var aLevel;
function DialogData () {
}
static function init() {
var _local1 = new Object();
aLevel = new Array();
_local1 = new Object();
_local1.firstAid_1 = [{content:"Danny! Take this!", character:"Tucker", face:"Angry"}];
_local1.firstAid_2 = [{content:"You better take this!", character:"Tucker", face:"Angry"}];
_local1.firstAid_3 = [{content:"Danny I think you'll need this!", character:"Sam", face:"Angry"}];
aLevel.push(_local1);
_local1 = new Object();
_local1["1_init"] = [{content:"Hurry up Danny! We gotta find all four gems before Freakshow does!", character:"Sam", face:"Angry"}];
_local1["4_init"] = [{content:"Danny if you want to get over this. Press on the jump button twice to perform a double jump.", character:"Sam", face:"Angry"}];
_local1["6_init"] = [{content:"Careful Danny -- that beam can hurt any person who passes through it. Hey, but maybe not if you're a ghost...hmm...", character:"Tucker", face:"Surprise"}];
_local1["7_init"] = [{content:"Looks like this one only hurts ghosts -- switch back to normal and you won\u2019t get hurt.", character:"Tucker", face:"Angry"}];
_local1["10_init"] = [{content:"Heads up Danny, that guy\u2019s looking for you!", character:"Tucker", face:"Surprise"}, {content:"It\u2019s one of the Guys in White ... he was sent by the Anti-Ghost Minister to catch you!\rBe careful they can be dangerous!", character:"Sam", face:"Surprise"}, {content:"Try this special fighting combo:\rDaniel's Spin Punch / Danny's Phantom Fist:\r<Space> + <G> + <Space>", character:"Sam", face:"Angry"}];
_local1["10_end"] = [{content:"Nice work Danny!", character:"Tucker", face:"Angry"}];
_local1["20_init"] = [{content:"Yikes, who\u2019s that creepy lady?", character:"Tucker", face:"Surprise"}, {content:"Hey! Who are you?", character:"Danny", face:"Angry"}, {content:"...", character:"LydiaCloaked", face:""}];
_local1["20_end"] = [{content:"Guess she\u2019s not too talkative.", character:"Sam", face:"Surprise"}];
_local1["37_init"] = [{content:"Come back here!", character:"Danny", face:"Angry"}];
_local1["47_init"] = [{content:"Hey!", character:"Danny", face:"Angry"}];
_local1["51_init"] = [{content:"Come back here! Who are you? What do you want?", character:"Danny", face:"Angry"}, {content:"Freakshow has ordered me to take care of you.", character:"LydiaCloaked", face:""}, {content:"Oh yeah! What are you waiting for?", character:"Danny", face:"Angry"}, {content:"...", character:"LydiaCloaked", face:""}];
_local1.Lydia_uncloaked = [{content:"Lydia!!!", character:"Danny", face:"Surprise"}];
_local1.Lydia_sendTatoos = [{content:"Be careful of her evil Tattoos. They just love to bite!", character:"Tucker", face:"Angry"}, {content:"Send Lydia\u2019s tattoos back to her. It\u2019s the only way to hurt her!Go ghost and try the Danny's Blasting Uppercut right below her: \r<SPACE> + <SPACE> + <HOLD \"DOWN ARROW\", THEN PRESS SPACE>", character:"Sam", face:"Angry"}];
_local1.Lydia_dropGem = [{content:"She\u2019s flying off again!", character:"Tucker", face:"Surprise"}, {content:"Let her go, she dropped the yellow gem that's all we need.", character:"Danny", face:"Angry"}];
_local1.boss_end = [{content:"Three more gems to go!", character:"Danny", face:"Angry"}, {content:"The next gem is somewhere at Cape Canaveral. We have to find it!", character:"Sam", face:"Angry"}, {content:"Can we eat first? I'm starving!", character:"Tucker", face:"Surprise"}, {content:"...sigh...", character:"Sam", face:"Angry"}];
aLevel.push(_local1);
_local1 = new Object();
_local1["1_init"] = [{content:"Oh! No! The soldiers have followed us here! ", character:"Tucker", face:"Angry"}, {content:"Quick! The red gem has to be here somewhere! ", character:"Sam", face:"Angry"}, {content:"Ugh, are we EVER gonna eat lunch?", character:"Tucker", face:"Surprise"}];
_local1["51_init"] = [{content:"Wow! Look at this beautiful space shuttle.", character:"Danny", face:"Surprise"}, {content:"It looks weird to me, like the space shuttle has a gigantic mouth...", character:"Sam", face:"Surprise"}];
_local1.SpaceShuttle_pass = [{content:"That\u2019s because it does! It just tried to eat us!", character:"Tucker", face:"Surprise"}, {content:"RUN FOR IT!!!", character:"Danny", face:"Angry"}];
_local1.SpaceShuttle_dropGem = [{content:"Way to scuttle that shuttle, Fenton!", character:"Tucker", face:"Surprise"}, {content:"It seems the red gem gave life to the space shuttle! Come on Danny grab it!", character:"Sam", face:"Surprise"}];
_local1.boss_end = [{content:"The red gem is secure! ", character:"Danny", face:"Angry"}];
aLevel.push(_local1);
_local1 = new Object();
_local1["1_init"] = [{content:"What a crazy place!", character:"Tucker", face:"Surprise"}, {content:"Freakshow must have created all these things with the other two gems.", character:"Sam", face:"Surprise"}, {content:"We better hurry up!", character:"Sam", face:"Surprise"}];
_local1["1_mid"] = [{content:"Welcome to my domain ladies and gentlemen, boys and girls.\rNo harm will come to you as long as you are kind enough to give me the two gems you borrowed.", character:"Freakshow", face:""}, {content:"Danny! Don\u2019t do that! Freakshow will distort reality.", character:"Sam", face:"Angry"}, {content:"Do you really think anybody will pay to see this circus, Freakshow?", character:"Danny", face:"Angry"}, {content:"Oh they\u2019ll pay all right -- with their sanity! Now, please enjoy your trip through my amusement park. Perhaps we\u2019ll meet again later -- if you survive! HAHAHAHA!!!", character:"Freakshow", face:""}];
_local1["1_end"] = [{content:"That guy\u2019s got issues.", character:"Danny", face:"Surprise"}];
_local1["8_init"] = [{content:"Hang on Danny, you can't pass through those beams in ghost OR human form--wait till they disappear for a moment and then sprint past!", character:"Tucker", face:"Surprise"}];
_local1["51_init"] = [{content:"Freakshow!", character:"Danny", face:"Surprise"}, {content:"Danny my boy, I see you showed up after all. Bad idea.", character:"Freakshow", face:""}];
_local1.Freakshow_takeGem = [{content:"Hey! My gems! Freakshow took them!", character:"Danny", face:"Surprise"}, {content:"HAHAHA! Now you shall tremble before the Reality Gauntlet\u2019s powers!", character:"Freakshow", face:""}];
_local1.Freakshow_attack = [{content:"You just got zapped with Freakshow's Freak Beam! You're in for a momentary reality check!", character:"Sam", face:"Surprise"}];
_local1.Freakshow_lost = [{content:"Impossible! It is I who controls reality.", character:"Freakshow", face:"Sad"}, {content:"Not anymore Freak! I\u2019ll make sure the Reality Gauntlet is destroyed.", character:"Danny", face:"Angry"}, {content:"Noooooooooo!!!", character:"Freakshow", face:"Sad"}];
aLevel.push(_local1);
}
static function getDialog(l_nLevel, l_sDialogName) {
trace(l_sDialogName);
return(aLevel[l_nLevel][l_sDialogName]);
}
}
Symbol 2757 MovieClip [__Packages.ffa.devices.ADSD] Frame 0
class ffa.devices.ADSD extends ffa.ScrollerElement
{
var nFrFire, bIntermitent, oScroller, nPosX, nPosY, oPers, mcContainer, nWidthOutLeft, nWidthOutRight, nRayWidth, sTarget, setState, nRayHeight, mcHitZone, nFrTotalAnim, bAnimPause;
function ADSD (l_nElement, l_mcAttachTarget, l_oPosition, l_sType, l_bIntermitent, l_oScroller, l_oPers, l_nRayWidth, l_nADSDWidth) {
super();
ffa.Info.init();
var _local3;
nFrFire = 0;
bIntermitent = l_bIntermitent;
oScroller = l_oScroller;
_local3 = "ADSD" + l_nElement;
nPosX = l_oPosition.x;
nPosY = l_oPosition.y;
oPers = l_oPers;
l_mcAttachTarget.attachMovie("ADSD_NORMAL", _local3, l_nElement * 2, {_x:l_oPosition.x, _y:l_oPosition.y});
l_mcAttachTarget[_local3]._width = l_nADSDWidth;
if (l_sType == "red") {
l_mcAttachTarget[_local3].gotoAndStop(1);
} else if (l_sType == "green") {
l_mcAttachTarget[_local3].gotoAndStop(2);
} else if (l_sType == "combined") {
l_mcAttachTarget[_local3].gotoAndStop(3);
}
mcContainer = l_mcAttachTarget[_local3].Obj;
nWidthOutLeft = (0 + mcContainer._width) + 200;
nWidthOutRight = ffa.Info.__get__WIDTH() + 200;
nRayWidth = l_nRayWidth;
initHitZone(_local3, l_mcAttachTarget, l_nElement);
if (l_sType == "red") {
sTarget = "Daniel";
} else if (l_sType == "green") {
sTarget = "Danny";
} else {
sTarget = "Dan";
}
setState("Sleep");
}
function initHitZone(l_sName, l_mcAttachTarget, l_nElement) {
nRayHeight = (ffa.Info.__get__HEIGHT() + Math.abs(oScroller.maxUp)) + Math.abs(oScroller.maxDown);
if (mcHitZone == undefined) {
mcHitZone = l_mcAttachTarget.createEmptyMovieClip(l_sName + "Hit", (l_nElement * 2) + 1);
}
mcHitZone._x = nPosX;
mcHitZone._y = nPosY - nRayHeight;
mcHitZone.moveTo(0, 0);
mcHitZone.beginFill(16711935);
mcHitZone.lineTo(0, nRayHeight);
mcHitZone.lineTo(nRayWidth + 40, nRayHeight);
mcHitZone.lineTo(nRayWidth + 40, 0);
mcHitZone.lineTo(0, 0);
mcHitZone._visible = false;
}
function checkActive() {
if ((nPosX >= (oScroller.nInvertedPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nInvertedPosX + nWidthOutRight))) {
initHitZone();
Activate();
}
}
function Activate() {
if (!bIntermitent) {
startFire();
} else {
setState("Charge");
mcContainer.state.gotoAndPlay(15);
}
}
function checkSleep() {
if ((nPosX <= (oScroller.nInvertedPosX - nWidthOutLeft)) || (nPosX >= (oScroller.nInvertedPosX + nWidthOutRight))) {
setState("Sleep");
}
}
function startFire() {
setState("Fire");
mcContainer.state.Ray._height = nRayHeight;
mcContainer.state.Ray._width = mcContainer.state._width - 30;
mcContainer._parent.cacheAsBitmap = true;
}
function Sleep() {
checkActive();
}
function Idle() {
checkSleep();
}
function Charge() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
startFire();
}
checkSleep();
}
function Fire() {
nFrFire++;
if (bIntermitent && (nFrFire > FIRE_TIME)) {
nFrFire = 0;
mcContainer._parent.cacheAsBitmap = false;
setState("Charge");
} else if (nFrFire != 0) {
checkHit();
}
checkSleep();
}
function checkHit() {
if (((sTarget == "Dan") || (oPers.Perso == sTarget)) && (mcHitZone.hitTest(oPers.TrueX, oPers.TrueY))) {
oPers.GetHit();
}
}
function pause(l_bAnim) {
if (l_bAnim) {
mcContainer.state.Ray.stop();
}
super.pause(l_bAnim);
}
function resume() {
if (bAnimPause) {
mcContainer.state.Ray.play();
}
super.resume();
}
function destroy() {
mcContainer._parent.cacheAsBitmap = false;
mcHitZone.removeMovieClip();
super.destroy();
}
function toString() {
return(mcContainer._parent._name);
}
static var FIRE_TIME = 60;
}
Symbol 2758 MovieClip [__Packages.ffa.ennemy.Tatoo] Frame 0
class ffa.ennemy.Tatoo extends ffa.ennemy.Ennemy
{
var bInBoss, nPosY, nPosX, mcContainer, nAttackRange, nFrAttackDuration, nFrAttackCount, nSpdYMax, nHurtLoopMax, nWidthOutLeft, nWidthOutRight, nEnergy, setState, bActionPause, checkTarget, checkGetHurt, checkSleep, nSpdX, oPers, nHurtLoop, nFrTotalAnim, nTrueY, broadcastMessage, nTrueX, destroy, nSpdY, oScroller, bFlipped;
function Tatoo (l_mcAttachTarget, l_oPosition, l_oScroller, l_oPers, l_oCollider, l_oScreen, l_bInBoss) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
var _local5 = nTatoo;
var _local3 = "Tatoo" + nTatoo;
nTatoo++;
bInBoss = l_bInBoss;
l_mcAttachTarget.attachMovie("Tatoos", _local3, _local5 * 2, {_x:nPosX, _y:nPosY});
l_mcAttachTarget[_local3].gotoAndStop(Math.ceil(Math.random() * 3));
mcContainer = l_mcAttachTarget[_local3].Obj;
nAttackRange = 125;
nFrAttackDuration = 30;
nFrAttackCount = 0;
nSpdYMax = 3;
nHurtLoopMax = 8;
nWidthOutLeft = (0 + (mcContainer._width / 2)) + ACTIVATION_GAP;
nWidthOutRight = (600 + (mcContainer._width / 2)) + ACTIVATION_GAP;
nEnergy = 99;
setState("Sleep");
}
function Idle() {
if (!bActionPause) {
checkTarget();
checkAttack();
checkGetHurt();
setSpeedNormal();
moveToPos();
if (!bInBoss) {
checkSleep();
}
}
}
function Hurt() {
nSpdX = nSpdX * 0.8;
moveToPos();
if ((oPers.Etat != "JumpKick") && (checkGetHurt())) {
nHurtLoop = 0;
} else if (mcContainer.state._currentframe == nFrTotalAnim) {
nHurtLoop++;
if (nHurtLoop == nHurtLoopMax) {
nHurtLoop = 0;
if (!checkDie()) {
setState("Idle");
}
}
}
}
function Attack() {
checkHit();
setSpeedAttack();
moveToPos();
nFrAttackCount++;
if (nFrAttackCount >= nFrAttackDuration) {
nFrAttackCount = 0;
setState("Idle");
}
checkGetHurt();
}
function PunchedOut() {
if (nTrueY > 100) {
setSpeedPunchedOut();
moveToPos();
} else {
broadcastMessage("onTatooExplode", nPosX, nPosY);
setState("Die");
}
}
function GoOut() {
setSpeedGoOut();
moveToPos();
if ((nTrueX > 625) || (nTrueX < -25)) {
setState("Wait");
}
}
function Wait() {
}
function Die() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
broadcastMessage("onTatooDie", this);
destroy();
}
}
function initHurt() {
nSpdX = 0;
nSpdY = 0;
nEnergy = nEnergy - 50;
switch (oPers.Etat) {
case "MegaChargedUppercut" :
setState("PunchedOut");
break;
case "HardFrontKick" :
setState("Die");
break;
case "JumpKick" :
initJumpKickBounce();
break;
default :
setState("Hurt");
}
oPers.setComboHit();
}
function initEntrance() {
if (nTrueX > 300) {
nPosX = oScroller.nInvertedPosX + 600;
} else if (nTrueX < 300) {
nPosX = oScroller.nInvertedPosX;
}
replaceToPos();
setState("Idle");
}
function initJumpKickBounce() {
if (bFlipped) {
nSpdX = 50;
} else {
nSpdX = -50;
}
setState("Hurt");
}
function checkHit() {
var _local2;
var _local3;
var _local4 = true;
if (_local4) {
if (bFlipped) {
_local2 = nPosX - mcContainer.AttackPoint._x;
_local3 = nPosY + mcContainer.AttackPoint._y;
} else {
_local2 = nPosX + mcContainer.AttackPoint._x;
_local3 = nPosY + mcContainer.AttackPoint._y;
}
if ((_local3 <= oPers.PosY) && (_local3 >= (oPers.PosY - oPers.nGetHitTop))) {
if (((oPers.Dir == "D") && (_local2 <= (oPers.PosX + oPers.nGetHitRight))) && (_local2 >= (oPers.PosX - oPers.nGetHitLeft))) {
oPers.GetHit();
} else if (((oPers.Dir == "G") && (_local2 <= (oPers.PosX + oPers.nGetHitRight))) && (_local2 >= (oPers.PosX - oPers.nGetHitLeft))) {
oPers.GetHit();
}
}
}
}
function checkAttack() {
if (bFlipped) {
if ((nPosX - oPers.PosX) < nAttackRange) {
_global.SoundCTRL.playSound("Tatoo_Attack", 30, 0);
setState("Attack");
}
} else if ((oPers.PosX - nPosX) < nAttackRange) {
_global.SoundCTRL.playSound("Tatoo_Attack", 30, 0);
setState("Attack");
}
}
function checkDie() {
if (nEnergy < 0) {
_global.SoundCTRL.playSound("Tatoo_Die", 50, 0);
setState("Die");
return(true);
}
return(false);
}
function setSpeedNormal() {
if (bFlipped) {
nSpdX = -3;
} else {
nSpdX = 3;
}
if (nPosY < (oPers.PosY - 35)) {
nSpdY = nSpdYMax * 1;
} else if (nPosY > (oPers.PosY - 25)) {
nSpdY = nSpdYMax * -1;
} else {
nSpdY = 0;
}
}
function setSpeedGoOut() {
if (bFlipped) {
nSpdX = -15;
} else {
nSpdX = 15;
}
nSpdY = -2;
}
function setSpeedPunchedOut() {
if (bFlipped) {
nSpdX = 0;
} else {
nSpdX = 0;
}
nSpdY = -30;
}
function setSpeedAttack() {
if (bFlipped) {
nSpdX = -10;
} else {
nSpdX = 10;
}
nSpdY = 0;
}
function replaceToPos() {
mcContainer._parent._x = nPosX;
mcContainer._parent._y = nPosY;
}
function moveToPos() {
if (!bActionPause) {
super.moveToPos();
}
}
function get id() {
return(mcContainer._parent._name);
}
function toString() {
return(mcContainer._parent._name);
}
static var nTatoo = 0;
static var ACTIVATION_GAP = 150;
}
Symbol 2759 MovieClip [__Packages.com.sarbakan.utils.Trig] Frame 0
class com.sarbakan.utils.Trig
{
function Trig () {
}
static function lineIntersect(l_nX1, l_nY1, l_nX2, l_nY2, l_nX3, l_nY3, l_nX4, l_nY4) {
var _local1 = {x:0, y:0};
var _local10;
_local10 = (((l_nX4 - l_nX3) * (l_nY1 - l_nY3)) - ((l_nY4 - l_nY3) * (l_nX1 - l_nX3))) / (((l_nY4 - l_nY3) * (l_nX2 - l_nX1)) - ((l_nX4 - l_nX3) * (l_nY2 - l_nY1)));
_local1.x = l_nX1 + (_local10 * (l_nX2 - l_nX1));
_local1.y = l_nY1 + (_local10 * (l_nY2 - l_nY1));
if ((((((_local1.x >= l_nX1) && (_local1.x <= l_nX2)) || ((_local1.x <= l_nX1) && (_local1.x >= l_nX2))) && (((_local1.y >= l_nY1) && (_local1.y <= l_nY2)) || ((_local1.y <= l_nY1) && (_local1.y >= l_nY2)))) && (((_local1.x >= l_nX3) && (_local1.x <= l_nX4)) || ((_local1.x <= l_nX3) && (_local1.x >= l_nX4)))) && (((_local1.y >= l_nY3) && (_local1.y <= l_nY4)) || ((_local1.y <= l_nY3) && (_local1.y >= l_nY4)))) {
_local1.intersect = true;
} else {
_local1.intersect = false;
}
return(_local1);
}
static function pointsGetDistance(l_oPt1, l_oPt2) {
var _local1 = Math.sqrt(Math.pow(Math.abs(l_oPt2.x - l_oPt1.x), 2) + Math.pow(Math.abs(l_oPt2.y - l_oPt1.y), 2));
return(_local1);
}
static function pointsGetAngle(l_oPt1, l_oPt2) {
var _local4 = 0;
var _local3 = 0;
var _local1 = 0;
var _local2 = 0;
_local4 = (l_oPt1.x - l_oPt2.x) * -1;
_local3 = (l_oPt1.y - l_oPt2.y) * -1;
_local1 = Math.atan2(_local3, _local4);
_local1 = (_local1 * 180) / Math.PI;
if (_local1 < 0) {
_local1 = _local1 * -1;
_local2 = 180 - _local1;
_local1 = 180 + _local2;
}
if (_local1 < 0) {
_local1 = _local1 + 360;
}
return(_local1);
}
static function pointsGetRadian(l_oPt1, l_oPt2) {
var _local2 = 0;
var _local1 = 0;
var _local3 = 0;
_local2 = (l_oPt1.x - l_oPt2.x) * -1;
_local1 = (l_oPt1.y - l_oPt2.y) * -1;
_local3 = Math.atan2(_local1, _local2);
return(_local3);
}
}
Symbol 2760 MovieClip [__Packages.ffa.boss.Lydia] Frame 0
class ffa.boss.Lydia extends ffa.ennemy.Ennemy
{
var mcContainer, bCloaked, nWidthOutLeft, nWidthOutRight, setState, bLastDirection, bReinit, nTatooDelay, nTutorialDelay, nTatooCount, nTatooActive, aTatooSpawned, aTatooActive, bFirstPause, nHurtLoopMax, nHurtLoop, nTotalEnergy, nEnergy, oScreenToNotify, replaceToPos, checkActive, nFrTotalAnim, oLastTatooActivated, pause, checkTarget, bFlipped, nSpdX, moveToPos, nTrueX, nSpdY, destroy, nPosY, nPosX, oScroller, oPers, oCollider, getState, setFlipped, nGetHitRight, nGetHitLeft, nGetHitTop, oGem;
function Lydia (l_mcContainer, l_oPosition, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
mcContainer = l_mcContainer.Obj;
bCloaked = true;
nWidthOutLeft = 0;
nWidthOutRight = 1000;
setState("Sleep");
bLastDirection = true;
bReinit = false;
nTatooDelay = 250;
nTutorialDelay = 25;
nTatooCount = 0;
nTatooActive = 0;
aTatooSpawned = new Array();
aTatooActive = new Array();
bFirstPause = true;
nHurtLoopMax = 5;
nHurtLoop = 0;
nTotalEnergy = 8;
nEnergy = nTotalEnergy;
}
function reInit() {
var _local4 = 50;
bReinit = true;
for (var _local3 in aTatooActive) {
aTatooActive[_local3].setState("Die");
aTatooActive[_local3].removeListener(this);
}
for (var _local3 in aTatooSpawned) {
aTatooSpawned[_local3].setState("Die");
aTatooSpawned[_local3].removeListener(this);
}
aTatooSpawned = new Array();
aTatooActive = new Array();
nTatooCount = 2000;
bFirstPause = false;
nEnergy = nTotalEnergy;
bCloaked = false;
setNewPos((_local4 * 600) - 250, 580);
initMoveToTop();
oScreenToNotify = _global["Screen" + _local4];
oScreenToNotify.addAction({type:"BossSequenceEnd", screen:_local4, level:1});
}
function Activate() {
if (bCloaked) {
setState("IdleWithCapeOn");
} else {
setState("IdleWithoutCape");
}
replaceToPos();
}
function Sleep() {
checkActive();
}
function Hurt() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
nHurtLoop++;
if (nHurtLoop == nHurtLoopMax) {
if (nEnergy > 0) {
nHurtLoop = 0;
setState("IdleWithoutCape");
} else {
initFleesWithoutCape();
}
}
}
}
function IdleWithCapeOn() {
}
function IdleWithoutCape() {
if (aTatooSpawned.length > 0) {
if (!bFirstPause) {
if (nTatooCount < nTatooDelay) {
nTatooCount++;
} else if (aTatooActive.length < 2) {
triggerTatooEntrance();
}
checkCenter();
} else if (aTatooSpawned.length == 2) {
if (nTatooCount < nTutorialDelay) {
nTatooCount++;
} else {
triggerTatooEntrance();
}
} else if (nTatooCount < nTutorialDelay) {
nTatooCount++;
} else if (nTatooCount == nTutorialDelay) {
nTatooCount = 0;
oLastTatooActivated.pause(false);
pause();
bFirstPause = false;
oScreenToNotify.nextAction();
}
}
checkTarget();
}
function FleesWithCapeOn() {
if (bFlipped) {
nSpdX = -8;
} else {
nSpdX = 8;
}
moveToPos();
if (nTrueX > 700) {
oScreenToNotify.nextAction();
setState("Sleep");
}
}
function FleesWithoutCape() {
nSpdX = 10;
nSpdY = -1;
moveToPos();
if (nTrueX > 700) {
oScreenToNotify.nextAction();
destroy();
}
}
function RemovesCape() {
if (mcContainer.state._currentframe == mcContainer.state._totalframes) {
mcContainer.state.stop();
bCloaked = false;
setState("IdleWithoutCape");
oScreenToNotify.nextAction();
}
}
function MovesToTop() {
if (mcContainer.state._currentframe == 40) {
if (bReinit) {
} else {
oScreenToNotify.setLydiaScreenLimit();
}
}
if (mcContainer.state._currentframe == mcContainer.state._totalframes) {
mcContainer.state.stop();
nSpdX = mcContainer.state.finalPos._x;
nSpdY = mcContainer.state.finalPos._y;
initTatooThrow();
moveToPos();
nSpdX = 0;
nSpdY = 0;
}
}
function TatooThrow() {
if (mcContainer.state._currentframe == 20) {
spawnTatoos(3);
}
if (mcContainer.state._currentframe == mcContainer.state._totalframes) {
setState("IdleWithoutCape");
}
}
function FlyToCenter() {
if (bFlipped) {
if (nTrueX < 300) {
nSpdX = 0;
setState("IdleWithoutCape");
} else {
nSpdX = -10;
}
} else if (nTrueX > 300) {
setState("IdleWithoutCape");
nSpdX = 0;
} else {
nSpdX = 10;
}
moveToPos();
}
function spawnTatoos() {
var _local2;
var _local3 = 0;
while (_local3 < 2) {
_local2 = new ffa.ennemy.Tatoo(mcContainer._parent._parent.Tatoo, {x:nPosX, y:nPosY}, oScroller, oPers, oCollider, oScreenToNotify, true);
if (!bLastDirection) {
_local2.setFlipped(true);
}
bLastDirection = !bLastDirection;
_local2.setState("GoOut");
_local2.resume();
aTatooSpawned.push(_local2);
_local3++;
}
}
function triggerTatooEntrance() {
var _local2 = aTatooSpawned[0];
_local2.addListener(this);
oLastTatooActivated = _local2;
aTatooSpawned.shift();
aTatooActive.push(_local2);
_local2.initEntrance();
nTatooCount = nTatooDelay - (nTatooDelay * (nEnergy / nTotalEnergy));
if (nTatooCount > (nTatooDelay - 50)) {
nTatooCount = nTatooDelay - 50;
}
}
function onTatooDie(l_oTatooDie) {
var _local4;
var _local5;
for (var _local3 in aTatooActive) {
if (aTatooActive[_local3].id == l_oTatooDie.__get__id()) {
aTatooActive[_local3].dead = true;
aTatooActive.sortOn("dead");
aTatooActive.shift();
break;
}
}
if ((aTatooActive.length == 0) && (aTatooSpawned.length > 0)) {
triggerTatooEntrance();
}
if ((aTatooSpawned.length < 10) && (getState() != "Hurt")) {
initTatooThrow();
}
}
function onTatooExplode(l_nX, l_nY) {
checkGetHurt(l_nX, l_nY);
}
function checkCenter() {
if (nTrueX < 200) {
setFlipped(false);
setState("FlyToCenter");
} else if (nTrueX > 400) {
setFlipped(true);
setState("FlyToCenter");
}
}
function checkJumpKick() {
if (oPers.CanHit) {
trace(oPers.Etat);
if (oPers.Etat == "JumpKick") {
if (bFlipped) {
nSpdX = -30;
} else {
nSpdX = 30;
}
setState("Dodge");
}
}
}
function checkGetHurt(l_nHitX, l_nHitY) {
if (ffa.ennemy.Ennemy.bDEBUG) {
mcContainer._parent._parent.clear();
mcContainer._parent._parent.lineStyle(5, 255);
mcContainer._parent._parent.moveTo(nPosX + nGetHitRight, nPosY);
mcContainer._parent._parent.lineTo(nPosX - nGetHitLeft, nPosY);
mcContainer._parent._parent.lineTo(nPosX - nGetHitLeft, nPosY + nGetHitTop);
mcContainer._parent._parent.lineTo(nPosX + nGetHitRight, nPosY + nGetHitTop);
mcContainer._parent._parent.lineTo(nPosX + nGetHitRight, nPosY);
}
if ((l_nHitY <= nPosY) && (l_nHitY >= (nPosY + nGetHitTop))) {
if ((l_nHitX <= (nPosX + nGetHitRight)) && (l_nHitX >= (nPosX - nGetHitLeft))) {
initHurt();
return(true);
}
if ((l_nHitX >= (nPosX - nGetHitLeft)) && (l_nHitX <= (nPosX + nGetHitRight))) {
initHurt();
return(true);
}
}
return(false);
}
function initHurt() {
nEnergy--;
if (nEnergy == 0) {
nHurtLoopMax = nHurtLoopMax * 2;
}
_global.SoundCTRL.playSound("Lydia_Hurt", 100, 0);
setState("Hurt");
}
function initFleesWithoutCape() {
for (var _local3 in aTatooActive) {
aTatooActive[_local3].setState("Die");
aTatooActive[_local3].removeListener(this);
}
for (var _local3 in aTatooSpawned) {
aTatooSpawned[_local3].setState("Die");
aTatooSpawned[_local3].removeListener(this);
}
setFlipped(false);
oGem = new ffa.Gem("Yellow", {x:nPosX, y:nPosY}, mcContainer._parent._parent, oScroller, oPers, oCollider);
oGem.resume();
_global.Game.HideHint();
setState("FleesWithoutCape");
}
function initTatooThrow(l_nQuantity) {
_global.SoundCTRL.playSound("Lydia_Spawn", 100, 0);
setState("TatooThrow");
}
function initFleesWithCapeOn(l_oScreen) {
oScreenToNotify = l_oScreen;
setFlipped(false);
setState("FleesWithCapeOn");
}
function initUncloak(l_oScreen) {
oScreenToNotify = l_oScreen;
setFlipped(true);
_global.SoundCTRL.playSound("Lydia_Cape", 100, 0);
setState("RemovesCape");
}
function initMoveToTop(l_oScreen) {
oScreenToNotify = l_oScreen;
setFlipped(true);
setState("MovesToTop");
}
function setNewPos(l_nX, l_nY) {
nPosX = l_nX;
nPosY = l_nY;
replaceToPos();
setFlipped(true);
}
function resume() {
super.resume();
if ((!bCloaked) && (!bReinit)) {
oScreenToNotify.setLydiaUnlockedCameraLimit();
}
}
function toString() {
return("Lydia");
}
}
Symbol 2761 MovieClip [__Packages.ffa.Gem] Frame 0
class ffa.Gem extends ffa.ScrollerElement
{
var nPosY, nPosX, mcContainer, setState, nSpdY, checkGround, moveToPos, bHitGround, nFrTotalAnim;
function Gem (l_sColor, l_oPosition, l_mcAttachTarget, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
var _local4 = l_sColor + "Gem";
l_mcAttachTarget.attachMovie("Gems", _local4, 1000, {_x:nPosX, _y:nPosY});
l_mcAttachTarget[_local4].gotoAndStop(l_sColor);
mcContainer = l_mcAttachTarget[_local4].Obj;
setState("Fall");
nSpdY = 10;
_global.Gem = this;
}
function Fall() {
nSpdY = nSpdY * 1.1;
checkGround();
moveToPos();
if (bHitGround) {
nSpdY = 0;
setState("Bounce");
}
}
function Bounce() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
mcContainer.state.stop();
nSpdY = 0;
}
}
}
Symbol 2762 MovieClip [__Packages.ffa.boss.SpaceShuttle] Frame 0
class ffa.boss.SpaceShuttle extends ffa.ennemy.Ennemy
{
var mcContainerFront, mcContainerParallax, sDepth, sCurrentStep, mcContainer, nWidthOutLeft, nWidthOutRight, nSpdXBase, nPassEasyMinDelay, nPassEasyMaxDelay, nPassHardMinDelay, nPassHardMaxDelay, nRespawnDelay, nDelayMax, nDelayCount, bActionPause, sCurrentHeight, nFrTotalAnim, broadcastMessage, oGem, nPosY, nPosX, oScroller, oPers, oCollider, nTrueX, nSpdX, moveToPos, bFlipped, nGetHitRight, nGetHitLeft, nSpdY, replaceToPos, nGetHitTop, getState, nTrueY;
function SpaceShuttle (l_mcContainerFront, l_mcContainerParallax, l_oPosition, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
ffa.Info.init();
mcContainerFront = l_mcContainerFront.Obj;
mcContainerParallax = l_mcContainerParallax.Obj;
sDepth = "Front";
sCurrentStep = "FirstPass";
mcContainer = mcContainerFront;
nWidthOutLeft = 0;
nWidthOutRight = 1000;
nSpdXBase = 32;
setState("Sleep");
nPassEasyMinDelay = 60;
nPassEasyMaxDelay = 180;
nPassHardMinDelay = 60;
nPassHardMaxDelay = 180;
nRespawnDelay = nPassEasyMinDelay;
nDelayMax = 15;
nDelayCount = 0;
}
function Wait() {
if (!bActionPause) {
nDelayCount++;
if ((nDelayCount > nDelayMax) && (sDepth == "Parallax")) {
initFrontPass();
} else if ((nDelayCount > nRespawnDelay) && (sDepth == "Front")) {
if (sCurrentHeight == "Up") {
initParallaxPass("Down");
} else if (sCurrentHeight == "Down") {
initParallaxPass("Up");
}
}
}
}
function TowerCrash() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
mcContainer.state.stop();
setState("Crashed");
broadcastMessage("onShuttleCrash");
trace("Crashed!!");
oGem = new ffa.Gem("Red", {x:nPosX - 50, y:nPosY}, mcContainer._parent._parent, oScroller, oPers, oCollider);
oGem.resume();
}
}
function Crashed() {
}
function Idle() {
switch (sCurrentStep) {
case "SecondPass" :
setSpeed();
if ((nTrueX > -50) && (sDepth == "Front")) {
oPers.initAutoCrouch();
}
break;
case "NormalPass" :
setSpeed();
break;
case "PrepareCrash" :
trace("Speed!!");
trace(_global.Game.Pers.Etat);
if (_global.Game.Pers.Etat == "AutoCrouch") {
setSpeed();
checkCrash();
} else {
nSpdX = 0;
}
break;
default :
setSpeed();
}
if (sDepth == "Front") {
checkHit();
}
moveToPos();
if ((bFlipped && ((nTrueX + nGetHitRight) < 0)) || ((!bFlipped) && ((nTrueX - nGetHitLeft) > ffa.Info.__get__WIDTH()))) {
setState("Wait");
if (sCurrentStep == "FirstPass") {
sCurrentStep = "SecondPass";
broadcastMessage("onShuttleGoOffScreen");
} else if (sCurrentStep == "SecondPass") {
sCurrentStep = "NormalPass";
broadcastMessage("onShuttleGoOffScreen");
}
}
}
function Sleep() {
}
function setSpeed() {
if (bFlipped) {
nSpdX = nSpdXBase * -1;
} else {
nSpdX = nSpdXBase;
}
if (sDepth == "Parallax") {
nSpdX = nSpdX / 2;
}
nSpdY = 0;
}
function initParallaxPass(l_sHeight) {
setState("Sleep");
sDepth = "Parallax";
sCurrentHeight = l_sHeight;
Activate();
setFlipped(true);
if (bFlipped) {
nPosX = ((oPers.PosX / 2) + ffa.Info.__get__WIDTH()) + nGetHitLeft;
} else {
nPosX = ((oPers.PosX / 2) + ffa.Info.__get__WIDTH()) - nGetHitRight;
}
switch (sCurrentHeight) {
case "Up" :
nPosY = 250;
break;
case "Down" :
nPosY = 350;
}
Activate();
setFlipped(true);
nDelayCount = 0;
_global.SoundCTRL.playSound("Shuttle_Fly", 50, 0);
}
function initFrontPass() {
setState("Sleep");
sDepth = "Front";
Activate();
setFlipped(false);
if (bFlipped) {
nPosX = (oPers.PosX - ffa.Info.__get__WIDTH()) + nGetHitLeft;
} else {
nPosX = (oPers.PosX - ffa.Info.__get__WIDTH()) - nGetHitRight;
}
switch (sCurrentHeight) {
case "Up" :
nPosY = 500;
break;
case "Down" :
nPosY = 565;
}
Activate();
setFlipped(false);
if (oScroller.nInvertedPosX < (58 * ffa.Info.__get__WIDTH())) {
nRespawnDelay = Math.round(nPassEasyMinDelay + (Math.random() * (nPassEasyMaxDelay - nPassEasyMinDelay)));
} else if (oScroller.nInvertedPosX < (67 * ffa.Info.__get__WIDTH())) {
nRespawnDelay = Math.round(nPassHardMinDelay + (Math.random() * (nPassHardMaxDelay - nPassHardMinDelay)));
} else {
nRespawnDelay = 90000 /* 0x015F90 */;
}
nDelayCount = 0;
_global.SoundCTRL.playSound("Shuttle_Fly", 100, 0);
}
function Activate() {
setState("Idle");
mcContainer._parent.cacheAsBitmap = true;
replaceToPos();
initHurtZone();
}
function checkActive() {
if (sDepth == "Front") {
if ((nPosX >= (oScroller.nInvertedPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nInvertedPosX + nWidthOutRight))) {
Activate();
}
} else if ((nPosX >= (oScroller.nParallaxPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nParallaxPosX + nWidthOutRight))) {
Activate();
}
}
function checkHit() {
var _local11;
var _local10;
var _local6;
var _local8;
var _local9;
var _local7;
var _local2;
var _local12;
var _local3;
var _local4;
_local11 = oPers.PosX;
_local10 = oPers.PosY;
_local6 = oPers.PosX;
_local8 = oPers.PosY - oPers.nGetHitTop;
_local9 = nPosX + nGetHitRight;
_local7 = nPosX - nGetHitLeft;
_local2 = nPosY;
mcContainer._parent._parent.clear();
var _local5 = 0;
while (_local5 < 3) {
switch (_local5) {
case 0 :
_local3 = _local2 + (nGetHitTop / 2);
_local4 = _local2;
break;
case 1 :
_local3 = _local2 + (nGetHitTop / 2);
_local4 = _local2 + (nGetHitTop / 2);
break;
case 2 :
_local3 = _local2 + (nGetHitTop / 2);
_local4 = _local2 + nGetHitTop;
}
if (bDEBUG) {
mcContainer._parent._parent.lineStyle(5, 255);
mcContainer._parent._parent.moveTo(_local9, _local3);
mcContainer._parent._parent.lineTo(_local7, _local4);
mcContainer._parent._parent.moveTo(_local11, _local10);
mcContainer._parent._parent.lineTo(_local6, _local8);
}
_local12 = com.sarbakan.utils.Trig.lineIntersect(_local9, _local3, _local7, _local4, _local11, _local10, _local6, _local8).intersect;
if (_local12) {
oPers.GetHit();
break;
}
_local5++;
}
}
function initHurtZone() {
if (bFlipped) {
nGetHitLeft = mcContainer.HitFront._x;
nGetHitRight = -1 * mcContainer.HitBack._x;
} else {
nGetHitLeft = -1 * mcContainer.HitBack._x;
nGetHitRight = mcContainer.HitFront._x;
}
nGetHitTop = mcContainer.HitTop._y;
nGetHitLeft = nGetHitLeft * (mcContainer._parent._xscale / 100);
nGetHitRight = nGetHitRight * (mcContainer._parent._xscale / 100);
nGetHitTop = nGetHitTop * (mcContainer._parent._xscale / 100);
}
function setFlipped(l_bFlipped) {
super.setFlipped(l_bFlipped);
initHurtZone();
}
function checkCrash() {
if ((nTrueX > -100) && (sDepth == "Front")) {
oPers.initAutoCrouch();
}
if ((_global.Game.Pers.Etat == "AutoCrouch") && (nPosX > 41550)) {
initCrash();
}
}
function initCrash() {
mcContainer._parent.cacheAsBitmap = false;
_global.SoundCTRL.playSound("Shuttle_Crash", 100, 0);
setState("TowerCrash");
}
function prepareCrash() {
setState("Sleep");
sDepth = "Front";
nPosX = 40800;
nPosY = 475;
Activate();
sCurrentStep = "PrepareCrash";
setFlipped(false);
_global.Game.Pers.initAutoCrouch();
}
function setTruePos() {
if (sDepth == "Parallax") {
if (getState() != "Sleep") {
nTrueX = nPosX - oScroller.nParallaxPosX;
nTrueY = nPosY - oScroller.nParallaxPosY;
}
} else {
super.setTruePos();
}
}
function setState(l_sState) {
if (sDepth == "Parallax") {
mcContainer = mcContainerParallax;
mcContainerFront.gotoAndStop("Sleep");
} else if (sDepth == "Front") {
mcContainer = mcContainerFront;
mcContainerParallax.gotoAndStop("Sleep");
}
super.setState(l_sState);
}
static var bDEBUG = false;
}
Symbol 2763 MovieClip [__Packages.ffa.boss.Freakshow] Frame 0
class ffa.boss.Freakshow extends ffa.ennemy.Ennemy
{
var mcContainer, nWidthOutLeft, nWidthOutRight, setState, nHurtLoopMax, nHurtLoop, nCurrentSequence, aSequence, oBeam, sTarget, nEnergyTotal, nEnergy, nFrAttack, nFrAttackCount, aRandomPos, aRandomColor, nLastRandomPos, nCurrentShot, nMaxShot, StraightShot, DownShot, UpperShot, LowerShot, UpShot, bCanCombo, oScreenToNotify, replaceToPos, checkActive, oPers, checkGetHurt, nFrTotalAnim, bActionPause, setFlipped, broadcastMessage, checkTarget, sBeamColor, sBeamDirection, bFlipped, nPosX, nPosY, nTrueY, nTrueX, getState;
function Freakshow (l_mcContainer, l_oPosition, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
ffa.Info.init();
mcContainer = l_mcContainer.Obj;
nWidthOutLeft = 0;
nWidthOutRight = 1000;
setState("Sleep");
nHurtLoopMax = 10;
nHurtLoop = 0;
nCurrentSequence = 0;
aSequence = ["Init", "TakeGem", "Talk", "Fight", "Defeated"];
oBeam = new ffa.Beam(ffa.Info.__get__WIDTH() * 2, 15, 75, 70);
sTarget = "All";
nEnergyTotal = 400;
nEnergy = nEnergyTotal - 1;
nFrAttack = 15;
nFrAttackCount = 0;
aRandomPos = [{x:30475, y:570, canDie:true}, {x:30135, y:380, canDie:false}, {x:30135, y:480, canDie:true}, {x:30055, y:480, canDie:false}, {x:30475, y:400, canDie:true}, {x:30370, y:400, canDie:false}, {x:30415, y:240, canDie:true}, {x:30295, y:240, canDie:false}, {x:30055, y:240, canDie:false}];
aRandomColor = ["Red", "Green", "Combined"];
nLastRandomPos = 0;
nCurrentShot = 0;
nMaxShot = 3;
StraightShot = mx.utils.Delegate.create(this, Shot);
DownShot = mx.utils.Delegate.create(this, Shot);
UpperShot = mx.utils.Delegate.create(this, Shot);
LowerShot = mx.utils.Delegate.create(this, Shot);
UpShot = mx.utils.Delegate.create(this, Shot);
bCanCombo = false;
}
function reInit() {
nEnergy = nEnergyTotal;
oScreenToNotify = _global.Screen51;
oScreenToNotify.LockCamera(51);
oScreenToNotify.addAction({type:"BossSequenceEnd", screen:51, level:1});
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
}
function Activate() {
super.Activate();
replaceToPos();
}
function Sleep() {
checkActive();
}
function Hurt() {
if (((oPers.Etat != "JumpKick") && (bCanCombo)) && (checkGetHurt())) {
mcContainer.state.gotoAndPlay(1);
} else if (mcContainer.state._currentframe == nFrTotalAnim) {
nHurtLoop++;
if (nHurtLoop == nHurtLoopMax) {
oPers.nHitCombo = 0;
nHurtLoop = 0;
if (bCanCombo) {
nCurrentShot = 0;
bCanCombo = false;
}
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
}
}
}
function Idle() {
if ((aSequence[nCurrentSequence] == "Fight") && (!bActionPause)) {
nFrAttackCount++;
if (nFrAttackCount > nFrAttack) {
nFrAttackCount = 0;
initShot();
}
checkGetHurt();
}
}
function Die() {
setFlipped(true);
if (mcContainer.state._currentframe == nFrTotalAnim) {
broadcastMessage("onFreakshowDie");
mcContainer.state.stop();
}
}
function Adjust() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
bCanCombo = false;
}
checkGetHurt();
}
function Laugh() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
if ((nCurrentShot == 0) || (bActionPause)) {
setState("Idle");
} else {
_global.SoundCTRL.playSound("Freakshow_Glove", 100, 3);
setState("Adjust");
bCanCombo = true;
nCurrentShot = 0;
}
}
checkGetHurt();
}
function WarpIn() {
checkTarget();
if (mcContainer.state._currentframe == nFrTotalAnim) {
switch (aSequence[nCurrentSequence]) {
case "Init" :
setState("Idle");
broadcastMessage("FreakshowWarpedIn");
break;
case "TakeGem" :
nCurrentSequence++;
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
break;
case "Talk" :
initLaugh();
broadcastMessage("onFreakshowTookGem");
break;
case "Fight" :
if (nCurrentShot < nMaxShot) {
setState("Idle");
} else {
initLaugh();
}
}
}
}
function WarpOut() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
switch (aSequence[nCurrentSequence]) {
case "Init" :
setState("Wait");
broadcastMessage("FreakshowWarpedOut");
break;
case "TakeGem" :
setNewPos(oPers.PosX + 70, oPers.PosY);
setState("WarpIn");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
break;
case "Talk" :
setNewPos(30475, 570);
setState("WarpIn");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
setFlipped(true);
break;
case "Fight" :
getNewPosition();
setState("WarpIn");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
}
}
}
function Shot() {
mcContainer.state.Beam.gotoAndStop(sBeamColor);
mcContainer.state.Charge.gotoAndStop(sBeamColor);
if (mcContainer.state._currentframe == 3) {
initHitZone(mcContainer.state.Beam);
} else if ((mcContainer.state._currentframe > 3) && (mcContainer.state._currentframe < 12)) {
if (mcContainer.state._currentframe == 4) {
mcContainer.state.stop();
nFrAttackCount++;
if (nFrAttackCount > nFrAttack) {
mcContainer.state.play();
}
}
checkHit();
} else if (mcContainer.state._currentframe == nFrTotalAnim) {
switch (aSequence[nCurrentSequence]) {
case "Init" :
break;
case "TakeGem" :
break;
case "Talk" :
nCurrentSequence++;
initLaugh();
broadcastMessage("onFreakshowFreakDanny");
break;
case "Fight" :
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
}
}
checkGetHurt();
}
function Antic() {
if (mcContainer.state._currentframe == 15) {
checkDirection();
setState(sBeamDirection + "Shot");
nCurrentShot++;
}
mcContainer.state.Charge.gotoAndStop(sBeamColor);
checkGetHurt();
}
function initShot(l_sColor) {
var _local2;
if (l_sColor) {
sBeamColor = l_sColor;
} else if (nCurrentShot == 0) {
sBeamColor = "Pink";
} else {
if (oPers.Perso == "Danny") {
aRandomColor = ["Green", "Combined"];
} else if (oPers.Perso == "Daniel") {
aRandomColor = ["Red", "Combined"];
}
_local2 = Math.floor(Math.random() * aRandomColor.length);
sBeamColor = aRandomColor[_local2];
}
setState("Antic");
switch (sBeamColor) {
case "Green" :
sTarget = "Danny";
break;
case "Red" :
sTarget = "Daniel";
break;
default :
sTarget = "All";
}
nFrAttackCount = nFrAttack - Math.round((nEnergy / nEnergyTotal) * nFrAttack);
trace("nFrAttackCount: " + nFrAttackCount);
}
function getNewPosition() {
var _local2;
do {
_local2 = Math.floor(Math.random() * aRandomPos.length);
} while ((nLastRandomPos == _local2) || ((nEnergy < 100) && (!aRandomPos[_local2].canDie)));
nLastRandomPos = _local2;
setNewPos(aRandomPos[_local2].x, aRandomPos[_local2].y);
}
function initHitZone(l_mcReference) {
var _local5 = l_mcReference._rotation;
var _local4 = bFlipped;
var _local3;
var _local6;
if (_local4) {
_local3 = (nPosX - l_mcReference._x) - l_mcReference._parent._x;
} else {
_local3 = (nPosX + l_mcReference._x) + l_mcReference._parent._x;
}
_local6 = (nPosY + l_mcReference._y) + l_mcReference._parent._y;
oBeam.launch(_local5, _local3, _local6, _local4);
}
function checkHit() {
var _local11;
var _local5;
var _local4;
var _local2;
var _local3;
var _local8;
var _local6;
var _local9;
var _local7;
var _local10;
oBeam.update();
_local11 = (mcContainer.state.Beam._xscale / 100) * (mcContainer.state._xscale / 100);
mcContainer.state.Beam.color._height = (oBeam.__get__length() * _local11) * (oBeam.__get__scaleProgress() / 100);
if ((sTarget == oPers.Perso) || (sTarget == "All")) {
if ((sBeamDirection != "Up") && (sBeamDirection != "Down")) {
_local5 = oPers.PosX;
_local4 = oPers.PosY;
_local2 = oPers.PosX;
_local3 = oPers.PosY - oPers.nGetHitTop;
} else {
_local5 = oPers.PosX - oPers.nGetHitLeft;
_local4 = oPers.PosY;
_local2 = oPers.PosX + oPers.nGetHitRight;
_local3 = oPers.PosY;
}
_local8 = oBeam.startX;
_local6 = oBeam.startY;
_local9 = oBeam.endX;
_local7 = oBeam.endY;
if (ffa.ennemy.Ennemy.bDEBUG) {
mcContainer._parent._parent.clear();
mcContainer._parent._parent.lineStyle(5, 255);
mcContainer._parent._parent.moveTo(_local8, _local6);
mcContainer._parent._parent.lineTo(_local9, _local7);
mcContainer._parent._parent.moveTo(_local5, _local4);
mcContainer._parent._parent.lineTo(_local2, _local3);
}
_local10 = com.sarbakan.utils.Trig.lineIntersect(_local8, _local6, _local9, _local7, _local5, _local4, _local2, _local3).intersect;
if (_local10) {
if (sBeamColor != "Pink") {
oPers.GetHit();
} else {
oPers.GetFreak();
}
}
}
}
function checkDirection() {
var _local3 = {x:oPers.TrueX, y:oPers.TrueY - 50};
var _local4 = {x:nTrueX, y:nTrueY - 50};
var _local2 = com.sarbakan.utils.Trig.pointsGetAngle(_local3, _local4);
trace("l_nAngle: " + _local2);
if (((_local2 >= 340) || (_local2 < 20)) || ((_local2 >= 160) && (_local2 < 200))) {
sBeamDirection = "Straight";
} else if (((_local2 >= 20) && (_local2 < 70)) || ((_local2 >= 110) && (_local2 < 160))) {
sBeamDirection = "Upper";
} else if ((_local2 >= 70) && (_local2 < 110)) {
sBeamDirection = "Up";
} else if (((_local2 >= 390) && (_local2 < 340)) || ((_local2 >= 200) && (_local2 < 250))) {
sBeamDirection = "Lower";
} else if ((_local2 >= 250) && (_local2 < 390)) {
sBeamDirection = "Down";
}
}
function initHurt() {
oPers.setComboHit();
switch (oPers.Etat) {
case "ComboSpinPunch" :
case "ComboBlast" :
nEnergy = nEnergy - 35;
setState("Hurt");
break;
case "MegaChargedUppercut" :
case "HardFrontKick" :
nEnergy = nEnergy - 35;
setState("Hurt");
break;
case "JumpKick" :
nEnergy = nEnergy - 25;
oPers.initJumpKickBounce();
setState("Hurt");
break;
default :
nEnergy = nEnergy - 10;
setState("Hurt");
}
if (nEnergy <= 0) {
setState("Die");
_global.SoundCTRL.playSound("Freakshow_Die", 100, 0);
} else {
_global.SoundCTRL.stopSound("Freakshow_Laugh");
_global.SoundCTRL.playSound("Freakshow_Hurt", 100, 0);
}
}
function initLaugh() {
_global.SoundCTRL.playSound("Freakshow_Laugh", 100, 0);
setState("Laugh");
}
function initFirstAppear() {
setState("WarpIn");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
setFlipped(true);
setNewPos(500, 570);
}
function initFirstDisappear() {
if (getState() != "WarpOut") {
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
setFlipped(true);
}
}
function initCombatPos() {
setNewPos(30475, 570);
setState("WarpIn");
}
function initTakeGem() {
nCurrentSequence++;
setState("WarpOut");
setFlipped(true);
}
function initCombat() {
nEnergy = nEnergyTotal;
setState("WarpOut");
_global.SoundCTRL.playSound("Freakshow_Warp", 100, 0);
oScreenToNotify = _global.Screen51;
oScreenToNotify.LockCamera(51);
oScreenToNotify.addAction({type:"BossSequenceEnd", screen:51, level:1});
}
function setNewPos(l_nX, l_nY) {
nPosX = l_nX;
nPosY = l_nY;
replaceToPos();
setFlipped(true);
}
function pause(l_bAnim) {
super.pause(l_bAnim);
for (var _local4 in mcContainer.state) {
if (typeof(mcContainer.state[_local4]) == "movieclip") {
mcContainer.state[_local4].stop();
for (var _local3 in mcContainer.state[_local4]) {
if (typeof(mcContainer.state[_local4][_local3]) == "movieclip") {
mcContainer.state[_local4][_local3].stop();
}
}
}
}
}
function resume() {
super.resume();
for (var _local4 in mcContainer.state) {
if (typeof(mcContainer.state[_local4]) == "movieclip") {
mcContainer.state[_local4].stop();
for (var _local3 in mcContainer.state[_local4]) {
if (typeof(mcContainer.state[_local4][_local3]) == "movieclip") {
mcContainer.state[_local4][_local3].stop();
}
}
}
}
}
function toString() {
return("Freakshow");
}
var bDebug = true;
}
Symbol 2764 MovieClip [__Packages.ffa.Bar] Frame 0
class ffa.Bar
{
var mcContainer, nEnergyFull, nEnergyCurrent, oParentBar;
function Bar () {
}
function init(l_mcContainer, l_nBarValue, l_oParentBar) {
mcContainer = l_mcContainer;
if (l_nBarValue == undefined) {
l_nBarValue = l_mcContainer._totalframes - 1;
}
nEnergyFull = l_nBarValue;
mcContainer.gotoAndStop(Math.round(l_nBarValue) + 1);
nEnergyCurrent = nEnergyFull;
oParentBar = l_oParentBar;
}
function looseEnergy(l_nAmount) {
nEnergyCurrent = nEnergyCurrent - l_nAmount;
if (nEnergyCurrent <= 0) {
mcContainer.gotoAndStop(1);
nEnergyCurrent = 0;
return(true);
}
mcContainer.gotoAndStop(nEnergyCurrent + 1);
return(false);
}
function addEnergy(l_nAmount) {
if ((oParentBar != null) && (l_nAmount == nEnergyFull)) {
oParentBar.addEnergy(1);
} else {
nEnergyCurrent = nEnergyCurrent + l_nAmount;
if (nEnergyCurrent >= nEnergyFull) {
nEnergyCurrent = nEnergyFull;
mcContainer.gotoAndStop(nEnergyCurrent + 1);
} else {
mcContainer.gotoAndStop(nEnergyCurrent + 1);
}
}
}
function setEnergy(l_nAmount) {
if (l_nAmount == "Full") {
nEnergyCurrent = nEnergyFull;
} else {
nEnergyCurrent = l_nAmount;
}
if (nEnergyCurrent >= nEnergyFull) {
nEnergyCurrent = nEnergyFull;
mcContainer.gotoAndStop(nEnergyCurrent + 1);
} else {
mcContainer.gotoAndStop(nEnergyCurrent + 1);
}
}
function getEnergy() {
return(nEnergyCurrent);
}
}
Symbol 2765 MovieClip [__Packages.ffa.Timer] Frame 0
class ffa.Timer extends com.sarbakan.utils.Stater
{
var nTimer, txtContainer, nFrameCount, setState, bPaused;
function Timer (l_txtTimer) {
super();
ffa.Info.init();
AsBroadcaster.initialize(this);
_global.Game.addListener(this);
nTimer = 0;
txtContainer = l_txtTimer;
nFrameCount = 0;
setState("Idle");
}
function Idle() {
if (!bPaused) {
nFrameCount++;
if (nFrameCount == ffa.Info.__get__FRAME_RATE()) {
nFrameCount = 0;
nTimer++;
txtContainer.text = com.sarbakan.utils.StringComplex.formatTime(nTimer);
}
}
}
function get timeElapsed() {
return(nTimer);
}
}
Symbol 2766 MovieClip [__Packages.com.sarbakan.utils.KeyManager] Frame 0
class com.sarbakan.utils.KeyManager
{
var oKeyList;
function KeyManager () {
mx.transitions.OnEnterFrameBeacon.init();
MovieClip.addListener(this);
oKeyList = new Object();
}
function onEnterFrame() {
setKey();
}
function addKeyListener(l_nKeyCode, l_sKeyName) {
oKeyList[l_sKeyName] = new Object();
oKeyList[l_sKeyName].nKeyCode = l_nKeyCode;
this[l_sKeyName] = false;
}
function setKey() {
var _local2;
for (_local2 in oKeyList) {
if (Key.isDown(oKeyList[_local2].nKeyCode)) {
this[_local2] = true;
} else {
this[_local2] = false;
}
}
}
}
Symbol 2767 MovieClip [__Packages.ffa.OverlaysManager] Frame 0
class ffa.OverlaysManager extends com.sarbakan.utils.Stater
{
var mcContainer, nFrTotalAnim, broadcastMessage, getState;
function OverlaysManager (l_mcContainer) {
super();
AsBroadcaster.initialize(this);
mcContainer = l_mcContainer;
}
function setState(l_sState) {
super.setState(l_sState);
if (l_sState != "Sleep") {
this[l_sState] = mx.utils.Delegate.create(this, checkOverlay);
}
}
function Sleep() {
}
function checkOverlay() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
broadcastMessage(getState() + "Complete");
trace(getState() + "Complete");
setState("Sleep");
}
}
}
Symbol 2768 MovieClip [__Packages.ship.ShipDatas] Frame 0
class ship.ShipDatas
{
static var oUnlockScore, aVoices, aPalettes, aHull, aTailWeapon, aNoseWeapon, aWingWeapon;
function ShipDatas () {
}
static function init() {
oUnlockScore = {A1:0, B1:0, C1:0, D1:0, A2:10000, B2:25000, C2:50000, D2:75000, A3:150000, B3:250000, C3:350000, D3:500000};
aVoices = ["danny_voice", "sam_voice", "skulker_voice", "desiree_voice", "vlad_voice", "technus_voice"];
aPalettes = [[{ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0}, {ra:40, rb:0, ga:40, gb:0, ba:65, bb:0, aa:100, ab:0}, {ra:100, rb:-25, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0}], [{ra:-100, rb:-255, ga:-64, gb:168, ba:-30, bb:229, aa:100, ab:0}, {ra:-100, rb:-31, ga:-90, gb:-87, ba:-100, bb:122, aa:100, ab:0}, {ra:98, rb:-82, ga:92, gb:-97, ba:76, bb:102, aa:100, ab:0}], [{ra:100, rb:-255, ga:100, gb:5, ba:100, bb:-255, aa:100, ab:0}, {ra:-100, rb:255, ga:45, gb:112, ba:-100, bb:255, aa:100, ab:0}, {ra:60, rb:0, ga:85, gb:0, ba:100, bb:0, aa:100, ab:0}], [{ra:-100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0}, {ra:-100, rb:0, ga:100, gb:112, ba:100, bb:-57, aa:100, ab:0}, {ra:-100, rb:255, ga:-57, gb:255, ba:100, bb:255, aa:100, ab:0}], [{ra:100, rb:-255, ga:100, gb:-255, ba:100, bb:-85, aa:100, ab:0}, {ra:100, rb:-45, ga:-100, gb:-255, ba:-100, bb:-255, aa:100, ab:0}, {ra:100, rb:0, ga:25, gb:0, ba:-15, bb:0, aa:100, ab:0}], [{ra:-100, rb:-255, ga:-100, gb:180, ba:50, bb:75, aa:100, ab:0}, {ra:-100, rb:-255, ga:-100, gb:-180, ba:50, bb:75, aa:100, ab:0}, {ra:-100, rb:255, ga:-100, gb:255, ba:-100, bb:-180, aa:100, ab:0}]];
aHull = [{energy:2, movement:2, size:"Med", damage:2, scaling:120}, {energy:1, movement:3, size:"Sma", damage:1, scaling:160}, {energy:3, movement:1, size:"Big", damage:3, scaling:70}, {energy:2, movement:2, size:"Med", damage:2, scaling:110}, {energy:1, movement:2, size:"Sma", damage:1, scaling:115}, {energy:2, movement:3, size:"Med", damage:2, scaling:190}, {energy:3, movement:1, size:"Big", damage:3, scaling:80}, {energy:2, movement:2, size:"Med", damage:2, scaling:110}, {energy:2, movement:2, size:"Med", damage:2, scaling:105}, {energy:3, movement:2, size:"Med", damage:2, scaling:160}, {energy:5, movement:1.5, size:"Big", damage:4, scaling:80}, {energy:1, movement:4, size:"Sma", damage:2, scaling:100}];
aTailWeapon = [{damage:4}, {damage:4}, {damage:4}, {damage:4}, {damage:6}, {damage:6}, {damage:6}, {damage:6}, {damage:8}, {damage:8}, {damage:8}, {damage:8}];
aNoseWeapon = [{damage:1}, {damage:1}, {damage:1}, {damage:1}, {damage:2}, {damage:2}, {damage:2}, {damage:2}, {damage:3}, {damage:3}, {damage:3}, {damage:3}];
aWingWeapon = [{damage:1, speed:2}, {damage:1, speed:3}, {damage:1, speed:1}, {damage:1, speed:2}, {damage:2, speed:3}, {damage:2, speed:2}, {damage:2, speed:1}, {damage:2, speed:2}, {damage:3, speed:2}, {damage:3, speed:2}, {damage:3, speed:3}, {damage:3, speed:1}];
}
}
Symbol 2769 MovieClip [__Packages.ffa.EnergyBonus] Frame 0
class ffa.EnergyBonus extends ffa.ScrollerElement
{
var nPosY, nPosX, mcContainer, setState, nSpdY, sType, nSpdX, checkGround, moveToPos, bHitGround, oPers, nFrTotalAnim, broadcastMessage, destroy;
function EnergyBonus (l_sType, l_oPosition, l_mcAttachTarget, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
nBonus++;
var _local3 = "Bonus" + nBonus;
l_mcAttachTarget.attachMovie("Bonus", _local3, 300 + nBonus, {_x:nPosX, _y:nPosY});
l_mcAttachTarget[_local3].gotoAndStop(l_sType);
mcContainer = l_mcAttachTarget[_local3].Obj;
setState("Fall");
nSpdY = 10;
sType = l_sType;
}
function Fall() {
nSpdX = 0;
nSpdY = nSpdY * 1.1;
if (nSpdY > 30) {
nSpdY = 30;
}
checkGround();
moveToPos();
if (bHitGround) {
nSpdY = 0;
setState("Idle");
}
}
function Idle() {
if (mcContainer.hitTest(oPers.mcContainer)) {
setState("Taken");
}
}
function Taken() {
if (mcContainer.state._currentframe == nFrTotalAnim) {
mcContainer.state.stop();
oPers.getBonus(sType);
broadcastMessage(("on" + sType) + "Taken");
destroy();
}
}
static var nBonus = 0;
}
Symbol 2770 MovieClip [__Packages.ffa.EasterEgg] Frame 0
class ffa.EasterEgg extends ffa.ennemy.Ennemy
{
var mcContainerFront, mcContainerParallax, sDepth, sCurrentStep, mcContainer, nWidthOutLeft, nWidthOutRight, nSpdXBase, sShipCode, nPassEasyMinDelay, nPassEasyMaxDelay, nPassHardMinDelay, nPassHardMaxDelay, nRespawnDelay, nDelayMax, nDelayCount, oShip, moveToPos, bFlipped, nGetHitRight, nTrueX, nGetHitLeft, nSpdX, nSpdY, getState, nPosX, oPers, nPosY, replaceToPos, oScroller, nGetHitTop, nTrueY;
function EasterEgg (l_mcContainerFront, l_mcContainerParallax, l_oPosition, l_oScroller, l_oPers, l_oCollider) {
super(l_oPosition, l_oScroller, l_oPers, l_oCollider);
ffa.Info.init();
mcContainerFront = l_mcContainerFront;
mcContainerParallax = l_mcContainerParallax.Obj;
mcContainerParallax._parent.swapDepths(10000);
sDepth = "Front";
sCurrentStep = "FirstPass";
mcContainer = mcContainerFront;
nWidthOutLeft = 0;
nWidthOutRight = 1000;
nSpdXBase = 30;
setState("Sleep");
sShipCode = ship.ShipCodec.getRandomCode();
trace("sShipCode: " + sShipCode);
nPassEasyMinDelay = 60;
nPassEasyMaxDelay = 180;
nPassHardMinDelay = 60;
nPassHardMaxDelay = 180;
nRespawnDelay = nPassEasyMinDelay;
nDelayMax = 15;
nDelayCount = 0;
}
function showPlayerShip() {
var _local2 = ship.ShipCodec.decode(sShipCode);
var _local3 = mcContainerParallax.state.container;
_local3._parent._xscale = 25;
_local3._parent._yscale = 25;
_local3._xscale = ship.ShipDatas.aHull[_local2.hullID].scaling;
_local3._yscale = ship.ShipDatas.aHull[_local2.hullID].scaling;
oShip = new ship.Ship(_local3);
oShip.setColorPalette(ship.ShipDatas.aPalettes[_local2.pilotID - 1][0], ship.ShipDatas.aPalettes[_local2.pilotID - 1][1], ship.ShipDatas.aPalettes[_local2.pilotID - 1][2]);
oShip.setHull(_local2.hullID);
oShip.setWing(_local2.wingID);
oShip.setNose(_local2.noseID);
oShip.setTail(_local2.tailID);
oShip.render();
}
function Idle() {
setSpeed();
moveToPos();
if ((bFlipped && ((nTrueX + nGetHitRight) < 0)) || ((!bFlipped) && ((nTrueX - nGetHitLeft) > ffa.Info.__get__WIDTH()))) {
setState("Sleep");
}
}
function Sleep() {
}
function setSpeed() {
if (bFlipped) {
nSpdX = nSpdXBase * -1;
} else {
nSpdX = nSpdXBase;
}
if (sDepth == "Parallax") {
nSpdX = nSpdX / 2;
}
nSpdY = 0;
}
function initPass() {
if (getState() != "Idle") {
setState("Sleep");
sDepth = "Parallax";
Activate();
setFlipped(false);
if (bFlipped) {
nPosX = ((oPers.PosX / 2) - 100) + nGetHitLeft;
} else {
nPosX = ((oPers.PosX / 2) - 100) - nGetHitRight;
}
nPosY = 300;
Activate();
setFlipped(false);
nDelayCount = 0;
setState("Idle");
showPlayerShip();
_global.SoundCTRL.playSound("Shuttle_Fly", 100, 0);
}
}
function Activate() {
setState("Idle");
mcContainer._parent.cacheAsBitmap = true;
replaceToPos();
initHurtZone();
}
function checkActive() {
if (sDepth == "Front") {
if ((nPosX >= (oScroller.nInvertedPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nInvertedPosX + nWidthOutRight))) {
Activate();
}
} else if ((nPosX >= (oScroller.nParallaxPosX - nWidthOutLeft)) && (nPosX <= (oScroller.nParallaxPosX + nWidthOutRight))) {
Activate();
}
}
function checkHit() {
var _local11;
var _local10;
var _local6;
var _local8;
var _local9;
var _local7;
var _local2;
var _local12;
var _local3;
var _local4;
_local11 = oPers.PosX;
_local10 = oPers.PosY;
_local6 = oPers.PosX;
_local8 = oPers.PosY - oPers.nGetHitTop;
_local9 = nPosX + nGetHitRight;
_local7 = nPosX - nGetHitLeft;
_local2 = nPosY;
mcContainer._parent._parent.clear();
var _local5 = 0;
while (_local5 < 3) {
switch (_local5) {
case 0 :
_local3 = _local2 + (nGetHitTop / 2);
_local4 = _local2;
break;
case 1 :
_local3 = _local2 + (nGetHitTop / 2);
_local4 = _local2 + (nGetHitTop / 2);
break;
case 2 :
_local3 = _local2 + (nGetHitTop / 2);
_local4 = _local2 + nGetHitTop;
}
if (bDEBUG) {
mcContainer._parent._parent.lineStyle(5, 255);
mcContainer._parent._parent.moveTo(_local9, _local3);
mcContainer._parent._parent.lineTo(_local7, _local4);
mcContainer._parent._parent.moveTo(_local11, _local10);
mcContainer._parent._parent.lineTo(_local6, _local8);
}
_local12 = com.sarbakan.utils.Trig.lineIntersect(_local9, _local3, _local7, _local4, _local11, _local10, _local6, _local8).intersect;
if (_local12) {
oPers.GetHit();
break;
}
_local5++;
}
}
function initHurtZone() {
if (bFlipped) {
nGetHitLeft = mcContainer.HitFront._x;
nGetHitRight = -1 * mcContainer.HitBack._x;
} else {
nGetHitLeft = -1 * mcContainer.HitBack._x;
nGetHitRight = mcContainer.HitFront._x;
}
nGetHitTop = mcContainer.HitTop._y;
nGetHitLeft = nGetHitLeft * (mcContainer._parent._xscale / 100);
nGetHitRight = nGetHitRight * (mcContainer._parent._xscale / 100);
nGetHitTop = nGetHitTop * (mcContainer._parent._xscale / 100);
}
function setFlipped(l_bFlipped) {
super.setFlipped(l_bFlipped);
initHurtZone();
}
function checkCrash() {
if ((nTrueX > -100) && (sDepth == "Front")) {
oPers.initAutoCrouch();
}
if ((_global.Game.Pers.Etat == "AutoCrouch") && (nPosX > 41550)) {
initCrash();
}
}
function initCrash() {
mcContainer._parent.cacheAsBitmap = false;
_global.SoundCTRL.playSound("Shuttle_Crash", 100, 0);
setState("TowerCrash");
}
function prepareCrash() {
setState("Sleep");
sDepth = "Front";
nPosX = 40800;
nPosY = 475;
Activate();
sCurrentStep = "PrepareCrash";
setFlipped(false);
}
function setTruePos() {
if (sDepth == "Parallax") {
if (getState() != "Sleep") {
nTrueX = nPosX - oScroller.nParallaxPosX;
nTrueY = nPosY - oScroller.nParallaxPosY;
}
} else {
super.setTruePos();
}
}
function setState(l_sState) {
if (sDepth == "Parallax") {
mcContainer = mcContainerParallax;
mcContainerFront.gotoAndStop("Sleep");
} else if (sDepth == "Front") {
mcContainer = mcContainerFront;
mcContainerParallax.gotoAndStop("Sleep");
}
super.setState(l_sState);
}
static var bDEBUG = false;
}
Symbol 2771 MovieClip [__Packages.ship.Ship] Frame 0
class ship.Ship
{
var mcContainer, oColorSetter, nHullID, nWingID, nTailID, nNoseID, bHullLocked, bWingLocked, bTailLocked, bNoseLocked;
function Ship (l_mcContainer) {
mcContainer = l_mcContainer;
setHull(0);
setTail(0);
setWing(0);
setNose(0);
oColorSetter = new utils.ColorSetter();
}
function render(l_sFireType) {
mcContainer.attachMovie("parts_hulls", "hull", 2);
mcContainer.attachMovie("parts_wings", "wing", 3);
mcContainer.attachMovie("parts_tails", "tail", 1);
mcContainer.attachMovie("parts_noses", "nose", 4);
if (l_sFireType != "NOFIRE") {
mcContainer.attachMovie("parts_fire", "fire", 0);
}
mcContainer.hull.gotoAndStop(nHullID + 1);
mcContainer.hull.part.boundingBox._visible = false;
mcContainer.hull.part.mainPoint._visible = false;
mcContainer.wing.gotoAndStop(nWingID + 1);
mcContainer.wing.part.regLaunchPoint._visible = false;
mcContainer.tail.gotoAndStop(nTailID + 1);
if (l_sFireType != "NOFIRE") {
mcContainer.fire.gotoAndStop(nTailID + 1);
}
mcContainer.tail.part.boundingBox._visible = false;
mcContainer.tail.part.regLaunchPoint._visible = false;
mcContainer.tail.part.firePoint._visible = false;
mcContainer.nose.gotoAndStop(nNoseID + 1);
mcContainer.nose.part.boundingBox._visible = false;
mcContainer.nose.part.regLaunchPoint._visible = false;
movePart(mcContainer.wing, mcContainer.hull.part.wingPoint);
movePart(mcContainer.tail, mcContainer.hull.part.tailPoint);
movePart(mcContainer.nose, mcContainer.hull.part.nosePoint);
if (l_sFireType != "NOFIRE") {
moveFire(mcContainer.fire, mcContainer.tail.part.firePoint);
}
colorPart(mcContainer.hull, bHullLocked);
colorPart(mcContainer.wing, bWingLocked);
colorPart(mcContainer.tail, bTailLocked);
colorPart(mcContainer.nose, bNoseLocked);
}
function pause() {
mcContainer.fire.part.stop();
}
function setHull(l_nHullID, l_bLocked) {
nHullID = l_nHullID;
bHullLocked = l_bLocked;
}
function setTail(l_nTailID, l_bLocked) {
nTailID = l_nTailID;
bTailLocked = l_bLocked;
}
function setWing(l_nWingID, l_bLocked) {
nWingID = l_nWingID;
bWingLocked = l_bLocked;
}
function setNose(l_nNoseID, l_bLocked) {
nNoseID = l_nNoseID;
bNoseLocked = l_bLocked;
}
function getHull() {
return(nHullID);
}
function getTail() {
return(nTailID);
}
function getWing() {
return(nWingID);
}
function getNose() {
return(nNoseID);
}
function getRegMissile() {
return(mcContainer.wing.part.regLaunchPoint);
}
function getRegMine() {
return(mcContainer.tail.part.firePoint);
}
function getRegCannon() {
return(mcContainer.nose.part.regLaunchPoint);
}
function getRegHull() {
return(mcContainer.hull.part.mainPoint);
}
function getBoundingBox() {
return([mcContainer.tail.part.boundingBox, mcContainer.hull.part.boundingBox, mcContainer.nose.part.boundingBox]);
}
function movePart(mcPart, mcPoint) {
mcPoint._visible = false;
mcPart._x = mcPoint._x;
mcPart._y = mcPoint._y;
}
function moveFire(mcPart, mcPoint) {
mcPoint._visible = false;
mcPart._x = mcPoint._x + mcContainer.tail._x;
mcPart._y = mcPoint._y + mcContainer.tail._y;
}
function colorPart(mcPart, l_bLocked) {
oColorSetter.colorPart(mcPart, l_bLocked);
}
function setColorPalette(l_oColor1, l_oColor2, l_oColor3) {
oColorSetter.setColorPalette(l_oColor1, l_oColor2, l_oColor3);
}
function getColorPalette() {
return(oColorSetter.getColorPalette());
}
}
Symbol 2772 MovieClip [__Packages.utils.ColorSetter] Frame 0
class utils.ColorSetter
{
var oColor1, oColor2, oColor3, oColorLocked;
function ColorSetter () {
}
function setColorPalette(l_oColor1, l_oColor2, l_oColor3) {
oColor1 = l_oColor1;
trace("oColor1: " + oColor1);
oColor2 = l_oColor2;
trace("oColor2: " + oColor2);
oColor3 = l_oColor3;
trace("oColor3: " + oColor3);
oColorLocked = {ra:0, rb:-255, ga:0, gb:-255, ba:0, bb:-255, aa:100, ab:0};
}
function getColorPalette() {
return({color1:oColor1, color2:oColor2, color3:oColor3});
}
function colorPart(mcPart, l_bLocked) {
var _local4;
var _local3;
for (var _local5 in mcPart.part) {
if (mcPart.part[_local5]._name.indexOf("ol") != -1) {
mcPart.part[_local5]._name = mcPart.part[_local5]._name.toLowerCase();
}
}
if (l_bLocked) {
_local3 = oColorLocked;
} else {
_local3 = oColor1;
}
_local4 = new Color(mcPart.part.col1);
_local4.setTransform(_local3);
if (l_bLocked) {
_local3 = oColorLocked;
} else {
_local3 = oColor2;
}
_local4 = new Color(mcPart.part.col2);
_local4.setTransform(_local3);
if (l_bLocked) {
_local3 = oColorLocked;
} else {
_local3 = oColor3;
}
_local4 = new Color(mcPart.part.col3);
_local4.setTransform(_local3);
}
}
Symbol 2773 MovieClip [__Packages.ship.ShipCodec] Frame 0
class ship.ShipCodec
{
function ShipCodec () {
}
static function getRandomCode() {
var _local2 = Math.ceil(Math.random() * nMaxPilot);
var _local1 = Math.floor(Math.random() * nMaxPart);
var _local5 = Math.floor(Math.random() * nMaxPart);
var _local3 = Math.floor(Math.random() * nMaxPart);
var _local4 = Math.floor(Math.random() * nMaxPart);
return(encode(_local2, _local1, _local5, _local3, _local4));
}
static function encode(l_nPilotID, l_nHull, l_nWing, l_nTail, l_nNose) {
var _local1 = "";
_local1 = _local1 + padZero(l_nPilotID);
_local1 = _local1 + padZero(l_nHull);
_local1 = _local1 + padZero(l_nWing);
_local1 = _local1 + padZero(l_nTail);
_local1 = _local1 + padZero(l_nNose);
return(_local1);
}
static function decode(shipID) {
var _local1 = new Object();
_local1.pilotID = Number(shipID.substr(0, 2));
_local1.hullID = Number(shipID.substr(2, 2));
_local1.wingID = Number(shipID.substr(4, 2));
_local1.tailID = Number(shipID.substr(6, 2));
_local1.noseID = Number(shipID.substr(8, 2));
return(_local1);
}
static function padZero(l_nNum) {
if (l_nNum < 10) {
return("0" + l_nNum);
}
return(String(l_nNum));
}
static var nMaxPilot = 6;
static var nMaxPart = 12;
}
Symbol 2774 MovieClip [__Packages.ffa.DialogManager] Frame 0
class ffa.DialogManager
{
var mcContainer, nTimeDelay, aGoodCharacter, aBadCharacter, aQueue, broadcastMessage, oCurrentDialog;
function DialogManager (l_mcContainer) {
AsBroadcaster.initialize(this);
mcContainer = l_mcContainer;
nTimeDelay = 0;
aGoodCharacter = ["Danny", "Sam", "Tucker"];
aBadCharacter = ["Freakshow", "Lydia", "LydiaCloaked"];
aQueue = new Array();
}
function startDialog(l_oDialog, l_bShowTips) {
var _local5 = false;
l_bShowTips = true;
for (var _local4 in aGoodCharacter) {
if (aGoodCharacter[_local4] == l_oDialog.character) {
show(l_oDialog, "Good", true);
}
}
if (!_local5) {
for (var _local4 in aGoodCharacter) {
if (aBadCharacter[_local4] == l_oDialog.character) {
show(l_oDialog, "Bad", true);
}
}
}
_global.Game.broadcastMessage("pause", false);
_global.Game.switchControlMode("Dialog");
if (l_bShowTips) {
mcContainer.tips._visible = true;
} else {
mcContainer.tips._visible = false;
}
}
function nextQueue() {
var _local2 = aQueue[0];
var _local4 = false;
if (aQueue.length > 0) {
for (var _local3 in aGoodCharacter) {
if (aGoodCharacter[_local3] == _local2.character) {
show(_local2, "Good", false);
}
}
if (!_local4) {
for (var _local3 in aGoodCharacter) {
if (aBadCharacter[_local3] == _local2.character) {
show(_local2, "Bad", false);
}
}
}
aQueue.shift();
return(true);
}
hide();
aQueue = new Array();
return(false);
}
function hide(l_bBroadcast) {
if (l_bBroadcast != false) {
broadcastMessage("closeDialog_" + oCurrentDialog.id);
}
mcContainer.gotoAndStop("Sleep");
}
function clean() {
aQueue = new Array();
nTimeDelay = 0;
mcContainer.gotoAndStop("Sleep");
}
function queueDialog(l_oDialog) {
aQueue.push(l_oDialog);
}
function show(l_oDialog, l_sType, l_bFirst) {
oCurrentDialog = l_oDialog;
mcContainer.gotoAndStop(l_sType + " Guys");
if (l_oDialog.character == "Danny") {
l_oDialog.character = _global.Game.Pers.Perso;
}
mcContainer.characterFace.gotoAndStop(l_oDialog.character + l_oDialog.face);
mcContainer.characterName.gotoAndStop(l_oDialog.character);
mcContainer.content.text = l_oDialog.content.toUpperCase();
trace("mcContainer.content.text: " + mcContainer.content.text);
if (!l_bFirst) {
mcContainer.back.gotoAndStop(7);
}
nTimeDelay = 15;
}
function updateTimeDelay() {
if (nTimeDelay > 0) {
nTimeDelay--;
}
}
function get timeDelay() {
return(nTimeDelay);
}
function toString() {
return("DialogManager");
}
}
Symbol 224 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 1
_visible = false;
Symbol 268 MovieClip Frame 1
trace(this._currentframe);
Symbol 292 MovieClip Frame 1
var bAttack = false;
var nDistAttackX = 0;
Symbol 292 MovieClip Frame 2
bAttack = true;
nDistAttackX = 15;
nDistAttackY = -20;
Symbol 292 MovieClip Frame 3
bAttack = true;
nDistAttackX = 70;
nDistAttackY = -20;
Symbol 292 MovieClip Frame 4
bAttack = true;
nDistAttackX = 40;
nDistAttackY = -45;
Symbol 292 MovieClip Frame 5
nDistAttackX = 90;
nDistAttackY = -45;
Symbol 292 MovieClip Frame 10
bAttack = false;
Symbol 293 MovieClip Frame 1
var bAttack = false;
var nDistAttackX = 0;
Symbol 293 MovieClip Frame 2
bAttack = true;
nDistAttackX = 15;
nDistAttackY = -20;
Symbol 293 MovieClip Frame 3
bAttack = true;
nDistAttackX = 70;
nDistAttackY = -20;
Symbol 293 MovieClip Frame 4
bAttack = true;
nDistAttackX = 40;
nDistAttackY = -45;
Symbol 293 MovieClip Frame 5
nDistAttackX = 90;
nDistAttackY = -45;
Symbol 293 MovieClip Frame 10
bAttack = false;
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 12
stop();
Symbol 342 MovieClip Frame 25
stop();
Symbol 342 MovieClip Frame 38
stop();
Symbol 342 MovieClip Frame 51
stop();
Symbol 342 MovieClip Frame 63
stop();
Symbol 342 MovieClip Frame 95
stop();
Symbol 342 MovieClip Frame 126
stop();
Symbol 342 MovieClip Frame 140
stop();
Symbol 342 MovieClip Frame 154
stop();
Symbol 342 MovieClip Frame 168
stop();
Symbol 342 MovieClip Frame 182
stop();
Symbol 342 MovieClip Frame 196
stop();
Symbol 342 MovieClip Frame 209
stop();
Symbol 342 MovieClip Frame 222
stop();
Symbol 342 MovieClip Frame 241
stop();
Symbol 342 MovieClip Frame 260
stop();
Symbol 342 MovieClip Frame 287
stop();
Symbol 342 MovieClip Frame 299
stop();
Symbol 342 MovieClip Frame 306
stop();
Symbol 343 MovieClip [GWT] Frame 1
stop();
Symbol 490 MovieClip [Tatoos] Frame 1
stop();
Symbol 490 MovieClip [Tatoos] Frame 2
stop();
Symbol 490 MovieClip [Tatoos] Frame 3
stop();
Symbol 525 MovieClip Frame 1
stop();
Symbol 531 MovieClip Frame 1
stop();
Symbol 1079 MovieClip [parts_fire] Frame 1
stop();
Symbol 1095 MovieClip Frame 1
stop();
Symbol 1131 Button
on (release) {
_global.theStage.gotoAndStop("StoryLine");
}
Symbol 1133 Button
on (release) {
_global.C.goToScreen("HighScores", false);
}
Symbol 1141 Button
on (release) {
_global.C.showHelp(false);
}
Symbol 1145 Button
on (release) {
_global.C.initGame(true, 1);
}
Symbol 1146 Button
on (release) {
_global.C.initGame(true, 2);
}
Symbol 1147 Button
on (release) {
_global.C.initGame(true, 3);
}
Symbol 1168 Button
on (release) {
_global.C.initGame(false, 1);
}
Symbol 1179 MovieClip Frame 1
stop();
Symbol 1179 MovieClip Frame 25
stop();
Symbol 1182 MovieClip Frame 1
_parent.characterName._visible = false;
_parent.characterFace._visible = false;
_parent.content._visible = false;
Symbol 1182 MovieClip Frame 7
_parent.characterName._visible = true;
_parent.characterFace._visible = true;
_parent.content._visible = true;
stop();
Symbol 1226 MovieClip Frame 1
stop();
Symbol 1290 MovieClip Frame 1
stop();
Symbol 1314 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 1322 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 1325 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 1332 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 1338 MovieClip Frame 1
gotoAndStop ("Sleep");
Instance of Symbol 1315 MovieClip "state" in Symbol 1338 MovieClip Frame 11
onClipEvent (load) {
this.frame = 1;
}
Instance of Symbol 1315 MovieClip "state" in Symbol 1338 MovieClip Frame 20
onClipEvent (load) {
this.frame = 5;
}
Instance of Symbol 1315 MovieClip "state" in Symbol 1338 MovieClip Frame 29
onClipEvent (load) {
this.frame = 2;
}
Instance of Symbol 1315 MovieClip "state" in Symbol 1338 MovieClip Frame 38
onClipEvent (load) {
this.frame = 3;
}
Instance of Symbol 1315 MovieClip "state" in Symbol 1338 MovieClip Frame 48
onClipEvent (load) {
this.frame = 4;
}
Instance of Symbol 1337 MovieClip "state" in Symbol 1338 MovieClip Frame 58
onClipEvent (load) {
this.frame = 1;
}
Instance of Symbol 1337 MovieClip "state" in Symbol 1338 MovieClip Frame 65
onClipEvent (load) {
this.frame = 2;
}
Instance of Symbol 1337 MovieClip "state" in Symbol 1338 MovieClip Frame 73
onClipEvent (load) {
this.frame = 3;
}
Symbol 1346 MovieClip Frame 1
comboNum.text = "x" + _global.Game.Pers.nComboSequence;
comboNum_shadow.text = "x" + _global.Game.Pers.nComboSequence;
Symbol 1347 MovieClip Frame 1
if (_global.Game.Pers.nComboSequence == 1) {
play();
} else {
gotoAndPlay ("Complex");
}
Symbol 1347 MovieClip Frame 28
_parent.gotoAndStop("Sleep");
Symbol 1347 MovieClip Frame 58
_parent.gotoAndStop("Sleep");
Symbol 1348 MovieClip Frame 5
gotoAndStop ("Sleep");
Symbol 1377 Button
on (release) {
_global.C.nextLevel();
}
Symbol 1380 Button
on (release) {
_global.C.quitConfirm();
}
Symbol 1384 Button
on (release) {
_global.C.endGame("win");
}
Symbol 1385 MovieClip Frame 2
stop();
Symbol 1387 MovieClip Frame 2
stop();
Symbol 1412 MovieClip Frame 5
gotoAndStop ("Sleep");
Symbol 1478 MovieClip Frame 5
gotoAndStop ("Sleep");
Symbol 1478 MovieClip Frame 10
gotoAndStop ("Sleep");
Symbol 1564 MovieClip Frame 1
stop();
Symbol 1564 MovieClip Frame 8
stop();
Symbol 1564 MovieClip Frame 17
stop();
Symbol 1564 MovieClip Frame 26
stop();
Symbol 1564 MovieClip Frame 34
stop();
Symbol 1564 MovieClip Frame 44
stop();
Symbol 1564 MovieClip Frame 83
stop();
Symbol 1564 MovieClip Frame 96
stop();
Symbol 1564 MovieClip Frame 121
stop();
Symbol 1564 MovieClip Frame 132
stop();
Symbol 1564 MovieClip Frame 140
stop();
Symbol 1564 MovieClip Frame 148
stop();
Symbol 1564 MovieClip Frame 157
stop();
Symbol 1564 MovieClip Frame 167
stop();
Symbol 1564 MovieClip Frame 180
stop();
Symbol 1564 MovieClip Frame 190
stop();
Symbol 1564 MovieClip Frame 199
stop();
Symbol 1564 MovieClip Frame 216
stop();
Symbol 1564 MovieClip Frame 225
stop();
Symbol 1564 MovieClip Frame 238
stop();
Symbol 1564 MovieClip Frame 255
stop();
Symbol 1683 MovieClip Frame 1
stop();
Symbol 1683 MovieClip Frame 8
stop();
Symbol 1683 MovieClip Frame 17
stop();
Symbol 1683 MovieClip Frame 26
stop();
Symbol 1683 MovieClip Frame 34
stop();
Symbol 1683 MovieClip Frame 44
stop();
Symbol 1683 MovieClip Frame 84
stop();
Symbol 1683 MovieClip Frame 94
stop();
Symbol 1683 MovieClip Frame 113
stop();
Symbol 1683 MovieClip Frame 125
stop();
Symbol 1683 MovieClip Frame 133
stop();
Symbol 1683 MovieClip Frame 143
stop();
Symbol 1683 MovieClip Frame 152
stop();
Symbol 1683 MovieClip Frame 162
stop();
Symbol 1683 MovieClip Frame 175
stop();
Symbol 1683 MovieClip Frame 184
stop();
Symbol 1683 MovieClip Frame 193
stop();
Symbol 1683 MovieClip Frame 210
stop();
Symbol 1683 MovieClip Frame 219
stop();
Symbol 1683 MovieClip Frame 232
stop();
Symbol 1683 MovieClip Frame 249
stop();
Symbol 1684 MovieClip Frame 1
Obj.gotoAndStop(_parent.Control.Pers.Etat);
stop();
Symbol 1684 MovieClip Frame 2
Obj.gotoAndStop(_parent.Control.Pers.Etat);
stop();
Symbol 1684 MovieClip Frame 3
Obj.gotoAndStop(_parent.Control.Pers.Etat);
stop();
Symbol 1684 MovieClip Frame 4
Obj.gotoAndStop(_parent.Control.Pers.Etat);
stop();
Symbol 1689 MovieClip Frame 23
stop();
Symbol 1690 MovieClip Frame 81
stop();
Symbol 1691 MovieClip Frame 1
stop();
Symbol 1692 MovieClip Frame 1
stop();
Symbol 1693 MovieClip Frame 2
var i = 1;
while (i < 15) {
bitmap_00.duplicateMovieClip("bitmap_" + i, i, {_x:i * 2399, _y:bitmap_00._y, _visible:true});
i++;
}
stop();
Symbol 1699 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O1a(this, this._x, this._y);
stop();
Symbol 1699 MovieClip Frame 3
_parent._parent._parent.Control.Creer_O1a(this, this._x, this._y);
stop();
Symbol 1704 MovieClip Frame 1
if ((Math.random() * 2) < 1) {
stop();
}
Symbol 1704 MovieClip Frame 2
stop();
Symbol 1707 MovieClip Frame 1
if ((Math.random() * 2) < 1) {
stop();
}
Symbol 1707 MovieClip Frame 2
stop();
Symbol 1723 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P4b(this, this._x, this._y);
stop();
Symbol 1727 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P4a(this, this._x, this._y);
stop();
Symbol 1731 MovieClip Frame 1
_parent._parent._parent.Control.Creer_GWT(this, "green");
gotoAndStop(_parent._currentframe);
Symbol 1731 MovieClip Frame 2
stop();
Symbol 1735 MovieClip Frame 1
stop();
Instance of Symbol 1699 MovieClip in Symbol 1735 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 1735 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 1735 MovieClip Frame 3
stop();
Symbol 1737 MovieClip Frame 1
stop();
Symbol 1737 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 1737 MovieClip Frame 3
stop();
Symbol 1743 MovieClip Frame 1
stop();
Symbol 1743 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 1743 MovieClip Frame 3
stop();
Symbol 1758 MovieClip Frame 1
stop();
Symbol 1758 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1758 MovieClip Frame 3
stop();
Symbol 1771 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2b(this);
stop();
Symbol 1773 MovieClip Frame 1
stop();
Symbol 1773 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1773 MovieClip Frame 3
stop();
Symbol 1780 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O2b(this, this._x, this._y);
stop();
Symbol 1788 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2a(this, this._x, this._y);
stop();
Symbol 1791 MovieClip Frame 1
stop();
Symbol 1791 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1791 MovieClip Frame 3
stop();
Symbol 1800 MovieClip Frame 1
stop();
Symbol 1800 MovieClip Frame 2
_parent._parent.Control.CreerFloor3b(this);
stop();
Symbol 1800 MovieClip Frame 3
stop();
Symbol 1806 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD1(this, true, "red");
Symbol 1806 MovieClip Frame 2
stop();
Symbol 1808 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD1(this, true, "green");
Symbol 1808 MovieClip Frame 2
stop();
Symbol 1810 MovieClip Frame 1
stop();
Symbol 1810 MovieClip Frame 2
_parent._parent.Control.CreerFloor4a(this, this._x, this._y);
stop();
Symbol 1810 MovieClip Frame 3
stop();
Symbol 1814 MovieClip Frame 2
_parent._parent._parent.Control.Creer_ADSD1(this, true, "red");
stop();
Symbol 1816 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD1(this, false, "green");
Symbol 1816 MovieClip Frame 2
stop();
Symbol 1818 MovieClip Frame 1
stop();
Symbol 1818 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1818 MovieClip Frame 3
stop();
Symbol 1820 MovieClip Frame 1
stop();
Symbol 1820 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1820 MovieClip Frame 3
stop();
Symbol 1824 MovieClip Frame 1
gotoAndStop(_parent._currentframe);
Symbol 1824 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O1b(this, this._x, this._y);
stop();
Symbol 1826 MovieClip Frame 1
stop();
Symbol 1826 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 1826 MovieClip Frame 3
stop();
Symbol 1830 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD2(this, false, "red");
Symbol 1830 MovieClip Frame 2
stop();
Symbol 1832 MovieClip Frame 1
stop();
Symbol 1832 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1832 MovieClip Frame 3
stop();
Symbol 1834 MovieClip Frame 1
stop();
Symbol 1834 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1834 MovieClip Frame 3
stop();
Symbol 1835 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD2(this, false, "green");
Symbol 1835 MovieClip Frame 2
stop();
Symbol 1837 MovieClip Frame 1
stop();
Symbol 1837 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1837 MovieClip Frame 3
stop();
Symbol 1842 MovieClip Frame 1
stop();
Symbol 1842 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1842 MovieClip Frame 3
stop();
Symbol 1844 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2c(this);
stop();
Symbol 1850 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P3a(this, this._x, this._y);
stop();
Symbol 1852 MovieClip Frame 1
stop();
Symbol 1852 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 1852 MovieClip Frame 3
stop();
Symbol 1859 MovieClip Frame 1
stop();
Symbol 1859 MovieClip Frame 2
_parent._parent.Control.CreerFloor3c(this);
stop();
Symbol 1859 MovieClip Frame 3
stop();
Symbol 1861 MovieClip Frame 1
stop();
Symbol 1861 MovieClip Frame 2
_parent._parent.Control.CreerFloor3b(this);
stop();
Symbol 1861 MovieClip Frame 3
stop();
Symbol 1862 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD2(this, false, "green");
Symbol 1862 MovieClip Frame 2
stop();
Symbol 1864 MovieClip Frame 1
stop();
Symbol 1864 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1864 MovieClip Frame 3
stop();
Symbol 1866 MovieClip Frame 1
stop();
Symbol 1866 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1866 MovieClip Frame 3
stop();
Symbol 1868 MovieClip Frame 1
stop();
Symbol 1868 MovieClip Frame 2
_parent._parent.Control.CreerFloor4a(this, this._x, this._y);
stop();
Symbol 1868 MovieClip Frame 3
stop();
Symbol 1870 MovieClip Frame 1
stop();
Symbol 1870 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1870 MovieClip Frame 3
stop();
Symbol 1873 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD2(this, false, "red");
Symbol 1873 MovieClip Frame 2
stop();
Symbol 1874 MovieClip Frame 2
_parent._parent._parent.Control.Creer_ADSD2(this, false, "green");
stop();
Symbol 1876 MovieClip Frame 1
stop();
Symbol 1876 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1876 MovieClip Frame 3
stop();
Symbol 1878 MovieClip Frame 1
stop();
Symbol 1878 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 1878 MovieClip Frame 3
stop();
Symbol 1880 MovieClip Frame 1
stop();
Symbol 1880 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1880 MovieClip Frame 3
stop();
Symbol 1882 MovieClip Frame 1
stop();
Symbol 1882 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1882 MovieClip Frame 3
stop();
Symbol 1894 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O3b(this, this._x, this._y);
stop();
Symbol 1896 MovieClip Frame 1
stop();
Symbol 1896 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1896 MovieClip Frame 3
stop();
Symbol 1898 MovieClip Frame 1
stop();
Symbol 1898 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 1898 MovieClip Frame 3
stop();
Symbol 1900 MovieClip Frame 1
stop();
Symbol 1900 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1900 MovieClip Frame 3
stop();
Symbol 1903 MovieClip Frame 1
stop();
Symbol 1903 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 1903 MovieClip Frame 3
stop();
Symbol 1906 MovieClip Frame 1
stop();
Symbol 1906 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 1906 MovieClip Frame 3
stop();
Symbol 1907 MovieClip Frame 1
_parent._parent._parent.Control.Creer_GWT(this, "green");
gotoAndStop(_parent._currentframe);
Symbol 1907 MovieClip Frame 2
stop();
Symbol 1911 MovieClip Frame 1
stop();
Symbol 1911 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 1911 MovieClip Frame 3
stop();
Symbol 1918 MovieClip Frame 1
stop();
Symbol 1918 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 1918 MovieClip Frame 3
stop();
Symbol 1941 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P3b(this, this._x, this._y);
stop();
Symbol 1943 MovieClip Frame 1
stop();
Symbol 1943 MovieClip Frame 2
_parent._parent.Control.CreerFloor2c(this, this._x, this._y);
stop();
Symbol 1943 MovieClip Frame 3
stop();
Symbol 1944 MovieClip Frame 2
stop();
Symbol 2031 MovieClip Frame 2
stop();
Symbol 2033 MovieClip Frame 2
stop();
Symbol 2035 MovieClip Frame 2
stop();
Instance of Symbol 2037 MovieClip "Sol" in Symbol 2040 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 2041 MovieClip Frame 1
_visible = false;
Instance of Symbol 1387 MovieClip "Control" in Symbol 2041 MovieClip Frame 1
onClipEvent (load) {
function ObjPers(PosX, PosY) {
AsBroadcaster.initialize(this);
this.oEnergyBar = new ffa.Bar();
this.oLifeBar = new ffa.Bar();
this.nGetHitLeft = 0;
this.nGetHitRight = 0;
this.nGetHitTop = 0;
this.aCurrentCombo = new Array();
this.Nom = "Pers";
this.Etat = "Idle";
this.EtatOld = "Idle";
this.Dir = "D";
this.DirOld = "D";
this.Point = _global.C.Score;
this.Life = _global.C.Life;
this.SpdXMinion = 3;
this.SpdXNormal = 15;
this.SpdXBase = this.SpdXNormal;
this.SpdXNow = 0;
this.MoveX = 0;
this.MoveY = 0;
this.PosX = PosX;
this.PosY = PosY;
this.PosXAuto = 0;
this.TrueX = PosX;
this.TrueY = PosY;
this.FrontX = 0;
this.FrontY = 0;
this.BottomFrontX = 0;
this.BottomBackX = 0;
this.BackX = 0;
this.HitGrdPoint = 0;
this.WallHitBloc = 2;
this.SpdYNow = 0;
this.SpdYUp = 1.5;
this.SpdYMax = 30;
this.SpdYFall = 2;
this.SpdXHitBase = 5;
this.SpdYHitBase = -10;
this.SpdStartJump = -17;
this.SolOut = 2;
this.SolHitMin = 5;
this.MaxSol = 3;
this.HitGrd = false;
this.SolForJump = 6;
this.DistYFall = 0;
this.DistYLand = 100;
this.CanHit = false;
this.CanBeHit = true;
this.FrWalkNow = 1;
this.InPause = false;
this.FrJump = 1;
this.FrFall = 14;
this.FrLand = 15;
this.FrGetHit = 10;
this.FrGetHitCount = 0;
this.FrBoomTir = 9;
this.FrFinBoom = 6;
this.FrDead = 140;
this.FrDeadCount = 0;
this.aCharacter = ["Danny", "Daniel"];
this.ICharacter = 1;
this.Perso = this.aCharacter[this.ICharacter];
this.updatePerso();
this.LgGetShootX = 20;
this.LgGetShootUp = 72;
this.LgGetShootUpBas = 44;
this.FrInvincibleCount = 0;
this.FrInvincible = 60;
this.Invincible = false;
this.FrSwitchCharacter = 15;
this.FrSwitchCharacterCount = 0;
this.nFrCanDoubleJump = 5;
this.nFrCanDoubleJumpCount = 0;
this.bCanSwitch = true;
this.nHitCombo = 0;
this.bJumpRelease = true;
this.SpdXBaseJumpKick = 20;
this.bComboCheck = false;
this.nFrDelayCombo = 15;
this.nFrDelayComboCount = 0;
this.bCanAttack = true;
this.bAttackRelease = true;
this.bSkipDie = false;
this.mcHitGetHurt = null;
this.HitPointX = 0;
this.HitPointY = 0;
this.BASE_DELAY = 15;
BASE_DELAY = this.BASE_DELAY;
this.NO_DELAY = -1;
NO_DELAY = this.NO_DELAY;
this.nComboSequence = 0;
this.aComboList = new Array();
var _local4;
var _local20;
this.bPause = false;
this.bFreak = false;
this.cDanny = new Color(_parent.Pers);
this.ctOriginal = this.cDanny.getTransform();
this.ctFreak = {ra:50, rb:128, ga:50, gb:51, ba:50, bb:128, aa:100, ab:0};
this.FrFreak = 300;
this.FrFreakCount = 0;
_local4 = new Array({Action:"RightPunch", Hit:false, Perso:"All", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"Punch"}, {Action:"LeftPunch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"RightPunchStill", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielSpinPunch = new Array({Action:"RightPunch", Hit:true, Perso:"Danny", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"SpinPunch"}, {Action:"SwitchDaniel", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"ComboSpinPunch", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielHardFrontKick = new Array({Action:"RightPunch", Hit:true, Perso:"Daniel", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"HardFrontKick"}, {Action:"LeftPunch", Hit:true, MaxFrameDelay:BASE_DELAY}, {Action:"Crouch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"HardFrontKick", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielMegaChargedUppercut = new Array({Action:"RightPunch", Hit:true, Perso:"Danny", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"MegaChargedUppercut"}, {Action:"LeftPunch", Hit:true, MaxFrameDelay:BASE_DELAY}, {Action:"Crouch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"MegaChargedUppercut", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDannyBlast = new Array({Action:"RightPunch", Hit:true, Perso:"Daniel", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"DannyBlast"}, {Action:"SwitchDanny", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"ComboBlast", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDannyUppercut = new Array({Action:"Crouch", Hit:false, Perso:"Danny", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"DannyUppercut"}, {Action:"Uppercut", Hit:true, MaxFrameDelay:NO_DELAY});
aComboDanielLowKick = new Array({Action:"Crouch", Hit:false, Perso:"Daniel", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"DannyLowKick"}, {Action:"LowKick", Hit:true, MaxFrameDelay:NO_DELAY});
aComboJumpKick = new Array({Action:"Jump", Hit:false, Perso:"All", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"JumpKick"}, {Action:"JumpKick", Hit:true, MaxFrameDelay:NO_DELAY});
this.aComboList.push(_local4);
this.aComboList.push(aComboDanielSpinPunch);
this.aComboList.push(aComboDanielHardFrontKick);
this.aComboList.push(aComboDannyBlast);
this.aComboList.push(aComboDanielMegaChargedUppercut);
this.aComboList.push(aComboDannyUppercut);
this.aComboList.push(aComboDanielLowKick);
this.aComboList.push(aComboJumpKick);
this.aComboSelected = new Array();
this.FrCombo = 0;
}
_global.Game = this;
this.GlobalKeyListener = new com.sarbakan.utils.KeyManager();
GlobalKeyListener.addKeyListener(39, "R");
GlobalKeyListener.addKeyListener(37, "L");
GlobalKeyListener.addKeyListener(40, "Dw");
GlobalKeyListener.addKeyListener(38, "Up");
GlobalKeyListener.addKeyListener(71, "Ghost");
GlobalKeyListener.addKeyListener(70, "EasterEgg");
GlobalKeyListener.addKeyListener(32, "Attack");
GlobalKeyListener.addKeyListener(32, "Next");
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
G_CheckPause = function () {
if ((Pers.Etat != "Die") and (Pers.Etat != "Dead")) {
if (G_PauseOut && (!G_Pause)) {
G_Pause = true;
_parent.ControlBall.stop();
_parent._parent.Popup.gotoAndStop("Pause");
if (_global.C.SoundActive) {
_global.SoundCTRL.muteAllSounds();
}
_global.C.DesactivateHud();
} else if ((G_Resume == true) and (G_Pause == true)) {
G_PauseOut = false;
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
KeyListener.Up = false;
KeyListener.UpRelease = true;
KeyListener.Dw = false;
KeyListener.L = false;
KeyListener.R = false;
KeyListener.X = false;
KeyListener.Z = false;
KeyListener.Sp = false;
Music.VolDest = 70;
Music.Etat = "FadeIn";
G_Pause = false;
G_Resume = false;
_parent._parent.Popup.gotoAndStop(1);
if (_global.C.SoundActive) {
_global.SoundCTRL.unmuteAllSounds();
}
_global.C.ActivateHud();
if (_parent.ControlBall._currentframe != 1) {
_parent.ControlBall.play();
}
}
}
};
CreerPers = function (PosX, PosY) {
this.Pers = new ObjPers(PosX, PosY);
this.Pers.oLifeBar.init(_parent._parent.hud.lifeBar, 3, null);
this.Pers.oEnergyBar.init(_parent._parent.hud.energyBar, 10, this.Pers.oLifeBar);
this.Pers.oLifeBar.setEnergy(_global.C.Life);
_global.Game.addListener(this.Pers);
};
ObjPers.prototype.resurrect = function () {
with (this) {
Etat = "Idle";
CanBeHit = true;
CanHit = false;
oEnergyBar.setEnergy(10);
FrDeadCount = 0;
}
};
ObjPers.prototype.CharacterSwitch = function () {
with (this) {
if ((Etat != "Die") && (Etat != "Hurt")) {
if (ICharacter == 0) {
ICharacter = 1;
} else if (ICharacter == 1) {
ICharacter = 0;
}
Perso = aCharacter[ICharacter];
addToComboList("Switch" + Perso, false);
updatePerso();
_parent.Pers.Obj.Transform.gotoAndPlay("Transform");
_global.SoundCTRL.playSound("Danny_Ghost", 90, 0);
}
}
};
ObjPers.prototype.HeroChange = function (NewHero) {
with (this) {
Perso = NewHero;
updatePerso();
}
};
ObjPers.prototype.Idle = function () {
with (this) {
KeepDeadPos = true;
if (oEnergyBar.getEnergy() > 0) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckJump();
CheckCrouch();
this["CheckAttack" + Perso]();
CheckGetFire();
CheckDie();
} else {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
}
};
ObjPers.prototype.getBonus = function (l_sEnergyType) {
with (this) {
if (l_sEnergyType == "Life") {
oLifeBar.addEnergy(1);
} else {
oEnergyBar.setEnergy("Full");
}
}
};
ObjPers.prototype.Run = function () {
with (this) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckJump();
CheckCrouch();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
}
};
ObjPers.prototype.RunAuto = function () {
with (this) {
SetSpdXAuto();
SetMoveX();
CheckHitGrd();
CheckJump();
CheckCrouch();
CheckSol();
CheckFall();
MovePers();
}
};
ObjPers.prototype.DoubleJumpStart = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
Etat = "DoubleJumpIdle";
}
}
};
ObjPers.prototype.DoubleJumpIdle = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
MovePers();
this["CheckAttack" + Perso]();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "DoubleJumpFall";
DistYFall = 0;
}
}
};
ObjPers.prototype.DoubleJumpFall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
SpdXNow = 0;
MoveX = 0;
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "JumpLanding";
} else {
Etat = "Idle";
}
}
CheckHole();
trace("DJFall");
}
};
ObjPers.prototype.JumpKickFall = function () {
with (this) {
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
SpdXNow = 0;
MoveX = 0;
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "JumpLanding";
} else {
Etat = "Idle";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpStart = function () {
with (this) {
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
CheckDoubleJump();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
SpdYNow = SpdStartJump;
Etat = "JumpIdle";
}
}
};
ObjPers.prototype.JumpIdle = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckDoubleJump();
MovePers();
this["CheckAttack" + Perso]();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.Fall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDoubleJump();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if ((DistYFall >= DistYLand) || (Math.abs(SpdXNow) < 5)) {
Etat = "JumpLanding";
SpdXNow = 0;
MoveX = 0;
} else {
Etat = "Run";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpLanding = function () {
with (this) {
CheckGetFire();
CheckCrouch();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
if (oEnergyBar.getEnergy() <= 0) {
Etat = "Die";
} else {
Etat = "Idle";
}
}
}
};
ObjPers.prototype.Crouch = function () {
with (this) {
CheckGetFire();
CheckCrouchRelease();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
}
};
ObjPers.prototype.RightPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.HardFrontKick = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "JumpLanding";
CheckGetFire();
}
}
};
ObjPers.prototype.MegaChargedUppercut = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Crouch";
CheckGetFire();
}
}
};
ObjPers.prototype.RightPunchStill = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
if (nFrPunchStill == 0) {
Etat = "Idle";
} else {
_parent.Pers.Obj.Etat.stop();
nFrPunchStill--;
}
CheckGetFire();
}
}
};
ObjPers.prototype.LeftPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.LowKick = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Crouch";
CheckGetFire();
}
}
};
ObjPers.prototype.Uppercut = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.ComboBlast = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.ComboSpinPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.JumpKick = function () {
with (this) {
if (nJumpKickPause == 0) {
if (_parent.Pers.Obj.Etat._currentframe == 1) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
CheckGetFire();
SetSpdXJumpKick();
SetMoveX();
CheckWall(BottomFrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(BottomFrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (HitGrd) {
CanHit = false;
Etat = "JumpLanding";
}
CheckHole();
} else {
nJumpKickPause--;
}
}
};
ObjPers.prototype.JumpKickBounce = function () {
with (this) {
CheckGetFire();
SetSpdXJumpKickBounce();
SetMoveX();
CheckWall(BottomFrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(BottomFrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (SpdYNow > 5) {
setState("JumpKickFall");
}
if (HitGrd) {
CanHit = false;
Etat = "JumpLanding";
}
CheckHole();
}
};
ObjPers.prototype.initJumpKickBounce = function () {
with (this) {
CanHit = false;
SpdYNow = SpdYNow - 15;
if (Dir == "G") {
SpdXNow = 10;
} else if (Dir == "D") {
SpdXNow = -10;
}
setState("JumpKickBounce");
}
};
ObjPers.prototype.Hurt = function () {
with (this) {
if (FrGetHitCount >= FrGetHit) {
CheckHitGrd();
Etat = "DoubleJumpFall";
FrGetHitCount = 0;
InvincibleInit();
} else {
FrGetHitCount++;
}
GetHitGeneral();
}
};
ObjPers.prototype.GetHitGeneral = function () {
with (this) {
SetSpdXHit();
CheckWall(BackX, TrueY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDie();
CheckHole();
}
};
ObjPers.prototype.GetHit = function (l_nSpdXHit) {
with (this) {
if (CanBeHit) {
CanHit = false;
CanBeHit = false;
oEnergyBar.looseEnergy(1);
trace("l_nSpdXHit: " + l_nSpdXHit);
if (l_nSpdXHit != undefined) {
SpdXNow = l_nSpdXHit;
} else {
SpdXNow = SpdXHitBase;
}
trace("SpdXNow: " + SpdXNow);
SpdYNow = SpdYHitBase;
Etat = "Hurt";
_global.SoundCTRL.playSound("Danny_Hurt", 40, 0);
GetHitGeneral();
nComboSequence = 0;
}
}
};
ObjPers.prototype.GetFreak = function () {
with (this) {
if (CanBeHit) {
CanHit = false;
CanBeHit = false;
SpdXNow = SpdXHitBase;
SpdYNow = SpdYHitBase;
Etat = "Hurt";
_global.SoundCTRL.playSound("Danny_Hurt", 90, 0);
GetHitGeneral();
initFreakControl();
}
}
};
ObjPers.prototype.initAutoCrouch = function () {
with (this) {
if (HitGrd) {
Etat = "AutoCrouch";
} else {
Etat = "AutoCrouchFall";
trace("Etat: " + Etat);
}
}
};
ObjPers.prototype.AutoCrouch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
broadcastMessage("readyForShuttle");
}
}
};
ObjPers.prototype.AutoCrouchFall = function () {
with (this) {
SetSpdXJump();
CheckHitGrd();
CheckSol();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
Etat = "AutoCrouch";
SpdXNow = 0;
MoveX = 0;
}
}
};
ObjPers.prototype.CheckHole = function () {
with (this) {
if (PosY > 725) {
trace("Hole!!");
setState("Die");
}
}
};
ObjPers.prototype.CheckGetFire = function () {
with (this) {
var NbMinionBall = G_TabMinionBall.length;
if ((NbMinionBall > 0) && (Perso != "TuesdayDisguised")) {
var i = 0;
while (i < NbMinionBall) {
var BallX = _parent.Control[G_TabMinionBall[i]].PosX;
var BallY = _parent.Control[G_TabMinionBall[i]].PosY;
if (((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) && (!Invincible)) {
Etat = "GetFire";
if (_parent.Control[G_TabMinionBall[i]].Dir == "D") {
Dir = "G";
} else if (_parent.Control[G_TabMinionBall[i]].Dir == "G") {
Dir = "D";
}
_parent.Control[G_TabMinionBall[i]].Etat = "Hit";
}
i++;
}
}
}
};
ObjPers.prototype.InvincibleInit = function () {
with (this) {
Invincible = true;
}
};
ObjPers.prototype.InvincibleEnd = function () {
with (this) {
Invincible = false;
FrInvincibleCount = 0;
_parent.Pers._visible = true;
}
};
ObjPers.prototype.InvincibleCheck = function () {
with (this) {
if (Invincible) {
if (FrInvincibleCount >= FrInvincible) {
InvincibleEnd();
CanBeHit = true;
} else {
FrInvincibleCount++;
if ((FrInvincibleCount % 3) == 0) {
_parent.Pers._visible = !_parent.Pers._visible;
}
}
}
}
};
ObjPers.prototype.Die = function () {
with (this) {
CanBeHit = false;
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
if (FrDeadCount == 0) {
_parent.Pers.Obj.Etat.stop();
}
FrDeadCount++;
if (FrDeadCount >= 30) {
_global.Game.onPlayerDie();
oLifeBar.looseEnergy(1);
}
}
}
};
ObjPers.prototype.Sleep = function () {
};
ObjPers.prototype.SetSpdXHit = function () {
with (this) {
MoveX = SpdXNow;
if (SpdXNow > 0) {
SpdXNow = SpdXNow * 0.7;
}
if (Dir eq "D") {
MoveX = MoveX * -1;
}
}
};
ObjPers.prototype.SetSpdX = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Run";
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(FrontX - WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Run";
SpdXNow = SpdXBase * -1;
}
} else {
Etat = "Idle";
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXAuto = function () {
with (this) {
if ((PosXAuto >= PosX) && (Dir == "D")) {
Dir = "D";
Etat = "RunAuto";
SpdXNow = SpdXBase;
} else if ((PosXAuto <= PosX) && (Dir == "G")) {
Dir = "G";
Etat = "RunAuto";
SpdXNow = SpdXBase * -1;
} else {
Etat = "Idle";
broadcastMessage("runAutoComplete");
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJump = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase * -1;
}
} else {
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJumpKick = function () {
with (this) {
if (Dir == "G") {
if (SpdXNow < -5) {
SpdXNow = SpdXNow + 2;
} else {
SpdXNow = -5;
}
} else if (Dir == "D") {
if (SpdXNow > 5) {
SpdXNow = SpdXNow - 2;
} else {
SpdXNow = 5;
}
}
}
};
ObjPers.prototype.SetSpdXJumpKickBounce = function () {
with (this) {
if (Dir == "G") {
if (SpdXNow < 10) {
SpdXNow = SpdXNow + 2;
} else {
SpdXNow = 10;
}
} else if (Dir == "D") {
if (SpdXNow > -10) {
SpdXNow = SpdXNow - 2;
} else {
SpdXNow = -10;
}
}
}
};
ObjPers.prototype.SetMoveX = function () {
with (this) {
MoveX = SpdXNow;
}
};
ObjPers.prototype.CheckWall = function (CoordX, CoordY) {
with (this) {
if (MoveX != 0) {
if (MoveX > 0) {
var WallStop = WallHitBloc;
} else {
var WallStop = (-1 * WallHitBloc);
}
var WallHit1 = (MoveX / 3);
var WallHit2 = (WallHit1 * 2);
var WallHit3 = (WallHit1 * 4);
if (_parent.Collider.Wall.hitTest(CoordX + WallStop, CoordY, true)) {
MoveX = 0;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit1, CoordY, true)) {
MoveX = WallHitBloc;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit2, CoordY, true)) {
MoveX = WallHit1;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit3, CoordY, true)) {
MoveX = WallHit2;
} else if (_parent.Collider.Wall.hitTest(CoordX + MoveX, CoordY, true)) {
MoveX = WallHit2;
}
}
}
};
ObjPers.prototype.CheckCeil = function () {
with (this) {
if (MoveY != 0) {
if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) {
MoveY = 0;
SpdYNow = 0;
Etat = "Fall";
DistYFall = 0;
}
}
}
};
ObjPers.prototype.CheckJump = function () {
with (this) {
if ((!KeyListener.Up) && (!bJumpRelease)) {
bJumpRelease = true;
}
if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) {
bJumpRelease = false;
if (Etat == "Run") {
SpdYNow = SpdStartJump;
Etat = "JumpIdle";
_global.SoundCTRL.playSound("Danny_Jump", 30, 0);
} else {
_global.SoundCTRL.playSound("Danny_Jump", 30, 0);
Etat = "JumpStart";
}
nFrCanDoubleJumpCount = nFrCanDoubleJump;
}
}
};
ObjPers.prototype.CheckDoubleJump = function () {
with (this) {
if ((!KeyListener.Up) && (!bJumpRelease)) {
bJumpRelease = true;
}
if (nFrCanDoubleJumpCount == 0) {
if ((KeyListener.Up == true) && (bJumpRelease)) {
_global.SoundCTRL.playSound("Danny_Jump", 20, 0);
Etat = "DoubleJumpStart";
SpdYNow = SpdStartJump;
}
} else {
nFrCanDoubleJumpCount--;
}
}
};
ObjPers.prototype.CheckCrouch = function () {
with (this) {
if ((((KeyListener.Dw && (HitGrd)) && (!KeyListener.L)) && (!KeyListener.R)) && (!KeyListener.Up)) {
Etat = "Crouch";
}
}
};
ObjPers.prototype.CheckCrouchRelease = function () {
with (this) {
if ((((!KeyListener.Dw) || (KeyListener.L)) || (KeyListener.R)) || (KeyListener.Up)) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
}
}
};
ObjPers.prototype.CheckAttackDanny = function () {
with (this) {
var bComboContinue = false;
var oCurrentAttack = new Object();
var oLastAttack;
if (KeyListener.Attack && (bAttackRelease)) {
bAttackRelease = false;
if (aCurrentCombo.length == 0) {
initRightPunch();
addToComboList(Etat, true);
} else {
NextAttack = addToComboList("Attack", true);
if (NextAttack != undefined) {
this["init" + NextAttack]();
} else {
initRightPunch();
addToComboList(Etat, true);
}
}
} else if (!KeyListener.Attack) {
bAttackRelease = true;
}
}
};
ObjPers.prototype.CheckAttackDaniel = ObjPers.prototype.CheckAttackDanny;
ObjPers.prototype.getActionType = function (l_sAction) {
with (this) {
switch (l_sAction) {
case "LeftPunch" :
case "RightPunch" :
case "RightPunchStill" :
case "HardFrontKick" :
case "LowKick" :
case "MegaChargedUppercut" :
case "Uppercut" :
case "JumpKick" :
case "ComboBlast" :
case "ComboSpinPunch" :
return("Attack");
case "JumpIdle" :
case "Fall" :
case "DoubleJumpIdle" :
case "DoubleJumpStart" :
case "DoubleJumpFall" :
return("Jump");
}
}
};
ObjPers.prototype.resetCombo = function () {
with (this) {
aCurrentCombo = new Array();
aComboSelected = new Array();
FrCombo = 0;
}
};
ObjPers.prototype.checkHitSequence = function (l_nComboStep, l_aComboToCheck) {
with (this) {
var i = 0;
while (i <= l_nComboStep) {
if ((aCurrentCombo[i].Hit == true) || (aCurrentCombo[i].Hit == l_aComboToCheck[i].Hit)) {
} else {
trace("Reset no hit!");
nComboSequence = 0;
return(false);
}
i++;
}
return(true);
}
};
ObjPers.prototype.checkDelay = function (l_nComboStep, l_aComboToCheck) {
with (this) {
if ((l_aComboToCheck[l_nComboStep - 1].MaxFrameDelay == NO_DELAY) || ((FrCombo - aCurrentCombo[l_nComboStep - 1].FrameCount) <= l_aComboToCheck[l_nComboStep - 1].MaxFrameDelay)) {
return(true);
}
trace("Reset in delay 2!");
nComboSequence = 0;
return(false);
}
};
ObjPers.prototype.setComboHit = function () {
with (this) {
aCurrentCombo[aCurrentCombo.length - 1].Hit = true;
_parent.Pers.Obj.Impact.gotoAndPlay("Hit");
switch (Etat) {
case "HardFrontKick" :
_global.SoundCTRL.playSound("Danny_HardFrontKick", 100, 0);
showCombo();
return;
case "ComboSpinPunch" :
_global.SoundCTRL.playSound("Danny_Uppercut", 100, 0);
showCombo();
return;
case "MegaChargedUppercut" :
case "ComboBlast" :
_global.SoundCTRL.playSound("Danny_BlastingUppercut", 100, 0);
showCombo();
return;
case "LowKick" :
_global.SoundCTRL.playSound("Danny_LowKick", 100, 0);
return;
case "JumpKick" :
_global.SoundCTRL.playSound("Danny_LowKick", 100, 0);
return;
case "Uppercut" :
_global.SoundCTRL.playSound("Danny_Uppercut", 100, 0);
return;
case "LeftPunch" :
case "RightPunch" :
case "RightPunchStill" :
_global.SoundCTRL.playSound("Danny_Punch", 100, 0);
return;
}
}
};
ObjPers.prototype.showCombo = function () {
with (this) {
nComboSequence++;
if (nComboSequence > 5) {
nComboSequence = 5;
}
_global.C.oScore.addCombo(nComboSequence);
_parent._parent.combo.gotoAndStop("Combo");
_parent._parent.combo._x = 110;
_parent._parent.combo._y = 60;
}
};
ObjPers.prototype.addToComboList = function (l_sNewAction, l_bManualAdd) {
with (this) {
var oCurrentAttack;
var oLastAttack;
var bComboContinue = false;
var l_sActionType = getActionType(l_sNewAction);
var nComboStep = aCurrentCombo.length;
var l_sNextAction;
if ((l_sNewAction != "Idle") || (aCurrentCombo[0].noIdle)) {
if ((l_sActionType != "Attack") || (l_bManualAdd)) {
oCurrentAttack = new Object();
if (l_sActionType == "Jump") {
l_sNewAction = l_sActionType;
}
if (nComboStep == 0) {
for (var i in aComboList) {
if ((Perso == aComboList[i][0].Perso) || (aComboList[i][0].Perso == "All")) {
if (aComboList[i][nComboStep].Action == l_sNewAction) {
if (aCurrentCombo.length == 0) {
oCurrentAttack.Action = l_sNewAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
aCurrentCombo[0].noIdle = aComboList[i][0].noIdle;
}
aComboSelected.push(aComboList[i]);
}
}
}
} else {
for (var i in aComboSelected) {
if ((aComboSelected[i][nComboStep].Action == l_sNewAction) && (checkDelay(nComboStep, aComboSelected[i]))) {
if (nComboStep == aCurrentCombo.length) {
oCurrentAttack.Action = l_sNewAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
trace("continue : " + aComboSelected[i][0].Name);
}
} else if ((((getActionType(aComboSelected[i][nComboStep].Action) == "Attack") && (l_sNewAction == "Attack")) && (checkHitSequence(nComboStep - 1, aComboSelected[i]))) && (checkDelay(nComboStep, aComboSelected[i]))) {
if (nComboStep == aCurrentCombo.length) {
l_sNextAction = aComboSelected[i][nComboStep].Action;
oCurrentAttack.Action = l_sNextAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
}
} else {
delete aComboSelected[i];
}
}
}
if ((!bComboContinue) && (aCurrentCombo.length > 0)) {
resetCombo();
addToComboList(l_sNewAction, false);
if (l_sNewAction == "Attack") {
}
}
return(l_sNextAction);
}
}
}
};
ObjPers.prototype.initRightPunch = function () {
with (this) {
Etat = "RightPunch";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
}
};
ObjPers.prototype.initLeftPunch = function () {
with (this) {
Etat = "LeftPunch";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
}
};
ObjPers.prototype.initRightPunchStill = function () {
with (this) {
nFrPunchStill = 15;
Etat = "RightPunchStill";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
nComboSequence = 0;
}
};
ObjPers.prototype.initHardFrontKick = function () {
with (this) {
Etat = "HardFrontKick";
}
};
ObjPers.prototype.initMegaChargedUppercut = function () {
with (this) {
Etat = "MegaChargedUppercut";
}
};
ObjPers.prototype.initLowKick = function () {
with (this) {
Etat = "LowKick";
}
};
ObjPers.prototype.initUppercut = function () {
with (this) {
Etat = "Uppercut";
}
};
ObjPers.prototype.initComboBlast = function () {
with (this) {
Etat = "ComboBlast";
}
};
ObjPers.prototype.initComboSpinPunch = function () {
with (this) {
Etat = "ComboSpinPunch";
}
};
ObjPers.prototype.initJumpKick = function () {
with (this) {
SpdYNow = -1;
if (Dir == "G") {
SpdXNow = SpdXNow - SpdXBaseJumpKick;
} else if (Dir == "D") {
SpdXNow = SpdXNow + SpdXBaseJumpKick;
}
nJumpKickPause = 0;
Etat = "JumpKick";
nComboSequence = 0;
}
};
ObjPers.prototype.initFreakControl = function () {
with (this) {
bFreak = true;
FrFreakCount = 0;
cDanny.setTransform(ctFreak);
nComboSequence = 0;
}
};
ObjPers.prototype.endFreak = function () {
with (this) {
bFreak = false;
_parent.Pers._visible = true;
cDanny.setTransform(ctOriginal);
}
};
ObjPers.prototype.CheckFall = function () {
with (this) {
if (SpdYNow >= SpdYFall) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.CheckDie = function () {
with (this) {
if ((oEnergyBar.getEnergy() <= 0) and (HitGrd == true)) {
CanBeHit = false;
InvincibleEnd();
_global.C.DesactivateHud();
_global.SoundCTRL.playSound("Danny_Die", 90, 0);
Etat = "Die";
nComboSequence = 0;
endFreak();
} else if (oEnergyBar.getEnergy() <= 0) {
Etat = "Hurt";
bSkipDie = true;
}
}
};
ObjPers.prototype.MovePers = function () {
with (this) {
MoveX = Math.round(MoveX);
FrontX = Math.round(FrontX);
BackX = Math.round(BackX);
if (((Dir == "G") && (MoveX < 0)) && ((FrontX + MoveX) < 50)) {
MoveX = 50 - FrontX;
} else if (((Dir == "D") && (MoveX < 0)) && ((BackX + MoveX) < 50)) {
MoveX = 50 - BackX;
} else if (((Dir == "D") && (MoveX > 0)) && ((FrontX + MoveX) > 550)) {
MoveX = 550 - FrontX;
} else if (((Dir == "G") && (MoveX > 0)) && ((BackX + MoveX) > 550)) {
MoveX = 550 - BackX;
}
PosX = _parent.Pers._x + MoveX;
_parent.Pers._x = PosX;
MoveX = 0;
PosY = _parent.Pers._y + MoveY;
_parent.Pers._y = PosY;
MoveY = 0;
}
};
ObjPers.prototype.SetPos = function (l_nX, l_nY) {
with (this) {
PosX = l_nX;
_parent.Pers._x = PosX;
MoveX = 0;
PosY = l_nY;
_parent.Pers._y = PosY;
MoveY = 0;
}
};
ObjPers.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
TopX = TrueX;
TopY = TrueY + _parent.Pers.Obj.HitTop._y;
FrontX = _parent.Pers.Obj.HitFront._x;
FrontY = TrueY + _parent.Pers.Obj.HitFront._y;
BottomFrontX = _parent.Pers.Obj.HitBottomFront._x;
BottomBackX = _parent.Pers.Obj.HitBottomBack._x;
BackX = _parent.Pers.Obj.HitBack._x;
if (Dir == "G") {
FrontX = TrueX - FrontX;
BottomFrontX = TrueX - BottomFrontX;
BottomBackX = TrueX - BottomBackX;
BackX = TrueX - BackX;
} else if (Dir == "D") {
FrontX = TrueX + FrontX;
BottomFrontX = TrueX + BottomFrontX;
BottomBackX = TrueX + BottomBackX;
BackX = TrueX + BackX;
}
}
};
ObjPers.prototype.CheckHitGrd = function (CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = TrueX;
CheckY = TrueY;
aCheckPoints = [CheckX, BottomFrontX, BottomBackX];
} else {
aCheckPoints = [CheckX];
}
for (var i in aCheckPoints) {
if (_parent.Collider.Sol.hitTest(aCheckPoints[i], CheckY + MaxSol, true) and (SpdYNow >= 0)) {
HitGrd = true;
HitGrdPoint = aCheckPoints[i];
break;
}
HitGrd = false;
HitGrdPoint = TrueX;
}
}
};
ObjPers.prototype.CheckSol = function (CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = HitGrdPoint;
CheckY = TrueY;
}
if (_parent.Collider.Sol.hitTest(CheckX, CheckY, true) and (SpdYNow >= 0)) {
SpdYNow = 0;
var InSol = true;
while (InSol == true) {
MoveY = MoveY - SolOut;
InSol = _parent.Collider.Sol.hitTest(CheckX, CheckY + MoveY, true);
}
} else if (SpdYNow >= 0) {
if (HitGrd == true) {
SpdYNow = 0;
MoveY = SpdYNow;
} else {
SpdYNow = SpdYNow + SpdYUp;
if (Etat == "JumpKick") {
SpdYNow = SpdYNow + 1;
}
if (SpdYNow > SpdYMax) {
SpdYNow = SpdYMax;
}
var SolHit1 = (SpdYNow / 3);
var SolHit2 = (SolHit1 * 2);
if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SolHit1, true)) {
MoveY = SolHitMin;
} else if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SolHit2, true)) {
MoveY = SolHit1;
} else if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SpdYNow, true)) {
MoveY = SolHit2;
} else {
MoveY = SpdYNow;
}
}
} else {
SpdYNow = SpdYNow + SpdYUp;
MoveY = SpdYNow;
}
if (MoveY > 0) {
DistYFall = DistYFall + MoveY;
}
}
};
ObjPers.prototype.setState = function (l_sNewState) {
with (this) {
EtatOld = Etat;
Etat = l_sNewState;
var nOldTransformFr = _parent.Pers.Obj.Transform._currentframe;
_parent.Pers.Obj.gotoAndStop(l_sNewState);
_parent.Pers.Obj.Etat.gotoAndPlay(1);
this.nFrTotalAnim = _parent.Pers.Obj.Etat._totalframes;
_parent.Pers.Obj.Transform.gotoAndStop(1);
if ((Etat == "Die") && (bSkipDie)) {
_parent.Pers.Obj.Etat.gotoAndPlay(9);
}
if ((nOldTransformFr < 15) && (nOldTransformFr > 5)) {
_parent.Pers.Obj.Transform.gotoAndPlay(nOldTransformFr);
}
nGetHitTop = -1 * _parent.Pers.Obj.HitTop._y;
addToComboList(Etat, false);
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.updatePerso = function () {
var nCurrentFrame;
with (this) {
nCurrentFrame = _parent.Pers.Obj.Etat._currentframe;
_parent.Pers.gotoAndStop((Perso + "_") + Dir);
_parent.Pers.Obj.Etat.gotoAndPlay(nCurrentFrame);
nGetHitLeft = -1 * _parent.Pers.Obj.HitBack._x;
nGetHitRight = _parent.Pers.Obj.HitFront._x;
nGetHitTop = -1 * _parent.Pers.Obj.HitTop._y;
ComboKick = 0;
mcHitGetHurt = _parent.Pers.Obj.HitGetHurt;
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent.Pers.gotoAndStop((Perso + "_") + Dir);
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.Actions = function () {
with (this) {
if (!bPause) {
FrCombo++;
SetTruePos();
InvincibleCheck();
Freakcheck();
this[Etat]();
CheckCharSwitch();
CheckHit();
}
}
};
ObjPers.prototype.Freakcheck = function () {
with (this) {
if (bFreak && (KeyListener)) {
FrFreakCount++;
if (FrFreakCount >= FrFreak) {
endFreak();
} else {
if ((FrFreakCount > (FrFreak - 20)) && ((FrFreakCount % 3) == 0)) {
_parent.Pers._visible = !_parent.Pers._visible;
}
l_bLeftValue = GlobalKeyListener.L;
l_bRightValue = GlobalKeyListener.R;
if (l_bRightValue) {
KeyListener.L = true;
} else {
KeyListener.L = false;
}
if (l_bLeftValue) {
KeyListener.R = true;
} else {
KeyListener.R = false;
}
}
}
}
};
ObjPers.prototype.CheckCharSwitch = function () {
with (this) {
if (KeyListener.Ghost && (bCanSwitch)) {
bCanSwitch = false;
CanHit = false;
FrSwitchCharacterCount = FrSwitchCharacter;
CharacterSwitch();
}
if (!bCanSwitch) {
bComboSwitch = true;
FrSwitchCharacterCount--;
if (FrSwitchCharacterCount == 0) {
bCanSwitch = true;
}
}
}
};
ObjPers.prototype.pause = function (l_bAnim) {
with (this) {
KeyListener = undefined;
if (l_bAnim) {
bPause = true;
_parent.Pers.Obj.Etat.stop();
for (var i in _parent.Pers.Obj.Etat) {
if (typeof(_parent.Pers.Obj.Etat[i]) == "movieclip") {
_parent.Pers.Obj.Etat[i].stop();
for (var j in _parent.Pers.Obj.Etat[i]) {
if (typeof(_parent.Pers.Obj.Etat[i][j]) == "movieclip") {
_parent.Pers.Obj.Etat[i][j].stop();
}
}
}
}
}
}
};
ObjPers.prototype.resume = function () {
with (this) {
bPause = false;
CanBeHit = true;
CanHit = false;
KeyListener = GlobalKeyListener;
if ((Etat != "Die") || (_parent.Pers.Obj.Etat._currentframe < nFrTotalAnim)) {
_parent.Pers.Obj.Etat.play();
}
for (var i in _parent.Pers.Obj.Etat) {
if (typeof(_parent.Pers.Obj.Etat[i]) == "movieclip") {
_parent.Pers.Obj.Etat[i].play();
for (var j in _parent.Pers.Obj.Etat[i]) {
if (typeof(_parent.Pers.Obj.Etat[i][j]) == "movieclip") {
_parent.Pers.Obj.Etat[i][j].play();
}
}
}
}
}
};
ObjPers.prototype.CheckHit = function () {
with (this) {
if (KeyListener.X && (CanBeHit)) {
this.GetHit();
}
}
};
this.cnt = 0;
this.G_Pause = true;
this.G_PauseOut = false;
this.G_PRealese = true;
this.G_Resume = false;
switchDelay = 30;
this.G_TabGWT = new Array();
this.G_TabBox = new Array();
this.G_TabGun = new Array();
this.G_TabSwitch = new Array();
this.G_TabDoor = new Array();
this.G_TabHeroChanger = new Array();
this.G_TabElevator = new Array();
this.G_TabPersBall = new Array();
this.G_TabMinionBall = new Array();
this.G_TabLifeBonus = new Array();
this.G_TabCam = new Array();
this.G_TabLevier = new Array();
this.G_TabTV = new Array();
this.G_NextPersBall = 1;
this.G_NextPersBallDepth = 10;
this.G_NextMinionBall = 1;
this.G_NextMinionBallDepth = 20;
this.bossSequence = false;
AsBroadcaster.initialize(this);
this.easterEggCount = 0;
ffa.DialogData.init();
this.oDialog = new ffa.DialogManager(_parent._parent.captions);
this.oOverlays = new ffa.OverlaysManager(_parent._parent.overlays);
this.bEasterEgg = false;
this.oTimer = new ffa.Timer(_parent._parent.hud.timer);
_global.C.oScore.init(_parent._parent.hud.score);
_global.C.oScore.resetLevel(nLevel);
this.sLevelState = "";
this.LifeBonusTaken = false;
this.onPlayerDie = function () {
this.resumeLevel();
this.broadcastMessage("pause", true);
};
this.initLevel = function () {
this.Pers.PosXAuto = 100;
this.Pers.Dir = "D";
this.Pers.Etat = "RunAuto";
this.Pers.addListener(this);
this.BG.addListener(this);
this.oOverlays.addListener(this);
this.sLevelState = "init";
this._parent._visible = true;
ship.ShipDatas.init();
this.CreerEasterEgg(_parent.missedShot, _parent.Parallax.easterEgg);
};
this.resumeLevel = function () {
if (this.Pers.oLifeBar.getEnergy() > 0) {
oDialog.hide(false);
oOverlays.setState("Sleep");
this._parent._visible = false;
this.Pers.Etat = "Sleep";
this.nFrameActionDelay = 15;
this.doOnNextFrame = function () {
this.nFrameActionDelay--;
trace("nFrameActionDelay: " + nFrameActionDelay);
if (nFrameActionDelay <= 0) {
_global.C.ActivateHud();
this.BG.goto({type:"group", group:this.BG.currentScreenGroupNum + 1}, this.bossSequence);
this.sLevelState = "ResumeLevel";
this.Pers.resurrect();
this.doOnNextFrame = undefined;
}
};
this.BG.resetAllScreenGroup();
} else {
_global.C.endGame("lose");
_parent._parent.gotoAndStop("BadEnding");
}
};
this.resumeLevelReady = function () {
this._parent._visible = true;
this.sLevelState = "Game";
if (this.bossSequence) {
switch (nLevel) {
case 1 :
this.Lydia.reInit();
this.broadcastMessage("KillAllGWT");
this.sLevelState = "Boss";
break;
case 2 :
break;
case 3 :
this.Freakshow.reInit();
}
}
};
this.runAutoComplete = function () {
var _local3;
switch (this.sLevelState) {
case "init" :
_local3 = ffa.DialogData.getDialog(nLevel, "1_init");
this.oDialog.startDialog(_local3[0], true);
var _local2 = 1;
while (_local2 < _local3.length) {
this.oDialog.queueDialog(_local3[_local2]);
_local2++;
}
break;
case "Complete" :
break;
case "CollectGem" :
break;
}
};
this.BossSequenceEnd = function () {
var _local2;
switch (nLevel) {
case 1 :
_local2 = ffa.DialogData.getDialog(nLevel, "Lydia_dropGem");
this.oDialog.startDialog(_local2[0]);
var _local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "CollectGem";
break;
case 2 :
_local2 = ffa.DialogData.getDialog(nLevel, "SpaceShuttle_dropGem");
this.oDialog.startDialog(_local2[0]);
_local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "CollectGem";
break;
case 3 :
if (this.sLevelState == "EndLevel") {
break;
}
_local2 = ffa.DialogData.getDialog(nLevel, "Freakshow_lost");
this.oDialog.startDialog(_local2[0]);
_local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "EndLevel";
}
};
this.CameraSkip = function () {
this.Pers.SetPos(this.BG.nInvertedPosX + 100, 0);
};
this.bSpaceSkip = false;
this.switchControlMode = function (l_sNewMode) {
if (l_sNewMode == "Game") {
this.KeyListener = GlobalKeyListener;
this.bSpaceSkip = false;
_parent._parent.menu.gotoAndStop("Idle");
} else if (l_sNewMode == "Dialog") {
_parent._parent.menu.gotoAndStop("Disable");
this.bSpaceSkip = true;
} else {
_parent._parent.menu.gotoAndStop("Disable");
this.KeyListener = undefined;
this.bSpaceSkip = false;
}
};
nADSD = 0;
nGWT = 0;
this.Creer_O1a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 100);
if (l_mcElement.bTop) {
l_mcElement.gotoAndStop(3);
}
CreerObstacle(pt, 80, 100);
}
};
this.Creer_O1b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 100);
CreerObstacle(pt, 240, 100);
}
};
this.Creer_O2a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 180);
CreerObstacle(pt, 80, 180);
}
};
this.Creer_O2b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 180);
CreerObstacle(pt, 240, 180);
}
};
this.Creer_O3b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 260);
CreerObstacle(pt, 240, 260);
}
};
this.Creer_P2a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 80);
}
};
this.Creer_P2b = function (l_mcElement, l_nPosX, l_nPosY) {
var nRandomItem;
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 240);
if (l_mcElement._name != undefined) {
nRandomItem = Number(l_mcElement._name) + 1;
l_mcElement.gotoAndStop(nRandomItem);
}
}
};
this.Creer_P2c = function (l_mcElement) {
with (this) {
l_mcElement._y = l_mcElement._y - 20;
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 80);
}
};
this.Creer_P3a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 240);
CreerPlateforme(pt, 80);
}
};
this.Creer_P3b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 240);
CreerPlateforme(pt, 240);
}
};
this.Creer_P4a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 320);
CreerPlateforme(pt, 80);
}
};
this.Creer_P4b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 320);
CreerPlateforme(pt, 260);
if (l_mcElement._name != undefined) {
nRandomItem = Number(l_mcElement._name) + 1;
l_mcElement.gotoAndStop(nRandomItem);
}
}
};
this.Creer_ADSD1 = function (l_mcElement, l_bAlwaysActive, l_sType) {
with (this) {
var l_oADSD;
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
l_oADSD = new ffa.devices.ADSD(nADSD, _parent.ADSD, pt, l_sType, !l_bAlwaysActive, BG, Pers, 15, 60);
nADSD++;
oScreen.registerADSD(l_oADSD);
}
}
};
this.Creer_ADSD2 = function (l_mcElement, l_bAlwaysActive, l_sType) {
with (this) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
l_oADSD = new ffa.devices.ADSD(nADSD, _parent.ADSD, pt, l_sType, !l_bAlwaysActive, BG, Pers, 27, 95);
nADSD++;
oScreen.registerADSD(l_oADSD);
}
};
this.Creer_GWT = function (l_mcElement, l_sType) {
var oScreen;
var l_sDepth;
with (this) {
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
oScreen.registerGWT(pt);
}
}
};
this.Creer_Tatoo = function (l_mcElement, l_sType) {
var oScreen;
var l_sDepth;
with (this) {
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
l_oTatoo = new ffa.ennemy.Tatoo(_parent.Tatoo, pt, BG, Pers, _parent.Collider, oScreen, false);
oScreen.registerTatoo(l_oTatoo);
}
}
};
this.CreerLydia = function (l_mcElement) {
this.Lydia = new ffa.boss.Lydia(l_mcElement, {x:11850, y:560}, this.BG, this.Pers, _parent.Collider);
};
this.CreerShuttle = function (l_mcElementFront, l_mcElementParallax) {
this.Shuttle = new ffa.boss.SpaceShuttle(l_mcElementFront, l_mcElementParallax, {x:30000, y:450}, this.BG, this.Pers, _parent.Collider);
};
this.CreerEasterEgg = function (l_mcElementFront, l_mcElementParallax) {
this.EasterEgg = new ffa.EasterEgg(l_mcElementFront, l_mcElementParallax, {x:30000, y:450}, this.BG, this.Pers, _parent.Collider);
};
this.CreerFreakShow = function (l_mcElement) {
this.Freakshow = new ffa.boss.Freakshow(l_mcElement, {x:0, y:0}, this.BG, this.Pers, _parent.Collider);
};
this.CreerObstacle = function (pt, l_nWidth, l_nHeight) {
var _local3 = _parent.Collider.Wall;
var _local4 = _parent.Collider.Sol;
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
_local4.moveTo(pt.x, pt.y);
_local4.beginFill(16711935);
_local4.lineTo(pt.x, pt.y + 30);
_local4.lineTo(pt.x + l_nWidth, pt.y + 30);
_local4.lineTo(pt.x + l_nWidth, pt.y);
_local4.lineTo(pt.x, pt.y);
_local3.moveTo(pt.x, pt.y);
_local3.beginFill(16711680);
_local3.lineTo(pt.x, pt.y + l_nHeight);
_local3.lineTo(pt.x + l_nWidth, pt.y + l_nHeight);
_local3.lineTo(pt.x + l_nWidth, pt.y);
_local3.lineTo(pt.x, pt.y);
};
this.CreerPlateforme = function (pt, l_nWidth) {
var _local3 = _parent.Collider.Sol;
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
_local3.moveTo(pt.x, pt.y);
_local3.beginFill(16711935);
_local3.lineTo(pt.x, pt.y + 30);
_local3.lineTo(pt.x + l_nWidth, pt.y + 30);
_local3.lineTo(pt.x + l_nWidth, pt.y);
_local3.lineTo(pt.x, pt.y);
};
this.addDialog = function (l_mcElement, l_sDialog, l_sCharacter, l_sFace) {
var _local2 = this.BG.nextScreenGroup.getScreen(l_mcElement._name);
_local2.addDialog({content:l_sDialog, character:l_sCharacter, face:l_sFace}, this.oDialog);
};
this.addBeatThemUp = function (l_mcElement, l_sDialog, l_sCharacter, l_sFace) {
var _local2 = this.BG.nextScreenGroup.getScreen(l_mcElement._name);
_local2.addBeatThemUp();
};
this.replaceTile = function (l_mcElement) {
var _local2 = l_mcElement._name;
var _local4;
var _local5 = Math.round(l_mcElement._x / nTileDistance);
var nTileDistance = 599;
var _local6;
if (_local2.indexOf("_alt") != -1) {
_local4 = _local2.indexOf("_alt");
l_mcElement._x = (Number(_local2.slice(0, _local4)) - 1) * nTileDistance;
l_mcElement._y = nTileDistance;
} else {
l_mcElement._x = (Number(_local2) - 1) * nTileDistance;
l_mcElement._y = nTileDistance;
}
if (BG.currentScreenGroup.checkReady(_local2) && ((this.sLevelState == "") || (this.sLevelState == "ResumeLevel"))) {
if (this.sLevelState == "") {
this.initLevel();
} else if (this.sLevelState == "ResumeLevel") {
this.resumeLevelReady();
}
trace("ready! go!");
}
};
this.CreerFloor1 = function (l_mcElement, l_bBeatThemUp) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement, l_bBeatThemUp);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 600, pt.y + 40);
mcGround.lineTo(pt.x + 600, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor2a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor2b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + 200;
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor2c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + 300;
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor3a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor3b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y);
mcGround.lineTo(pt.x, pt.y);
pt.x = pt.x + 400;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor3c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y);
mcGround.lineTo(pt.x, pt.y);
pt.x = pt.x + 440;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor4a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor4b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor4c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor5 = function (l_mcElement) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
}
};
this.FirstAidKit = function (l_oScreen) {
var _local3 = new ffa.EnergyBonus("FirstAidKit", {x:(l_oScreen.__get__id() * 600) - 150, y:300}, _parent, this.BG, this.Pers, _parent.Collider);
l_oScreen.addBonus(_local3);
};
this.LifeBonus = function (l_oScreen, l_oRule) {
if (!this.LifeBonusTaken) {
var _local3 = new ffa.EnergyBonus("Life", {x:(l_oScreen.__get__id() * 600) - 200, y:l_oRule.y}, _parent, this.BG, this.Pers, _parent.Collider);
_local3.resume();
l_oScreen.addBonus(_local3);
}
};
this.doAfterDialog = function () {
switch (this.sLevelState) {
case "init" :
if (nLevel == 1) {
this.switchControlMode("Game");
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
} else if (nLevel == 2) {
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
} else if (nLevel == 3) {
this.switchControlMode("Pause");
this.Freakshow.initFirstAppear();
this.Freakshow.addListener(this);
}
break;
case "levelStart" :
trace("Wait for level start!");
break;
case "talk" :
this.Freakshow.initFirstDisappear();
break;
case "ready" :
this.oOverlays.setState("Level" + this.nLevel);
break;
case "Complete" :
break;
case "Boss" :
this.switchControlMode("Pause");
break;
case "CollectGem" :
_global.Gem.destroy();
this.switchControlMode("Pause");
l_aDialog = ffa.DialogData.getDialog(nLevel, "boss_end");
this.oDialog.startDialog(l_aDialog[0]);
var _local3 = 1;
while (_local3 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local3]);
_local3++;
}
this.sLevelState = "EndLevel";
break;
case "EndLevel" :
endLevel();
break;
default :
if (this.BG.bLoading) {
break;
}
this.broadcastMessage("resume");
this.switchControlMode("Game");
}
};
this.endLevel = function () {
this.broadcastMessage("pause", true);
_parent._parent.hud.gotoAndStop("Off");
_parent._parent.menu.gotoAndStop("Off");
_global.C.oScore.setTimeElapsed(_global.Game.oTimer.timeElapsed);
_global.C.oScore.setLifeRemaining(this.Pers.oLifeBar.getEnergy(), this.Pers.oEnergyBar.getEnergy());
_parent._parent.levelStats.gotoAndStop("Level" + nLevel);
_global.C.oScore.showStats(_parent._parent.levelStats);
};
this.LevelStartOverlays = function (l_oScreen, l_oRule) {
this.sLevelState = "levelStart";
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
this.screenToNotify = l_oScreen;
};
this.FreakshowWarpedIn = function () {
switch (this.sLevelState) {
case "init" :
l_aDialog = ffa.DialogData.getDialog(nLevel, "1_mid");
this.oDialog.startDialog(l_aDialog[0]);
var _local2 = 1;
while (_local2 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local2]);
_local2++;
}
this.sLevelState = "talk";
break;
default :
}
};
this.FreakshowAttack = function () {
this.Freakshow.initShot("Pink");
};
this.FreakshowTakeGem = function () {
this.Freakshow.initTakeGem();
};
this.FreakshowInitCombatPos = function () {
this.Freakshow.initCombatPos();
};
this.FreakshowWarpedOut = function () {
switch (this.sLevelState) {
case "talk" :
l_aDialog = ffa.DialogData.getDialog(nLevel, "1_end");
this.oDialog.startDialog(l_aDialog[0]);
var _local2 = 1;
while (_local2 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local2]);
_local2++;
}
this.sLevelState = "ready";
break;
default :
}
};
this.onFreakshowTookGem = function () {
trace("RunAuto");
this.Pers.PosXAuto = this.FreakShow.nPosX - 200;
this.Pers.Dir = "D";
this.Pers.Etat = "RunAuto";
};
this.initBossFight = function () {
this.sLevelState = "Boss";
};
this.startLydiaFight = function () {
this.oOverlays.setState("Lydia");
this.bossSequence = true;
};
this.HideHint = function () {
_parent._parent.LydiaHint.gotoAndStop(2);
};
this.startShuttleFight = function () {
this.oOverlays.setState("Shuttle");
};
this.startFreakshowFight = function () {
this.oOverlays.setState("Freakshow");
this.bossSequence = true;
};
this.LockDannyAndCrouch = function () {
this.Pers.initAutoCrouch();
this.Shuttle.prepareCrash();
};
this.SpaceShuttleCrash = function () {
this.Shuttle.prepareCrash();
this.KeyListener = undefined;
};
this.SpaceShuttleInit = function () {
l_mcShuttleFront = _parent.GWT.attachMovie("Shuttle", "Shuttle", 100);
l_mcShuttleParallax = _parent.Parallax.attachMovie("Shuttle", "Shuttle", 100, {_xscale:25, _yscale:25});
this.CreerShuttle(l_mcShuttleFront, l_mcShuttleParallax);
};
this.SpaceShuttlePassBackground = function () {
this.Shuttle.initParallaxPass("Up");
this.sLevelState = "Boss";
this.switchControlMode("Pause");
this.broadcastMessage("pause");
};
this.SpaceShuttlePassFront = function () {
this.Shuttle.initFrontPass();
};
this.LydiaComplete = function () {
_parent._parent.LydiaHint.gotoAndStop(3);
trace("_parent.LydiaHint: " + _parent._parent.LydiaHint);
this.switchControlMode("Game");
this.broadcastMessage("resume");
};
this.ShuttleComplete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.Pers.Etat = "Idle";
};
this.FreakshowComplete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.Pers.Etat = "Idle";
this.Freakshow.initCombat();
};
this.Level1Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.Level2Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.Level3Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.BeatThemUpComplete = function () {
_parent._parent.missedShot.gotoAndPlay("Shoot");
};
this.onGWTDie = function (nOrder, bAddPoint) {
if (bAddPoint) {
_global.C.oScore.addEnnemyBeated(1);
}
};
this.onTatooDie = function () {
_global.C.oScore.addEnnemyBeated(1);
};
this.destroyAll = function () {
this.broadcastMessage("destroy");
};
}
onClipEvent (enterFrame) {
if (this.doOnNextFrame) {
this.doOnNextFrame();
}
if (!this.Pers.bPause) {
if (this.bSpaceSkip) {
oDialog.updateTimeDelay();
if (GlobalKeyListener.Next && (oDialog.timeDelay <= 0)) {
if (!oDialog.nextQueue()) {
doAfterDialog();
}
}
}
if (Pers.Dir != Pers.DirOld) {
Pers.ChangeDir(Pers.Dir);
}
if (Pers.Etat != Pers.EtatOld) {
Pers.setState(Pers.Etat);
}
this.Pers.Actions();
this.BG.actions();
} else if (this.Pers.bPause && (this.BG.bLoading)) {
trace("loading?");
this.BG.actions();
}
if ((GlobalKeyListener.EasterEgg && (this.bEasterEgg)) && (this.bEasterEggRelease)) {
_global.Game.EasterEgg.initPass();
} else if (GlobalKeyListener.EasterEgg && (!bEasterEgg)) {
this.bEasterEgg = true;
this.bEasterEggRelease = false;
this.easterEggCount = 0;
} else if (bEasterEgg) {
if (this.easterEggCount < 15) {
this.easterEggCount++;
} else {
this.bEasterEgg = false;
}
if (!GlobalKeyListener.EasterEgg) {
this.bEasterEggRelease = true;
}
}
}
Instance of Symbol 1684 MovieClip "Pers" in Symbol 2041 MovieClip Frame 1
onClipEvent (load) {
_parent.Control.CreerPers(this._x, this._y);
this.gotoAndStop("D");
_global.Game.Pers.Etat = "Sleep";
_global.Game.Pers.setState("Idle");
}
Symbol 2041 MovieClip Frame 2
stop();
_global.C.beginLevel();
Instance of Symbol 1944 MovieClip "Bg" in Symbol 2041 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.BG = new ffa.background.MainScroller(_parent.Bg, _parent._x, _parent._y, _parent.Control.Pers);
_parent.Control.BG.resetAllScreen();
var l_oGroup;
l_oGroup = new ffa.background.ScreenGroup("LEVEL 1 - GROUP 1", "Normal");
l_oGroup.init(1, 10, 600, 640);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:0, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"Dialog", min:25, max:125, screen:4, level:1}, "PauseForDialog");
l_oGroup.addSpecialRule({type:"Dialog", min:300, max:400, screen:6, level:1}, "PauseForDialog");
l_oGroup.addSpecialRule({type:"Dialog", min:50, max:100, screen:7, level:1}, "PauseForDialog");
l_oGroup.addSpecialRule({type:"LockCamera", min:150, max:250, screen:10, level:1, lockedScreen:10});
l_oGroup.addSpecialRule({type:"Dialog", screen:10, level:1}, "PauseForDialog");
l_oGroup.addSpecialRule({type:"FirstFight", screen:10, level:1});
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 1 - GROUP 2", "Normal");
l_oGroup.init(10, 20, 600, 640);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:0, max:50, screen:20, level:1, lockedScreen:20});
l_oGroup.addSpecialRule({type:"Dialog", min:190, max:300, screen:20, level:1});
l_oGroup.addSpecialRule({type:"LydiaFlees", screen:20, level:1});
l_oGroup.addSpecialRule({type:"BeatThemUp", min:0, max:400, screen:20, level:1});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:20, level:1});
l_oGroup.addBeatThemUpRule({type:"GWT", min:3, max:3, screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"], screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"depth", min:0, max:0, depth:"Parallax", screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"simultaneous", min:1, max:1, screen:20}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 1 - GROUP 3", "Normal");
l_oGroup.init(20, 37, 600, 640);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:2}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:150, max:200, screen:37, level:1, lockedScreen:37});
l_oGroup.addSpecialRule({type:"Dialog", min:0, max:50, screen:37, level:1});
l_oGroup.addSpecialRule({type:"LydiaFlees", screen:37, level:1});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:37, level:1});
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 1 - GROUP 4", "Normal");
l_oGroup.init(37, 50, 600, 640);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:2}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LifeBonus", min:150, max:250, y:0, screen:44, level:1});
l_oGroup.addSpecialRule({type:"LockCamera", min:150, max:200, screen:47, level:1, lockedScreen:47});
l_oGroup.addSpecialRule({type:"Dialog", min:150, max:200, screen:47, level:1});
l_oGroup.addSpecialRule({type:"LydiaFlees", screen:47, level:1});
l_oGroup.addSpecialRule({type:"LydiaHides", screen:47, level:1});
l_oGroup.addSpecialRule({type:"UnlockCamera", screen:47, level:1});
l_oGroup.addSpecialRule({type:"LockCamera", min:100, max:150, screen:50, level:1, lockedScreen:50});
l_oGroup.addSpecialRule({type:"BeatThemUp", min:0, max:400, screen:50, level:1});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:50, level:1});
l_oGroup.addBeatThemUpRule({type:"GWT", min:4, max:4, screen:50}, "GWT");
l_oGroup.addBeatThemUpRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"], screen:50}, "GWT");
l_oGroup.addBeatThemUpRule({type:"depth", min:0, max:4, depth:"Parallax", screen:50}, "GWT");
l_oGroup.addBeatThemUpRule({type:"simultaneous", min:1, max:1, screen:50}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 1 - GROUP 5", "BOSS");
l_oGroup.init(50, 51, 600, 640);
l_oGroup.addEnnemyRule({type:"GWT", min:0, max:0}, "GWT");
l_oGroup.addSpecialRule({type:"LydiaPrepareCombat", screen:51, level:1});
l_oGroup.addSpecialRule({type:"initBossFight", min:150, max:200, screen:51, level:1});
l_oGroup.addSpecialRule({type:"LockCamera", min:0, max:50, screen:51, level:1, lockedScreen:51});
l_oGroup.addSpecialRule({type:"Dialog", min:150, max:200, screen:51, level:1});
l_oGroup.addSpecialRule({type:"LydiaUncloak", screen:51, level:1});
l_oGroup.addSpecialRule({type:"LydiaMoveToTop", screen:51, level:1});
l_oGroup.addSpecialRule({type:"startLydiaFight", screen:51, level:1});
l_oGroup.addSpecialRule({type:"Wait", screen:51, level:1});
l_oGroup.addSpecialRule({type:"BossSequenceEnd", screen:51, level:1});
_parent.Control.BG.addScreenGroup(l_oGroup);
_parent.Control.BG.activateScreenGroup();
}
Instance of Symbol 2026 MovieClip in Symbol 2041 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerLydia(this);
}
Instance of Symbol 2040 MovieClip "Collider" in Symbol 2041 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
}
Symbol 2051 MovieClip Frame 1
stop();
Symbol 2052 MovieClip Frame 1
stop();
Symbol 2053 MovieClip Frame 1
stop();
Symbol 2056 MovieClip Frame 1
gotoAndStop ("Idle");
Symbol 2056 MovieClip Frame 9
stop();
Symbol 2057 MovieClip Frame 1
stop();
Symbol 2060 Button
on (release) {
_global.C.openMenu();
}
Symbol 2067 Button
on (release) {
_global.C.showHelp(true);
}
Symbol 2069 Button
on (release) {
_global.C.quitConfirm();
}
Symbol 2073 MovieClip Frame 1
stop();
Symbol 2074 Button
on (release) {
_global.C.mute();
}
Symbol 2075 Button
on (release) {
_global.C.unmute();
}
Symbol 2076 MovieClip Frame 1
if (!_global.C.SoundActive) {
gotoAndStop (2);
}
stop();
Symbol 2085 Button
on (release) {
_global.C.closeMenu();
}
Symbol 2087 MovieClip Frame 1
stop();
Symbol 2087 MovieClip Frame 22
stop();
Symbol 2087 MovieClip Frame 40
gotoAndStop ("Idle");
Symbol 2092 MovieClip Frame 2
stop();
Symbol 2094 MovieClip Frame 1
disable.enabled = false;
Symbol 2098 MovieClip Frame 2
var i = 1;
while (i < 10) {
bitmap_00.duplicateMovieClip("bitmap_" + i, i, {_x:i * 2399});
i++;
}
stop();
Symbol 2105 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P4b(this, this._x, this._y);
stop();
Symbol 2117 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P4a(this, this._x, this._y);
stop();
Symbol 2119 MovieClip Frame 1
stop();
Symbol 2119 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2119 MovieClip Frame 3
stop();
Symbol 2121 MovieClip Frame 1
stop();
Symbol 2121 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2121 MovieClip Frame 3
stop();
Symbol 2126 MovieClip Frame 1
stop();
Symbol 2126 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2126 MovieClip Frame 3
stop();
Symbol 2133 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O1a(this, this._x, this._y);
stop();
Symbol 2133 MovieClip Frame 3
_parent._parent._parent.Control.Creer_O1a(this, this._x, this._y);
stop();
Symbol 2135 MovieClip Frame 1
stop();
Instance of Symbol 2133 MovieClip in Symbol 2135 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 2135 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2135 MovieClip Frame 3
stop();
Symbol 2139 MovieClip Frame 1
stop();
Symbol 2139 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2139 MovieClip Frame 3
stop();
Symbol 2144 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2c(this);
stop();
Symbol 2149 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P3a(this, this._x, this._y);
stop();
Symbol 2151 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2a(this, this._x, this._y);
stop();
Symbol 2154 MovieClip Frame 1
_parent._parent._parent.Control.Creer_Tatoo(this);
Symbol 2154 MovieClip Frame 2
stop();
Symbol 2156 MovieClip Frame 1
stop();
Symbol 2156 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, false);
stop();
Symbol 2156 MovieClip Frame 3
stop();
Symbol 2165 MovieClip Frame 1
stop();
Symbol 2165 MovieClip Frame 2
_parent._parent.Control.CreerFloor3b(this);
stop();
Symbol 2165 MovieClip Frame 3
stop();
Symbol 2167 MovieClip Frame 1
stop();
Symbol 2167 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 2167 MovieClip Frame 3
stop();
Symbol 2176 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O1b(this, this._x, this._y);
stop();
Symbol 2178 MovieClip Frame 1
stop();
Symbol 2178 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 2178 MovieClip Frame 3
stop();
Symbol 2188 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O2b(this, this._x, this._y);
stop();
Symbol 2190 MovieClip Frame 1
stop();
Symbol 2190 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2190 MovieClip Frame 3
stop();
Symbol 2196 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2b(this);
stop();
Symbol 2198 MovieClip Frame 1
stop();
Symbol 2198 MovieClip Frame 2
_parent._parent.Control.CreerFloor3b(this, this._x, this._y);
stop();
Symbol 2198 MovieClip Frame 3
stop();
Symbol 2220 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O3b(this);
stop();
Symbol 2222 MovieClip Frame 1
stop();
Symbol 2222 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, false);
stop();
Symbol 2222 MovieClip Frame 3
stop();
Symbol 2224 MovieClip Frame 1
stop();
Symbol 2224 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2224 MovieClip Frame 3
stop();
Symbol 2226 MovieClip Frame 1
stop();
Symbol 2226 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2226 MovieClip Frame 3
stop();
Symbol 2228 MovieClip Frame 1
stop();
Symbol 2228 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2228 MovieClip Frame 3
stop();
Symbol 2230 MovieClip Frame 1
stop();
Symbol 2230 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2230 MovieClip Frame 3
stop();
Symbol 2235 MovieClip Frame 1
stop();
Symbol 2235 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, true);
stop();
Symbol 2235 MovieClip Frame 3
stop();
Symbol 2237 MovieClip Frame 1
stop();
Symbol 2237 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2237 MovieClip Frame 3
stop();
Symbol 2239 MovieClip Frame 1
stop();
Symbol 2239 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2239 MovieClip Frame 3
stop();
Symbol 2246 MovieClip Frame 1
stop();
Symbol 2246 MovieClip Frame 2
_parent._parent.Control.CreerFloor3c(this);
stop();
Symbol 2246 MovieClip Frame 3
stop();
Symbol 2248 MovieClip Frame 1
stop();
Symbol 2248 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2248 MovieClip Frame 3
stop();
Symbol 2250 MovieClip Frame 1
stop();
Symbol 2250 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 2250 MovieClip Frame 3
stop();
Symbol 2252 MovieClip Frame 1
stop();
Symbol 2252 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2252 MovieClip Frame 3
stop();
Symbol 2254 MovieClip Frame 1
stop();
Symbol 2254 MovieClip Frame 2
_parent._parent.Control.CreerFloor4a(this, this._x, this._y);
stop();
Symbol 2254 MovieClip Frame 3
stop();
Symbol 2256 MovieClip Frame 1
stop();
Symbol 2256 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2256 MovieClip Frame 3
stop();
Symbol 2258 MovieClip Frame 1
stop();
Symbol 2258 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2258 MovieClip Frame 3
stop();
Symbol 2260 MovieClip Frame 1
stop();
Symbol 2260 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 2260 MovieClip Frame 3
stop();
Symbol 2262 MovieClip Frame 1
stop();
Symbol 2262 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2262 MovieClip Frame 3
stop();
Symbol 2264 MovieClip Frame 1
stop();
Symbol 2264 MovieClip Frame 2
_parent._parent.Control.CreerFloor3c(this, this._x, this._y);
stop();
Symbol 2264 MovieClip Frame 3
stop();
Symbol 2266 MovieClip Frame 1
stop();
Symbol 2266 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, false);
stop();
Symbol 2266 MovieClip Frame 3
stop();
Symbol 2268 MovieClip Frame 1
stop();
Symbol 2268 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2268 MovieClip Frame 3
stop();
Symbol 2273 MovieClip Frame 1
stop();
Symbol 2273 MovieClip Frame 2
_parent._parent.Control.CreerFloor4c(this);
stop();
Symbol 2273 MovieClip Frame 3
stop();
Symbol 2275 MovieClip Frame 1
stop();
Symbol 2275 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 2275 MovieClip Frame 3
stop();
Symbol 2277 MovieClip Frame 1
stop();
Symbol 2277 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2277 MovieClip Frame 3
stop();
Symbol 2281 MovieClip Frame 1
stop();
Symbol 2281 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2281 MovieClip Frame 3
stop();
Symbol 2282 MovieClip Frame 2
stop();
Instance of Symbol 1387 MovieClip "Control" in Symbol 2283 MovieClip Frame 1
onClipEvent (load) {
function ObjPers(PosX, PosY) {
AsBroadcaster.initialize(this);
this.oEnergyBar = new ffa.Bar();
this.oLifeBar = new ffa.Bar();
this.nGetHitLeft = 0;
this.nGetHitRight = 0;
this.nGetHitTop = 0;
this.aCurrentCombo = new Array();
this.Nom = "Pers";
this.Etat = "Idle";
this.EtatOld = "Idle";
this.Dir = "D";
this.DirOld = "D";
this.Point = _global.C.Score;
this.Life = _global.C.Life;
this.SpdXMinion = 3;
this.SpdXNormal = 15;
this.SpdXBase = this.SpdXNormal;
this.SpdXNow = 0;
this.MoveX = 0;
this.MoveY = 0;
this.PosX = PosX;
this.PosY = PosY;
this.PosXAuto = 0;
this.TrueX = PosX;
this.TrueY = PosY;
this.FrontX = 0;
this.FrontY = 0;
this.BottomFrontX = 0;
this.BottomBackX = 0;
this.BackX = 0;
this.HitGrdPoint = 0;
this.WallHitBloc = 2;
this.SpdYNow = 0;
this.SpdYUp = 1.5;
this.SpdYMax = 30;
this.SpdYFall = 2;
this.SpdXHitBase = 5;
this.SpdYHitBase = -10;
this.SpdStartJump = -17;
this.SolOut = 2;
this.SolHitMin = 5;
this.MaxSol = 3;
this.HitGrd = false;
this.SolForJump = 6;
this.DistYFall = 0;
this.DistYLand = 100;
this.CanHit = false;
this.CanBeHit = true;
this.FrWalkNow = 1;
this.InPause = false;
this.FrJump = 1;
this.FrFall = 14;
this.FrLand = 15;
this.FrGetHit = 10;
this.FrGetHitCount = 0;
this.FrBoomTir = 9;
this.FrFinBoom = 6;
this.FrDead = 140;
this.FrDeadCount = 0;
this.aCharacter = ["Danny", "Daniel"];
this.ICharacter = 1;
this.Perso = this.aCharacter[this.ICharacter];
this.updatePerso();
this.LgGetShootX = 20;
this.LgGetShootUp = 72;
this.LgGetShootUpBas = 44;
this.FrInvincibleCount = 0;
this.FrInvincible = 60;
this.Invincible = false;
this.FrSwitchCharacter = 15;
this.FrSwitchCharacterCount = 0;
this.nFrCanDoubleJump = 5;
this.nFrCanDoubleJumpCount = 0;
this.bCanSwitch = true;
this.nHitCombo = 0;
this.bJumpRelease = true;
this.SpdXBaseJumpKick = 20;
this.bComboCheck = false;
this.nFrDelayCombo = 15;
this.nFrDelayComboCount = 0;
this.bCanAttack = true;
this.bAttackRelease = true;
this.bSkipDie = false;
this.mcHitGetHurt = null;
this.HitPointX = 0;
this.HitPointY = 0;
this.BASE_DELAY = 15;
BASE_DELAY = this.BASE_DELAY;
this.NO_DELAY = -1;
NO_DELAY = this.NO_DELAY;
this.nComboSequence = 0;
this.aComboList = new Array();
var _local4;
var _local20;
this.bPause = false;
this.bFreak = false;
this.cDanny = new Color(_parent.Pers);
this.ctOriginal = this.cDanny.getTransform();
this.ctFreak = {ra:50, rb:128, ga:50, gb:51, ba:50, bb:128, aa:100, ab:0};
this.FrFreak = 300;
this.FrFreakCount = 0;
_local4 = new Array({Action:"RightPunch", Hit:false, Perso:"All", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"Punch"}, {Action:"LeftPunch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"RightPunchStill", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielSpinPunch = new Array({Action:"RightPunch", Hit:true, Perso:"Danny", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"SpinPunch"}, {Action:"SwitchDaniel", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"ComboSpinPunch", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielHardFrontKick = new Array({Action:"RightPunch", Hit:true, Perso:"Daniel", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"HardFrontKick"}, {Action:"LeftPunch", Hit:true, MaxFrameDelay:BASE_DELAY}, {Action:"Crouch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"HardFrontKick", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielMegaChargedUppercut = new Array({Action:"RightPunch", Hit:true, Perso:"Danny", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"MegaChargedUppercut"}, {Action:"LeftPunch", Hit:true, MaxFrameDelay:BASE_DELAY}, {Action:"Crouch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"MegaChargedUppercut", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDannyBlast = new Array({Action:"RightPunch", Hit:true, Perso:"Daniel", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"DannyBlast"}, {Action:"SwitchDanny", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"ComboBlast", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDannyUppercut = new Array({Action:"Crouch", Hit:false, Perso:"Danny", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"DannyUppercut"}, {Action:"Uppercut", Hit:true, MaxFrameDelay:NO_DELAY});
aComboDanielLowKick = new Array({Action:"Crouch", Hit:false, Perso:"Daniel", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"DannyLowKick"}, {Action:"LowKick", Hit:true, MaxFrameDelay:NO_DELAY});
aComboJumpKick = new Array({Action:"Jump", Hit:false, Perso:"All", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"JumpKick"}, {Action:"JumpKick", Hit:true, MaxFrameDelay:NO_DELAY});
this.aComboList.push(_local4);
this.aComboList.push(aComboDanielSpinPunch);
this.aComboList.push(aComboDanielHardFrontKick);
this.aComboList.push(aComboDannyBlast);
this.aComboList.push(aComboDanielMegaChargedUppercut);
this.aComboList.push(aComboDannyUppercut);
this.aComboList.push(aComboDanielLowKick);
this.aComboList.push(aComboJumpKick);
this.aComboSelected = new Array();
this.FrCombo = 0;
}
_global.Game = this;
this.GlobalKeyListener = new com.sarbakan.utils.KeyManager();
GlobalKeyListener.addKeyListener(39, "R");
GlobalKeyListener.addKeyListener(37, "L");
GlobalKeyListener.addKeyListener(40, "Dw");
GlobalKeyListener.addKeyListener(38, "Up");
GlobalKeyListener.addKeyListener(71, "Ghost");
GlobalKeyListener.addKeyListener(70, "EasterEgg");
GlobalKeyListener.addKeyListener(32, "Attack");
GlobalKeyListener.addKeyListener(32, "Next");
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
G_CheckPause = function () {
if ((Pers.Etat != "Die") and (Pers.Etat != "Dead")) {
if (G_PauseOut && (!G_Pause)) {
G_Pause = true;
_parent.ControlBall.stop();
_parent._parent.Popup.gotoAndStop("Pause");
if (_global.C.SoundActive) {
_global.SoundCTRL.muteAllSounds();
}
_global.C.DesactivateHud();
} else if ((G_Resume == true) and (G_Pause == true)) {
G_PauseOut = false;
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
KeyListener.Up = false;
KeyListener.UpRelease = true;
KeyListener.Dw = false;
KeyListener.L = false;
KeyListener.R = false;
KeyListener.X = false;
KeyListener.Z = false;
KeyListener.Sp = false;
Music.VolDest = 70;
Music.Etat = "FadeIn";
G_Pause = false;
G_Resume = false;
_parent._parent.Popup.gotoAndStop(1);
if (_global.C.SoundActive) {
_global.SoundCTRL.unmuteAllSounds();
}
_global.C.ActivateHud();
if (_parent.ControlBall._currentframe != 1) {
_parent.ControlBall.play();
}
}
}
};
CreerPers = function (PosX, PosY) {
this.Pers = new ObjPers(PosX, PosY);
this.Pers.oLifeBar.init(_parent._parent.hud.lifeBar, 3, null);
this.Pers.oEnergyBar.init(_parent._parent.hud.energyBar, 10, this.Pers.oLifeBar);
this.Pers.oLifeBar.setEnergy(_global.C.Life);
_global.Game.addListener(this.Pers);
};
ObjPers.prototype.resurrect = function () {
with (this) {
Etat = "Idle";
CanBeHit = true;
CanHit = false;
oEnergyBar.setEnergy(10);
FrDeadCount = 0;
}
};
ObjPers.prototype.CharacterSwitch = function () {
with (this) {
if ((Etat != "Die") && (Etat != "Hurt")) {
if (ICharacter == 0) {
ICharacter = 1;
} else if (ICharacter == 1) {
ICharacter = 0;
}
Perso = aCharacter[ICharacter];
addToComboList("Switch" + Perso, false);
updatePerso();
_parent.Pers.Obj.Transform.gotoAndPlay("Transform");
_global.SoundCTRL.playSound("Danny_Ghost", 90, 0);
}
}
};
ObjPers.prototype.HeroChange = function (NewHero) {
with (this) {
Perso = NewHero;
updatePerso();
}
};
ObjPers.prototype.Idle = function () {
with (this) {
KeepDeadPos = true;
if (oEnergyBar.getEnergy() > 0) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckJump();
CheckCrouch();
this["CheckAttack" + Perso]();
CheckGetFire();
CheckDie();
} else {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
}
};
ObjPers.prototype.getBonus = function (l_sEnergyType) {
with (this) {
if (l_sEnergyType == "Life") {
oLifeBar.addEnergy(1);
} else {
oEnergyBar.setEnergy("Full");
}
}
};
ObjPers.prototype.Run = function () {
with (this) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckJump();
CheckCrouch();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
}
};
ObjPers.prototype.RunAuto = function () {
with (this) {
SetSpdXAuto();
SetMoveX();
CheckHitGrd();
CheckJump();
CheckCrouch();
CheckSol();
CheckFall();
MovePers();
}
};
ObjPers.prototype.DoubleJumpStart = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
Etat = "DoubleJumpIdle";
}
}
};
ObjPers.prototype.DoubleJumpIdle = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
MovePers();
this["CheckAttack" + Perso]();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "DoubleJumpFall";
DistYFall = 0;
}
}
};
ObjPers.prototype.DoubleJumpFall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
SpdXNow = 0;
MoveX = 0;
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "JumpLanding";
} else {
Etat = "Idle";
}
}
CheckHole();
trace("DJFall");
}
};
ObjPers.prototype.JumpKickFall = function () {
with (this) {
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
SpdXNow = 0;
MoveX = 0;
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "JumpLanding";
} else {
Etat = "Idle";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpStart = function () {
with (this) {
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
CheckDoubleJump();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
SpdYNow = SpdStartJump;
Etat = "JumpIdle";
}
}
};
ObjPers.prototype.JumpIdle = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckDoubleJump();
MovePers();
this["CheckAttack" + Perso]();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.Fall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDoubleJump();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if ((DistYFall >= DistYLand) || (Math.abs(SpdXNow) < 5)) {
Etat = "JumpLanding";
SpdXNow = 0;
MoveX = 0;
} else {
Etat = "Run";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpLanding = function () {
with (this) {
CheckGetFire();
CheckCrouch();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
if (oEnergyBar.getEnergy() <= 0) {
Etat = "Die";
} else {
Etat = "Idle";
}
}
}
};
ObjPers.prototype.Crouch = function () {
with (this) {
CheckGetFire();
CheckCrouchRelease();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
}
};
ObjPers.prototype.RightPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.HardFrontKick = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "JumpLanding";
CheckGetFire();
}
}
};
ObjPers.prototype.MegaChargedUppercut = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Crouch";
CheckGetFire();
}
}
};
ObjPers.prototype.RightPunchStill = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
if (nFrPunchStill == 0) {
Etat = "Idle";
} else {
_parent.Pers.Obj.Etat.stop();
nFrPunchStill--;
}
CheckGetFire();
}
}
};
ObjPers.prototype.LeftPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.LowKick = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Crouch";
CheckGetFire();
}
}
};
ObjPers.prototype.Uppercut = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.ComboBlast = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.ComboSpinPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.JumpKick = function () {
with (this) {
if (nJumpKickPause == 0) {
if (_parent.Pers.Obj.Etat._currentframe == 1) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
CheckGetFire();
SetSpdXJumpKick();
SetMoveX();
CheckWall(BottomFrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(BottomFrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (HitGrd) {
CanHit = false;
Etat = "JumpLanding";
}
CheckHole();
} else {
nJumpKickPause--;
}
}
};
ObjPers.prototype.JumpKickBounce = function () {
with (this) {
CheckGetFire();
SetSpdXJumpKickBounce();
SetMoveX();
CheckWall(BottomFrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(BottomFrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (SpdYNow > 5) {
setState("JumpKickFall");
}
if (HitGrd) {
CanHit = false;
Etat = "JumpLanding";
}
CheckHole();
}
};
ObjPers.prototype.initJumpKickBounce = function () {
with (this) {
CanHit = false;
SpdYNow = SpdYNow - 15;
if (Dir == "G") {
SpdXNow = 10;
} else if (Dir == "D") {
SpdXNow = -10;
}
setState("JumpKickBounce");
}
};
ObjPers.prototype.Hurt = function () {
with (this) {
if (FrGetHitCount >= FrGetHit) {
CheckHitGrd();
Etat = "DoubleJumpFall";
FrGetHitCount = 0;
InvincibleInit();
} else {
FrGetHitCount++;
}
GetHitGeneral();
}
};
ObjPers.prototype.GetHitGeneral = function () {
with (this) {
SetSpdXHit();
CheckWall(BackX, TrueY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDie();
CheckHole();
}
};
ObjPers.prototype.GetHit = function (l_nSpdXHit) {
with (this) {
if (CanBeHit) {
CanHit = false;
CanBeHit = false;
oEnergyBar.looseEnergy(1);
trace("l_nSpdXHit: " + l_nSpdXHit);
if (l_nSpdXHit != undefined) {
SpdXNow = l_nSpdXHit;
} else {
SpdXNow = SpdXHitBase;
}
trace("SpdXNow: " + SpdXNow);
SpdYNow = SpdYHitBase;
Etat = "Hurt";
_global.SoundCTRL.playSound("Danny_Hurt", 40, 0);
GetHitGeneral();
nComboSequence = 0;
}
}
};
ObjPers.prototype.GetFreak = function () {
with (this) {
if (CanBeHit) {
CanHit = false;
CanBeHit = false;
SpdXNow = SpdXHitBase;
SpdYNow = SpdYHitBase;
Etat = "Hurt";
_global.SoundCTRL.playSound("Danny_Hurt", 90, 0);
GetHitGeneral();
initFreakControl();
}
}
};
ObjPers.prototype.initAutoCrouch = function () {
with (this) {
if (HitGrd) {
Etat = "AutoCrouch";
} else {
Etat = "AutoCrouchFall";
trace("Etat: " + Etat);
}
}
};
ObjPers.prototype.AutoCrouch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
broadcastMessage("readyForShuttle");
}
}
};
ObjPers.prototype.AutoCrouchFall = function () {
with (this) {
SetSpdXJump();
CheckHitGrd();
CheckSol();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
Etat = "AutoCrouch";
SpdXNow = 0;
MoveX = 0;
}
}
};
ObjPers.prototype.CheckHole = function () {
with (this) {
if (PosY > 725) {
trace("Hole!!");
setState("Die");
}
}
};
ObjPers.prototype.CheckGetFire = function () {
with (this) {
var NbMinionBall = G_TabMinionBall.length;
if ((NbMinionBall > 0) && (Perso != "TuesdayDisguised")) {
var i = 0;
while (i < NbMinionBall) {
var BallX = _parent.Control[G_TabMinionBall[i]].PosX;
var BallY = _parent.Control[G_TabMinionBall[i]].PosY;
if (((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) && (!Invincible)) {
Etat = "GetFire";
if (_parent.Control[G_TabMinionBall[i]].Dir == "D") {
Dir = "G";
} else if (_parent.Control[G_TabMinionBall[i]].Dir == "G") {
Dir = "D";
}
_parent.Control[G_TabMinionBall[i]].Etat = "Hit";
}
i++;
}
}
}
};
ObjPers.prototype.InvincibleInit = function () {
with (this) {
Invincible = true;
}
};
ObjPers.prototype.InvincibleEnd = function () {
with (this) {
Invincible = false;
FrInvincibleCount = 0;
_parent.Pers._visible = true;
}
};
ObjPers.prototype.InvincibleCheck = function () {
with (this) {
if (Invincible) {
if (FrInvincibleCount >= FrInvincible) {
InvincibleEnd();
CanBeHit = true;
} else {
FrInvincibleCount++;
if ((FrInvincibleCount % 3) == 0) {
_parent.Pers._visible = !_parent.Pers._visible;
}
}
}
}
};
ObjPers.prototype.Die = function () {
with (this) {
CanBeHit = false;
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
if (FrDeadCount == 0) {
_parent.Pers.Obj.Etat.stop();
}
FrDeadCount++;
if (FrDeadCount >= 30) {
_global.Game.onPlayerDie();
oLifeBar.looseEnergy(1);
}
}
}
};
ObjPers.prototype.Sleep = function () {
};
ObjPers.prototype.SetSpdXHit = function () {
with (this) {
MoveX = SpdXNow;
if (SpdXNow > 0) {
SpdXNow = SpdXNow * 0.7;
}
if (Dir eq "D") {
MoveX = MoveX * -1;
}
}
};
ObjPers.prototype.SetSpdX = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Run";
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(FrontX - WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Run";
SpdXNow = SpdXBase * -1;
}
} else {
Etat = "Idle";
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXAuto = function () {
with (this) {
if ((PosXAuto >= PosX) && (Dir == "D")) {
Dir = "D";
Etat = "RunAuto";
SpdXNow = SpdXBase;
} else if ((PosXAuto <= PosX) && (Dir == "G")) {
Dir = "G";
Etat = "RunAuto";
SpdXNow = SpdXBase * -1;
} else {
Etat = "Idle";
broadcastMessage("runAutoComplete");
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJump = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase * -1;
}
} else {
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJumpKick = function () {
with (this) {
if (Dir == "G") {
if (SpdXNow < -5) {
SpdXNow = SpdXNow + 2;
} else {
SpdXNow = -5;
}
} else if (Dir == "D") {
if (SpdXNow > 5) {
SpdXNow = SpdXNow - 2;
} else {
SpdXNow = 5;
}
}
}
};
ObjPers.prototype.SetSpdXJumpKickBounce = function () {
with (this) {
if (Dir == "G") {
if (SpdXNow < 10) {
SpdXNow = SpdXNow + 2;
} else {
SpdXNow = 10;
}
} else if (Dir == "D") {
if (SpdXNow > -10) {
SpdXNow = SpdXNow - 2;
} else {
SpdXNow = -10;
}
}
}
};
ObjPers.prototype.SetMoveX = function () {
with (this) {
MoveX = SpdXNow;
}
};
ObjPers.prototype.CheckWall = function (CoordX, CoordY) {
with (this) {
if (MoveX != 0) {
if (MoveX > 0) {
var WallStop = WallHitBloc;
} else {
var WallStop = (-1 * WallHitBloc);
}
var WallHit1 = (MoveX / 3);
var WallHit2 = (WallHit1 * 2);
var WallHit3 = (WallHit1 * 4);
if (_parent.Collider.Wall.hitTest(CoordX + WallStop, CoordY, true)) {
MoveX = 0;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit1, CoordY, true)) {
MoveX = WallHitBloc;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit2, CoordY, true)) {
MoveX = WallHit1;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit3, CoordY, true)) {
MoveX = WallHit2;
} else if (_parent.Collider.Wall.hitTest(CoordX + MoveX, CoordY, true)) {
MoveX = WallHit2;
}
}
}
};
ObjPers.prototype.CheckCeil = function () {
with (this) {
if (MoveY != 0) {
if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) {
MoveY = 0;
SpdYNow = 0;
Etat = "Fall";
DistYFall = 0;
}
}
}
};
ObjPers.prototype.CheckJump = function () {
with (this) {
if ((!KeyListener.Up) && (!bJumpRelease)) {
bJumpRelease = true;
}
if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) {
bJumpRelease = false;
if (Etat == "Run") {
SpdYNow = SpdStartJump;
Etat = "JumpIdle";
_global.SoundCTRL.playSound("Danny_Jump", 30, 0);
} else {
_global.SoundCTRL.playSound("Danny_Jump", 30, 0);
Etat = "JumpStart";
}
nFrCanDoubleJumpCount = nFrCanDoubleJump;
}
}
};
ObjPers.prototype.CheckDoubleJump = function () {
with (this) {
if ((!KeyListener.Up) && (!bJumpRelease)) {
bJumpRelease = true;
}
if (nFrCanDoubleJumpCount == 0) {
if ((KeyListener.Up == true) && (bJumpRelease)) {
_global.SoundCTRL.playSound("Danny_Jump", 20, 0);
Etat = "DoubleJumpStart";
SpdYNow = SpdStartJump;
}
} else {
nFrCanDoubleJumpCount--;
}
}
};
ObjPers.prototype.CheckCrouch = function () {
with (this) {
if ((((KeyListener.Dw && (HitGrd)) && (!KeyListener.L)) && (!KeyListener.R)) && (!KeyListener.Up)) {
Etat = "Crouch";
}
}
};
ObjPers.prototype.CheckCrouchRelease = function () {
with (this) {
if ((((!KeyListener.Dw) || (KeyListener.L)) || (KeyListener.R)) || (KeyListener.Up)) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
}
}
};
ObjPers.prototype.CheckAttackDanny = function () {
with (this) {
var bComboContinue = false;
var oCurrentAttack = new Object();
var oLastAttack;
if (KeyListener.Attack && (bAttackRelease)) {
bAttackRelease = false;
if (aCurrentCombo.length == 0) {
initRightPunch();
addToComboList(Etat, true);
} else {
NextAttack = addToComboList("Attack", true);
if (NextAttack != undefined) {
this["init" + NextAttack]();
} else {
initRightPunch();
addToComboList(Etat, true);
}
}
} else if (!KeyListener.Attack) {
bAttackRelease = true;
}
}
};
ObjPers.prototype.CheckAttackDaniel = ObjPers.prototype.CheckAttackDanny;
ObjPers.prototype.getActionType = function (l_sAction) {
with (this) {
switch (l_sAction) {
case "LeftPunch" :
case "RightPunch" :
case "RightPunchStill" :
case "HardFrontKick" :
case "LowKick" :
case "MegaChargedUppercut" :
case "Uppercut" :
case "JumpKick" :
case "ComboBlast" :
case "ComboSpinPunch" :
return("Attack");
case "JumpIdle" :
case "Fall" :
case "DoubleJumpIdle" :
case "DoubleJumpStart" :
case "DoubleJumpFall" :
return("Jump");
}
}
};
ObjPers.prototype.resetCombo = function () {
with (this) {
aCurrentCombo = new Array();
aComboSelected = new Array();
FrCombo = 0;
}
};
ObjPers.prototype.checkHitSequence = function (l_nComboStep, l_aComboToCheck) {
with (this) {
var i = 0;
while (i <= l_nComboStep) {
if ((aCurrentCombo[i].Hit == true) || (aCurrentCombo[i].Hit == l_aComboToCheck[i].Hit)) {
} else {
trace("Reset no hit!");
nComboSequence = 0;
return(false);
}
i++;
}
return(true);
}
};
ObjPers.prototype.checkDelay = function (l_nComboStep, l_aComboToCheck) {
with (this) {
if ((l_aComboToCheck[l_nComboStep - 1].MaxFrameDelay == NO_DELAY) || ((FrCombo - aCurrentCombo[l_nComboStep - 1].FrameCount) <= l_aComboToCheck[l_nComboStep - 1].MaxFrameDelay)) {
return(true);
}
trace("Reset in delay 2!");
nComboSequence = 0;
return(false);
}
};
ObjPers.prototype.setComboHit = function () {
with (this) {
aCurrentCombo[aCurrentCombo.length - 1].Hit = true;
_parent.Pers.Obj.Impact.gotoAndPlay("Hit");
switch (Etat) {
case "HardFrontKick" :
_global.SoundCTRL.playSound("Danny_HardFrontKick", 100, 0);
showCombo();
return;
case "ComboSpinPunch" :
_global.SoundCTRL.playSound("Danny_Uppercut", 100, 0);
showCombo();
return;
case "MegaChargedUppercut" :
case "ComboBlast" :
_global.SoundCTRL.playSound("Danny_BlastingUppercut", 100, 0);
showCombo();
return;
case "LowKick" :
_global.SoundCTRL.playSound("Danny_LowKick", 100, 0);
return;
case "JumpKick" :
_global.SoundCTRL.playSound("Danny_LowKick", 100, 0);
return;
case "Uppercut" :
_global.SoundCTRL.playSound("Danny_Uppercut", 100, 0);
return;
case "LeftPunch" :
case "RightPunch" :
case "RightPunchStill" :
_global.SoundCTRL.playSound("Danny_Punch", 100, 0);
return;
}
}
};
ObjPers.prototype.showCombo = function () {
with (this) {
nComboSequence++;
if (nComboSequence > 5) {
nComboSequence = 5;
}
_global.C.oScore.addCombo(nComboSequence);
_parent._parent.combo.gotoAndStop("Combo");
_parent._parent.combo._x = 110;
_parent._parent.combo._y = 60;
}
};
ObjPers.prototype.addToComboList = function (l_sNewAction, l_bManualAdd) {
with (this) {
var oCurrentAttack;
var oLastAttack;
var bComboContinue = false;
var l_sActionType = getActionType(l_sNewAction);
var nComboStep = aCurrentCombo.length;
var l_sNextAction;
if ((l_sNewAction != "Idle") || (aCurrentCombo[0].noIdle)) {
if ((l_sActionType != "Attack") || (l_bManualAdd)) {
oCurrentAttack = new Object();
if (l_sActionType == "Jump") {
l_sNewAction = l_sActionType;
}
if (nComboStep == 0) {
for (var i in aComboList) {
if ((Perso == aComboList[i][0].Perso) || (aComboList[i][0].Perso == "All")) {
if (aComboList[i][nComboStep].Action == l_sNewAction) {
if (aCurrentCombo.length == 0) {
oCurrentAttack.Action = l_sNewAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
aCurrentCombo[0].noIdle = aComboList[i][0].noIdle;
}
aComboSelected.push(aComboList[i]);
}
}
}
} else {
for (var i in aComboSelected) {
if ((aComboSelected[i][nComboStep].Action == l_sNewAction) && (checkDelay(nComboStep, aComboSelected[i]))) {
if (nComboStep == aCurrentCombo.length) {
oCurrentAttack.Action = l_sNewAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
trace("continue : " + aComboSelected[i][0].Name);
}
} else if ((((getActionType(aComboSelected[i][nComboStep].Action) == "Attack") && (l_sNewAction == "Attack")) && (checkHitSequence(nComboStep - 1, aComboSelected[i]))) && (checkDelay(nComboStep, aComboSelected[i]))) {
if (nComboStep == aCurrentCombo.length) {
l_sNextAction = aComboSelected[i][nComboStep].Action;
oCurrentAttack.Action = l_sNextAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
}
} else {
delete aComboSelected[i];
}
}
}
if ((!bComboContinue) && (aCurrentCombo.length > 0)) {
resetCombo();
addToComboList(l_sNewAction, false);
if (l_sNewAction == "Attack") {
}
}
return(l_sNextAction);
}
}
}
};
ObjPers.prototype.initRightPunch = function () {
with (this) {
Etat = "RightPunch";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
}
};
ObjPers.prototype.initLeftPunch = function () {
with (this) {
Etat = "LeftPunch";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
}
};
ObjPers.prototype.initRightPunchStill = function () {
with (this) {
nFrPunchStill = 15;
Etat = "RightPunchStill";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
nComboSequence = 0;
}
};
ObjPers.prototype.initHardFrontKick = function () {
with (this) {
Etat = "HardFrontKick";
}
};
ObjPers.prototype.initMegaChargedUppercut = function () {
with (this) {
Etat = "MegaChargedUppercut";
}
};
ObjPers.prototype.initLowKick = function () {
with (this) {
Etat = "LowKick";
}
};
ObjPers.prototype.initUppercut = function () {
with (this) {
Etat = "Uppercut";
}
};
ObjPers.prototype.initComboBlast = function () {
with (this) {
Etat = "ComboBlast";
}
};
ObjPers.prototype.initComboSpinPunch = function () {
with (this) {
Etat = "ComboSpinPunch";
}
};
ObjPers.prototype.initJumpKick = function () {
with (this) {
SpdYNow = -1;
if (Dir == "G") {
SpdXNow = SpdXNow - SpdXBaseJumpKick;
} else if (Dir == "D") {
SpdXNow = SpdXNow + SpdXBaseJumpKick;
}
nJumpKickPause = 0;
Etat = "JumpKick";
nComboSequence = 0;
}
};
ObjPers.prototype.initFreakControl = function () {
with (this) {
bFreak = true;
FrFreakCount = 0;
cDanny.setTransform(ctFreak);
nComboSequence = 0;
}
};
ObjPers.prototype.endFreak = function () {
with (this) {
bFreak = false;
_parent.Pers._visible = true;
cDanny.setTransform(ctOriginal);
}
};
ObjPers.prototype.CheckFall = function () {
with (this) {
if (SpdYNow >= SpdYFall) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.CheckDie = function () {
with (this) {
if ((oEnergyBar.getEnergy() <= 0) and (HitGrd == true)) {
CanBeHit = false;
InvincibleEnd();
_global.C.DesactivateHud();
_global.SoundCTRL.playSound("Danny_Die", 90, 0);
Etat = "Die";
nComboSequence = 0;
endFreak();
} else if (oEnergyBar.getEnergy() <= 0) {
Etat = "Hurt";
bSkipDie = true;
}
}
};
ObjPers.prototype.MovePers = function () {
with (this) {
MoveX = Math.round(MoveX);
FrontX = Math.round(FrontX);
BackX = Math.round(BackX);
if (((Dir == "G") && (MoveX < 0)) && ((FrontX + MoveX) < 50)) {
MoveX = 50 - FrontX;
} else if (((Dir == "D") && (MoveX < 0)) && ((BackX + MoveX) < 50)) {
MoveX = 50 - BackX;
} else if (((Dir == "D") && (MoveX > 0)) && ((FrontX + MoveX) > 550)) {
MoveX = 550 - FrontX;
} else if (((Dir == "G") && (MoveX > 0)) && ((BackX + MoveX) > 550)) {
MoveX = 550 - BackX;
}
PosX = _parent.Pers._x + MoveX;
_parent.Pers._x = PosX;
MoveX = 0;
PosY = _parent.Pers._y + MoveY;
_parent.Pers._y = PosY;
MoveY = 0;
}
};
ObjPers.prototype.SetPos = function (l_nX, l_nY) {
with (this) {
PosX = l_nX;
_parent.Pers._x = PosX;
MoveX = 0;
PosY = l_nY;
_parent.Pers._y = PosY;
MoveY = 0;
}
};
ObjPers.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
TopX = TrueX;
TopY = TrueY + _parent.Pers.Obj.HitTop._y;
FrontX = _parent.Pers.Obj.HitFront._x;
FrontY = TrueY + _parent.Pers.Obj.HitFront._y;
BottomFrontX = _parent.Pers.Obj.HitBottomFront._x;
BottomBackX = _parent.Pers.Obj.HitBottomBack._x;
BackX = _parent.Pers.Obj.HitBack._x;
if (Dir == "G") {
FrontX = TrueX - FrontX;
BottomFrontX = TrueX - BottomFrontX;
BottomBackX = TrueX - BottomBackX;
BackX = TrueX - BackX;
} else if (Dir == "D") {
FrontX = TrueX + FrontX;
BottomFrontX = TrueX + BottomFrontX;
BottomBackX = TrueX + BottomBackX;
BackX = TrueX + BackX;
}
}
};
ObjPers.prototype.CheckHitGrd = function (CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = TrueX;
CheckY = TrueY;
aCheckPoints = [CheckX, BottomFrontX, BottomBackX];
} else {
aCheckPoints = [CheckX];
}
for (var i in aCheckPoints) {
if (_parent.Collider.Sol.hitTest(aCheckPoints[i], CheckY + MaxSol, true) and (SpdYNow >= 0)) {
HitGrd = true;
HitGrdPoint = aCheckPoints[i];
break;
}
HitGrd = false;
HitGrdPoint = TrueX;
}
}
};
ObjPers.prototype.CheckSol = function (CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = HitGrdPoint;
CheckY = TrueY;
}
if (_parent.Collider.Sol.hitTest(CheckX, CheckY, true) and (SpdYNow >= 0)) {
SpdYNow = 0;
var InSol = true;
while (InSol == true) {
MoveY = MoveY - SolOut;
InSol = _parent.Collider.Sol.hitTest(CheckX, CheckY + MoveY, true);
}
} else if (SpdYNow >= 0) {
if (HitGrd == true) {
SpdYNow = 0;
MoveY = SpdYNow;
} else {
SpdYNow = SpdYNow + SpdYUp;
if (Etat == "JumpKick") {
SpdYNow = SpdYNow + 1;
}
if (SpdYNow > SpdYMax) {
SpdYNow = SpdYMax;
}
var SolHit1 = (SpdYNow / 3);
var SolHit2 = (SolHit1 * 2);
if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SolHit1, true)) {
MoveY = SolHitMin;
} else if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SolHit2, true)) {
MoveY = SolHit1;
} else if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SpdYNow, true)) {
MoveY = SolHit2;
} else {
MoveY = SpdYNow;
}
}
} else {
SpdYNow = SpdYNow + SpdYUp;
MoveY = SpdYNow;
}
if (MoveY > 0) {
DistYFall = DistYFall + MoveY;
}
}
};
ObjPers.prototype.setState = function (l_sNewState) {
with (this) {
EtatOld = Etat;
Etat = l_sNewState;
var nOldTransformFr = _parent.Pers.Obj.Transform._currentframe;
_parent.Pers.Obj.gotoAndStop(l_sNewState);
_parent.Pers.Obj.Etat.gotoAndPlay(1);
this.nFrTotalAnim = _parent.Pers.Obj.Etat._totalframes;
_parent.Pers.Obj.Transform.gotoAndStop(1);
if ((Etat == "Die") && (bSkipDie)) {
_parent.Pers.Obj.Etat.gotoAndPlay(9);
}
if ((nOldTransformFr < 15) && (nOldTransformFr > 5)) {
_parent.Pers.Obj.Transform.gotoAndPlay(nOldTransformFr);
}
nGetHitTop = -1 * _parent.Pers.Obj.HitTop._y;
addToComboList(Etat, false);
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.updatePerso = function () {
var nCurrentFrame;
with (this) {
nCurrentFrame = _parent.Pers.Obj.Etat._currentframe;
_parent.Pers.gotoAndStop((Perso + "_") + Dir);
_parent.Pers.Obj.Etat.gotoAndPlay(nCurrentFrame);
nGetHitLeft = -1 * _parent.Pers.Obj.HitBack._x;
nGetHitRight = _parent.Pers.Obj.HitFront._x;
nGetHitTop = -1 * _parent.Pers.Obj.HitTop._y;
ComboKick = 0;
mcHitGetHurt = _parent.Pers.Obj.HitGetHurt;
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent.Pers.gotoAndStop((Perso + "_") + Dir);
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.Actions = function () {
with (this) {
if (!bPause) {
FrCombo++;
SetTruePos();
InvincibleCheck();
Freakcheck();
this[Etat]();
CheckCharSwitch();
CheckHit();
}
}
};
ObjPers.prototype.Freakcheck = function () {
with (this) {
if (bFreak && (KeyListener)) {
FrFreakCount++;
if (FrFreakCount >= FrFreak) {
endFreak();
} else {
if ((FrFreakCount > (FrFreak - 20)) && ((FrFreakCount % 3) == 0)) {
_parent.Pers._visible = !_parent.Pers._visible;
}
l_bLeftValue = GlobalKeyListener.L;
l_bRightValue = GlobalKeyListener.R;
if (l_bRightValue) {
KeyListener.L = true;
} else {
KeyListener.L = false;
}
if (l_bLeftValue) {
KeyListener.R = true;
} else {
KeyListener.R = false;
}
}
}
}
};
ObjPers.prototype.CheckCharSwitch = function () {
with (this) {
if (KeyListener.Ghost && (bCanSwitch)) {
bCanSwitch = false;
CanHit = false;
FrSwitchCharacterCount = FrSwitchCharacter;
CharacterSwitch();
}
if (!bCanSwitch) {
bComboSwitch = true;
FrSwitchCharacterCount--;
if (FrSwitchCharacterCount == 0) {
bCanSwitch = true;
}
}
}
};
ObjPers.prototype.pause = function (l_bAnim) {
with (this) {
KeyListener = undefined;
if (l_bAnim) {
bPause = true;
_parent.Pers.Obj.Etat.stop();
for (var i in _parent.Pers.Obj.Etat) {
if (typeof(_parent.Pers.Obj.Etat[i]) == "movieclip") {
_parent.Pers.Obj.Etat[i].stop();
for (var j in _parent.Pers.Obj.Etat[i]) {
if (typeof(_parent.Pers.Obj.Etat[i][j]) == "movieclip") {
_parent.Pers.Obj.Etat[i][j].stop();
}
}
}
}
}
}
};
ObjPers.prototype.resume = function () {
with (this) {
bPause = false;
CanBeHit = true;
CanHit = false;
KeyListener = GlobalKeyListener;
if ((Etat != "Die") || (_parent.Pers.Obj.Etat._currentframe < nFrTotalAnim)) {
_parent.Pers.Obj.Etat.play();
}
for (var i in _parent.Pers.Obj.Etat) {
if (typeof(_parent.Pers.Obj.Etat[i]) == "movieclip") {
_parent.Pers.Obj.Etat[i].play();
for (var j in _parent.Pers.Obj.Etat[i]) {
if (typeof(_parent.Pers.Obj.Etat[i][j]) == "movieclip") {
_parent.Pers.Obj.Etat[i][j].play();
}
}
}
}
}
};
ObjPers.prototype.CheckHit = function () {
with (this) {
if (KeyListener.X && (CanBeHit)) {
this.GetHit();
}
}
};
this.cnt = 0;
this.G_Pause = true;
this.G_PauseOut = false;
this.G_PRealese = true;
this.G_Resume = false;
switchDelay = 30;
this.G_TabGWT = new Array();
this.G_TabBox = new Array();
this.G_TabGun = new Array();
this.G_TabSwitch = new Array();
this.G_TabDoor = new Array();
this.G_TabHeroChanger = new Array();
this.G_TabElevator = new Array();
this.G_TabPersBall = new Array();
this.G_TabMinionBall = new Array();
this.G_TabLifeBonus = new Array();
this.G_TabCam = new Array();
this.G_TabLevier = new Array();
this.G_TabTV = new Array();
this.G_NextPersBall = 1;
this.G_NextPersBallDepth = 10;
this.G_NextMinionBall = 1;
this.G_NextMinionBallDepth = 20;
this.bossSequence = false;
AsBroadcaster.initialize(this);
this.easterEggCount = 0;
ffa.DialogData.init();
this.oDialog = new ffa.DialogManager(_parent._parent.captions);
this.oOverlays = new ffa.OverlaysManager(_parent._parent.overlays);
this.bEasterEgg = false;
this.oTimer = new ffa.Timer(_parent._parent.hud.timer);
_global.C.oScore.init(_parent._parent.hud.score);
_global.C.oScore.resetLevel(nLevel);
this.sLevelState = "";
this.LifeBonusTaken = false;
this.onPlayerDie = function () {
this.resumeLevel();
this.broadcastMessage("pause", true);
};
this.initLevel = function () {
this.Pers.PosXAuto = 100;
this.Pers.Dir = "D";
this.Pers.Etat = "RunAuto";
this.Pers.addListener(this);
this.BG.addListener(this);
this.oOverlays.addListener(this);
this.sLevelState = "init";
this._parent._visible = true;
ship.ShipDatas.init();
this.CreerEasterEgg(_parent.missedShot, _parent.Parallax.easterEgg);
};
this.resumeLevel = function () {
if (this.Pers.oLifeBar.getEnergy() > 0) {
oDialog.hide(false);
oOverlays.setState("Sleep");
this._parent._visible = false;
this.Pers.Etat = "Sleep";
this.nFrameActionDelay = 15;
this.doOnNextFrame = function () {
this.nFrameActionDelay--;
trace("nFrameActionDelay: " + nFrameActionDelay);
if (nFrameActionDelay <= 0) {
_global.C.ActivateHud();
this.BG.goto({type:"group", group:this.BG.currentScreenGroupNum + 1}, this.bossSequence);
this.sLevelState = "ResumeLevel";
this.Pers.resurrect();
this.doOnNextFrame = undefined;
}
};
this.BG.resetAllScreenGroup();
} else {
_global.C.endGame("lose");
_parent._parent.gotoAndStop("BadEnding");
}
};
this.resumeLevelReady = function () {
this._parent._visible = true;
this.sLevelState = "Game";
if (this.bossSequence) {
switch (nLevel) {
case 1 :
this.Lydia.reInit();
this.broadcastMessage("KillAllGWT");
this.sLevelState = "Boss";
break;
case 2 :
break;
case 3 :
this.Freakshow.reInit();
}
}
};
this.runAutoComplete = function () {
var _local3;
switch (this.sLevelState) {
case "init" :
_local3 = ffa.DialogData.getDialog(nLevel, "1_init");
this.oDialog.startDialog(_local3[0], true);
var _local2 = 1;
while (_local2 < _local3.length) {
this.oDialog.queueDialog(_local3[_local2]);
_local2++;
}
break;
case "Complete" :
break;
case "CollectGem" :
break;
}
};
this.BossSequenceEnd = function () {
var _local2;
switch (nLevel) {
case 1 :
_local2 = ffa.DialogData.getDialog(nLevel, "Lydia_dropGem");
this.oDialog.startDialog(_local2[0]);
var _local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "CollectGem";
break;
case 2 :
_local2 = ffa.DialogData.getDialog(nLevel, "SpaceShuttle_dropGem");
this.oDialog.startDialog(_local2[0]);
_local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "CollectGem";
break;
case 3 :
if (this.sLevelState == "EndLevel") {
break;
}
_local2 = ffa.DialogData.getDialog(nLevel, "Freakshow_lost");
this.oDialog.startDialog(_local2[0]);
_local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "EndLevel";
}
};
this.CameraSkip = function () {
this.Pers.SetPos(this.BG.nInvertedPosX + 100, 0);
};
this.bSpaceSkip = false;
this.switchControlMode = function (l_sNewMode) {
if (l_sNewMode == "Game") {
this.KeyListener = GlobalKeyListener;
this.bSpaceSkip = false;
_parent._parent.menu.gotoAndStop("Idle");
} else if (l_sNewMode == "Dialog") {
_parent._parent.menu.gotoAndStop("Disable");
this.bSpaceSkip = true;
} else {
_parent._parent.menu.gotoAndStop("Disable");
this.KeyListener = undefined;
this.bSpaceSkip = false;
}
};
nADSD = 0;
nGWT = 0;
this.Creer_O1a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 100);
if (l_mcElement.bTop) {
l_mcElement.gotoAndStop(3);
}
CreerObstacle(pt, 80, 100);
}
};
this.Creer_O1b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 100);
CreerObstacle(pt, 240, 100);
}
};
this.Creer_O2a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 180);
CreerObstacle(pt, 80, 180);
}
};
this.Creer_O2b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 180);
CreerObstacle(pt, 240, 180);
}
};
this.Creer_O3b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 260);
CreerObstacle(pt, 240, 260);
}
};
this.Creer_P2a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 80);
}
};
this.Creer_P2b = function (l_mcElement, l_nPosX, l_nPosY) {
var nRandomItem;
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 240);
if (l_mcElement._name != undefined) {
nRandomItem = Number(l_mcElement._name) + 1;
l_mcElement.gotoAndStop(nRandomItem);
}
}
};
this.Creer_P2c = function (l_mcElement) {
with (this) {
l_mcElement._y = l_mcElement._y - 20;
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 80);
}
};
this.Creer_P3a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 240);
CreerPlateforme(pt, 80);
}
};
this.Creer_P3b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 240);
CreerPlateforme(pt, 240);
}
};
this.Creer_P4a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 320);
CreerPlateforme(pt, 80);
}
};
this.Creer_P4b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 320);
CreerPlateforme(pt, 260);
if (l_mcElement._name != undefined) {
nRandomItem = Number(l_mcElement._name) + 1;
l_mcElement.gotoAndStop(nRandomItem);
}
}
};
this.Creer_ADSD1 = function (l_mcElement, l_bAlwaysActive, l_sType) {
with (this) {
var l_oADSD;
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
l_oADSD = new ffa.devices.ADSD(nADSD, _parent.ADSD, pt, l_sType, !l_bAlwaysActive, BG, Pers, 15, 60);
nADSD++;
oScreen.registerADSD(l_oADSD);
}
}
};
this.Creer_ADSD2 = function (l_mcElement, l_bAlwaysActive, l_sType) {
with (this) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
l_oADSD = new ffa.devices.ADSD(nADSD, _parent.ADSD, pt, l_sType, !l_bAlwaysActive, BG, Pers, 27, 95);
nADSD++;
oScreen.registerADSD(l_oADSD);
}
};
this.Creer_GWT = function (l_mcElement, l_sType) {
var oScreen;
var l_sDepth;
with (this) {
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
oScreen.registerGWT(pt);
}
}
};
this.Creer_Tatoo = function (l_mcElement, l_sType) {
var oScreen;
var l_sDepth;
with (this) {
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
l_oTatoo = new ffa.ennemy.Tatoo(_parent.Tatoo, pt, BG, Pers, _parent.Collider, oScreen, false);
oScreen.registerTatoo(l_oTatoo);
}
}
};
this.CreerLydia = function (l_mcElement) {
this.Lydia = new ffa.boss.Lydia(l_mcElement, {x:11850, y:560}, this.BG, this.Pers, _parent.Collider);
};
this.CreerShuttle = function (l_mcElementFront, l_mcElementParallax) {
this.Shuttle = new ffa.boss.SpaceShuttle(l_mcElementFront, l_mcElementParallax, {x:30000, y:450}, this.BG, this.Pers, _parent.Collider);
};
this.CreerEasterEgg = function (l_mcElementFront, l_mcElementParallax) {
this.EasterEgg = new ffa.EasterEgg(l_mcElementFront, l_mcElementParallax, {x:30000, y:450}, this.BG, this.Pers, _parent.Collider);
};
this.CreerFreakShow = function (l_mcElement) {
this.Freakshow = new ffa.boss.Freakshow(l_mcElement, {x:0, y:0}, this.BG, this.Pers, _parent.Collider);
};
this.CreerObstacle = function (pt, l_nWidth, l_nHeight) {
var _local3 = _parent.Collider.Wall;
var _local4 = _parent.Collider.Sol;
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
_local4.moveTo(pt.x, pt.y);
_local4.beginFill(16711935);
_local4.lineTo(pt.x, pt.y + 30);
_local4.lineTo(pt.x + l_nWidth, pt.y + 30);
_local4.lineTo(pt.x + l_nWidth, pt.y);
_local4.lineTo(pt.x, pt.y);
_local3.moveTo(pt.x, pt.y);
_local3.beginFill(16711680);
_local3.lineTo(pt.x, pt.y + l_nHeight);
_local3.lineTo(pt.x + l_nWidth, pt.y + l_nHeight);
_local3.lineTo(pt.x + l_nWidth, pt.y);
_local3.lineTo(pt.x, pt.y);
};
this.CreerPlateforme = function (pt, l_nWidth) {
var _local3 = _parent.Collider.Sol;
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
_local3.moveTo(pt.x, pt.y);
_local3.beginFill(16711935);
_local3.lineTo(pt.x, pt.y + 30);
_local3.lineTo(pt.x + l_nWidth, pt.y + 30);
_local3.lineTo(pt.x + l_nWidth, pt.y);
_local3.lineTo(pt.x, pt.y);
};
this.addDialog = function (l_mcElement, l_sDialog, l_sCharacter, l_sFace) {
var _local2 = this.BG.nextScreenGroup.getScreen(l_mcElement._name);
_local2.addDialog({content:l_sDialog, character:l_sCharacter, face:l_sFace}, this.oDialog);
};
this.addBeatThemUp = function (l_mcElement, l_sDialog, l_sCharacter, l_sFace) {
var _local2 = this.BG.nextScreenGroup.getScreen(l_mcElement._name);
_local2.addBeatThemUp();
};
this.replaceTile = function (l_mcElement) {
var _local2 = l_mcElement._name;
var _local4;
var _local5 = Math.round(l_mcElement._x / nTileDistance);
var nTileDistance = 599;
var _local6;
if (_local2.indexOf("_alt") != -1) {
_local4 = _local2.indexOf("_alt");
l_mcElement._x = (Number(_local2.slice(0, _local4)) - 1) * nTileDistance;
l_mcElement._y = nTileDistance;
} else {
l_mcElement._x = (Number(_local2) - 1) * nTileDistance;
l_mcElement._y = nTileDistance;
}
if (BG.currentScreenGroup.checkReady(_local2) && ((this.sLevelState == "") || (this.sLevelState == "ResumeLevel"))) {
if (this.sLevelState == "") {
this.initLevel();
} else if (this.sLevelState == "ResumeLevel") {
this.resumeLevelReady();
}
trace("ready! go!");
}
};
this.CreerFloor1 = function (l_mcElement, l_bBeatThemUp) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement, l_bBeatThemUp);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 600, pt.y + 40);
mcGround.lineTo(pt.x + 600, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor2a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor2b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + 200;
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor2c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + 300;
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor3a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor3b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y);
mcGround.lineTo(pt.x, pt.y);
pt.x = pt.x + 400;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor3c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y);
mcGround.lineTo(pt.x, pt.y);
pt.x = pt.x + 440;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor4a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor4b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor4c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor5 = function (l_mcElement) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
}
};
this.FirstAidKit = function (l_oScreen) {
var _local3 = new ffa.EnergyBonus("FirstAidKit", {x:(l_oScreen.__get__id() * 600) - 150, y:300}, _parent, this.BG, this.Pers, _parent.Collider);
l_oScreen.addBonus(_local3);
};
this.LifeBonus = function (l_oScreen, l_oRule) {
if (!this.LifeBonusTaken) {
var _local3 = new ffa.EnergyBonus("Life", {x:(l_oScreen.__get__id() * 600) - 200, y:l_oRule.y}, _parent, this.BG, this.Pers, _parent.Collider);
_local3.resume();
l_oScreen.addBonus(_local3);
}
};
this.doAfterDialog = function () {
switch (this.sLevelState) {
case "init" :
if (nLevel == 1) {
this.switchControlMode("Game");
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
} else if (nLevel == 2) {
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
} else if (nLevel == 3) {
this.switchControlMode("Pause");
this.Freakshow.initFirstAppear();
this.Freakshow.addListener(this);
}
break;
case "levelStart" :
trace("Wait for level start!");
break;
case "talk" :
this.Freakshow.initFirstDisappear();
break;
case "ready" :
this.oOverlays.setState("Level" + this.nLevel);
break;
case "Complete" :
break;
case "Boss" :
this.switchControlMode("Pause");
break;
case "CollectGem" :
_global.Gem.destroy();
this.switchControlMode("Pause");
l_aDialog = ffa.DialogData.getDialog(nLevel, "boss_end");
this.oDialog.startDialog(l_aDialog[0]);
var _local3 = 1;
while (_local3 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local3]);
_local3++;
}
this.sLevelState = "EndLevel";
break;
case "EndLevel" :
endLevel();
break;
default :
if (this.BG.bLoading) {
break;
}
this.broadcastMessage("resume");
this.switchControlMode("Game");
}
};
this.endLevel = function () {
this.broadcastMessage("pause", true);
_parent._parent.hud.gotoAndStop("Off");
_parent._parent.menu.gotoAndStop("Off");
_global.C.oScore.setTimeElapsed(_global.Game.oTimer.timeElapsed);
_global.C.oScore.setLifeRemaining(this.Pers.oLifeBar.getEnergy(), this.Pers.oEnergyBar.getEnergy());
_parent._parent.levelStats.gotoAndStop("Level" + nLevel);
_global.C.oScore.showStats(_parent._parent.levelStats);
};
this.LevelStartOverlays = function (l_oScreen, l_oRule) {
this.sLevelState = "levelStart";
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
this.screenToNotify = l_oScreen;
};
this.FreakshowWarpedIn = function () {
switch (this.sLevelState) {
case "init" :
l_aDialog = ffa.DialogData.getDialog(nLevel, "1_mid");
this.oDialog.startDialog(l_aDialog[0]);
var _local2 = 1;
while (_local2 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local2]);
_local2++;
}
this.sLevelState = "talk";
break;
default :
}
};
this.FreakshowAttack = function () {
this.Freakshow.initShot("Pink");
};
this.FreakshowTakeGem = function () {
this.Freakshow.initTakeGem();
};
this.FreakshowInitCombatPos = function () {
this.Freakshow.initCombatPos();
};
this.FreakshowWarpedOut = function () {
switch (this.sLevelState) {
case "talk" :
l_aDialog = ffa.DialogData.getDialog(nLevel, "1_end");
this.oDialog.startDialog(l_aDialog[0]);
var _local2 = 1;
while (_local2 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local2]);
_local2++;
}
this.sLevelState = "ready";
break;
default :
}
};
this.onFreakshowTookGem = function () {
trace("RunAuto");
this.Pers.PosXAuto = this.FreakShow.nPosX - 200;
this.Pers.Dir = "D";
this.Pers.Etat = "RunAuto";
};
this.initBossFight = function () {
this.sLevelState = "Boss";
};
this.startLydiaFight = function () {
this.oOverlays.setState("Lydia");
this.bossSequence = true;
};
this.HideHint = function () {
_parent._parent.LydiaHint.gotoAndStop(2);
};
this.startShuttleFight = function () {
this.oOverlays.setState("Shuttle");
};
this.startFreakshowFight = function () {
this.oOverlays.setState("Freakshow");
this.bossSequence = true;
};
this.LockDannyAndCrouch = function () {
this.Pers.initAutoCrouch();
this.Shuttle.prepareCrash();
};
this.SpaceShuttleCrash = function () {
this.Shuttle.prepareCrash();
this.KeyListener = undefined;
};
this.SpaceShuttleInit = function () {
l_mcShuttleFront = _parent.GWT.attachMovie("Shuttle", "Shuttle", 100);
l_mcShuttleParallax = _parent.Parallax.attachMovie("Shuttle", "Shuttle", 100, {_xscale:25, _yscale:25});
this.CreerShuttle(l_mcShuttleFront, l_mcShuttleParallax);
};
this.SpaceShuttlePassBackground = function () {
this.Shuttle.initParallaxPass("Up");
this.sLevelState = "Boss";
this.switchControlMode("Pause");
this.broadcastMessage("pause");
};
this.SpaceShuttlePassFront = function () {
this.Shuttle.initFrontPass();
};
this.LydiaComplete = function () {
_parent._parent.LydiaHint.gotoAndStop(3);
trace("_parent.LydiaHint: " + _parent._parent.LydiaHint);
this.switchControlMode("Game");
this.broadcastMessage("resume");
};
this.ShuttleComplete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.Pers.Etat = "Idle";
};
this.FreakshowComplete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.Pers.Etat = "Idle";
this.Freakshow.initCombat();
};
this.Level1Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.Level2Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.Level3Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.BeatThemUpComplete = function () {
_parent._parent.missedShot.gotoAndPlay("Shoot");
};
this.onGWTDie = function (nOrder, bAddPoint) {
if (bAddPoint) {
_global.C.oScore.addEnnemyBeated(1);
}
};
this.onTatooDie = function () {
_global.C.oScore.addEnnemyBeated(1);
};
this.destroyAll = function () {
this.broadcastMessage("destroy");
};
}
onClipEvent (enterFrame) {
if (this.doOnNextFrame) {
this.doOnNextFrame();
}
if (!this.Pers.bPause) {
if (this.bSpaceSkip) {
oDialog.updateTimeDelay();
if (GlobalKeyListener.Next && (oDialog.timeDelay <= 0)) {
if (!oDialog.nextQueue()) {
doAfterDialog();
}
}
}
if (Pers.Dir != Pers.DirOld) {
Pers.ChangeDir(Pers.Dir);
}
if (Pers.Etat != Pers.EtatOld) {
Pers.setState(Pers.Etat);
}
this.Pers.Actions();
this.BG.actions();
} else if (this.Pers.bPause && (this.BG.bLoading)) {
trace("loading?");
this.BG.actions();
}
if ((GlobalKeyListener.EasterEgg && (this.bEasterEgg)) && (this.bEasterEggRelease)) {
_global.Game.EasterEgg.initPass();
} else if (GlobalKeyListener.EasterEgg && (!bEasterEgg)) {
this.bEasterEgg = true;
this.bEasterEggRelease = false;
this.easterEggCount = 0;
} else if (bEasterEgg) {
if (this.easterEggCount < 15) {
this.easterEggCount++;
} else {
this.bEasterEgg = false;
}
if (!GlobalKeyListener.EasterEgg) {
this.bEasterEggRelease = true;
}
}
}
Instance of Symbol 1684 MovieClip "Pers" in Symbol 2283 MovieClip Frame 1
onClipEvent (load) {
_parent.Control.CreerPers(this._x, this._y);
this.gotoAndStop("D");
_global.Game.Pers.Etat = "Sleep";
_global.Game.Pers.setState("Idle");
}
Symbol 2283 MovieClip Frame 2
stop();
_global.C.beginLevel();
Instance of Symbol 2282 MovieClip "Bg" in Symbol 2283 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.BG = new ffa.background.MainScroller(_parent.Bg, _parent._x, _parent._y, _parent.Control.Pers);
_parent.Control.BG.resetAllScreen();
var l_oGroup;
l_oGroup = new ffa.background.ScreenGroup("LEVEL 2 - GROUP 1", "Normal");
l_oGroup.init(1, 20, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:0, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:100, max:150, screen:20, level:2, lockedScreen:20});
l_oGroup.addSpecialRule({type:"BeatThemUp", min:0, max:400, screen:20, level:2});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:20, level:2});
l_oGroup.addBeatThemUpRule({type:"GWT", min:4, max:4, screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"], screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"depth", min:0, max:4, depth:"Parallax", screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"simultaneous", min:2, max:2, screen:20}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 2 - GROUP 2", "Normal");
l_oGroup.init(20, 40, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:100, max:150, screen:40, level:2, lockedScreen:40});
l_oGroup.addSpecialRule({type:"BeatThemUp", min:0, max:400, screen:40, level:1});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:40, level:1});
l_oGroup.addBeatThemUpRule({type:"GWT", min:5, max:5, screen:40}, "GWT");
l_oGroup.addBeatThemUpRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"], screen:40}, "GWT");
l_oGroup.addBeatThemUpRule({type:"depth", min:0, max:0, depth:"Parallax", screen:40}, "GWT");
l_oGroup.addBeatThemUpRule({type:"simultaneous", min:2, max:2, screen:40}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 2 - GROUP 3", "Normal");
l_oGroup.init(40, 51, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:2}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LifeBonus", min:150, max:250, y:-300, screen:49, level:2});
l_oGroup.addSpecialRule({type:"LockCamera", min:50, max:400, screen:51, level:2, lockedScreen:51});
l_oGroup.addSpecialRule({type:"SpaceShuttleInit", screen:51, level:2});
l_oGroup.addSpecialRule({type:"SpaceShuttlePassBackground", screen:51, level:2});
l_oGroup.addSpecialRule({type:"Wait", screen:51, level:2});
l_oGroup.addSpecialRule({type:"Dialog", screen:51, level:2});
l_oGroup.addSpecialRule({type:"SpaceShuttlePassFront", screen:51, level:2});
l_oGroup.addSpecialRule({type:"startShuttleFight", screen:51, level:2});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:51, level:2});
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 1 - GROUP 4", "BOSS");
l_oGroup.init(51, 70, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:50, max:400, screen:70, level:2, lockedScreen:70});
l_oGroup.addSpecialRule({type:"SpaceShuttleCrash", screen:70, level:2});
l_oGroup.addSpecialRule({type:"Wait", screen:70, level:2});
l_oGroup.addSpecialRule({type:"BossSequenceEnd", screen:70, level:2});
_parent.Control.BG.addScreenGroup(l_oGroup);
_parent.Control.BG.activateScreenGroup();
}
Instance of Symbol 2040 MovieClip "Collider" in Symbol 2283 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
}
Symbol 2287 MovieClip Frame 2
var i = 1;
while (i < 10) {
bitmap_00.duplicateMovieClip("bitmap_" + i, i, {_x:i * 2399});
i++;
}
stop();
Symbol 2296 MovieClip Frame 1
_parent._parent._parent.Control.Creer_O3b(this, this._x, this._y);
stop();
Symbol 2297 MovieClip Frame 3
_parent._parent._parent.Control.Creer_P4b(this, this._x, this._y);
stop();
Symbol 2299 MovieClip Frame 1
stop();
Symbol 2299 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2299 MovieClip Frame 3
stop();
Symbol 2300 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O1a(this, this._x, this._y);
stop();
Symbol 2300 MovieClip Frame 3
_parent._parent._parent.Control.Creer_O1a(this, this._x, this._y);
stop();
Symbol 2305 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P4a(this, this._x, this._y);
stop();
Symbol 2307 MovieClip Frame 1
stop();
Instance of Symbol 2300 MovieClip in Symbol 2307 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Instance of Symbol 2300 MovieClip in Symbol 2307 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 2307 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2307 MovieClip Frame 3
stop();
Symbol 2309 MovieClip Frame 1
stop();
Symbol 2309 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2309 MovieClip Frame 3
stop();
Symbol 2311 MovieClip Frame 1
stop();
Symbol 2311 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2311 MovieClip Frame 3
stop();
Symbol 2313 MovieClip Frame 1
stop();
Symbol 2313 MovieClip Frame 2
_parent._parent.Control.CreerFloor5(this, this._x, this._y);
stop();
Symbol 2313 MovieClip Frame 3
stop();
Symbol 2317 MovieClip Frame 1
stop();
Symbol 2317 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2317 MovieClip Frame 3
stop();
Symbol 2327 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2a(this, this._x, this._y);
stop();
Symbol 2329 MovieClip Frame 1
stop();
Instance of Symbol 2300 MovieClip in Symbol 2329 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Instance of Symbol 2300 MovieClip in Symbol 2329 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Instance of Symbol 2300 MovieClip in Symbol 2329 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 2329 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2329 MovieClip Frame 3
stop();
Symbol 2342 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O2b(this, this._x, this._y);
stop();
Symbol 2344 MovieClip Frame 1
stop();
Symbol 2344 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2344 MovieClip Frame 3
stop();
Symbol 2363 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2b(this);
stop();
Symbol 2365 MovieClip Frame 1
stop();
Symbol 2365 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2365 MovieClip Frame 3
stop();
Symbol 2377 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P2c(this);
stop();
Symbol 2381 MovieClip Frame 2
_parent._parent._parent.Control.Creer_O1b(this, this._x, this._y);
stop();
Symbol 2383 MovieClip Frame 1
stop();
Symbol 2383 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 2383 MovieClip Frame 3
stop();
Symbol 2385 MovieClip Frame 1
stop();
Symbol 2385 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2385 MovieClip Frame 3
stop();
Symbol 2386 MovieClip Frame 1
_parent._parent._parent.Control.Creer_ADSD1(this, false, "combined");
Symbol 2386 MovieClip Frame 2
stop();
Symbol 2388 MovieClip Frame 1
stop();
Symbol 2388 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2388 MovieClip Frame 3
stop();
Symbol 2399 MovieClip Frame 1
stop();
Symbol 2399 MovieClip Frame 2
_parent._parent.Control.CreerFloor3c(this);
stop();
Symbol 2399 MovieClip Frame 3
stop();
Symbol 2401 MovieClip Frame 1
stop();
Symbol 2401 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this);
stop();
Symbol 2401 MovieClip Frame 3
stop();
Symbol 2415 MovieClip Frame 2
_parent._parent._parent.Control.Creer_P3a(this, this._x, this._y);
stop();
Symbol 2417 MovieClip Frame 1
stop();
Symbol 2417 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, false);
stop();
Symbol 2417 MovieClip Frame 3
stop();
Symbol 2419 MovieClip Frame 1
stop();
Symbol 2419 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2419 MovieClip Frame 3
stop();
Symbol 2421 MovieClip Frame 1
stop();
Symbol 2421 MovieClip Frame 2
_parent._parent.Control.CreerFloor4a(this, this._x, this._y);
stop();
Symbol 2421 MovieClip Frame 3
stop();
Symbol 2423 MovieClip Frame 1
stop();
Instance of Symbol 2300 MovieClip in Symbol 2423 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 2423 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2423 MovieClip Frame 3
stop();
Symbol 2425 MovieClip Frame 1
stop();
Symbol 2425 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2425 MovieClip Frame 3
stop();
Symbol 2427 MovieClip Frame 1
stop();
Symbol 2427 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 2427 MovieClip Frame 3
stop();
Symbol 2429 MovieClip Frame 1
stop();
Symbol 2429 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2429 MovieClip Frame 3
stop();
Symbol 2431 MovieClip Frame 1
stop();
Instance of Symbol 2300 MovieClip in Symbol 2431 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 2431 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2431 MovieClip Frame 3
stop();
Symbol 2436 MovieClip Frame 1
stop();
Symbol 2436 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2436 MovieClip Frame 3
stop();
Symbol 2438 MovieClip Frame 1
stop();
Symbol 2438 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2438 MovieClip Frame 3
stop();
Symbol 2440 MovieClip Frame 1
stop();
Symbol 2440 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 2440 MovieClip Frame 3
stop();
Symbol 2442 MovieClip Frame 1
stop();
Symbol 2442 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2442 MovieClip Frame 3
stop();
Symbol 2447 MovieClip Frame 1
stop();
Symbol 2447 MovieClip Frame 2
_parent._parent.Control.CreerFloor3c(this, this._x, this._y);
stop();
Symbol 2447 MovieClip Frame 3
stop();
Symbol 2449 MovieClip Frame 1
stop();
Symbol 2449 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2449 MovieClip Frame 3
stop();
Symbol 2451 MovieClip Frame 1
stop();
Instance of Symbol 2300 MovieClip in Symbol 2451 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Instance of Symbol 2300 MovieClip in Symbol 2451 MovieClip Frame 1
onClipEvent (load) {
this.bTop = true;
}
Symbol 2451 MovieClip Frame 2
_parent._parent.Control.CreerFloor4a(this, this._x, this._y);
stop();
Symbol 2451 MovieClip Frame 3
stop();
Symbol 2453 MovieClip Frame 1
stop();
Symbol 2453 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, false);
stop();
Symbol 2453 MovieClip Frame 3
stop();
Symbol 2455 MovieClip Frame 1
stop();
Symbol 2455 MovieClip Frame 2
_parent._parent.Control.CreerFloor3a(this, this._x, this._y);
stop();
Symbol 2455 MovieClip Frame 3
stop();
Symbol 2457 MovieClip Frame 1
stop();
Symbol 2457 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y);
stop();
Symbol 2457 MovieClip Frame 3
stop();
Symbol 2458 MovieClip Frame 2
stop();
Instance of Symbol 1387 MovieClip "Control" in Symbol 2676 MovieClip Frame 1
onClipEvent (load) {
function ObjPers(PosX, PosY) {
AsBroadcaster.initialize(this);
this.oEnergyBar = new ffa.Bar();
this.oLifeBar = new ffa.Bar();
this.nGetHitLeft = 0;
this.nGetHitRight = 0;
this.nGetHitTop = 0;
this.aCurrentCombo = new Array();
this.Nom = "Pers";
this.Etat = "Idle";
this.EtatOld = "Idle";
this.Dir = "D";
this.DirOld = "D";
this.Point = _global.C.Score;
this.Life = _global.C.Life;
this.SpdXMinion = 3;
this.SpdXNormal = 15;
this.SpdXBase = this.SpdXNormal;
this.SpdXNow = 0;
this.MoveX = 0;
this.MoveY = 0;
this.PosX = PosX;
this.PosY = PosY;
this.PosXAuto = 0;
this.TrueX = PosX;
this.TrueY = PosY;
this.FrontX = 0;
this.FrontY = 0;
this.BottomFrontX = 0;
this.BottomBackX = 0;
this.BackX = 0;
this.HitGrdPoint = 0;
this.WallHitBloc = 2;
this.SpdYNow = 0;
this.SpdYUp = 1.5;
this.SpdYMax = 30;
this.SpdYFall = 2;
this.SpdXHitBase = 5;
this.SpdYHitBase = -10;
this.SpdStartJump = -17;
this.SolOut = 2;
this.SolHitMin = 5;
this.MaxSol = 3;
this.HitGrd = false;
this.SolForJump = 6;
this.DistYFall = 0;
this.DistYLand = 100;
this.CanHit = false;
this.CanBeHit = true;
this.FrWalkNow = 1;
this.InPause = false;
this.FrJump = 1;
this.FrFall = 14;
this.FrLand = 15;
this.FrGetHit = 10;
this.FrGetHitCount = 0;
this.FrBoomTir = 9;
this.FrFinBoom = 6;
this.FrDead = 140;
this.FrDeadCount = 0;
this.aCharacter = ["Danny", "Daniel"];
this.ICharacter = 1;
this.Perso = this.aCharacter[this.ICharacter];
this.updatePerso();
this.LgGetShootX = 20;
this.LgGetShootUp = 72;
this.LgGetShootUpBas = 44;
this.FrInvincibleCount = 0;
this.FrInvincible = 60;
this.Invincible = false;
this.FrSwitchCharacter = 15;
this.FrSwitchCharacterCount = 0;
this.nFrCanDoubleJump = 5;
this.nFrCanDoubleJumpCount = 0;
this.bCanSwitch = true;
this.nHitCombo = 0;
this.bJumpRelease = true;
this.SpdXBaseJumpKick = 20;
this.bComboCheck = false;
this.nFrDelayCombo = 15;
this.nFrDelayComboCount = 0;
this.bCanAttack = true;
this.bAttackRelease = true;
this.bSkipDie = false;
this.mcHitGetHurt = null;
this.HitPointX = 0;
this.HitPointY = 0;
this.BASE_DELAY = 15;
BASE_DELAY = this.BASE_DELAY;
this.NO_DELAY = -1;
NO_DELAY = this.NO_DELAY;
this.nComboSequence = 0;
this.aComboList = new Array();
var _local4;
var _local20;
this.bPause = false;
this.bFreak = false;
this.cDanny = new Color(_parent.Pers);
this.ctOriginal = this.cDanny.getTransform();
this.ctFreak = {ra:50, rb:128, ga:50, gb:51, ba:50, bb:128, aa:100, ab:0};
this.FrFreak = 300;
this.FrFreakCount = 0;
_local4 = new Array({Action:"RightPunch", Hit:false, Perso:"All", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"Punch"}, {Action:"LeftPunch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"RightPunchStill", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielSpinPunch = new Array({Action:"RightPunch", Hit:true, Perso:"Danny", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"SpinPunch"}, {Action:"SwitchDaniel", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"ComboSpinPunch", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielHardFrontKick = new Array({Action:"RightPunch", Hit:true, Perso:"Daniel", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"HardFrontKick"}, {Action:"LeftPunch", Hit:true, MaxFrameDelay:BASE_DELAY}, {Action:"Crouch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"HardFrontKick", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDanielMegaChargedUppercut = new Array({Action:"RightPunch", Hit:true, Perso:"Danny", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"MegaChargedUppercut"}, {Action:"LeftPunch", Hit:true, MaxFrameDelay:BASE_DELAY}, {Action:"Crouch", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"MegaChargedUppercut", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDannyBlast = new Array({Action:"RightPunch", Hit:true, Perso:"Daniel", noIdle:false, MaxFrameDelay:BASE_DELAY, Name:"DannyBlast"}, {Action:"SwitchDanny", Hit:false, MaxFrameDelay:BASE_DELAY}, {Action:"ComboBlast", Hit:false, MaxFrameDelay:NO_DELAY});
aComboDannyUppercut = new Array({Action:"Crouch", Hit:false, Perso:"Danny", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"DannyUppercut"}, {Action:"Uppercut", Hit:true, MaxFrameDelay:NO_DELAY});
aComboDanielLowKick = new Array({Action:"Crouch", Hit:false, Perso:"Daniel", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"DannyLowKick"}, {Action:"LowKick", Hit:true, MaxFrameDelay:NO_DELAY});
aComboJumpKick = new Array({Action:"Jump", Hit:false, Perso:"All", noIdle:true, MaxFrameDelay:NO_DELAY, Name:"JumpKick"}, {Action:"JumpKick", Hit:true, MaxFrameDelay:NO_DELAY});
this.aComboList.push(_local4);
this.aComboList.push(aComboDanielSpinPunch);
this.aComboList.push(aComboDanielHardFrontKick);
this.aComboList.push(aComboDannyBlast);
this.aComboList.push(aComboDanielMegaChargedUppercut);
this.aComboList.push(aComboDannyUppercut);
this.aComboList.push(aComboDanielLowKick);
this.aComboList.push(aComboJumpKick);
this.aComboSelected = new Array();
this.FrCombo = 0;
}
_global.Game = this;
this.GlobalKeyListener = new com.sarbakan.utils.KeyManager();
GlobalKeyListener.addKeyListener(39, "R");
GlobalKeyListener.addKeyListener(37, "L");
GlobalKeyListener.addKeyListener(40, "Dw");
GlobalKeyListener.addKeyListener(38, "Up");
GlobalKeyListener.addKeyListener(71, "Ghost");
GlobalKeyListener.addKeyListener(70, "EasterEgg");
GlobalKeyListener.addKeyListener(32, "Attack");
GlobalKeyListener.addKeyListener(32, "Next");
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
G_CheckPause = function () {
if ((Pers.Etat != "Die") and (Pers.Etat != "Dead")) {
if (G_PauseOut && (!G_Pause)) {
G_Pause = true;
_parent.ControlBall.stop();
_parent._parent.Popup.gotoAndStop("Pause");
if (_global.C.SoundActive) {
_global.SoundCTRL.muteAllSounds();
}
_global.C.DesactivateHud();
} else if ((G_Resume == true) and (G_Pause == true)) {
G_PauseOut = false;
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
KeyListener.Up = false;
KeyListener.UpRelease = true;
KeyListener.Dw = false;
KeyListener.L = false;
KeyListener.R = false;
KeyListener.X = false;
KeyListener.Z = false;
KeyListener.Sp = false;
Music.VolDest = 70;
Music.Etat = "FadeIn";
G_Pause = false;
G_Resume = false;
_parent._parent.Popup.gotoAndStop(1);
if (_global.C.SoundActive) {
_global.SoundCTRL.unmuteAllSounds();
}
_global.C.ActivateHud();
if (_parent.ControlBall._currentframe != 1) {
_parent.ControlBall.play();
}
}
}
};
CreerPers = function (PosX, PosY) {
this.Pers = new ObjPers(PosX, PosY);
this.Pers.oLifeBar.init(_parent._parent.hud.lifeBar, 3, null);
this.Pers.oEnergyBar.init(_parent._parent.hud.energyBar, 10, this.Pers.oLifeBar);
this.Pers.oLifeBar.setEnergy(_global.C.Life);
_global.Game.addListener(this.Pers);
};
ObjPers.prototype.resurrect = function () {
with (this) {
Etat = "Idle";
CanBeHit = true;
CanHit = false;
oEnergyBar.setEnergy(10);
FrDeadCount = 0;
}
};
ObjPers.prototype.CharacterSwitch = function () {
with (this) {
if ((Etat != "Die") && (Etat != "Hurt")) {
if (ICharacter == 0) {
ICharacter = 1;
} else if (ICharacter == 1) {
ICharacter = 0;
}
Perso = aCharacter[ICharacter];
addToComboList("Switch" + Perso, false);
updatePerso();
_parent.Pers.Obj.Transform.gotoAndPlay("Transform");
_global.SoundCTRL.playSound("Danny_Ghost", 90, 0);
}
}
};
ObjPers.prototype.HeroChange = function (NewHero) {
with (this) {
Perso = NewHero;
updatePerso();
}
};
ObjPers.prototype.Idle = function () {
with (this) {
KeepDeadPos = true;
if (oEnergyBar.getEnergy() > 0) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckJump();
CheckCrouch();
this["CheckAttack" + Perso]();
CheckGetFire();
CheckDie();
} else {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
}
};
ObjPers.prototype.getBonus = function (l_sEnergyType) {
with (this) {
if (l_sEnergyType == "Life") {
oLifeBar.addEnergy(1);
} else {
oEnergyBar.setEnergy("Full");
}
}
};
ObjPers.prototype.Run = function () {
with (this) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckJump();
CheckCrouch();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
}
};
ObjPers.prototype.RunAuto = function () {
with (this) {
SetSpdXAuto();
SetMoveX();
CheckHitGrd();
CheckJump();
CheckCrouch();
CheckSol();
CheckFall();
MovePers();
}
};
ObjPers.prototype.DoubleJumpStart = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
Etat = "DoubleJumpIdle";
}
}
};
ObjPers.prototype.DoubleJumpIdle = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
MovePers();
this["CheckAttack" + Perso]();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "DoubleJumpFall";
DistYFall = 0;
}
}
};
ObjPers.prototype.DoubleJumpFall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
SpdXNow = 0;
MoveX = 0;
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "JumpLanding";
} else {
Etat = "Idle";
}
}
CheckHole();
trace("DJFall");
}
};
ObjPers.prototype.JumpKickFall = function () {
with (this) {
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
SpdXNow = 0;
MoveX = 0;
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "JumpLanding";
} else {
Etat = "Idle";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpStart = function () {
with (this) {
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
CheckDoubleJump();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
SpdYNow = SpdStartJump;
Etat = "JumpIdle";
}
}
};
ObjPers.prototype.JumpIdle = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckDoubleJump();
MovePers();
this["CheckAttack" + Perso]();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.Fall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDoubleJump();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
if ((DistYFall >= DistYLand) || (Math.abs(SpdXNow) < 5)) {
Etat = "JumpLanding";
SpdXNow = 0;
MoveX = 0;
} else {
Etat = "Run";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpLanding = function () {
with (this) {
CheckGetFire();
CheckCrouch();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
if (oEnergyBar.getEnergy() <= 0) {
Etat = "Die";
} else {
Etat = "Idle";
}
}
}
};
ObjPers.prototype.Crouch = function () {
with (this) {
CheckGetFire();
CheckCrouchRelease();
this["CheckAttack" + Perso]();
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
}
};
ObjPers.prototype.RightPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.HardFrontKick = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "JumpLanding";
CheckGetFire();
}
}
};
ObjPers.prototype.MegaChargedUppercut = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Crouch";
CheckGetFire();
}
}
};
ObjPers.prototype.RightPunchStill = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
if (nFrPunchStill == 0) {
Etat = "Idle";
} else {
_parent.Pers.Obj.Etat.stop();
nFrPunchStill--;
}
CheckGetFire();
}
}
};
ObjPers.prototype.LeftPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.LowKick = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Crouch";
CheckGetFire();
}
}
};
ObjPers.prototype.Uppercut = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.ComboBlast = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.ComboSpinPunch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe == 2) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
CanHit = false;
Etat = "Idle";
CheckGetFire();
}
}
};
ObjPers.prototype.JumpKick = function () {
with (this) {
if (nJumpKickPause == 0) {
if (_parent.Pers.Obj.Etat._currentframe == 1) {
CanHit = true;
}
HitPointX = _parent.Pers.Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = PosX - HitPointX;
} else if (Dir == "D") {
HitPointX = PosX + HitPointX;
}
HitPointY = PosY + _parent.Pers.Obj.HitPoint._y;
CheckGetFire();
SetSpdXJumpKick();
SetMoveX();
CheckWall(BottomFrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(BottomFrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (HitGrd) {
CanHit = false;
Etat = "JumpLanding";
}
CheckHole();
} else {
nJumpKickPause--;
}
}
};
ObjPers.prototype.JumpKickBounce = function () {
with (this) {
CheckGetFire();
SetSpdXJumpKickBounce();
SetMoveX();
CheckWall(BottomFrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(BottomFrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (SpdYNow > 5) {
setState("JumpKickFall");
}
if (HitGrd) {
CanHit = false;
Etat = "JumpLanding";
}
CheckHole();
}
};
ObjPers.prototype.initJumpKickBounce = function () {
with (this) {
CanHit = false;
SpdYNow = SpdYNow - 15;
if (Dir == "G") {
SpdXNow = 10;
} else if (Dir == "D") {
SpdXNow = -10;
}
setState("JumpKickBounce");
}
};
ObjPers.prototype.Hurt = function () {
with (this) {
if (FrGetHitCount >= FrGetHit) {
CheckHitGrd();
Etat = "DoubleJumpFall";
FrGetHitCount = 0;
InvincibleInit();
} else {
FrGetHitCount++;
}
GetHitGeneral();
}
};
ObjPers.prototype.GetHitGeneral = function () {
with (this) {
SetSpdXHit();
CheckWall(BackX, TrueY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDie();
CheckHole();
}
};
ObjPers.prototype.GetHit = function (l_nSpdXHit) {
with (this) {
if (CanBeHit) {
CanHit = false;
CanBeHit = false;
oEnergyBar.looseEnergy(1);
trace("l_nSpdXHit: " + l_nSpdXHit);
if (l_nSpdXHit != undefined) {
SpdXNow = l_nSpdXHit;
} else {
SpdXNow = SpdXHitBase;
}
trace("SpdXNow: " + SpdXNow);
SpdYNow = SpdYHitBase;
Etat = "Hurt";
_global.SoundCTRL.playSound("Danny_Hurt", 40, 0);
GetHitGeneral();
nComboSequence = 0;
}
}
};
ObjPers.prototype.GetFreak = function () {
with (this) {
if (CanBeHit) {
CanHit = false;
CanBeHit = false;
SpdXNow = SpdXHitBase;
SpdYNow = SpdYHitBase;
Etat = "Hurt";
_global.SoundCTRL.playSound("Danny_Hurt", 90, 0);
GetHitGeneral();
initFreakControl();
}
}
};
ObjPers.prototype.initAutoCrouch = function () {
with (this) {
if (HitGrd) {
Etat = "AutoCrouch";
} else {
Etat = "AutoCrouchFall";
trace("Etat: " + Etat);
}
}
};
ObjPers.prototype.AutoCrouch = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
broadcastMessage("readyForShuttle");
}
}
};
ObjPers.prototype.AutoCrouchFall = function () {
with (this) {
SetSpdXJump();
CheckHitGrd();
CheckSol();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe == nFrTotalAnim) {
_parent.Pers.Obj.Etat.stop();
}
if (HitGrd == true) {
Etat = "AutoCrouch";
SpdXNow = 0;
MoveX = 0;
}
}
};
ObjPers.prototype.CheckHole = function () {
with (this) {
if (PosY > 725) {
trace("Hole!!");
setState("Die");
}
}
};
ObjPers.prototype.CheckGetFire = function () {
with (this) {
var NbMinionBall = G_TabMinionBall.length;
if ((NbMinionBall > 0) && (Perso != "TuesdayDisguised")) {
var i = 0;
while (i < NbMinionBall) {
var BallX = _parent.Control[G_TabMinionBall[i]].PosX;
var BallY = _parent.Control[G_TabMinionBall[i]].PosY;
if (((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) && (!Invincible)) {
Etat = "GetFire";
if (_parent.Control[G_TabMinionBall[i]].Dir == "D") {
Dir = "G";
} else if (_parent.Control[G_TabMinionBall[i]].Dir == "G") {
Dir = "D";
}
_parent.Control[G_TabMinionBall[i]].Etat = "Hit";
}
i++;
}
}
}
};
ObjPers.prototype.InvincibleInit = function () {
with (this) {
Invincible = true;
}
};
ObjPers.prototype.InvincibleEnd = function () {
with (this) {
Invincible = false;
FrInvincibleCount = 0;
_parent.Pers._visible = true;
}
};
ObjPers.prototype.InvincibleCheck = function () {
with (this) {
if (Invincible) {
if (FrInvincibleCount >= FrInvincible) {
InvincibleEnd();
CanBeHit = true;
} else {
FrInvincibleCount++;
if ((FrInvincibleCount % 3) == 0) {
_parent.Pers._visible = !_parent.Pers._visible;
}
}
}
}
};
ObjPers.prototype.Die = function () {
with (this) {
CanBeHit = false;
if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) {
if (FrDeadCount == 0) {
_parent.Pers.Obj.Etat.stop();
}
FrDeadCount++;
if (FrDeadCount >= 30) {
_global.Game.onPlayerDie();
oLifeBar.looseEnergy(1);
}
}
}
};
ObjPers.prototype.Sleep = function () {
};
ObjPers.prototype.SetSpdXHit = function () {
with (this) {
MoveX = SpdXNow;
if (SpdXNow > 0) {
SpdXNow = SpdXNow * 0.7;
}
if (Dir eq "D") {
MoveX = MoveX * -1;
}
}
};
ObjPers.prototype.SetSpdX = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Run";
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(FrontX - WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Run";
SpdXNow = SpdXBase * -1;
}
} else {
Etat = "Idle";
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXAuto = function () {
with (this) {
if ((PosXAuto >= PosX) && (Dir == "D")) {
Dir = "D";
Etat = "RunAuto";
SpdXNow = SpdXBase;
} else if ((PosXAuto <= PosX) && (Dir == "G")) {
Dir = "G";
Etat = "RunAuto";
SpdXNow = SpdXBase * -1;
} else {
Etat = "Idle";
broadcastMessage("runAutoComplete");
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJump = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase * -1;
}
} else {
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJumpKick = function () {
with (this) {
if (Dir == "G") {
if (SpdXNow < -5) {
SpdXNow = SpdXNow + 2;
} else {
SpdXNow = -5;
}
} else if (Dir == "D") {
if (SpdXNow > 5) {
SpdXNow = SpdXNow - 2;
} else {
SpdXNow = 5;
}
}
}
};
ObjPers.prototype.SetSpdXJumpKickBounce = function () {
with (this) {
if (Dir == "G") {
if (SpdXNow < 10) {
SpdXNow = SpdXNow + 2;
} else {
SpdXNow = 10;
}
} else if (Dir == "D") {
if (SpdXNow > -10) {
SpdXNow = SpdXNow - 2;
} else {
SpdXNow = -10;
}
}
}
};
ObjPers.prototype.SetMoveX = function () {
with (this) {
MoveX = SpdXNow;
}
};
ObjPers.prototype.CheckWall = function (CoordX, CoordY) {
with (this) {
if (MoveX != 0) {
if (MoveX > 0) {
var WallStop = WallHitBloc;
} else {
var WallStop = (-1 * WallHitBloc);
}
var WallHit1 = (MoveX / 3);
var WallHit2 = (WallHit1 * 2);
var WallHit3 = (WallHit1 * 4);
if (_parent.Collider.Wall.hitTest(CoordX + WallStop, CoordY, true)) {
MoveX = 0;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit1, CoordY, true)) {
MoveX = WallHitBloc;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit2, CoordY, true)) {
MoveX = WallHit1;
} else if (_parent.Collider.Wall.hitTest(CoordX + WallHit3, CoordY, true)) {
MoveX = WallHit2;
} else if (_parent.Collider.Wall.hitTest(CoordX + MoveX, CoordY, true)) {
MoveX = WallHit2;
}
}
}
};
ObjPers.prototype.CheckCeil = function () {
with (this) {
if (MoveY != 0) {
if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) {
MoveY = 0;
SpdYNow = 0;
Etat = "Fall";
DistYFall = 0;
}
}
}
};
ObjPers.prototype.CheckJump = function () {
with (this) {
if ((!KeyListener.Up) && (!bJumpRelease)) {
bJumpRelease = true;
}
if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) {
bJumpRelease = false;
if (Etat == "Run") {
SpdYNow = SpdStartJump;
Etat = "JumpIdle";
_global.SoundCTRL.playSound("Danny_Jump", 30, 0);
} else {
_global.SoundCTRL.playSound("Danny_Jump", 30, 0);
Etat = "JumpStart";
}
nFrCanDoubleJumpCount = nFrCanDoubleJump;
}
}
};
ObjPers.prototype.CheckDoubleJump = function () {
with (this) {
if ((!KeyListener.Up) && (!bJumpRelease)) {
bJumpRelease = true;
}
if (nFrCanDoubleJumpCount == 0) {
if ((KeyListener.Up == true) && (bJumpRelease)) {
_global.SoundCTRL.playSound("Danny_Jump", 20, 0);
Etat = "DoubleJumpStart";
SpdYNow = SpdStartJump;
}
} else {
nFrCanDoubleJumpCount--;
}
}
};
ObjPers.prototype.CheckCrouch = function () {
with (this) {
if ((((KeyListener.Dw && (HitGrd)) && (!KeyListener.L)) && (!KeyListener.R)) && (!KeyListener.Up)) {
Etat = "Crouch";
}
}
};
ObjPers.prototype.CheckCrouchRelease = function () {
with (this) {
if ((((!KeyListener.Dw) || (KeyListener.L)) || (KeyListener.R)) || (KeyListener.Up)) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
}
}
};
ObjPers.prototype.CheckAttackDanny = function () {
with (this) {
var bComboContinue = false;
var oCurrentAttack = new Object();
var oLastAttack;
if (KeyListener.Attack && (bAttackRelease)) {
bAttackRelease = false;
if (aCurrentCombo.length == 0) {
initRightPunch();
addToComboList(Etat, true);
} else {
NextAttack = addToComboList("Attack", true);
if (NextAttack != undefined) {
this["init" + NextAttack]();
} else {
initRightPunch();
addToComboList(Etat, true);
}
}
} else if (!KeyListener.Attack) {
bAttackRelease = true;
}
}
};
ObjPers.prototype.CheckAttackDaniel = ObjPers.prototype.CheckAttackDanny;
ObjPers.prototype.getActionType = function (l_sAction) {
with (this) {
switch (l_sAction) {
case "LeftPunch" :
case "RightPunch" :
case "RightPunchStill" :
case "HardFrontKick" :
case "LowKick" :
case "MegaChargedUppercut" :
case "Uppercut" :
case "JumpKick" :
case "ComboBlast" :
case "ComboSpinPunch" :
return("Attack");
case "JumpIdle" :
case "Fall" :
case "DoubleJumpIdle" :
case "DoubleJumpStart" :
case "DoubleJumpFall" :
return("Jump");
}
}
};
ObjPers.prototype.resetCombo = function () {
with (this) {
aCurrentCombo = new Array();
aComboSelected = new Array();
FrCombo = 0;
}
};
ObjPers.prototype.checkHitSequence = function (l_nComboStep, l_aComboToCheck) {
with (this) {
var i = 0;
while (i <= l_nComboStep) {
if ((aCurrentCombo[i].Hit == true) || (aCurrentCombo[i].Hit == l_aComboToCheck[i].Hit)) {
} else {
trace("Reset no hit!");
nComboSequence = 0;
return(false);
}
i++;
}
return(true);
}
};
ObjPers.prototype.checkDelay = function (l_nComboStep, l_aComboToCheck) {
with (this) {
if ((l_aComboToCheck[l_nComboStep - 1].MaxFrameDelay == NO_DELAY) || ((FrCombo - aCurrentCombo[l_nComboStep - 1].FrameCount) <= l_aComboToCheck[l_nComboStep - 1].MaxFrameDelay)) {
return(true);
}
trace("Reset in delay 2!");
nComboSequence = 0;
return(false);
}
};
ObjPers.prototype.setComboHit = function () {
with (this) {
aCurrentCombo[aCurrentCombo.length - 1].Hit = true;
_parent.Pers.Obj.Impact.gotoAndPlay("Hit");
switch (Etat) {
case "HardFrontKick" :
_global.SoundCTRL.playSound("Danny_HardFrontKick", 100, 0);
showCombo();
return;
case "ComboSpinPunch" :
_global.SoundCTRL.playSound("Danny_Uppercut", 100, 0);
showCombo();
return;
case "MegaChargedUppercut" :
case "ComboBlast" :
_global.SoundCTRL.playSound("Danny_BlastingUppercut", 100, 0);
showCombo();
return;
case "LowKick" :
_global.SoundCTRL.playSound("Danny_LowKick", 100, 0);
return;
case "JumpKick" :
_global.SoundCTRL.playSound("Danny_LowKick", 100, 0);
return;
case "Uppercut" :
_global.SoundCTRL.playSound("Danny_Uppercut", 100, 0);
return;
case "LeftPunch" :
case "RightPunch" :
case "RightPunchStill" :
_global.SoundCTRL.playSound("Danny_Punch", 100, 0);
return;
}
}
};
ObjPers.prototype.showCombo = function () {
with (this) {
nComboSequence++;
if (nComboSequence > 5) {
nComboSequence = 5;
}
_global.C.oScore.addCombo(nComboSequence);
_parent._parent.combo.gotoAndStop("Combo");
_parent._parent.combo._x = 110;
_parent._parent.combo._y = 60;
}
};
ObjPers.prototype.addToComboList = function (l_sNewAction, l_bManualAdd) {
with (this) {
var oCurrentAttack;
var oLastAttack;
var bComboContinue = false;
var l_sActionType = getActionType(l_sNewAction);
var nComboStep = aCurrentCombo.length;
var l_sNextAction;
if ((l_sNewAction != "Idle") || (aCurrentCombo[0].noIdle)) {
if ((l_sActionType != "Attack") || (l_bManualAdd)) {
oCurrentAttack = new Object();
if (l_sActionType == "Jump") {
l_sNewAction = l_sActionType;
}
if (nComboStep == 0) {
for (var i in aComboList) {
if ((Perso == aComboList[i][0].Perso) || (aComboList[i][0].Perso == "All")) {
if (aComboList[i][nComboStep].Action == l_sNewAction) {
if (aCurrentCombo.length == 0) {
oCurrentAttack.Action = l_sNewAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
aCurrentCombo[0].noIdle = aComboList[i][0].noIdle;
}
aComboSelected.push(aComboList[i]);
}
}
}
} else {
for (var i in aComboSelected) {
if ((aComboSelected[i][nComboStep].Action == l_sNewAction) && (checkDelay(nComboStep, aComboSelected[i]))) {
if (nComboStep == aCurrentCombo.length) {
oCurrentAttack.Action = l_sNewAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
trace("continue : " + aComboSelected[i][0].Name);
}
} else if ((((getActionType(aComboSelected[i][nComboStep].Action) == "Attack") && (l_sNewAction == "Attack")) && (checkHitSequence(nComboStep - 1, aComboSelected[i]))) && (checkDelay(nComboStep, aComboSelected[i]))) {
if (nComboStep == aCurrentCombo.length) {
l_sNextAction = aComboSelected[i][nComboStep].Action;
oCurrentAttack.Action = l_sNextAction;
oCurrentAttack.Hit = false;
oCurrentAttack.FrameCount = FrCombo;
bComboContinue = true;
aCurrentCombo.push(oCurrentAttack);
}
} else {
delete aComboSelected[i];
}
}
}
if ((!bComboContinue) && (aCurrentCombo.length > 0)) {
resetCombo();
addToComboList(l_sNewAction, false);
if (l_sNewAction == "Attack") {
}
}
return(l_sNextAction);
}
}
}
};
ObjPers.prototype.initRightPunch = function () {
with (this) {
Etat = "RightPunch";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
}
};
ObjPers.prototype.initLeftPunch = function () {
with (this) {
Etat = "LeftPunch";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
}
};
ObjPers.prototype.initRightPunchStill = function () {
with (this) {
nFrPunchStill = 15;
Etat = "RightPunchStill";
_global.SoundCTRL.playSound("Danny_AnticPunch", 50, 0);
nComboSequence = 0;
}
};
ObjPers.prototype.initHardFrontKick = function () {
with (this) {
Etat = "HardFrontKick";
}
};
ObjPers.prototype.initMegaChargedUppercut = function () {
with (this) {
Etat = "MegaChargedUppercut";
}
};
ObjPers.prototype.initLowKick = function () {
with (this) {
Etat = "LowKick";
}
};
ObjPers.prototype.initUppercut = function () {
with (this) {
Etat = "Uppercut";
}
};
ObjPers.prototype.initComboBlast = function () {
with (this) {
Etat = "ComboBlast";
}
};
ObjPers.prototype.initComboSpinPunch = function () {
with (this) {
Etat = "ComboSpinPunch";
}
};
ObjPers.prototype.initJumpKick = function () {
with (this) {
SpdYNow = -1;
if (Dir == "G") {
SpdXNow = SpdXNow - SpdXBaseJumpKick;
} else if (Dir == "D") {
SpdXNow = SpdXNow + SpdXBaseJumpKick;
}
nJumpKickPause = 0;
Etat = "JumpKick";
nComboSequence = 0;
}
};
ObjPers.prototype.initFreakControl = function () {
with (this) {
bFreak = true;
FrFreakCount = 0;
cDanny.setTransform(ctFreak);
nComboSequence = 0;
}
};
ObjPers.prototype.endFreak = function () {
with (this) {
bFreak = false;
_parent.Pers._visible = true;
cDanny.setTransform(ctOriginal);
}
};
ObjPers.prototype.CheckFall = function () {
with (this) {
if (SpdYNow >= SpdYFall) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.CheckDie = function () {
with (this) {
if ((oEnergyBar.getEnergy() <= 0) and (HitGrd == true)) {
CanBeHit = false;
InvincibleEnd();
_global.C.DesactivateHud();
_global.SoundCTRL.playSound("Danny_Die", 90, 0);
Etat = "Die";
nComboSequence = 0;
endFreak();
} else if (oEnergyBar.getEnergy() <= 0) {
Etat = "Hurt";
bSkipDie = true;
}
}
};
ObjPers.prototype.MovePers = function () {
with (this) {
MoveX = Math.round(MoveX);
FrontX = Math.round(FrontX);
BackX = Math.round(BackX);
if (((Dir == "G") && (MoveX < 0)) && ((FrontX + MoveX) < 50)) {
MoveX = 50 - FrontX;
} else if (((Dir == "D") && (MoveX < 0)) && ((BackX + MoveX) < 50)) {
MoveX = 50 - BackX;
} else if (((Dir == "D") && (MoveX > 0)) && ((FrontX + MoveX) > 550)) {
MoveX = 550 - FrontX;
} else if (((Dir == "G") && (MoveX > 0)) && ((BackX + MoveX) > 550)) {
MoveX = 550 - BackX;
}
PosX = _parent.Pers._x + MoveX;
_parent.Pers._x = PosX;
MoveX = 0;
PosY = _parent.Pers._y + MoveY;
_parent.Pers._y = PosY;
MoveY = 0;
}
};
ObjPers.prototype.SetPos = function (l_nX, l_nY) {
with (this) {
PosX = l_nX;
_parent.Pers._x = PosX;
MoveX = 0;
PosY = l_nY;
_parent.Pers._y = PosY;
MoveY = 0;
}
};
ObjPers.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
TopX = TrueX;
TopY = TrueY + _parent.Pers.Obj.HitTop._y;
FrontX = _parent.Pers.Obj.HitFront._x;
FrontY = TrueY + _parent.Pers.Obj.HitFront._y;
BottomFrontX = _parent.Pers.Obj.HitBottomFront._x;
BottomBackX = _parent.Pers.Obj.HitBottomBack._x;
BackX = _parent.Pers.Obj.HitBack._x;
if (Dir == "G") {
FrontX = TrueX - FrontX;
BottomFrontX = TrueX - BottomFrontX;
BottomBackX = TrueX - BottomBackX;
BackX = TrueX - BackX;
} else if (Dir == "D") {
FrontX = TrueX + FrontX;
BottomFrontX = TrueX + BottomFrontX;
BottomBackX = TrueX + BottomBackX;
BackX = TrueX + BackX;
}
}
};
ObjPers.prototype.CheckHitGrd = function (CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = TrueX;
CheckY = TrueY;
aCheckPoints = [CheckX, BottomFrontX, BottomBackX];
} else {
aCheckPoints = [CheckX];
}
for (var i in aCheckPoints) {
if (_parent.Collider.Sol.hitTest(aCheckPoints[i], CheckY + MaxSol, true) and (SpdYNow >= 0)) {
HitGrd = true;
HitGrdPoint = aCheckPoints[i];
break;
}
HitGrd = false;
HitGrdPoint = TrueX;
}
}
};
ObjPers.prototype.CheckSol = function (CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = HitGrdPoint;
CheckY = TrueY;
}
if (_parent.Collider.Sol.hitTest(CheckX, CheckY, true) and (SpdYNow >= 0)) {
SpdYNow = 0;
var InSol = true;
while (InSol == true) {
MoveY = MoveY - SolOut;
InSol = _parent.Collider.Sol.hitTest(CheckX, CheckY + MoveY, true);
}
} else if (SpdYNow >= 0) {
if (HitGrd == true) {
SpdYNow = 0;
MoveY = SpdYNow;
} else {
SpdYNow = SpdYNow + SpdYUp;
if (Etat == "JumpKick") {
SpdYNow = SpdYNow + 1;
}
if (SpdYNow > SpdYMax) {
SpdYNow = SpdYMax;
}
var SolHit1 = (SpdYNow / 3);
var SolHit2 = (SolHit1 * 2);
if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SolHit1, true)) {
MoveY = SolHitMin;
} else if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SolHit2, true)) {
MoveY = SolHit1;
} else if (_parent.Collider.Sol.hitTest(CheckX, CheckY + SpdYNow, true)) {
MoveY = SolHit2;
} else {
MoveY = SpdYNow;
}
}
} else {
SpdYNow = SpdYNow + SpdYUp;
MoveY = SpdYNow;
}
if (MoveY > 0) {
DistYFall = DistYFall + MoveY;
}
}
};
ObjPers.prototype.setState = function (l_sNewState) {
with (this) {
EtatOld = Etat;
Etat = l_sNewState;
var nOldTransformFr = _parent.Pers.Obj.Transform._currentframe;
_parent.Pers.Obj.gotoAndStop(l_sNewState);
_parent.Pers.Obj.Etat.gotoAndPlay(1);
this.nFrTotalAnim = _parent.Pers.Obj.Etat._totalframes;
_parent.Pers.Obj.Transform.gotoAndStop(1);
if ((Etat == "Die") && (bSkipDie)) {
_parent.Pers.Obj.Etat.gotoAndPlay(9);
}
if ((nOldTransformFr < 15) && (nOldTransformFr > 5)) {
_parent.Pers.Obj.Transform.gotoAndPlay(nOldTransformFr);
}
nGetHitTop = -1 * _parent.Pers.Obj.HitTop._y;
addToComboList(Etat, false);
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.updatePerso = function () {
var nCurrentFrame;
with (this) {
nCurrentFrame = _parent.Pers.Obj.Etat._currentframe;
_parent.Pers.gotoAndStop((Perso + "_") + Dir);
_parent.Pers.Obj.Etat.gotoAndPlay(nCurrentFrame);
nGetHitLeft = -1 * _parent.Pers.Obj.HitBack._x;
nGetHitRight = _parent.Pers.Obj.HitFront._x;
nGetHitTop = -1 * _parent.Pers.Obj.HitTop._y;
ComboKick = 0;
mcHitGetHurt = _parent.Pers.Obj.HitGetHurt;
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent.Pers.gotoAndStop((Perso + "_") + Dir);
this.mcContainer = _parent.Pers.Obj;
}
};
ObjPers.prototype.Actions = function () {
with (this) {
if (!bPause) {
FrCombo++;
SetTruePos();
InvincibleCheck();
Freakcheck();
this[Etat]();
CheckCharSwitch();
CheckHit();
}
}
};
ObjPers.prototype.Freakcheck = function () {
with (this) {
if (bFreak && (KeyListener)) {
FrFreakCount++;
if (FrFreakCount >= FrFreak) {
endFreak();
} else {
if ((FrFreakCount > (FrFreak - 20)) && ((FrFreakCount % 3) == 0)) {
_parent.Pers._visible = !_parent.Pers._visible;
}
l_bLeftValue = GlobalKeyListener.L;
l_bRightValue = GlobalKeyListener.R;
if (l_bRightValue) {
KeyListener.L = true;
} else {
KeyListener.L = false;
}
if (l_bLeftValue) {
KeyListener.R = true;
} else {
KeyListener.R = false;
}
}
}
}
};
ObjPers.prototype.CheckCharSwitch = function () {
with (this) {
if (KeyListener.Ghost && (bCanSwitch)) {
bCanSwitch = false;
CanHit = false;
FrSwitchCharacterCount = FrSwitchCharacter;
CharacterSwitch();
}
if (!bCanSwitch) {
bComboSwitch = true;
FrSwitchCharacterCount--;
if (FrSwitchCharacterCount == 0) {
bCanSwitch = true;
}
}
}
};
ObjPers.prototype.pause = function (l_bAnim) {
with (this) {
KeyListener = undefined;
if (l_bAnim) {
bPause = true;
_parent.Pers.Obj.Etat.stop();
for (var i in _parent.Pers.Obj.Etat) {
if (typeof(_parent.Pers.Obj.Etat[i]) == "movieclip") {
_parent.Pers.Obj.Etat[i].stop();
for (var j in _parent.Pers.Obj.Etat[i]) {
if (typeof(_parent.Pers.Obj.Etat[i][j]) == "movieclip") {
_parent.Pers.Obj.Etat[i][j].stop();
}
}
}
}
}
}
};
ObjPers.prototype.resume = function () {
with (this) {
bPause = false;
CanBeHit = true;
CanHit = false;
KeyListener = GlobalKeyListener;
if ((Etat != "Die") || (_parent.Pers.Obj.Etat._currentframe < nFrTotalAnim)) {
_parent.Pers.Obj.Etat.play();
}
for (var i in _parent.Pers.Obj.Etat) {
if (typeof(_parent.Pers.Obj.Etat[i]) == "movieclip") {
_parent.Pers.Obj.Etat[i].play();
for (var j in _parent.Pers.Obj.Etat[i]) {
if (typeof(_parent.Pers.Obj.Etat[i][j]) == "movieclip") {
_parent.Pers.Obj.Etat[i][j].play();
}
}
}
}
}
};
ObjPers.prototype.CheckHit = function () {
with (this) {
if (KeyListener.X && (CanBeHit)) {
this.GetHit();
}
}
};
this.cnt = 0;
this.G_Pause = true;
this.G_PauseOut = false;
this.G_PRealese = true;
this.G_Resume = false;
switchDelay = 30;
this.G_TabGWT = new Array();
this.G_TabBox = new Array();
this.G_TabGun = new Array();
this.G_TabSwitch = new Array();
this.G_TabDoor = new Array();
this.G_TabHeroChanger = new Array();
this.G_TabElevator = new Array();
this.G_TabPersBall = new Array();
this.G_TabMinionBall = new Array();
this.G_TabLifeBonus = new Array();
this.G_TabCam = new Array();
this.G_TabLevier = new Array();
this.G_TabTV = new Array();
this.G_NextPersBall = 1;
this.G_NextPersBallDepth = 10;
this.G_NextMinionBall = 1;
this.G_NextMinionBallDepth = 20;
this.bossSequence = false;
AsBroadcaster.initialize(this);
this.easterEggCount = 0;
ffa.DialogData.init();
this.oDialog = new ffa.DialogManager(_parent._parent.captions);
this.oOverlays = new ffa.OverlaysManager(_parent._parent.overlays);
this.bEasterEgg = false;
this.oTimer = new ffa.Timer(_parent._parent.hud.timer);
_global.C.oScore.init(_parent._parent.hud.score);
_global.C.oScore.resetLevel(nLevel);
this.sLevelState = "";
this.LifeBonusTaken = false;
this.onPlayerDie = function () {
this.resumeLevel();
this.broadcastMessage("pause", true);
};
this.initLevel = function () {
this.Pers.PosXAuto = 100;
this.Pers.Dir = "D";
this.Pers.Etat = "RunAuto";
this.Pers.addListener(this);
this.BG.addListener(this);
this.oOverlays.addListener(this);
this.sLevelState = "init";
this._parent._visible = true;
ship.ShipDatas.init();
this.CreerEasterEgg(_parent.missedShot, _parent.Parallax.easterEgg);
};
this.resumeLevel = function () {
if (this.Pers.oLifeBar.getEnergy() > 0) {
oDialog.hide(false);
oOverlays.setState("Sleep");
this._parent._visible = false;
this.Pers.Etat = "Sleep";
this.nFrameActionDelay = 15;
this.doOnNextFrame = function () {
this.nFrameActionDelay--;
trace("nFrameActionDelay: " + nFrameActionDelay);
if (nFrameActionDelay <= 0) {
_global.C.ActivateHud();
this.BG.goto({type:"group", group:this.BG.currentScreenGroupNum + 1}, this.bossSequence);
this.sLevelState = "ResumeLevel";
this.Pers.resurrect();
this.doOnNextFrame = undefined;
}
};
this.BG.resetAllScreenGroup();
} else {
_global.C.endGame("lose");
_parent._parent.gotoAndStop("BadEnding");
}
};
this.resumeLevelReady = function () {
this._parent._visible = true;
this.sLevelState = "Game";
if (this.bossSequence) {
switch (nLevel) {
case 1 :
this.Lydia.reInit();
this.broadcastMessage("KillAllGWT");
this.sLevelState = "Boss";
break;
case 2 :
break;
case 3 :
this.Freakshow.reInit();
}
}
};
this.runAutoComplete = function () {
var _local3;
switch (this.sLevelState) {
case "init" :
_local3 = ffa.DialogData.getDialog(nLevel, "1_init");
this.oDialog.startDialog(_local3[0], true);
var _local2 = 1;
while (_local2 < _local3.length) {
this.oDialog.queueDialog(_local3[_local2]);
_local2++;
}
break;
case "Complete" :
break;
case "CollectGem" :
break;
}
};
this.BossSequenceEnd = function () {
var _local2;
switch (nLevel) {
case 1 :
_local2 = ffa.DialogData.getDialog(nLevel, "Lydia_dropGem");
this.oDialog.startDialog(_local2[0]);
var _local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "CollectGem";
break;
case 2 :
_local2 = ffa.DialogData.getDialog(nLevel, "SpaceShuttle_dropGem");
this.oDialog.startDialog(_local2[0]);
_local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "CollectGem";
break;
case 3 :
if (this.sLevelState == "EndLevel") {
break;
}
_local2 = ffa.DialogData.getDialog(nLevel, "Freakshow_lost");
this.oDialog.startDialog(_local2[0]);
_local3 = 1;
while (_local3 < _local2.length) {
this.oDialog.queueDialog(_local2[_local3]);
_local3++;
}
this.sLevelState = "EndLevel";
}
};
this.CameraSkip = function () {
this.Pers.SetPos(this.BG.nInvertedPosX + 100, 0);
};
this.bSpaceSkip = false;
this.switchControlMode = function (l_sNewMode) {
if (l_sNewMode == "Game") {
this.KeyListener = GlobalKeyListener;
this.bSpaceSkip = false;
_parent._parent.menu.gotoAndStop("Idle");
} else if (l_sNewMode == "Dialog") {
_parent._parent.menu.gotoAndStop("Disable");
this.bSpaceSkip = true;
} else {
_parent._parent.menu.gotoAndStop("Disable");
this.KeyListener = undefined;
this.bSpaceSkip = false;
}
};
nADSD = 0;
nGWT = 0;
this.Creer_O1a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 100);
if (l_mcElement.bTop) {
l_mcElement.gotoAndStop(3);
}
CreerObstacle(pt, 80, 100);
}
};
this.Creer_O1b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 100);
CreerObstacle(pt, 240, 100);
}
};
this.Creer_O2a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 180);
CreerObstacle(pt, 80, 180);
}
};
this.Creer_O2b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 180);
CreerObstacle(pt, 240, 180);
}
};
this.Creer_O3b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 260);
CreerObstacle(pt, 240, 260);
}
};
this.Creer_P2a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_nPosX, y:l_nPosY};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 80);
}
};
this.Creer_P2b = function (l_mcElement, l_nPosX, l_nPosY) {
var nRandomItem;
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 240);
if (l_mcElement._name != undefined) {
nRandomItem = Number(l_mcElement._name) + 1;
l_mcElement.gotoAndStop(nRandomItem);
}
}
};
this.Creer_P2c = function (l_mcElement) {
with (this) {
l_mcElement._y = l_mcElement._y - 20;
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 160);
CreerPlateforme(pt, 80);
}
};
this.Creer_P3a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 240);
CreerPlateforme(pt, 80);
}
};
this.Creer_P3b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 240);
CreerPlateforme(pt, 240);
}
};
this.Creer_P4a = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 320);
CreerPlateforme(pt, 80);
}
};
this.Creer_P4b = function (l_mcElement, l_nPosX, l_nPosY) {
with (this) {
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + l_mcElement._parent._x;
pt.y = pt.y + (l_mcElement._parent._y - 320);
CreerPlateforme(pt, 260);
if (l_mcElement._name != undefined) {
nRandomItem = Number(l_mcElement._name) + 1;
l_mcElement.gotoAndStop(nRandomItem);
}
}
};
this.Creer_ADSD1 = function (l_mcElement, l_bAlwaysActive, l_sType) {
with (this) {
var l_oADSD;
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
l_oADSD = new ffa.devices.ADSD(nADSD, _parent.ADSD, pt, l_sType, !l_bAlwaysActive, BG, Pers, 15, 60);
nADSD++;
oScreen.registerADSD(l_oADSD);
}
}
};
this.Creer_ADSD2 = function (l_mcElement, l_bAlwaysActive, l_sType) {
with (this) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
l_oADSD = new ffa.devices.ADSD(nADSD, _parent.ADSD, pt, l_sType, !l_bAlwaysActive, BG, Pers, 27, 95);
nADSD++;
oScreen.registerADSD(l_oADSD);
}
};
this.Creer_GWT = function (l_mcElement, l_sType) {
var oScreen;
var l_sDepth;
with (this) {
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
oScreen.registerGWT(pt);
}
}
};
this.Creer_Tatoo = function (l_mcElement, l_sType) {
var oScreen;
var l_sDepth;
with (this) {
if (l_mcElement._parent._currentframe == 2) {
oScreen = BG.currentScreenGroup.getScreen(l_mcElement._parent._name);
if (oScreen == undefined) {
oScreen = BG.nextScreenGroup.getScreen(l_mcElement._parent._name);
}
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + (l_mcElement._width / 2);
l_oTatoo = new ffa.ennemy.Tatoo(_parent.Tatoo, pt, BG, Pers, _parent.Collider, oScreen, false);
oScreen.registerTatoo(l_oTatoo);
}
}
};
this.CreerLydia = function (l_mcElement) {
this.Lydia = new ffa.boss.Lydia(l_mcElement, {x:11850, y:560}, this.BG, this.Pers, _parent.Collider);
};
this.CreerShuttle = function (l_mcElementFront, l_mcElementParallax) {
this.Shuttle = new ffa.boss.SpaceShuttle(l_mcElementFront, l_mcElementParallax, {x:30000, y:450}, this.BG, this.Pers, _parent.Collider);
};
this.CreerEasterEgg = function (l_mcElementFront, l_mcElementParallax) {
this.EasterEgg = new ffa.EasterEgg(l_mcElementFront, l_mcElementParallax, {x:30000, y:450}, this.BG, this.Pers, _parent.Collider);
};
this.CreerFreakShow = function (l_mcElement) {
this.Freakshow = new ffa.boss.Freakshow(l_mcElement, {x:0, y:0}, this.BG, this.Pers, _parent.Collider);
};
this.CreerObstacle = function (pt, l_nWidth, l_nHeight) {
var _local3 = _parent.Collider.Wall;
var _local4 = _parent.Collider.Sol;
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
_local4.moveTo(pt.x, pt.y);
_local4.beginFill(16711935);
_local4.lineTo(pt.x, pt.y + 30);
_local4.lineTo(pt.x + l_nWidth, pt.y + 30);
_local4.lineTo(pt.x + l_nWidth, pt.y);
_local4.lineTo(pt.x, pt.y);
_local3.moveTo(pt.x, pt.y);
_local3.beginFill(16711680);
_local3.lineTo(pt.x, pt.y + l_nHeight);
_local3.lineTo(pt.x + l_nWidth, pt.y + l_nHeight);
_local3.lineTo(pt.x + l_nWidth, pt.y);
_local3.lineTo(pt.x, pt.y);
};
this.CreerPlateforme = function (pt, l_nWidth) {
var _local3 = _parent.Collider.Sol;
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
_local3.moveTo(pt.x, pt.y);
_local3.beginFill(16711935);
_local3.lineTo(pt.x, pt.y + 30);
_local3.lineTo(pt.x + l_nWidth, pt.y + 30);
_local3.lineTo(pt.x + l_nWidth, pt.y);
_local3.lineTo(pt.x, pt.y);
};
this.addDialog = function (l_mcElement, l_sDialog, l_sCharacter, l_sFace) {
var _local2 = this.BG.nextScreenGroup.getScreen(l_mcElement._name);
_local2.addDialog({content:l_sDialog, character:l_sCharacter, face:l_sFace}, this.oDialog);
};
this.addBeatThemUp = function (l_mcElement, l_sDialog, l_sCharacter, l_sFace) {
var _local2 = this.BG.nextScreenGroup.getScreen(l_mcElement._name);
_local2.addBeatThemUp();
};
this.replaceTile = function (l_mcElement) {
var _local2 = l_mcElement._name;
var _local4;
var _local5 = Math.round(l_mcElement._x / nTileDistance);
var nTileDistance = 599;
var _local6;
if (_local2.indexOf("_alt") != -1) {
_local4 = _local2.indexOf("_alt");
l_mcElement._x = (Number(_local2.slice(0, _local4)) - 1) * nTileDistance;
l_mcElement._y = nTileDistance;
} else {
l_mcElement._x = (Number(_local2) - 1) * nTileDistance;
l_mcElement._y = nTileDistance;
}
if (BG.currentScreenGroup.checkReady(_local2) && ((this.sLevelState == "") || (this.sLevelState == "ResumeLevel"))) {
if (this.sLevelState == "") {
this.initLevel();
} else if (this.sLevelState == "ResumeLevel") {
this.resumeLevelReady();
}
trace("ready! go!");
}
};
this.CreerFloor1 = function (l_mcElement, l_bBeatThemUp) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement, l_bBeatThemUp);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 600, pt.y + 40);
mcGround.lineTo(pt.x + 600, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor2a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor2b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + 200;
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor2c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.x = pt.x + 300;
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor3a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor3b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y);
mcGround.lineTo(pt.x, pt.y);
pt.x = pt.x + 400;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y + 40);
mcGround.lineTo(pt.x + 200, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor3c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y);
mcGround.lineTo(pt.x, pt.y);
pt.x = pt.x + 440;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y + 40);
mcGround.lineTo(pt.x + 160, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor4a = function (l_mcElement, l_nPosX, l_nPosY) {
CreerFloor1(l_mcElement);
};
this.CreerFloor4b = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y + 40);
mcGround.lineTo(pt.x + 400, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor4c = function (l_mcElement, l_nPosX, l_nPosY) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
pt = new Object();
pt = {x:l_mcElement._x, y:l_mcElement._y};
pt.y = pt.y + -40;
mcGround.moveTo(pt.x, pt.y);
mcGround.beginFill(16711935);
mcGround.lineTo(pt.x, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y + 40);
mcGround.lineTo(pt.x + 300, pt.y);
mcGround.lineTo(pt.x, pt.y);
}
};
this.CreerFloor5 = function (l_mcElement) {
var mcGround = _parent.Collider.Sol;
with (this) {
replaceTile(l_mcElement);
}
};
this.FirstAidKit = function (l_oScreen) {
var _local3 = new ffa.EnergyBonus("FirstAidKit", {x:(l_oScreen.__get__id() * 600) - 150, y:300}, _parent, this.BG, this.Pers, _parent.Collider);
l_oScreen.addBonus(_local3);
};
this.LifeBonus = function (l_oScreen, l_oRule) {
if (!this.LifeBonusTaken) {
var _local3 = new ffa.EnergyBonus("Life", {x:(l_oScreen.__get__id() * 600) - 200, y:l_oRule.y}, _parent, this.BG, this.Pers, _parent.Collider);
_local3.resume();
l_oScreen.addBonus(_local3);
}
};
this.doAfterDialog = function () {
switch (this.sLevelState) {
case "init" :
if (nLevel == 1) {
this.switchControlMode("Game");
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
} else if (nLevel == 2) {
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
} else if (nLevel == 3) {
this.switchControlMode("Pause");
this.Freakshow.initFirstAppear();
this.Freakshow.addListener(this);
}
break;
case "levelStart" :
trace("Wait for level start!");
break;
case "talk" :
this.Freakshow.initFirstDisappear();
break;
case "ready" :
this.oOverlays.setState("Level" + this.nLevel);
break;
case "Complete" :
break;
case "Boss" :
this.switchControlMode("Pause");
break;
case "CollectGem" :
_global.Gem.destroy();
this.switchControlMode("Pause");
l_aDialog = ffa.DialogData.getDialog(nLevel, "boss_end");
this.oDialog.startDialog(l_aDialog[0]);
var _local3 = 1;
while (_local3 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local3]);
_local3++;
}
this.sLevelState = "EndLevel";
break;
case "EndLevel" :
endLevel();
break;
default :
if (this.BG.bLoading) {
break;
}
this.broadcastMessage("resume");
this.switchControlMode("Game");
}
};
this.endLevel = function () {
this.broadcastMessage("pause", true);
_parent._parent.hud.gotoAndStop("Off");
_parent._parent.menu.gotoAndStop("Off");
_global.C.oScore.setTimeElapsed(_global.Game.oTimer.timeElapsed);
_global.C.oScore.setLifeRemaining(this.Pers.oLifeBar.getEnergy(), this.Pers.oEnergyBar.getEnergy());
_parent._parent.levelStats.gotoAndStop("Level" + nLevel);
_global.C.oScore.showStats(_parent._parent.levelStats);
};
this.LevelStartOverlays = function (l_oScreen, l_oRule) {
this.sLevelState = "levelStart";
this.switchControlMode("Pause");
this.oOverlays.setState("Level" + this.nLevel);
this.screenToNotify = l_oScreen;
};
this.FreakshowWarpedIn = function () {
switch (this.sLevelState) {
case "init" :
l_aDialog = ffa.DialogData.getDialog(nLevel, "1_mid");
this.oDialog.startDialog(l_aDialog[0]);
var _local2 = 1;
while (_local2 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local2]);
_local2++;
}
this.sLevelState = "talk";
break;
default :
}
};
this.FreakshowAttack = function () {
this.Freakshow.initShot("Pink");
};
this.FreakshowTakeGem = function () {
this.Freakshow.initTakeGem();
};
this.FreakshowInitCombatPos = function () {
this.Freakshow.initCombatPos();
};
this.FreakshowWarpedOut = function () {
switch (this.sLevelState) {
case "talk" :
l_aDialog = ffa.DialogData.getDialog(nLevel, "1_end");
this.oDialog.startDialog(l_aDialog[0]);
var _local2 = 1;
while (_local2 < l_aDialog.length) {
this.oDialog.queueDialog(l_aDialog[_local2]);
_local2++;
}
this.sLevelState = "ready";
break;
default :
}
};
this.onFreakshowTookGem = function () {
trace("RunAuto");
this.Pers.PosXAuto = this.FreakShow.nPosX - 200;
this.Pers.Dir = "D";
this.Pers.Etat = "RunAuto";
};
this.initBossFight = function () {
this.sLevelState = "Boss";
};
this.startLydiaFight = function () {
this.oOverlays.setState("Lydia");
this.bossSequence = true;
};
this.HideHint = function () {
_parent._parent.LydiaHint.gotoAndStop(2);
};
this.startShuttleFight = function () {
this.oOverlays.setState("Shuttle");
};
this.startFreakshowFight = function () {
this.oOverlays.setState("Freakshow");
this.bossSequence = true;
};
this.LockDannyAndCrouch = function () {
this.Pers.initAutoCrouch();
this.Shuttle.prepareCrash();
};
this.SpaceShuttleCrash = function () {
this.Shuttle.prepareCrash();
this.KeyListener = undefined;
};
this.SpaceShuttleInit = function () {
l_mcShuttleFront = _parent.GWT.attachMovie("Shuttle", "Shuttle", 100);
l_mcShuttleParallax = _parent.Parallax.attachMovie("Shuttle", "Shuttle", 100, {_xscale:25, _yscale:25});
this.CreerShuttle(l_mcShuttleFront, l_mcShuttleParallax);
};
this.SpaceShuttlePassBackground = function () {
this.Shuttle.initParallaxPass("Up");
this.sLevelState = "Boss";
this.switchControlMode("Pause");
this.broadcastMessage("pause");
};
this.SpaceShuttlePassFront = function () {
this.Shuttle.initFrontPass();
};
this.LydiaComplete = function () {
_parent._parent.LydiaHint.gotoAndStop(3);
trace("_parent.LydiaHint: " + _parent._parent.LydiaHint);
this.switchControlMode("Game");
this.broadcastMessage("resume");
};
this.ShuttleComplete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.Pers.Etat = "Idle";
};
this.FreakshowComplete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.Pers.Etat = "Idle";
this.Freakshow.initCombat();
};
this.Level1Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.Level2Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.Level3Complete = function () {
this.switchControlMode("Game");
this.broadcastMessage("resume");
this.sLevelState = "Game";
};
this.BeatThemUpComplete = function () {
_parent._parent.missedShot.gotoAndPlay("Shoot");
};
this.onGWTDie = function (nOrder, bAddPoint) {
if (bAddPoint) {
_global.C.oScore.addEnnemyBeated(1);
}
};
this.onTatooDie = function () {
_global.C.oScore.addEnnemyBeated(1);
};
this.destroyAll = function () {
this.broadcastMessage("destroy");
};
}
onClipEvent (enterFrame) {
if (this.doOnNextFrame) {
this.doOnNextFrame();
}
if (!this.Pers.bPause) {
if (this.bSpaceSkip) {
oDialog.updateTimeDelay();
if (GlobalKeyListener.Next && (oDialog.timeDelay <= 0)) {
if (!oDialog.nextQueue()) {
doAfterDialog();
}
}
}
if (Pers.Dir != Pers.DirOld) {
Pers.ChangeDir(Pers.Dir);
}
if (Pers.Etat != Pers.EtatOld) {
Pers.setState(Pers.Etat);
}
this.Pers.Actions();
this.BG.actions();
} else if (this.Pers.bPause && (this.BG.bLoading)) {
trace("loading?");
this.BG.actions();
}
if ((GlobalKeyListener.EasterEgg && (this.bEasterEgg)) && (this.bEasterEggRelease)) {
_global.Game.EasterEgg.initPass();
} else if (GlobalKeyListener.EasterEgg && (!bEasterEgg)) {
this.bEasterEgg = true;
this.bEasterEggRelease = false;
this.easterEggCount = 0;
} else if (bEasterEgg) {
if (this.easterEggCount < 15) {
this.easterEggCount++;
} else {
this.bEasterEgg = false;
}
if (!GlobalKeyListener.EasterEgg) {
this.bEasterEggRelease = true;
}
}
}
Instance of Symbol 1684 MovieClip "Pers" in Symbol 2676 MovieClip Frame 1
onClipEvent (load) {
_parent.Control.CreerPers(this._x, this._y);
this.gotoAndStop("D");
_global.Game.Pers.Etat = "Sleep";
_global.Game.Pers.setState("Idle");
}
Symbol 2676 MovieClip Frame 2
stop();
_global.C.beginLevel();
Instance of Symbol 2458 MovieClip "Bg" in Symbol 2676 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.BG = new ffa.background.MainScroller(_parent.Bg, _parent._x, _parent._y, _parent.Control.Pers);
_parent.Control.BG.resetAllScreen();
var l_oGroup;
l_oGroup = new ffa.background.ScreenGroup("LEVEL 3 - GROUP 1", "Normal");
l_oGroup.init(1, 20, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:0, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"Dialog", min:25, max:100, screen:8, level:3});
l_oGroup.addSpecialRule({type:"LockCamera", min:100, max:150, screen:20, level:2, lockedScreen:20});
l_oGroup.addSpecialRule({type:"BeatThemUp", min:0, max:400, screen:20, level:2});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:20, level:2});
l_oGroup.addBeatThemUpRule({type:"GWT", min:5, max:5, screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"], screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"depth", min:0, max:0, depth:"Parallax", screen:20}, "GWT");
l_oGroup.addBeatThemUpRule({type:"simultaneous", min:2, max:2, screen:20}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 3 - GROUP 2", "Normal");
l_oGroup.init(20, 40, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:1}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:100, max:150, screen:40, level:2, lockedScreen:40});
l_oGroup.addSpecialRule({type:"BeatThemUp", min:0, max:400, screen:40, level:2});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:40, level:1});
l_oGroup.addBeatThemUpRule({type:"GWT", min:6, max:6, screen:40}, "GWT");
l_oGroup.addBeatThemUpRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"], screen:40}, "GWT");
l_oGroup.addBeatThemUpRule({type:"depth", min:0, max:0, depth:"Parallax", screen:40}, "GWT");
l_oGroup.addBeatThemUpRule({type:"simultaneous", min:2, max:2, screen:40}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 3 - GROUP 3", "Normal");
l_oGroup.init(40, 51, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:1, max:2}, "GWT");
l_oGroup.addEnnemyRule({type:"gunColor", min:0, max:0, gunColor:"combined", colorRange:["green", "red"]}, "GWT");
l_oGroup.addEnnemyRule({type:"depth", min:0, max:1, depth:"Parallax"}, "GWT");
l_oGroup.addSpecialRule({type:"LockCamera", min:0, max:400, screen:51, level:3, lockedScreen:51});
l_oGroup.addSpecialRule({type:"initBossFight", min:150, max:200, screen:51, level:3});
l_oGroup.addSpecialRule({type:"FreakshowInitCombatPos", screen:51, level:3});
l_oGroup.addSpecialRule({type:"Dialog", screen:51, level:3});
l_oGroup.addSpecialRule({type:"FreakshowTakeGem", screen:51, level:3});
l_oGroup.addSpecialRule({type:"FreakshowAttack", screen:51, level:3});
l_oGroup.addSpecialRule({type:"startFreakshowFight", screen:51, level:1});
l_oGroup.addSpecialRule({type:"NextScreenGroup", screen:51, level:1});
_parent.Control.BG.addScreenGroup(l_oGroup);
l_oGroup = new ffa.background.ScreenGroup("LEVEL 3 - GROUP 4", "BOSS");
l_oGroup.init(51, 52, 600, 600);
l_oGroup.addEnnemyRule({type:"GWT", min:0, max:0}, "GWT");
_parent.Control.BG.addScreenGroup(l_oGroup);
_parent.Control.BG.activateScreenGroup();
}
Instance of Symbol 2675 MovieClip in Symbol 2676 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerFreakShow(this);
}
Instance of Symbol 2040 MovieClip "Collider" in Symbol 2676 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
}
Symbol 2694 Button
on (release) {
_global.C.badEndingButton(true);
}
Symbol 2695 Button
on (release) {
_global.C.badEndingButton(false);
}
Symbol 2697 Button
on (release) {
_global.C.goToScreen("TitleCard");
}
Symbol 2719 Button
on (release) {
_global.C.goodEndingButton(true);
}
Symbol 2720 Button
on (release) {
_global.C.goodEndingButton(false);
}
Symbol 2723 Button
on (release) {
_global.C.goToScreen("TitleCard");
}
Symbol 2731 Button
on (release) {
_global.C.goToScreen("TitleCard", true);
}
Symbol 2733 Button
on (release) {
_global.C.goToScreen("TitleCard", true);
}
Symbol 2734 Button
on (release) {
_global.C.submitScoreAndHide();
}