Frame 1
Stage.showMenu = false;
_focusrect = false;
Instance of Symbol 3 MovieClip "HighScore" in Frame 1
onClipEvent (load) {
function fStyleNumber(_nNumber, _nMinimumChar) {
_sNumber = String(_nNumber);
_sNewString = "";
_nlength = _sNumber.length;
_nlength = _nlength / 3;
if (_nlength <= 1) {
_sNewNumber = _sNumber;
if (_sNewNumber.length < _nMinimumChar) {
_sNewNumber = "0" + _sNewNumber;
}
return(_sNewNumber);
}
_nLoop = _nlength;
while (_nLoop > 1) {
_sNewString = (" " + _sNumber.substr(-3)) + _sNewString;
_sNumber = _sNumber.substr(0, -3);
_nLoop--;
}
_sNewNumber = _sNumber + _sNewString;
if (_sNewNumber.length < _nMinimumChar) {
_sNewNumber = "0" + _sNewNumber;
}
return(_sNewNumber);
}
function getScores() {
if (gProxyObj == undefined) {
listScores();
} else {
gProxyObj.getScores(cbFunc2);
}
}
function submitScore(theScore) {
gProxyObj.submitScore(theScore, cbFunc);
}
function initHiScores() {
gProxyObj.setGame_Id("sb_dunce");
}
function getScoreString() {
var _local5 = "Oops! The high score list isn't available right now!";
if (gProxyObj != undefined) {
var _local7 = gProxyObj.getScoreCount();
if (_local7 > 0) {
var _local1;
var _local6;
var _local3;
var _local4;
_local5 = "";
_local1 = 0;
while (_local1 < _local7) {
_local6 = gProxyObj.getScoreItem(_local1);
_local3 = _local6[0];
_local4 = fStyleNumber(_local6[1]);
spaceNb = (35 - _local3.length) - _local4.length;
spaceTXT = "";
var _local2 = 0;
while (_local2 < spaceNb) {
spaceTXT = spaceTXT + " ";
_local2++;
}
if (_local1 < 9) {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
} else if (_local1 < 99) {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
} else {
_local5 = _local5 + ((((((_local1 + 1) + " ") + _local3) + spaceTXT) + _local4) + newline);
}
_local1++;
}
} else {
_local5 = "Whoops, the high scores seem to have escaped!";
}
}
return(_local5);
}
function listScores() {
_parent.ScrSubmit.txt_highScore.text = getScoreString();
}
function cbFunc(thisBool) {
if (thisBool) {
listScores();
} else {
_parent.ScrSubmit.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!";
}
}
function cbFunc2(thisBool) {
if (thisBool) {
listScores();
} else {
_parent.ScrSubmit.txt_highScore.text = "Oops! The high score list isn\u2019t available right now!";
}
}
_global.HS = this;
}
Frame 2
ifFrameLoaded (211) {
gotoAndStop ("TitleCard");
}
Frame 3
stop();
Instance of Symbol 67 MovieClip "Sounds" in Frame 11
onClipEvent (load) {
_global.Sounds = this;
Items = new Object();
G_TabSonFade = new Array();
Mute = false;
Controlled = new Array("MusInGame", "MusInPack", "BtnFlag", "SmallBell1", "PowerBob2", "PowerPat2", "PowerPat3", "Nage6", "Nage5", "PowerSandy1", "PowerSandy3", "Nage1", "FlagEnter", "Flag3", "Collide12", "Collide17", "Collide15", "BigHit4", "BigHit6", "Eclair2", "Wind1", "Pop4", "Pop5", "SelectPers9", "Bounce1", "Die6", "PowerSquid5", "HitSpike1", "HitElectro1", "MeduseDie8");
for (i in Controlled) {
this.createEmptyMovieClip(Controlled[i], i + 1);
this[Controlled[i]] = new Sound(Controlled[i]);
this[Controlled[i]].attachSound(Controlled[i]);
Items[Controlled[i]] = new Object();
Items[Controlled[i]].Nom = Controlled[i];
Items[Controlled[i]].Volume = 0;
}
PlaySound = function (l_Name, l_Vol, l_NbLoop) {
SetVolume(l_Name, l_Vol);
eval (l_Name).start(0, l_NbLoop);
};
StopSound = function (l_Name) {
SetVolume(l_Name, 0);
eval (l_Name).stop();
};
SetVolume = function (l_Name, l_Vol) {
Items[l_Name].Volume = l_Vol;
if (Mute) {
eval (l_Name).setVolume(0);
} else {
eval (l_Name).setVolume(l_Vol);
}
};
DoFade = function (l_Name, l_Vol, l_DirFade, l_SpdFade, l_Index) {
var _local1 = Items[l_Name].Volume;
if (l_DirFade == "In") {
if ((_local1 + l_SpdFade) < l_Vol) {
SetVolume(l_Name, _local1 + l_SpdFade);
} else {
SetVolume(l_Name, l_Vol);
G_TabSonFade.splice(l_Index, 1);
}
} else if ((_local1 - l_SpdFade) > l_Vol) {
SetVolume(l_Name, _local1 - l_SpdFade);
} else {
SetVolume(l_Name, l_Vol);
G_TabSonFade.splice(l_Index, 1);
if (l_Vol == 0) {
StopSound(l_Name);
}
}
};
Fade = function () {
for (i in G_TabSonFade) {
DoFade(G_TabSonFade[i][0], G_TabSonFade[i][1], G_TabSonFade[i][2], G_TabSonFade[i][3], i);
}
};
DoMute = function () {
Mute = true;
for (i in Items) {
eval (Items[i].Nom).setVolume(0);
}
};
UndoMute = function () {
Mute = false;
for (i in Items) {
SetVolume(Items[i].Nom, Items[i].Volume);
}
};
}
Frame 12
_global.Sounds.PlaySound("MusInPack", 70, 100000);
stop();
Frame 31
Instance of Symbol 3 MovieClip "Param" in Frame 31
onClipEvent (load) {
_global.Param = this;
G_NbPlayer = 0;
G_LifePlayer1 = 3;
G_LifePlayer2 = 3;
G_PowerPlayer1 = 1;
G_PowerPlayer2 = 1;
G_ScorePlayer1 = 0;
G_ScorePlayer2 = 0;
G_ScoreToSend = 0;
G_BaseLifeScore = 8000;
G_NextLifePlayer1 = G_BaseLifeScore;
G_NextLifePlayer2 = G_BaseLifeScore;
G_SubmitScore = false;
G_GameOver = false;
G_Level = 0;
G_NextLevel = 0;
G_LvlType = "Normal";
G_PlayerChoice = new Array("Bob", "Pat", "Squid", "Sandy");
G_Player1Choice = "";
G_Player2Choice = "";
G_Player3Choice = "";
G_Player4Choice = "";
G_CurrentPlayerChoosing = 1;
G_SetPlayerEnemy = function () {
var _local2 = false;
var _local1 = 0;
if (G_Player1Choice != "") {
while (!_local2) {
if (G_PlayerChoice[_local1] == G_Player1Choice) {
G_PlayerChoice.splice(_local1, 1);
_local2 = true;
}
_local1++;
}
_local2 = false;
_local1 = 0;
}
if (G_Player2Choice != "") {
while (!_local2) {
if (G_PlayerChoice[_local1] == G_Player2Choice) {
G_PlayerChoice.splice(_local1, 1);
_local2 = true;
}
_local1++;
}
_local1 = 0;
}
if (G_Player2Choice == "") {
G_Player2Choice = G_PlayerChoice.splice(0, 1);
}
G_Player3Choice = G_PlayerChoice.splice(0, 1);
G_Player4Choice = G_PlayerChoice.splice(0, 1);
};
}
Frame 41
stop();
Frame 71
_global.Param.G_LvlType = "Normal";
Frame 81
_global.Param.G_LvlType = "Bonus";
Frame 91
_global.Param.G_LvlType = "Normal";
Frame 101
_global.Param.G_LvlType = "Bonus";
Frame 111
_global.Param.G_LvlType = "Normal";
Frame 121
_global.Param.G_LvlType = "Bonus";
Frame 131
_global.Param.G_LvlType = "Normal";
Frame 141
_global.Param.G_LvlType = "Bonus";
Frame 151
_global.Param.G_LvlType = "Normal";
Frame 161
_global.Param.G_LvlType = "Bonus";
Frame 171
_global.Sounds.StopSound("MusInPack");
Frame 181
_global.Sounds.StopSound("MusInPack");
Frame 191
_global.Sounds.StopSound("MusInPack");
_global.Sounds.StopSound("MusInGame");
Symbol 7 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
on (keyPress "<Enter>") {
return(undefined);
}
on (keyPress "F") {
return(undefined);
}
on (keyPress "S") {
return(undefined);
}
on (keyPress "E") {
return(undefined);
}
on (keyPress "<Space>") {
return(undefined);
}
Symbol 1212 MovieClip [__Packages.PlateObj] Frame 0
class PlateObj
{
var RefMov, Nom, Type, PosX, PosY, DistU, DistD, DistR, DistL, BlocMove;
function PlateObj (l_RefMov) {
RefMov = l_RefMov;
Nom = RefMov._name;
Type = "Plate";
PosX = int(RefMov._x);
PosY = int(RefMov._y);
DistU = Math.abs(int(RefMov.RefDistU._y));
DistD = Math.abs(int(RefMov.RefDistD._y));
DistR = Math.abs(int(RefMov.RefDistR._x));
DistL = Math.abs(int(RefMov.RefDistL._x));
RefMov.RefDistU.swapDepths(10);
RefMov.RefDistU.removeMovieClip();
RefMov.RefDistD.swapDepths(10);
RefMov.RefDistD.removeMovieClip();
RefMov.RefDistR.swapDepths(10);
RefMov.RefDistR.removeMovieClip();
RefMov.RefDistL.swapDepths(10);
RefMov.RefDistL.removeMovieClip();
BlocMove = true;
}
}
Symbol 1213 MovieClip [__Packages.SpikeObj] Frame 0
class SpikeObj extends PlateObj
{
var Type, Dammage;
function SpikeObj (l_RefMov) {
super(l_RefMov);
Type = "Spike";
Dammage = 2;
}
}
Symbol 1214 MovieClip [__Packages.DragonObj] Frame 0
class DragonObj
{
var RefMov, Nom, Type, Etat, EtatOld, Dir, DirOld, PosX, PosY, RBord, LBord, Dammage, KillPlayer, StartTimeWait, NoKillTimeWait, KillTimeWait, TimeWait, NextTimeAct, StartSpdX, BaseSpdX, ModSpdX, MaxSpdX, SpdX, DistU, DistD, DistR, DistL, CrossX, BlocMove, MoveLine, FrDie;
function DragonObj (l_RefMov) {
RefMov = l_RefMov;
Nom = RefMov._name;
Type = "Dragon";
Etat = "Wait";
EtatOld = "Idle";
Dir = "R";
DirOld = "R";
PosX = RefMov._x;
PosY = RefMov._y;
RBord = 530;
LBord = -30;
Dammage = 100;
KillPlayer = false;
switch (_global.Param.G_Level) {
case 1 :
StartTimeWait = 60;
break;
case 3 :
StartTimeWait = 50;
break;
case 5 :
StartTimeWait = 40;
break;
case 7 :
StartTimeWait = 35;
break;
case 9 :
StartTimeWait = 30;
break;
}
NoKillTimeWait = 3;
KillTimeWait = int(StartTimeWait / 2);
TimeWait = StartTimeWait;
NextTimeAct = StartTimeWait;
StartSpdX = 2;
BaseSpdX = 2;
ModSpdX = 1;
MaxSpdX = 7;
SpdX = 0;
DistU = 21;
DistD = 21;
DistR = 29;
DistL = 29;
CrossX = PosX;
BlocMove = false;
MoveLine = new Object();
MoveLine.X1 = 0;
MoveLine.Y1 = 0;
MoveLine.X2 = 0;
MoveLine.Y2 = 0;
MoveLine.M = 0;
MoveLine.B = 0;
FrDie = 11;
}
function SetMoveParam() {
_global.C._parent.attachMovie("Dragon", "Dragon1", 500);
RefMov = _global.C._parent.Dragon1;
_global.C.G_Items.push("Dragon1");
_global.C.G_HitItem.push("Dragon1");
if (random(100) < 50) {
PosX = LBord;
SpdX = BaseSpdX;
DirOld = "L";
Dir = "R";
} else {
PosX = RBord;
SpdX = BaseSpdX * -1;
DirOld = "R";
Dir = "L";
}
BlocMove = true;
SetStartPos();
Etat = "Idle";
}
function SetStartPos() {
var _local3 = random(100);
switch (_global.Param.G_Level) {
case 1 :
if (_local3 <= 33) {
PosY = 49;
} else if (_local3 <= 66) {
PosY = 204;
} else {
PosY = 332;
}
break;
case 3 :
if (_local3 <= 33) {
PosY = 79;
} else if (_local3 <= 66) {
PosY = 154;
} else {
PosY = 259;
}
break;
case 5 :
if (_local3 <= 33) {
PosY = 113;
} else if (_local3 <= 66) {
PosY = 225;
} else {
PosY = 324;
}
break;
case 7 :
if (_local3 <= 33) {
PosY = 40;
} else if (_local3 <= 66) {
PosY = 116;
} else {
PosY = 227;
}
break;
}
RefMov._x = PosX;
RefMov._y = PosY;
}
function SetExitParam() {
if (KillPlayer) {
KillPlayer = false;
BaseSpdX = StartSpdX;
NextTimeAct = _global.C.G_TimeNow + KillTimeWait;
} else {
BaseSpdX = BaseSpdX + ModSpdX;
if (BaseSpdX > MaxSpdX) {
BaseSpdX = MaxSpdX;
}
NextTimeAct = _global.C.G_TimeNow + NoKillTimeWait;
}
BlocMove = false;
Etat = "Wait";
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
}
function Wait() {
}
function PasLa() {
}
function Idle() {
CheckCollide();
Move();
}
function Die() {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 >= FrDie) {
NextTimeAct = _global.C.G_TimeNow + KillTimeWait;
BlocMove = false;
Etat = "Wait";
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
}
}
function Move() {
PosX = PosX + SpdX;
if ((SpdX > 0) and (PosX >= RBord)) {
SetExitParam();
} else if ((SpdX < 0) and (PosX <= LBord)) {
SetExitParam();
}
RefMov._x = int(PosX);
RefMov._y = int(PosY);
}
function CheckCollide() {
SetMoveLine();
CrossX = MoveLine.X2;
for (var _local4 in _global.C.G_Players) {
if ((_global.C[_global.C.G_Players[_local4]] != undefined) and _global.C[_global.C.G_Players[_local4]].BlocMove) {
var _local3 = CheckInRange(_global.C[_global.C.G_Players[_local4]]);
if (_local3) {
CheckHitX(_global.C[_global.C.G_Players[_local4]]);
}
}
}
}
function SetMoveLine() {
MoveLine.X1 = PosX;
MoveLine.X2 = PosX + SpdX;
MoveLine.Y1 = PosY;
MoveLine.Y2 = PosY;
with (MoveLine) {
M = (Y2 - Y1) / (X2 - X1);
B = Y2 - (M * X2);
}
}
function CheckInRange(l_RefItem) {
if (SpdX > 0) {
var _local4 = (PosX + SpdX) + DistR;
var _local3 = PosX - DistL;
} else if (SpdX < 0) {
var _local4 = PosX + DistR;
var _local3 = (PosX + SpdX) - DistL;
}
if ((_local3 <= (l_RefItem.PosX + l_RefItem.DistR)) and (_local4 >= (l_RefItem.PosX - l_RefItem.DistL))) {
return(true);
}
return(false);
}
function CheckHitX(l_RefItem) {
if (!l_RefItem.Invincible) {
if (SpdX > 0) {
var _local4 = (l_RefItem.PosX - l_RefItem.DistL) - DistR;
if ((_local4 >= MoveLine.X1) and (_local4 <= MoveLine.X2)) {
if ((MoveLine.M == Infinity) or (MoveLine.M == (-Infinity))) {
var _local5 = PosY;
} else {
var _local5 = (MoveLine.M * _local4) + MoveLine.B;
}
if ((_local5 >= ((l_RefItem.PosY - l_RefItem.DistU) - DistD)) and (_local5 <= ((l_RefItem.PosY + l_RefItem.DistD) + DistU))) {
KillPlayer = true;
_global.Sounds.PlaySound("HitElectro1", 100, 1);
if ((l_RefItem.Choice == "Sandy") and (l_RefItem.Etat == "UsePower")) {
_global.C.Score.fGetPoints(l_RefItem.Nom, _global.C.Score.mEnemy4Value, Nom);
BlocMove = false;
l_RefItem.DoHitPlate("Rigth");
l_RefItem.Etat = "Bounce";
_global.Sounds.PlaySound("MeduseDie8", 100, 1);
Etat = "Die";
} else {
l_RefItem.GetHurt(this);
}
}
}
} else if (SpdX < 0) {
var _local4 = (l_RefItem.PosX + l_RefItem.DistR) + DistL;
if ((_local4 <= MoveLine.X1) and (_local4 >= MoveLine.X2)) {
if ((MoveLine.M == Infinity) or (MoveLine.M == (-Infinity))) {
var _local5 = PosY;
} else {
var _local5 = (MoveLine.M * _local4) + MoveLine.B;
}
if ((_local5 >= ((l_RefItem.PosY - l_RefItem.DistU) - DistD)) and (_local5 <= ((l_RefItem.PosY + l_RefItem.DistD) + DistU))) {
KillPlayer = true;
_global.Sounds.PlaySound("HitElectro1", 100, 1);
if ((l_RefItem.Choice == "Sandy") and (l_RefItem.Etat == "UsePower")) {
_global.C.Score.fGetPoints("Sandy", _global.C.Score.mEnemy4Value, Nom);
BlocMove = false;
l_RefItem.DoHitPlate("Left");
l_RefItem.PlayBounce();
l_RefItem.Etat = "Bounce";
_global.Sounds.PlaySound("MeduseDie8", 100, 1);
Etat = "Die";
} else {
l_RefItem.PlayBounce();
l_RefItem.GetHurt(this);
}
}
}
}
}
}
function ChangeEtat(l_NewAction) {
with (this) {
if (EtatOld != l_NewAction) {
EtatOld = Etat;
Etat = l_NewAction;
RefMov.Obj.gotoAndStop(l_NewAction);
}
}
}
function ChangeDir(l_NewDir) {
with (this) {
if (DirOld != l_NewDir) {
DirOld = Dir;
Dir = l_NewDir;
RefMov.gotoAndStop(Dir);
}
}
}
function Actions() {
ChangeDir(Dir);
ChangeEtat(Etat);
this[Etat]();
}
}
Symbol 1215 MovieClip [__Packages.CharacterObj] Frame 0
class CharacterObj
{
var RefMov, Nom, Type, Etat, EtatOld, Dir, DirOld, PosX, PosY, WingPush, CanHitSpike, CanHitElectro, SpdX, SpdXMod, SpdXMin, SpdXMax, SpdY, MinBounceUnder, FallSpd, FlyBaseSpd, FlySpd, SpdYMin, SpdYMax, MinBounceX, MinBounceY, CrossX, CrossY, ItemGetHitX, ItemGetHitY, SideHitX, SideHitY, BlocMove, NoHitLg, ChangeSide, MoveLine, RPress, LPress, UpPress, UpRelease, FrBounce, FrFly, RBordOut, LBordIn, RBordIn, LBordOut, Invincible, ModXMove, DistR, DistL, DistU, DistD;
function CharacterObj (l_RefMov) {
RefMov = l_RefMov;
Nom = RefMov._name;
Type = "Player";
Etat = "Wait";
EtatOld = "Idle";
Dir = "R";
DirOld = "L";
PosX = RefMov._x;
PosY = RefMov._y;
WingPush = false;
CanHitSpike = false;
CanHitElectro = false;
SpdX = 0;
SpdXMod = 0.45;
SpdXMin = -9;
SpdXMax = 9;
SpdY = 0;
MinBounceUnder = 1;
FallSpd = 0.23;
FlyBaseSpd = 1.8;
FlySpd = 0;
SpdYMin = -9;
SpdYMax = 13;
MinBounceX = 4;
MinBounceY = 3;
CrossX = PosX;
CrossY = PosY;
ItemGetHitX = "";
ItemGetHitY = "";
SideHitX = "";
SideHitY = "";
BlocMove = true;
NoHitLg = 4;
ChangeSide = false;
MoveLine = new Object();
MoveLine.X1 = 0;
MoveLine.Y1 = 0;
MoveLine.X2 = 0;
MoveLine.Y2 = 0;
MoveLine.M = 0;
MoveLine.B = 0;
RPress = false;
LPress = false;
UpPress = false;
UpRelease = true;
FrBounce = 9;
FrFly = 9;
}
function CheckControl() {
KeyMapping();
SetAction();
}
function KeyMapping() {
if (Key.isDown(39)) {
RPress = true;
} else {
RPress = false;
}
if (Key.isDown(37)) {
LPress = true;
} else {
LPress = false;
}
if (Key.isDown(32)) {
if (UpRelease) {
WingPush = true;
UpPress = true;
UpRelease = false;
}
} else {
UpPress = false;
UpRelease = true;
}
}
function SetAction() {
if (RPress and (!LPress)) {
Dir = "R";
} else if (LPress and (!RPress)) {
Dir = "L";
}
}
function PasLa() {
}
function Idle() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdX();
SetFlySpd();
SetSpdY();
CheckCollide();
if ((Type != "Enemy") or (!_global.C.G_SquidPower)) {
Move();
}
if (Etat == "Idle") {
if (FlySpd != 0) {
Etat = "Fly";
}
}
}
function Fly() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdX();
SetFlySpd();
SetSpdY();
CheckCollide();
Move();
if (Etat == "Fly") {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 2) {
if (Nom == "Player1") {
_global.Sounds.PlaySound("Nage6", 60, 1);
} else if ((Nom == "Player2") and (_global.Param.G_NbPlayer == 2)) {
_global.Sounds.PlaySound("Nage5", 65, 1);
}
}
if ((FlySpd == 0) and (_local3 >= FrFly)) {
Etat = "Idle";
}
}
}
function Bounce() {
Idle();
if (Etat == "Bounce") {
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrBounce) {
Etat = "Idle";
}
}
}
function HurtBounce() {
Idle();
if (Etat == "HurtBounce") {
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrBounce) {
Etat = "Idle";
}
}
}
function Move() {
PosX = CrossX;
PosY = CrossY;
if ((SpdX > 0) and (PosX >= RBordOut)) {
ChangeSide = true;
PosX = RBordOut;
PosY = RefMov._y;
} else if ((SpdX < 0) and (PosX <= LBordOut)) {
ChangeSide = true;
PosX = LBordOut;
PosY = RefMov._y;
}
if (((Type == "Bonus") and (SpdX == 0)) and (!ChangeSide)) {
if (PosX > RBordOut) {
PosX = RBordOut;
} else if (PosX < LBordOut) {
PosX = LBordOut;
}
}
RefMov._x = int(PosX);
RefMov._y = int(PosY);
if (ItemGetHitX != "") {
SelectHit("HitX");
}
if (ItemGetHitY != "") {
SelectHit("HitY");
}
}
function SelectHit() {
}
function CheckCollide() {
SetMoveLine();
CrossX = MoveLine.X2;
CrossY = MoveLine.Y2;
for (var _local4 in _global.C.G_HitItem) {
if (_global.C.G_HitItem[_local4] != Nom) {
if (_global.C[_global.C.G_HitItem[_local4]].RefMov._x != undefined) {
if ((Type != "Bonus") or ((Type == "Bonus") and (_global.C[_global.C.G_HitItem[_local4]].Type != "Enemy"))) {
if ((_global.C[_global.C.G_HitItem[_local4]].Type != "Dragon") or (!Invincible)) {
var _local3 = CheckInRange(_global.C[_global.C.G_HitItem[_local4]]);
if (_local3) {
CheckHitX(_global.C[_global.C.G_HitItem[_local4]]);
CheckHitY(_global.C[_global.C.G_HitItem[_local4]]);
}
}
}
} else {
_global.C.G_HitItem.splice(_local4, 1);
}
}
}
}
function SetMoveLine() {
if ((PosX < LBordOut) and (SpdX >= 0)) {
ModXMove = LBordOut - PosX;
} else if ((PosX > RBordOut) and (SpdX <= 0)) {
ModXMove = RBordOut - PosX;
} else {
ModXMove = 0;
}
MoveLine.X1 = PosX;
MoveLine.X2 = (PosX + SpdX) + ModXMove;
MoveLine.Y1 = PosY;
MoveLine.Y2 = PosY + SpdY;
with (MoveLine) {
M = (Y2 - Y1) / (X2 - X1);
B = Y2 - (M * X2);
}
}
function CheckInRange(l_RefItem) {
if (SpdX > 0) {
var _local4 = ((PosX + SpdX) + DistR) + ModXMove;
var _local3 = (PosX - DistL) + ModXMove;
} else if (SpdX < 0) {
var _local4 = (PosX + DistR) + ModXMove;
var _local3 = ((PosX + SpdX) - DistL) + ModXMove;
} else {
var _local4 = (PosX + DistR) + ModXMove;
var _local3 = (PosX - DistL) + ModXMove;
}
if ((_local3 <= (l_RefItem.PosX + l_RefItem.DistR)) and (_local4 >= (l_RefItem.PosX - l_RefItem.DistL))) {
return(true);
}
return(false);
}
function CheckHitX(l_RefItem) {
if (SpdX > 0) {
var _local3 = (l_RefItem.PosX - l_RefItem.DistL) - DistR;
if ((_local3 >= MoveLine.X1) and (_local3 <= MoveLine.X2)) {
if ((MoveLine.M == Infinity) or (MoveLine.M == (-Infinity))) {
var _local4 = PosY;
} else {
var _local4 = (MoveLine.M * _local3) + MoveLine.B;
}
if ((_local4 >= ((l_RefItem.PosY - l_RefItem.DistU) - DistD)) and (_local4 <= ((l_RefItem.PosY + l_RefItem.DistD) + DistU))) {
if (_local3 <= CrossX) {
if ((((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) or (l_RefItem.Type == "Bonus")) or ((l_RefItem.Type == "Electro") and CanHitElectro)) {
ItemGetHitX = l_RefItem.Nom;
SideHitX = "Left";
}
if ((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) {
CrossX = _local3;
}
}
}
}
} else if (SpdX < 0) {
var _local3 = (l_RefItem.PosX + l_RefItem.DistR) + DistL;
if ((_local3 <= MoveLine.X1) and (_local3 >= MoveLine.X2)) {
if ((MoveLine.M == Infinity) or (MoveLine.M == (-Infinity))) {
var _local4 = PosY;
} else {
var _local4 = (MoveLine.M * _local3) + MoveLine.B;
}
if ((_local4 >= ((l_RefItem.PosY - l_RefItem.DistU) - DistD)) and (_local4 <= ((l_RefItem.PosY + l_RefItem.DistD) + DistU))) {
if (_local3 >= CrossX) {
if ((((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) or (l_RefItem.Type == "Bonus")) or ((l_RefItem.Type == "Electro") and CanHitElectro)) {
ItemGetHitX = l_RefItem.Nom;
SideHitX = "Right";
}
if ((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) {
CrossX = _local3;
}
}
}
}
}
}
function CheckHitY(l_RefItem) {
if (SpdY > 0) {
var _local3 = (l_RefItem.PosY - l_RefItem.DistU) - DistD;
if ((_local3 >= MoveLine.Y1) and (_local3 <= MoveLine.Y2)) {
if ((MoveLine.M == Infinity) or (MoveLine.M == (-Infinity))) {
var _local4 = PosX;
} else {
var _local4 = (_local3 - MoveLine.B) / MoveLine.M;
}
if ((_local4 >= ((l_RefItem.PosX - l_RefItem.DistL) - DistL)) and (_local4 <= ((l_RefItem.PosX + l_RefItem.DistR) + DistR))) {
if (_local3 <= CrossY) {
if ((((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) or (l_RefItem.Type == "Bonus")) or ((l_RefItem.Type == "Electro") and CanHitElectro)) {
ItemGetHitY = l_RefItem.Nom;
SideHitY = "Top";
}
if ((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) {
CrossY = _local3;
}
}
}
}
} else if (SpdY < 0) {
var _local3 = (l_RefItem.PosY + l_RefItem.DistD) + DistU;
if ((_local3 <= MoveLine.Y1) and (_local3 >= MoveLine.Y2)) {
if ((MoveLine.M == Infinity) or (MoveLine.M == (-Infinity))) {
var _local4 = PosX;
} else {
var _local4 = (_local3 - MoveLine.B) / MoveLine.M;
}
if ((_local4 >= ((l_RefItem.PosX - l_RefItem.DistL) - DistL)) and (_local4 <= ((l_RefItem.PosX + l_RefItem.DistR) + DistR))) {
if (_local3 >= CrossY) {
if ((((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) or (l_RefItem.Type == "Bonus")) or ((l_RefItem.Type == "Electro") and CanHitElectro)) {
ItemGetHitY = l_RefItem.Nom;
SideHitY = "Bottom";
}
if ((l_RefItem.BlocMove == true) and (!(((Type == "Bonus") or (Type == "Enemy")) and (l_RefItem.Type == "Dragon")))) {
CrossY = _local3;
}
}
}
}
}
}
function SetSpdX() {
if (RPress and (!LPress)) {
if (SpdX < SpdXMax) {
if (SpdX < 0) {
SpdX = SpdX + (2 * SpdXMod);
} else {
SpdX = SpdX + SpdXMod;
}
if (SpdX > SpdXMax) {
SpdX = SpdXMax;
}
}
} else if (LPress and (!RPress)) {
if (SpdX > SpdXMin) {
if (SpdX > 0) {
SpdX = SpdX - (2 * SpdXMod);
} else {
SpdX = SpdX - SpdXMod;
}
if (SpdX < SpdXMin) {
SpdX = SpdXMin;
}
}
} else if (SpdX > 0) {
SpdX = SpdX - SpdXMod;
if (SpdX < 0) {
SpdX = 0;
}
} else {
SpdX = SpdX + SpdXMod;
if (SpdX > 0) {
SpdX = 0;
}
}
if (SpdX < SpdXMin) {
SpdX = SpdX + SpdXMod;
if (SpdX > SpdXMin) {
SpdX = SpdXMin;
}
} else if (SpdX > SpdXMax) {
SpdX = SpdX - SpdXMod;
if (SpdX < SpdXMax) {
SpdX = SpdXMax;
}
}
}
function SetSpdY() {
SpdY = SpdY + (FallSpd - FlySpd);
if (SpdY > SpdYMax) {
SpdY = SpdYMax;
} else if (SpdY < SpdYMin) {
SpdY = SpdYMin;
}
}
function SetFlySpd() {
if (WingPush) {
FlySpd = FlyBaseSpd;
WingPush = false;
} else if (FlySpd > 0) {
FlySpd = FlySpd - 0.5;
} else {
FlySpd = 0;
}
}
function DoPersHit(l_SideHit, l_Hitted) {
switch (l_SideHit) {
case "Right" :
if (l_Hitted.SpdX >= 0) {
l_Hitted.SpdX = SpdX;
} else {
l_Hitted.SpdX = l_Hitted.SpdX + (SpdX / 2);
}
SpdX = SpdX * -1;
l_Hitted.SpdX = int(l_Hitted.SpdX);
SpdX = int(SpdX);
if (SpdX < MinBounceX) {
SpdX = MinBounceX;
}
if ((l_Hitted.SpdX * -1) < l_Hitted.MinBounceX) {
l_Hitted.SpdX = l_Hitted.MinBounceX * -1;
}
break;
case "Left" :
if (l_Hitted.SpdX >= 0) {
l_Hitted.SpdX = SpdX;
} else {
l_Hitted.SpdX = l_Hitted.SpdX + (SpdX / 2);
}
SpdX = SpdX * -1;
l_Hitted.SpdX = int(l_Hitted.SpdX);
SpdX = int(SpdX);
if ((SpdX * -1) < MinBounceX) {
SpdX = MinBounceX * -1;
}
if (l_Hitted.SpdX < l_Hitted.MinBounceX) {
l_Hitted.SpdX = l_Hitted.MinBounceX;
}
break;
case "Top" :
if (l_Hitted.SpdY <= 0) {
l_Hitted.SpdY = SpdY / 2;
} else {
l_Hitted.SpdY = (l_Hitted.SpdY / 2) + (SpdY / 2);
}
SpdY = (SpdY / 2) * -1;
l_Hitted.SpdY = int(l_Hitted.SpdY);
SpdY = int(SpdY);
if ((SpdY * -1) < MinBounceY) {
SpdY = MinBounceY * -1;
}
if (l_Hitted.SpdY < l_Hitted.MinBounceY) {
l_Hitted.SpdY = l_Hitted.MinBounceY;
}
break;
case "Bottom" :
if (l_Hitted.SpdY >= 0) {
l_Hitted.SpdY = SpdY / 2;
} else {
l_Hitted.SpdY = (l_Hitted.SpdY / 2) + (SpdY / 2);
}
SpdY = (SpdY / 2) * -1;
l_Hitted.SpdY = int(l_Hitted.SpdY);
SpdY = int(SpdY);
if (SpdY < MinBounceY) {
SpdY = MinBounceY;
}
if ((l_Hitted.SpdY * -1) < l_Hitted.MinBounceY) {
l_Hitted.SpdY = l_Hitted.MinBounceY * -1;
}
break;
}
}
function PlayBounce() {
if (_global.C._parent.SonBounce._currentframe == 1) {
_global.C._parent.SonBounce.gotoAndPlay(2);
_global.Sounds.PlaySound("Bounce1", 100, 1);
_global.Sounds.PlaySound("Collide17", 100, 1);
}
}
function PlayHurtBounce() {
if (_global.C._parent.SonBounce._currentframe == 1) {
_global.C._parent.SonBounce.gotoAndPlay(2);
if (random(100) < 50) {
_global.Sounds.PlaySound("Collide15", 100, 1);
_global.Sounds.PlaySound("BigHit6", 80, 1);
} else {
_global.Sounds.PlaySound("Collide12", 100, 1);
_global.Sounds.PlaySound("BigHit4", 80, 1);
}
}
}
function ChangeEtat(l_NewAction) {
if (EtatOld != l_NewAction) {
EtatOld = Etat;
Etat = l_NewAction;
RefMov.Obj.gotoAndStop(l_NewAction);
}
}
function ChangeDir(l_NewDir) {
if (DirOld != l_NewDir) {
var _local2 = RefMov.Obj.Etat._currentframe;
DirOld = Dir;
Dir = l_NewDir;
RefMov.gotoAndStop(Dir);
RefMov.Obj.Etat.gotoAndPlay(_local2);
}
}
function Actions() {
ChangeDir(Dir);
ChangeEtat(Etat);
CheckControl();
ChangeDir(Dir);
ChangeEtat(Etat);
this[Etat]();
ChangeDir(Dir);
ChangeEtat(Etat);
}
}
Symbol 1216 MovieClip [__Packages.PlayerObj] Frame 0
class PlayerObj extends CharacterObj
{
var Choice, Nom, CanHitSpike, CanHitElectro, Etat, DistU, DistD, DistR, DistL, RBordIn, LBordIn, RBordOut, LBordOut, StartX, StartY, MaxHealth, Health, Dammage, LanceDist, IsOver, SquidPowerTime, SpitDistX, SpitDistY, SpPress, Invincible, BlocMove, Type, FrStartWait, FrWait, FrEndWait, FrDie, FrPower, RefMov, SetSpdY, SetMoveLine, CrossX, MoveLine, CrossY, CheckInRange, CheckHitY, Move, UpPress, LPress, RPress, ChangeSide, PosX, SetSpdX, SetFlySpd, CheckCollide, SpdX, SpdY, PosY, Dir, StartDir, FlySpd, WingPush, UpRelease, KeyMapping, ItemGetHitX, ItemGetHitY, PlayBounce, MinBounceUnder, SideHitY, SideHitX, MinBounceY, DoPersHit, NoHitLg, PlayHurtBounce, DirOld;
function PlayerObj (l_RefMov) {
super(l_RefMov);
Choice = _global.Param[("G_" + Nom) + "Choice"];
if ((Choice == "Pat") or (Choice == "Squid")) {
CanHitSpike = true;
} else {
CanHitElectro = true;
}
Etat = "StartWait";
DistU = 30;
DistD = 0;
DistR = 14;
DistL = 14;
RBordIn = 675;
LBordIn = -175;
RBordOut = 520;
LBordOut = -20;
StartX = l_RefMov._x;
StartY = l_RefMov._y;
if (_global.Param.G_LvlType == "Normal") {
MaxHealth = 20;
} else {
MaxHealth = 10;
}
Health = MaxHealth;
Dammage = 2;
LanceDist = 10;
IsOver = false;
SquidPowerTime = 5;
SpitDistX = 24;
SpitDistY = 29;
SpPress = false;
Invincible = false;
BlocMove = false;
Type = "Player";
FrStartWait = 29;
FrWait = 90;
FrEndWait = 4;
FrDie = 40;
if (Choice == "Bob") {
FrPower = 301;
} else if (Choice == "Pat") {
FrPower = 8;
} else if (Choice == "Squid") {
FrPower = 49;
} else {
FrPower = 176;
}
}
function StartWait() {
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrStartWait) {
Etat = "Wait";
}
}
function Wait() {
SetSpdY();
SetMoveLine();
CrossX = MoveLine.X2;
CrossY = MoveLine.Y2;
for (var _local4 in _global.C.G_HitItem) {
var _local3 = CheckInRange(_global.C[_global.C.G_HitItem[_local4]]);
if (_local3) {
CheckHitY(_global.C[_global.C.G_HitItem[_local4]]);
}
}
Move();
var _local5 = RefMov.Obj.Etat._currentframe;
if ((((_local5 >= FrWait) or RPress) or LPress) or UpPress) {
Etat = "EndWait";
}
}
function EndWait() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdX();
SetFlySpd();
SetSpdY();
CheckCollide();
Move();
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrEndWait) {
BlocMove = true;
Etat = "Idle";
}
}
function Die() {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 2) {
_global.Sounds.PlaySound("Die6", 100, 1);
}
if (_local3 >= FrDie) {
if (_global.Param.G_LvlType == "Bonus") {
IsOver = true;
Etat = "PasLa";
} else if (_global.Param["G_Life" + Nom] <= 0) {
IsOver = true;
Etat = "PasLa";
} else {
StartPlay();
}
}
}
function GetHurt(l_Killer) {
if (!Invincible) {
if ((Etat != "HurtBounce") or (l_Killer.Type == "Dragon")) {
if (Choice == "Sandy") {
_global.Sounds.StopSound("PowerSandy3");
}
Health = Health - l_Killer.Dammage;
if (Health < 0) {
Health = 0;
}
RefMov._parent["Stat" + Nom].LifeBar.gotoAndStop(101 - int((Health / MaxHealth) * 100));
if (Health == 0) {
if (_global.Param.G_LvlType != "Bonus") {
if (l_Killer.Type != "Player") {
_global.Param["G_Life" + Nom]--;
if (_global.Param["G_Life" + Nom] <= 0) {
_global.Param["G_Life" + Nom] = -1;
RefMov._parent["Stat" + Nom].NbLife.TxtNbLife = 0;
} else {
RefMov._parent["Stat" + Nom].NbLife.TxtNbLife = _global.Param["G_Life" + Nom] - 1;
}
}
} else if (l_Killer.Type == "Player") {
if ((l_Killer.Nom == "Player1") or ((l_Killer.Nom == "Player2") and (_global.Param.G_NbPlayer == 2))) {
_global.C.Score.fGetPoints(l_Killer.Nom, _global.C.Score.mBonusPlayer, Nom);
}
}
SpdX = 0;
SpdY = 0;
BlocMove = false;
Etat = "Die";
} else {
if (_global.Param.G_LvlType == "Bonus") {
if ((l_Killer.Nom == "Player1") or ((l_Killer.Nom == "Player2") and (_global.Param.G_NbPlayer == 2))) {
_global.C.Score.fGetPoints(l_Killer.Nom, _global.C.Score.mBonusHitPlayer, Nom);
}
}
Etat = "HurtBounce";
}
}
}
}
function StartPlay() {
PosX = StartX;
PosY = StartY;
Dir = StartDir;
RefMov._x = StartX;
RefMov._y = StartY;
SpdX = 0;
SpdY = 0;
FlySpd = 0;
WingPush = false;
RPress = false;
LPress = false;
UpPress = false;
UpRelease = true;
Health = MaxHealth;
RefMov._parent["Stat" + Nom].LifeBar.gotoAndStop(101 - int((Health / MaxHealth) * 100));
Etat = "StartWait";
}
function CheckControl() {
KeyMapping();
SetAction();
}
function SelectHit(l_DirHit) {
if (l_DirHit == "HitX") {
var _local3 = _global.C[ItemGetHitX];
} else {
var _local3 = _global.C[ItemGetHitY];
}
switch (_local3.Type) {
case "Plate" :
DoHitPlate(l_DirHit);
break;
case "Spike" :
DoHitSpike(_local3, l_DirHit);
break;
case "Electro" :
DoHitElectro(_local3);
break;
case "Player" :
if (_local3.BlocMove) {
DoHitPlayer(_local3, l_DirHit);
}
break;
case "Enemy" :
if (_local3.BlocMove) {
DoHitEnemy(_local3, l_DirHit);
}
break;
case "Dragon" :
if (_local3.BlocMove) {
_local3.KillPlayer = true;
PlayBounce();
if ((Choice == "Sandy") and (Etat == "UsePower")) {
_global.C.Score.fGetPoints(Nom, _global.C.Score.mEnemy4Value, _local3.Type);
_local3.BlocMove = false;
_global.Sounds.PlaySound("MeduseDie8", 100, 1);
_local3.Etat = "Die";
Etat = "Bounce";
DoHitPlate(l_DirHit);
} else {
_global.Sounds.PlaySound("HitElectro1", 100, 1);
GetHurt(_local3);
}
}
break;
case "Bonus" :
DoHitBonus(_local3);
break;
}
if (l_DirHit == "HitX") {
ItemGetHitX = "";
} else {
ItemGetHitY = "";
}
}
function DoHitPlate(l_DirHit) {
if (l_DirHit == "HitX") {
SpdX = SpdX * -1;
SpdX = int(SpdX);
} else {
SpdY = (SpdY / 3) * -1;
if ((SideHitY == "Bottom") and (SpdY < MinBounceUnder)) {
SpdY = MinBounceUnder;
}
SpdY = int(SpdY);
}
}
function DoHitSpike(l_Hitted, l_DirHit) {
if (!CanHitSpike) {
DoHitPlate(l_DirHit);
} else {
_global.Sounds.PlaySound("HitSpike1", 80, 1);
_global.Sounds.PlaySound("Collide15", 100, 1);
if (l_DirHit == "HitX") {
var _local3 = SideHitX;
} else {
var _local3 = SideHitY;
}
switch (_local3) {
case "Right" :
SpdX = SpdX * -1;
SpdX = int(SpdX);
break;
case "Left" :
SpdX = SpdX * -1;
SpdX = int(SpdX);
break;
case "Top" :
SpdY = (SpdY / 2) * -1;
SpdY = int(SpdY);
if ((SpdY * -1) < MinBounceY) {
SpdY = MinBounceY * -1;
}
break;
case "Bottom" :
SpdY = (SpdY / 2) * -1;
SpdY = int(SpdY);
if (SpdY < MinBounceY) {
SpdY = MinBounceY;
}
break;
}
GetHurt(l_Hitted);
}
}
function DoHitElectro(l_Hitted) {
if (CanHitElectro) {
if (!Invincible) {
_global.Sounds.PlaySound("HitElectro1", 100, 1);
}
GetHurt(l_Hitted);
}
}
function DoHitPlayer(l_Hitted, l_DirHit) {
if (_global.Param.G_LvlType == "Bonus") {
DoHitEnemy(l_Hitted, l_DirHit);
} else {
PlayBounce();
if ((Etat == "Idle") or (Etat == "Fly")) {
Etat = "Bounce";
}
if ((l_Hitted.Etat == "Idle") or (l_Hitted.Etat == "Fly")) {
l_Hitted.Etat = "Bounce";
}
if (l_DirHit == "HitX") {
if (SideHitX == "Right") {
DoPersHit("Right", l_Hitted);
} else {
DoPersHit("Left", l_Hitted);
}
} else if (SideHitY == "Top") {
DoPersHit("Top", l_Hitted);
} else {
DoPersHit("Bottom", l_Hitted);
}
}
}
function DoHitEnemy(l_Hitted, l_DirHit) {
if ((Etat == "Idle") or (Etat == "Fly")) {
Etat = "Bounce";
}
if ((l_Hitted.Etat == "Idle") or (l_Hitted.Etat == "Fly")) {
l_Hitted.Etat = "Bounce";
}
if (l_DirHit == "HitX") {
if (SideHitX == "Right") {
var _local4 = PosY - LanceDist;
var _local3 = l_Hitted.PosY - l_Hitted.LanceDist;
var _local5 = Math.abs(_local4 - _local3);
DoPersHit("Right", l_Hitted);
if (_local5 > NoHitLg) {
if (_local4 < _local3) {
if (Dir == "L") {
PlayHurtBounce();
l_Hitted.GetHurt(this);
} else {
PlayBounce();
}
} else if (l_Hitted.Dir == "R") {
PlayHurtBounce();
GetHurt(l_Hitted);
} else {
PlayBounce();
}
} else {
PlayBounce();
}
} else {
var _local4 = PosY - LanceDist;
var _local3 = l_Hitted.PosY - l_Hitted.LanceDist;
var _local5 = Math.abs(_local4 - _local3);
DoPersHit("Left", l_Hitted);
if (_local5 > NoHitLg) {
if (_local4 < _local3) {
if (Dir == "R") {
l_Hitted.GetHurt(this);
PlayHurtBounce();
} else {
PlayBounce();
}
} else if (l_Hitted.Dir == "L") {
GetHurt(l_Hitted);
PlayHurtBounce();
} else {
PlayBounce();
}
} else {
PlayBounce();
}
}
} else if (SideHitY == "Top") {
PlayHurtBounce();
DoPersHit("Top", l_Hitted);
l_Hitted.GetHurt(this);
} else {
PlayHurtBounce();
DoPersHit("Bottom", l_Hitted);
GetHurt(l_Hitted);
}
}
function DoHitBonus(l_Hitted) {
if (l_Hitted.NoBonus == 4) {
if (l_Hitted.Etat == "PowerBonus") {
AddPower();
_global.C.Score.fGetPoints(Nom, _global.C.Score.mBonus4Value, l_Hitted.Nom);
l_Hitted.Etat = "PowerPicked";
}
} else if ((l_Hitted.Etat == "Bonus") or (l_Hitted.Etat == "Idle")) {
var _local4 = 0;
switch (l_Hitted.NoBonus) {
case 1 :
_local4 = _global.C.Score.mBonus1Value;
break;
case 2 :
_local4 = _global.C.Score.mBonus2Value;
break;
case 3 :
_local4 = _global.C.Score.mBonus3Value;
}
_global.C.Score.fGetPoints(Nom, _local4, l_Hitted.Nom);
l_Hitted.Etat = "Picked";
}
}
function AddPower() {
if (_global.Param["G_Power" + Nom] < 3) {
_global.Param["G_Power" + Nom]++;
RefMov._parent["Stat" + Nom].NbPower.gotoAndStop(_global.Param["G_Power" + Nom] + 1);
}
}
function SetAction() {
if (RPress and (!LPress)) {
Dir = "R";
} else if (LPress and (!RPress)) {
Dir = "L";
}
if (_global.Param.G_LvlType == "Normal") {
if ((SpPress and (_global.Param["G_Power" + Nom] > 0)) and ((Etat == "Idle") or (Etat == "Fly"))) {
if ((!((Choice == "Pat") and (_global.C.Spit1.RefMov._x != undefined))) and (!((Choice == "Squid") and _global.C.G_SquidPower))) {
_global.Param["G_Power" + Nom]--;
RefMov._parent["Stat" + Nom].NbPower.gotoAndStop(_global.Param["G_Power" + Nom] + 1);
if (Choice == "Bob") {
Invincible = true;
} else if (Choice == "Pat") {
_global.C.G_WhoUsePat = Nom;
_global.C.G_PatPower = true;
}
if (Choice == "Bob") {
_global.Sounds.PlaySound("PowerBob2", 0, 100);
_global.Sounds.G_TabSonFade.push(["PowerBob2", 40, "In", 2]);
} else if (Choice == "Sandy") {
_global.Sounds.PlaySound("PowerSandy1", 100, 1);
} else if (Choice == "Squid") {
_global.C.G_SquidPowerEnd = _global.C.G_TimeNowSquid + SquidPowerTime;
_global.C.G_SquidPower = true;
_global.Sounds.PlaySound("PowerSquid5", 100, 1);
}
Etat = "UsePower";
}
}
}
if (Etat != "UsePower") {
if (Choice == "Bob") {
_global.Sounds.StopSound("PowerBob2");
} else if (Choice == "Sandy") {
_global.Sounds.StopSound("PowerSandy3");
}
}
}
function UsePower() {
this[Choice + "UsePower"]();
}
function BobUsePower() {
if (FlySpd != 0) {
RefMov.Obj.Etat.Fly.play();
}
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdX();
SetFlySpd();
SetSpdY();
CheckCollide();
Move();
if (Etat == "UsePower") {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 >= FrPower) {
Invincible = false;
_global.Sounds.G_TabSonFade.push(["PowerBob2", 0, "Out", 5]);
Etat = "Idle";
}
} else {
Invincible = false;
_global.Sounds.StopSound("PowerBob2");
}
}
function PatUsePower() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdX();
SetFlySpd();
SetSpdY();
CheckCollide();
Move();
if (Etat == "UsePower") {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 1) {
_global.Sounds.PlaySound("PowerPat3", 100, 1);
}
if (_local3 == 5) {
_global.C._parent.attachMovie("Spit", "Spit1", _global.C.G_IndexDepth);
_global.C.G_IndexDepth++;
_global.C.Spit1.Initial(this);
}
if (_local3 >= FrPower) {
Etat = "Idle";
}
}
}
function SquidUsePower() {
SpdX = 0;
SpdY = 0;
if (Etat == "UsePower") {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 1) {
_global.Sounds.PlaySound("PowerSquid1", 100, 1);
}
if (_local3 >= FrPower) {
Etat = "Idle";
}
}
}
function SandyUsePower() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdX();
SetFlySpd();
SetSpdY();
CheckCollide();
Move();
if (Etat == "UsePower") {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 6) {
_global.Sounds.PlaySound("PowerSandy3", 100, 10000);
_global.Sounds.G_TabSonFade.push(["PowerSandy3", 70, "In", 5]);
}
if (_local3 >= FrPower) {
Etat = "Idle";
}
}
}
function ChangeDir(l_NewDir) {
if (DirOld != l_NewDir) {
var _local2 = RefMov.Obj.Etat._currentframe;
DirOld = Dir;
Dir = l_NewDir;
RefMov.gotoAndStop(Choice + Dir);
RefMov.Obj.Etat.gotoAndPlay(_local2);
}
}
}
Symbol 1217 MovieClip [__Packages.SpitObj] Frame 0
class SpitObj extends PlayerObj
{
var BaseSpdX, FrHit, DistU, DistD, DistR, DistL, Dammage, ChangeSide, RBordOut, PosX, LBordIn, RBordIn, RefMov, CheckCollide, Move, Etat, RPress, LPress, SpdX, PosY, SpdY, FallSpd, SpdYMax, ItemGetHitX, ItemGetHitY, SideHitX, DoPersHit, SideHitY, EtatOld, DirOld, Dir;
function SpitObj (l_RefMov) {
super(l_RefMov);
BaseSpdX = 20;
FrHit = 20;
DistU = 5;
DistD = 5;
DistR = -10;
DistL = -10;
Dammage = 10;
}
function Fly() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetSpdY();
CheckCollide();
Move();
}
function Hit() {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 1) {
_global.Sounds.PlaySound("PowerPat2", 100, 1);
}
if (_local3 >= FrHit) {
Etat = "Destroy";
}
}
function Destroy() {
RefMov.swapDepths(10);
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
}
function Initial(l_Shooter) {
RefMov = _global.C._parent.Spit1;
if (l_Shooter.Dir == "R") {
RefMov._x = l_Shooter.RefMov._x + l_Shooter.SpitDistX;
PosX = RefMov._x;
RPress = true;
LPress = false;
SpdX = BaseSpdX;
} else {
RefMov._x = l_Shooter.RefMov._x - l_Shooter.SpitDistX;
PosX = RefMov._x;
RPress = false;
LPress = true;
SpdX = BaseSpdX * -1;
}
RefMov._y = l_Shooter.RefMov._y - l_Shooter.SpitDistY;
PosY = RefMov._y;
SpdY = 0;
_global.C.G_Items.push("Spit1");
_global.C.G_HitItem.push("Spit1");
Etat = "Fly";
}
function SetSpdY() {
SpdY = SpdY + FallSpd;
if (SpdY > SpdYMax) {
SpdY = SpdYMax;
}
}
function SelectHit(l_DirHit) {
if (l_DirHit == "HitX") {
var _local3 = _global.C[ItemGetHitX];
} else {
var _local3 = _global.C[ItemGetHitY];
}
switch (_local3.Type) {
case "Plate" :
DoHitPlate(l_DirHit, _local3);
break;
case "Spike" :
DoHitSpike(_local3, l_DirHit);
break;
case "Electro" :
DoHitElectro(_local3);
break;
case "Player" :
if (_local3.BlocMove) {
DoHitPlayer(_local3, l_DirHit);
}
break;
case "Enemy" :
if (_local3.BlocMove) {
DoHitEnemy(_local3, l_DirHit);
}
break;
case "Dragon" :
Etat = "Hit";
break;
case "Bonus" :
DoHitBonus(_local3);
break;
}
if (l_DirHit == "HitX") {
ItemGetHitX = "";
} else {
ItemGetHitY = "";
}
}
function DoHitPlate(l_DirHit, l_Hitted) {
if (l_DirHit == "HitX") {
Etat = "Hit";
} else if (_global.C._parent[l_Hitted.Nom].IsGround) {
Etat = "Hit";
} else {
SpdY = (SpdY / 3) * -1;
}
}
function DoHitSpike(l_Hitted, l_DirHit) {
DoHitPlate(l_DirHit);
}
function DoHitElectro(l_Hitted) {
}
function DoHitPlayer(l_Hitted, l_DirHit) {
if ((l_Hitted.Etat == "Idle") or (l_Hitted.Etat == "Fly")) {
l_Hitted.Etat = "Bounce";
}
if (l_DirHit == "HitX") {
if (SideHitX == "Right") {
DoPersHit("Right", l_Hitted);
} else {
DoPersHit("Left", l_Hitted);
}
} else if (SideHitY == "Top") {
DoPersHit("Top", l_Hitted);
} else {
DoPersHit("Bottom", l_Hitted);
}
_global.Sounds.PlaySound("PowerPat3", 100, 1);
Etat = "Hit";
}
function DoHitEnemy(l_Hitted, l_DirHit) {
if ((l_Hitted.Etat == "Idle") or (l_Hitted.Etat == "Fly")) {
l_Hitted.Etat = "Bounce";
}
if (l_DirHit == "HitX") {
if (SideHitX == "Right") {
DoPersHit("Right", l_Hitted);
l_Hitted.GetHurt(this);
} else {
DoPersHit("Left", l_Hitted);
l_Hitted.GetHurt(this);
}
} else if (SideHitY == "Top") {
DoPersHit("Top", l_Hitted);
l_Hitted.GetHurt(this);
} else {
DoPersHit("Bottom", l_Hitted);
l_Hitted.GetHurt(this);
}
Etat = "Hit";
}
function DoHitBonus(l_Hitted) {
}
function ChangeEtat(l_NewAction) {
if (EtatOld != l_NewAction) {
EtatOld = Etat;
Etat = l_NewAction;
RefMov.Obj.gotoAndStop(l_NewAction);
}
}
function ChangeDir(l_NewDir) {
if (DirOld != l_NewDir) {
DirOld = Dir;
Dir = l_NewDir;
RefMov.gotoAndStop(Dir);
}
}
function Actions() {
ChangeDir(Dir);
ChangeEtat(Etat);
this[Etat]();
}
}
Symbol 1218 MovieClip [__Packages.ElectroObj] Frame 0
class ElectroObj extends PlateObj
{
var Type, Dammage, BlocMove, DistU, PosY, DistD, DistR, PosX, DistL;
function ElectroObj (l_RefMov) {
super(l_RefMov);
Type = "Electro";
Dammage = 2;
BlocMove = false;
}
function CheckCollide() {
if (_global.C.Player1.CanHitElectro and (!_global.C.Player1.Invincible)) {
if (((_global.C.Player1.PosY - _global.C.Player1.DistU) <= (PosY + DistD)) and ((_global.C.Player1.PosY + _global.C.Player1.DistD) >= (PosY - DistU))) {
var InRange = CheckInRange(_global.C.Player1);
if (InRange) {
with (_global.C.Player1) {
SpdY = (SpdY / 2) * -1;
SpdY = int(SpdY);
if ((SpdY * -1) < MinBounceY) {
SpdY = MinBounceY * -1;
}
}
}
}
}
if (_global.C.Player2.CanHitElectro and (!_global.C.Player2.Invincible)) {
if (((_global.Param.G_NbPlayer == 2) and ((_global.C.Player2.PosY - _global.C.Player2.DistU) <= (PosY + DistD))) and ((_global.C.Player2.PosY + _global.C.Player2.DistD) >= (PosY - DistU))) {
var InRange = CheckInRange(_global.C.Player2);
if (InRange) {
with (_global.C.Player2) {
SpdY = (SpdY / 2) * -1;
SpdY = int(SpdY);
if ((SpdY * -1) < MinBounceY) {
SpdY = MinBounceY * -1;
}
}
}
}
}
}
function CheckInRange(l_RefItem) {
var _local4 = PosX + DistR;
var _local3 = PosX - DistL;
if ((_local3 <= (l_RefItem.PosX + l_RefItem.DistR)) and (_local4 >= (l_RefItem.PosX - l_RefItem.DistL))) {
return(true);
}
return(false);
}
function Actions() {
CheckCollide();
}
}
Symbol 1219 MovieClip [__Packages.EnemyObj] Frame 0
class EnemyObj extends CharacterObj
{
var BlocMove, SpdXMin, SpdXMax, SpdYMin, SpdYMax, SpdXBonusMod, EnemyRBordIn, EnemyLBordIn, EnemyRBordOut, EnemyLBordOut, BonusRBordIn, BonusLBordIn, BonusRBordOut, BonusLBordOut, RBordIn, LBordIn, RBordOut, LBordOut, EnemyDistU, EnemyDistD, EnemyDistR, EnemyDistL, BonusDistU, BonusDistD, BonusDistR, BonusDistL, DistU, DistD, DistR, DistL, LanceDist, HaveEnter, NoBonus, Type, FrEnter, FrReenter, FrDie, FrBonus, FrPicked, FrPowerBonus, FrPowerPicked, Etat, PosX, RefMov, PosY, RPress, LPress, Dir, SetSpdY, CheckCollide, Move, ChangeSide, Nom, Health, BaseHealth, ItemGetHitX, ItemGetHitY, SpdX, SpdY, MinBounceUnder, SideHitY, SideHitX, MinBounceY, DoPersHit, NoHitLg, PlayHurtBounce, PlayBounce, AttachType, WingPush, FlySpd, CheckInRange;
function EnemyObj (l_RefMov) {
super(l_RefMov);
BlocMove = false;
SpdXMin = -4;
SpdXMax = 4;
SpdYMin = -4;
SpdYMax = 9;
SpdXBonusMod = 0.04;
EnemyRBordIn = 520;
EnemyLBordIn = -20;
EnemyRBordOut = 520;
EnemyLBordOut = -20;
BonusRBordIn = 502;
BonusLBordIn = -2;
BonusRBordOut = 502;
BonusLBordOut = -2;
RBordIn = EnemyRBordIn;
LBordIn = EnemyLBordIn;
RBordOut = EnemyRBordOut;
LBordOut = EnemyLBordOut;
EnemyDistU = 30;
EnemyDistD = 0;
EnemyDistR = 14;
EnemyDistL = 14;
BonusDistU = 24;
BonusDistD = -6;
BonusDistR = 7;
BonusDistL = 7;
DistU = EnemyDistU;
DistD = EnemyDistD;
DistR = EnemyDistR;
DistL = EnemyDistL;
LanceDist = 11;
HaveEnter = false;
NoBonus = 1;
Type = "Enemy";
FrEnter = 10;
FrReenter = 90;
FrDie = 10;
FrBonus = 208;
FrPicked = 8;
FrPowerBonus = 208;
FrPowerPicked = 9;
}
function Wait() {
}
function Frozen() {
if ((!_global.C.G_SquidPower) and (Etat == "Frozen")) {
Etat = "Idle";
}
}
function StartEnter() {
var _local3 = _global.C.G_StartPos[random(_global.C.G_NbWindows)];
PosX = _local3[0];
RefMov._x = int(PosX);
PosY = _local3[1];
RefMov._y = int(PosY);
RPress = false;
LPress = false;
if (random(100) < 50) {
Dir = "R";
} else {
Dir = "L";
}
if (HaveEnter) {
Etat = "Reenter";
} else {
Etat = "Enter";
}
}
function Enter() {
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrEnter) {
BlocMove = true;
HaveEnter = true;
Etat = "Idle";
}
}
function Reenter() {
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrReenter) {
BlocMove = true;
Etat = "Idle";
}
}
function Die() {
SetDieSpdX();
SetSpdY();
CheckCollide();
Move();
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 2) {
_global.Sounds.PlaySound("Die6", 100, 1);
}
if (_local3 >= FrDie) {
if (NoBonus == 4) {
Etat = "PowerBonus";
} else {
Etat = "Bonus";
}
}
}
function Bonus() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetDieSpdX();
SetSpdY();
CheckCollide();
Move();
if (Etat == "Bonus") {
CheckPicked();
if (Etat == "Bonus") {
var _local3 = RefMov.Obj.Etat._currentframe;
if ((_local3 >= FrBonus) and (Etat == "Bonus")) {
_global.C.G_BkUpEnemy.push(Nom);
Type = "Enemy";
BlocMove = false;
Health = BaseHealth;
Etat = "Wait";
_global.C.G_NbEnemys--;
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
}
}
}
}
function PowerBonus() {
if (ChangeSide) {
if (PosX == RBordOut) {
PosX = LBordIn;
} else {
PosX = RBordIn;
}
RefMov._x = int(PosX);
ChangeSide = false;
}
SetDieSpdX();
SetSpdY();
CheckCollide();
Move();
if (Etat == "PowerBonus") {
CheckPicked();
if (Etat == "PowerBonus") {
var _local3 = RefMov.Obj.Etat._currentframe;
if ((_local3 >= FrPowerBonus) and (Etat == "PowerBonus")) {
_global.C.G_BkUpEnemy.push(Nom);
Type = "Enemy";
BlocMove = false;
Health = BaseHealth;
Etat = "Wait";
_global.C.G_NbEnemys--;
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
}
}
}
}
function Picked() {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 2) {
_global.Sounds.PlaySound("SmallBell1", 100, 1);
}
if (_local3 >= FrPicked) {
Etat = "Destroy";
}
}
function PowerPicked() {
var _local3 = RefMov.Obj.Etat._currentframe;
if (_local3 == 2) {
_global.Sounds.PlaySound("SmallBell1", 100, 1);
}
if (_local3 >= FrPowerPicked) {
Etat = "Destroy";
}
}
function Destroy() {
_global.C.G_NbEnemys--;
RefMov.swapDepths(10);
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
delete _global.C[Nom];
}
function SelectHit(l_DirHit) {
if (l_DirHit == "HitX") {
var _local3 = _global.C[ItemGetHitX];
} else {
var _local3 = _global.C[ItemGetHitY];
}
switch (_local3.Type) {
case "Plate" :
DoHitPlate(l_DirHit);
break;
case "Spike" :
DoHitSpike(l_DirHit);
break;
case "Electro" :
if (Type == "Enemy") {
DoHitSpike(l_DirHit);
}
break;
case "Player" :
if (_local3.BlocMove) {
DoHitPlayer(_local3, l_DirHit);
}
break;
case "Enemy" :
if (_local3.BlocMove) {
DoHitEnemy(_local3, l_DirHit);
}
break;
case "Bonus" :
DoHitBonus(_local3);
break;
}
if (l_DirHit == "HitX") {
ItemGetHitX = "";
} else {
ItemGetHitY = "";
}
}
function DoHitPlate(l_DirHit) {
if (l_DirHit == "HitX") {
if (random(100) > 90) {
RPress = false;
LPress = false;
}
SpdX = SpdX * -1;
SpdX = int(SpdX);
} else {
SpdY = (SpdY / 3) * -1;
if ((SideHitY == "Bottom") and (SpdY < MinBounceUnder)) {
SpdY = MinBounceUnder;
}
SpdY = int(SpdY);
}
}
function DoHitSpike(l_DirHit) {
if (l_DirHit == "HitX") {
var _local2 = SideHitX;
} else {
var _local2 = SideHitY;
}
switch (_local2) {
case "Right" :
SpdX = SpdX * -1;
SpdX = int(SpdX);
break;
case "Left" :
SpdX = SpdX * -1;
SpdX = int(SpdX);
break;
case "Top" :
SpdY = (SpdY / 2) * -1;
SpdY = int(SpdY);
if (((SpdY * -1) < MinBounceY) and (Type != "Bonus")) {
SpdY = MinBounceY * -1;
}
break;
case "Bottom" :
SpdY = (SpdY / 2) * -1;
SpdY = int(SpdY);
if (SpdY < MinBounceY) {
SpdY = MinBounceY;
}
break;
}
}
function DoHitPlayer(l_Hitted, l_DirHit) {
if (Type == "Bonus") {
Etat = "Picked";
} else {
if ((Etat == "Idle") or (Etat == "Fly")) {
Etat = "Bounce";
}
if ((l_Hitted.Etat == "Idle") or (l_Hitted.Etat == "Fly")) {
l_Hitted.Etat = "Bounce";
}
if (l_DirHit == "HitX") {
if (SideHitX == "Right") {
var _local4 = PosY - LanceDist;
var _local3 = l_Hitted.PosY - l_Hitted.LanceDist;
var _local5 = Math.abs(_local4 - _local3);
DoPersHit("Right", l_Hitted);
if (_local5 > NoHitLg) {
if (_local4 < _local3) {
if (Dir == "L") {
PlayHurtBounce();
l_Hitted.GetHurt(this);
} else {
PlayBounce();
}
} else if (l_Hitted.Dir == "R") {
PlayHurtBounce();
GetHurt(l_Hitted);
} else {
PlayBounce();
}
} else {
PlayBounce();
}
} else {
var _local4 = PosY - LanceDist;
var _local3 = l_Hitted.PosY - l_Hitted.LanceDist;
var _local5 = Math.abs(_local4 - _local3);
DoPersHit("Left", l_Hitted);
if (_local5 > NoHitLg) {
if (_local4 < _local3) {
if (Dir == "R") {
PlayHurtBounce();
l_Hitted.GetHurt(this);
} else {
PlayBounce();
}
} else if (l_Hitted.Dir == "L") {
PlayHurtBounce();
GetHurt(l_Hitted);
} else {
PlayBounce();
}
} else {
PlayBounce();
}
}
} else if (SideHitY == "Top") {
PlayHurtBounce();
DoPersHit("Top", l_Hitted);
l_Hitted.GetHurt(this);
} else {
PlayHurtBounce();
DoPersHit("Bottom", l_Hitted);
GetHurt(l_Hitted);
}
}
}
function DoHitEnemy(l_Hitted, l_DirHit) {
if (l_Hitted.Type != "Bonus") {
if ((Etat == "Idle") or (Etat == "Fly")) {
Etat = "Bounce";
}
if ((l_Hitted.Etat == "Idle") or (l_Hitted.Etat == "Fly")) {
l_Hitted.Etat = "Bounce";
}
if (l_DirHit == "HitX") {
if (SideHitX == "Right") {
DoPersHit("Right", l_Hitted);
RPress = false;
LPress = false;
l_Hitted.RPress = false;
l_Hitted.LPress = false;
} else {
DoPersHit("Left", l_Hitted);
RPress = false;
LPress = false;
l_Hitted.RPress = false;
l_Hitted.LPress = false;
}
} else if (SideHitY == "Top") {
DoPersHit("Top", l_Hitted);
} else {
DoPersHit("Bottom", l_Hitted);
}
}
}
function DoHitBonus(l_Hitted) {
}
function GetHurt(l_Killer) {
Health = Health - l_Killer.Dammage;
if (Health < 0) {
Health = 0;
}
if (Health == 0) {
var _local3 = 0;
switch (AttachType) {
case "Type1Enemy" :
_local3 = _global.C.Score.mEnemy1Value;
break;
case "Type2Enemy" :
_local3 = _global.C.Score.mEnemy2Value;
break;
case "Type3Enemy" :
_local3 = _global.C.Score.mEnemy3Value;
}
_global.C.Score.fGetPoints(l_Killer.Nom, _local3, Nom);
BecomeBonus();
SpdX = int(SpdX / 2);
} else {
Etat = "HurtBounce";
}
}
function BecomeBonus() {
if (Nom == _global.C.G_AutoPower) {
NoBonus = 4;
} else {
var _local3 = random(100);
if (_local3 < 50) {
NoBonus = 1;
} else if (_local3 < 80) {
NoBonus = 2;
} else if (_local3 < 95) {
NoBonus = 3;
} else {
NoBonus = 4;
}
}
Type = "Bonus";
BlocMove = false;
WingPush = false;
FlySpd = 0;
DistU = BonusDistU;
DistD = BonusDistD;
DistR = BonusDistR;
DistL = BonusDistL;
RBordIn = BonusRBordIn;
LBordIn = BonusLBordIn;
RBordOut = BonusRBordOut;
LBordOut = BonusLBordOut;
Etat = "Die";
}
function CheckPicked() {
if (((_global.C.Player1.PosY - _global.C.Player1.DistU) <= (PosY + DistD)) and ((_global.C.Player1.PosY + _global.C.Player1.DistD) >= (PosY - DistU))) {
var _local4 = CheckInRange(_global.C.Player1);
if (_local4) {
if ((NoBonus == 4) and (Etat == "PowerBonus")) {
_global.C.Player1.AddPower();
Etat = "PowerPicked";
_global.C.Score.fGetPoints("Player1", _global.C.Score.mBonus4Value, Nom);
} else if (Etat == "Bonus") {
var _local3 = 0;
switch (NoBonus) {
case 1 :
_local3 = _global.C.Score.mBonus1Value;
break;
case 2 :
_local3 = _global.C.Score.mBonus2Value;
break;
case 3 :
_local3 = _global.C.Score.mBonus3Value;
}
_global.C.Score.fGetPoints("Player1", _local3, Nom);
Etat = "Picked";
}
}
} else if (((_global.Param.NbPlayer == 2) and ((_global.C.Player2.PosY - _global.C.Player2.DistU) <= (PosY + DistD))) and ((_global.C.Player2.PosY + _global.C.Player2.DistD) >= (PosY - DistU))) {
var _local4 = CheckInRange(_global.C.Player2);
if (_local4) {
if ((NoBonus == 4) and (Etat == "PowerBonus")) {
_global.C.Player2.AddPower();
_global.C.Score.fGetPoints("Player2", _global.C.Score.mBonus4Value, Nom);
Etat = "PowerPicked";
} else if (Etat == "Bonus") {
var _local3 = 0;
switch (NoBonus) {
case 1 :
_local3 = _global.C.Score.mBonus1Value;
break;
case 2 :
_local3 = _global.C.Score.mBonus2Value;
break;
case 3 :
_local3 = _global.C.Score.mBonus3Value;
}
_global.C.Score.fGetPoints("Player2", _local3, Nom);
Etat = "Picked";
}
}
}
}
function SetDieSpdX() {
if (SpdX > 0) {
SpdX = SpdX - SpdXBonusMod;
if (SpdX < 0) {
SpdX = 0;
}
} else {
SpdX = SpdX + SpdXBonusMod;
if (SpdX > 0) {
SpdX = 0;
}
}
}
function CheckControl() {
if (Etat == "Idle") {
SetAction();
}
}
function SetAction() {
}
}
Symbol 1220 MovieClip [__Packages.Type2EnemyObj] Frame 0
class Type2EnemyObj extends EnemyObj
{
var SpdForFlap, BaseHealth, Health, Dammage, AttachType, SpdXMin, SpdXMax, SpdYMin, SpdYMax, SpdXBonusMod, EnemyDistU, EnemyDistD, EnemyDistR, EnemyDistL, DistU, DistD, DistR, DistL, LanceDist, SpdX, SpdY, Etat, LPress, RPress, Dir, WingPush;
function Type2EnemyObj (l_RefMov) {
super(l_RefMov);
SpdForFlap = 5;
BaseHealth = 4;
Health = 4;
Dammage = 2;
AttachType = "Type2Enemy";
SpdXMin = -6;
SpdXMax = 6;
SpdYMin = -6;
SpdYMax = 13;
SpdXBonusMod = 0.04;
EnemyDistU = 26;
EnemyDistD = 0;
EnemyDistR = 14;
EnemyDistL = 14;
DistU = EnemyDistU;
DistD = EnemyDistD;
DistR = EnemyDistR;
DistL = EnemyDistL;
LanceDist = 11;
}
function SetAction() {
if (_global.C.G_SquidPower) {
SpdX = 0;
SpdY = 0;
Etat = "Frozen";
} else {
if (((SpdX == 0) and (!RPress)) and (!LPress)) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
} else if ((SpdX == SpdXMin) or (SpdX == SpdXMax)) {
if (random(1000) > 995) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
}
}
if ((random(100) > 90) or (SpdY >= SpdForFlap)) {
WingPush = true;
}
}
}
}
Symbol 1221 MovieClip [__Packages.Player1Obj] Frame 0
class Player1Obj extends PlayerObj
{
var RPress, LPress, UpRelease, WingPush, UpPress, SpPress;
function Player1Obj (l_RefMov) {
super(l_RefMov);
_global.C.G_Players.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
function KeyMapping() {
if (Key.isDown(39)) {
RPress = true;
} else {
RPress = false;
}
if (Key.isDown(37)) {
LPress = true;
} else {
LPress = false;
}
if (Key.isDown(38)) {
if (UpRelease) {
WingPush = true;
UpPress = true;
UpRelease = false;
}
} else {
UpPress = false;
UpRelease = true;
}
if (Key.isDown(13)) {
SpPress = true;
} else {
SpPress = false;
}
}
}
Symbol 1222 MovieClip [__Packages.Type3EnemyObj] Frame 0
class Type3EnemyObj extends EnemyObj
{
var SpdForFlap, BaseHealth, Health, Dammage, AttachType, SpdXMin, SpdXMax, SpdYMin, SpdYMax, SpdXBonusMod, EnemyDistU, EnemyDistD, EnemyDistR, EnemyDistL, DistU, DistD, DistR, DistL, LanceDist, SpdX, SpdY, Etat, LPress, RPress, Dir, WingPush;
function Type3EnemyObj (l_RefMov) {
super(l_RefMov);
SpdForFlap = 5;
BaseHealth = 4;
Health = 4;
Dammage = 2;
AttachType = "Type3Enemy";
SpdXMin = -9;
SpdXMax = 9;
SpdYMin = -9;
SpdYMax = 16;
SpdXBonusMod = 0.04;
EnemyDistU = 26;
EnemyDistD = 0;
EnemyDistR = 14;
EnemyDistL = 14;
DistU = EnemyDistU;
DistD = EnemyDistD;
DistR = EnemyDistR;
DistL = EnemyDistL;
LanceDist = 11;
}
function SetAction() {
if (_global.C.G_SquidPower) {
SpdX = 0;
SpdY = 0;
Etat = "Frozen";
} else {
if (((SpdX == 0) and (!RPress)) and (!LPress)) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
} else if ((SpdX == SpdXMin) or (SpdX == SpdXMax)) {
if (random(1000) > 990) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
}
}
if ((random(100) > 90) or (SpdY >= SpdForFlap)) {
WingPush = true;
}
}
}
}
Symbol 1223 MovieClip [__Packages.Player2Obj] Frame 0
class Player2Obj extends PlayerObj
{
var BlocMove, Etat, RPress, LPress, UpRelease, WingPush, UpPress, SpPress;
function Player2Obj (l_RefMov) {
super(l_RefMov);
if ((_global.Param.G_NbPlayer == 1) and (_global.Param.G_LvlType == "Normal")) {
BlocMove = false;
Etat = "PasLa";
l_RefMov.Obj.gotoAndStop("PasLa");
} else {
_global.C.G_Players.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
}
function KeyMapping() {
if (Key.isDown(70)) {
RPress = true;
} else {
RPress = false;
}
if (Key.isDown(83)) {
LPress = true;
} else {
LPress = false;
}
if (Key.isDown(69)) {
if (UpRelease) {
WingPush = true;
UpPress = true;
UpRelease = false;
}
} else {
UpPress = false;
UpRelease = true;
}
if (Key.isDown(32)) {
SpPress = true;
} else {
SpPress = false;
}
}
}
Symbol 1224 MovieClip [__Packages.Type1EnemyObj] Frame 0
class Type1EnemyObj extends EnemyObj
{
var SpdForFlap, BaseHealth, Health, Dammage, AttachType, SpdXMin, SpdXMax, SpdYMin, SpdYMax, SpdXBonusMod, EnemyDistU, EnemyDistD, EnemyDistR, EnemyDistL, DistU, DistD, DistR, DistL, LanceDist, SpdX, SpdY, Etat, RPress, LPress, Dir, WingPush;
function Type1EnemyObj (l_RefMov) {
super(l_RefMov);
SpdForFlap = 5;
BaseHealth = 2;
Health = 2;
Dammage = 2;
AttachType = "Type1Enemy";
SpdXMin = -4;
SpdXMax = 4;
SpdYMin = -4;
SpdYMax = 9;
SpdXBonusMod = 0.04;
EnemyDistU = 26;
EnemyDistD = 0;
EnemyDistR = 14;
EnemyDistL = 14;
DistU = EnemyDistU;
DistD = EnemyDistD;
DistR = EnemyDistR;
DistL = EnemyDistL;
LanceDist = 11;
}
function SetAction() {
if (_global.C.G_SquidPower) {
SpdX = 0;
SpdY = 0;
Etat = "Frozen";
} else {
if (random(100) > 97) {
RPress = false;
LPress = false;
}
if (((SpdX == 0) and (!RPress)) and (!LPress)) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
}
if ((random(100) > 90) or (SpdY >= SpdForFlap)) {
WingPush = true;
}
}
}
}
Symbol 1225 MovieClip [__Packages.BonusObj] Frame 0
class BonusObj
{
var RefMov, Nom, Type, Etat, EtatOld, PosX, PosY, NoBonus, DistU, DistD, DistL, DistR, BlocMove, FrEnter, FrIdle, FrPicked;
function BonusObj (l_RefMov) {
RefMov = l_RefMov;
Nom = RefMov._name;
Type = "FixBonus";
_global.C.G_HitItem.push(Nom);
_global.C.G_BonusList.push(Nom);
Etat = "Wait";
EtatOld = "Wait";
PosX = RefMov._x;
PosY = RefMov._y;
var _local3 = random(100);
if (_local3 < 60) {
NoBonus = 1;
} else if (_local3 < 90) {
NoBonus = 2;
} else {
NoBonus = 3;
}
DistU = 9;
DistD = 9;
DistL = 9;
DistR = 9;
BlocMove = false;
FrEnter = 8;
FrIdle = 208;
FrPicked = 8;
}
function Wait() {
}
function Enter() {
var _local2 = RefMov.Etat._currentframe;
if (_local2 >= FrEnter) {
Etat = "Idle";
}
}
function Idle() {
if (Etat == "Idle") {
CheckPicked();
if (Etat == "Idle") {
var _local2 = RefMov.Etat._currentframe;
if ((_local2 >= FrIdle) and (Etat == "Idle")) {
Etat = "Destroy";
}
}
}
}
function Picked() {
var _local3 = RefMov.Etat._currentframe;
if (_local3 == 2) {
_global.Sounds.PlaySound("SmallBell1", 100, 1);
}
if (_local3 >= FrPicked) {
Etat = "Destroy";
}
}
function Destroy() {
RefMov.swapDepths(10);
RefMov.removeMovieClip();
_global.C.G_Items.splice(_global.C.i, 1);
delete _global.C[Nom];
}
function CheckInRange(l_RefItem) {
var _local4 = PosX + DistR;
var _local3 = PosX - DistL;
if ((_local3 <= (l_RefItem.PosX + l_RefItem.DistR)) and (_local4 >= (l_RefItem.PosX - l_RefItem.DistL))) {
return(true);
}
return(false);
}
function CheckPicked() {
if (((_global.C.Player1.PosY - _global.C.Player1.DistU) <= (PosY + DistD)) and ((_global.C.Player1.PosY + _global.C.Player1.DistD) >= (PosY - DistU))) {
var _local4 = CheckInRange(_global.C.Player1);
if (_local4) {
var _local3 = 0;
switch (NoBonus) {
case 1 :
_local3 = _global.C.Score.mBonus1Value;
break;
case 2 :
_local3 = _global.C.Score.mBonus2Value;
break;
case 3 :
_local3 = _global.C.Score.mBonus3Value;
}
_global.C.Score.fGetPoints("Player1", _local3, Nom);
Etat = "Picked";
}
}
if (((Etat != "Picked") and ((_global.C.Player2.PosY - _global.C.Player2.DistU) <= (PosY + DistD))) and ((_global.C.Player2.PosY + _global.C.Player2.DistD) >= (PosY - DistU))) {
var _local4 = CheckInRange(_global.C.Player2);
if (_local4) {
if (_global.Param.G_NbPlayer == 2) {
var _local3 = 0;
switch (NoBonus) {
case 1 :
_local3 = _global.C.Score.mBonus1Value;
break;
case 2 :
_local3 = _global.C.Score.mBonus2Value;
break;
case 3 :
_local3 = _global.C.Score.mBonus3Value;
}
_global.C.Score.fGetPoints("Player2", _local3, Nom);
}
Etat = "Picked";
}
}
if (((Etat != "Picked") and ((_global.C.Player3.PosY - _global.C.Player3.DistU) <= (PosY + DistD))) and ((_global.C.Player3.PosY + _global.C.Player3.DistD) >= (PosY - DistU))) {
var _local4 = CheckInRange(_global.C.Player3);
if (_local4) {
Etat = "Picked";
}
}
if (((Etat != "Picked") and ((_global.C.Player4.PosY - _global.C.Player4.DistU) <= (PosY + DistD))) and ((_global.C.Player4.PosY + _global.C.Player4.DistD) >= (PosY - DistU))) {
var _local4 = CheckInRange(_global.C.Player4);
if (_local4) {
Etat = "Picked";
}
}
}
function ChangeEtat(l_NewAction) {
with (this) {
if (EtatOld != l_NewAction) {
EtatOld = Etat;
Etat = l_NewAction;
_global.C._parent[Nom].gotoAndStop(l_NewAction);
}
}
}
function Actions() {
ChangeEtat(Etat);
this[Etat]();
}
}
Symbol 1226 MovieClip [__Packages.PlayerEnemyObj] Frame 0
class PlayerEnemyObj extends PlayerObj
{
var RBordIn, LBordIn, RBordOut, LBordOut, Idle, RefMov, FrBounce, Dir, LPress, RPress, Etat, SpdX, SpdXMax, SpdXMin, WingPush;
function PlayerEnemyObj (l_RefMov) {
super(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
RBordIn = 520;
LBordIn = -20;
RBordOut = 520;
LBordOut = -20;
}
function CheckControl() {
SetAction();
}
function Bounce() {
Idle();
var _local3 = RefMov.Obj.Etat._currentframe;
if ((_local3 == 1) and (_global.C._parent.SonBounce._currentframe == 1)) {
_global.C._parent.SonBounce.gotoAndPlay(2);
_global.Sounds.PlaySound("Collide13", 70, 1);
_global.Sounds.PlaySound("Bounce2", 50, 1);
}
if (_local3 >= FrBounce) {
if (random(100) < 60) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
}
Etat = "Idle";
}
}
function HurtBounce() {
Idle();
var _local2 = RefMov.Obj.Etat._currentframe;
if (_local2 >= FrBounce) {
if (random(100) < 60) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
}
Etat = "Idle";
}
}
function SetAction() {
if (((SpdX == 0) and (!RPress)) and (!LPress)) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
} else if ((SpdX == SpdXMin) or (SpdX == SpdXMax)) {
var _local2 = random(1000);
if (_local2 > 990) {
if (Dir == "R") {
Dir = "L";
LPress = true;
RPress = false;
} else {
Dir = "R";
RPress = true;
LPress = false;
}
} else if (_local2 > 980) {
RPress = false;
LPress = false;
}
}
if (random(100) > 93) {
WingPush = true;
}
}
}
Symbol 1227 MovieClip [__Packages.ScoreObj] Frame 0
class ScoreObj
{
var mFieldNumber, mEnemy1Value, mEnemy2Value, mEnemy3Value, mEnemy4Value, mBonus1Value, mBonus2Value, mBonus3Value, mBonus4Value, mBonusPlayer, mBonusHitPlayer;
function ScoreObj () {
mFieldNumber = 0;
mEnemy1Value = 100;
mEnemy2Value = 200;
mEnemy3Value = 300;
mEnemy4Value = 2000;
mBonus1Value = 250;
mBonus2Value = 500;
mBonus3Value = 750;
mBonus4Value = 200;
mBonusPlayer = 1500;
mBonusHitPlayer = 100;
}
function fCreateField(pScore, pTarget) {
_global.C.G_ScoreFields.push("Field" + mFieldNumber);
this["Field" + mFieldNumber] = new FieldScoreObj(mFieldNumber, pScore, pTarget);
mFieldNumber++;
}
function fGetPoints(pPlayer, pScore, pTarget) {
_global.Param["G_Score" + pPlayer] = _global.Param["G_Score" + pPlayer] + pScore;
_global.C._parent["Stat" + pPlayer].mcScore.TxtScore = _global.Param["G_Score" + pPlayer];
if (_global.Param["G_Score" + pPlayer] >= _global.Param["G_NextLife" + pPlayer]) {
if (_global.Param["G_Life" + pPlayer] < 9) {
_global.Param["G_Life" + pPlayer]++;
_global.C._parent["Stat" + pPlayer].NbLife.TxtNbLife = _global.Param["G_Life" + pPlayer] - 1;
}
_global.Param["G_NextLife" + pPlayer] = _global.Param["G_NextLife" + pPlayer] + _global.Param.G_BaseLifeScore;
}
fCreateField(pScore, pPlayer);
}
function fDeleteObject(pObjectToDelete) {
var _local6 = pObjectToDelete.indexOf("d");
var _local4 = pObjectToDelete.substr(_local6 + 1, pObjectToDelete.length);
var _local5 = 0;
var _local3 = 0;
while (_local3 <= _global.C.G_ScoreFields.length) {
if (_global.C.G_ScoreFields[_local3] == ("Field" + _local4)) {
_local5 = _local3;
break;
}
_local3++;
}
_global.C.G_ScoreFields.splice(_local3, 1);
this["Field" + _local4].mMcField.removeMovieClip();
delete this["Field" + _local4];
}
}
Symbol 1228 MovieClip [__Packages.FieldScoreObj] Frame 0
class FieldScoreObj
{
var mFieldNumber, mScore, mTarget, mMcField;
function FieldScoreObj (pFieldNumber, pScore, pTarget) {
mFieldNumber = pFieldNumber;
mScore = pScore;
mTarget = pTarget;
_global.C._parent.mcScoreContainer.attachMovie("AnimPointage", "mcField" + mFieldNumber, _global.C.G_IndexDepth);
mMcField = _global.C._parent.mcScoreContainer["mcField" + mFieldNumber];
mMcField._x = _global.C[pTarget].RefMov._x;
mMcField._y = _global.C[pTarget].RefMov._y - 30;
mMcField.mcScore.txtScore.text = mScore;
mMcField.gotoAndPlay("Play");
_global.C.G_IndexDepth++;
}
}
Symbol 25 MovieClip Frame 1
stop();
Instance of Symbol 24 MovieClip in Symbol 25 MovieClip Frame 1
onClipEvent (load) {
var TotalLoad = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
var TempLoad = _root.getBytesLoaded();
var Pourcent = ((TempLoad / TotalLoad) * 100);
Pourcent = Math.round(Pourcent);
if (Pourcent < 100) {
this.gotoAndStop(Pourcent);
} else {
_parent.nextFrame();
}
}
Symbol 25 MovieClip Frame 2
play();
Symbol 25 MovieClip Frame 30
_parent._parent.gotoAndStop("TitleCard");
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
LockBtn.useHandCursor = false;
_global.Sounds.PlaySound("FlagEnter", 100, 1);
Symbol 92 MovieClip Frame 10
_parent.gotoAndStop(this.Dest);
Symbol 92 MovieClip Frame 11
_global.Sounds.PlaySound("Flag3", 100, 1);
Symbol 100 MovieClip Frame 1
gotoAndStop(_global.Param.G_NextLevel);
Symbol 120 MovieClip Frame 1
gotoAndStop(_global.Param.G_NextLevel);
Symbol 234 MovieClip Frame 68
stop();
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 2
if (!_global.Param.G_GameOver) {
_global.Param.G_NextLevel = _global.Param.G_Level + 1;
} else {
_global.Param.G_NextLevel = 11;
}
LockBtn.useHandCursor = false;
Symbol 239 MovieClip Frame 4
_global.Sounds.PlaySound("FlagEnter", 100, 1);
Symbol 239 MovieClip Frame 10
if (_global.Param.G_GameOver) {
_global.Param.G_GameOver = false;
_parent.gotoAndStop("Loose");
gotoAndPlay ("Ferme");
} else {
_global.Param.G_Level++;
_parent.gotoAndStop("Level" + _global.Param.G_Level);
}
Symbol 239 MovieClip Frame 11
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 2]);
_global.Sounds.StopSound("Eclair2");
Instance of Symbol 234 MovieClip in Symbol 239 MovieClip Frame 70
onClipEvent (load) {
if (_global.Param.G_LvlType == "Bonus") {
this.swapDepths(10);
this.removeMovieClip();
}
}
Symbol 239 MovieClip Frame 72
_global.Sounds.PlaySound("Flag3", 100, 1);
Symbol 239 MovieClip Frame 85
if (_global.Param.G_LvlType == "Bonus") {
gotoAndPlay ("StartBonus");
}
Symbol 239 MovieClip Frame 155
if (_global.Param.G_LvlType == "Normal") {
_global.Sounds.PlaySound("MusInGame", 47, 100000);
_global.C.G_Pause = false;
gotoAndStop (1);
}
Symbol 239 MovieClip Frame 244
_global.Sounds.PlaySound("MusInPack", 70, 100000);
_global.C.G_Pause = false;
gotoAndStop (1);
Symbol 291 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnHowPlay");
}
Symbol 297 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 298 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 21
_parent._parent.SelectNb.play();
stop();
Symbol 298 MovieClip Frame 41
_parent._parent.gotoAndStop("Instruct");
Symbol 321 Button
on (release) {
_global.Param.G_Player1Choice = "";
_global.Param.G_Player2Choice = "";
_global.Param.G_NbPlayer = 1;
_parent._parent._parent._parent.gotoAndStop("SelectPers1");
_parent._parent._parent.play();
}
Symbol 325 Button
on (release) {
_global.Param.G_Player1Choice = "";
_global.Param.G_Player2Choice = "";
_global.Param.G_NbPlayer = 2;
_parent._parent._parent._parent.gotoAndStop("SelectPers1");
_parent._parent._parent.play();
}
Symbol 327 Button
on (release) {
_global.Param.G_Player1Choice = "";
_global.Param.G_Player2Choice = "";
_global.Param.G_NbPlayer = 1;
_global.Sounds.PlaySound("Nage6", 100, 1);
_parent._parent._parent.gotoAndStop("SelectPers1");
_parent._parent.play();
}
Symbol 328 Button
on (release) {
_global.Param.G_Player1Choice = "";
_global.Param.G_Player2Choice = "";
_global.Param.G_NbPlayer = 2;
_global.Sounds.PlaySound("Nage6", 100, 1);
_parent._parent._parent.gotoAndStop("SelectPers1");
_parent._parent.play();
}
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 2
LockBtn.useHandCursor = false;
_global.Sounds.PlaySound("FlagEnter", 100, 1);
Symbol 331 MovieClip Frame 9
_parent.gotoAndStop("IniVar");
stop();
Symbol 331 MovieClip Frame 10
_global.Sounds.PlaySound("Flag3", 100, 1);
Symbol 343 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnNext");
}
Symbol 344 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 21
_parent._parent.gotoAndStop("Page2");
Symbol 373 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnBack");
}
Symbol 374 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 21
_parent._parent.gotoAndStop("Page1");
Symbol 375 MovieClip Frame 41
_parent._parent._parent.SelectNb.play();
stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 473 Button
on (release) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 474 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnNext");
}
Symbol 475 MovieClip Frame 1
stop();
stop();
Symbol 475 MovieClip Frame 2
_global.Sounds.PlaySound("FlagEnter", 100, 1);
Symbol 475 MovieClip Frame 13
stop();
Symbol 475 MovieClip Frame 14
LockBtn.useHandCursor = false;
Symbol 475 MovieClip Frame 33
_global.Param.G_SetPlayerEnemy();
_parent._parent.LvlTransit.play();
stop();
Symbol 475 MovieClip Frame 34
_global.Sounds.PlaySound("BtnFlag", 100, 1);
Symbol 475 MovieClip Frame 45
stop();
Symbol 475 MovieClip Frame 46
LockBtn.useHandCursor = false;
Symbol 475 MovieClip Frame 65
_global.Param.G_CurrentPlayerChoosing++;
_parent._parent.GenTransit.Dest = "SelectPers2";
_parent._parent.GenTransit.play();
Instance of Symbol 446 MovieClip "Bob" in Symbol 519 MovieClip Frame 1
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnNext");
}
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnPlay");
}
}
}
Instance of Symbol 456 MovieClip "Pat" in Symbol 519 MovieClip Frame 1
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnNext");
}
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnPlay");
}
}
}
Instance of Symbol 464 MovieClip "Squid" in Symbol 519 MovieClip Frame 1
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnNext");
}
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnPlay");
}
}
}
Instance of Symbol 472 MovieClip "Sandy" in Symbol 519 MovieClip Frame 1
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnNext");
}
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.gotoAndPlay("EnterBtnPlay");
}
}
}
Instance of Symbol 495 MovieClip "mcBobInfo" in Symbol 519 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 504 MovieClip "mcPatInfo" in Symbol 519 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 513 MovieClip "mcSquidInfo" in Symbol 519 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 518 MovieClip "mcSandyInfo" in Symbol 519 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 446 MovieClip "Bob" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
if (_global.Param.G_Player1Choice == this._name) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
_global.Param.G_CurrentPlayerChoosing++;
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.play();
}
}
}
Instance of Symbol 456 MovieClip "Pat" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
if (_global.Param.G_Player1Choice == this._name) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
_global.Param.G_CurrentPlayerChoosing++;
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.play();
}
}
}
Instance of Symbol 464 MovieClip "Squid" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
if (_global.Param.G_Player1Choice == this._name) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
_global.Param.G_CurrentPlayerChoosing++;
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.play();
}
}
}
Instance of Symbol 472 MovieClip "Sandy" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
if (_global.Param.G_Player1Choice == this._name) {
this.gotoAndStop(3);
}
}
on (rollOver) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = true;
gotoAndStop ("Roll");
}
}
on (releaseOutside, rollOut) {
if (this._currentframe != 3) {
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Idle");
}
}
on (press) {
if (this._currentframe != 3) {
_global.Sounds.PlaySound("Nage6", 100, 1);
if (_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] != "") {
_parent[_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"]].gotoAndStop(1);
}
_global.Param[("G_Player" + _global.Param.G_CurrentPlayerChoosing) + "Choice"] = this._name;
_parent[("mc" + this._name) + "Info"]._visible = false;
gotoAndStop ("Selected");
mcPlayerName.gotoAndStop("Player" + _global.Param.G_CurrentPlayerChoosing);
if ((_global.Param.G_NbPlayer == 2) and (_global.Param.G_CurrentPlayerChoosing == 1)) {
_global.Param.G_CurrentPlayerChoosing++;
} else if (_parent.BtnPlay._currentframe == 1) {
_parent.BtnPlay.play();
}
}
}
Instance of Symbol 495 MovieClip "mcBobInfo" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 504 MovieClip "mcPatInfo" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 513 MovieClip "mcSquidInfo" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 518 MovieClip "mcSandyInfo" in Symbol 520 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 525 MovieClip Frame 1
_global.C.G_NbWindows++;
var l_Pos = new Array();
l_Pos.push(this._x);
l_Pos.push(this._y);
_global.C.G_StartPos.push(l_Pos);
Symbol 529 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Symbol 532 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Symbol 535 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Symbol 538 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Instance of Symbol 537 MovieClip in Symbol 538 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10);
this.removeMovieClip();
}
Symbol 542 MovieClip [AnimPointage] Frame 1
stop();
Symbol 542 MovieClip [AnimPointage] Frame 2
play();
Symbol 542 MovieClip [AnimPointage] Frame 19
_global.C.Score.fDeleteObject(this._name);
stop();
Symbol 560 MovieClip Frame 1
stop();
Symbol 574 MovieClip Frame 1
stop();
Symbol 581 MovieClip Frame 1
stop();
Instance of Symbol 547 MovieClip "NbLife" in Symbol 585 MovieClip Frame 1
onClipEvent (load) {
if (_global.Param.G_LifePlayer1 <= 0) {
this.TxtNbLife = 0;
} else {
this.TxtNbLife = _global.Param.G_LifePlayer1 - 1;
}
}
Instance of Symbol 560 MovieClip in Symbol 585 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player1Choice);
}
Instance of Symbol 581 MovieClip "NbPower" in Symbol 585 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_PowerPlayer1 + 1);
if (_global.Param.G_LvlType == "Bonus") {
this._visible = false;
}
}
Instance of Symbol 584 MovieClip "mcScore" in Symbol 585 MovieClip Frame 1
onClipEvent (load) {
this.TxtScore = _global.Param.G_ScorePlayer1;
}
Instance of Symbol 587 MovieClip "NbLife" in Symbol 590 MovieClip Frame 1
onClipEvent (load) {
if (_global.Param.G_LifePlayer2 <= 0) {
this.TxtNbLife = 0;
} else {
this.TxtNbLife = _global.Param.G_LifePlayer2 - 1;
}
}
Instance of Symbol 560 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player2Choice);
}
Instance of Symbol 581 MovieClip "NbPower" in Symbol 590 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_PowerPlayer2 + 1);
if (_global.Param.G_LvlType == "Bonus") {
this._visible = false;
}
}
Instance of Symbol 589 MovieClip "mcScore" in Symbol 590 MovieClip Frame 1
onClipEvent (load) {
this.TxtScore = _global.Param.G_ScorePlayer2;
}
Symbol 594 Button
on (press) {
if (!_global.C.G_Pause) {
_global.Sounds.DoMute();
_parent.Instruct.gotoAndStop("Page1");
_global.C.G_DoPause();
}
}
Symbol 624 MovieClip Frame 1
this.gotoAndStop(_parent._parent._parent.NoBonus);
Symbol 628 MovieClip Frame 1
gotoAndStop(_parent._parent.NoBonus);
Symbol 655 MovieClip Frame 1
stop();
Symbol 655 MovieClip Frame 70
NoBonus = _global.C[_parent._name].NoBonus;
Symbol 656 MovieClip [Type1Enemy] Frame 1
stop();
Instance of Symbol 655 MovieClip "Obj" in Symbol 656 MovieClip [Type1Enemy] Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.C[_parent._name].Etat);
}
Symbol 689 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 10
stop();
Symbol 690 MovieClip [Dragon] Frame 1
stop();
Instance of Symbol 689 MovieClip "Obj" in Symbol 690 MovieClip [Dragon] Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.C[_parent._name].Etat);
}
Instance of Symbol 689 MovieClip "Obj" in Symbol 690 MovieClip [Dragon] Frame 7
onClipEvent (load) {
this.gotoAndStop(_global.C[_parent._name].Etat);
}
Symbol 704 MovieClip Frame 1
stop();
Symbol 750 MovieClip Frame 1
stop();
Symbol 831 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 50
stop();
Symbol 935 MovieClip Frame 1
stop();
Symbol 935 MovieClip Frame 50
stop();
Symbol 936 MovieClip Frame 1
stop();
Symbol 945 MovieClip Frame 1
stop();
Symbol 946 MovieClip [Spit] Frame 1
stop();
Symbol 948 MovieClip Frame 1
stop();
Instance of Symbol 3 MovieClip "Control" in Symbol 949 MovieClip Frame 1
onClipEvent (load) {
function G_SetTime() {
if (!G_SquidPower) {
G_NbEnterFr++;
if (G_NbEnterFr == G_EnterFrBySec) {
G_TimeNow++;
G_NbEnterFr = 0;
}
} else {
G_NbEnterFrSquid++;
if (G_NbEnterFrSquid == G_EnterFrBySec) {
G_TimeNowSquid++;
G_NbEnterFrSquid = 0;
}
}
}
function G_CallActivate() {
this["G_ActivateLvl" + _global.Param.G_Level]();
G_CheckPowerUse();
G_ActiveBkUp();
G_ActiveDragon();
G_CheckEnd();
}
function G_ActiveEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_StartEnemy[0]].AttachType, G_StartEnemy[0], G_IndexDepth);
this[G_StartEnemy[0]].RefMov = _parent[G_StartEnemy[0]];
G_IndexDepth++;
G_Items.push(G_StartEnemy[0]);
G_HitItem.push(G_StartEnemy[0]);
this[G_StartEnemy[0]].StartEnter();
G_StartEnemy.splice(0, 1);
}
function G_CheckPowerUse() {
if (G_SquidPower) {
if (G_TimeNowSquid == G_SquidPowerEnd) {
G_TimeNowSquid = 0;
G_SquidPower = false;
}
}
if (G_PatPower) {
if ((G_PatNbSpit < 3) and (this[G_WhoUsePat].Etat != "Die")) {
if (_global.C._parent.Spit1._x == undefined) {
if ((this[G_WhoUsePat].Etat == "Idle") or (this[G_WhoUsePat].Etat == "Fly")) {
this[G_WhoUsePat].Etat = "UsePower";
G_PatNbSpit++;
}
}
} else {
G_PatNbSpit = 0;
G_PatPower = false;
}
}
}
function G_ActiveBkEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_BkUpEnemy[0]].AttachType, G_BkUpEnemy[0], G_IndexDepth);
this[G_BkUpEnemy[0]].RefMov = _parent[G_BkUpEnemy[0]];
G_IndexDepth++;
G_Items.push(G_BkUpEnemy[0]);
G_HitItem.push(G_BkUpEnemy[0]);
this[G_BkUpEnemy[0]].StartEnter();
G_BkUpEnemy.splice(0, 1);
}
function G_ActiveDragon() {
if ((G_TimeNow == Dragon1.NextTimeAct) and (Dragon1.Etat == "Wait")) {
Dragon1.SetMoveParam();
}
}
function G_ActivateLvl1() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl3() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl5() {
G_ActivateLvl3();
}
function G_ActivateLvl7() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl9() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
case 12 :
G_LastActivate = 12;
G_ActiveEnemy();
return;
}
}
}
function G_ActiveBkUp() {
if (((G_StartEnemy.length == 0) and (G_BkUpEnemy.length > 0)) and (G_NbEnemys < G_MaxEnemy)) {
G_ActiveBkEnemy();
}
}
function G_CheckEnd() {
if (_parent._parent.LvlTransit._currentframe == 1) {
if (_global.Param.G_LvlType == "Normal") {
if (((G_NbEnemys == 0) and (G_StartEnemy.length == 0)) and (G_BkUpEnemy.length == 0)) {
G_EndLevel();
} else if (_global.Param.G_NbPlayer == 2) {
if ((((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) and (_global.Param.G_LifePlayer2 == -1)) and (Player2.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if ((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if (_global.Param.G_NbPlayer == 2) {
if ((((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or ((((!Player2.IsOver) and Player1.IsOver) and Player3.IsOver) and Player4.IsOver)) or (Player1.IsOver and Player2.IsOver)) {
G_EndLevel();
}
} else if (((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or Player1.IsOver) {
G_EndLevel();
}
}
}
function G_EndLevel() {
if (_global.Param.G_LvlType == "Normal") {
if (_global.Param.G_GameOver) {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.GenTransit.Dest = "Loose";
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
} else if (_global.Param.G_Level == 10) {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
if (_global.Param.G_NbPlayer == 2) {
_parent._parent.GenTransit.Dest = "Win2Player";
} else {
_parent._parent.GenTransit.Dest = "Win1Player";
}
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
_global.Sounds.StopSound("PowerSandy3");
_global.Sounds.StopSound("PowerBob2");
}
function G_ActiveBonus() {
if (G_BonusList.length != 0) {
if (G_NextActivate == 0) {
G_NextActivate = random(5) + 5;
}
if (G_TimeNow == G_NextActivate) {
var _local2 = random(G_BonusList.length);
var _local3 = G_BonusList[_local2];
G_BonusList.splice(_local2, 1);
_global.C[_local3].Etat = "Enter";
G_NextActivate = (random(5) + 5) + G_TimeNow;
}
}
}
function G_ActivateLvl2() {
G_ActiveBonus();
}
function G_ActivateLvl4() {
G_ActiveBonus();
}
function G_ActivateLvl6() {
G_ActiveBonus();
}
function G_ActivateLvl8() {
G_ActiveBonus();
}
function G_ActivateLvl10() {
G_ActiveBonus();
}
_global.C = this;
G_Pause = true;
G_HitItem = new Array();
G_Players = new Array();
G_Items = new Array();
G_ScoreFields = new Array();
G_IndexPlate = 1;
G_IndexSpike = 1;
G_IndexElectro = 1;
G_IndexType1Enemy = 1;
G_IndexType2Enemy = 1;
G_IndexType3Enemy = 1;
G_IndexBonus = 1;
G_IndexDepth = 1000;
G_RBord = 500;
G_LBord = 0;
G_TimeNow = 0;
G_EnterFrBySec = 35;
G_NbEnterFr = 0;
G_TimeNowSquid = 0;
G_NbEnterFrSquid = 0;
G_SquidPower = false;
G_SquidPowerEnd = 0;
G_PatPower = false;
G_PatNbSpit = 0;
G_WhoUsePat = "";
G_Ground = 0;
G_StartPos = new Array();
switch (_global.Param.G_Level) {
case 1 :
G_MaxEnemy = 3;
break;
case 3 :
G_MaxEnemy = 4;
break;
case 5 :
G_MaxEnemy = 4;
break;
case 7 :
G_MaxEnemy = 5;
break;
case 9 :
G_MaxEnemy = 6;
break;
}
G_NbEnemys = 0;
switch (_global.Param.G_Level) {
case 1 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type1Enemy3");
break;
case 3 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type2Enemy1", "Type2Enemy2");
break;
case 5 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1");
break;
case 7 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1", "Type3Enemy2");
break;
case 9 :
G_StartEnemy = new Array("Type2Enemy1", "Type3Enemy1", "Type2Enemy2", "Type3Enemy2", "Type3Enemy3", "Type3Enemy4");
break;
}
switch (_global.Param.G_Level) {
case 1 :
G_BkUpEnemy = new Array("Type1Enemy4");
break;
case 3 :
G_BkUpEnemy = new Array("Type1Enemy3", "Type1Enemy4", "Type2Enemy3", "Type1Enemy5", "Type2Enemy4");
break;
case 5 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type1Enemy3", "Type2Enemy5", "Type2Enemy6", "Type2Enemy7", "Type3Enemy2");
break;
case 7 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type3Enemy3", "Type2Enemy5", "Type2Enemy6", "Type3Enemy4", "Type3Enemy5", "Type2Enemy7", "Type3Enemy6", "Type3Enemy7");
break;
case 9 :
G_BkUpEnemy = new Array("Type3Enemy5", "Type3Enemy6", "Type2Enemy3", "Type3Enemy7", "Type2Enemy4", "Type3Enemy8", "Type3Enemy9", "Type2Enemy5", "Type3Enemy10", "Type2Enemy6", "Type2Enemy7", "Type3Enemy11", "Type3Enemy12", "Type3Enemy13");
break;
}
G_AllEnemy = G_StartEnemy.concat(G_BkUpEnemy);
G_AutoPower = G_AllEnemy[random(G_AllEnemy.length)];
G_NbWindows = 0;
G_LastActivate = 0;
G_NextActivate = 0;
G_BonusList = new Array();
G_CreatePlayer = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
if (l_RefMov._name == "Player1") {
this[l_RefMov._name] = new Player1Obj(l_RefMov);
} else {
this[l_RefMov._name] = new Player2Obj(l_RefMov);
}
}
};
G_CreateType1Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type1EnemyObj(l_RefMov);
}
};
G_CreateType2Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type2EnemyObj(l_RefMov);
}
};
G_CreateType3Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type3EnemyObj(l_RefMov);
}
};
G_CreatePlayerEnemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new PlayerEnemyObj(l_RefMov);
}
};
G_CreateDragon = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new DragonObj(l_RefMov);
}
};
G_CreatePlate = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new PlateObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateSpike = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpikeObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateElectro = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new ElectroObj(l_RefMov);
G_Items.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateBonus = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new BonusObj(l_RefMov);
}
};
G_CreateSpit = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpitObj(l_RefMov);
}
};
G_DoPause = function () {
G_Pause = true;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.stop();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.stop();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.stop();
}
}
for (var _local2 in G_ScoreFields) {
_global.C.Score[G_ScoreFields[_local2]].mMcField.stop();
}
if ((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) {
_global.C.Player1.RefMov.Obj.Etat.Fly.stop();
} else if ((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) {
_global.C.Player2.RefMov.Obj.Etat.Fly.stop();
}
};
G_DoUnPause = function () {
G_Pause = false;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.play();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.play();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.play();
}
}
_global.C.Score[G_ScoreFields[_local2]].mMcField.play();
if (((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) and (_global.C.Player1.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player1.RefMov.Obj.Etat.Fly.play();
} else if (((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) and (_global.C.Player2.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player2.RefMov.Obj.Etat.Fly.play();
}
};
G_CreateScore = function () {
Score = new ScoreObj();
};
G_CreateScore();
}
onClipEvent (enterFrame) {
if (!G_Pause) {
G_CallActivate();
for (var i in G_Players) {
this[G_Players[i]].Actions();
}
for (var i in G_Items) {
this[G_Items[i]].Actions();
}
G_SetTime();
}
_global.Sounds.Fade();
}
Symbol 949 MovieClip Frame 2
stop();
Instance of Symbol 538 MovieClip in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 542 MovieClip [AnimPointage] "mcScoreDuplicate" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 590 MovieClip "StatPlayer2" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 690 MovieClip [Dragon] "Dragon1" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateDragon(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 936 MovieClip "Player1" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50000);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("PasLa");
}
Instance of Symbol 936 MovieClip "Player2" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer == 2) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50001);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("PasLa");
} else {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 946 MovieClip [Spit] "Spit1" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateSpit(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 947 MovieClip "mcScoreContainer" in Symbol 949 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(80000);
}
Symbol 951 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnNext");
}
Symbol 952 MovieClip Frame 1
stop();
Symbol 952 MovieClip Frame 21
_parent._parent.gotoAndStop("Page2");
Symbol 954 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnBack");
}
Symbol 955 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 21
_parent._parent.gotoAndStop("Page1");
Symbol 956 MovieClip Frame 41
_global.Sounds.UndoMute();
_global.C.G_DoUnPause();
_parent._parent.gotoAndStop(1);
stop();
Symbol 958 MovieClip Frame 1
stop();
Symbol 958 MovieClip Frame 2
LockBtn.useHandCursor = false;
stop();
Symbol 963 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Symbol 965 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Instance of Symbol 560 MovieClip in Symbol 966 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player3Choice);
}
Instance of Symbol 560 MovieClip in Symbol 967 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player4Choice);
}
Instance of Symbol 560 MovieClip in Symbol 968 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player2Choice);
}
Symbol 971 MovieClip Frame 1
stop();
Symbol 971 MovieClip Frame 10
NoBonus = _global.C[this._name].NoBonus;
Symbol 975 MovieClip Frame 1
stop();
Symbol 975 MovieClip Frame 25
if (_global.Param.G_GameOver) {
_global.Param.G_GameOver = false;
_global.Param._parent.gotoAndStop("Loose");
} else {
_global.Param.G_Level++;
_global.Param._parent.gotoAndStop("Level" + _global.Param.G_Level);
}
Instance of Symbol 3 MovieClip "Control" in Symbol 976 MovieClip Frame 1
onClipEvent (load) {
function G_SetTime() {
if (!G_SquidPower) {
G_NbEnterFr++;
if (G_NbEnterFr == G_EnterFrBySec) {
G_TimeNow++;
G_NbEnterFr = 0;
}
} else {
G_NbEnterFrSquid++;
if (G_NbEnterFrSquid == G_EnterFrBySec) {
G_TimeNowSquid++;
G_NbEnterFrSquid = 0;
}
}
}
function G_CallActivate() {
this["G_ActivateLvl" + _global.Param.G_Level]();
G_CheckPowerUse();
G_ActiveBkUp();
G_ActiveDragon();
G_CheckEnd();
}
function G_ActiveEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_StartEnemy[0]].AttachType, G_StartEnemy[0], G_IndexDepth);
this[G_StartEnemy[0]].RefMov = _parent[G_StartEnemy[0]];
G_IndexDepth++;
G_Items.push(G_StartEnemy[0]);
G_HitItem.push(G_StartEnemy[0]);
this[G_StartEnemy[0]].StartEnter();
G_StartEnemy.splice(0, 1);
}
function G_CheckPowerUse() {
if (G_SquidPower) {
if (G_TimeNowSquid == G_SquidPowerEnd) {
G_TimeNowSquid = 0;
G_SquidPower = false;
}
}
if (G_PatPower) {
if ((G_PatNbSpit < 3) and (this[G_WhoUsePat].Etat != "Die")) {
if (_global.C._parent.Spit1._x == undefined) {
if ((this[G_WhoUsePat].Etat == "Idle") or (this[G_WhoUsePat].Etat == "Fly")) {
this[G_WhoUsePat].Etat = "UsePower";
G_PatNbSpit++;
}
}
} else {
G_PatNbSpit = 0;
G_PatPower = false;
}
}
}
function G_ActiveBkEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_BkUpEnemy[0]].AttachType, G_BkUpEnemy[0], G_IndexDepth);
this[G_BkUpEnemy[0]].RefMov = _parent[G_BkUpEnemy[0]];
G_IndexDepth++;
G_Items.push(G_BkUpEnemy[0]);
G_HitItem.push(G_BkUpEnemy[0]);
this[G_BkUpEnemy[0]].StartEnter();
G_BkUpEnemy.splice(0, 1);
}
function G_ActiveDragon() {
if ((G_TimeNow == Dragon1.NextTimeAct) and (Dragon1.Etat == "Wait")) {
Dragon1.SetMoveParam();
}
}
function G_ActivateLvl1() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl3() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl5() {
G_ActivateLvl3();
}
function G_ActivateLvl7() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl9() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
case 12 :
G_LastActivate = 12;
G_ActiveEnemy();
return;
}
}
}
function G_ActiveBkUp() {
if (((G_StartEnemy.length == 0) and (G_BkUpEnemy.length > 0)) and (G_NbEnemys < G_MaxEnemy)) {
G_ActiveBkEnemy();
}
}
function G_CheckEnd() {
if (_parent._parent.LvlTransit._currentframe == 1) {
if (_global.Param.G_LvlType == "Normal") {
if (((G_NbEnemys == 0) and (G_StartEnemy.length == 0)) and (G_BkUpEnemy.length == 0)) {
G_EndLevel();
} else if (_global.Param.G_NbPlayer == 2) {
if ((((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) and (_global.Param.G_LifePlayer2 == -1)) and (Player2.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if ((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if (_global.Param.G_NbPlayer == 2) {
if ((((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or ((((!Player2.IsOver) and Player1.IsOver) and Player3.IsOver) and Player4.IsOver)) or (Player1.IsOver and Player2.IsOver)) {
G_EndLevel();
}
} else if (((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or Player1.IsOver) {
G_EndLevel();
}
}
}
function G_EndLevel() {
if (_global.Param.G_LvlType == "Normal") {
if (_global.Param.G_GameOver) {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.GenTransit.Dest = "Loose";
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
} else if (_global.Param.G_Level == 10) {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
if (_global.Param.G_NbPlayer == 2) {
_parent._parent.GenTransit.Dest = "Win2Player";
} else {
_parent._parent.GenTransit.Dest = "Win1Player";
}
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
_global.Sounds.StopSound("PowerSandy3");
_global.Sounds.StopSound("PowerBob2");
}
function G_ActiveBonus() {
if (G_BonusList.length != 0) {
if (G_NextActivate == 0) {
G_NextActivate = random(5) + 5;
}
if (G_TimeNow == G_NextActivate) {
var _local2 = random(G_BonusList.length);
var _local3 = G_BonusList[_local2];
G_BonusList.splice(_local2, 1);
_global.C[_local3].Etat = "Enter";
G_NextActivate = (random(5) + 5) + G_TimeNow;
}
}
}
function G_ActivateLvl2() {
G_ActiveBonus();
}
function G_ActivateLvl4() {
G_ActiveBonus();
}
function G_ActivateLvl6() {
G_ActiveBonus();
}
function G_ActivateLvl8() {
G_ActiveBonus();
}
function G_ActivateLvl10() {
G_ActiveBonus();
}
_global.C = this;
G_Pause = true;
G_HitItem = new Array();
G_Players = new Array();
G_Items = new Array();
G_ScoreFields = new Array();
G_IndexPlate = 1;
G_IndexSpike = 1;
G_IndexElectro = 1;
G_IndexType1Enemy = 1;
G_IndexType2Enemy = 1;
G_IndexType3Enemy = 1;
G_IndexBonus = 1;
G_IndexDepth = 1000;
G_RBord = 500;
G_LBord = 0;
G_TimeNow = 0;
G_EnterFrBySec = 35;
G_NbEnterFr = 0;
G_TimeNowSquid = 0;
G_NbEnterFrSquid = 0;
G_SquidPower = false;
G_SquidPowerEnd = 0;
G_PatPower = false;
G_PatNbSpit = 0;
G_WhoUsePat = "";
G_Ground = 0;
G_StartPos = new Array();
switch (_global.Param.G_Level) {
case 1 :
G_MaxEnemy = 3;
break;
case 3 :
G_MaxEnemy = 4;
break;
case 5 :
G_MaxEnemy = 4;
break;
case 7 :
G_MaxEnemy = 5;
break;
case 9 :
G_MaxEnemy = 6;
break;
}
G_NbEnemys = 0;
switch (_global.Param.G_Level) {
case 1 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type1Enemy3");
break;
case 3 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type2Enemy1", "Type2Enemy2");
break;
case 5 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1");
break;
case 7 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1", "Type3Enemy2");
break;
case 9 :
G_StartEnemy = new Array("Type2Enemy1", "Type3Enemy1", "Type2Enemy2", "Type3Enemy2", "Type3Enemy3", "Type3Enemy4");
break;
}
switch (_global.Param.G_Level) {
case 1 :
G_BkUpEnemy = new Array("Type1Enemy4");
break;
case 3 :
G_BkUpEnemy = new Array("Type1Enemy3", "Type1Enemy4", "Type2Enemy3", "Type1Enemy5", "Type2Enemy4");
break;
case 5 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type1Enemy3", "Type2Enemy5", "Type2Enemy6", "Type2Enemy7", "Type3Enemy2");
break;
case 7 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type3Enemy3", "Type2Enemy5", "Type2Enemy6", "Type3Enemy4", "Type3Enemy5", "Type2Enemy7", "Type3Enemy6", "Type3Enemy7");
break;
case 9 :
G_BkUpEnemy = new Array("Type3Enemy5", "Type3Enemy6", "Type2Enemy3", "Type3Enemy7", "Type2Enemy4", "Type3Enemy8", "Type3Enemy9", "Type2Enemy5", "Type3Enemy10", "Type2Enemy6", "Type2Enemy7", "Type3Enemy11", "Type3Enemy12", "Type3Enemy13");
break;
}
G_AllEnemy = G_StartEnemy.concat(G_BkUpEnemy);
G_AutoPower = G_AllEnemy[random(G_AllEnemy.length)];
G_NbWindows = 0;
G_LastActivate = 0;
G_NextActivate = 0;
G_BonusList = new Array();
G_CreatePlayer = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
if (l_RefMov._name == "Player1") {
this[l_RefMov._name] = new Player1Obj(l_RefMov);
} else {
this[l_RefMov._name] = new Player2Obj(l_RefMov);
}
}
};
G_CreateType1Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type1EnemyObj(l_RefMov);
}
};
G_CreateType2Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type2EnemyObj(l_RefMov);
}
};
G_CreateType3Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type3EnemyObj(l_RefMov);
}
};
G_CreatePlayerEnemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new PlayerEnemyObj(l_RefMov);
}
};
G_CreateDragon = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new DragonObj(l_RefMov);
}
};
G_CreatePlate = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new PlateObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateSpike = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpikeObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateElectro = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new ElectroObj(l_RefMov);
G_Items.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateBonus = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new BonusObj(l_RefMov);
}
};
G_CreateSpit = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpitObj(l_RefMov);
}
};
G_DoPause = function () {
G_Pause = true;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.stop();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.stop();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.stop();
}
}
for (var _local2 in G_ScoreFields) {
_global.C.Score[G_ScoreFields[_local2]].mMcField.stop();
}
if ((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) {
_global.C.Player1.RefMov.Obj.Etat.Fly.stop();
} else if ((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) {
_global.C.Player2.RefMov.Obj.Etat.Fly.stop();
}
};
G_DoUnPause = function () {
G_Pause = false;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.play();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.play();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.play();
}
}
_global.C.Score[G_ScoreFields[_local2]].mMcField.play();
if (((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) and (_global.C.Player1.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player1.RefMov.Obj.Etat.Fly.play();
} else if (((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) and (_global.C.Player2.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player2.RefMov.Obj.Etat.Fly.play();
}
};
G_CreateScore = function () {
Score = new ScoreObj();
};
G_CreateScore();
}
onClipEvent (enterFrame) {
if (!G_Pause) {
G_CallActivate();
for (var i in G_Players) {
this[G_Players[i]].Actions();
}
for (var i in G_Items) {
this[G_Items[i]].Actions();
}
G_SetTime();
}
_global.Sounds.Fade();
}
Symbol 976 MovieClip Frame 2
stop();
Instance of Symbol 538 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 590 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this.swapDepths(10);
this.removeMovieClip();
} else {
this._name = "StatPlayer2";
}
}
Instance of Symbol 968 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this._name = "StatPlayer2";
} else {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 971 MovieClip in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this._name = "Bonus" + _global.C.G_IndexBonus;
_global.C.G_IndexBonus++;
_global.C.G_CreateBonus(this);
this.gotoAndStop("Wait");
}
Instance of Symbol 936 MovieClip "Player1" in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50000);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
_global.C[this._name].Etat = "Idle";
_global.C[this._name].BlocMove = true;
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("Idle");
}
Instance of Symbol 936 MovieClip "Player2" in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer == 2) {
_global.C.G_CreatePlayer(this);
} else {
_global.C.G_CreatePlayerEnemy(this);
}
this.swapDepths(50001);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
_global.C[this._name].Etat = "Idle";
_global.C[this._name].BlocMove = true;
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("Idle");
}
Instance of Symbol 936 MovieClip "Player3" in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayerEnemy(this);
this.swapDepths(50002);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
_global.C[this._name].Etat = "Idle";
_global.C[this._name].BlocMove = true;
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("Idle");
}
Instance of Symbol 936 MovieClip "Player4" in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayerEnemy(this);
this.swapDepths(50003);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
_global.C[this._name].Etat = "Idle";
_global.C[this._name].BlocMove = true;
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("Idle");
}
Instance of Symbol 947 MovieClip "mcScoreContainer" in Symbol 976 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(80000);
}
Symbol 990 MovieClip Frame 1
this._name = "Electro" + _global.C.G_IndexElectro;
_global.C.G_IndexElectro++;
_global.C.G_CreateElectro(this);
Symbol 993 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Symbol 994 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
this.swapDepths(10);
this.removeMovieClip();
Symbol 997 MovieClip Frame 1
this._name = "Spike" + _global.C.G_IndexSpike;
_global.C.G_IndexSpike++;
_global.C.G_CreateSpike(this);
Symbol 1039 MovieClip Frame 1
stop();
Symbol 1039 MovieClip Frame 70
NoBonus = _global.C[_parent._name].NoBonus;
Symbol 1040 MovieClip [Type2Enemy] Frame 1
stop();
Instance of Symbol 1039 MovieClip "Obj" in Symbol 1040 MovieClip [Type2Enemy] Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.C[_parent._name].Etat);
}
Instance of Symbol 3 MovieClip "Control" in Symbol 1041 MovieClip Frame 1
onClipEvent (load) {
function G_SetTime() {
if (!G_SquidPower) {
G_NbEnterFr++;
if (G_NbEnterFr == G_EnterFrBySec) {
G_TimeNow++;
G_NbEnterFr = 0;
}
} else {
G_NbEnterFrSquid++;
if (G_NbEnterFrSquid == G_EnterFrBySec) {
G_TimeNowSquid++;
G_NbEnterFrSquid = 0;
}
}
}
function G_CallActivate() {
this["G_ActivateLvl" + _global.Param.G_Level]();
G_CheckPowerUse();
G_ActiveBkUp();
G_ActiveDragon();
G_CheckEnd();
}
function G_ActiveEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_StartEnemy[0]].AttachType, G_StartEnemy[0], G_IndexDepth);
this[G_StartEnemy[0]].RefMov = _parent[G_StartEnemy[0]];
G_IndexDepth++;
G_Items.push(G_StartEnemy[0]);
G_HitItem.push(G_StartEnemy[0]);
this[G_StartEnemy[0]].StartEnter();
G_StartEnemy.splice(0, 1);
}
function G_CheckPowerUse() {
if (G_SquidPower) {
if (G_TimeNowSquid == G_SquidPowerEnd) {
G_TimeNowSquid = 0;
G_SquidPower = false;
}
}
if (G_PatPower) {
if ((G_PatNbSpit < 3) and (this[G_WhoUsePat].Etat != "Die")) {
if (_global.C._parent.Spit1._x == undefined) {
if ((this[G_WhoUsePat].Etat == "Idle") or (this[G_WhoUsePat].Etat == "Fly")) {
this[G_WhoUsePat].Etat = "UsePower";
G_PatNbSpit++;
}
}
} else {
G_PatNbSpit = 0;
G_PatPower = false;
}
}
}
function G_ActiveBkEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_BkUpEnemy[0]].AttachType, G_BkUpEnemy[0], G_IndexDepth);
this[G_BkUpEnemy[0]].RefMov = _parent[G_BkUpEnemy[0]];
G_IndexDepth++;
G_Items.push(G_BkUpEnemy[0]);
G_HitItem.push(G_BkUpEnemy[0]);
this[G_BkUpEnemy[0]].StartEnter();
G_BkUpEnemy.splice(0, 1);
}
function G_ActiveDragon() {
if ((G_TimeNow == Dragon1.NextTimeAct) and (Dragon1.Etat == "Wait")) {
Dragon1.SetMoveParam();
}
}
function G_ActivateLvl1() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl3() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl5() {
G_ActivateLvl3();
}
function G_ActivateLvl7() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl9() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
case 12 :
G_LastActivate = 12;
G_ActiveEnemy();
return;
}
}
}
function G_ActiveBkUp() {
if (((G_StartEnemy.length == 0) and (G_BkUpEnemy.length > 0)) and (G_NbEnemys < G_MaxEnemy)) {
G_ActiveBkEnemy();
}
}
function G_CheckEnd() {
if (_parent._parent.LvlTransit._currentframe == 1) {
if (_global.Param.G_LvlType == "Normal") {
if (((G_NbEnemys == 0) and (G_StartEnemy.length == 0)) and (G_BkUpEnemy.length == 0)) {
G_EndLevel();
} else if (_global.Param.G_NbPlayer == 2) {
if ((((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) and (_global.Param.G_LifePlayer2 == -1)) and (Player2.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if ((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if (_global.Param.G_NbPlayer == 2) {
if ((((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or ((((!Player2.IsOver) and Player1.IsOver) and Player3.IsOver) and Player4.IsOver)) or (Player1.IsOver and Player2.IsOver)) {
G_EndLevel();
}
} else if (((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or Player1.IsOver) {
G_EndLevel();
}
}
}
function G_EndLevel() {
if (_global.Param.G_LvlType == "Normal") {
if (_global.Param.G_GameOver) {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.GenTransit.Dest = "Loose";
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
} else if (_global.Param.G_Level == 10) {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
if (_global.Param.G_NbPlayer == 2) {
_parent._parent.GenTransit.Dest = "Win2Player";
} else {
_parent._parent.GenTransit.Dest = "Win1Player";
}
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
_global.Sounds.StopSound("PowerSandy3");
_global.Sounds.StopSound("PowerBob2");
}
function G_ActiveBonus() {
if (G_BonusList.length != 0) {
if (G_NextActivate == 0) {
G_NextActivate = random(5) + 5;
}
if (G_TimeNow == G_NextActivate) {
var _local2 = random(G_BonusList.length);
var _local3 = G_BonusList[_local2];
G_BonusList.splice(_local2, 1);
_global.C[_local3].Etat = "Enter";
G_NextActivate = (random(5) + 5) + G_TimeNow;
}
}
}
function G_ActivateLvl2() {
G_ActiveBonus();
}
function G_ActivateLvl4() {
G_ActiveBonus();
}
function G_ActivateLvl6() {
G_ActiveBonus();
}
function G_ActivateLvl8() {
G_ActiveBonus();
}
function G_ActivateLvl10() {
G_ActiveBonus();
}
_global.C = this;
G_Pause = true;
G_HitItem = new Array();
G_Players = new Array();
G_Items = new Array();
G_ScoreFields = new Array();
G_IndexPlate = 1;
G_IndexSpike = 1;
G_IndexElectro = 1;
G_IndexType1Enemy = 1;
G_IndexType2Enemy = 1;
G_IndexType3Enemy = 1;
G_IndexBonus = 1;
G_IndexDepth = 1000;
G_RBord = 500;
G_LBord = 0;
G_TimeNow = 0;
G_EnterFrBySec = 35;
G_NbEnterFr = 0;
G_TimeNowSquid = 0;
G_NbEnterFrSquid = 0;
G_SquidPower = false;
G_SquidPowerEnd = 0;
G_PatPower = false;
G_PatNbSpit = 0;
G_WhoUsePat = "";
G_Ground = 0;
G_StartPos = new Array();
switch (_global.Param.G_Level) {
case 1 :
G_MaxEnemy = 3;
break;
case 3 :
G_MaxEnemy = 4;
break;
case 5 :
G_MaxEnemy = 4;
break;
case 7 :
G_MaxEnemy = 5;
break;
case 9 :
G_MaxEnemy = 6;
break;
}
G_NbEnemys = 0;
switch (_global.Param.G_Level) {
case 1 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type1Enemy3");
break;
case 3 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type2Enemy1", "Type2Enemy2");
break;
case 5 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1");
break;
case 7 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1", "Type3Enemy2");
break;
case 9 :
G_StartEnemy = new Array("Type2Enemy1", "Type3Enemy1", "Type2Enemy2", "Type3Enemy2", "Type3Enemy3", "Type3Enemy4");
break;
}
switch (_global.Param.G_Level) {
case 1 :
G_BkUpEnemy = new Array("Type1Enemy4");
break;
case 3 :
G_BkUpEnemy = new Array("Type1Enemy3", "Type1Enemy4", "Type2Enemy3", "Type1Enemy5", "Type2Enemy4");
break;
case 5 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type1Enemy3", "Type2Enemy5", "Type2Enemy6", "Type2Enemy7", "Type3Enemy2");
break;
case 7 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type3Enemy3", "Type2Enemy5", "Type2Enemy6", "Type3Enemy4", "Type3Enemy5", "Type2Enemy7", "Type3Enemy6", "Type3Enemy7");
break;
case 9 :
G_BkUpEnemy = new Array("Type3Enemy5", "Type3Enemy6", "Type2Enemy3", "Type3Enemy7", "Type2Enemy4", "Type3Enemy8", "Type3Enemy9", "Type2Enemy5", "Type3Enemy10", "Type2Enemy6", "Type2Enemy7", "Type3Enemy11", "Type3Enemy12", "Type3Enemy13");
break;
}
G_AllEnemy = G_StartEnemy.concat(G_BkUpEnemy);
G_AutoPower = G_AllEnemy[random(G_AllEnemy.length)];
G_NbWindows = 0;
G_LastActivate = 0;
G_NextActivate = 0;
G_BonusList = new Array();
G_CreatePlayer = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
if (l_RefMov._name == "Player1") {
this[l_RefMov._name] = new Player1Obj(l_RefMov);
} else {
this[l_RefMov._name] = new Player2Obj(l_RefMov);
}
}
};
G_CreateType1Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type1EnemyObj(l_RefMov);
}
};
G_CreateType2Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type2EnemyObj(l_RefMov);
}
};
G_CreateType3Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type3EnemyObj(l_RefMov);
}
};
G_CreatePlayerEnemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new PlayerEnemyObj(l_RefMov);
}
};
G_CreateDragon = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new DragonObj(l_RefMov);
}
};
G_CreatePlate = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new PlateObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateSpike = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpikeObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateElectro = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new ElectroObj(l_RefMov);
G_Items.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateBonus = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new BonusObj(l_RefMov);
}
};
G_CreateSpit = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpitObj(l_RefMov);
}
};
G_DoPause = function () {
G_Pause = true;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.stop();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.stop();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.stop();
}
}
for (var _local2 in G_ScoreFields) {
_global.C.Score[G_ScoreFields[_local2]].mMcField.stop();
}
if ((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) {
_global.C.Player1.RefMov.Obj.Etat.Fly.stop();
} else if ((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) {
_global.C.Player2.RefMov.Obj.Etat.Fly.stop();
}
};
G_DoUnPause = function () {
G_Pause = false;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.play();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.play();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.play();
}
}
_global.C.Score[G_ScoreFields[_local2]].mMcField.play();
if (((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) and (_global.C.Player1.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player1.RefMov.Obj.Etat.Fly.play();
} else if (((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) and (_global.C.Player2.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player2.RefMov.Obj.Etat.Fly.play();
}
};
G_CreateScore = function () {
Score = new ScoreObj();
};
G_CreateScore();
}
onClipEvent (enterFrame) {
if (!G_Pause) {
G_CallActivate();
for (var i in G_Players) {
this[G_Players[i]].Actions();
}
for (var i in G_Items) {
this[G_Items[i]].Actions();
}
G_SetTime();
}
_global.Sounds.Fade();
}
Symbol 1041 MovieClip Frame 2
stop();
Instance of Symbol 538 MovieClip in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 994 MovieClip in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 590 MovieClip "StatPlayer2" in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 690 MovieClip [Dragon] "Dragon1" in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateDragon(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 936 MovieClip "Player2" in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer == 2) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50001);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("PasLa");
} else {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 936 MovieClip "Player1" in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50000);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("PasLa");
}
Instance of Symbol 946 MovieClip [Spit] "Spit1" in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateSpit(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 947 MovieClip "mcScoreContainer" in Symbol 1041 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(80000);
}
Symbol 1052 MovieClip Frame 1
this._name = "Electro" + _global.C.G_IndexElectro;
_global.C.G_IndexElectro++;
_global.C.G_CreateElectro(this);
Symbol 1053 MovieClip Frame 1
this._name = "Spike" + _global.C.G_IndexSpike;
_global.C.G_IndexSpike++;
_global.C.G_CreateSpike(this);
Symbol 1054 MovieClip Frame 1
this._name = "Spike" + _global.C.G_IndexSpike;
_global.C.G_IndexSpike++;
_global.C.G_CreateSpike(this);
Symbol 1083 MovieClip Frame 1
stop();
Symbol 1083 MovieClip Frame 70
NoBonus = _global.C[_parent._name].NoBonus;
Symbol 1084 MovieClip [Type3Enemy] Frame 1
stop();
Instance of Symbol 1083 MovieClip "Obj" in Symbol 1084 MovieClip [Type3Enemy] Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.C[_parent._name].Etat);
}
Instance of Symbol 3 MovieClip "Control" in Symbol 1085 MovieClip Frame 1
onClipEvent (load) {
function G_SetTime() {
if (!G_SquidPower) {
G_NbEnterFr++;
if (G_NbEnterFr == G_EnterFrBySec) {
G_TimeNow++;
G_NbEnterFr = 0;
}
} else {
G_NbEnterFrSquid++;
if (G_NbEnterFrSquid == G_EnterFrBySec) {
G_TimeNowSquid++;
G_NbEnterFrSquid = 0;
}
}
}
function G_CallActivate() {
this["G_ActivateLvl" + _global.Param.G_Level]();
G_CheckPowerUse();
G_ActiveBkUp();
G_ActiveDragon();
G_CheckEnd();
}
function G_ActiveEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_StartEnemy[0]].AttachType, G_StartEnemy[0], G_IndexDepth);
this[G_StartEnemy[0]].RefMov = _parent[G_StartEnemy[0]];
G_IndexDepth++;
G_Items.push(G_StartEnemy[0]);
G_HitItem.push(G_StartEnemy[0]);
this[G_StartEnemy[0]].StartEnter();
G_StartEnemy.splice(0, 1);
}
function G_CheckPowerUse() {
if (G_SquidPower) {
if (G_TimeNowSquid == G_SquidPowerEnd) {
G_TimeNowSquid = 0;
G_SquidPower = false;
}
}
if (G_PatPower) {
if ((G_PatNbSpit < 3) and (this[G_WhoUsePat].Etat != "Die")) {
if (_global.C._parent.Spit1._x == undefined) {
if ((this[G_WhoUsePat].Etat == "Idle") or (this[G_WhoUsePat].Etat == "Fly")) {
this[G_WhoUsePat].Etat = "UsePower";
G_PatNbSpit++;
}
}
} else {
G_PatNbSpit = 0;
G_PatPower = false;
}
}
}
function G_ActiveBkEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_BkUpEnemy[0]].AttachType, G_BkUpEnemy[0], G_IndexDepth);
this[G_BkUpEnemy[0]].RefMov = _parent[G_BkUpEnemy[0]];
G_IndexDepth++;
G_Items.push(G_BkUpEnemy[0]);
G_HitItem.push(G_BkUpEnemy[0]);
this[G_BkUpEnemy[0]].StartEnter();
G_BkUpEnemy.splice(0, 1);
}
function G_ActiveDragon() {
if ((G_TimeNow == Dragon1.NextTimeAct) and (Dragon1.Etat == "Wait")) {
Dragon1.SetMoveParam();
}
}
function G_ActivateLvl1() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl3() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl5() {
G_ActivateLvl3();
}
function G_ActivateLvl7() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl9() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
case 12 :
G_LastActivate = 12;
G_ActiveEnemy();
return;
}
}
}
function G_ActiveBkUp() {
if (((G_StartEnemy.length == 0) and (G_BkUpEnemy.length > 0)) and (G_NbEnemys < G_MaxEnemy)) {
G_ActiveBkEnemy();
}
}
function G_CheckEnd() {
if (_parent._parent.LvlTransit._currentframe == 1) {
if (_global.Param.G_LvlType == "Normal") {
if (((G_NbEnemys == 0) and (G_StartEnemy.length == 0)) and (G_BkUpEnemy.length == 0)) {
G_EndLevel();
} else if (_global.Param.G_NbPlayer == 2) {
if ((((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) and (_global.Param.G_LifePlayer2 == -1)) and (Player2.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if ((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if (_global.Param.G_NbPlayer == 2) {
if ((((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or ((((!Player2.IsOver) and Player1.IsOver) and Player3.IsOver) and Player4.IsOver)) or (Player1.IsOver and Player2.IsOver)) {
G_EndLevel();
}
} else if (((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or Player1.IsOver) {
G_EndLevel();
}
}
}
function G_EndLevel() {
if (_global.Param.G_LvlType == "Normal") {
if (_global.Param.G_GameOver) {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.GenTransit.Dest = "Loose";
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
} else if (_global.Param.G_Level == 10) {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
if (_global.Param.G_NbPlayer == 2) {
_parent._parent.GenTransit.Dest = "Win2Player";
} else {
_parent._parent.GenTransit.Dest = "Win1Player";
}
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
_global.Sounds.StopSound("PowerSandy3");
_global.Sounds.StopSound("PowerBob2");
}
function G_ActiveBonus() {
if (G_BonusList.length != 0) {
if (G_NextActivate == 0) {
G_NextActivate = random(5) + 5;
}
if (G_TimeNow == G_NextActivate) {
var _local2 = random(G_BonusList.length);
var _local3 = G_BonusList[_local2];
G_BonusList.splice(_local2, 1);
_global.C[_local3].Etat = "Enter";
G_NextActivate = (random(5) + 5) + G_TimeNow;
}
}
}
function G_ActivateLvl2() {
G_ActiveBonus();
}
function G_ActivateLvl4() {
G_ActiveBonus();
}
function G_ActivateLvl6() {
G_ActiveBonus();
}
function G_ActivateLvl8() {
G_ActiveBonus();
}
function G_ActivateLvl10() {
G_ActiveBonus();
}
_global.C = this;
G_Pause = true;
G_HitItem = new Array();
G_Players = new Array();
G_Items = new Array();
G_ScoreFields = new Array();
G_IndexPlate = 1;
G_IndexSpike = 1;
G_IndexElectro = 1;
G_IndexType1Enemy = 1;
G_IndexType2Enemy = 1;
G_IndexType3Enemy = 1;
G_IndexBonus = 1;
G_IndexDepth = 1000;
G_RBord = 500;
G_LBord = 0;
G_TimeNow = 0;
G_EnterFrBySec = 35;
G_NbEnterFr = 0;
G_TimeNowSquid = 0;
G_NbEnterFrSquid = 0;
G_SquidPower = false;
G_SquidPowerEnd = 0;
G_PatPower = false;
G_PatNbSpit = 0;
G_WhoUsePat = "";
G_Ground = 0;
G_StartPos = new Array();
switch (_global.Param.G_Level) {
case 1 :
G_MaxEnemy = 3;
break;
case 3 :
G_MaxEnemy = 4;
break;
case 5 :
G_MaxEnemy = 4;
break;
case 7 :
G_MaxEnemy = 5;
break;
case 9 :
G_MaxEnemy = 6;
break;
}
G_NbEnemys = 0;
switch (_global.Param.G_Level) {
case 1 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type1Enemy3");
break;
case 3 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type2Enemy1", "Type2Enemy2");
break;
case 5 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1");
break;
case 7 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1", "Type3Enemy2");
break;
case 9 :
G_StartEnemy = new Array("Type2Enemy1", "Type3Enemy1", "Type2Enemy2", "Type3Enemy2", "Type3Enemy3", "Type3Enemy4");
break;
}
switch (_global.Param.G_Level) {
case 1 :
G_BkUpEnemy = new Array("Type1Enemy4");
break;
case 3 :
G_BkUpEnemy = new Array("Type1Enemy3", "Type1Enemy4", "Type2Enemy3", "Type1Enemy5", "Type2Enemy4");
break;
case 5 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type1Enemy3", "Type2Enemy5", "Type2Enemy6", "Type2Enemy7", "Type3Enemy2");
break;
case 7 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type3Enemy3", "Type2Enemy5", "Type2Enemy6", "Type3Enemy4", "Type3Enemy5", "Type2Enemy7", "Type3Enemy6", "Type3Enemy7");
break;
case 9 :
G_BkUpEnemy = new Array("Type3Enemy5", "Type3Enemy6", "Type2Enemy3", "Type3Enemy7", "Type2Enemy4", "Type3Enemy8", "Type3Enemy9", "Type2Enemy5", "Type3Enemy10", "Type2Enemy6", "Type2Enemy7", "Type3Enemy11", "Type3Enemy12", "Type3Enemy13");
break;
}
G_AllEnemy = G_StartEnemy.concat(G_BkUpEnemy);
G_AutoPower = G_AllEnemy[random(G_AllEnemy.length)];
G_NbWindows = 0;
G_LastActivate = 0;
G_NextActivate = 0;
G_BonusList = new Array();
G_CreatePlayer = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
if (l_RefMov._name == "Player1") {
this[l_RefMov._name] = new Player1Obj(l_RefMov);
} else {
this[l_RefMov._name] = new Player2Obj(l_RefMov);
}
}
};
G_CreateType1Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type1EnemyObj(l_RefMov);
}
};
G_CreateType2Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type2EnemyObj(l_RefMov);
}
};
G_CreateType3Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type3EnemyObj(l_RefMov);
}
};
G_CreatePlayerEnemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new PlayerEnemyObj(l_RefMov);
}
};
G_CreateDragon = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new DragonObj(l_RefMov);
}
};
G_CreatePlate = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new PlateObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateSpike = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpikeObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateElectro = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new ElectroObj(l_RefMov);
G_Items.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateBonus = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new BonusObj(l_RefMov);
}
};
G_CreateSpit = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpitObj(l_RefMov);
}
};
G_DoPause = function () {
G_Pause = true;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.stop();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.stop();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.stop();
}
}
for (var _local2 in G_ScoreFields) {
_global.C.Score[G_ScoreFields[_local2]].mMcField.stop();
}
if ((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) {
_global.C.Player1.RefMov.Obj.Etat.Fly.stop();
} else if ((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) {
_global.C.Player2.RefMov.Obj.Etat.Fly.stop();
}
};
G_DoUnPause = function () {
G_Pause = false;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.play();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.play();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.play();
}
}
_global.C.Score[G_ScoreFields[_local2]].mMcField.play();
if (((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) and (_global.C.Player1.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player1.RefMov.Obj.Etat.Fly.play();
} else if (((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) and (_global.C.Player2.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player2.RefMov.Obj.Etat.Fly.play();
}
};
G_CreateScore = function () {
Score = new ScoreObj();
};
G_CreateScore();
}
onClipEvent (enterFrame) {
if (!G_Pause) {
G_CallActivate();
for (var i in G_Players) {
this[G_Players[i]].Actions();
}
for (var i in G_Items) {
this[G_Items[i]].Actions();
}
G_SetTime();
}
_global.Sounds.Fade();
}
Symbol 1085 MovieClip Frame 2
stop();
Instance of Symbol 538 MovieClip in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 590 MovieClip "StatPlayer2" in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 690 MovieClip [Dragon] "Dragon1" in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateDragon(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 936 MovieClip "Player1" in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50000);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("PasLa");
}
Instance of Symbol 936 MovieClip "Player2" in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer == 2) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50001);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("PasLa");
} else {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 946 MovieClip [Spit] "Spit1" in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateSpit(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 947 MovieClip "mcScoreContainer" in Symbol 1085 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(80000);
}
Symbol 1086 MovieClip Frame 1
this._name = "Spike" + _global.C.G_IndexSpike;
_global.C.G_IndexSpike++;
_global.C.G_CreateSpike(this);
Instance of Symbol 3 MovieClip "Control" in Symbol 1087 MovieClip Frame 1
onClipEvent (load) {
function G_SetTime() {
if (!G_SquidPower) {
G_NbEnterFr++;
if (G_NbEnterFr == G_EnterFrBySec) {
G_TimeNow++;
G_NbEnterFr = 0;
}
} else {
G_NbEnterFrSquid++;
if (G_NbEnterFrSquid == G_EnterFrBySec) {
G_TimeNowSquid++;
G_NbEnterFrSquid = 0;
}
}
}
function G_CallActivate() {
this["G_ActivateLvl" + _global.Param.G_Level]();
G_CheckPowerUse();
G_ActiveBkUp();
G_ActiveDragon();
G_CheckEnd();
}
function G_ActiveEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_StartEnemy[0]].AttachType, G_StartEnemy[0], G_IndexDepth);
this[G_StartEnemy[0]].RefMov = _parent[G_StartEnemy[0]];
G_IndexDepth++;
G_Items.push(G_StartEnemy[0]);
G_HitItem.push(G_StartEnemy[0]);
this[G_StartEnemy[0]].StartEnter();
G_StartEnemy.splice(0, 1);
}
function G_CheckPowerUse() {
if (G_SquidPower) {
if (G_TimeNowSquid == G_SquidPowerEnd) {
G_TimeNowSquid = 0;
G_SquidPower = false;
}
}
if (G_PatPower) {
if ((G_PatNbSpit < 3) and (this[G_WhoUsePat].Etat != "Die")) {
if (_global.C._parent.Spit1._x == undefined) {
if ((this[G_WhoUsePat].Etat == "Idle") or (this[G_WhoUsePat].Etat == "Fly")) {
this[G_WhoUsePat].Etat = "UsePower";
G_PatNbSpit++;
}
}
} else {
G_PatNbSpit = 0;
G_PatPower = false;
}
}
}
function G_ActiveBkEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_BkUpEnemy[0]].AttachType, G_BkUpEnemy[0], G_IndexDepth);
this[G_BkUpEnemy[0]].RefMov = _parent[G_BkUpEnemy[0]];
G_IndexDepth++;
G_Items.push(G_BkUpEnemy[0]);
G_HitItem.push(G_BkUpEnemy[0]);
this[G_BkUpEnemy[0]].StartEnter();
G_BkUpEnemy.splice(0, 1);
}
function G_ActiveDragon() {
if ((G_TimeNow == Dragon1.NextTimeAct) and (Dragon1.Etat == "Wait")) {
Dragon1.SetMoveParam();
}
}
function G_ActivateLvl1() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl3() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl5() {
G_ActivateLvl3();
}
function G_ActivateLvl7() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl9() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
case 12 :
G_LastActivate = 12;
G_ActiveEnemy();
return;
}
}
}
function G_ActiveBkUp() {
if (((G_StartEnemy.length == 0) and (G_BkUpEnemy.length > 0)) and (G_NbEnemys < G_MaxEnemy)) {
G_ActiveBkEnemy();
}
}
function G_CheckEnd() {
if (_parent._parent.LvlTransit._currentframe == 1) {
if (_global.Param.G_LvlType == "Normal") {
if (((G_NbEnemys == 0) and (G_StartEnemy.length == 0)) and (G_BkUpEnemy.length == 0)) {
G_EndLevel();
} else if (_global.Param.G_NbPlayer == 2) {
if ((((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) and (_global.Param.G_LifePlayer2 == -1)) and (Player2.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if ((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if (_global.Param.G_NbPlayer == 2) {
if ((((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or ((((!Player2.IsOver) and Player1.IsOver) and Player3.IsOver) and Player4.IsOver)) or (Player1.IsOver and Player2.IsOver)) {
G_EndLevel();
}
} else if (((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or Player1.IsOver) {
G_EndLevel();
}
}
}
function G_EndLevel() {
if (_global.Param.G_LvlType == "Normal") {
if (_global.Param.G_GameOver) {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.GenTransit.Dest = "Loose";
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
} else if (_global.Param.G_Level == 10) {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
if (_global.Param.G_NbPlayer == 2) {
_parent._parent.GenTransit.Dest = "Win2Player";
} else {
_parent._parent.GenTransit.Dest = "Win1Player";
}
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
_global.Sounds.StopSound("PowerSandy3");
_global.Sounds.StopSound("PowerBob2");
}
function G_ActiveBonus() {
if (G_BonusList.length != 0) {
if (G_NextActivate == 0) {
G_NextActivate = random(5) + 5;
}
if (G_TimeNow == G_NextActivate) {
var _local2 = random(G_BonusList.length);
var _local3 = G_BonusList[_local2];
G_BonusList.splice(_local2, 1);
_global.C[_local3].Etat = "Enter";
G_NextActivate = (random(5) + 5) + G_TimeNow;
}
}
}
function G_ActivateLvl2() {
G_ActiveBonus();
}
function G_ActivateLvl4() {
G_ActiveBonus();
}
function G_ActivateLvl6() {
G_ActiveBonus();
}
function G_ActivateLvl8() {
G_ActiveBonus();
}
function G_ActivateLvl10() {
G_ActiveBonus();
}
_global.C = this;
G_Pause = true;
G_HitItem = new Array();
G_Players = new Array();
G_Items = new Array();
G_ScoreFields = new Array();
G_IndexPlate = 1;
G_IndexSpike = 1;
G_IndexElectro = 1;
G_IndexType1Enemy = 1;
G_IndexType2Enemy = 1;
G_IndexType3Enemy = 1;
G_IndexBonus = 1;
G_IndexDepth = 1000;
G_RBord = 500;
G_LBord = 0;
G_TimeNow = 0;
G_EnterFrBySec = 35;
G_NbEnterFr = 0;
G_TimeNowSquid = 0;
G_NbEnterFrSquid = 0;
G_SquidPower = false;
G_SquidPowerEnd = 0;
G_PatPower = false;
G_PatNbSpit = 0;
G_WhoUsePat = "";
G_Ground = 0;
G_StartPos = new Array();
switch (_global.Param.G_Level) {
case 1 :
G_MaxEnemy = 3;
break;
case 3 :
G_MaxEnemy = 4;
break;
case 5 :
G_MaxEnemy = 4;
break;
case 7 :
G_MaxEnemy = 5;
break;
case 9 :
G_MaxEnemy = 6;
break;
}
G_NbEnemys = 0;
switch (_global.Param.G_Level) {
case 1 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type1Enemy3");
break;
case 3 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type2Enemy1", "Type2Enemy2");
break;
case 5 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1");
break;
case 7 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1", "Type3Enemy2");
break;
case 9 :
G_StartEnemy = new Array("Type2Enemy1", "Type3Enemy1", "Type2Enemy2", "Type3Enemy2", "Type3Enemy3", "Type3Enemy4");
break;
}
switch (_global.Param.G_Level) {
case 1 :
G_BkUpEnemy = new Array("Type1Enemy4");
break;
case 3 :
G_BkUpEnemy = new Array("Type1Enemy3", "Type1Enemy4", "Type2Enemy3", "Type1Enemy5", "Type2Enemy4");
break;
case 5 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type1Enemy3", "Type2Enemy5", "Type2Enemy6", "Type2Enemy7", "Type3Enemy2");
break;
case 7 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type3Enemy3", "Type2Enemy5", "Type2Enemy6", "Type3Enemy4", "Type3Enemy5", "Type2Enemy7", "Type3Enemy6", "Type3Enemy7");
break;
case 9 :
G_BkUpEnemy = new Array("Type3Enemy5", "Type3Enemy6", "Type2Enemy3", "Type3Enemy7", "Type2Enemy4", "Type3Enemy8", "Type3Enemy9", "Type2Enemy5", "Type3Enemy10", "Type2Enemy6", "Type2Enemy7", "Type3Enemy11", "Type3Enemy12", "Type3Enemy13");
break;
}
G_AllEnemy = G_StartEnemy.concat(G_BkUpEnemy);
G_AutoPower = G_AllEnemy[random(G_AllEnemy.length)];
G_NbWindows = 0;
G_LastActivate = 0;
G_NextActivate = 0;
G_BonusList = new Array();
G_CreatePlayer = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
if (l_RefMov._name == "Player1") {
this[l_RefMov._name] = new Player1Obj(l_RefMov);
} else {
this[l_RefMov._name] = new Player2Obj(l_RefMov);
}
}
};
G_CreateType1Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type1EnemyObj(l_RefMov);
}
};
G_CreateType2Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type2EnemyObj(l_RefMov);
}
};
G_CreateType3Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type3EnemyObj(l_RefMov);
}
};
G_CreatePlayerEnemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new PlayerEnemyObj(l_RefMov);
}
};
G_CreateDragon = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new DragonObj(l_RefMov);
}
};
G_CreatePlate = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new PlateObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateSpike = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpikeObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateElectro = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new ElectroObj(l_RefMov);
G_Items.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateBonus = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new BonusObj(l_RefMov);
}
};
G_CreateSpit = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpitObj(l_RefMov);
}
};
G_DoPause = function () {
G_Pause = true;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.stop();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.stop();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.stop();
}
}
for (var _local2 in G_ScoreFields) {
_global.C.Score[G_ScoreFields[_local2]].mMcField.stop();
}
if ((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) {
_global.C.Player1.RefMov.Obj.Etat.Fly.stop();
} else if ((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) {
_global.C.Player2.RefMov.Obj.Etat.Fly.stop();
}
};
G_DoUnPause = function () {
G_Pause = false;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.play();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.play();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.play();
}
}
_global.C.Score[G_ScoreFields[_local2]].mMcField.play();
if (((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) and (_global.C.Player1.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player1.RefMov.Obj.Etat.Fly.play();
} else if (((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) and (_global.C.Player2.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player2.RefMov.Obj.Etat.Fly.play();
}
};
G_CreateScore = function () {
Score = new ScoreObj();
};
G_CreateScore();
}
onClipEvent (enterFrame) {
if (!G_Pause) {
G_CallActivate();
for (var i in G_Players) {
this[G_Players[i]].Actions();
}
for (var i in G_Items) {
this[G_Items[i]].Actions();
}
G_SetTime();
}
_global.Sounds.Fade();
}
Symbol 1087 MovieClip Frame 2
stop();
Instance of Symbol 538 MovieClip in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 590 MovieClip "StatPlayer2" in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 656 MovieClip [Type1Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type1Enemy" + _global.C.G_IndexType1Enemy;
_global.C.G_IndexType1Enemy++;
_global.C.G_CreateType1Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 690 MovieClip [Dragon] "Dragon1" in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateDragon(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 936 MovieClip "Player1" in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50000);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("PasLa");
}
Instance of Symbol 936 MovieClip "Player2" in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer == 2) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50001);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("PasLa");
} else {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 946 MovieClip [Spit] "Spit1" in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateSpit(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 947 MovieClip "mcScoreContainer" in Symbol 1087 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(80000);
}
Symbol 1090 MovieClip Frame 1
this._name = "Spike" + _global.C.G_IndexSpike;
_global.C.G_IndexSpike++;
_global.C.G_CreateSpike(this);
Symbol 1092 MovieClip Frame 1
this._name = "Plate" + _global.C.G_IndexPlate;
_global.C.G_IndexPlate++;
_global.C.G_CreatePlate(this);
Instance of Symbol 3 MovieClip "Control" in Symbol 1093 MovieClip Frame 1
onClipEvent (load) {
function G_SetTime() {
if (!G_SquidPower) {
G_NbEnterFr++;
if (G_NbEnterFr == G_EnterFrBySec) {
G_TimeNow++;
G_NbEnterFr = 0;
}
} else {
G_NbEnterFrSquid++;
if (G_NbEnterFrSquid == G_EnterFrBySec) {
G_TimeNowSquid++;
G_NbEnterFrSquid = 0;
}
}
}
function G_CallActivate() {
this["G_ActivateLvl" + _global.Param.G_Level]();
G_CheckPowerUse();
G_ActiveBkUp();
G_ActiveDragon();
G_CheckEnd();
}
function G_ActiveEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_StartEnemy[0]].AttachType, G_StartEnemy[0], G_IndexDepth);
this[G_StartEnemy[0]].RefMov = _parent[G_StartEnemy[0]];
G_IndexDepth++;
G_Items.push(G_StartEnemy[0]);
G_HitItem.push(G_StartEnemy[0]);
this[G_StartEnemy[0]].StartEnter();
G_StartEnemy.splice(0, 1);
}
function G_CheckPowerUse() {
if (G_SquidPower) {
if (G_TimeNowSquid == G_SquidPowerEnd) {
G_TimeNowSquid = 0;
G_SquidPower = false;
}
}
if (G_PatPower) {
if ((G_PatNbSpit < 3) and (this[G_WhoUsePat].Etat != "Die")) {
if (_global.C._parent.Spit1._x == undefined) {
if ((this[G_WhoUsePat].Etat == "Idle") or (this[G_WhoUsePat].Etat == "Fly")) {
this[G_WhoUsePat].Etat = "UsePower";
G_PatNbSpit++;
}
}
} else {
G_PatNbSpit = 0;
G_PatPower = false;
}
}
}
function G_ActiveBkEnemy() {
G_NbEnemys++;
_parent.attachMovie(this[G_BkUpEnemy[0]].AttachType, G_BkUpEnemy[0], G_IndexDepth);
this[G_BkUpEnemy[0]].RefMov = _parent[G_BkUpEnemy[0]];
G_IndexDepth++;
G_Items.push(G_BkUpEnemy[0]);
G_HitItem.push(G_BkUpEnemy[0]);
this[G_BkUpEnemy[0]].StartEnter();
G_BkUpEnemy.splice(0, 1);
}
function G_ActiveDragon() {
if ((G_TimeNow == Dragon1.NextTimeAct) and (Dragon1.Etat == "Wait")) {
Dragon1.SetMoveParam();
}
}
function G_ActivateLvl1() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl3() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl5() {
G_ActivateLvl3();
}
function G_ActivateLvl7() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
}
}
}
function G_ActivateLvl9() {
if (G_TimeNow != G_LastActivate) {
switch (G_TimeNow) {
case 2 :
G_LastActivate = 2;
G_ActiveEnemy();
return;
case 4 :
G_LastActivate = 4;
G_ActiveEnemy();
return;
case 6 :
G_LastActivate = 6;
G_ActiveEnemy();
return;
case 8 :
G_LastActivate = 8;
G_ActiveEnemy();
return;
case 10 :
G_LastActivate = 10;
G_ActiveEnemy();
return;
case 12 :
G_LastActivate = 12;
G_ActiveEnemy();
return;
}
}
}
function G_ActiveBkUp() {
if (((G_StartEnemy.length == 0) and (G_BkUpEnemy.length > 0)) and (G_NbEnemys < G_MaxEnemy)) {
G_ActiveBkEnemy();
}
}
function G_CheckEnd() {
if (_parent._parent.LvlTransit._currentframe == 1) {
if (_global.Param.G_LvlType == "Normal") {
if (((G_NbEnemys == 0) and (G_StartEnemy.length == 0)) and (G_BkUpEnemy.length == 0)) {
G_EndLevel();
} else if (_global.Param.G_NbPlayer == 2) {
if ((((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) and (_global.Param.G_LifePlayer2 == -1)) and (Player2.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if ((_global.Param.G_LifePlayer1 == -1) and (Player1.Etat == "PasLa")) {
_global.Param.G_GameOver = true;
G_EndLevel();
}
} else if (_global.Param.G_NbPlayer == 2) {
if ((((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or ((((!Player2.IsOver) and Player1.IsOver) and Player3.IsOver) and Player4.IsOver)) or (Player1.IsOver and Player2.IsOver)) {
G_EndLevel();
}
} else if (((((!Player1.IsOver) and Player2.IsOver) and Player3.IsOver) and Player4.IsOver) or Player1.IsOver) {
G_EndLevel();
}
}
}
function G_EndLevel() {
if (_global.Param.G_LvlType == "Normal") {
if (_global.Param.G_GameOver) {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.GenTransit.Dest = "Loose";
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInGame", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
} else if (_global.Param.G_Level == 10) {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
if (_global.Param.G_NbPlayer == 2) {
_parent._parent.GenTransit.Dest = "Win2Player";
} else {
_parent._parent.GenTransit.Dest = "Win1Player";
}
_parent._parent.GenTransit.play();
} else {
_global.Sounds.G_TabSonFade.push(["MusInPack", 0, "Out", 5]);
_global.C.G_Pause = true;
_parent._parent.LvlTransit.play();
}
_global.Sounds.StopSound("PowerSandy3");
_global.Sounds.StopSound("PowerBob2");
}
function G_ActiveBonus() {
if (G_BonusList.length != 0) {
if (G_NextActivate == 0) {
G_NextActivate = random(5) + 5;
}
if (G_TimeNow == G_NextActivate) {
var _local2 = random(G_BonusList.length);
var _local3 = G_BonusList[_local2];
G_BonusList.splice(_local2, 1);
_global.C[_local3].Etat = "Enter";
G_NextActivate = (random(5) + 5) + G_TimeNow;
}
}
}
function G_ActivateLvl2() {
G_ActiveBonus();
}
function G_ActivateLvl4() {
G_ActiveBonus();
}
function G_ActivateLvl6() {
G_ActiveBonus();
}
function G_ActivateLvl8() {
G_ActiveBonus();
}
function G_ActivateLvl10() {
G_ActiveBonus();
}
_global.C = this;
G_Pause = true;
G_HitItem = new Array();
G_Players = new Array();
G_Items = new Array();
G_ScoreFields = new Array();
G_IndexPlate = 1;
G_IndexSpike = 1;
G_IndexElectro = 1;
G_IndexType1Enemy = 1;
G_IndexType2Enemy = 1;
G_IndexType3Enemy = 1;
G_IndexBonus = 1;
G_IndexDepth = 1000;
G_RBord = 500;
G_LBord = 0;
G_TimeNow = 0;
G_EnterFrBySec = 35;
G_NbEnterFr = 0;
G_TimeNowSquid = 0;
G_NbEnterFrSquid = 0;
G_SquidPower = false;
G_SquidPowerEnd = 0;
G_PatPower = false;
G_PatNbSpit = 0;
G_WhoUsePat = "";
G_Ground = 0;
G_StartPos = new Array();
switch (_global.Param.G_Level) {
case 1 :
G_MaxEnemy = 3;
break;
case 3 :
G_MaxEnemy = 4;
break;
case 5 :
G_MaxEnemy = 4;
break;
case 7 :
G_MaxEnemy = 5;
break;
case 9 :
G_MaxEnemy = 6;
break;
}
G_NbEnemys = 0;
switch (_global.Param.G_Level) {
case 1 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type1Enemy3");
break;
case 3 :
G_StartEnemy = new Array("Type1Enemy1", "Type1Enemy2", "Type2Enemy1", "Type2Enemy2");
break;
case 5 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1");
break;
case 7 :
G_StartEnemy = new Array("Type1Enemy1", "Type2Enemy1", "Type2Enemy2", "Type3Enemy1", "Type3Enemy2");
break;
case 9 :
G_StartEnemy = new Array("Type2Enemy1", "Type3Enemy1", "Type2Enemy2", "Type3Enemy2", "Type3Enemy3", "Type3Enemy4");
break;
}
switch (_global.Param.G_Level) {
case 1 :
G_BkUpEnemy = new Array("Type1Enemy4");
break;
case 3 :
G_BkUpEnemy = new Array("Type1Enemy3", "Type1Enemy4", "Type2Enemy3", "Type1Enemy5", "Type2Enemy4");
break;
case 5 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type1Enemy3", "Type2Enemy5", "Type2Enemy6", "Type2Enemy7", "Type3Enemy2");
break;
case 7 :
G_BkUpEnemy = new Array("Type1Enemy2", "Type2Enemy3", "Type2Enemy4", "Type3Enemy3", "Type2Enemy5", "Type2Enemy6", "Type3Enemy4", "Type3Enemy5", "Type2Enemy7", "Type3Enemy6", "Type3Enemy7");
break;
case 9 :
G_BkUpEnemy = new Array("Type3Enemy5", "Type3Enemy6", "Type2Enemy3", "Type3Enemy7", "Type2Enemy4", "Type3Enemy8", "Type3Enemy9", "Type2Enemy5", "Type3Enemy10", "Type2Enemy6", "Type2Enemy7", "Type3Enemy11", "Type3Enemy12", "Type3Enemy13");
break;
}
G_AllEnemy = G_StartEnemy.concat(G_BkUpEnemy);
G_AutoPower = G_AllEnemy[random(G_AllEnemy.length)];
G_NbWindows = 0;
G_LastActivate = 0;
G_NextActivate = 0;
G_BonusList = new Array();
G_CreatePlayer = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
if (l_RefMov._name == "Player1") {
this[l_RefMov._name] = new Player1Obj(l_RefMov);
} else {
this[l_RefMov._name] = new Player2Obj(l_RefMov);
}
}
};
G_CreateType1Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type1EnemyObj(l_RefMov);
}
};
G_CreateType2Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type2EnemyObj(l_RefMov);
}
};
G_CreateType3Enemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new Type3EnemyObj(l_RefMov);
}
};
G_CreatePlayerEnemy = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new PlayerEnemyObj(l_RefMov);
}
};
G_CreateDragon = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new DragonObj(l_RefMov);
}
};
G_CreatePlate = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new PlateObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateSpike = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpikeObj(l_RefMov);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateElectro = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new ElectroObj(l_RefMov);
G_Items.push(l_RefMov._name);
_global.C.G_HitItem.push(l_RefMov._name);
}
};
G_CreateBonus = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
G_Items.push(l_RefMov._name);
this[l_RefMov._name] = new BonusObj(l_RefMov);
}
};
G_CreateSpit = function (l_RefMov) {
if (this[l_RefMov._name] == null) {
this[l_RefMov._name] = new SpitObj(l_RefMov);
}
};
G_DoPause = function () {
G_Pause = true;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.stop();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.stop();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.stop();
}
}
for (var _local2 in G_ScoreFields) {
_global.C.Score[G_ScoreFields[_local2]].mMcField.stop();
}
if ((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) {
_global.C.Player1.RefMov.Obj.Etat.Fly.stop();
} else if ((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) {
_global.C.Player2.RefMov.Obj.Etat.Fly.stop();
}
};
G_DoUnPause = function () {
G_Pause = false;
for (var _local2 in G_Players) {
_global.C[G_Players[_local2]].RefMov.Obj.Etat.play();
}
for (var _local2 in G_Items) {
if (_global.C[G_Items[_local2]].RefMov.Obj != undefined) {
_global.C[G_Items[_local2]].RefMov.Obj.Etat.play();
} else {
_global.C[G_Items[_local2]].RefMov.Etat.play();
}
}
_global.C.Score[G_ScoreFields[_local2]].mMcField.play();
if (((_global.C.Player1.Choice == "Bob") and (_global.C.Player1.Etat == "UsePower")) and (_global.C.Player1.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player1.RefMov.Obj.Etat.Fly.play();
} else if (((_global.C.Player2.Choice == "Bob") and (_global.C.Player2.Etat == "UsePower")) and (_global.C.Player2.RefMov.Obj.Etat.Fly._currentframe != 1)) {
_global.C.Player2.RefMov.Obj.Etat.Fly.play();
}
};
G_CreateScore = function () {
Score = new ScoreObj();
};
G_CreateScore();
}
onClipEvent (enterFrame) {
if (!G_Pause) {
G_CallActivate();
for (var i in G_Players) {
this[G_Players[i]].Actions();
}
for (var i in G_Items) {
this[G_Items[i]].Actions();
}
G_SetTime();
}
_global.Sounds.Fade();
}
Symbol 1093 MovieClip Frame 2
stop();
Instance of Symbol 538 MovieClip in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
var IsGround = true;
}
Instance of Symbol 590 MovieClip "StatPlayer2" in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer < 2) {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1040 MovieClip [Type2Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type2Enemy" + _global.C.G_IndexType2Enemy;
_global.C.G_IndexType2Enemy++;
_global.C.G_CreateType2Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 1084 MovieClip [Type3Enemy] in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this._name = "Type3Enemy" + _global.C.G_IndexType3Enemy;
_global.C.G_IndexType3Enemy++;
_global.C.G_CreateType3Enemy(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 690 MovieClip [Dragon] "Dragon1" in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateDragon(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 936 MovieClip "Player1" in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50000);
_global.C[this._name].Dir = "L";
_global.C[this._name].StartDir = "L";
_global.C[this._name].DirOld = "L";
this.gotoAndStop(_global.C[this._name].Choice + "L");
this.Obj.gotoAndStop("PasLa");
}
Instance of Symbol 936 MovieClip "Player2" in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
if (_global.Param.G_NbPlayer == 2) {
_global.C.G_CreatePlayer(this);
this.swapDepths(50001);
_global.C[this._name].Dir = "R";
_global.C[this._name].StartDir = "R";
_global.C[this._name].DirOld = "R";
this.gotoAndStop(_global.C[this._name].Choice + "R");
this.Obj.gotoAndStop("PasLa");
} else {
this.swapDepths(10);
this.removeMovieClip();
}
}
Instance of Symbol 946 MovieClip [Spit] "Spit1" in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
_global.C.G_CreateSpit(this);
this.swapDepths(10);
this.removeMovieClip();
}
Instance of Symbol 947 MovieClip "mcScoreContainer" in Symbol 1093 MovieClip Frame 2
onClipEvent (load) {
this.swapDepths(80000);
}
Symbol 1152 MovieClip Frame 1
stop();
Symbol 1163 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnSubmit");
}
Symbol 1169 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 1174 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnView");
}
Symbol 1175 MovieClip Frame 1
stop();
Symbol 1175 MovieClip Frame 21
_parent._parent._parent.GenTransit.Dest = "TitleCard";
_parent._parent._parent.GenTransit.play();
stop();
Symbol 1175 MovieClip Frame 41
_global.Param.G_SubmitScore = false;
_parent._parent._parent.GenTransit.Dest = "Submit";
_parent._parent._parent.GenTransit.play();
stop();
Symbol 1175 MovieClip Frame 61
_global.Param.G_SubmitScore = true;
_parent._parent._parent.GenTransit.Dest = "Submit";
_parent._parent._parent.GenTransit.play();
stop();
Symbol 1176 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 1177 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnView");
}
Symbol 1178 MovieClip Frame 1
stop();
Symbol 1178 MovieClip Frame 21
_parent._parent._parent.GenTransit.Dest = "TitleCard";
_parent._parent._parent.GenTransit.play();
stop();
Symbol 1178 MovieClip Frame 41
_global.Param.G_SubmitScore = false;
_parent._parent._parent.GenTransit.Dest = "Submit";
_parent._parent._parent.GenTransit.play();
stop();
Symbol 1179 MovieClip Frame 1
stop();
Symbol 1179 MovieClip Frame 10
stop();
Symbol 1180 MovieClip Frame 1
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
mcButtons.gotoAndStop("Submit");
} else {
mcButtons.gotoAndStop("NoSubmit");
}
if (_global.Param.G_NbPlayer == 1) {
_global.Param.G_ScoreToSend = _global.Param.G_ScorePlayer1;
} else {
_global.Param.G_ScoreToSend = _global.Param.G_ScorePlayer1 + _global.Param.G_ScorePlayer2;
}
Instance of Symbol 1152 MovieClip in Symbol 1180 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player1Choice);
}
Symbol 1182 MovieClip Frame 1
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
mcButtons.gotoAndStop("Submit");
} else {
mcButtons.gotoAndStop("NoSubmit");
}
if (_global.Param.G_NbPlayer == 1) {
_global.Param.G_ScoreToSend = _global.Param.G_ScorePlayer1;
} else {
_global.Param.G_ScoreToSend = _global.Param.G_ScorePlayer1 + _global.Param.G_ScorePlayer2;
}
Instance of Symbol 1152 MovieClip in Symbol 1182 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player2Choice);
}
Instance of Symbol 1152 MovieClip in Symbol 1182 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.Param.G_Player1Choice);
}
Symbol 1190 MovieClip Frame 1
_global.HS.initHiScores();
if (gProxyObj.getIsLoggedIn()) {
mcButtons.gotoAndStop("Submit");
} else {
mcButtons.gotoAndStop("NoSubmit");
}
if (_global.Param.G_NbPlayer == 1) {
_global.Param.G_ScoreToSend = _global.Param.G_ScorePlayer1;
} else {
_global.Param.G_ScoreToSend = _global.Param.G_ScorePlayer1 + _global.Param.G_ScorePlayer2;
}
Symbol 1203 Button
on (press) {
ControlScroll.scrollDown = true;
}
on (release, releaseOutside) {
ControlScroll.scrollDown = false;
}
Symbol 1204 Button
on (press) {
ControlScroll.scrollUp = true;
}
on (release, releaseOutside) {
ControlScroll.scrollUp = false;
}
Symbol 1205 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
_global.Param.G_SubmitScore = true;
gotoAndPlay ("BtnSubmit");
}
Symbol 1206 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 1207 MovieClip Frame 1
stop();
Symbol 1207 MovieClip Frame 21
_parent._parent.gotoAndStop("TitleCard");
Symbol 1207 MovieClip Frame 41
_global.HS.submitScore(_global.Param.G_ScoreToSend);
_parent.gotoAndStop("NoSubmit");
Symbol 1208 Button
on (press) {
_global.Sounds.PlaySound("BtnFlag", 100, 1);
gotoAndPlay ("BtnPlay");
}
Symbol 1209 MovieClip Frame 1
stop();
Symbol 1209 MovieClip Frame 21
_parent._parent._parent.gotoAndStop("TitleCard");
Symbol 1210 MovieClip Frame 1
stop();
Symbol 1210 MovieClip Frame 10
stop();
Symbol 1211 MovieClip Frame 1
if (gProxyObj.getIsLoggedIn()) {
mcButtons.gotoAndStop("Submit");
} else {
mcButtons.gotoAndStop("NoSubmit");
}
if (_global.Param.G_SubmitScore == true) {
_global.HS.submitScore(_global.Param.G_ScoreToSend);
mcButtons.gotoAndStop("NoSubmit");
} else {
_global.HS.getScores();
}
Instance of Symbol 3 MovieClip "ControlScroll" in Symbol 1211 MovieClip Frame 1
onClipEvent (load) {
scrollUp = false;
scrollDown = false;
}
onClipEvent (enterFrame) {
if (scrollUp == true) {
_parent.txt_highScore.scroll--;
} else if (scrollDown == true) {
_parent.txt_highScore.scroll++;
}
}