Frame 2
function fsdPlayAgain() {
theDoge.unloadMovie();
_global.CG.RestartGame();
}
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 = "jetix_jackiechan_ror";
subject = "JETIX JACKIECHAN ROR";
playerScore = 0;
playerName = "";
fscommand ("allowscale", "false");
this.gotoAndPlay("Load");
Frame 6
if (this.getBytesLoaded() < this.getBytesTotal()) {
this.gotoAndPlay("Load");
} else {
this.gotoAndPlay("Title");
}
Frame 10
_global.CP.G_Music = _global.CP.CtrlSFX.PlaySFX("music_package.wav", 100, 65535);
stop();
Frame 15
stop();
_global.CG.StartGame();
Frame 20
playerScore = _global.CG.G_Score;
theDoge.loadMovie(_level0.fsd, 1);
_global.CP.G_Music.Stop();
_global.CP.G_Music = _global.CP.CtrlSFX.PlaySFX("music_win.wav", 100, 1);
stop();
Frame 25
playerScore = _global.CG.G_Score;
theDoge.loadMovie(_level0.fsd, 1);
_global.CP.G_Music.Stop();
_global.CP.G_Music = _global.CP.CtrlSFX.PlaySFX("music_lose.wav", 100, 1);
stop();
Frame 30
this.gotoAndPlay("Game");
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 9
stop();
Symbol 107 MovieClip Frame 17
stop();
Symbol 107 MovieClip Frame 25
stop();
Symbol 107 MovieClip Frame 33
stop();
Symbol 107 MovieClip Frame 41
stop();
Symbol 107 MovieClip Frame 48
stop();
Symbol 107 MovieClip Frame 56
stop();
Symbol 107 MovieClip Frame 65
stop();
Symbol 107 MovieClip Frame 74
stop();
Symbol 107 MovieClip Frame 83
stop();
Symbol 107 MovieClip Frame 92
stop();
Symbol 107 MovieClip Frame 101
stop();
Symbol 107 MovieClip Frame 108
stop();
Symbol 107 MovieClip Frame 117
stop();
Symbol 107 MovieClip Frame 125
stop();
Symbol 108 MovieClip [Boss] Frame 1
#initclip 25
Object.registerClass("Boss", Boss);
#endinitclip
stop();
Symbol 108 MovieClip [Boss] Frame 2
stop();
Instance of Symbol 107 MovieClip "Obj" in Symbol 108 MovieClip [Boss] Frame 2
/* no clip actions */
Symbol 134 MovieClip Frame 1
var l_Obj = this._parent;
while (l_Obj._name != "Obj") {
l_Obj = l_Obj._parent;
}
gotoAndStop(l_Obj._parent.enemyType);
stop();
Symbol 169 MovieClip [Bullet] Frame 1
#initclip 20
Object.registerClass("Bullet", Bullet);
#endinitclip
Symbol 192 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 17
stop();
Symbol 192 MovieClip Frame 25
stop();
Symbol 192 MovieClip Frame 33
stop();
Symbol 192 MovieClip Frame 41
stop();
Symbol 192 MovieClip Frame 49
stop();
Symbol 192 MovieClip Frame 56
stop();
Symbol 192 MovieClip Frame 64
stop();
Symbol 192 MovieClip Frame 73
stop();
Symbol 192 MovieClip Frame 82
stop();
Symbol 192 MovieClip Frame 91
stop();
Symbol 192 MovieClip Frame 100
stop();
Symbol 192 MovieClip Frame 107
stop();
Symbol 192 MovieClip Frame 115
stop();
Symbol 192 MovieClip Frame 125
stop();
Symbol 192 MovieClip Frame 134
stop();
Symbol 192 MovieClip Frame 143
stop();
Symbol 193 MovieClip [Enemy] Frame 1
#initclip 21
Object.registerClass("Enemy", Enemy);
#endinitclip
stop();
Symbol 193 MovieClip [Enemy] Frame 2
stop();
Instance of Symbol 192 MovieClip "Obj" in Symbol 193 MovieClip [Enemy] Frame 2
/* no clip actions */
Symbol 200 MovieClip Frame 1
stop();
Symbol 201 MovieClip [ShieldThrow] Frame 1
#initclip 22
Object.registerClass("ShieldThrow", ShieldThrow);
#endinitclip
Symbol 205 MovieClip Frame 1
stop();
Symbol 206 MovieClip [Bouclier] Frame 1
#initclip 23
Object.registerClass("Bouclier", Shield);
#endinitclip
stop();
Symbol 206 MovieClip [Bouclier] Frame 5
stop();
Symbol 206 MovieClip [Bouclier] Frame 10
stop();
Symbol 207 MovieClip [_CtrlPackage] Frame 1
#initclip 24
Object.registerClass("_CtrlPackage", _CtrlPackage);
#endinitclip
Symbol 1154 MovieClip [__Packages.GameObject] Frame 0
class GameObject extends MovieClip
{
var coords, _x, _y;
function GameObject () {
super();
coords = new Object();
_global.CG.RegisterObject(this);
}
function Destroy() {
_global.CG.UnregisterObject(this);
}
function IsOnScreen() {
var _local3 = false;
coords.x = _x;
coords.y = _y;
_global.CP.G_Scene.currentlevel_mc.localToGlobal(coords);
if ((((coords.x >= 0) && (coords.x <= Stage.width)) && (coords.y >= 0)) && (coords.y <= Stage.height)) {
_local3 = true;
}
return(_local3);
}
}
Symbol 1155 MovieClip [__Packages.DynamicGameObject] Frame 0
class DynamicGameObject extends GameObject
{
var Etat, EtatOld, DirOld, inPause, TrueX, _x, TrueY, _y, Dir, gotoAndStop, Obj, _parent;
function DynamicGameObject () {
super();
Etat = "Idle";
EtatOld = "Idle";
DirOld = "D";
inPause = false;
TrueX = _x;
TrueY = _y;
}
function EnterFrame() {
if (Dir != DirOld) {
ChangeDir(Dir);
}
if (Etat != EtatOld) {
ChangeEtat(Etat);
}
Actions();
}
function ChangeDir(l_newDir) {
DirOld = Dir;
Dir = l_newDir;
gotoAndStop(l_newDir);
Obj.gotoAndStop(Etat);
}
function SetTruePos() {
TrueX = _x + _parent._x;
TrueY = _y + _parent._y;
}
function Actions() {
if (_global.CG.G_paused) {
if (inPause) {
inPause = true;
Obj.Etat.stop();
}
} else {
if (inPause) {
inPause = false;
Obj.Etat.play();
}
SetTruePos();
this[Etat]();
}
}
function ChangeEtat(l_newAction) {
EtatOld = Etat;
Etat = l_newAction;
Obj.gotoAndStop(l_newAction);
}
}
Symbol 1156 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends DynamicGameObject
{
var Etat, SpdX, Dir, _y, Pers, _x, TrueX, TrueY, stop, Obj, Destroy, _visible;
function Bullet () {
super();
Etat = "Move";
SpdX = 20;
SpdX = SpdX * ((Dir == "G") ? -1 : 1);
_y = _y - 50;
Pers = _global.CG.G_Player;
}
function Move() {
with (this) {
_x = _x + SpdX;
SetTruePos();
CheckWall();
CheckPers();
}
}
function CheckWall() {
with (this) {
if (_parent.Collider.Wall.hitTest(TrueX, TrueY, true) && (!_parent.Collider.Wall.Pass.hitTest(TrueX, TrueY, true))) {
Etat = "Hit";
}
}
}
function CheckPers() {
if (Pers.hitTest(TrueX, TrueY, false)) {
((Dir == "G") ? ((Pers.Dir = "D")) : ((Pers.Dir = "G")));
Pers.Etat = "GetHit";
}
}
function Hit() {
with (this) {
stop();
if (((Obj.Etat._currentframe == 1) && (TrueX > 0)) && (TrueX < Stage.width)) {
} else if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Destroy();
_visible = false;
}
}
}
}
Symbol 1157 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends DynamicGameObject
{
var typeOf, Nom, BaseDir, Dir, LgOutG, LgOutD, LgOutUp, LgOutDw, GetHitG, GetHitD, GetHitUp, GetHitDw, GetFireG, GetFireD, GetFireUp, GetFireDw, LgAttackX, LgAttackUp, LgAttackDw, LgCheckPersX, LgCheckFightX, LgHitX, LgHitUp, LgHitDw, LgFront, LgHitBox, LgCharge, LgBack, AssPointX, AssPointY, FrGetHit, FrGetHitCount, FrSeeingMaxTime, FrSeeingCount, FrIdleCheckMin, FrIdleCheckMax, FrIdleCheckLast, FrSurpris, FrLand, FrDie, FrIdle, FrAttack1, FrAttack2, FrAttack3, FrFinAttack1, FrFinAttack2, FrFinAttack3, frGetGlue, frIdleGlue, frDeGlue, frGetFart, frIdleFart, frDeFart, FartCycle, FartCycleMax, FrShoot, FrShootFin, ShootMax, ShootCount, FrStartPush, FrFinPush, PushedBox, FrSeparateWallCount, FrSeparateWallCheck, SpdXBase, SpdXShadow, SpdXWalkFight, SpdXCharge, SpdXGetHit, SpdYGetHit, SpdXGetComboed, SpdYGetComboed, SpdXGetSuperHit, SpdYGetSuperHit, SpdXStepBack, SpdYStepBack, WallSeparate, SpdXFall, MoveX, MoveY, WallHitBloc, SolOut, SolHitMin, MaxSol, HitGrd, SpdYMax, SpdYNow, SpdYUp, CanBeHit, Pers, Perso, TooNearWall, DistMinWall, Etat, _visible, isAttacker, pdFar, pdNear, pdHit, pdJumpKick, totalLives, enemyType, moveRate, blockRate, attackRate, throwRate, canShuriken, swapDepths, _parent, Obj, _y, _x, hitTest, IsOnScreen, ChangeDir, _life, lifebar_mc;
function Enemy () {
super();
typeOf = "Enemy";
Nom = Nom;
BaseDir = Dir;
LgOutG = 1000;
LgOutD = 1500;
LgOutUp = 10;
LgOutDw = 475;
GetHitG = 60;
GetHitD = 60;
GetHitUp = 115;
GetHitDw = 0;
GetFireG = 26;
GetFireD = 26;
GetFireUp = 100;
GetFireDw = -40;
LgAttackX = 65;
LgAttackUp = 60;
LgAttackDw = 26;
LgCheckPersX = 500;
LgCheckFightX = 100;
LgHitX = 100;
LgHitUp = 35;
LgHitDw = 60;
LgFront = 35;
LgHitBox = 42;
LgCharge = 65;
LgBack = 35;
AssPointX = 12;
AssPointY = 35;
FrGetHit = 15;
FrGetHitCount = 0;
FrSeeingMaxTime = 35;
FrSeeingCount = 35;
FrIdleCheckMin = 36;
FrIdleCheckMax = 60;
FrIdleCheckLast = 113;
FrSurpris = 21;
FrLand = 8;
FrDie = 25;
FrIdle = 131;
FrAttack1 = 8;
FrAttack2 = 11;
FrAttack3 = 11;
FrFinAttack1 = 12;
FrFinAttack2 = 10;
FrFinAttack3 = 9;
frGetGlue = 21;
frIdleGlue = 131;
frDeGlue = 21;
frGetFart = 57;
frIdleFart = 131;
frDeFart = 59;
FartCycle = 0;
FartCycleMax = 4;
FrShoot = 5;
FrShootFin = 15;
ShootMax = 0;
ShootCount = 0;
FrStartPush = 4;
FrFinPush = 4;
PushedBox = 0;
FrSeparateWallCount = 0;
FrSeparateWallCheck = 15;
SpdXBase = 12;
SpdXShadow = 20;
SpdXWalkFight = 6;
SpdXCharge = 10;
SpdXGetHit = 0.5;
SpdYGetHit = -10;
SpdXGetComboed = 12;
SpdYGetComboed = -15;
SpdXGetSuperHit = 45;
SpdYGetSuperHit = -30;
SpdXStepBack = 15;
SpdYStepBack = -10;
WallSeparate = false;
SpdXFall = 0;
MoveX = 0;
MoveY = 0;
WallHitBloc = 2;
SolOut = 2;
SolHitMin = 3;
MaxSol = 2;
HitGrd = false;
SpdYMax = 20;
SpdYNow = 0;
SpdYUp = 2;
CanBeHit = true;
Pers = _global.CG.G_Player;
Perso = "Gunner";
TooNearWall = false;
DistMinWall = 100;
Dir = "D";
Etat = "IdleInvisible";
_visible = false;
isAttacker = false;
pdFar = 500;
pdNear = 100;
pdHit = 50;
pdJumpKick = 60;
totalLives = 10;
enemyType = 1;
moveRate = 0.05;
blockRate = 0.5;
attackRate = 0.65;
throwRate = 0.03;
canShuriken = false;
SetType();
Life = (totalLives);
Pers.SetAttackers();
swapDepths(_parent.fg_mc);
}
function SetType() {
if (Math.random() < 0.5) {
enemyType = 2;
moveRate = moveRate * 1.5;
blockRate = blockRate * 1.5;
attackRate = attackRate * 1.25;
totalLives = totalLives * 1.5;
if ((_global.CG.G_Level > 1) && (Math.random() < 0.5)) {
enemyType = 3;
totalLives = totalLives * 1.25;
blockRate = blockRate * 1.1;
canShuriken = true;
}
}
}
function Sleep() {
with (this) {
CheckActif();
}
}
function Idle() {
with (this) {
FrSeparateWallCount++;
if (FrSeparateWallCount == FrSeparateWallCheck) {
FrSeparateWallCount = 0;
WallSeparate = false;
}
if (((Etat == "Idle") && ((Obj.Etat._currentframe >= FrIdleCheckMin) && (Obj.Etat._currentframe <= FrIdleCheckMax))) || (Obj.Etat._currentframe == FrIdleCheckLast)) {
if (Dir == "G") {
CheckPers("D");
} else if (Dir == "D") {
CheckPers("G");
}
} else {
CheckPers();
}
if (Perso == "Attacker") {
if ((Etat == "Idle") && (Obj.Etat._currentframe == FrIdleCheckLast)) {
CheckDistWall();
if (TooNearWall) {
((Dir == "G") ? ((Dir = "D")) : ((Dir = "G")));
CheckDistWall();
if (!TooNearWall) {
Etat = "Walk";
} else {
Etat = "StartJump";
}
} else {
Etat = "Walk";
}
MoveX = 0;
MoveY = 0;
}
}
MoveX = 0;
CheckAction();
CheckHitGrd();
CheckSol();
CheckGetHit();
CheckGetFire();
CheckOverlap();
MoveShred();
CheckSleep();
}
}
function Walk() {
with (this) {
CheckAction();
CheckTurn();
CheckWall();
CheckHitGrd();
CheckSol();
CheckGetHit();
CheckGetFire();
SetMoveX();
CheckOverlap();
MoveShred();
CheckSleep();
CheckCorpse();
}
}
function Shoot() {
with (this) {
if (Obj.Etat._currentframe == 1) {
var l_level_mc = _global.CP.G_Scene.currentlevel_mc;
var l_highestDepth = l_level_mc.getNextHighestDepth();
l_level_mc.attachMovie("Bullet", "Bullet" + l_highestDepth, l_highestDepth, {_x:_x, _y:_y, Dir:Dir});
} else if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
ShootCount++;
if (ShootCount <= ShootMax) {
Etat = "Shoot";
} else {
Etat = "Idle";
}
}
CheckGetHit();
CheckGetFire();
CheckGetFart();
}
}
function StartJump() {
with (this) {
Etat = "Jump";
SpdYNow = SpdYStepBack;
SpdXFall = SpdXStepBack;
}
}
function Jump() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
CheckGetFart();
MoveShred();
Etat = "Fall";
}
}
function Land() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
}
}
function GetHit() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
CheckGetFart();
MoveShred();
FrGetHitCount++;
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if (HitGrd == true) {
if (Life > 0) {
FrGetHitCount = 0;
if (SpdYNow >= 0) {
Etat = "Idle";
}
WallSeparate = false;
} else {
Etat = "Die";
}
}
CanBeHit = true;
}
}
}
function Fall() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
MoveShred();
if (HitGrd == true) {
if (Life > 0) {
Etat = "Land";
CanBeHit = true;
WallSeparate = false;
} else {
Etat = "Die";
}
}
}
}
function FallFart() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
MoveShred();
if (HitGrd == true) {
if (Life > 0) {
Etat = "LandFart";
CanBeHit = true;
WallSeparate = false;
} else {
Etat = "Die";
}
}
}
}
function Attack1() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if (((((Pers._x >= (_x - LgHitX)) && (Pers._x <= (_x + LgHitX))) && (Pers.CanBeHit)) && (Pers.Etat != "IdleChange")) && (Pers.Etat != "IdleCrouch")) {
if (Dir == "G") {
Pers.Dir = "D";
} else if (Dir == "D") {
Pers.Dir = "G";
}
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
Etat = "FinAttack1";
}
CheckGetHit();
CheckGetFire();
}
}
function Attack2() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if (((Pers._x >= (_x - LgHitX)) && (Pers._x <= (_x + LgHitX))) && (Pers.CanBeHit == true)) {
if (Dir == "G") {
Pers.Dir = "D";
} else if (Dir == "D") {
Pers.Dir = "G";
}
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
Etat = "FinAttack2";
}
CheckGetHit();
CheckGetFire();
}
}
function FinAttack1() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
}
}
function FinAttack2() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
}
}
function Die() {
with (this) {
Dir = "D";
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
_visible = false;
Pers.SetAttackers();
_global.CG.G_Hud.AddToScore(50 * _global.CG.G_Level);
Etat = "Dead";
}
}
}
function Dead() {
with (this) {
G_TabShred.splice(ShredI, 1);
ShredI = ShredI - 1;
}
}
function CheckGetFart(CheckDir) {
with (this) {
if (((Pers.Etat == "Shoot2") || (Pers.Etat == "JumpShoot2")) && ((TrueX > 0) && (TrueX < 500))) {
if ((Pers._y >= (_y - (LgAttackUp * 1.5))) && (Pers._y <= (_y + (LgAttackDw * 1.5)))) {
if (((Pers._x >= (_x - LgCheckPersX)) && (Pers._x <= _x)) && (Pers.Dir == "D")) {
var CheckX = (TrueX - (_x - Pers._x));
while ((CheckX < TrueX) && (!WallSeparate)) {
if (_parent.Collider.Wall.hitTest(CheckX, TrueY, true)) {
WallSeparate = true;
}
CheckX = CheckX + 10;
}
if ((!WallSeparate) && (Pers.FartTargetX == 0)) {
Dir = Pers.Dir;
_global.SoundCTRL.playSound("GetFart", 100, 0);
Etat = "Fart";
Pers.FartTargetX = _x - AssPointX;
Pers.FartTargetY = _y - AssPointY;
}
} else if (((Pers._x <= (_x + LgCheckPersX)) && (Pers._x >= _x)) && (Pers.Dir == "G")) {
var CheckX = (TrueX + (Pers._x - _x));
while ((CheckX > TrueX) && (!WallSeparate)) {
if (_parent.Collider.Wall.hitTest(CheckX, TrueY, true)) {
WallSeparate = true;
}
CheckX = CheckX - 10;
}
if ((!WallSeparate) && (Pers.FartTargetX == 0)) {
Dir = Pers.Dir;
_global.SoundCTRL.playSound("GetFart", 100, 0);
Etat = "Fart";
Pers.FartTargetX = _x + AssPointX;
Pers.FartTargetY = _y - AssPointY;
}
}
}
}
}
}
function CheckDistWall(CheckDir, CheckXPoint) {
with (this) {
if (CheckDir == undefined) {
CheckDir = Dir;
}
if (CheckXPoint == undefined) {
CheckXPoint = TrueX;
}
TooNearWall = false;
if (CheckDir == "G") {
var CheckX = (CheckXPoint - DistMinWall);
while ((CheckX < CheckXPoint) && (!TooNearWall)) {
if (_parent.Collider.Wall.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
} else if (_parent.Collider.Turn.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
}
CheckX = CheckX + 10;
}
} else if (CheckDir == "D") {
var CheckX = (TrueX + DistMinWall);
while ((CheckX > CheckXPoint) && (!TooNearWall)) {
if (_parent.Collider.Wall.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
} else if (_parent.Collider.Turn.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
}
CheckX = CheckX - 10;
}
}
}
}
function CheckPersDist() {
with (this) {
if (Pers.CanBeHit == true) {
if ((Dir == "G") && (Pers._x > _x)) {
Dir = "D";
} else if ((Dir == "D") && (Pers._x <= _x)) {
Dir = "G";
}
if ((Pers._y >= (_y - LgAttackUp)) && (Pers._y <= (_y + LgAttackDw))) {
if ((Pers._x >= (_x - LgCheckPersX)) && (Pers._x <= _x)) {
if ((Pers._x < (_x - LgCheckFightX)) || (Pers._x > _x)) {
Etat = "WalkFight";
}
} else if ((Pers._x <= (_x + LgCheckPersX)) && (Pers._x >= _x)) {
if ((Pers._x > (_x + LgCheckFightX)) || (Pers._x < _x)) {
Etat = "WalkFight";
}
}
}
} else {
Etat = "WalkFight";
}
}
}
function CheckFight() {
with (this) {
if (Pers.CanBeHit == true) {
if ((Pers._y >= (_y - LgAttackUp)) && (Pers._y <= (_y + LgAttackDw))) {
if (((Pers._x >= (_x - LgCheckFightX)) && (Pers._x <= _x)) && (Dir == "G")) {
FrSeeingCount = 0;
Etat = "Fight";
} else if (((Pers._x <= (_x + LgCheckFightX)) && (Pers._x >= _x)) && (Dir == "D")) {
FrSeeingCount = 0;
Etat = "Fight";
}
}
}
}
}
function CheckJump() {
with (this) {
if (Math.ceil(Math.random() * 100) == 80) {
Etat = "StartJump";
}
}
}
function CheckGetHit() {
with (this) {
if (Pers.CanHit == true) {
if (CanBeHit) {
var l_hitPointX = (Pers.TrueX + (Pers.HitPointX - Pers._x));
var l_hitPointY = (Pers.TrueY + (Pers.HitPointY - Pers._y));
if (hitTest(l_hitPointX, l_hitPointY, false) || (Pers.bMegaHit && (GetPersDist() < 100))) {
if (!Pers.bMegaHit) {
((Pers.Dir == "D") ? ((Dir = "G")) : ((Dir = "D")));
Pers.CanHit = false;
}
Life = Life - (Pers.hitPower * Pers.powerMult);
var l_noise = ((Math.random() * 0.2) + 0.9);
if (Pers.hitPower > 0) {
SpdXFall = l_noise * SpdXGetHit;
SpdYNow = SpdYGetHit;
if (Pers.hitPower > 1) {
if (Pers.Etat != "Uppercut") {
SpdXFall = l_noise * SpdXGetComboed;
} else {
SpdXFall = l_noise * SpdXGetHit;
}
SpdYNow = SpdYGetComboed;
if (Pers.hitPower > 2) {
SpdXFall = l_noise * SpdXGetSuperHit;
SpdYNow = SpdYGetSuperHit;
}
}
}
if (Pers.hitPower >= 2) {
_global.CG.G_Hud.AddToScore(100);
}
Etat = "GetHit";
_global.CP.CtrlSFX.PlayRandomSFX("hit", 4);
CanBeHit = false;
}
}
}
}
}
function CheckAttack() {
with (this) {
if ((Pers.CanBeHit == true) && (HitGrd == true)) {
if ((Pers._y >= (_y - LgAttackUp)) && (Pers._y <= (_y + LgAttackDw))) {
if ((Pers._x >= (_x - LgAttackX)) && (Pers._x <= (_x + LgAttackX))) {
if ((Dir == "G") && (Pers._x > _x)) {
Dir = "D";
} else if ((Dir == "D") && (Pers._x <= _x)) {
Dir = "G";
}
if (Perso == "Attacker") {
var RandomAttack = Math.ceil(Math.random() * 2);
Etat = "Attack" + RandomAttack;
}
}
}
}
}
}
function CheckTouchCharge() {
with (this) {
var CheckX = Pers.FrontX;
if (((Dir == "G") && (Pers.Dir == "G")) || ((Dir == "D") && (Pers.Dir == "D"))) {
CheckX = Pers.BackX;
}
if (hitTest(CheckX, Pers.FrontY, true)) {
if (Pers.CanBeHit == true) {
if (Dir == "G") {
Pers.Dir = "D";
} else if (Dir == "D") {
Pers.Dir = "G";
}
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
Etat = "StartJump";
_global.SoundCTRL.playSound("ChargeHit", 100, 0);
}
}
}
}
function SetMoveX() {
with (this) {
MoveX = SpdXBase;
if (Dir == "G") {
MoveX = MoveX * -1;
}
}
}
function SetMoveXShadow() {
with (this) {
MoveX = SpdXShadow;
if (Dir == "G") {
MoveX = MoveX * -1;
}
}
}
function SetMoveXWalkFight() {
with (this) {
MoveX = SpdXWalkFight;
if (Dir == "G") {
MoveX = MoveX * -1;
}
}
}
function SetMoveXCharge() {
with (this) {
MoveX = SpdXCharge;
if (Dir == "G") {
MoveX = MoveX * -1;
}
}
}
function SetMoveXFall() {
with (this) {
MoveX = SpdXFall;
if (SpdXFall > 0) {
SpdXFall = SpdXFall * 0.9;
}
if (Dir == "D") {
MoveX = MoveX * -1;
}
}
}
function CheckWall(CheckDir) {
with (this) {
if (MoveX != 0) {
if (CheckDir == "Back") {
var AddPoint = LgBack;
} else {
var AddPoint = LgFront;
}
if (MoveX > 0) {
var WallStop = WallHitBloc;
var CheckX = (TrueX + AddPoint);
} else {
var WallStop = (-1 * WallHitBloc);
var CheckX = (TrueX - AddPoint);
}
var WallHit1 = (MoveX / 3);
var WallHit2 = (WallHit1 * 2);
var l_WallSet;
if (Etat == "GetHit") {
l_WallSet = _parent.Collider.SHWall;
} else {
l_WallSet = _parent.Collider.Wall;
}
if (l_WallSet.hitTest(CheckX + WallStop, TrueY, true)) {
if (Etat == "Charge") {
Etat = "StartJump";
} else if (((Etat == "GetHit") || (Etat == "StartJump")) || (Etat == "Fall")) {
MoveX = 0;
WallSeparate = false;
} else {
MoveX = 0;
WallSeparate = false;
if (Dir == "G") {
Dir = "D";
} else {
Dir = "G";
}
CheckDistWall();
if ((Math.ceil(Math.random() * 4) == 4) || (TooNearWall)) {
Etat = "Idle";
} else {
Etat = "Walk";
}
}
} else if (l_WallSet.hitTest(CheckX + WallHit1, TrueY, true)) {
MoveX = WallHitBloc;
} else if (l_WallSet.hitTest(CheckX + WallHit2, TrueY, true)) {
MoveX = WallHit1;
} else if (l_WallSet.hitTest(CheckX + MoveX, TrueY, true)) {
MoveX = WallHit2;
}
}
}
}
function CheckTurn() {
with (this) {
if (_parent.Collider.Turn.hitTest(TrueX + MoveX, TrueY, true) || (_parent.Collider.Wall.hitTest(TrueX + MoveX, TrueY, true))) {
MoveX = 0;
if (Dir == "G") {
Dir = "D";
} else {
Dir = "G";
}
CheckDistWall();
if ((Math.ceil(Math.random() * 4) == 4) || (TooNearWall)) {
Etat = "Idle";
} else {
Etat = "Walk";
}
}
}
}
function CheckSol() {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY, true) && (SpdYNow >= 0)) {
SpdYNow = 0;
var InSol = true;
while (InSol == true) {
MoveY = MoveY - SolOut;
InSol = _parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true);
}
} else if (SpdYNow >= 0) {
if (HitGrd == true) {
SpdYNow = 0;
MoveY = SpdYNow;
} else {
SpdYNow = SpdYNow + SpdYUp;
if (SpdYNow > SpdYMax) {
SpdYNow = SpdYMax;
}
var SolHit1 = (SpdYNow / 3);
var SolHit2 = (SolHit1 * 2);
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + SolHit1, true)) {
MoveY = SolHitMin;
} else if (_parent.Collider.Sol.hitTest(TrueX, TrueY + SolHit2, true)) {
MoveY = SolHit1;
} else if (_parent.Collider.Sol.hitTest(TrueX, TrueY + SpdYNow, true)) {
MoveY = SolHit2;
} else {
MoveY = SpdYNow;
}
}
} else {
SpdYNow = SpdYNow + SpdYUp;
MoveY = SpdYNow;
}
}
}
function CheckHitGrd() {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + MaxSol, true)) {
HitGrd = true;
} else {
HitGrd = false;
}
}
}
function MoveShred() {
with (this) {
_x = _x + MoveX;
_y = _y + MoveY;
}
}
function CheckActif() {
with (this) {
if (((((_x >= (Bg.Invthis._x - LgOutG)) && (_x <= (Bg.Invthis._x + LgOutD))) && (_y >= (Bg.Invthis._y - LgOutUp))) && (_y <= (Bg.Invthis._y + LgOutDw))) && (Etat == "Sleep")) {
if (Life > 0) {
Etat = "Idle";
Dir = BaseDir;
} else {
Etat = "Dead";
}
}
}
}
function CheckSleep() {
with (this) {
if ((((_x < (Bg.Invthis._x - LgOutG)) or (_x > (Bg.Invthis._x + LgOutD))) or (_y < (Bg.Invthis._y - LgOutUp))) or (_y > (Bg.Invthis._y + LgOutDw))) {
if (Pers._x < _x) {
Dir = "G";
} else {
Dir = "D";
}
Etat = "Sleep";
}
}
}
function Materialize() {
_visible = true;
if (Obj.Etat._currentframe == Obj.Etat._totalframes) {
Etat = "Idle";
}
}
function Dematerialize() {
if (HitGrd) {
if (Obj.Etat._currentframe == Obj.Etat._totalframes) {
Etat = "IdleShadow";
}
} else {
Etat = "Idle";
}
}
function Hide() {
_visible = false;
Etat = "IdleInvisible";
}
function Show() {
FacePlayer();
Etat = "Materialize";
_global.CP.CtrlSFX.PlayRandomSFX("shadowin", 2);
}
function IdleInvisible() {
CheckAction();
CheckHitGrd();
CheckSol();
}
function IdleShadow() {
CheckAction();
CheckHitGrd();
CheckSol();
}
function MoveShadow() {
with (this) {
CheckAction();
CheckTurn();
CheckWall();
CheckHitGrd();
CheckSol();
SetMoveXShadow();
MoveShred();
}
}
function CheckAction() {
if (isAttacker && (Pers.Etat != "Die")) {
if (GetPersDist() > pdFar) {
if ((Etat != "IdleShadow") && (Etat != "MoveShadow")) {
Etat = "Dematerialize";
_global.CP.CtrlSFX.PlaySFX("shadowout.wav", 100, 1);
} else {
FacePlayer();
Etat = "MoveShadow";
}
} else if ((_y > (Pers._y - 25)) && (_y < (Pers._y + 5))) {
if (GetPersDist() > pdNear) {
if ((Etat == "IdleShadow") || (Etat == "MoveShadow")) {
Etat = "Materialize";
_global.CP.CtrlSFX.PlayRandomSFX("shadowin", 2);
} else {
FacePlayer();
if (Etat == "IdleInvisible") {
MoveNearPlayer();
} else if (canShuriken && (Math.random() < throwRate)) {
Etat = "Shoot";
_global.CP.CtrlSFX.PlayRandomSFX("shuriken", 2);
} else if (Math.random() < moveRate) {
Etat = "Walk";
}
}
} else if (Etat == "IdleInvisible") {
MoveNearPlayer();
} else if ((Etat == "IdleShadow") || (Etat == "MoveShadow")) {
Etat = "Materialize";
_global.CP.CtrlSFX.PlayRandomSFX("shadowin", 2);
} else {
Etat = "Idle";
if (Pers.CanHit && (Math.random() < blockRate)) {
Pers.CanHit = false;
Etat = "Block";
_global.CP.CtrlSFX.PlayRandomSFX("block", 5);
} else if ((Math.random() < attackRate) && _visible) {
FacePlayer();
Etat = "Attack" + (Math.floor(Math.random() * 2) + 1);
_global.CP.CtrlSFX.PlayRandomSFX("airslow", 3);
}
}
} else {
if (Math.random() < 0.03) {
if ((Etat != "IdleShadow") && (Etat != "IdleInvisible")) {
Etat = "Dematerialize";
_global.CP.CtrlSFX.PlaySFX("shadowout.wav", 100, 1);
} else if (Etat != "IdleInvisible") {
Etat = "Hide";
} else {
Etat = "MoveNearPlayer";
}
}
if (Etat == "IdleShadow") {
Etat = "Hide";
}
}
} else {
if (Etat == "IdleInvisible") {
MoveNearPlayer();
} else if ((Etat == "IdleShadow") || (Etat == "MoveShadow")) {
Etat = "Materialize";
_global.CP.CtrlSFX.PlayRandomSFX("shadowin", 2);
} else if (Math.random() < 0.01) {
Etat = "Walk";
} else if (Math.random() < 0.04) {
Etat = "Idle";
}
if (!IsOnScreen()) {
Etat = "IdleInvisible";
}
}
if (!_visible) {
trace("BUG 001: Enemy.Etat = " + Etat);
}
}
function MoveNearPlayer() {
var _local2 = (Math.random() * 100) + 100;
if (Math.random() < 0.5) {
_local2 = -_local2;
}
if (_parent.Collider.Sol.hitTest(Pers.TrueX + _local2, Pers.TrueY + 5, true) && (Pers.HitGrd)) {
if (_parent.Collider.Wall.hitTest(Pers.TrueX + _local2, Pers.TrueY, true)) {
MoveNearPlayer();
} else {
_x = Pers._x + _local2;
_y = Pers._y;
if (IsOnScreen()) {
Etat = "Show";
}
}
}
}
function CheckOverlap() {
}
function FacePlayer() {
((_x > Pers._x) ? (ChangeDir("G")) : (ChangeDir("D")));
}
function KillShred() {
with (this) {
Etat = "Dead";
}
}
function GetPersDist() {
return(Math.sqrt(Math.pow(_x - Pers._x, 2) + Math.pow(_y - Pers._y, 2)));
}
function Block() {
CanBeHit = false;
if (Pers.Etat == "Idle") {
Etat = "Idle";
CanBeHit = true;
}
}
function get Life() {
return(_life);
}
function set Life(l_life) {
_life = l_life;
lifebar_mc.bar_mc._xscale = Math.max((l_life / totalLives) * 100, 0);
//return(Life);
}
}
Symbol 1158 MovieClip [__Packages.ShieldThrow] Frame 0
class ShieldThrow extends DynamicGameObject
{
var Etat, SpdX, Dir, _y, type_mc, typeOf, Pers, _x, TrueX, TrueY, IsOnScreen, Destroy, _visible;
function ShieldThrow () {
super();
Etat = "Move";
SpdX = 20;
SpdX = SpdX * ((Dir == "G") ? -1 : 1);
_y = _y - 50;
type_mc.gotoAndStop(typeOf);
Pers = _global.CG.G_Player;
}
function Move() {
with (this) {
_x = _x + SpdX;
SetTruePos();
CheckEnemy();
CheckLanterns();
CheckDestroy();
}
}
function CheckEnemy() {
var _local4 = 0;
while (_local4 < _global.CG.G_objects.length) {
var _local3 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local4]];
if ((_local3.typeOf == "Enemy") || (_local3.typeOf == "Boss")) {
if (_local3.hitTest(TrueX, TrueY, false) && (_local3._visible)) {
((Dir == "G") ? ((_local3.Dir = "D")) : ((_local3.Dir = "G")));
_local3.Life = _local3.Life - 5;
_local3.SpdYNow = _local3.SpdYGetHit;
_local3.SpdXFall = random(_local3.SpdXGetHit) + 5;
_local3.Etat = "GetHit";
_local3.CanBeHit = false;
Etat = "Hit";
}
}
_local4++;
}
}
function CheckLanterns() {
var _local4 = 0;
while (_local4 < _global.CG.G_objects.length) {
var _local3 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local4]];
if (((((_local3.typeOf == "PowerUp") || (_local3.typeOf == "Ox")) || (_local3.typeOf == "Rabbit")) || (_local3.typeOf == "Horse")) || (_local3.typeOf == "Rat")) {
if (_local3.hitTest(TrueX, TrueY, false)) {
_local3.DefinePowerUp();
Etat = "Hit";
}
}
_local4++;
}
}
function CheckDestroy() {
if (!IsOnScreen()) {
Etat = "Hit";
}
}
function Hit() {
with (this) {
Destroy();
_visible = false;
}
}
}
Symbol 1159 MovieClip [__Packages.Shield] Frame 0
class Shield extends MovieClip
{
var _x, _y, Etat, EtatOld, LgOutG, LgOutD, LgOutUp, LgOutDw, LgHitX, LgHitUp, LgHitDw, InPause, FrGet, Value, _name, typeOf, Obj, Pers, removeMovieClip, gotoAndStop;
function Shield () {
super();
_x = _x;
_y = _y;
Etat = "Sleep";
EtatOld = "Idle";
LgOutG = 25;
LgOutD = 525;
LgOutUp = 25;
LgOutDw = 395;
LgHitX = 50;
LgHitUp = 25;
LgHitDw = 100;
InPause = false;
FrGet = 5;
Value = Value;
_global.CP.CtrlGame.RegisterObject(this);
if (_name.indexOf("trash") >= 0) {
typeOf = "trash";
}
if (_name.indexOf("sewer") >= 0) {
typeOf = "sewer";
}
if (_name.indexOf("gong") >= 0) {
typeOf = "gong";
}
Obj.gotoAndStop(typeOf);
}
function EnterFrame() {
if (Pers == undefined) {
Pers = _global.CG.G_Player;
}
if (Etat != EtatOld) {
ChangeEtat(Etat);
}
Actions();
}
function Sleep() {
with (this) {
CheckActif();
}
}
function Idle() {
with (this) {
CheckGet();
CheckSleep();
}
}
function Activate() {
with (this) {
Pers.SetGrabbableShield(this);
Etat = "Idle";
}
}
function Deactivate() {
with (this) {
Pers.grabbableShield = null;
Etat = "Idle";
}
}
function Get() {
with (this) {
ChangeEtat("Kill");
}
}
function Kill() {
with (this) {
for (LifeBonusI in G_TabLifeBonus) {
var LifeBonusActif = G_TabLifeBonus[LifeBonusI];
removeMovieClip();
if (LifeBonusActif == Nom) {
delete G_TabLifeBonus[LifeBonusI];
}
}
delete this;
}
}
function CheckGet() {
with (this) {
if ((((Pers._y >= (_y - LgHitUp)) && (Pers._y <= (_y + LgHitDw))) && (Pers._x >= (_x - LgHitX))) && (Pers._x <= (_x + LgHitX))) {
Etat = "Activate";
} else if (Pers.grabbableShield == this) {
Etat = "Deactivate";
}
}
}
function CheckActif() {
with (this) {
if ((((_x >= (Bg.Invthis._x - LgOutG)) and (_x <= (Bg.Invthis._x + LgOutD))) and (_y >= (Bg.Invthis._y - LgOutUp))) and (_y <= (Bg.Invthis._y + LgOutDw))) {
Etat = "Idle";
}
}
}
function CheckSleep() {
with (this) {
if ((((_x < (Bg.Invthis._x - LgOutG)) or (_x > (Bg.Invthis._x + LgOutD))) or (_y < (Bg.Invthis._y - LgOutUp))) or (_y > (Bg.Invthis._y + LgOutDw))) {
Etat = "Sleep";
}
}
}
function ChangeEtat(NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
gotoAndStop(NewAction);
}
}
function Actions() {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
Obj.stop();
}
} else {
if (InPause == true) {
InPause = false;
Obj.play();
}
this[Etat]();
}
}
}
}
Symbol 1160 MovieClip [__Packages._CtrlPackage] Frame 0
class _CtrlPackage extends MovieClip
{
var G_Scene, _parent, onEnterFrame, CtrlGame, CtrlSFX;
function _CtrlPackage () {
super();
_global.CP = this;
G_Scene = _parent;
InitSubCtrl();
onEnterFrame = function () {
_global.CP.CtrlGame.EnterFrame();
};
}
function InitSubCtrl() {
CtrlGame = new _CtrlGame();
CtrlSFX = new _CtrlSFX(G_Scene);
}
}
Symbol 1161 MovieClip [__Packages._CtrlGame] Frame 0
class _CtrlGame
{
var G_paused, G_objects, G_CW, G_Key, G_Score, G_Life, G_Level, G_LevelDisplay, G_GameActive;
function _CtrlGame () {
_global.CG = this;
G_paused = false;
G_objects = new Array();
G_CW = new ComboWatcher();
G_Key = new Object();
InitGame();
DefineCustomKeys();
}
function InitGame() {
_global.CP.onEnterFrame = function () {
_global.CG.EnterFrame();
};
}
function EnterFrame() {
if (!G_paused) {
var _local3 = 0;
while (_local3 < G_objects.length) {
_global.CP.G_Scene.currentlevel_mc[G_objects[_local3]].EnterFrame();
_local3++;
}
}
_global.CP.G_Scene.currentlevel_mc.EnterFrame();
G_CW.EnterFrame();
ManageKeys();
}
function StartGame() {
G_Score = 0;
G_Life = 3;
G_Level = 1;
G_LevelDisplay = G_Level;
G_GameActive = true;
_global.CP.G_Scene.popup_mc.gotoAndPlay("Display");
_global.CP.G_Music.Stop();
_global.CP.G_Music = _global.CP.CtrlSFX.PlaySFX("music_game.wav", 100, 65535);
}
function EndGame(l_code) {
switch (l_code) {
case 0 :
_global.CP.G_Scene.gotoAndPlay("Win");
break;
case 1 :
_global.CP.G_Scene.gotoAndPlay("Lose");
break;
default :
_global.CP.G_Scene.gotoAndPlay("Win");
}
}
function TogglePause() {
G_paused = !G_paused;
SetObjectsPause();
}
function RestartGame() {
_global.CP.G_Scene.gotoAndStop("Reset");
}
function SetObjectsPause() {
var _local3 = 0;
while (_local3 < G_objects.length) {
if (G_paused) {
_global.CP.G_Scene.currentlevel_mc[G_objects[_local3]].PauseMe();
} else {
_global.CP.G_Scene.currentlevel_mc[G_objects[_local3]].UnPauseMe();
}
_local3++;
}
}
function RegisterObject(l_mc) {
G_objects.push(l_mc._name);
}
function UnregisterObject(l_mc) {
var _local2 = 0;
while (_local2 < G_objects.length) {
if (G_objects[_local2] == l_mc._name) {
G_objects.splice(_local2, 1);
}
_local2++;
}
}
function ManageKeys() {
if (Key.isDown(32) && (!G_Key.SPACE_state)) {
G_Key.SPACE_pressed = true;
} else {
G_Key.SPACE_pressed = false;
}
if (Key.isDown(38) && (!G_Key.UP_state)) {
G_Key.UP_pressed = true;
} else {
G_Key.UP_pressed = false;
}
if (Key.isDown(G_Key.Z) && (!G_Key.Z_state)) {
G_Key.Z_pressed = true;
} else {
G_Key.Z_pressed = false;
}
if (Key.isDown(G_Key.X) && (!G_Key.X_state)) {
G_Key.X_pressed = true;
} else {
G_Key.X_pressed = false;
}
G_Key.SPACE_state = Key.isDown(32);
G_Key.UP_state = Key.isDown(38);
G_Key.Z_state = Key.isDown(G_Key.Z);
G_Key.X_state = Key.isDown(G_Key.X);
}
function DefineCustomKeys() {
G_Key.Z = new Number(90);
G_Key.X = new Number(88);
G_Key.SPACE_state = false;
G_Key.SPACE_pressed = false;
G_Key.UP_state = false;
G_Key.UP_pressed = false;
G_Key.Z_state = false;
G_Key.Z_pressed = false;
G_Key.X_state = false;
G_Key.X_pressed = false;
}
}
Symbol 1162 MovieClip [__Packages.ComboWatcher] Frame 0
class ComboWatcher
{
var combos, currentCombo, frameItr, resetDelay, sortCombosByLength;
function ComboWatcher () {
combos = new Array();
currentCombo = "";
frameItr = 0;
resetDelay = DEFAULTRESETDELAY;
sortCombosByLength = function (a, b) {
if (a.combo.length > b.combo.length) {
return(-1);
}
if (a.combo.length < b.combo.length) {
return(1);
}
return(0);
};
_global.CG.RegisterObject(this);
}
function EnterFrame() {
if ((++frameItr) >= resetDelay) {
resetCombos();
}
}
function AddCombo(l_combo) {
combos.push(l_combo);
combos.sort(sortCombosByLength);
}
function resetCombos() {
currentCombo = "";
}
function registerMove(l_token) {
currentCombo = currentCombo + String(l_token);
frameItr = 0;
var _local2 = 0;
while (_local2 < combos.length) {
var _local3 = combos[_local2].combo;
if (_local3.substr(_local3.length - 1, 1) == l_token) {
if (checkCombo(_local3, combos[_local2].callback, combos[_local2].reset)) {
break;
}
}
_local2++;
}
}
function checkCombo(l_combo, l_callback, l_reset) {
var _local2 = false;
if (ComboMade(l_combo)) {
_local2 = true;
l_callback();
if (l_reset) {
resetCombos();
}
}
return(_local2);
}
function ComboMade(l_combo) {
var _local3 = false;
var _local2 = l_combo.length;
if (currentCombo.substr(currentCombo.length - _local2, _local2) == l_combo) {
_local3 = true;
}
return(_local3);
}
var DEFAULTRESETDELAY = new Number(20);
}
Symbol 1163 MovieClip [__Packages._CtrlSFX] Frame 0
class _CtrlSFX
{
var SFXs, allMuted, libLevel;
function _CtrlSFX (l_scene) {
SFXs = new Array();
allMuted = false;
}
function PlaySFX(l_linkage, l_vol, l_loop) {
var _local4 = true;
l_loop = Math.max(0, l_loop);
var _local2 = 0;
while (_local2 < SFXs.length) {
if (SFXs[_local2].linkageID == l_linkage) {
_local4 = false;
SFXs[_local2].volume = l_vol;
SFXs[_local2].Play(l_loop);
(allMuted ? (SFXs[_local2].Mute()) : null);
return(SFXs[_local2]);
}
_local2++;
}
if (_local4) {
var _local7 = new SFX(l_linkage, l_vol, l_loop, libLevel);
(allMuted ? (_local7.Mute()) : null);
SFXs.push(_local7);
return(_local7);
}
}
function RemoveSFX(l_sfx) {
var _local2 = 0;
while (_local2 < SFXs.length) {
if (SFXs[_local2] == l_sfx) {
SFXs[_local2].Stop();
SFXs.splice(_local2, 1);
}
_local2++;
}
}
function StopAllSounds() {
var _local2 = 0;
while (_local2 < SFXs.length) {
SFXs[_local2].Stop();
_local2++;
}
}
function PlayRandomSFX(l_prefix, l_amount) {
var _local2 = ((l_prefix + "_") + Math.floor((Math.random() * l_amount) + 1)) + ".wav";
return(PlaySFX(_local2, 100, 1));
}
function MuteAll() {
var _local2 = 0;
while (_local2 < SFXs.length) {
SFXs[_local2].Mute();
_local2++;
}
allMuted = true;
}
function UnMuteAll() {
var _local2 = 0;
while (_local2 < SFXs.length) {
trace("unmuting");
SFXs[_local2].UnMute();
_local2++;
}
allMuted = false;
}
}
Symbol 1164 MovieClip [__Packages.SFX] Frame 0
class SFX extends Sound
{
var attachSound, isPlaying, linkageID, start, onSoundComplete, stop, setVolume, getVolume;
function SFX (l_linkage, l_vol, l_loop, l_libLevel) {
super(l_libLevel);
attachSound(l_linkage);
isPlaying = false;
linkageID = l_linkage;
volume = (l_vol);
Play(l_loop);
}
function Play(l_loop) {
start(0, l_loop);
isPlaying = true;
onSoundComplete = function () {
this.isPlaying = false;
};
}
function Stop() {
stop();
isPlaying = false;
}
function Mute() {
volume = (0);
}
function UnMute() {
volume = (100);
}
function set volume(l_vol) {
setVolume(l_vol);
//return(volume);
}
function get volume() {
return(getVolume());
}
}
Symbol 1165 MovieClip [__Packages.Boss] Frame 0
class Boss extends DynamicGameObject
{
var typeOf, Nom, BaseDir, Dir, LgOutG, LgOutD, LgOutUp, LgOutDw, GetHitG, GetHitD, GetHitUp, GetHitDw, GetFireG, GetFireD, GetFireUp, GetFireDw, LgAttackX, LgAttackUp, LgAttackDw, LgCheckPersX, LgCheckFightX, LgHitX, LgHitUp, LgHitDw, LgFront, LgHitBox, LgCharge, LgBack, AssPointX, AssPointY, FrGetHit, FrGetHitCount, FrSeeingMaxTime, FrSeeingCount, FrIdleCheckMin, FrIdleCheckMax, FrIdleCheckLast, FrSurpris, FrLand, FrDie, FrIdle, FrAttack1, FrAttack2, FrAttack3, FrFinAttack1, FrFinAttack2, FrFinAttack3, frGetGlue, frIdleGlue, frDeGlue, frGetFart, frIdleFart, frDeFart, FartCycle, FartCycleMax, FrShoot, FrShootFin, ShootMax, ShootCount, FrStartPush, FrFinPush, PushedBox, FrSeparateWallCount, FrSeparateWallCheck, Life, SpdXBase, SpdXShadow, SpdXWalkFight, SpdXCharge, SpdXGetHit, SpdYGetHit, SpdXStepBack, SpdYStepBack, WallSeparate, SpdXFall, MoveX, MoveY, WallHitBloc, SolOut, SolHitMin, MaxSol, HitGrd, SpdYMax, SpdYNow, SpdYUp, CanBeHit, Pers, Perso, TooNearWall, DistMinWall, Etat, isAttacker, pdFar, pdNear, pdHit, pdJumpKick, bossMode, Obj, _x, _y, hitTest, ChangeDir, IsOnScreen;
function Boss () {
super();
typeOf = "Boss";
Nom = Nom;
BaseDir = Dir;
LgOutG = 1000;
LgOutD = 1500;
LgOutUp = 10;
LgOutDw = 475;
GetHitG = 30;
GetHitD = 30;
GetHitUp = 115;
GetHitDw = 0;
GetFireG = 26;
GetFireD = 26;
GetFireUp = 100;
GetFireDw = -40;
LgAttackX = 65;
LgAttackUp = 60;
LgAttackDw = 26;
LgCheckPersX = 500;
LgCheckFightX = 100;
LgHitX = 60;
LgHitUp = 35;
LgHitDw = 60;
LgFront = 35;
LgHitBox = 42;
LgCharge = 65;
LgBack = 35;
AssPointX = 12;
AssPointY = 35;
FrGetHit = 15;
FrGetHitCount = 0;
FrSeeingMaxTime = 35;
FrSeeingCount = 35;
FrIdleCheckMin = 36;
FrIdleCheckMax = 60;
FrIdleCheckLast = 113;
FrSurpris = 21;
FrLand = 8;
FrDie = 25;
FrIdle = 131;
FrAttack1 = 8;
FrAttack2 = 11;
FrAttack3 = 11;
FrFinAttack1 = 12;
FrFinAttack2 = 10;
FrFinAttack3 = 9;
frGetGlue = 21;
frIdleGlue = 131;
frDeGlue = 21;
frGetFart = 57;
frIdleFart = 131;
frDeFart = 59;
FartCycle = 0;
FartCycleMax = 4;
FrShoot = 5;
FrShootFin = 15;
ShootMax = 0;
ShootCount = 0;
FrStartPush = 4;
FrFinPush = 4;
PushedBox = 0;
FrSeparateWallCount = 0;
FrSeparateWallCheck = 15;
Life = 25;
SpdXBase = 12;
SpdXShadow = 20;
SpdXWalkFight = 6;
SpdXCharge = 10;
SpdXGetHit = 12;
SpdYGetHit = -15;
SpdXStepBack = 15;
SpdYStepBack = -10;
WallSeparate = false;
SpdXFall = 0;
MoveX = 0;
MoveY = 0;
WallHitBloc = 2;
SolOut = 2;
SolHitMin = 3;
MaxSol = 2;
HitGrd = false;
SpdYMax = 20;
SpdYNow = 0;
SpdYUp = 2;
CanBeHit = true;
Pers = _global.CG.G_Player;
Perso = "Gunner";
TooNearWall = false;
DistMinWall = 100;
Dir = "D";
Etat = "Fall";
isAttacker = false;
pdFar = 500;
pdNear = 60;
pdHit = 50;
pdJumpKick = 60;
bossMode = false;
Pers.SetAttackers();
}
function Sleep() {
with (this) {
CheckActif();
}
}
function Idle() {
with (this) {
FrSeparateWallCount++;
if (FrSeparateWallCount == FrSeparateWallCheck) {
FrSeparateWallCount = 0;
WallSeparate = false;
}
if (((Etat == "Idle") && ((Obj.Etat._currentframe >= FrIdleCheckMin) && (Obj.Etat._currentframe <= FrIdleCheckMax))) || (Obj.Etat._currentframe == FrIdleCheckLast)) {
if (Dir == "G") {
CheckPers("D");
} else if (Dir == "D") {
CheckPers("G");
}
} else {
CheckPers();
}
if (Perso == "Attacker") {
if ((Etat == "Idle") && (Obj.Etat._currentframe == FrIdleCheckLast)) {
CheckDistWall();
if (TooNearWall) {
((Dir == "G") ? ((Dir = "D")) : ((Dir = "G")));
CheckDistWall();
if (!TooNearWall) {
Etat = "Walk";
} else {
Etat = "StartJump";
}
} else {
Etat = "Walk";
}
MoveX = 0;
MoveY = 0;
}
}
CheckAction();
CheckOverlap();
CheckGetHit();
CheckGetFire();
CheckHitGrd();
CheckSol();
CheckSleep();
}
}
function Walk() {
with (this) {
CheckAction();
CheckTurn();
CheckWall();
CheckHitGrd();
CheckSol();
CheckGetHit();
CheckGetFire();
SetMoveX();
CheckOverlap();
MoveShred();
CheckSleep();
CheckCorpse();
}
}
function StartJump() {
with (this) {
Etat = "Jump";
SpdYNow = SpdYStepBack;
SpdXFall = SpdXStepBack;
}
}
function Jump() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
CheckGetFart();
MoveShred();
Etat = "Fall";
}
}
function Land() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
}
}
function GetHit() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
CheckGetFart();
MoveShred();
FrGetHitCount++;
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if (HitGrd == true) {
if (Life > 0) {
FrGetHitCount = 0;
Etat = "Idle";
WallSeparate = false;
} else {
Etat = "Die";
}
}
CanBeHit = true;
}
}
}
function Fall() {
with (this) {
SetMoveXFall();
CheckWall("Back");
CheckHitGrd();
CheckSol();
CheckGetFire();
MoveShred();
if (HitGrd == true) {
if (Life > 0) {
Etat = "Land";
CanBeHit = true;
WallSeparate = false;
} else {
Etat = "Die";
}
}
}
}
function Attack1() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if ((((Pers._x >= (_x - LgHitX)) and (Pers._x <= (_x + LgHitX))) and Pers.CanBeHit) && (Pers.Etat != "IdleChange")) {
if (Dir == "G") {
Pers.Dir = "D";
} else if (Dir == "D") {
Pers.Dir = "G";
}
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
Etat = "FinAttack1";
}
CheckGetHit();
CheckGetFire();
}
}
function Attack2() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if (((Pers._x >= (_x - LgHitX)) and (Pers._x <= (_x + LgHitX))) and (Pers.CanBeHit == true)) {
if (Dir == "G") {
Pers.Dir = "D";
} else if (Dir == "D") {
Pers.Dir = "G";
}
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
Etat = "FinAttack2";
}
CheckGetHit();
CheckGetFire();
}
}
function Attack3() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
if (((Pers._x >= (_x - LgHitX)) and (Pers._x <= (_x + LgHitX))) and (Pers.CanBeHit == true)) {
if (Dir == "G") {
Pers.Dir = "D";
} else if (Dir == "D") {
Pers.Dir = "G";
}
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
Etat = "FinAttack3";
}
CheckGetHit();
CheckGetFire();
}
}
function FinAttack1() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
}
}
function FinAttack2() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
}
}
function FinAttack3() {
with (this) {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
}
}
function Die() {
with (this) {
Dir = "D";
if (Obj.Etat._currentframe >= FrDie) {
_global.CG.G_Hud.AddToScore(1000);
_global.CG.G_Hud.AddToScore(Math.floor((Pers.Life / Pers.TotalLives) * 100) * 10);
_global.CG.G_Hud.AddToScore(_global.CG.G_Life * 250);
_global.CP.G_Scene.gotoAndStop("Win");
_global.CP.CtrlSFX.PlaySFX("music_win.wav", 100, 1);
Etat = "Dead";
}
}
}
function Dead() {
with (this) {
G_TabShred.splice(ShredI, 1);
ShredI = ShredI - 1;
}
}
function CheckPers(CheckDir) {
}
function CheckDistWall(CheckDir, CheckXPoint) {
with (this) {
if (CheckDir == undefined) {
CheckDir = Dir;
}
if (CheckXPoint == undefined) {
CheckXPoint = TrueX;
}
TooNearWall = false;
if (CheckDir == "G") {
var CheckX = (CheckXPoint - DistMinWall);
while ((CheckX < CheckXPoint) && (!TooNearWall)) {
if (_parent.Collider.Wall.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
} else if (_parent.Collider.Turn.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
}
CheckX = CheckX + 10;
}
} else if (CheckDir == "D") {
var CheckX = (TrueX + DistMinWall);
while ((CheckX > CheckXPoint) && (!TooNearWall)) {
if (_parent.Collider.Wall.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
} else if (_parent.Collider.Turn.hitTest(CheckX, TrueY - 5, true)) {
TooNearWall = true;
}
CheckX = CheckX - 10;
}
}
}
}
function CheckPersDist() {
with (this) {
if (Pers.CanBeHit == true) {
if ((Dir == "G") && (Pers._x > _x)) {
Dir = "D";
} else if ((Dir == "D") && (Pers._x <= _x)) {
Dir = "G";
}
if ((Pers._y >= (_y - LgAttackUp)) and (Pers._y <= (_y + LgAttackDw))) {
if ((Pers._x >= (_x - LgCheckPersX)) and (Pers._x <= _x)) {
if ((Pers._x < (_x - LgCheckFightX)) || (Pers._x > _x)) {
Etat = "WalkFight";
}
} else if ((Pers._x <= (_x + LgCheckPersX)) and (Pers._x >= _x)) {
if ((Pers._x > (_x + LgCheckFightX)) || (Pers._x < _x)) {
Etat = "WalkFight";
}
}
}
} else {
Etat = "WalkFight";
}
}
}
function CheckJump() {
with (this) {
if (Math.ceil(Math.random() * 100) == 80) {
Etat = "StartJump";
}
}
}
function CheckGetHit() {
with (this) {
if (Pers.CanHit == true) {
if (CanBeHit) {
var l_hitPointX = (Pers.TrueX + (Pers.HitPointX - Pers._x));
var l_hitPointY = (Pers.TrueY + (Pers.HitPointY - Pers._y));
if (hitTest(l_hitPointX, l_hitPointY, false)) {
if (((Pers.HitPointX <= (_x + GetHitD)) && (Pers.HitPointX >= (_x - GetHitG))) && (Pers.Dir == "D")) {
Dir = "G";
} else if (((Pers.HitPointX >= (_x - GetHitG)) && (Pers.HitPointX <= (_x + GetHitD))) && (Pers.Dir == "G")) {
Dir = "D";
}
Pers.CanHit = false;
Life--;
SpdYNow = SpdYGetHit;
SpdXFall = random(SpdXGetHit) + 5;
Etat = "GetHit";
_global.CP.CtrlSFX.PlayRandomSFX("hit", 4);
CanBeHit = false;
}
}
}
}
}
function CheckAttack() {
with (this) {
if ((Pers.CanBeHit == true) and (HitGrd == true)) {
if ((Pers._y >= (_y - LgAttackUp)) && (Pers._y <= (_y + LgAttackDw))) {
if ((Pers._x >= (_x - LgAttackX)) && (Pers._x <= (_x + LgAttackX))) {
if ((Dir eq "G") and (Pers._x > _x)) {
Dir = "D";
} else if ((Dir eq "D") and (Pers._x <= _x)) {
Dir = "G";
}
if (Perso == "Attacker") {
var RandomAttack = Math.ceil(Math.random() * 2);
Etat = "Attack" + RandomAttack;
}
}
}
}
}
}
function SetMoveX() {
with (this) {
MoveX = SpdXBase;
if (Dir eq "G") {
MoveX = MoveX * -1;
}
}
}
function SetMoveXFall() {
with (this) {
MoveX = SpdXFall;
if (SpdXFall > 0) {
SpdXFall = SpdXFall * 0.9;
}
if (Dir eq "D") {
MoveX = MoveX * -1;
}
}
}
function CheckWall(CheckDir) {
with (this) {
if (MoveX != 0) {
if (CheckDir == "Back") {
var AddPoint = LgBack;
} else if (CheckDir == "Charge") {
var AddPoint = LgCharge;
} else {
var AddPoint = LgFront;
}
if (MoveX > 0) {
var WallStop = WallHitBloc;
var CheckX = (TrueX + AddPoint);
} else {
var WallStop = (-1 * WallHitBloc);
var CheckX = (TrueX - AddPoint);
}
var WallHit1 = (MoveX / 3);
var WallHit2 = (WallHit1 * 2);
if (_parent.Collider.Wall.hitTest(CheckX + WallStop, TrueY, true)) {
if (Etat == "Charge") {
Etat = "StartJump";
} else if (((Etat == "GetHit") || (Etat == "StartJump")) || (Etat == "Fall")) {
MoveX = 0;
WallSeparate = false;
} else {
MoveX = 0;
WallSeparate = false;
if (Dir eq "G") {
Dir = "D";
} else {
Dir = "G";
}
CheckDistWall();
if ((Math.ceil(Math.random() * 4) == 4) || (TooNearWall)) {
Etat = "Idle";
} else {
Etat = "Walk";
}
}
} else if (_parent.Collider.Wall.hitTest(CheckX + WallHit1, TrueY, true)) {
MoveX = WallHitBloc;
} else if (_parent.Collider.Wall.hitTest(CheckX + WallHit2, TrueY, true)) {
MoveX = WallHit1;
} else if (_parent.Collider.Wall.hitTest(CheckX + MoveX, TrueY, true)) {
MoveX = WallHit2;
}
}
}
}
function CheckTurn() {
with (this) {
if (_parent.Collider.Turn.hitTest(TrueX + MoveX, TrueY, true) || (_parent.Collider.Wall.hitTest(TrueX + MoveX, TrueY, true))) {
MoveX = 0;
if (Dir eq "G") {
Dir = "D";
} else {
Dir = "G";
}
CheckDistWall();
if ((Math.ceil(Math.random() * 4) == 4) || (TooNearWall)) {
Etat = "Idle";
} else {
Etat = "Walk";
}
}
}
}
function CheckSol() {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY, true) and (SpdYNow >= 0)) {
SpdYNow = 0;
var InSol = true;
while (InSol == true) {
MoveY = MoveY - SolOut;
InSol = _parent.Collider.Sol.hitTest(TrueX, TrueY + MoveY, true);
}
} else if (SpdYNow >= 0) {
if (HitGrd == true) {
SpdYNow = 0;
MoveY = SpdYNow;
} else {
SpdYNow = SpdYNow + SpdYUp;
if (SpdYNow > SpdYMax) {
SpdYNow = SpdYMax;
}
var SolHit1 = (SpdYNow / 3);
var SolHit2 = (SolHit1 * 2);
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + SolHit1, true)) {
MoveY = SolHitMin;
} else if (_parent.Collider.Sol.hitTest(TrueX, TrueY + SolHit2, true)) {
MoveY = SolHit1;
} else if (_parent.Collider.Sol.hitTest(TrueX, TrueY + SpdYNow, true)) {
MoveY = SolHit2;
} else {
MoveY = SpdYNow;
}
}
} else {
SpdYNow = SpdYNow + SpdYUp;
MoveY = SpdYNow;
}
}
}
function CheckHitGrd() {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + MaxSol, true)) {
HitGrd = true;
} else {
HitGrd = false;
}
}
}
function MoveShred() {
with (this) {
_x = _x + MoveX;
_y = _y + MoveY;
}
}
function CheckActif() {
with (this) {
if (((((_x >= (Bg.Invthis._x - LgOutG)) and (_x <= (Bg.Invthis._x + LgOutD))) and (_y >= (Bg.Invthis._y - LgOutUp))) and (_y <= (Bg.Invthis._y + LgOutDw))) and (Etat eq "Sleep")) {
if (Life > 0) {
Etat = "Idle";
Dir = BaseDir;
} else {
Etat = "Dead";
}
}
}
}
function CheckSleep() {
with (this) {
if ((((_x < (Bg.Invthis._x - LgOutG)) or (_x > (Bg.Invthis._x + LgOutD))) or (_y < (Bg.Invthis._y - LgOutUp))) or (_y > (Bg.Invthis._y + LgOutDw))) {
if (Pers._x < _x) {
Dir = "G";
} else {
Dir = "D";
}
Etat = "Sleep";
}
}
}
function CheckAction() {
if (Pers.Etat != "Die") {
if ((_y > (Pers._y - 5)) && (_y < (Pers._y + 5))) {
if (GetPersDist() > pdNear) {
FacePlayer();
if (Math.random() < 0.05) {
Etat = "Walk";
}
} else {
Etat = "Idle";
if (Math.random() < 0.9) {
FacePlayer();
_global.CP.CtrlSFX.PlayRandomSFX("airslow", 3);
Etat = "Attack" + (Math.floor(Math.random() * 3) + 1);
}
}
} else if (Math.random() < 0.02) {
FacePlayer();
Etat = "Walk";
} else if (Math.random() < 0.03) {
Etat = "Idle";
}
} else if (Math.random() < 0.01) {
Etat = "Walk";
} else if (Math.random() < 0.04) {
Etat = "Idle";
}
if (((Life <= 20) || (Pers.Life < 5)) && (!bossMode)) {
Etat = "Leave";
}
}
function FacePlayer() {
if (_x > Pers._x) {
ChangeDir("G");
} else {
ChangeDir("D");
}
}
function KillShred() {
with (this) {
Etat = "Dead";
}
}
function Leave() {
Dir = "G";
CheckHitGrd();
CheckSol();
SetMoveX();
MoveShred();
if (!IsOnScreen()) {
bossMode = true;
Etat = "Wait";
}
}
function Wait() {
}
function GetPersDist() {
return(Math.sqrt(Math.pow(_x - Pers._x, 2) + Math.pow(_y - Pers._y, 2)));
}
}
Symbol 1166 MovieClip [__Packages.Player] Frame 0
class Player extends DynamicGameObject
{
var Point, TotalLives, Life, SpdXMinion, SpdXNormal, SpdXBase, SpdXNow, MoveX, MoveY, FrontX, FrontY, BottomFrontX, BottomBackX, BackX, HitGrdPoint, WallHitBloc, SpdYNow, SpdYUp, SpdYMax, SpdYFall, SpdXHitBase, SpdYHitBase, SpdXHitBlock, SpdYHitBlock, SpdStartJump, SolOut, SolHitMin, MaxSol, HitGrd, SolForJump, DistYFall, DistYLand, CanHit, CanBeHit, FrWalkNow, FrJump, FrFall, FrLand, FrGetHit, FrGetHitCount, FrBoomTir, FrFinBoom, FrDead, FrDeadCount, ICharacter, LgGetShootX, LgGetShootUp, LgGetShootUpBas, FrInvincibleCount, FrInvincible, Invincible, FrGetHitLand, PushedBox, PushVideActive, frKick1, frFinKick1, frKick2, frFinKick2, frFinKick3, HitPointX, HitPointY, DistBallY, Dir, Obj, grabbableShield, shieldHP, currentPunch, hitPower, powerMult, bIsBlocking, bMegaHit, bIsShielding, Etat, shieldType, _x, _y, _visible, EtatOld, gotoAndStop;
function Player () {
super();
Point = _global.C.Score;
TotalLives = 25;
Life = TotalLives;
SpdXMinion = 3;
SpdXNormal = 10;
SpdXBase = SpdXNormal;
SpdXNow = 0;
MoveX = 0;
MoveY = 0;
FrontX = 0;
FrontY = 0;
BottomFrontX = 0;
BottomBackX = 0;
BackX = 0;
HitGrdPoint = 0;
WallHitBloc = 2;
SpdYNow = 0;
SpdYUp = 1.75;
SpdYMax = 20;
SpdYFall = 2;
SpdXHitBase = 25;
SpdYHitBase = -6;
SpdXHitBlock = 5;
SpdYHitBlock = -2;
SpdStartJump = -14;
SolOut = 2;
SolHitMin = 5;
MaxSol = 3;
HitGrd = false;
SolForJump = 6;
DistYFall = 0;
DistYLand = 30;
CanHit = false;
CanBeHit = true;
FrWalkNow = 1;
FrJump = 1;
FrFall = 14;
FrLand = 5;
FrGetHit = 10;
FrGetHitCount = 0;
FrBoomTir = 9;
FrFinBoom = 6;
FrDead = 140;
FrDeadCount = 0;
ICharacter = 0;
LgGetShootX = 20;
LgGetShootUp = 72;
LgGetShootUpBas = 44;
FrInvincibleCount = 0;
FrInvincible = 60;
Invincible = false;
FrGetHitLand = 8;
PushedBox = 0;
PushVideActive = false;
frKick1 = 8;
frFinKick1 = 12;
frKick2 = 8;
frFinKick2 = 9;
frFinKick3 = 5;
HitPointX = 0;
HitPointY = 0;
DistBallY = -59;
updatePerso();
Dir = "G";
_global.CG.G_Player = this;
DefineCombos();
Obj.Etat.shield_mc._visible = false;
grabbableShield = null;
shieldHP = 0;
currentPunch = "L";
hitPower = 0;
powerMult = 1;
bIsBlocking = false;
bMegaHit = false;
bIsShielding = false;
}
function DefineCombos() {
_global.CG.G_CW.AddCombo({combo:"K", callback:function () {
_global.CG.G_Player.SetKick();
}, reset:false});
_global.CG.G_CW.AddCombo({combo:"P", callback:function () {
_global.CG.G_Player.SetPunch();
}, reset:false});
_global.CG.G_CW.AddCombo({combo:"PPP", callback:function () {
_global.CG.G_Player.SetPNudge();
}, reset:true});
_global.CG.G_CW.AddCombo({combo:"PPK", callback:function () {
_global.CG.G_Player.SetFKShot();
}, reset:false});
_global.CG.G_CW.AddCombo({combo:"JK", callback:function () {
_global.CG.G_Player.SetRKick();
}, reset:false});
}
function SetKick() {
switch (Etat) {
case "Jump" :
Etat = "JumpKick";
break;
case "FinJump" :
Etat = "JumpKick";
break;
case "Fall" :
Etat = "JumpKick";
break;
case "FinFall" :
Etat = "JumpKick";
break;
case "IdleCrouch" :
Etat = "LowKick";
break;
default :
Etat = "Kick";
}
}
function SetPunch() {
if (currentPunch == "L") {
currentPunch = "R";
} else {
currentPunch = "L";
}
switch (Etat) {
case "Jump" :
Etat = "LandDHPunch";
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
break;
case "FinJump" :
Etat = "LandDHPunch";
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
break;
case "Fall" :
Etat = "LandDHPunch";
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
break;
case "FinFall" :
Etat = "LandDHPunch";
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
break;
case "IdleCrouch" :
Etat = "StomachJab";
break;
default :
Etat = "Punch" + currentPunch;
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
}
}
function SetRHKick() {
Etat = "RHKick";
_global.CP.CtrlSFX.PlayRandomSFX("airslow", 3);
}
function SetPNudge() {
Etat = "PNudge";
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
}
function SetDHPunch() {
Etat = "DHPunch";
_global.CP.CtrlSFX.PlayRandomSFX("airslow", 3);
}
function SetFKShot() {
Etat = "FKShot";
}
function SetUppercut() {
Etat = "Uppercut";
_global.CP.CtrlSFX.PlayRandomSFX("airslow", 3);
}
function SetHSKick() {
Etat = "HSKick";
_global.CP.CtrlSFX.PlayRandomSFX("airslow", 3);
}
function SetRKick() {
Etat = "RKick";
_global.CP.CtrlSFX.PlayRandomSFX("airfast", 4);
}
function Idle() {
bIsBlocking = false;
with (this) {
KeepDeadPos = true;
if (Life > 0) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckPenche();
CheckSol();
CheckFall();
MovePers();
CheckJump();
CheckAction();
CheckGetFire();
CheckDie();
CheckGrab();
} else {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
}
}
function Block() {
bIsBlocking = true;
with (this) {
KeepDeadPos = true;
if (Life > 0) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckAction();
CheckDie();
CheckGrab();
} else {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
}
}
function ShieldOn() {
bIsShielding = true;
Obj.Etat.shield_mc.gotoAndStop(shieldType);
Block();
}
function ShieldOff() {
bIsShielding = false;
Obj.Etat.shield_mc.gotoAndStop(shieldType);
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
}
function IdleCrouch() {
Idle();
}
function GetLifeBonus(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;
}
}
function Walk() {
with (this) {
SetSpdX();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckAttack();
CheckPenche();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckGetFire();
CheckDie();
CheckAction();
CheckGrab();
CheckEnemies();
}
}
function WalkCrouch() {
Walk();
}
function Jump() {
with (this) {
CheckAction();
SetSpdXJump();
CheckGrab();
SetMoveX();
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
CheckCeil();
CheckGetFire();
MovePers();
if (Obj.Etat._currentframe >= FrJump) {
Etat = "FinJump";
}
}
}
function FinJump() {
with (this) {
CheckAction();
CheckGrab();
SetSpdXJump();
SetMoveX();
if (UseSuit == true) {
CheckTir();
}
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;
}
}
}
function Fall() {
with (this) {
CheckAction();
CheckGrab();
SetSpdXJump();
SetMoveX();
CheckGetFire();
if (UseSuit == true) {
CheckTir();
}
CheckWall(FrontX, FrontY);
CheckWall(BottomFrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if ((Obj.Etat._currentframe >= FrFall) or (HitGrd == true)) {
SpdXNow = 0;
MoveX = 0;
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "Land";
} else {
Etat = "Idle";
}
} else {
Etat = "FinFall";
}
}
CheckHole();
}
}
function FinFall() {
with (this) {
SetSpdXJump();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckWall(FrontX, TrueY);
CheckWall(FrontX, TopY);
CheckHitGrd();
CheckSol();
MovePers();
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "Land";
} else {
Etat = "Idle";
}
}
CheckHole();
}
}
function Land() {
with (this) {
CheckAction();
SetSpdX();
SetMoveX();
CheckGetFire();
CheckWall(FrontX, FrontY);
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckJump();
CheckAction();
CheckDie();
}
}
function GetHit1() {
with (this) {
if ((Obj.Etat._currentframe >= Obj.Etat._totalframes) && (HitGrd == true)) {
CheckHitGrd();
Etat = "Idle";
CanBeHit = true;
FrGetHitCount = 0;
} else {
FrGetHitCount++;
}
GetHitGeneral();
}
}
function GetHit2() {
with (this) {
GetHitGeneral();
if ((Obj.Etat._currentframe >= Obj.Etat._totalframes) && (HitGrd == true)) {
CheckHitGrd();
Etat = "Idle";
CanBeHit = true;
FrGetHitCount = 0;
} else {
FrGetHitCount++;
}
}
}
function GetHitLand() {
with (this) {
GetHitGeneral();
if (FrGetHitCount == FrGetHit) {
Obj.Etat.play();
FrGetHitCount++;
} else if (FrGetHitCount > FrGetHit) {
if (Obj.Etat._currentframe >= FrGetHitLand) {
Etat = "PushVide";
FrGetHitCount = 0;
InvincibleInit();
}
} else {
FrGetHitCount++;
}
}
}
function GetHitGeneral() {
with (this) {
SetSpdXHit();
CheckWall(BackX, TrueY);
CheckHitGrd();
CheckSol();
MovePers();
CheckDie();
}
}
function GetHit() {
with (this) {
if ((shieldHP > 0) && (bIsShielding)) {
CanHit = false;
shieldHP--;
Etat = "ShieldBounce";
_global.CP.CtrlSFX.PlayRandomSFX("hit", 4);
if (shieldHP > 0) {
_global.CP.CtrlSFX.PlayRandomSFX("shield", 4);
} else {
Etat = "ShieldBreak";
_global.CP.CtrlSFX.PlaySFX("shieldout.wav", 100, 1);
}
} else {
CanHit = false;
var RandomHit = 0;
if (bIsBlocking && (Math.random() < 0.2)) {
Life = Life - 0.5;
_global.CP.CtrlSFX.PlayRandomSFX("block", 5);
SpdXNow = SpdXHitBlock;
SpdYNow = SpdYHitBlock;
} else {
Life--;
_global.CP.CtrlSFX.PlayRandomSFX("hit", 4);
SpdXNow = SpdXHitBase;
SpdYNow = SpdYHitBase;
}
RandomHit = Math.ceil(Math.random() * 2);
Etat = "GetHit" + RandomHit;
_global.CG.G_Hud.UpdateEnergy((Life / TotalLives) * 100);
_global.CP.CtrlSFX.PlayRandomSFX("hurt", 5);
}
}
}
function ShieldBounce() {
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
CanBeHit = true;
}
}
function ShieldBreak() {
ShieldBounce();
}
function GetFire() {
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" + RandomHit;
}
}
function CheckGetFire() {
with (this) {
var NbMinionBall = G_TabMinionBall.length;
if (NbMinionBall > 0) {
var i = 0;
while (i < NbMinionBall) {
var BallX = _parent.Control[G_TabMinionBall[i]]._x;
var BallY = _parent.Control[G_TabMinionBall[i]]._y;
if (((((BallX >= (_x - GetFireG)) and (BallX <= (_x + GetFireD))) && (BallY >= (_y - GetFireUp))) && (BallY <= (_y + 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++;
}
}
}
}
function InvincibleInit() {
Invincible = true;
}
function InvincibleEnd() {
with (this) {
Invincible = false;
FrInvincibleCount = 0;
_visible = true;
}
}
function Die() {
with (this) {
CanBeHit = false;
FrDeadCount++;
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
_global.CP.G_Scene.gotoAndStop("Lose");
_global.CP.CtrlSFX.PlaySFX("music_lose.wav", 100, 1);
}
}
}
function SetSpdXHit() {
with (this) {
MoveX = SpdXNow;
if (SpdXNow > 0) {
SpdXNow = SpdXNow * 0.7;
}
if (Dir == "D") {
MoveX = MoveX * -1;
}
}
}
function SetSpdX() {
with (this) {
if (Key.isDown(39)) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(FrontX + WallHitBloc, TrueY, true) || (Key.isDown(40))) {
CheckIdleAlternatives();
SpdXNow = 0;
} else {
Etat = "Walk";
SpdXNow = SpdXBase;
}
} else if (Key.isDown(37)) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(FrontX - WallHitBloc, TrueY, true) || (Key.isDown(40))) {
CheckIdleAlternatives();
SpdXNow = 0;
} else {
Etat = "Walk";
SpdXNow = SpdXBase * -1;
}
} else {
CheckIdleAlternatives();
SpdXNow = 0;
}
if (Dir != DirOld) {
SpdXNow = 0;
}
}
}
function CheckIdleAlternatives() {
with (this) {
if (Key.isDown(40)) {
Etat = "IdleCrouch";
} else if (Key.isDown(32)) {
if (shieldHP <= 0) {
Etat = "Block";
} else {
Etat = "ShieldOn";
}
} else {
Etat = "Idle";
}
}
}
function SetSpdXJump() {
with (this) {
if (Key.isDown(39)) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase;
}
} else if (Key.isDown(37)) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase * -1;
}
} else {
SpdXNow = 0;
}
if (Dir != DirOld) {
SpdXNow = 0;
}
}
}
function SetMoveX() {
with (this) {
MoveX = SpdXNow;
}
}
function CheckWall(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);
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 + MoveX, CoordY, true)) {
MoveX = WallHit2;
}
}
}
}
function CheckCeil() {
with (this) {
if (MoveY != 0) {
if (_parent.Collider.Ceil.hitTest(TopX, TopY + MoveY, true)) {
MoveY = 0;
SpdYNow = 0;
Etat = "Fall";
DistYFall = 0;
}
}
}
}
function Kick1() {
with (this) {
if (Obj.Etat._currentframe >= frKick1) {
CanHit = true;
HitPointX = Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = _x - HitPointX;
} else if (Dir == "D") {
HitPointX = _x + HitPointX;
}
HitPointY = _y + Obj.HitPoint._y;
Etat = "FinKick1";
CheckGetFire();
}
}
}
function FinKick1() {
with (this) {
if (Obj.Etat._currentframe >= frFinKick1) {
CanHit = false;
if (!HitGrd) {
Etat = "Fall";
} else {
Etat = "Idle";
}
CheckGetFire();
if (Key.isDown(32)) {
ComboKick++;
}
}
}
}
function Punch() {
CheckHitGrd();
CheckSol();
if (!HitGrd) {
SetSpdXJump();
SetMoveX();
}
MovePers();
if (Obj.Etat._currentframe == 1) {
CanHit = true;
}
HitPointX = Obj.HitPoint._x;
if (Dir == "G") {
HitPointX = _x - HitPointX;
} else if (Dir == "D") {
HitPointX = _x + HitPointX;
}
HitPointY = _y + Obj.HitPoint._y;
CheckGetFire();
if (Obj.Etat._currentframe == Obj.Etat._totalframes) {
Etat = "Idle";
CanHit = false;
bMegaHit = false;
}
}
function PunchL() {
hitPower = 1;
Punch();
}
function PunchR() {
hitPower = 1;
Punch();
}
function StomachJab() {
hitPower = 1;
Punch();
}
function LandDHPunch() {
hitPower = 1;
Punch();
}
function Kick() {
hitPower = 0.75;
Punch();
}
function JumpKick() {
hitPower = 0.75;
Punch();
}
function LowKick() {
hitPower = 0.75;
Punch();
}
function RHKick() {
hitPower = 3;
bMegaHit = true;
Punch();
}
function PNudge() {
hitPower = 2;
Punch();
}
function DHPunch() {
hitPower = 2;
bMegaHit = true;
Punch();
}
function FKShot() {
hitPower = 2;
Punch();
}
function Uppercut() {
hitPower = 2;
Punch();
}
function HSKick() {
hitPower = 3;
Punch();
}
function RKick() {
hitPower = 1.5;
Punch();
}
function JumpShoot() {
with (this) {
CheckHitGrd();
CheckSol();
CheckCeil();
MovePers();
if (Obj.Etat._currentframe >= FrShootGlue) {
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "Fall";
}
}
CheckGetFire();
}
}
function CheckJump() {
with (this) {
if (_global.CG.G_Key.UP_pressed and (HitGrd == true)) {
KeyListener.UpRelease = false;
if (Etat == "IdleCrouch") {
_global.CG.G_CW.registerMove("S");
} else {
KeepDeadPos = false;
Etat = "Jump";
SpdYNow = SpdStartJump;
}
_global.CG.G_CW.registerMove("J");
}
}
}
function CheckJumpShoot() {
with (this) {
if ((_global.CG.G_Key.UP_pressed and (HitGrd == true)) and KeyListener.UpRelease) {
KeyListener.UpRelease = false;
KeepDeadPos = false;
Etat = "JumpShoot";
_parent.ControlBall.gotoAndStop(1);
SpdYNow = SpdStartJump;
}
}
}
function CheckAction() {
with (this) {
if (_global.CG.G_Key.Z_pressed) {
if (shieldHP <= 0) {
_global.CG.G_CW.registerMove("P");
} else {
Etat = "ShieldThrow";
}
} else if (_global.CG.G_Key.X_pressed) {
_global.CG.G_CW.registerMove("K");
}
}
}
function ResetMove() {
with (this) {
MoveX = 0;
MoveY = 0;
SpdXNow = 0;
SpdYNow = 0;
}
}
function CheckFall() {
with (this) {
if (SpdYNow >= SpdYFall) {
KeepDeadPos = false;
Etat = "Fall";
DistYFall = 0;
}
}
}
function CheckDie() {
with (this) {
if ((Life <= 0) and (HitGrd == true)) {
if (_global.CG.G_Life <= 0) {
Etat = "Die";
} else {
CanBeHit = true;
_global.CG.G_Life--;
_global.CG.G_Hud.UpdateLives();
Life = TotalLives;
_global.CG.G_Hud.UpdateEnergy((Life / TotalLives) * 100);
Etat = "Idle";
}
}
}
}
function MovePers() {
with (this) {
if ((Pers.TrueX + MoveX) < 0) {
MoveX = TrueX * -1;
} else if ((Pers.TrueX + MoveX) > 500) {
MoveX = 500 - Pers.TrueX;
}
_x = _x + MoveX;
MoveX = 0;
_y = _y + MoveY;
MoveY = 0;
}
}
function SetTruePos() {
super.SetTruePos();
with (this) {
TopX = TrueX;
TopY = TrueY + Obj.HitTop._y;
FrontX = Obj.HitFront._x;
FrontY = TrueY + Obj.HitFront._y;
BottomFrontX = Obj.HitBottomFront._x;
BottomBackX = Obj.HitBottomBack._x;
BackX = 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;
}
}
}
function CheckHitGrd(CheckX, CheckY) {
with (this) {
if ((CheckX == undefined) && (CheckY == undefined)) {
CheckX = TrueX;
CheckY = TrueY;
aCheckPoints = [CheckX, BottomFrontX, BottomBackX];
} else {
aCheckPoints = [CheckX];
}
for (var i in aCheckPoints) {
if (_parent.Collider.Sol.hitTest(aCheckPoints[i], CheckY + MaxSol, true) and (SpdYNow >= 0)) {
HitGrd = true;
HitGrdPoint = aCheckPoints[i];
break;
}
HitGrd = false;
HitGrdPoint = TrueX;
}
}
}
function CheckSol(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 (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;
}
}
}
function ChangeEtat(l_newAction) {
var _local2 = false;
if (((EtatOld == "Walk") && (Etat == "WalkTir")) || ((EtatOld == "WalkTir") && (Etat == "Walk"))) {
_local2 = true;
}
if ((EtatOld == "ShieldOn") && (Etat == "Idle")) {
l_newAction = "ShieldOff";
}
EtatOld = Etat;
Etat = l_newAction;
Obj.gotoAndStop(l_newAction);
if (shieldHP > 0) {
Obj.Etat.shield_mc._visible = true;
Obj.Etat.shield_mc.gotoAndStop(shieldType);
} else {
Obj.Etat.shield_mc._visible = false;
}
if (_local2) {
if (FrWalkNow >= 20) {
FrWalkNow = 1;
}
Obj.Etat.gotoAndPlay(FrWalkNow);
}
}
function updatePerso() {
with (this) {
gotoAndStop(Dir);
Etat = "Idle";
GunUsed = "GlueGun";
GetFireG = -1 * Obj.HitBack._x;
GetFireD = Obj.HitFront._x;
GetFireDw = 20;
GetFireUp = -1 * Obj.HitTop._y;
ComboKick = 0;
InvincibleEnd();
CanBeHit = true;
}
}
function SetAttackers() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < _global.CG.G_objects.length) {
if (_global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local2]].typeOf == "Enemy") {
if (_global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local2]].Etat != "Dead") {
_local3.push(_global.CG.G_objects[_local2]);
}
}
_local2++;
}
_local3.sort(function (a, b) {
var _local2 = _global.CP.G_Scene.currentlevel_mc;
if (_local2[a].GetPersDist() < _local2[b].GetPersDist()) {
return(-1);
}
if (_local2[a].GetPersDist() > _local2[b].GetPersDist()) {
return(1);
}
return(0);
});
_local2 = 0;
while (_local2 < _local3.length) {
if (_local2 < 2) {
_global.CP.G_Scene.currentlevel_mc[_local3[_local2]].isAttacker = true;
} else {
_global.CP.G_Scene.currentlevel_mc[_local3[_local2]].isAttacker = false;
}
_local2++;
}
return(_local3);
}
function CheckGrab() {
if (_global.CG.G_Key.SPACE_pressed) {
if (shieldHP <= 0) {
if (grabbableShield != null) {
grabbableShield.Etat = "Get";
shieldType = grabbableShield.typeOf;
shieldHP = 5;
Obj.Etat.shield_mc._visible = true;
Obj.Etat.shield_mc.gotoAndStop(shieldType);
grabbableShield = null;
}
}
}
}
function Powerup() {
CanBeHit = false;
if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
CanBeHit = true;
}
}
function SetGrabbableShield(l_mc) {
grabbableShield = l_mc;
}
function ShieldThrow() {
if (Obj.Etat._currentframe == 6) {
var _local3 = _global.CP.G_Scene.currentlevel_mc;
shieldHP = 0;
var _local4 = _local3.getNextHighestDepth();
_local3.attachMovie("ShieldThrow", "ShieldThrow" + _local4, _local4, {_x:_x, _y:_y, Dir:Dir, typeOf:shieldType});
} else if (Obj.Etat._currentframe >= Obj.Etat._totalframes) {
Etat = "Idle";
}
}
function CheckEnemies() {
var _local4 = false;
var _local3 = 0;
while (_local3 < _global.CG.G_objects.length) {
if (_global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local3]].typeOf == "Enemy") {
if (_global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local3]].Etat != "Dead") {
_local4 = true;
break;
}
}
_local3++;
}
if (!_local4) {
var _local6 = _global.CP.G_Scene.currentlevel_mc;
var _local5 = _local6.getNextHighestDepth();
_global.CP.G_Scene.currentlevel_mc.attachMovie("Enemy", "Enemy" + _local5, _local5, {_x:_x - 50, _y:_y - 50});
}
}
}
Symbol 1167 MovieClip [__Packages.PowerUp] Frame 0
class PowerUp extends MovieClip
{
var Etat, EtatOld, LgOutG, LgOutD, LgOutUp, LgOutDw, LgHitX, LgHitUp, LgHitDw, InPause, FrGet, Value, fallingSpeed, TrueX, TrueY, locked, typeOf, Pers, Obj, removeMovieClip, _x, _y, hitTest, gotoAndStop, _parent;
function PowerUp () {
super();
Etat = "Lantern";
EtatOld = "Lantern";
LgOutG = 25;
LgOutD = 525;
LgOutUp = 25;
LgOutDw = 395;
LgHitX = 26;
LgHitUp = 13;
LgHitDw = 70;
InPause = false;
FrGet = 5;
Value = Value;
fallingSpeed = 0;
TrueX = 0;
TrueY = 0;
locked = false;
typeOf = "PowerUp";
_global.CP.CtrlGame.RegisterObject(this);
}
function EnterFrame() {
if (Pers == undefined) {
Pers = _global.CG.G_Player;
}
if (Etat != EtatOld) {
ChangeEtat(Etat);
}
Actions();
}
function Sleep() {
with (this) {
CheckActif();
}
}
function Get() {
with (this) {
if (Obj._currentframe >= Obj._totalframes) {
ChangeEtat("Kill");
Pers.GetLifeBonus(Value);
}
}
}
function Kill() {
with (this) {
for (LifeBonusI in G_TabLifeBonus) {
var LifeBonusActif = G_TabLifeBonus[LifeBonusI];
removeMovieClip();
if (LifeBonusActif == Nom) {
delete G_TabLifeBonus[LifeBonusI];
}
}
delete this;
}
}
function Lantern() {
CheckHit();
}
function None() {
}
function Standard() {
CheckSol();
CheckGet();
}
function Hard() {
CheckSol();
CheckGet();
}
function Level() {
CheckSol();
CheckGet();
}
function Game() {
CheckSol();
CheckGet();
}
function Ox() {
CheckSol();
CheckGet();
}
function Rabbit() {
CheckSol();
CheckGet();
}
function Horse() {
CheckSol();
CheckGet();
}
function Rat() {
CheckSol();
CheckGet();
}
function CheckGet() {
with (this) {
if ((((Pers._y >= (_y - LgHitUp)) and (Pers._y <= (_y + LgHitDw))) and (Pers._x >= (_x - LgHitX))) and (Pers._x <= (_x + LgHitX))) {
switch (Etat) {
case "Standard" :
_global.CG.G_Hud.AddToScore(50);
_global.CP.CtrlSFX.PlaySFX("bonus.wav", 100, 1);
break;
case "Hard" :
_global.CG.G_Hud.AddToScore(100);
_global.CP.CtrlSFX.PlaySFX("bonus.wav", 100, 1);
break;
case "Level" :
_global.CG.G_Hud.AddToScore(750);
_global.CP.CtrlSFX.PlaySFX("bonusbig.wav", 100, 1);
break;
case "Game" :
_global.CG.G_Hud.AddToScore(2000);
_global.CP.CtrlSFX.PlaySFX("bonusbig.wav", 100, 1);
break;
case "Ox" :
_global.CG.G_Hud.AddToScore(500);
Pers.powerMult = 2;
_global.CG.G_CW.AddCombo({combo:"KKK", callback:function () {
_global.CG.G_Player.SetRHKick();
}, reset:true});
_global.CG.G_CW.AddCombo({combo:"KKP", callback:function () {
_global.CG.G_Player.SetDHPunch();
}, reset:false});
Pers.Etat = "Powerup";
_global.CG.G_Hud.talismanHolder.gotoAndStop("ox");
_global.CP.CtrlSFX.PlaySFX("talisman_ox.wav", 100, 1);
break;
case "Rabbit" :
_global.CG.G_Hud.AddToScore(500);
Pers.SpdXBase = Pers.SpdXBase * 1.5;
_global.CG.G_CW.AddCombo({combo:"SJP", callback:function () {
_global.CG.G_Player.SetUppercut();
}, reset:false});
_global.CG.G_CW.AddCombo({combo:"SJK", callback:function () {
_global.CG.G_Player.SetHSKick();
}, reset:false});
Pers.Etat = "Powerup";
_global.CG.G_Hud.talismanHolder.gotoAndStop("rabbit");
_global.CP.CtrlSFX.PlaySFX("talisman_rabbit.wav", 100, 1);
break;
case "Horse" :
_global.CG.G_Hud.AddToScore(500);
Pers.Life = Pers.TotalLives;
_global.CG.G_Hud.UpdateEnergy((Pers.Life / Pers.TotalLives) * 100);
_global.CP.CtrlSFX.PlaySFX("talisman_horse.wav", 100, 1);
break;
case "Rat" :
_global.CG.G_Hud.AddToScore(500);
_global.CG.G_Life++;
_global.CG.G_Hud.UpdateLives();
_global.CP.CtrlSFX.PlaySFX("talisman_rat.wav", 100, 1);
}
Etat = "Get";
}
}
}
function CheckHit() {
if (Pers.CanHit) {
var _local2 = Pers.TrueX + (Pers.HitPointX - Pers._x);
var _local3 = Pers.TrueY + (Pers.HitPointY - Pers._y);
if (hitTest(_local2, _local3, false)) {
DefinePowerUp();
}
}
}
function DefinePowerUp() {
if (typeOf == "PowerUp") {
var _local9 = "Standard";
if (((_y < 250) || (Math.random() < 0.1)) && (Math.random() < 0.7)) {
_local9 = "Hard";
}
if (Math.random() < 0.1) {
_local9 = "None";
}
var _local5 = 0;
var _local6 = _global.CP.G_Scene.currentlevel_mc._width;
var _local4 = 0;
while (_local4 < _global.CG.G_objects.length) {
var _local3 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local4]];
if (_local3.typeOf == "LevelSeparator") {
if ((_local3._x < _x) && (_local3._x > _local5)) {
_local5 = _local3._x;
}
if ((_local3._x > _x) && (_local3._x < _local6)) {
_local6 = _local3._x;
}
}
_local4++;
}
var _local7 = true;
_local4 = 0;
while (_local4 < _global.CG.G_objects.length) {
var _local3 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local4]];
if (_local3.typeOf == "PowerUp") {
if ((((_local3 != this) && (_local3.Etat == "Lantern")) && (_local3._x > _local5)) && (_local3._x < _local6)) {
_local7 = false;
}
}
_local4++;
}
if (_local7) {
_local9 = "Level";
}
var _local8 = true;
_local4 = 0;
while (_local4 < _global.CG.G_objects.length) {
var _local3 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local4]];
if (_local3.typeOf == "PowerUp") {
if ((_local3 != this) && (_local3.Etat == "Lantern")) {
_local8 = false;
}
}
_local4++;
}
if (_local8) {
_local9 = "Game";
}
Etat = _local9;
} else {
Etat = typeOf;
}
_global.CP.CtrlSFX.PlayRandomSFX("lantern", 3);
}
function CheckActif() {
with (this) {
if ((((_x >= (Bg.Invthis._x - LgOutG)) and (_x <= (Bg.Invthis._x + LgOutD))) and (_y >= (Bg.Invthis._y - LgOutUp))) and (_y <= (Bg.Invthis._y + LgOutDw))) {
Etat = "Idle";
}
}
}
function CheckSleep() {
with (this) {
if ((((_x < (Bg.Invthis._x - LgOutG)) or (_x > (Bg.Invthis._x + LgOutD))) or (_y < (Bg.Invthis._y - LgOutUp))) or (_y > (Bg.Invthis._y + LgOutDw))) {
Etat = "Sleep";
}
}
}
function ChangeEtat(NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
gotoAndStop(NewAction);
}
}
function SetTruePos() {
TrueX = _x + _parent._x;
TrueY = _y + _parent._y;
}
function CheckSol() {
if (!locked) {
SetTruePos();
if (!_parent.Collider.Sol.hitTest(TrueX, TrueY, true)) {
_y = _y + Math.min((fallingSpeed = fallingSpeed + 2), MAXFALLINGSPEED);
}
SetTruePos();
if (_parent.Collider.Sol.hitTest(TrueX, TrueY, true)) {
fallingSpeed = 0;
do {
_y = _y - 1;
SetTruePos();
} while (_parent.Collider.Sol.hitTest(TrueX, TrueY, true));
locked = true;
}
}
}
function Actions() {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
Obj.stop();
}
} else {
if (InPause == true) {
InPause = false;
Obj.play();
}
this[Etat]();
}
}
}
var MAXFALLINGSPEED = new Number(15);
}
Symbol 1168 MovieClip [__Packages.TypeMaker] Frame 0
class TypeMaker extends MovieClip
{
var proxLanterns, _name, _y, _x;
function TypeMaker () {
super();
proxLanterns = new Array();
var _local5 = 0;
while (_local5 < _global.CG.G_objects.length) {
var _local4 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local5]];
if (_local4.typeOf == "PowerUp") {
if (GetDist(_local4) < RADIUS) {
proxLanterns.push(_local4);
}
}
_local5++;
}
var _local6 = Math.floor(Math.random() * proxLanterns.length);
proxLanterns[_local6].typeOf = _name;
}
function GetDist(l_mc) {
return(Math.sqrt(Math.pow(_x - l_mc._x, 2) + Math.pow(_y - l_mc._y, 2)));
}
var RADIUS = new Number(200);
}
Symbol 1169 MovieClip [__Packages.ScrollBlocker] Frame 0
class ScrollBlocker extends GameObject
{
var act, IsOnScreen, _x, _parent, _name;
function ScrollBlocker () {
super();
act = false;
}
function EnterFrame() {
if (IsOnScreen()) {
_global.CP.G_Scene.currentlevel_mc.xLimit = -_x;
if (!act) {
var _local4 = Math.round(((_parent._width - _x) / _parent._width) * 3);
var _local3 = 1;
while (_local3 <= _local4) {
SpawnEnemies();
_local3++;
}
if (_name == "PREBOSS") {
SpawnBoss();
_local3 = 1;
while (_local3 <= 2) {
SpawnEnemies();
_local3++;
}
}
if (_name == "BOSS") {
PlaceBoss();
}
_parent.Collider.Wall.virtual_mc._x = _x;
act = true;
}
}
if (act) {
CheckDestroy();
}
}
function Destroy() {
super.Destroy();
_parent.Collider.Wall.virtual_mc._x = 0;
_global.CP.G_Scene.currentlevel_mc.ResetXLimit();
}
function SpawnEnemies() {
var _local3 = _global.CP.G_Scene.currentlevel_mc;
var _local2 = _local3.getNextHighestDepth();
_global.CP.G_Scene.currentlevel_mc.attachMovie("Enemy", "Enemy" + _local2, _local2, {_x:_global.CG.G_Player._x - 50, _y:_global.CG.G_Player._y - 50});
}
function SpawnBoss() {
var _local2 = _global.CP.G_Scene.currentlevel_mc;
var _local3 = _local2.getNextHighestDepth();
_global.CP.G_Scene.currentlevel_mc.attachMovie("Boss", "Valmont", _local3, {_x:_global.CG.G_Player._x - 50, _y:_global.CG.G_Player._y - 50});
}
function PlaceBoss() {
var _local2 = _global.CP.G_Scene.currentlevel_mc;
trace("placing");
_local2.Valmont._x = _global.CG.G_Player._x - 50;
_local2.Valmont._y = _global.CG.G_Player._y - 50;
_local2.Valmont.Etat = "Idle";
}
function CheckDestroy() {
var _local5 = false;
var _local3 = 0;
while (_local3 < _global.CG.G_objects.length) {
var _local4 = _global.CP.G_Scene.currentlevel_mc[_global.CG.G_objects[_local3]];
if (_local4.typeOf == "Enemy") {
if (_local4.Etat != "Dead") {
_local5 = true;
break;
}
}
_local3++;
}
if ((_name == "PREBOSS") && (_global.CP.G_Scene.currentlevel_mc.Valmont.Etat != "Wait")) {
_local5 = true;
}
if (!_local5) {
_global.CG.G_Hud.ShowGOArrow();
Destroy();
}
}
}
Symbol 1170 MovieClip [__Packages.LevelSeparator] Frame 0
class LevelSeparator extends GameObject
{
var typeOf, Pers, _x, previousPersX;
function LevelSeparator () {
super();
typeOf = "LevelSeparator";
Pers = _global.CG.G_Player;
}
function EnterFrame() {
if ((Pers._x < _x) && (previousPersX > _x)) {
_global.CG.G_Level++;
if (_global.CG.G_Level > _global.CG.G_LevelDisplay) {
_global.CG.G_LevelDisplay++;
_global.CG.G_Hud.UpdateLevel(_global.CG.G_LevelDisplay);
_global.CP.G_Scene.popup_mc.gotoAndPlay("Display");
}
}
if ((Pers._x > _x) && (previousPersX < _x)) {
_global.CG.G_Level--;
}
previousPersX = Pers._x;
}
}
Symbol 1171 MovieClip [__Packages.Background] Frame 0
class Background extends MovieClip
{
var cameraOffsetX, cameraOffsetY, scrollXMin, main_mc, scrollYMin, scrollYMax, InPause, xLimit, _x, _y, bg_mc, fg_mc, Collider;
function Background () {
super();
cameraOffsetX = Stage.width / 2;
cameraOffsetY = (Stage.height / 2) + 150;
scrollXMin = (-main_mc._width) + Stage.width;
scrollYMin = (-main_mc._height) + Stage.height;
scrollYMax = 0;
InPause = false;
ResetXLimit();
}
function EnterFrame() {
Actions();
}
function Actions() {
with (this) {
if (G_Pause) {
if (!InPause) {
InPause = true;
}
} else {
if (InPause) {
InPause = false;
}
ScrollBg();
}
}
}
function ResetXLimit() {
xLimit = 0;
}
function ScrollBg() {
var _local4 = Math.max(scrollXMin, Math.min(xLimit, (-_global.CG.G_Player._x) + cameraOffsetX)) - _x;
var _local3 = Math.max(scrollYMin, Math.min(scrollYMax, (-_global.CG.G_Player._y) + cameraOffsetY)) - _y;
var _local6 = Math.min(Math.abs(_local4), MAXSPEEDX);
var _local5 = Math.min(Math.abs(_local3), MAXSPEEDY);
_x = _x + (_local6 * (_local4 / Math.abs(_local4)));
_y = _y + (_local5 * (_local3 / Math.abs(_local3)));
bg_mc._x = ((_x + main_mc._x) / (-(main_mc._width - Stage.width))) * (main_mc._width - bg_mc._width);
bg_mc._y = ((_y + main_mc._y) / (-(main_mc._height - Stage.height))) * (main_mc._height - bg_mc._height);
fg_mc._x = ((_x + main_mc._x) / (-(main_mc._width - Stage.width))) * (-(fg_mc._width - main_mc._width));
fg_mc._y = (((_y + main_mc._y) / (-(main_mc._height - Stage.height))) * (-(fg_mc._height - main_mc._height))) + 55;
Collider.SHWall.virtual1_mc._x = -_x;
Collider.SHWall.virtual2_mc._x = (-_x) + Stage.width;
}
var MAXSPEEDX = new Number(15);
var MAXSPEEDY = new Number(10);
}
Symbol 1172 MovieClip [__Packages._CtrlHud] Frame 0
class _CtrlHud extends MovieClip
{
var energyBar, _parent, lifeDisplay, levelDisplay, scoreDisplay, talismanHolder, mcGOArrow;
function _CtrlHud () {
super();
_global.CG.G_Hud = this;
energyBar = _parent.stats_mc.lifebar_mc;
lifeDisplay = _parent.stats_mc.lives_txt;
levelDisplay = _parent.stats_mc.level_txt;
scoreDisplay = _parent.stats_mc.score_txt;
talismanHolder = _parent.stats_mc;
mcGOArrow = _parent.goarrow_mc;
ResetScore();
}
function UpdateLives() {
lifeDisplay.text = _global.CG.G_Life;
}
function UpdateEnergy(l_amount) {
energyBar._xscale = l_amount;
}
function UpdateLevel(l_amount) {
levelDisplay.text = l_amount;
}
function AddToScore(l_amount) {
_global.CG.G_Score = _global.CG.G_Score + l_amount;
scoreDisplay.text = ZeroPad(String(_global.CG.G_Score), 7, "0");
_global.CP.CtrlSFX.PlaySFX("points.wav", 100, 1);
}
function ResetScore() {
_global.CG.G_Score = 0;
scoreDisplay.text = ZeroPad(String(_global.CG.G_Score), 7, "0");
}
function ShowGOArrow() {
mcGOArrow.gotoAndPlay("GO");
}
function ZeroPad(l_str, l_len, l_pad) {
while (l_str.length < l_len) {
l_str = l_pad + l_str;
}
return(l_str);
}
}
Symbol 286 Button
on (release) {
nextFrame();
}
Symbol 480 MovieClip Frame 1
this.onRelease = function () {
};
this.useHandCursor = false;
Symbol 492 MovieClip Frame 49
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 495 MovieClip Frame 50
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 498 MovieClip Frame 55
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 501 MovieClip Frame 50
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 503 MovieClip Frame 32
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 505 MovieClip Frame 25
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 507 MovieClip Frame 32
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 509 MovieClip Frame 32
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 511 MovieClip Frame 32
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 513 MovieClip Frame 32
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 516 MovieClip Frame 32
_parent._parent.jackie_mc.gotoAndStop(1);
_parent._parent.jackie_mc.gotoAndStop(_parent._currentframe);
stop();
Symbol 517 MovieClip Frame 1
stop();
Symbol 521 Button
on (release) {
if (keys_mc._currentframe < keys_mc._totalframes) {
keys_mc.nextFrame();
} else {
keys_mc.gotoAndStop(2);
}
}
Symbol 522 Button
on (release) {
if (keys_mc._currentframe > 2) {
keys_mc.prevFrame();
} else {
keys_mc.gotoAndStop(keys_mc._totalframes);
}
}
Symbol 539 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 24
stop();
Symbol 613 MovieClip Frame 15
stop();
Symbol 629 MovieClip Frame 16
stop();
Symbol 636 MovieClip Frame 11
stop();
Symbol 641 MovieClip Frame 10
stop();
Symbol 642 MovieClip Frame 9
stop();
Symbol 650 MovieClip Frame 5
stop();
Symbol 661 MovieClip Frame 10
stop();
Symbol 665 MovieClip Frame 26
stop();
Symbol 673 MovieClip Frame 12
stop();
Symbol 685 MovieClip Frame 36
stop();
Symbol 686 MovieClip Frame 1
stop();
Symbol 687 MovieClip Frame 1
stop();
Symbol 697 Button
on (release) {
prevFrame();
}
Symbol 787 Button
on (release) {
this.gotoAndStop(1);
this._parent.gotoAndStop("Game");
_global.CG.G_paused = false;
}
Symbol 861 MovieClip Frame 1
stop();
Symbol 861 MovieClip Frame 2
stop();
Symbol 861 MovieClip Frame 3
stop();
Symbol 861 MovieClip Frame 4
stop();
Symbol 866 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 55
stop();
Symbol 882 Button
on (release) {
this._parent.instructions_mc.gotoAndStop(2);
}
Symbol 883 Button
on (release) {
this._parent.gotoAndStop("Game");
}
Symbol 905 Button
on (release) {
gotoAndPlay ("Resume");
}
Symbol 914 Button
on (release) {
_global.CG.G_paused = false;
_global.CP.G_Scene.gotoAndStop("Title");
}
Symbol 916 MovieClip Frame 1
stop();
Symbol 916 MovieClip Frame 2
_global.CG.G_paused = true;
Symbol 916 MovieClip Frame 10
_global.CG.G_paused = false;
Symbol 917 MovieClip [_CtrlHud] Frame 1
#initclip 32
Object.registerClass("_CtrlHud", _CtrlHud);
#endinitclip
Symbol 920 MovieClip Frame 1
stop();
Symbol 921 MovieClip Frame 1
stop();
Symbol 934 Button
on (release) {
_global.CG.G_paused = true;
_global.CP.G_Scene.instructions_mc.gotoAndStop(2);
}
Symbol 942 Button
on (press) {
_global.CP.CtrlSFX.MuteAll();
gotoAndStop (2);
}
Symbol 944 Button
on (press) {
_global.CP.CtrlSFX.UnMuteAll();
gotoAndStop (1);
}
Symbol 945 MovieClip Frame 1
stop();
Symbol 955 Button
on (release) {
_global.CP.G_Scene.quit_mc.gotoAndStop("Display");
}
Symbol 966 MovieClip Frame 1
_visible = false;
Symbol 969 MovieClip Frame 5
stop();
Symbol 999 MovieClip Frame 4
stop();
Symbol 1000 MovieClip Frame 15
stop();
Symbol 1018 MovieClip Frame 14
stop();
Symbol 1023 MovieClip Frame 11
stop();
Symbol 1026 MovieClip Frame 11
stop();
Symbol 1031 MovieClip Frame 1
_parent.shield_mc = this.shield_mc;
Symbol 1034 MovieClip Frame 1
this._parent._parent.shield_mc = this.shield_mc;
Symbol 1037 MovieClip Frame 4
stop();
Symbol 1041 MovieClip Frame 1
stop();
Symbol 1045 MovieClip Frame 1
stop();
Symbol 1046 MovieClip Frame 7
stop();
Symbol 1048 MovieClip Frame 1
stop();
Symbol 1048 MovieClip Frame 8
stop();
Symbol 1048 MovieClip Frame 17
stop();
Symbol 1048 MovieClip Frame 26
stop();
Symbol 1048 MovieClip Frame 34
stop();
Symbol 1048 MovieClip Frame 42
stop();
Symbol 1048 MovieClip Frame 50
stop();
Symbol 1048 MovieClip Frame 65
stop();
Symbol 1048 MovieClip Frame 72
stop();
Symbol 1048 MovieClip Frame 86
stop();
Symbol 1048 MovieClip Frame 94
stop();
Symbol 1048 MovieClip Frame 101
stop();
Symbol 1048 MovieClip Frame 218
stop();
Symbol 1049 MovieClip [Player] Frame 1
#initclip 26
Object.registerClass("Player", Player);
#endinitclip
stop();
Symbol 1049 MovieClip [Player] Frame 2
stop();
Symbol 1053 MovieClip Frame 14
stop();
Symbol 1066 MovieClip [PowerUp] Frame 1
#initclip 27
Object.registerClass("PowerUp", PowerUp);
#endinitclip
stop();
Symbol 1066 MovieClip [PowerUp] Frame 10
stop();
Symbol 1066 MovieClip [PowerUp] Frame 15
stop();
Symbol 1066 MovieClip [PowerUp] Frame 25
stop();
Symbol 1066 MovieClip [PowerUp] Frame 35
stop();
Symbol 1066 MovieClip [PowerUp] Frame 45
stop();
Symbol 1066 MovieClip [PowerUp] Frame 55
stop();
Symbol 1066 MovieClip [PowerUp] Frame 65
stop();
Symbol 1066 MovieClip [PowerUp] Frame 75
stop();
Symbol 1066 MovieClip [PowerUp] Frame 85
stop();
Symbol 1066 MovieClip [PowerUp] Frame 95
stop();
Symbol 1068 MovieClip [TalismanPlacer] Frame 1
#initclip 28
Object.registerClass("TalismanPlacer", TypeMaker);
#endinitclip
this._visible = false;
Symbol 1070 MovieClip [ScrollBlocker] Frame 1
#initclip 29
Object.registerClass("ScrollBlocker", ScrollBlocker);
#endinitclip
this._visible = false;
Symbol 1072 MovieClip [LevelSeparator] Frame 1
#initclip 30
Object.registerClass("LevelSeparator", LevelSeparator);
#endinitclip
this._visible = false;
Symbol 1074 MovieClip Frame 1
this._visible = 0;
Symbol 1077 MovieClip Frame 1
this._visible = false;
Symbol 1079 MovieClip Frame 1
this._visible = false;
Symbol 1091 MovieClip [_Level1] Frame 1
#initclip 31
Object.registerClass("_Level1", Background);
#endinitclip
Instance of Symbol 1080 MovieClip "Collider" in Symbol 1091 MovieClip [_Level1] Frame 1
onClipEvent (load) {
}
Symbol 1105 Button
on (release) {
_global.CG.RestartGame();
}
Symbol 1142 Button
on (release) {
_global.CG.RestartGame();
}