Frame 1
function fsdPlayAgain() {
theDoge.unloadMovie();
_global.patchRestart = true;
gotoAndStop ("titlecard");
}
_quality = "MEDIUM";
urlTemp = new String(this._url);
if (urlTemp.lastIndexOf("/") == -1) {
lastCar = urlTemp.lastIndexOf("\\");
} else {
lastCar = urlTemp.lastIndexOf("/");
}
_global.path = urlTemp.substring(0, lastCar + 1);
soundMovie = _global.path + "sound.swf";
_root.sounds.loadMovie(soundMovie);
_global.musicIsPlaying = false;
Stage.showMenu = false;
_focusrect = false;
_root.eventID = "td_witch_rescue";
playerScore = 0;
_global.mainTimeline = this;
_global.level = 1;
_global.lives = 3;
_global.freeze = true;
_global.gameNumber = 0;
_root.score = 0;
_global.PlaySound = function (theSound, loop) {
sounds.startsound(theSound, loop);
};
_global.StopSound = function (theSound) {
sounds.Stopsound(theSound);
};
_global.ChangeVolume = function (theSound, volume) {
sounds.SetSoundVolume(theSound, volume);
};
stop();
_global.allSounds = new Sound(_root);
Instance of Symbol 230 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (_root.sounds.getBytesTotal() >= 15000) {
if ((_parent.getBytesLoaded() + _root.sounds.getBytesLoaded()) == (_parent.getBytesTotal() + _root.sounds.getBytesTotal())) {
_parent.gotoAndStop("titlecard");
} else {
percent = Math.round(100 * ((_parent.getBytesLoaded() + _root.sounds.getBytesLoaded()) / (_parent.getBytesTotal() + _root.sounds.getBytesTotal())));
_parent.loadBar.gotoAndStop(percent);
_parent.txtPercent.text = percent;
}
}
}
Frame 7
_global.gameNumber++;
_global.level = 1;
_global.lives = 3;
_root.score = 0;
_global.energy = 1;
_global.timeStop = false;
_global.inGame = false;
clearInterval(_root.mcGame.createEnemyInterval);
nextFrame();
if (_global.musicIsPlaying == false) {
_global.PlaySound("music", 99999);
_global.musicIsPlaying = true;
}
Frame 13
_global.inMenu = false;
Instance of Symbol 1028 MovieClip "instruc" in Frame 13
onClipEvent (load) {
if (_root.instruction != "") {
temp = _root.instruction;
_root.instruction = "";
this.gotoAndStop(temp);
}
}
Frame 17
_global.inMenu = false;
Frame 21
_global.inMenu = true;
Frame 26
out.play();
_global.inMenu = false;
Frame 31
_global.freeze = true;
_global.inMenu = false;
Frame 32
_root.gotoAndStop("play");
Frame 35
_global.freeze = true;
_global.inMenu = false;
Frame 36
_root.gotoAndStop("play");
Frame 39
_global.freeze = true;
_global.inMenu = false;
Frame 40
_root.gotoAndStop("play");
Frame 43
_global.freeze = true;
_global.inMenu = false;
Frame 47
_global.StopSound("portalLoop");
_global.StopSound("fireLoop");
_global.StopSound("acidLoop");
level5 = _global.path + "boss.swf";
trace(_global.sCont.keyListener2);
loadMovieNum (level5, 1);
Frame 51
playerScore = _root.score;
Frame 55
playerScore = _root.score;
_global.StopSound("acidLoop");
_global.StopSound("fireLoop");
_global.StopSound("portalLoop");
Frame 59
theDoge.loadMovie("http://disney.go.com/jetix/global/game/scoredisplays/fsd.swf", 1);
stop();
Frame 63
_global.gameNumber++;
_global.energy = 1;
_global.lives--;
_global.patchRestart = true;
if (_global.lives == 0) {
gotoAndStop ("lose");
} else {
gotoAndStop ("play");
}
Symbol 11 MovieClip Frame 8
_parent._parent.destroy();
stop();
Symbol 18 MovieClip Frame 1
_global.PlaySound("rockAttack", 1);
Symbol 18 MovieClip Frame 18
this._parent.destroy();
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 2
_global.PlaySound("enemyExplode", 1);
Symbol 20 MovieClip [RockMovie] Frame 1
stop();
Symbol 20 MovieClip [RockMovie] Frame 2
stop();
Symbol 20 MovieClip [RockMovie] Frame 3
stop();
Symbol 20 MovieClip [RockMovie] Frame 4
stop();
Symbol 28 MovieClip Frame 1
this._visible = false;
_global.sCont.registerPauseAuto(this._parent);
Symbol 44 MovieClip Frame 5
_global.PlaySound("snakeAttack", 1);
Symbol 44 MovieClip Frame 15
_parent._parent.checkHit(hitzone);
_parent._parent.gotoAndStop("idle");
Symbol 45 MovieClip Frame 5
_global.PlaySound("snakeAttack", 1);
Symbol 45 MovieClip Frame 15
_parent._parent.checkHit(hitzone);
_parent._parent.gotoAndStop("idle");
Symbol 46 MovieClip Frame 5
_global.PlaySound("snakeAttack", 1);
Symbol 46 MovieClip Frame 15
_parent._parent.checkHit(hitzone);
_parent._parent.gotoAndStop("idle");
Symbol 47 MovieClip Frame 1
gotoAndStop(_parent.attackDirection);
Symbol 50 MovieClip Frame 18
_parent.destroy();
stop();
Symbol 51 MovieClip [SnakeMovie] Frame 1
this.state = "idle";
stop();
Symbol 51 MovieClip [SnakeMovie] Frame 3
_global.PlaySound("enemyExplode", 1);
Symbol 51 MovieClip [SnakeMovie] Frame 6
_global.PlaySound("enemyExplode", 1);
Symbol 92 MovieClip Frame 3
_global.PlaySound("ratAttack", 1);
Symbol 92 MovieClip Frame 9
_parent.checkHit(this);
Symbol 92 MovieClip Frame 14
_parent.destroy();
stop();
Symbol 97 MovieClip Frame 13
_parent.destroy();
stop();
Symbol 115 MovieClip Frame 8
_parent.move = true;
_parent.gotoAndStop(_parent.nextMove);
Symbol 116 MovieClip [RatMovie] Frame 3
_global.PlaySound("enemyExplode", 1);
Symbol 116 MovieClip [RatMovie] Frame 5
nextMove = "moveRight";
Symbol 116 MovieClip [RatMovie] Frame 7
nextMove = "moveLeft";
Symbol 128 MovieClip Frame 13
_parent.destroy();
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
_global.PlaySound("portalLoop", 100);
Symbol 129 MovieClip Frame 3
_global.StopSound("portalLoop");
_global.PlaySound("enemyExplode", 1);
Symbol 141 MovieClip Frame 1
_global.PlaySound("enemyExplode", 1);
Symbol 141 MovieClip Frame 7
_parent.destroy();
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 2
_global.PlaySound("acidLoop", 99999);
stop();
Symbol 142 MovieClip Frame 3
_global.StopSound("acidLoop");
Symbol 151 MovieClip Frame 8
_parent.destroy();
stop();
Symbol 152 MovieClip Frame 1
stop();
Symbol 152 MovieClip Frame 2
_global.PlaySound("fireLoop", 100);
Symbol 152 MovieClip Frame 3
_global.StopSound("fireLoop");
_global.PlaySound("enemyExplode", 1);
Symbol 166 MovieClip Frame 9
_parent.destroy();
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 3
_global.PlaySound("enemyExplode", 1);
Symbol 168 MovieClip [MagicMovie] Frame 1
stop();
Symbol 168 MovieClip [MagicMovie] Frame 2
stop();
Symbol 168 MovieClip [MagicMovie] Frame 3
stop();
Symbol 168 MovieClip [MagicMovie] Frame 4
stop();
Symbol 168 MovieClip [MagicMovie] Frame 5
stop();
Symbol 172 MovieClip [ColumnMovie] Frame 1
stop();
Symbol 172 MovieClip [ColumnMovie] Frame 2
stop();
Symbol 172 MovieClip [ColumnMovie] Frame 3
stop();
Symbol 172 MovieClip [ColumnMovie] Frame 4
stop();
Symbol 200 MovieClip Frame 4
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 6
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 8
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 10
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 12
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 14
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 16
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 18
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 20
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 22
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 24
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 26
_parent._parent.checkHit(onde);
Symbol 200 MovieClip Frame 28
_parent._parent.checkHit(onde);
_parent._parent.gotoAndStop("idle");
Symbol 201 MovieClip Frame 7
_global.PlaySound("batAttack", 1);
Symbol 201 MovieClip Frame 12
stop();
Symbol 203 MovieClip Frame 8
_parent._parent.destroy();
stop();
Symbol 204 MovieClip Frame 11
stop();
Symbol 205 MovieClip [BatMovie] Frame 1
this.state = "idle";
stop();
Symbol 205 MovieClip [BatMovie] Frame 3
_global.PlaySound("enemyExplode", 1);
Symbol 208 MovieClip Frame 4
gotoAndPlay (1);
Symbol 208 MovieClip Frame 11
_parent.removeMovieClip();
Symbol 209 MovieClip [projectile] Frame 1
_global.PlaySound("magicBall", 1);
stop();
Symbol 209 MovieClip [projectile] Frame 2
_global.PlaySound("magicBall", 1);
Symbol 209 MovieClip [projectile] Frame 3
_global.PlaySound("magicBall", 1);
Symbol 209 MovieClip [projectile] Frame 4
_global.PlaySound("magicBall", 1);
Symbol 228 MovieClip Frame 1
stop();
Symbol 310 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
instruction = 3;
gotoAndStop ("instr");
}
Symbol 313 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.inGame = false;
_global.PlaySound("btnClick", 1);
gotoAndStop ("instr");
}
Symbol 322 MovieClip Frame 1
stop();
Symbol 367 MovieClip Frame 8
stop();
Symbol 368 MovieClip Frame 8
stop();
Symbol 369 MovieClip Frame 8
stop();
Symbol 370 MovieClip Frame 1
stop();
Instance of Symbol 365 MovieClip "flame" in Symbol 370 MovieClip Frame 2
onClipEvent (enterFrame) {
_parent._parent._parent.mcCont.fFlameHit(this, energy);
}
Symbol 370 MovieClip Frame 3
_global.PlaySound("torchHit", 1);
Instance of Symbol 356 MovieClip "flame" in Symbol 370 MovieClip Frame 4
onClipEvent (enterFrame) {
_parent._parent._parent.mcCont.fFlameHit(this, speed);
}
Symbol 370 MovieClip Frame 5
_global.PlaySound("torchHit", 1);
Instance of Symbol 365 MovieClip "flame" in Symbol 370 MovieClip Frame 6
onClipEvent (enterFrame) {
_parent._parent._parent.mcCont.fFlameHit(this, points);
}
Symbol 370 MovieClip Frame 7
_global.PlaySound("torchHit", 1);
Symbol 650 MovieClip Frame 1
stop();
Symbol 674 MovieClip Frame 2
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 3
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 4
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 5
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 6
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 7
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 8
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 9
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 10
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 11
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 12
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 13
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 14
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 15
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 16
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 17
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 18
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 19
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 20
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 21
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 22
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 23
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 24
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 674 MovieClip Frame 25
stop();
_global.speed = _global.topSpeed;
_parent.present = this._currentframe;
Symbol 692 MovieClip Frame 1
_global.PlaySound("hurt", 1);
_global.speed = _global.normalSpeed;
Symbol 692 MovieClip Frame 25
stop();
_global.charLife--;
_parent.gotoAndStop("Idle");
Symbol 706 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 20);
Symbol 706 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 714 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(76, 55);
Symbol 714 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 716 MovieClip Frame 1
_global.speed = _global.normalSpeed;
_global.PlaySound("death", 1);
Symbol 716 MovieClip Frame 40
stop();
if (_global.lives <= 0) {
_parent._parent._parent.mcCont.gotoAndPlay(1);
} else {
_global.energy = 1;
_parent._parent._parent.mcInterface.energyBar.energy.gotoAndStop(1);
_parent.gotoAndStop("Idle");
}
Symbol 718 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 0);
Symbol 718 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 720 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(25, 30);
Symbol 720 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 721 MovieClip Frame 2
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 3
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 4
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 5
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 6
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 7
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 8
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 9
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 10
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 11
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 12
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 13
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 14
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 15
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 16
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 17
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 18
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 19
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 20
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 21
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 22
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 23
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 24
_global.speed = _global.speed - 2;
Symbol 721 MovieClip Frame 25
stop();
_global.speed = _global.normalSpeed;
_parent.gotoAndStop("Idle");
Symbol 722 MovieClip Frame 1
stop();
speedUp = false;
present = "";
Symbol 722 MovieClip Frame 2
if (speedUp == true) {
acc.gotoAndStop(25);
}
Symbol 722 MovieClip Frame 9
speedUp = false;
decel.gotoAndPlay(26 - present);
Symbol 738 MovieClip Frame 2
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 3
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 4
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 5
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 6
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 7
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 8
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 9
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 10
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 11
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 12
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 13
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 14
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 15
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 16
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 17
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 18
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 19
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 20
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 21
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 22
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 23
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 24
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 738 MovieClip Frame 25
stop();
_global.speed = _global.topSpeed;
_parent.present = this._currentframe;
Symbol 757 MovieClip Frame 1
_global.PlaySound("hurt", 1);
_global.speed = _global.normalSpeed;
Symbol 757 MovieClip Frame 25
stop();
_global.charLife--;
_parent.gotoAndStop("Idle");
Symbol 769 MovieClip Frame 1
_global.speed = _global.normalSpeed;
Symbol 769 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 20);
Symbol 769 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 776 MovieClip Frame 1
_global.speed = _global.normalSpeed;
Symbol 776 MovieClip Frame 6
_parent._parent._parent.mcCont.fShoot(76, 55);
Symbol 776 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 778 MovieClip Frame 1
_global.speed = _global.normalSpeed;
_global.PlaySound("death", 1);
Symbol 778 MovieClip Frame 40
stop();
if (_global.lives <= 0) {
_parent._parent._parent.mcCont.gotoAndPlay(1);
} else {
_global.energy = 1;
_parent._parent._parent.mcInterface.energyBar.energy.gotoAndStop(1);
_parent.gotoAndStop("Idle");
}
Symbol 781 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 0);
Symbol 781 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 783 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(25, 30);
Symbol 783 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 784 MovieClip Frame 2
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 3
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 4
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 5
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 6
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 7
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 8
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 9
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 10
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 11
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 12
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 13
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 14
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 15
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 16
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 17
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 18
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 19
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 20
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 21
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 22
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 23
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 24
_global.speed = _global.speed - 2;
Symbol 784 MovieClip Frame 25
stop();
_global.speed = _global.normalSpeed;
_parent.gotoAndStop("Idle");
Symbol 785 MovieClip Frame 1
stop();
speedUp = false;
present = "";
Symbol 785 MovieClip Frame 2
if (speedUp == true) {
acc.gotoAndStop(25);
}
Symbol 785 MovieClip Frame 9
speedUp = false;
decel.gotoAndPlay(26 - present);
Symbol 808 MovieClip Frame 2
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 3
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 4
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 5
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 6
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 7
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 8
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 9
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 10
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 11
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 12
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 13
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 14
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 15
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 16
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 17
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 18
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 19
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 20
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 21
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 22
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 23
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 24
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 808 MovieClip Frame 25
stop();
_global.speed = _global.topSpeed;
_parent.present = this._currentframe;
Symbol 831 MovieClip Frame 1
_global.PlaySound("hurt", 1);
_global.speed = _global.normalSpeed;
Symbol 831 MovieClip Frame 25
stop();
_global.charLife--;
_parent.gotoAndStop("Idle");
Symbol 841 MovieClip Frame 1
_global.speed = _global.normalSpeed;
Symbol 841 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 20);
Symbol 841 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 849 MovieClip Frame 1
_global.speed = _global.normalSpeed;
Symbol 849 MovieClip Frame 6
_parent._parent._parent.mcCont.fShoot(76, 55);
Symbol 849 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 851 MovieClip Frame 1
_global.speed = _global.normalSpeed;
_global.PlaySound("death", 1);
Symbol 851 MovieClip Frame 40
stop();
if (_global.lives <= 0) {
_parent._parent._parent.mcCont.gotoAndPlay(1);
} else {
_global.energy = 1;
_parent._parent._parent.mcInterface.energyBar.energy.gotoAndStop(1);
_parent.gotoAndStop("Idle");
}
Symbol 853 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 0);
Symbol 853 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 855 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(25, 30);
Symbol 855 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 856 MovieClip Frame 2
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 3
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 4
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 5
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 6
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 7
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 8
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 9
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 10
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 11
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 12
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 13
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 14
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 15
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 16
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 17
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 18
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 19
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 20
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 21
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 22
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 23
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 24
_global.speed = _global.speed - 2;
Symbol 856 MovieClip Frame 25
stop();
_global.speed = _global.normalSpeed;
_parent.gotoAndStop("Idle");
Symbol 857 MovieClip Frame 1
stop();
speedUp = false;
present = "";
Symbol 857 MovieClip Frame 2
if (speedUp == true) {
acc.gotoAndStop(25);
}
Symbol 857 MovieClip Frame 9
speedUp = false;
decel.gotoAndPlay(26 - present);
Symbol 868 MovieClip Frame 2
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 3
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 4
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 5
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 6
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 7
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 8
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 9
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 10
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 11
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 12
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 13
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 14
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 15
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 16
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 17
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 18
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 19
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 20
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 21
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 22
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 23
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 24
_global.speed = _global.speed + 2;
_parent.present = this._currentframe;
Symbol 868 MovieClip Frame 25
stop();
_global.speed = _global.topSpeed;
_parent.present = this._currentframe;
Symbol 876 MovieClip Frame 1
_global.PlaySound("hurt", 1);
_global.speed = _global.normalSpeed;
Symbol 876 MovieClip Frame 25
stop();
_global.charLife--;
_parent.gotoAndStop("Idle");
Symbol 884 MovieClip Frame 1
_global.speed = _global.normalSpeed;
Symbol 884 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 20);
Symbol 884 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 888 MovieClip Frame 1
_global.speed = _global.normalSpeed;
Symbol 888 MovieClip Frame 6
_parent._parent._parent.mcCont.fShoot(76, 55);
Symbol 888 MovieClip Frame 11
_parent.gotoAndStop("Idle");
Symbol 890 MovieClip Frame 1
_global.speed = _global.normalSpeed;
_global.PlaySound("death", 1);
Symbol 890 MovieClip Frame 40
stop();
if (_global.lives <= 0) {
_parent._parent._parent.mcCont.gotoAndPlay(1);
} else {
_global.energy = 1;
_parent._parent._parent.mcInterface.energyBar.energy.gotoAndStop(1);
_parent.gotoAndStop("Idle");
}
Symbol 892 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(-17, 0);
Symbol 892 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 894 MovieClip Frame 2
_parent._parent._parent.mcCont.fShoot(25, 30);
Symbol 894 MovieClip Frame 11
_parent.speedUp = true;
_parent.gotoAndStop("transitionAcc");
Symbol 895 MovieClip Frame 2
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 3
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 4
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 5
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 6
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 7
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 8
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 9
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 10
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 11
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 12
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 13
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 14
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 15
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 16
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 17
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 18
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 19
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 20
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 21
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 22
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 23
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 24
_global.speed = _global.speed - 2;
Symbol 895 MovieClip Frame 25
stop();
_global.speed = _global.normalSpeed;
_parent.gotoAndStop("Idle");
Symbol 896 MovieClip Frame 1
stop();
speedUp = false;
present = "";
Symbol 896 MovieClip Frame 2
if (speedUp == true) {
acc.gotoAndStop(25);
}
Symbol 896 MovieClip Frame 9
speedUp = false;
decel.gotoAndPlay(26 - present);
Symbol 897 MovieClip Frame 60
gotoAndPlay ("Will");
Symbol 897 MovieClip Frame 120
gotoAndPlay ("Irma");
Symbol 897 MovieClip Frame 180
gotoAndPlay ("Taranee");
Symbol 897 MovieClip Frame 240
gotoAndPlay ("Cornelia");
Symbol 922 MovieClip Frame 1
stop();
Symbol 926 MovieClip Frame 1
stop();
Symbol 933 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
if (!_global.freeze) {
_global.allSounds.setVolume(0);
_root.mcGame.mcCont.gamePause();
_root.gotoAndStop("menu");
} else {
_global.allSounds.setVolume(100);
_root.mcGame.mcCont.gameUnpause();
_root.gotoAndStop("play");
}
}
Symbol 938 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 1
stop();
Symbol 969 MovieClip Frame 30
this.update();
gotoAndPlay (1);
Symbol 974 Button
on (release) {
_global.musicIsPlaying = false;
_global.StopSound("music");
this.gotoAndPlay(2);
}
Symbol 975 Button
on (release) {
_global.musicIsPlaying = true;
_global.PlaySound("music", 99999);
this.gotoAndPlay(1);
}
Symbol 976 MovieClip Frame 1
stop();
Symbol 976 MovieClip Frame 2
stop();
Symbol 977 MovieClip Frame 1
nbLife = _global.lives - 1;
trace("_global.lives =" + _global.lives);
Instance of Symbol 969 MovieClip "mcChrono" in Symbol 977 MovieClip Frame 1
onClipEvent (load) {
function setTime(seconds) {
var _local1 = this;
_local1.reachedZero = false;
_local1.time = seconds + 1;
_local1.doUpdate();
}
function update() {
if (!_global.freeze) {
this.doUpdate();
this.doEnemyInterval();
}
}
function doUpdate() {
var _local1 = this;
if (_local1.time > 0) {
_local1.time--;
} else if (!_local1.reachedZero) {
_local1.reachedZero = true;
trace("time out");
_root.mcGame.mcCont.fDeath();
}
var _local3 = Math.floor(_local1.time / 60);
var _local2 = _local1.time - (_local3 * 60);
if (_local2 < 10) {
_local2 = "0" + _local2;
}
_local1.chronoValue = (_local3 + ":") + _local2;
}
function doEnemyInterval() {
var _local1 = _global;
_local1.enemyIntervalCount++;
if ((!_local1.enemyIntervalDone) && (_local1.enemyIntervalCount >= _local1.enemyInterval)) {
_local1.enemyIntervalDone = true;
_local1.sCont.createEnemy(_local1.gameNumber);
}
}
_global.chronoMC = this;
this.time = 0;
}
onClipEvent (enterFrame) {
if (_global.freeze || (_global.timeStop)) {
this.stop();
} else {
this.play();
}
}
Instance of Symbol 976 MovieClip "stopSound" in Symbol 977 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicIsPlaying == true) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Symbol 979 MovieClip Frame 2
function enemyInit(enemy, enemyType) {
var _local2 = _global;
var _local1 = enemy.object;
_local1.type = enemyType;
_local1.enabled = false;
_local1.speed = 5;
_local1.state = "idle";
_local1.reflex = 20;
_local1.canAvoid = false;
_local1.enable = enemyEnable;
_local1.disable = enemyDisable;
_local1.destroy = enemyDestroy;
_local1.checkHit = enemyCheckHit;
_local1.die = enemyDie;
switch (_local1.type) {
case "bat" :
_local1.behavior = enemyBehaviorBat;
_local1.setMove = enemySetMove;
_local1.attack = enemyAttackBat;
_local1.distanceBeforeAttack = _local2.batBeforeAttack;
_local1.distanceBeforeFollow = 1500;
_local1.delayBeforeNextAttack = _local2.batAttackDelay;
_local1.multipleAttack = true;
_local1.move = true;
_local1.speed = _local2.batSpeed;
_local1.firstMove = true;
_local1.type = "bat";
break;
case "snake" :
_local1.behavior = enemyBehaviorSnake;
_local1.setMove = enemySetMove;
_local1.attack = enemyAttackSnake;
_local1.distanceBeforeAttack = _local2.snackBeforeAttack;
_local1.distanceBeforeFollow = 1500;
_local1.delayBeforeNextAttack = _local2.snackAttackDelay;
_local1.multipleAttack = true;
_local1.move = false;
_local1.firstMove = true;
_local1.type = "snake";
break;
case "rat" :
_local1.behavior = enemyBehaviorRat;
_local1.setMove = enemyRatSetMove;
_local1.attack = enemyAttackRat;
_local1.checkHit = enemyRatCheckHit;
_local1.die = enemyRatDie;
_local1.doDie = enemyDie;
_local1.distanceBeforeAttack = 1500;
_local1.distanceBeforeFollow = 2500;
_local1.multipleAttack = false;
_local1.move = false;
_local1.reflex = _local2.ratReflex;
_local1.speed = _local2.ratSpeed;
_local1.type = "rat";
break;
case "column" :
_local1.canAvoid = true;
_local1.cantDie = true;
break;
case "rock" :
_local1.behavior = enemyBehaviorRock;
_local1.canAvoid = true;
break;
case "magic" :
_local1.die = enemyMagicDie;
_local1.behavior = enemyBehaviorMagic;
}
_local1.onEnterFrame = enemyDoBehavior;
_local1.gotoAndStop(_local1.state);
}
function enemyEnable() {
this.enabled = true;
}
function enemyDisable() {
this.enabled = false;
}
function enemyDie() {
var _local1 = this;
if (((_local1.state != "death") && (!_local1.cantDie)) && (!(((_local1.type == "rat") && (_local1.hasAttacked)) && (_local1.state != "attack")))) {
_local1.state = "death";
_root.score = _root.score + 250;
_local1.gotoAndStop("Death");
}
}
function enemyRatDie() {
var _local1 = this;
if ((!_local1.hasAttacked) && (_local1.state != "attack")) {
_local1.doDie();
}
}
function enemyMagicDie() {
var _local1 = this;
if (((_local1.state != "death") && (!_local1.cantDie)) && (!(((_local1.type == "rat") && (_local1.hasAttacked)) && (_local1.state != "attack")))) {
_local1.state = "death";
_global.magicCanBeCreated = true;
_root.score = _root.score + 500;
_local1.gotoAndStop("Death");
}
}
function enemyDestroy() {
var _local1 = this;
_local1.disable();
_local1.removeMovieClip();
}
function enemyDoBehavior() {
var _local1 = this;
var _local2 = _global;
if (_local1.enabled && (!_local2.freeze)) {
var mouseX = _root._xmouse;
var _local3 = (_local1._x + _local1._parent._x) + _local1._parent._parent._x;
var playerX = ((_local1._parent.mcChar._x + _local1._parent.mcChar._parent._x) + _local1._parent.mcChar._parent._parent._x);
if (_local1.move) {
_local1.o3Dpoints.x = _local1.o3Dpoints.x + (_local1.direction * _local1.speed);
if (_local1.o3Dpoints.x <= _local2.sCont.Xmin) {
_local1.o3Dpoints.x = _local2.sCont.Xmin;
}
if (_local1.o3Dpoints.x >= _local2.sCont.Xmax) {
_local1.o3Dpoints.x = _local2.sCont.Xmax;
}
}
if (_local1.firstMove) {
if (Math.round(Math.random() * _local1.reflex) == 1) {
if (_local1.o3Dpoints.z < _local1.distanceBeforeFollow) {
if (playerX > _local3) {
_local1.setMove(1);
} else {
_local1.setMove(-1);
}
} else if (mouseX < _local3) {
_local1.setMove(1);
} else {
_local1.setMove(-1);
}
}
}
if ((((_local1.o3Dpoints.z <= _local1.distanceBeforeAttack) && (!_local1.hasAttacked)) && (_local1.state != "attack")) && (_local1.state != "death")) {
_local1.state = "attack";
_local1.hasAttacked = true;
if (_local1.multipleAttack) {
_local1.nextAttackTimer = (getTimer() + _local1.delayBeforeNextAttack) + Math.round(Math.random() * 500);
}
_local1.attack();
}
if (_local1.nextAttackTimer < getTimer()) {
delete _local1.hasAttacked;
delete _local1.nextAttackTimer;
}
if (((_local1.o3Dpoints.z <= 0) && (!_local1.isOut)) && (_local1.state != "death")) {
if ((_local1.anim.hit && (_local1.anim.hit.hitTest(_local1._parent.mcChar))) || ((!_local1.anim.hit) && (_local1.hitTest(_local1._parent.mcChar)))) {
trace("enemy hits the player!:" + _local1.anim.hit);
fPlayerHit(15);
} else if (!_local1.canAvoid) {
} else {
_root.score = _root.score + 250;
}
_local1.isOut = true;
}
_local1.behavior();
_local1.update();
}
}
function enemyCheckHit(mc) {
var _local1 = mc;
if (((_local1.hitTest(_parent.mcChar) && (!_local1.hasHit)) && (this.enabled)) && (this.state != "death")) {
_global.sCont.fPlayerHit(15);
_local1.hasHit = true;
}
}
function enemyRatCheckHit(mc) {
if (mc.hitTest(_parent.mcChar) && (this.state != "death")) {
_global.sCont.fPlayerHit(15);
}
}
function enemyBehaviorBat() {
if (this.o3Dpoints.z < 1000) {
this.o3Dpoints.y = this.o3Dpoints.y + 7;
}
}
function enemyBehaviorSnake() {
}
function enemyAttackSnake() {
var _local1 = this;
var _local3 = _parent;
var distance = (_local3.mcCont.Xmax - _local3.mcCont.Xmin);
var x = (_local1.o3Dpoints.x - _local3.mcCont.Xmin);
var _local2 = x / distance;
if (_local2 <= 0.33) {
_local1.attackDirection = 3;
} else if ((_local2 > 0.33) && (_local2 <= 0.66)) {
_local1.attackDirection = 2;
} else {
_local1.attackDirection = 1;
}
_local1.gotoAndStop("Attack");
}
function enemyAttackRat() {
this.gotoAndStop("Attack");
}
function enemyAttackBat() {
this.gotoAndStop("Attack");
}
function enemyBehaviorRat() {
var _local1 = this;
var _local2 = _parent;
if (((_local1.state != "death") && (!_local1.hasAttacked)) && (_local1.state != "attack")) {
if (!_local1.firstMove) {
_local1.move = true;
_local1.firstMove = true;
_local1.direction = -1;
_local1.gotoAndStop("turnRight");
}
if (_local1.move) {
if ((_local1.o3Dpoints.x <= _local2.mcCont.Xmin) || (_local1.o3Dpoints.x >= _local2.mcCont.Xmax)) {
_local1.move = false;
if (!_local1.hasAttacked) {
_local1.gotoAndStop("idle");
}
if (_local1.o3Dpoints.x <= _local2.mcCont.Xmin) {
}
}
}
}
if (_local1.state == "attack") {
_local1.o3Dpoints.x = _local1.o3Dpoints.x + (50 * _local1.direction);
}
}
function enemyBehaviorRock() {
var _local1 = this;
if ((((_local1.o3Dpoints.z < -20) && (!_local1.hasAttacked)) && (_local1.state != "death")) && (!_local1.doubleRockFix)) {
_local1.o3Dpoints.z = 300;
_local1.isOut = false;
_local1.hasAttacked = true;
_local1.doubleRockFix = true;
_local1.state = "attack";
_local1.gotoAndStop("attack");
}
}
function enemyBehaviorMagic() {
var _local1 = _global;
if (this.o3Dpoints.z < 0) {
_local1.magicCanBeCreated = true;
_local1.StopSound("acidLoop");
_local1.StopSound("fireLoop");
_local1.StopSound("portalLoop");
}
}
function enemySetMove(direction) {
this.direction = direction;
}
function enemyRatSetMove(direction) {
var _local1 = this;
var _local2 = direction;
if ((((_local1.direction != _local2) && (!_local1.hasAttacked)) && (_local1.state != "attack")) && (_local1.state != "death")) {
if (_local2 == -1) {
_local1.gotoAndStop("turnRight");
_local1.move = false;
} else {
_local1.gotoAndStop("turnLeft");
_local1.move = false;
}
_local1.direction = _local2;
}
}
function pauseInit() {
_global.pause = new Object();
AsBroadcaster.initialize(_global.pause);
}
function registerPause(mc) {
}
function registerPauseAuto(mc) {
var _local1 = mc;
if (!_local1.onUnLoad) {
registerPause(_local1);
_local1.onUnload = function () {
unregisterPause(this);
};
}
}
function unregisterPause(mc) {
_global.pause.removeListener(mc);
}
function gamePause() {
_global.freeze = true;
_global.pause.broadcastMessage("stop");
}
function gameUnpause() {
_root.mcGame.mcInterface.chrono.startTime = getTimer() - _root.mcGame.mcInterface.chrono.elapsed;
_global.freeze = false;
_global.pause.broadcastMessage("play");
}
function fSetLevel(level) {
var _local1 = _global;
var _local2 = _parent;
var _local3 = level;
_local1.shoot = true;
switch (_local3) {
case 1 :
_local1.maxTime = 60;
break;
case 2 :
_local1.maxTime = 85;
break;
case 3 :
_local1.maxTime = 105;
break;
case 4 :
_local1.maxTime = 120;
}
_local1.chronoMC.setTime(_local1.maxTime);
if (_local3 != 1) {
_local2.mcInterface.energyBar.faceIcon.gotoAndStop(_local3);
_local2.mcBack.gotoAndStop(_local3);
trace(_local3);
switch (_local3) {
case 2 :
temp = "Irma";
_local2.mcChar.gotoAndPlay("Irma");
break;
case 3 :
temp = "Taranee";
_local2.mcChar.gotoAndPlay("Taranee");
break;
case 4 :
temp = "Cornelia";
_local2.mcChar.gotoAndPlay("Cornelia");
}
validWitch = setInterval(function () {
_parent.mcChar.gotoAndPlay(temp);
clearInterval(validWitch);
}, 700);
}
}
function mapMatrix(wicheElement) {
var _local2 = wicheElement;
var _local1 = f3Dto2D(_local2, oCAR);
_local2.corrMC._x = _local1.x + Xoffset;
_local2.corrMC._y = _local1.y + Yoffset;
_local2.corrMC._xscale = (_local2.corrMC._yscale = 200 * _local1.scaleFactor);
}
function fElements(x, y, z, mcElement, modSpeed) {
var _local1 = this;
var _local2 = mcElement;
var _local3 = _global;
_local2.o3Dpoints = make3DPoint(x, y, z, _local2);
_local2.enable();
_local2.update = function () {
var _local1 = this;
var _local2 = _global;
if (modSpeed != undefined) {
_local1.o3Dpoints.z = _local1.o3Dpoints.z - (_local2.speed / modSpeed);
} else {
_local1.o3Dpoints.z = _local1.o3Dpoints.z - _local2.speed;
}
if (_local1._parent["projectile" + Math.floor(_local1.o3Dpoints.z / 1000)]._name != undefined) {
_local1.oMCRef = _local1._parent["projectile" + Math.floor(_local1.o3Dpoints.z / 1000)];
if (_local1.hitTest(_local1.oMCRef)) {
delete _local1.oMCRef.onEnterFrame;
_local1.oMCRef.swapDepths(1001);
_local1.oMCRef.removeMovieClip();
_local1.die();
}
}
if (_local1.o3Dpoints.z < -100) {
_local1.removeMovieClip();
}
_local2.sCont.mapMatrix(_local1.o3Dpoints);
};
}
function fFlameHit(me, bonus) {
var _local1 = this;
var _local2 = _global;
var _local3 = me;
if (_local1._parent["projectile" + Math.floor(_local3._parent._parent.o3Dpoints.z / 1000)]._name != undefined) {
_local1.oMCRef = _local1._parent["projectile" + Math.floor(_local3._parent._parent.o3Dpoints.z / 1000)];
if (_local3.hitTest(_local1.oMCRef)) {
delete _local1.oMCRef.onEnterFrame;
_local1.oMCRef.swapDepths(1001);
_local1.oMCRef.removeMovieClip();
_local3._parent.nextFrame();
switch (bonus) {
case points :
_root.score = _root.score + 1000;
return;
case energy :
_local2.energy = _local2.energy - 20;
if (_local2.energy < 1) {
_local2.energy = 1;
}
_parent.mcInterface.energyBar.energy.gotoAndStop(_local2.energy);
return;
case speed :
_local2.lives++;
_parent.mcInterface.nbLife++;
}
}
}
}
function fMove() {
var _local1 = _parent;
var _local2 = this;
if (!_global.freeze) {
if (Key.isDown(32) && (!_local2.holdingSpace)) {
_local2.holdingSpace = true;
_local1.onMouseDown = _local2.onMouseDown();
} else if ((!Key.isDown(32)) && (_local2.holdingSpace)) {
_local2.holdingSpace = false;
}
if (Key.isDown(37)) {
if ((_local1.mcChar._x - 10) >= 83) {
_local1.mcChar._x = _local1.mcChar._x - 10;
} else {
_local1.mcChar._x = 83;
}
} else if (Key.isDown(39)) {
if ((_local1.mcChar._x + 10) <= 497) {
_local1.mcChar._x = _local1.mcChar._x + 10;
} else {
_local1.mcChar._x = 497;
}
} else {
var _local3;
if (Key.isDown(38) || (Key.isDown(40))) {
if (key.isDown(38)) {
_local3 = true;
} else {
_local3 = false;
}
} else if (_root._ymouse <= 160) {
_local3 = true;
} else {
_local3 = false;
}
if (_local3) {
if (_local1.mcChar.char._currentframe == 1) {
_local2.isAccelerating = true;
_local1.mcChar.char.gotoAndStop("transitionAcc");
}
} else if (_local1.mcChar.char._currentframe == 2) {
_local2.isAccelerating = false;
_local1.mcChar.char.gotoAndStop("Deceleration");
}
if (_root._xmouse < 80) {
mousePos = 80;
} else if (_root._xmouse > 500) {
mousePos = 500;
} else {
mousePos = _root._xmouse;
}
if (_local1.mcChar._x < mousePos) {
_local1.mcChar._x = _local1.mcChar._x + 7;
if (_local1.mcChar._x > mousePos) {
_local1.mcChar._x = mousePos;
}
} else if (_local1.mcChar._x > mousePos) {
_local1.mcChar._x = _local1.mcChar._x - 7;
if (_local1.mcChar._x < mousePos) {
_local1.mcChar._x = mousePos;
}
}
}
}
}
_global.redTorch1 = 0;
_global.redTorch2 = 0;
_global.blueTorch1 = 0;
_global.blueTorch2 = 0;
_global.blueTorch3 = 0;
_global.greenTorch1 = 0;
_global.greenTorch2 = 0;
_global.greenTorch3 = 0;
_global.greenTorch4 = 0;
_global.greenTorch5 = 0;
_global.batSpeed = 5;
_global.batSpeedVar = 5;
_global.batBeforeAttack = 2500;
_global.batAttackDelay = 2500;
_global.batBeforeAttack = 20000;
_global.snackAttackDelay = 2500;
_global.snackBeforeAttack = 20000;
_global.ratSpeed = 10;
_global.ratReflex = 10;
_global.ratMoveDistance = 6000;
_global.make2Column = false;
_global.maxColumnStyle = 2;
_global.numberOfMagical = 3;
_global.kindOfBadGuy = 6;
_global.maxRockStyle = 2;
createEnemy = function (gameNumber) {
var _local1 = _parent;
var _local2 = _global;
if ((_local2.freeze == false) && (_local2.gameNumber == gameNumber)) {
clearInterval(_local1.createEnemyInterval);
_local1.enemyToCreate = Math.ceil(Math.random() * _local2.kindOfBadGuy);
if (_local1.enemyToCreate) {
while (_local1.enemyToCreate == _local1.lastEnemyToCreate) {
_local1.enemyToCreate = Math.ceil(Math.random() * _local2.kindOfBadGuy);
}
}
_local1.lastEnemyToCreate = _local1.enemyToCreate;
if ((_local2.magicCanBeCreated == false) and (_local1.enemyToCreate == 6)) {
trace("Vite, faut empecher la cr\u00E9ation du chose magique");
_local1.enemyToCreate = Math.ceil(Math.random() * 5);
}
switch (_local1.enemyToCreate) {
case 1 :
createABat();
return;
case 2 :
createARat();
return;
case 3 :
createASnake();
return;
case 4 :
createAColumn();
return;
case 5 :
createARock();
return;
case 6 :
createAMagical();
}
}
};
createABat = function () {
var _local1 = _global;
var _local2 = _parent;
badGuy = "enemy" + _local2.noEnemy;
_local1[badGuy] = new Object();
_local1[badGuy].vTime = 100;
_local1[badGuy].x = 0;
_local1[badGuy].y = 35;
_local1[badGuy].z = 7000;
_local1[badGuy].no = _local2.noEnemy;
_local2.attachMovie("BatMovie", badGuy, _local2.depth);
_local2[badGuy]._x = -50;
_local2[badGuy]._y = -50;
_local1[badGuy].object = _local2[badGuy];
_local1.elements = badGuy;
_local2.noEnemy++;
_local2.depth--;
if (_local2.depth <= 10) {
_local2.depth = 450;
}
enemyInit(_local1[badGuy], "bat");
enemyInterval = "enemyInterval" + _local2.noEnemy;
fElements(_local1[badGuy].x, _local1[badGuy].y, _local1[badGuy].z, _local1[badGuy].object);
timeBeforeCreation = Math.ceil(Math.random() * _local1.timeDifference) + _local1.minimumTime;
_local2.createEnemyInterval = setEnemyInterval(timeBeforeCreation, _local1.gameNumber);
};
createARat = function () {
var _local1 = _global;
var _local2 = _parent;
badGuy = "enemy" + _local2.noEnemy;
_local1[badGuy] = new Object();
_local1[badGuy].vTime = 100;
_local1[badGuy].x = 0;
_local1[badGuy].y = 450;
_local1[badGuy].z = 7000;
_local2.attachMovie("RatMovie", badGuy, _local2.depth);
_local2[badGuy]._x = -50;
_local2[badGuy]._y = -50;
_local1[badGuy].object = _local2[badGuy];
_local2.noEnemy++;
_local2.depth--;
if (_local2.depth <= 10) {
_local2.depth = 450;
}
enemyInit(_local1[badGuy], "rat");
enemyInterval = "enemyInterval" + _local2.noEnemy;
fElements(_local1[badGuy].x, _local1[badGuy].y, _local1[badGuy].z, _local1[badGuy].object);
timeBeforeCreation = Math.ceil(Math.random() * _local1.timeDifference) + _local1.minimumTime;
_local2.createEnemyInterval = setEnemyInterval(timeBeforeCreation, _local1.gameNumber);
};
createASnake = function () {
var _local1 = _parent;
var _local2 = _global;
_local1.snakeStyle = Math.ceil(Math.random() * 3);
while (_local1.snakeStyle == _local1.lastSnakeStyle) {
_local1.snakeStyle = Math.ceil(Math.random() * 3);
}
_local1.lastSnakeStyle = _local1.snakeStyle;
switch (_local1.snakeStyle) {
case 1 :
posX = -200;
break;
case 2 :
posX = 0;
break;
case 3 :
posX = 200;
}
badGuy = "enemy" + _local1.noEnemy;
_local2[badGuy] = new Object();
_local2[badGuy].vTime = 100;
_local2[badGuy].x = posX;
_local2[badGuy].y = 310;
_local2[badGuy].z = 7000;
_local2[badGuy].initialSpeed = 1;
_local1.attachMovie("SnakeMovie", badGuy, _local1.depth);
_local1[badGuy]._x = -50;
_local1[badGuy]._y = -50;
_local1[badGuy]._width = 50;
_local1[badGuy]._height = 50;
_local1[badGuy]._xscale = 10;
_local1[badGuy]._yscale = 10;
_local2[badGuy].object = _local1[badGuy];
_local1.noEnemy++;
_local1.depth--;
if (_local1.depth <= 10) {
_local1.depth = 450;
}
enemyInit(_local2[badGuy], "snake");
enemyInterval = "enemyInterval" + _local1.noEnemy;
fElements(_local2[badGuy].x, _local2[badGuy].y, _local2[badGuy].z, _local2[badGuy].object, _local2[badGuy].initialSpeed);
timeBeforeCreation = Math.ceil(Math.random() * _local2.timeDifference) + _local2.minimumTime;
_local1.createEnemyInterval = setEnemyInterval(timeBeforeCreation, _local2.gameNumber);
};
createAColumn = function () {
var _local1 = _global;
var _local2 = _parent;
_local2.columnStyle = Math.ceil(Math.random() * _local1.maxColumnStyle);
_local2.lastColumnStyle = _local2.columnStyle;
switch (_local2.columnStyle) {
case 1 :
posX = -250;
break;
case 2 :
posX = 0;
break;
case 3 :
posX = 250;
break;
case 4 :
posX = -250;
posX2 = 250;
_local1.make2Column = true;
}
badGuy = "enemy" + _local2.noEnemy;
_local1[badGuy] = new Object();
_local1[badGuy].vTime = 100;
_local1[badGuy].x = posX;
_local1[badGuy].y = 350;
_local1[badGuy].z = 7000;
_local1[badGuy].initialSpeed = 1;
_local2.attachMovie("ColumnMovie", badGuy, _local2.depth);
_local2[badGuy]._x = -50;
_local2[badGuy]._y = -50;
_local2[badGuy].gotoAndStop(_local1.level);
_local1[badGuy].object = _local2[badGuy];
_local2.noEnemy++;
_local2.depth--;
if (_local2.depth <= 10) {
_local2.depth = 450;
}
enemyInit(_local1[badGuy], "column");
enemyInterval = "enemyInterval" + _local2.noEnemy;
fElements(_local1[badGuy].x, _local1[badGuy].y, _local1[badGuy].z, _local1[badGuy].object, _local1[badGuy].initialSpeed);
if (_local1.make2Column == true) {
badGuy = "enemy" + _local2.noEnemy;
_local1[badGuy] = new Object();
_local1[badGuy].vTime = 100;
_local1[badGuy].x = posX2;
_local1[badGuy].y = 350;
_local1[badGuy].z = 7000;
_local1[badGuy].initialSpeed = 1;
_local2.attachMovie("ColumnMovie", badGuy, _local2.depth);
_local2[badGuy]._x = -50;
_local2[badGuy]._y = -50;
_local2[badGuy].gotoAndStop(_local1.level);
_local1[badGuy].object = _local2[badGuy];
_local2.noEnemy++;
_local2.depth--;
if (_local2.depth <= 10) {
_local2.depth = 450;
}
enemyInit(_local1[badGuy], "column");
enemyInterval = "enemyInterval" + _local2.noEnemy;
fElements(_local1[badGuy].x, _local1[badGuy].y, _local1[badGuy].z, _local1[badGuy].object);
}
_local1.make2Column = false;
timeBeforeCreation = Math.ceil(Math.random() * _local1.timeDifference) + _local1.minimumTime;
_local2.createEnemyInterval = setEnemyInterval(timeBeforeCreation, _local1.gameNumber);
};
createARock = function () {
var _local1 = _parent;
var _local2 = _global;
_local1.rockStyle = Math.ceil(Math.random() * _local2.maxRockStyle);
while (_local1.rockStyle == _local1.lastRockStyle) {
_local1.rockStyle = Math.ceil(Math.random() * _local2.maxRockStyle);
}
_local1.lastRockStyle = _local1.rockStyle;
switch (_local1.rockStyle) {
case 1 :
posX = -200;
break;
case 2 :
posX = 0;
break;
case 3 :
posX = 200;
}
badGuy = "enemy" + _local1.noEnemy;
_local2[badGuy] = new Object();
_local2[badGuy].vTime = 100;
_local2[badGuy].x = posX;
_local2[badGuy].y = -50;
_local2[badGuy].z = 4000;
_local2[badGuy].initialSpeed = 1.75;
if (_local2.level == 1) {
duplicateMovieClip (_local1.rock1, badGuy, _local1.depth);
} else if (_local2.level == 2) {
duplicateMovieClip (_local1.rock2, badGuy, _local1.depth);
} else if (_local2.level == 3) {
duplicateMovieClip (_local1.rock3, badGuy, _local1.depth);
} else if (_local2.level == 4) {
duplicateMovieClip (_local1.rock4, badGuy, _local1.depth);
}
_local1[badGuy]._x = -50;
_local1[badGuy]._y = -50;
_local2[badGuy].object = _local1[badGuy];
_local1.noEnemy++;
_local1.depth--;
if (_local1.depth <= 10) {
_local1.depth = 450;
}
enemyInit(_local2[badGuy], "rock");
enemyInterval = "enemyInterval" + _local1.noEnemy;
fElements(_local2[badGuy].x, _local2[badGuy].y, _local2[badGuy].z, _local2[badGuy].object, _local2[badGuy].initialSpeed);
timeBeforeCreation = Math.ceil(Math.random() * _local2.timeDifference) + _local2.minimumTime;
_local1.createEnemyInterval = setEnemyInterval(timeBeforeCreation, _local2.gameNumber);
};
createAMagical = function () {
var _local1 = _global;
var _local2 = _parent;
_local1.magicCanBeCreated = false;
_local1.numberOfMagical--;
if (_local1.numberOfMagical == 0) {
_local1.kindOfBadGuy--;
}
badGuy = "enemy" + _local2.noEnemy;
_local1[badGuy] = new Object();
_local1[badGuy].vTime = 100;
_local1[badGuy].x = 0;
if (_local1.level == 1) {
_local1[badGuy].y = 375;
} else if (_local1.level == 2) {
_local1[badGuy].y = 375;
} else if (_local1.level == 3) {
_local1[badGuy].y = 200;
} else if (_local1.level == 4) {
_local1[badGuy].y = 250;
}
_local1[badGuy].z = 7000;
_local1[badGuy].initialSpeed = 1;
trace("_global.level = " + _local1.level);
if (_local1.level == 1) {
duplicateMovieClip (_local2.magic1, badGuy, _local2.depth);
} else if (_local1.level == 2) {
duplicateMovieClip (_local2.magic2, badGuy, _local2.depth);
} else if (_local1.level == 3) {
duplicateMovieClip (_local2.magic3, badGuy, _local2.depth);
} else if (_local1.level == 4) {
duplicateMovieClip (_local2.magic4, badGuy, _local2.depth);
}
_local2[badGuy]._x = -50;
_local2[badGuy]._y = -50;
_local2[badGuy].gotoAndStop(_local1.level);
_local1[badGuy].object = _local2[badGuy];
_local2.noEnemy++;
_local2.depth--;
if (_local2.depth <= 10) {
_local2.depth = 450;
}
enemyInit(_local1[badGuy], "magic");
enemyInterval = "enemyInterval" + _local2.noEnemy;
fElements(_local1[badGuy].x, _local1[badGuy].y, _local1[badGuy].z, _local1[badGuy].object, _local1[badGuy].initialSpeed);
timeBeforeCreation = Math.ceil(Math.random() * _local1.timeDifference) + _local1.minimumTime;
_local2.createEnemyInterval = setEnemyInterval(timeBeforeCreation, _local1.gameNumber);
};
changeLevel = function () {
var _local1 = _global;
if (_local1.level == 1) {
_local1.nbArchMax = 20;
_local1.batSpeed = 5;
_local1.batSpeedVar = 5;
_local1.batAttackDelay = 2500;
_local1.snackAttackDelay = 2500;
_local1.batBeforeAttack = 0;
_local1.snackBeforeAttack = 0;
_local1.ratSpeed = 10;
_local1.ratReflex = 10;
_local1.ratMoveDistance = 6000;
_local1.make2Column = false;
_local1.maxColumnStyle = 2;
_local1.numberOfMagical = 3;
_local1.kindOfBadGuy = 6;
_local1.maxRockStyle = 2;
_local1.minimumTime = 2000;
_local1.timeDifference = 500;
} else if (_local1.level == 2) {
_local1.nbArchMax = 30;
_local1.batSpeed = 7;
_local1.batSpeedVar = 5;
_local1.batAttackDelay = 2000;
_local1.snackAttackDelay = 2000;
_local1.batBeforeAttack = 1500;
_local1.snackBeforeAttack = 1500;
_local1.ratSpeed = 13;
_local1.ratReflex = 8;
_local1.ratMoveDistance = 6000;
_local1.make2Column = false;
_local1.maxColumnStyle = 3;
_local1.numberOfMagical = 3;
_local1.kindOfBadGuy = 6;
_local1.maxRockStyle = 2;
_local1.minimumTime = 1500;
_local1.timeDifference = 500;
_local1.comptDist = 1;
} else if (_local1.level == 3) {
_local1.nbArchMax = 40;
_local1.batSpeed = 10;
_local1.batSpeedVar = 5;
_local1.batAttackDelay = 1500;
_local1.snackAttackDelay = 1500;
_local1.batBeforeAttack = 2000;
_local1.snackBeforeAttack = 2000;
_local1.ratSpeed = 17;
_local1.ratReflex = 6;
_local1.ratMoveDistance = 6000;
_local1.make2Column = false;
_local1.maxColumnStyle = 4;
_local1.numberOfMagical = 3;
_local1.kindOfBadGuy = 6;
_local1.maxRockStyle = 3;
_local1.minimumTime = 1000;
_local1.timeDifference = 500;
_local1.comptDist = 1;
} else if (_local1.level == 4) {
_local1.nbArchMax = 50;
_local1.batSpeed = 15;
_local1.batSpeedVar = 5;
_local1.batAttackDelay = 1000;
_local1.snackAttackDelay = 1000;
_local1.batBeforeAttack = 1000;
_local1.snackBeforeAttack = 1000;
_local1.ratSpeed = 22;
_local1.ratReflex = 4;
_local1.ratMoveDistance = 6000;
_local1.make2Column = false;
_local1.maxColumnStyle = 4;
_local1.numberOfMagical = 3;
_local1.kindOfBadGuy = 6;
_local1.maxRockStyle = 3;
_local1.minimumTime = 1000;
_local1.timeDifference = 200;
_local1.comptDist = 1;
} else if (_local1.level == 5) {
loadMovie ("boss.swf", _root);
}
createTorchs();
};
createTorchs = function () {
var _local1 = _global;
noRedTorch = 1;
_local1.redTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
noBlueTorch = Math.ceil(Math.random() * 3);
if (noBlueTorch == 1) {
_local1.blueTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
} else if (noBlueTorch == 2) {
_local1.blueTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 5)) + (_local1.nbArchMax / 5);
_local1.blueTorch2 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
} else if (noBlueTorch == 3) {
_local1.blueTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 5)) + (_local1.nbArchMax / 5);
_local1.blueTorch2 = Math.ceil(Math.random() * (_local1.nbArchMax / 8)) + (_local1.nbArchMax / 2);
_local1.blueTorch3 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
}
noGreenTorch = Math.ceil(Math.random() * 4) + 1;
if (noGreenTorch == 1) {
_local1.greenTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
} else if (noGreenTorch == 2) {
_local1.greenTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 5)) + (_local1.nbArchMax / 5);
_local1.greenTorch2 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
} else if (noGreenTorch == 3) {
_local1.greenTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 5)) + (_local1.nbArchMax / 5);
_local1.greenTorch2 = Math.ceil(Math.random() * (_local1.nbArchMax / 8)) + (_local1.nbArchMax / 2);
_local1.greenTorch3 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
} else if (noGreenTorch == 4) {
_local1.greenTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 5)) + (_local1.nbArchMax / 5);
_local1.greenTorch2 = Math.ceil(Math.random() * (_local1.nbArchMax / 8)) + (_local1.nbArchMax / 2);
_local1.greenTorch3 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
_local1.greenTorch4 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + (_local1.nbArchMax / 2);
} else if (noGreenTorch == 5) {
_local1.greenTorch1 = Math.ceil(Math.random() * (_local1.nbArchMax / 10)) + (_local1.nbArchMax / 10);
_local1.greenTorch2 = Math.ceil(Math.random() * (_local1.nbArchMax / 5)) + (_local1.nbArchMax / 5);
_local1.greenTorch3 = Math.ceil(Math.random() * (_local1.nbArchMax / 10)) + (_local1.nbArchMax / 2);
_local1.greenTorch4 = Math.ceil(Math.random() * (_local1.nbArchMax / 4)) + ((_local1.nbArchMax / 2) + 2);
_local1.greenTorch5 = Math.ceil(Math.random() * (_local1.nbArchMax / 3)) + ((_local1.nbArchMax / 2) + 2);
}
};
pauseInit();
_global.sCont = this;
var nElemNum = 0;
var nElemLorR = 1;
var Xoffset = 290;
var Yoffset = 100;
var focalLength = 400;
var Xmin = -235;
var Xmax = 235;
var Ymin = -290;
var Ymax = 220;
var Zmin = -1000;
var Zmax = 1800;
var Xspeed = 0;
var Yspeed = 0;
var Zspeed = 0;
_parent.mcChar.swapDepths(2000);
_parent.mcArch.swapDepths(1);
_parent.mcArch2.swapDepths(2);
_global.energy = 1;
_global.cheat = "";
_global.comptDist = 0;
_parent.mcInterface.energyBar.energy.gotoAndStop(1);
_parent.mcInterface.swapDepths(2200);
_global.ballDepth = 500;
_global.normalSpeed = 25;
_global.topSpeed = 75;
_global.shoot = true;
_global.speed = _global.normalSpeed;
_global.timer = 0;
_global.nbArch = 2;
_global.maxTime = 0;
_global.magicCanBeCreated = true;
_parent.noEnemy = 1;
_parent.depth = 450;
timer = 0;
_global.keyListener = new Object();
Key.addListener(_global.keyListener);
_global.keyListener2 = new Object();
_global.minimumTime = 1500;
_global.timeDifference = 500;
make3DPoint = function (x, y, z, corrMC) {
var _local1 = new Object();
_local1.x = x;
_local1.y = y;
_local1.z = z;
_local1.corrMC = corrMC;
return(_local1);
};
f3Dto2D = function (points, axis) {
var _local2 = axis;
var sx = Math.sin(_local2.x);
var cx = Math.cos(_local2.x);
var sy = Math.sin(_local2.y);
var cy = Math.cos(_local2.y);
var sz = Math.sin(_local2.z);
var cz = Math.cos(_local2.z);
var x;
var y;
var _local3;
var xy;
var xz;
var yx;
var yz;
var zx;
var zy;
var scaleRatio;
x = points.x;
y = points.y;
_local3 = points.z;
xy = (cx * y) - (sx * _local3);
xz = (sx * y) + (cx * _local3);
yz = (cy * xz) - (sy * x);
yx = (sy * xz) + (cy * x);
zx = (cz * yx) - (sz * xy);
zy = (sz * yx) + (cz * xy);
scaleFactor = focalLength / (focalLength + yz);
x = zx * scaleFactor;
y = zy * scaleFactor;
_local3 = yz;
var _local1 = new Object();
_local1.x = x;
_local1.y = y;
_local1.depth = _local3;
_local1.scaleFactor = scaleFactor;
return(_local1);
};
oCAR = make3DPoint(-0.1, 0, 0, null);
fDecor = function () {
var _local1 = this;
var _local2 = _global;
var _local3 = _parent;
_local2.decor = new Array(1, 2, 3, 4, 5);
_local2.i = 0;
_local2.randArch = random(4) + 2;
_local3.mcArch.gotoAndStop(_local2.randArch + ((_local2.level - 1) * 10));
_local3.mcArch.o3Dpoints = make3DPoint(0, 0, 7000, _local3.mcArch);
_local3.mcArch.exist = true;
_local3.mcArch2.gotoAndStop(((_local2.level - 1) * 10) + 1);
_local3.mcArch2.o3Dpoints = make3DPoint(0, 0, 3500, _local3.mcArch2);
_local3.mcArch2.exist = true;
_local2.nbDecor = _local2.decor[_local2.i] + ((_local2.level - 1) * 5);
_local3.mcDecor.gotoAndStop(_local2.nbDecor);
_local2.i++;
_local3.mcDecor.o3Dpoints = make3DPoint(0, 0, 1750, _local3.mcDecor);
_local2.nbDecor = _local2.decor[_local2.i] + ((_local2.level - 1) * 5);
_local3.mcDecor2.gotoAndStop(_local2.nbDecor);
_local2.i++;
_local3.mcDecor2.o3Dpoints = make3DPoint(0, 0, 5250, _local3.mcDecor2);
_local3.mcDecor2.onEnterFrame = (_local3.mcDecor.onEnterFrame = function () {
var _local1 = _global;
var _local2 = this;
if (_local1.freeze == false) {
_local2.o3Dpoints.z = _local2.o3Dpoints.z - (_local1.speed / 1.48);
_local1.comptDist = _local1.comptDist + _local1.speed;
if (_local1.comptDist >= (7000 / (500 / _local1.nbArchMax))) {
_local1.comptDist = _local1.comptDist - (7000 / (500 / _local1.nbArchMax));
}
if (_local2.o3Dpoints.z < -100) {
_local1.nbDecor = _local1.decor[_local1.i] + ((_local1.level - 1) * 5);
_local1.i++;
if (_local1.i >= 5) {
_local1.i = 0;
}
_local2.gotoAndStop(_local1.nbDecor);
_local2.o3Dpoints.z = 7000;
_local2.fSetColor();
}
_local1.sCont.mapMatrix(_local2.o3Dpoints);
_local2.fChangeColor();
}
});
_local3.mcDecor2.fSetColor = (_local3.mcDecor.fSetColor = function () {
var _local1 = this;
_local1.myColor = new Color(_local1);
_local1.newColor = {ra:0, rb:0, ga:0, gb:0, ba:0, bb:0};
_local1.myColor.setTransform(_local1.newColor);
_local1.fChangeColor = function () {
var _local1 = this;
if (_local1.newColor.ra < 100) {
_local1.newColor.ga = (_local1.newColor.ra = (_local1.newColor.ba = _local1.newColor.ba + (((_global.speed * 5) / 200) - 0.25)));
_local1.myColor.setTransform(_local1.newColor);
} else {
_local1.myColor.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
_local1.fChangeColor = function () {
return(undefined);
};
}
};
});
_local3.mcDecor2.fSetColor();
_local3.mcArch2.onEnterFrame = (_local3.mcArch.onEnterFrame = function () {
var _local1 = this;
var _local2 = _global;
var _local3 = _parent;
if (_local2.freeze == false) {
_local1.o3Dpoints.z = _local1.o3Dpoints.z - _local2.speed;
_local2.comptDist = _local2.comptDist + _local2.speed;
if (_local2.comptDist >= (7000 / (500 / _local2.nbArchMax))) {
_local2.comptDist = _local2.comptDist - (7000 / (500 / _local2.nbArchMax));
_local3.mcInterface.distance.nextFrame();
}
if ((_local1.exist == false) && (_local1.o3Dpoints.z < -100)) {
_local2.shoot = false;
delete _local1.onEnterFrame;
_local1._visible = false;
} else if ((((_local1.o3Dpoints.z <= 350) && (_local2.randArch > 5)) && (_local2.randArch < 10)) && (_local1.exist == true)) {
delete _local3.mcDecor.onEnterFrame;
delete _local3.mcDecor2.onEnterFrame;
delete _local1.onEnterFrame;
delete _local3.mcCont.onMouseDown;
_local2.timeStop = true;
_root.score = _root.score + (_local2.chronoMC.time * 100);
levelCleared = setInterval(function () {
var _local1 = _global;
Key.removeListener(_local1.keyListener);
Key.removeListener(_local1.keyListener2);
_local1.chronoMC.time = 0;
ending = "endLevel" + _local1.level;
_root.gotoAndStop(ending);
clearInterval(levelCleared);
}, 2000);
} else {
if (_local1.o3Dpoints.z < -100) {
_local2.nbArch++;
if (_local2.nbArch < _local2.nbArchMax) {
randNumber = random(5) + 1;
if (_local2.randArch == randNumber) {
if (_local2.randArch == 5) {
_local2.randArch = 1 + ((_local2.level - 1) * 10);
} else {
_local2.randArch = (randNumber + 1) + ((_local2.level - 1) * 10);
}
} else {
_local2.randArch = randNumber + ((_local2.level - 1) * 10);
}
if (_local2.nbArch == (_local2.nbArchMax - 1)) {
_local2.enemyIntervalDone = true;
}
} else {
_local2.randArch = _local2.level + 5;
_local1.o3Dpoints.y = 50;
if (_local1._name == "mcArch") {
_local3.mcArch2.exist = false;
} else {
_local3.mcArch.exist = false;
}
_local2.enemyIntervalDone = true;
}
_local1.gotoAndStop(_local2.randArch);
if (_local2.redTorch1 == _local2.nbArch) {
if ((((((((_local1._currentframe == 1) or (_local1._currentframe == 4)) or (_local1._currentframe == 11)) or (_local1._currentframe == 14)) or (_local1._currentframe == 21)) or (_local1._currentframe == 24)) or (_local1._currentframe == 31)) or (_local1._currentframe == 34)) {
_local1.leftFlame.gotoAndStop("red");
} else if ((((((((_local1._currentframe == 2) or (_local1._currentframe == 5)) or (_local1._currentframe == 12)) or (_local1._currentframe == 15)) or (_local1._currentframe == 22)) or (_local1._currentframe == 25)) or (_local1._currentframe == 32)) or (_local1._currentframe == 35)) {
_local1.rightFlame.gotoAndStop("red");
} else {
_local2.redTorch1++;
}
} else if (((_local2.blueTorch1 == _local2.nbArch) or (_local2.blueTorch2 == _local2.nbArch)) or (_local2.blueTorch3 == _local2.nbArch)) {
if ((((((((_local1._currentframe == 1) or (_local1._currentframe == 4)) or (_local1._currentframe == 11)) or (_local1._currentframe == 14)) or (_local1._currentframe == 21)) or (_local1._currentframe == 24)) or (_local1._currentframe == 31)) or (_local1._currentframe == 34)) {
_local1.leftFlame.gotoAndStop("blue");
} else if ((((((((_local1._currentframe == 2) or (_local1._currentframe == 5)) or (_local1._currentframe == 12)) or (_local1._currentframe == 15)) or (_local1._currentframe == 22)) or (_local1._currentframe == 25)) or (_local1._currentframe == 32)) or (_local1._currentframe == 35)) {
_local1.rightFlame.gotoAndStop("blue");
}
} else if (((((_local2.greenTorch1 == _local2.nbArch) or (_local2.greenTorch2 == _local2.nbArch)) or (_local2.greenTorch3 == _local2.nbArch)) or (_local2.greenTorch4 == _local2.nbArch)) or (_local2.greenTorch5 == _local2.nbArch)) {
if ((((((((_local1._currentframe == 1) or (_local1._currentframe == 4)) or (_local1._currentframe == 11)) or (_local1._currentframe == 14)) or (_local1._currentframe == 21)) or (_local1._currentframe == 24)) or (_local1._currentframe == 31)) or (_local1._currentframe == 34)) {
_local1.leftFlame.gotoAndStop("green");
} else if ((((((((_local1._currentframe == 2) or (_local1._currentframe == 5)) or (_local1._currentframe == 12)) or (_local1._currentframe == 15)) or (_local1._currentframe == 22)) or (_local1._currentframe == 25)) or (_local1._currentframe == 32)) or (_local1._currentframe == 35)) {
_local1.rightFlame.gotoAndStop("green");
}
} else {
_local1.leftFlame.gotoAndStop("orange");
_local1.rightFlame.gotoAndStop("orange");
}
_local1.o3Dpoints.z = 7000;
_local1.fSetColor();
}
_local2.sCont.mapMatrix(_local1.o3Dpoints);
_local1.fChangeColor();
}
}
});
_local3.mcArch2.fSetColor = (_local3.mcArch.fSetColor = function () {
var _local1 = this;
_local1.myColor = new Color(_local1);
_local1.newColor = {ra:0, rb:0, ga:0, gb:0, ba:0, bb:0};
_local1.myColor.setTransform(_local1.newColor);
_local1.fChangeColor = function () {
var _local1 = this;
if (_local1.newColor.ra < 100) {
_local1.newColor.ga = (_local1.newColor.ra = (_local1.newColor.ba = _local1.newColor.ba + (((_global.speed * 5) / 100) - 0.25)));
_local1.myColor.setTransform(_local1.newColor);
} else {
_local1.myColor.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
_local1.fChangeColor = function () {
return(undefined);
};
}
};
});
_local3.mcArch.fSetColor();
};
fPlayerHit = function (damage) {
var _local1 = _global;
var _local2 = this;
var _local3 = _parent;
if ((_local3.mcChar.char._currentframe != 3) && (_local3.mcChar.char._currentframe != 6)) {
if ((_local1.energy + damage) >= 100) {
_local1.energy = 100;
_local3.mcInterface.energyBar.onEnterFrame = function () {
if (_global.freeze == false) {
if (this.energy._currentframe < _global.energy) {
this.energy.nextFrame();
}
}
};
_local1.lives--;
_local3.mcInterface.nbLife--;
if (_local1.lives == 0) {
_root.gotoAndStop("lose");
}
_local2._parent.mcChar.char.gotoAndStop("Death");
} else {
_local1.energy = _local1.energy + damage;
_local3.mcInterface.energyBar.onEnterFrame = function () {
if (_global.freeze == false) {
if (this.energy._currentframe < _global.energy) {
this.energy.nextFrame();
}
}
};
_local2._parent.mcChar.char.gotoAndStop("Hurt");
}
}
};
fShoot = function (x, y) {
var _local1 = this;
var _local2 = _global;
var _local3 = _parent;
_local2.ballDepth++;
magic = _local3.attachMovie("projectile", "projectile" + _local2.ballDepth, _local2.ballDepth);
magic.gotoAndStop(_local2.level);
if (_root._ymouse < (_local3.mcChar._y - 170)) {
magic.destX = ((_root._xmouse - 290) / 2) - (((_local3.mcChar._x + x) - 290) / 4);
magic.destX = magic.destX * 2;
magic.destY = _root._ymouse - 78;
} else {
magic.destX = ((_local3.mcChar._x + x) - 290) / 4;
magic.destY = 70;
}
magic.o3Dpoints = make3DPoint((_local3.mcChar._x + x) - 290, 100 + y, 0, magic);
mapMatrix(magic.o3Dpoints);
if (Math.abs(magic.destX) > Math.abs(magic.destY - 8.5)) {
magic.compare = magic.destX;
} else {
magic.compare = magic.destY;
}
magic.distance = 0;
magic.maxDist = 40 - Math.abs(magic.compare);
if (magic.maxDist < 6) {
magic.maxDist = 6;
}
magic.onEnterFrame = function () {
var _local1 = this;
if (_global.freeze == false) {
temp = _local1.o3Dpoints.z;
_local1.o3Dpoints.z = _local1.o3Dpoints.z + 301;
if (_local1.o3Dpoints.z < (temp + 100)) {
_local1.o3Dpoints.z = temp + 100;
}
_local1.o3Dpoints.x = _local1.o3Dpoints.x + _local1.destX;
_local1.o3Dpoints.y = _local1.o3Dpoints.y + _local1.destY;
_local1.distance++;
_local1._name = "projectile" + Math.floor(_local1.o3Dpoints.z / 1000);
_global.sCont.mapMatrix(_local1.o3Dpoints);
if (_local1.distance >= _local1.maxDist) {
delete _local1.onEnterFrame;
_local1.swapDepths(1001);
if (_local1.hitTest(_root.mcGame.hitCorridor)) {
_local1.removeMovieClip();
} else {
_local1.anim.gotoAndPlay("explode");
}
}
}
};
};
_global.keyListener.onKeyDown = function () {
var _local1 = _global;
_local1.cheat = _local1.cheat + chr(Key.getCode());
if (_local1.cheat == "WITCH") {
_local1.score = _root.score;
Key.removeListener(_local1.sCont.keyListener);
Key.removeListener(_local1.sCont.keyListener2);
_root.gotoAndStop("BossScreen");
} else {
Key.removeListener(_local1.keyListener);
Key.addListener(_local1.keyListener2);
}
};
_global.keyListener2.onKeyUp = function () {
Key.addListener(_global.keyListener);
Key.removeListener(_global.keyListener2);
};
fStart = function () {
var _local1 = _parent;
fSetLevel(_global.level);
_local1.mcArch._visible = true;
_local1.mcArch2._visible = true;
fDecor();
changeLevel();
_local1.mcInterface.distance.gotoAndStop(1);
setEnemyInterval(2000, _global.gameNumber);
};
fStart();
fDeath = function () {
_global.freeze = true;
_root.gotoAndStop("outOfTime");
};
this.onMouseDown = function () {
var _local1 = _parent;
if (_global.shoot == true) {
if (!_global.freeze) {
if (_local1.mcChar.char._currentframe == 1) {
if (_root._xmouse <= _local1.mcChar._x) {
_local1.mcChar.char.gotoAndStop("AttackLeft");
} else {
_local1.mcChar.char.gotoAndStop("AttackRight");
}
} else if (_local1.mcChar.char._currentframe == 2) {
if (_root._xmouse <= _local1.mcChar._x) {
_local1.mcChar.char.gotoAndStop("AttackUpLeft");
} else {
_local1.mcChar.char.gotoAndStop("AttackUpRight");
}
}
}
}
};
setEnemyInterval = function (interval, gameNumber) {
var _local1 = _global;
_local1.enemyIntervalDone = false;
_local1.enemyIntervalCount = 0;
_local1.enemyInterval = Math.round(interval / 1000);
_local1.gameNumber = gameNumber;
};
Symbol 979 MovieClip Frame 3
fMove();
timer++;
if (timer >= 120) {
timer = 0;
_global.cheat = "";
}
if (_global.patchRestart) {
delete _global.patchRestart;
_global.sCont.setEnemyInterval(2000, _global.gameNumber);
}
Symbol 979 MovieClip Frame 4
call(3);
Symbol 979 MovieClip Frame 5
gotoAndPlay (4);
Symbol 983 MovieClip Frame 1
stop();
Symbol 983 MovieClip Frame 2
_global.PlaySound("enemyExplode", 1);
Symbol 994 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
gotoAndStop ("instr2");
}
Symbol 1015 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
trace(_global.inGame);
if (_global.inGame != true) {
gotoAndStop ("instr3");
} else {
_global.freeze = false;
_global.allSounds.setVolume(100);
_global.inGame = true;
_parent.gotoAndStop("play");
}
}
Symbol 1018 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
gotoAndStop ("instr1");
}
Symbol 1024 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
_global.freeze = false;
_global.allSounds.setVolume(100);
if (_global.inGame != true) {
trace("Le jeu est pas d\u00E9ja commenc\u00E9");
_root.mcGame.mcInterface.chrono.startTime = getTimer() - _root.mcGame.mcInterface.chrono.elapsed;
}
_global.inGame = true;
_parent.gotoAndStop("play");
}
Symbol 1028 MovieClip Frame 1
stop();
Symbol 1034 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
gotoAndStop ("quit");
}
Symbol 1035 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
gotoAndStop ("instr");
}
Symbol 1038 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.allSounds.setVolume(100);
_global.PlaySound("btnClick", 1);
_root.mcGame.mcCont.gameUnpause();
_root.gotoAndStop("play");
}
Symbol 1039 Button
on (rollOver) {
this.useHandCursor = false;
}
Symbol 1043 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
gotoAndStop ("menu");
}
Symbol 1046 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
_global.allSounds.setVolume(100);
_global.musicIsPlaying = false;
stopAllSounds();
gotoAndStop ("lose");
}
Symbol 1051 MovieClip Frame 66
_global.freeze = false;
_parent.gotoAndStop("resetTimeOut");
stop();
Symbol 1060 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
_global.level++;
_global.freeze = false;
_global.timeStop = false;
_root.mcGame.mcCont.gotoAndPlay(1);
_root.mcGame.mcInterface.chrono.startTime = getTimer() - _root.mcGame.mcInterface.chrono.elapsed;
play();
}
Symbol 1082 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
_global.level = "boss";
_global.timeStop = false;
Key.removeListener(_global.sCont.keyListener);
Key.removeListener(_global.sCont.keyListener2);
_global.freeze = false;
_global.score = _root.score;
gotoAndStop ("bossScreen");
}
Symbol 1100 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.patchRestart = true;
_global.PlaySound("btnClick", 1);
gotoAndStop ("titlecard");
}
Symbol 1103 Button
on (rollOver) {
_global.PlaySound("btnRoll", 1);
}
on (release) {
_global.PlaySound("btnClick", 1);
gotoAndStop ("score");
}