home *** CD-ROM | disk | FTP | other *** search
- function fNoise(which)
- {
- var _loc1_ = which;
- if(pOn == true)
- {
- if(_loc1_ == "scroll")
- {
- sScroll.start();
- }
- else if(_loc1_ == "click")
- {
- sClick.start();
- }
- else if(_loc1_ == "click2")
- {
- sClick2.start();
- }
- }
- }
- function fsExplode()
- {
- if(pOn == true)
- {
- var _loc1_ = random(50) + 50;
- sEarthLand.setVolume(_loc1_);
- sEarthLand.start();
- }
- }
- function fsHitEnemy()
- {
- if(pOn == true)
- {
- sExplode.start();
- sOnFire.start();
- }
- }
- function fOil()
- {
- if(pOn == true)
- {
- sHiss.setVolume(100);
- sHiss.start();
- sHinge.setVolume(50);
- sHinge.start();
- }
- }
- function fsOilBurn()
- {
- if(pOn == true)
- {
- sOnFire.start();
- }
- }
- function fEnemyAttack()
- {
- if(pOn == true)
- {
- sHinge.setVolume(80);
- sHinge.start();
- }
- }
- function fsLaunch()
- {
- if(pOn == true)
- {
- sHiss.setVolume(random(70) + 30);
- sHiss.start();
- sLaunch.setVolume(random(30) + 70);
- sLaunch.start();
- sReload.setVolume(random(50) + 50);
- sReload.start();
- }
- }
- function fsCastleBlow()
- {
- if(pOn == true)
- {
- sCastleBlow.start();
- }
- }
- function sWinMusic()
- {
- if(pOn == true)
- {
- sDrums.stop();
- sLoop.stop();
- sLose.stop();
- sWin.stop();
- sWin.start();
- }
- }
- function sLoseMusic()
- {
- if(pOn == true)
- {
- sDrums.stop();
- sLoop.stop();
- sLose.stop();
- sWin.stop();
- sLose.start();
- }
- }
- function sMusic()
- {
- if(pOn == true)
- {
- sDrums.stop();
- sLoop.stop();
- sLose.stop();
- sWin.stop();
- sLoop.setVolume(100);
- sLoop.start();
- sLoop.onSoundComplete = function()
- {
- sLoop.start();
- };
- }
- }
- function sDrumsMusic()
- {
- if(pOn == true)
- {
- sLoop.stop();
- sLose.stop();
- sWin.stop();
- sLoop.stop();
- sDrums.start();
- sDrums.onSoundComplete = function()
- {
- sDrums.start();
- };
- }
- }
- function sStopMusic()
- {
- if(pOn == true)
- {
- sLoop.stop();
- sLose.stop();
- sWin.stop();
- sLoop.stop();
- sDrums.stop();
- }
- }
- function fMainSoundSwitch(which)
- {
- var _loc1_ = _root;
- if(which == "on")
- {
- pOn = true;
- if(_loc1_.pSection == "menu")
- {
- sMusic();
- }
- else if(_loc1_.pSection != "game")
- {
- if(_loc1_.pSection == "ready")
- {
- sDrumsMusic();
- }
- }
- }
- else
- {
- sStopMusic();
- pOn = false;
- }
- }
- this.createEmptyMovieClip("insCastleBlow",1);
- var sCastleBlow = new Sound(this.insCastleBlow);
- sCastleBlow.attachSound("sCastleBlow.wav");
- sCastleBlow.setVolume(100);
- this.createEmptyMovieClip("insEarthLand",2);
- var sEarthLand = new Sound(this.insEarthLand);
- sEarthLand.attachSound("sEarthLand.wav");
- sEarthLand.setVolume(100);
- this.createEmptyMovieClip("insExplode",12);
- var sExplode = new Sound(this.insExplode);
- sExplode.attachSound("sExplode.wav");
- sExplode.setVolume(100);
- this.createEmptyMovieClip("insFireBall",3);
- var sFireBall = new Sound(this.insFireBall);
- sFireBall.attachSound("sFireBall.wav");
- sFireBall.setVolume(100);
- this.createEmptyMovieClip("insHorses",4);
- var sHorses = new Sound(this.insHorses);
- sHorses.attachSound("sHorses.wav");
- sHorses.setVolume(100);
- this.createEmptyMovieClip("insLaunch",5);
- var sLaunch = new Sound(this.insLaunch);
- sLaunch.attachSound("sLaunch.wav");
- sLaunch.setVolume(100);
- this.createEmptyMovieClip("insMarching",6);
- var sMarching = new Sound(this.insMarching);
- sMarching.attachSound("sMarching.wav");
- sMarching.setVolume(100);
- this.createEmptyMovieClip("insOnFire",7);
- var sOnFire = new Sound(this.insOnFire);
- sOnFire.attachSound("sOnFire.wav");
- sOnFire.setVolume(100);
- this.createEmptyMovieClip("insReload",8);
- var sReload = new Sound(this.insReload);
- sReload.attachSound("sReload.wav");
- sReload.setVolume(100);
- this.createEmptyMovieClip("insHiss",9);
- var sHiss = new Sound(this.insHiss);
- sHiss.attachSound("sHiss.wav");
- sHiss.setVolume(100);
- this.createEmptyMovieClip("insLoop",13);
- var sLoop = new Sound(this.insLoop);
- sLoop.attachSound("sLoop.wav");
- sLoop.setVolume(100);
- this.createEmptyMovieClip("inssWin",14);
- var sWin = new Sound(this.inssWin);
- sWin.attachSound("sWin.wav");
- sWin.setVolume(100);
- this.createEmptyMovieClip("insLose",15);
- var sLose = new Sound(this.insLose);
- sLose.attachSound("sLose.wav");
- sLose.setVolume(100);
- this.createEmptyMovieClip("insDrums",16);
- var sDrums = new Sound(this.insDrums);
- sDrums.attachSound("sDrums.wav");
- sDrums.setVolume(100);
- this.createEmptyMovieClip("insClick",17);
- var sClick = new Sound(this.insClick);
- sClick.attachSound("sClick.wav");
- sClick.setVolume(100);
- this.createEmptyMovieClip("insClick2",18);
- var sClick2 = new Sound(this.insClick2);
- sClick2.attachSound("sClick2.wav");
- sClick2.setVolume(100);
- this.createEmptyMovieClip("insScroll",19);
- var sScroll = new Sound(this.insScroll);
- sScroll.attachSound("sScroll.wav");
- sScroll.setVolume(100);
- this.createEmptyMovieClip("insHinge",20);
- var sHinge = new Sound(this.insHinge);
- sHinge.attachSound("sHinge.wav");
- sHinge.setVolume(100);
- pOn = true;
- stop();
-