STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

A
Very
Merry Christmas!


<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/30487763?noj=FRM30487763-23DC" width="1" height="1"></div>

High Risk Rescue.swf

This is the info page for
Flash #25519

(Click the ID number above for more basic data on this flash file.)


Text
Loading

0%

import of
attached elements

CTRL

capture
keys

performance test

PLAY

PLAY

PLAY

How To
Play

How To
Play

How To
Play

NEXT

NEXT

NEXT

BACK

BACK

BACK

The three Gorgon sisters have escaped from their petrified
state!  They’ve captured Spud and Trixie and have
taken them to the top of a skyscraper building!
Jake must use his special powers to
rescue his friends, but the Huntsclan
is also on the prowl, looking for the
American Dragon.

The three Gorgon sisters have escaped from their petrified
state!  They’ve captured Spud and Trixie and have
taken them to the top of a skyscraper building!
Jake must use his special powers to
rescue his friends, but the Huntsclan
is also on the prowl, looking for the
American Dragon.

Help Jake save his friends by getting him
to the top of the buildings.

Help Jake save his friends by getting him
to the top of the buildings.

Space Bar

Use the SPACE BAR to transform
Jake into the American Dragon.
Press it again to return
Jake to his human form.

Use the four directional arrow keys
to move Jake around the screen.
Use the UP arrow key for jumping.

Use the SPACE BAR to transform
Jake into the American Dragon.
Press it again to return
Jake to his human form.

Use the four directional arrow keys
to move Jake around the screen.
Use the UP arrow key for jumping.

INSTRUCTIONS

INSTRUCTIONS

Jake uses the B key for karate kicks.
The dragon uses the B key to whip its tail against the huntsclan,
to stun the Huntsman, and to remove crates.

Jake uses the N key to activate switches
or move these special crates

The dragon uses the N key to breathe fire in order
to activate switches, block attacks, and removes obstacles.

Jake uses the B key for karate kicks.
The dragon uses the B key to whip its tail against the Huntsclan,
to stun the Huntsman, and to remove crates.

Jake uses the N key to activate switches
or move these special crates

The dragon uses the N key to breathe fire in order
to activate switches, block attacks, and removes obstacles.

B

N

500
Points

Keep an eye on your “Heads-Up Display” at the top of the screen.
It shows how many lives you have left, your score, and your energy
as both Jake and the dragon.

Increase your energy with these power-ups along the way:

Bonus points:
Give 500 extra points.

Extra lives: Add one life.

Health Booster:
Restore 50% of the energy.

Special Apple:
refill the Dragon Power meter.

SCORE

LIVE

SCORE

LIVE

ENERGY

DRAGON POWER

ENERGY

DRAGON POWER

LEVEL :

1

LEVEL :

1

000 000

000 000

Menu

When the dragon power meter is empty, Jake returns to his human form,
so only use Jake’s dragon powers when necessary.

The electric cables, spider nets and antennas are dangerous only
for the dragon. Jake is not affected by them.

The electric cables, spider nets and antennas are dangerous only
for the dragon. Jake is not affected by them.

All other obstacles (balconies, boxes, walls…)

affect both Jake and the dragon.

All other obstacles (balconies, boxes, walls…)

affect both Jake and the dragon.

Now, go save Spud and Trixie from the Gorgon sisters.
Good luck!

Now, go save Spud and Trixie from the Gorgon sisters.
Good luck!

The American Dragon
has succeeded
once again!

The American Dragon
has succeeded
once again!

Thanks for
your help!

Thanks for
your help!

PLAY

AGAIN

PLAY

AGAIN

PLAY

AGAIN

HIGH

Score

HIGH

Score

HIGH

Score

Quick, burn the net and
rescue your friend
before it’s

too late!

Quick, burn the net and
rescue your friend
before it’s

too late!

TRY

TRY

AGAIN

TRY

You don’t have
time to relax.

You don’t have
time to relax.

The Gorgon sisters
are not captured yet.

The Gorgon sisters
are not captured yet.

Quit

Quit

Quit

Help

Help

Help

Sound off

Sound off

Sound off

Sound on

Sound on

Sound on

doge

GAME

bg overlay

fade

FOCUS BTN

ActionScript [AS1/AS2]

Frame 1
_focusrect = false; System.security.allowDomain("www.disney.go.com"); System.security.allowDomain("disney.go.com"); System.security.allowDomain("psc.disney.go.com"); System.security.allowDomain("apsc.disney.go.com"); System.security.allowDomain("tv.disney.go.com"); System.security.allowDomain("atv.disney.go.com"); System.security.allowDomain("scores.disney.go.com"); gameID = "dc_ad_hr"; subject = "American Dragon - High Risk Rescue"; playerScore = 0; playerName = ""; fsdPlayAgain = function () { theDoge.unloadMovie(); _global.Packaging.onButtonPlayAgain(); }; stop();
Instance of Symbol 11 MovieClip "loader" in Frame 1
onClipEvent (enterFrame) { var l_pc = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); if (l_pc == 100) { _parent.gotoAndPlay("PerformanceCheck"); } else { this.loader.gotoAndStop(l_pc); } this.pc = l_pc + "%"; }
Instance of Symbol 123 MovieClip in Frame 2
onClipEvent (load) { function fStyleNumber(_nNumber, _nMinimumChar) { _sNumber = String(_nNumber); _sNewString = ""; _nlength = _sNumber.length; _nlength = _nlength / 3; if (_nlength <= 1) { _sNewNumber = _sNumber; if (_sNewNumber.length < _nMinimumChar) { _sNewNumber = "0" + _sNewNumber; } return(_sNewNumber); } _nLoop = _nlength; while (_nLoop > 1) { _sNewString = (" " + _sNumber.substr(-3)) + _sNewString; _sNumber = _sNumber.substr(0, -3); _nLoop--; } _sNewNumber = _sNumber + _sNewString; if (_sNewNumber.length < _nMinimumChar) { _sNewNumber = "0" + _sNewNumber; } return(_sNewNumber); } function getScores() { if (gProxyObj == undefined) { listScores(); } else { gProxyObj.getScores(cbFunc2); } } function submitScore() { gProxyObj.submitScore(_global.C.TotalScore, cbFunc); } function initHiScores() { gProxyObj.setGame_Id("xs_insane"); } function getScoreString() { var _local5 = "Oops! The high score list isn't available right now!"; if (gProxyObj != undefined) { var _local7 = gProxyObj.getScoreCount(); if (_local7 > 0) { var _local1; var _local6; var _local3; var _local4; _local5 = ""; _local1 = 0; while (_local1 < _local7) { _local6 = gProxyObj.getScoreItem(_local1); _local3 = _local6[0]; _local4 = fStyleNumber(_local6[1]); spaceNb = (30 - _local3.length) - _local4.length; spaceTXT = ""; var _local2 = 0; while (_local2 < spaceNb) { spaceTXT = spaceTXT + " "; _local2++; } if (_local1 < 9) { _local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline); } else if (_local1 < 99) { _local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline); } else { _local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline); } _local1++; } } else { _local5 = "Whoops, the high scores seem to have escaped!"; } } return(_local5); } function listScores() { _global.theStage.txt_highScore.text = getScoreString(); if (_global.theStage.txt_highScore.maxscroll <= _global.theStage.txt_highScore.scroll) { _global.theStage.scrollBar._visible = false; } } function cbFunc(thisBool) { if (thisBool) { listScores(); } else { _global.theStage.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!"; _global.theStage.scrollBar._visible = false; } } function cbFunc2(thisBool) { Debug.trace("cbFunc2"); if (thisBool) { listScores(); } else { _global.theStage.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!"; _global.theStage.scrollBar._visible = false; } } function mute() { SoundActive = false; _global.SoundCTRL.muteAllSounds(); _global.Hud.Son.gotoAndStop(2); } function unmute() { SoundActive = true; _global.SoundCTRL.unmuteAllSounds(); _global.Hud.Son.gotoAndStop(1); } function initGame(bPlayAgain) { Score = 0; Life = 5; Level = 1; goToScreen("level" + Level, true); _global.SoundCTRL.fadeOutSound("MusicLoop2"); _global.SoundCTRL.playSound("MusicLoop", 30, 100000); resetTimer(); GameActive = true; } function endGame(endType) { Score = _global.Game.Pers.Point; _global.SoundCTRL.clearSound(); if (endType == "lose") { goToScreen("Lose", true); calculateBonus(true); } else { goToScreen("Win", true); calculateBonus(false); } } function reInitGame() { Score = 0; Life = 5; goToScreen("level" + Level, true); _global.SoundCTRL.fadeOutSound("MusicLoop2"); _global.SoundCTRL.playSound("MusicLoop", 30, 100000); } function levelUp() { Level++; _global.Transition.gotoAndStop("NextLevel"); NextScreen = "level" + Level; Reset = true; } function resumeGame() { _global.Game.G_Resume = true; } function resetTimer() { Time = 0; } function increaseTime() { if (!_global.Game.G_Pause) { Time++; } refreshTime(); } function refreshTime() { var _local4 = Math.floor(Time / 60); var _local3 = Time % 60; if (_local3 < 10) { var _local2 = "0" + String(_local3); } else { var _local2 = String(_local3); } _global.Hud.Minute.text = _local4; _global.Hud.MinuteShadow.text = _local4; _global.Hud.Seconde.text = _local2.slice(0, 1); _global.Hud.SecondeShadow.text = _local2.slice(0, 1); _global.Hud.Seconde2.text = _local2.slice(1, 2); _global.Hud.Seconde2Shadow.text = _local2.slice(1, 2); } function calculateBonus(bLoose) { TimeBonus = 0; if (bLoose) { TimeBonus = 0; } else if (Time < 300) { TimeBonus = 50000; } else if (Time < 420) { TimeBonus = 40000; } else if (Time < 600) { TimeBonus = 30000; } else if (Time < 1200) { TimeBonus = 20000; } else if (Time < 3600) { TimeBonus = 10000; } TotalScore = TimeBonus + Score; } function refreshScore() { _global.theStage.xBonus.text = Score; _global.theStage.timeBonus.text = TimeBonus; _global.theStage.totalPoints.text = Score + TimeBonus; } function showHelp(inGame) { if (inGame) { _global.Game.G_Pause = true; _global.Popup.gotoAndStop("Instructions"); } else { _global.Popup.gotoAndStop("Instructions"); _global.theStage.gotoAndStop("Reset"); } } function helpBack() { _global.Popup.prevFrame(); } function helpNext() { _global.Popup.nextFrame(); } function goToScreen(Screen, ResetLevel) { _global.Transition.gotoAndStop("Transition"); NextScreen = Screen; Reset = ResetLevel; } function resetScreen() { if (Reset) { _root.gotoAndStop("Reset"); } _global.Popup.gotoAndStop(1); } function showScreen() { _global.theStage.gotoAndStop(NextScreen); refreshTime(); if ((NextScreen == "Lose") || (NextScreen == "Win")) { _global.SoundCTRL.playSound("MusicLoop2", 30, 100000); refreshScore(); } else if (NextScreen.indexOf("level") != -1) { _global.Popup.gotoAndStop(Level + "Start"); } } function beginLevel() { _global.Popup.gotoAndStop(1); _global.C.ActivateHud(); _global.Game.G_Resume = true; } function endLevel(CurrentPoint, CurrentLife) { Life = CurrentLife; Score = CurrentPoint; _global.Popup.gotoAndStop(Level + "End"); } function endTransition() { _global.Transition.gotoAndStop(1); } function ActivateHud() { _global.Hud.btnHelp.enabled = true; _global.Hud.Son.btnMute.enabled = true; } function DesactivateHud() { _global.Hud.btnHelp.enabled = false; _global.Hud.Son.btnMute.enabled = false; } function getAgentID() { getURL ("http://www.nick.com/all_nick/specials/x/jragent.jhtml", "_blank"); } _global.C = this; var Reset = false; var Time = 0; var NextScreen = ""; var GameActive = false; var SoundActive = true; var TotalScore = 0; }
Frame 10
com.sarbakan.utils.PerformanceWatcher.start(35); loader.pc = ""; loader.loader.gotoAndStop(100);
Frame 45
_global.PerformanceTestResult = com.sarbakan.utils.PerformanceWatcher.fps; com.sarbakan.utils.PerformanceWatcher.stop(); gotoAndStop ("Packaging");
Frame 46
stop();
Frame 56
stop(); _global.C.initGame();
Instance of Symbol 1157 MovieClip in Frame 56
onClipEvent (load) { this._xscale = 100; this._yscale = 100; this._x = 0; this._y = 510; }
Frame 66
stop(); _global.C.initGame();
Instance of Symbol 1209 MovieClip in Frame 66
onClipEvent (load) { this._xscale = 100; this._yscale = 100; this._x = 0; this._y = 510; }
Frame 76
stop(); _global.C.initGame();
Instance of Symbol 1230 MovieClip in Frame 76
onClipEvent (load) { this._xscale = 100; this._yscale = 100; this._x = 0; this._y = 510; }
Frame 86
stop(); _global.C.initGame();
Instance of Symbol 1374 MovieClip in Frame 86
onClipEvent (load) { this._xscale = 100; this._yscale = 100; this._x = -300; this._y = 440; }
Frame 96
stop(); _global.C.initGame();
Instance of Symbol 1393 MovieClip in Frame 96
onClipEvent (load) { this._xscale = 100; this._yscale = 100; this._x = -400; this._y = 440; }
Frame 106
stop(); _global.C.initGame();
Instance of Symbol 1408 MovieClip "Game" in Frame 106
onClipEvent (load) { this._xscale = 100; this._yscale = 100; this._x = -400; this._y = 440; }
Instance of Symbol 1495 MovieClip in Frame 106
onClipEvent (load) { _parent.Game.Control.CreerMedusaSister(this); }
Frame 116
gotoAndStop(_global.resetDestination);
Symbol 1496 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 1497 MovieClip [__Packages.com.sarbakan.utils.PerformanceWatcher] Frame 0
class com.sarbakan.utils.PerformanceWatcher { static var nMovieFPS, bActive, oEnterFrameListener, nCurrentFPS, mcDebug, nUpdateCount, nLastGetTimer; function PerformanceWatcher () { } static function start(l_nMovieFPS) { nMovieFPS = l_nMovieFPS; if (!bActive) { bActive = true; mx.transitions.OnEnterFrameBeacon.init(); oEnterFrameListener = new Object(); oEnterFrameListener.onEnterFrame = mx.utils.Delegate.create(com.sarbakan.utils.PerformanceWatcher, update); MovieClip.addListener(oEnterFrameListener); } nCurrentFPS = nMovieFPS; reset(); } static function stop() { if (bActive) { bActive = false; MovieClip.removeListener(oEnterFrameListener); stopDebug(); } } static function addListener(l_listener, l_nMinFPS, l_bDelete) { aListeners.push({listener:l_listener, nMinFPS:l_nMinFPS, bDelete:l_bDelete}); } static function removeListener(l_listener) { for (var _local2 in aListeners) { if (aListeners[_local2].listener == l_listener) { aListeners.splice(_local2, 1); } } } static function get fps() { return(nCurrentFPS); } static function startDebug(l_mcTimeline) { mcDebug = l_mcTimeline.createEmptyMovieClip("PerformanceWatcherDebug", DEBUG_DEPTH); mcDebug._x = (Stage.width - DEBUG_RIGHT_MARGIN) - 50; mcDebug._y = DEBUG_TOP_MARGIN; mcDebug.createTextField("field", 2, 0, 0, 50, 50); var _local1 = new TextFormat(); _local1.font = DEBUG_FONT; _local1.size = DEBUG_FONT_SIZE; _local1.color = DEBUG_FONT_COLOR; _local1.align = "right"; mcDebug.field.setNewTextFormat(_local1); mcDebug.field.selectable = false; mcDebug.createTextField("fieldShadow", 1, 1, 1, 50, 50); var _local2 = new TextFormat(); _local2.font = DEBUG_FONT; _local2.size = DEBUG_FONT_SIZE; _local2.color = DEBUG_FONT_SHADOW_COLOR; _local2.align = "right"; mcDebug.fieldShadow.setNewTextFormat(_local2); mcDebug.fieldShadow.selectable = false; } static function stopDebug() { if (mcDebug != undefined) { mcDebug.removeMovieClip(); } } static function update() { if ((++nUpdateCount) == nMovieFPS) { computeFrameRate(); updateDebug(); notifyListeners(); } } static function reset() { nUpdateCount = 0; nLastGetTimer = getTimer(); } static function computeFrameRate() { var _local1 = getTimer() - nLastGetTimer; var _local2 = _local1 / 1000; nCurrentFPS = Math.round(nMovieFPS / _local2); reset(); } static function notifyListeners() { var _local1 = new Array(); for (var _local2 in aListeners) { if (aListeners[_local2].nMinFPS >= nCurrentFPS) { aListeners[_local2].listener(nCurrentFPS); if (aListeners[_local2].bDelete) { _local1.push(aListeners[_local2].listener); } } } for (var _local2 in _local1) { removeListener(_local1[_local2]); } } static function updateDebug() { if (mcDebug != undefined) { mcDebug.field.text = nCurrentFPS + " fps"; mcDebug.fieldShadow.text = nCurrentFPS + " fps"; } } static var DEBUG_DEPTH = 123456; static var DEBUG_RIGHT_MARGIN = 0; static var DEBUG_TOP_MARGIN = 0; static var DEBUG_FONT = "Verdana"; static var DEBUG_FONT_SIZE = 10; static var DEBUG_FONT_COLOR = 16777215; static var DEBUG_FONT_SHADOW_COLOR = 0; static var aListeners = new Array(); }
Symbol 1498 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 1499 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 1500 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 1501 MovieClip [__Packages.HighRisk.PackagingManager] Frame 0
class HighRisk.PackagingManager { var mc, bMuted, bInPackaging, sGameQuality, bShadowDisabled, bInGame; function PackagingManager (l_timeline) { mc = l_timeline; initButtons(); mc.stop(); _global.Snd = new SoundController(mc); startMusicPackaging(); bMuted = false; bInPackaging = true; sGameQuality = "medium"; bShadowDisabled = false; if (_global.PerformanceTestResult < 18) { bShadowDisabled = true; } if (_global.PerformanceTestResult < 12) { sGameQuality = "low"; } _global.HUD.hide(); } function showWinScreen() { _global.HUD.hide(); mc._parent.gotoAndStop("Packaging2"); show("win"); } function showLoseScreen() { _global.HUD.hide(); mc._parent.gotoAndStop("Packaging2"); show("lose"); } function showNextScreen() { _global.HUD.hide(); mc._parent.gotoAndStop("Packaging2"); show("next"); } function showMenu() { _global.HUD.hide(); show("menu"); _global.Game.G_Pause = true; } function onButtonPlayAgain() { _global.boss = false; _global.level = 1; _global.lives = BASE_LIVES; _global.dragonPower = 100; _global.energy = 100; bInGame = true; mc._parent.gotoAndStop("Game_LEVEL1"); hide(); _global.HUD.show(); _global.HUD.resetScore(); } function show(l_label) { _quality = "high"; mc.gotoAndStop(l_label); initButtons(); if (!bInPackaging) { startMusicPackaging(); } bInPackaging = true; } function hide() { _quality = sGameQuality; mc.gotoAndStop("hidden"); startMusicGame(); bInPackaging = false; } function initButtons() { mc.play.onRelease = mx.utils.Delegate.create(this, onButtonPlay); mc.playagain.onRelease = mx.utils.Delegate.create(this, onButtonPlayAgain); mc.howto.onRelease = mx.utils.Delegate.create(this, onButtonHowTo); mc.next.onRelease = mx.utils.Delegate.create(this, onButtonNext); mc.nextLevel.onRelease = mx.utils.Delegate.create(this, onButtonNextLevel); mc.back.onRelease = mx.utils.Delegate.create(this, onButtonBack); mc.backFirst.onRelease = mx.utils.Delegate.create(this, onButtonBack); mc.hiscore.onRelease = mx.utils.Delegate.create(this, onButtonHiScore); mc.help.onRelease = mx.utils.Delegate.create(this, onButtonHelp); mc.quit.onRelease = mx.utils.Delegate.create(this, onButtonQuit); mc.sound.soundOn.onRelease = mx.utils.Delegate.create(this, onButtonSound); mc.sound.soundOff.onRelease = mx.utils.Delegate.create(this, onButtonSound); if (bMuted) { mc.sound.soundOn._visible = false; mc.sound.soundOff._visible = true; } else { mc.sound.soundOn._visible = true; mc.sound.soundOff._visible = false; } if (bInGame) { mc.backFirst._visible = false; mc.backShadow._visible = false; } } function onButtonPlay() { if (!bInGame) { bInGame = true; _global.boss = false; _global.level = 1; _global.lives = BASE_LIVES; _global.dragonPower = 100; _global.energy = 100; mc._parent.gotoAndStop("Game_LEVEL" + _global.level); hide(); } else { hide(); _global.Game.G_Pause = false; _global.HUD.show(); } } function onButtonHowTo() { mc.gotoAndStop("instructions"); initButtons(); } function onButtonNext() { mc.nextFrame(); initButtons(); } function onButtonNextLevel() { _global.HUD.increaseScore(350 * _global.lives, true); _global.HUD.increaseScore(10 * _global.energy, true); _global.level++; _global.boss = false; mc._parent.gotoAndStop("Game_LEVEL" + _global.level); hide(); _global.HUD.show(); } function onButtonBack() { mc.prevFrame(); initButtons(); } function startMusicPackaging() { _global.Snd.stopSound("music_game"); _global.Snd.playSound("music_packaging", 60, 99999999, false); } function startMusicGame() { _global.Snd.stopSound("music_packaging"); _global.Snd.playSound("music_game", 60, 99999999, false); } function onButtonHiScore() { mc._parent.playerScore = _global.HUD.nScore; show("hiscore"); } function onButtonHelp() { show("instructions"); } function onButtonQuit() { showLoseScreen(); } function onButtonSound() { if (bMuted) { bMuted = false; _global.Snd.unmuteAllSounds(); } else { bMuted = true; _global.Snd.muteAllSounds(); } if (bMuted) { mc.sound.soundOn._visible = false; mc.sound.soundOff._visible = true; } else { mc.sound.soundOn._visible = true; mc.sound.soundOff._visible = false; } } static var BASE_LIVES = 3; }
Symbol 1502 MovieClip [__Packages.SoundController] Frame 0
class SoundController { var mcSoundFX, SOUND_FADE_SPEED, bMute, oRootSound; function SoundController (l_mcContainer) { l_mcContainer.createEmptyMovieClip("soundFX", 2); l_mcContainer.createEmptyMovieClip("music", 3); mcSoundFX = l_mcContainer.soundFX; SOUND_FADE_SPEED = 5; bMute = false; oRootSound = new Sound(_root); } 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) { mcSoundFX["oClip" + l_sID].oSound.stop(l_sID); mcSoundFX["oClip" + l_sID].removeMovieClip(); } 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; } }; } oRootSound.setVolume(0); } 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; } }; } oRootSound.setVolume(100); } 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 1503 MovieClip [__Packages.HighRisk.HUD] Frame 0
class HighRisk.HUD { var mc, mcFade, nScore, oScoreField, bFading, fadeListener; function HUD (l_timeline) { mc = l_timeline; mcFade = mc._parent.fade; nScore = 0; oScoreField = new HighRisk.DigitBitmapField([mc.score1, mc.score2, mc.score3, mc.score4, mc.score5, mc.score6]); mc.menu.onRelease = mx.utils.Delegate.create(this, onButtonMenu); } function update() { mc.level.gotoAndStop(_global.level); updateBar(mc.barPower, _global.dragonPower); updateBar(mc.barEnergy, _global.energy); mc.life1._visible = false; mc.life2._visible = false; mc.life3._visible = false; var _local3 = 0; while (_local3 <= _global.lives) { mc["life" + _local3]._visible = true; _local3++; } if (oScoreField.getContent() < nScore) { oScoreField.setContent(oScoreField.getContent() + 50); if (oScoreField.getContent() > nScore) { oScoreField.setContent(nScore); } } } function fade(listener) { if (!bFading) { bFading = true; mcFade.gotoAndPlay("out"); fadeListener = listener; } } function show() { mc._visible = true; } function hide() { mc._visible = false; } function onFadeMiddle() { fadeListener(); bFading = false; } function onButtonMenu() { _global.Packaging.showMenu(); } function increaseScore(l_nValue, l_bInstant) { nScore = nScore + l_nValue; if (l_bInstant) { oScoreField.setContent(nScore); } } function resetScore() { nScore = 0; } function updateBar(l_mc, l_pc) { l_mc.destWidth = Math.round((100 - l_pc) * 0.89); animateBar(l_mc); } function animateBar(l_mc) { if (l_mc._width < l_mc.destWidth) { l_mc._width = l_mc._width + 1; } else if (l_mc._width > l_mc.destWidth) { l_mc._width = l_mc._width - 1; } } }
Symbol 1504 MovieClip [__Packages.HighRisk.DigitBitmapField] Frame 0
class HighRisk.DigitBitmapField { var mcDigitList, nNumber; function DigitBitmapField (l_mcDigitList) { mcDigitList = l_mcDigitList; setContent(0); } function setContent(l_number) { nNumber = l_number; update(); } function getContent() { return(nNumber); } function update() { var _local3 = getNumberToPaddedString(); var _local2 = 0; while (_local2 < mcDigitList.length) { mcDigitList[_local2].gotoAndStop(Number(_local3.charAt(_local2)) + 1); _local2++; } } function getNumberToPaddedString() { var _local2 = String(nNumber); while (_local2.length < mcDigitList.length) { _local2 = "0" + _local2; } return(_local2); } }
Symbol 1505 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 15 MovieClip [BorderBox] Frame 1
stop();
Symbol 17 MovieClip [BottomBox] Frame 1
stop();
Symbol 19 MovieClip [TopBox] Frame 1
stop();
Symbol 42 MovieClip Frame 1
_visible = false;
Symbol 60 MovieClip [JackDragon_FireAnim] Frame 1
stop();
Symbol 60 MovieClip [JackDragon_FireAnim] Frame 21
stop();
Symbol 69 MovieClip [Medusa_Blast] Frame 1
stop();
Symbol 69 MovieClip [Medusa_Blast] Frame 21
stop();
Symbol 85 MovieClip [NetBall] Frame 1
stop();
Symbol 85 MovieClip [NetBall] Frame 10
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 126 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 514 MovieClip Frame 1
_global.Packaging = new HighRisk.PackagingManager(this);
Instance of Symbol 199 MovieClip in Symbol 514 MovieClip Frame 11
onClipEvent (load) { stop(); }
Instance of Symbol 294 MovieClip in Symbol 514 MovieClip Frame 12
onClipEvent (load) { stop(); }
Instance of Symbol 400 MovieClip in Symbol 514 MovieClip Frame 14
onClipEvent (load) { stop(); }
Instance of Symbol 400 MovieClip in Symbol 514 MovieClip Frame 14
onClipEvent (load) { stop(); }
Symbol 514 MovieClip Frame 61
theDoge.loadMovie(_parent.fsd, 1);
Symbol 558 MovieClip Frame 1
_global.HUD = new HighRisk.HUD(this);
Symbol 560 MovieClip Frame 2
stop();
Symbol 573 MovieClip Frame 1
this._visible = false;
Symbol 573 MovieClip Frame 2
_global.Game.addAlphaZone(_parent); stop();
Symbol 593 MovieClip Frame 2
_parent._parent._parent.Control.Creer_PBalcony(this); stop();
Symbol 598 MovieClip Frame 1
stop();
Symbol 598 MovieClip Frame 11
stop();
Symbol 599 MovieClip Frame 2
_parent._parent._parent.Control.CreerLevier(this._name, this._x, this._y, _parent._parent._parent.Control.onSwitchLadder); stop();
Symbol 603 MovieClip Frame 1
stop();
Symbol 603 MovieClip Frame 11
stop();
Symbol 603 MovieClip Frame 21
stop();
Symbol 604 MovieClip Frame 2
_parent._parent._parent.Control.CreerLevier(this._name, this._x, this._y, _parent._parent._parent.Control.onSwitchLift); stop();
Symbol 609 MovieClip Frame 8
_global.Snd.playSound("ladder", 200, 1, true);
Symbol 611 MovieClip Frame 1
stop();
Symbol 612 MovieClip Frame 2
_parent._parent._parent.Control.CreerLadder(this); stop();
Symbol 621 MovieClip Frame 2
_parent._parent._parent.Control.Creer_PBalconyOpen(this); stop();
Symbol 641 MovieClip Frame 6
_global.Snd.playSound("chair", 100, 1, false);
Symbol 642 MovieClip Frame 1
stop();
Symbol 642 MovieClip Frame 10
stop();
Symbol 643 MovieClip Frame 2
_parent._parent._parent.Control.CreerBouncingChair(this); stop();
Symbol 694 MovieClip Frame 1
stop();
Symbol 694 MovieClip Frame 10
stop();
Symbol 694 MovieClip Frame 20
stop();
Symbol 694 MovieClip Frame 30
stop();
Symbol 694 MovieClip Frame 40
stop();
Symbol 741 MovieClip Frame 1
stop();
Symbol 741 MovieClip Frame 10
stop();
Symbol 741 MovieClip Frame 20
stop();
Symbol 741 MovieClip Frame 30
stop();
Symbol 741 MovieClip Frame 40
stop();
Symbol 742 MovieClip Frame 1
stop();
Symbol 742 MovieClip Frame 2
stop();
Symbol 742 MovieClip Frame 11
stop();
Symbol 757 MovieClip Frame 2
_global.Snd.playSound("window", 100, 1, false);
Symbol 760 MovieClip Frame 1
stop();
Symbol 760 MovieClip Frame 10
stop();
Symbol 760 MovieClip Frame 21
stop();
Symbol 760 MovieClip Frame 31
stop();
Symbol 760 MovieClip Frame 41
stop();
Symbol 761 MovieClip Frame 2
_parent._parent._parent.Control.CreerHuntWindow(this); stop();
Symbol 762 MovieClip Frame 1
_global.Snd.playSound("web", 100, 1, true);
Symbol 762 MovieClip Frame 20
stop();
Symbol 774 MovieClip Frame 5
stop();
Symbol 775 MovieClip Frame 1
stop();
Symbol 775 MovieClip Frame 10
stop();
Symbol 775 MovieClip Frame 21
stop();
Symbol 775 MovieClip Frame 31
stop();
Symbol 775 MovieClip Frame 41
stop();
Symbol 776 MovieClip Frame 2
_parent._parent._parent.Control.CreerDragonObstacle(this); stop();
Symbol 792 MovieClip Frame 2
_parent._parent._parent.Control.Creer_PRoofTop(this); stop();
Symbol 813 MovieClip Frame 1
_global.Snd.playSound("crumble", 100, 1, true);
Symbol 814 MovieClip Frame 1
stop();
Symbol 814 MovieClip Frame 10
stop();
Symbol 815 MovieClip Frame 2
_parent._parent._parent.Control.CreerWall(this); stop();
Symbol 825 MovieClip Frame 1
_global.Snd.playSound("electric_wire", 100, 1, true);
Symbol 826 MovieClip Frame 1
stop();
Symbol 826 MovieClip Frame 10
stop();
Symbol 827 MovieClip Frame 2
_parent._parent._parent.Control.CreerDragonObstacle(this); stop();
Symbol 838 MovieClip Frame 2
_parent._parent._parent.Control.CreerElevator(this); stop();
Symbol 845 MovieClip Frame 2
_parent._parent._parent.Control.Creer_PBox(this); stop();
Symbol 848 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 2
_parent._parent._parent.Control.CreerBonus("Power", this); stop();
Symbol 852 MovieClip Frame 1
stop();
Symbol 853 MovieClip Frame 2
_parent._parent._parent.Control.CreerBonus("Energy", this); stop();
Symbol 857 MovieClip Frame 1
stop();
Symbol 858 MovieClip Frame 2
_parent._parent._parent.Control.CreerBonus("Score", this); stop();
Symbol 893 MovieClip Frame 4
_global.Snd.playSound("swirl", 100, 1, false);
Symbol 925 MovieClip Frame 9
_global.Snd.playSound("blast", 100, 1, false);
Symbol 954 MovieClip Frame 4
_global.Snd.playSound("soldierAttack", 100, 1, false);
Symbol 967 MovieClip Frame 1
stop();
Symbol 967 MovieClip Frame 10
stop();
Symbol 967 MovieClip Frame 20
stop();
Symbol 967 MovieClip Frame 30
stop();
Symbol 967 MovieClip Frame 40
stop();
Symbol 968 MovieClip Frame 2
_parent._parent._parent.Control.CreerHuntSoldier(this);
Symbol 968 MovieClip Frame 3
stop();
Symbol 968 MovieClip Frame 15
stop();
Symbol 969 MovieClip Frame 1
stop();
Instance of Symbol 593 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 838 MovieClip "switchALift" in Symbol 969 MovieClip Frame 1
onClipEvent (load) { distance = 545; }
Instance of Symbol 838 MovieClip "switchBLift" in Symbol 969 MovieClip Frame 1
onClipEvent (load) { distance = 435; }
Instance of Symbol 838 MovieClip "switchCLift" in Symbol 969 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 593 MovieClip in Symbol 969 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Symbol 969 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y); stop();
Symbol 970 MovieClip Frame 2
stop();
Symbol 997 MovieClip Frame 5
_global.Snd.playSound("land", 75, 1, false);
Symbol 1055 MovieClip Frame 4
_global.Snd.playSound("jakeAttack", 100, 1, false);
Symbol 1091 MovieClip Frame 6
_global.Snd.playSound("morph", 150, 1, false);
Symbol 1093 MovieClip Frame 2
_global.Snd.playSound("morph", 150, 1, false);
Symbol 1094 MovieClip Frame 1
stop();
Symbol 1094 MovieClip Frame 8
stop();
Symbol 1094 MovieClip Frame 17
stop();
Symbol 1094 MovieClip Frame 25
stop();
Symbol 1094 MovieClip Frame 35
stop();
Symbol 1094 MovieClip Frame 44
stop();
Symbol 1094 MovieClip Frame 53
stop();
Symbol 1094 MovieClip Frame 63
stop();
Symbol 1094 MovieClip Frame 74
stop();
Symbol 1094 MovieClip Frame 83
stop();
Symbol 1094 MovieClip Frame 93
stop();
Symbol 1094 MovieClip Frame 103
stop();
Symbol 1094 MovieClip Frame 111
stop();
Symbol 1094 MovieClip Frame 121
stop();
Symbol 1094 MovieClip Frame 143
stop();
Symbol 1112 MovieClip Frame 20
stop();
Symbol 1126 MovieClip Frame 10
_global.Snd.playSound("dragonFire", 150, 1, false);
Symbol 1146 MovieClip Frame 3
_global.Snd.playSound("whip", 100, 1, false);
Symbol 1148 MovieClip Frame 5
_global.Snd.playSound("morph", 150, 1, false);
Symbol 1149 MovieClip Frame 1
stop();
Symbol 1149 MovieClip Frame 8
stop();
Symbol 1149 MovieClip Frame 17
stop();
Symbol 1149 MovieClip Frame 24
stop();
Symbol 1149 MovieClip Frame 62
stop();
Symbol 1150 MovieClip Frame 1
Obj.gotoAndStop(_parent.Control.Pers.Etat); stop();
Symbol 1150 MovieClip Frame 2
Obj.gotoAndStop(_parent.Control.Pers.Etat); stop();
Symbol 1150 MovieClip Frame 3
Obj.gotoAndStop(_parent.Control.Pers.Etat); stop();
Symbol 1150 MovieClip Frame 4
Obj.gotoAndStop(_parent.Control.Pers.Etat); stop();
Instance of Symbol 1152 MovieClip "Sol" in Symbol 1154 MovieClip Frame 1
onClipEvent (load) { }
Instance of Symbol 560 MovieClip "Control" in Symbol 1157 MovieClip Frame 1
onClipEvent (load) { function ObjBg(PosX, PosY) { this.Nom = "Bg"; this.PosX = PosX; this.PosY = PosY; this.ParallaxPosX = 0; this.ParallaxPosY = 0; this.ParallaxSkyPosX = 0; this.ParallaxSkyPosY = 0; this.ParallaxCityPosX = 0; this.ParallaxCityPosY = 0; this.ParallaxRateSky = 1.2; this.ParallaxRateCity = 1.1; this.MoveX = 0; this.MoveY = 0; this.MaxDw = 0; this.MaxUp = 0; this.MaxG = 0; this.MaxD = 0; this.InvPosX = PosX * -1; this.InvPosY = PosY * -1; this.DeadX = PosX; this.DeadY = PosY; this.CurrentScreen = 1; this.OldScreen = 0; this.MaxYDie = 5000; this.CenterX = 300; this.CenterY = 370; this.SpdXD = 15; this.SpdXG = -15; this.SpdYDw = 20; this.SpdYUp = -20; this.SpdYUpForce = 0; this.InPause = false; this.NoCamUpdate = false; this.CamOnMedusa = false; } function ObjBox(Nom, PosX, PosY, Type, Dir) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.MoveX = 0; this.MoveY = 0; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 75; this.LgOutD = 525; this.LgOutUp = 25; this.LgOutDw = 475; this.LgHitG = 34; this.LgHitD = 35; this.LgHitUp = 25; this.LgHitDw = 26; this.HitRightX; this.HitLeftX; this.PushDir = Dir; this.Dir = Pers.Dir; if (Dir == "D") { _parent.Bg[1][Nom]._xscale = -100; } this.FlagUse = false; this.LandSide = "Center"; this.MinionBlock = 0; this.Etat = "Wait"; this.EtatOld = "Sleep"; this.FixedFlag = false; _parent.Collider.Sol.attachMovie("TopBox", Nom, _parent.Collider.Sol.getNextHighestDepth()); _parent.Collider.Wall.attachMovie("BorderBox", Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Ceil.attachMovie("BottomBox", Nom, _parent.Collider.Ceil.getNextHighestDepth()); this.frTurn = 20; this.SoundPush = false; this.WebDestroyed = false; this.MoveBox(); } function ObjPers(PosX, PosY, Perso) { this.nGetHitLeft = 0; this.nGetHitRight = 0; this.nGetHitTop = 0; 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.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.SpdYUpBase = 1.7; this.SpdYUp = this.SpdYUpBase; this.SpdYMax = 30; this.SpdYFall = 2.2; this.SpdYFly = 5; this.SpdXHitBase = 0; this.SpdYHitBase = -4; this.SpdStartJump = -17; this.SolOut = 2; this.SolHitMin = 5; this.MaxSol = 3; this.HitGrd = false; this.SolForJump = 6; this.DistYFall = 0; this.DistYFallMax = 900; this.autoSwitchDragon = false; this.DistYLand = 80; this.CanHit = false; this.CanBeHit = true; this.FrWalkNow = 1; this.InPause = false; this.FrJump = 1; this.FrFall = 1; this.FrLand = 13; this.FrGetHit = 7; this.FrGetHitCount = 0; this.FrBoomTir = 9; this.FrFinBoom = 6; this.FrDead = 20; this.FrDeadCount = 0; this.aCharacter = ["Jake", "Dragon"]; this.ICharacter = 0; this.Perso = this.aCharacter[this.ICharacter]; this.updatePerso(); this.LgGetShootX = 20; this.LgGetShootUp = 72; this.LgGetShootUpBas = 44; this.FrInvincibleCount = 0; this.FrInvincible = 20; this.Invincible = false; this.FrSwitchCharacter = 15; this.FrSwitchCharacterCount = 0; this.bCanSwitch = true; 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.nDragonPowerRythm = 25; this.nDragonPowerCount = 0; this.DragonHitTop = 0; this.DragonHitBottom = 0; this.DragonHeight = 130; this.onLadderID = null; this.ClimbedDistance = 0; this.ladderDisabledMax = 15; this.ladderDisabledCount = this.ladderDisabledMax; this.onBouncingID = null; this.bounceCount = 0; this.bounceCountMax = 3; this.bouncingDisabledMax = 15; this.bouncingDisabledCount = this.bouncingDisabledMax; this.bHitAttack = false; this.FrShootFire = 15; this.FrAttackTailHit = 9; this.CurrentFireID = null; if (_global.boss) { this.WaitForActions = true; } else { this.WaitForActions = false; } } function ObjPersBall(Type, Nom, PosX, PosY, Dir, HitBullet, Speed, Tab, HitSound, Rotation, SpdX, SpdY) { this.Nom = Nom; this.Type = Type; this.HitSound = HitSound; this.Tab = Tab; this.Etat = "Move"; this.EtatOld = "Idle"; this.Dir = Dir; this.OldDir = "D"; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 50; this.LgOutD = 600; this.LgOutUp = 0; this.LgOutDw = 500; this.CanBeKill = false; if (Dir == "D") { this.SpdX = Speed; } else { this.SpdX = -1 * Speed; _parent.Bg[1][Nom]._xscale = -100; } this.InPause = false; this.FrHit = HitBullet; this.FrHide = 1; if (Type == "Fire") { Pers.CurrentFireID = Nom; } if (Type == "Spark") { G_Medusa.CurrentSparkID = Nom; this.LgOutG = 1100; this.LgOutD = 1100; _parent.Bg[1][Nom]._xscale = -100; _parent.Bg[1][Nom]._rotation = Rotation; this.SpdX = SpdX; this.SpdY = SpdY; } } function ObjSwitch(Nom, PosX, PosY) { this.Nom = Nom; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 20; this.LgOnY = 20; this.PosX = PosX; this.PosY = PosY; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrBaisse = 13; } function ObjElevator(mc, Axis, Min, Max) { this.Nom = mc._name; this.mc = mc; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 750; this.LgOutG = 200; this.LgOutUp = 500; this.LgOutDw = 900; this.Speed = 2; this.frWaitCount = 0; this.frWaitTime = 30; this.LgOnX = 200; this.LgOnY = 25; this.PersOn = false; this.MoveX = 0; this.MoveY = 0; this.PosX = mc._x + 40; this.PosY = mc._y + 140; this.Axis = Axis; this.Min = this["Pos" + Axis] + Min; this.Max = this["Pos" + Axis] + Max; this.Active = false; this.InPause = false; this.Dir = -1; this.CanReposition = false; this.RepositionCount = 0; this.RepositionDelay = 30; _parent.Collider.Sol.attachMovie("GroundElevator", this.Nom, _parent.Collider.Sol.getNextHighestDepth()); _global.Game.CreerOverlay(mc._name + "ramp", "AM_RampeAscenseur01_overlay", {x:mc._x, y:mc._y + 140}); this.MoveElevator(); } function ObjLevier(Nom, PosX, PosY, listener) { this.Nom = Nom; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 30; this.LgOnY = 100; this.PosX = PosX; this.PosY = PosY; this.PersYCorrection = 60; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrFinLevelCount = 0; this.FrFinLevel = 70; this.Active = true; this.listener = listener; } function pointsGetAngle(l_x1, l_y1, l_x2, l_y2) { var _local4 = 0; var _local3 = 0; var _local1 = 0; var _local2 = 0; _local4 = (l_x1 - l_x2) * -1; _local3 = (l_y1 - l_y2) * -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); } function pointsGetDistance(l_x1, l_y1, l_x2, l_y2) { var _local1 = Math.sqrt(Math.pow(Math.abs(l_x2 - l_x1), 2) + Math.pow(Math.abs(l_y2 - l_y1), 2)); return(_local1); } function ObjLadder(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.obj; this.Etat = "Off"; this.EtatOld = "Off"; this.LgOnX = 70; this.LgOnY = 265; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; } function ObjBouncingChair(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.Obj; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOnX = 70; this.LgOnY = 50; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; _global.Game.CreerPlateforme({x:this.PosX, y:this.PosY}, 73); } function ObjHuntSoldier(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 115; this.AttackDelayCount = 0; this.AttackChance = 0.03; this.ShieldChance = 0.25; this.HurtCount = 0; } function ObjHuntWindow(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "IdleClose"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 450; this.LgOutDw = 450; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.AttackDelay = 100; this.AttackDelayCount = 0; if (PosX < 150) { this.HuntID = "A"; this.FlipPosition = 20; } else { this.HuntID = "B"; this.FlipPosition = -20; } this.OpenRangeDown = 450; this.OpenRangeUp = -20; this.OpenChanceDragon = 0.85; this.OpenChanceJake = 0.1; this.HuntEtat = "idle"; this.AttackDelay = 100; this.AttackDelayCount = 0; this.AttackChance = 0.85; this.FlipDelay = 10; this.FlipDelayCount = 0; this.CloseDelay = 100; this.closeDelayCount = 0; this.CloseChance = 0.5; this.FrThrow = 11; } function ObjMedusa(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -60; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSparkID = null; this.HasAttacked = false; G_Medusa = this; _global.Medusa = this; } function ObjMedusaSister(mc, Type, Nom, PosX, PosY) { this.mc = mc; this.Nom = Nom; this.Perso = Type; this.Etat = "Idle"; this.EtatOld = "Idle"; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -110; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSister = "SisterRight"; this.CurrentAction = "Idle"; this.MedusaAttack = false; } function ObjWall(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; _parent.Collider.Wall.attachMovie("WallHit", this.Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Wall[Nom]._x = PosX; _parent.Collider.Wall[Nom]._y = PosY; this.FrRemoveWallHit = 4; } function ObjDragonObstacle(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; } function ObjAntenna(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.ChargedDelay = 300; this.ChargedCount = 0; } function ObjBonus(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.CanBeKill = false; } _global.Game = this; this.KeyListener = new com.sarbakan.utils.KeyManager(); KeyListener.addKeyListener(39, "R"); KeyListener.addKeyListener(37, "L"); KeyListener.addKeyListener(40, "Dw"); KeyListener.addKeyListener(38, "Up"); KeyListener.addKeyListener(32, "Dragon"); KeyListener.addKeyListener(66, "Attack"); KeyListener.addKeyListener(78, "Action"); 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(); } } } }; CreerBg = function (PosX, PosY) { this.Bg = new ObjBg(PosX, PosY); }; ObjBg.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } CheckScreen(); if (!NoCamUpdate) { ScrollBg(); } } } }; ObjBg.prototype.ScrollBg = function () { with (this) { if (CamOnMedusa) { Pers.TrueX = _global.Medusa.TrueX; Pers.TrueY = _global.Medusa.TrueY; } if ((PosY <= MaxDw) and (PosY >= MaxUp)) { if (Pers.TrueX > (CenterX + 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else { if ((CenterX - Pers.TrueX) > SpdXG) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXG; } if ((PosX + MoveX) < MaxG) { MoveX = MaxG - PosX; } } } else if (Pers.TrueX < (CenterX - 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } else { if ((CenterX - Pers.TrueX) < SpdXD) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXD; } if ((PosX + MoveX) > MaxD) { MoveX = MaxD - PosX; } } } else { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } } } if ((PosX <= MaxD) and (PosX >= MaxG)) { if (Pers.TrueY > (CenterY + 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxUp - PosY; } else { MoveY = SpdYDw; } } else { if ((CenterY - Pers.TrueY) > SpdYUp) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYUp; } if ((PosY + MoveY) < MaxUp) { MoveY = MaxUp - PosY; } } } else if (Pers.TrueY < (CenterY - 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } else { if ((CenterY - Pers.TrueY) < SpdYDw) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYDw; } if ((PosY + MoveY) > MaxDw) { MoveY = MaxDw - PosY; } } } else { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxDw - PosY; } else { MoveY = SpdYDw; } } else if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } } } _parent._x = Math.floor(_parent._x + MoveX); PosX = _parent._x; InvPosX = PosX * -1; MoveX = 0; _parent._y = Math.floor(_parent._y + MoveY); PosY = _parent._y; InvPosY = PosY * -1; _global.MoveY = MoveY; MoveY = 0; _parent.ParallaxSky._y = (Math.floor(_parent._y / (-ParallaxRateSky)) + 350) + 30; ParallaxSkyPosY = _parent.ParallaxSky._y; _parent.ParallaxCity._y = (Math.floor(_parent._y / (-ParallaxRateCity)) + 140) + 30; ParallaxCityPosY = _parent.ParallaxCity._y; } }; CreerBox = function (Nom, PosX, PosY, Type, Dir) { if (this[Nom] == null) { this[Nom] = new ObjBox(Nom, PosX, PosY, Type, Dir); G_TabBox.push(Nom); } }; ObjBox.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBox.prototype.Wait = function () { with (this) { if (Type == "moveable") { CheckPush(); } CheckHitGrd(); CheckSleep(); CheckFall(); if (Type == "destroyable") { CheckDestroy(); } } }; ObjBox.prototype.Fall = function () { with (this) { CheckHitGrd(); SetSpdFall(); MoveBox(); if (((Nom == "BoxDestroyWeb") && (!WebDestroyed)) && (TrueY > 350)) { _global.Game.WebDestroyable.Etat = "Destroy"; WebDestroyed = true; } } }; ObjBox.prototype.Land = function () { with (this) { CheckHitGrd(); SetSpdLand(); MoveBox(); if ((TrueX > 0) && (TrueX < 500)) { _global.SoundCTRL.playSound("BoxLand", 100, 0); } } }; ObjBox.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe >= _parent.Bg[1][Nom].Etat._totalframes) { _parent.Bg[1][Nom].Etat.stop(); _parent.Collider.Sol[Nom].removeMovieClip(); _parent.Collider.Ceil[Nom].removeMovieClip(); _parent.Collider.Wall[Nom].removeMovieClip(); } } }; ObjBox.prototype.LandFin = function () { with (this) { Etat = "Wait"; Pers.PushedBox = 0; } }; ObjBox.prototype.Fixed = function () { with (this) { CheckSleep(); } }; ObjBox.prototype.CheckPush = function () { with (this) { if (Pers.Etat == "Push") { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.PushPoint)) { Dir = Pers.Dir; if (Dir == "D") { this.MoveX = 2; } else if (Dir == "G") { this.MoveX = -2; } CheckWall(); if (Pers.Dir != PushDir) { MoveX = 0; } MoveBox(); Pers.PushedBox = this; if (MoveX != 0) { _global.Snd.playSound("push", 100, 999, true); } } } else { _global.Snd.stopSound("push"); } } }; ObjBox.prototype.CheckDestroy = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjBox.prototype.CheckHitGrd = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (_parent.Collider.Sol.hitTest(HitX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitRightX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitLeftX, HitY, true)) { HitGrd = true; } else { HitGrd = false; } } }; ObjBox.prototype.SetSpdFall = function () { with (this) { MaxMoveY = 15; MoveY = MoveY + 5; if (MoveY > MaxMoveY) { MoveY = MaxMoveY; } aCheckPoint = [TrueX, HitLeftX, HitRightX]; for (CheckPointI in aCheckPoint) { var activePointX = aCheckPoint[CheckPointI]; if (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 2), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 4), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } } } }; ObjBox.prototype.SetSpdLand = function () { with (this) { while ((_parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true) || (_parent.Collider.Sol.hitTest(HitLeftX, TrueY + MoveY, true))) || (_parent.Collider.Sol.hitTest(HitRightX, TrueY + MoveY, true))) { MoveY--; } if (MoveY < 1) { MoveY = 1; Etat = "LandFin"; } } }; ObjBox.prototype.CheckFall = function () { with (this) { if (HitGrd == true) { MoveY = 0; Etat = "Wait"; } else { Etat = "Fall"; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } MoveX = 0; MoveY = 0; } } }; ObjBox.prototype.CheckWall = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (Pers.Dir == "G") { HitX = HitX + (MoveX - LgHitG); } else if (Pers.Dir == "D") { HitX = HitX + (MoveX + LgHitD); } if (_parent.Collider.Wall.hitTest(HitX, HitY, true)) { MoveX = 0; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } } } }; ObjBox.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjBox.prototype.MoveBox = function () { with (this) { PosX = Number(PosX + MoveX); PosY = Number(PosY + MoveY); _parent.Bg[1][Nom]._x = PosX; _parent.Bg[1][Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY - 15; _parent.Collider.Wall[Nom]._x = PosX + 30; _parent.Collider.Wall[Nom]._y = PosY + 4; _parent.Collider.Ceil[Nom]._x = PosX; _parent.Collider.Ceil[Nom]._y = PosY + 40; } }; ObjBox.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (FixedFlag) { Etat = "Fixed"; } else { Etat = "Wait"; } } } }; ObjBox.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = (PosY + _parent._y) + LgHitDw; HitRightX = TrueX + LgHitD; HitLeftX = TrueX - LgHitG; } }; ObjBox.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if ((NewAction == "Turn") || (NewAction == "Fixed")) { _parent.Bg[1][Nom].gotoAndStop(NewAction + Dir); } else { _parent.Bg[1][Nom].gotoAndStop(NewAction); } _parent.Bg[1][Nom].Etat.box.gotoAndStop(Type); _parent.Bg[1][Nom].Etat.box.box.gotoAndStop(Type); } }; ObjBox.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } SetTruePos(); this[Etat](); } } }; ObjPers.prototype.IdleJake = function () { with (this) { DistYFall = 0; KeepDeadPos = true; bCanAttack = true; if (Life > 0) { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckPush(); CheckJump(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusJake = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.RunJake = function () { with (this) { bCanAttack = true; DistYFall = 0; SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckJump(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartJake = function () { with (this) { Pers.bouncingDisabledCount = 0; CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); MovePers(); if (HitGrd == true) { Etat = "Land"; } else if (SpdYNow >= 0) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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"; } } else if (DistYFall >= DistYFallMax) { autoSwitchDragon = true; } CheckHole(); } }; ObjPers.prototype.JumpLandingJake = function () { with (this) { CheckGetFire(); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (!_global.Game[onBouncingID].CheckPersOn()) { bounceCount = 0; Pers.onBouncingID = null; } if (_parent.Pers.Obj.Etat._currentframe >= 3) { if (_global.energy <= 0) { _global.energy = 0; Etat = "Die"; } } if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.ClimbingJake = function () { with (this) { SpdXNow = 0; SpdYNow = 0; CheckHitGrd(); if ((Pers.ClimbedDistance > 30) && (HitGrd)) { Etat = "Idle"; Pers.ladderDisabledCount = 0; } else if (KeyListener.Action) { Etat = "Fall"; } else { if (KeyListener.L) { SpdXNow = -2; } else if (KeyListener.R) { SpdXNow = 2; } if (KeyListener.Up) { SpdYNow = -3; } else if (KeyListener.Dw) { SpdYNow = 3; } SetMoveX(); SetMoveY(); CheckWall(FrontX, FrontY - 15); CheckWall(BackX, FrontY - 15); CheckWall(FrontX, FrontY); CheckWall(BackX, FrontY); CheckWall(FrontX, FrontY + 15); CheckWall(BackX, FrontY + 15); CheckWall(FrontX, FrontY + 30); CheckWall(BackX, FrontY + 30); CheckWall(FrontX, FrontY + 45); CheckWall(BackX, FrontY + 45); MovePers(); Pers.ClimbedDistance++; } if ((SpdXNow != 0) || (SpdYNow != 0)) { if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { _parent.Pers.Obj.Etat.gotoAndStop(1); } else { _parent.Pers.Obj.Etat.nextFrame(); } } else { _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.ActivateJake = function () { with (this) { CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.HurtJake = function () { with (this) { if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetJake = function () { with (this) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } }; ObjPers.prototype.AttackJake = function () { with (this) { CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe == Math.round(_parent.Pers.Obj.Etat._totalframes / 2)) { bHitAttack = true; } else { bHitAttack = false; } if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.GetHitJake = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireJake = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformJake = function () { with (this) { DistYFall = 0; if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 1; Etat = "Idle"; nDragonPowerCount = 0; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.PushJake = function () { with (this) { CheckHitGrd(); PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (!KeyListener.Action) { Etat = "Idle"; } else if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (PushedBox != 0) { MoveX = PushedBox.MoveX; } else { MoveX = 0; } } else { var AddBlock = (35 * NumDir); var i = 0; while (i != AddBlock) { if (_parent.Collider.Wall.hitTest(PushPointX + i, PushPointY, true)) { goToTarget = true; if (((i > 5) && (NumDir == 1)) || ((i < -5) && (NumDir == -1))) { MoveX = 5 * NumDir; } else { MoveX = i; } break; } i = i + NumDir; } } MovePers(); } }; ObjPers.prototype.TransformFallJake = ObjPers.prototype.TransformJake; ObjPers.prototype.DieJake = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { _parent.Pers.Obj.Etat.stop(); if (FrDeadCount == 0) { _global.lives--; _global.Snd.stopSound("lift"); _global.Snd.stopSound("push"); if (_global.lives == 0) { _global.Packaging.showLoseScreen(); } else { _global.HUD.fade(resetLevel); } } FrDeadCount++; } } }; ObjPers.prototype.SleepJake = function () { }; ObjPers.prototype.IdleDragon = function () { with (this) { bCanAttack = true; KeepDeadPos = true; if (Life > 0) { SetSpdDragon(); SetMoveX(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdDragon(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusDragon = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.FlyDragon = function () { with (this) { bCanAttack = true; SetSpdDragon(); SetMoveX(); SetMoveY(); CheckDragonObstacle(); CheckWall(FrontX, FrontY); CheckCeilDragon(); CheckSolDragon(); CheckGroundDragon(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartDragon = function () { with (this) { CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleDragon = function () { with (this) { SetSpdDragonJump(); 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 = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallDragon = function () { with (this) { SetSpdDragonJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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.JumpLandingDragon = function () { with (this) { CheckGetFire(); this["CheckAttack" + Perso](); if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) { if (Life <= 0) { Etat = "Die"; } else { Etat = "Idle"; } } } }; ObjPers.prototype.HurtDragon = function () { with (this) { MovePers(); if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); Etat = "Idle"; FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetDragon = ObjPers.prototype.HurtDragon; ObjPers.prototype.AttackTailDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrAttackTailHit) { bHitAttack = true; } else { bHitAttack = false; } } }; ObjPers.prototype.AttackFireDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrShootFire) { if (Dir == "D") { CreerFireBall(PosX + 70, PosY - 70, Dir); } else { CreerFireBall(PosX - 70, PosY - 70, Dir); } } } }; ObjPers.prototype.GetHitDragon = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireDragon = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 0; Etat = "Fall"; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.DieDragon = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { FrDeadCount++; _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.SleepDragon = function () { }; CreerPers = function (PosX, PosY, Perso) { this.Pers = new ObjPers(PosX, PosY, Perso); }; ObjPers.prototype.CharacterSwitch = function () { with (this) { if (Etat == "Fall") { Etat = "TransformFall"; } else { Etat = "Transform"; } } }; ObjPers.prototype.HeroChange = function (NewHero) { with (this) { Perso = NewHero; updatePerso(); } }; ObjPers.prototype.GetHitGeneral = function () { with (this) { SetSpdXHit(); CheckWall(BackX, TrueY); CheckHitGrd(); CheckSol(); MovePers(); CheckDie(); } }; 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.SetSpdXHit = function () { with (this) { MoveX = SpdXNow; if (SpdXNow > 0) { SpdXNow = SpdXNow * 0.7; } if (Dir eq "D") { MoveX = MoveX * -1; } } }; ObjPers.prototype.SetSpdXJake = 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.SetSpdDragon = function () { with (this) { if (KeyListener.R == true) { Dir = "D"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase; } } else if (KeyListener.L == true) { Dir = "G"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase * -1; } } else { SpdXNow = 0; } if (KeyListener.Dw == true) { SpdYNow = SpdYFly; } else if (KeyListener.Up == true) { SpdYNow = SpdYFly * -1; } else { SpdYNow = 0; } if ((SpdXNow == 0) && (SpdYNow == 0)) { Etat = "Idle"; } else { Etat = "Fly"; } } }; 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.SetMoveX = function () { with (this) { MoveX = SpdXNow; } }; ObjPers.prototype.SetMoveY = function () { with (this) { MoveY = SpdYNow; } }; 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.CheckDragonObstacle = function () { with (this) { if (MoveY != 0) { if (_parent.Collider.Dragon.hitTest(TopX, TopY + MoveY, true)) { MoveY = DragonHitTop; } else if (_parent.Collider.Dragon.hitTest(BottomFrontX, (TopY + MoveY) + DragonHeight, true) or _parent.Collider.Dragon.hitTest(BottomBackX, (TopY + MoveY) + DragonHeight, true)) { MoveY = DragonHitBottom; } } } }; 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.CheckSolDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Sol.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckCeilDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; SpdYNow = 0; } } } }; ObjPers.prototype.CheckGroundDragon = function () { with (this) { if (MoveY > 0) { if (_parent.Collider.Sol.hitTest(BottomFrontX, TrueY - _parent.Pers.Obj.HitBottomFront._y, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckJump = function () { with (this) { if (Etat != "Push") { if ((!KeyListener.Up) && (!bJumpRelease)) { bJumpRelease = true; } if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) { bJumpRelease = false; if (Etat == "Run") { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } else { Etat = "JumpStart"; } } } } }; ObjPers.prototype.CheckPush = function () { with (this) { PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (KeyListener.Action && (((Dir == "G") && (KeyListener.L)) || ((Dir == "D") && (KeyListener.R)))) { Etat = "Push"; } } } }; ObjPers.prototype.CheckAttackJake = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "Attack"; } } }; ObjPers.prototype.CheckAttackDragon = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackTail"; } if ((KeyListener.Action == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackFire"; } } }; ObjPers.prototype.CheckFall = function () { with (this) { if (SpdYNow >= SpdYFall) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.CheckDie = function () { with (this) { if (_global.energy <= 0) { _global.dragonPower = 0; Etat = "Fall"; } } }; ObjPers.prototype.MovePers = function () { with (this) { if ((Pers.TrueX + MoveX) < 30) { MoveX = (TrueX * -1) + 30; } else if ((Pers.TrueX + MoveX) > 520) { MoveX = 520 - Pers.TrueX; } PosX = _parent.Pers._x + MoveX; _parent.Pers._x = PosX; MoveX = 0; PosY = _parent.Pers._y + MoveY; _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]; if ((onBouncingID != null) && (_global.Game[onBouncingID].CheckPersOn() != true)) { Pers.SpdYUp = Pers.SpdYUpBase; } 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; } }; 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; } }; ObjPers.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Pers.gotoAndStop((Perso + "_") + Dir); } }; ObjPers.prototype.Actions = function () { with (this) { if (WaitForActions) { SetTruePos(); CheckHitGrd(); CheckSol(); CheckFall(); WaitForActions = false; } else if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Pers.Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Pers.Obj.Etat.play(); } SetTruePos(); InvincibleCheck(); this[Etat + aCharacter[ICharacter]](); CheckCharSwitch(); CheckHit(); CheckEndLevel(); } } }; ObjPers.prototype.CheckCharSwitch = function () { with (this) { if (ICharacter == 1) { if ((KeyListener.Dragon || (_global.dragonPower == 0)) && (Etat != "HurtNet")) { CharacterSwitch(); } else if ((++nDragonPowerCount) == nDragonPowerRythm) { _global.dragonPower--; nDragonPowerCount = 0; if (_global.dragonPower < 0) { _global.dragonPower = 0; } } } else { if (((KeyListener.Dragon || (autoSwitchDragon)) && (bCanSwitch)) && (_global.dragonPower > 0)) { autoSwitchDragon = false; bCanSwitch = false; FrSwitchCharacterCount = FrSwitchCharacter; CharacterSwitch(); } if (!bCanSwitch) { FrSwitchCharacterCount--; if (FrSwitchCharacterCount == 0) { bCanSwitch = true; } } } } }; ObjPers.prototype.CheckEndLevel = function () { with (this) { if (!_global.boss) { if (((_global.level == 1) && (PosY <= -3930)) && (PosX >= 390)) { _global.HUD.fade(bossStart); _global.boss = true; } if ((_global.level == 2) && (PosY <= -4670)) { _global.HUD.fade(bossStart); _global.boss = true; } if (((_global.level == 3) && (PosY <= -5800)) && (PosX <= 105)) { _global.HUD.fade(bossStart); _global.boss = true; } } } }; ObjPers.prototype.CheckHit = function () { with (this) { if (KeyListener.X && (CanBeHit)) { this.GetHit(); } } }; CreerNetBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("NetBall", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Net", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerFireBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("JackDragon_FireAnim", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Fire", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerSparkBall = function (PosX, PosY, Dir, Rotation, SpdX, SpdY) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("Medusa_Blast", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Spark", _local4, PosX, PosY, Dir, 8, 0, G_TabPersBall, "SlimeSplat", Rotation, SpdX, SpdY); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; ObjPersBall.prototype.Move = function () { with (this) { _parent.Bg[1][Nom]._x = PosX + SpdX; PosX = PosX + SpdX; if (SpdY) { _parent.Bg[1][Nom]._y = PosY + SpdY; PosY = PosY + SpdY; } SetTruePos(); CheckHit(); CheckOut(); } }; ObjPersBall.prototype.Hit = function () { with (this) { if ((Type == "Net") && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { Pers.Etat = "HurtNet"; _global.Snd.playSound("hurtNet", 100, 1, false); CanBeKill = true; } } }; ObjPersBall.prototype.End = function () { with (this) { if (((Type == "Fire") || (Type == "Spark")) && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { CanBeKill = true; } } }; ObjPersBall.prototype.Burn = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckHit = function () { with (this) { if (Type == "Net") { if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Burn"; _global.Game[Pers.CurrentFireID].Etat = "End"; } else if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.Hit))) { Etat = "Hit"; } } if (((Type == "Spark") && (Pers.Etat != "Activate")) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.HitFront))) { Pers.Etat = "Hurt"; Etat = "End"; } if (((Type == "Spark") && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1].FinalHit))) && (G_Medusa.Etat != "Die")) { _global.HUD.increaseScore(10000); _parent.Control.Bg.CamOnMedusa = true; G_Medusa.Etat = "Die"; } } }; ObjPersBall.prototype.CheckOut = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckKill = function () { with (this) { if (CanBeKill == true) { KillBall(); } } }; ObjPersBall.prototype.KillBall = function () { with (this) { if (Tab == G_TabPersBall) { G_TabPersBall.splice(PersBallI, 1); PersBallI = PersBallI - 1; } else if (Tab == G_TabMinionBall) { G_TabMinionBall.splice(MinionBallI, 1); MinionBallI = MinionBallI - 1; } delete _parent.Control[Nom]; _parent.Bg[1][Nom].removeMovieClip(); if (Type == "Fire") { Pers.CurrentFireID = null; } if (Type == "Spark") { G_Medusa.CurrentSparkID = null; } } }; ObjPersBall.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjPersBall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].gotoAndStop(NewAction); } }; ObjPersBall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Etat.play(); } this[Etat](); CheckKill(); } } }; CreerSwitch = function (Nom, PosX, PosY) { if (this[Nom] == null) { this[Nom] = new ObjSwitch(Nom, PosX, PosY); G_TabSwitch.push(Nom); } }; ObjSwitch.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjSwitch.prototype.Idle = function () { with (this) { CheckPersOn(); CheckBoxOn(); CheckSleep(); } }; ObjSwitch.prototype.Baisse = function () { with (this) { if (_parent[Nom].Etat._currentframe >= FrBaisse) { _global.SoundCTRL.playSound("SwitchOn", 100, 0); _parent[Nom].Activate(); Etat = "Active"; } } }; ObjSwitch.prototype.Active = function () { with (this) { CheckSleep(); if (!FlagBoxUse) { CheckRelease(); } } }; ObjSwitch.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { FlagUse = true; Etat = "Baisse"; } } }; ObjSwitch.prototype.CheckBoxOn = function () { with (this) { var Box = Pers.PushedBox; if ((Pers.Etat == "Push") && (Box != 0)) { if (Box.Dir == "G") { if (((((Box.PosX - Box.LgHitG) >= (PosX - LgOnX)) and ((Box.PosX - Box.LgHitG) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Etat = "Baisse"; Activate(); } } else if (Box.Dir == "D") { if (((((Box.PosX + Box.LgHitD) >= (PosX - LgOnX)) and ((Box.PosX + Box.LgHitD) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } else if ((Box.Etat == "LandFin") && (Box != 0)) { if ((((Box.PosX >= (PosX - LgOnX)) and (Box.PosX <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; Box.Dir = ""; _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } }; ObjSwitch.prototype.CheckRelease = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { } else { Etat = "Idle"; FlagUse = false; _parent[Nom].Desactivate(); _global.SoundCTRL.playSound("SwitchOff", 100, 0); } } }; ObjSwitch.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjSwitch.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjSwitch.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjSwitch.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerElevator = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjElevator(l_mcElement, "Y", 0, -1 * l_mcElement.distance); G_TabElevator.push(l_mcElement._name); } }; this.onSwitchLift = function (l_Nom) { with (this) { if (_global.Game[l_Nom + "Lift"].Active == true) { _global.Game[l_Nom + "Lift"].Active = false; _global.Game[l_Nom].Etat = "Idle"; _global.Snd.stopSound("lift"); } else { _global.Game[l_Nom + "Lift"].Active = true; _global.Game[l_Nom].Etat = "IdleActivate"; _global.Snd.playSound("lift", 100, 999, true); } } }; ObjElevator.prototype.Sleep = function () { with (this) { CheckActif(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Idle = function () { with (this) { CheckSleep(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Wait = function () { with (this) { if (frWaitCount >= frWaitTime) { Etat = "Idle"; frWaitCount = 0; } else { frWaitCount++; } } }; ObjElevator.prototype.SetMove = function () { with (this) { CheckPersOn(); CheckLimit(); MoveElevator(); } }; ObjElevator.prototype.MoveElevator = function () { with (this) { this["Pos" + Axis] = this["Pos" + Axis] + this["Move" + Axis]; _parent[Nom]._x = PosX; _parent[Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY; if (PersOn) { Pers["Move" + Axis] = this["Move" + Axis]; Pers.MovePers(); } UpdateLift(); } }; ObjElevator.prototype.UpdateLift = function () { with (this) { var cableH = (this["Pos" + Axis] - Max); mc.Obj.cable1._height = cableH; mc.Obj.cable2._height = cableH; mc._y = mc._y + this["Move" + Axis]; mc._parent[Nom.substr(0, -4)]._y = mc._parent[Nom.substr(0, -4)]._y + this["Move" + Axis]; _global.Game[Nom.substr(0, -4)].PosY = _global.Game[Nom.substr(0, -4)].PosY + this["Move" + Axis]; _global.Game._parent.overlay[Nom + "ramp"]._y = _global.Game._parent.overlay[Nom + "ramp"]._y + this["Move" + Axis]; _global.Game._parent.Bg[1][Nom + "ramp"]._y = _global.Game._parent.Bg[1][Nom + "ramp"]._y + this["Move" + Axis]; } }; ObjElevator.prototype.CheckLimit = function () { with (this) { this["Move" + Axis] = Speed * Dir; if ((Dir == -1) && ((this["Pos" + Axis] + this["Move" + Axis]) <= Max)) { Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = false; CanReposition = true; RepositionCount = 0; Dir = 0; } if ((Dir == 1) && ((this["Pos" + Axis] + this["Move" + Axis]) >= Min)) { CanReposition = false; Dir = -1; Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = true; _global.Game[Nom.substr(0, -4)].Etat = "Idle"; } } }; ObjElevator.prototype.CheckReposition = function () { with (this) { if (CanReposition) { CheckPersOn(); if (!PersOn) { if ((++RepositionCount) == RepositionDelay) { RepositionCount = 0; CanReposition = false; Active = true; Dir = 1; _global.Snd.playSound("lift", 100, 999, true); } } } } }; ObjElevator.prototype.Activate = function () { with (this) { Active = true; } }; ObjElevator.prototype.Desactivate = function () { with (this) { Active = false; } }; ObjElevator.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { PersOn = true; } else { PersOn = false; } } }; ObjElevator.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { Etat = "Idle"; if (Active) { CheckLimit(); MoveElevator(); } } } }; ObjElevator.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjElevator.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjElevator.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLevier = function (Nom, PosX, PosY, listener) { if (this[Nom] == null) { this[Nom] = new ObjLevier(Nom, PosX, PosY, listener); G_TabLevier.push(Nom); } }; ObjLevier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjLevier.prototype.Idle = function () { with (this) { if (Active) { CheckPersOn(); CheckSleep(); } } }; ObjLevier.prototype.IdleActivate = ObjLevier.prototype.Idle; ObjLevier.prototype.Activate = function () { with (this) { if (Pers.ICharacter == 0) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.Etat == "Activate")) && (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes)) { listener(Nom); } } } }; ObjLevier.prototype.CheckPersOn = function () { with (this) { if ((Pers.ICharacter == 0) && (Pers.Etat != "Push")) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.HitGrd == true)) && (Pers.CanBeHit || (Pers.Invincible))) { if (KeyListener.Action) { Pers.canJumpCount = 0; Etat = "Activate"; Pers.Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); } } } else if (((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); } else if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); _global.Game[Pers.CurrentFireID].Etat = "End"; } } }; ObjLevier.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjLevier.prototype.CheckSleep = function () { }; ObjLevier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjLevier.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLadder = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjLadder(l_mcElement); G_TabLadder.push(l_mcElement._name); } }; this.onSwitchLadder = function (l_Nom) { with (this) { _global.Game[l_Nom + "Ladder"].Etat = "Opening"; } }; ObjLadder.prototype.Off = function () { with (this) { } }; ObjLadder.prototype.Opening = function () { with (this) { if (mc.etat._currentframe == mc.etat._totalframes) { Etat = "On"; } } }; ObjLadder.prototype.On = function () { with (this) { CheckPersOn(); } }; ObjLadder.prototype.CheckPersOn = function () { with (this) { if (Pers.ladderDisabledCount >= Pers.ladderDisabledMax) { if (((((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= PosY)) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { if (((Pers.ICharacter == 0) && (Pers.Etat != "Climbing")) && (Pers.Etat != "Hurt")) { if ((KeyListener.Up && (Pers.PosY >= (PosY + 70))) || (KeyListener.Dw && (Pers.PosY <= (PosY + 165)))) { Pers.onLadderID = Nom; Pers.Etat = "Climbing"; Pers.ClimbedDistance = 0; } } } else if ((Pers.Etat == "Climbing") && (Pers.onLadderID == Nom)) { if (Pers.PosX < PosX) { Pers.ChangeDir("G"); } if (Pers.PosX > (PosX + LgOnX)) { Pers.ChangeDir("D"); } Pers.Etat = "Fall"; Pers.onLadderID = null; } } else { Pers.ladderDisabledCount++; } } }; ObjLadder.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjLadder.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerBouncingChair = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBouncingChair(l_mcElement); G_TabChair.push(l_mcElement._name); } }; ObjBouncingChair.prototype.Idle = function () { with (this) { if (CheckPersOn()) { Etat = "Bounce"; if ((Pers.onBouncingID == Nom) && (Pers.HitGrd)) { Pers.onBouncingID = null; } } } }; ObjBouncingChair.prototype.Bounce = function () { with (this) { if (mc.Etat._currentframe == 9) { BouncePers(); } if (mc.Etat._currentframe == mc.Etat._totalframes) { Etat = "Idle"; } } }; ObjBouncingChair.prototype.CheckPersOn = function () { with (this) { if ((((((((Pers.ICharacter == 0) && (Pers.Etat != "Idle")) && (Pers.Etat != "Run")) and (Pers.PosX >= PosX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { return(true); } } }; ObjBouncingChair.prototype.BouncePers = function () { with (this) { if (CheckPersOn()) { Pers.SpdYUp = Pers.SpdYUpBase; if (Pers.onBouncingID != Nom) { Pers.onBouncingID = Nom; Pers.bounceCount = 0; } else { Pers.bounceCount++; if (Pers.bounceCount > 0) { Pers.bounceCount = Pers.bounceCountMax; } Pers.SpdYUp = Pers.SpdYUp - (Pers.bounceCount * 0.34); } Pers.Etat = "JumpStart"; } else if (Pers.HitGrd) { Pers.onBouncingID = null; } } }; ObjBouncingChair.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjBouncingChair.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerHuntSoldier = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntSoldier"; this[l_mcElement._name] = new ObjHuntSoldier(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntSoldier.push(l_mcElement._name); } }; ObjHuntSoldier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntSoldier.prototype.Idle = function () { with (this) { CheckAttack(); CheckShield(); CheckDir(); CheckHurt(); CheckSleep(); } }; ObjHuntSoldier.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Stunned = ObjHuntSoldier.prototype.Hurt; ObjHuntSoldier.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack1 = function () { with (this) { if (((Pers.Etat != "Hurt") && (_parent.Bg[1][Nom].Obj.Etat._currentframe >= 9)) && (_parent.Bg[1][Nom].Obj.Etat._currentframe <= 25)) { if (_parent.Bg[1][Nom].Obj.Etat.wave.hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack2 = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 7) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; _global.Snd.playSound("hurtJake", 100, 1, false); } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjHuntSoldier.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if ((Etat != "Shield") && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { if ((++HurtCount) == 3) { enemyHitScore(); Etat = "Stunned"; HurtCount = 0; } else { Etat = "Hurt"; } if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } } }; ObjHuntSoldier.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjHuntSoldier.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Math.abs(Pers.PosY - PosY) < 180) && (Math.random() < AttackChance)) { if (Math.abs(Pers.PosX - PosX) < 150) { Etat = "Attack2"; } else { Etat = "Attack1"; } AttackDelayCount = 0; } } }; ObjHuntSoldier.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntSoldier.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjHuntSoldier.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntSoldier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjHuntSoldier.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerHuntWindow = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntWindow"; this[l_mcElement._name] = new ObjHuntWindow(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntWindow.push(l_mcElement._name); } }; ObjHuntWindow.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntWindow.prototype.IdleClose = function () { with (this) { CheckCanOpen(); CheckSleep(); } }; ObjHuntWindow.prototype.IdleOpen = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt._currentframe == 1) { _parent.Bg[1][Nom].Obj.Etat.Hunt.gotoAndStop(HuntID); SetHuntEtat("Appear"); if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } } if ((HuntEtat == "Appear") && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { SetHuntEtat("idle"); } if (HuntEtat == "idle") { CheckFlip(); CheckAttack(); } if (((HuntEtat == "disappear") || (HuntEtat == "flee")) && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat.stop(); Etat = "Close"; if (HuntEtat == "flee") { _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = -80; } } if (HuntEtat == "Throw") { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes) { SetHuntEtat("idle"); } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == FrThrow) { var l_dir = "G"; if (HuntID == "A") { l_dir = "D"; } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { if (l_dir == "D") { l_dir = "G"; } else { l_dir = "D"; } } var l_netY = 70; if (PosY < Pers.TrueY) { l_netY = l_netY + (Math.abs(Pers.PosY - TrueY) - 150); } else { l_netY = l_netY - Math.abs(Pers.PosY - TrueY); } if (l_netY > 120) { l_netY = 120; } if (l_netY < 20) { l_netY = 20; } CreerNetBall(PosX, PosY + l_netY, l_dir); _global.Snd.playSound("net", 130, 1, false); } } CheckCanClose(); CheckHurt(); CheckSleep(); } }; ObjHuntWindow.prototype.Open = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleOpen"; AttackDelayCount = AttackDelay * 0.9; } } }; ObjHuntWindow.prototype.Close = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleClose"; _global.Game["G_HuntWindowCurrent" + HuntID] = null; } } }; ObjHuntWindow.prototype.CheckCanOpen = function () { with (this) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == null) { if (_global.Game[("G_Window" + HuntID) + "OpenDelayCount"] >= _global.Game.G_WindowOpenDelay) { if ((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown))) { if (((Pers.ICharacter == 0) && (Math.random() <= OpenChanceJake)) || ((Pers.ICharacter == 1) && (Math.random() <= OpenChanceDragon))) { Etat = "Open"; _global.Game["G_HuntWindowCurrent" + HuntID] = Nom; _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = 0; } } } } } }; ObjHuntWindow.prototype.CheckCanClose = function () { with (this) { if (CloseDelayCount < CloseDelay) { CloseDelayCount++; } else if ((HuntEtat != "disappear") && ((!((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown)))) || ((Pers.ICharacter == 0) && (Math.random() <= CloseChance)))) { if (Math.random() <= OpenChance) { SetHuntEtat("disappear"); CloseDelayCount = 0; } } } }; ObjHuntWindow.prototype.CheckFlip = function () { with (this) { if (FlipDelayCount < FlipDelay) { FlipDelayCount++; } else { if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } FlipDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Pers.ICharacter == 1) && (Math.abs(Pers.PosY - PosY) < 300)) { SetHuntEtat("Throw"); AttackDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckHurt = function () { with (this) { if ((((HuntEtat == "idle") || (HuntEtat == "Throw")) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].Obj.hitTest(_parent.Pers.Obj.HitFront))) { SetHuntEtat("flee"); enemyHitScore(); if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } }; ObjHuntWindow.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "IdleClose"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntWindow.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == Nom) { _global.Game["G_HuntWindowCurrent" + HuntID] = null; } Etat = "Sleep"; } } }; ObjHuntWindow.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntWindow.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.window.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.overlay.gotoAndStop(G_CurrentLevel); } }; ObjHuntWindow.prototype.SetHuntEtat = function (newEtat) { with (this) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.gotoAndStop(newEtat); HuntEtat = newEtat; } }; ObjHuntWindow.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusa = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "Medusa"; this[l_mcElement._name] = new ObjMedusa(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusa.push(l_mcElement._name); } }; ObjMedusa.prototype.Idle = function () { with (this) { CheckAttack(); CheckDir(); CheckHurt(); } }; ObjMedusa.prototype.Captured = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showNextScreen(); } } }; ObjMedusa.prototype.Die = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showWinScreen(); } } }; ObjMedusa.prototype.Laugh = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Attack = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe < FrPrepareAttack) { CheckDir(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrPrepareAttack) { if (Pers.ICharacter == 0) { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 1.5)); } else { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 3)); } NextAttackRotation = Math.round(pointsGetAngle(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY)); var l_dst = pointsGetDistance(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY); var l_step = (l_dst / 20); NextAttackRotationSpdX = (Pers.TrueX - G_Medusa.TrueX) / l_step; NextAttackRotationSpdY = (l_PersY - G_Medusa.TrueY) / l_step; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrAttack) { var l_PosX = PosX; CreerSparkBall(PosX, PosY - 95, Dir, NextAttackRotation, NextAttackRotationSpdX, NextAttackRotationSpdY); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { HasAttacked = true; Etat = "Idle"; } CheckHurt(); } }; ObjMedusa.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjMedusa.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Laugh"; } } } }; ObjMedusa.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjMedusa.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if (Math.random() < AttackChance) { Etat = "Attack"; HasAttacked = false; AttackDelayCount = 0; } } }; ObjMedusa.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjMedusa.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjMedusa.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjMedusa.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusaSister = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "MedusaSister"; this[l_mcElement._name] = new ObjMedusaSister(l_mcElement, Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusaSister.push(l_mcElement._name); } }; ObjMedusaSister.prototype.UpdateSister = function (SisterID) { with (this) { if (CurrentSister == SisterID) { mc[SisterID].gotoAndStop(CurrentAction); } else { mc[SisterID].gotoAndStop("Idle"); } } }; ObjMedusaSister.prototype.UpdatePosition = function () { with (this) { var l_maxOffset = 70; var l_posX = Math.abs(_parent.Control.Bg.PosX); mc._x = -((l_posX / 450) * l_maxOffset); mc._y = mc._y + (_global.MoveY / 2.5); if (mc._y < 145) { mc._y = 145; } } }; ObjMedusaSister.prototype.UpdateAttack = function () { with (this) { if ((CurrentAction == "Idle") && (!MedusaAttack)) { if ((++AttackDelayCount) == AttackDelay) { if (CurrentSister == "SisterLeft") { CurrentSister = "SisterRight"; } else { CurrentSister = "SisterLeft"; } CurrentAction = "Charge"; AttackDelayCount = 0; } } else if (CurrentAction == "Charge") { if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { var PersY = Math.abs(_global.Game.Pers.PosY); switch (true) { case PersY < 100 : CurrentAction = "Attack3"; break; case PersY < 250 : CurrentAction = "Attack2"; break; case PersY >= 250 : CurrentAction = "Attack1"; } } } else if (((CurrentAction == "Attack1") || (CurrentAction == "Attack2")) || (CurrentAction == "Attack3")) { if (mc[CurrentSister].Etat._currentframe == 9) { if ((Pers.Etat != "Activate") && (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Pers))) { Pers.Etat = "Hurt"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna1)) { _global.Game.Antenna1.Etat = "Charged"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna2)) { _global.Game.Antenna2.Etat = "Charged"; } } if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { CurrentAction = "Idle"; if (CurrentSister == "SisterRight") { MedusaAttack = true; G_Medusa.HasAttacked = false; } } } if (!MedusaAttack) { G_Medusa.AttackDelayCount = 0; } else if (G_Medusa.HasAttacked) { MedusaAttack = false; } } }; ObjMedusaSister.prototype.Actions = function () { with (this) { UpdatePosition(); UpdateAttack(); UpdateSister("SisterLeft"); UpdateSister("SisterRight"); } }; CreerWall = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjWall(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabWall.push(l_mcElement._name); } }; ObjWall.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjWall.prototype.Idle = function () { with (this) { CheckHurt(); CheckSleep(); } }; ObjWall.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrRemoveWallHit) { _parent.Collider.Wall[Nom].removeMovieClip(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Out"; } } }; ObjWall.prototype.CheckHurt = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjWall.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjWall.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjWall.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjWall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.wall.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.wall.gotoAndStop(G_CurrentLevel); } }; ObjWall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerDragonObstacle = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjDragonObstacle(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabDragonObstacle.push(l_mcElement._name); } }; ObjDragonObstacle.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjDragonObstacle.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjDragonObstacle.prototype.Hit = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.HitBoss = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 4) { _global.Game.Web.Etat = "Fall"; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.Fall = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == (_parent.Bg[1][Nom].Obj.Etat._totalframes - 1)) { G_Medusa.Etat = "Captured"; } } }; ObjDragonObstacle.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _parent.Bg[1][Nom].Obj.Etat.stop(); } } }; ObjDragonObstacle.prototype.CheckHit = function () { with (this) { if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitTop) || (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitBottomFront)))) { Pers.Etat = "Hurt"; Etat = "Hit"; Pers.InvincibleEnd(); Pers.MoveY = 40; } } }; ObjDragonObstacle.prototype.CheckActif = function () { with (this) { if (_global.boss || (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep"))) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjDragonObstacle.prototype.CheckSleep = function () { with (this) { if (((((!_global.boss) && (PosX < (Bg.InvPosX - LgOutG))) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjDragonObstacle.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjDragonObstacle.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjDragonObstacle.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerAntenna = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjAntenna(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabAntenna.push(l_mcElement._name); } }; ObjAntenna.prototype.Idle = function () { with (this) { CheckHit(); } }; ObjAntenna.prototype.Charged = function () { with (this) { CheckHit(); if ((++ChargedCount) == ChargedDelay) { Etat = "Idle"; ChargedCount = 0; } } }; ObjAntenna.prototype.CheckHit = function () { with (this) { if ((G_Medusa.CurrentSparkID != null) && (Pers.Etat != "Hurt")) { if (_parent.Bg[1][Nom].Obj.Hit.hitTest(_parent.Bg[1][G_Medusa.CurrentSparkID])) { Etat = "Charged"; ChargedCount = 0; if ((_global.level == 1) && (_global.Game.Web.Etat != "Fall")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Web.Etat = "Fall"; _global.HUD.increaseScore(1000); } if ((((_global.level == 2) && (_global.Game.Antenna1.Etat == "Charged")) && (_global.Game.Antenna2.Etat == "Charged")) && (_global.Game.Wire.Etat != "HitBoss")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Wire.Etat = "HitBoss"; _global.HUD.increaseScore(2000); } } } } }; ObjAntenna.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjAntenna.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if (Etat == "Charged") { _global.Snd.playSound("antenna", 250, 1, false); } _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjAntenna.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerBonus = function (type, l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBonus(type, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabBonus.push(l_mcElement._name); } }; ObjBonus.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjBonus.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBonus.prototype.CheckHit = function () { with (this) { if (((Pers.ICharacter == 0) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj))) || ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.Hit)))) { switch (Type) { case "Score" : _global.Score = _global.Score + 500; _global.Snd.playSound("energy", 200, 1, false); _global.HUD.increaseScore(500); break; case "Life" : if (_global.lives < 3) { _global.lives++; } _global.Snd.playSound("life", 200, 1, false); _global.HUD.increaseScore(200); break; case "Energy" : _global.energy = _global.energy + 50; if (_global.energy > 100) { _global.energy = 100; } _global.Snd.playSound("bonus", 300, 1, false); _global.HUD.increaseScore(200); break; case "Power" : _global.dragonPower = 100; _global.Snd.playSound("power", 300, 1, false); _global.HUD.increaseScore(200); } KillBonus(); } } }; ObjBonus.prototype.KillBonus = function () { with (this) { G_TabBonus.splice(BonusI, 1); BonusI = BonusI - 1; delete _parent.Control[Nom]; _parent.Bg[1][Nom].swapDepths(90210); _parent.Bg[1][Nom].removeMovieClip(); } }; ObjBonus.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { Etat = "Idle"; } } }; ObjBonus.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjBonus.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjBonus.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); CheckKill(); } } }; this.cnt = 0; this.G_CurrentLevel = _global.level; switch (G_CurrentLevel) { case 1 : this.G_MaxEnemyHit = 28; break; case 2 : this.G_MaxEnemyHit = 28; break; case 3 : this.G_MaxEnemyHit = 38; } G_MaxEnemyHitCount = 0; this.G_Pause = true; this.G_PauseOut = false; this.G_PRealese = true; this.G_Resume = false; this.G_TabBox = new Array(); this.G_TabSwitch = new Array(); this.G_TabDoor = new Array(); this.G_TabElevator = new Array(); this.G_TabPersBall = new Array(); this.G_TabLevier = new Array(); this.G_TabLadder = new Array(); this.G_TabChair = new Array(); this.G_TabHuntSoldier = new Array(); this.G_TabHuntWindow = new Array(); this.G_TabMedusa = new Array(); this.G_TabMedusaSister = new Array(); this.G_TabWall = new Array(); this.G_TabDragonObstacle = new Array(); this.G_TabAntenna = new Array(); this.G_TabBonus = new Array(); this.G_NextPersBall = 1; this.G_NextPersBallDepth = 10000; this.G_NextMinionBall = 1; this.G_NextMinionBallDepth = 20000; this.G_OverlayDepth = 0; this.G_HuntWindowCurrentA = null; this.G_HuntActiveSinceA = 0; this.G_HuntWindowCurrentB = null; this.G_HuntActiveSinceB = 0; this.G_AlphaZones = new Array(); this.G_Medusa = null; this.G_WindowOpenDelay = 20; this.G_WindowAOpenDelayCount = 0; this.G_WindowBOpenDelayCount = 0; this.addAlphaZone = function (mc) { if (_global.Packaging.bShadowDisabled) { mc._visible = false; } }; this.resetLevel = function () { _global.dragonPower = 100; _global.energy = 100; if (_global.boss) { _global.resetDestination = "Game_BOSS" + _global.level; } else { _global.resetDestination = "Game_LEVEL" + _global.level; } _parent._parent.gotoAndStop("Reset"); }; this.bossStart = function () { _global.boss = true; _global.resetDestination = "Game_BOSS" + _global.level; _parent._parent.gotoAndStop("Reset"); }; this.enemyHitScore = function () { if ((++G_MaxEnemyHitCount) < G_MaxEnemyHit) { _global.HUD.increaseScore(100); } }; this.Creer_PBalcony = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + l_mcElement._parent._y; CreerPlateforme(pt, 235); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PRoofTop = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; var pt = new Object(); pt = {x:l_mcElement._x - 5, y:l_mcElement._y + 95}; var mcCeil = _parent.Collider.Ceil; mcCeil.moveTo(pt.x, pt.y); mcCeil.beginFill(16711935); pt.x = pt.x + 115; pt.y = pt.y - 70; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x + 115; pt.y = pt.y + 70; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y - 80; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x - 230; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y + 80; mcCeil.lineTo(pt.x, pt.y); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBalconyOpen = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + (l_mcElement._parent._y + 10); CreerPlateforme(pt, 235); if (l_mcElement.flipped) { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01OverlayFlip", {x:pt.x + 32, y:pt.y}, true); CreerObstacle({x:pt.x + 19, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); } else { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01Overlay", {x:pt.x + 120, y:pt.y + 0.5}, true); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 195, y:pt.y}, 15, 15); } _parent.overlay[l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); _parent.Bg[1][l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBox = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; 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; CreerPlateforme(pt, 70); CreerObstacle(pt, 70, 70); } }; this.CheckVisible = function () { if ((this._y < (Bg.InvPosY - Stage.height)) or (this._y > (Bg.InvPosY + Stage.height))) { this._visible = false; } else { this._visible = true; } }; 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.CreerObstacleDragon = function (pt, l_nWidth, l_nHeight) { var _local3 = _parent.Collider.Dragon; pt.x = Math.round(pt.x); pt.y = Math.round(pt.y); _local3.moveTo(pt.x, pt.y); _local3.beginFill(16776960); _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.CreerOverlay = function (id, linkage, pt, bReversed) { var _local4; var _local5; _local5 = _parent.overlay.attachMovie(linkage, id, G_OverlayDepth++); _local5._x = pt.x; _local5._y = pt.y; _local4 = _parent.Bg[1].attachMovie(linkage, id, G_OverlayDepth++); _local4._x = pt.x; _local4._y = pt.y; _local4.overlay = _local5; if (!bReversed) { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = false; this.overlay._visible = true; } else { this._visible = true; this.overlay._visible = false; } }; } else { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = true; this.overlay._visible = false; } else { this._visible = false; this.overlay._visible = true; } }; } }; this.replaceTile = function (l_mcElement) { var _local1 = l_mcElement._name; var _local2 = 1499; if (_local1.slice(0, 8) == "instance") { } else { l_mcElement._x = 0; l_mcElement._y = -((Number(_local1) - 1) * _local2); } }; this.CreerFloor = function (l_nPosX, l_nPosY, l_nWidth, l_nHeight) { var mcGround = _parent.Collider.Sol; with (this) { pt = new Object(); pt = {x:l_nPosX, y:l_nPosY}; pt.y = pt.y - l_nHeight; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor1 = 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 + -60; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloorBoss = 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 + -88; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor2a = 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 + 120; 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); pt.x = pt.x + 360; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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); } }; } onClipEvent (enterFrame) { BoxI = 0; for (BoxI in G_TabBox) { var BoxActif = G_TabBox[BoxI]; if (this[BoxActif].Etat != this[BoxActif].EtatOld) { this[BoxActif].ChangeEtat(this[BoxActif].Etat); } this[BoxActif].Actions(); } PersBallI = 0; for (PersBallI in G_TabPersBall) { var PersBallActif = G_TabPersBall[PersBallI]; if (this[PersBallActif].Etat != this[PersBallActif].EtatOld) { this[PersBallActif].ChangeEtat(this[PersBallActif].Etat); } this[PersBallActif].Actions(); } LevierI = 0; for (LevierI in G_TabLevier) { var LevierActif = G_TabLevier[LevierI]; if (this[LevierActif].Etat != this[LevierActif].EtatOld) { this[LevierActif].ChangeEtat(this[LevierActif].Etat); } this[LevierActif].Actions(); } LadderI = 0; for (LadderI in G_TabLadder) { var LadderActif = G_TabLadder[LadderI]; if (this[LadderActif].Etat != this[LadderActif].EtatOld) { this[LadderActif].ChangeEtat(this[LadderActif].Etat); } this[LadderActif].Actions(); } ChairI = 0; for (ChairI in G_TabChair) { var ChairActif = G_TabChair[ChairI]; if (this[ChairActif].Etat != this[ChairActif].EtatOld) { this[ChairActif].ChangeEtat(this[ChairActif].Etat); } this[ChairActif].Actions(); } ElevatorI = 0; for (ElevatorI in G_TabElevator) { var ElevatorActif = G_TabElevator[ElevatorI]; if (this[ElevatorActif].Etat != this[ElevatorActif].EtatOld) { this[ElevatorActif].ChangeEtat(this[ElevatorActif].Etat); } this[ElevatorActif].Actions(); } I = 0; for (HuntSoldierI in G_TabHuntSoldier) { var HuntSoldierActif = G_TabHuntSoldier[HuntSoldierI]; if (this[HuntSoldierActif].Dir != this[HuntSoldierActif].DirOld) { this[HuntSoldierActif].ChangeDir(this[HuntSoldierActif].Dir); } if (this[HuntSoldierActif].Etat != this[HuntSoldierActif].EtatOld) { this[HuntSoldierActif].ChangeEtat(this[HuntSoldierActif].Etat); } this[HuntSoldierActif].Actions(); } I = 0; for (HuntWindowI in G_TabHuntWindow) { var HuntWindowActif = G_TabHuntWindow[HuntWindowI]; if (this[HuntWindowActif].Dir != this[HuntWindowActif].DirOld) { this[HuntWindowActif].ChangeDir(this[HuntWindowActif].Dir); } if (this[HuntWindowActif].Etat != this[HuntWindowActif].EtatOld) { this[HuntWindowActif].ChangeEtat(this[HuntWindowActif].Etat); } this[HuntWindowActif].Actions(); } if (!G_Pause) { if (_global.Game.G_HuntWindowCurrentA == null) { _global.Game.G_WindowAOpenDelayCount++; } if (_global.Game.G_HuntWindowCurrentB == null) { _global.Game.G_WindowBOpenDelayCount++; } } I = 0; for (MedusaI in G_TabMedusa) { var MedusaActif = G_TabMedusa[MedusaI]; if (this[MedusaActif].Dir != this[MedusaActif].DirOld) { this[MedusaActif].ChangeDir(this[MedusaActif].Dir); } if (this[MedusaActif].Etat != this[MedusaActif].EtatOld) { this[MedusaActif].ChangeEtat(this[MedusaActif].Etat); } this[MedusaActif].Actions(); } I = 0; for (WallI in G_TabWall) { var WallActif = G_TabWall[WallI]; if (this[WallActif].Dir != this[WallActif].DirOld) { this[WallActif].ChangeDir(this[WallActif].Dir); } if (this[WallActif].Etat != this[WallActif].EtatOld) { this[WallActif].ChangeEtat(this[WallActif].Etat); } this[WallActif].Actions(); } I = 0; for (DragonObstacleI in G_TabDragonObstacle) { var DragonObstacleActif = G_TabDragonObstacle[DragonObstacleI]; if (this[DragonObstacleActif].Dir != this[DragonObstacleActif].DirOld) { this[DragonObstacleActif].ChangeDir(this[DragonObstacleActif].Dir); } if (this[DragonObstacleActif].Etat != this[DragonObstacleActif].EtatOld) { this[DragonObstacleActif].ChangeEtat(this[DragonObstacleActif].Etat); } this[DragonObstacleActif].Actions(); } I = 0; for (AntennaI in G_TabAntenna) { var AntennaActif = G_TabAntenna[AntennaI]; if (this[AntennaActif].Dir != this[AntennaActif].DirOld) { this[AntennaActif].ChangeDir(this[AntennaActif].Dir); } if (this[AntennaActif].Etat != this[AntennaActif].EtatOld) { this[AntennaActif].ChangeEtat(this[AntennaActif].Etat); } this[AntennaActif].Actions(); } I = 0; for (MedusaSisterI in G_TabMedusaSister) { var MedusaSisterActif = G_TabMedusaSister[MedusaSisterI]; if (this[MedusaSisterActif].Dir != this[MedusaSisterActif].DirOld) { this[MedusaSisterActif].ChangeDir(this[MedusaSisterActif].Dir); } if (this[MedusaSisterActif].Etat != this[MedusaSisterActif].EtatOld) { this[MedusaSisterActif].ChangeEtat(this[MedusaSisterActif].Etat); } this[MedusaSisterActif].Actions(); } I = 0; for (BonusI in G_TabBonus) { var BonusActif = G_TabBonus[BonusI]; if (this[BonusActif].Dir != this[BonusActif].DirOld) { this[BonusActif].ChangeDir(this[BonusActif].Dir); } if (this[BonusActif].Etat != this[BonusActif].EtatOld) { this[BonusActif].ChangeEtat(this[BonusActif].Etat); } this[BonusActif].Actions(); } if (Pers.Dir != Pers.DirOld) { Pers.ChangeDir(Pers.Dir); } if (Pers.Etat != Pers.EtatOld) { Pers.setState(Pers.Etat); } this.Pers.Actions(); this.Bg.Actions(); _global.HUD.update(); G_CheckPause(); }
Symbol 1157 MovieClip Frame 2
stop(); _global.C.beginLevel();
Instance of Symbol 970 MovieClip "Bg" in Symbol 1157 MovieClip Frame 2
onClipEvent (load) { this._x = 0; this._y = 0; _parent.Control.CreerBg(_parent._x, _parent._y); BG = _parent.Control.Bg; for (var i in _parent.Bg) { if (Number(_parent.Bg[i]._name) <= 20) { _parent.Bg[i].gotoAndStop(2); } else { _parent.Bg[i].gotoAndStop(3); } } BG.MaxDw1 = 4210; BG.MaxUp1 = -200; BG.MaxG1 = 0; BG.MaxD1 = 0; BG.ParallaxRateSky = 1.2; BG.ParallaxRateCity = 1.08; BG.CheckScreen = function () { with (this) { MaxDw = MaxDw1; MaxUp = MaxUp1; MaxG = MaxG1; MaxD = MaxD1; } }; }
Instance of Symbol 1150 MovieClip "Pers" in Symbol 1157 MovieClip Frame 2
onClipEvent (load) { _parent.Control.CreerPers(this._x, this._y, "Jake"); this.gotoAndStop("D"); _global.Game.Pers.Etat = "Sleep"; _global.Game.Pers.setState("Idle"); }
Instance of Symbol 1154 MovieClip "Collider" in Symbol 1157 MovieClip Frame 2
onClipEvent (load) { this._visible = 0; }
Symbol 1160 MovieClip Frame 1
stop();
Symbol 1160 MovieClip Frame 30
_global.HUD.onFadeMiddle();
Symbol 1160 MovieClip Frame 60
gotoAndStop (1);
Symbol 1186 MovieClip Frame 20
stop();
Symbol 1201 MovieClip Frame 2
_global.Snd.playSound("break", 100, 1, true);
Symbol 1201 MovieClip Frame 9
stop();
Symbol 1202 MovieClip Frame 1
stop();
Symbol 1205 MovieClip Frame 1
stop();
Symbol 1206 MovieClip Frame 2
_parent._parent._parent.Control.CreerBonus("Life", this); stop();
Symbol 1207 MovieClip Frame 1
stop();
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip "meh" in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "moveable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 838 MovieClip "switchDLift" in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { distance = 318; }
Instance of Symbol 838 MovieClip "switchCLift" in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 838 MovieClip "switchBLift" in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 838 MovieClip "switchALift" in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "G"); }
Instance of Symbol 621 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1207 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Symbol 1207 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y); stop();
Symbol 1208 MovieClip Frame 2
stop();
Instance of Symbol 560 MovieClip "Control" in Symbol 1209 MovieClip Frame 1
onClipEvent (load) { function ObjBg(PosX, PosY) { this.Nom = "Bg"; this.PosX = PosX; this.PosY = PosY; this.ParallaxPosX = 0; this.ParallaxPosY = 0; this.ParallaxSkyPosX = 0; this.ParallaxSkyPosY = 0; this.ParallaxCityPosX = 0; this.ParallaxCityPosY = 0; this.ParallaxRateSky = 1.2; this.ParallaxRateCity = 1.1; this.MoveX = 0; this.MoveY = 0; this.MaxDw = 0; this.MaxUp = 0; this.MaxG = 0; this.MaxD = 0; this.InvPosX = PosX * -1; this.InvPosY = PosY * -1; this.DeadX = PosX; this.DeadY = PosY; this.CurrentScreen = 1; this.OldScreen = 0; this.MaxYDie = 5000; this.CenterX = 300; this.CenterY = 370; this.SpdXD = 15; this.SpdXG = -15; this.SpdYDw = 20; this.SpdYUp = -20; this.SpdYUpForce = 0; this.InPause = false; this.NoCamUpdate = false; this.CamOnMedusa = false; } function ObjBox(Nom, PosX, PosY, Type, Dir) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.MoveX = 0; this.MoveY = 0; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 75; this.LgOutD = 525; this.LgOutUp = 25; this.LgOutDw = 475; this.LgHitG = 34; this.LgHitD = 35; this.LgHitUp = 25; this.LgHitDw = 26; this.HitRightX; this.HitLeftX; this.PushDir = Dir; this.Dir = Pers.Dir; if (Dir == "D") { _parent.Bg[1][Nom]._xscale = -100; } this.FlagUse = false; this.LandSide = "Center"; this.MinionBlock = 0; this.Etat = "Wait"; this.EtatOld = "Sleep"; this.FixedFlag = false; _parent.Collider.Sol.attachMovie("TopBox", Nom, _parent.Collider.Sol.getNextHighestDepth()); _parent.Collider.Wall.attachMovie("BorderBox", Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Ceil.attachMovie("BottomBox", Nom, _parent.Collider.Ceil.getNextHighestDepth()); this.frTurn = 20; this.SoundPush = false; this.WebDestroyed = false; this.MoveBox(); } function ObjPers(PosX, PosY, Perso) { this.nGetHitLeft = 0; this.nGetHitRight = 0; this.nGetHitTop = 0; 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.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.SpdYUpBase = 1.7; this.SpdYUp = this.SpdYUpBase; this.SpdYMax = 30; this.SpdYFall = 2.2; this.SpdYFly = 5; this.SpdXHitBase = 0; this.SpdYHitBase = -4; this.SpdStartJump = -17; this.SolOut = 2; this.SolHitMin = 5; this.MaxSol = 3; this.HitGrd = false; this.SolForJump = 6; this.DistYFall = 0; this.DistYFallMax = 900; this.autoSwitchDragon = false; this.DistYLand = 80; this.CanHit = false; this.CanBeHit = true; this.FrWalkNow = 1; this.InPause = false; this.FrJump = 1; this.FrFall = 1; this.FrLand = 13; this.FrGetHit = 7; this.FrGetHitCount = 0; this.FrBoomTir = 9; this.FrFinBoom = 6; this.FrDead = 20; this.FrDeadCount = 0; this.aCharacter = ["Jake", "Dragon"]; this.ICharacter = 0; this.Perso = this.aCharacter[this.ICharacter]; this.updatePerso(); this.LgGetShootX = 20; this.LgGetShootUp = 72; this.LgGetShootUpBas = 44; this.FrInvincibleCount = 0; this.FrInvincible = 20; this.Invincible = false; this.FrSwitchCharacter = 15; this.FrSwitchCharacterCount = 0; this.bCanSwitch = true; 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.nDragonPowerRythm = 25; this.nDragonPowerCount = 0; this.DragonHitTop = 0; this.DragonHitBottom = 0; this.DragonHeight = 130; this.onLadderID = null; this.ClimbedDistance = 0; this.ladderDisabledMax = 15; this.ladderDisabledCount = this.ladderDisabledMax; this.onBouncingID = null; this.bounceCount = 0; this.bounceCountMax = 3; this.bouncingDisabledMax = 15; this.bouncingDisabledCount = this.bouncingDisabledMax; this.bHitAttack = false; this.FrShootFire = 15; this.FrAttackTailHit = 9; this.CurrentFireID = null; if (_global.boss) { this.WaitForActions = true; } else { this.WaitForActions = false; } } function ObjPersBall(Type, Nom, PosX, PosY, Dir, HitBullet, Speed, Tab, HitSound, Rotation, SpdX, SpdY) { this.Nom = Nom; this.Type = Type; this.HitSound = HitSound; this.Tab = Tab; this.Etat = "Move"; this.EtatOld = "Idle"; this.Dir = Dir; this.OldDir = "D"; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 50; this.LgOutD = 600; this.LgOutUp = 0; this.LgOutDw = 500; this.CanBeKill = false; if (Dir == "D") { this.SpdX = Speed; } else { this.SpdX = -1 * Speed; _parent.Bg[1][Nom]._xscale = -100; } this.InPause = false; this.FrHit = HitBullet; this.FrHide = 1; if (Type == "Fire") { Pers.CurrentFireID = Nom; } if (Type == "Spark") { G_Medusa.CurrentSparkID = Nom; this.LgOutG = 1100; this.LgOutD = 1100; _parent.Bg[1][Nom]._xscale = -100; _parent.Bg[1][Nom]._rotation = Rotation; this.SpdX = SpdX; this.SpdY = SpdY; } } function ObjSwitch(Nom, PosX, PosY) { this.Nom = Nom; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 20; this.LgOnY = 20; this.PosX = PosX; this.PosY = PosY; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrBaisse = 13; } function ObjElevator(mc, Axis, Min, Max) { this.Nom = mc._name; this.mc = mc; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 750; this.LgOutG = 200; this.LgOutUp = 500; this.LgOutDw = 900; this.Speed = 2; this.frWaitCount = 0; this.frWaitTime = 30; this.LgOnX = 200; this.LgOnY = 25; this.PersOn = false; this.MoveX = 0; this.MoveY = 0; this.PosX = mc._x + 40; this.PosY = mc._y + 140; this.Axis = Axis; this.Min = this["Pos" + Axis] + Min; this.Max = this["Pos" + Axis] + Max; this.Active = false; this.InPause = false; this.Dir = -1; this.CanReposition = false; this.RepositionCount = 0; this.RepositionDelay = 30; _parent.Collider.Sol.attachMovie("GroundElevator", this.Nom, _parent.Collider.Sol.getNextHighestDepth()); _global.Game.CreerOverlay(mc._name + "ramp", "AM_RampeAscenseur01_overlay", {x:mc._x, y:mc._y + 140}); this.MoveElevator(); } function ObjLevier(Nom, PosX, PosY, listener) { this.Nom = Nom; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 30; this.LgOnY = 100; this.PosX = PosX; this.PosY = PosY; this.PersYCorrection = 60; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrFinLevelCount = 0; this.FrFinLevel = 70; this.Active = true; this.listener = listener; } function pointsGetAngle(l_x1, l_y1, l_x2, l_y2) { var _local4 = 0; var _local3 = 0; var _local1 = 0; var _local2 = 0; _local4 = (l_x1 - l_x2) * -1; _local3 = (l_y1 - l_y2) * -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); } function pointsGetDistance(l_x1, l_y1, l_x2, l_y2) { var _local1 = Math.sqrt(Math.pow(Math.abs(l_x2 - l_x1), 2) + Math.pow(Math.abs(l_y2 - l_y1), 2)); return(_local1); } function ObjLadder(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.obj; this.Etat = "Off"; this.EtatOld = "Off"; this.LgOnX = 70; this.LgOnY = 265; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; } function ObjBouncingChair(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.Obj; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOnX = 70; this.LgOnY = 50; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; _global.Game.CreerPlateforme({x:this.PosX, y:this.PosY}, 73); } function ObjHuntSoldier(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 115; this.AttackDelayCount = 0; this.AttackChance = 0.03; this.ShieldChance = 0.25; this.HurtCount = 0; } function ObjHuntWindow(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "IdleClose"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 450; this.LgOutDw = 450; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.AttackDelay = 100; this.AttackDelayCount = 0; if (PosX < 150) { this.HuntID = "A"; this.FlipPosition = 20; } else { this.HuntID = "B"; this.FlipPosition = -20; } this.OpenRangeDown = 450; this.OpenRangeUp = -20; this.OpenChanceDragon = 0.85; this.OpenChanceJake = 0.1; this.HuntEtat = "idle"; this.AttackDelay = 100; this.AttackDelayCount = 0; this.AttackChance = 0.85; this.FlipDelay = 10; this.FlipDelayCount = 0; this.CloseDelay = 100; this.closeDelayCount = 0; this.CloseChance = 0.5; this.FrThrow = 11; } function ObjMedusa(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -60; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSparkID = null; this.HasAttacked = false; G_Medusa = this; _global.Medusa = this; } function ObjMedusaSister(mc, Type, Nom, PosX, PosY) { this.mc = mc; this.Nom = Nom; this.Perso = Type; this.Etat = "Idle"; this.EtatOld = "Idle"; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -110; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSister = "SisterRight"; this.CurrentAction = "Idle"; this.MedusaAttack = false; } function ObjWall(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; _parent.Collider.Wall.attachMovie("WallHit", this.Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Wall[Nom]._x = PosX; _parent.Collider.Wall[Nom]._y = PosY; this.FrRemoveWallHit = 4; } function ObjDragonObstacle(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; } function ObjAntenna(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.ChargedDelay = 300; this.ChargedCount = 0; } function ObjBonus(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.CanBeKill = false; } _global.Game = this; this.KeyListener = new com.sarbakan.utils.KeyManager(); KeyListener.addKeyListener(39, "R"); KeyListener.addKeyListener(37, "L"); KeyListener.addKeyListener(40, "Dw"); KeyListener.addKeyListener(38, "Up"); KeyListener.addKeyListener(32, "Dragon"); KeyListener.addKeyListener(66, "Attack"); KeyListener.addKeyListener(78, "Action"); 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(); } } } }; CreerBg = function (PosX, PosY) { this.Bg = new ObjBg(PosX, PosY); }; ObjBg.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } CheckScreen(); if (!NoCamUpdate) { ScrollBg(); } } } }; ObjBg.prototype.ScrollBg = function () { with (this) { if (CamOnMedusa) { Pers.TrueX = _global.Medusa.TrueX; Pers.TrueY = _global.Medusa.TrueY; } if ((PosY <= MaxDw) and (PosY >= MaxUp)) { if (Pers.TrueX > (CenterX + 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else { if ((CenterX - Pers.TrueX) > SpdXG) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXG; } if ((PosX + MoveX) < MaxG) { MoveX = MaxG - PosX; } } } else if (Pers.TrueX < (CenterX - 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } else { if ((CenterX - Pers.TrueX) < SpdXD) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXD; } if ((PosX + MoveX) > MaxD) { MoveX = MaxD - PosX; } } } else { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } } } if ((PosX <= MaxD) and (PosX >= MaxG)) { if (Pers.TrueY > (CenterY + 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxUp - PosY; } else { MoveY = SpdYDw; } } else { if ((CenterY - Pers.TrueY) > SpdYUp) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYUp; } if ((PosY + MoveY) < MaxUp) { MoveY = MaxUp - PosY; } } } else if (Pers.TrueY < (CenterY - 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } else { if ((CenterY - Pers.TrueY) < SpdYDw) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYDw; } if ((PosY + MoveY) > MaxDw) { MoveY = MaxDw - PosY; } } } else { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxDw - PosY; } else { MoveY = SpdYDw; } } else if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } } } _parent._x = Math.floor(_parent._x + MoveX); PosX = _parent._x; InvPosX = PosX * -1; MoveX = 0; _parent._y = Math.floor(_parent._y + MoveY); PosY = _parent._y; InvPosY = PosY * -1; _global.MoveY = MoveY; MoveY = 0; _parent.ParallaxSky._y = (Math.floor(_parent._y / (-ParallaxRateSky)) + 350) + 30; ParallaxSkyPosY = _parent.ParallaxSky._y; _parent.ParallaxCity._y = (Math.floor(_parent._y / (-ParallaxRateCity)) + 140) + 30; ParallaxCityPosY = _parent.ParallaxCity._y; } }; CreerBox = function (Nom, PosX, PosY, Type, Dir) { if (this[Nom] == null) { this[Nom] = new ObjBox(Nom, PosX, PosY, Type, Dir); G_TabBox.push(Nom); } }; ObjBox.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBox.prototype.Wait = function () { with (this) { if (Type == "moveable") { CheckPush(); } CheckHitGrd(); CheckSleep(); CheckFall(); if (Type == "destroyable") { CheckDestroy(); } } }; ObjBox.prototype.Fall = function () { with (this) { CheckHitGrd(); SetSpdFall(); MoveBox(); if (((Nom == "BoxDestroyWeb") && (!WebDestroyed)) && (TrueY > 350)) { _global.Game.WebDestroyable.Etat = "Destroy"; WebDestroyed = true; } } }; ObjBox.prototype.Land = function () { with (this) { CheckHitGrd(); SetSpdLand(); MoveBox(); if ((TrueX > 0) && (TrueX < 500)) { _global.SoundCTRL.playSound("BoxLand", 100, 0); } } }; ObjBox.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe >= _parent.Bg[1][Nom].Etat._totalframes) { _parent.Bg[1][Nom].Etat.stop(); _parent.Collider.Sol[Nom].removeMovieClip(); _parent.Collider.Ceil[Nom].removeMovieClip(); _parent.Collider.Wall[Nom].removeMovieClip(); } } }; ObjBox.prototype.LandFin = function () { with (this) { Etat = "Wait"; Pers.PushedBox = 0; } }; ObjBox.prototype.Fixed = function () { with (this) { CheckSleep(); } }; ObjBox.prototype.CheckPush = function () { with (this) { if (Pers.Etat == "Push") { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.PushPoint)) { Dir = Pers.Dir; if (Dir == "D") { this.MoveX = 2; } else if (Dir == "G") { this.MoveX = -2; } CheckWall(); if (Pers.Dir != PushDir) { MoveX = 0; } MoveBox(); Pers.PushedBox = this; if (MoveX != 0) { _global.Snd.playSound("push", 100, 999, true); } } } else { _global.Snd.stopSound("push"); } } }; ObjBox.prototype.CheckDestroy = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjBox.prototype.CheckHitGrd = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (_parent.Collider.Sol.hitTest(HitX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitRightX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitLeftX, HitY, true)) { HitGrd = true; } else { HitGrd = false; } } }; ObjBox.prototype.SetSpdFall = function () { with (this) { MaxMoveY = 15; MoveY = MoveY + 5; if (MoveY > MaxMoveY) { MoveY = MaxMoveY; } aCheckPoint = [TrueX, HitLeftX, HitRightX]; for (CheckPointI in aCheckPoint) { var activePointX = aCheckPoint[CheckPointI]; if (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 2), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 4), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } } } }; ObjBox.prototype.SetSpdLand = function () { with (this) { while ((_parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true) || (_parent.Collider.Sol.hitTest(HitLeftX, TrueY + MoveY, true))) || (_parent.Collider.Sol.hitTest(HitRightX, TrueY + MoveY, true))) { MoveY--; } if (MoveY < 1) { MoveY = 1; Etat = "LandFin"; } } }; ObjBox.prototype.CheckFall = function () { with (this) { if (HitGrd == true) { MoveY = 0; Etat = "Wait"; } else { Etat = "Fall"; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } MoveX = 0; MoveY = 0; } } }; ObjBox.prototype.CheckWall = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (Pers.Dir == "G") { HitX = HitX + (MoveX - LgHitG); } else if (Pers.Dir == "D") { HitX = HitX + (MoveX + LgHitD); } if (_parent.Collider.Wall.hitTest(HitX, HitY, true)) { MoveX = 0; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } } } }; ObjBox.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjBox.prototype.MoveBox = function () { with (this) { PosX = Number(PosX + MoveX); PosY = Number(PosY + MoveY); _parent.Bg[1][Nom]._x = PosX; _parent.Bg[1][Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY - 15; _parent.Collider.Wall[Nom]._x = PosX + 30; _parent.Collider.Wall[Nom]._y = PosY + 4; _parent.Collider.Ceil[Nom]._x = PosX; _parent.Collider.Ceil[Nom]._y = PosY + 40; } }; ObjBox.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (FixedFlag) { Etat = "Fixed"; } else { Etat = "Wait"; } } } }; ObjBox.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = (PosY + _parent._y) + LgHitDw; HitRightX = TrueX + LgHitD; HitLeftX = TrueX - LgHitG; } }; ObjBox.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if ((NewAction == "Turn") || (NewAction == "Fixed")) { _parent.Bg[1][Nom].gotoAndStop(NewAction + Dir); } else { _parent.Bg[1][Nom].gotoAndStop(NewAction); } _parent.Bg[1][Nom].Etat.box.gotoAndStop(Type); _parent.Bg[1][Nom].Etat.box.box.gotoAndStop(Type); } }; ObjBox.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } SetTruePos(); this[Etat](); } } }; ObjPers.prototype.IdleJake = function () { with (this) { DistYFall = 0; KeepDeadPos = true; bCanAttack = true; if (Life > 0) { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckPush(); CheckJump(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusJake = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.RunJake = function () { with (this) { bCanAttack = true; DistYFall = 0; SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckJump(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartJake = function () { with (this) { Pers.bouncingDisabledCount = 0; CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); MovePers(); if (HitGrd == true) { Etat = "Land"; } else if (SpdYNow >= 0) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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"; } } else if (DistYFall >= DistYFallMax) { autoSwitchDragon = true; } CheckHole(); } }; ObjPers.prototype.JumpLandingJake = function () { with (this) { CheckGetFire(); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (!_global.Game[onBouncingID].CheckPersOn()) { bounceCount = 0; Pers.onBouncingID = null; } if (_parent.Pers.Obj.Etat._currentframe >= 3) { if (_global.energy <= 0) { _global.energy = 0; Etat = "Die"; } } if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.ClimbingJake = function () { with (this) { SpdXNow = 0; SpdYNow = 0; CheckHitGrd(); if ((Pers.ClimbedDistance > 30) && (HitGrd)) { Etat = "Idle"; Pers.ladderDisabledCount = 0; } else if (KeyListener.Action) { Etat = "Fall"; } else { if (KeyListener.L) { SpdXNow = -2; } else if (KeyListener.R) { SpdXNow = 2; } if (KeyListener.Up) { SpdYNow = -3; } else if (KeyListener.Dw) { SpdYNow = 3; } SetMoveX(); SetMoveY(); CheckWall(FrontX, FrontY - 15); CheckWall(BackX, FrontY - 15); CheckWall(FrontX, FrontY); CheckWall(BackX, FrontY); CheckWall(FrontX, FrontY + 15); CheckWall(BackX, FrontY + 15); CheckWall(FrontX, FrontY + 30); CheckWall(BackX, FrontY + 30); CheckWall(FrontX, FrontY + 45); CheckWall(BackX, FrontY + 45); MovePers(); Pers.ClimbedDistance++; } if ((SpdXNow != 0) || (SpdYNow != 0)) { if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { _parent.Pers.Obj.Etat.gotoAndStop(1); } else { _parent.Pers.Obj.Etat.nextFrame(); } } else { _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.ActivateJake = function () { with (this) { CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.HurtJake = function () { with (this) { if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetJake = function () { with (this) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } }; ObjPers.prototype.AttackJake = function () { with (this) { CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe == Math.round(_parent.Pers.Obj.Etat._totalframes / 2)) { bHitAttack = true; } else { bHitAttack = false; } if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.GetHitJake = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireJake = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformJake = function () { with (this) { DistYFall = 0; if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 1; Etat = "Idle"; nDragonPowerCount = 0; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.PushJake = function () { with (this) { CheckHitGrd(); PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (!KeyListener.Action) { Etat = "Idle"; } else if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (PushedBox != 0) { MoveX = PushedBox.MoveX; } else { MoveX = 0; } } else { var AddBlock = (35 * NumDir); var i = 0; while (i != AddBlock) { if (_parent.Collider.Wall.hitTest(PushPointX + i, PushPointY, true)) { goToTarget = true; if (((i > 5) && (NumDir == 1)) || ((i < -5) && (NumDir == -1))) { MoveX = 5 * NumDir; } else { MoveX = i; } break; } i = i + NumDir; } } MovePers(); } }; ObjPers.prototype.TransformFallJake = ObjPers.prototype.TransformJake; ObjPers.prototype.DieJake = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { _parent.Pers.Obj.Etat.stop(); if (FrDeadCount == 0) { _global.lives--; _global.Snd.stopSound("lift"); _global.Snd.stopSound("push"); if (_global.lives == 0) { _global.Packaging.showLoseScreen(); } else { _global.HUD.fade(resetLevel); } } FrDeadCount++; } } }; ObjPers.prototype.SleepJake = function () { }; ObjPers.prototype.IdleDragon = function () { with (this) { bCanAttack = true; KeepDeadPos = true; if (Life > 0) { SetSpdDragon(); SetMoveX(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdDragon(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusDragon = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.FlyDragon = function () { with (this) { bCanAttack = true; SetSpdDragon(); SetMoveX(); SetMoveY(); CheckDragonObstacle(); CheckWall(FrontX, FrontY); CheckCeilDragon(); CheckSolDragon(); CheckGroundDragon(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartDragon = function () { with (this) { CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleDragon = function () { with (this) { SetSpdDragonJump(); 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 = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallDragon = function () { with (this) { SetSpdDragonJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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.JumpLandingDragon = function () { with (this) { CheckGetFire(); this["CheckAttack" + Perso](); if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) { if (Life <= 0) { Etat = "Die"; } else { Etat = "Idle"; } } } }; ObjPers.prototype.HurtDragon = function () { with (this) { MovePers(); if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); Etat = "Idle"; FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetDragon = ObjPers.prototype.HurtDragon; ObjPers.prototype.AttackTailDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrAttackTailHit) { bHitAttack = true; } else { bHitAttack = false; } } }; ObjPers.prototype.AttackFireDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrShootFire) { if (Dir == "D") { CreerFireBall(PosX + 70, PosY - 70, Dir); } else { CreerFireBall(PosX - 70, PosY - 70, Dir); } } } }; ObjPers.prototype.GetHitDragon = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireDragon = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 0; Etat = "Fall"; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.DieDragon = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { FrDeadCount++; _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.SleepDragon = function () { }; CreerPers = function (PosX, PosY, Perso) { this.Pers = new ObjPers(PosX, PosY, Perso); }; ObjPers.prototype.CharacterSwitch = function () { with (this) { if (Etat == "Fall") { Etat = "TransformFall"; } else { Etat = "Transform"; } } }; ObjPers.prototype.HeroChange = function (NewHero) { with (this) { Perso = NewHero; updatePerso(); } }; ObjPers.prototype.GetHitGeneral = function () { with (this) { SetSpdXHit(); CheckWall(BackX, TrueY); CheckHitGrd(); CheckSol(); MovePers(); CheckDie(); } }; 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.SetSpdXHit = function () { with (this) { MoveX = SpdXNow; if (SpdXNow > 0) { SpdXNow = SpdXNow * 0.7; } if (Dir eq "D") { MoveX = MoveX * -1; } } }; ObjPers.prototype.SetSpdXJake = 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.SetSpdDragon = function () { with (this) { if (KeyListener.R == true) { Dir = "D"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase; } } else if (KeyListener.L == true) { Dir = "G"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase * -1; } } else { SpdXNow = 0; } if (KeyListener.Dw == true) { SpdYNow = SpdYFly; } else if (KeyListener.Up == true) { SpdYNow = SpdYFly * -1; } else { SpdYNow = 0; } if ((SpdXNow == 0) && (SpdYNow == 0)) { Etat = "Idle"; } else { Etat = "Fly"; } } }; 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.SetMoveX = function () { with (this) { MoveX = SpdXNow; } }; ObjPers.prototype.SetMoveY = function () { with (this) { MoveY = SpdYNow; } }; 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.CheckDragonObstacle = function () { with (this) { if (MoveY != 0) { if (_parent.Collider.Dragon.hitTest(TopX, TopY + MoveY, true)) { MoveY = DragonHitTop; } else if (_parent.Collider.Dragon.hitTest(BottomFrontX, (TopY + MoveY) + DragonHeight, true) or _parent.Collider.Dragon.hitTest(BottomBackX, (TopY + MoveY) + DragonHeight, true)) { MoveY = DragonHitBottom; } } } }; 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.CheckSolDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Sol.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckCeilDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; SpdYNow = 0; } } } }; ObjPers.prototype.CheckGroundDragon = function () { with (this) { if (MoveY > 0) { if (_parent.Collider.Sol.hitTest(BottomFrontX, TrueY - _parent.Pers.Obj.HitBottomFront._y, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckJump = function () { with (this) { if (Etat != "Push") { if ((!KeyListener.Up) && (!bJumpRelease)) { bJumpRelease = true; } if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) { bJumpRelease = false; if (Etat == "Run") { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } else { Etat = "JumpStart"; } } } } }; ObjPers.prototype.CheckPush = function () { with (this) { PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (KeyListener.Action && (((Dir == "G") && (KeyListener.L)) || ((Dir == "D") && (KeyListener.R)))) { Etat = "Push"; } } } }; ObjPers.prototype.CheckAttackJake = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "Attack"; } } }; ObjPers.prototype.CheckAttackDragon = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackTail"; } if ((KeyListener.Action == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackFire"; } } }; ObjPers.prototype.CheckFall = function () { with (this) { if (SpdYNow >= SpdYFall) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.CheckDie = function () { with (this) { if (_global.energy <= 0) { _global.dragonPower = 0; Etat = "Fall"; } } }; ObjPers.prototype.MovePers = function () { with (this) { if ((Pers.TrueX + MoveX) < 30) { MoveX = (TrueX * -1) + 30; } else if ((Pers.TrueX + MoveX) > 520) { MoveX = 520 - Pers.TrueX; } PosX = _parent.Pers._x + MoveX; _parent.Pers._x = PosX; MoveX = 0; PosY = _parent.Pers._y + MoveY; _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]; if ((onBouncingID != null) && (_global.Game[onBouncingID].CheckPersOn() != true)) { Pers.SpdYUp = Pers.SpdYUpBase; } 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; } }; 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; } }; ObjPers.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Pers.gotoAndStop((Perso + "_") + Dir); } }; ObjPers.prototype.Actions = function () { with (this) { if (WaitForActions) { SetTruePos(); CheckHitGrd(); CheckSol(); CheckFall(); WaitForActions = false; } else if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Pers.Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Pers.Obj.Etat.play(); } SetTruePos(); InvincibleCheck(); this[Etat + aCharacter[ICharacter]](); CheckCharSwitch(); CheckHit(); CheckEndLevel(); } } }; ObjPers.prototype.CheckCharSwitch = function () { with (this) { if (ICharacter == 1) { if ((KeyListener.Dragon || (_global.dragonPower == 0)) && (Etat != "HurtNet")) { CharacterSwitch(); } else if ((++nDragonPowerCount) == nDragonPowerRythm) { _global.dragonPower--; nDragonPowerCount = 0; if (_global.dragonPower < 0) { _global.dragonPower = 0; } } } else { if (((KeyListener.Dragon || (autoSwitchDragon)) && (bCanSwitch)) && (_global.dragonPower > 0)) { autoSwitchDragon = false; bCanSwitch = false; FrSwitchCharacterCount = FrSwitchCharacter; CharacterSwitch(); } if (!bCanSwitch) { FrSwitchCharacterCount--; if (FrSwitchCharacterCount == 0) { bCanSwitch = true; } } } } }; ObjPers.prototype.CheckEndLevel = function () { with (this) { if (!_global.boss) { if (((_global.level == 1) && (PosY <= -3930)) && (PosX >= 390)) { _global.HUD.fade(bossStart); _global.boss = true; } if ((_global.level == 2) && (PosY <= -4670)) { _global.HUD.fade(bossStart); _global.boss = true; } if (((_global.level == 3) && (PosY <= -5800)) && (PosX <= 105)) { _global.HUD.fade(bossStart); _global.boss = true; } } } }; ObjPers.prototype.CheckHit = function () { with (this) { if (KeyListener.X && (CanBeHit)) { this.GetHit(); } } }; CreerNetBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("NetBall", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Net", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerFireBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("JackDragon_FireAnim", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Fire", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerSparkBall = function (PosX, PosY, Dir, Rotation, SpdX, SpdY) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("Medusa_Blast", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Spark", _local4, PosX, PosY, Dir, 8, 0, G_TabPersBall, "SlimeSplat", Rotation, SpdX, SpdY); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; ObjPersBall.prototype.Move = function () { with (this) { _parent.Bg[1][Nom]._x = PosX + SpdX; PosX = PosX + SpdX; if (SpdY) { _parent.Bg[1][Nom]._y = PosY + SpdY; PosY = PosY + SpdY; } SetTruePos(); CheckHit(); CheckOut(); } }; ObjPersBall.prototype.Hit = function () { with (this) { if ((Type == "Net") && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { Pers.Etat = "HurtNet"; _global.Snd.playSound("hurtNet", 100, 1, false); CanBeKill = true; } } }; ObjPersBall.prototype.End = function () { with (this) { if (((Type == "Fire") || (Type == "Spark")) && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { CanBeKill = true; } } }; ObjPersBall.prototype.Burn = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckHit = function () { with (this) { if (Type == "Net") { if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Burn"; _global.Game[Pers.CurrentFireID].Etat = "End"; } else if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.Hit))) { Etat = "Hit"; } } if (((Type == "Spark") && (Pers.Etat != "Activate")) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.HitFront))) { Pers.Etat = "Hurt"; Etat = "End"; } if (((Type == "Spark") && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1].FinalHit))) && (G_Medusa.Etat != "Die")) { _global.HUD.increaseScore(10000); _parent.Control.Bg.CamOnMedusa = true; G_Medusa.Etat = "Die"; } } }; ObjPersBall.prototype.CheckOut = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckKill = function () { with (this) { if (CanBeKill == true) { KillBall(); } } }; ObjPersBall.prototype.KillBall = function () { with (this) { if (Tab == G_TabPersBall) { G_TabPersBall.splice(PersBallI, 1); PersBallI = PersBallI - 1; } else if (Tab == G_TabMinionBall) { G_TabMinionBall.splice(MinionBallI, 1); MinionBallI = MinionBallI - 1; } delete _parent.Control[Nom]; _parent.Bg[1][Nom].removeMovieClip(); if (Type == "Fire") { Pers.CurrentFireID = null; } if (Type == "Spark") { G_Medusa.CurrentSparkID = null; } } }; ObjPersBall.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjPersBall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].gotoAndStop(NewAction); } }; ObjPersBall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Etat.play(); } this[Etat](); CheckKill(); } } }; CreerSwitch = function (Nom, PosX, PosY) { if (this[Nom] == null) { this[Nom] = new ObjSwitch(Nom, PosX, PosY); G_TabSwitch.push(Nom); } }; ObjSwitch.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjSwitch.prototype.Idle = function () { with (this) { CheckPersOn(); CheckBoxOn(); CheckSleep(); } }; ObjSwitch.prototype.Baisse = function () { with (this) { if (_parent[Nom].Etat._currentframe >= FrBaisse) { _global.SoundCTRL.playSound("SwitchOn", 100, 0); _parent[Nom].Activate(); Etat = "Active"; } } }; ObjSwitch.prototype.Active = function () { with (this) { CheckSleep(); if (!FlagBoxUse) { CheckRelease(); } } }; ObjSwitch.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { FlagUse = true; Etat = "Baisse"; } } }; ObjSwitch.prototype.CheckBoxOn = function () { with (this) { var Box = Pers.PushedBox; if ((Pers.Etat == "Push") && (Box != 0)) { if (Box.Dir == "G") { if (((((Box.PosX - Box.LgHitG) >= (PosX - LgOnX)) and ((Box.PosX - Box.LgHitG) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Etat = "Baisse"; Activate(); } } else if (Box.Dir == "D") { if (((((Box.PosX + Box.LgHitD) >= (PosX - LgOnX)) and ((Box.PosX + Box.LgHitD) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } else if ((Box.Etat == "LandFin") && (Box != 0)) { if ((((Box.PosX >= (PosX - LgOnX)) and (Box.PosX <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; Box.Dir = ""; _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } }; ObjSwitch.prototype.CheckRelease = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { } else { Etat = "Idle"; FlagUse = false; _parent[Nom].Desactivate(); _global.SoundCTRL.playSound("SwitchOff", 100, 0); } } }; ObjSwitch.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjSwitch.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjSwitch.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjSwitch.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerElevator = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjElevator(l_mcElement, "Y", 0, -1 * l_mcElement.distance); G_TabElevator.push(l_mcElement._name); } }; this.onSwitchLift = function (l_Nom) { with (this) { if (_global.Game[l_Nom + "Lift"].Active == true) { _global.Game[l_Nom + "Lift"].Active = false; _global.Game[l_Nom].Etat = "Idle"; _global.Snd.stopSound("lift"); } else { _global.Game[l_Nom + "Lift"].Active = true; _global.Game[l_Nom].Etat = "IdleActivate"; _global.Snd.playSound("lift", 100, 999, true); } } }; ObjElevator.prototype.Sleep = function () { with (this) { CheckActif(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Idle = function () { with (this) { CheckSleep(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Wait = function () { with (this) { if (frWaitCount >= frWaitTime) { Etat = "Idle"; frWaitCount = 0; } else { frWaitCount++; } } }; ObjElevator.prototype.SetMove = function () { with (this) { CheckPersOn(); CheckLimit(); MoveElevator(); } }; ObjElevator.prototype.MoveElevator = function () { with (this) { this["Pos" + Axis] = this["Pos" + Axis] + this["Move" + Axis]; _parent[Nom]._x = PosX; _parent[Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY; if (PersOn) { Pers["Move" + Axis] = this["Move" + Axis]; Pers.MovePers(); } UpdateLift(); } }; ObjElevator.prototype.UpdateLift = function () { with (this) { var cableH = (this["Pos" + Axis] - Max); mc.Obj.cable1._height = cableH; mc.Obj.cable2._height = cableH; mc._y = mc._y + this["Move" + Axis]; mc._parent[Nom.substr(0, -4)]._y = mc._parent[Nom.substr(0, -4)]._y + this["Move" + Axis]; _global.Game[Nom.substr(0, -4)].PosY = _global.Game[Nom.substr(0, -4)].PosY + this["Move" + Axis]; _global.Game._parent.overlay[Nom + "ramp"]._y = _global.Game._parent.overlay[Nom + "ramp"]._y + this["Move" + Axis]; _global.Game._parent.Bg[1][Nom + "ramp"]._y = _global.Game._parent.Bg[1][Nom + "ramp"]._y + this["Move" + Axis]; } }; ObjElevator.prototype.CheckLimit = function () { with (this) { this["Move" + Axis] = Speed * Dir; if ((Dir == -1) && ((this["Pos" + Axis] + this["Move" + Axis]) <= Max)) { Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = false; CanReposition = true; RepositionCount = 0; Dir = 0; } if ((Dir == 1) && ((this["Pos" + Axis] + this["Move" + Axis]) >= Min)) { CanReposition = false; Dir = -1; Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = true; _global.Game[Nom.substr(0, -4)].Etat = "Idle"; } } }; ObjElevator.prototype.CheckReposition = function () { with (this) { if (CanReposition) { CheckPersOn(); if (!PersOn) { if ((++RepositionCount) == RepositionDelay) { RepositionCount = 0; CanReposition = false; Active = true; Dir = 1; _global.Snd.playSound("lift", 100, 999, true); } } } } }; ObjElevator.prototype.Activate = function () { with (this) { Active = true; } }; ObjElevator.prototype.Desactivate = function () { with (this) { Active = false; } }; ObjElevator.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { PersOn = true; } else { PersOn = false; } } }; ObjElevator.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { Etat = "Idle"; if (Active) { CheckLimit(); MoveElevator(); } } } }; ObjElevator.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjElevator.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjElevator.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLevier = function (Nom, PosX, PosY, listener) { if (this[Nom] == null) { this[Nom] = new ObjLevier(Nom, PosX, PosY, listener); G_TabLevier.push(Nom); } }; ObjLevier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjLevier.prototype.Idle = function () { with (this) { if (Active) { CheckPersOn(); CheckSleep(); } } }; ObjLevier.prototype.IdleActivate = ObjLevier.prototype.Idle; ObjLevier.prototype.Activate = function () { with (this) { if (Pers.ICharacter == 0) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.Etat == "Activate")) && (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes)) { listener(Nom); } } } }; ObjLevier.prototype.CheckPersOn = function () { with (this) { if ((Pers.ICharacter == 0) && (Pers.Etat != "Push")) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.HitGrd == true)) && (Pers.CanBeHit || (Pers.Invincible))) { if (KeyListener.Action) { Pers.canJumpCount = 0; Etat = "Activate"; Pers.Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); } } } else if (((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); } else if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); _global.Game[Pers.CurrentFireID].Etat = "End"; } } }; ObjLevier.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjLevier.prototype.CheckSleep = function () { }; ObjLevier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjLevier.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLadder = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjLadder(l_mcElement); G_TabLadder.push(l_mcElement._name); } }; this.onSwitchLadder = function (l_Nom) { with (this) { _global.Game[l_Nom + "Ladder"].Etat = "Opening"; } }; ObjLadder.prototype.Off = function () { with (this) { } }; ObjLadder.prototype.Opening = function () { with (this) { if (mc.etat._currentframe == mc.etat._totalframes) { Etat = "On"; } } }; ObjLadder.prototype.On = function () { with (this) { CheckPersOn(); } }; ObjLadder.prototype.CheckPersOn = function () { with (this) { if (Pers.ladderDisabledCount >= Pers.ladderDisabledMax) { if (((((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= PosY)) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { if (((Pers.ICharacter == 0) && (Pers.Etat != "Climbing")) && (Pers.Etat != "Hurt")) { if ((KeyListener.Up && (Pers.PosY >= (PosY + 70))) || (KeyListener.Dw && (Pers.PosY <= (PosY + 165)))) { Pers.onLadderID = Nom; Pers.Etat = "Climbing"; Pers.ClimbedDistance = 0; } } } else if ((Pers.Etat == "Climbing") && (Pers.onLadderID == Nom)) { if (Pers.PosX < PosX) { Pers.ChangeDir("G"); } if (Pers.PosX > (PosX + LgOnX)) { Pers.ChangeDir("D"); } Pers.Etat = "Fall"; Pers.onLadderID = null; } } else { Pers.ladderDisabledCount++; } } }; ObjLadder.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjLadder.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerBouncingChair = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBouncingChair(l_mcElement); G_TabChair.push(l_mcElement._name); } }; ObjBouncingChair.prototype.Idle = function () { with (this) { if (CheckPersOn()) { Etat = "Bounce"; if ((Pers.onBouncingID == Nom) && (Pers.HitGrd)) { Pers.onBouncingID = null; } } } }; ObjBouncingChair.prototype.Bounce = function () { with (this) { if (mc.Etat._currentframe == 9) { BouncePers(); } if (mc.Etat._currentframe == mc.Etat._totalframes) { Etat = "Idle"; } } }; ObjBouncingChair.prototype.CheckPersOn = function () { with (this) { if ((((((((Pers.ICharacter == 0) && (Pers.Etat != "Idle")) && (Pers.Etat != "Run")) and (Pers.PosX >= PosX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { return(true); } } }; ObjBouncingChair.prototype.BouncePers = function () { with (this) { if (CheckPersOn()) { Pers.SpdYUp = Pers.SpdYUpBase; if (Pers.onBouncingID != Nom) { Pers.onBouncingID = Nom; Pers.bounceCount = 0; } else { Pers.bounceCount++; if (Pers.bounceCount > 0) { Pers.bounceCount = Pers.bounceCountMax; } Pers.SpdYUp = Pers.SpdYUp - (Pers.bounceCount * 0.34); } Pers.Etat = "JumpStart"; } else if (Pers.HitGrd) { Pers.onBouncingID = null; } } }; ObjBouncingChair.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjBouncingChair.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerHuntSoldier = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntSoldier"; this[l_mcElement._name] = new ObjHuntSoldier(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntSoldier.push(l_mcElement._name); } }; ObjHuntSoldier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntSoldier.prototype.Idle = function () { with (this) { CheckAttack(); CheckShield(); CheckDir(); CheckHurt(); CheckSleep(); } }; ObjHuntSoldier.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Stunned = ObjHuntSoldier.prototype.Hurt; ObjHuntSoldier.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack1 = function () { with (this) { if (((Pers.Etat != "Hurt") && (_parent.Bg[1][Nom].Obj.Etat._currentframe >= 9)) && (_parent.Bg[1][Nom].Obj.Etat._currentframe <= 25)) { if (_parent.Bg[1][Nom].Obj.Etat.wave.hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack2 = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 7) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; _global.Snd.playSound("hurtJake", 100, 1, false); } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjHuntSoldier.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if ((Etat != "Shield") && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { if ((++HurtCount) == 3) { enemyHitScore(); Etat = "Stunned"; HurtCount = 0; } else { Etat = "Hurt"; } if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } } }; ObjHuntSoldier.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjHuntSoldier.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Math.abs(Pers.PosY - PosY) < 180) && (Math.random() < AttackChance)) { if (Math.abs(Pers.PosX - PosX) < 150) { Etat = "Attack2"; } else { Etat = "Attack1"; } AttackDelayCount = 0; } } }; ObjHuntSoldier.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntSoldier.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjHuntSoldier.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntSoldier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjHuntSoldier.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerHuntWindow = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntWindow"; this[l_mcElement._name] = new ObjHuntWindow(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntWindow.push(l_mcElement._name); } }; ObjHuntWindow.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntWindow.prototype.IdleClose = function () { with (this) { CheckCanOpen(); CheckSleep(); } }; ObjHuntWindow.prototype.IdleOpen = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt._currentframe == 1) { _parent.Bg[1][Nom].Obj.Etat.Hunt.gotoAndStop(HuntID); SetHuntEtat("Appear"); if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } } if ((HuntEtat == "Appear") && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { SetHuntEtat("idle"); } if (HuntEtat == "idle") { CheckFlip(); CheckAttack(); } if (((HuntEtat == "disappear") || (HuntEtat == "flee")) && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat.stop(); Etat = "Close"; if (HuntEtat == "flee") { _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = -80; } } if (HuntEtat == "Throw") { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes) { SetHuntEtat("idle"); } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == FrThrow) { var l_dir = "G"; if (HuntID == "A") { l_dir = "D"; } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { if (l_dir == "D") { l_dir = "G"; } else { l_dir = "D"; } } var l_netY = 70; if (PosY < Pers.TrueY) { l_netY = l_netY + (Math.abs(Pers.PosY - TrueY) - 150); } else { l_netY = l_netY - Math.abs(Pers.PosY - TrueY); } if (l_netY > 120) { l_netY = 120; } if (l_netY < 20) { l_netY = 20; } CreerNetBall(PosX, PosY + l_netY, l_dir); _global.Snd.playSound("net", 130, 1, false); } } CheckCanClose(); CheckHurt(); CheckSleep(); } }; ObjHuntWindow.prototype.Open = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleOpen"; AttackDelayCount = AttackDelay * 0.9; } } }; ObjHuntWindow.prototype.Close = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleClose"; _global.Game["G_HuntWindowCurrent" + HuntID] = null; } } }; ObjHuntWindow.prototype.CheckCanOpen = function () { with (this) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == null) { if (_global.Game[("G_Window" + HuntID) + "OpenDelayCount"] >= _global.Game.G_WindowOpenDelay) { if ((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown))) { if (((Pers.ICharacter == 0) && (Math.random() <= OpenChanceJake)) || ((Pers.ICharacter == 1) && (Math.random() <= OpenChanceDragon))) { Etat = "Open"; _global.Game["G_HuntWindowCurrent" + HuntID] = Nom; _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = 0; } } } } } }; ObjHuntWindow.prototype.CheckCanClose = function () { with (this) { if (CloseDelayCount < CloseDelay) { CloseDelayCount++; } else if ((HuntEtat != "disappear") && ((!((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown)))) || ((Pers.ICharacter == 0) && (Math.random() <= CloseChance)))) { if (Math.random() <= OpenChance) { SetHuntEtat("disappear"); CloseDelayCount = 0; } } } }; ObjHuntWindow.prototype.CheckFlip = function () { with (this) { if (FlipDelayCount < FlipDelay) { FlipDelayCount++; } else { if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } FlipDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Pers.ICharacter == 1) && (Math.abs(Pers.PosY - PosY) < 300)) { SetHuntEtat("Throw"); AttackDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckHurt = function () { with (this) { if ((((HuntEtat == "idle") || (HuntEtat == "Throw")) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].Obj.hitTest(_parent.Pers.Obj.HitFront))) { SetHuntEtat("flee"); enemyHitScore(); if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } }; ObjHuntWindow.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "IdleClose"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntWindow.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == Nom) { _global.Game["G_HuntWindowCurrent" + HuntID] = null; } Etat = "Sleep"; } } }; ObjHuntWindow.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntWindow.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.window.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.overlay.gotoAndStop(G_CurrentLevel); } }; ObjHuntWindow.prototype.SetHuntEtat = function (newEtat) { with (this) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.gotoAndStop(newEtat); HuntEtat = newEtat; } }; ObjHuntWindow.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusa = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "Medusa"; this[l_mcElement._name] = new ObjMedusa(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusa.push(l_mcElement._name); } }; ObjMedusa.prototype.Idle = function () { with (this) { CheckAttack(); CheckDir(); CheckHurt(); } }; ObjMedusa.prototype.Captured = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showNextScreen(); } } }; ObjMedusa.prototype.Die = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showWinScreen(); } } }; ObjMedusa.prototype.Laugh = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Attack = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe < FrPrepareAttack) { CheckDir(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrPrepareAttack) { if (Pers.ICharacter == 0) { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 1.5)); } else { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 3)); } NextAttackRotation = Math.round(pointsGetAngle(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY)); var l_dst = pointsGetDistance(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY); var l_step = (l_dst / 20); NextAttackRotationSpdX = (Pers.TrueX - G_Medusa.TrueX) / l_step; NextAttackRotationSpdY = (l_PersY - G_Medusa.TrueY) / l_step; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrAttack) { var l_PosX = PosX; CreerSparkBall(PosX, PosY - 95, Dir, NextAttackRotation, NextAttackRotationSpdX, NextAttackRotationSpdY); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { HasAttacked = true; Etat = "Idle"; } CheckHurt(); } }; ObjMedusa.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjMedusa.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Laugh"; } } } }; ObjMedusa.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjMedusa.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if (Math.random() < AttackChance) { Etat = "Attack"; HasAttacked = false; AttackDelayCount = 0; } } }; ObjMedusa.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjMedusa.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjMedusa.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjMedusa.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusaSister = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "MedusaSister"; this[l_mcElement._name] = new ObjMedusaSister(l_mcElement, Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusaSister.push(l_mcElement._name); } }; ObjMedusaSister.prototype.UpdateSister = function (SisterID) { with (this) { if (CurrentSister == SisterID) { mc[SisterID].gotoAndStop(CurrentAction); } else { mc[SisterID].gotoAndStop("Idle"); } } }; ObjMedusaSister.prototype.UpdatePosition = function () { with (this) { var l_maxOffset = 70; var l_posX = Math.abs(_parent.Control.Bg.PosX); mc._x = -((l_posX / 450) * l_maxOffset); mc._y = mc._y + (_global.MoveY / 2.5); if (mc._y < 145) { mc._y = 145; } } }; ObjMedusaSister.prototype.UpdateAttack = function () { with (this) { if ((CurrentAction == "Idle") && (!MedusaAttack)) { if ((++AttackDelayCount) == AttackDelay) { if (CurrentSister == "SisterLeft") { CurrentSister = "SisterRight"; } else { CurrentSister = "SisterLeft"; } CurrentAction = "Charge"; AttackDelayCount = 0; } } else if (CurrentAction == "Charge") { if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { var PersY = Math.abs(_global.Game.Pers.PosY); switch (true) { case PersY < 100 : CurrentAction = "Attack3"; break; case PersY < 250 : CurrentAction = "Attack2"; break; case PersY >= 250 : CurrentAction = "Attack1"; } } } else if (((CurrentAction == "Attack1") || (CurrentAction == "Attack2")) || (CurrentAction == "Attack3")) { if (mc[CurrentSister].Etat._currentframe == 9) { if ((Pers.Etat != "Activate") && (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Pers))) { Pers.Etat = "Hurt"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna1)) { _global.Game.Antenna1.Etat = "Charged"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna2)) { _global.Game.Antenna2.Etat = "Charged"; } } if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { CurrentAction = "Idle"; if (CurrentSister == "SisterRight") { MedusaAttack = true; G_Medusa.HasAttacked = false; } } } if (!MedusaAttack) { G_Medusa.AttackDelayCount = 0; } else if (G_Medusa.HasAttacked) { MedusaAttack = false; } } }; ObjMedusaSister.prototype.Actions = function () { with (this) { UpdatePosition(); UpdateAttack(); UpdateSister("SisterLeft"); UpdateSister("SisterRight"); } }; CreerWall = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjWall(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabWall.push(l_mcElement._name); } }; ObjWall.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjWall.prototype.Idle = function () { with (this) { CheckHurt(); CheckSleep(); } }; ObjWall.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrRemoveWallHit) { _parent.Collider.Wall[Nom].removeMovieClip(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Out"; } } }; ObjWall.prototype.CheckHurt = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjWall.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjWall.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjWall.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjWall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.wall.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.wall.gotoAndStop(G_CurrentLevel); } }; ObjWall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerDragonObstacle = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjDragonObstacle(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabDragonObstacle.push(l_mcElement._name); } }; ObjDragonObstacle.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjDragonObstacle.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjDragonObstacle.prototype.Hit = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.HitBoss = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 4) { _global.Game.Web.Etat = "Fall"; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.Fall = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == (_parent.Bg[1][Nom].Obj.Etat._totalframes - 1)) { G_Medusa.Etat = "Captured"; } } }; ObjDragonObstacle.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _parent.Bg[1][Nom].Obj.Etat.stop(); } } }; ObjDragonObstacle.prototype.CheckHit = function () { with (this) { if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitTop) || (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitBottomFront)))) { Pers.Etat = "Hurt"; Etat = "Hit"; Pers.InvincibleEnd(); Pers.MoveY = 40; } } }; ObjDragonObstacle.prototype.CheckActif = function () { with (this) { if (_global.boss || (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep"))) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjDragonObstacle.prototype.CheckSleep = function () { with (this) { if (((((!_global.boss) && (PosX < (Bg.InvPosX - LgOutG))) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjDragonObstacle.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjDragonObstacle.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjDragonObstacle.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerAntenna = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjAntenna(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabAntenna.push(l_mcElement._name); } }; ObjAntenna.prototype.Idle = function () { with (this) { CheckHit(); } }; ObjAntenna.prototype.Charged = function () { with (this) { CheckHit(); if ((++ChargedCount) == ChargedDelay) { Etat = "Idle"; ChargedCount = 0; } } }; ObjAntenna.prototype.CheckHit = function () { with (this) { if ((G_Medusa.CurrentSparkID != null) && (Pers.Etat != "Hurt")) { if (_parent.Bg[1][Nom].Obj.Hit.hitTest(_parent.Bg[1][G_Medusa.CurrentSparkID])) { Etat = "Charged"; ChargedCount = 0; if ((_global.level == 1) && (_global.Game.Web.Etat != "Fall")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Web.Etat = "Fall"; _global.HUD.increaseScore(1000); } if ((((_global.level == 2) && (_global.Game.Antenna1.Etat == "Charged")) && (_global.Game.Antenna2.Etat == "Charged")) && (_global.Game.Wire.Etat != "HitBoss")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Wire.Etat = "HitBoss"; _global.HUD.increaseScore(2000); } } } } }; ObjAntenna.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjAntenna.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if (Etat == "Charged") { _global.Snd.playSound("antenna", 250, 1, false); } _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjAntenna.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerBonus = function (type, l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBonus(type, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabBonus.push(l_mcElement._name); } }; ObjBonus.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjBonus.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBonus.prototype.CheckHit = function () { with (this) { if (((Pers.ICharacter == 0) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj))) || ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.Hit)))) { switch (Type) { case "Score" : _global.Score = _global.Score + 500; _global.Snd.playSound("energy", 200, 1, false); _global.HUD.increaseScore(500); break; case "Life" : if (_global.lives < 3) { _global.lives++; } _global.Snd.playSound("life", 200, 1, false); _global.HUD.increaseScore(200); break; case "Energy" : _global.energy = _global.energy + 50; if (_global.energy > 100) { _global.energy = 100; } _global.Snd.playSound("bonus", 300, 1, false); _global.HUD.increaseScore(200); break; case "Power" : _global.dragonPower = 100; _global.Snd.playSound("power", 300, 1, false); _global.HUD.increaseScore(200); } KillBonus(); } } }; ObjBonus.prototype.KillBonus = function () { with (this) { G_TabBonus.splice(BonusI, 1); BonusI = BonusI - 1; delete _parent.Control[Nom]; _parent.Bg[1][Nom].swapDepths(90210); _parent.Bg[1][Nom].removeMovieClip(); } }; ObjBonus.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { Etat = "Idle"; } } }; ObjBonus.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjBonus.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjBonus.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); CheckKill(); } } }; this.cnt = 0; this.G_CurrentLevel = _global.level; switch (G_CurrentLevel) { case 1 : this.G_MaxEnemyHit = 28; break; case 2 : this.G_MaxEnemyHit = 28; break; case 3 : this.G_MaxEnemyHit = 38; } G_MaxEnemyHitCount = 0; this.G_Pause = true; this.G_PauseOut = false; this.G_PRealese = true; this.G_Resume = false; this.G_TabBox = new Array(); this.G_TabSwitch = new Array(); this.G_TabDoor = new Array(); this.G_TabElevator = new Array(); this.G_TabPersBall = new Array(); this.G_TabLevier = new Array(); this.G_TabLadder = new Array(); this.G_TabChair = new Array(); this.G_TabHuntSoldier = new Array(); this.G_TabHuntWindow = new Array(); this.G_TabMedusa = new Array(); this.G_TabMedusaSister = new Array(); this.G_TabWall = new Array(); this.G_TabDragonObstacle = new Array(); this.G_TabAntenna = new Array(); this.G_TabBonus = new Array(); this.G_NextPersBall = 1; this.G_NextPersBallDepth = 10000; this.G_NextMinionBall = 1; this.G_NextMinionBallDepth = 20000; this.G_OverlayDepth = 0; this.G_HuntWindowCurrentA = null; this.G_HuntActiveSinceA = 0; this.G_HuntWindowCurrentB = null; this.G_HuntActiveSinceB = 0; this.G_AlphaZones = new Array(); this.G_Medusa = null; this.G_WindowOpenDelay = 20; this.G_WindowAOpenDelayCount = 0; this.G_WindowBOpenDelayCount = 0; this.addAlphaZone = function (mc) { if (_global.Packaging.bShadowDisabled) { mc._visible = false; } }; this.resetLevel = function () { _global.dragonPower = 100; _global.energy = 100; if (_global.boss) { _global.resetDestination = "Game_BOSS" + _global.level; } else { _global.resetDestination = "Game_LEVEL" + _global.level; } _parent._parent.gotoAndStop("Reset"); }; this.bossStart = function () { _global.boss = true; _global.resetDestination = "Game_BOSS" + _global.level; _parent._parent.gotoAndStop("Reset"); }; this.enemyHitScore = function () { if ((++G_MaxEnemyHitCount) < G_MaxEnemyHit) { _global.HUD.increaseScore(100); } }; this.Creer_PBalcony = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + l_mcElement._parent._y; CreerPlateforme(pt, 235); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PRoofTop = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; var pt = new Object(); pt = {x:l_mcElement._x - 5, y:l_mcElement._y + 95}; var mcCeil = _parent.Collider.Ceil; mcCeil.moveTo(pt.x, pt.y); mcCeil.beginFill(16711935); pt.x = pt.x + 115; pt.y = pt.y - 70; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x + 115; pt.y = pt.y + 70; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y - 80; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x - 230; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y + 80; mcCeil.lineTo(pt.x, pt.y); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBalconyOpen = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + (l_mcElement._parent._y + 10); CreerPlateforme(pt, 235); if (l_mcElement.flipped) { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01OverlayFlip", {x:pt.x + 32, y:pt.y}, true); CreerObstacle({x:pt.x + 19, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); } else { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01Overlay", {x:pt.x + 120, y:pt.y + 0.5}, true); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 195, y:pt.y}, 15, 15); } _parent.overlay[l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); _parent.Bg[1][l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBox = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; 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; CreerPlateforme(pt, 70); CreerObstacle(pt, 70, 70); } }; this.CheckVisible = function () { if ((this._y < (Bg.InvPosY - Stage.height)) or (this._y > (Bg.InvPosY + Stage.height))) { this._visible = false; } else { this._visible = true; } }; 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.CreerObstacleDragon = function (pt, l_nWidth, l_nHeight) { var _local3 = _parent.Collider.Dragon; pt.x = Math.round(pt.x); pt.y = Math.round(pt.y); _local3.moveTo(pt.x, pt.y); _local3.beginFill(16776960); _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.CreerOverlay = function (id, linkage, pt, bReversed) { var _local4; var _local5; _local5 = _parent.overlay.attachMovie(linkage, id, G_OverlayDepth++); _local5._x = pt.x; _local5._y = pt.y; _local4 = _parent.Bg[1].attachMovie(linkage, id, G_OverlayDepth++); _local4._x = pt.x; _local4._y = pt.y; _local4.overlay = _local5; if (!bReversed) { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = false; this.overlay._visible = true; } else { this._visible = true; this.overlay._visible = false; } }; } else { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = true; this.overlay._visible = false; } else { this._visible = false; this.overlay._visible = true; } }; } }; this.replaceTile = function (l_mcElement) { var _local1 = l_mcElement._name; var _local2 = 1499; if (_local1.slice(0, 8) == "instance") { } else { l_mcElement._x = 0; l_mcElement._y = -((Number(_local1) - 1) * _local2); } }; this.CreerFloor = function (l_nPosX, l_nPosY, l_nWidth, l_nHeight) { var mcGround = _parent.Collider.Sol; with (this) { pt = new Object(); pt = {x:l_nPosX, y:l_nPosY}; pt.y = pt.y - l_nHeight; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor1 = 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 + -60; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloorBoss = 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 + -88; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor2a = 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 + 120; 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); pt.x = pt.x + 360; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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); } }; } onClipEvent (enterFrame) { BoxI = 0; for (BoxI in G_TabBox) { var BoxActif = G_TabBox[BoxI]; if (this[BoxActif].Etat != this[BoxActif].EtatOld) { this[BoxActif].ChangeEtat(this[BoxActif].Etat); } this[BoxActif].Actions(); } PersBallI = 0; for (PersBallI in G_TabPersBall) { var PersBallActif = G_TabPersBall[PersBallI]; if (this[PersBallActif].Etat != this[PersBallActif].EtatOld) { this[PersBallActif].ChangeEtat(this[PersBallActif].Etat); } this[PersBallActif].Actions(); } LevierI = 0; for (LevierI in G_TabLevier) { var LevierActif = G_TabLevier[LevierI]; if (this[LevierActif].Etat != this[LevierActif].EtatOld) { this[LevierActif].ChangeEtat(this[LevierActif].Etat); } this[LevierActif].Actions(); } LadderI = 0; for (LadderI in G_TabLadder) { var LadderActif = G_TabLadder[LadderI]; if (this[LadderActif].Etat != this[LadderActif].EtatOld) { this[LadderActif].ChangeEtat(this[LadderActif].Etat); } this[LadderActif].Actions(); } ChairI = 0; for (ChairI in G_TabChair) { var ChairActif = G_TabChair[ChairI]; if (this[ChairActif].Etat != this[ChairActif].EtatOld) { this[ChairActif].ChangeEtat(this[ChairActif].Etat); } this[ChairActif].Actions(); } ElevatorI = 0; for (ElevatorI in G_TabElevator) { var ElevatorActif = G_TabElevator[ElevatorI]; if (this[ElevatorActif].Etat != this[ElevatorActif].EtatOld) { this[ElevatorActif].ChangeEtat(this[ElevatorActif].Etat); } this[ElevatorActif].Actions(); } I = 0; for (HuntSoldierI in G_TabHuntSoldier) { var HuntSoldierActif = G_TabHuntSoldier[HuntSoldierI]; if (this[HuntSoldierActif].Dir != this[HuntSoldierActif].DirOld) { this[HuntSoldierActif].ChangeDir(this[HuntSoldierActif].Dir); } if (this[HuntSoldierActif].Etat != this[HuntSoldierActif].EtatOld) { this[HuntSoldierActif].ChangeEtat(this[HuntSoldierActif].Etat); } this[HuntSoldierActif].Actions(); } I = 0; for (HuntWindowI in G_TabHuntWindow) { var HuntWindowActif = G_TabHuntWindow[HuntWindowI]; if (this[HuntWindowActif].Dir != this[HuntWindowActif].DirOld) { this[HuntWindowActif].ChangeDir(this[HuntWindowActif].Dir); } if (this[HuntWindowActif].Etat != this[HuntWindowActif].EtatOld) { this[HuntWindowActif].ChangeEtat(this[HuntWindowActif].Etat); } this[HuntWindowActif].Actions(); } if (!G_Pause) { if (_global.Game.G_HuntWindowCurrentA == null) { _global.Game.G_WindowAOpenDelayCount++; } if (_global.Game.G_HuntWindowCurrentB == null) { _global.Game.G_WindowBOpenDelayCount++; } } I = 0; for (MedusaI in G_TabMedusa) { var MedusaActif = G_TabMedusa[MedusaI]; if (this[MedusaActif].Dir != this[MedusaActif].DirOld) { this[MedusaActif].ChangeDir(this[MedusaActif].Dir); } if (this[MedusaActif].Etat != this[MedusaActif].EtatOld) { this[MedusaActif].ChangeEtat(this[MedusaActif].Etat); } this[MedusaActif].Actions(); } I = 0; for (WallI in G_TabWall) { var WallActif = G_TabWall[WallI]; if (this[WallActif].Dir != this[WallActif].DirOld) { this[WallActif].ChangeDir(this[WallActif].Dir); } if (this[WallActif].Etat != this[WallActif].EtatOld) { this[WallActif].ChangeEtat(this[WallActif].Etat); } this[WallActif].Actions(); } I = 0; for (DragonObstacleI in G_TabDragonObstacle) { var DragonObstacleActif = G_TabDragonObstacle[DragonObstacleI]; if (this[DragonObstacleActif].Dir != this[DragonObstacleActif].DirOld) { this[DragonObstacleActif].ChangeDir(this[DragonObstacleActif].Dir); } if (this[DragonObstacleActif].Etat != this[DragonObstacleActif].EtatOld) { this[DragonObstacleActif].ChangeEtat(this[DragonObstacleActif].Etat); } this[DragonObstacleActif].Actions(); } I = 0; for (AntennaI in G_TabAntenna) { var AntennaActif = G_TabAntenna[AntennaI]; if (this[AntennaActif].Dir != this[AntennaActif].DirOld) { this[AntennaActif].ChangeDir(this[AntennaActif].Dir); } if (this[AntennaActif].Etat != this[AntennaActif].EtatOld) { this[AntennaActif].ChangeEtat(this[AntennaActif].Etat); } this[AntennaActif].Actions(); } I = 0; for (MedusaSisterI in G_TabMedusaSister) { var MedusaSisterActif = G_TabMedusaSister[MedusaSisterI]; if (this[MedusaSisterActif].Dir != this[MedusaSisterActif].DirOld) { this[MedusaSisterActif].ChangeDir(this[MedusaSisterActif].Dir); } if (this[MedusaSisterActif].Etat != this[MedusaSisterActif].EtatOld) { this[MedusaSisterActif].ChangeEtat(this[MedusaSisterActif].Etat); } this[MedusaSisterActif].Actions(); } I = 0; for (BonusI in G_TabBonus) { var BonusActif = G_TabBonus[BonusI]; if (this[BonusActif].Dir != this[BonusActif].DirOld) { this[BonusActif].ChangeDir(this[BonusActif].Dir); } if (this[BonusActif].Etat != this[BonusActif].EtatOld) { this[BonusActif].ChangeEtat(this[BonusActif].Etat); } this[BonusActif].Actions(); } if (Pers.Dir != Pers.DirOld) { Pers.ChangeDir(Pers.Dir); } if (Pers.Etat != Pers.EtatOld) { Pers.setState(Pers.Etat); } this.Pers.Actions(); this.Bg.Actions(); _global.HUD.update(); G_CheckPause(); }
Symbol 1209 MovieClip Frame 2
stop(); _global.C.beginLevel();
Instance of Symbol 1208 MovieClip "Bg" in Symbol 1209 MovieClip Frame 2
onClipEvent (load) { this._x = 0; this._y = 0; _parent.Control.CreerBg(_parent._x, _parent._y); BG = _parent.Control.Bg; for (var i in _parent.Bg) { if (Number(_parent.Bg[i]._name) <= 20) { _parent.Bg[i].gotoAndStop(2); } else { _parent.Bg[i].gotoAndStop(3); } } BG.MaxDw1 = 5100; BG.MaxUp1 = -200; BG.MaxG1 = 0; BG.MaxD1 = 0; BG.ParallaxRateSky = 1.18; BG.ParallaxRateCity = 1.07; BG.CheckScreen = function () { with (this) { MaxDw = MaxDw1; MaxUp = MaxUp1; MaxG = MaxG1; MaxD = MaxD1; } }; }
Instance of Symbol 1150 MovieClip "Pers" in Symbol 1209 MovieClip Frame 2
onClipEvent (load) { _parent.Control.CreerPers(this._x, this._y, "Jake"); this.gotoAndStop("D"); _global.Game.Pers.Etat = "Sleep"; _global.Game.Pers.setState("Idle"); }
Instance of Symbol 1154 MovieClip "Collider" in Symbol 1209 MovieClip Frame 2
onClipEvent (load) { this._visible = 0; }
Symbol 1228 MovieClip Frame 1
stop();
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 838 MovieClip "switchALift" in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 838 MovieClip "switchCLift" in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 838 MovieClip "switchBLift" in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { distance = 260; }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 593 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 621 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Instance of Symbol 621 MovieClip in Symbol 1228 MovieClip Frame 1
onClipEvent (load) { this.flipped = true; }
Symbol 1228 MovieClip Frame 2
_parent._parent.Control.CreerFloor1(this, this._x, this._y); stop();
Symbol 1229 MovieClip Frame 2
stop();
Instance of Symbol 560 MovieClip "Control" in Symbol 1230 MovieClip Frame 1
onClipEvent (load) { function ObjBg(PosX, PosY) { this.Nom = "Bg"; this.PosX = PosX; this.PosY = PosY; this.ParallaxPosX = 0; this.ParallaxPosY = 0; this.ParallaxSkyPosX = 0; this.ParallaxSkyPosY = 0; this.ParallaxCityPosX = 0; this.ParallaxCityPosY = 0; this.ParallaxRateSky = 1.2; this.ParallaxRateCity = 1.1; this.MoveX = 0; this.MoveY = 0; this.MaxDw = 0; this.MaxUp = 0; this.MaxG = 0; this.MaxD = 0; this.InvPosX = PosX * -1; this.InvPosY = PosY * -1; this.DeadX = PosX; this.DeadY = PosY; this.CurrentScreen = 1; this.OldScreen = 0; this.MaxYDie = 5000; this.CenterX = 300; this.CenterY = 370; this.SpdXD = 15; this.SpdXG = -15; this.SpdYDw = 20; this.SpdYUp = -20; this.SpdYUpForce = 0; this.InPause = false; this.NoCamUpdate = false; this.CamOnMedusa = false; } function ObjBox(Nom, PosX, PosY, Type, Dir) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.MoveX = 0; this.MoveY = 0; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 75; this.LgOutD = 525; this.LgOutUp = 25; this.LgOutDw = 475; this.LgHitG = 34; this.LgHitD = 35; this.LgHitUp = 25; this.LgHitDw = 26; this.HitRightX; this.HitLeftX; this.PushDir = Dir; this.Dir = Pers.Dir; if (Dir == "D") { _parent.Bg[1][Nom]._xscale = -100; } this.FlagUse = false; this.LandSide = "Center"; this.MinionBlock = 0; this.Etat = "Wait"; this.EtatOld = "Sleep"; this.FixedFlag = false; _parent.Collider.Sol.attachMovie("TopBox", Nom, _parent.Collider.Sol.getNextHighestDepth()); _parent.Collider.Wall.attachMovie("BorderBox", Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Ceil.attachMovie("BottomBox", Nom, _parent.Collider.Ceil.getNextHighestDepth()); this.frTurn = 20; this.SoundPush = false; this.WebDestroyed = false; this.MoveBox(); } function ObjPers(PosX, PosY, Perso) { this.nGetHitLeft = 0; this.nGetHitRight = 0; this.nGetHitTop = 0; 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.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.SpdYUpBase = 1.7; this.SpdYUp = this.SpdYUpBase; this.SpdYMax = 30; this.SpdYFall = 2.2; this.SpdYFly = 5; this.SpdXHitBase = 0; this.SpdYHitBase = -4; this.SpdStartJump = -17; this.SolOut = 2; this.SolHitMin = 5; this.MaxSol = 3; this.HitGrd = false; this.SolForJump = 6; this.DistYFall = 0; this.DistYFallMax = 900; this.autoSwitchDragon = false; this.DistYLand = 80; this.CanHit = false; this.CanBeHit = true; this.FrWalkNow = 1; this.InPause = false; this.FrJump = 1; this.FrFall = 1; this.FrLand = 13; this.FrGetHit = 7; this.FrGetHitCount = 0; this.FrBoomTir = 9; this.FrFinBoom = 6; this.FrDead = 20; this.FrDeadCount = 0; this.aCharacter = ["Jake", "Dragon"]; this.ICharacter = 0; this.Perso = this.aCharacter[this.ICharacter]; this.updatePerso(); this.LgGetShootX = 20; this.LgGetShootUp = 72; this.LgGetShootUpBas = 44; this.FrInvincibleCount = 0; this.FrInvincible = 20; this.Invincible = false; this.FrSwitchCharacter = 15; this.FrSwitchCharacterCount = 0; this.bCanSwitch = true; 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.nDragonPowerRythm = 25; this.nDragonPowerCount = 0; this.DragonHitTop = 0; this.DragonHitBottom = 0; this.DragonHeight = 130; this.onLadderID = null; this.ClimbedDistance = 0; this.ladderDisabledMax = 15; this.ladderDisabledCount = this.ladderDisabledMax; this.onBouncingID = null; this.bounceCount = 0; this.bounceCountMax = 3; this.bouncingDisabledMax = 15; this.bouncingDisabledCount = this.bouncingDisabledMax; this.bHitAttack = false; this.FrShootFire = 15; this.FrAttackTailHit = 9; this.CurrentFireID = null; if (_global.boss) { this.WaitForActions = true; } else { this.WaitForActions = false; } } function ObjPersBall(Type, Nom, PosX, PosY, Dir, HitBullet, Speed, Tab, HitSound, Rotation, SpdX, SpdY) { this.Nom = Nom; this.Type = Type; this.HitSound = HitSound; this.Tab = Tab; this.Etat = "Move"; this.EtatOld = "Idle"; this.Dir = Dir; this.OldDir = "D"; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 50; this.LgOutD = 600; this.LgOutUp = 0; this.LgOutDw = 500; this.CanBeKill = false; if (Dir == "D") { this.SpdX = Speed; } else { this.SpdX = -1 * Speed; _parent.Bg[1][Nom]._xscale = -100; } this.InPause = false; this.FrHit = HitBullet; this.FrHide = 1; if (Type == "Fire") { Pers.CurrentFireID = Nom; } if (Type == "Spark") { G_Medusa.CurrentSparkID = Nom; this.LgOutG = 1100; this.LgOutD = 1100; _parent.Bg[1][Nom]._xscale = -100; _parent.Bg[1][Nom]._rotation = Rotation; this.SpdX = SpdX; this.SpdY = SpdY; } } function ObjSwitch(Nom, PosX, PosY) { this.Nom = Nom; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 20; this.LgOnY = 20; this.PosX = PosX; this.PosY = PosY; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrBaisse = 13; } function ObjElevator(mc, Axis, Min, Max) { this.Nom = mc._name; this.mc = mc; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 750; this.LgOutG = 200; this.LgOutUp = 500; this.LgOutDw = 900; this.Speed = 2; this.frWaitCount = 0; this.frWaitTime = 30; this.LgOnX = 200; this.LgOnY = 25; this.PersOn = false; this.MoveX = 0; this.MoveY = 0; this.PosX = mc._x + 40; this.PosY = mc._y + 140; this.Axis = Axis; this.Min = this["Pos" + Axis] + Min; this.Max = this["Pos" + Axis] + Max; this.Active = false; this.InPause = false; this.Dir = -1; this.CanReposition = false; this.RepositionCount = 0; this.RepositionDelay = 30; _parent.Collider.Sol.attachMovie("GroundElevator", this.Nom, _parent.Collider.Sol.getNextHighestDepth()); _global.Game.CreerOverlay(mc._name + "ramp", "AM_RampeAscenseur01_overlay", {x:mc._x, y:mc._y + 140}); this.MoveElevator(); } function ObjLevier(Nom, PosX, PosY, listener) { this.Nom = Nom; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 30; this.LgOnY = 100; this.PosX = PosX; this.PosY = PosY; this.PersYCorrection = 60; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrFinLevelCount = 0; this.FrFinLevel = 70; this.Active = true; this.listener = listener; } function pointsGetAngle(l_x1, l_y1, l_x2, l_y2) { var _local4 = 0; var _local3 = 0; var _local1 = 0; var _local2 = 0; _local4 = (l_x1 - l_x2) * -1; _local3 = (l_y1 - l_y2) * -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); } function pointsGetDistance(l_x1, l_y1, l_x2, l_y2) { var _local1 = Math.sqrt(Math.pow(Math.abs(l_x2 - l_x1), 2) + Math.pow(Math.abs(l_y2 - l_y1), 2)); return(_local1); } function ObjLadder(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.obj; this.Etat = "Off"; this.EtatOld = "Off"; this.LgOnX = 70; this.LgOnY = 265; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; } function ObjBouncingChair(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.Obj; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOnX = 70; this.LgOnY = 50; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; _global.Game.CreerPlateforme({x:this.PosX, y:this.PosY}, 73); } function ObjHuntSoldier(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 115; this.AttackDelayCount = 0; this.AttackChance = 0.03; this.ShieldChance = 0.25; this.HurtCount = 0; } function ObjHuntWindow(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "IdleClose"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 450; this.LgOutDw = 450; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.AttackDelay = 100; this.AttackDelayCount = 0; if (PosX < 150) { this.HuntID = "A"; this.FlipPosition = 20; } else { this.HuntID = "B"; this.FlipPosition = -20; } this.OpenRangeDown = 450; this.OpenRangeUp = -20; this.OpenChanceDragon = 0.85; this.OpenChanceJake = 0.1; this.HuntEtat = "idle"; this.AttackDelay = 100; this.AttackDelayCount = 0; this.AttackChance = 0.85; this.FlipDelay = 10; this.FlipDelayCount = 0; this.CloseDelay = 100; this.closeDelayCount = 0; this.CloseChance = 0.5; this.FrThrow = 11; } function ObjMedusa(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -60; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSparkID = null; this.HasAttacked = false; G_Medusa = this; _global.Medusa = this; } function ObjMedusaSister(mc, Type, Nom, PosX, PosY) { this.mc = mc; this.Nom = Nom; this.Perso = Type; this.Etat = "Idle"; this.EtatOld = "Idle"; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -110; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSister = "SisterRight"; this.CurrentAction = "Idle"; this.MedusaAttack = false; } function ObjWall(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; _parent.Collider.Wall.attachMovie("WallHit", this.Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Wall[Nom]._x = PosX; _parent.Collider.Wall[Nom]._y = PosY; this.FrRemoveWallHit = 4; } function ObjDragonObstacle(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; } function ObjAntenna(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.ChargedDelay = 300; this.ChargedCount = 0; } function ObjBonus(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.CanBeKill = false; } _global.Game = this; this.KeyListener = new com.sarbakan.utils.KeyManager(); KeyListener.addKeyListener(39, "R"); KeyListener.addKeyListener(37, "L"); KeyListener.addKeyListener(40, "Dw"); KeyListener.addKeyListener(38, "Up"); KeyListener.addKeyListener(32, "Dragon"); KeyListener.addKeyListener(66, "Attack"); KeyListener.addKeyListener(78, "Action"); 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(); } } } }; CreerBg = function (PosX, PosY) { this.Bg = new ObjBg(PosX, PosY); }; ObjBg.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } CheckScreen(); if (!NoCamUpdate) { ScrollBg(); } } } }; ObjBg.prototype.ScrollBg = function () { with (this) { if (CamOnMedusa) { Pers.TrueX = _global.Medusa.TrueX; Pers.TrueY = _global.Medusa.TrueY; } if ((PosY <= MaxDw) and (PosY >= MaxUp)) { if (Pers.TrueX > (CenterX + 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else { if ((CenterX - Pers.TrueX) > SpdXG) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXG; } if ((PosX + MoveX) < MaxG) { MoveX = MaxG - PosX; } } } else if (Pers.TrueX < (CenterX - 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } else { if ((CenterX - Pers.TrueX) < SpdXD) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXD; } if ((PosX + MoveX) > MaxD) { MoveX = MaxD - PosX; } } } else { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } } } if ((PosX <= MaxD) and (PosX >= MaxG)) { if (Pers.TrueY > (CenterY + 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxUp - PosY; } else { MoveY = SpdYDw; } } else { if ((CenterY - Pers.TrueY) > SpdYUp) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYUp; } if ((PosY + MoveY) < MaxUp) { MoveY = MaxUp - PosY; } } } else if (Pers.TrueY < (CenterY - 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } else { if ((CenterY - Pers.TrueY) < SpdYDw) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYDw; } if ((PosY + MoveY) > MaxDw) { MoveY = MaxDw - PosY; } } } else { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxDw - PosY; } else { MoveY = SpdYDw; } } else if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } } } _parent._x = Math.floor(_parent._x + MoveX); PosX = _parent._x; InvPosX = PosX * -1; MoveX = 0; _parent._y = Math.floor(_parent._y + MoveY); PosY = _parent._y; InvPosY = PosY * -1; _global.MoveY = MoveY; MoveY = 0; _parent.ParallaxSky._y = (Math.floor(_parent._y / (-ParallaxRateSky)) + 350) + 30; ParallaxSkyPosY = _parent.ParallaxSky._y; _parent.ParallaxCity._y = (Math.floor(_parent._y / (-ParallaxRateCity)) + 140) + 30; ParallaxCityPosY = _parent.ParallaxCity._y; } }; CreerBox = function (Nom, PosX, PosY, Type, Dir) { if (this[Nom] == null) { this[Nom] = new ObjBox(Nom, PosX, PosY, Type, Dir); G_TabBox.push(Nom); } }; ObjBox.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBox.prototype.Wait = function () { with (this) { if (Type == "moveable") { CheckPush(); } CheckHitGrd(); CheckSleep(); CheckFall(); if (Type == "destroyable") { CheckDestroy(); } } }; ObjBox.prototype.Fall = function () { with (this) { CheckHitGrd(); SetSpdFall(); MoveBox(); if (((Nom == "BoxDestroyWeb") && (!WebDestroyed)) && (TrueY > 350)) { _global.Game.WebDestroyable.Etat = "Destroy"; WebDestroyed = true; } } }; ObjBox.prototype.Land = function () { with (this) { CheckHitGrd(); SetSpdLand(); MoveBox(); if ((TrueX > 0) && (TrueX < 500)) { _global.SoundCTRL.playSound("BoxLand", 100, 0); } } }; ObjBox.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe >= _parent.Bg[1][Nom].Etat._totalframes) { _parent.Bg[1][Nom].Etat.stop(); _parent.Collider.Sol[Nom].removeMovieClip(); _parent.Collider.Ceil[Nom].removeMovieClip(); _parent.Collider.Wall[Nom].removeMovieClip(); } } }; ObjBox.prototype.LandFin = function () { with (this) { Etat = "Wait"; Pers.PushedBox = 0; } }; ObjBox.prototype.Fixed = function () { with (this) { CheckSleep(); } }; ObjBox.prototype.CheckPush = function () { with (this) { if (Pers.Etat == "Push") { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.PushPoint)) { Dir = Pers.Dir; if (Dir == "D") { this.MoveX = 2; } else if (Dir == "G") { this.MoveX = -2; } CheckWall(); if (Pers.Dir != PushDir) { MoveX = 0; } MoveBox(); Pers.PushedBox = this; if (MoveX != 0) { _global.Snd.playSound("push", 100, 999, true); } } } else { _global.Snd.stopSound("push"); } } }; ObjBox.prototype.CheckDestroy = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjBox.prototype.CheckHitGrd = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (_parent.Collider.Sol.hitTest(HitX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitRightX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitLeftX, HitY, true)) { HitGrd = true; } else { HitGrd = false; } } }; ObjBox.prototype.SetSpdFall = function () { with (this) { MaxMoveY = 15; MoveY = MoveY + 5; if (MoveY > MaxMoveY) { MoveY = MaxMoveY; } aCheckPoint = [TrueX, HitLeftX, HitRightX]; for (CheckPointI in aCheckPoint) { var activePointX = aCheckPoint[CheckPointI]; if (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 2), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 4), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } } } }; ObjBox.prototype.SetSpdLand = function () { with (this) { while ((_parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true) || (_parent.Collider.Sol.hitTest(HitLeftX, TrueY + MoveY, true))) || (_parent.Collider.Sol.hitTest(HitRightX, TrueY + MoveY, true))) { MoveY--; } if (MoveY < 1) { MoveY = 1; Etat = "LandFin"; } } }; ObjBox.prototype.CheckFall = function () { with (this) { if (HitGrd == true) { MoveY = 0; Etat = "Wait"; } else { Etat = "Fall"; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } MoveX = 0; MoveY = 0; } } }; ObjBox.prototype.CheckWall = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (Pers.Dir == "G") { HitX = HitX + (MoveX - LgHitG); } else if (Pers.Dir == "D") { HitX = HitX + (MoveX + LgHitD); } if (_parent.Collider.Wall.hitTest(HitX, HitY, true)) { MoveX = 0; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } } } }; ObjBox.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjBox.prototype.MoveBox = function () { with (this) { PosX = Number(PosX + MoveX); PosY = Number(PosY + MoveY); _parent.Bg[1][Nom]._x = PosX; _parent.Bg[1][Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY - 15; _parent.Collider.Wall[Nom]._x = PosX + 30; _parent.Collider.Wall[Nom]._y = PosY + 4; _parent.Collider.Ceil[Nom]._x = PosX; _parent.Collider.Ceil[Nom]._y = PosY + 40; } }; ObjBox.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (FixedFlag) { Etat = "Fixed"; } else { Etat = "Wait"; } } } }; ObjBox.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = (PosY + _parent._y) + LgHitDw; HitRightX = TrueX + LgHitD; HitLeftX = TrueX - LgHitG; } }; ObjBox.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if ((NewAction == "Turn") || (NewAction == "Fixed")) { _parent.Bg[1][Nom].gotoAndStop(NewAction + Dir); } else { _parent.Bg[1][Nom].gotoAndStop(NewAction); } _parent.Bg[1][Nom].Etat.box.gotoAndStop(Type); _parent.Bg[1][Nom].Etat.box.box.gotoAndStop(Type); } }; ObjBox.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } SetTruePos(); this[Etat](); } } }; ObjPers.prototype.IdleJake = function () { with (this) { DistYFall = 0; KeepDeadPos = true; bCanAttack = true; if (Life > 0) { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckPush(); CheckJump(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusJake = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.RunJake = function () { with (this) { bCanAttack = true; DistYFall = 0; SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckJump(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartJake = function () { with (this) { Pers.bouncingDisabledCount = 0; CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); MovePers(); if (HitGrd == true) { Etat = "Land"; } else if (SpdYNow >= 0) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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"; } } else if (DistYFall >= DistYFallMax) { autoSwitchDragon = true; } CheckHole(); } }; ObjPers.prototype.JumpLandingJake = function () { with (this) { CheckGetFire(); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (!_global.Game[onBouncingID].CheckPersOn()) { bounceCount = 0; Pers.onBouncingID = null; } if (_parent.Pers.Obj.Etat._currentframe >= 3) { if (_global.energy <= 0) { _global.energy = 0; Etat = "Die"; } } if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.ClimbingJake = function () { with (this) { SpdXNow = 0; SpdYNow = 0; CheckHitGrd(); if ((Pers.ClimbedDistance > 30) && (HitGrd)) { Etat = "Idle"; Pers.ladderDisabledCount = 0; } else if (KeyListener.Action) { Etat = "Fall"; } else { if (KeyListener.L) { SpdXNow = -2; } else if (KeyListener.R) { SpdXNow = 2; } if (KeyListener.Up) { SpdYNow = -3; } else if (KeyListener.Dw) { SpdYNow = 3; } SetMoveX(); SetMoveY(); CheckWall(FrontX, FrontY - 15); CheckWall(BackX, FrontY - 15); CheckWall(FrontX, FrontY); CheckWall(BackX, FrontY); CheckWall(FrontX, FrontY + 15); CheckWall(BackX, FrontY + 15); CheckWall(FrontX, FrontY + 30); CheckWall(BackX, FrontY + 30); CheckWall(FrontX, FrontY + 45); CheckWall(BackX, FrontY + 45); MovePers(); Pers.ClimbedDistance++; } if ((SpdXNow != 0) || (SpdYNow != 0)) { if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { _parent.Pers.Obj.Etat.gotoAndStop(1); } else { _parent.Pers.Obj.Etat.nextFrame(); } } else { _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.ActivateJake = function () { with (this) { CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.HurtJake = function () { with (this) { if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetJake = function () { with (this) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } }; ObjPers.prototype.AttackJake = function () { with (this) { CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe == Math.round(_parent.Pers.Obj.Etat._totalframes / 2)) { bHitAttack = true; } else { bHitAttack = false; } if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.GetHitJake = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireJake = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformJake = function () { with (this) { DistYFall = 0; if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 1; Etat = "Idle"; nDragonPowerCount = 0; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.PushJake = function () { with (this) { CheckHitGrd(); PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (!KeyListener.Action) { Etat = "Idle"; } else if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (PushedBox != 0) { MoveX = PushedBox.MoveX; } else { MoveX = 0; } } else { var AddBlock = (35 * NumDir); var i = 0; while (i != AddBlock) { if (_parent.Collider.Wall.hitTest(PushPointX + i, PushPointY, true)) { goToTarget = true; if (((i > 5) && (NumDir == 1)) || ((i < -5) && (NumDir == -1))) { MoveX = 5 * NumDir; } else { MoveX = i; } break; } i = i + NumDir; } } MovePers(); } }; ObjPers.prototype.TransformFallJake = ObjPers.prototype.TransformJake; ObjPers.prototype.DieJake = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { _parent.Pers.Obj.Etat.stop(); if (FrDeadCount == 0) { _global.lives--; _global.Snd.stopSound("lift"); _global.Snd.stopSound("push"); if (_global.lives == 0) { _global.Packaging.showLoseScreen(); } else { _global.HUD.fade(resetLevel); } } FrDeadCount++; } } }; ObjPers.prototype.SleepJake = function () { }; ObjPers.prototype.IdleDragon = function () { with (this) { bCanAttack = true; KeepDeadPos = true; if (Life > 0) { SetSpdDragon(); SetMoveX(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdDragon(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusDragon = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.FlyDragon = function () { with (this) { bCanAttack = true; SetSpdDragon(); SetMoveX(); SetMoveY(); CheckDragonObstacle(); CheckWall(FrontX, FrontY); CheckCeilDragon(); CheckSolDragon(); CheckGroundDragon(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartDragon = function () { with (this) { CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleDragon = function () { with (this) { SetSpdDragonJump(); 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 = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallDragon = function () { with (this) { SetSpdDragonJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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.JumpLandingDragon = function () { with (this) { CheckGetFire(); this["CheckAttack" + Perso](); if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) { if (Life <= 0) { Etat = "Die"; } else { Etat = "Idle"; } } } }; ObjPers.prototype.HurtDragon = function () { with (this) { MovePers(); if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); Etat = "Idle"; FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetDragon = ObjPers.prototype.HurtDragon; ObjPers.prototype.AttackTailDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrAttackTailHit) { bHitAttack = true; } else { bHitAttack = false; } } }; ObjPers.prototype.AttackFireDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrShootFire) { if (Dir == "D") { CreerFireBall(PosX + 70, PosY - 70, Dir); } else { CreerFireBall(PosX - 70, PosY - 70, Dir); } } } }; ObjPers.prototype.GetHitDragon = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireDragon = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 0; Etat = "Fall"; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.DieDragon = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { FrDeadCount++; _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.SleepDragon = function () { }; CreerPers = function (PosX, PosY, Perso) { this.Pers = new ObjPers(PosX, PosY, Perso); }; ObjPers.prototype.CharacterSwitch = function () { with (this) { if (Etat == "Fall") { Etat = "TransformFall"; } else { Etat = "Transform"; } } }; ObjPers.prototype.HeroChange = function (NewHero) { with (this) { Perso = NewHero; updatePerso(); } }; ObjPers.prototype.GetHitGeneral = function () { with (this) { SetSpdXHit(); CheckWall(BackX, TrueY); CheckHitGrd(); CheckSol(); MovePers(); CheckDie(); } }; 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.SetSpdXHit = function () { with (this) { MoveX = SpdXNow; if (SpdXNow > 0) { SpdXNow = SpdXNow * 0.7; } if (Dir eq "D") { MoveX = MoveX * -1; } } }; ObjPers.prototype.SetSpdXJake = 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.SetSpdDragon = function () { with (this) { if (KeyListener.R == true) { Dir = "D"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase; } } else if (KeyListener.L == true) { Dir = "G"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase * -1; } } else { SpdXNow = 0; } if (KeyListener.Dw == true) { SpdYNow = SpdYFly; } else if (KeyListener.Up == true) { SpdYNow = SpdYFly * -1; } else { SpdYNow = 0; } if ((SpdXNow == 0) && (SpdYNow == 0)) { Etat = "Idle"; } else { Etat = "Fly"; } } }; 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.SetMoveX = function () { with (this) { MoveX = SpdXNow; } }; ObjPers.prototype.SetMoveY = function () { with (this) { MoveY = SpdYNow; } }; 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.CheckDragonObstacle = function () { with (this) { if (MoveY != 0) { if (_parent.Collider.Dragon.hitTest(TopX, TopY + MoveY, true)) { MoveY = DragonHitTop; } else if (_parent.Collider.Dragon.hitTest(BottomFrontX, (TopY + MoveY) + DragonHeight, true) or _parent.Collider.Dragon.hitTest(BottomBackX, (TopY + MoveY) + DragonHeight, true)) { MoveY = DragonHitBottom; } } } }; 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.CheckSolDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Sol.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckCeilDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; SpdYNow = 0; } } } }; ObjPers.prototype.CheckGroundDragon = function () { with (this) { if (MoveY > 0) { if (_parent.Collider.Sol.hitTest(BottomFrontX, TrueY - _parent.Pers.Obj.HitBottomFront._y, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckJump = function () { with (this) { if (Etat != "Push") { if ((!KeyListener.Up) && (!bJumpRelease)) { bJumpRelease = true; } if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) { bJumpRelease = false; if (Etat == "Run") { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } else { Etat = "JumpStart"; } } } } }; ObjPers.prototype.CheckPush = function () { with (this) { PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (KeyListener.Action && (((Dir == "G") && (KeyListener.L)) || ((Dir == "D") && (KeyListener.R)))) { Etat = "Push"; } } } }; ObjPers.prototype.CheckAttackJake = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "Attack"; } } }; ObjPers.prototype.CheckAttackDragon = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackTail"; } if ((KeyListener.Action == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackFire"; } } }; ObjPers.prototype.CheckFall = function () { with (this) { if (SpdYNow >= SpdYFall) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.CheckDie = function () { with (this) { if (_global.energy <= 0) { _global.dragonPower = 0; Etat = "Fall"; } } }; ObjPers.prototype.MovePers = function () { with (this) { if ((Pers.TrueX + MoveX) < 30) { MoveX = (TrueX * -1) + 30; } else if ((Pers.TrueX + MoveX) > 520) { MoveX = 520 - Pers.TrueX; } PosX = _parent.Pers._x + MoveX; _parent.Pers._x = PosX; MoveX = 0; PosY = _parent.Pers._y + MoveY; _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]; if ((onBouncingID != null) && (_global.Game[onBouncingID].CheckPersOn() != true)) { Pers.SpdYUp = Pers.SpdYUpBase; } 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; } }; 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; } }; ObjPers.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Pers.gotoAndStop((Perso + "_") + Dir); } }; ObjPers.prototype.Actions = function () { with (this) { if (WaitForActions) { SetTruePos(); CheckHitGrd(); CheckSol(); CheckFall(); WaitForActions = false; } else if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Pers.Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Pers.Obj.Etat.play(); } SetTruePos(); InvincibleCheck(); this[Etat + aCharacter[ICharacter]](); CheckCharSwitch(); CheckHit(); CheckEndLevel(); } } }; ObjPers.prototype.CheckCharSwitch = function () { with (this) { if (ICharacter == 1) { if ((KeyListener.Dragon || (_global.dragonPower == 0)) && (Etat != "HurtNet")) { CharacterSwitch(); } else if ((++nDragonPowerCount) == nDragonPowerRythm) { _global.dragonPower--; nDragonPowerCount = 0; if (_global.dragonPower < 0) { _global.dragonPower = 0; } } } else { if (((KeyListener.Dragon || (autoSwitchDragon)) && (bCanSwitch)) && (_global.dragonPower > 0)) { autoSwitchDragon = false; bCanSwitch = false; FrSwitchCharacterCount = FrSwitchCharacter; CharacterSwitch(); } if (!bCanSwitch) { FrSwitchCharacterCount--; if (FrSwitchCharacterCount == 0) { bCanSwitch = true; } } } } }; ObjPers.prototype.CheckEndLevel = function () { with (this) { if (!_global.boss) { if (((_global.level == 1) && (PosY <= -3930)) && (PosX >= 390)) { _global.HUD.fade(bossStart); _global.boss = true; } if ((_global.level == 2) && (PosY <= -4670)) { _global.HUD.fade(bossStart); _global.boss = true; } if (((_global.level == 3) && (PosY <= -5800)) && (PosX <= 105)) { _global.HUD.fade(bossStart); _global.boss = true; } } } }; ObjPers.prototype.CheckHit = function () { with (this) { if (KeyListener.X && (CanBeHit)) { this.GetHit(); } } }; CreerNetBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("NetBall", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Net", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerFireBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("JackDragon_FireAnim", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Fire", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerSparkBall = function (PosX, PosY, Dir, Rotation, SpdX, SpdY) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("Medusa_Blast", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Spark", _local4, PosX, PosY, Dir, 8, 0, G_TabPersBall, "SlimeSplat", Rotation, SpdX, SpdY); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; ObjPersBall.prototype.Move = function () { with (this) { _parent.Bg[1][Nom]._x = PosX + SpdX; PosX = PosX + SpdX; if (SpdY) { _parent.Bg[1][Nom]._y = PosY + SpdY; PosY = PosY + SpdY; } SetTruePos(); CheckHit(); CheckOut(); } }; ObjPersBall.prototype.Hit = function () { with (this) { if ((Type == "Net") && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { Pers.Etat = "HurtNet"; _global.Snd.playSound("hurtNet", 100, 1, false); CanBeKill = true; } } }; ObjPersBall.prototype.End = function () { with (this) { if (((Type == "Fire") || (Type == "Spark")) && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { CanBeKill = true; } } }; ObjPersBall.prototype.Burn = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckHit = function () { with (this) { if (Type == "Net") { if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Burn"; _global.Game[Pers.CurrentFireID].Etat = "End"; } else if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.Hit))) { Etat = "Hit"; } } if (((Type == "Spark") && (Pers.Etat != "Activate")) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.HitFront))) { Pers.Etat = "Hurt"; Etat = "End"; } if (((Type == "Spark") && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1].FinalHit))) && (G_Medusa.Etat != "Die")) { _global.HUD.increaseScore(10000); _parent.Control.Bg.CamOnMedusa = true; G_Medusa.Etat = "Die"; } } }; ObjPersBall.prototype.CheckOut = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckKill = function () { with (this) { if (CanBeKill == true) { KillBall(); } } }; ObjPersBall.prototype.KillBall = function () { with (this) { if (Tab == G_TabPersBall) { G_TabPersBall.splice(PersBallI, 1); PersBallI = PersBallI - 1; } else if (Tab == G_TabMinionBall) { G_TabMinionBall.splice(MinionBallI, 1); MinionBallI = MinionBallI - 1; } delete _parent.Control[Nom]; _parent.Bg[1][Nom].removeMovieClip(); if (Type == "Fire") { Pers.CurrentFireID = null; } if (Type == "Spark") { G_Medusa.CurrentSparkID = null; } } }; ObjPersBall.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjPersBall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].gotoAndStop(NewAction); } }; ObjPersBall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Etat.play(); } this[Etat](); CheckKill(); } } }; CreerSwitch = function (Nom, PosX, PosY) { if (this[Nom] == null) { this[Nom] = new ObjSwitch(Nom, PosX, PosY); G_TabSwitch.push(Nom); } }; ObjSwitch.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjSwitch.prototype.Idle = function () { with (this) { CheckPersOn(); CheckBoxOn(); CheckSleep(); } }; ObjSwitch.prototype.Baisse = function () { with (this) { if (_parent[Nom].Etat._currentframe >= FrBaisse) { _global.SoundCTRL.playSound("SwitchOn", 100, 0); _parent[Nom].Activate(); Etat = "Active"; } } }; ObjSwitch.prototype.Active = function () { with (this) { CheckSleep(); if (!FlagBoxUse) { CheckRelease(); } } }; ObjSwitch.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { FlagUse = true; Etat = "Baisse"; } } }; ObjSwitch.prototype.CheckBoxOn = function () { with (this) { var Box = Pers.PushedBox; if ((Pers.Etat == "Push") && (Box != 0)) { if (Box.Dir == "G") { if (((((Box.PosX - Box.LgHitG) >= (PosX - LgOnX)) and ((Box.PosX - Box.LgHitG) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Etat = "Baisse"; Activate(); } } else if (Box.Dir == "D") { if (((((Box.PosX + Box.LgHitD) >= (PosX - LgOnX)) and ((Box.PosX + Box.LgHitD) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } else if ((Box.Etat == "LandFin") && (Box != 0)) { if ((((Box.PosX >= (PosX - LgOnX)) and (Box.PosX <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; Box.Dir = ""; _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } }; ObjSwitch.prototype.CheckRelease = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { } else { Etat = "Idle"; FlagUse = false; _parent[Nom].Desactivate(); _global.SoundCTRL.playSound("SwitchOff", 100, 0); } } }; ObjSwitch.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjSwitch.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjSwitch.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjSwitch.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerElevator = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjElevator(l_mcElement, "Y", 0, -1 * l_mcElement.distance); G_TabElevator.push(l_mcElement._name); } }; this.onSwitchLift = function (l_Nom) { with (this) { if (_global.Game[l_Nom + "Lift"].Active == true) { _global.Game[l_Nom + "Lift"].Active = false; _global.Game[l_Nom].Etat = "Idle"; _global.Snd.stopSound("lift"); } else { _global.Game[l_Nom + "Lift"].Active = true; _global.Game[l_Nom].Etat = "IdleActivate"; _global.Snd.playSound("lift", 100, 999, true); } } }; ObjElevator.prototype.Sleep = function () { with (this) { CheckActif(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Idle = function () { with (this) { CheckSleep(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Wait = function () { with (this) { if (frWaitCount >= frWaitTime) { Etat = "Idle"; frWaitCount = 0; } else { frWaitCount++; } } }; ObjElevator.prototype.SetMove = function () { with (this) { CheckPersOn(); CheckLimit(); MoveElevator(); } }; ObjElevator.prototype.MoveElevator = function () { with (this) { this["Pos" + Axis] = this["Pos" + Axis] + this["Move" + Axis]; _parent[Nom]._x = PosX; _parent[Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY; if (PersOn) { Pers["Move" + Axis] = this["Move" + Axis]; Pers.MovePers(); } UpdateLift(); } }; ObjElevator.prototype.UpdateLift = function () { with (this) { var cableH = (this["Pos" + Axis] - Max); mc.Obj.cable1._height = cableH; mc.Obj.cable2._height = cableH; mc._y = mc._y + this["Move" + Axis]; mc._parent[Nom.substr(0, -4)]._y = mc._parent[Nom.substr(0, -4)]._y + this["Move" + Axis]; _global.Game[Nom.substr(0, -4)].PosY = _global.Game[Nom.substr(0, -4)].PosY + this["Move" + Axis]; _global.Game._parent.overlay[Nom + "ramp"]._y = _global.Game._parent.overlay[Nom + "ramp"]._y + this["Move" + Axis]; _global.Game._parent.Bg[1][Nom + "ramp"]._y = _global.Game._parent.Bg[1][Nom + "ramp"]._y + this["Move" + Axis]; } }; ObjElevator.prototype.CheckLimit = function () { with (this) { this["Move" + Axis] = Speed * Dir; if ((Dir == -1) && ((this["Pos" + Axis] + this["Move" + Axis]) <= Max)) { Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = false; CanReposition = true; RepositionCount = 0; Dir = 0; } if ((Dir == 1) && ((this["Pos" + Axis] + this["Move" + Axis]) >= Min)) { CanReposition = false; Dir = -1; Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = true; _global.Game[Nom.substr(0, -4)].Etat = "Idle"; } } }; ObjElevator.prototype.CheckReposition = function () { with (this) { if (CanReposition) { CheckPersOn(); if (!PersOn) { if ((++RepositionCount) == RepositionDelay) { RepositionCount = 0; CanReposition = false; Active = true; Dir = 1; _global.Snd.playSound("lift", 100, 999, true); } } } } }; ObjElevator.prototype.Activate = function () { with (this) { Active = true; } }; ObjElevator.prototype.Desactivate = function () { with (this) { Active = false; } }; ObjElevator.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { PersOn = true; } else { PersOn = false; } } }; ObjElevator.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { Etat = "Idle"; if (Active) { CheckLimit(); MoveElevator(); } } } }; ObjElevator.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjElevator.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjElevator.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLevier = function (Nom, PosX, PosY, listener) { if (this[Nom] == null) { this[Nom] = new ObjLevier(Nom, PosX, PosY, listener); G_TabLevier.push(Nom); } }; ObjLevier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjLevier.prototype.Idle = function () { with (this) { if (Active) { CheckPersOn(); CheckSleep(); } } }; ObjLevier.prototype.IdleActivate = ObjLevier.prototype.Idle; ObjLevier.prototype.Activate = function () { with (this) { if (Pers.ICharacter == 0) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.Etat == "Activate")) && (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes)) { listener(Nom); } } } }; ObjLevier.prototype.CheckPersOn = function () { with (this) { if ((Pers.ICharacter == 0) && (Pers.Etat != "Push")) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.HitGrd == true)) && (Pers.CanBeHit || (Pers.Invincible))) { if (KeyListener.Action) { Pers.canJumpCount = 0; Etat = "Activate"; Pers.Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); } } } else if (((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); } else if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); _global.Game[Pers.CurrentFireID].Etat = "End"; } } }; ObjLevier.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjLevier.prototype.CheckSleep = function () { }; ObjLevier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjLevier.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLadder = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjLadder(l_mcElement); G_TabLadder.push(l_mcElement._name); } }; this.onSwitchLadder = function (l_Nom) { with (this) { _global.Game[l_Nom + "Ladder"].Etat = "Opening"; } }; ObjLadder.prototype.Off = function () { with (this) { } }; ObjLadder.prototype.Opening = function () { with (this) { if (mc.etat._currentframe == mc.etat._totalframes) { Etat = "On"; } } }; ObjLadder.prototype.On = function () { with (this) { CheckPersOn(); } }; ObjLadder.prototype.CheckPersOn = function () { with (this) { if (Pers.ladderDisabledCount >= Pers.ladderDisabledMax) { if (((((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= PosY)) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { if (((Pers.ICharacter == 0) && (Pers.Etat != "Climbing")) && (Pers.Etat != "Hurt")) { if ((KeyListener.Up && (Pers.PosY >= (PosY + 70))) || (KeyListener.Dw && (Pers.PosY <= (PosY + 165)))) { Pers.onLadderID = Nom; Pers.Etat = "Climbing"; Pers.ClimbedDistance = 0; } } } else if ((Pers.Etat == "Climbing") && (Pers.onLadderID == Nom)) { if (Pers.PosX < PosX) { Pers.ChangeDir("G"); } if (Pers.PosX > (PosX + LgOnX)) { Pers.ChangeDir("D"); } Pers.Etat = "Fall"; Pers.onLadderID = null; } } else { Pers.ladderDisabledCount++; } } }; ObjLadder.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjLadder.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerBouncingChair = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBouncingChair(l_mcElement); G_TabChair.push(l_mcElement._name); } }; ObjBouncingChair.prototype.Idle = function () { with (this) { if (CheckPersOn()) { Etat = "Bounce"; if ((Pers.onBouncingID == Nom) && (Pers.HitGrd)) { Pers.onBouncingID = null; } } } }; ObjBouncingChair.prototype.Bounce = function () { with (this) { if (mc.Etat._currentframe == 9) { BouncePers(); } if (mc.Etat._currentframe == mc.Etat._totalframes) { Etat = "Idle"; } } }; ObjBouncingChair.prototype.CheckPersOn = function () { with (this) { if ((((((((Pers.ICharacter == 0) && (Pers.Etat != "Idle")) && (Pers.Etat != "Run")) and (Pers.PosX >= PosX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { return(true); } } }; ObjBouncingChair.prototype.BouncePers = function () { with (this) { if (CheckPersOn()) { Pers.SpdYUp = Pers.SpdYUpBase; if (Pers.onBouncingID != Nom) { Pers.onBouncingID = Nom; Pers.bounceCount = 0; } else { Pers.bounceCount++; if (Pers.bounceCount > 0) { Pers.bounceCount = Pers.bounceCountMax; } Pers.SpdYUp = Pers.SpdYUp - (Pers.bounceCount * 0.34); } Pers.Etat = "JumpStart"; } else if (Pers.HitGrd) { Pers.onBouncingID = null; } } }; ObjBouncingChair.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjBouncingChair.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerHuntSoldier = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntSoldier"; this[l_mcElement._name] = new ObjHuntSoldier(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntSoldier.push(l_mcElement._name); } }; ObjHuntSoldier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntSoldier.prototype.Idle = function () { with (this) { CheckAttack(); CheckShield(); CheckDir(); CheckHurt(); CheckSleep(); } }; ObjHuntSoldier.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Stunned = ObjHuntSoldier.prototype.Hurt; ObjHuntSoldier.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack1 = function () { with (this) { if (((Pers.Etat != "Hurt") && (_parent.Bg[1][Nom].Obj.Etat._currentframe >= 9)) && (_parent.Bg[1][Nom].Obj.Etat._currentframe <= 25)) { if (_parent.Bg[1][Nom].Obj.Etat.wave.hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack2 = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 7) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; _global.Snd.playSound("hurtJake", 100, 1, false); } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjHuntSoldier.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if ((Etat != "Shield") && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { if ((++HurtCount) == 3) { enemyHitScore(); Etat = "Stunned"; HurtCount = 0; } else { Etat = "Hurt"; } if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } } }; ObjHuntSoldier.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjHuntSoldier.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Math.abs(Pers.PosY - PosY) < 180) && (Math.random() < AttackChance)) { if (Math.abs(Pers.PosX - PosX) < 150) { Etat = "Attack2"; } else { Etat = "Attack1"; } AttackDelayCount = 0; } } }; ObjHuntSoldier.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntSoldier.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjHuntSoldier.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntSoldier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjHuntSoldier.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerHuntWindow = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntWindow"; this[l_mcElement._name] = new ObjHuntWindow(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntWindow.push(l_mcElement._name); } }; ObjHuntWindow.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntWindow.prototype.IdleClose = function () { with (this) { CheckCanOpen(); CheckSleep(); } }; ObjHuntWindow.prototype.IdleOpen = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt._currentframe == 1) { _parent.Bg[1][Nom].Obj.Etat.Hunt.gotoAndStop(HuntID); SetHuntEtat("Appear"); if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } } if ((HuntEtat == "Appear") && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { SetHuntEtat("idle"); } if (HuntEtat == "idle") { CheckFlip(); CheckAttack(); } if (((HuntEtat == "disappear") || (HuntEtat == "flee")) && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat.stop(); Etat = "Close"; if (HuntEtat == "flee") { _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = -80; } } if (HuntEtat == "Throw") { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes) { SetHuntEtat("idle"); } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == FrThrow) { var l_dir = "G"; if (HuntID == "A") { l_dir = "D"; } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { if (l_dir == "D") { l_dir = "G"; } else { l_dir = "D"; } } var l_netY = 70; if (PosY < Pers.TrueY) { l_netY = l_netY + (Math.abs(Pers.PosY - TrueY) - 150); } else { l_netY = l_netY - Math.abs(Pers.PosY - TrueY); } if (l_netY > 120) { l_netY = 120; } if (l_netY < 20) { l_netY = 20; } CreerNetBall(PosX, PosY + l_netY, l_dir); _global.Snd.playSound("net", 130, 1, false); } } CheckCanClose(); CheckHurt(); CheckSleep(); } }; ObjHuntWindow.prototype.Open = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleOpen"; AttackDelayCount = AttackDelay * 0.9; } } }; ObjHuntWindow.prototype.Close = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleClose"; _global.Game["G_HuntWindowCurrent" + HuntID] = null; } } }; ObjHuntWindow.prototype.CheckCanOpen = function () { with (this) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == null) { if (_global.Game[("G_Window" + HuntID) + "OpenDelayCount"] >= _global.Game.G_WindowOpenDelay) { if ((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown))) { if (((Pers.ICharacter == 0) && (Math.random() <= OpenChanceJake)) || ((Pers.ICharacter == 1) && (Math.random() <= OpenChanceDragon))) { Etat = "Open"; _global.Game["G_HuntWindowCurrent" + HuntID] = Nom; _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = 0; } } } } } }; ObjHuntWindow.prototype.CheckCanClose = function () { with (this) { if (CloseDelayCount < CloseDelay) { CloseDelayCount++; } else if ((HuntEtat != "disappear") && ((!((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown)))) || ((Pers.ICharacter == 0) && (Math.random() <= CloseChance)))) { if (Math.random() <= OpenChance) { SetHuntEtat("disappear"); CloseDelayCount = 0; } } } }; ObjHuntWindow.prototype.CheckFlip = function () { with (this) { if (FlipDelayCount < FlipDelay) { FlipDelayCount++; } else { if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } FlipDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Pers.ICharacter == 1) && (Math.abs(Pers.PosY - PosY) < 300)) { SetHuntEtat("Throw"); AttackDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckHurt = function () { with (this) { if ((((HuntEtat == "idle") || (HuntEtat == "Throw")) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].Obj.hitTest(_parent.Pers.Obj.HitFront))) { SetHuntEtat("flee"); enemyHitScore(); if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } }; ObjHuntWindow.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "IdleClose"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntWindow.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == Nom) { _global.Game["G_HuntWindowCurrent" + HuntID] = null; } Etat = "Sleep"; } } }; ObjHuntWindow.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntWindow.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.window.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.overlay.gotoAndStop(G_CurrentLevel); } }; ObjHuntWindow.prototype.SetHuntEtat = function (newEtat) { with (this) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.gotoAndStop(newEtat); HuntEtat = newEtat; } }; ObjHuntWindow.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusa = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "Medusa"; this[l_mcElement._name] = new ObjMedusa(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusa.push(l_mcElement._name); } }; ObjMedusa.prototype.Idle = function () { with (this) { CheckAttack(); CheckDir(); CheckHurt(); } }; ObjMedusa.prototype.Captured = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showNextScreen(); } } }; ObjMedusa.prototype.Die = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showWinScreen(); } } }; ObjMedusa.prototype.Laugh = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Attack = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe < FrPrepareAttack) { CheckDir(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrPrepareAttack) { if (Pers.ICharacter == 0) { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 1.5)); } else { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 3)); } NextAttackRotation = Math.round(pointsGetAngle(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY)); var l_dst = pointsGetDistance(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY); var l_step = (l_dst / 20); NextAttackRotationSpdX = (Pers.TrueX - G_Medusa.TrueX) / l_step; NextAttackRotationSpdY = (l_PersY - G_Medusa.TrueY) / l_step; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrAttack) { var l_PosX = PosX; CreerSparkBall(PosX, PosY - 95, Dir, NextAttackRotation, NextAttackRotationSpdX, NextAttackRotationSpdY); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { HasAttacked = true; Etat = "Idle"; } CheckHurt(); } }; ObjMedusa.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjMedusa.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Laugh"; } } } }; ObjMedusa.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjMedusa.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if (Math.random() < AttackChance) { Etat = "Attack"; HasAttacked = false; AttackDelayCount = 0; } } }; ObjMedusa.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjMedusa.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjMedusa.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjMedusa.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusaSister = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "MedusaSister"; this[l_mcElement._name] = new ObjMedusaSister(l_mcElement, Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusaSister.push(l_mcElement._name); } }; ObjMedusaSister.prototype.UpdateSister = function (SisterID) { with (this) { if (CurrentSister == SisterID) { mc[SisterID].gotoAndStop(CurrentAction); } else { mc[SisterID].gotoAndStop("Idle"); } } }; ObjMedusaSister.prototype.UpdatePosition = function () { with (this) { var l_maxOffset = 70; var l_posX = Math.abs(_parent.Control.Bg.PosX); mc._x = -((l_posX / 450) * l_maxOffset); mc._y = mc._y + (_global.MoveY / 2.5); if (mc._y < 145) { mc._y = 145; } } }; ObjMedusaSister.prototype.UpdateAttack = function () { with (this) { if ((CurrentAction == "Idle") && (!MedusaAttack)) { if ((++AttackDelayCount) == AttackDelay) { if (CurrentSister == "SisterLeft") { CurrentSister = "SisterRight"; } else { CurrentSister = "SisterLeft"; } CurrentAction = "Charge"; AttackDelayCount = 0; } } else if (CurrentAction == "Charge") { if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { var PersY = Math.abs(_global.Game.Pers.PosY); switch (true) { case PersY < 100 : CurrentAction = "Attack3"; break; case PersY < 250 : CurrentAction = "Attack2"; break; case PersY >= 250 : CurrentAction = "Attack1"; } } } else if (((CurrentAction == "Attack1") || (CurrentAction == "Attack2")) || (CurrentAction == "Attack3")) { if (mc[CurrentSister].Etat._currentframe == 9) { if ((Pers.Etat != "Activate") && (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Pers))) { Pers.Etat = "Hurt"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna1)) { _global.Game.Antenna1.Etat = "Charged"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna2)) { _global.Game.Antenna2.Etat = "Charged"; } } if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { CurrentAction = "Idle"; if (CurrentSister == "SisterRight") { MedusaAttack = true; G_Medusa.HasAttacked = false; } } } if (!MedusaAttack) { G_Medusa.AttackDelayCount = 0; } else if (G_Medusa.HasAttacked) { MedusaAttack = false; } } }; ObjMedusaSister.prototype.Actions = function () { with (this) { UpdatePosition(); UpdateAttack(); UpdateSister("SisterLeft"); UpdateSister("SisterRight"); } }; CreerWall = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjWall(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabWall.push(l_mcElement._name); } }; ObjWall.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjWall.prototype.Idle = function () { with (this) { CheckHurt(); CheckSleep(); } }; ObjWall.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrRemoveWallHit) { _parent.Collider.Wall[Nom].removeMovieClip(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Out"; } } }; ObjWall.prototype.CheckHurt = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjWall.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjWall.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjWall.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjWall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.wall.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.wall.gotoAndStop(G_CurrentLevel); } }; ObjWall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerDragonObstacle = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjDragonObstacle(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabDragonObstacle.push(l_mcElement._name); } }; ObjDragonObstacle.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjDragonObstacle.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjDragonObstacle.prototype.Hit = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.HitBoss = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 4) { _global.Game.Web.Etat = "Fall"; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.Fall = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == (_parent.Bg[1][Nom].Obj.Etat._totalframes - 1)) { G_Medusa.Etat = "Captured"; } } }; ObjDragonObstacle.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _parent.Bg[1][Nom].Obj.Etat.stop(); } } }; ObjDragonObstacle.prototype.CheckHit = function () { with (this) { if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitTop) || (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitBottomFront)))) { Pers.Etat = "Hurt"; Etat = "Hit"; Pers.InvincibleEnd(); Pers.MoveY = 40; } } }; ObjDragonObstacle.prototype.CheckActif = function () { with (this) { if (_global.boss || (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep"))) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjDragonObstacle.prototype.CheckSleep = function () { with (this) { if (((((!_global.boss) && (PosX < (Bg.InvPosX - LgOutG))) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjDragonObstacle.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjDragonObstacle.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjDragonObstacle.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerAntenna = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjAntenna(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabAntenna.push(l_mcElement._name); } }; ObjAntenna.prototype.Idle = function () { with (this) { CheckHit(); } }; ObjAntenna.prototype.Charged = function () { with (this) { CheckHit(); if ((++ChargedCount) == ChargedDelay) { Etat = "Idle"; ChargedCount = 0; } } }; ObjAntenna.prototype.CheckHit = function () { with (this) { if ((G_Medusa.CurrentSparkID != null) && (Pers.Etat != "Hurt")) { if (_parent.Bg[1][Nom].Obj.Hit.hitTest(_parent.Bg[1][G_Medusa.CurrentSparkID])) { Etat = "Charged"; ChargedCount = 0; if ((_global.level == 1) && (_global.Game.Web.Etat != "Fall")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Web.Etat = "Fall"; _global.HUD.increaseScore(1000); } if ((((_global.level == 2) && (_global.Game.Antenna1.Etat == "Charged")) && (_global.Game.Antenna2.Etat == "Charged")) && (_global.Game.Wire.Etat != "HitBoss")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Wire.Etat = "HitBoss"; _global.HUD.increaseScore(2000); } } } } }; ObjAntenna.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjAntenna.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if (Etat == "Charged") { _global.Snd.playSound("antenna", 250, 1, false); } _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjAntenna.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerBonus = function (type, l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBonus(type, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabBonus.push(l_mcElement._name); } }; ObjBonus.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjBonus.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBonus.prototype.CheckHit = function () { with (this) { if (((Pers.ICharacter == 0) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj))) || ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.Hit)))) { switch (Type) { case "Score" : _global.Score = _global.Score + 500; _global.Snd.playSound("energy", 200, 1, false); _global.HUD.increaseScore(500); break; case "Life" : if (_global.lives < 3) { _global.lives++; } _global.Snd.playSound("life", 200, 1, false); _global.HUD.increaseScore(200); break; case "Energy" : _global.energy = _global.energy + 50; if (_global.energy > 100) { _global.energy = 100; } _global.Snd.playSound("bonus", 300, 1, false); _global.HUD.increaseScore(200); break; case "Power" : _global.dragonPower = 100; _global.Snd.playSound("power", 300, 1, false); _global.HUD.increaseScore(200); } KillBonus(); } } }; ObjBonus.prototype.KillBonus = function () { with (this) { G_TabBonus.splice(BonusI, 1); BonusI = BonusI - 1; delete _parent.Control[Nom]; _parent.Bg[1][Nom].swapDepths(90210); _parent.Bg[1][Nom].removeMovieClip(); } }; ObjBonus.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { Etat = "Idle"; } } }; ObjBonus.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjBonus.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjBonus.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); CheckKill(); } } }; this.cnt = 0; this.G_CurrentLevel = _global.level; switch (G_CurrentLevel) { case 1 : this.G_MaxEnemyHit = 28; break; case 2 : this.G_MaxEnemyHit = 28; break; case 3 : this.G_MaxEnemyHit = 38; } G_MaxEnemyHitCount = 0; this.G_Pause = true; this.G_PauseOut = false; this.G_PRealese = true; this.G_Resume = false; this.G_TabBox = new Array(); this.G_TabSwitch = new Array(); this.G_TabDoor = new Array(); this.G_TabElevator = new Array(); this.G_TabPersBall = new Array(); this.G_TabLevier = new Array(); this.G_TabLadder = new Array(); this.G_TabChair = new Array(); this.G_TabHuntSoldier = new Array(); this.G_TabHuntWindow = new Array(); this.G_TabMedusa = new Array(); this.G_TabMedusaSister = new Array(); this.G_TabWall = new Array(); this.G_TabDragonObstacle = new Array(); this.G_TabAntenna = new Array(); this.G_TabBonus = new Array(); this.G_NextPersBall = 1; this.G_NextPersBallDepth = 10000; this.G_NextMinionBall = 1; this.G_NextMinionBallDepth = 20000; this.G_OverlayDepth = 0; this.G_HuntWindowCurrentA = null; this.G_HuntActiveSinceA = 0; this.G_HuntWindowCurrentB = null; this.G_HuntActiveSinceB = 0; this.G_AlphaZones = new Array(); this.G_Medusa = null; this.G_WindowOpenDelay = 20; this.G_WindowAOpenDelayCount = 0; this.G_WindowBOpenDelayCount = 0; this.addAlphaZone = function (mc) { if (_global.Packaging.bShadowDisabled) { mc._visible = false; } }; this.resetLevel = function () { _global.dragonPower = 100; _global.energy = 100; if (_global.boss) { _global.resetDestination = "Game_BOSS" + _global.level; } else { _global.resetDestination = "Game_LEVEL" + _global.level; } _parent._parent.gotoAndStop("Reset"); }; this.bossStart = function () { _global.boss = true; _global.resetDestination = "Game_BOSS" + _global.level; _parent._parent.gotoAndStop("Reset"); }; this.enemyHitScore = function () { if ((++G_MaxEnemyHitCount) < G_MaxEnemyHit) { _global.HUD.increaseScore(100); } }; this.Creer_PBalcony = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + l_mcElement._parent._y; CreerPlateforme(pt, 235); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PRoofTop = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; var pt = new Object(); pt = {x:l_mcElement._x - 5, y:l_mcElement._y + 95}; var mcCeil = _parent.Collider.Ceil; mcCeil.moveTo(pt.x, pt.y); mcCeil.beginFill(16711935); pt.x = pt.x + 115; pt.y = pt.y - 70; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x + 115; pt.y = pt.y + 70; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y - 80; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x - 230; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y + 80; mcCeil.lineTo(pt.x, pt.y); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBalconyOpen = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + (l_mcElement._parent._y + 10); CreerPlateforme(pt, 235); if (l_mcElement.flipped) { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01OverlayFlip", {x:pt.x + 32, y:pt.y}, true); CreerObstacle({x:pt.x + 19, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); } else { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01Overlay", {x:pt.x + 120, y:pt.y + 0.5}, true); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 195, y:pt.y}, 15, 15); } _parent.overlay[l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); _parent.Bg[1][l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBox = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; 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; CreerPlateforme(pt, 70); CreerObstacle(pt, 70, 70); } }; this.CheckVisible = function () { if ((this._y < (Bg.InvPosY - Stage.height)) or (this._y > (Bg.InvPosY + Stage.height))) { this._visible = false; } else { this._visible = true; } }; 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.CreerObstacleDragon = function (pt, l_nWidth, l_nHeight) { var _local3 = _parent.Collider.Dragon; pt.x = Math.round(pt.x); pt.y = Math.round(pt.y); _local3.moveTo(pt.x, pt.y); _local3.beginFill(16776960); _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.CreerOverlay = function (id, linkage, pt, bReversed) { var _local4; var _local5; _local5 = _parent.overlay.attachMovie(linkage, id, G_OverlayDepth++); _local5._x = pt.x; _local5._y = pt.y; _local4 = _parent.Bg[1].attachMovie(linkage, id, G_OverlayDepth++); _local4._x = pt.x; _local4._y = pt.y; _local4.overlay = _local5; if (!bReversed) { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = false; this.overlay._visible = true; } else { this._visible = true; this.overlay._visible = false; } }; } else { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = true; this.overlay._visible = false; } else { this._visible = false; this.overlay._visible = true; } }; } }; this.replaceTile = function (l_mcElement) { var _local1 = l_mcElement._name; var _local2 = 1499; if (_local1.slice(0, 8) == "instance") { } else { l_mcElement._x = 0; l_mcElement._y = -((Number(_local1) - 1) * _local2); } }; this.CreerFloor = function (l_nPosX, l_nPosY, l_nWidth, l_nHeight) { var mcGround = _parent.Collider.Sol; with (this) { pt = new Object(); pt = {x:l_nPosX, y:l_nPosY}; pt.y = pt.y - l_nHeight; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor1 = 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 + -60; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloorBoss = 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 + -88; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor2a = 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 + 120; 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); pt.x = pt.x + 360; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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); } }; } onClipEvent (enterFrame) { BoxI = 0; for (BoxI in G_TabBox) { var BoxActif = G_TabBox[BoxI]; if (this[BoxActif].Etat != this[BoxActif].EtatOld) { this[BoxActif].ChangeEtat(this[BoxActif].Etat); } this[BoxActif].Actions(); } PersBallI = 0; for (PersBallI in G_TabPersBall) { var PersBallActif = G_TabPersBall[PersBallI]; if (this[PersBallActif].Etat != this[PersBallActif].EtatOld) { this[PersBallActif].ChangeEtat(this[PersBallActif].Etat); } this[PersBallActif].Actions(); } LevierI = 0; for (LevierI in G_TabLevier) { var LevierActif = G_TabLevier[LevierI]; if (this[LevierActif].Etat != this[LevierActif].EtatOld) { this[LevierActif].ChangeEtat(this[LevierActif].Etat); } this[LevierActif].Actions(); } LadderI = 0; for (LadderI in G_TabLadder) { var LadderActif = G_TabLadder[LadderI]; if (this[LadderActif].Etat != this[LadderActif].EtatOld) { this[LadderActif].ChangeEtat(this[LadderActif].Etat); } this[LadderActif].Actions(); } ChairI = 0; for (ChairI in G_TabChair) { var ChairActif = G_TabChair[ChairI]; if (this[ChairActif].Etat != this[ChairActif].EtatOld) { this[ChairActif].ChangeEtat(this[ChairActif].Etat); } this[ChairActif].Actions(); } ElevatorI = 0; for (ElevatorI in G_TabElevator) { var ElevatorActif = G_TabElevator[ElevatorI]; if (this[ElevatorActif].Etat != this[ElevatorActif].EtatOld) { this[ElevatorActif].ChangeEtat(this[ElevatorActif].Etat); } this[ElevatorActif].Actions(); } I = 0; for (HuntSoldierI in G_TabHuntSoldier) { var HuntSoldierActif = G_TabHuntSoldier[HuntSoldierI]; if (this[HuntSoldierActif].Dir != this[HuntSoldierActif].DirOld) { this[HuntSoldierActif].ChangeDir(this[HuntSoldierActif].Dir); } if (this[HuntSoldierActif].Etat != this[HuntSoldierActif].EtatOld) { this[HuntSoldierActif].ChangeEtat(this[HuntSoldierActif].Etat); } this[HuntSoldierActif].Actions(); } I = 0; for (HuntWindowI in G_TabHuntWindow) { var HuntWindowActif = G_TabHuntWindow[HuntWindowI]; if (this[HuntWindowActif].Dir != this[HuntWindowActif].DirOld) { this[HuntWindowActif].ChangeDir(this[HuntWindowActif].Dir); } if (this[HuntWindowActif].Etat != this[HuntWindowActif].EtatOld) { this[HuntWindowActif].ChangeEtat(this[HuntWindowActif].Etat); } this[HuntWindowActif].Actions(); } if (!G_Pause) { if (_global.Game.G_HuntWindowCurrentA == null) { _global.Game.G_WindowAOpenDelayCount++; } if (_global.Game.G_HuntWindowCurrentB == null) { _global.Game.G_WindowBOpenDelayCount++; } } I = 0; for (MedusaI in G_TabMedusa) { var MedusaActif = G_TabMedusa[MedusaI]; if (this[MedusaActif].Dir != this[MedusaActif].DirOld) { this[MedusaActif].ChangeDir(this[MedusaActif].Dir); } if (this[MedusaActif].Etat != this[MedusaActif].EtatOld) { this[MedusaActif].ChangeEtat(this[MedusaActif].Etat); } this[MedusaActif].Actions(); } I = 0; for (WallI in G_TabWall) { var WallActif = G_TabWall[WallI]; if (this[WallActif].Dir != this[WallActif].DirOld) { this[WallActif].ChangeDir(this[WallActif].Dir); } if (this[WallActif].Etat != this[WallActif].EtatOld) { this[WallActif].ChangeEtat(this[WallActif].Etat); } this[WallActif].Actions(); } I = 0; for (DragonObstacleI in G_TabDragonObstacle) { var DragonObstacleActif = G_TabDragonObstacle[DragonObstacleI]; if (this[DragonObstacleActif].Dir != this[DragonObstacleActif].DirOld) { this[DragonObstacleActif].ChangeDir(this[DragonObstacleActif].Dir); } if (this[DragonObstacleActif].Etat != this[DragonObstacleActif].EtatOld) { this[DragonObstacleActif].ChangeEtat(this[DragonObstacleActif].Etat); } this[DragonObstacleActif].Actions(); } I = 0; for (AntennaI in G_TabAntenna) { var AntennaActif = G_TabAntenna[AntennaI]; if (this[AntennaActif].Dir != this[AntennaActif].DirOld) { this[AntennaActif].ChangeDir(this[AntennaActif].Dir); } if (this[AntennaActif].Etat != this[AntennaActif].EtatOld) { this[AntennaActif].ChangeEtat(this[AntennaActif].Etat); } this[AntennaActif].Actions(); } I = 0; for (MedusaSisterI in G_TabMedusaSister) { var MedusaSisterActif = G_TabMedusaSister[MedusaSisterI]; if (this[MedusaSisterActif].Dir != this[MedusaSisterActif].DirOld) { this[MedusaSisterActif].ChangeDir(this[MedusaSisterActif].Dir); } if (this[MedusaSisterActif].Etat != this[MedusaSisterActif].EtatOld) { this[MedusaSisterActif].ChangeEtat(this[MedusaSisterActif].Etat); } this[MedusaSisterActif].Actions(); } I = 0; for (BonusI in G_TabBonus) { var BonusActif = G_TabBonus[BonusI]; if (this[BonusActif].Dir != this[BonusActif].DirOld) { this[BonusActif].ChangeDir(this[BonusActif].Dir); } if (this[BonusActif].Etat != this[BonusActif].EtatOld) { this[BonusActif].ChangeEtat(this[BonusActif].Etat); } this[BonusActif].Actions(); } if (Pers.Dir != Pers.DirOld) { Pers.ChangeDir(Pers.Dir); } if (Pers.Etat != Pers.EtatOld) { Pers.setState(Pers.Etat); } this.Pers.Actions(); this.Bg.Actions(); _global.HUD.update(); G_CheckPause(); }
Symbol 1230 MovieClip Frame 2
stop(); _global.C.beginLevel();
Instance of Symbol 1229 MovieClip "Bg" in Symbol 1230 MovieClip Frame 2
onClipEvent (load) { this._x = 0; this._y = 0; _parent.Control.CreerBg(_parent._x, _parent._y); BG = _parent.Control.Bg; for (var i in _parent.Bg) { if (Number(_parent.Bg[i]._name) <= 20) { _parent.Bg[i].gotoAndStop(2); } else { _parent.Bg[i].gotoAndStop(3); } } BG.MaxDw1 = 6175; BG.MaxUp1 = -200; BG.MaxG1 = 0; BG.MaxD1 = 0; BG.ParallaxRateSky = 1.1; BG.ParallaxRateCity = 1.05; BG.CheckScreen = function () { with (this) { MaxDw = MaxDw1; MaxUp = MaxUp1; MaxG = MaxG1; MaxD = MaxD1; } }; }
Instance of Symbol 1150 MovieClip "Pers" in Symbol 1230 MovieClip Frame 2
onClipEvent (load) { _parent.Control.CreerPers(this._x, this._y, "Jake"); this.gotoAndStop("D"); _global.Game.Pers.Etat = "Sleep"; _global.Game.Pers.setState("Idle"); }
Instance of Symbol 1154 MovieClip "Collider" in Symbol 1230 MovieClip Frame 2
onClipEvent (load) { this._visible = 0; }
Symbol 1257 MovieClip Frame 1
stop();
Symbol 1257 MovieClip Frame 10
stop();
Symbol 1258 MovieClip Frame 2
_parent._parent._parent.Control.CreerDragonObstacle(this); stop();
Symbol 1303 MovieClip Frame 41
_global.Snd.playSound("laser", 100, 1, false);
Symbol 1337 MovieClip Frame 1
_global.Snd.playSound("finalZap", 250, 1, false);
Symbol 1337 MovieClip Frame 87
stop();
Symbol 1354 MovieClip Frame 1
_global.Snd.playSound("hurtNet", 250, 1, false);
Symbol 1354 MovieClip Frame 61
stop();
Symbol 1359 MovieClip Frame 1
stop();
Symbol 1359 MovieClip Frame 11
stop();
Symbol 1359 MovieClip Frame 21
stop();
Symbol 1359 MovieClip Frame 31
stop();
Symbol 1359 MovieClip Frame 40
stop();
Symbol 1359 MovieClip Frame 50
stop();
Symbol 1360 MovieClip Frame 2
_parent._parent._parent.Control.CreerMedusa(this);
Symbol 1360 MovieClip Frame 3
stop();
Symbol 1360 MovieClip Frame 15
stop();
Symbol 1370 MovieClip Frame 1
stop();
Symbol 1370 MovieClip Frame 11
stop();
Symbol 1371 MovieClip Frame 2
_parent._parent._parent.Control.CreerAntenna(this); stop();
Symbol 1372 MovieClip Frame 1
stop();
Instance of Symbol 1202 MovieClip in Symbol 1372 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1372 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1372 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "moveable", "D"); }
Symbol 1372 MovieClip Frame 2
_parent._parent.Control.CreerFloorBoss(this, this._x, this._y); stop();
Symbol 1373 MovieClip Frame 2
stop();
Instance of Symbol 560 MovieClip "Control" in Symbol 1374 MovieClip Frame 1
onClipEvent (load) { function ObjBg(PosX, PosY) { this.Nom = "Bg"; this.PosX = PosX; this.PosY = PosY; this.ParallaxPosX = 0; this.ParallaxPosY = 0; this.ParallaxSkyPosX = 0; this.ParallaxSkyPosY = 0; this.ParallaxCityPosX = 0; this.ParallaxCityPosY = 0; this.ParallaxRateSky = 1.2; this.ParallaxRateCity = 1.1; this.MoveX = 0; this.MoveY = 0; this.MaxDw = 0; this.MaxUp = 0; this.MaxG = 0; this.MaxD = 0; this.InvPosX = PosX * -1; this.InvPosY = PosY * -1; this.DeadX = PosX; this.DeadY = PosY; this.CurrentScreen = 1; this.OldScreen = 0; this.MaxYDie = 5000; this.CenterX = 300; this.CenterY = 370; this.SpdXD = 15; this.SpdXG = -15; this.SpdYDw = 20; this.SpdYUp = -20; this.SpdYUpForce = 0; this.InPause = false; this.NoCamUpdate = false; this.CamOnMedusa = false; } function ObjBox(Nom, PosX, PosY, Type, Dir) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.MoveX = 0; this.MoveY = 0; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 75; this.LgOutD = 525; this.LgOutUp = 25; this.LgOutDw = 475; this.LgHitG = 34; this.LgHitD = 35; this.LgHitUp = 25; this.LgHitDw = 26; this.HitRightX; this.HitLeftX; this.PushDir = Dir; this.Dir = Pers.Dir; if (Dir == "D") { _parent.Bg[1][Nom]._xscale = -100; } this.FlagUse = false; this.LandSide = "Center"; this.MinionBlock = 0; this.Etat = "Wait"; this.EtatOld = "Sleep"; this.FixedFlag = false; _parent.Collider.Sol.attachMovie("TopBox", Nom, _parent.Collider.Sol.getNextHighestDepth()); _parent.Collider.Wall.attachMovie("BorderBox", Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Ceil.attachMovie("BottomBox", Nom, _parent.Collider.Ceil.getNextHighestDepth()); this.frTurn = 20; this.SoundPush = false; this.WebDestroyed = false; this.MoveBox(); } function ObjPers(PosX, PosY, Perso) { this.nGetHitLeft = 0; this.nGetHitRight = 0; this.nGetHitTop = 0; 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.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.SpdYUpBase = 1.7; this.SpdYUp = this.SpdYUpBase; this.SpdYMax = 30; this.SpdYFall = 2.2; this.SpdYFly = 5; this.SpdXHitBase = 0; this.SpdYHitBase = -4; this.SpdStartJump = -17; this.SolOut = 2; this.SolHitMin = 5; this.MaxSol = 3; this.HitGrd = false; this.SolForJump = 6; this.DistYFall = 0; this.DistYFallMax = 900; this.autoSwitchDragon = false; this.DistYLand = 80; this.CanHit = false; this.CanBeHit = true; this.FrWalkNow = 1; this.InPause = false; this.FrJump = 1; this.FrFall = 1; this.FrLand = 13; this.FrGetHit = 7; this.FrGetHitCount = 0; this.FrBoomTir = 9; this.FrFinBoom = 6; this.FrDead = 20; this.FrDeadCount = 0; this.aCharacter = ["Jake", "Dragon"]; this.ICharacter = 0; this.Perso = this.aCharacter[this.ICharacter]; this.updatePerso(); this.LgGetShootX = 20; this.LgGetShootUp = 72; this.LgGetShootUpBas = 44; this.FrInvincibleCount = 0; this.FrInvincible = 20; this.Invincible = false; this.FrSwitchCharacter = 15; this.FrSwitchCharacterCount = 0; this.bCanSwitch = true; 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.nDragonPowerRythm = 25; this.nDragonPowerCount = 0; this.DragonHitTop = 0; this.DragonHitBottom = 0; this.DragonHeight = 130; this.onLadderID = null; this.ClimbedDistance = 0; this.ladderDisabledMax = 15; this.ladderDisabledCount = this.ladderDisabledMax; this.onBouncingID = null; this.bounceCount = 0; this.bounceCountMax = 3; this.bouncingDisabledMax = 15; this.bouncingDisabledCount = this.bouncingDisabledMax; this.bHitAttack = false; this.FrShootFire = 15; this.FrAttackTailHit = 9; this.CurrentFireID = null; if (_global.boss) { this.WaitForActions = true; } else { this.WaitForActions = false; } } function ObjPersBall(Type, Nom, PosX, PosY, Dir, HitBullet, Speed, Tab, HitSound, Rotation, SpdX, SpdY) { this.Nom = Nom; this.Type = Type; this.HitSound = HitSound; this.Tab = Tab; this.Etat = "Move"; this.EtatOld = "Idle"; this.Dir = Dir; this.OldDir = "D"; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 50; this.LgOutD = 600; this.LgOutUp = 0; this.LgOutDw = 500; this.CanBeKill = false; if (Dir == "D") { this.SpdX = Speed; } else { this.SpdX = -1 * Speed; _parent.Bg[1][Nom]._xscale = -100; } this.InPause = false; this.FrHit = HitBullet; this.FrHide = 1; if (Type == "Fire") { Pers.CurrentFireID = Nom; } if (Type == "Spark") { G_Medusa.CurrentSparkID = Nom; this.LgOutG = 1100; this.LgOutD = 1100; _parent.Bg[1][Nom]._xscale = -100; _parent.Bg[1][Nom]._rotation = Rotation; this.SpdX = SpdX; this.SpdY = SpdY; } } function ObjSwitch(Nom, PosX, PosY) { this.Nom = Nom; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 20; this.LgOnY = 20; this.PosX = PosX; this.PosY = PosY; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrBaisse = 13; } function ObjElevator(mc, Axis, Min, Max) { this.Nom = mc._name; this.mc = mc; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 750; this.LgOutG = 200; this.LgOutUp = 500; this.LgOutDw = 900; this.Speed = 2; this.frWaitCount = 0; this.frWaitTime = 30; this.LgOnX = 200; this.LgOnY = 25; this.PersOn = false; this.MoveX = 0; this.MoveY = 0; this.PosX = mc._x + 40; this.PosY = mc._y + 140; this.Axis = Axis; this.Min = this["Pos" + Axis] + Min; this.Max = this["Pos" + Axis] + Max; this.Active = false; this.InPause = false; this.Dir = -1; this.CanReposition = false; this.RepositionCount = 0; this.RepositionDelay = 30; _parent.Collider.Sol.attachMovie("GroundElevator", this.Nom, _parent.Collider.Sol.getNextHighestDepth()); _global.Game.CreerOverlay(mc._name + "ramp", "AM_RampeAscenseur01_overlay", {x:mc._x, y:mc._y + 140}); this.MoveElevator(); } function ObjLevier(Nom, PosX, PosY, listener) { this.Nom = Nom; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 30; this.LgOnY = 100; this.PosX = PosX; this.PosY = PosY; this.PersYCorrection = 60; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrFinLevelCount = 0; this.FrFinLevel = 70; this.Active = true; this.listener = listener; } function pointsGetAngle(l_x1, l_y1, l_x2, l_y2) { var _local4 = 0; var _local3 = 0; var _local1 = 0; var _local2 = 0; _local4 = (l_x1 - l_x2) * -1; _local3 = (l_y1 - l_y2) * -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); } function pointsGetDistance(l_x1, l_y1, l_x2, l_y2) { var _local1 = Math.sqrt(Math.pow(Math.abs(l_x2 - l_x1), 2) + Math.pow(Math.abs(l_y2 - l_y1), 2)); return(_local1); } function ObjLadder(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.obj; this.Etat = "Off"; this.EtatOld = "Off"; this.LgOnX = 70; this.LgOnY = 265; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; } function ObjBouncingChair(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.Obj; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOnX = 70; this.LgOnY = 50; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; _global.Game.CreerPlateforme({x:this.PosX, y:this.PosY}, 73); } function ObjHuntSoldier(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 115; this.AttackDelayCount = 0; this.AttackChance = 0.03; this.ShieldChance = 0.25; this.HurtCount = 0; } function ObjHuntWindow(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "IdleClose"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 450; this.LgOutDw = 450; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.AttackDelay = 100; this.AttackDelayCount = 0; if (PosX < 150) { this.HuntID = "A"; this.FlipPosition = 20; } else { this.HuntID = "B"; this.FlipPosition = -20; } this.OpenRangeDown = 450; this.OpenRangeUp = -20; this.OpenChanceDragon = 0.85; this.OpenChanceJake = 0.1; this.HuntEtat = "idle"; this.AttackDelay = 100; this.AttackDelayCount = 0; this.AttackChance = 0.85; this.FlipDelay = 10; this.FlipDelayCount = 0; this.CloseDelay = 100; this.closeDelayCount = 0; this.CloseChance = 0.5; this.FrThrow = 11; } function ObjMedusa(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -60; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSparkID = null; this.HasAttacked = false; G_Medusa = this; _global.Medusa = this; } function ObjMedusaSister(mc, Type, Nom, PosX, PosY) { this.mc = mc; this.Nom = Nom; this.Perso = Type; this.Etat = "Idle"; this.EtatOld = "Idle"; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -110; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSister = "SisterRight"; this.CurrentAction = "Idle"; this.MedusaAttack = false; } function ObjWall(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; _parent.Collider.Wall.attachMovie("WallHit", this.Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Wall[Nom]._x = PosX; _parent.Collider.Wall[Nom]._y = PosY; this.FrRemoveWallHit = 4; } function ObjDragonObstacle(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; } function ObjAntenna(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.ChargedDelay = 300; this.ChargedCount = 0; } function ObjBonus(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.CanBeKill = false; } _global.Game = this; this.KeyListener = new com.sarbakan.utils.KeyManager(); KeyListener.addKeyListener(39, "R"); KeyListener.addKeyListener(37, "L"); KeyListener.addKeyListener(40, "Dw"); KeyListener.addKeyListener(38, "Up"); KeyListener.addKeyListener(32, "Dragon"); KeyListener.addKeyListener(66, "Attack"); KeyListener.addKeyListener(78, "Action"); 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(); } } } }; CreerBg = function (PosX, PosY) { this.Bg = new ObjBg(PosX, PosY); }; ObjBg.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } CheckScreen(); if (!NoCamUpdate) { ScrollBg(); } } } }; ObjBg.prototype.ScrollBg = function () { with (this) { if (CamOnMedusa) { Pers.TrueX = _global.Medusa.TrueX; Pers.TrueY = _global.Medusa.TrueY; } if ((PosY <= MaxDw) and (PosY >= MaxUp)) { if (Pers.TrueX > (CenterX + 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else { if ((CenterX - Pers.TrueX) > SpdXG) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXG; } if ((PosX + MoveX) < MaxG) { MoveX = MaxG - PosX; } } } else if (Pers.TrueX < (CenterX - 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } else { if ((CenterX - Pers.TrueX) < SpdXD) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXD; } if ((PosX + MoveX) > MaxD) { MoveX = MaxD - PosX; } } } else { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } } } if ((PosX <= MaxD) and (PosX >= MaxG)) { if (Pers.TrueY > (CenterY + 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxUp - PosY; } else { MoveY = SpdYDw; } } else { if ((CenterY - Pers.TrueY) > SpdYUp) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYUp; } if ((PosY + MoveY) < MaxUp) { MoveY = MaxUp - PosY; } } } else if (Pers.TrueY < (CenterY - 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } else { if ((CenterY - Pers.TrueY) < SpdYDw) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYDw; } if ((PosY + MoveY) > MaxDw) { MoveY = MaxDw - PosY; } } } else { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxDw - PosY; } else { MoveY = SpdYDw; } } else if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } } } _parent._x = Math.floor(_parent._x + MoveX); PosX = _parent._x; InvPosX = PosX * -1; MoveX = 0; _parent._y = Math.floor(_parent._y + MoveY); PosY = _parent._y; InvPosY = PosY * -1; _global.MoveY = MoveY; MoveY = 0; _parent.ParallaxSky._y = (Math.floor(_parent._y / (-ParallaxRateSky)) + 350) + 30; ParallaxSkyPosY = _parent.ParallaxSky._y; _parent.ParallaxCity._y = (Math.floor(_parent._y / (-ParallaxRateCity)) + 140) + 30; ParallaxCityPosY = _parent.ParallaxCity._y; } }; CreerBox = function (Nom, PosX, PosY, Type, Dir) { if (this[Nom] == null) { this[Nom] = new ObjBox(Nom, PosX, PosY, Type, Dir); G_TabBox.push(Nom); } }; ObjBox.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBox.prototype.Wait = function () { with (this) { if (Type == "moveable") { CheckPush(); } CheckHitGrd(); CheckSleep(); CheckFall(); if (Type == "destroyable") { CheckDestroy(); } } }; ObjBox.prototype.Fall = function () { with (this) { CheckHitGrd(); SetSpdFall(); MoveBox(); if (((Nom == "BoxDestroyWeb") && (!WebDestroyed)) && (TrueY > 350)) { _global.Game.WebDestroyable.Etat = "Destroy"; WebDestroyed = true; } } }; ObjBox.prototype.Land = function () { with (this) { CheckHitGrd(); SetSpdLand(); MoveBox(); if ((TrueX > 0) && (TrueX < 500)) { _global.SoundCTRL.playSound("BoxLand", 100, 0); } } }; ObjBox.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe >= _parent.Bg[1][Nom].Etat._totalframes) { _parent.Bg[1][Nom].Etat.stop(); _parent.Collider.Sol[Nom].removeMovieClip(); _parent.Collider.Ceil[Nom].removeMovieClip(); _parent.Collider.Wall[Nom].removeMovieClip(); } } }; ObjBox.prototype.LandFin = function () { with (this) { Etat = "Wait"; Pers.PushedBox = 0; } }; ObjBox.prototype.Fixed = function () { with (this) { CheckSleep(); } }; ObjBox.prototype.CheckPush = function () { with (this) { if (Pers.Etat == "Push") { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.PushPoint)) { Dir = Pers.Dir; if (Dir == "D") { this.MoveX = 2; } else if (Dir == "G") { this.MoveX = -2; } CheckWall(); if (Pers.Dir != PushDir) { MoveX = 0; } MoveBox(); Pers.PushedBox = this; if (MoveX != 0) { _global.Snd.playSound("push", 100, 999, true); } } } else { _global.Snd.stopSound("push"); } } }; ObjBox.prototype.CheckDestroy = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjBox.prototype.CheckHitGrd = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (_parent.Collider.Sol.hitTest(HitX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitRightX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitLeftX, HitY, true)) { HitGrd = true; } else { HitGrd = false; } } }; ObjBox.prototype.SetSpdFall = function () { with (this) { MaxMoveY = 15; MoveY = MoveY + 5; if (MoveY > MaxMoveY) { MoveY = MaxMoveY; } aCheckPoint = [TrueX, HitLeftX, HitRightX]; for (CheckPointI in aCheckPoint) { var activePointX = aCheckPoint[CheckPointI]; if (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 2), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 4), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } } } }; ObjBox.prototype.SetSpdLand = function () { with (this) { while ((_parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true) || (_parent.Collider.Sol.hitTest(HitLeftX, TrueY + MoveY, true))) || (_parent.Collider.Sol.hitTest(HitRightX, TrueY + MoveY, true))) { MoveY--; } if (MoveY < 1) { MoveY = 1; Etat = "LandFin"; } } }; ObjBox.prototype.CheckFall = function () { with (this) { if (HitGrd == true) { MoveY = 0; Etat = "Wait"; } else { Etat = "Fall"; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } MoveX = 0; MoveY = 0; } } }; ObjBox.prototype.CheckWall = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (Pers.Dir == "G") { HitX = HitX + (MoveX - LgHitG); } else if (Pers.Dir == "D") { HitX = HitX + (MoveX + LgHitD); } if (_parent.Collider.Wall.hitTest(HitX, HitY, true)) { MoveX = 0; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } } } }; ObjBox.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjBox.prototype.MoveBox = function () { with (this) { PosX = Number(PosX + MoveX); PosY = Number(PosY + MoveY); _parent.Bg[1][Nom]._x = PosX; _parent.Bg[1][Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY - 15; _parent.Collider.Wall[Nom]._x = PosX + 30; _parent.Collider.Wall[Nom]._y = PosY + 4; _parent.Collider.Ceil[Nom]._x = PosX; _parent.Collider.Ceil[Nom]._y = PosY + 40; } }; ObjBox.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (FixedFlag) { Etat = "Fixed"; } else { Etat = "Wait"; } } } }; ObjBox.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = (PosY + _parent._y) + LgHitDw; HitRightX = TrueX + LgHitD; HitLeftX = TrueX - LgHitG; } }; ObjBox.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if ((NewAction == "Turn") || (NewAction == "Fixed")) { _parent.Bg[1][Nom].gotoAndStop(NewAction + Dir); } else { _parent.Bg[1][Nom].gotoAndStop(NewAction); } _parent.Bg[1][Nom].Etat.box.gotoAndStop(Type); _parent.Bg[1][Nom].Etat.box.box.gotoAndStop(Type); } }; ObjBox.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } SetTruePos(); this[Etat](); } } }; ObjPers.prototype.IdleJake = function () { with (this) { DistYFall = 0; KeepDeadPos = true; bCanAttack = true; if (Life > 0) { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckPush(); CheckJump(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusJake = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.RunJake = function () { with (this) { bCanAttack = true; DistYFall = 0; SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckJump(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartJake = function () { with (this) { Pers.bouncingDisabledCount = 0; CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); MovePers(); if (HitGrd == true) { Etat = "Land"; } else if (SpdYNow >= 0) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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"; } } else if (DistYFall >= DistYFallMax) { autoSwitchDragon = true; } CheckHole(); } }; ObjPers.prototype.JumpLandingJake = function () { with (this) { CheckGetFire(); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (!_global.Game[onBouncingID].CheckPersOn()) { bounceCount = 0; Pers.onBouncingID = null; } if (_parent.Pers.Obj.Etat._currentframe >= 3) { if (_global.energy <= 0) { _global.energy = 0; Etat = "Die"; } } if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.ClimbingJake = function () { with (this) { SpdXNow = 0; SpdYNow = 0; CheckHitGrd(); if ((Pers.ClimbedDistance > 30) && (HitGrd)) { Etat = "Idle"; Pers.ladderDisabledCount = 0; } else if (KeyListener.Action) { Etat = "Fall"; } else { if (KeyListener.L) { SpdXNow = -2; } else if (KeyListener.R) { SpdXNow = 2; } if (KeyListener.Up) { SpdYNow = -3; } else if (KeyListener.Dw) { SpdYNow = 3; } SetMoveX(); SetMoveY(); CheckWall(FrontX, FrontY - 15); CheckWall(BackX, FrontY - 15); CheckWall(FrontX, FrontY); CheckWall(BackX, FrontY); CheckWall(FrontX, FrontY + 15); CheckWall(BackX, FrontY + 15); CheckWall(FrontX, FrontY + 30); CheckWall(BackX, FrontY + 30); CheckWall(FrontX, FrontY + 45); CheckWall(BackX, FrontY + 45); MovePers(); Pers.ClimbedDistance++; } if ((SpdXNow != 0) || (SpdYNow != 0)) { if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { _parent.Pers.Obj.Etat.gotoAndStop(1); } else { _parent.Pers.Obj.Etat.nextFrame(); } } else { _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.ActivateJake = function () { with (this) { CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.HurtJake = function () { with (this) { if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetJake = function () { with (this) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } }; ObjPers.prototype.AttackJake = function () { with (this) { CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe == Math.round(_parent.Pers.Obj.Etat._totalframes / 2)) { bHitAttack = true; } else { bHitAttack = false; } if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.GetHitJake = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireJake = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformJake = function () { with (this) { DistYFall = 0; if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 1; Etat = "Idle"; nDragonPowerCount = 0; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.PushJake = function () { with (this) { CheckHitGrd(); PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (!KeyListener.Action) { Etat = "Idle"; } else if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (PushedBox != 0) { MoveX = PushedBox.MoveX; } else { MoveX = 0; } } else { var AddBlock = (35 * NumDir); var i = 0; while (i != AddBlock) { if (_parent.Collider.Wall.hitTest(PushPointX + i, PushPointY, true)) { goToTarget = true; if (((i > 5) && (NumDir == 1)) || ((i < -5) && (NumDir == -1))) { MoveX = 5 * NumDir; } else { MoveX = i; } break; } i = i + NumDir; } } MovePers(); } }; ObjPers.prototype.TransformFallJake = ObjPers.prototype.TransformJake; ObjPers.prototype.DieJake = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { _parent.Pers.Obj.Etat.stop(); if (FrDeadCount == 0) { _global.lives--; _global.Snd.stopSound("lift"); _global.Snd.stopSound("push"); if (_global.lives == 0) { _global.Packaging.showLoseScreen(); } else { _global.HUD.fade(resetLevel); } } FrDeadCount++; } } }; ObjPers.prototype.SleepJake = function () { }; ObjPers.prototype.IdleDragon = function () { with (this) { bCanAttack = true; KeepDeadPos = true; if (Life > 0) { SetSpdDragon(); SetMoveX(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdDragon(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusDragon = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.FlyDragon = function () { with (this) { bCanAttack = true; SetSpdDragon(); SetMoveX(); SetMoveY(); CheckDragonObstacle(); CheckWall(FrontX, FrontY); CheckCeilDragon(); CheckSolDragon(); CheckGroundDragon(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartDragon = function () { with (this) { CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleDragon = function () { with (this) { SetSpdDragonJump(); 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 = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallDragon = function () { with (this) { SetSpdDragonJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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.JumpLandingDragon = function () { with (this) { CheckGetFire(); this["CheckAttack" + Perso](); if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) { if (Life <= 0) { Etat = "Die"; } else { Etat = "Idle"; } } } }; ObjPers.prototype.HurtDragon = function () { with (this) { MovePers(); if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); Etat = "Idle"; FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetDragon = ObjPers.prototype.HurtDragon; ObjPers.prototype.AttackTailDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrAttackTailHit) { bHitAttack = true; } else { bHitAttack = false; } } }; ObjPers.prototype.AttackFireDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrShootFire) { if (Dir == "D") { CreerFireBall(PosX + 70, PosY - 70, Dir); } else { CreerFireBall(PosX - 70, PosY - 70, Dir); } } } }; ObjPers.prototype.GetHitDragon = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireDragon = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 0; Etat = "Fall"; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.DieDragon = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { FrDeadCount++; _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.SleepDragon = function () { }; CreerPers = function (PosX, PosY, Perso) { this.Pers = new ObjPers(PosX, PosY, Perso); }; ObjPers.prototype.CharacterSwitch = function () { with (this) { if (Etat == "Fall") { Etat = "TransformFall"; } else { Etat = "Transform"; } } }; ObjPers.prototype.HeroChange = function (NewHero) { with (this) { Perso = NewHero; updatePerso(); } }; ObjPers.prototype.GetHitGeneral = function () { with (this) { SetSpdXHit(); CheckWall(BackX, TrueY); CheckHitGrd(); CheckSol(); MovePers(); CheckDie(); } }; 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.SetSpdXHit = function () { with (this) { MoveX = SpdXNow; if (SpdXNow > 0) { SpdXNow = SpdXNow * 0.7; } if (Dir eq "D") { MoveX = MoveX * -1; } } }; ObjPers.prototype.SetSpdXJake = 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.SetSpdDragon = function () { with (this) { if (KeyListener.R == true) { Dir = "D"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase; } } else if (KeyListener.L == true) { Dir = "G"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase * -1; } } else { SpdXNow = 0; } if (KeyListener.Dw == true) { SpdYNow = SpdYFly; } else if (KeyListener.Up == true) { SpdYNow = SpdYFly * -1; } else { SpdYNow = 0; } if ((SpdXNow == 0) && (SpdYNow == 0)) { Etat = "Idle"; } else { Etat = "Fly"; } } }; 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.SetMoveX = function () { with (this) { MoveX = SpdXNow; } }; ObjPers.prototype.SetMoveY = function () { with (this) { MoveY = SpdYNow; } }; 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.CheckDragonObstacle = function () { with (this) { if (MoveY != 0) { if (_parent.Collider.Dragon.hitTest(TopX, TopY + MoveY, true)) { MoveY = DragonHitTop; } else if (_parent.Collider.Dragon.hitTest(BottomFrontX, (TopY + MoveY) + DragonHeight, true) or _parent.Collider.Dragon.hitTest(BottomBackX, (TopY + MoveY) + DragonHeight, true)) { MoveY = DragonHitBottom; } } } }; 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.CheckSolDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Sol.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckCeilDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; SpdYNow = 0; } } } }; ObjPers.prototype.CheckGroundDragon = function () { with (this) { if (MoveY > 0) { if (_parent.Collider.Sol.hitTest(BottomFrontX, TrueY - _parent.Pers.Obj.HitBottomFront._y, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckJump = function () { with (this) { if (Etat != "Push") { if ((!KeyListener.Up) && (!bJumpRelease)) { bJumpRelease = true; } if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) { bJumpRelease = false; if (Etat == "Run") { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } else { Etat = "JumpStart"; } } } } }; ObjPers.prototype.CheckPush = function () { with (this) { PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (KeyListener.Action && (((Dir == "G") && (KeyListener.L)) || ((Dir == "D") && (KeyListener.R)))) { Etat = "Push"; } } } }; ObjPers.prototype.CheckAttackJake = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "Attack"; } } }; ObjPers.prototype.CheckAttackDragon = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackTail"; } if ((KeyListener.Action == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackFire"; } } }; ObjPers.prototype.CheckFall = function () { with (this) { if (SpdYNow >= SpdYFall) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.CheckDie = function () { with (this) { if (_global.energy <= 0) { _global.dragonPower = 0; Etat = "Fall"; } } }; ObjPers.prototype.MovePers = function () { with (this) { if ((Pers.TrueX + MoveX) < 30) { MoveX = (TrueX * -1) + 30; } else if ((Pers.TrueX + MoveX) > 520) { MoveX = 520 - Pers.TrueX; } PosX = _parent.Pers._x + MoveX; _parent.Pers._x = PosX; MoveX = 0; PosY = _parent.Pers._y + MoveY; _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]; if ((onBouncingID != null) && (_global.Game[onBouncingID].CheckPersOn() != true)) { Pers.SpdYUp = Pers.SpdYUpBase; } 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; } }; 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; } }; ObjPers.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Pers.gotoAndStop((Perso + "_") + Dir); } }; ObjPers.prototype.Actions = function () { with (this) { if (WaitForActions) { SetTruePos(); CheckHitGrd(); CheckSol(); CheckFall(); WaitForActions = false; } else if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Pers.Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Pers.Obj.Etat.play(); } SetTruePos(); InvincibleCheck(); this[Etat + aCharacter[ICharacter]](); CheckCharSwitch(); CheckHit(); CheckEndLevel(); } } }; ObjPers.prototype.CheckCharSwitch = function () { with (this) { if (ICharacter == 1) { if ((KeyListener.Dragon || (_global.dragonPower == 0)) && (Etat != "HurtNet")) { CharacterSwitch(); } else if ((++nDragonPowerCount) == nDragonPowerRythm) { _global.dragonPower--; nDragonPowerCount = 0; if (_global.dragonPower < 0) { _global.dragonPower = 0; } } } else { if (((KeyListener.Dragon || (autoSwitchDragon)) && (bCanSwitch)) && (_global.dragonPower > 0)) { autoSwitchDragon = false; bCanSwitch = false; FrSwitchCharacterCount = FrSwitchCharacter; CharacterSwitch(); } if (!bCanSwitch) { FrSwitchCharacterCount--; if (FrSwitchCharacterCount == 0) { bCanSwitch = true; } } } } }; ObjPers.prototype.CheckEndLevel = function () { with (this) { if (!_global.boss) { if (((_global.level == 1) && (PosY <= -3930)) && (PosX >= 390)) { _global.HUD.fade(bossStart); _global.boss = true; } if ((_global.level == 2) && (PosY <= -4670)) { _global.HUD.fade(bossStart); _global.boss = true; } if (((_global.level == 3) && (PosY <= -5800)) && (PosX <= 105)) { _global.HUD.fade(bossStart); _global.boss = true; } } } }; ObjPers.prototype.CheckHit = function () { with (this) { if (KeyListener.X && (CanBeHit)) { this.GetHit(); } } }; CreerNetBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("NetBall", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Net", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerFireBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("JackDragon_FireAnim", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Fire", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerSparkBall = function (PosX, PosY, Dir, Rotation, SpdX, SpdY) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("Medusa_Blast", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Spark", _local4, PosX, PosY, Dir, 8, 0, G_TabPersBall, "SlimeSplat", Rotation, SpdX, SpdY); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; ObjPersBall.prototype.Move = function () { with (this) { _parent.Bg[1][Nom]._x = PosX + SpdX; PosX = PosX + SpdX; if (SpdY) { _parent.Bg[1][Nom]._y = PosY + SpdY; PosY = PosY + SpdY; } SetTruePos(); CheckHit(); CheckOut(); } }; ObjPersBall.prototype.Hit = function () { with (this) { if ((Type == "Net") && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { Pers.Etat = "HurtNet"; _global.Snd.playSound("hurtNet", 100, 1, false); CanBeKill = true; } } }; ObjPersBall.prototype.End = function () { with (this) { if (((Type == "Fire") || (Type == "Spark")) && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { CanBeKill = true; } } }; ObjPersBall.prototype.Burn = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckHit = function () { with (this) { if (Type == "Net") { if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Burn"; _global.Game[Pers.CurrentFireID].Etat = "End"; } else if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.Hit))) { Etat = "Hit"; } } if (((Type == "Spark") && (Pers.Etat != "Activate")) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.HitFront))) { Pers.Etat = "Hurt"; Etat = "End"; } if (((Type == "Spark") && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1].FinalHit))) && (G_Medusa.Etat != "Die")) { _global.HUD.increaseScore(10000); _parent.Control.Bg.CamOnMedusa = true; G_Medusa.Etat = "Die"; } } }; ObjPersBall.prototype.CheckOut = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckKill = function () { with (this) { if (CanBeKill == true) { KillBall(); } } }; ObjPersBall.prototype.KillBall = function () { with (this) { if (Tab == G_TabPersBall) { G_TabPersBall.splice(PersBallI, 1); PersBallI = PersBallI - 1; } else if (Tab == G_TabMinionBall) { G_TabMinionBall.splice(MinionBallI, 1); MinionBallI = MinionBallI - 1; } delete _parent.Control[Nom]; _parent.Bg[1][Nom].removeMovieClip(); if (Type == "Fire") { Pers.CurrentFireID = null; } if (Type == "Spark") { G_Medusa.CurrentSparkID = null; } } }; ObjPersBall.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjPersBall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].gotoAndStop(NewAction); } }; ObjPersBall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Etat.play(); } this[Etat](); CheckKill(); } } }; CreerSwitch = function (Nom, PosX, PosY) { if (this[Nom] == null) { this[Nom] = new ObjSwitch(Nom, PosX, PosY); G_TabSwitch.push(Nom); } }; ObjSwitch.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjSwitch.prototype.Idle = function () { with (this) { CheckPersOn(); CheckBoxOn(); CheckSleep(); } }; ObjSwitch.prototype.Baisse = function () { with (this) { if (_parent[Nom].Etat._currentframe >= FrBaisse) { _global.SoundCTRL.playSound("SwitchOn", 100, 0); _parent[Nom].Activate(); Etat = "Active"; } } }; ObjSwitch.prototype.Active = function () { with (this) { CheckSleep(); if (!FlagBoxUse) { CheckRelease(); } } }; ObjSwitch.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { FlagUse = true; Etat = "Baisse"; } } }; ObjSwitch.prototype.CheckBoxOn = function () { with (this) { var Box = Pers.PushedBox; if ((Pers.Etat == "Push") && (Box != 0)) { if (Box.Dir == "G") { if (((((Box.PosX - Box.LgHitG) >= (PosX - LgOnX)) and ((Box.PosX - Box.LgHitG) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Etat = "Baisse"; Activate(); } } else if (Box.Dir == "D") { if (((((Box.PosX + Box.LgHitD) >= (PosX - LgOnX)) and ((Box.PosX + Box.LgHitD) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } else if ((Box.Etat == "LandFin") && (Box != 0)) { if ((((Box.PosX >= (PosX - LgOnX)) and (Box.PosX <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; Box.Dir = ""; _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } }; ObjSwitch.prototype.CheckRelease = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { } else { Etat = "Idle"; FlagUse = false; _parent[Nom].Desactivate(); _global.SoundCTRL.playSound("SwitchOff", 100, 0); } } }; ObjSwitch.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjSwitch.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjSwitch.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjSwitch.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerElevator = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjElevator(l_mcElement, "Y", 0, -1 * l_mcElement.distance); G_TabElevator.push(l_mcElement._name); } }; this.onSwitchLift = function (l_Nom) { with (this) { if (_global.Game[l_Nom + "Lift"].Active == true) { _global.Game[l_Nom + "Lift"].Active = false; _global.Game[l_Nom].Etat = "Idle"; _global.Snd.stopSound("lift"); } else { _global.Game[l_Nom + "Lift"].Active = true; _global.Game[l_Nom].Etat = "IdleActivate"; _global.Snd.playSound("lift", 100, 999, true); } } }; ObjElevator.prototype.Sleep = function () { with (this) { CheckActif(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Idle = function () { with (this) { CheckSleep(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Wait = function () { with (this) { if (frWaitCount >= frWaitTime) { Etat = "Idle"; frWaitCount = 0; } else { frWaitCount++; } } }; ObjElevator.prototype.SetMove = function () { with (this) { CheckPersOn(); CheckLimit(); MoveElevator(); } }; ObjElevator.prototype.MoveElevator = function () { with (this) { this["Pos" + Axis] = this["Pos" + Axis] + this["Move" + Axis]; _parent[Nom]._x = PosX; _parent[Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY; if (PersOn) { Pers["Move" + Axis] = this["Move" + Axis]; Pers.MovePers(); } UpdateLift(); } }; ObjElevator.prototype.UpdateLift = function () { with (this) { var cableH = (this["Pos" + Axis] - Max); mc.Obj.cable1._height = cableH; mc.Obj.cable2._height = cableH; mc._y = mc._y + this["Move" + Axis]; mc._parent[Nom.substr(0, -4)]._y = mc._parent[Nom.substr(0, -4)]._y + this["Move" + Axis]; _global.Game[Nom.substr(0, -4)].PosY = _global.Game[Nom.substr(0, -4)].PosY + this["Move" + Axis]; _global.Game._parent.overlay[Nom + "ramp"]._y = _global.Game._parent.overlay[Nom + "ramp"]._y + this["Move" + Axis]; _global.Game._parent.Bg[1][Nom + "ramp"]._y = _global.Game._parent.Bg[1][Nom + "ramp"]._y + this["Move" + Axis]; } }; ObjElevator.prototype.CheckLimit = function () { with (this) { this["Move" + Axis] = Speed * Dir; if ((Dir == -1) && ((this["Pos" + Axis] + this["Move" + Axis]) <= Max)) { Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = false; CanReposition = true; RepositionCount = 0; Dir = 0; } if ((Dir == 1) && ((this["Pos" + Axis] + this["Move" + Axis]) >= Min)) { CanReposition = false; Dir = -1; Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = true; _global.Game[Nom.substr(0, -4)].Etat = "Idle"; } } }; ObjElevator.prototype.CheckReposition = function () { with (this) { if (CanReposition) { CheckPersOn(); if (!PersOn) { if ((++RepositionCount) == RepositionDelay) { RepositionCount = 0; CanReposition = false; Active = true; Dir = 1; _global.Snd.playSound("lift", 100, 999, true); } } } } }; ObjElevator.prototype.Activate = function () { with (this) { Active = true; } }; ObjElevator.prototype.Desactivate = function () { with (this) { Active = false; } }; ObjElevator.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { PersOn = true; } else { PersOn = false; } } }; ObjElevator.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { Etat = "Idle"; if (Active) { CheckLimit(); MoveElevator(); } } } }; ObjElevator.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjElevator.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjElevator.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLevier = function (Nom, PosX, PosY, listener) { if (this[Nom] == null) { this[Nom] = new ObjLevier(Nom, PosX, PosY, listener); G_TabLevier.push(Nom); } }; ObjLevier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjLevier.prototype.Idle = function () { with (this) { if (Active) { CheckPersOn(); CheckSleep(); } } }; ObjLevier.prototype.IdleActivate = ObjLevier.prototype.Idle; ObjLevier.prototype.Activate = function () { with (this) { if (Pers.ICharacter == 0) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.Etat == "Activate")) && (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes)) { listener(Nom); } } } }; ObjLevier.prototype.CheckPersOn = function () { with (this) { if ((Pers.ICharacter == 0) && (Pers.Etat != "Push")) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.HitGrd == true)) && (Pers.CanBeHit || (Pers.Invincible))) { if (KeyListener.Action) { Pers.canJumpCount = 0; Etat = "Activate"; Pers.Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); } } } else if (((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); } else if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); _global.Game[Pers.CurrentFireID].Etat = "End"; } } }; ObjLevier.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjLevier.prototype.CheckSleep = function () { }; ObjLevier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjLevier.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLadder = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjLadder(l_mcElement); G_TabLadder.push(l_mcElement._name); } }; this.onSwitchLadder = function (l_Nom) { with (this) { _global.Game[l_Nom + "Ladder"].Etat = "Opening"; } }; ObjLadder.prototype.Off = function () { with (this) { } }; ObjLadder.prototype.Opening = function () { with (this) { if (mc.etat._currentframe == mc.etat._totalframes) { Etat = "On"; } } }; ObjLadder.prototype.On = function () { with (this) { CheckPersOn(); } }; ObjLadder.prototype.CheckPersOn = function () { with (this) { if (Pers.ladderDisabledCount >= Pers.ladderDisabledMax) { if (((((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= PosY)) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { if (((Pers.ICharacter == 0) && (Pers.Etat != "Climbing")) && (Pers.Etat != "Hurt")) { if ((KeyListener.Up && (Pers.PosY >= (PosY + 70))) || (KeyListener.Dw && (Pers.PosY <= (PosY + 165)))) { Pers.onLadderID = Nom; Pers.Etat = "Climbing"; Pers.ClimbedDistance = 0; } } } else if ((Pers.Etat == "Climbing") && (Pers.onLadderID == Nom)) { if (Pers.PosX < PosX) { Pers.ChangeDir("G"); } if (Pers.PosX > (PosX + LgOnX)) { Pers.ChangeDir("D"); } Pers.Etat = "Fall"; Pers.onLadderID = null; } } else { Pers.ladderDisabledCount++; } } }; ObjLadder.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjLadder.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerBouncingChair = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBouncingChair(l_mcElement); G_TabChair.push(l_mcElement._name); } }; ObjBouncingChair.prototype.Idle = function () { with (this) { if (CheckPersOn()) { Etat = "Bounce"; if ((Pers.onBouncingID == Nom) && (Pers.HitGrd)) { Pers.onBouncingID = null; } } } }; ObjBouncingChair.prototype.Bounce = function () { with (this) { if (mc.Etat._currentframe == 9) { BouncePers(); } if (mc.Etat._currentframe == mc.Etat._totalframes) { Etat = "Idle"; } } }; ObjBouncingChair.prototype.CheckPersOn = function () { with (this) { if ((((((((Pers.ICharacter == 0) && (Pers.Etat != "Idle")) && (Pers.Etat != "Run")) and (Pers.PosX >= PosX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { return(true); } } }; ObjBouncingChair.prototype.BouncePers = function () { with (this) { if (CheckPersOn()) { Pers.SpdYUp = Pers.SpdYUpBase; if (Pers.onBouncingID != Nom) { Pers.onBouncingID = Nom; Pers.bounceCount = 0; } else { Pers.bounceCount++; if (Pers.bounceCount > 0) { Pers.bounceCount = Pers.bounceCountMax; } Pers.SpdYUp = Pers.SpdYUp - (Pers.bounceCount * 0.34); } Pers.Etat = "JumpStart"; } else if (Pers.HitGrd) { Pers.onBouncingID = null; } } }; ObjBouncingChair.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjBouncingChair.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerHuntSoldier = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntSoldier"; this[l_mcElement._name] = new ObjHuntSoldier(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntSoldier.push(l_mcElement._name); } }; ObjHuntSoldier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntSoldier.prototype.Idle = function () { with (this) { CheckAttack(); CheckShield(); CheckDir(); CheckHurt(); CheckSleep(); } }; ObjHuntSoldier.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Stunned = ObjHuntSoldier.prototype.Hurt; ObjHuntSoldier.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack1 = function () { with (this) { if (((Pers.Etat != "Hurt") && (_parent.Bg[1][Nom].Obj.Etat._currentframe >= 9)) && (_parent.Bg[1][Nom].Obj.Etat._currentframe <= 25)) { if (_parent.Bg[1][Nom].Obj.Etat.wave.hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack2 = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 7) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; _global.Snd.playSound("hurtJake", 100, 1, false); } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjHuntSoldier.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if ((Etat != "Shield") && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { if ((++HurtCount) == 3) { enemyHitScore(); Etat = "Stunned"; HurtCount = 0; } else { Etat = "Hurt"; } if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } } }; ObjHuntSoldier.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjHuntSoldier.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Math.abs(Pers.PosY - PosY) < 180) && (Math.random() < AttackChance)) { if (Math.abs(Pers.PosX - PosX) < 150) { Etat = "Attack2"; } else { Etat = "Attack1"; } AttackDelayCount = 0; } } }; ObjHuntSoldier.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntSoldier.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjHuntSoldier.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntSoldier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjHuntSoldier.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerHuntWindow = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntWindow"; this[l_mcElement._name] = new ObjHuntWindow(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntWindow.push(l_mcElement._name); } }; ObjHuntWindow.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntWindow.prototype.IdleClose = function () { with (this) { CheckCanOpen(); CheckSleep(); } }; ObjHuntWindow.prototype.IdleOpen = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt._currentframe == 1) { _parent.Bg[1][Nom].Obj.Etat.Hunt.gotoAndStop(HuntID); SetHuntEtat("Appear"); if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } } if ((HuntEtat == "Appear") && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { SetHuntEtat("idle"); } if (HuntEtat == "idle") { CheckFlip(); CheckAttack(); } if (((HuntEtat == "disappear") || (HuntEtat == "flee")) && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat.stop(); Etat = "Close"; if (HuntEtat == "flee") { _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = -80; } } if (HuntEtat == "Throw") { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes) { SetHuntEtat("idle"); } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == FrThrow) { var l_dir = "G"; if (HuntID == "A") { l_dir = "D"; } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { if (l_dir == "D") { l_dir = "G"; } else { l_dir = "D"; } } var l_netY = 70; if (PosY < Pers.TrueY) { l_netY = l_netY + (Math.abs(Pers.PosY - TrueY) - 150); } else { l_netY = l_netY - Math.abs(Pers.PosY - TrueY); } if (l_netY > 120) { l_netY = 120; } if (l_netY < 20) { l_netY = 20; } CreerNetBall(PosX, PosY + l_netY, l_dir); _global.Snd.playSound("net", 130, 1, false); } } CheckCanClose(); CheckHurt(); CheckSleep(); } }; ObjHuntWindow.prototype.Open = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleOpen"; AttackDelayCount = AttackDelay * 0.9; } } }; ObjHuntWindow.prototype.Close = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleClose"; _global.Game["G_HuntWindowCurrent" + HuntID] = null; } } }; ObjHuntWindow.prototype.CheckCanOpen = function () { with (this) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == null) { if (_global.Game[("G_Window" + HuntID) + "OpenDelayCount"] >= _global.Game.G_WindowOpenDelay) { if ((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown))) { if (((Pers.ICharacter == 0) && (Math.random() <= OpenChanceJake)) || ((Pers.ICharacter == 1) && (Math.random() <= OpenChanceDragon))) { Etat = "Open"; _global.Game["G_HuntWindowCurrent" + HuntID] = Nom; _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = 0; } } } } } }; ObjHuntWindow.prototype.CheckCanClose = function () { with (this) { if (CloseDelayCount < CloseDelay) { CloseDelayCount++; } else if ((HuntEtat != "disappear") && ((!((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown)))) || ((Pers.ICharacter == 0) && (Math.random() <= CloseChance)))) { if (Math.random() <= OpenChance) { SetHuntEtat("disappear"); CloseDelayCount = 0; } } } }; ObjHuntWindow.prototype.CheckFlip = function () { with (this) { if (FlipDelayCount < FlipDelay) { FlipDelayCount++; } else { if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } FlipDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Pers.ICharacter == 1) && (Math.abs(Pers.PosY - PosY) < 300)) { SetHuntEtat("Throw"); AttackDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckHurt = function () { with (this) { if ((((HuntEtat == "idle") || (HuntEtat == "Throw")) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].Obj.hitTest(_parent.Pers.Obj.HitFront))) { SetHuntEtat("flee"); enemyHitScore(); if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } }; ObjHuntWindow.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "IdleClose"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntWindow.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == Nom) { _global.Game["G_HuntWindowCurrent" + HuntID] = null; } Etat = "Sleep"; } } }; ObjHuntWindow.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntWindow.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.window.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.overlay.gotoAndStop(G_CurrentLevel); } }; ObjHuntWindow.prototype.SetHuntEtat = function (newEtat) { with (this) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.gotoAndStop(newEtat); HuntEtat = newEtat; } }; ObjHuntWindow.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusa = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "Medusa"; this[l_mcElement._name] = new ObjMedusa(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusa.push(l_mcElement._name); } }; ObjMedusa.prototype.Idle = function () { with (this) { CheckAttack(); CheckDir(); CheckHurt(); } }; ObjMedusa.prototype.Captured = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showNextScreen(); } } }; ObjMedusa.prototype.Die = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showWinScreen(); } } }; ObjMedusa.prototype.Laugh = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Attack = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe < FrPrepareAttack) { CheckDir(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrPrepareAttack) { if (Pers.ICharacter == 0) { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 1.5)); } else { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 3)); } NextAttackRotation = Math.round(pointsGetAngle(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY)); var l_dst = pointsGetDistance(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY); var l_step = (l_dst / 20); NextAttackRotationSpdX = (Pers.TrueX - G_Medusa.TrueX) / l_step; NextAttackRotationSpdY = (l_PersY - G_Medusa.TrueY) / l_step; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrAttack) { var l_PosX = PosX; CreerSparkBall(PosX, PosY - 95, Dir, NextAttackRotation, NextAttackRotationSpdX, NextAttackRotationSpdY); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { HasAttacked = true; Etat = "Idle"; } CheckHurt(); } }; ObjMedusa.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjMedusa.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Laugh"; } } } }; ObjMedusa.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjMedusa.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if (Math.random() < AttackChance) { Etat = "Attack"; HasAttacked = false; AttackDelayCount = 0; } } }; ObjMedusa.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjMedusa.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjMedusa.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjMedusa.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusaSister = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "MedusaSister"; this[l_mcElement._name] = new ObjMedusaSister(l_mcElement, Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusaSister.push(l_mcElement._name); } }; ObjMedusaSister.prototype.UpdateSister = function (SisterID) { with (this) { if (CurrentSister == SisterID) { mc[SisterID].gotoAndStop(CurrentAction); } else { mc[SisterID].gotoAndStop("Idle"); } } }; ObjMedusaSister.prototype.UpdatePosition = function () { with (this) { var l_maxOffset = 70; var l_posX = Math.abs(_parent.Control.Bg.PosX); mc._x = -((l_posX / 450) * l_maxOffset); mc._y = mc._y + (_global.MoveY / 2.5); if (mc._y < 145) { mc._y = 145; } } }; ObjMedusaSister.prototype.UpdateAttack = function () { with (this) { if ((CurrentAction == "Idle") && (!MedusaAttack)) { if ((++AttackDelayCount) == AttackDelay) { if (CurrentSister == "SisterLeft") { CurrentSister = "SisterRight"; } else { CurrentSister = "SisterLeft"; } CurrentAction = "Charge"; AttackDelayCount = 0; } } else if (CurrentAction == "Charge") { if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { var PersY = Math.abs(_global.Game.Pers.PosY); switch (true) { case PersY < 100 : CurrentAction = "Attack3"; break; case PersY < 250 : CurrentAction = "Attack2"; break; case PersY >= 250 : CurrentAction = "Attack1"; } } } else if (((CurrentAction == "Attack1") || (CurrentAction == "Attack2")) || (CurrentAction == "Attack3")) { if (mc[CurrentSister].Etat._currentframe == 9) { if ((Pers.Etat != "Activate") && (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Pers))) { Pers.Etat = "Hurt"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna1)) { _global.Game.Antenna1.Etat = "Charged"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna2)) { _global.Game.Antenna2.Etat = "Charged"; } } if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { CurrentAction = "Idle"; if (CurrentSister == "SisterRight") { MedusaAttack = true; G_Medusa.HasAttacked = false; } } } if (!MedusaAttack) { G_Medusa.AttackDelayCount = 0; } else if (G_Medusa.HasAttacked) { MedusaAttack = false; } } }; ObjMedusaSister.prototype.Actions = function () { with (this) { UpdatePosition(); UpdateAttack(); UpdateSister("SisterLeft"); UpdateSister("SisterRight"); } }; CreerWall = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjWall(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabWall.push(l_mcElement._name); } }; ObjWall.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjWall.prototype.Idle = function () { with (this) { CheckHurt(); CheckSleep(); } }; ObjWall.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrRemoveWallHit) { _parent.Collider.Wall[Nom].removeMovieClip(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Out"; } } }; ObjWall.prototype.CheckHurt = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjWall.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjWall.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjWall.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjWall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.wall.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.wall.gotoAndStop(G_CurrentLevel); } }; ObjWall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerDragonObstacle = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjDragonObstacle(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabDragonObstacle.push(l_mcElement._name); } }; ObjDragonObstacle.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjDragonObstacle.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjDragonObstacle.prototype.Hit = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.HitBoss = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 4) { _global.Game.Web.Etat = "Fall"; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.Fall = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == (_parent.Bg[1][Nom].Obj.Etat._totalframes - 1)) { G_Medusa.Etat = "Captured"; } } }; ObjDragonObstacle.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _parent.Bg[1][Nom].Obj.Etat.stop(); } } }; ObjDragonObstacle.prototype.CheckHit = function () { with (this) { if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitTop) || (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitBottomFront)))) { Pers.Etat = "Hurt"; Etat = "Hit"; Pers.InvincibleEnd(); Pers.MoveY = 40; } } }; ObjDragonObstacle.prototype.CheckActif = function () { with (this) { if (_global.boss || (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep"))) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjDragonObstacle.prototype.CheckSleep = function () { with (this) { if (((((!_global.boss) && (PosX < (Bg.InvPosX - LgOutG))) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjDragonObstacle.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjDragonObstacle.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjDragonObstacle.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerAntenna = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjAntenna(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabAntenna.push(l_mcElement._name); } }; ObjAntenna.prototype.Idle = function () { with (this) { CheckHit(); } }; ObjAntenna.prototype.Charged = function () { with (this) { CheckHit(); if ((++ChargedCount) == ChargedDelay) { Etat = "Idle"; ChargedCount = 0; } } }; ObjAntenna.prototype.CheckHit = function () { with (this) { if ((G_Medusa.CurrentSparkID != null) && (Pers.Etat != "Hurt")) { if (_parent.Bg[1][Nom].Obj.Hit.hitTest(_parent.Bg[1][G_Medusa.CurrentSparkID])) { Etat = "Charged"; ChargedCount = 0; if ((_global.level == 1) && (_global.Game.Web.Etat != "Fall")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Web.Etat = "Fall"; _global.HUD.increaseScore(1000); } if ((((_global.level == 2) && (_global.Game.Antenna1.Etat == "Charged")) && (_global.Game.Antenna2.Etat == "Charged")) && (_global.Game.Wire.Etat != "HitBoss")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Wire.Etat = "HitBoss"; _global.HUD.increaseScore(2000); } } } } }; ObjAntenna.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjAntenna.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if (Etat == "Charged") { _global.Snd.playSound("antenna", 250, 1, false); } _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjAntenna.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerBonus = function (type, l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBonus(type, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabBonus.push(l_mcElement._name); } }; ObjBonus.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjBonus.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBonus.prototype.CheckHit = function () { with (this) { if (((Pers.ICharacter == 0) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj))) || ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.Hit)))) { switch (Type) { case "Score" : _global.Score = _global.Score + 500; _global.Snd.playSound("energy", 200, 1, false); _global.HUD.increaseScore(500); break; case "Life" : if (_global.lives < 3) { _global.lives++; } _global.Snd.playSound("life", 200, 1, false); _global.HUD.increaseScore(200); break; case "Energy" : _global.energy = _global.energy + 50; if (_global.energy > 100) { _global.energy = 100; } _global.Snd.playSound("bonus", 300, 1, false); _global.HUD.increaseScore(200); break; case "Power" : _global.dragonPower = 100; _global.Snd.playSound("power", 300, 1, false); _global.HUD.increaseScore(200); } KillBonus(); } } }; ObjBonus.prototype.KillBonus = function () { with (this) { G_TabBonus.splice(BonusI, 1); BonusI = BonusI - 1; delete _parent.Control[Nom]; _parent.Bg[1][Nom].swapDepths(90210); _parent.Bg[1][Nom].removeMovieClip(); } }; ObjBonus.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { Etat = "Idle"; } } }; ObjBonus.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjBonus.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjBonus.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); CheckKill(); } } }; this.cnt = 0; this.G_CurrentLevel = _global.level; switch (G_CurrentLevel) { case 1 : this.G_MaxEnemyHit = 28; break; case 2 : this.G_MaxEnemyHit = 28; break; case 3 : this.G_MaxEnemyHit = 38; } G_MaxEnemyHitCount = 0; this.G_Pause = true; this.G_PauseOut = false; this.G_PRealese = true; this.G_Resume = false; this.G_TabBox = new Array(); this.G_TabSwitch = new Array(); this.G_TabDoor = new Array(); this.G_TabElevator = new Array(); this.G_TabPersBall = new Array(); this.G_TabLevier = new Array(); this.G_TabLadder = new Array(); this.G_TabChair = new Array(); this.G_TabHuntSoldier = new Array(); this.G_TabHuntWindow = new Array(); this.G_TabMedusa = new Array(); this.G_TabMedusaSister = new Array(); this.G_TabWall = new Array(); this.G_TabDragonObstacle = new Array(); this.G_TabAntenna = new Array(); this.G_TabBonus = new Array(); this.G_NextPersBall = 1; this.G_NextPersBallDepth = 10000; this.G_NextMinionBall = 1; this.G_NextMinionBallDepth = 20000; this.G_OverlayDepth = 0; this.G_HuntWindowCurrentA = null; this.G_HuntActiveSinceA = 0; this.G_HuntWindowCurrentB = null; this.G_HuntActiveSinceB = 0; this.G_AlphaZones = new Array(); this.G_Medusa = null; this.G_WindowOpenDelay = 20; this.G_WindowAOpenDelayCount = 0; this.G_WindowBOpenDelayCount = 0; this.addAlphaZone = function (mc) { if (_global.Packaging.bShadowDisabled) { mc._visible = false; } }; this.resetLevel = function () { _global.dragonPower = 100; _global.energy = 100; if (_global.boss) { _global.resetDestination = "Game_BOSS" + _global.level; } else { _global.resetDestination = "Game_LEVEL" + _global.level; } _parent._parent.gotoAndStop("Reset"); }; this.bossStart = function () { _global.boss = true; _global.resetDestination = "Game_BOSS" + _global.level; _parent._parent.gotoAndStop("Reset"); }; this.enemyHitScore = function () { if ((++G_MaxEnemyHitCount) < G_MaxEnemyHit) { _global.HUD.increaseScore(100); } }; this.Creer_PBalcony = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + l_mcElement._parent._y; CreerPlateforme(pt, 235); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PRoofTop = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; var pt = new Object(); pt = {x:l_mcElement._x - 5, y:l_mcElement._y + 95}; var mcCeil = _parent.Collider.Ceil; mcCeil.moveTo(pt.x, pt.y); mcCeil.beginFill(16711935); pt.x = pt.x + 115; pt.y = pt.y - 70; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x + 115; pt.y = pt.y + 70; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y - 80; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x - 230; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y + 80; mcCeil.lineTo(pt.x, pt.y); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBalconyOpen = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + (l_mcElement._parent._y + 10); CreerPlateforme(pt, 235); if (l_mcElement.flipped) { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01OverlayFlip", {x:pt.x + 32, y:pt.y}, true); CreerObstacle({x:pt.x + 19, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); } else { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01Overlay", {x:pt.x + 120, y:pt.y + 0.5}, true); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 195, y:pt.y}, 15, 15); } _parent.overlay[l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); _parent.Bg[1][l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBox = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; 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; CreerPlateforme(pt, 70); CreerObstacle(pt, 70, 70); } }; this.CheckVisible = function () { if ((this._y < (Bg.InvPosY - Stage.height)) or (this._y > (Bg.InvPosY + Stage.height))) { this._visible = false; } else { this._visible = true; } }; 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.CreerObstacleDragon = function (pt, l_nWidth, l_nHeight) { var _local3 = _parent.Collider.Dragon; pt.x = Math.round(pt.x); pt.y = Math.round(pt.y); _local3.moveTo(pt.x, pt.y); _local3.beginFill(16776960); _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.CreerOverlay = function (id, linkage, pt, bReversed) { var _local4; var _local5; _local5 = _parent.overlay.attachMovie(linkage, id, G_OverlayDepth++); _local5._x = pt.x; _local5._y = pt.y; _local4 = _parent.Bg[1].attachMovie(linkage, id, G_OverlayDepth++); _local4._x = pt.x; _local4._y = pt.y; _local4.overlay = _local5; if (!bReversed) { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = false; this.overlay._visible = true; } else { this._visible = true; this.overlay._visible = false; } }; } else { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = true; this.overlay._visible = false; } else { this._visible = false; this.overlay._visible = true; } }; } }; this.replaceTile = function (l_mcElement) { var _local1 = l_mcElement._name; var _local2 = 1499; if (_local1.slice(0, 8) == "instance") { } else { l_mcElement._x = 0; l_mcElement._y = -((Number(_local1) - 1) * _local2); } }; this.CreerFloor = function (l_nPosX, l_nPosY, l_nWidth, l_nHeight) { var mcGround = _parent.Collider.Sol; with (this) { pt = new Object(); pt = {x:l_nPosX, y:l_nPosY}; pt.y = pt.y - l_nHeight; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor1 = 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 + -60; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloorBoss = 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 + -88; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor2a = 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 + 120; 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); pt.x = pt.x + 360; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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); } }; } onClipEvent (enterFrame) { BoxI = 0; for (BoxI in G_TabBox) { var BoxActif = G_TabBox[BoxI]; if (this[BoxActif].Etat != this[BoxActif].EtatOld) { this[BoxActif].ChangeEtat(this[BoxActif].Etat); } this[BoxActif].Actions(); } PersBallI = 0; for (PersBallI in G_TabPersBall) { var PersBallActif = G_TabPersBall[PersBallI]; if (this[PersBallActif].Etat != this[PersBallActif].EtatOld) { this[PersBallActif].ChangeEtat(this[PersBallActif].Etat); } this[PersBallActif].Actions(); } LevierI = 0; for (LevierI in G_TabLevier) { var LevierActif = G_TabLevier[LevierI]; if (this[LevierActif].Etat != this[LevierActif].EtatOld) { this[LevierActif].ChangeEtat(this[LevierActif].Etat); } this[LevierActif].Actions(); } LadderI = 0; for (LadderI in G_TabLadder) { var LadderActif = G_TabLadder[LadderI]; if (this[LadderActif].Etat != this[LadderActif].EtatOld) { this[LadderActif].ChangeEtat(this[LadderActif].Etat); } this[LadderActif].Actions(); } ChairI = 0; for (ChairI in G_TabChair) { var ChairActif = G_TabChair[ChairI]; if (this[ChairActif].Etat != this[ChairActif].EtatOld) { this[ChairActif].ChangeEtat(this[ChairActif].Etat); } this[ChairActif].Actions(); } ElevatorI = 0; for (ElevatorI in G_TabElevator) { var ElevatorActif = G_TabElevator[ElevatorI]; if (this[ElevatorActif].Etat != this[ElevatorActif].EtatOld) { this[ElevatorActif].ChangeEtat(this[ElevatorActif].Etat); } this[ElevatorActif].Actions(); } I = 0; for (HuntSoldierI in G_TabHuntSoldier) { var HuntSoldierActif = G_TabHuntSoldier[HuntSoldierI]; if (this[HuntSoldierActif].Dir != this[HuntSoldierActif].DirOld) { this[HuntSoldierActif].ChangeDir(this[HuntSoldierActif].Dir); } if (this[HuntSoldierActif].Etat != this[HuntSoldierActif].EtatOld) { this[HuntSoldierActif].ChangeEtat(this[HuntSoldierActif].Etat); } this[HuntSoldierActif].Actions(); } I = 0; for (HuntWindowI in G_TabHuntWindow) { var HuntWindowActif = G_TabHuntWindow[HuntWindowI]; if (this[HuntWindowActif].Dir != this[HuntWindowActif].DirOld) { this[HuntWindowActif].ChangeDir(this[HuntWindowActif].Dir); } if (this[HuntWindowActif].Etat != this[HuntWindowActif].EtatOld) { this[HuntWindowActif].ChangeEtat(this[HuntWindowActif].Etat); } this[HuntWindowActif].Actions(); } if (!G_Pause) { if (_global.Game.G_HuntWindowCurrentA == null) { _global.Game.G_WindowAOpenDelayCount++; } if (_global.Game.G_HuntWindowCurrentB == null) { _global.Game.G_WindowBOpenDelayCount++; } } I = 0; for (MedusaI in G_TabMedusa) { var MedusaActif = G_TabMedusa[MedusaI]; if (this[MedusaActif].Dir != this[MedusaActif].DirOld) { this[MedusaActif].ChangeDir(this[MedusaActif].Dir); } if (this[MedusaActif].Etat != this[MedusaActif].EtatOld) { this[MedusaActif].ChangeEtat(this[MedusaActif].Etat); } this[MedusaActif].Actions(); } I = 0; for (WallI in G_TabWall) { var WallActif = G_TabWall[WallI]; if (this[WallActif].Dir != this[WallActif].DirOld) { this[WallActif].ChangeDir(this[WallActif].Dir); } if (this[WallActif].Etat != this[WallActif].EtatOld) { this[WallActif].ChangeEtat(this[WallActif].Etat); } this[WallActif].Actions(); } I = 0; for (DragonObstacleI in G_TabDragonObstacle) { var DragonObstacleActif = G_TabDragonObstacle[DragonObstacleI]; if (this[DragonObstacleActif].Dir != this[DragonObstacleActif].DirOld) { this[DragonObstacleActif].ChangeDir(this[DragonObstacleActif].Dir); } if (this[DragonObstacleActif].Etat != this[DragonObstacleActif].EtatOld) { this[DragonObstacleActif].ChangeEtat(this[DragonObstacleActif].Etat); } this[DragonObstacleActif].Actions(); } I = 0; for (AntennaI in G_TabAntenna) { var AntennaActif = G_TabAntenna[AntennaI]; if (this[AntennaActif].Dir != this[AntennaActif].DirOld) { this[AntennaActif].ChangeDir(this[AntennaActif].Dir); } if (this[AntennaActif].Etat != this[AntennaActif].EtatOld) { this[AntennaActif].ChangeEtat(this[AntennaActif].Etat); } this[AntennaActif].Actions(); } I = 0; for (MedusaSisterI in G_TabMedusaSister) { var MedusaSisterActif = G_TabMedusaSister[MedusaSisterI]; if (this[MedusaSisterActif].Dir != this[MedusaSisterActif].DirOld) { this[MedusaSisterActif].ChangeDir(this[MedusaSisterActif].Dir); } if (this[MedusaSisterActif].Etat != this[MedusaSisterActif].EtatOld) { this[MedusaSisterActif].ChangeEtat(this[MedusaSisterActif].Etat); } this[MedusaSisterActif].Actions(); } I = 0; for (BonusI in G_TabBonus) { var BonusActif = G_TabBonus[BonusI]; if (this[BonusActif].Dir != this[BonusActif].DirOld) { this[BonusActif].ChangeDir(this[BonusActif].Dir); } if (this[BonusActif].Etat != this[BonusActif].EtatOld) { this[BonusActif].ChangeEtat(this[BonusActif].Etat); } this[BonusActif].Actions(); } if (Pers.Dir != Pers.DirOld) { Pers.ChangeDir(Pers.Dir); } if (Pers.Etat != Pers.EtatOld) { Pers.setState(Pers.Etat); } this.Pers.Actions(); this.Bg.Actions(); _global.HUD.update(); G_CheckPause(); }
Symbol 1374 MovieClip Frame 2
stop(); _global.C.beginLevel();
Instance of Symbol 1373 MovieClip "Bg" in Symbol 1374 MovieClip Frame 2
onClipEvent (load) { this._x = 0; this._y = 0; this.noUpdateCamCount = 0; this.noUpdateCamDelay = 50; _parent.Control.CreerBg(_parent._x, _parent._y); BG = _parent.Control.Bg; Pers = _global.Game.Pers; for (var i in _parent.Bg) { if (Number(_parent.Bg[i]._name) <= 20) { _parent.Bg[i].gotoAndStop(2); } else { _parent.Bg[i].gotoAndStop(3); } } BG.NoCamUpdate = true; if (_global.level == 1) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -300; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(380, -280, 250, 20); } if (_global.level == 2) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -450; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(95, -280, 250, 20); _parent.Control.CreerFloor(725, -280, 250, 20); } if (_global.level == 3) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -450; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(95, -280, 250, 20); _parent.Control.CreerFloor(725, -280, 250, 20); } _parent.Control.CreerFloor(0, -480, 1100, 20); BG.ParallaxRateSky = 1.1; BG.ParallaxRateCity = 1.05; BG.CheckScreen = function () { with (this) { MaxDw = MaxDw1; MaxUp = MaxUp1; MaxG = MaxG1; MaxD = MaxD1; if (BG.NoCamUpdate && ((++noUpdateCamCount) == noUpdateCamDelay)) { BG.NoCamUpdate = false; } } }; }
Instance of Symbol 1150 MovieClip "Pers" in Symbol 1374 MovieClip Frame 2
onClipEvent (load) { _parent.Control.CreerPers(this._x, this._y, "Jake"); this.gotoAndStop("D"); _global.Game.Pers.Etat = "Sleep"; _global.Game.Pers.setState("Idle"); }
Instance of Symbol 1154 MovieClip "Collider" in Symbol 1374 MovieClip Frame 2
onClipEvent (load) { this._visible = 0; }
Symbol 1391 MovieClip Frame 1
stop();
Instance of Symbol 1202 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "moveable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip "AntennaA" in Symbol 1391 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Symbol 1391 MovieClip Frame 2
_parent._parent.Control.CreerFloorBoss(this, this._x, this._y); stop();
Symbol 1392 MovieClip Frame 2
stop();
Instance of Symbol 560 MovieClip "Control" in Symbol 1393 MovieClip Frame 1
onClipEvent (load) { function ObjBg(PosX, PosY) { this.Nom = "Bg"; this.PosX = PosX; this.PosY = PosY; this.ParallaxPosX = 0; this.ParallaxPosY = 0; this.ParallaxSkyPosX = 0; this.ParallaxSkyPosY = 0; this.ParallaxCityPosX = 0; this.ParallaxCityPosY = 0; this.ParallaxRateSky = 1.2; this.ParallaxRateCity = 1.1; this.MoveX = 0; this.MoveY = 0; this.MaxDw = 0; this.MaxUp = 0; this.MaxG = 0; this.MaxD = 0; this.InvPosX = PosX * -1; this.InvPosY = PosY * -1; this.DeadX = PosX; this.DeadY = PosY; this.CurrentScreen = 1; this.OldScreen = 0; this.MaxYDie = 5000; this.CenterX = 300; this.CenterY = 370; this.SpdXD = 15; this.SpdXG = -15; this.SpdYDw = 20; this.SpdYUp = -20; this.SpdYUpForce = 0; this.InPause = false; this.NoCamUpdate = false; this.CamOnMedusa = false; } function ObjBox(Nom, PosX, PosY, Type, Dir) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.MoveX = 0; this.MoveY = 0; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 75; this.LgOutD = 525; this.LgOutUp = 25; this.LgOutDw = 475; this.LgHitG = 34; this.LgHitD = 35; this.LgHitUp = 25; this.LgHitDw = 26; this.HitRightX; this.HitLeftX; this.PushDir = Dir; this.Dir = Pers.Dir; if (Dir == "D") { _parent.Bg[1][Nom]._xscale = -100; } this.FlagUse = false; this.LandSide = "Center"; this.MinionBlock = 0; this.Etat = "Wait"; this.EtatOld = "Sleep"; this.FixedFlag = false; _parent.Collider.Sol.attachMovie("TopBox", Nom, _parent.Collider.Sol.getNextHighestDepth()); _parent.Collider.Wall.attachMovie("BorderBox", Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Ceil.attachMovie("BottomBox", Nom, _parent.Collider.Ceil.getNextHighestDepth()); this.frTurn = 20; this.SoundPush = false; this.WebDestroyed = false; this.MoveBox(); } function ObjPers(PosX, PosY, Perso) { this.nGetHitLeft = 0; this.nGetHitRight = 0; this.nGetHitTop = 0; 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.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.SpdYUpBase = 1.7; this.SpdYUp = this.SpdYUpBase; this.SpdYMax = 30; this.SpdYFall = 2.2; this.SpdYFly = 5; this.SpdXHitBase = 0; this.SpdYHitBase = -4; this.SpdStartJump = -17; this.SolOut = 2; this.SolHitMin = 5; this.MaxSol = 3; this.HitGrd = false; this.SolForJump = 6; this.DistYFall = 0; this.DistYFallMax = 900; this.autoSwitchDragon = false; this.DistYLand = 80; this.CanHit = false; this.CanBeHit = true; this.FrWalkNow = 1; this.InPause = false; this.FrJump = 1; this.FrFall = 1; this.FrLand = 13; this.FrGetHit = 7; this.FrGetHitCount = 0; this.FrBoomTir = 9; this.FrFinBoom = 6; this.FrDead = 20; this.FrDeadCount = 0; this.aCharacter = ["Jake", "Dragon"]; this.ICharacter = 0; this.Perso = this.aCharacter[this.ICharacter]; this.updatePerso(); this.LgGetShootX = 20; this.LgGetShootUp = 72; this.LgGetShootUpBas = 44; this.FrInvincibleCount = 0; this.FrInvincible = 20; this.Invincible = false; this.FrSwitchCharacter = 15; this.FrSwitchCharacterCount = 0; this.bCanSwitch = true; 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.nDragonPowerRythm = 25; this.nDragonPowerCount = 0; this.DragonHitTop = 0; this.DragonHitBottom = 0; this.DragonHeight = 130; this.onLadderID = null; this.ClimbedDistance = 0; this.ladderDisabledMax = 15; this.ladderDisabledCount = this.ladderDisabledMax; this.onBouncingID = null; this.bounceCount = 0; this.bounceCountMax = 3; this.bouncingDisabledMax = 15; this.bouncingDisabledCount = this.bouncingDisabledMax; this.bHitAttack = false; this.FrShootFire = 15; this.FrAttackTailHit = 9; this.CurrentFireID = null; if (_global.boss) { this.WaitForActions = true; } else { this.WaitForActions = false; } } function ObjPersBall(Type, Nom, PosX, PosY, Dir, HitBullet, Speed, Tab, HitSound, Rotation, SpdX, SpdY) { this.Nom = Nom; this.Type = Type; this.HitSound = HitSound; this.Tab = Tab; this.Etat = "Move"; this.EtatOld = "Idle"; this.Dir = Dir; this.OldDir = "D"; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 50; this.LgOutD = 600; this.LgOutUp = 0; this.LgOutDw = 500; this.CanBeKill = false; if (Dir == "D") { this.SpdX = Speed; } else { this.SpdX = -1 * Speed; _parent.Bg[1][Nom]._xscale = -100; } this.InPause = false; this.FrHit = HitBullet; this.FrHide = 1; if (Type == "Fire") { Pers.CurrentFireID = Nom; } if (Type == "Spark") { G_Medusa.CurrentSparkID = Nom; this.LgOutG = 1100; this.LgOutD = 1100; _parent.Bg[1][Nom]._xscale = -100; _parent.Bg[1][Nom]._rotation = Rotation; this.SpdX = SpdX; this.SpdY = SpdY; } } function ObjSwitch(Nom, PosX, PosY) { this.Nom = Nom; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 20; this.LgOnY = 20; this.PosX = PosX; this.PosY = PosY; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrBaisse = 13; } function ObjElevator(mc, Axis, Min, Max) { this.Nom = mc._name; this.mc = mc; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 750; this.LgOutG = 200; this.LgOutUp = 500; this.LgOutDw = 900; this.Speed = 2; this.frWaitCount = 0; this.frWaitTime = 30; this.LgOnX = 200; this.LgOnY = 25; this.PersOn = false; this.MoveX = 0; this.MoveY = 0; this.PosX = mc._x + 40; this.PosY = mc._y + 140; this.Axis = Axis; this.Min = this["Pos" + Axis] + Min; this.Max = this["Pos" + Axis] + Max; this.Active = false; this.InPause = false; this.Dir = -1; this.CanReposition = false; this.RepositionCount = 0; this.RepositionDelay = 30; _parent.Collider.Sol.attachMovie("GroundElevator", this.Nom, _parent.Collider.Sol.getNextHighestDepth()); _global.Game.CreerOverlay(mc._name + "ramp", "AM_RampeAscenseur01_overlay", {x:mc._x, y:mc._y + 140}); this.MoveElevator(); } function ObjLevier(Nom, PosX, PosY, listener) { this.Nom = Nom; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 30; this.LgOnY = 100; this.PosX = PosX; this.PosY = PosY; this.PersYCorrection = 60; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrFinLevelCount = 0; this.FrFinLevel = 70; this.Active = true; this.listener = listener; } function pointsGetAngle(l_x1, l_y1, l_x2, l_y2) { var _local4 = 0; var _local3 = 0; var _local1 = 0; var _local2 = 0; _local4 = (l_x1 - l_x2) * -1; _local3 = (l_y1 - l_y2) * -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); } function pointsGetDistance(l_x1, l_y1, l_x2, l_y2) { var _local1 = Math.sqrt(Math.pow(Math.abs(l_x2 - l_x1), 2) + Math.pow(Math.abs(l_y2 - l_y1), 2)); return(_local1); } function ObjLadder(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.obj; this.Etat = "Off"; this.EtatOld = "Off"; this.LgOnX = 70; this.LgOnY = 265; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; } function ObjBouncingChair(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.Obj; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOnX = 70; this.LgOnY = 50; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; _global.Game.CreerPlateforme({x:this.PosX, y:this.PosY}, 73); } function ObjHuntSoldier(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 115; this.AttackDelayCount = 0; this.AttackChance = 0.03; this.ShieldChance = 0.25; this.HurtCount = 0; } function ObjHuntWindow(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "IdleClose"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 450; this.LgOutDw = 450; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.AttackDelay = 100; this.AttackDelayCount = 0; if (PosX < 150) { this.HuntID = "A"; this.FlipPosition = 20; } else { this.HuntID = "B"; this.FlipPosition = -20; } this.OpenRangeDown = 450; this.OpenRangeUp = -20; this.OpenChanceDragon = 0.85; this.OpenChanceJake = 0.1; this.HuntEtat = "idle"; this.AttackDelay = 100; this.AttackDelayCount = 0; this.AttackChance = 0.85; this.FlipDelay = 10; this.FlipDelayCount = 0; this.CloseDelay = 100; this.closeDelayCount = 0; this.CloseChance = 0.5; this.FrThrow = 11; } function ObjMedusa(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -60; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSparkID = null; this.HasAttacked = false; G_Medusa = this; _global.Medusa = this; } function ObjMedusaSister(mc, Type, Nom, PosX, PosY) { this.mc = mc; this.Nom = Nom; this.Perso = Type; this.Etat = "Idle"; this.EtatOld = "Idle"; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -110; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSister = "SisterRight"; this.CurrentAction = "Idle"; this.MedusaAttack = false; } function ObjWall(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; _parent.Collider.Wall.attachMovie("WallHit", this.Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Wall[Nom]._x = PosX; _parent.Collider.Wall[Nom]._y = PosY; this.FrRemoveWallHit = 4; } function ObjDragonObstacle(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; } function ObjAntenna(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.ChargedDelay = 300; this.ChargedCount = 0; } function ObjBonus(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.CanBeKill = false; } _global.Game = this; this.KeyListener = new com.sarbakan.utils.KeyManager(); KeyListener.addKeyListener(39, "R"); KeyListener.addKeyListener(37, "L"); KeyListener.addKeyListener(40, "Dw"); KeyListener.addKeyListener(38, "Up"); KeyListener.addKeyListener(32, "Dragon"); KeyListener.addKeyListener(66, "Attack"); KeyListener.addKeyListener(78, "Action"); 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(); } } } }; CreerBg = function (PosX, PosY) { this.Bg = new ObjBg(PosX, PosY); }; ObjBg.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } CheckScreen(); if (!NoCamUpdate) { ScrollBg(); } } } }; ObjBg.prototype.ScrollBg = function () { with (this) { if (CamOnMedusa) { Pers.TrueX = _global.Medusa.TrueX; Pers.TrueY = _global.Medusa.TrueY; } if ((PosY <= MaxDw) and (PosY >= MaxUp)) { if (Pers.TrueX > (CenterX + 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else { if ((CenterX - Pers.TrueX) > SpdXG) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXG; } if ((PosX + MoveX) < MaxG) { MoveX = MaxG - PosX; } } } else if (Pers.TrueX < (CenterX - 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } else { if ((CenterX - Pers.TrueX) < SpdXD) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXD; } if ((PosX + MoveX) > MaxD) { MoveX = MaxD - PosX; } } } else { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } } } if ((PosX <= MaxD) and (PosX >= MaxG)) { if (Pers.TrueY > (CenterY + 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxUp - PosY; } else { MoveY = SpdYDw; } } else { if ((CenterY - Pers.TrueY) > SpdYUp) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYUp; } if ((PosY + MoveY) < MaxUp) { MoveY = MaxUp - PosY; } } } else if (Pers.TrueY < (CenterY - 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } else { if ((CenterY - Pers.TrueY) < SpdYDw) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYDw; } if ((PosY + MoveY) > MaxDw) { MoveY = MaxDw - PosY; } } } else { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxDw - PosY; } else { MoveY = SpdYDw; } } else if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } } } _parent._x = Math.floor(_parent._x + MoveX); PosX = _parent._x; InvPosX = PosX * -1; MoveX = 0; _parent._y = Math.floor(_parent._y + MoveY); PosY = _parent._y; InvPosY = PosY * -1; _global.MoveY = MoveY; MoveY = 0; _parent.ParallaxSky._y = (Math.floor(_parent._y / (-ParallaxRateSky)) + 350) + 30; ParallaxSkyPosY = _parent.ParallaxSky._y; _parent.ParallaxCity._y = (Math.floor(_parent._y / (-ParallaxRateCity)) + 140) + 30; ParallaxCityPosY = _parent.ParallaxCity._y; } }; CreerBox = function (Nom, PosX, PosY, Type, Dir) { if (this[Nom] == null) { this[Nom] = new ObjBox(Nom, PosX, PosY, Type, Dir); G_TabBox.push(Nom); } }; ObjBox.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBox.prototype.Wait = function () { with (this) { if (Type == "moveable") { CheckPush(); } CheckHitGrd(); CheckSleep(); CheckFall(); if (Type == "destroyable") { CheckDestroy(); } } }; ObjBox.prototype.Fall = function () { with (this) { CheckHitGrd(); SetSpdFall(); MoveBox(); if (((Nom == "BoxDestroyWeb") && (!WebDestroyed)) && (TrueY > 350)) { _global.Game.WebDestroyable.Etat = "Destroy"; WebDestroyed = true; } } }; ObjBox.prototype.Land = function () { with (this) { CheckHitGrd(); SetSpdLand(); MoveBox(); if ((TrueX > 0) && (TrueX < 500)) { _global.SoundCTRL.playSound("BoxLand", 100, 0); } } }; ObjBox.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe >= _parent.Bg[1][Nom].Etat._totalframes) { _parent.Bg[1][Nom].Etat.stop(); _parent.Collider.Sol[Nom].removeMovieClip(); _parent.Collider.Ceil[Nom].removeMovieClip(); _parent.Collider.Wall[Nom].removeMovieClip(); } } }; ObjBox.prototype.LandFin = function () { with (this) { Etat = "Wait"; Pers.PushedBox = 0; } }; ObjBox.prototype.Fixed = function () { with (this) { CheckSleep(); } }; ObjBox.prototype.CheckPush = function () { with (this) { if (Pers.Etat == "Push") { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.PushPoint)) { Dir = Pers.Dir; if (Dir == "D") { this.MoveX = 2; } else if (Dir == "G") { this.MoveX = -2; } CheckWall(); if (Pers.Dir != PushDir) { MoveX = 0; } MoveBox(); Pers.PushedBox = this; if (MoveX != 0) { _global.Snd.playSound("push", 100, 999, true); } } } else { _global.Snd.stopSound("push"); } } }; ObjBox.prototype.CheckDestroy = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjBox.prototype.CheckHitGrd = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (_parent.Collider.Sol.hitTest(HitX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitRightX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitLeftX, HitY, true)) { HitGrd = true; } else { HitGrd = false; } } }; ObjBox.prototype.SetSpdFall = function () { with (this) { MaxMoveY = 15; MoveY = MoveY + 5; if (MoveY > MaxMoveY) { MoveY = MaxMoveY; } aCheckPoint = [TrueX, HitLeftX, HitRightX]; for (CheckPointI in aCheckPoint) { var activePointX = aCheckPoint[CheckPointI]; if (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 2), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 4), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } } } }; ObjBox.prototype.SetSpdLand = function () { with (this) { while ((_parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true) || (_parent.Collider.Sol.hitTest(HitLeftX, TrueY + MoveY, true))) || (_parent.Collider.Sol.hitTest(HitRightX, TrueY + MoveY, true))) { MoveY--; } if (MoveY < 1) { MoveY = 1; Etat = "LandFin"; } } }; ObjBox.prototype.CheckFall = function () { with (this) { if (HitGrd == true) { MoveY = 0; Etat = "Wait"; } else { Etat = "Fall"; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } MoveX = 0; MoveY = 0; } } }; ObjBox.prototype.CheckWall = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (Pers.Dir == "G") { HitX = HitX + (MoveX - LgHitG); } else if (Pers.Dir == "D") { HitX = HitX + (MoveX + LgHitD); } if (_parent.Collider.Wall.hitTest(HitX, HitY, true)) { MoveX = 0; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } } } }; ObjBox.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjBox.prototype.MoveBox = function () { with (this) { PosX = Number(PosX + MoveX); PosY = Number(PosY + MoveY); _parent.Bg[1][Nom]._x = PosX; _parent.Bg[1][Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY - 15; _parent.Collider.Wall[Nom]._x = PosX + 30; _parent.Collider.Wall[Nom]._y = PosY + 4; _parent.Collider.Ceil[Nom]._x = PosX; _parent.Collider.Ceil[Nom]._y = PosY + 40; } }; ObjBox.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (FixedFlag) { Etat = "Fixed"; } else { Etat = "Wait"; } } } }; ObjBox.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = (PosY + _parent._y) + LgHitDw; HitRightX = TrueX + LgHitD; HitLeftX = TrueX - LgHitG; } }; ObjBox.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if ((NewAction == "Turn") || (NewAction == "Fixed")) { _parent.Bg[1][Nom].gotoAndStop(NewAction + Dir); } else { _parent.Bg[1][Nom].gotoAndStop(NewAction); } _parent.Bg[1][Nom].Etat.box.gotoAndStop(Type); _parent.Bg[1][Nom].Etat.box.box.gotoAndStop(Type); } }; ObjBox.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } SetTruePos(); this[Etat](); } } }; ObjPers.prototype.IdleJake = function () { with (this) { DistYFall = 0; KeepDeadPos = true; bCanAttack = true; if (Life > 0) { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckPush(); CheckJump(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusJake = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.RunJake = function () { with (this) { bCanAttack = true; DistYFall = 0; SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckJump(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartJake = function () { with (this) { Pers.bouncingDisabledCount = 0; CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); MovePers(); if (HitGrd == true) { Etat = "Land"; } else if (SpdYNow >= 0) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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"; } } else if (DistYFall >= DistYFallMax) { autoSwitchDragon = true; } CheckHole(); } }; ObjPers.prototype.JumpLandingJake = function () { with (this) { CheckGetFire(); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (!_global.Game[onBouncingID].CheckPersOn()) { bounceCount = 0; Pers.onBouncingID = null; } if (_parent.Pers.Obj.Etat._currentframe >= 3) { if (_global.energy <= 0) { _global.energy = 0; Etat = "Die"; } } if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.ClimbingJake = function () { with (this) { SpdXNow = 0; SpdYNow = 0; CheckHitGrd(); if ((Pers.ClimbedDistance > 30) && (HitGrd)) { Etat = "Idle"; Pers.ladderDisabledCount = 0; } else if (KeyListener.Action) { Etat = "Fall"; } else { if (KeyListener.L) { SpdXNow = -2; } else if (KeyListener.R) { SpdXNow = 2; } if (KeyListener.Up) { SpdYNow = -3; } else if (KeyListener.Dw) { SpdYNow = 3; } SetMoveX(); SetMoveY(); CheckWall(FrontX, FrontY - 15); CheckWall(BackX, FrontY - 15); CheckWall(FrontX, FrontY); CheckWall(BackX, FrontY); CheckWall(FrontX, FrontY + 15); CheckWall(BackX, FrontY + 15); CheckWall(FrontX, FrontY + 30); CheckWall(BackX, FrontY + 30); CheckWall(FrontX, FrontY + 45); CheckWall(BackX, FrontY + 45); MovePers(); Pers.ClimbedDistance++; } if ((SpdXNow != 0) || (SpdYNow != 0)) { if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { _parent.Pers.Obj.Etat.gotoAndStop(1); } else { _parent.Pers.Obj.Etat.nextFrame(); } } else { _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.ActivateJake = function () { with (this) { CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.HurtJake = function () { with (this) { if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetJake = function () { with (this) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } }; ObjPers.prototype.AttackJake = function () { with (this) { CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe == Math.round(_parent.Pers.Obj.Etat._totalframes / 2)) { bHitAttack = true; } else { bHitAttack = false; } if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.GetHitJake = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireJake = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformJake = function () { with (this) { DistYFall = 0; if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 1; Etat = "Idle"; nDragonPowerCount = 0; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.PushJake = function () { with (this) { CheckHitGrd(); PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (!KeyListener.Action) { Etat = "Idle"; } else if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (PushedBox != 0) { MoveX = PushedBox.MoveX; } else { MoveX = 0; } } else { var AddBlock = (35 * NumDir); var i = 0; while (i != AddBlock) { if (_parent.Collider.Wall.hitTest(PushPointX + i, PushPointY, true)) { goToTarget = true; if (((i > 5) && (NumDir == 1)) || ((i < -5) && (NumDir == -1))) { MoveX = 5 * NumDir; } else { MoveX = i; } break; } i = i + NumDir; } } MovePers(); } }; ObjPers.prototype.TransformFallJake = ObjPers.prototype.TransformJake; ObjPers.prototype.DieJake = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { _parent.Pers.Obj.Etat.stop(); if (FrDeadCount == 0) { _global.lives--; _global.Snd.stopSound("lift"); _global.Snd.stopSound("push"); if (_global.lives == 0) { _global.Packaging.showLoseScreen(); } else { _global.HUD.fade(resetLevel); } } FrDeadCount++; } } }; ObjPers.prototype.SleepJake = function () { }; ObjPers.prototype.IdleDragon = function () { with (this) { bCanAttack = true; KeepDeadPos = true; if (Life > 0) { SetSpdDragon(); SetMoveX(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdDragon(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusDragon = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.FlyDragon = function () { with (this) { bCanAttack = true; SetSpdDragon(); SetMoveX(); SetMoveY(); CheckDragonObstacle(); CheckWall(FrontX, FrontY); CheckCeilDragon(); CheckSolDragon(); CheckGroundDragon(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartDragon = function () { with (this) { CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleDragon = function () { with (this) { SetSpdDragonJump(); 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 = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallDragon = function () { with (this) { SetSpdDragonJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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.JumpLandingDragon = function () { with (this) { CheckGetFire(); this["CheckAttack" + Perso](); if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) { if (Life <= 0) { Etat = "Die"; } else { Etat = "Idle"; } } } }; ObjPers.prototype.HurtDragon = function () { with (this) { MovePers(); if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); Etat = "Idle"; FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetDragon = ObjPers.prototype.HurtDragon; ObjPers.prototype.AttackTailDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrAttackTailHit) { bHitAttack = true; } else { bHitAttack = false; } } }; ObjPers.prototype.AttackFireDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrShootFire) { if (Dir == "D") { CreerFireBall(PosX + 70, PosY - 70, Dir); } else { CreerFireBall(PosX - 70, PosY - 70, Dir); } } } }; ObjPers.prototype.GetHitDragon = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireDragon = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 0; Etat = "Fall"; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.DieDragon = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { FrDeadCount++; _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.SleepDragon = function () { }; CreerPers = function (PosX, PosY, Perso) { this.Pers = new ObjPers(PosX, PosY, Perso); }; ObjPers.prototype.CharacterSwitch = function () { with (this) { if (Etat == "Fall") { Etat = "TransformFall"; } else { Etat = "Transform"; } } }; ObjPers.prototype.HeroChange = function (NewHero) { with (this) { Perso = NewHero; updatePerso(); } }; ObjPers.prototype.GetHitGeneral = function () { with (this) { SetSpdXHit(); CheckWall(BackX, TrueY); CheckHitGrd(); CheckSol(); MovePers(); CheckDie(); } }; 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.SetSpdXHit = function () { with (this) { MoveX = SpdXNow; if (SpdXNow > 0) { SpdXNow = SpdXNow * 0.7; } if (Dir eq "D") { MoveX = MoveX * -1; } } }; ObjPers.prototype.SetSpdXJake = 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.SetSpdDragon = function () { with (this) { if (KeyListener.R == true) { Dir = "D"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase; } } else if (KeyListener.L == true) { Dir = "G"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase * -1; } } else { SpdXNow = 0; } if (KeyListener.Dw == true) { SpdYNow = SpdYFly; } else if (KeyListener.Up == true) { SpdYNow = SpdYFly * -1; } else { SpdYNow = 0; } if ((SpdXNow == 0) && (SpdYNow == 0)) { Etat = "Idle"; } else { Etat = "Fly"; } } }; 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.SetMoveX = function () { with (this) { MoveX = SpdXNow; } }; ObjPers.prototype.SetMoveY = function () { with (this) { MoveY = SpdYNow; } }; 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.CheckDragonObstacle = function () { with (this) { if (MoveY != 0) { if (_parent.Collider.Dragon.hitTest(TopX, TopY + MoveY, true)) { MoveY = DragonHitTop; } else if (_parent.Collider.Dragon.hitTest(BottomFrontX, (TopY + MoveY) + DragonHeight, true) or _parent.Collider.Dragon.hitTest(BottomBackX, (TopY + MoveY) + DragonHeight, true)) { MoveY = DragonHitBottom; } } } }; 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.CheckSolDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Sol.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckCeilDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; SpdYNow = 0; } } } }; ObjPers.prototype.CheckGroundDragon = function () { with (this) { if (MoveY > 0) { if (_parent.Collider.Sol.hitTest(BottomFrontX, TrueY - _parent.Pers.Obj.HitBottomFront._y, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckJump = function () { with (this) { if (Etat != "Push") { if ((!KeyListener.Up) && (!bJumpRelease)) { bJumpRelease = true; } if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) { bJumpRelease = false; if (Etat == "Run") { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } else { Etat = "JumpStart"; } } } } }; ObjPers.prototype.CheckPush = function () { with (this) { PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (KeyListener.Action && (((Dir == "G") && (KeyListener.L)) || ((Dir == "D") && (KeyListener.R)))) { Etat = "Push"; } } } }; ObjPers.prototype.CheckAttackJake = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "Attack"; } } }; ObjPers.prototype.CheckAttackDragon = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackTail"; } if ((KeyListener.Action == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackFire"; } } }; ObjPers.prototype.CheckFall = function () { with (this) { if (SpdYNow >= SpdYFall) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.CheckDie = function () { with (this) { if (_global.energy <= 0) { _global.dragonPower = 0; Etat = "Fall"; } } }; ObjPers.prototype.MovePers = function () { with (this) { if ((Pers.TrueX + MoveX) < 30) { MoveX = (TrueX * -1) + 30; } else if ((Pers.TrueX + MoveX) > 520) { MoveX = 520 - Pers.TrueX; } PosX = _parent.Pers._x + MoveX; _parent.Pers._x = PosX; MoveX = 0; PosY = _parent.Pers._y + MoveY; _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]; if ((onBouncingID != null) && (_global.Game[onBouncingID].CheckPersOn() != true)) { Pers.SpdYUp = Pers.SpdYUpBase; } 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; } }; 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; } }; ObjPers.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Pers.gotoAndStop((Perso + "_") + Dir); } }; ObjPers.prototype.Actions = function () { with (this) { if (WaitForActions) { SetTruePos(); CheckHitGrd(); CheckSol(); CheckFall(); WaitForActions = false; } else if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Pers.Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Pers.Obj.Etat.play(); } SetTruePos(); InvincibleCheck(); this[Etat + aCharacter[ICharacter]](); CheckCharSwitch(); CheckHit(); CheckEndLevel(); } } }; ObjPers.prototype.CheckCharSwitch = function () { with (this) { if (ICharacter == 1) { if ((KeyListener.Dragon || (_global.dragonPower == 0)) && (Etat != "HurtNet")) { CharacterSwitch(); } else if ((++nDragonPowerCount) == nDragonPowerRythm) { _global.dragonPower--; nDragonPowerCount = 0; if (_global.dragonPower < 0) { _global.dragonPower = 0; } } } else { if (((KeyListener.Dragon || (autoSwitchDragon)) && (bCanSwitch)) && (_global.dragonPower > 0)) { autoSwitchDragon = false; bCanSwitch = false; FrSwitchCharacterCount = FrSwitchCharacter; CharacterSwitch(); } if (!bCanSwitch) { FrSwitchCharacterCount--; if (FrSwitchCharacterCount == 0) { bCanSwitch = true; } } } } }; ObjPers.prototype.CheckEndLevel = function () { with (this) { if (!_global.boss) { if (((_global.level == 1) && (PosY <= -3930)) && (PosX >= 390)) { _global.HUD.fade(bossStart); _global.boss = true; } if ((_global.level == 2) && (PosY <= -4670)) { _global.HUD.fade(bossStart); _global.boss = true; } if (((_global.level == 3) && (PosY <= -5800)) && (PosX <= 105)) { _global.HUD.fade(bossStart); _global.boss = true; } } } }; ObjPers.prototype.CheckHit = function () { with (this) { if (KeyListener.X && (CanBeHit)) { this.GetHit(); } } }; CreerNetBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("NetBall", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Net", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerFireBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("JackDragon_FireAnim", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Fire", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerSparkBall = function (PosX, PosY, Dir, Rotation, SpdX, SpdY) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("Medusa_Blast", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Spark", _local4, PosX, PosY, Dir, 8, 0, G_TabPersBall, "SlimeSplat", Rotation, SpdX, SpdY); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; ObjPersBall.prototype.Move = function () { with (this) { _parent.Bg[1][Nom]._x = PosX + SpdX; PosX = PosX + SpdX; if (SpdY) { _parent.Bg[1][Nom]._y = PosY + SpdY; PosY = PosY + SpdY; } SetTruePos(); CheckHit(); CheckOut(); } }; ObjPersBall.prototype.Hit = function () { with (this) { if ((Type == "Net") && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { Pers.Etat = "HurtNet"; _global.Snd.playSound("hurtNet", 100, 1, false); CanBeKill = true; } } }; ObjPersBall.prototype.End = function () { with (this) { if (((Type == "Fire") || (Type == "Spark")) && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { CanBeKill = true; } } }; ObjPersBall.prototype.Burn = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckHit = function () { with (this) { if (Type == "Net") { if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Burn"; _global.Game[Pers.CurrentFireID].Etat = "End"; } else if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.Hit))) { Etat = "Hit"; } } if (((Type == "Spark") && (Pers.Etat != "Activate")) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.HitFront))) { Pers.Etat = "Hurt"; Etat = "End"; } if (((Type == "Spark") && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1].FinalHit))) && (G_Medusa.Etat != "Die")) { _global.HUD.increaseScore(10000); _parent.Control.Bg.CamOnMedusa = true; G_Medusa.Etat = "Die"; } } }; ObjPersBall.prototype.CheckOut = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckKill = function () { with (this) { if (CanBeKill == true) { KillBall(); } } }; ObjPersBall.prototype.KillBall = function () { with (this) { if (Tab == G_TabPersBall) { G_TabPersBall.splice(PersBallI, 1); PersBallI = PersBallI - 1; } else if (Tab == G_TabMinionBall) { G_TabMinionBall.splice(MinionBallI, 1); MinionBallI = MinionBallI - 1; } delete _parent.Control[Nom]; _parent.Bg[1][Nom].removeMovieClip(); if (Type == "Fire") { Pers.CurrentFireID = null; } if (Type == "Spark") { G_Medusa.CurrentSparkID = null; } } }; ObjPersBall.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjPersBall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].gotoAndStop(NewAction); } }; ObjPersBall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Etat.play(); } this[Etat](); CheckKill(); } } }; CreerSwitch = function (Nom, PosX, PosY) { if (this[Nom] == null) { this[Nom] = new ObjSwitch(Nom, PosX, PosY); G_TabSwitch.push(Nom); } }; ObjSwitch.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjSwitch.prototype.Idle = function () { with (this) { CheckPersOn(); CheckBoxOn(); CheckSleep(); } }; ObjSwitch.prototype.Baisse = function () { with (this) { if (_parent[Nom].Etat._currentframe >= FrBaisse) { _global.SoundCTRL.playSound("SwitchOn", 100, 0); _parent[Nom].Activate(); Etat = "Active"; } } }; ObjSwitch.prototype.Active = function () { with (this) { CheckSleep(); if (!FlagBoxUse) { CheckRelease(); } } }; ObjSwitch.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { FlagUse = true; Etat = "Baisse"; } } }; ObjSwitch.prototype.CheckBoxOn = function () { with (this) { var Box = Pers.PushedBox; if ((Pers.Etat == "Push") && (Box != 0)) { if (Box.Dir == "G") { if (((((Box.PosX - Box.LgHitG) >= (PosX - LgOnX)) and ((Box.PosX - Box.LgHitG) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Etat = "Baisse"; Activate(); } } else if (Box.Dir == "D") { if (((((Box.PosX + Box.LgHitD) >= (PosX - LgOnX)) and ((Box.PosX + Box.LgHitD) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } else if ((Box.Etat == "LandFin") && (Box != 0)) { if ((((Box.PosX >= (PosX - LgOnX)) and (Box.PosX <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; Box.Dir = ""; _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } }; ObjSwitch.prototype.CheckRelease = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { } else { Etat = "Idle"; FlagUse = false; _parent[Nom].Desactivate(); _global.SoundCTRL.playSound("SwitchOff", 100, 0); } } }; ObjSwitch.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjSwitch.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjSwitch.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjSwitch.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerElevator = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjElevator(l_mcElement, "Y", 0, -1 * l_mcElement.distance); G_TabElevator.push(l_mcElement._name); } }; this.onSwitchLift = function (l_Nom) { with (this) { if (_global.Game[l_Nom + "Lift"].Active == true) { _global.Game[l_Nom + "Lift"].Active = false; _global.Game[l_Nom].Etat = "Idle"; _global.Snd.stopSound("lift"); } else { _global.Game[l_Nom + "Lift"].Active = true; _global.Game[l_Nom].Etat = "IdleActivate"; _global.Snd.playSound("lift", 100, 999, true); } } }; ObjElevator.prototype.Sleep = function () { with (this) { CheckActif(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Idle = function () { with (this) { CheckSleep(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Wait = function () { with (this) { if (frWaitCount >= frWaitTime) { Etat = "Idle"; frWaitCount = 0; } else { frWaitCount++; } } }; ObjElevator.prototype.SetMove = function () { with (this) { CheckPersOn(); CheckLimit(); MoveElevator(); } }; ObjElevator.prototype.MoveElevator = function () { with (this) { this["Pos" + Axis] = this["Pos" + Axis] + this["Move" + Axis]; _parent[Nom]._x = PosX; _parent[Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY; if (PersOn) { Pers["Move" + Axis] = this["Move" + Axis]; Pers.MovePers(); } UpdateLift(); } }; ObjElevator.prototype.UpdateLift = function () { with (this) { var cableH = (this["Pos" + Axis] - Max); mc.Obj.cable1._height = cableH; mc.Obj.cable2._height = cableH; mc._y = mc._y + this["Move" + Axis]; mc._parent[Nom.substr(0, -4)]._y = mc._parent[Nom.substr(0, -4)]._y + this["Move" + Axis]; _global.Game[Nom.substr(0, -4)].PosY = _global.Game[Nom.substr(0, -4)].PosY + this["Move" + Axis]; _global.Game._parent.overlay[Nom + "ramp"]._y = _global.Game._parent.overlay[Nom + "ramp"]._y + this["Move" + Axis]; _global.Game._parent.Bg[1][Nom + "ramp"]._y = _global.Game._parent.Bg[1][Nom + "ramp"]._y + this["Move" + Axis]; } }; ObjElevator.prototype.CheckLimit = function () { with (this) { this["Move" + Axis] = Speed * Dir; if ((Dir == -1) && ((this["Pos" + Axis] + this["Move" + Axis]) <= Max)) { Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = false; CanReposition = true; RepositionCount = 0; Dir = 0; } if ((Dir == 1) && ((this["Pos" + Axis] + this["Move" + Axis]) >= Min)) { CanReposition = false; Dir = -1; Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = true; _global.Game[Nom.substr(0, -4)].Etat = "Idle"; } } }; ObjElevator.prototype.CheckReposition = function () { with (this) { if (CanReposition) { CheckPersOn(); if (!PersOn) { if ((++RepositionCount) == RepositionDelay) { RepositionCount = 0; CanReposition = false; Active = true; Dir = 1; _global.Snd.playSound("lift", 100, 999, true); } } } } }; ObjElevator.prototype.Activate = function () { with (this) { Active = true; } }; ObjElevator.prototype.Desactivate = function () { with (this) { Active = false; } }; ObjElevator.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { PersOn = true; } else { PersOn = false; } } }; ObjElevator.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { Etat = "Idle"; if (Active) { CheckLimit(); MoveElevator(); } } } }; ObjElevator.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjElevator.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjElevator.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLevier = function (Nom, PosX, PosY, listener) { if (this[Nom] == null) { this[Nom] = new ObjLevier(Nom, PosX, PosY, listener); G_TabLevier.push(Nom); } }; ObjLevier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjLevier.prototype.Idle = function () { with (this) { if (Active) { CheckPersOn(); CheckSleep(); } } }; ObjLevier.prototype.IdleActivate = ObjLevier.prototype.Idle; ObjLevier.prototype.Activate = function () { with (this) { if (Pers.ICharacter == 0) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.Etat == "Activate")) && (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes)) { listener(Nom); } } } }; ObjLevier.prototype.CheckPersOn = function () { with (this) { if ((Pers.ICharacter == 0) && (Pers.Etat != "Push")) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.HitGrd == true)) && (Pers.CanBeHit || (Pers.Invincible))) { if (KeyListener.Action) { Pers.canJumpCount = 0; Etat = "Activate"; Pers.Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); } } } else if (((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); } else if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); _global.Game[Pers.CurrentFireID].Etat = "End"; } } }; ObjLevier.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjLevier.prototype.CheckSleep = function () { }; ObjLevier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjLevier.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLadder = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjLadder(l_mcElement); G_TabLadder.push(l_mcElement._name); } }; this.onSwitchLadder = function (l_Nom) { with (this) { _global.Game[l_Nom + "Ladder"].Etat = "Opening"; } }; ObjLadder.prototype.Off = function () { with (this) { } }; ObjLadder.prototype.Opening = function () { with (this) { if (mc.etat._currentframe == mc.etat._totalframes) { Etat = "On"; } } }; ObjLadder.prototype.On = function () { with (this) { CheckPersOn(); } }; ObjLadder.prototype.CheckPersOn = function () { with (this) { if (Pers.ladderDisabledCount >= Pers.ladderDisabledMax) { if (((((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= PosY)) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { if (((Pers.ICharacter == 0) && (Pers.Etat != "Climbing")) && (Pers.Etat != "Hurt")) { if ((KeyListener.Up && (Pers.PosY >= (PosY + 70))) || (KeyListener.Dw && (Pers.PosY <= (PosY + 165)))) { Pers.onLadderID = Nom; Pers.Etat = "Climbing"; Pers.ClimbedDistance = 0; } } } else if ((Pers.Etat == "Climbing") && (Pers.onLadderID == Nom)) { if (Pers.PosX < PosX) { Pers.ChangeDir("G"); } if (Pers.PosX > (PosX + LgOnX)) { Pers.ChangeDir("D"); } Pers.Etat = "Fall"; Pers.onLadderID = null; } } else { Pers.ladderDisabledCount++; } } }; ObjLadder.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjLadder.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerBouncingChair = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBouncingChair(l_mcElement); G_TabChair.push(l_mcElement._name); } }; ObjBouncingChair.prototype.Idle = function () { with (this) { if (CheckPersOn()) { Etat = "Bounce"; if ((Pers.onBouncingID == Nom) && (Pers.HitGrd)) { Pers.onBouncingID = null; } } } }; ObjBouncingChair.prototype.Bounce = function () { with (this) { if (mc.Etat._currentframe == 9) { BouncePers(); } if (mc.Etat._currentframe == mc.Etat._totalframes) { Etat = "Idle"; } } }; ObjBouncingChair.prototype.CheckPersOn = function () { with (this) { if ((((((((Pers.ICharacter == 0) && (Pers.Etat != "Idle")) && (Pers.Etat != "Run")) and (Pers.PosX >= PosX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { return(true); } } }; ObjBouncingChair.prototype.BouncePers = function () { with (this) { if (CheckPersOn()) { Pers.SpdYUp = Pers.SpdYUpBase; if (Pers.onBouncingID != Nom) { Pers.onBouncingID = Nom; Pers.bounceCount = 0; } else { Pers.bounceCount++; if (Pers.bounceCount > 0) { Pers.bounceCount = Pers.bounceCountMax; } Pers.SpdYUp = Pers.SpdYUp - (Pers.bounceCount * 0.34); } Pers.Etat = "JumpStart"; } else if (Pers.HitGrd) { Pers.onBouncingID = null; } } }; ObjBouncingChair.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjBouncingChair.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerHuntSoldier = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntSoldier"; this[l_mcElement._name] = new ObjHuntSoldier(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntSoldier.push(l_mcElement._name); } }; ObjHuntSoldier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntSoldier.prototype.Idle = function () { with (this) { CheckAttack(); CheckShield(); CheckDir(); CheckHurt(); CheckSleep(); } }; ObjHuntSoldier.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Stunned = ObjHuntSoldier.prototype.Hurt; ObjHuntSoldier.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack1 = function () { with (this) { if (((Pers.Etat != "Hurt") && (_parent.Bg[1][Nom].Obj.Etat._currentframe >= 9)) && (_parent.Bg[1][Nom].Obj.Etat._currentframe <= 25)) { if (_parent.Bg[1][Nom].Obj.Etat.wave.hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack2 = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 7) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; _global.Snd.playSound("hurtJake", 100, 1, false); } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjHuntSoldier.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if ((Etat != "Shield") && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { if ((++HurtCount) == 3) { enemyHitScore(); Etat = "Stunned"; HurtCount = 0; } else { Etat = "Hurt"; } if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } } }; ObjHuntSoldier.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjHuntSoldier.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Math.abs(Pers.PosY - PosY) < 180) && (Math.random() < AttackChance)) { if (Math.abs(Pers.PosX - PosX) < 150) { Etat = "Attack2"; } else { Etat = "Attack1"; } AttackDelayCount = 0; } } }; ObjHuntSoldier.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntSoldier.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjHuntSoldier.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntSoldier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjHuntSoldier.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerHuntWindow = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntWindow"; this[l_mcElement._name] = new ObjHuntWindow(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntWindow.push(l_mcElement._name); } }; ObjHuntWindow.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntWindow.prototype.IdleClose = function () { with (this) { CheckCanOpen(); CheckSleep(); } }; ObjHuntWindow.prototype.IdleOpen = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt._currentframe == 1) { _parent.Bg[1][Nom].Obj.Etat.Hunt.gotoAndStop(HuntID); SetHuntEtat("Appear"); if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } } if ((HuntEtat == "Appear") && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { SetHuntEtat("idle"); } if (HuntEtat == "idle") { CheckFlip(); CheckAttack(); } if (((HuntEtat == "disappear") || (HuntEtat == "flee")) && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat.stop(); Etat = "Close"; if (HuntEtat == "flee") { _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = -80; } } if (HuntEtat == "Throw") { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes) { SetHuntEtat("idle"); } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == FrThrow) { var l_dir = "G"; if (HuntID == "A") { l_dir = "D"; } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { if (l_dir == "D") { l_dir = "G"; } else { l_dir = "D"; } } var l_netY = 70; if (PosY < Pers.TrueY) { l_netY = l_netY + (Math.abs(Pers.PosY - TrueY) - 150); } else { l_netY = l_netY - Math.abs(Pers.PosY - TrueY); } if (l_netY > 120) { l_netY = 120; } if (l_netY < 20) { l_netY = 20; } CreerNetBall(PosX, PosY + l_netY, l_dir); _global.Snd.playSound("net", 130, 1, false); } } CheckCanClose(); CheckHurt(); CheckSleep(); } }; ObjHuntWindow.prototype.Open = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleOpen"; AttackDelayCount = AttackDelay * 0.9; } } }; ObjHuntWindow.prototype.Close = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleClose"; _global.Game["G_HuntWindowCurrent" + HuntID] = null; } } }; ObjHuntWindow.prototype.CheckCanOpen = function () { with (this) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == null) { if (_global.Game[("G_Window" + HuntID) + "OpenDelayCount"] >= _global.Game.G_WindowOpenDelay) { if ((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown))) { if (((Pers.ICharacter == 0) && (Math.random() <= OpenChanceJake)) || ((Pers.ICharacter == 1) && (Math.random() <= OpenChanceDragon))) { Etat = "Open"; _global.Game["G_HuntWindowCurrent" + HuntID] = Nom; _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = 0; } } } } } }; ObjHuntWindow.prototype.CheckCanClose = function () { with (this) { if (CloseDelayCount < CloseDelay) { CloseDelayCount++; } else if ((HuntEtat != "disappear") && ((!((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown)))) || ((Pers.ICharacter == 0) && (Math.random() <= CloseChance)))) { if (Math.random() <= OpenChance) { SetHuntEtat("disappear"); CloseDelayCount = 0; } } } }; ObjHuntWindow.prototype.CheckFlip = function () { with (this) { if (FlipDelayCount < FlipDelay) { FlipDelayCount++; } else { if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } FlipDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Pers.ICharacter == 1) && (Math.abs(Pers.PosY - PosY) < 300)) { SetHuntEtat("Throw"); AttackDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckHurt = function () { with (this) { if ((((HuntEtat == "idle") || (HuntEtat == "Throw")) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].Obj.hitTest(_parent.Pers.Obj.HitFront))) { SetHuntEtat("flee"); enemyHitScore(); if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } }; ObjHuntWindow.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "IdleClose"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntWindow.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == Nom) { _global.Game["G_HuntWindowCurrent" + HuntID] = null; } Etat = "Sleep"; } } }; ObjHuntWindow.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntWindow.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.window.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.overlay.gotoAndStop(G_CurrentLevel); } }; ObjHuntWindow.prototype.SetHuntEtat = function (newEtat) { with (this) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.gotoAndStop(newEtat); HuntEtat = newEtat; } }; ObjHuntWindow.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusa = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "Medusa"; this[l_mcElement._name] = new ObjMedusa(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusa.push(l_mcElement._name); } }; ObjMedusa.prototype.Idle = function () { with (this) { CheckAttack(); CheckDir(); CheckHurt(); } }; ObjMedusa.prototype.Captured = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showNextScreen(); } } }; ObjMedusa.prototype.Die = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showWinScreen(); } } }; ObjMedusa.prototype.Laugh = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Attack = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe < FrPrepareAttack) { CheckDir(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrPrepareAttack) { if (Pers.ICharacter == 0) { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 1.5)); } else { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 3)); } NextAttackRotation = Math.round(pointsGetAngle(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY)); var l_dst = pointsGetDistance(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY); var l_step = (l_dst / 20); NextAttackRotationSpdX = (Pers.TrueX - G_Medusa.TrueX) / l_step; NextAttackRotationSpdY = (l_PersY - G_Medusa.TrueY) / l_step; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrAttack) { var l_PosX = PosX; CreerSparkBall(PosX, PosY - 95, Dir, NextAttackRotation, NextAttackRotationSpdX, NextAttackRotationSpdY); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { HasAttacked = true; Etat = "Idle"; } CheckHurt(); } }; ObjMedusa.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjMedusa.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Laugh"; } } } }; ObjMedusa.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjMedusa.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if (Math.random() < AttackChance) { Etat = "Attack"; HasAttacked = false; AttackDelayCount = 0; } } }; ObjMedusa.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjMedusa.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjMedusa.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjMedusa.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusaSister = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "MedusaSister"; this[l_mcElement._name] = new ObjMedusaSister(l_mcElement, Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusaSister.push(l_mcElement._name); } }; ObjMedusaSister.prototype.UpdateSister = function (SisterID) { with (this) { if (CurrentSister == SisterID) { mc[SisterID].gotoAndStop(CurrentAction); } else { mc[SisterID].gotoAndStop("Idle"); } } }; ObjMedusaSister.prototype.UpdatePosition = function () { with (this) { var l_maxOffset = 70; var l_posX = Math.abs(_parent.Control.Bg.PosX); mc._x = -((l_posX / 450) * l_maxOffset); mc._y = mc._y + (_global.MoveY / 2.5); if (mc._y < 145) { mc._y = 145; } } }; ObjMedusaSister.prototype.UpdateAttack = function () { with (this) { if ((CurrentAction == "Idle") && (!MedusaAttack)) { if ((++AttackDelayCount) == AttackDelay) { if (CurrentSister == "SisterLeft") { CurrentSister = "SisterRight"; } else { CurrentSister = "SisterLeft"; } CurrentAction = "Charge"; AttackDelayCount = 0; } } else if (CurrentAction == "Charge") { if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { var PersY = Math.abs(_global.Game.Pers.PosY); switch (true) { case PersY < 100 : CurrentAction = "Attack3"; break; case PersY < 250 : CurrentAction = "Attack2"; break; case PersY >= 250 : CurrentAction = "Attack1"; } } } else if (((CurrentAction == "Attack1") || (CurrentAction == "Attack2")) || (CurrentAction == "Attack3")) { if (mc[CurrentSister].Etat._currentframe == 9) { if ((Pers.Etat != "Activate") && (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Pers))) { Pers.Etat = "Hurt"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna1)) { _global.Game.Antenna1.Etat = "Charged"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna2)) { _global.Game.Antenna2.Etat = "Charged"; } } if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { CurrentAction = "Idle"; if (CurrentSister == "SisterRight") { MedusaAttack = true; G_Medusa.HasAttacked = false; } } } if (!MedusaAttack) { G_Medusa.AttackDelayCount = 0; } else if (G_Medusa.HasAttacked) { MedusaAttack = false; } } }; ObjMedusaSister.prototype.Actions = function () { with (this) { UpdatePosition(); UpdateAttack(); UpdateSister("SisterLeft"); UpdateSister("SisterRight"); } }; CreerWall = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjWall(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabWall.push(l_mcElement._name); } }; ObjWall.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjWall.prototype.Idle = function () { with (this) { CheckHurt(); CheckSleep(); } }; ObjWall.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrRemoveWallHit) { _parent.Collider.Wall[Nom].removeMovieClip(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Out"; } } }; ObjWall.prototype.CheckHurt = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjWall.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjWall.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjWall.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjWall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.wall.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.wall.gotoAndStop(G_CurrentLevel); } }; ObjWall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerDragonObstacle = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjDragonObstacle(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabDragonObstacle.push(l_mcElement._name); } }; ObjDragonObstacle.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjDragonObstacle.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjDragonObstacle.prototype.Hit = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.HitBoss = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 4) { _global.Game.Web.Etat = "Fall"; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.Fall = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == (_parent.Bg[1][Nom].Obj.Etat._totalframes - 1)) { G_Medusa.Etat = "Captured"; } } }; ObjDragonObstacle.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _parent.Bg[1][Nom].Obj.Etat.stop(); } } }; ObjDragonObstacle.prototype.CheckHit = function () { with (this) { if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitTop) || (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitBottomFront)))) { Pers.Etat = "Hurt"; Etat = "Hit"; Pers.InvincibleEnd(); Pers.MoveY = 40; } } }; ObjDragonObstacle.prototype.CheckActif = function () { with (this) { if (_global.boss || (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep"))) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjDragonObstacle.prototype.CheckSleep = function () { with (this) { if (((((!_global.boss) && (PosX < (Bg.InvPosX - LgOutG))) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjDragonObstacle.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjDragonObstacle.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjDragonObstacle.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerAntenna = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjAntenna(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabAntenna.push(l_mcElement._name); } }; ObjAntenna.prototype.Idle = function () { with (this) { CheckHit(); } }; ObjAntenna.prototype.Charged = function () { with (this) { CheckHit(); if ((++ChargedCount) == ChargedDelay) { Etat = "Idle"; ChargedCount = 0; } } }; ObjAntenna.prototype.CheckHit = function () { with (this) { if ((G_Medusa.CurrentSparkID != null) && (Pers.Etat != "Hurt")) { if (_parent.Bg[1][Nom].Obj.Hit.hitTest(_parent.Bg[1][G_Medusa.CurrentSparkID])) { Etat = "Charged"; ChargedCount = 0; if ((_global.level == 1) && (_global.Game.Web.Etat != "Fall")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Web.Etat = "Fall"; _global.HUD.increaseScore(1000); } if ((((_global.level == 2) && (_global.Game.Antenna1.Etat == "Charged")) && (_global.Game.Antenna2.Etat == "Charged")) && (_global.Game.Wire.Etat != "HitBoss")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Wire.Etat = "HitBoss"; _global.HUD.increaseScore(2000); } } } } }; ObjAntenna.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjAntenna.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if (Etat == "Charged") { _global.Snd.playSound("antenna", 250, 1, false); } _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjAntenna.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerBonus = function (type, l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBonus(type, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabBonus.push(l_mcElement._name); } }; ObjBonus.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjBonus.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBonus.prototype.CheckHit = function () { with (this) { if (((Pers.ICharacter == 0) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj))) || ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.Hit)))) { switch (Type) { case "Score" : _global.Score = _global.Score + 500; _global.Snd.playSound("energy", 200, 1, false); _global.HUD.increaseScore(500); break; case "Life" : if (_global.lives < 3) { _global.lives++; } _global.Snd.playSound("life", 200, 1, false); _global.HUD.increaseScore(200); break; case "Energy" : _global.energy = _global.energy + 50; if (_global.energy > 100) { _global.energy = 100; } _global.Snd.playSound("bonus", 300, 1, false); _global.HUD.increaseScore(200); break; case "Power" : _global.dragonPower = 100; _global.Snd.playSound("power", 300, 1, false); _global.HUD.increaseScore(200); } KillBonus(); } } }; ObjBonus.prototype.KillBonus = function () { with (this) { G_TabBonus.splice(BonusI, 1); BonusI = BonusI - 1; delete _parent.Control[Nom]; _parent.Bg[1][Nom].swapDepths(90210); _parent.Bg[1][Nom].removeMovieClip(); } }; ObjBonus.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { Etat = "Idle"; } } }; ObjBonus.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjBonus.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjBonus.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); CheckKill(); } } }; this.cnt = 0; this.G_CurrentLevel = _global.level; switch (G_CurrentLevel) { case 1 : this.G_MaxEnemyHit = 28; break; case 2 : this.G_MaxEnemyHit = 28; break; case 3 : this.G_MaxEnemyHit = 38; } G_MaxEnemyHitCount = 0; this.G_Pause = true; this.G_PauseOut = false; this.G_PRealese = true; this.G_Resume = false; this.G_TabBox = new Array(); this.G_TabSwitch = new Array(); this.G_TabDoor = new Array(); this.G_TabElevator = new Array(); this.G_TabPersBall = new Array(); this.G_TabLevier = new Array(); this.G_TabLadder = new Array(); this.G_TabChair = new Array(); this.G_TabHuntSoldier = new Array(); this.G_TabHuntWindow = new Array(); this.G_TabMedusa = new Array(); this.G_TabMedusaSister = new Array(); this.G_TabWall = new Array(); this.G_TabDragonObstacle = new Array(); this.G_TabAntenna = new Array(); this.G_TabBonus = new Array(); this.G_NextPersBall = 1; this.G_NextPersBallDepth = 10000; this.G_NextMinionBall = 1; this.G_NextMinionBallDepth = 20000; this.G_OverlayDepth = 0; this.G_HuntWindowCurrentA = null; this.G_HuntActiveSinceA = 0; this.G_HuntWindowCurrentB = null; this.G_HuntActiveSinceB = 0; this.G_AlphaZones = new Array(); this.G_Medusa = null; this.G_WindowOpenDelay = 20; this.G_WindowAOpenDelayCount = 0; this.G_WindowBOpenDelayCount = 0; this.addAlphaZone = function (mc) { if (_global.Packaging.bShadowDisabled) { mc._visible = false; } }; this.resetLevel = function () { _global.dragonPower = 100; _global.energy = 100; if (_global.boss) { _global.resetDestination = "Game_BOSS" + _global.level; } else { _global.resetDestination = "Game_LEVEL" + _global.level; } _parent._parent.gotoAndStop("Reset"); }; this.bossStart = function () { _global.boss = true; _global.resetDestination = "Game_BOSS" + _global.level; _parent._parent.gotoAndStop("Reset"); }; this.enemyHitScore = function () { if ((++G_MaxEnemyHitCount) < G_MaxEnemyHit) { _global.HUD.increaseScore(100); } }; this.Creer_PBalcony = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + l_mcElement._parent._y; CreerPlateforme(pt, 235); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PRoofTop = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; var pt = new Object(); pt = {x:l_mcElement._x - 5, y:l_mcElement._y + 95}; var mcCeil = _parent.Collider.Ceil; mcCeil.moveTo(pt.x, pt.y); mcCeil.beginFill(16711935); pt.x = pt.x + 115; pt.y = pt.y - 70; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x + 115; pt.y = pt.y + 70; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y - 80; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x - 230; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y + 80; mcCeil.lineTo(pt.x, pt.y); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBalconyOpen = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + (l_mcElement._parent._y + 10); CreerPlateforme(pt, 235); if (l_mcElement.flipped) { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01OverlayFlip", {x:pt.x + 32, y:pt.y}, true); CreerObstacle({x:pt.x + 19, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); } else { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01Overlay", {x:pt.x + 120, y:pt.y + 0.5}, true); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 195, y:pt.y}, 15, 15); } _parent.overlay[l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); _parent.Bg[1][l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBox = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; 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; CreerPlateforme(pt, 70); CreerObstacle(pt, 70, 70); } }; this.CheckVisible = function () { if ((this._y < (Bg.InvPosY - Stage.height)) or (this._y > (Bg.InvPosY + Stage.height))) { this._visible = false; } else { this._visible = true; } }; 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.CreerObstacleDragon = function (pt, l_nWidth, l_nHeight) { var _local3 = _parent.Collider.Dragon; pt.x = Math.round(pt.x); pt.y = Math.round(pt.y); _local3.moveTo(pt.x, pt.y); _local3.beginFill(16776960); _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.CreerOverlay = function (id, linkage, pt, bReversed) { var _local4; var _local5; _local5 = _parent.overlay.attachMovie(linkage, id, G_OverlayDepth++); _local5._x = pt.x; _local5._y = pt.y; _local4 = _parent.Bg[1].attachMovie(linkage, id, G_OverlayDepth++); _local4._x = pt.x; _local4._y = pt.y; _local4.overlay = _local5; if (!bReversed) { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = false; this.overlay._visible = true; } else { this._visible = true; this.overlay._visible = false; } }; } else { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = true; this.overlay._visible = false; } else { this._visible = false; this.overlay._visible = true; } }; } }; this.replaceTile = function (l_mcElement) { var _local1 = l_mcElement._name; var _local2 = 1499; if (_local1.slice(0, 8) == "instance") { } else { l_mcElement._x = 0; l_mcElement._y = -((Number(_local1) - 1) * _local2); } }; this.CreerFloor = function (l_nPosX, l_nPosY, l_nWidth, l_nHeight) { var mcGround = _parent.Collider.Sol; with (this) { pt = new Object(); pt = {x:l_nPosX, y:l_nPosY}; pt.y = pt.y - l_nHeight; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor1 = 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 + -60; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloorBoss = 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 + -88; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor2a = 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 + 120; 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); pt.x = pt.x + 360; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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); } }; } onClipEvent (enterFrame) { BoxI = 0; for (BoxI in G_TabBox) { var BoxActif = G_TabBox[BoxI]; if (this[BoxActif].Etat != this[BoxActif].EtatOld) { this[BoxActif].ChangeEtat(this[BoxActif].Etat); } this[BoxActif].Actions(); } PersBallI = 0; for (PersBallI in G_TabPersBall) { var PersBallActif = G_TabPersBall[PersBallI]; if (this[PersBallActif].Etat != this[PersBallActif].EtatOld) { this[PersBallActif].ChangeEtat(this[PersBallActif].Etat); } this[PersBallActif].Actions(); } LevierI = 0; for (LevierI in G_TabLevier) { var LevierActif = G_TabLevier[LevierI]; if (this[LevierActif].Etat != this[LevierActif].EtatOld) { this[LevierActif].ChangeEtat(this[LevierActif].Etat); } this[LevierActif].Actions(); } LadderI = 0; for (LadderI in G_TabLadder) { var LadderActif = G_TabLadder[LadderI]; if (this[LadderActif].Etat != this[LadderActif].EtatOld) { this[LadderActif].ChangeEtat(this[LadderActif].Etat); } this[LadderActif].Actions(); } ChairI = 0; for (ChairI in G_TabChair) { var ChairActif = G_TabChair[ChairI]; if (this[ChairActif].Etat != this[ChairActif].EtatOld) { this[ChairActif].ChangeEtat(this[ChairActif].Etat); } this[ChairActif].Actions(); } ElevatorI = 0; for (ElevatorI in G_TabElevator) { var ElevatorActif = G_TabElevator[ElevatorI]; if (this[ElevatorActif].Etat != this[ElevatorActif].EtatOld) { this[ElevatorActif].ChangeEtat(this[ElevatorActif].Etat); } this[ElevatorActif].Actions(); } I = 0; for (HuntSoldierI in G_TabHuntSoldier) { var HuntSoldierActif = G_TabHuntSoldier[HuntSoldierI]; if (this[HuntSoldierActif].Dir != this[HuntSoldierActif].DirOld) { this[HuntSoldierActif].ChangeDir(this[HuntSoldierActif].Dir); } if (this[HuntSoldierActif].Etat != this[HuntSoldierActif].EtatOld) { this[HuntSoldierActif].ChangeEtat(this[HuntSoldierActif].Etat); } this[HuntSoldierActif].Actions(); } I = 0; for (HuntWindowI in G_TabHuntWindow) { var HuntWindowActif = G_TabHuntWindow[HuntWindowI]; if (this[HuntWindowActif].Dir != this[HuntWindowActif].DirOld) { this[HuntWindowActif].ChangeDir(this[HuntWindowActif].Dir); } if (this[HuntWindowActif].Etat != this[HuntWindowActif].EtatOld) { this[HuntWindowActif].ChangeEtat(this[HuntWindowActif].Etat); } this[HuntWindowActif].Actions(); } if (!G_Pause) { if (_global.Game.G_HuntWindowCurrentA == null) { _global.Game.G_WindowAOpenDelayCount++; } if (_global.Game.G_HuntWindowCurrentB == null) { _global.Game.G_WindowBOpenDelayCount++; } } I = 0; for (MedusaI in G_TabMedusa) { var MedusaActif = G_TabMedusa[MedusaI]; if (this[MedusaActif].Dir != this[MedusaActif].DirOld) { this[MedusaActif].ChangeDir(this[MedusaActif].Dir); } if (this[MedusaActif].Etat != this[MedusaActif].EtatOld) { this[MedusaActif].ChangeEtat(this[MedusaActif].Etat); } this[MedusaActif].Actions(); } I = 0; for (WallI in G_TabWall) { var WallActif = G_TabWall[WallI]; if (this[WallActif].Dir != this[WallActif].DirOld) { this[WallActif].ChangeDir(this[WallActif].Dir); } if (this[WallActif].Etat != this[WallActif].EtatOld) { this[WallActif].ChangeEtat(this[WallActif].Etat); } this[WallActif].Actions(); } I = 0; for (DragonObstacleI in G_TabDragonObstacle) { var DragonObstacleActif = G_TabDragonObstacle[DragonObstacleI]; if (this[DragonObstacleActif].Dir != this[DragonObstacleActif].DirOld) { this[DragonObstacleActif].ChangeDir(this[DragonObstacleActif].Dir); } if (this[DragonObstacleActif].Etat != this[DragonObstacleActif].EtatOld) { this[DragonObstacleActif].ChangeEtat(this[DragonObstacleActif].Etat); } this[DragonObstacleActif].Actions(); } I = 0; for (AntennaI in G_TabAntenna) { var AntennaActif = G_TabAntenna[AntennaI]; if (this[AntennaActif].Dir != this[AntennaActif].DirOld) { this[AntennaActif].ChangeDir(this[AntennaActif].Dir); } if (this[AntennaActif].Etat != this[AntennaActif].EtatOld) { this[AntennaActif].ChangeEtat(this[AntennaActif].Etat); } this[AntennaActif].Actions(); } I = 0; for (MedusaSisterI in G_TabMedusaSister) { var MedusaSisterActif = G_TabMedusaSister[MedusaSisterI]; if (this[MedusaSisterActif].Dir != this[MedusaSisterActif].DirOld) { this[MedusaSisterActif].ChangeDir(this[MedusaSisterActif].Dir); } if (this[MedusaSisterActif].Etat != this[MedusaSisterActif].EtatOld) { this[MedusaSisterActif].ChangeEtat(this[MedusaSisterActif].Etat); } this[MedusaSisterActif].Actions(); } I = 0; for (BonusI in G_TabBonus) { var BonusActif = G_TabBonus[BonusI]; if (this[BonusActif].Dir != this[BonusActif].DirOld) { this[BonusActif].ChangeDir(this[BonusActif].Dir); } if (this[BonusActif].Etat != this[BonusActif].EtatOld) { this[BonusActif].ChangeEtat(this[BonusActif].Etat); } this[BonusActif].Actions(); } if (Pers.Dir != Pers.DirOld) { Pers.ChangeDir(Pers.Dir); } if (Pers.Etat != Pers.EtatOld) { Pers.setState(Pers.Etat); } this.Pers.Actions(); this.Bg.Actions(); _global.HUD.update(); G_CheckPause(); }
Symbol 1393 MovieClip Frame 2
stop(); _global.C.beginLevel();
Instance of Symbol 1392 MovieClip "Bg" in Symbol 1393 MovieClip Frame 2
onClipEvent (load) { this._x = 0; this._y = 0; this.noUpdateCamCount = 0; this.noUpdateCamDelay = 50; _parent.Control.CreerBg(_parent._x, _parent._y); BG = _parent.Control.Bg; Pers = _global.Game.Pers; for (var i in _parent.Bg) { if (Number(_parent.Bg[i]._name) <= 20) { _parent.Bg[i].gotoAndStop(2); } else { _parent.Bg[i].gotoAndStop(3); } } BG.NoCamUpdate = true; if (_global.level == 1) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -300; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(380, -280, 250, 20); } if (_global.level == 2) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -450; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(95, -280, 250, 20); _parent.Control.CreerFloor(725, -280, 250, 20); } if (_global.level == 3) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -450; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(95, -280, 250, 20); _parent.Control.CreerFloor(725, -280, 250, 20); } _parent.Control.CreerFloor(0, -480, 1100, 20); BG.ParallaxRateSky = 1.1; BG.ParallaxRateCity = 1.05; BG.CheckScreen = function () { with (this) { MaxDw = MaxDw1; MaxUp = MaxUp1; MaxG = MaxG1; MaxD = MaxD1; if (BG.NoCamUpdate && ((++noUpdateCamCount) == noUpdateCamDelay)) { BG.NoCamUpdate = false; } } }; }
Instance of Symbol 1150 MovieClip "Pers" in Symbol 1393 MovieClip Frame 2
onClipEvent (load) { _parent.Control.CreerPers(this._x, this._y, "Jake"); this.gotoAndStop("D"); _global.Game.Pers.Etat = "Sleep"; _global.Game.Pers.setState("Idle"); }
Instance of Symbol 1154 MovieClip "Collider" in Symbol 1393 MovieClip Frame 2
onClipEvent (load) { this._visible = 0; }
Symbol 1406 MovieClip Frame 1
stop();
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "moveable", "G"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "regular", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "destroyable", "D"); }
Instance of Symbol 1202 MovieClip in Symbol 1406 MovieClip Frame 1
onClipEvent (load) { _global.Game.CreerBox(this._name, this._x, this._y, "moveable", "D"); }
Symbol 1406 MovieClip Frame 2
_parent._parent.Control.CreerFloorBoss(this, this._x, this._y); stop();
Symbol 1407 MovieClip Frame 2
stop();
Instance of Symbol 560 MovieClip "Control" in Symbol 1408 MovieClip Frame 1
onClipEvent (load) { function ObjBg(PosX, PosY) { this.Nom = "Bg"; this.PosX = PosX; this.PosY = PosY; this.ParallaxPosX = 0; this.ParallaxPosY = 0; this.ParallaxSkyPosX = 0; this.ParallaxSkyPosY = 0; this.ParallaxCityPosX = 0; this.ParallaxCityPosY = 0; this.ParallaxRateSky = 1.2; this.ParallaxRateCity = 1.1; this.MoveX = 0; this.MoveY = 0; this.MaxDw = 0; this.MaxUp = 0; this.MaxG = 0; this.MaxD = 0; this.InvPosX = PosX * -1; this.InvPosY = PosY * -1; this.DeadX = PosX; this.DeadY = PosY; this.CurrentScreen = 1; this.OldScreen = 0; this.MaxYDie = 5000; this.CenterX = 300; this.CenterY = 370; this.SpdXD = 15; this.SpdXG = -15; this.SpdYDw = 20; this.SpdYUp = -20; this.SpdYUpForce = 0; this.InPause = false; this.NoCamUpdate = false; this.CamOnMedusa = false; } function ObjBox(Nom, PosX, PosY, Type, Dir) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.MoveX = 0; this.MoveY = 0; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 75; this.LgOutD = 525; this.LgOutUp = 25; this.LgOutDw = 475; this.LgHitG = 34; this.LgHitD = 35; this.LgHitUp = 25; this.LgHitDw = 26; this.HitRightX; this.HitLeftX; this.PushDir = Dir; this.Dir = Pers.Dir; if (Dir == "D") { _parent.Bg[1][Nom]._xscale = -100; } this.FlagUse = false; this.LandSide = "Center"; this.MinionBlock = 0; this.Etat = "Wait"; this.EtatOld = "Sleep"; this.FixedFlag = false; _parent.Collider.Sol.attachMovie("TopBox", Nom, _parent.Collider.Sol.getNextHighestDepth()); _parent.Collider.Wall.attachMovie("BorderBox", Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Ceil.attachMovie("BottomBox", Nom, _parent.Collider.Ceil.getNextHighestDepth()); this.frTurn = 20; this.SoundPush = false; this.WebDestroyed = false; this.MoveBox(); } function ObjPers(PosX, PosY, Perso) { this.nGetHitLeft = 0; this.nGetHitRight = 0; this.nGetHitTop = 0; 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.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.SpdYUpBase = 1.7; this.SpdYUp = this.SpdYUpBase; this.SpdYMax = 30; this.SpdYFall = 2.2; this.SpdYFly = 5; this.SpdXHitBase = 0; this.SpdYHitBase = -4; this.SpdStartJump = -17; this.SolOut = 2; this.SolHitMin = 5; this.MaxSol = 3; this.HitGrd = false; this.SolForJump = 6; this.DistYFall = 0; this.DistYFallMax = 900; this.autoSwitchDragon = false; this.DistYLand = 80; this.CanHit = false; this.CanBeHit = true; this.FrWalkNow = 1; this.InPause = false; this.FrJump = 1; this.FrFall = 1; this.FrLand = 13; this.FrGetHit = 7; this.FrGetHitCount = 0; this.FrBoomTir = 9; this.FrFinBoom = 6; this.FrDead = 20; this.FrDeadCount = 0; this.aCharacter = ["Jake", "Dragon"]; this.ICharacter = 0; this.Perso = this.aCharacter[this.ICharacter]; this.updatePerso(); this.LgGetShootX = 20; this.LgGetShootUp = 72; this.LgGetShootUpBas = 44; this.FrInvincibleCount = 0; this.FrInvincible = 20; this.Invincible = false; this.FrSwitchCharacter = 15; this.FrSwitchCharacterCount = 0; this.bCanSwitch = true; 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.nDragonPowerRythm = 25; this.nDragonPowerCount = 0; this.DragonHitTop = 0; this.DragonHitBottom = 0; this.DragonHeight = 130; this.onLadderID = null; this.ClimbedDistance = 0; this.ladderDisabledMax = 15; this.ladderDisabledCount = this.ladderDisabledMax; this.onBouncingID = null; this.bounceCount = 0; this.bounceCountMax = 3; this.bouncingDisabledMax = 15; this.bouncingDisabledCount = this.bouncingDisabledMax; this.bHitAttack = false; this.FrShootFire = 15; this.FrAttackTailHit = 9; this.CurrentFireID = null; if (_global.boss) { this.WaitForActions = true; } else { this.WaitForActions = false; } } function ObjPersBall(Type, Nom, PosX, PosY, Dir, HitBullet, Speed, Tab, HitSound, Rotation, SpdX, SpdY) { this.Nom = Nom; this.Type = Type; this.HitSound = HitSound; this.Tab = Tab; this.Etat = "Move"; this.EtatOld = "Idle"; this.Dir = Dir; this.OldDir = "D"; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.LgOutG = 50; this.LgOutD = 600; this.LgOutUp = 0; this.LgOutDw = 500; this.CanBeKill = false; if (Dir == "D") { this.SpdX = Speed; } else { this.SpdX = -1 * Speed; _parent.Bg[1][Nom]._xscale = -100; } this.InPause = false; this.FrHit = HitBullet; this.FrHide = 1; if (Type == "Fire") { Pers.CurrentFireID = Nom; } if (Type == "Spark") { G_Medusa.CurrentSparkID = Nom; this.LgOutG = 1100; this.LgOutD = 1100; _parent.Bg[1][Nom]._xscale = -100; _parent.Bg[1][Nom]._rotation = Rotation; this.SpdX = SpdX; this.SpdY = SpdY; } } function ObjSwitch(Nom, PosX, PosY) { this.Nom = Nom; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 20; this.LgOnY = 20; this.PosX = PosX; this.PosY = PosY; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrBaisse = 13; } function ObjElevator(mc, Axis, Min, Max) { this.Nom = mc._name; this.mc = mc; this.Etat = "Sleep"; this.EtatOld = "Sleep"; this.LgOutD = 750; this.LgOutG = 200; this.LgOutUp = 500; this.LgOutDw = 900; this.Speed = 2; this.frWaitCount = 0; this.frWaitTime = 30; this.LgOnX = 200; this.LgOnY = 25; this.PersOn = false; this.MoveX = 0; this.MoveY = 0; this.PosX = mc._x + 40; this.PosY = mc._y + 140; this.Axis = Axis; this.Min = this["Pos" + Axis] + Min; this.Max = this["Pos" + Axis] + Max; this.Active = false; this.InPause = false; this.Dir = -1; this.CanReposition = false; this.RepositionCount = 0; this.RepositionDelay = 30; _parent.Collider.Sol.attachMovie("GroundElevator", this.Nom, _parent.Collider.Sol.getNextHighestDepth()); _global.Game.CreerOverlay(mc._name + "ramp", "AM_RampeAscenseur01_overlay", {x:mc._x, y:mc._y + 140}); this.MoveElevator(); } function ObjLevier(Nom, PosX, PosY, listener) { this.Nom = Nom; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutD = 542; this.LgOutG = 42; this.LgOutUp = 15; this.LgOutDw = 450; this.LgOnX = 30; this.LgOnY = 100; this.PosX = PosX; this.PosY = PosY; this.PersYCorrection = 60; this.FlagUse = false; this.FlagBoxUse = false; this.InPause = false; this.FrFinLevelCount = 0; this.FrFinLevel = 70; this.Active = true; this.listener = listener; } function pointsGetAngle(l_x1, l_y1, l_x2, l_y2) { var _local4 = 0; var _local3 = 0; var _local1 = 0; var _local2 = 0; _local4 = (l_x1 - l_x2) * -1; _local3 = (l_y1 - l_y2) * -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); } function pointsGetDistance(l_x1, l_y1, l_x2, l_y2) { var _local1 = Math.sqrt(Math.pow(Math.abs(l_x2 - l_x1), 2) + Math.pow(Math.abs(l_y2 - l_y1), 2)); return(_local1); } function ObjLadder(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.obj; this.Etat = "Off"; this.EtatOld = "Off"; this.LgOnX = 70; this.LgOnY = 265; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; } function ObjBouncingChair(l_mcElement) { this.Nom = l_mcElement._name; this.mc = l_mcElement.Obj; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOnX = 70; this.LgOnY = 50; this.PosX = l_mcElement._x; this.PosY = l_mcElement._y; this.InPause = false; _global.Game.CreerPlateforme({x:this.PosX, y:this.PosY}, 73); } function ObjHuntSoldier(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 115; this.AttackDelayCount = 0; this.AttackChance = 0.03; this.ShieldChance = 0.25; this.HurtCount = 0; } function ObjHuntWindow(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "IdleClose"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 450; this.LgOutDw = 450; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.AttackDelay = 100; this.AttackDelayCount = 0; if (PosX < 150) { this.HuntID = "A"; this.FlipPosition = 20; } else { this.HuntID = "B"; this.FlipPosition = -20; } this.OpenRangeDown = 450; this.OpenRangeUp = -20; this.OpenChanceDragon = 0.85; this.OpenChanceJake = 0.1; this.HuntEtat = "idle"; this.AttackDelay = 100; this.AttackDelayCount = 0; this.AttackChance = 0.85; this.FlipDelay = 10; this.FlipDelayCount = 0; this.CloseDelay = 100; this.closeDelayCount = 0; this.CloseChance = 0.5; this.FrThrow = 11; } function ObjMedusa(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Perso = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -60; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSparkID = null; this.HasAttacked = false; G_Medusa = this; _global.Medusa = this; } function ObjMedusaSister(mc, Type, Nom, PosX, PosY) { this.mc = mc; this.Nom = Nom; this.Perso = Type; this.Etat = "Idle"; this.EtatOld = "Idle"; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; this.AttackDelay = 20; this.AttackDelayCount = -110; this.AttackChance = 1; this.FrPrepareAttack = 35; this.FrAttack = 63; this.NextAttackRotation = 0; this.NextAttackSpdX = 0; this.NextAttackSpdY = 0; this.CurrentSister = "SisterRight"; this.CurrentAction = "Idle"; this.MedusaAttack = false; } function ObjWall(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.TooNearWall = false; this.DistMinWall = 100; _parent.Collider.Wall.attachMovie("WallHit", this.Nom, _parent.Collider.Wall.getNextHighestDepth()); _parent.Collider.Wall[Nom]._x = PosX; _parent.Collider.Wall[Nom]._y = PosY; this.FrRemoveWallHit = 4; } function ObjDragonObstacle(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Sleep"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; } function ObjAntenna(Nom, PosX, PosY) { this.Nom = Nom; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.Dir = "D"; this.OldDir = Dir; this.BaseDir = Dir; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.GetHitG = 50; this.GetHitD = 50; this.GetHitUp = 115; this.GetHitDw = 0; this.LgCheckPersX = 500; this.LgCheckFightX = 100; this.LgHitX = 60; this.LgHitUp = 35; this.LgHitDw = 60; this.LgFront = 35; this.LgHitBox = 42; this.LgCharge = 65; this.LgBack = 35; this.AssPointX = 12; this.AssPointY = 35; this.Life = 2; this.InPause = false; this.ChargedDelay = 300; this.ChargedCount = 0; } function ObjBonus(Type, Nom, PosX, PosY) { this.Nom = Nom; this.Type = Type; this.PosX = PosX; this.PosY = PosY; this.TrueX = PosX; this.TrueY = PosY; this.Etat = "Idle"; this.EtatOld = "Idle"; this.LgOutG = 0; this.LgOutD = 550; this.LgOutUp = 400; this.LgOutDw = 400; this.CanBeKill = false; } _global.Game = this; this.KeyListener = new com.sarbakan.utils.KeyManager(); KeyListener.addKeyListener(39, "R"); KeyListener.addKeyListener(37, "L"); KeyListener.addKeyListener(40, "Dw"); KeyListener.addKeyListener(38, "Up"); KeyListener.addKeyListener(32, "Dragon"); KeyListener.addKeyListener(66, "Attack"); KeyListener.addKeyListener(78, "Action"); 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(); } } } }; CreerBg = function (PosX, PosY) { this.Bg = new ObjBg(PosX, PosY); }; ObjBg.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } CheckScreen(); if (!NoCamUpdate) { ScrollBg(); } } } }; ObjBg.prototype.ScrollBg = function () { with (this) { if (CamOnMedusa) { Pers.TrueX = _global.Medusa.TrueX; Pers.TrueY = _global.Medusa.TrueY; } if ((PosY <= MaxDw) and (PosY >= MaxUp)) { if (Pers.TrueX > (CenterX + 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else { if ((CenterX - Pers.TrueX) > SpdXG) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXG; } if ((PosX + MoveX) < MaxG) { MoveX = MaxG - PosX; } } } else if (Pers.TrueX < (CenterX - 1)) { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } else { if ((CenterX - Pers.TrueX) < SpdXD) { MoveX = CenterX - Pers.TrueX; } else { MoveX = SpdXD; } if ((PosX + MoveX) > MaxD) { MoveX = MaxD - PosX; } } } else { if ((Pers.HitGrd == false) and (Pers.TrueY >= 300)) { SpdXG = -30; SpdXD = 30; } else if (Pers.SpdXNow > 0) { SpdXG = (Pers.SpdXNow * -1) - 5; } else if (Pers.SpdXNow < 0) { SpdXD = (Pers.SpdXNow * -1) + 5; } else { SpdXG = -8; SpdXD = 8; } if (PosX < MaxG) { if ((PosX + SpdXD) > MaxG) { MoveX = MaxG - PosX; } else { MoveX = SpdXD; } } else if (PosX > MaxD) { if ((PosX + SpdXG) < MaxD) { MoveX = MaxD - PosX; } else { MoveX = SpdXG; } } } } if ((PosX <= MaxD) and (PosX >= MaxG)) { if (Pers.TrueY > (CenterY + 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxUp - PosY; } else { MoveY = SpdYDw; } } else { if ((CenterY - Pers.TrueY) > SpdYUp) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYUp; } if ((PosY + MoveY) < MaxUp) { MoveY = MaxUp - PosY; } } } else if (Pers.TrueY < (CenterY - 1)) { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } else { if ((CenterY - Pers.TrueY) < SpdYDw) { MoveY = CenterY - Pers.TrueY; } else { MoveY = SpdYDw; } if ((PosY + MoveY) > MaxDw) { MoveY = MaxDw - PosY; } } } else { if (Pers.SpdYNow > 0) { SpdYUp = (Pers.SpdYNow * -1) - 5; } else if (Pers.SpdYNow < 0) { SpdYDw = (Pers.SpdYNow * -1) + 5; } else { SpdYUp = -5; SpdYDw = 5; } if (SpdYUpForce != 0) { SpdYUp = SpdYUpForce; } if (PosY < MaxUp) { if ((PosY + SpdYDw) > MaxUp) { MoveY = MaxDw - PosY; } else { MoveY = SpdYDw; } } else if (PosY > MaxDw) { if ((PosY + SpdYUp) < MaxDw) { MoveY = MaxDw - PosY; } else { MoveY = SpdYUp; } } } } _parent._x = Math.floor(_parent._x + MoveX); PosX = _parent._x; InvPosX = PosX * -1; MoveX = 0; _parent._y = Math.floor(_parent._y + MoveY); PosY = _parent._y; InvPosY = PosY * -1; _global.MoveY = MoveY; MoveY = 0; _parent.ParallaxSky._y = (Math.floor(_parent._y / (-ParallaxRateSky)) + 350) + 30; ParallaxSkyPosY = _parent.ParallaxSky._y; _parent.ParallaxCity._y = (Math.floor(_parent._y / (-ParallaxRateCity)) + 140) + 30; ParallaxCityPosY = _parent.ParallaxCity._y; } }; CreerBox = function (Nom, PosX, PosY, Type, Dir) { if (this[Nom] == null) { this[Nom] = new ObjBox(Nom, PosX, PosY, Type, Dir); G_TabBox.push(Nom); } }; ObjBox.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBox.prototype.Wait = function () { with (this) { if (Type == "moveable") { CheckPush(); } CheckHitGrd(); CheckSleep(); CheckFall(); if (Type == "destroyable") { CheckDestroy(); } } }; ObjBox.prototype.Fall = function () { with (this) { CheckHitGrd(); SetSpdFall(); MoveBox(); if (((Nom == "BoxDestroyWeb") && (!WebDestroyed)) && (TrueY > 350)) { _global.Game.WebDestroyable.Etat = "Destroy"; WebDestroyed = true; } } }; ObjBox.prototype.Land = function () { with (this) { CheckHitGrd(); SetSpdLand(); MoveBox(); if ((TrueX > 0) && (TrueX < 500)) { _global.SoundCTRL.playSound("BoxLand", 100, 0); } } }; ObjBox.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe >= _parent.Bg[1][Nom].Etat._totalframes) { _parent.Bg[1][Nom].Etat.stop(); _parent.Collider.Sol[Nom].removeMovieClip(); _parent.Collider.Ceil[Nom].removeMovieClip(); _parent.Collider.Wall[Nom].removeMovieClip(); } } }; ObjBox.prototype.LandFin = function () { with (this) { Etat = "Wait"; Pers.PushedBox = 0; } }; ObjBox.prototype.Fixed = function () { with (this) { CheckSleep(); } }; ObjBox.prototype.CheckPush = function () { with (this) { if (Pers.Etat == "Push") { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.PushPoint)) { Dir = Pers.Dir; if (Dir == "D") { this.MoveX = 2; } else if (Dir == "G") { this.MoveX = -2; } CheckWall(); if (Pers.Dir != PushDir) { MoveX = 0; } MoveBox(); Pers.PushedBox = this; if (MoveX != 0) { _global.Snd.playSound("push", 100, 999, true); } } } else { _global.Snd.stopSound("push"); } } }; ObjBox.prototype.CheckDestroy = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjBox.prototype.CheckHitGrd = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (_parent.Collider.Sol.hitTest(HitX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitRightX, HitY, true)) { HitGrd = true; } else if (_parent.Collider.Sol.hitTest(HitLeftX, HitY, true)) { HitGrd = true; } else { HitGrd = false; } } }; ObjBox.prototype.SetSpdFall = function () { with (this) { MaxMoveY = 15; MoveY = MoveY + 5; if (MoveY > MaxMoveY) { MoveY = MaxMoveY; } aCheckPoint = [TrueX, HitLeftX, HitRightX]; for (CheckPointI in aCheckPoint) { var activePointX = aCheckPoint[CheckPointI]; if (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 2), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } if (_parent.Collider.Sol.hitTest(activePointX, TrueY + (MoveY / 4), true)) { MoveY = 5; while (_parent.Collider.Sol.hitTest(activePointX, TrueY + MoveY, true)) { MoveY--; } Etat = "Land"; break; } } } }; ObjBox.prototype.SetSpdLand = function () { with (this) { while ((_parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true) || (_parent.Collider.Sol.hitTest(HitLeftX, TrueY + MoveY, true))) || (_parent.Collider.Sol.hitTest(HitRightX, TrueY + MoveY, true))) { MoveY--; } if (MoveY < 1) { MoveY = 1; Etat = "LandFin"; } } }; ObjBox.prototype.CheckFall = function () { with (this) { if (HitGrd == true) { MoveY = 0; Etat = "Wait"; } else { Etat = "Fall"; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } MoveX = 0; MoveY = 0; } } }; ObjBox.prototype.CheckWall = function () { with (this) { var HitX = TrueX; var HitY = TrueY; if (Pers.Dir == "G") { HitX = HitX + (MoveX - LgHitG); } else if (Pers.Dir == "D") { HitX = HitX + (MoveX + LgHitD); } if (_parent.Collider.Wall.hitTest(HitX, HitY, true)) { MoveX = 0; if (SoundPush) { _global.SoundCTRL.fadeOutSound("BoxPushed"); SoundPush = false; } } } }; ObjBox.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjBox.prototype.MoveBox = function () { with (this) { PosX = Number(PosX + MoveX); PosY = Number(PosY + MoveY); _parent.Bg[1][Nom]._x = PosX; _parent.Bg[1][Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY - 15; _parent.Collider.Wall[Nom]._x = PosX + 30; _parent.Collider.Wall[Nom]._y = PosY + 4; _parent.Collider.Ceil[Nom]._x = PosX; _parent.Collider.Ceil[Nom]._y = PosY + 40; } }; ObjBox.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (FixedFlag) { Etat = "Fixed"; } else { Etat = "Wait"; } } } }; ObjBox.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = (PosY + _parent._y) + LgHitDw; HitRightX = TrueX + LgHitD; HitLeftX = TrueX - LgHitG; } }; ObjBox.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if ((NewAction == "Turn") || (NewAction == "Fixed")) { _parent.Bg[1][Nom].gotoAndStop(NewAction + Dir); } else { _parent.Bg[1][Nom].gotoAndStop(NewAction); } _parent.Bg[1][Nom].Etat.box.gotoAndStop(Type); _parent.Bg[1][Nom].Etat.box.box.gotoAndStop(Type); } }; ObjBox.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; } } else { if (InPause == true) { InPause = false; } SetTruePos(); this[Etat](); } } }; ObjPers.prototype.IdleJake = function () { with (this) { DistYFall = 0; KeepDeadPos = true; bCanAttack = true; if (Life > 0) { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckPush(); CheckJump(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusJake = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.RunJake = function () { with (this) { bCanAttack = true; DistYFall = 0; SetSpdXJake(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckJump(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartJake = function () { with (this) { Pers.bouncingDisabledCount = 0; CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); MovePers(); if (HitGrd == true) { Etat = "Land"; } else if (SpdYNow >= 0) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallJake = function () { with (this) { SetSpdXJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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"; } } else if (DistYFall >= DistYFallMax) { autoSwitchDragon = true; } CheckHole(); } }; ObjPers.prototype.JumpLandingJake = function () { with (this) { CheckGetFire(); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (!_global.Game[onBouncingID].CheckPersOn()) { bounceCount = 0; Pers.onBouncingID = null; } if (_parent.Pers.Obj.Etat._currentframe >= 3) { if (_global.energy <= 0) { _global.energy = 0; Etat = "Die"; } } if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.ClimbingJake = function () { with (this) { SpdXNow = 0; SpdYNow = 0; CheckHitGrd(); if ((Pers.ClimbedDistance > 30) && (HitGrd)) { Etat = "Idle"; Pers.ladderDisabledCount = 0; } else if (KeyListener.Action) { Etat = "Fall"; } else { if (KeyListener.L) { SpdXNow = -2; } else if (KeyListener.R) { SpdXNow = 2; } if (KeyListener.Up) { SpdYNow = -3; } else if (KeyListener.Dw) { SpdYNow = 3; } SetMoveX(); SetMoveY(); CheckWall(FrontX, FrontY - 15); CheckWall(BackX, FrontY - 15); CheckWall(FrontX, FrontY); CheckWall(BackX, FrontY); CheckWall(FrontX, FrontY + 15); CheckWall(BackX, FrontY + 15); CheckWall(FrontX, FrontY + 30); CheckWall(BackX, FrontY + 30); CheckWall(FrontX, FrontY + 45); CheckWall(BackX, FrontY + 45); MovePers(); Pers.ClimbedDistance++; } if ((SpdXNow != 0) || (SpdYNow != 0)) { if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { _parent.Pers.Obj.Etat.gotoAndStop(1); } else { _parent.Pers.Obj.Etat.nextFrame(); } } else { _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.ActivateJake = function () { with (this) { CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckGetFire(); CheckDie(); if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.HurtJake = function () { with (this) { if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetJake = function () { with (this) { CheckHitGrd(); if (HitGrd) { Etat = "Idle"; } else { Etat = "Fall"; } FrGetHitCount = 0; InvincibleInit(); } }; ObjPers.prototype.AttackJake = function () { with (this) { CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe == Math.round(_parent.Pers.Obj.Etat._totalframes / 2)) { bHitAttack = true; } else { bHitAttack = false; } if (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjPers.prototype.GetHitJake = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireJake = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformJake = function () { with (this) { DistYFall = 0; if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 1; Etat = "Idle"; nDragonPowerCount = 0; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.PushJake = function () { with (this) { CheckHitGrd(); PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (!KeyListener.Action) { Etat = "Idle"; } else if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (PushedBox != 0) { MoveX = PushedBox.MoveX; } else { MoveX = 0; } } else { var AddBlock = (35 * NumDir); var i = 0; while (i != AddBlock) { if (_parent.Collider.Wall.hitTest(PushPointX + i, PushPointY, true)) { goToTarget = true; if (((i > 5) && (NumDir == 1)) || ((i < -5) && (NumDir == -1))) { MoveX = 5 * NumDir; } else { MoveX = i; } break; } i = i + NumDir; } } MovePers(); } }; ObjPers.prototype.TransformFallJake = ObjPers.prototype.TransformJake; ObjPers.prototype.DieJake = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { _parent.Pers.Obj.Etat.stop(); if (FrDeadCount == 0) { _global.lives--; _global.Snd.stopSound("lift"); _global.Snd.stopSound("push"); if (_global.lives == 0) { _global.Packaging.showLoseScreen(); } else { _global.HUD.fade(resetLevel); } } FrDeadCount++; } } }; ObjPers.prototype.SleepJake = function () { }; ObjPers.prototype.IdleDragon = function () { with (this) { bCanAttack = true; KeepDeadPos = true; if (Life > 0) { SetSpdDragon(); SetMoveX(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } else { SetSpdDragon(); SetMoveX(); CheckWall(FrontX, FrontY); CheckHitGrd(); CheckSol(); CheckFall(); MovePers(); CheckDie(); } } }; ObjPers.prototype.GetLifeBonusDragon = function (AddPoints) { with (this) { newTotalPoint = Point + AddPoints; if (Math.floor(newTotalPoint / 1000) > Math.floor(Point / 1000)) { if (Life < 5) { Life++; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); } } Point = newTotalPoint; _parent._parent.Hud.BonusPoints.text = Point; _parent._parent.Hud.BonusPointsShadow.text = Point; } }; ObjPers.prototype.FlyDragon = function () { with (this) { bCanAttack = true; SetSpdDragon(); SetMoveX(); SetMoveY(); CheckDragonObstacle(); CheckWall(FrontX, FrontY); CheckCeilDragon(); CheckSolDragon(); CheckGroundDragon(); MovePers(); this["CheckAttack" + Perso](); CheckGetFire(); CheckDie(); } }; ObjPers.prototype.JumpStartDragon = function () { with (this) { CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); CheckCeil(); CheckGetFire(); MovePers(); if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } } }; ObjPers.prototype.JumpIdleDragon = function () { with (this) { SetSpdDragonJump(); 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 = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.FallDragon = function () { with (this) { SetSpdDragonJump(); SetMoveX(); CheckGetFire(); CheckWall(FrontX, FrontY); CheckWall(BottomFrontX, TrueY); CheckWall(FrontX, TopY); CheckHitGrd(); CheckSol(); MovePers(); 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.JumpLandingDragon = function () { with (this) { CheckGetFire(); this["CheckAttack" + Perso](); if (_parent.Pers.Obj.Etat._currentframe >= this.nFrTotalAnim) { if (Life <= 0) { Etat = "Die"; } else { Etat = "Idle"; } } } }; ObjPers.prototype.HurtDragon = function () { with (this) { MovePers(); if (FrGetHitCount == 0) { _global.energy = _global.energy - 8; if (_global.energy < 0) { _global.energy = 0; } } if (FrGetHitCount >= FrGetHit) { CheckHitGrd(); Etat = "Idle"; FrGetHitCount = 0; InvincibleInit(); } else { FrGetHitCount++; } GetHitGeneral(); } }; ObjPers.prototype.HurtNetDragon = ObjPers.prototype.HurtDragon; ObjPers.prototype.AttackTailDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrAttackTailHit) { bHitAttack = true; } else { bHitAttack = false; } } }; ObjPers.prototype.AttackFireDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { Etat = "Idle"; } if (_parent.Pers.Obj.Etat._currentframe == FrShootFire) { if (Dir == "D") { CreerFireBall(PosX + 70, PosY - 70, Dir); } else { CreerFireBall(PosX - 70, PosY - 70, Dir); } } } }; ObjPers.prototype.GetHitDragon = function () { with (this) { if (CanBeHit) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = SpdYHitBase; CanBeHit = false; Etat = "Hurt"; GetHitGeneral(); } } }; ObjPers.prototype.GetFireDragon = function () { with (this) { var RandomHit = 0; Life = Life - 1; _parent._parent.Hud.LifeBar.gotoAndStop(Life + 1); CanHit = false; SpdXNow = SpdXHitBase; SpdYNow = 0; RandomHit = Math.ceil(Math.random() * 2); Etat = "GetHit"; } }; ObjPers.prototype.TransformDragon = function () { with (this) { if (_parent.Pers.Obj.Etat._currentframe >= _parent.Pers.Obj.Etat._totalframes) { ICharacter = 0; Etat = "Fall"; Perso = aCharacter[ICharacter]; updatePerso(); } } }; ObjPers.prototype.DieDragon = function () { with (this) { CanBeHit = false; if (_parent.Pers.Obj.Etat._currentframe >= nFrTotalAnim) { FrDeadCount++; _parent.Pers.Obj.Etat.stop(); } } }; ObjPers.prototype.SleepDragon = function () { }; CreerPers = function (PosX, PosY, Perso) { this.Pers = new ObjPers(PosX, PosY, Perso); }; ObjPers.prototype.CharacterSwitch = function () { with (this) { if (Etat == "Fall") { Etat = "TransformFall"; } else { Etat = "Transform"; } } }; ObjPers.prototype.HeroChange = function (NewHero) { with (this) { Perso = NewHero; updatePerso(); } }; ObjPers.prototype.GetHitGeneral = function () { with (this) { SetSpdXHit(); CheckWall(BackX, TrueY); CheckHitGrd(); CheckSol(); MovePers(); CheckDie(); } }; 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.SetSpdXHit = function () { with (this) { MoveX = SpdXNow; if (SpdXNow > 0) { SpdXNow = SpdXNow * 0.7; } if (Dir eq "D") { MoveX = MoveX * -1; } } }; ObjPers.prototype.SetSpdXJake = 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.SetSpdDragon = function () { with (this) { if (KeyListener.R == true) { Dir = "D"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase; } } else if (KeyListener.L == true) { Dir = "G"; if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY - 40, true)) { SpdXNow = 0; } else { SpdXNow = SpdXBase * -1; } } else { SpdXNow = 0; } if (KeyListener.Dw == true) { SpdYNow = SpdYFly; } else if (KeyListener.Up == true) { SpdYNow = SpdYFly * -1; } else { SpdYNow = 0; } if ((SpdXNow == 0) && (SpdYNow == 0)) { Etat = "Idle"; } else { Etat = "Fly"; } } }; 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.SetMoveX = function () { with (this) { MoveX = SpdXNow; } }; ObjPers.prototype.SetMoveY = function () { with (this) { MoveY = SpdYNow; } }; 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.CheckDragonObstacle = function () { with (this) { if (MoveY != 0) { if (_parent.Collider.Dragon.hitTest(TopX, TopY + MoveY, true)) { MoveY = DragonHitTop; } else if (_parent.Collider.Dragon.hitTest(BottomFrontX, (TopY + MoveY) + DragonHeight, true) or _parent.Collider.Dragon.hitTest(BottomBackX, (TopY + MoveY) + DragonHeight, true)) { MoveY = DragonHitBottom; } } } }; 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.CheckSolDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Sol.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckCeilDragon = function () { with (this) { if (MoveY < 0) { if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) { MoveY = 0; SpdYNow = 0; } } } }; ObjPers.prototype.CheckGroundDragon = function () { with (this) { if (MoveY > 0) { if (_parent.Collider.Sol.hitTest(BottomFrontX, TrueY - _parent.Pers.Obj.HitBottomFront._y, true)) { MoveY = 0; } } } }; ObjPers.prototype.CheckJump = function () { with (this) { if (Etat != "Push") { if ((!KeyListener.Up) && (!bJumpRelease)) { bJumpRelease = true; } if (((KeyListener.Up == true) && (HitGrd == true)) && (bJumpRelease)) { bJumpRelease = false; if (Etat == "Run") { SpdYNow = SpdStartJump; Etat = "JumpIdle"; } else { Etat = "JumpStart"; } } } } }; ObjPers.prototype.CheckPush = function () { with (this) { PushPointX = _parent.Pers.Obj.PushPoint._x; var goToTarget = false; if (Dir == "G") { PushPointX = TrueX - PushPointX; var NumDir = -1; } else if (Dir == "D") { PushPointX = TrueX + PushPointX; var NumDir = 1; } PushPointY = TrueY + _parent.Pers.Obj.PushPoint._y; if (_parent.Collider.Wall.hitTest(PushPointX, PushPointY, true)) { if (KeyListener.Action && (((Dir == "G") && (KeyListener.L)) || ((Dir == "D") && (KeyListener.R)))) { Etat = "Push"; } } } }; ObjPers.prototype.CheckAttackJake = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "Attack"; } } }; ObjPers.prototype.CheckAttackDragon = function () { with (this) { if ((KeyListener.Attack == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackTail"; } if ((KeyListener.Action == true) && (bCanAttack)) { bCanAttack = false; Etat = "AttackFire"; } } }; ObjPers.prototype.CheckFall = function () { with (this) { if (SpdYNow >= SpdYFall) { Etat = "Fall"; DistYFall = 0; } } }; ObjPers.prototype.CheckDie = function () { with (this) { if (_global.energy <= 0) { _global.dragonPower = 0; Etat = "Fall"; } } }; ObjPers.prototype.MovePers = function () { with (this) { if ((Pers.TrueX + MoveX) < 30) { MoveX = (TrueX * -1) + 30; } else if ((Pers.TrueX + MoveX) > 520) { MoveX = 520 - Pers.TrueX; } PosX = _parent.Pers._x + MoveX; _parent.Pers._x = PosX; MoveX = 0; PosY = _parent.Pers._y + MoveY; _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]; if ((onBouncingID != null) && (_global.Game[onBouncingID].CheckPersOn() != true)) { Pers.SpdYUp = Pers.SpdYUpBase; } 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; } }; 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; } }; ObjPers.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Pers.gotoAndStop((Perso + "_") + Dir); } }; ObjPers.prototype.Actions = function () { with (this) { if (WaitForActions) { SetTruePos(); CheckHitGrd(); CheckSol(); CheckFall(); WaitForActions = false; } else if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Pers.Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Pers.Obj.Etat.play(); } SetTruePos(); InvincibleCheck(); this[Etat + aCharacter[ICharacter]](); CheckCharSwitch(); CheckHit(); CheckEndLevel(); } } }; ObjPers.prototype.CheckCharSwitch = function () { with (this) { if (ICharacter == 1) { if ((KeyListener.Dragon || (_global.dragonPower == 0)) && (Etat != "HurtNet")) { CharacterSwitch(); } else if ((++nDragonPowerCount) == nDragonPowerRythm) { _global.dragonPower--; nDragonPowerCount = 0; if (_global.dragonPower < 0) { _global.dragonPower = 0; } } } else { if (((KeyListener.Dragon || (autoSwitchDragon)) && (bCanSwitch)) && (_global.dragonPower > 0)) { autoSwitchDragon = false; bCanSwitch = false; FrSwitchCharacterCount = FrSwitchCharacter; CharacterSwitch(); } if (!bCanSwitch) { FrSwitchCharacterCount--; if (FrSwitchCharacterCount == 0) { bCanSwitch = true; } } } } }; ObjPers.prototype.CheckEndLevel = function () { with (this) { if (!_global.boss) { if (((_global.level == 1) && (PosY <= -3930)) && (PosX >= 390)) { _global.HUD.fade(bossStart); _global.boss = true; } if ((_global.level == 2) && (PosY <= -4670)) { _global.HUD.fade(bossStart); _global.boss = true; } if (((_global.level == 3) && (PosY <= -5800)) && (PosX <= 105)) { _global.HUD.fade(bossStart); _global.boss = true; } } } }; ObjPers.prototype.CheckHit = function () { with (this) { if (KeyListener.X && (CanBeHit)) { this.GetHit(); } } }; CreerNetBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("NetBall", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Net", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerFireBall = function (PosX, PosY, Dir) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("JackDragon_FireAnim", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Fire", _local4, PosX, PosY, Dir, 8, 20, G_TabPersBall, "SlimeSplat"); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; CreerSparkBall = function (PosX, PosY, Dir, Rotation, SpdX, SpdY) { var _local4 = "Ball" + G_NextPersBall; G_NextPersBall = G_NextPersBall + 1; if (G_NextPersBall > 50) { G_NextPersBall = 1; } if (this[_local4] == null) { var _local5 = G_NextPersBallDepth; G_NextPersBallDepth++; _parent.Bg[1].attachMovie("Medusa_Blast", _local4, _local5); _parent.Bg[1][_local4]._x = PosX; _parent.Bg[1][_local4]._y = PosY; this[_local4] = new ObjPersBall("Spark", _local4, PosX, PosY, Dir, 8, 0, G_TabPersBall, "SlimeSplat", Rotation, SpdX, SpdY); _global.SoundCTRL.playSound("SlimeShoot", 60, 0); G_TabPersBall.push(_local4); } }; ObjPersBall.prototype.Move = function () { with (this) { _parent.Bg[1][Nom]._x = PosX + SpdX; PosX = PosX + SpdX; if (SpdY) { _parent.Bg[1][Nom]._y = PosY + SpdY; PosY = PosY + SpdY; } SetTruePos(); CheckHit(); CheckOut(); } }; ObjPersBall.prototype.Hit = function () { with (this) { if ((Type == "Net") && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { Pers.Etat = "HurtNet"; _global.Snd.playSound("hurtNet", 100, 1, false); CanBeKill = true; } } }; ObjPersBall.prototype.End = function () { with (this) { if (((Type == "Fire") || (Type == "Spark")) && (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes)) { CanBeKill = true; } } }; ObjPersBall.prototype.Burn = function () { with (this) { if (_parent.Bg[1][Nom].Etat._currentframe == _parent.Bg[1][Nom].Etat._totalframes) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckHit = function () { with (this) { if (Type == "Net") { if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Burn"; _global.Game[Pers.CurrentFireID].Etat = "End"; } else if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.Hit))) { Etat = "Hit"; } } if (((Type == "Spark") && (Pers.Etat != "Activate")) && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Pers.Obj.HitFront))) { Pers.Etat = "Hurt"; Etat = "End"; } if (((Type == "Spark") && (_parent.Bg[1][Nom].Etat.hitTest(_parent.Bg[1].FinalHit))) && (G_Medusa.Etat != "Die")) { _global.HUD.increaseScore(10000); _parent.Control.Bg.CamOnMedusa = true; G_Medusa.Etat = "Die"; } } }; ObjPersBall.prototype.CheckOut = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { CanBeKill = true; } } }; ObjPersBall.prototype.CheckKill = function () { with (this) { if (CanBeKill == true) { KillBall(); } } }; ObjPersBall.prototype.KillBall = function () { with (this) { if (Tab == G_TabPersBall) { G_TabPersBall.splice(PersBallI, 1); PersBallI = PersBallI - 1; } else if (Tab == G_TabMinionBall) { G_TabMinionBall.splice(MinionBallI, 1); MinionBallI = MinionBallI - 1; } delete _parent.Control[Nom]; _parent.Bg[1][Nom].removeMovieClip(); if (Type == "Fire") { Pers.CurrentFireID = null; } if (Type == "Spark") { G_Medusa.CurrentSparkID = null; } } }; ObjPersBall.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjPersBall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].gotoAndStop(NewAction); } }; ObjPersBall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Etat.play(); } this[Etat](); CheckKill(); } } }; CreerSwitch = function (Nom, PosX, PosY) { if (this[Nom] == null) { this[Nom] = new ObjSwitch(Nom, PosX, PosY); G_TabSwitch.push(Nom); } }; ObjSwitch.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjSwitch.prototype.Idle = function () { with (this) { CheckPersOn(); CheckBoxOn(); CheckSleep(); } }; ObjSwitch.prototype.Baisse = function () { with (this) { if (_parent[Nom].Etat._currentframe >= FrBaisse) { _global.SoundCTRL.playSound("SwitchOn", 100, 0); _parent[Nom].Activate(); Etat = "Active"; } } }; ObjSwitch.prototype.Active = function () { with (this) { CheckSleep(); if (!FlagBoxUse) { CheckRelease(); } } }; ObjSwitch.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { FlagUse = true; Etat = "Baisse"; } } }; ObjSwitch.prototype.CheckBoxOn = function () { with (this) { var Box = Pers.PushedBox; if ((Pers.Etat == "Push") && (Box != 0)) { if (Box.Dir == "G") { if (((((Box.PosX - Box.LgHitG) >= (PosX - LgOnX)) and ((Box.PosX - Box.LgHitG) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Etat = "Baisse"; Activate(); } } else if (Box.Dir == "D") { if (((((Box.PosX + Box.LgHitD) >= (PosX - LgOnX)) and ((Box.PosX + Box.LgHitD) <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; _global.SoundCTRL.playSound("PushSwitch", 100, 0); _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } else if ((Box.Etat == "LandFin") && (Box != 0)) { if ((((Box.PosX >= (PosX - LgOnX)) and (Box.PosX <= (PosX + LgOnX))) and ((Box.PosY + Box.LgHitDw) >= (PosY - LgOnY))) and ((Box.PosY + Box.LgHitDw) <= (PosY + LgOnY))) { FlagBoxUse = true; Box.Etat = "Turn"; Box.Dir = ""; _global.SoundCTRL.playSound("BoxSwitch", 50, 0); Pers.Etat = "Idle"; Etat = "Baisse"; } } } }; ObjSwitch.prototype.CheckRelease = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { } else { Etat = "Idle"; FlagUse = false; _parent[Nom].Desactivate(); _global.SoundCTRL.playSound("SwitchOff", 100, 0); } } }; ObjSwitch.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjSwitch.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjSwitch.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjSwitch.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerElevator = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjElevator(l_mcElement, "Y", 0, -1 * l_mcElement.distance); G_TabElevator.push(l_mcElement._name); } }; this.onSwitchLift = function (l_Nom) { with (this) { if (_global.Game[l_Nom + "Lift"].Active == true) { _global.Game[l_Nom + "Lift"].Active = false; _global.Game[l_Nom].Etat = "Idle"; _global.Snd.stopSound("lift"); } else { _global.Game[l_Nom + "Lift"].Active = true; _global.Game[l_Nom].Etat = "IdleActivate"; _global.Snd.playSound("lift", 100, 999, true); } } }; ObjElevator.prototype.Sleep = function () { with (this) { CheckActif(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Idle = function () { with (this) { CheckSleep(); CheckReposition(); if (Active) { SetMove(); } } }; ObjElevator.prototype.Wait = function () { with (this) { if (frWaitCount >= frWaitTime) { Etat = "Idle"; frWaitCount = 0; } else { frWaitCount++; } } }; ObjElevator.prototype.SetMove = function () { with (this) { CheckPersOn(); CheckLimit(); MoveElevator(); } }; ObjElevator.prototype.MoveElevator = function () { with (this) { this["Pos" + Axis] = this["Pos" + Axis] + this["Move" + Axis]; _parent[Nom]._x = PosX; _parent[Nom]._y = PosY; _parent.Collider.Sol[Nom]._x = PosX; _parent.Collider.Sol[Nom]._y = PosY; if (PersOn) { Pers["Move" + Axis] = this["Move" + Axis]; Pers.MovePers(); } UpdateLift(); } }; ObjElevator.prototype.UpdateLift = function () { with (this) { var cableH = (this["Pos" + Axis] - Max); mc.Obj.cable1._height = cableH; mc.Obj.cable2._height = cableH; mc._y = mc._y + this["Move" + Axis]; mc._parent[Nom.substr(0, -4)]._y = mc._parent[Nom.substr(0, -4)]._y + this["Move" + Axis]; _global.Game[Nom.substr(0, -4)].PosY = _global.Game[Nom.substr(0, -4)].PosY + this["Move" + Axis]; _global.Game._parent.overlay[Nom + "ramp"]._y = _global.Game._parent.overlay[Nom + "ramp"]._y + this["Move" + Axis]; _global.Game._parent.Bg[1][Nom + "ramp"]._y = _global.Game._parent.Bg[1][Nom + "ramp"]._y + this["Move" + Axis]; } }; ObjElevator.prototype.CheckLimit = function () { with (this) { this["Move" + Axis] = Speed * Dir; if ((Dir == -1) && ((this["Pos" + Axis] + this["Move" + Axis]) <= Max)) { Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = false; CanReposition = true; RepositionCount = 0; Dir = 0; } if ((Dir == 1) && ((this["Pos" + Axis] + this["Move" + Axis]) >= Min)) { CanReposition = false; Dir = -1; Active = false; _global.Snd.stopSound("lift"); _global.Game[Nom.substr(0, -4)].Active = true; _global.Game[Nom.substr(0, -4)].Etat = "Idle"; } } }; ObjElevator.prototype.CheckReposition = function () { with (this) { if (CanReposition) { CheckPersOn(); if (!PersOn) { if ((++RepositionCount) == RepositionDelay) { RepositionCount = 0; CanReposition = false; Active = true; Dir = 1; _global.Snd.playSound("lift", 100, 999, true); } } } } }; ObjElevator.prototype.Activate = function () { with (this) { Active = true; } }; ObjElevator.prototype.Desactivate = function () { with (this) { Active = false; } }; ObjElevator.prototype.CheckPersOn = function () { with (this) { if (((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) and (Pers.HitGrd == true)) { PersOn = true; } else { PersOn = false; } } }; ObjElevator.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { Etat = "Idle"; if (Active) { CheckLimit(); MoveElevator(); } } } }; ObjElevator.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { Etat = "Sleep"; } } }; ObjElevator.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent[Nom].gotoAndStop(NewAction); } }; ObjElevator.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLevier = function (Nom, PosX, PosY, listener) { if (this[Nom] == null) { this[Nom] = new ObjLevier(Nom, PosX, PosY, listener); G_TabLevier.push(Nom); } }; ObjLevier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjLevier.prototype.Idle = function () { with (this) { if (Active) { CheckPersOn(); CheckSleep(); } } }; ObjLevier.prototype.IdleActivate = ObjLevier.prototype.Idle; ObjLevier.prototype.Activate = function () { with (this) { if (Pers.ICharacter == 0) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.Etat == "Activate")) && (_parent.Pers.Obj.Etat._currentframe == _parent.Pers.Obj.Etat._totalframes)) { listener(Nom); } } } }; ObjLevier.prototype.CheckPersOn = function () { with (this) { if ((Pers.ICharacter == 0) && (Pers.Etat != "Push")) { if ((((((Pers.PosX >= (PosX - LgOnX)) and (Pers.PosX <= (PosX + LgOnX))) and ((Pers.PosY - PersYCorrection) >= (PosY - LgOnY))) and ((Pers.PosY - PersYCorrection) <= (PosY + LgOnY))) and (Pers.HitGrd == true)) && (Pers.CanBeHit || (Pers.Invincible))) { if (KeyListener.Action) { Pers.canJumpCount = 0; Etat = "Activate"; Pers.Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); } } } else if (((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); } else if ((Pers.CurrentFireID != null) && (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID]))) { Etat = "Activate"; _global.Snd.playSound("click", 200, 1, false); listener(Nom); _global.Game[Pers.CurrentFireID].Etat = "End"; } } }; ObjLevier.prototype.CheckActif = function () { with (this) { if ((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) { if (FlagUse || (FlagBoxUse)) { Etat = "Active"; } else { Etat = "Idle"; } } } }; ObjLevier.prototype.CheckSleep = function () { }; ObjLevier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjLevier.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; _parent[Nom].Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent[Nom].Etat.play(); } this[Etat](); } } }; CreerLadder = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjLadder(l_mcElement); G_TabLadder.push(l_mcElement._name); } }; this.onSwitchLadder = function (l_Nom) { with (this) { _global.Game[l_Nom + "Ladder"].Etat = "Opening"; } }; ObjLadder.prototype.Off = function () { with (this) { } }; ObjLadder.prototype.Opening = function () { with (this) { if (mc.etat._currentframe == mc.etat._totalframes) { Etat = "On"; } } }; ObjLadder.prototype.On = function () { with (this) { CheckPersOn(); } }; ObjLadder.prototype.CheckPersOn = function () { with (this) { if (Pers.ladderDisabledCount >= Pers.ladderDisabledMax) { if (((((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= PosY)) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { if (((Pers.ICharacter == 0) && (Pers.Etat != "Climbing")) && (Pers.Etat != "Hurt")) { if ((KeyListener.Up && (Pers.PosY >= (PosY + 70))) || (KeyListener.Dw && (Pers.PosY <= (PosY + 165)))) { Pers.onLadderID = Nom; Pers.Etat = "Climbing"; Pers.ClimbedDistance = 0; } } } else if ((Pers.Etat == "Climbing") && (Pers.onLadderID == Nom)) { if (Pers.PosX < PosX) { Pers.ChangeDir("G"); } if (Pers.PosX > (PosX + LgOnX)) { Pers.ChangeDir("D"); } Pers.Etat = "Fall"; Pers.onLadderID = null; } } else { Pers.ladderDisabledCount++; } } }; ObjLadder.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjLadder.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerBouncingChair = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBouncingChair(l_mcElement); G_TabChair.push(l_mcElement._name); } }; ObjBouncingChair.prototype.Idle = function () { with (this) { if (CheckPersOn()) { Etat = "Bounce"; if ((Pers.onBouncingID == Nom) && (Pers.HitGrd)) { Pers.onBouncingID = null; } } } }; ObjBouncingChair.prototype.Bounce = function () { with (this) { if (mc.Etat._currentframe == 9) { BouncePers(); } if (mc.Etat._currentframe == mc.Etat._totalframes) { Etat = "Idle"; } } }; ObjBouncingChair.prototype.CheckPersOn = function () { with (this) { if ((((((((Pers.ICharacter == 0) && (Pers.Etat != "Idle")) && (Pers.Etat != "Run")) and (Pers.PosX >= PosX)) and (Pers.PosX <= (PosX + LgOnX))) and (Pers.PosY >= (PosY - LgOnY))) and (Pers.PosY <= (PosY + LgOnY))) && (Pers.CanBeHit || (Pers.Invincible))) { return(true); } } }; ObjBouncingChair.prototype.BouncePers = function () { with (this) { if (CheckPersOn()) { Pers.SpdYUp = Pers.SpdYUpBase; if (Pers.onBouncingID != Nom) { Pers.onBouncingID = Nom; Pers.bounceCount = 0; } else { Pers.bounceCount++; if (Pers.bounceCount > 0) { Pers.bounceCount = Pers.bounceCountMax; } Pers.SpdYUp = Pers.SpdYUp - (Pers.bounceCount * 0.34); } Pers.Etat = "JumpStart"; } else if (Pers.HitGrd) { Pers.onBouncingID = null; } } }; ObjBouncingChair.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; mc.gotoAndStop(NewAction); } }; ObjBouncingChair.prototype.Actions = function () { with (this) { if ((G_Pause == true) && (Etat != "Activate")) { if (InPause == false) { InPause = true; mc.etat.stop(); } } else { if (InPause == true) { InPause = false; mc.etat.play(); } this[Etat](); } } }; CreerHuntSoldier = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntSoldier"; this[l_mcElement._name] = new ObjHuntSoldier(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntSoldier.push(l_mcElement._name); } }; ObjHuntSoldier.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntSoldier.prototype.Idle = function () { with (this) { CheckAttack(); CheckShield(); CheckDir(); CheckHurt(); CheckSleep(); } }; ObjHuntSoldier.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Stunned = ObjHuntSoldier.prototype.Hurt; ObjHuntSoldier.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack1 = function () { with (this) { if (((Pers.Etat != "Hurt") && (_parent.Bg[1][Nom].Obj.Etat._currentframe >= 9)) && (_parent.Bg[1][Nom].Obj.Etat._currentframe <= 25)) { if (_parent.Bg[1][Nom].Obj.Etat.wave.hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.Attack2 = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 7) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { if (Pers.Etat != "Activate") { Pers.Etat = "Hurt"; _global.Snd.playSound("hurtJake", 100, 1, false); } } } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjHuntSoldier.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjHuntSoldier.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if ((Etat != "Shield") && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront))) { if ((++HurtCount) == 3) { enemyHitScore(); Etat = "Stunned"; HurtCount = 0; } else { Etat = "Hurt"; } if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } } }; ObjHuntSoldier.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjHuntSoldier.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Math.abs(Pers.PosY - PosY) < 180) && (Math.random() < AttackChance)) { if (Math.abs(Pers.PosX - PosX) < 150) { Etat = "Attack2"; } else { Etat = "Attack1"; } AttackDelayCount = 0; } } }; ObjHuntSoldier.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntSoldier.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjHuntSoldier.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntSoldier.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjHuntSoldier.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerHuntWindow = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "HuntWindow"; this[l_mcElement._name] = new ObjHuntWindow(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabHuntWindow.push(l_mcElement._name); } }; ObjHuntWindow.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjHuntWindow.prototype.IdleClose = function () { with (this) { CheckCanOpen(); CheckSleep(); } }; ObjHuntWindow.prototype.IdleOpen = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt._currentframe == 1) { _parent.Bg[1][Nom].Obj.Etat.Hunt.gotoAndStop(HuntID); SetHuntEtat("Appear"); if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } } if ((HuntEtat == "Appear") && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { SetHuntEtat("idle"); } if (HuntEtat == "idle") { CheckFlip(); CheckAttack(); } if (((HuntEtat == "disappear") || (HuntEtat == "flee")) && (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes)) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat.stop(); Etat = "Close"; if (HuntEtat == "flee") { _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = -80; } } if (HuntEtat == "Throw") { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._totalframes) { SetHuntEtat("idle"); } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.Etat._currentframe == FrThrow) { var l_dir = "G"; if (HuntID == "A") { l_dir = "D"; } if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { if (l_dir == "D") { l_dir = "G"; } else { l_dir = "D"; } } var l_netY = 70; if (PosY < Pers.TrueY) { l_netY = l_netY + (Math.abs(Pers.PosY - TrueY) - 150); } else { l_netY = l_netY - Math.abs(Pers.PosY - TrueY); } if (l_netY > 120) { l_netY = 120; } if (l_netY < 20) { l_netY = 20; } CreerNetBall(PosX, PosY + l_netY, l_dir); _global.Snd.playSound("net", 130, 1, false); } } CheckCanClose(); CheckHurt(); CheckSleep(); } }; ObjHuntWindow.prototype.Open = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleOpen"; AttackDelayCount = AttackDelay * 0.9; } } }; ObjHuntWindow.prototype.Close = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "IdleClose"; _global.Game["G_HuntWindowCurrent" + HuntID] = null; } } }; ObjHuntWindow.prototype.CheckCanOpen = function () { with (this) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == null) { if (_global.Game[("G_Window" + HuntID) + "OpenDelayCount"] >= _global.Game.G_WindowOpenDelay) { if ((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown))) { if (((Pers.ICharacter == 0) && (Math.random() <= OpenChanceJake)) || ((Pers.ICharacter == 1) && (Math.random() <= OpenChanceDragon))) { Etat = "Open"; _global.Game["G_HuntWindowCurrent" + HuntID] = Nom; _global.Game[("G_Window" + HuntID) + "OpenDelayCount"] = 0; } } } } } }; ObjHuntWindow.prototype.CheckCanClose = function () { with (this) { if (CloseDelayCount < CloseDelay) { CloseDelayCount++; } else if ((HuntEtat != "disappear") && ((!((Pers.PosY > (PosY - OpenRangeUp)) && (Pers.PosY < (PosY + OpenRangeDown)))) || ((Pers.ICharacter == 0) && (Math.random() <= CloseChance)))) { if (Math.random() <= OpenChance) { SetHuntEtat("disappear"); CloseDelayCount = 0; } } } }; ObjHuntWindow.prototype.CheckFlip = function () { with (this) { if (FlipDelayCount < FlipDelay) { FlipDelayCount++; } else { if (((HuntID == "A") && (PosX > Pers.PosX)) || ((HuntID == "B") && (PosX < Pers.PosX))) { if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == 100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = -100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x + FlipPosition; } } else if (_parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale == -100) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._xscale = 100; _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x = _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj._x - FlipPosition; } FlipDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if ((Pers.ICharacter == 1) && (Math.abs(Pers.PosY - PosY) < 300)) { SetHuntEtat("Throw"); AttackDelayCount = 0; } } }; ObjHuntWindow.prototype.CheckHurt = function () { with (this) { if ((((HuntEtat == "idle") || (HuntEtat == "Throw")) && (Pers.bHitAttack == true)) && (_parent.Bg[1][Nom].Obj.hitTest(_parent.Pers.Obj.HitFront))) { SetHuntEtat("flee"); enemyHitScore(); if (Pers.ICharacter == 0) { _global.Snd.playSound("jakeHit", 200, 1, false); } else { _global.Snd.playSound("dragonHit", 500, 1, false); } } } }; ObjHuntWindow.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "IdleClose"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjHuntWindow.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (_global.Game["G_HuntWindowCurrent" + HuntID] == Nom) { _global.Game["G_HuntWindowCurrent" + HuntID] = null; } Etat = "Sleep"; } } }; ObjHuntWindow.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjHuntWindow.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.window.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.overlay.gotoAndStop(G_CurrentLevel); } }; ObjHuntWindow.prototype.SetHuntEtat = function (newEtat) { with (this) { _parent.Bg[1][Nom].Obj.Etat.Hunt.Obj.gotoAndStop(newEtat); HuntEtat = newEtat; } }; ObjHuntWindow.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusa = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "Medusa"; this[l_mcElement._name] = new ObjMedusa(Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusa.push(l_mcElement._name); } }; ObjMedusa.prototype.Idle = function () { with (this) { CheckAttack(); CheckDir(); CheckHurt(); } }; ObjMedusa.prototype.Captured = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showNextScreen(); } } }; ObjMedusa.prototype.Die = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _global.Packaging.showWinScreen(); } } }; ObjMedusa.prototype.Laugh = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Hurt = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Shield = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjMedusa.prototype.Attack = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe < FrPrepareAttack) { CheckDir(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrPrepareAttack) { if (Pers.ICharacter == 0) { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 1.5)); } else { var l_PersY = (Pers.TrueY + (_parent.Pers.Obj._height / 3)); } NextAttackRotation = Math.round(pointsGetAngle(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY)); var l_dst = pointsGetDistance(G_Medusa.TrueX, G_Medusa.TrueY, Pers.TrueX, l_PersY); var l_step = (l_dst / 20); NextAttackRotationSpdX = (Pers.TrueX - G_Medusa.TrueX) / l_step; NextAttackRotationSpdY = (l_PersY - G_Medusa.TrueY) / l_step; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrAttack) { var l_PosX = PosX; CreerSparkBall(PosX, PosY - 95, Dir, NextAttackRotation, NextAttackRotationSpdX, NextAttackRotationSpdY); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { HasAttacked = true; Etat = "Idle"; } CheckHurt(); } }; ObjMedusa.prototype.CheckDir = function () { with (this) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } } }; ObjMedusa.prototype.CheckHurt = function () { with (this) { if (Pers.bHitAttack == true) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Laugh"; } } } }; ObjMedusa.prototype.CheckShield = function () { with (this) { if ((((((Etat == "Idle") && (Pers.Etat == "AttackTail")) && (_parent.Pers.Obj.Etat._currentframe == 2)) && (Dir != Pers.Dir)) && (Math.abs(Pers.PosY - PosY) < 200)) && (Math.random() < ShieldChance)) { Etat = "Shield"; } } }; ObjMedusa.prototype.CheckAttack = function () { with (this) { if (AttackDelayCount < AttackDelay) { AttackDelayCount++; } else if (Math.random() < AttackChance) { Etat = "Attack"; HasAttacked = false; AttackDelayCount = 0; } } }; ObjMedusa.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjMedusa.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjMedusa.prototype.SetTruePos = function () { with (this) { TrueX = PosX + _parent._x; TrueY = PosY + _parent._y; } }; ObjMedusa.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerMedusaSister = function (l_mcElement) { if (this[l_mcElement._name] == null) { Perso = "MedusaSister"; this[l_mcElement._name] = new ObjMedusaSister(l_mcElement, Perso, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabMedusaSister.push(l_mcElement._name); } }; ObjMedusaSister.prototype.UpdateSister = function (SisterID) { with (this) { if (CurrentSister == SisterID) { mc[SisterID].gotoAndStop(CurrentAction); } else { mc[SisterID].gotoAndStop("Idle"); } } }; ObjMedusaSister.prototype.UpdatePosition = function () { with (this) { var l_maxOffset = 70; var l_posX = Math.abs(_parent.Control.Bg.PosX); mc._x = -((l_posX / 450) * l_maxOffset); mc._y = mc._y + (_global.MoveY / 2.5); if (mc._y < 145) { mc._y = 145; } } }; ObjMedusaSister.prototype.UpdateAttack = function () { with (this) { if ((CurrentAction == "Idle") && (!MedusaAttack)) { if ((++AttackDelayCount) == AttackDelay) { if (CurrentSister == "SisterLeft") { CurrentSister = "SisterRight"; } else { CurrentSister = "SisterLeft"; } CurrentAction = "Charge"; AttackDelayCount = 0; } } else if (CurrentAction == "Charge") { if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { var PersY = Math.abs(_global.Game.Pers.PosY); switch (true) { case PersY < 100 : CurrentAction = "Attack3"; break; case PersY < 250 : CurrentAction = "Attack2"; break; case PersY >= 250 : CurrentAction = "Attack1"; } } } else if (((CurrentAction == "Attack1") || (CurrentAction == "Attack2")) || (CurrentAction == "Attack3")) { if (mc[CurrentSister].Etat._currentframe == 9) { if ((Pers.Etat != "Activate") && (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Pers))) { Pers.Etat = "Hurt"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna1)) { _global.Game.Antenna1.Etat = "Charged"; } if (mc[CurrentSister].Etat.blast.hit.hitTest(mc._parent.Game.Bg[1].Antenna2)) { _global.Game.Antenna2.Etat = "Charged"; } } if (mc[CurrentSister].Etat._currentframe == mc[CurrentSister].Etat._totalframes) { CurrentAction = "Idle"; if (CurrentSister == "SisterRight") { MedusaAttack = true; G_Medusa.HasAttacked = false; } } } if (!MedusaAttack) { G_Medusa.AttackDelayCount = 0; } else if (G_Medusa.HasAttacked) { MedusaAttack = false; } } }; ObjMedusaSister.prototype.Actions = function () { with (this) { UpdatePosition(); UpdateAttack(); UpdateSister("SisterLeft"); UpdateSister("SisterRight"); } }; CreerWall = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjWall(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabWall.push(l_mcElement._name); } }; ObjWall.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjWall.prototype.Idle = function () { with (this) { CheckHurt(); CheckSleep(); } }; ObjWall.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == FrRemoveWallHit) { _parent.Collider.Wall[Nom].removeMovieClip(); } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Out"; } } }; ObjWall.prototype.CheckHurt = function () { with (this) { if ((Pers.ICharacter == 1) && (Pers.bHitAttack == true)) { if (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitFront)) { Etat = "Destroy"; } } if (Pers.CurrentFireID != null) { if (_parent.Bg[1][Nom].hitTest(_parent.Bg[1][Pers.CurrentFireID])) { Etat = "Destroy"; _global.Game[Pers.CurrentFireID].Etat = "End"; } } } }; ObjWall.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjWall.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjWall.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjWall.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); _parent.Bg[1][Nom].Obj.Etat.wall.gotoAndStop(G_CurrentLevel); _parent.Bg[1][Nom].Obj.wall.gotoAndStop(G_CurrentLevel); } }; ObjWall.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerDragonObstacle = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjDragonObstacle(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabDragonObstacle.push(l_mcElement._name); } }; ObjDragonObstacle.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjDragonObstacle.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjDragonObstacle.prototype.Hit = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.HitBoss = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == 4) { _global.Game.Web.Etat = "Fall"; } if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { Etat = "Idle"; } } }; ObjDragonObstacle.prototype.Fall = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == (_parent.Bg[1][Nom].Obj.Etat._totalframes - 1)) { G_Medusa.Etat = "Captured"; } } }; ObjDragonObstacle.prototype.Destroy = function () { with (this) { if (_parent.Bg[1][Nom].Obj.Etat._currentframe == _parent.Bg[1][Nom].Obj.Etat._totalframes) { _parent.Bg[1][Nom].Obj.Etat.stop(); } } }; ObjDragonObstacle.prototype.CheckHit = function () { with (this) { if ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitTop) || (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.HitBottomFront)))) { Pers.Etat = "Hurt"; Etat = "Hit"; Pers.InvincibleEnd(); Pers.MoveY = 40; } } }; ObjDragonObstacle.prototype.CheckActif = function () { with (this) { if (_global.boss || (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep"))) { if (Life > 0) { Etat = "Idle"; Dir = BaseDir; } else { Etat = "Dead"; } } } }; ObjDragonObstacle.prototype.CheckSleep = function () { with (this) { if (((((!_global.boss) && (PosX < (Bg.InvPosX - LgOutG))) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjDragonObstacle.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjDragonObstacle.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjDragonObstacle.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerAntenna = function (l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjAntenna(l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabAntenna.push(l_mcElement._name); } }; ObjAntenna.prototype.Idle = function () { with (this) { CheckHit(); } }; ObjAntenna.prototype.Charged = function () { with (this) { CheckHit(); if ((++ChargedCount) == ChargedDelay) { Etat = "Idle"; ChargedCount = 0; } } }; ObjAntenna.prototype.CheckHit = function () { with (this) { if ((G_Medusa.CurrentSparkID != null) && (Pers.Etat != "Hurt")) { if (_parent.Bg[1][Nom].Obj.Hit.hitTest(_parent.Bg[1][G_Medusa.CurrentSparkID])) { Etat = "Charged"; ChargedCount = 0; if ((_global.level == 1) && (_global.Game.Web.Etat != "Fall")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Web.Etat = "Fall"; _global.HUD.increaseScore(1000); } if ((((_global.level == 2) && (_global.Game.Antenna1.Etat == "Charged")) && (_global.Game.Antenna2.Etat == "Charged")) && (_global.Game.Wire.Etat != "HitBoss")) { _parent.Control.Bg.CamOnMedusa = true; _global.Game.Wire.Etat = "HitBoss"; _global.HUD.increaseScore(2000); } } } } }; ObjAntenna.prototype.ChangeDir = function (NewDir) { with (this) { DirOld = Dir; Dir = NewDir; _parent.Bg[1][Nom].gotoAndStop(Perso + NewDir); _parent.Bg[1][Nom].Obj.gotoAndStop(Etat); } }; ObjAntenna.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; if (Etat == "Charged") { _global.Snd.playSound("antenna", 250, 1, false); } _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjAntenna.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); } } }; CreerBonus = function (type, l_mcElement) { if (this[l_mcElement._name] == null) { this[l_mcElement._name] = new ObjBonus(type, l_mcElement._name, l_mcElement._x, l_mcElement._y); G_TabBonus.push(l_mcElement._name); } }; ObjBonus.prototype.Idle = function () { with (this) { CheckHit(); CheckSleep(); } }; ObjBonus.prototype.Sleep = function () { with (this) { CheckActif(); } }; ObjBonus.prototype.CheckHit = function () { with (this) { if (((Pers.ICharacter == 0) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj))) || ((Pers.ICharacter == 1) && (_parent.Bg[1][Nom].hitTest(_parent.Pers.Obj.Hit)))) { switch (Type) { case "Score" : _global.Score = _global.Score + 500; _global.Snd.playSound("energy", 200, 1, false); _global.HUD.increaseScore(500); break; case "Life" : if (_global.lives < 3) { _global.lives++; } _global.Snd.playSound("life", 200, 1, false); _global.HUD.increaseScore(200); break; case "Energy" : _global.energy = _global.energy + 50; if (_global.energy > 100) { _global.energy = 100; } _global.Snd.playSound("bonus", 300, 1, false); _global.HUD.increaseScore(200); break; case "Power" : _global.dragonPower = 100; _global.Snd.playSound("power", 300, 1, false); _global.HUD.increaseScore(200); } KillBonus(); } } }; ObjBonus.prototype.KillBonus = function () { with (this) { G_TabBonus.splice(BonusI, 1); BonusI = BonusI - 1; delete _parent.Control[Nom]; _parent.Bg[1][Nom].swapDepths(90210); _parent.Bg[1][Nom].removeMovieClip(); } }; ObjBonus.prototype.CheckActif = function () { with (this) { if (((((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (PosY >= (Bg.InvPosY - LgOutUp))) and (PosY <= (Bg.InvPosY + LgOutDw))) and (Etat eq "Sleep")) { Etat = "Idle"; } } }; ObjBonus.prototype.CheckSleep = function () { with (this) { if ((((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) or (PosY < (Bg.InvPosY - LgOutUp))) or (PosY > (Bg.InvPosY + LgOutDw))) { if (Pers.PosX < PosX) { Dir = "G"; } else { Dir = "D"; } Etat = "Sleep"; } } }; ObjBonus.prototype.ChangeEtat = function (NewAction) { with (this) { EtatOld = Etat; Etat = NewAction; _parent.Bg[1][Nom].Obj.gotoAndStop(NewAction); } }; ObjBonus.prototype.Actions = function () { with (this) { if (G_Pause == true) { if (InPause == false) { InPause = true; _parent.Bg[1][Nom].Obj.Etat.stop(); } } else { if (InPause == true) { InPause = false; _parent.Bg[1][Nom].Obj.Etat.play(); } SetTruePos(); this[Etat](); CheckKill(); } } }; this.cnt = 0; this.G_CurrentLevel = _global.level; switch (G_CurrentLevel) { case 1 : this.G_MaxEnemyHit = 28; break; case 2 : this.G_MaxEnemyHit = 28; break; case 3 : this.G_MaxEnemyHit = 38; } G_MaxEnemyHitCount = 0; this.G_Pause = true; this.G_PauseOut = false; this.G_PRealese = true; this.G_Resume = false; this.G_TabBox = new Array(); this.G_TabSwitch = new Array(); this.G_TabDoor = new Array(); this.G_TabElevator = new Array(); this.G_TabPersBall = new Array(); this.G_TabLevier = new Array(); this.G_TabLadder = new Array(); this.G_TabChair = new Array(); this.G_TabHuntSoldier = new Array(); this.G_TabHuntWindow = new Array(); this.G_TabMedusa = new Array(); this.G_TabMedusaSister = new Array(); this.G_TabWall = new Array(); this.G_TabDragonObstacle = new Array(); this.G_TabAntenna = new Array(); this.G_TabBonus = new Array(); this.G_NextPersBall = 1; this.G_NextPersBallDepth = 10000; this.G_NextMinionBall = 1; this.G_NextMinionBallDepth = 20000; this.G_OverlayDepth = 0; this.G_HuntWindowCurrentA = null; this.G_HuntActiveSinceA = 0; this.G_HuntWindowCurrentB = null; this.G_HuntActiveSinceB = 0; this.G_AlphaZones = new Array(); this.G_Medusa = null; this.G_WindowOpenDelay = 20; this.G_WindowAOpenDelayCount = 0; this.G_WindowBOpenDelayCount = 0; this.addAlphaZone = function (mc) { if (_global.Packaging.bShadowDisabled) { mc._visible = false; } }; this.resetLevel = function () { _global.dragonPower = 100; _global.energy = 100; if (_global.boss) { _global.resetDestination = "Game_BOSS" + _global.level; } else { _global.resetDestination = "Game_LEVEL" + _global.level; } _parent._parent.gotoAndStop("Reset"); }; this.bossStart = function () { _global.boss = true; _global.resetDestination = "Game_BOSS" + _global.level; _parent._parent.gotoAndStop("Reset"); }; this.enemyHitScore = function () { if ((++G_MaxEnemyHitCount) < G_MaxEnemyHit) { _global.HUD.increaseScore(100); } }; this.Creer_PBalcony = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + l_mcElement._parent._y; CreerPlateforme(pt, 235); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PRoofTop = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; var pt = new Object(); pt = {x:l_mcElement._x - 5, y:l_mcElement._y + 95}; var mcCeil = _parent.Collider.Ceil; mcCeil.moveTo(pt.x, pt.y); mcCeil.beginFill(16711935); pt.x = pt.x + 115; pt.y = pt.y - 70; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x + 115; pt.y = pt.y + 70; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y - 80; mcCeil.lineTo(pt.x, pt.y); pt.x = pt.x - 230; mcCeil.lineTo(pt.x, pt.y); pt.y = pt.y + 80; mcCeil.lineTo(pt.x, pt.y); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBalconyOpen = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; pt = new Object(); pt = {x:l_mcElement._x, y:l_mcElement._y}; pt.x = pt.x + l_mcElement._parent._x; if (l_mcElement.flipped) { pt.x = pt.x - l_mcElement._width; } pt.y = pt.y + (l_mcElement._parent._y + 10); CreerPlateforme(pt, 235); if (l_mcElement.flipped) { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01OverlayFlip", {x:pt.x + 32, y:pt.y}, true); CreerObstacle({x:pt.x + 19, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); } else { CreerOverlay(l_mcElement._name + "trou", "AM_BlaconOuvert01Overlay", {x:pt.x + 120, y:pt.y + 0.5}, true); CreerObstacle({x:pt.x + 107, y:pt.y}, 15, 15); CreerObstacle({x:pt.x + 195, y:pt.y}, 15, 15); } _parent.overlay[l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); _parent.Bg[1][l_mcElement._name + "trou"].gotoAndStop(G_CurrentLevel); CreerOverlay(l_mcElement._name, "AM_Rampe01_overlay", pt); pt.y = pt.y - 50; CreerObstacle(pt, 15, 80); pt.x = pt.x + 220; CreerObstacle(pt, 15, 80); l_mcElement.obj.gotoAndStop(this.G_CurrentLevel); } }; this.Creer_PBox = function (l_mcElement) { with (this) { l_mcElement.onEnterFrame = CheckVisible; 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; CreerPlateforme(pt, 70); CreerObstacle(pt, 70, 70); } }; this.CheckVisible = function () { if ((this._y < (Bg.InvPosY - Stage.height)) or (this._y > (Bg.InvPosY + Stage.height))) { this._visible = false; } else { this._visible = true; } }; 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.CreerObstacleDragon = function (pt, l_nWidth, l_nHeight) { var _local3 = _parent.Collider.Dragon; pt.x = Math.round(pt.x); pt.y = Math.round(pt.y); _local3.moveTo(pt.x, pt.y); _local3.beginFill(16776960); _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.CreerOverlay = function (id, linkage, pt, bReversed) { var _local4; var _local5; _local5 = _parent.overlay.attachMovie(linkage, id, G_OverlayDepth++); _local5._x = pt.x; _local5._y = pt.y; _local4 = _parent.Bg[1].attachMovie(linkage, id, G_OverlayDepth++); _local4._x = pt.x; _local4._y = pt.y; _local4.overlay = _local5; if (!bReversed) { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = false; this.overlay._visible = true; } else { this._visible = true; this.overlay._visible = false; } }; } else { _local4.onEnterFrame = function () { if (_global.Game.Pers.PosY < this._y) { this._visible = true; this.overlay._visible = false; } else { this._visible = false; this.overlay._visible = true; } }; } }; this.replaceTile = function (l_mcElement) { var _local1 = l_mcElement._name; var _local2 = 1499; if (_local1.slice(0, 8) == "instance") { } else { l_mcElement._x = 0; l_mcElement._y = -((Number(_local1) - 1) * _local2); } }; this.CreerFloor = function (l_nPosX, l_nPosY, l_nWidth, l_nHeight) { var mcGround = _parent.Collider.Sol; with (this) { pt = new Object(); pt = {x:l_nPosX, y:l_nPosY}; pt.y = pt.y - l_nHeight; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y + l_nHeight); mcGround.lineTo(pt.x + l_nWidth, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor1 = 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 + -60; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloorBoss = 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 + -88; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y + 60); mcGround.lineTo(pt.x + 1100, pt.y); mcGround.lineTo(pt.x, pt.y); } }; this.CreerFloor2a = 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 + 120; 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); pt.x = pt.x + 360; mcGround.moveTo(pt.x, pt.y); mcGround.beginFill(16711935); mcGround.lineTo(pt.x, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y + 40); mcGround.lineTo(pt.x + 240, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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) { 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 + 480, pt.y + 40); mcGround.lineTo(pt.x + 480, pt.y); mcGround.lineTo(pt.x, pt.y); } }; 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); } }; } onClipEvent (enterFrame) { BoxI = 0; for (BoxI in G_TabBox) { var BoxActif = G_TabBox[BoxI]; if (this[BoxActif].Etat != this[BoxActif].EtatOld) { this[BoxActif].ChangeEtat(this[BoxActif].Etat); } this[BoxActif].Actions(); } PersBallI = 0; for (PersBallI in G_TabPersBall) { var PersBallActif = G_TabPersBall[PersBallI]; if (this[PersBallActif].Etat != this[PersBallActif].EtatOld) { this[PersBallActif].ChangeEtat(this[PersBallActif].Etat); } this[PersBallActif].Actions(); } LevierI = 0; for (LevierI in G_TabLevier) { var LevierActif = G_TabLevier[LevierI]; if (this[LevierActif].Etat != this[LevierActif].EtatOld) { this[LevierActif].ChangeEtat(this[LevierActif].Etat); } this[LevierActif].Actions(); } LadderI = 0; for (LadderI in G_TabLadder) { var LadderActif = G_TabLadder[LadderI]; if (this[LadderActif].Etat != this[LadderActif].EtatOld) { this[LadderActif].ChangeEtat(this[LadderActif].Etat); } this[LadderActif].Actions(); } ChairI = 0; for (ChairI in G_TabChair) { var ChairActif = G_TabChair[ChairI]; if (this[ChairActif].Etat != this[ChairActif].EtatOld) { this[ChairActif].ChangeEtat(this[ChairActif].Etat); } this[ChairActif].Actions(); } ElevatorI = 0; for (ElevatorI in G_TabElevator) { var ElevatorActif = G_TabElevator[ElevatorI]; if (this[ElevatorActif].Etat != this[ElevatorActif].EtatOld) { this[ElevatorActif].ChangeEtat(this[ElevatorActif].Etat); } this[ElevatorActif].Actions(); } I = 0; for (HuntSoldierI in G_TabHuntSoldier) { var HuntSoldierActif = G_TabHuntSoldier[HuntSoldierI]; if (this[HuntSoldierActif].Dir != this[HuntSoldierActif].DirOld) { this[HuntSoldierActif].ChangeDir(this[HuntSoldierActif].Dir); } if (this[HuntSoldierActif].Etat != this[HuntSoldierActif].EtatOld) { this[HuntSoldierActif].ChangeEtat(this[HuntSoldierActif].Etat); } this[HuntSoldierActif].Actions(); } I = 0; for (HuntWindowI in G_TabHuntWindow) { var HuntWindowActif = G_TabHuntWindow[HuntWindowI]; if (this[HuntWindowActif].Dir != this[HuntWindowActif].DirOld) { this[HuntWindowActif].ChangeDir(this[HuntWindowActif].Dir); } if (this[HuntWindowActif].Etat != this[HuntWindowActif].EtatOld) { this[HuntWindowActif].ChangeEtat(this[HuntWindowActif].Etat); } this[HuntWindowActif].Actions(); } if (!G_Pause) { if (_global.Game.G_HuntWindowCurrentA == null) { _global.Game.G_WindowAOpenDelayCount++; } if (_global.Game.G_HuntWindowCurrentB == null) { _global.Game.G_WindowBOpenDelayCount++; } } I = 0; for (MedusaI in G_TabMedusa) { var MedusaActif = G_TabMedusa[MedusaI]; if (this[MedusaActif].Dir != this[MedusaActif].DirOld) { this[MedusaActif].ChangeDir(this[MedusaActif].Dir); } if (this[MedusaActif].Etat != this[MedusaActif].EtatOld) { this[MedusaActif].ChangeEtat(this[MedusaActif].Etat); } this[MedusaActif].Actions(); } I = 0; for (WallI in G_TabWall) { var WallActif = G_TabWall[WallI]; if (this[WallActif].Dir != this[WallActif].DirOld) { this[WallActif].ChangeDir(this[WallActif].Dir); } if (this[WallActif].Etat != this[WallActif].EtatOld) { this[WallActif].ChangeEtat(this[WallActif].Etat); } this[WallActif].Actions(); } I = 0; for (DragonObstacleI in G_TabDragonObstacle) { var DragonObstacleActif = G_TabDragonObstacle[DragonObstacleI]; if (this[DragonObstacleActif].Dir != this[DragonObstacleActif].DirOld) { this[DragonObstacleActif].ChangeDir(this[DragonObstacleActif].Dir); } if (this[DragonObstacleActif].Etat != this[DragonObstacleActif].EtatOld) { this[DragonObstacleActif].ChangeEtat(this[DragonObstacleActif].Etat); } this[DragonObstacleActif].Actions(); } I = 0; for (AntennaI in G_TabAntenna) { var AntennaActif = G_TabAntenna[AntennaI]; if (this[AntennaActif].Dir != this[AntennaActif].DirOld) { this[AntennaActif].ChangeDir(this[AntennaActif].Dir); } if (this[AntennaActif].Etat != this[AntennaActif].EtatOld) { this[AntennaActif].ChangeEtat(this[AntennaActif].Etat); } this[AntennaActif].Actions(); } I = 0; for (MedusaSisterI in G_TabMedusaSister) { var MedusaSisterActif = G_TabMedusaSister[MedusaSisterI]; if (this[MedusaSisterActif].Dir != this[MedusaSisterActif].DirOld) { this[MedusaSisterActif].ChangeDir(this[MedusaSisterActif].Dir); } if (this[MedusaSisterActif].Etat != this[MedusaSisterActif].EtatOld) { this[MedusaSisterActif].ChangeEtat(this[MedusaSisterActif].Etat); } this[MedusaSisterActif].Actions(); } I = 0; for (BonusI in G_TabBonus) { var BonusActif = G_TabBonus[BonusI]; if (this[BonusActif].Dir != this[BonusActif].DirOld) { this[BonusActif].ChangeDir(this[BonusActif].Dir); } if (this[BonusActif].Etat != this[BonusActif].EtatOld) { this[BonusActif].ChangeEtat(this[BonusActif].Etat); } this[BonusActif].Actions(); } if (Pers.Dir != Pers.DirOld) { Pers.ChangeDir(Pers.Dir); } if (Pers.Etat != Pers.EtatOld) { Pers.setState(Pers.Etat); } this.Pers.Actions(); this.Bg.Actions(); _global.HUD.update(); G_CheckPause(); }
Symbol 1408 MovieClip Frame 2
stop(); _global.C.beginLevel();
Instance of Symbol 1407 MovieClip "Bg" in Symbol 1408 MovieClip Frame 2
onClipEvent (load) { this._x = 0; this._y = 0; this.noUpdateCamCount = 0; this.noUpdateCamDelay = 50; _parent.Control.CreerBg(_parent._x, _parent._y); BG = _parent.Control.Bg; Pers = _global.Game.Pers; for (var i in _parent.Bg) { if (Number(_parent.Bg[i]._name) <= 20) { _parent.Bg[i].gotoAndStop(2); } else { _parent.Bg[i].gotoAndStop(3); } } BG.NoCamUpdate = true; if (_global.level == 1) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -300; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(380, -280, 250, 20); } if (_global.level == 2) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -450; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(95, -280, 250, 20); _parent.Control.CreerFloor(725, -280, 250, 20); } if (_global.level == 3) { BG.MaxDw1 = 500; BG.MaxUp1 = 0; BG.MaxG1 = -450; BG.MaxD1 = 0; BG.CenterY = 350; _parent.Control.CreerFloor(95, -280, 250, 20); _parent.Control.CreerFloor(725, -280, 250, 20); } _parent.Control.CreerFloor(0, -480, 1100, 20); BG.ParallaxRateSky = 1.1; BG.ParallaxRateCity = 1.05; BG.CheckScreen = function () { with (this) { MaxDw = MaxDw1; MaxUp = MaxUp1; MaxG = MaxG1; MaxD = MaxD1; if (BG.NoCamUpdate && ((++noUpdateCamCount) == noUpdateCamDelay)) { BG.NoCamUpdate = false; } } }; }
Instance of Symbol 1150 MovieClip "Pers" in Symbol 1408 MovieClip Frame 2
onClipEvent (load) { _parent.Control.CreerPers(this._x, this._y, "Jake"); this.gotoAndStop("D"); _global.Game.Pers.Etat = "Sleep"; _global.Game.Pers.setState("Idle"); }
Instance of Symbol 1154 MovieClip "Collider" in Symbol 1408 MovieClip Frame 2
onClipEvent (load) { this._visible = 0; }
Symbol 1433 MovieClip Frame 3
_global.Snd.playSound("laser", 100, 1, false);
Symbol 1463 MovieClip Frame 1
stop();
Symbol 1463 MovieClip Frame 10
stop();
Symbol 1463 MovieClip Frame 21
stop();
Symbol 1463 MovieClip Frame 30
stop();
Symbol 1463 MovieClip Frame 40
stop();
Symbol 1486 MovieClip Frame 3
_global.Snd.playSound("laser", 100, 1, false);
Symbol 1494 MovieClip Frame 1
stop();
Symbol 1494 MovieClip Frame 10
stop();
Symbol 1494 MovieClip Frame 21
stop();
Symbol 1494 MovieClip Frame 30
stop();
Symbol 1494 MovieClip Frame 40
stop();

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClipUses:1Used by:11 514
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:7 140 144 163 386 457 464 481 514
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:7 163 386 514
Symbol 7 MovieClipUses:4 6Used by:11
Symbol 8 FontUsed by:9 10
Symbol 9 TextUses:8Used by:11
Symbol 10 EditableTextUses:8Used by:11
Symbol 11 MovieClipUses:2 7 9 10Used by:Timeline
Symbol 1496 MovieClip [__Packages.Debug]
Symbol 1497 MovieClip [__Packages.com.sarbakan.utils.PerformanceWatcher]
Symbol 1498 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon]
Symbol 1499 MovieClip [__Packages.mx.transitions.BroadcasterMX]
Symbol 1500 MovieClip [__Packages.mx.utils.Delegate]
Symbol 1501 MovieClip [__Packages.HighRisk.PackagingManager]
Symbol 1502 MovieClip [__Packages.SoundController]
Symbol 1503 MovieClip [__Packages.HighRisk.HUD]
Symbol 1504 MovieClip [__Packages.HighRisk.DigitBitmapField]
Symbol 1505 MovieClip [__Packages.com.sarbakan.utils.KeyManager]
Symbol 12 FontUsed by:13 125 129 512 1158
Symbol 13 EditableTextUses:12Used by:119
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClip [BorderBox]Uses:14Used by:119
Symbol 16 GraphicUsed by:17 1153
Symbol 17 MovieClip [BottomBox]Uses:16Used by:119
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClip [TopBox]Uses:18Used by:119
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClip [GroundElevator]Uses:20Used by:119
Symbol 22 BitmapUsed by:23 31
Symbol 23 GraphicUses:22Used by:30
Symbol 24 BitmapUsed by:25 32 36
Symbol 25 GraphicUses:24Used by:30
Symbol 26 BitmapUsed by:27 33 616
Symbol 27 GraphicUses:26Used by:30
Symbol 28 BitmapUsed by:29 34 618
Symbol 29 GraphicUses:28Used by:30
Symbol 30 MovieClip [AM_BlaconOuvert01Overlay]Uses:23 25 27 29Used by:119
Symbol 31 GraphicUses:22Used by:35
Symbol 32 GraphicUses:24Used by:35
Symbol 33 GraphicUses:26Used by:35
Symbol 34 GraphicUses:28Used by:35
Symbol 35 MovieClip [AM_BlaconOuvert01OverlayFlip]Uses:31 32 33 34Used by:119
Symbol 36 GraphicUses:24Used by:37
Symbol 37 MovieClip [AM_Rampe01_overlay]Uses:36Used by:119
Symbol 38 BitmapUsed by:39
Symbol 39 GraphicUses:38Used by:40
Symbol 40 MovieClip [AM_RampeAscenseur01_overlay]Uses:39Used by:119
Symbol 41 GraphicUsed by:42 86 400 498 502 506 510
Symbol 42 MovieClipUses:41Used by:60 1094 1149 1157 1370 1406 1441 1451 1459
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:53
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClipUses:45Used by:53
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:53
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:53
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClipUses:51Used by:53
Symbol 53 MovieClipUses:44 46 48 50 52Used by:60
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClipUses:54Used by:60 1126
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:56Used by:60 1126
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:60 1126
Symbol 60 MovieClip [JackDragon_FireAnim]Uses:42 53 55 57 59Used by:119
Symbol 61 GraphicUsed by:64 199
Symbol 62 GraphicUsed by:64
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClipUses:61 62 63Used by:69
Symbol 65 GraphicUsed by:68 199
Symbol 66 GraphicUsed by:68
Symbol 67 GraphicUsed by:68 199
Symbol 68 MovieClipUses:65 66 67Used by:69
Symbol 69 MovieClip [Medusa_Blast]Uses:64 68Used by:119
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClipUses:70Used by:76 84
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:72Used by:76
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClipUses:74Used by:76
Symbol 76 MovieClipUses:71 73 75Used by:85
Symbol 77 GraphicUsed by:83
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClipUses:78Used by:83
Symbol 80 GraphicUsed by:83
Symbol 81 GraphicUsed by:83
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClipUses:77 79 80 81 82Used by:85
Symbol 84 MovieClipUses:71Used by:85
Symbol 85 MovieClip [NetBall]Uses:76 83 84Used by:119
Symbol 86 MovieClip [WallHit]Uses:41Used by:119
Symbol 87 Sound [music_game]Used by:119
Symbol 88 Sound [music_packaging]Used by:119
Symbol 89 Sound [chair]Used by:119
Symbol 90 Sound [blast]Used by:119
Symbol 91 Sound [web]Used by:119
Symbol 92 Sound [bonus]Used by:119
Symbol 93 Sound [break]Used by:119
Symbol 94 Sound [hurtNet]Used by:119
Symbol 95 Sound [click]Used by:119
Symbol 96 Sound [dragonFire]Used by:119
Symbol 97 Sound [dragonHit]Used by:119
Symbol 98 Sound [whip]Used by:119
Symbol 99 Sound [power]Used by:119
Symbol 100 Sound [electric_wire]Used by:119
Symbol 101 Sound [finalZap]Used by:119
Symbol 102 Sound [antenna]Used by:119
Symbol 103 Sound [push]Used by:119
Symbol 104 Sound [jakeHit]Used by:119
Symbol 105 Sound [ladder]Used by:119
Symbol 106 Sound [jakeAttack]Used by:119
Symbol 107 Sound [soldierAttack]Used by:119
Symbol 108 Sound [laser]Used by:119
Symbol 109 Sound [life]Used by:119
Symbol 110 Sound [lift]Used by:119
Symbol 111 Sound [morph]Used by:119
Symbol 112 Sound [net]Used by:119
Symbol 113 Sound [energy]Used by:119
Symbol 114 Sound [land]Used by:119
Symbol 115 Sound [swirl]Used by:119
Symbol 116 Sound [hurtJake]Used by:119
Symbol 117 Sound [crumble]Used by:119
Symbol 118 Sound [window]Used by:119
Symbol 119 MovieClipUses:13 15 17 19 21 30 35 37 40 60 69 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118Used by:Timeline
Symbol 120 GraphicUsed by:123 400 1159
Symbol 121 FontUsed by:122 559 1155 1162
Symbol 122 EditableTextUses:121Used by:123
Symbol 123 MovieClipUses:120 122Used by:Timeline
Symbol 124 GraphicUsed by:126
Symbol 125 EditableTextUses:12Used by:126
Symbol 126 ButtonUses:124 125Used by:Timeline
Symbol 127 GraphicUsed by:128
Symbol 128 MovieClipUses:127Used by:130
Symbol 129 EditableTextUses:12Used by:130
Symbol 130 MovieClipUses:128 129Used by:Timeline
Symbol 131 BitmapUsed by:132
Symbol 132 GraphicUses:131Used by:514
Symbol 133 FontUsed by:134 135 136 141 142 143 203 205 207 210 212 214 327 328 381 451 452 453 454 455 456 458 459 460 461 462 463 477 478 479 480
Symbol 134 TextUses:133Used by:140
Symbol 135 TextUses:133Used by:140
Symbol 136 TextUses:133Used by:140
Symbol 137 GraphicUsed by:140 144 208 457 464 481
Symbol 138 SoundUsed by:140 144 208 216 457 464 481 498 502 506 510
Symbol 139 SoundUsed by:140 144 208 216 457 464 481 498 502 506 510
Symbol 140 ButtonUses:4 134 135 136 137 138 139Used by:514
Symbol 141 TextUses:133Used by:144
Symbol 142 TextUses:133Used by:144
Symbol 143 TextUses:133Used by:144
Symbol 144 ButtonUses:4 141 142 143 137 138 139Used by:514
Symbol 145 GraphicUsed by:146
Symbol 146 MovieClipUses:145Used by:154
Symbol 147 GraphicUsed by:148
Symbol 148 MovieClipUses:147Used by:149 376
Symbol 149 MovieClipUses:148Used by:154
Symbol 150 GraphicUsed by:151 498 502 506 510
Symbol 151 MovieClipUses:150Used by:154 225 236 368 370 376 494
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClipUses:152Used by:154
Symbol 154 MovieClipUses:146 149 151 153Used by:514
Symbol 155 GraphicUsed by:156
Symbol 156 MovieClipUses:155Used by:514
Symbol 157 GraphicUsed by:163
Symbol 158 GraphicUsed by:163
Symbol 159 GraphicUsed by:163
Symbol 160 GraphicUsed by:163
Symbol 161 GraphicUsed by:163
Symbol 162 GraphicUsed by:163
Symbol 163 MovieClipUses:157 158 159 160 161 4 6 162Used by:514
Symbol 164 GraphicUsed by:514
Symbol 165 GraphicUsed by:166
Symbol 166 MovieClipUses:165Used by:472 514 1285 1300 1303 1337 1358
Symbol 167 GraphicUsed by:168
Symbol 168 MovieClipUses:167Used by:514 1303
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClipUses:169Used by:514 1303 1444 1452 1462 1489 1490 1493
Symbol 171 GraphicUsed by:172
Symbol 172 MovieClipUses:171Used by:514 1303
Symbol 173 GraphicUsed by:174
Symbol 174 MovieClipUses:173Used by:472 514 1285 1300 1303 1337 1358
Symbol 175 GraphicUsed by:176
Symbol 176 MovieClipUses:175Used by:472 514 1285 1300 1303 1316 1337 1354 1358
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClipUses:177Used by:190 1281 1284 1315 1357
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClipUses:179Used by:183 1277 1278
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClipUses:181Used by:183 1277 1278
Symbol 183 MovieClipUses:180 182Used by:190
Symbol 184 GraphicUsed by:185
Symbol 185 MovieClipUses:184Used by:190 471 1281 1284 1315 1357
Symbol 186 GraphicUsed by:187
Symbol 187 MovieClipUses:186Used by:190 1281 1284 1315 1357
Symbol 188 GraphicUsed by:189
Symbol 189 MovieClipUses:188Used by:190 1315
Symbol 190 MovieClipUses:178 183 185 187 189Used by:514 1300 1303
Symbol 191 GraphicUsed by:192
Symbol 192 MovieClipUses:191Used by:514 1303
Symbol 193 GraphicUsed by:194
Symbol 194 MovieClipUses:193Used by:514 1303
Symbol 195 GraphicUsed by:199 514
Symbol 196 GraphicUsed by:199
Symbol 197 GraphicUsed by:199
Symbol 198 GraphicUsed by:199
Symbol 199 MovieClipUses:195 196 61 197 65 198 67Used by:514
Symbol 200 GraphicUsed by:201
Symbol 201 MovieClipUses:200Used by:208 216
Symbol 202 GraphicUsed by:208
Symbol 203 TextUses:133Used by:208
Symbol 204 GraphicUsed by:208
Symbol 205 TextUses:133Used by:208
Symbol 206 GraphicUsed by:208
Symbol 207 TextUses:133Used by:208
Symbol 208 ButtonUses:201 202 203 204 205 206 207 137 138 139Used by:514
Symbol 209 GraphicUsed by:216
Symbol 210 TextUses:133Used by:216
Symbol 211 GraphicUsed by:216
Symbol 212 TextUses:133Used by:216
Symbol 213 GraphicUsed by:216
Symbol 214 TextUses:133Used by:216
Symbol 215 GraphicUsed by:216
Symbol 216 ButtonUses:201 209 210 211 212 213 214 215 138 139Used by:514
Symbol 217 FontUsed by:218 219 220 221 235 323 324 325 326 360 361 362 363 364 365 367 369 383 384 385 387 388 389 390 391 392 393 394 395 396 397 401 402 403 404 405 406 407 410 420 421 422 423 424 425 426 427
Symbol 218 TextUses:217Used by:514
Symbol 219 TextUses:217Used by:514
Symbol 220 TextUses:217Used by:514
Symbol 221 TextUses:217Used by:514
Symbol 222 GraphicUsed by:223
Symbol 223 MovieClipUses:222Used by:514
Symbol 224 GraphicUsed by:225
Symbol 225 MovieClipUses:151 224Used by:514
Symbol 226 GraphicUsed by:233
Symbol 227 GraphicUsed by:228 1069
Symbol 228 MovieClipUses:227Used by:233
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:229Used by:233
Symbol 231 GraphicUsed by:232 1068
Symbol 232 MovieClipUses:231Used by:233
Symbol 233 MovieClipUses:226 228 230 232Used by:514
Symbol 234 GraphicUsed by:236
Symbol 235 TextUses:217Used by:236
Symbol 236 MovieClipUses:151 234 235Used by:514
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClipUses:237Used by:294 304 514 976 989 994 995 996 997 1029 1055 1056 1091 1093 1148
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClipUses:239Used by:243
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClipUses:241Used by:243 276 297 358 514 979 1022
Symbol 243 MovieClipUses:240 242Used by:294 514 976 994 997 1029 1055 1056 1091 1148
Symbol 244 GraphicUsed by:245
Symbol 245 MovieClipUses:244Used by:248 253 277 307 310 359 514 991 1059
Symbol 246 GraphicUsed by:247
Symbol 247 MovieClipUses:246Used by:248 277 359 514
Symbol 248 MovieClipUses:245 247Used by:294 304 995 996 997 1029 1093
Symbol 249 GraphicUsed by:250 320
Symbol 250 MovieClipUses:249Used by:294 304 976 989 994 995 996 997 1029 1055 1056 1091 1093 1148
Symbol 251 GraphicUsed by:252
Symbol 252 MovieClipUses:251Used by:253 514 991 1038
Symbol 253 MovieClipUses:245 252Used by:294 1055
Symbol 254 GraphicUsed by:255
Symbol 255 MovieClipUses:254Used by:294
Symbol 256 GraphicUsed by:257
Symbol 257 MovieClipUses:256Used by:294 304 358 514 976 989 994 995 996 997 1022 1029 1055 1056 1091 1093 1148
Symbol 258 GraphicUsed by:259 339
Symbol 259 MovieClipUses:258Used by:273 975
Symbol 260 GraphicUsed by:261 340
Symbol 261 MovieClipUses:260Used by:273 303 355 975
Symbol 262 GraphicUsed by:263 341
Symbol 263 MovieClipUses:262Used by:273 303 355 975
Symbol 264 GraphicUsed by:265 342
Symbol 265 MovieClipUses:264Used by:268
Symbol 266 GraphicUsed by:267 343
Symbol 267 MovieClipUses:266Used by:268
Symbol 268 MovieClipUses:265 267Used by:273 303 355 975 1028
Symbol 269 GraphicUsed by:270 345
Symbol 270 MovieClipUses:269Used by:273 303 355 975 988 1028
Symbol 271 GraphicUsed by:272 346
Symbol 272 MovieClipUses:271Used by:273 355
Symbol 273 MovieClipUses:259 261 263 268 270 272Used by:294
Symbol 274 GraphicUsed by:275
Symbol 275 MovieClipUses:274Used by:276 514 1022
Symbol 276 MovieClipUses:275 242Used by:294 304 514 976 994 995 996 997 1029 1055 1056 1091 1093 1148
Symbol 277 MovieClipUses:245 247Used by:294 976 989 994 997 1029 1055 1056 1091 1148
Symbol 278 GraphicUsed by:279
Symbol 279 MovieClipUses:278Used by:294
Symbol 280 GraphicUsed by:281
Symbol 281 MovieClipUses:280Used by:294
Symbol 282 GraphicUsed by:283
Symbol 283 MovieClipUses:282Used by:294
Symbol 284 GraphicUsed by:285
Symbol 285 MovieClipUses:284Used by:294
Symbol 286 GraphicUsed by:287
Symbol 287 MovieClipUses:286Used by:294
Symbol 288 GraphicUsed by:289
Symbol 289 MovieClipUses:288Used by:294
Symbol 290 GraphicUsed by:291
Symbol 291 MovieClipUses:290Used by:294 1055
Symbol 292 GraphicUsed by:293
Symbol 293 MovieClipUses:292Used by:294
Symbol 294 MovieClipUses:238 243 248 250 253 255 257 273 276 277 279 281 283 285 287 289 291 293Used by:514 1094
Symbol 295 GraphicUsed by:296
Symbol 296 MovieClipUses:295Used by:297
Symbol 297 MovieClipUses:296 242Used by:304 995 996 997 1055 1093
Symbol 298 GraphicUsed by:299
Symbol 299 MovieClipUses:298Used by:304 995 996 997 1093
Symbol 300 GraphicUsed by:301
Symbol 301 MovieClipUses:300Used by:303 355 988 1028
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClipUses:301 261 263 268 270 302Used by:304 514
Symbol 304 MovieClipUses:248 238 297 299 257 303 276 250Used by:514
Symbol 305 GraphicUsed by:306
Symbol 306 MovieClipUses:305Used by:307
Symbol 307 MovieClipUses:245 306Used by:514 976 989 997 1029 1055 1056 1091 1148
Symbol 308 GraphicUsed by:309
Symbol 309 MovieClipUses:308Used by:310
Symbol 310 MovieClipUses:245 309Used by:514 1055
Symbol 311 GraphicUsed by:312
Symbol 312 MovieClipUses:311Used by:514 1055
Symbol 313 GraphicUsed by:314
Symbol 314 MovieClipUses:313Used by:358 514 1029 1055 1056
Symbol 315 GraphicUsed by:316
Symbol 316 MovieClipUses:315Used by:319 1025
Symbol 317 GraphicUsed by:318
Symbol 318 MovieClipUses:317Used by:319 1025
Symbol 319 MovieClipUses:316 318Used by:514 1055
Symbol 320 MovieClipUses:249Used by:514
Symbol 321 GraphicUsed by:322
Symbol 322 MovieClipUses:321Used by:514
Symbol 323 TextUses:217Used by:514
Symbol 324 TextUses:217Used by:514
Symbol 325 TextUses:217Used by:514
Symbol 326 TextUses:217Used by:514
Symbol 327 TextUses:133Used by:514
Symbol 328 TextUses:133Used by:514
Symbol 329 GraphicUsed by:348
Symbol 330 GraphicUsed by:331
Symbol 331 MovieClipUses:330Used by:348 1192 1194
Symbol 332 GraphicUsed by:348
Symbol 333 BitmapUsed by:334 1235 1241
Symbol 334 GraphicUses:333Used by:335
Symbol 335 MovieClipUses:334Used by:348
Symbol 336 GraphicUsed by:337
Symbol 337 MovieClipUses:336Used by:348
Symbol 338 GraphicUsed by:348
Symbol 339 MovieClipUses:258Used by:347
Symbol 340 MovieClipUses:260Used by:347
Symbol 341 MovieClipUses:262Used by:347
Symbol 342 MovieClipUses:264Used by:344
Symbol 343 MovieClipUses:266Used by:344
Symbol 344 MovieClipUses:342 343Used by:347
Symbol 345 MovieClipUses:269Used by:347
Symbol 346 MovieClipUses:271Used by:347
Symbol 347 MovieClipUses:339 340 341 344 345 346Used by:348
Symbol 348 MovieClipUses:329 331 332 335 337 338 347Used by:514
Symbol 349 GraphicUsed by:350
Symbol 350 MovieClipUses:349Used by:514
Symbol 351 GraphicUsed by:352
Symbol 352 MovieClipUses:351Used by:359 514 1056
Symbol 353 GraphicUsed by:354
Symbol 354 MovieClipUses:353Used by:359 514
Symbol 355 MovieClipUses:301 261 263 268 270 272Used by:358 514 994 995 996 997 1055 1093 1148
Symbol 356 GraphicUsed by:357
Symbol 357 MovieClipUses:356Used by:358 514
Symbol 358 MovieClipUses:314 257 355 357 242Used by:359
Symbol 359 MovieClipUses:245 247 352 354 358Used by:514 1094
Symbol 360 TextUses:217Used by:514
Symbol 361 TextUses:217Used by:514
Symbol 362 TextUses:217Used by:514
Symbol 363 TextUses:217Used by:514
Symbol 364 TextUses:217Used by:514
Symbol 365 TextUses:217Used by:514
Symbol 366 GraphicUsed by:368 370
Symbol 367 TextUses:217Used by:368
Symbol 368 MovieClipUses:151 366 367Used by:514
Symbol 369 TextUses:217Used by:370
Symbol 370 MovieClipUses:151 366 369Used by:514
Symbol 371 GraphicUsed by:372
Symbol 372 MovieClipUses:371Used by:514
Symbol 373 GraphicUsed by:376
Symbol 374 GraphicUsed by:376
Symbol 375 GraphicUsed by:376
Symbol 376 MovieClipUses:373 374 148 375 151Used by:514
Symbol 377 GraphicUsed by:378
Symbol 378 MovieClipUses:377Used by:514 856
Symbol 379 GraphicUsed by:380
Symbol 380 MovieClipUses:379Used by:514
Symbol 381 TextUses:133Used by:382
Symbol 382 MovieClipUses:381Used by:514
Symbol 383 TextUses:217Used by:514
Symbol 384 TextUses:217Used by:514
Symbol 385 TextUses:217Used by:514
Symbol 386 MovieClipUses:4 6Used by:514 1205
Symbol 387 TextUses:217Used by:514
Symbol 388 TextUses:217Used by:514
Symbol 389 TextUses:217Used by:514
Symbol 390 TextUses:217Used by:514
Symbol 391 TextUses:217Used by:514
Symbol 392 TextUses:217Used by:514
Symbol 393 TextUses:217Used by:514
Symbol 394 TextUses:217Used by:514
Symbol 395 TextUses:217Used by:514
Symbol 396 TextUses:217Used by:514
Symbol 397 TextUses:217Used by:514
Symbol 398 ShapeTweeningUsed by:400
Symbol 399 GraphicUsed by:400
Symbol 400 MovieClipUses:120 398 399 41Used by:514
Symbol 401 TextUses:217Used by:514
Symbol 402 TextUses:217Used by:514
Symbol 403 TextUses:217Used by:514
Symbol 404 TextUses:217Used by:514
Symbol 405 TextUses:217Used by:514
Symbol 406 TextUses:217Used by:514
Symbol 407 TextUses:217Used by:408 409
Symbol 408 ButtonUses:407Used by:514
Symbol 409 MovieClipUses:407Used by:514
Symbol 410 TextUses:217Used by:514
Symbol 411 GraphicUsed by:412 848
Symbol 412 MovieClipUses:411Used by:413
Symbol 413 MovieClipUses:412Used by:514
Symbol 414 GraphicUsed by:415
Symbol 415 MovieClipUses:414Used by:514 762 771 774 775 1354
Symbol 416 GraphicUsed by:417
Symbol 417 MovieClipUses:416Used by:514
Symbol 418 GraphicUsed by:419
Symbol 419 MovieClipUses:418Used by:514 1369 1370
Symbol 420 TextUses:217Used by:514
Symbol 421 TextUses:217Used by:514
Symbol 422 TextUses:217Used by:514
Symbol 423 TextUses:217Used by:514
Symbol 424 TextUses:217Used by:514
Symbol 425 TextUses:217Used by:514
Symbol 426 TextUses:217Used by:514
Symbol 427 TextUses:217Used by:514
Symbol 428 GraphicUsed by:429
Symbol 429 MovieClipUses:428Used by:514 1337
Symbol 430 GraphicUsed by:431
Symbol 431 MovieClipUses:430Used by:514 1337
Symbol 432 GraphicUsed by:433
Symbol 433 MovieClipUses:432Used by:514 1337
Symbol 434 GraphicUsed by:435
Symbol 435 MovieClipUses:434Used by:514 1337
Symbol 436 GraphicUsed by:437
Symbol 437 MovieClipUses:436Used by:514 1337
Symbol 438 GraphicUsed by:439
Symbol 439 MovieClipUses:438Used by:514 1337
Symbol 440 GraphicUsed by:441
Symbol 441 MovieClipUses:440Used by:514 1337
Symbol 442 GraphicUsed by:443
Symbol 443 MovieClipUses:442Used by:514 1337
Symbol 444 GraphicUsed by:445
Symbol 445 MovieClipUses:444Used by:514 1337
Symbol 446 FontUsed by:447 448 449 450 473 474 475 476 486 487 488 489 495 496 497 499 500 501 503 504 505 507 508 509
Symbol 447 TextUses:446Used by:514
Symbol 448 TextUses:446Used by:514
Symbol 449 TextUses:446Used by:514
Symbol 450 TextUses:446Used by:514
Symbol 451 TextUses:133Used by:457
Symbol 452 TextUses:133Used by:457 481
Symbol 453 TextUses:133Used by:457
Symbol 454 TextUses:133Used by:457
Symbol 455 TextUses:133Used by:457
Symbol 456 TextUses:133Used by:457 481
Symbol 457 ButtonUses:4 451 452 453 454 455 456 137 138 139Used by:514
Symbol 458 TextUses:133Used by:464
Symbol 459 TextUses:133Used by:464
Symbol 460 TextUses:133Used by:464
Symbol 461 TextUses:133Used by:464
Symbol 462 TextUses:133Used by:464
Symbol 463 TextUses:133Used by:464
Symbol 464 ButtonUses:4 458 459 460 461 462 463 137 138 139Used by:514
Symbol 465 GraphicUsed by:472
Symbol 466 GraphicUsed by:467
Symbol 467 MovieClipUses:466Used by:472
Symbol 468 GraphicUsed by:469
Symbol 469 MovieClipUses:468Used by:472 1300 1303 1316 1337 1354
Symbol 470 GraphicUsed by:471
Symbol 471 MovieClipUses:470 185Used by:472
Symbol 472 MovieClipUses:465 166 174 467 469 176 471Used by:514
Symbol 473 TextUses:446Used by:514
Symbol 474 TextUses:446Used by:514
Symbol 475 TextUses:446Used by:514
Symbol 476 TextUses:446Used by:514
Symbol 477 TextUses:133Used by:481
Symbol 478 TextUses:133Used by:481
Symbol 479 TextUses:133Used by:481
Symbol 480 TextUses:133Used by:481
Symbol 481 ButtonUses:4 477 452 478 479 480 456 137 138 139Used by:514
Symbol 482 GraphicUsed by:514
Symbol 483 GraphicUsed by:484
Symbol 484 MovieClipUses:483Used by:514
Symbol 485 GraphicUsed by:514
Symbol 486 TextUses:446Used by:514
Symbol 487 TextUses:446Used by:514
Symbol 488 TextUses:446Used by:514
Symbol 489 TextUses:446Used by:514
Symbol 490 GraphicUsed by:514
Symbol 491 GraphicUsed by:492
Symbol 492 MovieClipUses:491Used by:514
Symbol 493 GraphicUsed by:494 498 502 506 510
Symbol 494 MovieClipUses:151 493Used by:498 502 506 510
Symbol 495 TextUses:446Used by:498
Symbol 496 TextUses:446Used by:498
Symbol 497 TextUses:446Used by:498
Symbol 498 ButtonUses:494 495 496 497 150 493 41 138 139Used by:514
Symbol 499 TextUses:446Used by:502
Symbol 500 TextUses:446Used by:502
Symbol 501 TextUses:446Used by:502
Symbol 502 ButtonUses:494 499 500 501 150 493 41 138 139Used by:514
Symbol 503 TextUses:446Used by:506
Symbol 504 TextUses:446Used by:506
Symbol 505 TextUses:446Used by:506
Symbol 506 ButtonUses:494 503 504 505 150 493 41 138 139Used by:511
Symbol 507 TextUses:446Used by:510
Symbol 508 TextUses:446Used by:510
Symbol 509 TextUses:446Used by:510
Symbol 510 ButtonUses:494 507 508 509 150 493 41 138 139Used by:511
Symbol 511 MovieClipUses:506 510Used by:514
Symbol 512 EditableTextUses:12Used by:513
Symbol 513 MovieClipUses:512Used by:514
Symbol 514 MovieClipUses:132 140 144 2 154 156 163 164 166 168 170 172 174 176 190 192 194 199 208 216 218 219 220 221 223 225 233 236 294 304 307 310 238 312 243 314 257 319 303 320 322 323 324 325 326 327 328 348 350 359 360 361 362 363 364 365 368 370 372 376 378 380 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 400 401 402 403 404 405 406 4 6 408 409 410 413 415 417 419 420 421 422 423 424 425 426 427 245 352 247 354 357 276 242 429 431 433 435 437 439 441 443 445 252 447 448 449 450 457 464 472 473 474 475 476 481 482 484 485 195 486 487 488 489 490 492 275 355 498 502 511 513Used by:Timeline
Symbol 515 BitmapUsed by:516
Symbol 516 GraphicUses:515Used by:558
Symbol 517 BitmapUsed by:518
Symbol 518 GraphicUses:517Used by:537
Symbol 519 BitmapUsed by:520
Symbol 520 GraphicUses:519Used by:537
Symbol 521 BitmapUsed by:522
Symbol 522 GraphicUses:521Used by:537
Symbol 523 BitmapUsed by:524
Symbol 524 GraphicUses:523Used by:537
Symbol 525 BitmapUsed by:526
Symbol 526 GraphicUses:525Used by:537
Symbol 527 BitmapUsed by:528
Symbol 528 GraphicUses:527Used by:537
Symbol 529 BitmapUsed by:530
Symbol 530 GraphicUses:529Used by:537
Symbol 531 BitmapUsed by:532
Symbol 532 GraphicUses:531Used by:537
Symbol 533 BitmapUsed by:534
Symbol 534 GraphicUses:533Used by:537
Symbol 535 BitmapUsed by:536
Symbol 536 GraphicUses:535Used by:537
Symbol 537 MovieClipUses:518 520 522 524 526 528 530 532 534 536Used by:558
Symbol 538 BitmapUsed by:539
Symbol 539 GraphicUses:538Used by:544
Symbol 540 BitmapUsed by:541
Symbol 541 GraphicUses:540Used by:544
Symbol 542 BitmapUsed by:543
Symbol 543 GraphicUses:542Used by:544
Symbol 544 MovieClipUses:539 541 543Used by:558
Symbol 545 BitmapUsed by:546
Symbol 546 GraphicUses:545Used by:547
Symbol 547 MovieClipUses:546Used by:558
Symbol 548 BitmapUsed by:549
Symbol 549 GraphicUses:548Used by:550
Symbol 550 MovieClipUses:549Used by:558
Symbol 551 BitmapUsed by:552
Symbol 552 GraphicUses:551Used by:557
Symbol 553 BitmapUsed by:554
Symbol 554 GraphicUses:553Used by:557
Symbol 555 BitmapUsed by:556
Symbol 556 GraphicUses:555Used by:557
Symbol 557 ButtonUses:552 554 556Used by:558
Symbol 558 MovieClipUses:516 537 544 547 550 557Used by:Timeline
Symbol 559 EditableTextUses:121Used by:560
Symbol 560 MovieClipUses:559Used by:1157 1209 1230 1374 1393 1408
Symbol 561 BitmapUsed by:562 1231
Symbol 562 GraphicUses:561Used by:563
Symbol 563 MovieClipUses:562Used by:1157
Symbol 564 BitmapUsed by:565
Symbol 565 GraphicUses:564Used by:566
Symbol 566 MovieClipUses:565Used by:1157 1233 1377
Symbol 567 BitmapUsed by:568
Symbol 568 GraphicUses:567Used by:569
Symbol 569 MovieClipUses:568Used by:577
Symbol 570 BitmapUsed by:571 575
Symbol 571 GraphicUses:570Used by:574
Symbol 572 GraphicUsed by:573 574 646
Symbol 573 MovieClipUses:572Used by:574 579 583 588 646 778 782 787 1174 1221
Symbol 574 ButtonUses:571 573 572Used by:576
Symbol 575 GraphicUses:570Used by:576
Symbol 576 MovieClipUses:574 575Used by:577
Symbol 577 MovieClipUses:569 576Used by:969
Symbol 578 GraphicUsed by:579 583
Symbol 579 MovieClipUses:578 573Used by:582 615
Symbol 580 BitmapUsed by:581
Symbol 581 GraphicUses:580Used by:582
Symbol 582 MovieClipUses:579 581Used by:592
Symbol 583 MovieClipUses:578 573Used by:586 617 651
Symbol 584 BitmapUsed by:585
Symbol 585 GraphicUses:584Used by:586
Symbol 586 MovieClipUses:583 585Used by:592
Symbol 587 GraphicUsed by:588
Symbol 588 MovieClipUses:587 573Used by:591 619 654
Symbol 589 BitmapUsed by:590
Symbol 590 GraphicUses:589Used by:591
Symbol 591 MovieClipUses:588 590Used by:592
Symbol 592 MovieClipUses:582 586 591Used by:593
Symbol 593 MovieClipUses:592Used by:969 1207 1228
Symbol 594 BitmapUsed by:595
Symbol 595 GraphicUses:594Used by:598
Symbol 596 GraphicUsed by:598
Symbol 597 GraphicUsed by:598
Symbol 598 MovieClipUses:595 596 597Used by:599
Symbol 599 MovieClipUses:598Used by:969 1207 1228 1372 1391 1406
Symbol 600 GraphicUsed by:603
Symbol 601 GraphicUsed by:602
Symbol 602 MovieClipUses:601Used by:603
Symbol 603 MovieClipUses:600 602Used by:604
Symbol 604 MovieClipUses:603Used by:969 1207 1228
Symbol 605 GraphicUsed by:606
Symbol 606 MovieClipUses:605Used by:607 608 609 610 611
Symbol 607 MovieClipUses:606Used by:609 610
Symbol 608 MovieClipUses:606Used by:609 610
Symbol 609 MovieClipUses:606 607 608Used by:611
Symbol 610 MovieClipUses:607 608 606Used by:611
Symbol 611 MovieClipUses:606 609 610Used by:612
Symbol 612 MovieClipUses:611Used by:969 1207 1228 1372 1391 1406
Symbol 613 BitmapUsed by:614
Symbol 614 GraphicUses:613Used by:615
Symbol 615 MovieClipUses:579 614Used by:620
Symbol 616 GraphicUses:26Used by:617
Symbol 617 MovieClipUses:583 616Used by:620
Symbol 618 GraphicUses:28Used by:619
Symbol 619 MovieClipUses:588 618Used by:620
Symbol 620 MovieClipUses:615 617 619Used by:621
Symbol 621 MovieClipUses:620Used by:969 1207 1228
Symbol 622 GraphicUsed by:623
Symbol 623 MovieClipUses:622Used by:632
Symbol 624 GraphicUsed by:625
Symbol 625 MovieClipUses:624Used by:632
Symbol 626 GraphicUsed by:629
Symbol 627 GraphicUsed by:628
Symbol 628 MovieClipUses:627Used by:629
Symbol 629 MovieClipUses:626 628Used by:632
Symbol 630 GraphicUsed by:631
Symbol 631 MovieClipUses:630Used by:632
Symbol 632 MovieClipUses:623 625 629 631Used by:634 641
Symbol 633 GraphicUsed by:634
Symbol 634 MovieClipUses:632 633Used by:642
Symbol 635 GraphicUsed by:641
Symbol 636 GraphicUsed by:641
Symbol 637 GraphicUsed by:641
Symbol 638 GraphicUsed by:641
Symbol 639 GraphicUsed by:641
Symbol 640 GraphicUsed by:641
Symbol 641 MovieClipUses:632 635 636 637 638 639 640Used by:642
Symbol 642 MovieClipUses:634 641Used by:643
Symbol 643 MovieClipUses:642Used by:969 1207 1228
Symbol 644 BitmapUsed by:645 647 744
Symbol 645 GraphicUses:644Used by:646
Symbol 646 ButtonUses:645 573 572Used by:648
Symbol 647 GraphicUses:644Used by:648
Symbol 648 MovieClipUses:646 647Used by:655
Symbol 649 BitmapUsed by:650 748
Symbol 650 GraphicUses:649Used by:651
Symbol 651 MovieClipUses:583 650Used by:655
Symbol 652 BitmapUsed by:653 749
Symbol 653 GraphicUses:652Used by:654
Symbol 654 MovieClipUses:588 653Used by:655
Symbol 655 MovieClipUses:648 651 654Used by:743 757 758 759
Symbol 656 GraphicUsed by:662
Symbol 657 GraphicUsed by:662
Symbol 658 GraphicUsed by:662
Symbol 659 GraphicUsed by:662
Symbol 660 GraphicUsed by:662
Symbol 661 GraphicUsed by:662
Symbol 662 MovieClipUses:656 657 658 659 660 661Used by:675 676 685 686
Symbol 663 GraphicUsed by:664
Symbol 664 MovieClipUses:663Used by:675 676 685 686
Symbol 665 GraphicUsed by:666
Symbol 666 MovieClipUses:665Used by:675 676 685 686 693
Symbol 667 GraphicUsed by:668
Symbol 668 MovieClipUses:667Used by:675 685
Symbol 669 GraphicUsed by:670
Symbol 670 MovieClipUses:669Used by:675 676 685 686 693
Symbol 671 GraphicUsed by:672
Symbol 672 MovieClipUses:671Used by:675 676 685 686 714 715 723 724
Symbol 673 GraphicUsed by:674
Symbol 674 MovieClipUses:673Used by:675 676 685 686
Symbol 675 MovieClipUses:662 664 666 668 670 672 674Used by:694
Symbol 676 MovieClipUses:670 666 664 672 674 662Used by:694
Symbol 677 GraphicUsed by:678
Symbol 678 MovieClipUses:677Used by:685
Symbol 679 GraphicUsed by:680
Symbol 680 MovieClipUses:679Used by:685
Symbol 681 GraphicUsed by:682
Symbol 682 MovieClipUses:681Used by:685
Symbol 683 GraphicUsed by:684
Symbol 684 MovieClipUses:683Used by:685
Symbol 685 MovieClipUses:670 666 664 672 674 662 668 678 680 682 684Used by:694
Symbol 686 MovieClipUses:670 666 664 672 674 662Used by:694
Symbol 687 GraphicUsed by:688
Symbol 688 MovieClipUses:687Used by:693
Symbol 689 GraphicUsed by:690
Symbol 690 MovieClipUses:689Used by:693
Symbol 691 GraphicUsed by:693
Symbol 692 GraphicUsed by:693
Symbol 693 MovieClipUses:670 666 688 690 691 692Used by:694
Symbol 694 MovieClipUses:675 676 685 686 693Used by:742
Symbol 695 GraphicUsed by:696
Symbol 696 MovieClipUses:695Used by:714 715 723 724
Symbol 697 GraphicUsed by:698
Symbol 698 MovieClipUses:697Used by:714 715 723 724 740
Symbol 699 GraphicUsed by:700
Symbol 700 MovieClipUses:699Used by:714 715 723 724
Symbol 701 GraphicUsed by:702
Symbol 702 MovieClipUses:701Used by:714 715 723 724
Symbol 703 GraphicUsed by:704
Symbol 704 MovieClipUses:703Used by:714 715 723 724
Symbol 705 GraphicUsed by:706
Symbol 706 MovieClipUses:705Used by:714 715 716 723 724
Symbol 707 GraphicUsed by:708
Symbol 708 MovieClipUses:707Used by:713
Symbol 709 GraphicUsed by:712
Symbol 710 GraphicUsed by:711
Symbol 711 MovieClipUses:710Used by:712
Symbol 712 MovieClipUses:709 711Used by:713 738
Symbol 713 MovieClipUses:708 712Used by:714 715 723 724
Symbol 714 MovieClipUses:696 698 700 702 672 704 706 713Used by:741
Symbol 715 MovieClipUses:713 702 700 706 696 698 672 704Used by:741
Symbol 716 MovieClipUses:706Used by:723
Symbol 717 GraphicUsed by:718
Symbol 718 MovieClipUses:717Used by:723 740
Symbol 719 GraphicUsed by:720
Symbol 720 MovieClipUses:719Used by:723 740
Symbol 721 GraphicUsed by:722
Symbol 722 MovieClipUses:721Used by:723
Symbol 723 MovieClipUses:696 698 700 702 672 704 706 713 716 718 720 722Used by:741
Symbol 724 MovieClipUses:696 698 700 702 672 704 706 713Used by:741
Symbol 725 GraphicUsed by:726
Symbol 726 MovieClipUses:725Used by:740
Symbol 727 GraphicUsed by:728
Symbol 728 MovieClipUses:727Used by:740
Symbol 729 GraphicUsed by:730
Symbol 730 MovieClipUses:729Used by:732
Symbol 731 GraphicUsed by:732
Symbol 732 MovieClipUses:730 731Used by:740
Symbol 733 GraphicUsed by:734
Symbol 734 MovieClipUses:733Used by:740
Symbol 735 GraphicUsed by:740
Symbol 736 GraphicUsed by:737
Symbol 737 MovieClipUses:736Used by:738
Symbol 738 MovieClipUses:737 712Used by:740
Symbol 739 GraphicUsed by:740
Symbol 740 MovieClipUses:698 726 728 732 718 734 735 720 738 739Used by:741
Symbol 741 MovieClipUses:714 715 723 724 740Used by:742
Symbol 742 MovieClipUses:694 741Used by:743
Symbol 743 MovieClipUses:655 742Used by:760
Symbol 744 GraphicUses:644Used by:750
Symbol 745 BitmapUsed by:746
Symbol 746 GraphicUses:745Used by:747
Symbol 747 MovieClipUses:746Used by:750
Symbol 748 GraphicUses:649Used by:750
Symbol 749 GraphicUses:652Used by:750
Symbol 750 MovieClipUses:744 747 748 749Used by:760
Symbol 751 BitmapUsed by:752
Symbol 752 GraphicUses:751Used by:753
Symbol 753 MovieClipUses:752Used by:757 758 759
Symbol 754 BitmapUsed by:755
Symbol 755 GraphicUses:754Used by:756
Symbol 756 MovieClipUses:755Used by:757 758 759
Symbol 757 MovieClipUses:753 655 756Used by:760
Symbol 758 MovieClipUses:753 655 756Used by:760
Symbol 759 MovieClipUses:753 655 756Used by:760
Symbol 760 MovieClipUses:743 750 757 758 759Used by:761
Symbol 761 MovieClipUses:760Used by:969 1207 1228
Symbol 762 MovieClipUses:415Used by:775
Symbol 763 GraphicUsed by:764
Symbol 764 MovieClipUses:763Used by:771 774
Symbol 765 GraphicUsed by:766
Symbol 766 MovieClipUses:765Used by:771
Symbol 767 GraphicUsed by:768
Symbol 768 MovieClipUses:767Used by:771
Symbol 769 GraphicUsed by:770
Symbol 770 MovieClipUses:769Used by:771
Symbol 771 MovieClipUses:415 764 766 768 770Used by:775
Symbol 772 GraphicUsed by:773
Symbol 773 MovieClipUses:772Used by:774 1354
Symbol 774 MovieClipUses:415 764 773Used by:775
Symbol 775 MovieClipUses:415 762 771 774Used by:776
Symbol 776 MovieClipUses:775Used by:969 1207 1228 1372 1391
Symbol 777 GraphicUsed by:778 782
Symbol 778 MovieClipUses:777 573Used by:781
Symbol 779 BitmapUsed by:780
Symbol 780 GraphicUses:779Used by:781
Symbol 781 MovieClipUses:778 780Used by:791
Symbol 782 MovieClipUses:777 573Used by:785
Symbol 783 BitmapUsed by:784
Symbol 784 GraphicUses:783Used by:785
Symbol 785 MovieClipUses:782 784Used by:791
Symbol 786 GraphicUsed by:787
Symbol 787 MovieClipUses:786 573Used by:790
Symbol 788 BitmapUsed by:789
Symbol 789 GraphicUses:788Used by:790
Symbol 790 MovieClipUses:787 789Used by:791
Symbol 791 MovieClipUses:781 785 790Used by:792
Symbol 792 MovieClipUses:791Used by:969 1207 1228
Symbol 793 BitmapUsed by:794
Symbol 794 GraphicUses:793Used by:795
Symbol 795 MovieClipUses:794Used by:802 804
Symbol 796 BitmapUsed by:797
Symbol 797 GraphicUses:796Used by:798
Symbol 798 MovieClipUses:797Used by:802
Symbol 799 BitmapUsed by:800
Symbol 800 GraphicUses:799Used by:801
Symbol 801 MovieClipUses:800Used by:802
Symbol 802 MovieClipUses:795 798 801Used by:813 814
Symbol 803 GraphicUsed by:804
Symbol 804 MovieClipUses:795 803Used by:813
Symbol 805 GraphicUsed by:806
Symbol 806 MovieClipUses:805Used by:813
Symbol 807 GraphicUsed by:808
Symbol 808 MovieClipUses:807Used by:813
Symbol 809 GraphicUsed by:810
Symbol 810 MovieClipUses:809Used by:813
Symbol 811 GraphicUsed by:812
Symbol 812 MovieClipUses:811Used by:813
Symbol 813 MovieClipUses:802 804 806 808 810 812Used by:814
Symbol 814 MovieClipUses:802 813Used by:815
Symbol 815 MovieClipUses:814Used by:969 1207 1228
Symbol 816 GraphicUsed by:817
Symbol 817 MovieClipUses:816Used by:818 825
Symbol 818 MovieClipUses:817Used by:826
Symbol 819 GraphicUsed by:825 1256
Symbol 820 GraphicUsed by:825 1256
Symbol 821 GraphicUsed by:825 1256
Symbol 822 GraphicUsed by:825 1256
Symbol 823 GraphicUsed by:825 1256
Symbol 824 GraphicUsed by:825 1256
Symbol 825 MovieClipUses:817 819 820 821 822 823 824Used by:826
Symbol 826 MovieClipUses:818 825Used by:827
Symbol 827 MovieClipUses:826Used by:969 1207 1228
Symbol 828 BitmapUsed by:829
Symbol 829 GraphicUses:828Used by:832
Symbol 830 GraphicUsed by:831
Symbol 831 ButtonUses:830Used by:832
Symbol 832 MovieClipUses:829 831Used by:833
Symbol 833 MovieClipUses:832Used by:837
Symbol 834 GraphicUsed by:835
Symbol 835 MovieClipUses:834Used by:836 1391
Symbol 836 MovieClipUses:835Used by:837
Symbol 837 MovieClipUses:833 836Used by:838
Symbol 838 MovieClipUses:837Used by:969 1207 1228
Symbol 839 BitmapUsed by:840
Symbol 840 GraphicUses:839Used by:841
Symbol 841 MovieClipUses:840Used by:969 1207 1228
Symbol 842 BitmapUsed by:843
Symbol 843 GraphicUses:842Used by:844 1183
Symbol 844 MovieClipUses:843Used by:845
Symbol 845 MovieClipUses:844Used by:969 1207 1228 1391
Symbol 846 BitmapUsed by:847
Symbol 847 GraphicUses:846Used by:969
Symbol 848 MovieClipUses:411Used by:849
Symbol 849 MovieClipUses:848Used by:969 1207 1228
Symbol 850 GraphicUsed by:851
Symbol 851 MovieClipUses:850Used by:852
Symbol 852 MovieClipUses:851Used by:853
Symbol 853 MovieClipUses:852Used by:969 1207 1228
Symbol 854 BitmapUsed by:855
Symbol 855 GraphicUses:854Used by:856
Symbol 856 MovieClipUses:378 855Used by:857
Symbol 857 MovieClipUses:856Used by:858
Symbol 858 MovieClipUses:857Used by:969 1207 1228
Symbol 859 GraphicUsed by:860
Symbol 860 MovieClipUses:859Used by:885 893 925 954 962 966
Symbol 861 GraphicUsed by:862
Symbol 862 MovieClipUses:861Used by:885 893 925 954 966
Symbol 863 GraphicUsed by:864
Symbol 864 MovieClipUses:863Used by:885 893 925 954 966
Symbol 865 GraphicUsed by:866
Symbol 866 MovieClipUses:865Used by:885 893 925 954 962 966
Symbol 867 GraphicUsed by:868
Symbol 868 MovieClipUses:867Used by:885 893 925 954 966
Symbol 869 GraphicUsed by:870
Symbol 870 MovieClipUses:869Used by:885 893 925 954 966
Symbol 871 GraphicUsed by:872
Symbol 872 MovieClipUses:871Used by:885 893 925 954 966
Symbol 873 GraphicUsed by:874
Symbol 874 MovieClipUses:873Used by:877
Symbol 875 GraphicUsed by:876
Symbol 876 MovieClipUses:875Used by:877
Symbol 877 MovieClipUses:874 876Used by:885 893 925 954 966
Symbol 878 GraphicUsed by:879
Symbol 879 MovieClipUses:878Used by:884 957 965
Symbol 880 GraphicUsed by:881
Symbol 881 MovieClipUses:880Used by:884
Symbol 882 GraphicUsed by:883
Symbol 883 MovieClipUses:882Used by:884 957 965
Symbol 884 MovieClipUses:879 881 883Used by:885 893 925 954 966
Symbol 885 MovieClipUses:860 862 864 866 868 870 872 877 884Used by:967
Symbol 886 GraphicUsed by:887
Symbol 887 MovieClipUses:886Used by:893
Symbol 888 GraphicUsed by:892
Symbol 889 GraphicUsed by:892
Symbol 890 GraphicUsed by:892
Symbol 891 GraphicUsed by:892
Symbol 892 MovieClipUses:888 889 890 891Used by:893
Symbol 893 MovieClipUses:860 862 864 866 868 870 872 877 884 887 892Used by:967
Symbol 894 GraphicUsed by:895
Symbol 895 MovieClipUses:894Used by:925
Symbol 896 GraphicUsed by:897
Symbol 897 MovieClipUses:896Used by:925
Symbol 898 GraphicUsed by:899
Symbol 899 MovieClipUses:898Used by:925
Symbol 900 GraphicUsed by:901
Symbol 901 MovieClipUses:900Used by:925 954
Symbol 902 GraphicUsed by:903
Symbol 903 MovieClipUses:902Used by:925
Symbol 904 GraphicUsed by:905
Symbol 905 MovieClipUses:904Used by:925
Symbol 906 GraphicUsed by:907
Symbol 907 MovieClipUses:906Used by:925
Symbol 908 GraphicUsed by:909
Symbol 909 MovieClipUses:908Used by:925
Symbol 910 GraphicUsed by:911
Symbol 911 MovieClipUses:910Used by:925
Symbol 912 GraphicUsed by:913
Symbol 913 MovieClipUses:912Used by:925
Symbol 914 GraphicUsed by:915
Symbol 915 MovieClipUses:914Used by:925
Symbol 916 GraphicUsed by:917
Symbol 917 MovieClipUses:916Used by:925
Symbol 918 GraphicUsed by:919
Symbol 919 MovieClipUses:918Used by:925
Symbol 920 GraphicUsed by:921 922
Symbol 921 MovieClipUses:920Used by:925
Symbol 922 MovieClipUses:920Used by:925
Symbol 923 GraphicUsed by:924
Symbol 924 MovieClipUses:923Used by:925
Symbol 925 MovieClipUses:860 862 864 866 868 870 872 877 884 895 897 899 901 903 905 907 909 911 913 915 917 919 921 922 924Used by:967
Symbol 926 GraphicUsed by:927
Symbol 927 MovieClipUses:926Used by:954
Symbol 928 GraphicUsed by:929
Symbol 929 MovieClipUses:928Used by:954
Symbol 930 GraphicUsed by:931
Symbol 931 MovieClipUses:930Used by:954
Symbol 932 GraphicUsed by:933
Symbol 933 MovieClipUses:932Used by:954
Symbol 934 GraphicUsed by:935
Symbol 935 MovieClipUses:934Used by:954
Symbol 936 GraphicUsed by:937
Symbol 937 MovieClipUses:936Used by:954
Symbol 938 GraphicUsed by:939
Symbol 939 MovieClipUses:938Used by:954
Symbol 940 GraphicUsed by:941
Symbol 941 MovieClipUses:940Used by:954
Symbol 942 GraphicUsed by:943
Symbol 943 MovieClipUses:942Used by:954
Symbol 944 GraphicUsed by:945
Symbol 945 MovieClipUses:944Used by:954
Symbol 946 GraphicUsed by:947
Symbol 947 MovieClipUses:946Used by:954
Symbol 948 GraphicUsed by:949
Symbol 949 MovieClipUses:948Used by:954
Symbol 950 GraphicUsed by:951
Symbol 951 MovieClipUses:950Used by:954
Symbol 952 GraphicUsed by:953
Symbol 953 MovieClipUses:952Used by:954
Symbol 954 MovieClipUses:860 862 864 866 868 870 872 877 884 927 929 931 933 901 935 937 939 941 943 945 947 949 951 953Used by:967
Symbol 955 GraphicUsed by:956
Symbol 956 MovieClipUses:955Used by:957
Symbol 957 MovieClipUses:879 956 883Used by:962 966
Symbol 958 GraphicUsed by:959
Symbol 959 MovieClipUses:958Used by:962 966
Symbol 960 GraphicUsed by:961
Symbol 961 MovieClipUses:960Used by:962 966
Symbol 962 MovieClipUses:860 957 959 866 961Used by:967
Symbol 963 GraphicUsed by:964
Symbol 964 MovieClipUses:963Used by:965
Symbol 965 MovieClipUses:879 964 883Used by:966
Symbol 966 MovieClipUses:860 957 959 866 961 862 864 868 870 872 877 965 884Used by:967
Symbol 967 MovieClipUses:885 893 925 954 962 966Used by:968
Symbol 968 MovieClipUses:967Used by:969 1207 1228
Symbol 969 MovieClipUses:577 593 599 604 612 621 643 761 776 792 815 827 838 841 845 847 849 853 858 968Used by:970
Symbol 970 MovieClipUses:969Used by:1157
Symbol 971 GraphicUsed by:972
Symbol 972 MovieClipUses:971Used by:976 997 1055 1056 1091 1148
Symbol 973 GraphicUsed by:974
Symbol 974 MovieClipUses:973Used by:975
Symbol 975 MovieClipUses:259 261 263 268 270 974Used by:976 997 1055 1056 1091 1148
Symbol 976 MovieClipUses:277 250 307 238 243 972 257 975 276Used by:1094
Symbol 977 GraphicUsed by:978
Symbol 978 MovieClipUses:977Used by:979 1022
Symbol 979 MovieClipUses:978 242Used by:989
Symbol 980 GraphicUsed by:981
Symbol 981 MovieClipUses:980Used by:989 995
Symbol 982 GraphicUsed by:983
Symbol 983 MovieClipUses:982Used by:988 1028
Symbol 984 GraphicUsed by:985
Symbol 985 MovieClipUses:984Used by:988
Symbol 986 GraphicUsed by:987
Symbol 987 MovieClipUses:986Used by:988 1028
Symbol 988 MovieClipUses:301 983 985 270 987Used by:989 1029 1056 1148
Symbol 989 MovieClipUses:277 250 307 238 979 981 257 988Used by:990
Symbol 990 MovieClipUses:989Used by:1094
Symbol 991 MovieClipUses:245 252Used by:994 997
Symbol 992 GraphicUsed by:993
Symbol 993 MovieClipUses:992Used by:994 997
Symbol 994 MovieClipUses:277 250 991 238 243 993 257 355 276Used by:1094
Symbol 995 MovieClipUses:248 250 238 981 257 355 276 297 299Used by:1094
Symbol 996 MovieClipUses:248 250 238 297 299 257 355 276Used by:1094
Symbol 997 MovieClipUses:248 250 238 297 299 257 355 276 277 991 243 993 307 972 975Used by:1094
Symbol 998 GraphicUsed by:999
Symbol 999 MovieClipUses:998Used by:1022 1059
Symbol 1000 GraphicUsed by:1001
Symbol 1001 MovieClipUses:1000Used by:1022 1059
Symbol 1002 GraphicUsed by:1003
Symbol 1003 MovieClipUses:1002Used by:1022 1043
Symbol 1004 GraphicUsed by:1005
Symbol 1005 MovieClipUses:1004Used by:1022 1055 1062 1063 1064
Symbol 1006 GraphicUsed by:1007
Symbol 1007 MovieClipUses:1006Used by:1022 1062 1063 1064
Symbol 1008 GraphicUsed by:1009
Symbol 1009 MovieClipUses:1008Used by:1022 1055
Symbol 1010 GraphicUsed by:1011
Symbol 1011 MovieClipUses:1010Used by:1022
Symbol 1012 GraphicUsed by:1013
Symbol 1013 MovieClipUses:1012Used by:1022 1035 1038
Symbol 1014 GraphicUsed by:1015
Symbol 1015 MovieClipUses:1014Used by:1022
Symbol 1016 GraphicUsed by:1017
Symbol 1017 MovieClipUses:1016Used by:1022
Symbol 1018 GraphicUsed by:1019
Symbol 1019 MovieClipUses:1018Used by:1022
Symbol 1020 GraphicUsed by:1021
Symbol 1021 MovieClipUses:1020Used by:1022 1035
Symbol 1022 MovieClipUses:999 1001 275 1003 1005 1007 1009 257 242 1011 1013 1015 1017 978 1019 1021Used by:1094
Symbol 1023 GraphicUsed by:1024
Symbol 1024 MovieClipUses:1023Used by:1029
Symbol 1025 MovieClipUses:316 318Used by:1029
Symbol 1026 GraphicUsed by:1027
Symbol 1027 MovieClipUses:1026Used by:1029
Symbol 1028 MovieClipUses:301 983 268 270 987Used by:1029
Symbol 1029 MovieClipUses:277 250 238 243 314 988 307 1024 257 276 248 1025 1027 1028Used by:1094
Symbol 1030 GraphicUsed by:1031
Symbol 1031 MovieClipUses:1030Used by:1034
Symbol 1032 GraphicUsed by:1033
Symbol 1033 MovieClipUses:1032Used by:1034
Symbol 1034 MovieClipUses:1031 1033Used by:1055
Symbol 1035 MovieClipUses:1013 1021Used by:1055
Symbol 1036 GraphicUsed by:1037
Symbol 1037 MovieClipUses:1036Used by:1055
Symbol 1038 MovieClipUses:1013 252Used by:1055
Symbol 1039 GraphicUsed by:1040
Symbol 1040 MovieClipUses:1039Used by:1055
Symbol 1041 GraphicUsed by:1042
Symbol 1042 MovieClipUses:1041Used by:1043 1046
Symbol 1043 MovieClipUses:1042 1003Used by:1055 1062 1063 1064
Symbol 1044 GraphicUsed by:1045
Symbol 1045 MovieClipUses:1044Used by:1046
Symbol 1046 MovieClipUses:1042 1045Used by:1055
Symbol 1047 GraphicUsed by:1048
Symbol 1048 MovieClipUses:1047Used by:1055
Symbol 1049 GraphicUsed by:1050
Symbol 1050 MovieClipUses:1049Used by:1055
Symbol 1051 GraphicUsed by:1052
Symbol 1052 MovieClipUses:1051Used by:1055
Symbol 1053 GraphicUsed by:1054
Symbol 1054 MovieClipUses:1053Used by:1055
Symbol 1055 MovieClipUses:277 250 307 238 243 972 257 276 975 310 312 314 319 355 1034 253 291 297 1005 1035 1037 1038 1040 1043 1046 1048 1009 1050 1052 1054Used by:1094
Symbol 1056 MovieClipUses:277 250 307 238 243 972 257 975 276 352 314 988Used by:1094
Symbol 1057 GraphicUsed by:1058
Symbol 1058 MovieClipUses:1057Used by:1059
Symbol 1059 MovieClipUses:999 1001 245 1058Used by:1065
Symbol 1060 GraphicUsed by:1061
Symbol 1061 MovieClipUses:1060Used by:1062 1063 1064
Symbol 1062 MovieClipUses:1043 1005 1007 1061Used by:1065
Symbol 1063 MovieClipUses:1043 1005 1007 1061Used by:1065
Symbol 1064 MovieClipUses:1043 1005 1007 1061Used by:1065
Symbol 1065 MovieClipUses:1059 1062 1063 1064Used by:1094
Symbol 1066 GraphicUsed by:1067
Symbol 1067 MovieClipUses:1066Used by:1091 1093 1148
Symbol 1068 MovieClipUses:231Used by:1091 1093 1148
Symbol 1069 MovieClipUses:227Used by:1091 1093 1148
Symbol 1070 GraphicUsed by:1071
Symbol 1071 MovieClipUses:1070Used by:1091 1093 1148
Symbol 1072 GraphicUsed by:1091 1093 1148
Symbol 1073 GraphicUsed by:1074
Symbol 1074 MovieClipUses:1073Used by:1091 1093 1148
Symbol 1075 GraphicUsed by:1076
Symbol 1076 MovieClipUses:1075Used by:1091 1093 1095 1096 1101 1112 1119 1126 1127 1146 1148 1191
Symbol 1077 GraphicUsed by:1078
Symbol 1078 MovieClipUses:1077Used by:1091 1093 1095 1096 1101 1112 1119 1126 1127 1146 1148 1191
Symbol 1079 GraphicUsed by:1080
Symbol 1080 MovieClipUses:1079Used by:1091 1093 1095 1096 1126 1127 1148 1191
Symbol 1081 GraphicUsed by:1082
Symbol 1082 MovieClipUses:1081Used by:1091 1093 1095 1096 1126 1127 1148 1191
Symbol 1083 GraphicUsed by:1084
Symbol 1084 MovieClipUses:1083Used by:1091 1093 1095 1096 1119 1126 1127 1146 1148 1191
Symbol 1085 GraphicUsed by:1086
Symbol 1086 MovieClipUses:1085Used by:1091 1093 1095 1096 1126 1127 1146 1148 1191
Symbol 1087 GraphicUsed by:1088
Symbol 1088 MovieClipUses:1087Used by:1091 1093 1095 1096 1101 1112 1119 1126 1127 1146 1148 1191
Symbol 1089 GraphicUsed by:1091
Symbol 1090 GraphicUsed by:1091 1093
Symbol 1091 MovieClipUses:277 250 307 238 243 972 257 975 276 1067 1068 1069 1071 1072 1074 1076 1078 1080 1082 1084 1086 1088 1089 1090Used by:1094
Symbol 1092 GraphicUsed by:1093
Symbol 1093 MovieClipUses:248 250 238 297 299 257 355 276 1067 1068 1069 1071 1072 1074 1076 1078 1080 1082 1084 1086 1088 1092 1090Used by:1094
Symbol 1094 MovieClipUses:976 42 294 990 994 995 996 997 1022 1029 1055 1056 359 1065 1091 1093Used by:1150
Symbol 1095 MovieClipUses:1076 1078 1080 1082 1084 1086 1088Used by:1149
Symbol 1096 MovieClipUses:1076 1078 1080 1082 1084 1086 1088Used by:1149
Symbol 1097 GraphicUsed by:1098
Symbol 1098 MovieClipUses:1097Used by:1101 1112 1119
Symbol 1099 GraphicUsed by:1100
Symbol 1100 MovieClipUses:1099Used by:1101 1112 1119
Symbol 1101 MovieClipUses:1076 1078 1088 1098 1100Used by:1149
Symbol 1102 GraphicUsed by:1103
Symbol 1103 MovieClipUses:1102Used by:1112
Symbol 1104 GraphicUsed by:1105
Symbol 1105 MovieClipUses:1104Used by:1112
Symbol 1106 GraphicUsed by:1107
Symbol 1107 MovieClipUses:1106Used by:1112
Symbol 1108 GraphicUsed by:1109
Symbol 1109 MovieClipUses:1108Used by:1112
Symbol 1110 GraphicUsed by:1111
Symbol 1111 MovieClipUses:1110Used by:1112
Symbol 1112 MovieClipUses:1076 1078 1088 1098 1100 1103 1105 1107 1109 1111Used by:1149
Symbol 1113 GraphicUsed by:1114
Symbol 1114 MovieClipUses:1113Used by:1119 1126
Symbol 1115 GraphicUsed by:1116
Symbol 1116 MovieClipUses:1115Used by:1119
Symbol 1117 GraphicUsed by:1118
Symbol 1118 MovieClipUses:1117Used by:1119
Symbol 1119 MovieClipUses:1076 1078 1088 1098 1100 1114 1084 1116 1118Used by:1149
Symbol 1120 GraphicUsed by:1121
Symbol 1121 MovieClipUses:1120Used by:1126
Symbol 1122 GraphicUsed by:1123
Symbol 1123 MovieClipUses:1122Used by:1126
Symbol 1124 GraphicUsed by:1125
Symbol 1125 MovieClipUses:1124Used by:1126
Symbol 1126 MovieClipUses:1078 1080 1076 1082 1084 1086 1088 1121 1123 1114 1125 59 57 55Used by:1149
Symbol 1127 MovieClipUses:1076 1078 1080 1082 1084 1086 1088Used by:1146
Symbol 1128 GraphicUsed by:1129
Symbol 1129 MovieClipUses:1128Used by:1146
Symbol 1130 GraphicUsed by:1131
Symbol 1131 MovieClipUses:1130Used by:1146
Symbol 1132 GraphicUsed by:1133
Symbol 1133 MovieClipUses:1132Used by:1146
Symbol 1134 GraphicUsed by:1135
Symbol 1135 MovieClipUses:1134Used by:1146
Symbol 1136 GraphicUsed by:1146
Symbol 1137 GraphicUsed by:1146
Symbol 1138 GraphicUsed by:1139
Symbol 1139 MovieClipUses:1138Used by:1146
Symbol 1140 GraphicUsed by:1141
Symbol 1141 MovieClipUses:1140Used by:1146
Symbol 1142 GraphicUsed by:1143
Symbol 1143 MovieClipUses:1142Used by:1146
Symbol 1144 GraphicUsed by:1145
Symbol 1145 MovieClipUses:1144Used by:1146
Symbol 1146 MovieClipUses:1127 1076 1078 1088 1129 1084 1086 1131 1133 1135 1136 1137 1139 1141 1143 1145Used by:1149
Symbol 1147 GraphicUsed by:1148
Symbol 1148 MovieClipUses:1076 1078 1080 1082 1084 1086 1088 1067 1068 1069 1071 1072 1074 277 250 307 238 243 972 257 988 276 1147 355 975Used by:1149
Symbol 1149 MovieClipUses:1095 42 1096 1101 1112 1119 1126 1146 1148Used by:1150
Symbol 1150 MovieClipUses:1094 1149Used by:1157 1209 1230 1374 1393 1408
Symbol 1151 GraphicUsed by:1152
Symbol 1152 MovieClipUses:1151Used by:1154
Symbol 1153 MovieClipUses:16Used by:1154
Symbol 1154 MovieClipUses:1152 1153Used by:1157 1209 1230 1374 1393 1408
Symbol 1155 EditableTextUses:121Used by:1156
Symbol 1156 MovieClipUses:1155Used by:1157 1209 1230 1374 1393 1408
Symbol 1157 MovieClipUses:560 563 566 970 1150 42 1154 1156Used by:Timeline
Symbol 1158 EditableTextUses:12Used by:1160
Symbol 1159 MovieClipUses:120Used by:1160
Symbol 1160 MovieClipUses:1158 1159Used by:Timeline
Symbol 1161 GraphicUsed by:1163
Symbol 1162 EditableTextUses:121Used by:1163
Symbol 1163 ButtonUses:1161 1162Used by:Timeline
Symbol 1164 BitmapUsed by:1165 1375
Symbol 1165 GraphicUses:1164Used by:1166
Symbol 1166 MovieClipUses:1165Used by:1209
Symbol 1167 BitmapUsed by:1168
Symbol 1168 GraphicUses:1167Used by:1169
Symbol 1169 MovieClipUses:1168Used by:1209
Symbol 1170 BitmapUsed by:1171
Symbol 1171 GraphicUses:1170Used by:1172
Symbol 1172 MovieClipUses:1171Used by:1178
Symbol 1173 GraphicUsed by:1174
Symbol 1174 MovieClipUses:1173 573Used by:1177
Symbol 1175 BitmapUsed by:1176
Symbol 1176 GraphicUses:1175Used by:1177
Symbol 1177 MovieClipUses:1174 1176Used by:1178
Symbol 1178 MovieClipUses:1172 1177Used by:1207
Symbol 1179 BitmapUsed by:1180
Symbol 1180 GraphicUses:1179Used by:1183
Symbol 1181 BitmapUsed by:1182
Symbol 1182 GraphicUses:1181Used by:1183
Symbol 1183 MovieClipUses:843 1180 1182Used by:1184
Symbol 1184 MovieClipUses:1183Used by:1185 1186 1202
Symbol 1185 MovieClipUses:1184Used by:1202
Symbol 1186 MovieClipUses:1184Used by:1202
Symbol 1187 GraphicUsed by:1192
Symbol 1188 BitmapUsed by:1189 1398
Symbol 1189 GraphicUses:1188Used by:1190
Symbol 1190 MovieClipUses:1189Used by:1192
Symbol 1191 MovieClipUses:1076 1078 1080 1082 1084 1086 1088Used by:1192
Symbol 1192 MovieClipUses:1187 1190 331 1191Used by:1201
Symbol 1193 GraphicUsed by:1194
Symbol 1194 MovieClipUses:1193 331Used by:1201
Symbol 1195 GraphicUsed by:1196
Symbol 1196 MovieClipUses:1195Used by:1201
Symbol 1197 GraphicUsed by:1198
Symbol 1198 MovieClipUses:1197Used by:1201
Symbol 1199 GraphicUsed by:1200
Symbol 1200 MovieClipUses:1199Used by:1201
Symbol 1201 MovieClipUses:1192 1194 1196 1198 1200Used by:1202
Symbol 1202 MovieClipUses:1184 1185 1186 1201Used by:1207 1228 1372 1391 1406
Symbol 1203 BitmapUsed by:1204
Symbol 1204 GraphicUses:1203Used by:1207
Symbol 1205 MovieClipUses:386Used by:1206
Symbol 1206 MovieClipUses:1205Used by:1207 1228
Symbol 1207 MovieClipUses:1178 593 599 1202 761 1204 612 621 845 815 792 776 643 841 827 838 604 858 853 849 1206 968Used by:1208
Symbol 1208 MovieClipUses:1207Used by:1209
Symbol 1209 MovieClipUses:560 1166 1169 1208 1150 1154 1156Used by:Timeline
Symbol 1210 BitmapUsed by:1211 1394
Symbol 1211 GraphicUses:1210Used by:1212
Symbol 1212 MovieClipUses:1211Used by:1230
Symbol 1213 BitmapUsed by:1214
Symbol 1214 GraphicUses:1213Used by:1215
Symbol 1215 MovieClipUses:1214Used by:1230 1396
Symbol 1216 BitmapUsed by:1217 1218
Symbol 1217 GraphicUses:1216Used by:1225
Symbol 1218 GraphicUses:1216Used by:1219
Symbol 1219 MovieClipUses:1218Used by:1225
Symbol 1220 GraphicUsed by:1221
Symbol 1221 MovieClipUses:1220 573Used by:1224
Symbol 1222 BitmapUsed by:1223
Symbol 1223 GraphicUses:1222Used by:1224
Symbol 1224 MovieClipUses:1221 1223Used by:1225
Symbol 1225 MovieClipUses:1217 1219 1224Used by:1228
Symbol 1226 BitmapUsed by:1227
Symbol 1227 GraphicUses:1226Used by:1228
Symbol 1228 MovieClipUses:1225 858 849 853 1206 761 1227 593 845 612 621 815 776 792 841 838 604 599 1202 827 968 643Used by:1229
Symbol 1229 MovieClipUses:1228Used by:1230
Symbol 1230 MovieClipUses:560 1212 1215 1229 1150 1154 1156Used by:Timeline
Symbol 1231 GraphicUses:561Used by:1232
Symbol 1232 MovieClipUses:1231Used by:1374
Symbol 1233 MovieClipUses:566Used by:1374
Symbol 1234 GraphicUsed by:1237
Symbol 1235 GraphicUses:333Used by:1236 1379
Symbol 1236 ButtonUses:1235Used by:1237
Symbol 1237 MovieClipUses:1234 1236Used by:1249
Symbol 1238 GraphicUsed by:1239
Symbol 1239 MovieClipUses:1238Used by:1249 1389 1404
Symbol 1240 GraphicUsed by:1244 1245
Symbol 1241 GraphicUses:333Used by:1242 1245
Symbol 1242 MovieClipUses:1241Used by:1244
Symbol 1243 GraphicUsed by:1244 1245
Symbol 1244 MovieClipUses:1240 1242 1243Used by:1245
Symbol 1245 ButtonUses:1244 1240 1241 1243Used by:1249 1389 1404
Symbol 1246 BitmapUsed by:1247
Symbol 1247 GraphicUses:1246Used by:1248
Symbol 1248 MovieClipUses:1247Used by:1249
Symbol 1249 MovieClipUses:1237 1239 1245 1248Used by:1250
Symbol 1250 MovieClipUses:1249Used by:1372
Symbol 1251 GraphicUsed by:1252
Symbol 1252 MovieClipUses:1251Used by:1372 1391 1406
Symbol 1253 GraphicUsed by:1254
Symbol 1254 MovieClipUses:1253Used by:1255 1256
Symbol 1255 MovieClipUses:1254Used by:1257
Symbol 1256 MovieClipUses:1254 819 820 821 822 823 824Used by:1257
Symbol 1257 MovieClipUses:1255 1256Used by:1258
Symbol 1258 MovieClipUses:1257Used by:1372 1391 1406
Symbol 1259 GraphicUsed by:1260
Symbol 1260 MovieClipUses:1259Used by:1285 1303 1337 1358
Symbol 1261 GraphicUsed by:1262
Symbol 1262 MovieClipUses:1261Used by:1285 1303 1337 1358
Symbol 1263 GraphicUsed by:1264
Symbol 1264 MovieClipUses:1263Used by:1285 1303 1337 1358
Symbol 1265 GraphicUsed by:1266
Symbol 1266 MovieClipUses:1265Used by:1285 1303 1337 1358
Symbol 1267 GraphicUsed by:1268
Symbol 1268 MovieClipUses:1267Used by:1269 1270 1271
Symbol 1269 MovieClipUses:1268Used by:1274
Symbol 1270 MovieClipUses:1268Used by:1274
Symbol 1271 MovieClipUses:1268Used by:1274
Symbol 1272 GraphicUsed by:1273
Symbol 1273 MovieClipUses:1272Used by:1274 1314
Symbol 1274 MovieClipUses:1269 1270 1271 1273Used by:1285 1300 1303 1337 1354 1358
Symbol 1275 GraphicUsed by:1276
Symbol 1276 MovieClipUses:1275Used by:1277 1278
Symbol 1277 MovieClipUses:180 1276 182Used by:1281
Symbol 1278 MovieClipUses:180 1276 182Used by:1281
Symbol 1279 GraphicUsed by:1280
Symbol 1280 MovieClipUses:1279Used by:1281 1284
Symbol 1281 MovieClipUses:178 1277 1278 185 187 1280Used by:1285 1303 1337 1358
Symbol 1282 GraphicUsed by:1283
Symbol 1283 MovieClipUses:1282Used by:1284 1315 1357
Symbol 1284 MovieClipUses:178 1283 185 187 1280Used by:1285 1303 1337 1358
Symbol 1285 MovieClipUses:166 1260 1262 174 176 1264 1266 1274 1281 1284Used by:1359
Symbol 1286 GraphicUsed by:1287
Symbol 1287 MovieClipUses:1286Used by:1303
Symbol 1288 GraphicUsed by:1289
Symbol 1289 MovieClipUses:1288Used by:1303
Symbol 1290 GraphicUsed by:1291
Symbol 1291 MovieClipUses:1290Used by:1303
Symbol 1292 GraphicUsed by:1293
Symbol 1293 MovieClipUses:1292Used by:1294
Symbol 1294 MovieClipUses:1293Used by:1295
Symbol 1295 MovieClipUses:1294Used by:1300 1303 1433 1444 1452 1462 1486 1489 1490 1493
Symbol 1296 GraphicUsed by:1297
Symbol 1297 MovieClipUses:1296Used by:1300 1303 1316 1337 1354
Symbol 1298 GraphicUsed by:1299
Symbol 1299 MovieClipUses:1298Used by:1300 1303 1354
Symbol 1300 MovieClipUses:166 1295 1297 1299 174 176 1274 190 469Used by:1303
Symbol 1301 GraphicUsed by:1302
Symbol 1302 MovieClipUses:1301Used by:1303
Symbol 1303 MovieClipUses:166 1260 1262 174 176 1274 1281 1266 1264 1284 1287 1289 1291 1295 1297 1299 190 469 1300 1302 170 168 172 192 194Used by:1359
Symbol 1304 GraphicUsed by:1305
Symbol 1305 MovieClipUses:1304Used by:1316 1337 1354
Symbol 1306 GraphicUsed by:1307
Symbol 1307 MovieClipUses:1306Used by:1316 1337 1354
Symbol 1308 GraphicUsed by:1309
Symbol 1309 MovieClipUses:1308Used by:1316 1337 1354
Symbol 1310 GraphicUsed by:1311
Symbol 1311 MovieClipUses:1310Used by:1316 1337 1354
Symbol 1312 GraphicUsed by:1314
Symbol 1313 GraphicUsed by:1314
Symbol 1314 MovieClipUses:1273 1312 1313Used by:1316 1337 1354
Symbol 1315 MovieClipUses:178 1283 185 187 189Used by:1316 1337 1354
Symbol 1316 MovieClipUses:1305 1307 1297 1309 1311 176 1314 1315 469Used by:1359
Symbol 1317 GraphicUsed by:1318
Symbol 1318 MovieClipUses:1317Used by:1337
Symbol 1319 GraphicUsed by:1320
Symbol 1320 MovieClipUses:1319Used by:1337
Symbol 1321 GraphicUsed by:1322
Symbol 1322 MovieClipUses:1321Used by:1337
Symbol 1323 GraphicUsed by:1324
Symbol 1324 MovieClipUses:1323Used by:1337
Symbol 1325 GraphicUsed by:1326
Symbol 1326 MovieClipUses:1325Used by:1337
Symbol 1327 GraphicUsed by:1328
Symbol 1328 MovieClipUses:1327Used by:1337
Symbol 1329 GraphicUsed by:1330
Symbol 1330 MovieClipUses:1329Used by:1337
Symbol 1331 GraphicUsed by:1332
Symbol 1332 MovieClipUses:1331Used by:1337
Symbol 1333 GraphicUsed by:1334
Symbol 1334 MovieClipUses:1333Used by:1337
Symbol 1335 GraphicUsed by:1336
Symbol 1336 MovieClipUses:1335Used by:1337
Symbol 1337 MovieClipUses:166 1260 1262 174 176 1264 1266 1274 1281 1318 1320 1322 1324 1326 1328 1330 1332 1305 1307 1297 1309 1311 1314 1315 469 1334 1336 1284 429 431 433 435 437 439 441 443 445Used by:1359
Symbol 1338 GraphicUsed by:1339
Symbol 1339 MovieClipUses:1338Used by:1354
Symbol 1340 GraphicUsed by:1341
Symbol 1341 MovieClipUses:1340Used by:1354
Symbol 1342 GraphicUsed by:1343
Symbol 1343 MovieClipUses:1342Used by:1354
Symbol 1344 GraphicUsed by:1345
Symbol 1345 MovieClipUses:1344Used by:1354
Symbol 1346 GraphicUsed by:1347
Symbol 1347 MovieClipUses:1346Used by:1354
Symbol 1348 GraphicUsed by:1349
Symbol 1349 MovieClipUses:1348Used by:1354
Symbol 1350 GraphicUsed by:1351
Symbol 1351 MovieClipUses:1350Used by:1354
Symbol 1352 GraphicUsed by:1353
Symbol 1353 MovieClipUses:1352Used by:1354
Symbol 1354 MovieClipUses:1305 1307 1297 1309 1311 176 1314 1315 469 773 415 1339 1341 1343 1345 1347 1349 1299 1351 1274 1353Used by:1359
Symbol 1355 GraphicUsed by:1356
Symbol 1356 MovieClipUses:1355Used by:1357
Symbol 1357 MovieClipUses:178 1283 185 187 1356Used by:1358
Symbol 1358 MovieClipUses:166 1260 1262 174 176 1264 1266 1274 1281 1284 1357Used by:1359
Symbol 1359 MovieClipUses:1285 1303 1316 1337 1354 1358Used by:1360
Symbol 1360 MovieClipUses:1359Used by:1372 1391 1406
Symbol 1361 GraphicUsed by:1369
Symbol 1362 GraphicUsed by:1369
Symbol 1363 GraphicUsed by:1369
Symbol 1364 GraphicUsed by:1369
Symbol 1365 GraphicUsed by:1369
Symbol 1366 GraphicUsed by:1369
Symbol 1367 GraphicUsed by:1369
Symbol 1368 GraphicUsed by:1369
Symbol 1369 MovieClipUses:419 1361 1362 1363 1364 1365 1366 1367 1368Used by:1370
Symbol 1370 MovieClipUses:419 42 1369Used by:1371
Symbol 1371 MovieClipUses:1370Used by:1372 1391 1406
Symbol 1372 MovieClipUses:1250 1252 599 1202 776 1258 612 1360 1371Used by:1373
Symbol 1373 MovieClipUses:1372Used by:1374
Symbol 1374 MovieClipUses:560 1232 1233 1373 1150 1154 1156Used by:Timeline
Symbol 1375 GraphicUses:1164Used by:1376
Symbol 1376 MovieClipUses:1375Used by:1393
Symbol 1377 MovieClipUses:566Used by:1393
Symbol 1378 GraphicUsed by:1380
Symbol 1379 ButtonUses:1235Used by:1380
Symbol 1380 MovieClipUses:1378 1379Used by:1389
Symbol 1381 GraphicUsed by:1382
Symbol 1382 MovieClipUses:1381Used by:1385
Symbol 1383 GraphicUsed by:1384
Symbol 1384 MovieClipUses:1383Used by:1385
Symbol 1385 MovieClipUses:1382 1384Used by:1389 1404
Symbol 1386 BitmapUsed by:1387
Symbol 1387 GraphicUses:1386Used by:1388
Symbol 1388 MovieClipUses:1387Used by:1389
Symbol 1389 MovieClipUses:1380 1239 1245 1385 1388Used by:1390
Symbol 1390 MovieClipUses:1389Used by:1391
Symbol 1391 MovieClipUses:1390 1252 599 1202 776 1258 612 1360 835 845 1371Used by:1392
Symbol 1392 MovieClipUses:1391Used by:1393
Symbol 1393 MovieClipUses:560 1376 1377 1392 1150 1154 1156Used by:Timeline
Symbol 1394 GraphicUses:1210Used by:1395
Symbol 1395 MovieClipUses:1394Used by:1408
Symbol 1396 MovieClipUses:1215Used by:1408
Symbol 1397 GraphicUsed by:1400
Symbol 1398 GraphicUses:1188Used by:1399
Symbol 1399 MovieClipUses:1398Used by:1400
Symbol 1400 MovieClipUses:1397 1399Used by:1404
Symbol 1401 BitmapUsed by:1402
Symbol 1402 GraphicUses:1401Used by:1403
Symbol 1403 MovieClipUses:1402Used by:1404
Symbol 1404 MovieClipUses:1400 1239 1245 1385 1403Used by:1405
Symbol 1405 MovieClipUses:1404Used by:1406
Symbol 1406 MovieClipUses:1405 1258 1360 1371 1202 42 612 1252 599Used by:1407
Symbol 1407 MovieClipUses:1406Used by:1408
Symbol 1408 MovieClipUses:560 1395 1396 1407 1150 1154 1156Used by:Timeline
Symbol 1409 GraphicUsed by:1410
Symbol 1410 MovieClipUses:1409Used by:1426 1433 1444 1452 1462
Symbol 1411 GraphicUsed by:1412
Symbol 1412 MovieClipUses:1411Used by:1426 1433 1444 1452 1462
Symbol 1413 GraphicUsed by:1414
Symbol 1414 MovieClipUses:1413Used by:1426 1433 1444 1452 1462
Symbol 1415 GraphicUsed by:1416
Symbol 1416 MovieClipUses:1415Used by:1426 1433
Symbol 1417 GraphicUsed by:1418
Symbol 1418 MovieClipUses:1417Used by:1425
Symbol 1419 GraphicUsed by:1420
Symbol 1420 MovieClipUses:1419Used by:1421
Symbol 1421 MovieClipUses:1420Used by:1425
Symbol 1422 GraphicUsed by:1423
Symbol 1423 MovieClipUses:1422Used by:1424
Symbol 1424 MovieClipUses:1423Used by:1425
Symbol 1425 MovieClipUses:1418 1421 1424Used by:1426 1433 1444 1452 1462
Symbol 1426 MovieClipUses:1410 1412 1414 1416 1425Used by:1463
Symbol 1427 GraphicUsed by:1428
Symbol 1428 MovieClipUses:1427Used by:1433 1444 1452 1462 1486 1489 1490 1493
Symbol 1429 GraphicUsed by:1430
Symbol 1430 MovieClipUses:1429Used by:1433 1444 1452 1462
Symbol 1431 GraphicUsed by:1432
Symbol 1432 MovieClipUses:1431Used by:1433 1444 1452 1462
Symbol 1433 MovieClipUses:1410 1412 1414 1416 1425 1428 1430 1432 1295Used by:1463
Symbol 1434 GraphicUsed by:1441
Symbol 1435 GraphicUsed by:1441
Symbol 1436 GraphicUsed by:1441
Symbol 1437 GraphicUsed by:1441
Symbol 1438 GraphicUsed by:1441
Symbol 1439 GraphicUsed by:1441
Symbol 1440 GraphicUsed by:1441
Symbol 1441 MovieClipUses:1434 1435 1436 1437 42 1438 1439 1440Used by:1444 1489
Symbol 1442 GraphicUsed by:1443
Symbol 1443 MovieClipUses:1442Used by:1444 1452
Symbol 1444 MovieClipUses:1410 1412 1414 1295 1428 1430 1432 1425 1441 170 1443Used by:1463
Symbol 1445 GraphicUsed by:1451
Symbol 1446 GraphicUsed by:1451
Symbol 1447 GraphicUsed by:1451
Symbol 1448 GraphicUsed by:1451
Symbol 1449 GraphicUsed by:1451
Symbol 1450 GraphicUsed by:1451
Symbol 1451 MovieClipUses:1445 1446 1447 42 1448 1449 1450Used by:1452 1490
Symbol 1452 MovieClipUses:1410 1412 1414 1295 1428 1430 1432 1425 1451 170 1443Used by:1463
Symbol 1453 GraphicUsed by:1459
Symbol 1454 GraphicUsed by:1459
Symbol 1455 GraphicUsed by:1459
Symbol 1456 GraphicUsed by:1459
Symbol 1457 GraphicUsed by:1459
Symbol 1458 GraphicUsed by:1459
Symbol 1459 MovieClipUses:1453 1454 1455 42 1456 1457 1458Used by:1462 1493
Symbol 1460 GraphicUsed by:1461
Symbol 1461 MovieClipUses:1460Used by:1462
Symbol 1462 MovieClipUses:1410 1412 1414 1295 1428 1430 1432 1425 1459 170 1461Used by:1463
Symbol 1463 MovieClipUses:1426 1433 1444 1452 1462Used by:1495
Symbol 1464 GraphicUsed by:1465
Symbol 1465 MovieClipUses:1464Used by:1479 1486 1489 1490 1493
Symbol 1466 GraphicUsed by:1467
Symbol 1467 MovieClipUses:1466Used by:1479 1486 1489 1490 1493
Symbol 1468 GraphicUsed by:1469
Symbol 1469 MovieClipUses:1468Used by:1472
Symbol 1470 GraphicUsed by:1471
Symbol 1471 MovieClipUses:1470Used by:1472
Symbol 1472 MovieClipUses:1469 1471Used by:1479 1486 1489 1490 1493
Symbol 1473 GraphicUsed by:1474
Symbol 1474 MovieClipUses:1473Used by:1479 1486 1489 1490 1493
Symbol 1475 GraphicUsed by:1476
Symbol 1476 MovieClipUses:1475Used by:1479 1486
Symbol 1477 GraphicUsed by:1478
Symbol 1478 MovieClipUses:1477Used by:1479 1486 1489 1490 1493
Symbol 1479 MovieClipUses:1465 1467 1472 1474 1476 1478Used by:1494
Symbol 1480 GraphicUsed by:1481
Symbol 1481 MovieClipUses:1480Used by:1486 1489 1490 1493
Symbol 1482 GraphicUsed by:1483
Symbol 1483 MovieClipUses:1482Used by:1486 1489 1490 1493
Symbol 1484 GraphicUsed by:1485
Symbol 1485 MovieClipUses:1484Used by:1486 1489 1490 1493
Symbol 1486 MovieClipUses:1472 1465 1467 1474 1478 1476 1428 1481 1483 1485 1295Used by:1494
Symbol 1487 GraphicUsed by:1488
Symbol 1488 MovieClipUses:1487Used by:1489 1490
Symbol 1489 MovieClipUses:1472 1465 1467 1474 1295 1428 1478 1481 1483 1485 1441 170 1488Used by:1494
Symbol 1490 MovieClipUses:1472 1465 1467 1474 1295 1428 1478 1481 1483 1485 1451 170 1488Used by:1494
Symbol 1491 GraphicUsed by:1492
Symbol 1492 MovieClipUses:1491Used by:1493
Symbol 1493 MovieClipUses:1472 1465 1467 1474 1295 1428 1478 1481 1483 1485 1459 170 1492Used by:1494
Symbol 1494 MovieClipUses:1479 1486 1489 1490 1493Used by:1495
Symbol 1495 MovieClipUses:1463 1494Used by:Timeline

Instance Names

"loader"Frame 1Symbol 11 MovieClip
"capture"Frame 2Symbol 126 Button
"loader"Frame 10Symbol 11 MovieClip
"Packaging"Frame 46Symbol 514 MovieClip
"fade"Frame 56Symbol 1160 MovieClip
"FocusBtn"Frame 56Symbol 1163 Button
"Game"Frame 106Symbol 1408 MovieClip
"loader"Symbol 11 MovieClip Frame 1Symbol 7 MovieClip
"Etat"Symbol 60 MovieClip [JackDragon_FireAnim] Frame 1Symbol 53 MovieClip
"Etat"Symbol 60 MovieClip [JackDragon_FireAnim] Frame 21Symbol 55 MovieClip
"Etat"Symbol 69 MovieClip [Medusa_Blast] Frame 1Symbol 64 MovieClip
"Obj"Symbol 69 MovieClip [Medusa_Blast] Frame 21Symbol 68 MovieClip
"Etat"Symbol 85 MovieClip [NetBall] Frame 1Symbol 76 MovieClip
"Etat"Symbol 85 MovieClip [NetBall] Frame 10Symbol 83 MovieClip
"Etat"Symbol 85 MovieClip [NetBall] Frame 14Symbol 84 MovieClip
"soundOff"Symbol 511 MovieClip Frame 1Symbol 506 Button
"soundOn"Symbol 511 MovieClip Frame 1Symbol 510 Button
"play"Symbol 514 MovieClip Frame 1Symbol 140 Button
"howto"Symbol 514 MovieClip Frame 1Symbol 144 Button
"next"Symbol 514 MovieClip Frame 11Symbol 208 Button
"backShadow"Symbol 514 MovieClip Frame 11Symbol 216 Button
"play"Symbol 514 MovieClip Frame 11Symbol 140 Button
"backFirst"Symbol 514 MovieClip Frame 11Symbol 216 Button
"back"Symbol 514 MovieClip Frame 12Symbol 216 Button
"play"Symbol 514 MovieClip Frame 14Symbol 140 Button
"back"Symbol 514 MovieClip Frame 14Symbol 216 Button
"playagain"Symbol 514 MovieClip Frame 21Symbol 457 Button
"hiscore"Symbol 514 MovieClip Frame 21Symbol 464 Button
"playagain"Symbol 514 MovieClip Frame 31Symbol 481 Button
"nextLevel"Symbol 514 MovieClip Frame 41Symbol 208 Button
"quit"Symbol 514 MovieClip Frame 51Symbol 498 Button
"help"Symbol 514 MovieClip Frame 51Symbol 502 Button
"sound"Symbol 514 MovieClip Frame 51Symbol 511 MovieClip
"play"Symbol 514 MovieClip Frame 51Symbol 140 Button
"theDoge"Symbol 514 MovieClip Frame 61Symbol 513 MovieClip
"score1"Symbol 558 MovieClip Frame 1Symbol 537 MovieClip
"score2"Symbol 558 MovieClip Frame 1Symbol 537 MovieClip
"score3"Symbol 558 MovieClip Frame 1Symbol 537 MovieClip
"score4"Symbol 558 MovieClip Frame 1Symbol 537 MovieClip
"score5"Symbol 558 MovieClip Frame 1Symbol 537 MovieClip
"score6"Symbol 558 MovieClip Frame 1Symbol 537 MovieClip
"level"Symbol 558 MovieClip Frame 1Symbol 544 MovieClip
"life1"Symbol 558 MovieClip Frame 1Symbol 547 MovieClip
"life2"Symbol 558 MovieClip Frame 1Symbol 547 MovieClip
"life3"Symbol 558 MovieClip Frame 1Symbol 547 MovieClip
"barPower"Symbol 558 MovieClip Frame 1Symbol 550 MovieClip
"barEnergy"Symbol 558 MovieClip Frame 1Symbol 550 MovieClip
"menu"Symbol 558 MovieClip Frame 1Symbol 557 Button
"obj"Symbol 593 MovieClip Frame 1Symbol 592 MovieClip
"Obj"Symbol 599 MovieClip Frame 1Symbol 598 MovieClip
"Obj"Symbol 604 MovieClip Frame 1Symbol 603 MovieClip
"etat"Symbol 611 MovieClip Frame 10Symbol 609 MovieClip
"etat"Symbol 611 MovieClip Frame 20Symbol 610 MovieClip
"obj"Symbol 612 MovieClip Frame 1Symbol 611 MovieClip
"obj"Symbol 621 MovieClip Frame 1Symbol 620 MovieClip
"Etat"Symbol 642 MovieClip Frame 1Symbol 634 MovieClip
"Etat"Symbol 642 MovieClip Frame 10Symbol 641 MovieClip
"Obj"Symbol 643 MovieClip Frame 1Symbol 642 MovieClip
"Etat"Symbol 694 MovieClip Frame 1Symbol 675 MovieClip
"Etat"Symbol 694 MovieClip Frame 10Symbol 676 MovieClip
"Etat"Symbol 694 MovieClip Frame 20Symbol 685 MovieClip
"Etat"Symbol 694 MovieClip Frame 30Symbol 686 MovieClip
"Etat"Symbol 694 MovieClip Frame 40Symbol 693 MovieClip
"Etat"Symbol 741 MovieClip Frame 1Symbol 714 MovieClip
"Etat"Symbol 741 MovieClip Frame 10Symbol 715 MovieClip
"Etat"Symbol 741 MovieClip Frame 20Symbol 723 MovieClip
"Etat"Symbol 741 MovieClip Frame 30Symbol 724 MovieClip
"Etat"Symbol 741 MovieClip Frame 40Symbol 740 MovieClip
"Obj"Symbol 742 MovieClip Frame 2Symbol 694 MovieClip
"Obj"Symbol 742 MovieClip Frame 11Symbol 741 MovieClip
"window"Symbol 743 MovieClip Frame 1Symbol 655 MovieClip
"Hunt"Symbol 743 MovieClip Frame 1Symbol 742 MovieClip
"window"Symbol 757 MovieClip Frame 1Symbol 655 MovieClip
"window"Symbol 758 MovieClip Frame 1Symbol 655 MovieClip
"window"Symbol 759 MovieClip Frame 1Symbol 655 MovieClip
"Etat"Symbol 760 MovieClip Frame 1Symbol 743 MovieClip
"overlay"Symbol 760 MovieClip Frame 1Symbol 750 MovieClip
"Etat"Symbol 760 MovieClip Frame 10Symbol 757 MovieClip
"Etat"Symbol 760 MovieClip Frame 21Symbol 758 MovieClip
"Etat"Symbol 760 MovieClip Frame 31Symbol 759 MovieClip
"Obj"Symbol 761 MovieClip Frame 1Symbol 760 MovieClip
"Etat"Symbol 775 MovieClip Frame 1Symbol 415 MovieClip
"Etat"Symbol 775 MovieClip Frame 10Symbol 762 MovieClip
"Etat"Symbol 775 MovieClip Frame 21Symbol 771 MovieClip
"Etat"Symbol 775 MovieClip Frame 31Symbol 774 MovieClip
"Obj"Symbol 776 MovieClip Frame 1Symbol 775 MovieClip
"obj"Symbol 792 MovieClip Frame 1Symbol 791 MovieClip
"wall"Symbol 813 MovieClip Frame 1Symbol 802 MovieClip
"wall"Symbol 814 MovieClip Frame 1Symbol 802 MovieClip
"Etat"Symbol 814 MovieClip Frame 10Symbol 813 MovieClip
"Obj"Symbol 815 MovieClip Frame 1Symbol 814 MovieClip
"Etat"Symbol 826 MovieClip Frame 1Symbol 818 MovieClip
"Etat"Symbol 826 MovieClip Frame 10Symbol 825 MovieClip
"Obj"Symbol 827 MovieClip Frame 1Symbol 826 MovieClip
"cable1"Symbol 837 MovieClip Frame 1Symbol 836 MovieClip
"cable2"Symbol 837 MovieClip Frame 1Symbol 836 MovieClip
"Obj"Symbol 838 MovieClip Frame 1Symbol 837 MovieClip
"Obj"Symbol 849 MovieClip Frame 1Symbol 848 MovieClip
"Obj"Symbol 853 MovieClip Frame 1Symbol 852 MovieClip
"Obj"Symbol 858 MovieClip Frame 1Symbol 857 MovieClip
"wave"Symbol 925 MovieClip Frame 9Symbol 909 MovieClip
"wave"Symbol 925 MovieClip Frame 21Symbol 917 MovieClip
"wave"Symbol 925 MovieClip Frame 22Symbol 919 MovieClip
"wave"Symbol 925 MovieClip Frame 23Symbol 921 MovieClip
"wave"Symbol 925 MovieClip Frame 24Symbol 922 MovieClip
"wave"Symbol 925 MovieClip Frame 25Symbol 924 MovieClip
"Etat"Symbol 967 MovieClip Frame 1Symbol 885 MovieClip
"Etat"Symbol 967 MovieClip Frame 10Symbol 893 MovieClip
"Etat"Symbol 967 MovieClip Frame 20Symbol 925 MovieClip
"Etat"Symbol 967 MovieClip Frame 30Symbol 954 MovieClip
"Etat"Symbol 967 MovieClip Frame 50Symbol 962 MovieClip
"Etat"Symbol 967 MovieClip Frame 61Symbol 966 MovieClip
"Obj"Symbol 968 MovieClip Frame 1Symbol 967 MovieClip
"buttonD"Symbol 969 MovieClip Frame 1Symbol 599 MovieClip
"buttonB"Symbol 969 MovieClip Frame 1Symbol 599 MovieClip
"switchC"Symbol 969 MovieClip Frame 1Symbol 604 MovieClip
"buttonALadder"Symbol 969 MovieClip Frame 1Symbol 612 MovieClip
"buttonBLadder"Symbol 969 MovieClip Frame 1Symbol 612 MovieClip
"buttonGLadder"Symbol 969 MovieClip Frame 1Symbol 612 MovieClip
"buttonFLadder"Symbol 969 MovieClip Frame 1Symbol 612 MovieClip
"top"Symbol 969 MovieClip Frame 1Symbol 593 MovieClip
"buttonA"Symbol 969 MovieClip Frame 1Symbol 599 MovieClip
"buttonE"Symbol 969 MovieClip Frame 1Symbol 599 MovieClip
"buttonF"Symbol 969 MovieClip Frame 1Symbol 599 MovieClip
"buttonG"Symbol 969 MovieClip Frame 1Symbol 599 MovieClip
"switchALift"Symbol 969 MovieClip Frame 1Symbol 838 MovieClip
"switchA"Symbol 969 MovieClip Frame 1Symbol 604 MovieClip
"switchBLift"Symbol 969 MovieClip Frame 1Symbol 838 MovieClip
"switchB"Symbol 969 MovieClip Frame 1Symbol 604 MovieClip
"buttonELadder"Symbol 969 MovieClip Frame 1Symbol 612 MovieClip
"switchCLift"Symbol 969 MovieClip Frame 1Symbol 838 MovieClip
"WebDestroyable"Symbol 969 MovieClip Frame 1Symbol 776 MovieClip
"buttonDLadder"Symbol 969 MovieClip Frame 1Symbol 612 MovieClip
"1"Symbol 970 MovieClip Frame 1Symbol 969 MovieClip
"Etat"Symbol 1094 MovieClip Frame 1Symbol 976 MovieClip
"HitFront"Symbol 1094 MovieClip Frame 1Symbol 42 MovieClip
"HitTop"Symbol 1094 MovieClip Frame 1Symbol 42 MovieClip
"HitBack"Symbol 1094 MovieClip Frame 1Symbol 42 MovieClip
"HitBottomFront"Symbol 1094 MovieClip Frame 1Symbol 42 MovieClip
"HitBottomBack"Symbol 1094 MovieClip Frame 1Symbol 42 MovieClip
"PushPoint"Symbol 1094 MovieClip Frame 1Symbol 42 MovieClip
"Etat"Symbol 1094 MovieClip Frame 8Symbol 294 MovieClip
"Etat"Symbol 1094 MovieClip Frame 17Symbol 990 MovieClip
"Etat"Symbol 1094 MovieClip Frame 25Symbol 994 MovieClip
"Etat"Symbol 1094 MovieClip Frame 35Symbol 995 MovieClip
"Etat"Symbol 1094 MovieClip Frame 44Symbol 996 MovieClip
"Etat"Symbol 1094 MovieClip Frame 53Symbol 997 MovieClip
"Etat"Symbol 1094 MovieClip Frame 63Symbol 1022 MovieClip
"Etat"Symbol 1094 MovieClip Frame 74Symbol 1029 MovieClip
"Etat"Symbol 1094 MovieClip Frame 83Symbol 1055 MovieClip
"Etat"Symbol 1094 MovieClip Frame 93Symbol 1056 MovieClip
"Etat"Symbol 1094 MovieClip Frame 103Symbol 359 MovieClip
"PushPoint"Symbol 1094 MovieClip Frame 103Symbol 42 MovieClip
"Etat"Symbol 1094 MovieClip Frame 111Symbol 1065 MovieClip
"Etat"Symbol 1094 MovieClip Frame 121Symbol 1091 MovieClip
"Etat"Symbol 1094 MovieClip Frame 132Symbol 1093 MovieClip
"Etat"Symbol 1149 MovieClip Frame 1Symbol 1095 MovieClip
"Hit"Symbol 1149 MovieClip Frame 1Symbol 42 MovieClip
"HitFront"Symbol 1149 MovieClip Frame 1Symbol 42 MovieClip
"HitTop"Symbol 1149 MovieClip Frame 1Symbol 42 MovieClip
"HitBack"Symbol 1149 MovieClip Frame 1Symbol 42 MovieClip
"HitBottomFront"Symbol 1149 MovieClip Frame 1Symbol 42 MovieClip
"HitBottomBack"Symbol 1149 MovieClip Frame 1Symbol 42 MovieClip
"Etat"Symbol 1149 MovieClip Frame 8Symbol 1096 MovieClip
"Etat"Symbol 1149 MovieClip Frame 17Symbol 1101 MovieClip
"Etat"Symbol 1149 MovieClip Frame 24Symbol 1112 MovieClip
"Etat"Symbol 1149 MovieClip Frame 32Symbol 1119 MovieClip
"Etat"Symbol 1149 MovieClip Frame 38Symbol 1126 MovieClip
"Etat"Symbol 1149 MovieClip Frame 46Symbol 1146 MovieClip
"HitFront"Symbol 1149 MovieClip Frame 46Symbol 42 MovieClip
"HitTop"Symbol 1149 MovieClip Frame 46Symbol 42 MovieClip
"HitBack"Symbol 1149 MovieClip Frame 46Symbol 42 MovieClip
"HitBottomFront"Symbol 1149 MovieClip Frame 46Symbol 42 MovieClip
"HitBottomBack"Symbol 1149 MovieClip Frame 46Symbol 42 MovieClip
"Etat"Symbol 1149 MovieClip Frame 54Symbol 1148 MovieClip
"HitTop"Symbol 1149 MovieClip Frame 54Symbol 42 MovieClip
"HitBack"Symbol 1149 MovieClip Frame 54Symbol 42 MovieClip
"HitBottomFront"Symbol 1149 MovieClip Frame 54Symbol 42 MovieClip
"HitBottomBack"Symbol 1149 MovieClip Frame 54Symbol 42 MovieClip
"Obj"Symbol 1150 MovieClip Frame 1Symbol 1094 MovieClip
"Obj"Symbol 1150 MovieClip Frame 3Symbol 1149 MovieClip
"Wall"Symbol 1154 MovieClip Frame 1Symbol 1152 MovieClip
"Sol"Symbol 1154 MovieClip Frame 1Symbol 1152 MovieClip
"Ceil"Symbol 1154 MovieClip Frame 1Symbol 1153 MovieClip
"Dragon"Symbol 1154 MovieClip Frame 1Symbol 1153 MovieClip
"Control"Symbol 1157 MovieClip Frame 1Symbol 560 MovieClip
"ParallaxSky"Symbol 1157 MovieClip Frame 2Symbol 563 MovieClip
"ParallaxCity"Symbol 1157 MovieClip Frame 2Symbol 566 MovieClip
"Bg"Symbol 1157 MovieClip Frame 2Symbol 970 MovieClip
"Pers"Symbol 1157 MovieClip Frame 2Symbol 1150 MovieClip
"Collider"Symbol 1157 MovieClip Frame 2Symbol 1154 MovieClip
"overlay"Symbol 1157 MovieClip Frame 2Symbol 1156 MovieClip
"box"Symbol 1184 MovieClip Frame 1Symbol 1183 MovieClip
"box"Symbol 1185 MovieClip Frame 1Symbol 1184 MovieClip
"box"Symbol 1186 MovieClip Frame 1Symbol 1184 MovieClip
"Etat"Symbol 1202 MovieClip Frame 1Symbol 1184 MovieClip
"Etat"Symbol 1202 MovieClip Frame 9Symbol 1185 MovieClip
"Etat"Symbol 1202 MovieClip Frame 14Symbol 1186 MovieClip
"Etat"Symbol 1202 MovieClip Frame 19Symbol 1201 MovieClip
"Obj"Symbol 1206 MovieClip Frame 1Symbol 1205 MovieClip
"buttonE"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"buttonG"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"buttonF"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"buttonC"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"buttonBLadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"buttonDLadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"buttonALadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"meh"Symbol 1207 MovieClip Frame 1Symbol 1202 MovieClip
"buttonA"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"buttonB"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"buttonD"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"switchDLift"Symbol 1207 MovieClip Frame 1Symbol 838 MovieClip
"switchD"Symbol 1207 MovieClip Frame 1Symbol 604 MovieClip
"buttonHLadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"buttonH"Symbol 1207 MovieClip Frame 1Symbol 599 MovieClip
"switchCLift"Symbol 1207 MovieClip Frame 1Symbol 838 MovieClip
"switchC"Symbol 1207 MovieClip Frame 1Symbol 604 MovieClip
"switchBLift"Symbol 1207 MovieClip Frame 1Symbol 838 MovieClip
"switchB"Symbol 1207 MovieClip Frame 1Symbol 604 MovieClip
"switchALift"Symbol 1207 MovieClip Frame 1Symbol 838 MovieClip
"switchA"Symbol 1207 MovieClip Frame 1Symbol 604 MovieClip
"buttonCLadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"buttonGLadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"buttonFLadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"buttonELadder"Symbol 1207 MovieClip Frame 1Symbol 612 MovieClip
"1"Symbol 1208 MovieClip Frame 1Symbol 1207 MovieClip
"Control"Symbol 1209 MovieClip Frame 1Symbol 560 MovieClip
"ParallaxSky"Symbol 1209 MovieClip Frame 2Symbol 1166 MovieClip
"ParallaxCity"Symbol 1209 MovieClip Frame 2Symbol 1169 MovieClip
"Bg"Symbol 1209 MovieClip Frame 2Symbol 1208 MovieClip
"Pers"Symbol 1209 MovieClip Frame 2Symbol 1150 MovieClip
"Collider"Symbol 1209 MovieClip Frame 2Symbol 1154 MovieClip
"overlay"Symbol 1209 MovieClip Frame 2Symbol 1156 MovieClip
"buttonGLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonBLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonFLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonJLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonKLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonLLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"switchALift"Symbol 1228 MovieClip Frame 1Symbol 838 MovieClip
"switchA"Symbol 1228 MovieClip Frame 1Symbol 604 MovieClip
"switchCLift"Symbol 1228 MovieClip Frame 1Symbol 838 MovieClip
"switchC"Symbol 1228 MovieClip Frame 1Symbol 604 MovieClip
"buttonA"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonB"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonC"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonD"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonE"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonF"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonG"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonI"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonH"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonJ"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonK"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonL"Symbol 1228 MovieClip Frame 1Symbol 599 MovieClip
"buttonALadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"switchBLift"Symbol 1228 MovieClip Frame 1Symbol 838 MovieClip
"switchB"Symbol 1228 MovieClip Frame 1Symbol 604 MovieClip
"buttonILadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonHLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonELadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonDLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"buttonCLadder"Symbol 1228 MovieClip Frame 1Symbol 612 MovieClip
"1"Symbol 1229 MovieClip Frame 1Symbol 1228 MovieClip
"Control"Symbol 1230 MovieClip Frame 1Symbol 560 MovieClip
"ParallaxSky"Symbol 1230 MovieClip Frame 2Symbol 1212 MovieClip
"ParallaxCity"Symbol 1230 MovieClip Frame 2Symbol 1215 MovieClip
"Bg"Symbol 1230 MovieClip Frame 2Symbol 1229 MovieClip
"Pers"Symbol 1230 MovieClip Frame 2Symbol 1150 MovieClip
"Collider"Symbol 1230 MovieClip Frame 2Symbol 1154 MovieClip
"overlay"Symbol 1230 MovieClip Frame 2Symbol 1156 MovieClip
"ParallaxCity"Symbol 1233 MovieClip Frame 1Symbol 566 MovieClip
"ParallaxCity"Symbol 1233 MovieClip Frame 1Symbol 566 MovieClip
"Etat"Symbol 1257 MovieClip Frame 1Symbol 1255 MovieClip
"Etat"Symbol 1257 MovieClip Frame 10Symbol 1256 MovieClip
"Obj"Symbol 1258 MovieClip Frame 1Symbol 1257 MovieClip
"Etat"Symbol 1359 MovieClip Frame 1Symbol 1285 MovieClip
"Etat"Symbol 1359 MovieClip Frame 11Symbol 1303 MovieClip
"Etat"Symbol 1359 MovieClip Frame 21Symbol 1316 MovieClip
"Etat"Symbol 1359 MovieClip Frame 31Symbol 1337 MovieClip
"Etat"Symbol 1359 MovieClip Frame 40Symbol 1354 MovieClip
"Etat"Symbol 1359 MovieClip Frame 50Symbol 1358 MovieClip
"Obj"Symbol 1360 MovieClip Frame 1Symbol 1359 MovieClip
"Etat"Symbol 1370 MovieClip Frame 1Symbol 419 MovieClip
"Hit"Symbol 1370 MovieClip Frame 1Symbol 42 MovieClip
"Etat"Symbol 1370 MovieClip Frame 11Symbol 1369 MovieClip
"Obj"Symbol 1371 MovieClip Frame 1Symbol 1370 MovieClip
"buttonA"Symbol 1372 MovieClip Frame 1Symbol 599 MovieClip
"Web"Symbol 1372 MovieClip Frame 1Symbol 776 MovieClip
"buttonALadder"Symbol 1372 MovieClip Frame 1Symbol 612 MovieClip
"Antenna1"Symbol 1372 MovieClip Frame 1Symbol 1371 MovieClip
"1"Symbol 1373 MovieClip Frame 1Symbol 1372 MovieClip
"Control"Symbol 1374 MovieClip Frame 1Symbol 560 MovieClip
"ParallaxSky"Symbol 1374 MovieClip Frame 2Symbol 1232 MovieClip
"Bg"Symbol 1374 MovieClip Frame 2Symbol 1373 MovieClip
"Pers"Symbol 1374 MovieClip Frame 2Symbol 1150 MovieClip
"Collider"Symbol 1374 MovieClip Frame 2Symbol 1154 MovieClip
"overlay"Symbol 1374 MovieClip Frame 2Symbol 1156 MovieClip
"ParallaxCity"Symbol 1377 MovieClip Frame 1Symbol 566 MovieClip
"ParallaxCity"Symbol 1377 MovieClip Frame 1Symbol 566 MovieClip
"buttonA"Symbol 1391 MovieClip Frame 1Symbol 599 MovieClip
"Web"Symbol 1391 MovieClip Frame 1Symbol 776 MovieClip
"Wire"Symbol 1391 MovieClip Frame 1Symbol 1258 MovieClip
"buttonALadder"Symbol 1391 MovieClip Frame 1Symbol 612 MovieClip
"AntennaA"Symbol 1391 MovieClip Frame 1Symbol 1202 MovieClip
"Antenna1"Symbol 1391 MovieClip Frame 1Symbol 1371 MovieClip
"Antenna2"Symbol 1391 MovieClip Frame 1Symbol 1371 MovieClip
"1"Symbol 1392 MovieClip Frame 1Symbol 1391 MovieClip
"Control"Symbol 1393 MovieClip Frame 1Symbol 560 MovieClip
"ParallaxSky"Symbol 1393 MovieClip Frame 2Symbol 1376 MovieClip
"Bg"Symbol 1393 MovieClip Frame 2Symbol 1392 MovieClip
"Pers"Symbol 1393 MovieClip Frame 2Symbol 1150 MovieClip
"Collider"Symbol 1393 MovieClip Frame 2Symbol 1154 MovieClip
"overlay"Symbol 1393 MovieClip Frame 2Symbol 1156 MovieClip
"ParallaxCity"Symbol 1396 MovieClip Frame 1Symbol 1215 MovieClip
"ParallaxCity"Symbol 1396 MovieClip Frame 1Symbol 1215 MovieClip
"Antenna1"Symbol 1406 MovieClip Frame 1Symbol 1371 MovieClip
"Antenna2"Symbol 1406 MovieClip Frame 1Symbol 1371 MovieClip
"FinalHit"Symbol 1406 MovieClip Frame 1Symbol 42 MovieClip
"buttonALadder"Symbol 1406 MovieClip Frame 1Symbol 612 MovieClip
"buttonA"Symbol 1406 MovieClip Frame 1Symbol 599 MovieClip
"1"Symbol 1407 MovieClip Frame 1Symbol 1406 MovieClip
"Control"Symbol 1408 MovieClip Frame 1Symbol 560 MovieClip
"ParallaxSky"Symbol 1408 MovieClip Frame 2Symbol 1395 MovieClip
"Bg"Symbol 1408 MovieClip Frame 2Symbol 1407 MovieClip
"Pers"Symbol 1408 MovieClip Frame 2Symbol 1150 MovieClip
"Collider"Symbol 1408 MovieClip Frame 2Symbol 1154 MovieClip
"overlay"Symbol 1408 MovieClip Frame 2Symbol 1156 MovieClip
"hit"Symbol 1441 MovieClip Frame 8Symbol 42 MovieClip
"blast"Symbol 1444 MovieClip Frame 2Symbol 1441 MovieClip
"hit"Symbol 1451 MovieClip Frame 8Symbol 42 MovieClip
"blast"Symbol 1452 MovieClip Frame 2Symbol 1451 MovieClip
"hit"Symbol 1459 MovieClip Frame 8Symbol 42 MovieClip
"blast"Symbol 1462 MovieClip Frame 2Symbol 1459 MovieClip
"Etat"Symbol 1463 MovieClip Frame 1Symbol 1426 MovieClip
"Etat"Symbol 1463 MovieClip Frame 10Symbol 1433 MovieClip
"Etat"Symbol 1463 MovieClip Frame 21Symbol 1444 MovieClip
"Etat"Symbol 1463 MovieClip Frame 30Symbol 1452 MovieClip
"Etat"Symbol 1463 MovieClip Frame 40Symbol 1462 MovieClip
"blast"Symbol 1489 MovieClip Frame 2Symbol 1441 MovieClip
"blast"Symbol 1490 MovieClip Frame 2Symbol 1451 MovieClip
"blast"Symbol 1493 MovieClip Frame 2Symbol 1459 MovieClip
"Etat"Symbol 1494 MovieClip Frame 1Symbol 1479 MovieClip
"Etat"Symbol 1494 MovieClip Frame 10Symbol 1486 MovieClip
"Etat"Symbol 1494 MovieClip Frame 21Symbol 1489 MovieClip
"Etat"Symbol 1494 MovieClip Frame 30Symbol 1490 MovieClip
"Etat"Symbol 1494 MovieClip Frame 40Symbol 1493 MovieClip
"SisterLeft"Symbol 1495 MovieClip Frame 1Symbol 1463 MovieClip
"SisterRight"Symbol 1495 MovieClip Frame 1Symbol 1494 MovieClip

Special Tags

Protect (24)Timeline Frame 10 bytes ""
ExportAssets (56)Timeline Frame 1Symbol 1496 as "__Packages.Debug"
ExportAssets (56)Timeline Frame 1Symbol 1497 as "__Packages.com.sarbakan.utils.PerformanceWatcher"
ExportAssets (56)Timeline Frame 1Symbol 1498 as "__Packages.mx.transitions.OnEnterFrameBeacon"
ExportAssets (56)Timeline Frame 1Symbol 1499 as "__Packages.mx.transitions.BroadcasterMX"
ExportAssets (56)Timeline Frame 1Symbol 1500 as "__Packages.mx.utils.Delegate"
ExportAssets (56)Timeline Frame 1Symbol 1501 as "__Packages.HighRisk.PackagingManager"
ExportAssets (56)Timeline Frame 1Symbol 1502 as "__Packages.SoundController"
ExportAssets (56)Timeline Frame 1Symbol 1503 as "__Packages.HighRisk.HUD"
ExportAssets (56)Timeline Frame 1Symbol 1504 as "__Packages.HighRisk.DigitBitmapField"
ExportAssets (56)Timeline Frame 1Symbol 1505 as "__Packages.com.sarbakan.utils.KeyManager"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 87 as "music_game"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 88 as "music_packaging"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 89 as "chair"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 90 as "blast"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 91 as "web"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 92 as "bonus"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 93 as "break"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 94 as "hurtNet"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 95 as "click"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 96 as "dragonFire"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 97 as "dragonHit"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 98 as "whip"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 99 as "power"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 100 as "electric_wire"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 101 as "finalZap"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 102 as "antenna"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 103 as "push"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 104 as "jakeHit"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 105 as "ladder"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 106 as "jakeAttack"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 107 as "soldierAttack"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 108 as "laser"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 109 as "life"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 110 as "lift"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 111 as "morph"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 111 as "morph"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 112 as "net"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 113 as "energy"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 114 as "land"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 115 as "swirl"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 116 as "hurtJake"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 117 as "crumble"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BorderBox"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BottomBox"
ExportAssets (56)Timeline Frame 2Symbol 19 as "TopBox"
ExportAssets (56)Timeline Frame 2Symbol 21 as "GroundElevator"
ExportAssets (56)Timeline Frame 2Symbol 30 as "AM_BlaconOuvert01Overlay"
ExportAssets (56)Timeline Frame 2Symbol 35 as "AM_BlaconOuvert01OverlayFlip"
ExportAssets (56)Timeline Frame 2Symbol 37 as "AM_Rampe01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 40 as "AM_RampeAscenseur01_overlay"
ExportAssets (56)Timeline Frame 2Symbol 60 as "JackDragon_FireAnim"
ExportAssets (56)Timeline Frame 2Symbol 69 as "Medusa_Blast"
ExportAssets (56)Timeline Frame 2Symbol 85 as "NetBall"
ExportAssets (56)Timeline Frame 2Symbol 86 as "WallHit"
ExportAssets (56)Timeline Frame 2Symbol 118 as "window"

Labels

"Loading"Frame 1
"PerformanceCheck"Frame 10
"Packaging"Frame 46
"Packaging2"Frame 47
"Game_LEVEL1"Frame 56
"Game_LEVEL2"Frame 66
"Game_LEVEL3"Frame 76
"Game_BOSS1"Frame 86
"Game_BOSS2"Frame 96
"Game_BOSS3"Frame 106
"Reset"Frame 116
"Wait"Symbol 15 MovieClip [BorderBox] Frame 1
"Wait"Symbol 17 MovieClip [BottomBox] Frame 1
"TurnG"Symbol 17 MovieClip [BottomBox] Frame 5
"TurnD"Symbol 17 MovieClip [BottomBox] Frame 10
"Wait"Symbol 19 MovieClip [TopBox] Frame 1
"TurnG"Symbol 19 MovieClip [TopBox] Frame 5
"TurnD"Symbol 19 MovieClip [TopBox] Frame 10
"Move"Symbol 60 MovieClip [JackDragon_FireAnim] Frame 1
"End"Symbol 60 MovieClip [JackDragon_FireAnim] Frame 21
"Move"Symbol 69 MovieClip [Medusa_Blast] Frame 1
"End"Symbol 69 MovieClip [Medusa_Blast] Frame 21
"Idle"Symbol 85 MovieClip [NetBall] Frame 1
"Hit"Symbol 85 MovieClip [NetBall] Frame 10
"Burn"Symbol 85 MovieClip [NetBall] Frame 14
"title"Symbol 514 MovieClip Frame 1
"instructions"Symbol 514 MovieClip Frame 11
"win"Symbol 514 MovieClip Frame 21
"lose"Symbol 514 MovieClip Frame 31
"next"Symbol 514 MovieClip Frame 41
"menu"Symbol 514 MovieClip Frame 51
"hiscore"Symbol 514 MovieClip Frame 61
"hidden"Symbol 514 MovieClip Frame 71
"Idle"Symbol 598 MovieClip Frame 1
"Activate"Symbol 598 MovieClip Frame 11
"Idle"Symbol 603 MovieClip Frame 1
"IdleActivate"Symbol 603 MovieClip Frame 11
"Activate"Symbol 603 MovieClip Frame 21
"Off"Symbol 611 MovieClip Frame 1
"Opening"Symbol 611 MovieClip Frame 10
"On"Symbol 611 MovieClip Frame 20
"Idle"Symbol 642 MovieClip Frame 1
"Bounce"Symbol 642 MovieClip Frame 10
"Appear"Symbol 694 MovieClip Frame 1
"idle"Symbol 694 MovieClip Frame 10
"Throw"Symbol 694 MovieClip Frame 20
"disappear"Symbol 694 MovieClip Frame 30
"flee"Symbol 694 MovieClip Frame 40
"idle"Symbol 741 MovieClip Frame 1
"Appear"Symbol 741 MovieClip Frame 10
"Throw"Symbol 741 MovieClip Frame 20
"disappear"Symbol 741 MovieClip Frame 30
"flee"Symbol 741 MovieClip Frame 40
"A"Symbol 742 MovieClip Frame 2
"B"Symbol 742 MovieClip Frame 11
"IdleOpen"Symbol 760 MovieClip Frame 1
"Close"Symbol 760 MovieClip Frame 10
"IdleClose"Symbol 760 MovieClip Frame 21
"Open"Symbol 760 MovieClip Frame 31
"Sleep"Symbol 760 MovieClip Frame 41
"Idle"Symbol 775 MovieClip Frame 1
"Hit"Symbol 775 MovieClip Frame 10
"Destroy"Symbol 775 MovieClip Frame 21
"Fall"Symbol 775 MovieClip Frame 31
"Sleep"Symbol 775 MovieClip Frame 41
"Idle"Symbol 814 MovieClip Frame 1
"Destroy"Symbol 814 MovieClip Frame 10
"Out"Symbol 814 MovieClip Frame 21
"Sleep"Symbol 814 MovieClip Frame 31
"Idle"Symbol 826 MovieClip Frame 1
"Hit"Symbol 826 MovieClip Frame 10
"Sleep"Symbol 826 MovieClip Frame 21
"Idle"Symbol 837 MovieClip Frame 1
"Idle"Symbol 848 MovieClip Frame 1
"Sleep"Symbol 848 MovieClip Frame 11
"Idle"Symbol 852 MovieClip Frame 1
"Sleep"Symbol 852 MovieClip Frame 11
"Idle"Symbol 857 MovieClip Frame 1
"Sleep"Symbol 857 MovieClip Frame 10
"Idle"Symbol 967 MovieClip Frame 1
"Shield"Symbol 967 MovieClip Frame 10
"Attack1"Symbol 967 MovieClip Frame 20
"Attack2"Symbol 967 MovieClip Frame 30
"Sleep"Symbol 967 MovieClip Frame 40
"Hurt"Symbol 967 MovieClip Frame 50
"Stunned"Symbol 967 MovieClip Frame 61
"HuntSoldierG"Symbol 968 MovieClip Frame 3
"HuntSoldierD"Symbol 968 MovieClip Frame 15
"Idle"Symbol 1094 MovieClip Frame 1
"Run"Symbol 1094 MovieClip Frame 8
"Hurt"Symbol 1094 MovieClip Frame 17
"JumpStart"Symbol 1094 MovieClip Frame 25
"JumpIdle"Symbol 1094 MovieClip Frame 35
"Fall"Symbol 1094 MovieClip Frame 44
"JumpLanding"Symbol 1094 MovieClip Frame 53
"Climbing"Symbol 1094 MovieClip Frame 63
"Die"Symbol 1094 MovieClip Frame 74
"Attack"Symbol 1094 MovieClip Frame 83
"Block"Symbol 1094 MovieClip Frame 93
"Push"Symbol 1094 MovieClip Frame 103
"Activate"Symbol 1094 MovieClip Frame 111
"Transform"Symbol 1094 MovieClip Frame 121
"TransformFall"Symbol 1094 MovieClip Frame 132
"Sleep"Symbol 1094 MovieClip Frame 143
"Idle"Symbol 1149 MovieClip Frame 1
"Fly"Symbol 1149 MovieClip Frame 8
"Hurt"Symbol 1149 MovieClip Frame 17
"HurtNet"Symbol 1149 MovieClip Frame 24
"Die"Symbol 1149 MovieClip Frame 32
"AttackFire"Symbol 1149 MovieClip Frame 38
"AttackTail"Symbol 1149 MovieClip Frame 46
"Transform"Symbol 1149 MovieClip Frame 54
"Sleep"Symbol 1149 MovieClip Frame 62
"Jake_D"Symbol 1150 MovieClip Frame 1
"Jake_G"Symbol 1150 MovieClip Frame 2
"Dragon_D"Symbol 1150 MovieClip Frame 3
"Dragon_G"Symbol 1150 MovieClip Frame 4
"out"Symbol 1160 MovieClip Frame 2
"regular"Symbol 1183 MovieClip Frame 1
"moveable"Symbol 1183 MovieClip Frame 12
"destroyable"Symbol 1183 MovieClip Frame 23
"Wait"Symbol 1202 MovieClip Frame 1
"Fixed"Symbol 1202 MovieClip Frame 5
"Land"Symbol 1202 MovieClip Frame 9
"Fall"Symbol 1202 MovieClip Frame 14
"Destroy"Symbol 1202 MovieClip Frame 19
"Sleep"Symbol 1202 MovieClip Frame 28
"Idle"Symbol 1205 MovieClip Frame 1
"Sleep"Symbol 1205 MovieClip Frame 11
"Idle"Symbol 1257 MovieClip Frame 1
"Hit"Symbol 1257 MovieClip Frame 10
"HitBoss"Symbol 1257 MovieClip Frame 21
"Sleep"Symbol 1257 MovieClip Frame 30
"Loop"Symbol 1303 MovieClip Frame 22
"Idle"Symbol 1359 MovieClip Frame 1
"Attack"Symbol 1359 MovieClip Frame 11
"Hurt"Symbol 1359 MovieClip Frame 21
"Die"Symbol 1359 MovieClip Frame 31
"Captured"Symbol 1359 MovieClip Frame 40
"Laugh"Symbol 1359 MovieClip Frame 50
"MedusaG"Symbol 1360 MovieClip Frame 3
"MedusaD"Symbol 1360 MovieClip Frame 15
"Idle"Symbol 1370 MovieClip Frame 1
"Charged"Symbol 1370 MovieClip Frame 11
"Idle"Symbol 1463 MovieClip Frame 1
"Charge"Symbol 1463 MovieClip Frame 10
"Attack1"Symbol 1463 MovieClip Frame 21
"Attack2"Symbol 1463 MovieClip Frame 30
"Attack3"Symbol 1463 MovieClip Frame 40
"Idle"Symbol 1494 MovieClip Frame 1
"Charge"Symbol 1494 MovieClip Frame 10
"Attack1"Symbol 1494 MovieClip Frame 21
"Attack2"Symbol 1494 MovieClip Frame 30
"Attack3"Symbol 1494 MovieClip Frame 40

Dynamic Text Variables

pcSymbol 10 EditableText"0%"




http://swfchan.com/6/25519/info.shtml
Created: 23/5 -2019 15:41:16 Last modified: 23/5 -2019 15:41:16 Server time: 23/12 -2024 00:11:43