home *** CD-ROM | disk | FTP | other *** search
- function playSound()
- {
- effect1.start();
- }
- function playWind()
- {
- effect2.start();
- }
- function cheer()
- {
- effect3.start();
- }
- function bells()
- {
- effect4.start();
- }
- function swish()
- {
- effect5.setPan(0);
- effect5.start();
- }
- function swishLeft()
- {
- effect5.setPan(-50);
- effect5.start();
- }
- function swishRight()
- {
- effect5.setPan(50);
- effect5.start();
- }
- function pause()
- {
- main.translated_x = 0;
- main.translated_z = 0;
- main.keyControl.playing = false;
- main.keyControl.translateIncr = 0;
- main.keyControl.translateIncrFast = 0;
- main.keyControl.straffeIncr = 0;
- main.keyControl.straffeSlow = 0;
- main.keyControl.straffeFast = 0;
- }
- function disqualify(flagNum)
- {
- miss.miss = miss.miss + 1;
- playSound();
- if(miss.miss >= 3)
- {
- pause();
- bells();
- disqualified.gotoAndPlay(2);
- }
- }
- function levelComplete()
- {
- pause();
- cheer();
- if(stage < 5)
- {
- gameOver.gotoAndPlay(2);
- }
- else
- {
- endGame.gotoAndPlay(2);
- }
- }
- function outOfTime()
- {
- pause();
- playSound();
- bells();
- timeOut.gotoAndPlay(2);
- }
- function reStart()
- {
- cheer();
- bells();
- stageNumber.gotoAndPlay(1);
- timeOut.gotoAndStop(1);
- gameOver.gotoAndStop(1);
- disqualified.gotoAndStop(1);
- cover.gotoAndStop(1);
- mountains.reset();
- ground.reset();
- miss.miss = 0;
- gotoAndPlay(5);
- }
- function nextStage()
- {
- stage++;
- stageNumber.nextFrame();
- stageNumber.play();
- cheer();
- bells();
- timeOut.gotoAndStop(1);
- gameOver.gotoAndStop(1);
- disqualified.gotoAndStop(1);
- cover.gotoAndStop(1);
- mountains.reset();
- ground.reset();
- if(stage == 2)
- {
- mountains.gotoAndStop(2);
- ground._y = 184;
- }
- else if(stage == 3)
- {
- mountains.gotoAndStop(3);
- ground.gotoAndStop(2);
- ground._y = 184;
- }
- else if(stage == 4)
- {
- mountains.gotoAndStop(4);
- ground.gotoAndStop(3);
- cover.gotoAndStop(2);
- }
- else if(stage == 5)
- {
- mountains.gotoAndStop(5);
- ground.gotoAndStop(1);
- cover.gotoAndStop(3);
- }
- miss.miss = 0;
- gotoAndPlay(6);
- }
- _quality = "low";
- effect1 = new Sound("gameSound1");
- effect1.attachSound("missSound");
- effect2 = new Sound("gameSound2");
- effect2.attachSound("wind");
- effect3 = new Sound("gameSound3");
- effect3.attachSound("cheer");
- effect4 = new Sound("gameSound4");
- effect4.attachSound("cowbells");
- effect5 = new Sound("gameSound5");
- effect5.attachSound("swish");
- stage = 1;
- score = 0;
- cheer();
- bells();
-