Frame 2
_focusrect = false;
ifFrameLoaded (122) {
gotoAndStop ("TitleCard");
}
Frame 3
stop();
Instance of Symbol 17 MovieClip in Frame 3
onClipEvent (load) {
var TotalLoad = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
if (this._currentframe < 101) {
var TempLoad = _root.getBytesLoaded();
var Pourcent = ((TempLoad / TotalLoad) * 100);
Pourcent = int(Pourcent) + 1;
this.gotoAndStop(Pourcent);
} else {
_parent.gotoAndStop("TitleCard");
}
this.NumberLoad = Pourcent - 1;
}
Frame 10
_root.MusJoue = true;
stop();
Frame 19
stop();
Frame 28
stop();
Frame 38
Game.Control.Music.VolDest = 70;
Game.Control.Music.Etat = "FadeIn";
Game.Control.G_Pause = true;
stop();
Instance of Symbol 805 MovieClip "Game" in Frame 38
onClipEvent (load) {
this._xscale = 100;
this._yscale = 100;
this._x = 0;
this._y = 0;
}
Frame 46
Game.Control.Music.VolDest = 0;
Game.Control.Music.Etat = "FadeOut";
stop();
Frame 56
Game.Control.Music.VolDest = 0;
Game.Control.Music.Etat = "FadeOut";
Frame 65
Game.Control.Music.VolDest = 0;
Game.Control.Music.Etat = "FadeOut";
play();
Frame 100
var urlTemp = new String(this._url);
if (urlTemp.lastIndexOf("/") == -1) {
var lastCar = urlTemp.lastIndexOf("/");
} else {
var lastCar = urlTemp.lastIndexOf("\\");
}
var path = urlTemp.substring(0, lastCar + 1);
_root.loadMovie(path + "LonaEpi2Final.swf");
stop();
Frame 101
stopAllSounds();
Sons.Loose.gotoAndStop("Joue");
nextFrame();
Frame 112
gotoAndStop ("Game");
Symbol 20 MovieClip Frame 2
stop();
Symbol 20 MovieClip Frame 10
stop();
stop();
stop();
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 22 MovieClip Frame 9
gotoAndStop (1);
Symbol 24 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 2
stop();
Symbol 24 MovieClip Frame 9
gotoAndStop (1);
Symbol 39 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 1
stop();
Instance of Symbol 20 MovieClip "Music" in Symbol 58 MovieClip Frame 1
onClipEvent (load) {
_parent._parent.ObjMusic = new Sound(this);
_parent._parent.ObjMusic.setVolume(0);
}
Symbol 99 Button
on (release) {
_parent.Sons.Title.gotoAndStop("Arret");
var WhereGo = "Game";
play();
}
Symbol 100 Button
on (release) {
var WhereGo = "Instruct";
play();
}
Symbol 102 MovieClip Frame 349
_parent.Sons.Title.gotoAndStop("Joue");
Symbol 102 MovieClip Frame 366
stop();
Symbol 102 MovieClip Frame 422
if (WhereGo eq "Instruct") {
_parent.gotoAndStop("Instruct");
} else {
_parent.gotoAndStop("EpiTitle");
}
Symbol 142 Button
on (release) {
gotoAndPlay ("Out1");
}
Symbol 145 Button
on (release) {
nextFrame();
}
Symbol 146 Button
on (release) {
gotoAndPlay ("Out2");
}
Symbol 147 Button
on (release) {
prevFrame();
}
Symbol 194 MovieClip Frame 27
stop();
Symbol 194 MovieClip Frame 28
stop();
Symbol 194 MovieClip Frame 56
_parent.Sons.Title.gotoAndStop("Arret");
_parent.gotoAndStop("EpiTitle");
Symbol 194 MovieClip Frame 87
_parent.Sons.Title.gotoAndStop("Arret");
_parent.gotoAndStop("EpiTitle");
Symbol 200 MovieClip Frame 10
stop();
Symbol 203 MovieClip Frame 10
stop();
Symbol 206 MovieClip Frame 10
stop();
Symbol 209 MovieClip Frame 10
stop();
Symbol 212 MovieClip Frame 10
stop();
Symbol 215 MovieClip Frame 10
stop();
Symbol 218 MovieClip Frame 10
stop();
Symbol 221 MovieClip Frame 10
stop();
Symbol 224 MovieClip Frame 10
stop();
Symbol 227 MovieClip Frame 10
stop();
Symbol 230 MovieClip Frame 10
stop();
Symbol 233 MovieClip Frame 10
stop();
Symbol 241 MovieClip Frame 219
_parent.gotoAndStop("Game");
Instance of Symbol 252 MovieClip "BmpZone1" in Symbol 259 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 254 MovieClip "BmpZone2" in Symbol 259 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 256 MovieClip "Zone1" in Symbol 259 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 258 MovieClip "Zone2" in Symbol 259 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 2
stop();
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 2
stop();
Symbol 267 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 2
stop();
Instance of Symbol 264 MovieClip "SolZone2" in Symbol 270 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(2);
}
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 2
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 2
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
Instance of Symbol 273 MovieClip "WallZone2a" in Symbol 278 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(2);
}
Instance of Symbol 275 MovieClip "WallZone2b" in Symbol 278 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(2);
}
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 10
stop();
Symbol 290 MovieClip Frame 20
stop();
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 9
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 20
stop();
Symbol 293 MovieClip Frame 1
stop();
Symbol 293 MovieClip Frame 20
stop();
Symbol 295 MovieClip Frame 1
stop();
Symbol 295 MovieClip Frame 8
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 9
stop();
Symbol 324 MovieClip Frame 17
stop();
Symbol 324 MovieClip Frame 26
stop();
Symbol 324 MovieClip Frame 34
stop();
Symbol 326 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 9
stop();
Symbol 326 MovieClip Frame 18
stop();
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 8
stop();
Symbol 358 MovieClip Frame 15
stop();
Symbol 358 MovieClip Frame 23
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 8
stop();
Symbol 381 MovieClip Frame 16
stop();
Symbol 381 MovieClip Frame 25
stop();
Symbol 401 MovieClip Frame 1
stop();
Instance of Symbol 383 MovieClip in Symbol 401 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 401 MovieClip Frame 8
stop();
Symbol 401 MovieClip Frame 15
stop();
Symbol 401 MovieClip Frame 23
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 2
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 9
stop();
Symbol 410 MovieClip Frame 17
stop();
Symbol 451 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 9
stop();
Symbol 451 MovieClip Frame 17
stop();
Symbol 451 MovieClip Frame 25
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 2
stop();
Symbol 544 MovieClip Frame 1
stop();
Symbol 544 MovieClip Frame 10
stop();
Symbol 544 MovieClip Frame 19
stop();
Symbol 544 MovieClip Frame 28
stop();
Symbol 544 MovieClip Frame 38
stop();
Symbol 544 MovieClip Frame 47
stop();
if (_parent._parent._parent.Sons.FusGetHit._currentframe == 1) {
_parent._parent._parent.Sons.FusGetHit.play();
}
Symbol 544 MovieClip Frame 56
stop();
if (_parent._parent._parent.Sons.FusDie._currentframe == 1) {
_parent._parent._parent.Sons.FusDie.play();
}
Symbol 544 MovieClip Frame 65
stop();
Symbol 544 MovieClip Frame 74
stop();
Symbol 545 MovieClip Frame 1
stop();
Symbol 545 MovieClip Frame 2
stop();
Symbol 546 MovieClip Frame 3
if (_parent._parent._parent._parent.Sons.FurryEntre._currentframe == 1) {
_parent._parent._parent._parent.Sons.FurryEntre.play();
}
Symbol 549 MovieClip Frame 1
stop();
Instance of Symbol 49 MovieClip in Symbol 549 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Symbol 549 MovieClip Frame 9
stop();
Symbol 549 MovieClip Frame 18
if (_parent._parent._parent.Sons.GetFurry._currentframe == 1) {
_parent._parent._parent.Sons.GetFurry.play();
}
stop();
Symbol 549 MovieClip Frame 26
stop();
Instance of Symbol 549 MovieClip "HealthClone" in Symbol 550 MovieClip Frame 1
onClipEvent (load) {
if (this._name eq "HealthClone") {
this.gotoAndStop("Sleep");
}
}
Symbol 646 MovieClip Frame 1
var Rand = random(75);
if (Rand < 25) {
gotoAndStop ("Son1");
} else if (Rand < 50) {
gotoAndStop ("Son2");
} else {
gotoAndStop ("Son3");
}
Symbol 646 MovieClip Frame 2
stop();
Symbol 646 MovieClip Frame 8
stop();
Symbol 646 MovieClip Frame 14
stop();
Symbol 687 MovieClip Frame 1
var Rand = random(75);
if (Rand < 25) {
gotoAndStop ("Son1");
} else if (Rand < 50) {
gotoAndStop ("Son2");
} else {
gotoAndStop ("Son3");
}
Symbol 687 MovieClip Frame 2
stop();
Symbol 687 MovieClip Frame 8
stop();
Symbol 687 MovieClip Frame 14
stop();
Symbol 706 MovieClip Frame 2
stop();
Symbol 706 MovieClip Frame 7
stop();
Symbol 706 MovieClip Frame 12
stop();
Instance of Symbol 706 MovieClip in Symbol 709 MovieClip Frame 2
onClipEvent (load) {
var Rand = random(75);
if (Rand < 25) {
this.gotoAndStop("Son1");
} else if (Rand < 50) {
this.gotoAndStop("Son2");
} else {
this.gotoAndStop("Son3");
}
}
Symbol 749 MovieClip Frame 1
stop();
Symbol 749 MovieClip Frame 8
stop();
Symbol 749 MovieClip Frame 16
stop();
Symbol 749 MovieClip Frame 23
stop();
Symbol 749 MovieClip Frame 30
stop();
Symbol 749 MovieClip Frame 39
stop();
Symbol 749 MovieClip Frame 48
stop();
Symbol 749 MovieClip Frame 56
stop();
Symbol 749 MovieClip Frame 64
stop();
Symbol 749 MovieClip Frame 72
stop();
Symbol 749 MovieClip Frame 80
stop();
Symbol 749 MovieClip Frame 88
stop();
Symbol 749 MovieClip Frame 96
stop();
Symbol 749 MovieClip Frame 105
stop();
Symbol 749 MovieClip Frame 113
stop();
Symbol 749 MovieClip Frame 121
stop();
Symbol 749 MovieClip Frame 128
stop();
Symbol 749 MovieClip Frame 135
stop();
Symbol 749 MovieClip Frame 145
stop();
Symbol 749 MovieClip Frame 153
stop();
Symbol 750 MovieClip Frame 1
Obj.gotoAndStop(_parent.Control.Pers.Etat);
stop();
Symbol 750 MovieClip Frame 2
Obj.gotoAndStop(_parent.Control.Pers.Etat);
stop();
Symbol 754 MovieClip Frame 2
stop();
Symbol 754 MovieClip Frame 8
stop();
Symbol 754 MovieClip Frame 14
stop();
Instance of Symbol 754 MovieClip in Symbol 755 MovieClip Frame 2
onClipEvent (load) {
var Rand = random(75);
if (Rand < 25) {
this.gotoAndStop("Son1");
} else if (Rand < 50) {
this.gotoAndStop("Son2");
} else {
this.gotoAndStop("Son3");
}
}
Symbol 756 MovieClip Frame 1
stop();
Symbol 756 MovieClip Frame 8
stop();
Symbol 757 MovieClip Frame 1
stop();
Symbol 757 MovieClip Frame 2
stop();
Symbol 774 MovieClip Frame 2
if ((random(100) > 75) and (_parent._parent._parent._parent.Sons.ShredIdle._currentframe == 1)) {
_parent._parent._parent._parent.Sons.ShredIdle.play();
}
Symbol 792 MovieClip Frame 1
stop();
Symbol 792 MovieClip Frame 9
stop();
Symbol 792 MovieClip Frame 17
stop();
if (_parent._parent._parent.Sons.ShredAttack._currentframe == 1) {
_parent._parent._parent.Sons.ShredAttack.play();
}
Symbol 792 MovieClip Frame 34
stop();
Symbol 792 MovieClip Frame 43
stop();
if (_parent._parent._parent.Sons.ShredGetHit._currentframe == 1) {
_parent._parent._parent.Sons.ShredGetHit.play();
}
Symbol 792 MovieClip Frame 52
stop();
Symbol 792 MovieClip Frame 61
stop();
Symbol 792 MovieClip Frame 69
stop();
Symbol 792 MovieClip Frame 77
stop();
Symbol 792 MovieClip Frame 86
stop();
Symbol 793 MovieClip Frame 1
stop();
Symbol 793 MovieClip Frame 2
stop();
Symbol 795 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 2
if (_parent.Control.KeyListener.Z == true) {
_parent.Control.CreerPersBall();
}
Symbol 797 MovieClip Frame 1
_parent.Control.Pers.CanBeHit = true;
stop();
Symbol 797 MovieClip Frame 2
play();
Symbol 797 MovieClip Frame 15
gotoAndStop (1);
Symbol 797 MovieClip Frame 16
play();
var ColorTrans1 = {ra:64, rb:92, ga:64, gb:92, ba:64, bb:92, aa:100, ab:0};
var ColorTrans2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
Symbol 797 MovieClip Frame 17
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 19
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 21
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 23
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 25
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 27
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 29
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 31
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 33
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 35
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 37
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 39
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 41
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 43
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 45
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 47
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 49
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 51
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 53
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 55
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 57
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 59
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 61
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 63
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 65
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 67
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 69
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 71
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 73
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 75
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 77
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 79
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 81
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 83
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 85
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 87
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 89
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 91
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 93
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 95
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 97
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans1);
Symbol 797 MovieClip Frame 99
var NewColor = new Color(_parent.Pers);
NewColor.setTransform(ColorTrans2);
Symbol 797 MovieClip Frame 100
gotoAndStop (1);
Symbol 804 MovieClip Frame 1
stop();
Symbol 804 MovieClip Frame 9
stop();
Symbol 804 MovieClip Frame 17
stop();
Symbol 804 MovieClip Frame 26
stop();
Symbol 804 MovieClip Frame 34
stop();
Instance of Symbol 261 MovieClip "Control" in Symbol 805 MovieClip Frame 1
onClipEvent (load) {
function ObjMusic() {
this.Nom = "Music";
this.SpdFade = 5;
this.Volume = 0;
this.VolDest = 70;
this.Etat = "Part";
this.EtatOld = "Arret";
}
function ObjPers(PosX, PosY) {
this.Nom = "Pers";
this.Etat = "Idle";
this.EtatOld = "Idle";
this.Dir = "D";
this.DirOld = "D";
this.UseSuit = false;
this.Health = 100;
this.Life = 3;
this.Degat = 0;
this.SpdXBase = 9;
this.SpdXNow = 0;
this.MoveX = 0;
this.MoveY = 0;
this.PosX = PosX;
this.PosY = PosY;
this.TrueX = PosX;
this.TrueY = PosY;
this.DeadX = PosX;
this.DeadY = PosY;
this.KeepDeadPos = true;
this.LgGetShootX = 20;
this.LgGetShootUp = 72;
this.LgGetShootUpBas = 44;
this.DistBallY = -59;
this.DistXBoom = 64;
this.DistYBoom = 56;
this.LgCatchBoomY = 73;
this.WallHitBloc = 2;
this.SpdYNow = 0;
this.SpdYUp = 2;
this.SpdYMax = 20;
this.SpdYFall = 5;
this.SpdStartJump = -20;
this.SolOut = 2;
this.SolHitMin = 5;
this.MaxSol = 2;
this.HitGrd = false;
this.SolForJump = 6;
this.DistYFall = 0;
this.DistYLand = 20;
this.DistHitFall = 250;
this.CanHit = false;
this.CanBeHit = true;
this.AutoDest = 0;
this.BoomShoot = false;
this.InPause = false;
this.FrWalkNow = 1;
this.FrJump = 6;
this.FrFall = 14;
this.FrLand = 5;
this.FrStartPenche = 5;
this.FrFinPenche = 3;
this.FrAttack1 = 3;
this.FrFinAttack1 = 3;
this.FrAttack2 = 11;
this.FrGetHit = 11;
this.FrBoomTir = 9;
this.FrFinBoom = 6;
this.FrDie = 48;
this.FrDead = 65;
}
function ObjPersBall(Nom, PosX, PosY, Dir) {
this.Nom = Nom;
this.Etat = "Hide";
this.EtatOld = "Idle";
this.Dir = Dir;
this.OldDir = "D";
this.PosX = PosX;
this.PosY = PosY;
this.TrueX = PosX;
this.TrueY = PosY;
this.LgOutG = 10;
this.LgOutD = 510;
this.LgOutUp = 10;
this.LgOutDw = 380;
this.CanBeKill = false;
if (Dir eq "D") {
this.SpdX = 20;
} else {
this.SpdX = -20;
}
this.InPause = false;
this.FrHit = 9;
this.FrHide = 1;
}
function ObjBoom(Nom, PosX, PosY) {
this.Nom = Nom;
this.Etat = "PasLa";
this.EtatOld = "PasLa";
this.Dir = "D";
this.OldDir = "D";
this.PosX = PosX;
this.PosY = PosY;
this.TrueX = PosX;
this.TrueY = PosY;
this.SpdXBase = 20;
this.SpdXNow = 0;
this.SpdYBase = 2;
this.LgStopY = 10;
this.SpdXDw = 2;
this.InPause = false;
}
function ObjFus(Nom, PosX, PosY, Dir, Moving) {
this.Nom = Nom;
this.PosX = PosX;
this.PosY = PosY;
this.TrueX = PosX;
this.TrueY = PosY;
this.Etat = "Sleep";
this.EtatOld = "Idle";
this.Dir = Dir;
this.OldDir = Dir;
this.LgOutG = 130;
this.LgOutD = 630;
this.LgOutUp = 4;
this.LgOutDw = 408;
this.GetHitG = 80;
this.GetHitD = 80;
this.GetHitUp = 64;
this.GetHitDw = 16;
this.GetFireG = 32;
this.GetFireD = 32;
this.GetFireUp = 72;
this.GetFireDw = 4;
this.CheckMinX = 150;
this.CheckMinY = 60;
this.CheckOutMinX = 200;
this.LgAttackX = 400;
this.LgAttackUp = 60;
this.LgAttackDw = 60;
this.LgHitX = 32;
this.FrGetHit = 10;
this.FrDie = 54;
this.FrStartAttack = 6;
this.FrFinAttack = 14;
this.FrIdle = 45;
this.Life = 4;
this.Moving = Moving;
this.DistBallY = -22;
this.SpdXBase = 6;
this.RatioRun = 2;
this.MoveX = 0;
this.MoveY = 0;
this.SolOut = 2;
this.SolHitMin = 3;
this.MaxSol = 2;
this.HitGrd = false;
this.SpdYMax = 20;
this.SpdYNow = 0;
this.SpdYUp = 2;
this.InPause = false;
this.DegatShoot = 10;
this.DegatTouch = 25;
}
function ObjShred(Nom, PosX, PosY, Dir) {
this.Nom = Nom;
this.PosX = PosX;
this.PosY = PosY;
this.TrueX = PosX;
this.TrueY = PosY;
this.Etat = "Sleep";
this.EtatOld = "Idle";
this.Dir = Dir;
this.OldDir = Dir;
this.LgOutG = 100;
this.LgOutD = 700;
this.LgOutUp = 4;
this.LgOutDw = 422;
this.GetHitG = 68;
this.GetHitD = 68;
this.GetHitUp = 12;
this.GetHitDw = 58;
this.GetFireG = 26;
this.GetFireD = 26;
this.GetFireUp = 40;
this.GetFireDw = 4;
this.LgAttackX = 48;
this.LgAttackUp = 38;
this.LgAttackDw = 26;
this.LgCheckPersX = 180;
this.LgHitX = 48;
this.LgHitUp = 35;
this.LgHitDw = 60;
this.FrGetHit1 = 6;
this.FrGetHit2 = 24;
this.FrDie = 56;
this.FrIdle = 34;
this.FrAttack1 = 4;
this.FrAttack2 = 8;
this.FrFinAttack = 12;
this.Life = 4;
this.SpdXBase = 7;
this.SpdXGetHit = 20;
this.SpdXFall = 0;
this.MoveX = 0;
this.MoveY = 0;
this.WallHitBloc = 2;
this.SolOut = 2;
this.SolHitMin = 3;
this.MaxSol = 2;
this.HitGrd = false;
this.SpdYMax = 20;
this.SpdYNow = 0;
this.SpdYUp = 2;
this.SpdYGetHit = -15;
this.Degat = 15;
this.InPause = false;
}
function ObjGarde(Nom, PosX, PosY, Dir, LgSeeUp, LgSeeX, LgSeeDw) {
this.Nom = Nom;
this.PosX = PosX;
this.PosY = PosY;
this.Etat = "Sleep";
this.EtatOld = "Idle";
this.Dir = Dir;
this.OldDir = Dir;
this.LgOutG = 95;
this.LgOutD = 595;
this.LgSeeX = LgSeeX;
this.LgSeeUp = LgSeeUp;
this.LgSeeDw = LgSeeDw;
this.LgTurnX = 100;
this.InPause = false;
this.FrBloc = 21;
this.FrFinBloc = 36;
}
function ObjLife(Nom, PosX, PosY) {
this.Nom = Nom;
this.PosX = PosX;
this.PosY = PosY;
this.Etat = "Sleep";
this.EtatOld = "Idle";
this.LgOutG = 25;
this.LgOutD = 525;
this.LgOutUp = 25;
this.LgOutDw = 395;
this.LgHitX = 26;
this.LgHitUp = 13;
this.LgHitDw = 70;
this.InPause = false;
this.FrGet = 20;
}
function ObjHealth(Nom, PosX, PosY) {
this.Nom = Nom;
this.PosX = PosX;
this.PosY = PosY;
this.Etat = "Entre";
this.EtatOld = "Entre";
this.LgOutG = 25;
this.LgOutD = 525;
this.LgOutUp = 25;
this.LgOutDw = 395;
this.LgHitX = 13;
this.LgHitUp = 13;
this.LgHitDw = 70;
this.FrEntre = 18;
this.FrGet = 22;
this.InPause = false;
this.Getted = false;
this.BonusHealth = 25;
}
function ObjFusBall(Nom, PosX, PosY, Dir) {
this.Nom = Nom;
this.Etat = "Hide";
this.EtatOld = "Idle";
this.Dir = Dir;
this.OldDir = "D";
this.PosX = PosX;
this.PosY = PosY;
this.TrueX = PosX;
this.TrueY = PosY;
this.LgOutG = 10;
this.LgOutD = 510;
this.LgOutUp = 10;
this.LgOutDw = 380;
this.CanBeKill = false;
if (Dir eq "D") {
this.SpdX = 15;
} else {
this.SpdX = -15;
}
this.FrHit = 9;
this.FrHide = 1;
this.InPause = false;
this.Degat = 15;
}
function ObjBg(PosX, PosY) {
this.Nom = "Bg";
this.PosX = PosX;
this.PosY = PosY;
this.MoveX = 0;
this.MoveY = 0;
this.InvPosX = PosX * -1;
this.InvPosY = PosY * -1;
this.DeadX = PosX;
this.DeadY = PosY;
this.MaxDw = 100;
this.MaxUp = 0;
this.MaxG = -5500;
this.MaxD = 0;
this.MaxYDie = 470;
this.CenterX = 250;
this.CenterY = 185;
this.SpdXD = 15;
this.SpdXG = -15;
this.SpdYDw = 20;
this.SpdYUp = -20;
this.InPause = false;
}
function ObjBmpZone(Nom, PosX, PosY, LgOutD, LgOutG, LgOutUp, LgOutDw, BmpNom) {
this.Nom = Nom;
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = LgOutD;
this.LgOutG = LgOutG;
this.LgOutUp = LgOutUp;
this.LgOutDw = LgOutDw;
this.PosX = PosX;
this.PosY = PosY;
this.FlagCheckIn = true;
this.BmpNom = BmpNom;
}
function ObjMonsterZone(Nom, PosX, PosY) {
this.Nom = Nom;
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 500;
this.LgOutG = 0;
this.PosX = PosX;
this.PosY = PosY;
}
function ObjWinZone(PosX, PosY) {
this.Nom = "WinZone";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 500;
this.LgOutG = 0;
this.PosX = PosX;
this.PosY = PosY;
}
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 = 385;
this.LgOnX = 20;
this.LgOnY = 20;
this.PosX = PosX;
this.PosY = PosY;
this.FlagUse = false;
this.InPause = false;
this.FrBaisse = 13;
}
function ObjZone1(PosX, PosY) {
this.Nom = "Zone1";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 500;
this.LgOutG = 0;
this.LgOutUp = 0;
this.LgOutDw = 540;
this.PosX = PosX;
this.PosY = PosY;
this.FlagCheckIn = true;
}
function ObjZone2(PosX, PosY) {
this.Nom = "Zone2";
this.Etat = "PasLa";
this.EtatOld = "PasLa";
this.LgOutD = 500;
this.LgOutG = 0;
this.LgOutUp = 0;
this.LgOutDw = 540;
this.PosX = PosX;
this.PosY = PosY;
this.DestX = 2238;
this.DestY = 213;
this.GoX = 2100;
this.DirExit = "G";
}
function ObjZone3(PosX, PosY) {
this.Nom = "Zone3";
this.Etat = "PasLa";
this.EtatOld = "PasLa";
this.LgOutD = 500;
this.LgOutG = 0;
this.LgOutUp = 0;
this.LgOutDw = 540;
this.PosX = PosX;
this.PosY = PosY;
this.DestX = 2250;
this.DestY = 157;
this.GoX = 2153;
this.DirExit = "G";
}
function ObjZone4(PosX, PosY) {
this.Nom = "Zone4";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 500;
this.LgOutG = 0;
this.LgOutUp = 0;
this.LgOutDw = 540;
this.PosX = PosX;
this.PosY = PosY;
this.FlagCheckIn = true;
}
function ObjZone5(PosX, PosY) {
this.Nom = "Zone5";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 500;
this.LgOutG = 0;
this.LgOutUp = 0;
this.LgOutDw = 540;
this.PosX = PosX;
this.PosY = PosY;
this.FlagCheckIn = true;
}
function ObjDoor1(PosX, PosY) {
this.Nom = "Door1";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 515;
this.LgOutG = 180;
this.PosX = PosX;
this.PosY = PosY;
this.FlagOpen = false;
this.InPause = false;
this.FrOuvre = 24;
}
function ObjDoor2(PosX, PosY) {
this.Nom = "Door2";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 515;
this.PosX = PosX;
this.PosY = PosY;
this.InPause = false;
this.FlagOpen = false;
}
function ObjPont(PosX, PosY) {
this.Nom = "Pont";
this.NomFront = "PontFront";
this.Etat = "Sleep";
this.EtatOld = "Sleep";
this.LgOutD = 647;
this.LgOutG = 147;
this.LgOnX = 77;
this.LgOnY = 55;
this.PosX = PosX;
this.PosY = PosY;
this.FlagBreak = false;
this.InPause = false;
this.FrShake = 22;
this.FrFall = 19;
}
this.KeyListener = new Object();
this.KeyListener.Up = false;
this.KeyListener.UpRelease = true;
this.KeyListener.Dw = false;
this.KeyListener.L = false;
this.KeyListener.R = false;
this.KeyListener.X = false;
this.KeyListener.Z = false;
this.KeyListener.Sp = false;
this.KeyListener.P = false;
this.KeyListener.onKeyUp = function () {
switch (Key.getCode()) {
case 38 :
this.UpRelease = true;
this.Up = false;
break;
case 40 :
this.Dw = false;
break;
case 37 :
this.L = false;
break;
case 39 :
this.R = false;
break;
case 32 :
this.Sp = false;
break;
case 88 :
this.X = false;
break;
case 90 :
this.Z = false;
break;
case 77 :
this.P = false;
}
};
this.KeyListener.onKeyDown = function () {
switch (Key.getCode()) {
case 38 :
this.Up = true;
break;
case 40 :
this.Dw = true;
break;
case 37 :
this.L = true;
break;
case 39 :
this.R = true;
break;
case 32 :
this.Sp = true;
break;
case 88 :
this.X = true;
break;
case 90 :
this.Z = true;
break;
case 77 :
this.P = true;
}
};
Key.addListener(this.KeyListener);
Selection.setFocus(_parent._parent.FocusBtn);
G_CurrentFocus = Selection.getFocus();
this.G_TabPersBall = new Array();
this.G_TabFusBall = new Array();
this.G_TabFus = new Array();
this.G_TabShred = new Array();
this.G_TabGarde = new Array();
this.G_TabLife = new Array();
this.G_TabHealth = new Array();
this.G_TabBmpZone = new Array();
this.G_TabMonsterZone = new Array();
this.G_TabSwitch = new Array();
this.G_NextPersBall = 1;
this.G_NextPersBallDepth = 10;
this.G_NextFusBall = 1;
this.G_NextFusBallDepth = 10;
this.G_NextHealth = 1;
this.G_NextHealthDepth = 10;
this.G_Pause = false;
this.G_PRealese = true;
this.G_Resume = false;
this.GameQuality = "Med";
G_CheckPause = function () {
if (((G_PRealese == true) and (Pers.Etat ne "Dead")) and (_parent._parent.BlocMessage._currentframe == 1)) {
if ((KeyListener.P == true) and (G_Pause == false)) {
if (G_CurrentFocus == null) {
KeyListener.P = false;
}
Music.VolDest = 20;
Music.Etat = "FadeOut";
G_Pause = true;
G_PRealese = false;
_parent.ControlBall.stop();
_parent.ControlBeHit.stop();
_parent._parent.MoviePause.gotoAndStop(2);
} else if ((((KeyListener.P == true) or (G_Resume == true)) and (G_Pause == true)) and (_parent._parent.MoviePause._currentframe < 3)) {
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;
KeyListener.P = false;
Music.VolDest = 70;
Music.Etat = "FadeIn";
G_Pause = false;
G_PRealese = false;
G_Resume = false;
if (_parent.ControlBall._currentframe != 1) {
_parent.ControlBall.play();
}
if (_parent.ControlBeHit._currentframe != 1) {
_parent.ControlBeHit.play();
}
_parent._parent.MoviePause.gotoAndStop(1);
}
}
if (KeyListener.P == false) {
G_PRealese = true;
}
};
CreerMusic = function () {
this.Music = new ObjMusic();
};
ObjMusic.prototype.Part = function () {
with (this) {
Etat = "FadeIn";
}
};
ObjMusic.prototype.FadeIn = function () {
with (this) {
var CurVol = _parent._parent.ObjMusic.getVolume();
Volume = CurVol + SpdFade;
if (Volume >= VolDest) {
Volume = VolDest;
_parent._parent.ObjMusic.setVolume(Volume);
Etat = "Joue";
} else {
_parent._parent.ObjMusic.setVolume(Volume);
}
}
};
ObjMusic.prototype.Joue = function () {
with (this) {
}
};
ObjMusic.prototype.FadeOut = function () {
with (this) {
var CurVol = _parent._parent.ObjMusic.getVolume();
Volume = CurVol - SpdFade;
if (Volume <= VolDest) {
Volume = VolDest;
_parent._parent.ObjMusic.setVolume(VolDest);
if (VolDest == 0) {
Etat = "Arret";
} else {
Etat = "Joue";
}
} else {
_parent._parent.ObjMusic.setVolume(Volume);
}
}
};
ObjMusic.prototype.Arret = function () {
with (this) {
}
};
ObjMusic.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent._parent.Sons[Nom].gotoAndStop(NewAction);
}
};
ObjMusic.prototype.Actions = function () {
with (this) {
this[Etat]();
if (_root.MusJoue == false) {
_parent._parent.ObjMusic.setVolume(0);
}
}
};
CreerMusic();
CreerPers = function (PosX, PosY) {
this.Pers = new ObjPers(PosX, PosY);
};
ObjPers.prototype.Idle = function () {
with (this) {
KeepDeadPos = true;
if (Health > 0) {
SetSpdX();
SetMoveX();
CheckWall();
CheckHitGrd();
CheckAttack();
if (UseSuit == true) {
CheckTir();
} else {
CheckTirBoom();
}
CheckPenche();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckDie();
} else {
SetSpdX();
SetMoveX();
CheckWall();
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
}
};
ObjPers.prototype.Bloc = function () {
if ((KeyListener.Sp == true) and (_parent._parent.BlocMessage._currentframe == 2)) {
_parent._parent.gotoAndStop("Restart");
}
};
ObjPers.prototype.IdleTir = function () {
with (this) {
KeepDeadPos = true;
SetSpdXTir();
SetMoveX();
CheckWall();
CheckHitGrd();
CheckAttack();
CheckIdleFinTir();
CheckPenche();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
};
ObjPers.prototype.Walk = function () {
with (this) {
SetSpdX();
SetMoveX();
CheckWall();
CheckHitGrd();
CheckAttack();
if (UseSuit == true) {
CheckTir();
} else {
CheckTirBoom();
}
CheckPenche();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
};
ObjPers.prototype.WalkTir = function () {
with (this) {
SetSpdXTir();
SetMoveX();
CheckWall();
CheckHitGrd();
CheckAttack();
CheckWalkFinTir();
CheckPenche();
CheckJump();
CheckSol();
CheckFall();
MovePers();
CheckDie();
}
};
ObjPers.prototype.WalkAuto = function () {
with (this) {
if (Dir eq "D") {
SpdXNow = SpdXBase;
} else {
SpdXNow = SpdXBase * -1;
}
SetMoveX();
CheckHitGrd();
CheckSol();
CheckFall();
MovePers();
if ((Pers.PosX >= (AutoDest - SpdXBase)) and (Pers.PosX <= (AutoDest + SpdXBase))) {
Etat = "Idle";
}
}
};
ObjPers.prototype.Jump = function () {
with (this) {
SetSpdXJump();
SetMoveX();
if (UseSuit == true) {
CheckTir();
}
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if ((_parent.Pers.Obj.Etat._currentframe >= FrJump) or (SpdYNow >= 0)) {
Etat = "FinJump";
}
}
};
ObjPers.prototype.FinJump = function () {
with (this) {
SetSpdXJump();
SetMoveX();
if (UseSuit == true) {
CheckTir();
}
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if (HitGrd == true) {
Etat = "Land";
} else if (SpdYNow >= 0) {
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.Fall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
if (UseSuit == true) {
CheckTir();
}
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if ((_parent.Pers.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();
}
};
ObjPers.prototype.FinFall = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if (HitGrd == true) {
if (DistYFall >= DistYLand) {
Etat = "Land";
} else {
Etat = "Idle";
}
}
CheckHole();
}
};
ObjPers.prototype.JumpTir = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckJumpFinTir();
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if (SpdYNow >= 0) {
if (HitGrd == true) {
Etat = "Land";
} else {
Etat = "FallTir";
DistYFall = 0;
}
}
}
};
ObjPers.prototype.FallTir = function () {
with (this) {
SetSpdXJump();
SetMoveX();
CheckFallFinTir();
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if ((SpdYNow >= 0) and (HitGrd == true)) {
SpdXNow = 0;
MoveX = 0;
if (DistYFall >= DistYLand) {
Etat = "Land";
} else {
Etat = "IdleTir";
}
}
CheckHole();
}
};
ObjPers.prototype.Land = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrLand) {
if (DistYFall >= DistHitFall) {
Health = Health - int((DistYFall - DistHitFall) / 2);
_parent._parent.Health.gotoAndStop(100 - Health);
DistYFall = 0;
}
if (Health <= 0) {
Etat = "Die";
} else {
Etat = "Idle";
}
}
}
};
ObjPers.prototype.StartPenche = function () {
with (this) {
CheckLeve();
CheckJump();
if (_parent.Pers.Obj.Etat._currentframe >= FrStartPenche) {
Etat = "Penche";
}
CheckDie();
}
};
ObjPers.prototype.Penche = function () {
with (this) {
CheckLeve();
CheckJump();
}
};
ObjPers.prototype.FinPenche = function () {
with (this) {
CheckJump();
if (_parent.Pers.Obj.Etat._currentframe >= FrFinPenche) {
Etat = "Idle";
}
CheckDie();
}
};
ObjPers.prototype.Attack1 = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrAttack1) {
CanHit = true;
Etat = "FinAttack1";
}
CheckDie();
}
};
ObjPers.prototype.FinAttack1 = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrFinAttack1) {
CanHit = false;
Etat = "Attack2";
}
CheckDie();
}
};
ObjPers.prototype.Attack2 = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrAttack2) {
CanHit = false;
Etat = "Idle";
}
CheckDie();
}
};
ObjPers.prototype.BoomTir = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrBoomTir) {
if (Dir eq "D") {
_parent.Boom._x = _parent.Pers._x + DistXBoom;
_parent.Boom._y = _parent.Pers._y - DistYBoom;
Boom.Dir = "D";
} else {
_parent.Boom._x = _parent.Pers._x - DistXBoom;
_parent.Boom._y = _parent.Pers._y - DistYBoom;
Boom.Dir = "G";
}
Boom.PosX = _parent.Boom._x;
Boom.PosY = _parent.Boom._y;
Boom.SpdXNow = Boom.SpdXBase;
Boom.Etat = "Idle";
G_TabPersBall.push("Boom");
BoomShoot = true;
Etat = "FinBoomTir";
}
CheckDie();
}
};
ObjPers.prototype.FinBoomTir = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrFinBoomTir) {
Etat = "Idle";
}
CheckDie();
}
};
ObjPers.prototype.GetHit = function () {
with (this) {
CanHit = false;
if (Degat != 0) {
Health = Health - Degat;
_parent._parent.Health.gotoAndStop(100 - Health);
Degat = 0;
}
if (HitGrd == true) {
if (DistYFall >= DistHitFall) {
Health = Health - int((DistYFall - DistHitFall) / 2);
_parent._parent.Health.gotoAndStop(100 - Health);
DistYFall = 0;
}
SpdXNow = 0;
} else {
SetSpdXJump();
}
SetMoveX();
CheckWall();
CheckHitGrd();
CheckSol();
MovePers();
if (_parent.Pers.Obj.Etat._currentframe >= FrGetHit) {
if (Health > 0) {
_parent.ControlBeHit.gotoAndPlay(2);
}
Etat = "Idle";
}
CheckDie();
}
};
ObjPers.prototype.Die = function () {
with (this) {
CanBeHit = false;
if (_parent.Pers.Obj.Etat._currentframe >= FrDie) {
if (BoomShoot == true) {
_parent.Boom._x = _parent.Pers._x;
_parent.Boom._y = _parent.Pers._y - 10;
Boom.PosX = _parent.Boom._x;
Boom.PosY = _parent.Boom._y;
}
Etat = "Dead";
_parent._parent.gotoAndStop("CloseLevel");
}
}
};
ObjPers.prototype.Dead = function () {
with (this) {
if (_parent.Pers.Obj.Etat._currentframe >= FrDead) {
Life = Life - 1;
if (Life > 0) {
_parent.Pers._x = DeadX;
_parent.Pers._y = DeadY;
PosX = DeadX;
PosY = DeadY;
SetTruePos();
_parent._x = Bg.DeadX;
_parent._y = Bg.DeadY;
Bg.PosX = Bg.DeadX;
Bg.PosY = Bg.DeadY;
Bg.InvPosY = Bg.PosY * -1;
Bg.InvPosY = Bg.PosY * -1;
Etat = "Idle";
SpdXNow = 0;
SpdYNow = 0;
MoveX = 0;
MoveY = 0;
Health = 100;
_parent._parent.Health.gotoAndStop(1);
_parent._parent.NbLife.TxtNbLife = Life - 1;
_parent.ControlBeHit.gotoAndPlay("AfterDead");
_parent._parent.gotoAndStop("Game");
} else {
_parent._parent.gotoAndStop("GameOver");
}
}
}
};
ObjPers.prototype.SetSpdX = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Walk";
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
Etat = "Idle";
SpdXNow = 0;
} else {
Etat = "Walk";
SpdXNow = SpdXBase * -1;
}
} else {
Etat = "Idle";
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXTir = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
Etat = "IdleTir";
SpdXNow = 0;
} else {
Etat = "WalkTir";
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
Etat = "IdleTir";
SpdXNow = 0;
} else {
Etat = "WalkTir";
SpdXNow = SpdXBase * -1;
}
} else {
Etat = "IdleTir";
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetSpdXJump = function () {
with (this) {
if (KeyListener.R == true) {
Dir = "D";
if (_parent.Collider.Wall.hitTest(TrueX + WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase;
}
} else if (KeyListener.L == true) {
Dir = "G";
if (_parent.Collider.Wall.hitTest(TrueX - WallHitBloc, TrueY, true)) {
SpdXNow = 0;
} else {
SpdXNow = SpdXBase * -1;
}
} else {
SpdXNow = 0;
}
if (Dir ne DirOld) {
SpdXNow = 0;
}
}
};
ObjPers.prototype.SetMoveX = function () {
with (this) {
MoveX = SpdXNow;
}
};
ObjPers.prototype.CheckWall = function () {
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(TrueX + WallStop, TrueY, true)) {
MoveX = 0;
} else if (_parent.Collider.Wall.hitTest(TrueX + WallHit1, TrueY, true)) {
MoveX = WallHitBloc;
} else if (_parent.Collider.Wall.hitTest(TrueX + WallHit2, TrueY, true)) {
MoveX = WallHit1;
} else if (_parent.Collider.Wall.hitTest(TrueX + MoveX, TrueY, true)) {
MoveX = WallHit2;
}
}
}
};
ObjPers.prototype.CheckJump = function () {
with (this) {
if ((((KeyListener.Up == true) and (HitGrd == true)) and (KeyListener.UpRelease == true)) and (!_parent.Collider.NoJump.hitTest(TrueX, TrueY, true))) {
KeyListener.UpRelease = false;
KeepDeadPos = false;
Etat = "Jump";
SpdYNow = SpdStartJump;
}
}
};
ObjPers.prototype.CheckPenche = function () {
with (this) {
if (KeyListener.Dw == true) {
Etat = "StartPenche";
SpdXNow = 0;
MoveX = 0;
}
}
};
ObjPers.prototype.CheckLeve = function () {
with (this) {
if (KeyListener.Dw == false) {
Etat = "FinPenche";
}
}
};
ObjPers.prototype.CheckAttack = function () {
with (this) {
if (KeyListener.X == true) {
Etat = "Attack1";
}
}
};
ObjPers.prototype.CheckTir = function () {
with (this) {
if (KeyListener.Z == true) {
if (_parent.ControlBall._currentframe == 1) {
_parent.ControlBall.play();
if (Etat eq "Idle") {
Etat = "IdleTir";
} else if (Etat eq "Walk") {
FrWalkNow = _parent.Pers.Obj.Etat._currentframe + 1;
Etat = "WalkTir";
} else if (Etat eq "Fall") {
Etat = "FallTir";
} else {
Etat = "JumpTir";
}
}
}
}
};
ObjPers.prototype.CheckTirBoom = function () {
with (this) {
if ((KeyListener.Z == true) and (BoomShoot == false)) {
SpdXNow = 0;
MoveX = 0;
Etat = "BoomTir";
}
}
};
ObjPers.prototype.CheckWalkFinTir = function () {
with (this) {
if (KeyListener.Z == false) {
FrWalkNow = _parent.Pers.Obj.Etat._currentframe + 1;
Etat = "Walk";
} else if (_parent.ControlBall._currentframe == 1) {
_parent.ControlBall.play();
}
}
};
ObjPers.prototype.CheckIdleFinTir = function () {
with (this) {
if (KeyListener.Z == false) {
Etat = "Idle";
} else if (_parent.ControlBall._currentframe == 1) {
_parent.ControlBall.play();
}
}
};
ObjPers.prototype.CheckJumpFinTir = function () {
with (this) {
if (KeyListener.Z == false) {
Etat = "Jump";
} else if (_parent.ControlBall._currentframe == 1) {
_parent.ControlBall.play();
}
}
};
ObjPers.prototype.CheckFallFinTir = function () {
with (this) {
if (KeyListener.Z == false) {
Etat = "Fall";
} else if (_parent.ControlBall._currentframe == 1) {
_parent.ControlBall.play();
}
}
};
ObjPers.prototype.CheckFall = function () {
with (this) {
if (SpdYNow >= SpdYFall) {
KeepDeadPos = false;
Etat = "Fall";
DistYFall = 0;
}
}
};
ObjPers.prototype.CheckHole = function () {
with (this) {
if (TrueY >= Bg.MaxYDie) {
Health = 0;
_parent._parent.Health.gotoAndStop(100);
CanBeHit = false;
Etat = "Die";
}
}
};
ObjPers.prototype.CheckDie = function () {
with (this) {
if ((Health <= 0) and (HitGrd == true)) {
CanBeHit = false;
Etat = "Die";
}
}
};
ObjPers.prototype.MovePers = function () {
with (this) {
if (((HitGrd == true) and (KeepDeadPos == true)) and (!_parent.Collider.NoPosDead.hitTest(TrueX, TrueY, true))) {
DeadX = PosX;
DeadY = PosY;
Bg.DeadX = Bg.PosX;
Bg.DeadY = Bg.PosY;
} else if ((((HitGrd == true) and _parent.Collider.NoPosDead.hitTest(TrueX, TrueY, true)) and (PosX >= 4149)) and (PosX <= 4420)) {
DeadX = 4425;
DeadY = 164;
Bg.DeadX = Bg.PosX;
Bg.DeadY = Bg.PosY;
}
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;
}
};
ObjPers.prototype.CheckHitGrd = function () {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + MaxSol, true)) {
HitGrd = true;
} else {
HitGrd = false;
}
}
};
ObjPers.prototype.CheckSol = function () {
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;
}
if (MoveY > 0) {
DistYFall = DistYFall + MoveY;
}
}
};
ObjPers.prototype.ChangeEtat = function (NewAction) {
with (this) {
if (((EtatOld eq "Walk") and (Etat eq "WalkTir")) or ((EtatOld eq "WalkTir") and (Etat eq "Walk"))) {
var SetFrWalk = true;
}
EtatOld = Etat;
Etat = NewAction;
_parent.Pers.Obj.gotoAndStop(NewAction);
if (SetFrWalk == true) {
if (FrWalkNow >= 20) {
FrWalkNow = 1;
}
_parent.Pers.Obj.Etat.gotoAndPlay(FrWalkNow);
}
}
};
ObjPers.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent.Pers.gotoAndStop(Dir);
}
};
ObjPers.prototype.Actions = function () {
with (this) {
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();
this[Etat]();
}
}
};
CreerPersBall = function () {
var _local3 = "Ball" + G_NextPersBall;
G_NextPersBall = G_NextPersBall + 1;
if (G_NextPersBall > 50) {
G_NextPersBall = 1;
}
if (this[_local3] == null) {
var _local7 = G_NextPersBallDepth;
G_NextPersBallDepth++;
duplicateMovieClip (_parent.PersBall.PersBallClone, _local3, _local7);
var _local6 = Pers.Dir;
_parent.PersBall[_local3].gotoAndStop(_local6);
var _local5 = Pers.PosX;
var _local4 = Pers.PosY + Pers.DistBallY;
_parent.PersBall[_local3]._x = _local5;
_parent.PersBall[_local3]._y = _local4;
this[_local3] = new ObjPersBall(_local3, _local5, _local4, _local6);
G_TabPersBall.push(_local3);
}
};
ObjPersBall.prototype.Hide = function () {
with (this) {
_parent.PersBall[Nom]._x = PosX + SpdX;
PosX = PosX + SpdX;
SetTruePos();
if (_parent.PersBall[Nom].Obj.Etat._currentframe >= FrHide) {
Etat = "Move";
}
CheckWall();
CheckOut();
}
};
ObjPersBall.prototype.Move = function () {
with (this) {
_parent.PersBall[Nom]._x = PosX + SpdX;
PosX = PosX + SpdX;
SetTruePos();
CheckWall();
CheckOut();
}
};
ObjPersBall.prototype.Hit = function () {
with (this) {
CheckOut();
if (_parent.PersBall[Nom].Obj.Etat._currentframe >= FrHit) {
CanBeKill = true;
}
}
};
ObjPersBall.prototype.KillBall = function () {
with (this) {
G_TabPersBall.splice(PersBallI, 1);
PersBallI = PersBallI - 1;
delete _parent.Control[Nom];
_parent.PersBall[Nom].removeMovieClip();
}
};
ObjPersBall.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
}
};
ObjPersBall.prototype.CheckWall = function () {
with (this) {
if (_parent.Collider.Wall.hitTest(TrueX, TrueY, true)) {
Etat = "Hit";
}
}
};
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.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent.PersBall[Nom].Obj.gotoAndStop(NewAction);
}
};
ObjPersBall.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]();
CheckKill();
}
}
};
CreerBoom = function (Nom, PosX, PosY) {
if (this[Nom] == null) {
this[Nom] = new ObjBoom(Nom, PosX, PosY);
}
};
ObjBoom.prototype.PasLa = function () {
};
ObjBoom.prototype.Idle = function () {
with (this) {
if (Dir eq "D") {
MoveX = SpdXNow;
} else {
MoveX = -1 * SpdXNow;
}
if (SpdXNow < 5) {
var DistY = (Pers.DistYBoom / 3);
} else {
var DistY = Pers.DistYBoom;
}
if (PosY < ((Pers.PosY - DistY) - LgStopY)) {
MoveY = SpdYBase;
} else if (PosY > ((Pers.PosY - DistY) + LgStopY)) {
MoveY = -1 * SpdYBase;
} else {
MoveY = 0;
}
_parent[Nom]._x = PosX + MoveX;
_parent[Nom]._y = PosY + MoveY;
PosX = _parent[Nom]._x;
PosY = _parent[Nom]._y;
SpdXNow = SpdXNow - SpdXDw;
SetTruePos();
CheckReturn();
}
};
ObjBoom.prototype.CheckReturn = function () {
with (this) {
if (Dir eq "D") {
if (PosX <= Pers.PosX) {
if ((PosY >= (Pers.PosY - Pers.LgCatchBoomY)) and (PosY <= Pers.PosY)) {
Etat = "PasLa";
EtatOld = "PasLa";
_parent.Boom.Obj.gotoAndStop("PasLa");
G_TabPersBall.splice(PersBallI, 1);
PersBallI = PersBallI - 1;
Pers.BoomShoot = false;
} else {
SpdXNow = SpdXBase;
Dir = "G";
}
}
} else if (PosX >= Pers.PosX) {
if ((PosY >= (Pers.PosY - Pers.LgCatchBoomY)) and (PosY <= Pers.PosY)) {
Etat = "PasLa";
EtatOld = "PasLa";
_parent.Boom.Obj.gotoAndStop("PasLa");
G_TabPersBall.splice(PersBallI, 1);
PersBallI = PersBallI - 1;
Pers.BoomShoot = false;
} else {
SpdXNow = SpdXBase;
Dir = "D";
}
}
}
};
ObjBoom.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
}
};
ObjBoom.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].Obj.gotoAndStop(NewAction);
}
};
ObjBoom.prototype.Actions = function () {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
_parent[Nom].Obj.Etat.stop();
}
} else {
if (InPause == true) {
InPause = false;
_parent[Nom].Obj.Etat.play();
}
this[Etat]();
}
}
};
CreerFus = function (Nom, PosX, PosY, Dir, Moving) {
if (this[Nom] == null) {
this[Nom] = new ObjFus(Nom, PosX, PosY, Dir, Moving);
G_TabFus.push(Nom);
}
};
ObjFus.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjFus.prototype.Idle = function () {
with (this) {
CheckAttack();
CheckDistMin();
CheckGetHit();
CheckGetFire();
CheckTouch();
if (((_parent[Nom].Obj.Etat._currentframe >= FrIdle) and (random(100) > 50)) and (Moving == true)) {
Etat = "Walk";
}
CheckSleep();
}
};
ObjFus.prototype.Walk = function () {
with (this) {
SetMoveX();
CheckTurn();
CheckHitGrd();
CheckSol();
CheckAttack();
CheckDistMin();
CheckGetHit();
CheckGetFire();
CheckTouch();
MoveFus();
CheckSleep();
}
};
ObjFus.prototype.Run = function () {
with (this) {
SetMoveX();
CheckTurn();
CheckHitGrd();
CheckSol();
CheckOutMin();
CheckAttack();
CheckGetHit();
CheckGetFire();
CheckTouch();
MoveFus();
CheckSleep();
}
};
ObjFus.prototype.GetHit = function () {
with (this) {
CheckGetFire();
CheckTouch();
if (_parent[Nom].Obj.Etat._currentframe >= FrGetHit) {
if (Pers.PosX >= PosX) {
Dir = "D";
} else {
Dir = "G";
}
Etat = "Idle";
}
CheckSleep();
}
};
ObjFus.prototype.StartAttack = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrStartAttack) {
if (((Pers.PosX >= (PosX - LgHitX)) and (Pers.PosX <= (PosX + LgHitX))) and (Pers.CanBeHit == true)) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
} else {
CreerFusBall(Nom);
}
Etat = "FinAttack";
}
CheckGetHit();
CheckGetFire();
CheckTouch();
}
};
ObjFus.prototype.FinAttack = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrFinAttack) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
CheckTouch();
}
};
ObjFus.prototype.Die = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrDie) {
if (random(100) > 70) {
CreerHealth(PosX, PosY);
}
Etat = "Dead";
}
}
};
ObjFus.prototype.Dead = function () {
with (this) {
G_TabFus.splice(FusI, 1);
FusI = FusI - 1;
}
};
ObjFus.prototype.CheckGetHit = function () {
with (this) {
if (((Pers.CanHit == true) and (Pers.PosY >= (PosY - GetHitUp))) and (Pers.PosY <= (PosY + GetHitDw))) {
if (((Pers.PosX <= PosX) and (Pers.PosX >= (PosX - GetHitG))) and (Pers.Dir eq "D")) {
if (Etat ne "GetHit") {
Dir = "G";
Life--;
if (Life > 0) {
Etat = "GetHit";
} else {
Etat = "Die";
}
}
} else if (((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + GetHitD))) and (Pers.Dir eq "G")) {
if (Etat ne "GetHit") {
Dir = "D";
Life--;
if (Life > 0) {
Etat = "GetHit";
} else {
Etat = "Die";
}
}
}
}
}
};
ObjFus.prototype.CheckGetFire = function () {
with (this) {
if (Pers.UseSuit == true) {
var NbPersBall = G_TabPersBall.length;
if (NbPersBall > 0) {
var i = 0;
while (i < NbPersBall) {
var BallX = _parent.Control[G_TabPersBall[i]].PosX;
var BallY = _parent.Control[G_TabPersBall[i]].PosY;
if ((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) {
if (Etat ne "GetHit") {
Life--;
if (Life > 0) {
Etat = "GetHit";
} else {
Etat = "Die";
}
}
_parent.Control[G_TabPersBall[i]].Etat = "Hit";
}
i++;
}
}
} else if (Pers.BoomShoot == true) {
var BallX = Boom.PosX;
var BallY = Boom.PosY;
if ((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) {
if (Etat ne "GetHit") {
Life--;
if (Life > 0) {
Etat = "GetHit";
} else {
Etat = "Die";
}
}
}
}
}
};
ObjFus.prototype.CheckDistMin = function () {
with (this) {
if (Pers.CanBeHit == true) {
if ((((Pers.PosX >= (PosX - CheckMinX)) and (Pers.PosX <= (PosX + CheckMinX))) and (Pers.PosY >= (PosY - CheckMinY))) and (Pers.PosY <= (PosY + CheckMinY))) {
if (Pers.PosX <= PosX) {
if (Moving == true) {
Dir = "D";
Etat = "Run";
} else {
Dir = "G";
Etat = "StartAttack";
}
} else if (Pers.PosX >= PosX) {
if (Moving == true) {
Dir = "G";
Etat = "Run";
} else {
Dir = "D";
Etat = "StartAttack";
}
}
}
}
}
};
ObjFus.prototype.CheckOutMin = function () {
with (this) {
if ((Pers.PosX < (PosX - CheckOutMinX)) or (Pers.PosX > (PosX + CheckOutMinX))) {
if (Pers.PosX <= PosX) {
Dir = "G";
Etat = "StartAttack";
} else if (Pers.PosX >= PosX) {
Dir = "D";
Etat = "StartAttack";
}
}
}
};
ObjFus.prototype.CheckAttack = function () {
with (this) {
if ((Pers.Etat ne "Die") and (Pers.Etat ne "Dead")) {
if ((Pers.PosY >= (PosY - LgAttackUp)) and (Pers.PosY <= (PosY + LgAttackDw))) {
if (((Dir eq "G") and (Pers.PosX >= (PosX - LgAttackX))) and (Pers.PosX <= PosX)) {
Etat = "StartAttack";
} else if (((Dir eq "D") and (Pers.PosX <= (PosX + LgAttackX))) and (Pers.PosX >= PosX)) {
Etat = "StartAttack";
}
}
}
}
};
ObjFus.prototype.CheckTouch = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true) and (Pers.CanBeHit == true)) {
Pers.Degat = DegatTouch;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
}
};
ObjFus.prototype.SetMoveX = function () {
with (this) {
if (Etat eq "Walk") {
MoveX = SpdXBase;
} else {
MoveX = SpdXBase * RatioRun;
}
if (Dir eq "G") {
MoveX = MoveX * -1;
}
}
};
ObjFus.prototype.CheckTurn = function () {
with (this) {
if (_parent.Collider.Turn.hitTest(TrueX + MoveX, TrueY, true)) {
MoveX = 0;
if (Dir eq "G") {
Dir = "D";
} else {
Dir = "G";
}
}
}
};
ObjFus.prototype.CheckSol = function () {
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;
}
}
};
ObjFus.prototype.CheckHitGrd = function () {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + MaxSol, true)) {
HitGrd = true;
} else {
HitGrd = false;
}
}
};
ObjFus.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
}
};
ObjFus.prototype.MoveFus = function () {
with (this) {
_parent[Nom]._x = _parent[Nom]._x + MoveX;
_parent[Nom]._y = _parent[Nom]._y + MoveY;
PosX = _parent[Nom]._x;
PosY = _parent[Nom]._y;
}
};
ObjFus.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) {
if ((random(100) > 50) and (Moving == true)) {
Etat = "Walk";
} else {
Etat = "Idle";
}
} else {
Etat = "Dead";
}
}
}
};
ObjFus.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";
}
}
};
ObjFus.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent[Nom].gotoAndStop(NewDir);
}
};
ObjFus.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].Obj.gotoAndStop(NewAction);
}
};
ObjFus.prototype.Actions = function () {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
_parent[Nom].Obj.Etat.stop();
}
} else {
if (InPause == true) {
InPause = false;
_parent[Nom].Obj.Etat.play();
}
SetTruePos();
this[Etat]();
}
}
};
CreerShred = function (Nom, PosX, PosY, Dir) {
if (this[Nom] == null) {
this[Nom] = new ObjShred(Nom, PosX, PosY, Dir);
G_TabShred.push(Nom);
}
};
ObjShred.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjShred.prototype.Idle = function () {
with (this) {
CheckPers();
CheckAttack();
CheckGetHit();
CheckGetFire();
CheckTouch();
if (((Etat eq "Idle") and (_parent[Nom].Obj.Etat._currentframe >= FrIdle)) and (random(100) > 50)) {
Etat = "Walk";
}
CheckSleep();
}
};
ObjShred.prototype.Walk = function () {
with (this) {
SetMoveX();
CheckTurn();
CheckPers();
CheckHitGrd();
CheckSol();
CheckAttack();
CheckGetHit();
CheckGetFire();
CheckTouch();
MoveShred();
CheckSleep();
}
};
ObjShred.prototype.GetHit1 = function () {
with (this) {
SetMoveXFall();
CheckWall();
CheckHitGrd();
CheckSol();
CheckGetFire();
CheckTouch();
MoveShred();
if (_parent[Nom].Obj.Etat._currentframe >= FrGetHit1) {
if (HitGrd == true) {
if (Life > 0) {
Etat = "GetHit2";
} else {
Etat = "Die";
}
} else {
Etat = "Fall";
}
}
}
};
ObjShred.prototype.Fall = function () {
with (this) {
SetMoveXFall();
CheckWall();
CheckHitGrd();
CheckSol();
CheckGetFire();
CheckTouch();
MoveShred();
if (HitGrd == true) {
if (Life > 0) {
Etat = "GetHit2";
} else {
Etat = "Die";
}
}
CheckHole();
}
};
ObjShred.prototype.GetHit2 = function () {
with (this) {
CheckGetFire();
CheckTouch();
if (_parent[Nom].Obj.Etat._currentframe >= FrGetHit2) {
Etat = "Walk";
}
CheckSleep();
}
};
ObjShred.prototype.Attack1 = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrAttack1) {
if (((Pers.PosX >= (PosX - LgHitX)) and (Pers.PosX <= (PosX + LgHitX))) and (Pers.CanBeHit == true)) {
if (((Pers.Etat eq "Penche") and (Pers.PosY >= (PosY - LgHitUp))) and (Pers.PosY <= (PosY + (LgHitDw / 2)))) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
} else if (((Pers.Etat ne "Penche") and (Pers.PosY >= (PosY - LgHitUp))) and (Pers.PosY <= (PosY + LgHitDw))) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
}
Etat = "Attack2";
}
CheckGetHit();
CheckGetFire();
CheckTouch();
}
};
ObjShred.prototype.Attack2 = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrAttack2) {
if (((Pers.PosX >= (PosX - LgHitX)) and (Pers.PosX <= (PosX + LgHitX))) and (Pers.CanBeHit == true)) {
if (((Pers.Etat eq "Penche") and (Pers.PosY >= (PosY - LgHitUp))) and (Pers.PosY <= (PosY + (LgHitDw / 2)))) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
} else if (((Pers.Etat ne "Penche") and (Pers.PosY >= (PosY - LgHitUp))) and (Pers.PosY <= (PosY + LgHitDw))) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
}
Etat = "FinAttack";
}
CheckGetHit();
CheckGetFire();
CheckTouch();
}
};
ObjShred.prototype.FinAttack = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrFinAttack) {
Etat = "Idle";
}
CheckGetHit();
CheckGetFire();
CheckTouch();
}
};
ObjShred.prototype.Die = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrDie) {
if (random(100) > 70) {
CreerHealth(PosX, PosY);
}
Etat = "Dead";
}
}
};
ObjShred.prototype.Dead = function () {
with (this) {
G_TabShred.splice(ShredI, 1);
ShredI = ShredI - 1;
}
};
ObjShred.prototype.CheckPers = function () {
with (this) {
if (Pers.CanBeHit == true) {
if ((Pers.PosY >= (PosY - LgAttackUp)) and (Pers.PosY <= (PosY + LgAttackDw))) {
if ((Pers.PosX >= (PosX - LgCheckPersX)) and (Pers.PosX <= PosX)) {
Etat = "Walk";
Dir = "G";
} else if ((Pers.PosX <= (PosX + LgCheckPersX)) and (Pers.PosX >= PosX)) {
Etat = "Walk";
Dir = "D";
}
}
}
}
};
ObjShred.prototype.CheckGetHit = function () {
with (this) {
if (((Pers.CanHit == true) and (Pers.PosY >= (PosY - GetHitUp))) and (Pers.PosY <= (PosY + GetHitDw))) {
if (((Pers.PosX <= PosX) and (Pers.PosX >= (PosX - GetHitG))) and (Pers.Dir eq "D")) {
if (((Etat ne "GetHit1") and (Etat ne "GetHit2")) and (Etat ne "GetHit3")) {
Dir = "G";
Life--;
SpdYNow = SpdYGetHit;
SpdXFall = random(SpdXGetHit) + 5;
Etat = "GetHit1";
}
} else if (((Pers.PosX >= PosX) and (Pers.PosX <= (PosX + GetHitD))) and (Pers.Dir eq "G")) {
if (((Etat ne "GetHit1") and (Etat ne "GetHit2")) and (Etat ne "GetHit3")) {
Dir = "D";
Life--;
SpdYNow = SpdYGetHit;
SpdXFall = random(SpdXGetHit) + 5;
Etat = "GetHit1";
}
}
}
}
};
ObjShred.prototype.CheckGetFire = function () {
with (this) {
if (Pers.UseSuit == true) {
var NbPersBall = G_TabPersBall.length;
if (NbPersBall > 0) {
var i = 0;
while (i < NbPersBall) {
var BallX = _parent.Control[G_TabPersBall[i]].PosX;
var BallY = _parent.Control[G_TabPersBall[i]].PosY;
if ((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) {
if (((Etat ne "GetHit1") and (Etat ne "GetHit2")) and (Etat ne "Fall")) {
Life--;
if (Life > 0) {
Etat = "GetHit1";
} else {
Etat = "Die";
}
}
_parent.Control[G_TabPersBall[i]].Etat = "Hit";
}
i++;
}
}
} else if (Pers.BoomShoot == true) {
var BallX = Boom.PosX;
var BallY = Boom.PosY;
if ((((BallX >= (PosX - GetFireG)) and (BallX <= (PosX + GetFireD))) and (BallY >= (PosY - GetFireUp))) and (BallY <= (PosY + GetFireDw))) {
if (((Etat ne "GetHit1") and (Etat ne "GetHit2")) and (Etat ne "Fall")) {
Life--;
if (Life > 0) {
Etat = "GetHit1";
} else {
Etat = "Die";
}
}
}
}
}
};
ObjShred.prototype.CheckAttack = function () {
with (this) {
if ((Pers.CanBeHit == true) and (HitGrd == true)) {
if ((Pers.PosY >= (PosY - LgAttackUp)) and (Pers.PosY <= (PosY + LgAttackDw))) {
if ((Pers.PosX >= (PosX - LgAttackX)) and (Pers.PosX <= (PosX + LgAttackX))) {
if ((Dir eq "G") and (Pers.PosX > PosX)) {
Dir = "D";
} else if ((Dir eq "D") and (Pers.PosX <= PosX)) {
Dir = "G";
}
MoveX = 0;
Etat = "Attack1";
}
}
}
}
};
ObjShred.prototype.CheckTouch = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true) and (Pers.CanBeHit == true)) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
}
};
ObjShred.prototype.CheckHole = function () {
with (this) {
if (TrueY >= Bg.MaxYDie) {
KillShred();
}
}
};
ObjShred.prototype.SetMoveX = function () {
with (this) {
MoveX = SpdXBase;
if (Dir eq "G") {
MoveX = MoveX * -1;
}
}
};
ObjShred.prototype.SetMoveXFall = function () {
with (this) {
MoveX = SpdXFall;
if (SpdXFall > 0) {
SpdXFall = SpdXFall * 0.9;
}
if (Dir eq "D") {
MoveX = MoveX * -1;
}
}
};
ObjShred.prototype.CheckWall = function () {
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(TrueX + WallStop, TrueY, true)) {
MoveX = 0;
} else if (_parent.Collider.Wall.hitTest(TrueX + WallHit1, TrueY, true)) {
MoveX = WallHitBloc;
} else if (_parent.Collider.Wall.hitTest(TrueX + WallHit2, TrueY, true)) {
MoveX = WallHit1;
} else if (_parent.Collider.Wall.hitTest(TrueX + MoveX, TrueY, true)) {
MoveX = WallHit2;
}
}
}
};
ObjShred.prototype.CheckTurn = function () {
with (this) {
if (_parent.Collider.Turn.hitTest(TrueX + MoveX, TrueY, true)) {
MoveX = 0;
if (Dir eq "G") {
Dir = "D";
} else {
Dir = "G";
}
}
}
};
ObjShred.prototype.CheckSol = function () {
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;
}
}
};
ObjShred.prototype.CheckHitGrd = function () {
with (this) {
if (_parent.Collider.Sol.hitTest(TrueX, TrueY + MaxSol, true)) {
HitGrd = true;
} else {
HitGrd = false;
}
}
};
ObjShred.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
}
};
ObjShred.prototype.MoveShred = function () {
with (this) {
_parent[Nom]._x = _parent[Nom]._x + MoveX;
_parent[Nom]._y = _parent[Nom]._y + MoveY;
PosX = _parent[Nom]._x;
PosY = _parent[Nom]._y;
}
};
ObjShred.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) {
if ((random(100) > 50) and (Moving == true)) {
Etat = "Walk";
} else {
Etat = "Idle";
}
} else {
Etat = "Dead";
}
}
}
};
ObjShred.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";
}
}
};
ObjShred.prototype.KillShred = function () {
with (this) {
Etat = "Dead";
}
};
ObjShred.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent[Nom].gotoAndStop(NewDir);
}
};
ObjShred.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].Obj.gotoAndStop(NewAction);
}
};
ObjShred.prototype.Actions = function () {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
_parent[Nom].Obj.Etat.stop();
}
} else {
if (InPause == true) {
InPause = false;
_parent[Nom].Obj.Etat.play();
}
SetTruePos();
this[Etat]();
}
}
};
CreerGarde = function (Nom, PosX, PosY, Dir, LgSeeUp, LgSeeX, LgSeeDw) {
if (this[Nom] == null) {
this[Nom] = new ObjGarde(Nom, PosX, PosY, Dir, LgSeeUp, LgSeeX, LgSeeDw);
G_TabGarde.push(Nom);
}
};
ObjGarde.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjGarde.prototype.Idle = function () {
with (this) {
CheckSee();
CheckTurn();
CheckSleep();
}
};
ObjGarde.prototype.Bloc = function () {
with (this) {
CheckSee();
if (_parent[Nom].Obj.Etat._currentframe >= FrBloc) {
_parent._parent.BlocMessage.gotoAndStop(2);
Etat = "FinBloc";
}
}
};
ObjGarde.prototype.FinBloc = function () {
with (this) {
if (_parent[Nom].Obj.Etat._currentframe >= FrFinBloc) {
Etat = "Idle";
}
}
};
ObjGarde.prototype.CheckSee = function () {
with (this) {
if ((((Pers.PosY >= (PosY - LgSeeUp)) and (Pers.PosY <= (PosY + LgSeeDw))) and (Pers.HitGrd == true)) and (Pers.Etat ne "Bloc")) {
if (((Dir eq "G") and (Pers.PosX >= (PosX - LgSeeX))) and (Pers.PosX <= PosX)) {
Pers.Etat = "Bloc";
Etat = "Bloc";
} else if (((Dir eq "D") and (Pers.PosX <= (PosX + LgSeeX))) and (Pers.PosX >= PosX)) {
Pers.Etat = "Bloc";
Etat = "Bloc";
}
}
}
};
ObjGarde.prototype.CheckTurn = function () {
with (this) {
if ((Pers.PosY >= (PosY - LgSeeUp)) and (Pers.PosY <= (PosY + LgSeeDw))) {
if ((Pers.PosX >= (PosX - LgTurnX)) and (Pers.PosX <= PosX)) {
Dir = "G";
} else if ((Pers.PosX <= (PosX + LgTurnX)) and (Pers.PosX >= PosX)) {
Dir = "D";
}
}
}
};
ObjGarde.prototype.CheckActif = function () {
with (this) {
if (((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) and (Etat eq "Sleep")) {
Etat = "Idle";
}
}
};
ObjGarde.prototype.CheckSleep = function () {
with (this) {
if ((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) {
Etat = "Sleep";
}
}
};
ObjGarde.prototype.ChangeDir = function (NewDir) {
with (this) {
DirOld = Dir;
Dir = NewDir;
_parent[Nom].gotoAndStop(NewDir);
}
};
ObjGarde.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].Obj.gotoAndStop(NewAction);
}
};
ObjGarde.prototype.Actions = function () {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
_parent[Nom].Obj.Etat.stop();
}
} else {
if (InPause == true) {
InPause = false;
_parent[Nom].Obj.Etat.play();
}
SetTruePos();
this[Etat]();
}
}
};
CreerLife = function (Nom, PosX, PosY) {
if (this[Nom] == null) {
this[Nom] = new ObjLife(Nom, PosX, PosY);
G_TabLife.push(Nom);
}
};
ObjLife.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjLife.prototype.Idle = function () {
with (this) {
CheckGet();
CheckSleep();
}
};
ObjLife.prototype.Get = function () {
with (this) {
if (_parent[Nom].Etat._currentframe >= FrGet) {
Pers.Life++;
_parent._parent.NbLife.TxtNbLife = Pers.Life - 1;
KillLife();
}
}
};
ObjLife.prototype.CheckGet = function () {
with (this) {
if ((((Pers.PosY >= (PosY - LgHitUp)) and (Pers.PosY <= (PosY + LgHitDw))) and (Pers.PosX >= (PosX - LgHitX))) and (Pers.PosX <= (PosX + LgHitX))) {
Etat = "Get";
}
}
};
ObjLife.prototype.KillLife = function () {
with (this) {
G_TabLife.splice(LifeI, 1);
LifeI = LifeI - 1;
delete _parent.Control[Nom];
_parent[Nom].gotoAndStop("Sleep");
}
};
ObjLife.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";
}
}
};
ObjLife.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";
}
}
};
ObjLife.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjLife.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]();
}
}
};
CreerHealth = function (PosX, PosY) {
var _local3 = "Health" + G_NextHealth;
G_NextHealth = G_NextHealth + 1;
if (G_NextHealth > 50) {
G_NextHealth = 1;
}
if (this[_local3] == null) {
var _local4 = G_NextHealthDepth;
G_NextHealthDepth++;
duplicateMovieClip (_parent.HealthBonus.HealthClone, _local3, _local4);
_parent.HealthBonus[_local3]._x = PosX;
_parent.HealthBonus[_local3]._y = PosY;
this[_local3] = new ObjHealth(_local3, PosX, PosY);
G_TabHealth.push(_local3);
}
if (this[_local3] == null) {
this[_local3] = new ObjHealth(_local3, PosX, PosY);
G_TabHealth.push(_local3);
}
};
ObjHealth.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjHealth.prototype.Entre = function () {
with (this) {
if (_parent.HealthBonus[Nom].Etat._currentframe >= FrEntre) {
Etat = "Idle";
}
}
};
ObjHealth.prototype.Idle = function () {
with (this) {
CheckGet();
CheckSleep();
}
};
ObjHealth.prototype.Get = function () {
with (this) {
if ((Getted == false) and (Pers.Health > 0)) {
Getted = true;
Pers.Health = Pers.Health + BonusHealth;
if (Pers.Health > 100) {
Pers.Health = 100;
}
if (Pers.Health == 100) {
_parent._parent.Health.gotoAndStop(1);
} else {
_parent._parent.Health.gotoAndStop(100 - Pers.Health);
}
}
if (_parent.HealthBonus[Nom].Etat._currentframe >= FrGet) {
KillHealth();
}
}
};
ObjHealth.prototype.CheckGet = function () {
with (this) {
if ((((Pers.PosY >= (PosY - LgHitUp)) and (Pers.PosY <= (PosY + LgHitDw))) and (Pers.PosX >= (PosX - LgHitX))) and (Pers.PosX <= (PosX + LgHitX))) {
Etat = "Get";
}
}
};
ObjHealth.prototype.KillHealth = function () {
with (this) {
G_TabHealth.splice(HealthI, 1);
HealthI = HealthI - 1;
delete _parent.Control[Nom];
_parent.HealthBonus[Nom].removeMovieClip();
}
};
ObjHealth.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";
}
}
};
ObjHealth.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";
}
}
};
ObjHealth.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent.HealthBonus[Nom].gotoAndStop(NewAction);
}
};
ObjHealth.prototype.Actions = function () {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
_parent.HealthBonus[Nom].Etat.stop();
}
} else {
if (InPause == true) {
InPause = false;
_parent.HealthBonus[Nom].Etat.play();
}
this[Etat]();
}
}
};
CreerFusBall = function (FusName) {
var _local3 = "Ball" + G_NextFusBall;
G_NextFusBall = G_NextFusBall + 1;
if (G_NextFusBall > 50) {
G_NextFusBall = 1;
}
if (this[_local3] == null) {
var _local8 = G_NextFusBallDepth;
G_NextFusBallDepth++;
duplicateMovieClip (_parent.FusBall.FusBallClone, _local3, _local8);
var _local7 = this[FusName].Dir;
_parent.FusBall[_local3].gotoAndStop(_local7);
var _local6 = this[FusName].PosX;
var _local5 = this[FusName].PosY + this[FusName].DistBallY;
_parent.FusBall[_local3]._x = _local6;
_parent.FusBall[_local3]._y = _local5;
this[_local3] = new ObjFusBall(_local3, _local6, _local5, _local7);
G_TabFusBall.push(_local3);
}
};
ObjFusBall.prototype.Hide = function () {
with (this) {
_parent.FusBall[Nom]._x = PosX + SpdX;
PosX = PosX + SpdX;
SetTruePos();
if (_parent.FusBall[Nom].Obj.Etat._currentframe >= FrHide) {
Etat = "Move";
}
CheckHitPers();
CheckWall();
CheckOut();
}
};
ObjFusBall.prototype.Move = function () {
with (this) {
_parent.FusBall[Nom]._x = PosX + SpdX;
PosX = PosX + SpdX;
SetTruePos();
CheckHitPers();
CheckWall();
CheckOut();
}
};
ObjFusBall.prototype.Hit = function () {
with (this) {
CheckOut();
if (_parent.FusBall[Nom].Obj.Etat._currentframe >= FrHit) {
CanBeKill = true;
}
}
};
ObjFusBall.prototype.KillBall = function () {
with (this) {
G_TabFusBall.splice(FusBallI, 1);
FusBallI = FusBallI - 1;
delete _parent.Control[Nom];
_parent.FusBall[Nom].removeMovieClip();
}
};
ObjFusBall.prototype.SetTruePos = function () {
with (this) {
TrueX = PosX + _parent._x;
TrueY = PosY + _parent._y;
}
};
ObjFusBall.prototype.CheckHitPers = function () {
with (this) {
if (Pers.Etat eq "Penche") {
if ((((PosX >= (Pers.PosX - Pers.LgGetShootX)) and (PosX <= (Pers.PosX + Pers.LgGetShootX))) and (PosY >= (Pers.PosY - Pers.LgGetShootUpBas))) and (PosY <= Pers.PosY)) {
Etat = "Hit";
if (Pers.CanBeHit == true) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
}
} else if ((((PosX >= (Pers.PosX - Pers.LgGetShootX)) and (PosX <= (Pers.PosX + Pers.LgGetShootX))) and (PosY >= (Pers.PosY - Pers.LgGetShootUp))) and (PosY <= Pers.PosY)) {
Etat = "Hit";
if (Pers.CanBeHit == true) {
Pers.Degat = Degat;
Pers.Etat = "GetHit";
Pers.CanBeHit = false;
}
}
}
};
ObjFusBall.prototype.CheckWall = function () {
with (this) {
if (_parent.Collider.Wall.hitTest(TrueX, TrueY, true)) {
Etat = "Hit";
}
}
};
ObjFusBall.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;
}
}
};
ObjFusBall.prototype.CheckKill = function () {
with (this) {
if (CanBeKill == true) {
KillBall();
}
}
};
ObjFusBall.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent.FusBall[Nom].Obj.gotoAndStop(NewAction);
}
};
ObjFusBall.prototype.Actions = function () {
with (this) {
if (G_Pause == true) {
if (InPause == false) {
InPause = true;
_parent.FusBall[Nom].Obj.Etat.stop();
}
} else {
if (InPause == true) {
InPause = false;
_parent.FusBall[Nom].Obj.Etat.play();
}
this[Etat]();
CheckKill();
}
}
};
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;
}
ScrollBg();
}
}
};
ObjBg.prototype.ScrollBg = function () {
with (this) {
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 (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 (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 (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 = _parent._x + MoveX;
PosX = _parent._x;
InvPosX = PosX * -1;
MoveX = 0;
_parent._y = _parent._y + MoveY;
PosY = _parent._y;
InvPosY = PosY * -1;
MoveY = 0;
}
};
CreerBmpZone = function (Nom, PosX, PosY, LgOutD, LgOutG, LgOutUp, LgOutDw, BmpNom) {
if (this[Nom] == null) {
this[Nom] = new ObjBmpZone(Nom, PosX, PosY, LgOutD, LgOutG, LgOutUp, LgOutDw, BmpNom);
G_TabBmpZone.push(Nom);
}
};
ObjBmpZone.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjBmpZone.prototype.CheckIn = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = false;
_parent.BgFront[BmpNom]._visible = 1;
Etat = "CheckOut";
}
CheckSleep();
}
};
ObjBmpZone.prototype.CheckOut = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = true;
_parent.BgFront[BmpNom]._visible = 0;
Etat = "CheckIn";
}
CheckSleep();
}
};
ObjBmpZone.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 (FlagCheckIn == true) {
Etat = "CheckIn";
} else {
Etat = "CheckOut";
}
}
}
};
ObjBmpZone.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";
}
}
};
ObjBmpZone.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjBmpZone.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerMonsterZone = function (Nom, PosX, PosY) {
if (this[Nom] == null) {
this[Nom] = new ObjMonsterZone(Nom, PosX, PosY);
G_TabMonsterZone.push(Nom);
}
};
ObjMonsterZone.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjMonsterZone.prototype.Idle = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
_parent[Nom].Activate();
KillZone();
}
CheckSleep();
}
};
ObjMonsterZone.prototype.CheckActif = function () {
with (this) {
if ((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) {
Etat = "Idle";
}
}
};
ObjMonsterZone.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";
}
}
};
ObjMonsterZone.prototype.KillZone = function () {
with (this) {
G_TabMonsterZone.splice(MonsterZoneI, 1);
MonsterZoneI = MonsterZoneI - 1;
_parent[Nom].gotoAndStop("Sleep");
delete _parent.Control[Nom];
}
};
ObjMonsterZone.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjMonsterZone.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerWinZone = function (PosX, PosY) {
WinZone = new ObjWinZone(PosX, PosY);
G_TabMonsterZone.push("WinZone");
};
ObjWinZone.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjWinZone.prototype.Idle = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
_parent._parent.gotoAndPlay("Win");
G_Pause = true;
}
CheckSleep();
}
};
ObjWinZone.prototype.CheckActif = function () {
with (this) {
if ((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) {
Etat = "Idle";
}
}
};
ObjWinZone.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";
}
}
};
ObjWinZone.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjWinZone.prototype.Actions = function () {
with (this) {
if (G_Pause == false) {
this[Etat]();
}
}
};
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();
CheckSleep();
}
};
ObjSwitch.prototype.Baisse = function () {
with (this) {
if (_parent[Nom].Etat._currentframe >= FrBaisse) {
_parent[Nom].Activate();
Etat = "Active";
}
}
};
ObjSwitch.prototype.Active = function () {
with (this) {
CheckSleep();
}
};
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.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 == true) {
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]();
}
}
};
CreerZone1 = function (PosX, PosY) {
this.Zone1 = new ObjZone1(PosX, PosY);
};
ObjZone1.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjZone1.prototype.CheckIn = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = false;
_parent.BgFront.Zone1._visible = 1;
Etat = "CheckOut";
Zone2.Etat = "Idle";
}
CheckSleep();
}
};
ObjZone1.prototype.CheckOut = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = true;
_parent.BgFront.Zone1._visible = 0;
Etat = "CheckIn";
Zone2.Etat = "PasLa";
}
CheckSleep();
}
};
ObjZone1.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 (FlagCheckIn == true) {
Etat = "CheckIn";
} else {
Etat = "CheckOut";
}
}
}
};
ObjZone1.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";
}
}
};
ObjZone1.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjZone1.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerZone2 = function (PosX, PosY) {
this.Zone2 = new ObjZone2(PosX, PosY);
};
ObjZone2.prototype.PasLa = function () {
};
ObjZone2.prototype.Idle = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true) and (Pers.HitGrd == true)) {
_parent.Pers._x = DestX;
_parent.Pers._y = DestY;
Pers.Dir = DirExit;
Pers.Etat = "WalkAuto";
Pers.AutoDest = GoX;
_parent.BgFront.Zone1._visible = 0;
_parent.BgFront.Zone2._visible = 1;
_parent.Zone4._y = 0;
_parent.Zone5._y = 0;
_parent.Collider.Sol.SolZone1.gotoAndStop(2);
_parent.Collider.Sol.SolZone2.gotoAndStop(1);
_parent.Collider.Wall.WallZone2a.gotoAndStop(1);
_parent.Collider.Wall.WallZone2b.gotoAndStop(1);
Etat = "PasLa";
Zone3.Etat = "Idle";
}
}
};
ObjZone2.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjZone2.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerZone3 = function (PosX, PosY) {
this.Zone3 = new ObjZone3(PosX, PosY);
};
ObjZone3.prototype.PasLa = function () {
};
ObjZone3.prototype.Idle = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true) and (Pers.HitGrd == true)) {
_parent.Pers._x = DestX;
_parent.Pers._y = DestY;
Pers.Dir = DirExit;
Pers.Etat = "WalkAuto";
Pers.AutoDest = GoX;
_parent.BgFront.Zone1._visible = 1;
_parent.BgFront.Zone2._visible = 0;
_parent.Zone4._y = 161;
_parent.Zone5._y = 161;
_parent.Collider.Sol.SolZone1.gotoAndStop(1);
_parent.Collider.Sol.SolZone2.gotoAndStop(2);
_parent.Collider.Wall.WallZone2a.gotoAndStop(2);
_parent.Collider.Wall.WallZone2b.gotoAndStop(2);
Etat = "PasLa";
Zone2.Etat = "Idle";
}
}
};
ObjZone3.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjZone3.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerZone4 = function (PosX, PosY) {
this.Zone4 = new ObjZone4(PosX, PosY);
};
ObjZone4.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjZone4.prototype.CheckIn = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = false;
var NewColor = new Color(_parent.Pers);
var ColorTrans = {ra:40, rb:35, ga:40, gb:75, ba:40, bb:106, aa:100, ab:0};
NewColor.setTransform(ColorTrans);
Etat = "CheckOut";
}
CheckSleep();
}
};
ObjZone4.prototype.CheckOut = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = true;
var NewColor = new Color(_parent.Pers);
var ColorTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
NewColor.setTransform(ColorTrans);
Etat = "CheckIn";
}
CheckSleep();
}
};
ObjZone4.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 (FlagCheckIn == true) {
Etat = "CheckIn";
} else {
Etat = "CheckOut";
}
}
}
};
ObjZone4.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";
}
}
};
ObjZone4.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjZone4.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerZone5 = function (PosX, PosY) {
this.Zone5 = new ObjZone5(PosX, PosY);
};
ObjZone5.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjZone5.prototype.CheckIn = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = false;
Etat = "CheckOut";
var NewColor = new Color(_parent.Pers);
var ColorTrans = {ra:40, rb:35, ga:40, gb:75, ba:40, bb:106, aa:100, ab:0};
NewColor.setTransform(ColorTrans);
}
CheckSleep();
}
};
ObjZone5.prototype.CheckOut = function () {
with (this) {
if (_parent[Nom].hitTest(Pers.TrueX, Pers.TrueY, true)) {
FlagCheckIn = true;
Etat = "CheckIn";
var NewColor = new Color(_parent.Pers);
var ColorTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
NewColor.setTransform(ColorTrans);
}
CheckSleep();
}
};
ObjZone5.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 (FlagCheckIn == true) {
Etat = "CheckIn";
} else {
Etat = "CheckOut";
}
}
}
};
ObjZone5.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";
}
}
};
ObjZone5.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjZone5.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerDoor1 = function (PosX, PosY) {
this.Door1 = new ObjDoor1(PosX, PosY);
};
ObjDoor1.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjDoor1.prototype.Close = function () {
with (this) {
CheckSleep();
}
};
ObjDoor1.prototype.Ouvre = function () {
with (this) {
if (_parent.Door1.Etat._currentframe >= FrOuvre) {
_parent.DoorFront._visible = 1;
FlagOpen = true;
_parent.Collider.Wall.WallDoor1.gotoAndStop(2);
Etat = "Open";
}
}
};
ObjDoor1.prototype.Open = function () {
with (this) {
CheckSleep();
}
};
ObjDoor1.prototype.CheckActif = function () {
with (this) {
if ((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) {
if (FlagOpen == true) {
Etat = "Open";
} else {
Etat = "Close";
}
}
}
};
ObjDoor1.prototype.CheckSleep = function () {
with (this) {
if ((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) {
Etat = "Sleep";
}
}
};
ObjDoor1.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjDoor1.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]();
}
}
};
CreerDoor2 = function (PosX, PosY) {
this.Door2 = new ObjDoor2(PosX, PosY);
};
ObjDoor2.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjDoor2.prototype.Close = function () {
with (this) {
CheckSleep();
}
};
ObjDoor2.prototype.Open = function () {
with (this) {
CheckSleep();
}
};
ObjDoor2.prototype.CheckActif = function () {
with (this) {
if (PosX <= (Bg.InvPosX + LgOutD)) {
if (FlagOpen == true) {
Etat = "Open";
} else {
Etat = "Close";
}
}
}
};
ObjDoor2.prototype.CheckSleep = function () {
with (this) {
if (PosX > (Bg.InvPosX + LgOutD)) {
Etat = "Sleep";
}
}
};
ObjDoor2.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
}
};
ObjDoor2.prototype.Actions = function () {
with (this) {
this[Etat]();
}
};
CreerPont = function (PosX, PosY) {
this.Pont = new ObjPont(PosX, PosY);
};
ObjPont.prototype.Sleep = function () {
with (this) {
CheckActif();
}
};
ObjPont.prototype.Idle = function () {
with (this) {
CheckPersOn();
CheckSleep();
}
};
ObjPont.prototype.Shake = function () {
with (this) {
if (_parent[Nom].Etat._currentframe >= FrShake) {
_parent.Collider.Sol.SolPont.gotoAndStop(2);
Etat = "Fall";
}
}
};
ObjPont.prototype.Fall = function () {
with (this) {
if (_parent[Nom].Etat._currentframe >= FrFall) {
Etat = "Break";
}
}
};
ObjPont.prototype.Break = function () {
with (this) {
CheckSleep();
}
};
ObjPont.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)) {
FlagBreak = true;
Etat = "Shake";
}
}
};
ObjPont.prototype.CheckActif = function () {
with (this) {
if ((PosX >= (Bg.InvPosX - LgOutG)) and (PosX <= (Bg.InvPosX + LgOutD))) {
if (FlagBreak == true) {
Etat = "Break";
} else {
Etat = "Idle";
}
}
}
};
ObjPont.prototype.CheckSleep = function () {
with (this) {
if ((PosX < (Bg.InvPosX - LgOutG)) or (PosX > (Bg.InvPosX + LgOutD))) {
Etat = "Sleep";
}
}
};
ObjPont.prototype.ChangeEtat = function (NewAction) {
with (this) {
EtatOld = Etat;
Etat = NewAction;
_parent[Nom].gotoAndStop(NewAction);
_parent[NomFront].gotoAndStop(NewAction);
}
};
ObjPont.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]();
}
}
};
}
onClipEvent (enterFrame) {
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();
}
FusBallI = 0;
for (FusBallI in G_TabFusBall) {
var FusBallActif = G_TabFusBall[FusBallI];
if (this[FusBallActif].Etat != this[FusBallActif].EtatOld) {
this[FusBallActif].ChangeEtat(this[FusBallActif].Etat);
}
this[FusBallActif].Actions();
}
FusI = 0;
for (FusI in G_TabFus) {
var FusActif = G_TabFus[FusI];
if (this[FusActif].Dir != this[FusActif].DirOld) {
this[FusActif].ChangeDir(this[FusActif].Dir);
}
if (this[FusActif].Etat != this[FusActif].EtatOld) {
this[FusActif].ChangeEtat(this[FusActif].Etat);
}
this[FusActif].Actions();
}
ShredI = 0;
for (ShredI in G_TabShred) {
var ShredActif = G_TabShred[ShredI];
if (this[ShredActif].Dir != this[ShredActif].DirOld) {
this[ShredActif].ChangeDir(this[ShredActif].Dir);
}
if (this[ShredActif].Etat != this[ShredActif].EtatOld) {
this[ShredActif].ChangeEtat(this[ShredActif].Etat);
}
this[ShredActif].Actions();
}
GardeI = 0;
for (GardeI in G_TabGarde) {
var GardeActif = G_TabGarde[GardeI];
if (this[GardeActif].Dir != this[GardeActif].DirOld) {
this[GardeActif].ChangeDir(this[GardeActif].Dir);
}
if (this[GardeActif].Etat != this[GardeActif].EtatOld) {
this[GardeActif].ChangeEtat(this[GardeActif].Etat);
}
this[GardeActif].Actions();
}
LifeI = 0;
for (LifeI in G_TabLife) {
var LifeActif = G_TabLife[LifeI];
if (this[LifeActif].Etat != this[LifeActif].EtatOld) {
this[LifeActif].ChangeEtat(this[LifeActif].Etat);
}
this[LifeActif].Actions();
}
HealthI = 0;
for (HealthI in G_TabHealth) {
var HealthActif = G_TabHealth[HealthI];
if (this[HealthActif].Etat != this[HealthActif].EtatOld) {
this[HealthActif].ChangeEtat(this[HealthActif].Etat);
}
this[HealthActif].Actions();
}
SwitchI = 0;
for (SwitchI in G_TabSwitch) {
var SwitchActif = G_TabSwitch[SwitchI];
if (this[SwitchActif].Etat != this[SwitchActif].EtatOld) {
this[SwitchActif].ChangeEtat(this[SwitchActif].Etat);
}
this[SwitchActif].Actions();
}
for (BmpZoneI in G_TabBmpZone) {
var BmpZoneActif = G_TabBmpZone[BmpZoneI];
if (this[BmpZoneActif].Etat != this[BmpZoneActif].EtatOld) {
this[BmpZoneActif].ChangeEtat(this[BmpZoneActif].Etat);
}
this[BmpZoneActif].Actions();
}
for (MonsterZoneI in G_TabMonsterZone) {
var MonsterZoneActif = G_TabMonsterZone[MonsterZoneI];
if (this[MonsterZoneActif].Etat != this[MonsterZoneActif].EtatOld) {
this[MonsterZoneActif].ChangeEtat(this[MonsterZoneActif].Etat);
}
this[MonsterZoneActif].Actions();
}
if (Pers.Dir != Pers.DirOld) {
Pers.ChangeDir(Pers.Dir);
}
if (Pers.Etat != Pers.EtatOld) {
Pers.ChangeEtat(Pers.Etat);
}
this.Pers.Actions();
this.Bg.Actions();
if (Music.Etat != Music.EtatOld) {
Music.ChangeEtat(Music.Etat);
}
this.Music.Actions();
if (Zone1.Etat != Zone1.EtatOld) {
Zone1.ChangeEtat(Zone1.Etat);
}
this.Zone1.Actions();
if (Zone2.Etat != Zone2.EtatOld) {
Zone2.ChangeEtat(Zone2.Etat);
}
this.Zone2.Actions();
if (Zone3.Etat != Zone3.EtatOld) {
Zone3.ChangeEtat(Zone3.Etat);
}
this.Zone3.Actions();
if (Zone4.Etat != Zone4.EtatOld) {
Zone4.ChangeEtat(Zone4.Etat);
}
this.Zone4.Actions();
if (Zone5.Etat != Zone5.EtatOld) {
Zone5.ChangeEtat(Zone5.Etat);
}
this.Zone5.Actions();
if (Door1.Etat != Door1.EtatOld) {
Door1.ChangeEtat(Door1.Etat);
}
this.Door1.Actions();
if (Door2.Etat != Door2.EtatOld) {
Door2.ChangeEtat(Door2.Etat);
}
this.Door2.Actions();
if (Pont.Etat != Pont.EtatOld) {
Pont.ChangeEtat(Pont.Etat);
}
this.Pont.Actions();
if (G_Pause == false) {
G_CurrentFocus = Selection.getFocus();
if (G_CurrentFocus == null) {
KeyListener.P = true;
}
}
G_CheckPause();
}
Symbol 805 MovieClip Frame 2
stop();
Instance of Symbol 246 MovieClip in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerBg(_parent._x, _parent._y);
}
Instance of Symbol 285 MovieClip "Collider" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 290 MovieClip "Zone1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerZone1(this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 291 MovieClip "Zone2" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerZone2(this._x, this._y);
this.gotoAndStop("PasLa");
}
Instance of Symbol 291 MovieClip "Zone3" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerZone3(this._x, this._y);
this.gotoAndStop("PasLa");
}
Instance of Symbol 292 MovieClip "BmpZone1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerBmpZone(this._name, this._x, this._y, 610, 209, 0, 370, this._name);
this.gotoAndStop("Sleep");
}
Instance of Symbol 293 MovieClip "BmpZone2" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerBmpZone(this._name, this._x, this._y, 852, 352, 0, 370, this._name);
this.gotoAndStop("Sleep");
}
Instance of Symbol 290 MovieClip "Zone4" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerZone4(this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 290 MovieClip "Zone5" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerZone5(this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 295 MovieClip "MonsterZone1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
function Activate() {
_parent.Shred5._x = 4860;
_parent.Shred5._y = 326;
_parent.Control.Shred5.PosX = 4860;
_parent.Control.Shred5.PosY = 326;
_parent.Control.Shred5.Etat = "Walk";
}
this._visible = 0;
_parent.Control.CreerMonsterZone(this._name, this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 295 MovieClip "WinZone" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
_parent.Control.CreerWinZone(this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 324 MovieClip "Pont" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerPont(this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 326 MovieClip "Door2" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerDoor2(this._name, this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 358 MovieClip "Door1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerDoor1(this._name, this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 381 MovieClip "Dalle2" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
function Activate() {
_parent.Control.Door2.Etat = "Open";
_parent.Collider.Sol.SolSwitch2.gotoAndStop(2);
_parent.Collider.Wall.WallDoor2.gotoAndStop(2);
}
_parent.Control.CreerSwitch(this._name, this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 381 MovieClip "Dalle1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
function Activate() {
_parent.Control.Door1.Etat = "Ouvre";
_parent.Collider.Sol.SolSwitch1.gotoAndStop(2);
}
_parent.Control.CreerSwitch(this._name, this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 410 MovieClip "Life1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerLife(this._name, this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 452 MovieClip "Garde1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "D";
_parent.Control.CreerGarde(this._name, this._x, this._y, Dir, 120, 120, 77);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 452 MovieClip "Garde2" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerGarde(this._name, this._x, this._y, Dir, 120, 120, 5);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 452 MovieClip "Garde3" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerGarde(this._name, this._x, this._y, Dir, 20, 120, 5);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 545 MovieClip "Fus1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerFus(this._name, this._x, this._y, Dir, false);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 750 MovieClip "Pers" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerPers(this._x, this._y);
this.gotoAndStop("D");
}
Instance of Symbol 757 MovieClip "Boom" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerBoom(this._name, this._x, this._y);
this.Obj.gotoAndStop("PasLa");
}
Instance of Symbol 793 MovieClip "Shred1" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerShred(this._name, this._x, this._y, Dir, true);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 793 MovieClip "Shred2" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerShred(this._name, this._x, this._y, Dir);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 793 MovieClip "Shred3" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerShred(this._name, this._x, this._y, Dir);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 793 MovieClip "Shred4" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerShred(this._name, this._x, this._y, Dir);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 793 MovieClip "Shred5" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "D";
_parent.Control.CreerShred(this._name, this._x, this._y, Dir);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Instance of Symbol 798 MovieClip "DoorFront" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
this._visible = 0;
}
Instance of Symbol 804 MovieClip "PontFont" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
_parent.Control.CreerPont(this._x, this._y);
this.gotoAndStop("Sleep");
}
Instance of Symbol 452 MovieClip "Garde4" in Symbol 805 MovieClip Frame 2
onClipEvent (load) {
var Dir = "G";
_parent.Control.CreerGarde(this._name, this._x, 213, Dir, 20, 100, 5);
this.gotoAndStop(Dir);
this.Obj.gotoAndStop("Sleep");
}
Symbol 818 MovieClip Frame 1
stop();
Symbol 818 MovieClip Frame 2
stop();
Symbol 821 MovieClip Frame 1
stop();
Symbol 834 Button
on (release) {
_root._quality = "MEDIUM";
_parent._parent.Game.Control.GameQuality = "Med";
gotoAndStop ("Med");
}
Symbol 839 Button
on (release) {
_root._quality = "HIGH";
_parent._parent.Game.Control.GameQuality = "High";
gotoAndStop ("High");
}
Symbol 840 Button
on (release) {
_root._quality = "LOW";
_parent._parent.Game.Control.GameQuality = "Low";
gotoAndStop ("Low");
}
Symbol 841 MovieClip Frame 1
stop();
Symbol 841 MovieClip Frame 2
stop();
Symbol 841 MovieClip Frame 3
stop();
Symbol 844 Button
on (release) {
_root.MusJoue = false;
nextFrame();
}
Symbol 847 Button
on (release) {
_root.MusJoue = true;
_parent._parent.ObjMusic.setVolume(20);
prevFrame();
}
Symbol 848 MovieClip Frame 1
stop();
Symbol 848 MovieClip Frame 2
stop();
Symbol 853 Button
on (release) {
var WhatOpen = "Instruct";
gotoAndPlay ("Close");
}
Symbol 856 Button
on (release) {
var WhatOpen = "Quit";
gotoAndPlay ("Close");
}
Symbol 861 Button
on (release) {
_parent.Game.Control.G_Resume = true;
_root.TxtTrace = _parent.Game.Control.G_Resume;
}
Symbol 862 MovieClip Frame 1
stop();
Symbol 862 MovieClip Frame 2
stop();
Symbol 862 MovieClip Frame 3
stop();
Symbol 863 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 2
stop();
Symbol 865 Button
on (release) {
gotoAndPlay ("Out1");
}
Symbol 866 Button
on (release) {
gotoAndPlay ("Out2");
}
Symbol 874 Button
on (release) {
play();
}
Symbol 875 Button
on (release) {
_parent.Game.Control.Music.VolDest = 0;
_parent.Game.Control.Music.Etat = "FadeOut";
var WhereGo = "Title";
play();
}
Symbol 876 MovieClip Frame 1
stop();
Instance of Symbol 827 MovieClip in Symbol 876 MovieClip Frame 1
/* no clip actions */
Symbol 876 MovieClip Frame 2
stop();
Instance of Symbol 841 MovieClip in Symbol 876 MovieClip Frame 2
onClipEvent (load) {
this.gotoAndStop(_parent._parent.Game.Control.GameQuality);
}
Instance of Symbol 848 MovieClip in Symbol 876 MovieClip Frame 2
onClipEvent (load) {
if (_root.MusJoue == true) {
this.stop();
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 862 MovieClip in Symbol 876 MovieClip Frame 3
onClipEvent (load) {
this.gotoAndStop(_parent._parent.Game.Control.GameQuality);
}
Instance of Symbol 863 MovieClip in Symbol 876 MovieClip Frame 3
onClipEvent (load) {
if (_root.MusJoue == true) {
this.stop();
} else {
this.gotoAndStop(2);
}
}
Symbol 876 MovieClip Frame 44
if (WhatOpen eq "Instruct") {
gotoAndPlay ("Instruct");
} else {
gotoAndPlay ("QuitScr");
}
Symbol 876 MovieClip Frame 71
stop();
Symbol 876 MovieClip Frame 72
stop();
Symbol 876 MovieClip Frame 154
_parent.Game.Control.G_Resume = true;
gotoAndStop (1);
Symbol 876 MovieClip Frame 236
_parent.Game.Control.G_Resume = true;
gotoAndStop (1);
Symbol 876 MovieClip Frame 263
stop();
Symbol 876 MovieClip Frame 313
if (WhereGo eq "Title") {
_parent.gotoAndStop("TitleCard");
stop();
}
Symbol 876 MovieClip Frame 340
_parent.Game.Control.G_Resume = true;
gotoAndStop (1);
Symbol 877 MovieClip Frame 41
_parent.Game.Control.G_Pause = false;
Symbol 877 MovieClip Frame 42
stop();
Symbol 878 MovieClip Frame 65
stop();
Symbol 879 MovieClip Frame 65
_parent.gotoAndStop("Reset");
Symbol 881 MovieClip Frame 10
stop();
Symbol 882 MovieClip Frame 10
stop();
Symbol 883 MovieClip Frame 10
stop();
Symbol 884 MovieClip Frame 10
stop();
Symbol 885 MovieClip Frame 10
stop();
Symbol 888 MovieClip Frame 10
stop();
Symbol 889 MovieClip Frame 10
stop();
Symbol 895 Button
on (release) {
_parent.Sons.Loose.gotoAndStop("Arret");
_parent.gotoAndStop("TitleCard");
}
Symbol 896 Button
on (release) {
_parent.Sons.Loose.gotoAndStop("Arret");
_parent.gotoAndStop("Game");
}
Symbol 897 MovieClip Frame 63
stop();