Section 1
//Cybershark_167 (Doom2D_fla.Cybershark_167)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Cybershark_167 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Cybershark_167(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 2
//Dark_Odyssey_169 (Doom2D_fla.Dark_Odyssey_169)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Dark_Odyssey_169 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Dark_Odyssey_169(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 3
//Doomguy_154 (Doom2D_fla.Doomguy_154)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Doomguy_154 extends MovieClip {
public var hahaha:Sound;
public var hahahaChannel:SoundChannel;
public function Doomguy_154(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
hahaha = new Hahaha();
hahahaChannel = hahaha.play();
hahahaChannel.addEventListener(Event.SOUND_COMPLETE, hahahaChannelHandler);
}
public function hahahaChannelHandler(_arg1:Event):void{
hahahaChannel = null;
}
}
}//package Doom2D_fla
Section 4
//EndScene_171 (Doom2D_fla.EndScene_171)
package Doom2D_fla {
import flash.display.*;
public dynamic class EndScene_171 extends MovieClip {
public function EndScene_171(){
addFrameScript(1596, frame1597);
}
function frame1597(){
stop();
}
}
}//package Doom2D_fla
Section 5
//Error_161 (Doom2D_fla.Error_161)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Error_161 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Error_161(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 6
//HUD_71 (Doom2D_fla.HUD_71)
package Doom2D_fla {
import flash.display.*;
public dynamic class HUD_71 extends MovieClip {
public var yellowkey_HUD:YellowKeyHUD;
public var shotgun_HUD:Shotgun;
public var pistol_HUD:Pistol;
public var bfg_HUD:BFG;
public var bluekey_HUD:BlueKeyHUD;
public var plasma_HUD:Plasmagun;
public var RL_HUD:RocketLauncher;
public var chaingun_HUD:Chaingun;
public var fist_HUD:MovieClip;
public var redkey_HUD:RedKeyHUD;
public var chainsaw_HUD:Chainsaw;
}
}//package Doom2D_fla
Section 7
//Hurrican_157 (Doom2D_fla.Hurrican_157)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Hurrican_157 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Hurrican_157(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 8
//Kilgore_163 (Doom2D_fla.Kilgore_163)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Kilgore_163 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Kilgore_163(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 9
//KnarrenheinzSecret_165 (Doom2D_fla.KnarrenheinzSecret_165)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class KnarrenheinzSecret_165 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function KnarrenheinzSecret_165(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 10
//ManoLO666_141 (Doom2D_fla.ManoLO666_141)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class ManoLO666_141 extends MovieClip {
public var hahaha:Sound;
public var hahahaChannel:SoundChannel;
public function ManoLO666_141(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
hahaha = new Hahaha();
hahahaChannel = hahaha.play();
hahahaChannel.addEventListener(Event.SOUND_COMPLETE, hahahaChannelHandler);
}
public function hahahaChannelHandler(_arg1:Event):void{
hahahaChannel = null;
}
}
}//package Doom2D_fla
Section 11
//map01_47 (Doom2D_fla.map01_47)
package Doom2D_fla {
import flash.display.*;
public dynamic class map01_47 extends MovieClip {
public var enemy10:ShotgunGuy;
public var enemy11:Imp;
public var enemy12:Pinky;
public var enemy4:ShotgunGuy;
public var enemy5:Imp;
public var enemy7:ZombieMan;
public var enemy1:ZombieMan;
public var enemy9:Pinky;
public var enemy6:Imp;
public var enemy8:ZombieMan;
public var enemy13:Pinky;
public var enemy3:ZombieMan;
public var enemy14:Cacodemon;
public var enemy2:ZombieMan;
public var player:Player;
}
}//package Doom2D_fla
Section 12
//map02_83 (Doom2D_fla.map02_83)
package Doom2D_fla {
import flash.display.*;
public dynamic class map02_83 extends MovieClip {
public var enemy10:Cacodemon;
public var enemy11:ZombieMan;
public var enemy12:ZombieMan;
public var enemy15:Imp;
public var enemy16:ShotgunGuy;
public var enemy18:Cacodemon;
public var enemy1:Pinky;
public var enemy9:Pinky;
public var enemy4:Imp;
public var enemy17:Imp;
public var enemy19:Imp;
public var enemy14:Imp;
public var enemy6:ShotgunGuy;
public var enemy7:ZombieMan;
public var enemy3:Imp;
public var enemy5:ZombieMan;
public var enemy13:ShotgunGuy;
public var enemy20:ShotgunGuy;
public var enemy21:ZombieMan;
public var enemy8:Pinky;
public var enemy2:ShotgunGuy;
public var player:Player;
public var knarrenheinz:Knarrenheinz;
}
}//package Doom2D_fla
Section 13
//map03_96 (Doom2D_fla.map03_96)
package Doom2D_fla {
import flash.display.*;
public dynamic class map03_96 extends MovieClip {
public var enemy10:LostSoul;
public var enemy11:ShotgunGuy;
public var enemy12:ZombieMan;
public var enemy4:Imp;
public var enemy16:LostSoul;
public var enemy18:LostSoul;
public var enemy1:Imp;
public var enemy9:LostSoul;
public var enemy15:Pinky;
public var enemy6:Cacodemon;
public var enemy19:Cacodemon;
public var enemy14:ShotgunGuy;
public var enemy17:LostSoul;
public var enemy7:ZombieMan;
public var enemy3:Cacodemon;
public var enemy5:Pinky;
public var enemy23:LostSoul;
public var enemy13:Baron;
public var enemy20:Cacodemon;
public var enemy21:LostSoul;
public var enemy22:LostSoul;
public var enemy8:ShotgunGuy;
public var enemy2:Imp;
public var player:Player;
}
}//package Doom2D_fla
Section 14
//map04_111 (Doom2D_fla.map04_111)
package Doom2D_fla {
import flash.display.*;
public dynamic class map04_111 extends MovieClip {
public var enemy10:Cacodemon;
public var enemy11:Imp;
public var enemy12:Pinky;
public var enemy15:Pinky;
public var enemy16:ShotgunGuy;
public var enemy18:Imp;
public var enemy1:ZombieMan;
public var enemy9:Imp;
public var enemy4:Pinky;
public var enemy17:ShotgunGuy;
public var enemy19:ZombieMan;
public var enemy14:Imp;
public var enemy6:LostSoul;
public var enemy7:Cacodemon;
public var enemy3:Pinky;
public var enemy5:LostSoul;
public var enemy13:LostSoul;
public var enemy20:Baron;
public var enemy21:Cacodemon;
public var enemy22:Baron;
public var enemy8:Baron;
public var enemy2:ZombieMan;
public var player:Player;
}
}//package Doom2D_fla
Section 15
//map05_117 (Doom2D_fla.map05_117)
package Doom2D_fla {
import flash.display.*;
public dynamic class map05_117 extends MovieClip {
public var enemy10:LostSoul;
public var enemy11:Cacodemon;
public var enemy12:LostSoul;
public var enemy15:Imp;
public var enemy16:Pinky;
public var enemy18:Cacodemon;
public var enemy1:Baron;
public var enemy9:Imp;
public var enemy4:Pinky;
public var enemy17:Pinky;
public var enemy19:Baron;
public var enemy14:ZombieMan;
public var enemy6:Imp;
public var enemy7:LostSoul;
public var enemy3:ShotgunGuy;
public var enemy5:Cyberdemon;
public var enemy23:Imp;
public var enemy24:Cacodemon;
public var enemy13:Pinky;
public var enemy20:LostSoul;
public var enemy21:LostSoul;
public var enemy22:Pinky;
public var krawall:Krawall;
public var enemy25:Cacodemon;
public var enemy2:Baron;
public var enemy8:LostSoul;
public var player:Player;
}
}//package Doom2D_fla
Section 16
//map06_133 (Doom2D_fla.map06_133)
package Doom2D_fla {
import flash.display.*;
public dynamic class map06_133 extends MovieClip {
public var enemy10:LostSoul;
public var enemy11:Cacodemon;
public var enemy12:Baron;
public var enemy15:Baron;
public var enemy16:Pinky;
public var enemy18:Cacodemon;
public var enemy1:Pinky;
public var enemy9:LostSoul;
public var enemy4:Imp;
public var enemy17:Pinky;
public var enemy19:Cacodemon;
public var enemy14:Cyberdemon;
public var enemy6:Imp;
public var enemy7:Cyberdemon;
public var enemy5:ShotgunGuy;
public var enemy23:ZombieMan;
public var enemy24:Imp;
public var enemy13:Baron;
public var enemy20:LostSoul;
public var enemy21:LostSoul;
public var enemy22:ShotgunGuy;
public var enemy25:Imp;
public var enemy2:Pinky;
public var enemy8:LostSoul;
public var manolo666:MovieClip;
public var player:Player;
public var enemy3:Cacodemon;
}
}//package Doom2D_fla
Section 17
//map07_147 (Doom2D_fla.map07_147)
package Doom2D_fla {
import flash.display.*;
public dynamic class map07_147 extends MovieClip {
public var enemy10:Imp;
public var enemy11:Cacodemon;
public var enemy12:Baron;
public var enemy4:Cacodemon;
public var enemy16:Pinky;
public var enemy18:Pinky;
public var enemy1:Cacodemon;
public var enemy9:Pinky;
public var enemy15:Pinky;
public var enemy17:Pinky;
public var enemy8:Cyberdemon;
public var enemy13:ShotgunGuy;
public var enemy14:Cacodemon;
public var enemy6:Imp;
public var enemy7:Baron;
public var enemy3:Cacodemon;
public var enemy5:Cacodemon;
public var enemy2:ShotgunGuy;
public var player:Player;
}
}//package Doom2D_fla
Section 18
//map08_148 (Doom2D_fla.map08_148)
package Doom2D_fla {
import flash.display.*;
public dynamic class map08_148 extends MovieClip {
public var romero:MovieClip;
public var enemy10:LostSoul;
public var enemy11:LostSoul;
public var enemy12:LostSoul;
public var enemy15:LostSoul;
public var enemy16:LostSoul;
public var enemy18:LostSoul;
public var enemy1:Mastermind;
public var enemy9:LostSoul;
public var enemy4:Imp;
public var enemy17:LostSoul;
public var enemy19:LostSoul;
public var enemy3:LostSoul;
public var enemy6:Cacodemon;
public var enemy7:Cacodemon;
public var enemy14:LostSoul;
public var enemy5:Imp;
public var enemy13:LostSoul;
public var enemy20:LostSoul;
public var enemy21:LostSoul;
public var enemy8:LostSoul;
public var enemy2:Cacodemon;
public var player:Player;
}
}//package Doom2D_fla
Section 19
//Nero_159 (Doom2D_fla.Nero_159)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Nero_159 extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Nero_159(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package Doom2D_fla
Section 20
//Romero_149 (Doom2D_fla.Romero_149)
package Doom2D_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Romero_149 extends MovieClip {
public var hahaha:Sound;
public var hahahaChannel:SoundChannel;
public function Romero_149(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
hahaha = new Hahaha();
hahahaChannel = hahaha.play();
hahahaChannel.addEventListener(Event.SOUND_COMPLETE, hahahaChannelHandler);
}
public function hahahaChannelHandler(_arg1:Event):void{
hahahaChannel = null;
}
}
}//package Doom2D_fla
Section 21
//secretHint_172 (Doom2D_fla.secretHint_172)
package Doom2D_fla {
import flash.display.*;
public dynamic class secretHint_172 extends MovieClip {
public function secretHint_172(){
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package Doom2D_fla
Section 22
//secretMap_153 (Doom2D_fla.secretMap_153)
package Doom2D_fla {
import flash.display.*;
public dynamic class secretMap_153 extends MovieClip {
public var knarrenheinzSecret:MovieClip;
public var doomguy:MovieClip;
public var cybershark:MovieClip;
public var nero:MovieClip;
public var errorXXX:MovieClip;
public var hurrican:MovieClip;
public var dark_odyssey:MovieClip;
public var enemy1:ZombieMan;
public var player:Player;
public var kilgore:MovieClip;
}
}//package Doom2D_fla
Section 23
//SkullHUD_129 (Doom2D_fla.SkullHUD_129)
package Doom2D_fla {
import flash.display.*;
public dynamic class SkullHUD_129 extends MovieClip {
public var yellowkey_HUD:YellowSkullHUD;
public var shotgun_HUD:Shotgun;
public var pistol_HUD:Pistol;
public var bfg_HUD:BFG;
public var bluekey_HUD:BlueSkullHUD;
public var plasma_HUD:Plasmagun;
public var RL_HUD:RocketLauncher;
public var chaingun_HUD:Chaingun;
public var fist_HUD:MovieClip;
public var redkey_HUD:MovieClip;
public var chainsaw_HUD:Chainsaw;
}
}//package Doom2D_fla
Section 24
//TheEnd_173 (Doom2D_fla.TheEnd_173)
package Doom2D_fla {
import flash.display.*;
public dynamic class TheEnd_173 extends MovieClip {
public function TheEnd_173(){
addFrameScript(80, frame81);
}
function frame81(){
stop();
}
}
}//package Doom2D_fla
Section 25
//About (About)
package {
import flash.display.*;
public dynamic class About extends SimpleButton {
}
}//package
Section 26
//About_text (About_text)
package {
import flash.display.*;
public dynamic class About_text extends MovieClip {
}
}//package
Section 27
//Ammobox (Ammobox)
package {
import flash.display.*;
public dynamic class Ammobox extends MovieClip {
}
}//package
Section 28
//Ammoclip (Ammoclip)
package {
import flash.display.*;
public dynamic class Ammoclip extends MovieClip {
}
}//package
Section 29
//AutoswitchButton (AutoswitchButton)
package {
import flash.display.*;
public dynamic class AutoswitchButton extends MovieClip {
public function AutoswitchButton(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 30
//Back (Back)
package {
import flash.display.*;
public dynamic class Back extends SimpleButton {
}
}//package
Section 31
//Backpack (Backpack)
package {
import flash.display.*;
public dynamic class Backpack extends MovieClip {
}
}//package
Section 32
//Baron (Baron)
package {
import flash.display.*;
public dynamic class Baron extends MovieClip {
public function Baron(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 33
//BaronDeath (BaronDeath)
package {
import flash.media.*;
public dynamic class BaronDeath extends Sound {
}
}//package
Section 34
//BaronPuff (BaronPuff)
package {
import flash.display.*;
public dynamic class BaronPuff extends MovieClip {
public function BaronPuff(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 35
//BaronShot (BaronShot)
package {
import flash.display.*;
public dynamic class BaronShot extends MovieClip {
}
}//package
Section 36
//BaronSpot (BaronSpot)
package {
import flash.media.*;
public dynamic class BaronSpot extends Sound {
}
}//package
Section 37
//Berserk (Berserk)
package {
import flash.display.*;
public dynamic class Berserk extends MovieClip {
}
}//package
Section 38
//BerserkAlpha (BerserkAlpha)
package {
import flash.display.*;
public dynamic class BerserkAlpha extends MovieClip {
}
}//package
Section 39
//BFG (BFG)
package {
import flash.display.*;
public dynamic class BFG extends MovieClip {
}
}//package
Section 40
//BfgExplode (BfgExplode)
package {
import flash.media.*;
public dynamic class BfgExplode extends Sound {
}
}//package
Section 41
//BfgPuff (BfgPuff)
package {
import flash.display.*;
public dynamic class BfgPuff extends MovieClip {
public function BfgPuff(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 42
//BfgPuff2 (BfgPuff2)
package {
import flash.display.*;
public dynamic class BfgPuff2 extends MovieClip {
}
}//package
Section 43
//BfgPuffOnEnemy (BfgPuffOnEnemy)
package {
import flash.display.*;
public dynamic class BfgPuffOnEnemy extends MovieClip {
public function BfgPuffOnEnemy(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 44
//BFGShot (BFGShot)
package {
import flash.display.*;
public dynamic class BFGShot extends MovieClip {
}
}//package
Section 45
//BfgSound (BfgSound)
package {
import flash.media.*;
public dynamic class BfgSound extends Sound {
}
}//package
Section 46
//Biosuit (Biosuit)
package {
import flash.display.*;
public dynamic class Biosuit extends MovieClip {
}
}//package
Section 47
//BiosuitAlpha (BiosuitAlpha)
package {
import flash.display.*;
public dynamic class BiosuitAlpha extends MovieClip {
}
}//package
Section 48
//Blood (Blood)
package {
import flash.display.*;
public dynamic class Blood extends MovieClip {
public function Blood(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package
Section 49
//BlueArmor (BlueArmor)
package {
import flash.display.*;
public dynamic class BlueArmor extends MovieClip {
}
}//package
Section 50
//bluedoor2 (bluedoor2)
package {
import flash.display.*;
public dynamic class bluedoor2 extends MovieClip {
}
}//package
Section 51
//BlueKey (BlueKey)
package {
import flash.display.*;
public dynamic class BlueKey extends MovieClip {
}
}//package
Section 52
//BlueKeyHUD (BlueKeyHUD)
package {
import flash.display.*;
public dynamic class BlueKeyHUD extends MovieClip {
}
}//package
Section 53
//bluelhdoor (bluelhdoor)
package {
import flash.display.*;
public dynamic class bluelhdoor extends MovieClip {
}
}//package
Section 54
//BlueSkull (BlueSkull)
package {
import flash.display.*;
public dynamic class BlueSkull extends MovieClip {
}
}//package
Section 55
//BlueSkullHUD (BlueSkullHUD)
package {
import flash.display.*;
public dynamic class BlueSkullHUD extends MovieClip {
}
}//package
Section 56
//BonusArmor (BonusArmor)
package {
import flash.display.*;
public dynamic class BonusArmor extends MovieClip {
}
}//package
Section 57
//BonusHealth (BonusHealth)
package {
import flash.display.*;
public dynamic class BonusHealth extends MovieClip {
}
}//package
Section 58
//Bullet (Bullet)
package {
import flash.media.*;
public dynamic class Bullet extends Sound {
}
}//package
Section 59
//CacoBall (CacoBall)
package {
import flash.display.*;
public dynamic class CacoBall extends MovieClip {
}
}//package
Section 60
//CacoDeath (CacoDeath)
package {
import flash.media.*;
public dynamic class CacoDeath extends Sound {
}
}//package
Section 61
//Cacodemon (Cacodemon)
package {
import flash.display.*;
public dynamic class Cacodemon extends MovieClip {
public function Cacodemon(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 62
//CacoPuff (CacoPuff)
package {
import flash.display.*;
public dynamic class CacoPuff extends MovieClip {
public function CacoPuff(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 63
//CacoSpot (CacoSpot)
package {
import flash.media.*;
public dynamic class CacoSpot extends Sound {
}
}//package
Section 64
//CellBox (CellBox)
package {
import flash.display.*;
public dynamic class CellBox extends MovieClip {
}
}//package
Section 65
//Cells (Cells)
package {
import flash.display.*;
public dynamic class Cells extends MovieClip {
}
}//package
Section 66
//Chaingun (Chaingun)
package {
import flash.display.*;
public dynamic class Chaingun extends MovieClip {
}
}//package
Section 67
//Chainsaw (Chainsaw)
package {
import flash.display.*;
public dynamic class Chainsaw extends MovieClip {
}
}//package
Section 68
//Control_pic (Control_pic)
package {
import flash.display.*;
public dynamic class Control_pic extends MovieClip {
}
}//package
Section 69
//Controls (Controls)
package {
import flash.display.*;
public dynamic class Controls extends SimpleButton {
}
}//package
Section 70
//Ctrl_text (Ctrl_text)
package {
import flash.display.*;
public dynamic class Ctrl_text extends MovieClip {
public var ctrl_pic:Control_pic;
public function Ctrl_text(){
addFrameScript(0, frame1);
}
function frame1(){
ctrl_pic.alpha = 1;
ctrl_pic.mouseEnabled = false;
}
}
}//package
Section 71
//Cyberdemon (Cyberdemon)
package {
import flash.display.*;
public dynamic class Cyberdemon extends MovieClip {
public function Cyberdemon(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 72
//CyberdemonDeath (CyberdemonDeath)
package {
import flash.media.*;
public dynamic class CyberdemonDeath extends Sound {
}
}//package
Section 73
//CyberdemonSpot (CyberdemonSpot)
package {
import flash.media.*;
public dynamic class CyberdemonSpot extends Sound {
}
}//package
Section 74
//CyberdemonWalk (CyberdemonWalk)
package {
import flash.media.*;
public dynamic class CyberdemonWalk extends Sound {
}
}//package
Section 75
//Deathpic (Deathpic)
package {
import flash.display.*;
public dynamic class Deathpic extends MovieClip {
}
}//package
Section 76
//DOOM_Titlepic (DOOM_Titlepic)
package {
import flash.display.*;
public dynamic class DOOM_Titlepic extends MovieClip {
}
}//package
Section 77
//Doom2D (Doom2D)
package {
import flash.events.*;
import flash.text.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
public class Doom2D extends MovieClip {
public var zombieChannel:SoundChannel;
public var menuMusic:Sound;
public var shotgun:Sound;
public var sawTake:Sound;
public var poof:Sound;
public var playerDeath:Sound;
public var poofChannel:SoundChannel;
private var biosuitTimer:Timer;
public var sawAttackChannel:SoundChannel;
private var currentMusic:Sound;
public var masterChannel:SoundChannel;
private var doomContextMenu:ContextMenu;
public var cacoChannel:SoundChannel;
public var playerHurtChannel:SoundChannel;
public var lostSoulAttack:Sound;
public var baronDeath:Sound;
public var playerHurtSound:Sound;
private var berserkAlpha:Sprite;
private var shells_txt:TextField;
public var ultraViolence_btn:UltraViolence;
private var cells_txt:TextField;
private var musicIsStopped:Boolean;// = false
public var veggies:Sound;
private var gameMode:String;// = "loader"
private var maxItems:int;// = 0
private var berserkScreenTimer:Timer;
private var playerKeepsInventory:Boolean;// = false
private var enemyBlockBoxes:Array;
private var berserkBlinkingTimer:Timer;
public var impShot:Sound;
public var zombieSpot1:Sound;
public var zombieSpot2:Sound;
public var zombieSpot3:Sound;
public var progressText:TextField;
public var start_btn:StartGame;
private var doomFormat:TextFormat;
public var bullet:Sound;
private var bullets_txt:TextField;
public var currentMap:MovieClip;
public var cyberSpot:Sound;
public var intermission:Sound;
public var masterDeath:Sound;
public var plasmaExplode:Sound;
public var plasma:Sound;
public var baronSpot:Sound;
public var Mute_mc:MuteButton;
public var pinkySpot:Sound;
public var cacoSpot:Sound;
public var Autoswitch_mc:AutoswitchButton;
private var doorObjects:Array;
public var cyberDeath:Sound;
public var pinkyChannel:SoundChannel;
public var cyberWalk:Sound;
public var lostSoulChannel:SoundChannel;
public var impAttackNearChannel:SoundChannel;
private var foundSecrets:int;// = 0
private var collectedItems:int;// = 0
public var HUD_mc:MovieClip;
private var playerLooksLeft:Boolean;// = false
public var zombieDeath1:Sound;
public var zombieDeath3:Sound;
public var endMusic:Sound;
public var zombieDeath2:Sound;
private var health_txt:TextField;
private var playerLastWeapon:String;
private var enemies:Array;
public var bfgSound:Sound;
private var pickup_txt:TextField;
private var doomContextMenuItem1:ContextMenuItem;
private var biosuitAlpha:Sprite;
private var berserkTimer:Timer;
private var rockets_txt:TextField;
public var masterWalk1:Sound;
public var masterWalk2:Sound;
private var playerDummy:Object;
public var cyberChannel:SoundChannel;
public var pinkyDeath:Sound;
public var fist:Sound;
private var lastTime:int;// = 0
public var masterSpot:Sound;
public var enemyChaingun:Sound;
public var ctrl_btn:Controls;
private var firstExamine:Boolean;// = true
public var heyNotTooRough_btn:Easy;
public var ctrl_txt:Ctrl_text;
public var about_btn:About;
public var secret:Sound;
private var secretExitFromSecretMap:Boolean;// = false
public var about_txt:About_text;
public var bfgExplode:Sound;
public var e1m1:Sound;
public var e1m2:Sound;
public var e1m3:Sound;
public var sawTakeChannel:SoundChannel;
public var e1m5:Sound;
public var e1m6:Sound;
public var e1m7:Sound;
public var e1m8:Sound;
private var player:Object;
public var sawIdleChannel:SoundChannel;
public var pinkyHit:Sound;
private var killedEnemies:int;// = 0
public var sawHit:Sound;
public var e1m4:Sound;
private var lastMap:Boolean;// = false
public var hurtMePlenty_btn:HurtMePlenty;
public var doorClose:Sound;
private var playerObjects:Array;
public var rlSound:Sound;
public var spopdChannel:SoundChannel;
private var fixedObjects:Array;
public var impSpot1:Sound;
public var back_btn:Back;
public var impSpot2:Sound;
public var introMusic:Sound;
private var allSecrets:int;// = 0
private var musicChannel:SoundChannel;
public var spopd:Sound;
public var doorOpen:Sound;
public var impDeath1:Sound;
public var impDeath2:Sound;
public var chooseSkill_txt:MovieClip;
public var introtxt_mc:introtxt;
private var pickup_txtTimerValue:Boolean;// = false
private var levelIsComplete:Boolean;// = false
public var itemGet:Sound;
public var superItemGet:Sound;
public var cacoDeath:Sound;
public var sawIdle:Sound;
public var rocketExplode:Sound;
private var armor_txt:TextField;
public var baronChannel:SoundChannel;
private var biosuitBlinkScreenTimer:Timer;
private var lastMusicPosition:Number;// = 0
public var impChannel2:SoundChannel;
public var impAttackNear:Sound;
private var secretExitToSecretMap:Boolean;// = false
public var zombieHit:Sound;
public var sawAttack:Sound;
public var impChannel:SoundChannel;
public var weaponGet:Sound;
private var doomFont:Font;
public var plain1:MovieClip;
public var plain2:MovieClip;
private var skillLevel:uint;// = 0
private var secrets:Array;
public var PickupTextBox_mc:PickupTextBox;
public var Export:MovieClip;
public var zombieChannel2:SoundChannel;
public var zombieChannel3:SoundChannel;
private var blinkingTimer:Timer;
private var doomFormatBig:TextFormat;
private var otherObjects:Array;
private var bonusObjects:Array;
private var metalhand:MovieClip;
private var scanline:MovieClip;
static const vEdgeDistance:Number = 360;
static const hEdgeDistance:Number = 400;
static const gravity:Number = 0.003;
public function Doom2D(){
metalhand = new Metalhand();
doomContextMenu = new ContextMenu();
doomContextMenuItem1 = new ContextMenuItem("(c) 2009 by CodinSoft");
doomFont = new DoomFont();
doomFormat = new TextFormat();
doomFormatBig = new TextFormat();
health_txt = new TextField();
shells_txt = new TextField();
cells_txt = new TextField();
rockets_txt = new TextField();
armor_txt = new TextField();
bullets_txt = new TextField();
pickup_txt = new TextField();
pickup_txtTimerValue = false;
playerKeepsInventory = false;
playerLooksLeft = false;
killedEnemies = 0;
collectedItems = 0;
maxItems = 0;
allSecrets = 0;
foundSecrets = 0;
firstExamine = true;
scanline = new Scanline();
berserkAlpha = new BerserkAlpha();
biosuitAlpha = new BiosuitAlpha();
berserkScreenTimer = new Timer(12000, 1);
biosuitBlinkScreenTimer = new Timer(20000, 1);
biosuitTimer = new Timer(25000, 1);
blinkingTimer = new Timer(500, 9);
berserkTimer = new Timer(15000, 1);
berserkBlinkingTimer = new Timer(500, 5);
gameMode = "loader";
lastTime = 0;
secretExitToSecretMap = false;
secretExitFromSecretMap = false;
lastMap = false;
levelIsComplete = false;
skillLevel = 0;
musicIsStopped = false;
lastMusicPosition = 0;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14);
}
public function biosuitBlinkScreenHandler(_arg1:TimerEvent):void{
blinkingTimer.addEventListener(TimerEvent.TIMER, blinkingHandler);
blinkingTimer.start();
}
public function playDoomPlenty(_arg1:MouseEvent):void{
skillLevel = 2;
cleanMenu();
}
function frame11(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m7 = new E1M7();
currentMusic = e1m7;
startMap();
playerLooksLeft = false;
}
function frame14(){
stop();
removeChild(health_txt);
removeChild(armor_txt);
removeChild(bullets_txt);
removeChild(cells_txt);
removeChild(shells_txt);
removeChild(rockets_txt);
musicChannel.stop();
endMusic = new End();
musicChannel = endMusic.play();
}
function frame12(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m8 = new E1M8();
currentMusic = e1m8;
startMap();
playerLooksLeft = false;
lastMap = true;
}
function frame10(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m6 = new E1M6();
currentMusic = e1m6;
startMap();
playerLooksLeft = true;
}
function frame2(){
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
}
function frame5(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m1 = new E1M1();
currentMusic = e1m1;
startMap();
playerLooksLeft = false;
intermission = new Intermission();
bullet = new Bullet();
shotgun = new ShotgunSound();
enemyChaingun = new EnemyChaingun();
pinkyHit = new PinkyHit();
zombieDeath1 = new ZombieDeath1();
zombieDeath2 = new ZombieDeath2();
zombieDeath3 = new ZombieDeath3();
zombieHit = new ZombieHit();
zombieSpot1 = new ZombieSpot1();
zombieSpot2 = new ZombieSpot2();
zombieSpot3 = new ZombieSpot3();
impSpot1 = new ImpSpot1();
impSpot2 = new ImpSpot2();
pinkySpot = new PinkySpot();
baronSpot = new BaronSpot();
baronDeath = new BaronDeath();
cacoSpot = new CacoSpot();
cacoDeath = new CacoDeath();
cyberSpot = new CyberdemonSpot();
cyberDeath = new CyberdemonDeath();
cyberWalk = new CyberdemonWalk();
masterSpot = new MastermindSpot();
masterDeath = new MastermindDeath();
masterWalk1 = new MastermindWalk1();
masterWalk2 = new MastermindWalk2();
lostSoulAttack = new LostSoulAttack();
impDeath1 = new ImpDeath1();
impDeath2 = new ImpDeath2();
impShot = new ImpShot();
impAttackNear = new ImpAttackNear();
pinkyDeath = new PinkyDeath();
playerDeath = new PlayerDeath();
itemGet = new ItemGet();
weaponGet = new WeaponGet();
fist = new Fist();
superItemGet = new SuperItemGet();
plasma = new PlasmaSound();
rlSound = new RocketLauncherSound();
plasmaExplode = new PlasmaExplode();
rocketExplode = new RocketExplode();
bfgExplode = new BfgExplode();
bfgSound = new BfgSound();
sawIdle = new SawIdle();
sawAttack = new SawAttack();
sawHit = new SawHit();
sawTake = new SawTake();
doorOpen = new DoorOpen();
doorClose = new DoorClose();
poof = new Poof();
spopd = new Spopd();
playerHurtSound = new PlayerHurt();
secret = new Secret();
}
function frame6(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m2 = new E1M2();
currentMusic = e1m2;
startMap();
playerLooksLeft = true;
}
function frame7(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m3 = new E1M3();
currentMusic = e1m3;
startMap();
playerLooksLeft = true;
}
function frame9(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m5 = new E1M5();
currentMusic = e1m5;
startMap();
playerLooksLeft = false;
}
function frame3(){
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
stop();
Mouse.show();
doomContextMenu.hideBuiltInItems();
doomContextMenu.customItems.push(doomContextMenuItem1);
this.contextMenu = doomContextMenu;
ctrl_txt.alpha = 0;
about_txt.alpha = 0;
back_btn.alpha = 0;
heyNotTooRough_btn.alpha = 0;
hurtMePlenty_btn.alpha = 0;
ultraViolence_btn.alpha = 0;
chooseSkill_txt.alpha = 0;
ctrl_txt.mouseEnabled = false;
about_txt.mouseEnabled = false;
back_btn.mouseEnabled = false;
heyNotTooRough_btn.mouseEnabled = false;
hurtMePlenty_btn.mouseEnabled = false;
ultraViolence_btn.mouseEnabled = false;
chooseSkill_txt.mouseEnabled = false;
metalhand.mouseEnabled = false;
metalhand.alpha = 0;
addChild(metalhand);
addEventListener(Event.ENTER_FRAME, moveMetalhand);
menuMusic = new MenuMusic();
musicChannel = menuMusic.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playMenuMusicAgain);
start_btn.addEventListener(MouseEvent.CLICK, chooseSkill);
ctrl_btn.addEventListener(MouseEvent.CLICK, showControls);
about_btn.addEventListener(MouseEvent.CLICK, showAbout);
back_btn.addEventListener(MouseEvent.CLICK, showMenu);
heyNotTooRough_btn.addEventListener(MouseEvent.CLICK, playDoomNotTooRough);
hurtMePlenty_btn.addEventListener(MouseEvent.CLICK, playDoomPlenty);
ultraViolence_btn.addEventListener(MouseEvent.CLICK, playDoomUltra);
start_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
about_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
ctrl_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
back_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
heyNotTooRough_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
hurtMePlenty_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
ultraViolence_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand);
start_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
about_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
ctrl_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
back_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
heyNotTooRough_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
hurtMePlenty_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
ultraViolence_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse);
}
function frame4(){
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
stop();
Mouse.show();
metalhand.mouseEnabled = false;
metalhand.alpha = 0;
addChild(metalhand);
addEventListener(Event.ENTER_FRAME, moveMetalhand2);
introMusic = new IntroMusic();
musicChannel.stop();
musicChannel = introMusic.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playIntroMusicAgain);
introtxt_mc.skip_btn.addEventListener(MouseEvent.CLICK, skipNow);
introtxt_mc.play_btn.addEventListener(MouseEvent.CLICK, playNow);
introtxt_mc.play_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand2);
introtxt_mc.skip_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand2);
introtxt_mc.play_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse2);
introtxt_mc.skip_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse2);
}
function frame13(){
stop();
Mouse.hide();
hideRollOut();
startGame();
veggies = new Veggies();
currentMusic = veggies;
startMap();
playerLooksLeft = false;
}
function frame1(){
Mouse.hide();
doomFormat.font = doomFont.fontName;
doomFormat.color = 0xCC0000;
doomFormat.size = 20;
doomFormat.align = "center";
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
}
public function runBerserkTimer():void{
berserkAlpha.alpha = 0.25;
player.currentWeapon = "fist";
switchHUDWeapons(player.currentWeapon);
berserkTimer.addEventListener(TimerEvent.TIMER_COMPLETE, berserkHandler);
berserkScreenTimer.addEventListener(TimerEvent.TIMER_COMPLETE, berserkScreenHandler);
berserkTimer.start();
berserkScreenTimer.start();
}
function frame8(){
stop();
Mouse.hide();
hideRollOut();
startGame();
e1m4 = new E1M4();
currentMusic = e1m4;
startMap();
playerLooksLeft = false;
}
public function playDoomUltra(_arg1:MouseEvent):void{
skillLevel = 3;
cleanMenu();
}
public function berserkHandler(_arg1:TimerEvent):void{
player.berserk = false;
berserkTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, berserkHandler);
berserkScreenTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, berserkScreenHandler);
berserkAlpha.alpha = 0;
}
public function showControls(_arg1:MouseEvent):void{
start_btn.mouseEnabled = false;
ctrl_btn.mouseEnabled = false;
about_btn.mouseEnabled = false;
back_btn.mouseEnabled = true;
start_btn.alpha = 0;
ctrl_btn.alpha = 0;
about_btn.alpha = 0;
ctrl_txt.alpha = 0.75;
back_btn.alpha = 0.75;
}
public function skipNow(_arg1:MouseEvent):void{
introtxt_mc.skip_btn.removeEventListener(MouseEvent.CLICK, skipNow);
introtxt_mc.play_btn.removeEventListener(MouseEvent.CLICK, playNow);
introtxt_mc.play_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand2);
introtxt_mc.skip_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand2);
introtxt_mc.play_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse2);
introtxt_mc.skip_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse2);
removeEventListener(Event.ENTER_FRAME, moveMetalhand2);
removeChild(metalhand);
musicChannel.removeEventListener(Event.SOUND_COMPLETE, playIntroMusicAgain);
gotoAndPlay("game");
}
public function levelComplete():void{
var i:int;
var interpic:MovieClip;
var kills_txt:TextField;
var items_txt:TextField;
var secrets_txt:TextField;
var nextLevel_btn:SimpleButton;
var moveMetalhand_:Function;
var showMetalhand_:Function;
var showMouse_:Function;
var nextMap:Function;
var playIntermissionMusicAgain:Function;
moveMetalhand_ = function (_arg1:Event):void{
metalhand.x = mouseX;
metalhand.y = mouseY;
};
showMetalhand_ = function (_arg1:MouseEvent):void{
Mouse.hide();
metalhand.alpha = 1;
};
showMouse_ = function (_arg1:MouseEvent):void{
Mouse.show();
metalhand.alpha = 0;
};
nextMap = function (_arg1:MouseEvent):void{
var avoidBugTimer:Timer;
var startMapAgain:Function;
var evt = _arg1;
startMapAgain = function (_arg1:TimerEvent):void{
cleanUp();
prevFrame();
nextFrame();
stage.focus = stage;
};
nextLevel_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand_);
nextLevel_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse_);
removeEventListener(Event.ENTER_FRAME, moveMetalhand_);
removeChild(metalhand);
removeChild(kills_txt);
removeChild(items_txt);
removeChild(secrets_txt);
removeChild(interpic);
removeChild(nextLevel_btn);
cleanUp();
if (lastMap == true){
gotoAndPlay("end");
return;
};
if ((((secretExitToSecretMap == false)) && ((secretExitFromSecretMap == false)))){
nextFrame();
} else {
if (secretExitToSecretMap == true){
nextFrame();
nextFrame();
nextFrame();
nextFrame();
nextFrame();
nextFrame();
secretExitToSecretMap = false;
} else {
if (secretExitFromSecretMap == true){
prevFrame();
prevFrame();
prevFrame();
prevFrame();
prevFrame();
secretExitFromSecretMap = false;
};
};
};
stage.focus = stage;
avoidBugTimer = new Timer(50, 1);
avoidBugTimer.addEventListener(TimerEvent.TIMER_COMPLETE, startMapAgain);
avoidBugTimer.start();
};
levelIsComplete = true;
if (berserkAlpha.alpha > 0){
berserkAlpha.alpha = 0;
};
if (biosuitAlpha.alpha > 0){
biosuitAlpha.alpha = 0;
};
cleanOverlayTimers();
this.removeEventListener(Event.ENTER_FRAME, gameLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
playerKeepsInventory = true;
playerLastWeapon = String(player.currentWeapon);
playerDummy = player;
if (musicIsStopped == false){
playIntermissionMusicAgain = function (_arg1:Event):void{
musicChannel = intermission.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playIntermissionMusicAgain);
};
musicChannel.stop();
musicChannel = intermission.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playIntermissionMusicAgain);
};
i = 0;
while (i < enemies.length) {
if (enemies[i].enemyDead == true){
killedEnemies++;
};
i = (i + 1);
};
interpic = new Interpic();
interpic.alpha = 0.85;
interpic.x = 150;
interpic.y = 180;
interpic.mouseEnabled = false;
addChild(interpic);
kills_txt = new TextField();
kills_txt.text = ((killedEnemies + "/") + enemies.length);
kills_txt.alpha = 0.85;
kills_txt.x = ((interpic.x + (interpic.width / 2)) - 5);
kills_txt.y = (interpic.y + 85);
kills_txt.embedFonts = true;
kills_txt.mouseEnabled = false;
kills_txt.setTextFormat(doomFormat);
addChild(kills_txt);
items_txt = new TextField();
items_txt.text = ((collectedItems + "/") + maxItems);
items_txt.alpha = 0.85;
items_txt.x = ((interpic.x + (interpic.width / 2)) - 5);
items_txt.y = (kills_txt.y + 29);
items_txt.embedFonts = true;
items_txt.mouseEnabled = false;
items_txt.setTextFormat(doomFormat);
addChild(items_txt);
secrets_txt = new TextField();
secrets_txt.text = ((foundSecrets + "/") + allSecrets);
secrets_txt.alpha = 0.85;
secrets_txt.x = ((interpic.x + (interpic.width / 2)) - 5);
secrets_txt.y = (items_txt.y + 29);
secrets_txt.embedFonts = true;
secrets_txt.mouseEnabled = false;
secrets_txt.setTextFormat(doomFormat);
addChild(secrets_txt);
nextLevel_btn = new NextLevel();
nextLevel_btn.alpha = 0.85;
nextLevel_btn.x = (interpic.x + (interpic.width / 2));
nextLevel_btn.y = (secrets_txt.y + 75);
addChild(nextLevel_btn);
if ((((((killedEnemies == enemies.length)) && ((collectedItems == maxItems)))) && ((foundSecrets == allSecrets)))){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "excellent work, marine. hats off!";
pickup_txt.setTextFormat(doomFormat);
} else {
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "well done! but you missed something...";
pickup_txt.setTextFormat(doomFormat);
};
Mouse.show();
allowRollOut();
addChild(metalhand);
metalhand.alpha = 0;
metalhand.mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, moveMetalhand_);
nextLevel_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand_);
nextLevel_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse_);
nextLevel_btn.addEventListener(MouseEvent.MOUSE_DOWN, nextMap);
}
public function berserkBlinkingHandler(_arg1:TimerEvent):void{
if (berserkAlpha.alpha == 0){
berserkAlpha.alpha = 0.25;
} else {
if (berserkAlpha.alpha == 0.25){
berserkAlpha.alpha = 0;
};
};
}
public function mouseUpHandler(_arg1:MouseEvent):void{
if ((((player.currentWeapon == "fist")) || ((player.currentWeapon == "chainsaw")))){
player.animstep = 0;
};
player.punches = false;
player.shoots = false;
}
public function moveEnemies(_arg1:int):void{
var _local2:int;
_local2 = 0;
while (_local2 < enemies.length) {
moveCharacter(enemies[_local2], _arg1);
if (enemies[_local2].hitWallRight == true){
enemies[_local2].moveLeft = true;
enemies[_local2].moveRight = false;
} else {
if (enemies[_local2].hitWallLeft == true){
enemies[_local2].moveLeft = false;
enemies[_local2].moveRight = true;
};
};
if ((((enemies[_local2].hitWallUp == true)) && ((((enemies[_local2].mc is Cacodemon)) || ((enemies[_local2].mc is LostSoul)))))){
enemies[_local2].moveUp = false;
enemies[_local2].moveDown = true;
} else {
if ((((enemies[_local2].hitWallDown == true)) && ((((enemies[_local2].mc is Cacodemon)) || ((enemies[_local2].mc is LostSoul)))))){
enemies[_local2].moveUp = true;
enemies[_local2].moveDown = false;
};
};
enemies[_local2].pressedUse = false;
_local2++;
};
}
public function pickup_txtTimerFunction():void{
var pickup_txtTimer:Timer;
var pickup_txtTimerHandler:Function;
var pickup_txtTimer2:Timer;
var pickup_txtTimerHandler2:Function;
pickup_txtTimerHandler = function (_arg1:TimerEvent):void{
PickupTextBox_mc.alpha = 0.85;
pickup_txtTimerValue = false;
pickup_txtTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, pickup_txtTimerHandler);
};
pickup_txtTimerHandler2 = function (_arg1:TimerEvent):void{
if ((((pickup_txtTimerValue == false)) && ((levelIsComplete == false)))){
pickup_txt.text = "";
PickupTextBox_mc.alpha = 0;
};
pickup_txtTimer2.removeEventListener(TimerEvent.TIMER_COMPLETE, pickup_txtTimerHandler2);
};
pickup_txtTimerValue = true;
pickup_txtTimer = new Timer(1000, 1);
pickup_txtTimer.addEventListener(TimerEvent.TIMER_COMPLETE, pickup_txtTimerHandler);
pickup_txtTimer.start();
pickup_txtTimer2 = new Timer(2000, 1);
pickup_txtTimer2.addEventListener(TimerEvent.TIMER_COMPLETE, pickup_txtTimerHandler2);
pickup_txtTimer2.start();
}
public function loadProgress(_arg1:ProgressEvent):void{
var _local2:int;
var _local3:int;
_local2 = Math.floor((_arg1.bytesLoaded / 0x0400));
_local3 = Math.floor((_arg1.bytesTotal / 0x0400));
progressText.text = ((((("Loading...\n\n" + "(") + _local2) + " kb / ") + _local3) + " kb)");
progressText.embedFonts = true;
progressText.alpha = 0.75;
progressText.setTextFormat(doomFormat);
if (_local2 >= _local3){
this.gotoAndStop("menu");
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
};
}
public function blinkingHandler(_arg1:TimerEvent):void{
if (biosuitAlpha.alpha == 0){
biosuitAlpha.alpha = 0.25;
} else {
if (biosuitAlpha.alpha == 0.25){
biosuitAlpha.alpha = 0;
};
};
}
public function showMetalhand(_arg1:MouseEvent):void{
Mouse.hide();
metalhand.alpha = 1;
}
public function showMouse2(_arg1:MouseEvent):void{
Mouse.show();
metalhand.alpha = 0;
}
public function startMap(){
var playMusicAgain:Function;
if (musicChannel != null){
musicChannel.stop();
};
createPlayer();
addEnemies();
examineMap();
this.addEventListener(Event.ENTER_FRAME, gameLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
stage.addEventListener(Event.MOUSE_LEAVE, mouseOutHandler);
HUD_mc.bluekey_HUD.alpha = 0;
HUD_mc.redkey_HUD.alpha = 0;
HUD_mc.yellowkey_HUD.alpha = 0;
HUD_mc.shotgun_HUD.alpha = 0;
HUD_mc.chaingun_HUD.alpha = 0;
HUD_mc.chainsaw_HUD.alpha = 0;
HUD_mc.RL_HUD.alpha = 0;
HUD_mc.plasma_HUD.alpha = 0;
HUD_mc.fist_HUD.alpha = 0;
HUD_mc.bfg_HUD.alpha = 0;
HUD_mc.pistol_HUD.alpha = 0;
bullets_txt.alpha = 0;
shells_txt.alpha = 0;
cells_txt.alpha = 0;
rockets_txt.alpha = 0;
if (player.currentWeapon == "fist"){
HUD_mc.fist_HUD.alpha = 1;
} else {
if (player.currentWeapon == "pistol"){
HUD_mc.pistol_HUD.alpha = 1;
bullets_txt.alpha = 0.85;
} else {
if (player.currentWeapon == "chainsaw"){
HUD_mc.chainsaw_HUD.alpha = 1;
} else {
if (player.currentWeapon == "shotgun"){
HUD_mc.shotgun_HUD.alpha = 1;
shells_txt.alpha = 0.85;
} else {
if (player.currentWeapon == "chaingun"){
HUD_mc.chaingun_HUD.alpha = 1;
bullets_txt.alpha = 0.85;
} else {
if (player.currentWeapon == "rocketlauncher"){
HUD_mc.RL_HUD.alpha = 1;
rockets_txt.alpha = 0.85;
} else {
if (player.currentWeapon == "plasmagun"){
HUD_mc.plasma_HUD.alpha = 1;
cells_txt.alpha = 0.85;
} else {
if (player.currentWeapon == "bfg"){
HUD_mc.bfg_HUD.alpha = 1;
cells_txt.alpha = 0.85;
};
};
};
};
};
};
};
};
gameMode = "game";
updateHUD();
if (musicIsStopped == false){
playMusicAgain = function (_arg1:Event):void{
lastMusicPosition = 0;
musicChannel = currentMusic.play(lastMusicPosition);
musicChannel.addEventListener(Event.SOUND_COMPLETE, playMusicAgain);
};
musicChannel = currentMusic.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playMusicAgain);
};
}
public function bioTimeHandler(_arg1:TimerEvent):void{
player.biosuit = false;
biosuitTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, bioTimeHandler);
biosuitBlinkScreenTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, biosuitBlinkScreenHandler);
biosuitAlpha.alpha = 0;
}
public function moveMetalhand2(_arg1:Event):void{
metalhand.x = mouseX;
metalhand.y = mouseY;
}
public function gameLoop(_arg1:Event):void{
var _local2:int;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
if (gameMode == "game"){
moveCharacter(player, _local2);
moveEnemies(_local2);
checkCollisions();
scrollWithPlayer();
checkNPCs();
updateHUD();
};
}
public function closeDoor(_arg1:Object):void{
var doorTimer:Timer;
var closeDoorAfterTime:Function;
var fixedObject = _arg1;
closeDoorAfterTime = function (_arg1:TimerEvent):void{
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
doorClose.play();
fixedObject.mc.y = (fixedObject.mc.y + (fixedObject.mc.height - 14));
examineMap();
doorTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, closeDoorAfterTime);
if (fixedObject.mc.hitTestObject(player.mc)){
if (player.playerDead == true){
spopdChannel = spopd.play();
_local3 = new Gibs1();
_local3.x = player.mc.x;
_local3.y = player.mc.y;
currentMap.addChild(_local3);
currentMap.removeChild(player.mc);
} else {
player.pressedUse = true;
};
};
_local2 = 0;
while (_local2 < enemies.length) {
if (((fixedObject.mc.hitTestObject(enemies[_local2].mc)) && (!((((enemies[_local2].mc is LostSoul)) || ((enemies[_local2].mc is Mastermind))))))){
if (enemies[_local2].enemyDead == true){
spopdChannel = spopd.play();
_local4 = new Gibs1();
_local4.x = enemies[_local2].mc.x;
_local4.y = enemies[_local2].mc.y;
currentMap.addChild(_local4);
currentMap.removeChild(enemies[_local2].mc);
} else {
enemies[_local2].pressedUse = true;
};
};
_local2++;
};
};
doorTimer = new Timer(2000, 1);
doorTimer.addEventListener(TimerEvent.TIMER_COMPLETE, closeDoorAfterTime);
doorTimer.start();
}
public function showMetalhand2(_arg1:MouseEvent):void{
Mouse.hide();
metalhand.alpha = 1;
}
public function hideRollOut():void{
var rollOutHandler:Function;
rollOutHandler = function (_arg1:MouseEvent):void{
Mouse.hide();
};
Doom2D(root).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
}
public function playIntroMusicAgain(_arg1:Event):void{
musicChannel = introMusic.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playIntroMusicAgain);
}
public function scrollWithPlayer():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local1 = (currentMap.x + player.mc.x);
_local2 = (stage.stageWidth - hEdgeDistance);
_local3 = hEdgeDistance;
if (_local1 > _local2){
currentMap.x = (currentMap.x - (_local1 - _local2));
if (currentMap.x < -(1800)){
currentMap.x = -(1800);
};
};
if (_local1 < _local3){
currentMap.x = (currentMap.x + (_local3 - _local1));
if (currentMap.x > 0){
currentMap.x = 0;
};
};
_local4 = (currentMap.y + player.mc.y);
_local5 = (stage.stageHeight - vEdgeDistance);
_local6 = vEdgeDistance;
if (_local4 < _local5){
currentMap.y = (currentMap.y - (_local4 - _local5));
if (currentMap.y > 0x0200){
currentMap.y = 0x0200;
};
};
if (_local4 > _local6){
currentMap.y = (currentMap.y + (_local6 - _local4));
if (currentMap.y < 0){
currentMap.y = 0;
};
};
plain1.x = (currentMap.x / 2);
plain1.y = (currentMap.y - 320);
plain2.x = (currentMap.x / 6);
plain2.y = (currentMap.y + 0x0100);
}
public function showMenu(_arg1:MouseEvent):void{
start_btn.mouseEnabled = true;
ctrl_btn.mouseEnabled = true;
about_btn.mouseEnabled = true;
back_btn.mouseEnabled = false;
start_btn.alpha = 0.75;
ctrl_btn.alpha = 0.75;
about_btn.alpha = 0.75;
about_txt.alpha = 0;
ctrl_txt.alpha = 0;
back_btn.alpha = 0;
}
public function enemyShoots(_arg1:Object):void{
var lastMoveShotTimeEnemy:int;
var hChangeEnemy:Number;
var vChangeEnemy:Number;
var collTileEnemy:Boolean;
var zombieManShot:MovieClip;
var moveZombieManShot:Function;
var impBall:MovieClip;
var moveImpBall:Function;
var enemy = _arg1;
lastMoveShotTimeEnemy = getTimer();
if (enemy.lastShotTime == 0){
hChangeEnemy = 0;
vChangeEnemy = 0;
if (enemy.attackWide == true){
if ((((((enemy.mc is ZombieMan)) || ((enemy.mc is ShotgunGuy)))) || ((enemy.mc is Mastermind)))){
moveZombieManShot = function (_arg1:Event):void{
var lastMoveShotDiffEnemy:int;
var l:*;
var puff:MovieClip;
var puffTimer:Timer;
var removePuff:Function;
var puff2:MovieClip;
var puff3:MovieClip;
var playerBlood:MovieClip;
var playerBloodTimer:Timer;
var removePlayerBlood:Function;
var evt = _arg1;
lastMoveShotDiffEnemy = (getTimer() - lastMoveShotTimeEnemy);
lastMoveShotTimeEnemy = (lastMoveShotTimeEnemy + lastMoveShotDiffEnemy);
zombieManShot.x = (zombieManShot.x + (lastMoveShotDiffEnemy * hChangeEnemy));
collTileEnemy = false;
l = 0;
while (l < fixedObjects.length) {
if (zombieManShot.hitTestObject(fixedObjects[l].mc)){
if ((((((((((((((((((((((((fixedObjects[l].mc is door1)) || ((fixedObjects[l].mc is door2)))) || ((fixedObjects[l].mc is bluedoor2)))) || ((fixedObjects[l].mc is reddoor2)))) || ((fixedObjects[l].mc is yellowdoor2)))) || ((fixedObjects[l].mc is exitdoor)))) || ((fixedObjects[l].mc is floorTile)))) || ((fixedObjects[l].mc is lionheaddoor)))) || ((fixedObjects[l].mc is skulldoor)))) || ((fixedObjects[l].mc is redlhdoor)))) || ((fixedObjects[l].mc is yellowlhdoor)))) || ((fixedObjects[l].mc is bluelhdoor)))){
removePuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(puff);
if (puff2){
currentMap.removeChild(puff2);
currentMap.removeChild(puff3);
};
};
puff = new Puff();
puffTimer = new Timer(250, 1);
if (enemy.direction == 1){
puff.x = fixedObjects[l].leftside;
} else {
if (enemy.direction == -1){
puff.x = fixedObjects[l].rightside;
};
};
puff.y = zombieManShot.y;
currentMap.addChild(puff);
if ((enemy.mc is ShotgunGuy)){
puff2 = new Puff();
puff3 = new Puff();
puff2.y = (puff.y + 4);
puff3.y = (puff.y - 4);
puff2.x = puff.x;
puff3.x = puff.x;
currentMap.addChild(puff2);
currentMap.addChild(puff3);
};
puffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removePuff);
puffTimer.start();
collTileEnemy = true;
zombieManShot.removeEventListener(Event.ENTER_FRAME, moveZombieManShot);
currentMap.removeChild(zombieManShot);
break;
};
};
l = (l + 1);
};
if (collTileEnemy == false){
if (player.playerDead == false){
if (zombieManShot.hitTestObject(player.mc)){
removePlayerBlood = function (_arg1:TimerEvent):void{
currentMap.removeChild(playerBlood);
};
playerBlood = new Blood();
playerBloodTimer = new Timer(250, 1);
playerBlood.x = player.mc.x;
playerBlood.y = ((player.mc.y - player.mc.height) + 20);
currentMap.addChild(playerBlood);
playerBloodTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removePlayerBlood);
playerBloodTimer.start();
playerHurt(enemy);
zombieManShot.removeEventListener(Event.ENTER_FRAME, moveZombieManShot);
currentMap.removeChild(zombieManShot);
};
};
};
};
if ((enemy.mc is ZombieMan)){
bullet.play();
} else {
if ((enemy.mc is Mastermind)){
enemyChaingun.play();
} else {
if ((enemy.mc is ShotgunGuy)){
shotgun.play();
};
};
};
zombieManShot = new Shot();
zombieManShot.alpha = 0;
if (enemy.direction == 1){
hChangeEnemy = enemy.shotSpeed;
zombieManShot.x = (enemy.mc.x - 20);
};
if (enemy.direction == -1){
hChangeEnemy = -(enemy.shotSpeed);
zombieManShot.x = (enemy.mc.x + 20);
};
zombieManShot.y = (enemy.mc.y - (enemy.mc.height / 1.6));
if ((enemy.mc is Mastermind)){
zombieManShot.y = (enemy.mc.y - (enemy.mc.height / 3.6));
};
currentMap.addChild(zombieManShot);
zombieManShot.addEventListener(Event.ENTER_FRAME, moveZombieManShot);
} else {
if ((((((((enemy.mc is Imp)) || ((enemy.mc is Baron)))) || ((enemy.mc is Cacodemon)))) || ((enemy.mc is Cyberdemon)))){
moveImpBall = function (_arg1:Event):void{
var lastMoveShotDiffEnemy:int;
var l:*;
var impPuff:MovieClip;
var impPuffTimer:Timer;
var removeImpPuff:Function;
var impPuff2:MovieClip;
var impPuffTimer2:Timer;
var removeImpPuff2:Function;
var evt = _arg1;
lastMoveShotDiffEnemy = (getTimer() - lastMoveShotTimeEnemy);
lastMoveShotTimeEnemy = (lastMoveShotTimeEnemy + lastMoveShotDiffEnemy);
impBall.x = (impBall.x + (lastMoveShotDiffEnemy * hChangeEnemy));
if ((enemy.mc is Cacodemon)){
impBall.y = (impBall.y + vChangeEnemy);
};
if ((((impBall.x > (enemy.mc.x + (enemy.mc.width / 2)))) && ((enemy.direction == 1)))){
impBall.alpha = 0.75;
} else {
if ((((impBall.x < (enemy.mc.x - (enemy.mc.width / 2)))) && ((enemy.direction == -1)))){
impBall.alpha = 0.75;
};
};
collTileEnemy = false;
l = 0;
while (l < fixedObjects.length) {
if (impBall.hitTestObject(fixedObjects[l].mc)){
if ((((((((((((((((((((((((fixedObjects[l].mc is door1)) || ((fixedObjects[l].mc is door2)))) || ((fixedObjects[l].mc is bluedoor2)))) || ((fixedObjects[l].mc is reddoor2)))) || ((fixedObjects[l].mc is yellowdoor2)))) || ((fixedObjects[l].mc is exitdoor)))) || ((fixedObjects[l].mc is floorTile)))) || ((fixedObjects[l].mc is lionheaddoor)))) || ((fixedObjects[l].mc is skulldoor)))) || ((fixedObjects[l].mc is redlhdoor)))) || ((fixedObjects[l].mc is yellowlhdoor)))) || ((fixedObjects[l].mc is bluelhdoor)))){
removeImpPuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(impPuff);
};
if ((enemy.mc is Imp)){
impPuff = new ImpPuff();
} else {
if ((enemy.mc is Baron)){
impPuff = new BaronPuff();
} else {
if ((enemy.mc is Cacodemon)){
impPuff = new CacoPuff();
} else {
if ((enemy.mc is Cyberdemon)){
impPuff = new RocketPuff();
};
};
};
};
impPuffTimer = new Timer(250, 1);
if (enemy.direction == 1){
impPuff.x = fixedObjects[l].leftside;
} else {
if (enemy.direction == -1){
impPuff.x = fixedObjects[l].rightside;
};
};
impPuff.y = impBall.y;
impPuff.alpha = 0.75;
currentMap.addChild(impPuff);
if (!(enemy.mc is Cyberdemon)){
plasmaExplode.play();
};
if ((enemy.mc is Cyberdemon)){
rocketExplode.play();
};
impPuffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeImpPuff);
impPuffTimer.start();
collTileEnemy = true;
impBall.removeEventListener(Event.ENTER_FRAME, moveImpBall);
currentMap.removeChild(impBall);
break;
};
};
l = (l + 1);
};
if (collTileEnemy == false){
if (player.playerDead == false){
if (impBall.hitTestObject(player.mc)){
removeImpPuff2 = function (_arg1:TimerEvent):void{
currentMap.removeChild(impPuff2);
};
if ((enemy.mc is Imp)){
impPuff2 = new ImpPuff();
} else {
if ((enemy.mc is Baron)){
impPuff2 = new BaronPuff();
} else {
if ((enemy.mc is Cacodemon)){
impPuff2 = new CacoPuff();
} else {
if ((enemy.mc is Cyberdemon)){
impPuff2 = new RocketPuff();
};
};
};
};
impPuffTimer2 = new Timer(250, 1);
if (enemy.direction == 1){
impPuff2.x = (player.mc.x - (player.mc.width / 2));
} else {
if (enemy.direction == -1){
impPuff2.x = (player.mc.x + (player.mc.width / 2));
};
};
impPuff2.y = impBall.y;
currentMap.addChild(impPuff2);
if (!(enemy.mc is Cyberdemon)){
plasmaExplode.play();
};
if ((enemy.mc is Cyberdemon)){
rocketExplode.play();
};
impPuffTimer2.addEventListener(TimerEvent.TIMER_COMPLETE, removeImpPuff2);
impPuffTimer2.start();
playerHurt(enemy);
impBall.removeEventListener(Event.ENTER_FRAME, moveImpBall);
currentMap.removeChild(impBall);
};
};
};
};
if ((enemy.mc is Imp)){
impShot.play();
impBall = new ImpBall();
impBall.y = (enemy.mc.y - (enemy.mc.height / 1.6));
} else {
if ((enemy.mc is Baron)){
impShot.play();
impBall = new BaronShot();
impBall.y = (enemy.mc.y - (enemy.mc.height / 1.5));
} else {
if ((enemy.mc is Cacodemon)){
impShot.play();
impBall = new CacoBall();
impBall.y = (enemy.mc.y - (enemy.mc.height / 2.2));
} else {
if ((enemy.mc is Cyberdemon)){
rlSound.play();
impBall = new Rocket();
impBall.y = (enemy.mc.y - (enemy.mc.height / 2));
enemy.impBallSpeed = enemy.rocketSpeed;
};
};
};
};
impBall.alpha = 0;
if (enemy.direction == 1){
hChangeEnemy = enemy.impBallSpeed;
if ((((((enemy.moveUp == true)) && (!((player.mc.y == enemy.mc.y))))) && ((enemy.mc is Cacodemon)))){
vChangeEnemy = -1;
} else {
if ((((((enemy.moveDown == true)) && (!((player.mc.y == enemy.mc.y))))) && ((enemy.mc is Cacodemon)))){
vChangeEnemy = 1;
};
};
impBall.x = (enemy.mc.x - 20);
impBall.scaleX = -1;
if ((enemy.mc is Cyberdemon)){
impBall.scaleX = 1;
};
};
if (enemy.direction == -1){
hChangeEnemy = -(enemy.impBallSpeed);
if ((((enemy.moveUp == true)) && (!((player.mc.y == enemy.mc.y))))){
vChangeEnemy = -1;
} else {
if ((((enemy.moveDown == true)) && (!((player.mc.y == enemy.mc.y))))){
vChangeEnemy = 1;
};
};
impBall.x = (enemy.mc.x + 20);
impBall.scaleX = 1;
if ((enemy.mc is Cyberdemon)){
impBall.scaleX = -1;
};
};
currentMap.addChild(impBall);
impBall.addEventListener(Event.ENTER_FRAME, moveImpBall);
};
};
};
};
}
public function allowRollOut():void{
var allowRollOutHandler:Function;
allowRollOutHandler = function (_arg1:MouseEvent):void{
Mouse.show();
};
Doom2D(root).addEventListener(MouseEvent.ROLL_OUT, allowRollOutHandler);
}
public function restart():void{
playerKeepsInventory = false;
cleanOverlayTimers();
cleanUp();
prevFrame();
nextFrame();
stage.focus = stage;
}
public function playerShootsPunches():void{
var lastMoveShotTime:int;
var hChange:Number;
var collTile:Boolean;
var plasmaShot:MovieClip;
var bfgShot:MovieClip;
var shot:MovieClip;
var rocket:MovieClip;
var punch:MovieClip;
var moveRocket:Function;
var movePlasmaShot:Function;
var bfgShotTimer:Timer;
var createBfgShot:Function;
var moveShot:Function;
var testPunch:Function;
if (player.playerDead == true){
return;
};
lastMoveShotTime = getTimer();
if (player.lastShotTime == 0){
hChange = 0;
if (player.shoots == true){
if (player.currentWeapon == "plasmagun"){
plasmaShot = new PlasmaShot();
plasmaShot.alpha = 0;
} else {
if (player.currentWeapon == "bfg"){
bfgShot = new BFGShot();
bfgShot.alpha = 0;
player.bfgShot = true;
} else {
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) || ((player.currentWeapon == "shotgun")))){
shot = new Shot();
shot.alpha = 0;
} else {
if (player.currentWeapon == "rocketlauncher"){
rocket = new Rocket();
rocket.alpha = 0;
};
};
};
};
} else {
if (player.punches == true){
punch = new Shot();
punch.alpha = 0;
};
};
if (player.direction == 1){
player.shootDirection = 1;
if (player.punches == true){
punch.x = (player.mc.x + stage.x);
hChange = player.punchSpeed;
} else {
if (player.shoots == true){
if (player.currentWeapon == "plasmagun"){
plasmaShot.x = (player.mc.x + stage.x);
hChange = player.plasmaSpeed;
} else {
if (player.currentWeapon == "bfg"){
bfgShot.x = (player.mc.x + stage.x);
hChange = player.bfgSpeed;
} else {
if (player.currentWeapon == "rocketlauncher"){
rocket.x = (player.mc.x + stage.x);
hChange = player.rocketSpeed;
rocket.scaleX = 1;
} else {
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) || ((player.currentWeapon == "shotgun")))){
shot.x = (player.mc.x + stage.x);
hChange = player.shotSpeed;
};
};
};
};
};
};
} else {
if (player.direction == -1){
player.shootDirection = -1;
if (player.punches == true){
punch.x = (player.mc.x + stage.x);
hChange = -(player.punchSpeed);
} else {
if (player.shoots == true){
if (player.currentWeapon == "plasmagun"){
plasmaShot.x = (player.mc.x + stage.x);
hChange = -(player.plasmaSpeed);
} else {
if (player.currentWeapon == "bfg"){
bfgShot.x = (player.mc.x + stage.x);
hChange = -(player.bfgSpeed);
} else {
if (player.currentWeapon == "rocketlauncher"){
rocket.x = (player.mc.x + stage.x);
hChange = -(player.rocketSpeed);
rocket.scaleX = -1;
} else {
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) || ((player.currentWeapon == "shotgun")))){
shot.x = (player.mc.x + stage.x);
hChange = -(player.shotSpeed);
};
};
};
};
};
};
};
};
if (player.punches == true){
punch.y = ((player.mc.y - (player.height / 1.2)) + stage.y);
currentMap.addChildAt(punch, (currentMap.numChildren - 10));
} else {
if (player.shoots == true){
if (player.currentWeapon == "plasmagun"){
plasmaShot.y = ((player.mc.y - (player.height / 1.27)) + stage.y);
currentMap.addChildAt(plasmaShot, (currentMap.numChildren - 10));
} else {
if (player.currentWeapon == "bfg"){
bfgShot.y = ((player.mc.y - (player.height / 1.27)) + stage.y);
currentMap.addChildAt(bfgShot, (currentMap.numChildren - 10));
} else {
if (player.currentWeapon == "rocketlauncher"){
rocket.y = ((player.mc.y - (player.height / 1.085)) + stage.y);
currentMap.addChildAt(rocket, (currentMap.numChildren - 10));
} else {
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) || ((player.currentWeapon == "shotgun")))){
shot.y = ((player.mc.y - (player.height / 1.2)) + stage.y);
currentMap.addChildAt(shot, (currentMap.numChildren - 10));
};
};
};
};
};
};
if (player.currentWeapon == "chainsaw"){
sawAttackChannel = sawAttack.play();
} else {
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) && ((player.outOfBullets == false)))){
bullet.play();
player.bullets = (player.bullets - 1);
} else {
if ((((player.currentWeapon == "shotgun")) && ((player.outOfShells == false)))){
shotgun.play();
player.shells = (player.shells - 1);
} else {
if ((((player.currentWeapon == "rocketlauncher")) && ((player.outOfRockets == false)))){
rlSound.play();
player.rockets = (player.rockets - 1);
} else {
if ((((player.currentWeapon == "plasmagun")) && ((player.outOfCells == false)))){
plasma.play();
player.cells = (player.cells - 1);
} else {
if ((((((player.currentWeapon == "bfg")) && ((player.outOfCells == false)))) && ((player.cells >= 40)))){
bfgSound.play();
player.cells = (player.cells - 40);
};
};
};
};
};
};
if (player.shoots == true){
if (player.currentWeapon == "rocketlauncher"){
moveRocket = function (_arg1:Event):void{
var lastMoveShotDiff:int;
var l:*;
var rocketPuff:MovieClip;
var rocketPuffTimer:Timer;
var k:int;
var removeRocketPuff:Function;
var m:int;
var rocketPuffEnemy:MovieClip;
var puffTimerEnemy:Timer;
var removeRocketPuffEnemy:Function;
var evt = _arg1;
lastMoveShotDiff = (getTimer() - lastMoveShotTime);
lastMoveShotTime = (lastMoveShotTime + lastMoveShotDiff);
rocket.x = (rocket.x + (lastMoveShotDiff * hChange));
if ((((rocket.x > (player.mc.x + (player.mc.width / 2)))) && ((player.shootDirection == 1)))){
rocket.alpha = 1;
} else {
if ((((rocket.x < (player.mc.x - (player.mc.width / 2)))) && ((player.shootDirection == -1)))){
rocket.alpha = 1;
};
};
collTile = false;
l = 0;
while (l < fixedObjects.length) {
if ((((rocket.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((rocket.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (rocket.hitTestObject(fixedObjects[l].mc)){
if ((((((((((((((((((((((((fixedObjects[l].mc is door1)) || ((fixedObjects[l].mc is door2)))) || ((fixedObjects[l].mc is bluedoor2)))) || ((fixedObjects[l].mc is reddoor2)))) || ((fixedObjects[l].mc is yellowdoor2)))) || ((fixedObjects[l].mc is exitdoor)))) || ((fixedObjects[l].mc is floorTile)))) || ((fixedObjects[l].mc is lionheaddoor)))) || ((fixedObjects[l].mc is skulldoor)))) || ((fixedObjects[l].mc is redlhdoor)))) || ((fixedObjects[l].mc is yellowlhdoor)))) || ((fixedObjects[l].mc is bluelhdoor)))){
removeRocketPuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(rocketPuff);
};
rocketPuff = new RocketPuff();
rocketPuffTimer = new Timer(350, 1);
if (player.shootDirection == 1){
rocketPuff.x = fixedObjects[l].leftside;
} else {
if (player.shootDirection == -1){
rocketPuff.x = fixedObjects[l].rightside;
};
};
rocketPuff.y = (rocket.y + 5);
currentMap.addChild(rocketPuff);
rocketExplode.play();
if (rocketPuff.hitTestObject(player.mc)){
playerHurtChannel = playerHurtSound.play();
player.playerHit = true;
player.rocketPuffDamage = (player.weaponDamage * 0.75);
if (player.armor > 0){
player.armor = (player.armor - (player.rocketPuffDamage * 0.4));
player.health = (player.health - (player.rocketPuffDamage * 0.6));
} else {
if (player.armor < 1){
player.health = (player.health - player.rocketPuffDamage);
player.armor = 0;
};
};
if (player.health < 1){
playerDies();
};
};
k = 0;
while (k < enemies.length) {
if (rocketPuff.hitTestObject(enemies[k].mc)){
enemies[k].rocketPuffHit = true;
enemyHit(k);
};
k = (k + 1);
};
rocketPuffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeRocketPuff);
rocketPuffTimer.start();
collTile = true;
rocket.removeEventListener(Event.ENTER_FRAME, moveRocket);
currentMap.removeChild(rocket);
break;
};
};
};
l = (l + 1);
};
if (collTile == false){
m = 0;
while (m < enemies.length) {
if (enemies[m].enemyDead == false){
if ((((rocket.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((rocket.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (rocket.hitTestObject(enemies[m].mc)){
removeRocketPuffEnemy = function (_arg1:TimerEvent):void{
currentMap.removeChild(rocketPuffEnemy);
};
rocketPuffEnemy = new RocketPuff();
puffTimerEnemy = new Timer(350, 1);
if (player.shootDirection == 1){
rocketPuffEnemy.x = (enemies[m].mc.x - (enemies[m].mc.width / 2));
} else {
if (player.shootDirection == -1){
rocketPuffEnemy.x = (enemies[m].mc.x + (enemies[m].mc.width / 2));
};
};
rocketPuffEnemy.y = rocket.y;
currentMap.addChild(rocketPuffEnemy);
rocketExplode.play();
if (rocketPuffEnemy.hitTestObject(player.mc)){
player.playerHit = true;
player.rocketPuffDamage = (player.weaponDamage * 0.75);
if (player.armor >= 1){
player.armor = (player.armor - (player.rocketPuffDamage * 0.4));
player.health = (player.health - (player.rocketPuffDamage * 0.6));
} else {
if (player.armor < 1){
player.health = (player.health - player.rocketPuffDamage);
player.armor = 0;
};
};
if (player.health < 1){
playerDies();
};
};
k = 0;
while (k < enemies.length) {
if (rocketPuffEnemy.hitTestObject(enemies[k].mc)){
enemies[k].rocketPuffHit = true;
enemyHit(k);
};
k = (k + 1);
};
puffTimerEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, removeRocketPuffEnemy);
puffTimerEnemy.start();
if ((((enemies[m].moveLeft == true)) && ((player.mc.x > enemies[m].mc.x)))){
enemies[m].moveLeft = false;
enemies[m].moveRight = true;
} else {
if ((((enemies[m].moveRight == true)) && ((player.mc.x < enemies[m].mc.x)))){
enemies[m].moveLeft = true;
enemies[m].moveRight = false;
};
};
enemyHit(m);
rocket.removeEventListener(Event.ENTER_FRAME, moveRocket);
currentMap.removeChild(rocket);
break;
};
};
};
m = (m + 1);
};
};
if ((((rocket.x >= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) || ((rocket.x <= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
rocket.removeEventListener(Event.ENTER_FRAME, moveRocket);
currentMap.removeChild(rocket);
};
};
rocket.addEventListener(Event.ENTER_FRAME, moveRocket);
} else {
if (player.currentWeapon == "plasmagun"){
movePlasmaShot = function (_arg1:Event):void{
var lastMoveShotDiff:int;
var l:*;
var plasmaPuff:MovieClip;
var puffTimer:Timer;
var removePlasmaPuff:Function;
var m:*;
var plasmaPuffEnemy:MovieClip;
var puffTimerEnemy:Timer;
var removePlasmaPuffEnemy:Function;
var evt = _arg1;
lastMoveShotDiff = (getTimer() - lastMoveShotTime);
lastMoveShotTime = (lastMoveShotTime + lastMoveShotDiff);
plasmaShot.x = (plasmaShot.x + (lastMoveShotDiff * hChange));
if ((((plasmaShot.x > (player.mc.x + (player.mc.width / 2)))) && ((player.shootDirection == 1)))){
plasmaShot.alpha = 0.75;
} else {
if ((((plasmaShot.x < (player.mc.x - (player.mc.width / 2)))) && ((player.shootDirection == -1)))){
plasmaShot.alpha = 0.75;
};
};
collTile = false;
l = 0;
while (l < fixedObjects.length) {
if ((((plasmaShot.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((plasmaShot.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (plasmaShot.hitTestObject(fixedObjects[l].mc)){
if ((((((((((((((((((((((((fixedObjects[l].mc is door1)) || ((fixedObjects[l].mc is door2)))) || ((fixedObjects[l].mc is bluedoor2)))) || ((fixedObjects[l].mc is reddoor2)))) || ((fixedObjects[l].mc is yellowdoor2)))) || ((fixedObjects[l].mc is exitdoor)))) || ((fixedObjects[l].mc is floorTile)))) || ((fixedObjects[l].mc is lionheaddoor)))) || ((fixedObjects[l].mc is skulldoor)))) || ((fixedObjects[l].mc is redlhdoor)))) || ((fixedObjects[l].mc is yellowlhdoor)))) || ((fixedObjects[l].mc is bluelhdoor)))){
removePlasmaPuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(plasmaPuff);
};
plasmaPuff = new PlasmaPuff();
puffTimer = new Timer(400, 1);
if (player.shootDirection == 1){
plasmaPuff.x = fixedObjects[l].leftside;
} else {
if (player.shootDirection == -1){
plasmaPuff.x = fixedObjects[l].rightside;
};
};
plasmaPuff.y = plasmaShot.y;
plasmaPuff.alpha = 0.75;
currentMap.addChild(plasmaPuff);
plasmaExplode.play();
puffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removePlasmaPuff);
puffTimer.start();
collTile = true;
plasmaShot.removeEventListener(Event.ENTER_FRAME, movePlasmaShot);
currentMap.removeChild(plasmaShot);
break;
};
};
};
l = (l + 1);
};
if (collTile == false){
m = 0;
while (m < enemies.length) {
if (enemies[m].enemyDead == false){
if ((((plasmaShot.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((plasmaShot.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (plasmaShot.hitTestObject(enemies[m].mc)){
removePlasmaPuffEnemy = function (_arg1:TimerEvent):void{
currentMap.removeChild(plasmaPuffEnemy);
};
plasmaPuffEnemy = new PlasmaPuff();
puffTimerEnemy = new Timer(400, 1);
if (player.shootDirection == 1){
plasmaPuffEnemy.x = (enemies[m].mc.x - (enemies[m].mc.width / 2));
} else {
if (player.shootDirection == -1){
plasmaPuffEnemy.x = (enemies[m].mc.x + (enemies[m].mc.width / 2));
};
};
plasmaPuffEnemy.y = plasmaShot.y;
plasmaPuffEnemy.alpha = 0.75;
currentMap.addChild(plasmaPuffEnemy);
plasmaExplode.play();
puffTimerEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, removePlasmaPuffEnemy);
puffTimerEnemy.start();
if ((((enemies[m].moveLeft == true)) && ((player.mc.x > enemies[m].mc.x)))){
enemies[m].moveLeft = false;
enemies[m].moveRight = true;
} else {
if ((((enemies[m].moveRight == true)) && ((player.mc.x < enemies[m].mc.x)))){
enemies[m].moveLeft = true;
enemies[m].moveRight = false;
};
};
enemyHit(m);
plasmaShot.removeEventListener(Event.ENTER_FRAME, movePlasmaShot);
currentMap.removeChild(plasmaShot);
break;
};
};
};
m = (m + 1);
};
};
if ((((plasmaShot.x >= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) || ((plasmaShot.x <= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
plasmaShot.removeEventListener(Event.ENTER_FRAME, movePlasmaShot);
currentMap.removeChild(plasmaShot);
};
};
plasmaShot.addEventListener(Event.ENTER_FRAME, movePlasmaShot);
} else {
if (player.currentWeapon == "bfg"){
createBfgShot = function (_arg1:TimerEvent):void{
var moveBfgShot:Function;
var evt = _arg1;
moveBfgShot = function (_arg1:Event):void{
var lastMoveShotDiff:int;
var l:*;
var bfgPuff:MovieClip;
var bfgPuff2:MovieClip;
var puffTimer:Timer;
var bfgPuff2Timer:Timer;
var bfgPuff2Cleaner:Timer;
var removePlasmaPuff:Function;
var cleanBfgPuff2:Function;
var bfgSecondHit:Function;
var m:*;
var bfgPuffEnemy:MovieClip;
var bfgPuffEnemy2:MovieClip;
var puffTimerEnemy:Timer;
var bfgPuff2TimerEnemy:Timer;
var bfgPuff2CleanerEnemy:Timer;
var bfgSecondHitEnemy:Function;
var cleanBfgPuff2Enemy:Function;
var removeBfgPuffEnemy:Function;
var evt = _arg1;
lastMoveShotDiff = ((getTimer() - lastMoveShotTime) - 1000);
lastMoveShotTime = (lastMoveShotTime + lastMoveShotDiff);
bfgShot.x = (bfgShot.x + (lastMoveShotDiff * hChange));
bfgShot.alpha = 0.75;
collTile = false;
l = 0;
while (l < fixedObjects.length) {
if ((((bfgShot.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((bfgShot.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (bfgShot.hitTestObject(fixedObjects[l].mc)){
if ((((((((((((((((((((((((fixedObjects[l].mc is door1)) || ((fixedObjects[l].mc is door2)))) || ((fixedObjects[l].mc is bluedoor2)))) || ((fixedObjects[l].mc is reddoor2)))) || ((fixedObjects[l].mc is yellowdoor2)))) || ((fixedObjects[l].mc is exitdoor)))) || ((fixedObjects[l].mc is floorTile)))) || ((fixedObjects[l].mc is lionheaddoor)))) || ((fixedObjects[l].mc is skulldoor)))) || ((fixedObjects[l].mc is redlhdoor)))) || ((fixedObjects[l].mc is yellowlhdoor)))) || ((fixedObjects[l].mc is bluelhdoor)))){
removePlasmaPuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(bfgPuff);
};
cleanBfgPuff2 = function (_arg1:TimerEvent):void{
currentMap.removeChild(bfgPuff2);
bfgPuff2Cleaner.removeEventListener(TimerEvent.TIMER_COMPLETE, cleanBfgPuff2);
};
bfgSecondHit = function (_arg1:TimerEvent):void{
var _local2:int;
var _local3:int;
var _local4:MovieClip;
currentMap.addChild(bfgPuff2);
_local2 = 0;
while (_local2 < enemies.length) {
if (bfgPuff2.hitTestObject(enemies[_local2].mc)){
enemies[_local2].bfgPuff2hit = true;
};
_local3 = 0;
while (_local3 < fixedObjects.length) {
if (bfgPuff2.hitTestObject(fixedObjects[_local3].mc)){
if ((((((fixedObjects[_local3].mc.x > player.mc.x)) && ((fixedObjects[_local3].mc.x < enemies[_local2].mc.x)))) && ((fixedObjects[_local3].blocks == true)))){
enemies[_local2].bfgPuff2hit = false;
};
if ((((((fixedObjects[_local3].mc.x < player.mc.x)) && ((fixedObjects[_local3].mc.x > enemies[_local2].mc.x)))) && ((fixedObjects[_local3].blocks == true)))){
enemies[_local2].bfgPuff2hit = false;
};
};
_local3++;
};
if (enemies[_local2].bfgPuff2hit == true){
if (enemies[_local2].enemyDead == false){
_local4 = new BfgPuffOnEnemy();
_local4.alpha = 0.75;
_local4.x = enemies[_local2].mc.x;
_local4.y = enemies[_local2].mc.y;
currentMap.addChild(_local4);
};
enemies[_local2].bfgPuffHit = true;
enemyHit(_local2);
};
_local2++;
};
bfgPuff2Timer.removeEventListener(TimerEvent.TIMER_COMPLETE, bfgSecondHit);
};
bfgPuff = new BfgPuff();
bfgPuff2 = new BfgPuff2();
puffTimer = new Timer(600, 1);
bfgPuff2Timer = new Timer(500, 1);
bfgPuff2Cleaner = new Timer(1200, 1);
if (player.direction == 1){
bfgPuff.x = fixedObjects[l].leftside;
} else {
if (player.direction == -1){
bfgPuff.x = fixedObjects[l].rightside;
};
};
bfgPuff.y = bfgShot.y;
if (player.direction == -1){
bfgPuff2.scaleX = 1;
bfgPuff2.x = player.mc.x;
bfgPuff2.y = player.mc.y;
} else {
if (player.direction == 1){
bfgPuff2.scaleX = -1;
bfgPuff2.x = player.mc.x;
bfgPuff2.y = player.mc.y;
};
};
bfgPuff.alpha = 0.75;
bfgPuff2.alpha = 0;
currentMap.addChild(bfgPuff);
bfgExplode.play();
puffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removePlasmaPuff);
puffTimer.start();
bfgPuff2Cleaner.addEventListener(TimerEvent.TIMER_COMPLETE, cleanBfgPuff2);
bfgPuff2Cleaner.start();
bfgPuff2Timer.addEventListener(TimerEvent.TIMER_COMPLETE, bfgSecondHit);
bfgPuff2Timer.start();
collTile = true;
bfgShot.removeEventListener(Event.ENTER_FRAME, moveBfgShot);
currentMap.removeChild(bfgShot);
player.bfgShot = false;
break;
};
};
};
l = (l + 1);
};
if (collTile == false){
m = 0;
while (m < enemies.length) {
if (enemies[m].enemyDead == false){
if ((((bfgShot.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((bfgShot.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (bfgShot.hitTestObject(enemies[m].mc)){
bfgSecondHitEnemy = function (_arg1:TimerEvent):void{
var _local2:int;
var _local3:int;
var _local4:MovieClip;
currentMap.addChild(bfgPuffEnemy2);
_local2 = 0;
while (_local2 < enemies.length) {
if (bfgPuffEnemy2.hitTestObject(enemies[_local2].mc)){
enemies[_local2].bfgPuff2hit = true;
_local3 = 0;
while (_local3 < fixedObjects.length) {
if (bfgPuffEnemy2.hitTestObject(fixedObjects[_local3].mc)){
if ((((((fixedObjects[_local3].mc.x > player.mc.x)) && ((fixedObjects[_local3].mc.x < enemies[_local2].mc.x)))) && ((fixedObjects[_local3].blocks == true)))){
enemies[_local2].bfgPuff2hit = false;
};
if ((((((fixedObjects[_local3].mc.x < player.mc.x)) && ((fixedObjects[_local3].mc.x > enemies[_local2].mc.x)))) && ((fixedObjects[_local3].blocks == true)))){
enemies[_local2].bfgPuff2hit = false;
};
};
_local3++;
};
if (enemies[_local2].bfgPuff2hit == true){
if (enemies[_local2].enemyDead == false){
_local4 = new BfgPuffOnEnemy();
_local4.x = enemies[_local2].mc.x;
_local4.y = enemies[_local2].mc.y;
_local4.alpha = 0.75;
currentMap.addChild(_local4);
};
enemies[_local2].bfgPuffHit = true;
enemies[m].bfgPuffHit = false;
enemyHit(_local2);
};
};
_local2++;
};
bfgPuff2TimerEnemy.removeEventListener(TimerEvent.TIMER_COMPLETE, bfgSecondHitEnemy);
};
cleanBfgPuff2Enemy = function (_arg1:TimerEvent):void{
currentMap.removeChild(bfgPuffEnemy2);
bfgPuff2CleanerEnemy.removeEventListener(TimerEvent.TIMER_COMPLETE, cleanBfgPuff2Enemy);
};
removeBfgPuffEnemy = function (_arg1:TimerEvent):void{
currentMap.removeChild(bfgPuffEnemy);
};
bfgPuffEnemy = new BfgPuff();
bfgPuffEnemy2 = new BfgPuff2();
puffTimerEnemy = new Timer(600, 1);
bfgPuff2TimerEnemy = new Timer(500, 1);
bfgPuff2CleanerEnemy = new Timer(1200, 1);
if (player.direction == 1){
bfgPuffEnemy.x = (enemies[m].mc.x - (enemies[m].mc.width / 2));
} else {
if (player.direction == -1){
bfgPuffEnemy.x = (enemies[m].mc.x + (enemies[m].mc.width / 2));
};
};
bfgPuffEnemy.y = bfgShot.y;
if (player.direction == -1){
bfgPuffEnemy2.scaleX = 1;
bfgPuffEnemy2.x = player.mc.x;
bfgPuffEnemy2.y = player.mc.y;
} else {
if (player.direction == 1){
bfgPuffEnemy2.scaleX = -1;
bfgPuffEnemy2.x = player.mc.x;
bfgPuffEnemy2.y = player.mc.y;
};
};
bfgPuffEnemy.alpha = 0.75;
bfgPuffEnemy2.alpha = 0;
currentMap.addChild(bfgPuffEnemy);
bfgExplode.play();
bfgPuff2TimerEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, bfgSecondHitEnemy);
bfgPuff2TimerEnemy.start();
bfgPuff2CleanerEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, cleanBfgPuff2Enemy);
bfgPuff2CleanerEnemy.start();
puffTimerEnemy.addEventListener(TimerEvent.TIMER_COMPLETE, removeBfgPuffEnemy);
puffTimerEnemy.start();
if ((((enemies[m].moveLeft == true)) && ((player.mc.x > enemies[m].mc.x)))){
enemies[m].moveLeft = false;
enemies[m].moveRight = true;
} else {
if ((((enemies[m].moveRight == true)) && ((player.mc.x < enemies[m].mc.x)))){
enemies[m].moveLeft = true;
enemies[m].moveRight = false;
};
};
enemyHit(m);
bfgShot.removeEventListener(Event.ENTER_FRAME, moveBfgShot);
currentMap.removeChild(bfgShot);
player.bfgShot = false;
break;
};
};
};
m = (m + 1);
};
};
if ((((bfgShot.x >= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) || ((bfgShot.x <= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
bfgShot.removeEventListener(Event.ENTER_FRAME, moveBfgShot);
currentMap.removeChild(bfgShot);
player.bfgShot = false;
};
};
examineMap();
bfgShot.y = ((player.mc.y - (player.height / 1.27)) + stage.y);
if (player.direction == 1){
bfgShot.x = (player.mc.x + stage.x);
hChange = player.bfgSpeed;
} else {
if (player.direction == -1){
bfgShot.x = (player.mc.x + stage.x);
hChange = -(player.bfgSpeed);
};
};
bfgShot.addEventListener(Event.ENTER_FRAME, moveBfgShot);
bfgShotTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, createBfgShot);
};
bfgShotTimer = new Timer(1000, 1);
bfgShotTimer.addEventListener(TimerEvent.TIMER_COMPLETE, createBfgShot);
bfgShotTimer.start();
} else {
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) || ((player.currentWeapon == "shotgun")))){
moveShot = function (_arg1:Event):void{
var l:*;
var puff:MovieClip;
var puffTimer:Timer;
var removePuff:Function;
var puff2:MovieClip;
var puff3:MovieClip;
var m:*;
var blood:MovieClip;
var bloodTimer:Timer;
var removeBlood:Function;
var blood2:MovieClip;
var blood3:MovieClip;
var evt = _arg1;
shot.x = (shot.x + hChange);
collTile = false;
l = 0;
while (l < fixedObjects.length) {
if ((((shot.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((shot.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (shot.hitTestObject(fixedObjects[l].mc)){
if ((((((((((((((((((((((((fixedObjects[l].mc is door1)) || ((fixedObjects[l].mc is door2)))) || ((fixedObjects[l].mc is bluedoor2)))) || ((fixedObjects[l].mc is reddoor2)))) || ((fixedObjects[l].mc is yellowdoor2)))) || ((fixedObjects[l].mc is exitdoor)))) || ((fixedObjects[l].mc is floorTile)))) || ((fixedObjects[l].mc is lionheaddoor)))) || ((fixedObjects[l].mc is skulldoor)))) || ((fixedObjects[l].mc is redlhdoor)))) || ((fixedObjects[l].mc is yellowlhdoor)))) || ((fixedObjects[l].mc is bluelhdoor)))){
removePuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(puff);
if (puff2){
currentMap.removeChild(puff2);
currentMap.removeChild(puff3);
};
};
puff = new Puff();
puffTimer = new Timer(250, 1);
if (player.shootDirection == 1){
puff.x = fixedObjects[l].leftside;
} else {
if (player.shootDirection == -1){
puff.x = fixedObjects[l].rightside;
};
};
puff.y = shot.y;
currentMap.addChild(puff);
if (player.currentWeapon == "shotgun"){
puff2 = new Puff();
puff3 = new Puff();
puff2.y = (puff.y + 4);
puff3.y = (puff.y - 4);
puff2.x = puff.x;
puff3.x = puff.x;
currentMap.addChild(puff2);
currentMap.addChild(puff3);
};
puffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removePuff);
puffTimer.start();
collTile = true;
shot.removeEventListener(Event.ENTER_FRAME, moveShot);
currentMap.removeChild(shot);
break;
};
};
};
l = (l + 1);
};
if (collTile == false){
m = 0;
while (m < enemies.length) {
if (enemies[m].enemyDead == false){
if ((((shot.x <= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) && ((shot.x >= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
if (shot.hitTestObject(enemies[m].mc)){
removeBlood = function (_arg1:TimerEvent):void{
currentMap.removeChild(blood);
if (blood2){
currentMap.removeChild(blood2);
currentMap.removeChild(blood3);
};
};
blood = new Blood();
bloodTimer = new Timer(250, 1);
if (player.shootDirection == 1){
blood.x = (enemies[m].mc.x - (enemies[m].mc.width / 2.5));
if ((((((((((((enemies[m].mc is ZombieMan)) || ((enemies[m].mc is ShotgunGuy)))) || ((enemies[m].mc is Imp)))) || ((enemies[m].mc is Baron)))) || ((enemies[m].mc is Cacodemon)))) || ((enemies[m].mc is LostSoul)))){
blood.x = (enemies[m].mc.x - (enemies[m].mc.width / 5));
};
if ((((enemies[m].mc is Cyberdemon)) || ((enemies[m].mc is Mastermind)))){
blood.x = enemies[m].mc.x;
};
} else {
if (player.shootDirection == -1){
blood.x = (enemies[m].mc.x + (enemies[m].mc.width / 2.5));
if ((((((((((((enemies[m].mc is ZombieMan)) || ((enemies[m].mc is ShotgunGuy)))) || ((enemies[m].mc is Imp)))) || ((enemies[m].mc is Baron)))) || ((enemies[m].mc is Cacodemon)))) || ((enemies[m].mc is LostSoul)))){
blood.x = (enemies[m].mc.x + (enemies[m].mc.width / 5));
};
if ((((enemies[m].mc is Cyberdemon)) || ((enemies[m].mc is Mastermind)))){
blood.x = enemies[m].mc.x;
};
};
};
blood.y = shot.y;
currentMap.addChild(blood);
if (player.currentWeapon == "shotgun"){
blood2 = new Blood();
blood3 = new Blood();
blood2.y = (shot.y + 4);
blood3.y = (shot.y - 4);
blood2.x = blood.x;
blood3.x = blood.x;
currentMap.addChild(blood2);
currentMap.addChild(blood3);
};
bloodTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeBlood);
bloodTimer.start();
if ((((enemies[m].moveLeft == true)) && ((player.mc.x > enemies[m].mc.x)))){
enemies[m].moveLeft = false;
enemies[m].moveRight = true;
} else {
if ((((enemies[m].moveRight == true)) && ((player.mc.x < enemies[m].mc.x)))){
enemies[m].moveLeft = true;
enemies[m].moveRight = false;
};
};
enemyHit(m);
shot.removeEventListener(Event.ENTER_FRAME, moveShot);
currentMap.removeChild(shot);
break;
};
};
};
m = (m + 1);
};
};
if ((((shot.x >= ((player.mc.x + player.mc.width) + (stage.stageWidth / 2)))) || ((shot.x <= ((player.mc.x - player.mc.width) - (stage.stageWidth / 2)))))){
shot.removeEventListener(Event.ENTER_FRAME, moveShot);
currentMap.removeChild(shot);
};
};
shot.addEventListener(Event.ENTER_FRAME, moveShot);
};
};
};
};
} else {
if (player.punches == true){
testPunch = function (_arg1:Event):void{
var k:int;
var puff:MovieClip;
var puffTimer:Timer;
var removePuff:Function;
var j:int;
var blood:MovieClip;
var bloodTimer:Timer;
var removeBlood:Function;
var evt = _arg1;
punch.x = (punch.x + hChange);
collTile = false;
k = 0;
while (k < fixedObjects.length) {
if ((((punch.x <= (player.mc.x + player.mc.width))) && ((punch.x >= (player.mc.x - player.mc.width))))){
if (punch.hitTestObject(fixedObjects[k].mc)){
if ((((((((((((((((((((((((fixedObjects[k].mc is door1)) || ((fixedObjects[k].mc is door2)))) || ((fixedObjects[k].mc is bluedoor2)))) || ((fixedObjects[k].mc is reddoor2)))) || ((fixedObjects[k].mc is yellowdoor2)))) || ((fixedObjects[k].mc is exitdoor)))) || ((fixedObjects[k].mc is floorTile)))) || ((fixedObjects[k].mc is lionheaddoor)))) || ((fixedObjects[k].mc is skulldoor)))) || ((fixedObjects[k].mc is redlhdoor)))) || ((fixedObjects[k].mc is yellowlhdoor)))) || ((fixedObjects[k].mc is bluelhdoor)))){
removePuff = function (_arg1:TimerEvent):void{
currentMap.removeChild(puff);
};
puff = new Puff();
puffTimer = new Timer(250, 1);
if (player.shootDirection == 1){
puff.x = fixedObjects[k].leftside;
} else {
if (player.shootDirection == -1){
puff.x = fixedObjects[k].rightside;
};
};
puff.y = punch.y;
currentMap.addChild(puff);
if (player.currentWeapon == "fist"){
fist.play();
};
puffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removePuff);
puffTimer.start();
collTile = true;
punch.removeEventListener(Event.ENTER_FRAME, testPunch);
currentMap.removeChild(punch);
break;
};
};
};
k = (k + 1);
};
if (collTile == false){
j = 0;
while (j < enemies.length) {
if (enemies[j].enemyDead == false){
if ((((punch.x <= (player.mc.x + player.mc.width))) && ((punch.x >= (player.mc.x - player.mc.width))))){
if (punch.hitTestObject(enemies[j].mc)){
removeBlood = function (_arg1:TimerEvent):void{
currentMap.removeChild(blood);
};
blood = new Blood();
bloodTimer = new Timer(250, 1);
if (player.shootDirection == 1){
blood.x = (enemies[j].mc.x - (enemies[j].mc.width / 2.5));
if ((((((((((((enemies[j].mc is ZombieMan)) || ((enemies[j].mc is ShotgunGuy)))) || ((enemies[j].mc is Imp)))) || ((enemies[j].mc is Baron)))) || ((enemies[j].mc is Cacodemon)))) || ((enemies[j].mc is LostSoul)))){
blood.x = (enemies[j].mc.x - (enemies[j].mc.width / 5));
};
if ((((enemies[j].mc is Cyberdemon)) || ((enemies[j].mc is Mastermind)))){
blood.x = enemies[j].mc.x;
};
} else {
if (player.shootDirection == -1){
blood.x = (enemies[j].mc.x + (enemies[j].mc.width / 2.5));
if ((((((((((((enemies[j].mc is ZombieMan)) || ((enemies[j].mc is ShotgunGuy)))) || ((enemies[j].mc is Imp)))) || ((enemies[j].mc is Baron)))) || ((enemies[j].mc is Cacodemon)))) || ((enemies[j].mc is LostSoul)))){
blood.x = (enemies[j].mc.x + (enemies[j].mc.width / 5));
};
if ((((enemies[j].mc is Cyberdemon)) || ((enemies[j].mc is Mastermind)))){
blood.x = enemies[j].mc.x;
};
};
};
blood.y = punch.y;
currentMap.addChild(blood);
if (player.currentWeapon == "fist"){
fist.play();
};
bloodTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeBlood);
bloodTimer.start();
if (player.currentWeapon == "chainsaw"){
sawAttackChannel.stop();
sawHit.play();
};
enemyHit(j);
punch.removeEventListener(Event.ENTER_FRAME, testPunch);
currentMap.removeChild(punch);
break;
};
};
};
j = (j + 1);
};
};
if ((((punch.x >= (player.mc.x + player.mc.width))) || ((punch.x <= (player.mc.x - player.mc.width))))){
punch.removeEventListener(Event.ENTER_FRAME, testPunch);
currentMap.removeChild(punch);
};
};
punch.addEventListener(Event.ENTER_FRAME, testPunch);
};
};
};
}
public function getObject(_arg1:int):void{
var setChainsawTaken:Function;
var objectNum = _arg1;
if ((otherObjects[objectNum] is Chaingun)){
weaponGet.play();
playerObjects.push("chaingun");
player.chaingun = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you got the chaingun!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if (player.bullets < player.maxBullets){
player.bullets = (player.bullets + 30);
if (player.bullets > player.maxBullets){
player.bullets = player.maxBullets;
};
player.outOfBullets = false;
};
if ((((((player.autoswitch == true)) && ((player.shoots == false)))) && ((player.punches == false)))){
if (player.punches == true){
player.punches = false;
player.shoots = true;
};
player.currentWeapon = "chaingun";
switchHUDWeapons(player.currentWeapon);
};
} else {
if ((otherObjects[objectNum] is Shotgun)){
weaponGet.play();
playerObjects.push("shotgun");
player.shotgun = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you got the shotgun!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if (player.shells < player.maxShells){
player.shells = (player.shells + 8);
if (player.shells > player.maxShells){
player.shells = player.maxShells;
};
player.outOfShells = false;
};
if ((((((player.autoswitch == true)) && ((player.shoots == false)))) && ((player.punches == false)))){
if (player.punches == true){
player.punches = false;
player.shoots = true;
};
player.currentWeapon = "shotgun";
switchHUDWeapons(player.currentWeapon);
};
} else {
if ((otherObjects[objectNum] is RocketLauncher)){
weaponGet.play();
playerObjects.push("rocketlauncher");
player.rocketlauncher = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you got the rocket launcher!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if (player.rockets < player.maxRockets){
player.rockets = (player.rockets + 2);
if (player.rockets > player.maxRockets){
player.rockets = player.maxRockets;
};
player.outOfRockets = false;
};
} else {
if ((otherObjects[objectNum] is Plasmagun)){
weaponGet.play();
playerObjects.push("plasmagun");
player.plasmagun = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you got the plasmagun!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if (player.cells < player.maxCells){
player.cells = (player.cells + 100);
if (player.cells > player.maxCells){
player.cells = player.maxCells;
};
player.outOfCells = false;
};
if ((((((player.autoswitch == true)) && ((player.shoots == false)))) && ((player.punches == false)))){
if (player.punches == true){
player.punches = false;
player.shoots = true;
};
player.currentWeapon = "plasmagun";
switchHUDWeapons(player.currentWeapon);
};
} else {
if ((otherObjects[objectNum] is BFG)){
weaponGet.play();
playerObjects.push("bfg");
player.bfg = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you got the bfg9000! oh, yes.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if (player.cells < player.maxCells){
player.cells = (player.cells + 80);
if (player.cells > player.maxCells){
player.cells = player.maxCells;
};
player.outOfCells = false;
};
if ((((((player.autoswitch == true)) && ((player.shoots == false)))) && ((player.punches == false)))){
if (player.punches == true){
player.punches = false;
player.shoots = true;
};
player.currentWeapon = "bfg";
switchHUDWeapons(player.currentWeapon);
};
} else {
if ((otherObjects[objectNum] is Chainsaw)){
weaponGet.play();
playerObjects.push("chainsaw");
player.chainsaw = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "a chainsaw! find some meat!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if ((((((player.autoswitch == true)) && ((player.shoots == false)))) && ((player.punches == false)))){
setChainsawTaken = function (_arg1:Event):void{
player.chainsawPulled = true;
};
if (player.shoots == true){
player.shoots = false;
player.punches = true;
};
player.currentWeapon = "chainsaw";
switchHUDWeapons(player.currentWeapon);
sawTakeChannel = sawTake.play();
sawTakeChannel.addEventListener(Event.SOUND_COMPLETE, setChainsawTaken);
};
} else {
if ((otherObjects[objectNum] is ZombieShotgun)){
weaponGet.play();
playerObjects.push("shotgun");
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you got the shotgun!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
if (player.shells < player.maxShells){
player.shells = (player.shells + 8);
if (player.shells > player.maxShells){
player.shells = player.maxShells;
};
player.outOfShells = false;
};
if ((((((((player.autoswitch == true)) && ((player.shotgun == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if (player.punches == true){
player.punches = false;
player.shoots = true;
};
player.currentWeapon = "shotgun";
switchHUDWeapons(player.currentWeapon);
};
player.shotgun = true;
} else {
if ((otherObjects[objectNum] is Superschorsch)){
if ((((player.health < 200)) && ((player.health > 0)))){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "supercharge!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
superItemGet.play();
player.health = (player.health + 100);
if (player.health > 200){
player.health = 200;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Medikit)){
if ((((player.health < 100)) && ((player.health > 0)))){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a medikit.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.health = (player.health + 25);
if (player.health > 100){
player.health = 100;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Stimpak)){
if ((((player.health < 100)) && ((player.health > 0)))){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a stimpak.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.health = (player.health + 10);
if (player.health > 100){
player.health = 100;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Ammoclip)){
if (player.bullets < player.maxBullets){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a clip.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.bullets = (player.bullets + 10);
if (player.bullets > player.maxBullets){
player.bullets = player.maxBullets;
};
player.outOfBullets = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Ammobox)){
if (player.bullets < player.maxBullets){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a box of bullets.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.bullets = (player.bullets + 50);
if (player.bullets > player.maxBullets){
player.bullets = player.maxBullets;
};
player.outOfBullets = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is CellBox)){
if (player.cells < player.maxCells){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up an energy cell pack.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.cells = (player.cells + 100);
if (player.cells > player.maxCells){
player.cells = player.maxCells;
};
player.outOfCells = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Shells)){
if (player.shells < player.maxShells){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up 4 shotgun shells.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.shells = (player.shells + 4);
if (player.shells > player.maxShells){
player.shells = player.maxShells;
};
player.outOfShells = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is ShellBox)){
if (player.shells < player.maxShells){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a box of shotgun shells.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.shells = (player.shells + 20);
if (player.shells > player.maxShells){
player.shells = player.maxShells;
};
player.outOfShells = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Cells)){
if (player.cells < player.maxCells){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up an energy cell.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.cells = (player.cells + 20);
if (player.cells > player.maxCells){
player.cells = player.maxCells;
};
player.outOfCells = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is SingleRocket)){
if (player.rockets < player.maxRockets){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a rocket.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.rockets = (player.rockets + 1);
if (player.rockets > player.maxRockets){
player.rockets = player.maxRockets;
};
player.outOfRockets = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is RocketBox)){
if (player.rockets < player.maxRockets){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a box of rockets.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.rockets = (player.rockets + 10);
if (player.rockets > player.maxRockets){
player.rockets = player.maxRockets;
};
player.outOfRockets = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is Biosuit)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "radiation shielding suit.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
superItemGet.play();
player.biosuit = true;
runBiosuitTimer();
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is Berserk)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "berserk!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
superItemGet.play();
player.berserk = true;
runBerserkTimer();
if ((((player.health < 100)) && ((player.health > 0)))){
player.health = 100;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is Backpack)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a backpack full of ammo!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.maxBullets = 400;
player.maxShells = 100;
player.maxRockets = 100;
player.maxCells = 600;
if (player.bullets < player.maxBullets){
player.bullets = (player.bullets + 20);
};
if (player.shells < player.maxShells){
player.shells = (player.shells + 8);
};
if (player.rockets < player.maxRockets){
player.rockets = (player.rockets + 2);
};
if (player.cells < player.maxCells){
player.cells = (player.cells + 40);
};
if (player.bullets > player.maxBullets){
player.bullets = player.maxBullets;
};
if (player.shells > player.maxShells){
player.shells = player.maxShells;
};
if (player.rockets > player.maxRockets){
player.rockets = player.maxRockets;
};
if (player.cells > player.maxCells){
player.cells = player.maxCells;
};
player.outOfBullets = false;
player.outOfShells = false;
player.outOfRockets = false;
player.outOfCells = false;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is BlueKey)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a blue keycard.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.bluekey = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is RedKey)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a red keycard.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.redkey = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is YellowKey)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a yellow keycard.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.yellowkey = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is RedSkull)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a red skull key.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.redkey = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is BlueSkull)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a blue skull key.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.bluekey = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is YellowSkull)){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a yellow skull key.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.yellowkey = true;
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
} else {
if ((otherObjects[objectNum] is BonusHealth)){
if (player.health > 0){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up a health bonus.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
if (player.health < 200){
player.health = (player.health + 1);
};
if (player.health > 200){
player.health = 200;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
collectedItems++;
};
} else {
if ((otherObjects[objectNum] is BonusArmor)){
if (player.armor >= 0){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up an armor bonus.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
if (player.armor < 200){
player.armor = (player.armor + 1);
};
if (player.armor > 200){
player.armor = 200;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
collectedItems++;
};
} else {
if ((otherObjects[objectNum] is GreenArmor)){
if ((((player.armor < 100)) && ((player.armor >= 0)))){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up the armor.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.armor = (player.armor + 100);
if (player.armor > 100){
player.armor = 100;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
} else {
if ((otherObjects[objectNum] is BlueArmor)){
if ((((player.armor < 200)) && ((player.armor >= 0)))){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "picked up the megaarmor!";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
itemGet.play();
player.armor = (player.armor + 200);
if (player.armor > 200){
player.armor = 200;
};
currentMap.removeChild(otherObjects[objectNum]);
otherObjects.splice(objectNum, 1);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function examineMap():void{
var _local1:int;
var _local2:*;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local7:Object;
var _local8:Object;
fixedObjects = new Array();
otherObjects = new Array();
doorObjects = new Array();
bonusObjects = new Array();
enemyBlockBoxes = new Array();
secrets = new Array();
_local1 = 0;
while (_local1 < this.currentMap.numChildren) {
_local2 = this.currentMap.getChildAt(_local1);
if ((((((_local2 is floorTile)) || ((_local2 is nukage)))) || ((_local2 is lava)))){
_local3 = new Object();
_local3.mc = _local2;
_local3.leftside = _local2.x;
_local3.rightside = (_local2.x + _local2.width);
_local3.topside = _local2.y;
_local3.bottomside = (_local2.y + _local2.height);
_local3.blocks = true;
fixedObjects.push(_local3);
} else {
if ((((((_local2 is woodright)) || ((_local2 is woodleft)))) || ((_local2 is grayline)))){
_local4 = new Object();
_local4.mc = _local2;
_local4.leftside = _local2.x;
_local4.rightside = (_local2.x + _local2.width);
_local4.topside = _local2.y;
_local4.blocks = false;
fixedObjects.push(_local4);
} else {
if ((((((((_local2 is exitswitch)) || ((_local2 is exitswitch2)))) || ((_local2 is secretExitswitchToSecretMap)))) || ((_local2 is secretExitswitchFromSecretMap)))){
_local5 = new Object();
_local5.mc = _local2;
_local5.blocks = false;
fixedObjects.push(_local5);
} else {
if ((((_local2 is enemyBlockBox)) || ((_local2 is enemyBlockBoxAir)))){
_local6 = new Object();
_local6.mc = _local2;
_local6.mc.alpha = 0;
enemyBlockBoxes.push(_local6);
} else {
if ((_local2 is secretBox)){
_local7 = new Object();
_local7.mc = _local2;
_local7.mc.alpha = 0;
secrets.push(_local7);
} else {
if ((((((((((((((((((((((_local2 is door1)) || ((_local2 is door2)))) || ((_local2 is bluedoor2)))) || ((_local2 is reddoor2)))) || ((_local2 is yellowdoor2)))) || ((_local2 is exitdoor)))) || ((_local2 is lionheaddoor)))) || ((_local2 is skulldoor)))) || ((_local2 is redlhdoor)))) || ((_local2 is yellowlhdoor)))) || ((_local2 is bluelhdoor)))){
_local8 = new Object();
_local8.mc = _local2;
_local8.leftside = _local2.x;
_local8.rightside = (_local2.x + _local2.width);
_local8.topside = _local2.y;
_local8.bottomside = (_local2.y + _local2.height);
_local8.blocks = true;
_local8.isOpen = false;
fixedObjects.push(_local8);
} else {
if ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((_local2 is SSG)) || ((_local2 is Chaingun)))) || ((_local2 is Medikit)))) || ((_local2 is Ammoclip)))) || ((_local2 is Stimpak)))) || ((_local2 is Shells)))) || ((_local2 is Shotgun)))) || ((_local2 is BlueArmor)))) || ((_local2 is GreenArmor)))) || ((_local2 is Superschorsch)))) || ((_local2 is Plasmagun)))) || ((_local2 is Ammobox)))) || ((_local2 is RocketLauncher)))) || ((_local2 is BFG)))) || ((_local2 is Chainsaw)))) || ((_local2 is SingleRocket)))) || ((_local2 is RocketBox)))) || ((_local2 is CellBox)))) || ((_local2 is Backpack)))) || ((_local2 is ShellBox)))) || ((_local2 is BlueKey)))) || ((_local2 is RedKey)))) || ((_local2 is YellowKey)))) || ((_local2 is Cells)))) || ((_local2 is ZombieShotgun)))) || ((_local2 is Biosuit)))) || ((_local2 is Berserk)))) || ((_local2 is RedSkull)))) || ((_local2 is BlueSkull)))) || ((_local2 is YellowSkull)))){
otherObjects.push(_local2);
} else {
if ((((_local2 is BonusHealth)) || ((_local2 is BonusArmor)))){
otherObjects.push(_local2);
bonusObjects.push(_local2);
};
};
};
};
};
};
};
};
_local1++;
};
if (firstExamine == true){
firstExamine = false;
maxItems = bonusObjects.length;
allSecrets = secrets.length;
};
}
public function berserkScreenHandler(_arg1:TimerEvent):void{
berserkBlinkingTimer.addEventListener(TimerEvent.TIMER, berserkBlinkingHandler);
berserkBlinkingTimer.start();
}
public function addEnemies():void{
var _local1:int;
var _local2:*;
enemies = new Array();
_local1 = 1;
while (true) {
if (currentMap[("enemy" + _local1)] == null){
break;
};
_local2 = new Object();
_local2.mc = currentMap[("enemy" + _local1)];
_local2.velocityX = 0;
_local2.velocityY = 0;
_local2.inAir = false;
if ((_local2.mc is Pinky)){
if (skillLevel == 1){
_local2.health = 70;
} else {
if (skillLevel == 2){
_local2.health = 100;
} else {
if (skillLevel == 3){
_local2.health = 150;
};
};
};
_local2.walkSpeed = 0.18;
_local2.actHeight = 63;
} else {
if ((_local2.mc is Baron)){
if (skillLevel == 1){
_local2.health = 300;
} else {
if (skillLevel == 2){
_local2.health = 400;
} else {
if (skillLevel == 3){
_local2.health = 500;
};
};
};
_local2.walkSpeed = 0.14;
_local2.actHeight = 80;
} else {
if ((_local2.mc is Cacodemon)){
if (skillLevel == 1){
_local2.health = 150;
} else {
if (skillLevel == 2){
_local2.health = 225;
} else {
if (skillLevel == 3){
_local2.health = 300;
};
};
};
_local2.walkSpeed = 0.12;
_local2.actHeight = 80;
} else {
if ((_local2.mc is LostSoul)){
if (skillLevel == 1){
_local2.health = 30;
} else {
if (skillLevel == 2){
_local2.health = 50;
} else {
if (skillLevel == 3){
_local2.health = 70;
};
};
};
_local2.walkSpeed = 0.18;
_local2.actHeight = 63;
} else {
if ((_local2.mc is ZombieMan)){
if (skillLevel == 1){
_local2.health = 20;
} else {
if (skillLevel == 2){
_local2.health = 30;
} else {
if (skillLevel == 3){
_local2.health = 40;
};
};
};
_local2.walkSpeed = 0.1;
_local2.actHeight = 63;
} else {
if ((_local2.mc is ShotgunGuy)){
if (skillLevel == 1){
_local2.health = 20;
} else {
if (skillLevel == 2){
_local2.health = 30;
} else {
if (skillLevel == 3){
_local2.health = 40;
};
};
};
_local2.walkSpeed = 0.1125;
_local2.actHeight = 63;
} else {
if ((_local2.mc is Imp)){
if (skillLevel == 1){
_local2.health = 30;
} else {
if (skillLevel == 2){
_local2.health = 50;
} else {
if (skillLevel == 3){
_local2.health = 70;
};
};
};
_local2.walkSpeed = 0.13;
_local2.actHeight = 63;
} else {
if ((_local2.mc is Cyberdemon)){
if (skillLevel == 1){
_local2.health = 800;
} else {
if (skillLevel == 2){
_local2.health = 900;
} else {
if (skillLevel == 3){
_local2.health = 1000;
};
};
};
_local2.walkSpeed = 0.15;
_local2.actHeight = 130;
} else {
if ((_local2.mc is Mastermind)){
if (skillLevel == 1){
_local2.health = 2000;
} else {
if (skillLevel == 2){
_local2.health = 2750;
} else {
if (skillLevel == 3){
_local2.health = 3500;
};
};
};
_local2.walkSpeed = 0.12;
_local2.actHeight = 100;
};
};
};
};
};
};
};
};
};
_local2.direction = 1;
_local2.animstate = "stand";
_local2.walkAnimation = new Array(2, 3, 4, 5);
_local2.attackAnimation = new Array(6, 7, 8);
_local2.shootAnimation = new Array(6, 7);
_local2.deathAnimation = new Array(9, 10, 11, 12, 13, 14);
_local2.animstep = 0;
_local2.deathAnim = true;
_local2.playerScanlineHit = false;
_local2.jump = false;
_local2.moveLeft = false;
_local2.moveRight = true;
_local2.moveUp = false;
_local2.moveDown = true;
_local2.attackNear = false;
_local2.attackWide = false;
_local2.enemyDead = false;
_local2.checkPlayerColl = true;
_local2.rocketPuffHit = false;
_local2.bfgPuffHit = false;
_local2.bfgPuff2hit = false;
_local2.pressedUse = false;
_local2.lastShotTime = 0;
_local2.lastScanTime = 0;
_local2.sawPlayerOnce = false;
_local2.enemyRandomShotTime = 0;
_local2.hitWallRight = false;
_local2.hitWallLeft = false;
_local2.hitWallUp = false;
_local2.hitWallDown = false;
_local2.jumpSpeed = 0.8;
_local2.shotSpeed = 1.2;
_local2.impBallSpeed = 0.35;
_local2.rocketSpeed = 0.4;
_local2.enemyDamage = 0;
_local2.width = 20;
_local2.height = 40;
enemies.push(_local2);
_local1++;
};
}
public function moveCharacter(_arg1:Object, _arg2:Number){
var verticalChange:Number;
var horizontalChange:*;
var newAnimState:String;
var newDirection:int;
var n:int;
var collWidth:Number;
var newY:Number;
var i:int;
var newX:Number;
var enemyShotTimeDiff:Number;
var shotTimeDiff:Number;
var hitTimeDiff:Number;
var poofFunction:Function;
var openDoor:Function;
var poofChannelHandler2:Function;
var char = _arg1;
var timeDiff = _arg2;
if (timeDiff < 1){
return;
};
verticalChange = ((char.velocityY + gravity) * timeDiff);
if (verticalChange > 50){
verticalChange = 50;
};
char.velocityY = (char.velocityY + (timeDiff * gravity));
horizontalChange = 0;
newAnimState = "stand";
newDirection = char.direction;
if (char.moveLeft == true){
horizontalChange = (-(char.walkSpeed) * timeDiff);
newAnimState = "walk";
newDirection = -1;
} else {
if (char.moveRight == true){
horizontalChange = (char.walkSpeed * timeDiff);
newAnimState = "walk";
newDirection = 1;
};
};
if ((((((char.moveUp == true)) && ((char.enemyDead == false)))) && ((((char.mc is Cacodemon)) || ((char.mc is LostSoul)))))){
verticalChange = -0.75;
if ((char.mc is LostSoul)){
char.walkSpeed = 0.18;
};
} else {
if ((((((char.moveDown == true)) && ((char.enemyDead == false)))) && ((((char.mc is Cacodemon)) || ((char.mc is LostSoul)))))){
verticalChange = 0.75;
if ((char.mc is LostSoul)){
char.walkSpeed = 0.18;
};
} else {
if ((((char.enemyDead == true)) && ((char.mc is LostSoul)))){
verticalChange = 0;
} else {
if ((((char.enemyDead == true)) && ((char.mc is Cacodemon)))){
verticalChange = 16;
};
};
};
};
if (char.jump == true){
char.jump = false;
char.velocityY = -(char.jumpSpeed);
verticalChange = -(char.jumpSpeed);
newAnimState = "inAir";
};
if ((((char.attackWide == true)) && ((player.playerDead == false)))){
enemyShoots(char);
if (char.lastShotTime == 0){
char.lastShotTime = getTimer();
};
enemyShotTimeDiff = (getTimer() - char.lastShotTime);
if ((((char.mc is ZombieMan)) || ((char.mc is Cyberdemon)))){
if (enemyShotTimeDiff >= 970){
char.lastShotTime = 0;
};
} else {
if ((char.mc is Mastermind)){
if (enemyShotTimeDiff >= 60){
char.lastShotTime = 0;
};
} else {
if ((char.mc is ShotgunGuy)){
if (enemyShotTimeDiff >= 1420){
char.lastShotTime = 0;
};
} else {
if ((((((char.mc is Imp)) || ((char.mc is Baron)))) || ((char.mc is Cacodemon)))){
if (enemyShotTimeDiff >= 1800){
char.lastShotTime = 0;
};
};
};
};
};
};
if ((((char.shoots == true)) || ((char.punches == true)))){
playerShootsPunches();
if (player.lastShotTime == 0){
player.lastShotTime = getTimer();
};
shotTimeDiff = (getTimer() - player.lastShotTime);
switch (player.currentWeapon){
case "fist":
newAnimState = "punch";
if (player.berserk == true){
player.weaponDamage = 100;
} else {
if (player.berserk == false){
player.weaponDamage = 10;
};
};
if (shotTimeDiff >= 500){
player.lastShotTime = 0;
};
break;
case "chainsaw":
newAnimState = "saw";
player.weaponDamage = 10;
if (shotTimeDiff >= 60){
player.lastShotTime = 0;
};
break;
case "pistol":
if (player.outOfBullets == false){
newAnimState = "shoot";
player.weaponDamage = 10;
if (shotTimeDiff >= 350){
player.lastShotTime = 0;
};
};
break;
case "shotgun":
if (player.outOfShells == false){
newAnimState = "shoot";
player.weaponDamage = 50;
if (shotTimeDiff >= 700){
player.lastShotTime = 0;
};
};
break;
case "chaingun":
if (player.outOfBullets == false){
newAnimState = "shoot";
player.weaponDamage = 10;
if (shotTimeDiff >= 50){
player.lastShotTime = 0;
};
};
break;
case "rocketlauncher":
if (player.outOfRockets == false){
newAnimState = "shoot";
player.weaponDamage = 100;
if (shotTimeDiff >= 520){
player.lastShotTime = 0;
};
};
break;
case "plasmagun":
if (player.outOfCells == false){
newAnimState = "shoot";
player.weaponDamage = 30;
if (shotTimeDiff >= 70){
player.lastShotTime = 0;
};
};
break;
case "bfg":
if ((((player.outOfCells == false)) && ((player.cells >= 40)))){
newAnimState = "shoot";
player.weaponDamage = 160;
if (shotTimeDiff >= 1500){
player.lastShotTime = 0;
};
};
break;
};
};
n = 0;
while (n < enemies.length) {
if ((((((((((enemies[n].mc is Pinky)) || ((enemies[n].mc is Imp)))) || ((enemies[n].mc is Baron)))) || ((enemies[n].mc is LostSoul)))) && ((char.attackNear == true)))){
char.attackNear = false;
if (player.playerDead == false){
newAnimState = "attackNear";
};
if (char.direction == 1){
char.moveRight = true;
} else {
if (char.direction == -1){
char.moveLeft = true;
};
};
};
if ((((((((((((((((enemies[n].mc is ZombieMan)) || ((enemies[n].mc is ShotgunGuy)))) || ((enemies[n].mc is Imp)))) || ((enemies[n].mc is Baron)))) || ((enemies[n].mc is Cacodemon)))) || ((enemies[n].mc is Cyberdemon)))) || ((enemies[n].mc is Mastermind)))) && ((char.attackWide == true)))){
char.attackWide = false;
if (player.playerDead == false){
newAnimState = "attackWide";
};
if (char.direction == 1){
char.moveRight = true;
} else {
if (char.direction == -1){
char.moveLeft = true;
};
};
};
n = (n + 1);
};
if (char.playerHit == true){
if (player.lastHitTime == 0){
player.lastHitTime = getTimer();
};
hitTimeDiff = (getTimer() - player.lastHitTime);
if (hitTimeDiff >= 100){
player.lastHitTime = 0;
};
char.playerHit = false;
newAnimState = "hit";
if ((((((player.shoots == true)) && ((((player.currentWeapon == "plasmagun")) || ((player.currentWeapon == "bfg")))))) && ((player.outOfCells == false)))){
newAnimState = "shoot";
} else {
if ((((((player.shoots == true)) && ((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))))) && ((player.outOfBullets == false)))){
newAnimState = "shoot";
} else {
if ((((((player.shoots == true)) && ((player.currentWeapon == "shotgun")))) && ((player.outOfShells == false)))){
newAnimState = "shoot";
} else {
if ((((player.punches == true)) && ((player.currentWeapon == "fist")))){
newAnimState = "punch";
} else {
if ((((player.punches == true)) && ((player.currentWeapon == "chainsaw")))){
newAnimState = "saw";
};
};
};
};
};
};
if (char.playerDead == true){
char.jump = false;
char.shoots = false;
char.punches = false;
char.mc.scaleX = -1;
char.moveLeft = false;
char.moveRight = false;
newAnimState = "playerDeath";
};
if (char.enemyDead == true){
char.moveLeft = false;
char.moveRight = false;
char.moveUp = false;
char.moveDown = false;
newAnimState = "enemyDeath";
};
char.hitWallRight = false;
char.hitWallLeft = false;
char.hitWallUp = false;
char.hitWallDown = false;
char.inAir = true;
if ((char.mc is Player)){
collWidth = (char.width / 1.25);
} else {
if ((char.mc is Baron)){
collWidth = (char.width * 1.25);
} else {
if ((char.mc is Cacodemon)){
collWidth = (char.width * 1.8);
} else {
if ((char.mc is Pinky)){
collWidth = (char.width * 1.75);
} else {
if ((((((char.mc is ZombieMan)) || ((char.mc is ShotgunGuy)))) || ((char.mc is Imp)))){
collWidth = (char.width * 1.15);
} else {
if ((char.mc is LostSoul)){
collWidth = char.width;
} else {
if ((char.mc is Cyberdemon)){
collWidth = (char.width * 2.3);
} else {
if ((char.mc is Mastermind)){
collWidth = (char.width * 5.4);
};
};
};
};
};
};
};
};
newY = (char.mc.y + verticalChange);
i = 0;
while (i < fixedObjects.length) {
if (((((char.mc.x + collWidth) > fixedObjects[i].leftside)) && (((char.mc.x - collWidth) < fixedObjects[i].rightside)))){
if ((((char.mc.y <= fixedObjects[i].topside)) && ((newY > fixedObjects[i].topside)))){
if ((((((((char.mc is LostSoul)) || ((char.mc is Cacodemon)))) && ((char.enemyDead == false)))) && ((((((fixedObjects[i].mc is woodleft)) || ((fixedObjects[i].mc is woodright)))) || ((fixedObjects[i].mc is grayline)))))){
break;
};
newY = fixedObjects[i].topside;
char.velocityY = 0;
char.inAir = false;
char.hitWallDown = true;
if ((((((((((fixedObjects[i].mc is nukage)) || ((fixedObjects[i].mc is lava)))) && ((player.playerDead == false)))) && ((char.mc is Player)))) && ((player.biosuit == false)))){
nukageHit(fixedObjects[i]);
};
break;
};
};
i = (i + 1);
};
i = 0;
while (i < fixedObjects.length) {
if (!(((((((((((((((((((((fixedObjects[i].mc is door1)) || ((fixedObjects[i].mc is door2)))) || ((fixedObjects[i].mc is bluedoor2)))) || ((fixedObjects[i].mc is reddoor2)))) || ((fixedObjects[i].mc is yellowdoor2)))) || ((fixedObjects[i].mc is exitdoor)))) || ((fixedObjects[i].mc is lionheaddoor)))) || ((fixedObjects[i].mc is skulldoor)))) || ((fixedObjects[i].mc is redlhdoor)))) || ((fixedObjects[i].mc is yellowlhdoor)))) || ((fixedObjects[i].mc is bluelhdoor)))){
if (((((char.mc.x + collWidth) > fixedObjects[i].leftside)) && (((char.mc.x - collWidth) < fixedObjects[i].rightside)))){
if ((((newY > fixedObjects[i].topside)) && (((newY - char.mc.height) < fixedObjects[i].bottomside)))){
newY = (fixedObjects[i].bottomside + char.mc.height);
char.velocityY = 0;
char.inAir = true;
char.hitWallUp = true;
break;
};
};
};
i = (i + 1);
};
newX = (char.mc.x + horizontalChange);
i = 0;
while (i < fixedObjects.length) {
if ((((newY > fixedObjects[i].topside)) && (((newY - char.height) < fixedObjects[i].bottomside)))){
if (((((char.mc.x - collWidth) >= fixedObjects[i].rightside)) && (((newX - collWidth) <= fixedObjects[i].rightside)))){
newX = (fixedObjects[i].rightside + collWidth);
char.hitWallLeft = true;
break;
};
if (((((char.mc.x + collWidth) <= fixedObjects[i].leftside)) && (((newX + collWidth) >= fixedObjects[i].leftside)))){
newX = (fixedObjects[i].leftside - collWidth);
char.hitWallRight = true;
break;
};
};
i = (i + 1);
};
i = 0;
while (i < fixedObjects.length) {
if (char.mc.hitTestObject(fixedObjects[i].mc)){
if (char.pressedUse == true){
if ((((((((((((((((((((((fixedObjects[i].mc is door1)) || ((fixedObjects[i].mc is door2)))) || ((fixedObjects[i].mc is bluedoor2)))) || ((fixedObjects[i].mc is reddoor2)))) || ((fixedObjects[i].mc is yellowdoor2)))) || ((fixedObjects[i].mc is exitdoor)))) || ((fixedObjects[i].mc is lionheaddoor)))) || ((fixedObjects[i].mc is skulldoor)))) || ((fixedObjects[i].mc is redlhdoor)))) || ((fixedObjects[i].mc is yellowlhdoor)))) || ((fixedObjects[i].mc is bluelhdoor)))){
poofFunction = function ():void{
var poofChannelHandler:Function;
poofChannelHandler = function (_arg1:Event):void{
poofChannel = null;
};
if (poofChannel == null){
poofChannel = poof.play();
};
poofChannel.addEventListener(Event.SOUND_COMPLETE, poofChannelHandler);
};
openDoor = function ():void{
doorOpen.play();
fixedObjects[i].mc.y = (fixedObjects[i].mc.y - (fixedObjects[i].mc.height - 14));
examineMap();
fixedObjects[i].isOpen = true;
closeDoor(fixedObjects[i]);
};
char.pressedUse = false;
char.hitsDoor = false;
if ((((((((((fixedObjects[i].mc is door1)) || ((fixedObjects[i].mc is door2)))) || ((fixedObjects[i].mc is exitdoor)))) || ((fixedObjects[i].mc is lionheaddoor)))) || ((fixedObjects[i].mc is skulldoor)))){
if (fixedObjects[i].isOpen == false){
player.hitsDoor = true;
openDoor();
};
} else {
if ((((fixedObjects[i].mc is bluedoor2)) || ((fixedObjects[i].mc is bluelhdoor)))){
if (fixedObjects[i].isOpen == false){
player.hitsDoor = true;
if (player.bluekey == true){
openDoor();
} else {
if (player.bluekey == false){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you need a blue key to open this door.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
poofFunction();
};
};
};
} else {
if ((((fixedObjects[i].mc is reddoor2)) || ((fixedObjects[i].mc is redlhdoor)))){
if (fixedObjects[i].isOpen == false){
player.hitsDoor = true;
if (player.redkey == true){
openDoor();
} else {
if (player.redkey == false){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you need a red key to open this door.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
poofFunction();
};
};
};
} else {
if ((((fixedObjects[i].mc is yellowdoor2)) || ((fixedObjects[i].mc is yellowlhdoor)))){
if (fixedObjects[i].isOpen == false){
player.hitsDoor = true;
if (player.yellowkey == true){
openDoor();
} else {
if (player.yellowkey == false){
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "you need a yellow key to open this door.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
poofFunction();
};
};
};
};
};
};
};
} else {
if ((((fixedObjects[i].mc is exitswitch)) || ((fixedObjects[i].mc is exitswitch2)))){
char.pressedUse = false;
fixedObjects[i].mc.gotoAndPlay("exitOn");
secretExitToSecretMap = false;
secretExitFromSecretMap = false;
levelComplete();
} else {
if ((fixedObjects[i].mc is secretExitswitchToSecretMap)){
char.pressedUse = false;
fixedObjects[i].mc.gotoAndPlay("exitOn");
secretExitToSecretMap = true;
levelComplete();
} else {
if ((fixedObjects[i].mc is secretExitswitchFromSecretMap)){
char.pressedUse = false;
fixedObjects[i].mc.gotoAndPlay("exitOn");
secretExitFromSecretMap = true;
levelComplete();
} else {
if ((((fixedObjects[i].mc is floorTile)) && ((((player.hitWallLeft == true)) || ((player.hitWallRight == true)))))){
if (player.hitsDoor == false){
poofChannelHandler2 = function (_arg1:Event):void{
poofChannel = null;
};
if (poofChannel == null){
poofChannel = poof.play();
};
poofChannel.addEventListener(Event.SOUND_COMPLETE, poofChannelHandler2);
};
};
};
};
};
};
};
};
i = (i + 1);
};
char.mc.x = newX;
char.mc.y = newY;
if (char.inAir == true){
newAnimState = "inAir";
if ((((char.mc is LostSoul)) || ((char.mc is Cacodemon)))){
newAnimState = "walk";
};
if (char.shoots == true){
if ((((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))) && ((player.outOfBullets == false)))){
newAnimState = "shoot";
} else {
if ((((player.currentWeapon == "shotgun")) && ((player.outOfShells == false)))){
newAnimState = "shoot";
} else {
if ((((player.currentWeapon == "rocketlauncher")) && ((player.outOfRockets == false)))){
newAnimState = "shoot";
} else {
if ((((player.currentWeapon == "plasmagun")) && ((player.outOfCells == false)))){
newAnimState = "shoot";
} else {
if ((((((player.currentWeapon == "bfg")) && ((player.outOfCells == false)))) && ((player.cells >= 40)))){
newAnimState = "shoot";
};
};
};
};
};
} else {
if (char.punches == true){
if (player.currentWeapon == "fist"){
newAnimState = "punch";
} else {
if (player.currentWeapon == "chainsaw"){
newAnimState = "saw";
};
};
} else {
if (char.playerDead == true){
newAnimState = "playerDeath";
} else {
if (char.enemyDead == true){
newAnimState = "enemyDeath";
};
};
};
};
};
char.animstate = newAnimState;
if (char.animstate == "walk"){
if ((((char.mc is Player)) || ((char.mc is Pinky)))){
char.animstep = (char.animstep + (timeDiff / 120));
} else {
if ((((char.mc is ZombieMan)) || ((char.mc is Cacodemon)))){
char.animstep = (char.animstep + (timeDiff / 200));
} else {
if ((char.mc is LostSoul)){
char.animstep = (char.animstep + (timeDiff / 280));
} else {
if ((((((char.mc is ShotgunGuy)) || ((char.mc is Imp)))) || ((char.mc is Cyberdemon)))){
char.animstep = (char.animstep + (timeDiff / 180));
} else {
if ((((char.mc is Baron)) || ((char.mc is Mastermind)))){
char.animstep = (char.animstep + (timeDiff / 150));
};
};
};
};
};
if (char.animstep > char.walkAnimation.length){
char.animstep = 0;
if ((char.mc is Cyberdemon)){
if ((((char.mc.x >= (player.mc.x - 460))) && ((char.mc.x <= (player.mc.x + 460))))){
cyberWalk.play();
};
};
if ((char.mc is Mastermind)){
if ((((char.mc.x >= (player.mc.x - 460))) && ((char.mc.x <= (player.mc.x + 460))))){
masterWalk2.play();
};
};
};
char.mc.gotoAndStop(char.walkAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "punch"){
char.animstep = (char.animstep + (timeDiff / 263));
if (char.animstep > char.fistAnimation.length){
char.animstep = 0;
};
char.mc.gotoAndStop(char.fistAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "saw"){
char.animstep = (char.animstep + (timeDiff / 200));
if (char.animstep > char.sawAnimation.length){
char.animstep = 0;
};
char.mc.gotoAndStop(char.sawAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "shoot"){
switch (player.currentWeapon){
case "pistol":
char.animstep = (char.animstep + (timeDiff / 200));
break;
case "shotgun":
char.animstep = (char.animstep + (timeDiff / 355));
break;
case "chaingun":
char.animstep = (char.animstep + (timeDiff / 60));
break;
case "rocketlauncher":
char.animstep = (char.animstep + (timeDiff / 276));
break;
case "plasmagun":
char.animstep = (char.animstep + (timeDiff / 180));
break;
case "bfg":
char.animstep = (char.animstep + (timeDiff / 1000));
break;
};
if (char.animstep > char.shootAnimation.length){
char.animstep = 0;
};
char.mc.gotoAndStop(char.shootAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "hit"){
char.animstep = (char.animstep + (timeDiff / 200));
if (char.animstep > char.hitAnimation.length){
char.animstep = 0;
};
char.mc.gotoAndStop(char.hitAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "attackNear"){
if ((((char.mc is Pinky)) || ((char.mc is LostSoul)))){
char.animstep = (char.animstep + (timeDiff / 200));
} else {
if ((((char.mc is Imp)) || ((char.mc is Baron)))){
char.animstep = (char.animstep + (timeDiff / 250));
};
};
if (char.animstep > char.attackAnimation.length){
char.animstep = 0;
};
char.mc.gotoAndStop(char.attackAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "attackWide"){
if ((char.mc is ZombieMan)){
char.animstep = (char.animstep + (timeDiff / 500));
} else {
if ((char.mc is ShotgunGuy)){
char.animstep = (char.animstep + (timeDiff / 720));
} else {
if ((((((((((char.mc is Imp)) || ((char.mc is Baron)))) || ((char.mc is Cacodemon)))) || ((char.mc is Cyberdemon)))) || ((char.mc is Mastermind)))){
char.animstep = (char.animstep + (timeDiff / 600));
};
};
};
if (char.animstep > char.shootAnimation.length){
char.animstep = 0;
};
char.mc.gotoAndStop(char.shootAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "playerDeath"){
if (char.deathAnim == true){
char.animstep = 0;
char.deathAnim = false;
};
char.animstep = (char.animstep + (timeDiff / 280));
if (char.animstep >= char.deathAnimation.length){
char.animstep = 6;
};
char.mc.gotoAndStop(char.deathAnimation[Math.floor(char.animstep)]);
} else {
if (char.animstate == "enemyDeath"){
if (char.deathAnim == true){
char.animstep = 0;
char.deathAnim = false;
};
if (!(((char.mc is Cyberdemon)) || ((char.mc is Mastermind)))){
if ((((char.mc is Cacodemon)) || ((char.mc is Pinky)))){
char.animstep = (char.animstep + (timeDiff / 200));
} else {
char.animstep = (char.animstep + (timeDiff / 180));
};
};
if ((((char.mc is Cyberdemon)) || ((char.mc is Mastermind)))){
char.animstep = (char.animstep + (timeDiff / 540));
};
if (char.animstep >= char.deathAnimation.length){
char.animstep = 5;
};
char.mc.gotoAndStop(char.deathAnimation[Math.floor(char.animstep)]);
} else {
char.mc.gotoAndStop(char.animstate);
};
};
};
};
};
};
};
};
};
if (newDirection != char.direction){
char.direction = newDirection;
char.mc.scaleX = char.direction;
};
}
public function runBiosuitTimer():void{
biosuitAlpha.alpha = 0.25;
biosuitTimer.addEventListener(TimerEvent.TIMER_COMPLETE, bioTimeHandler);
biosuitBlinkScreenTimer.addEventListener(TimerEvent.TIMER_COMPLETE, biosuitBlinkScreenHandler);
biosuitTimer.start();
biosuitBlinkScreenTimer.start();
}
public function mouseDownHandler(_arg1:MouseEvent):void{
if ((((player.outOfAmmo == false)) && (((!((player.currentWeapon == "fist"))) && (!((player.currentWeapon == "chainsaw"))))))){
player.shoots = true;
} else {
if ((((player.currentWeapon == "fist")) || ((player.currentWeapon == "chainsaw")))){
player.punches = true;
};
};
}
public function playerDies():void{
var DeathPicTimer:Timer;
var DeathPicTimerHandler:Function;
DeathPicTimerHandler = function (_arg1:TimerEvent):void{
var deathpic:MovieClip;
var restart_btn:SimpleButton;
var moveMetalhand_:Function;
var showMetalhand_:Function;
var showMouse_:Function;
var restartMap:Function;
var evt = _arg1;
moveMetalhand_ = function (_arg1:Event):void{
metalhand.x = mouseX;
metalhand.y = mouseY;
};
showMetalhand_ = function (_arg1:MouseEvent):void{
Mouse.hide();
metalhand.alpha = 1;
};
showMouse_ = function (_arg1:MouseEvent):void{
Mouse.show();
metalhand.alpha = 0;
};
restartMap = function (_arg1:MouseEvent):void{
restart_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand_);
restart_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse_);
removeEventListener(Event.ENTER_FRAME, moveMetalhand_);
removeChild(metalhand);
removeChild(deathpic);
removeChild(restart_btn);
restart();
};
musicChannel.stop();
musicChannel = intermission.play();
DeathPicTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, DeathPicTimerHandler);
deathpic = new Deathpic();
deathpic.alpha = 0.85;
deathpic.x = 175;
deathpic.y = 220;
deathpic.mouseEnabled = false;
addChild(deathpic);
restart_btn = new RestartButton();
restart_btn.alpha = 0.85;
restart_btn.x = (deathpic.x + (deathpic.width / 2));
restart_btn.y = 340;
addChild(restart_btn);
Mouse.show();
allowRollOut();
addChild(metalhand);
metalhand.alpha = 0;
metalhand.mouseEnabled = false;
addEventListener(Event.ENTER_FRAME, moveMetalhand_);
restart_btn.addEventListener(MouseEvent.ROLL_OVER, showMetalhand_);
restart_btn.addEventListener(MouseEvent.ROLL_OUT, showMouse_);
restart_btn.addEventListener(MouseEvent.MOUSE_DOWN, restartMap);
};
if (player.armor <= 0){
player.armor = 0;
};
if (player.health <= 0){
player.health = 0;
};
playerHurtChannel.stop();
playerHurtChannel = playerDeath.play();
playerHurtChannel = null;
player.playerDead = true;
currentMap.setChildIndex(player.mc, 20);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
DeathPicTimer = new Timer(3000, 1);
DeathPicTimer.addEventListener(TimerEvent.TIMER_COMPLETE, DeathPicTimerHandler);
DeathPicTimer.start();
}
public function cleanOverlayTimers():void{
biosuitTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, bioTimeHandler);
biosuitBlinkScreenTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, biosuitBlinkScreenHandler);
blinkingTimer.removeEventListener(TimerEvent.TIMER, blinkingHandler);
berserkTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, berserkHandler);
berserkScreenTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, berserkScreenHandler);
berserkBlinkingTimer.removeEventListener(TimerEvent.TIMER, berserkBlinkingHandler);
}
public function chooseSkill(_arg1:MouseEvent):void{
chooseSkill_txt.alpha = 0.75;
start_btn.mouseEnabled = false;
ctrl_btn.mouseEnabled = false;
about_btn.mouseEnabled = false;
back_btn.mouseEnabled = false;
start_btn.alpha = 0;
ctrl_btn.alpha = 0;
about_btn.alpha = 0;
ctrl_txt.alpha = 0;
back_btn.alpha = 0;
heyNotTooRough_btn.alpha = 0.75;
hurtMePlenty_btn.alpha = 0.75;
ultraViolence_btn.alpha = 0.75;
heyNotTooRough_btn.mouseEnabled = true;
hurtMePlenty_btn.mouseEnabled = true;
ultraViolence_btn.mouseEnabled = true;
}
public function playDoomNotTooRough(_arg1:MouseEvent):void{
skillLevel = 1;
cleanMenu();
}
public function showAbout(_arg1:MouseEvent):void{
start_btn.mouseEnabled = false;
ctrl_btn.mouseEnabled = false;
about_btn.mouseEnabled = false;
back_btn.mouseEnabled = true;
start_btn.alpha = 0;
ctrl_btn.alpha = 0;
about_btn.alpha = 0;
about_txt.alpha = 0.75;
back_btn.alpha = 0.75;
}
public function nukageHit(_arg1:Object):void{
var _local2:Number;
if (player.lastHitAnimTime == 0){
playerHurt(_arg1);
player.lastHitAnimTime = getTimer();
};
_local2 = (getTimer() - player.lastHitAnimTime);
if (_local2 >= 1500){
player.lastHitAnimTime = 0;
};
}
public function playerHurt(_arg1:Object):void{
var playerHurtHandler:Function;
var enemyRace = _arg1;
playerHurtHandler = function (_arg1:Event):void{
playerHurtChannel = null;
};
player.playerHit = true;
if ((enemyRace.mc is Pinky)){
if (skillLevel == 1){
enemyRace.enemyDamage = 0.5;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 1;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 1.5;
};
};
};
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
} else {
if ((enemyRace.mc is LostSoul)){
if (skillLevel == 1){
enemyRace.enemyDamage = 0.5;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 0.75;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 1;
};
};
};
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
} else {
if ((enemyRace.mc is Mastermind)){
if (skillLevel == 1){
enemyRace.enemyDamage = 6;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 8;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 10;
};
};
};
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
} else {
if ((enemyRace.mc is ZombieMan)){
if (skillLevel == 1){
enemyRace.enemyDamage = 4;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 6;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 8;
};
};
};
playerHurtChannel = playerHurtSound.play();
} else {
if ((enemyRace.mc is ShotgunGuy)){
if (skillLevel == 1){
enemyRace.enemyDamage = 10;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 15;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 20;
};
};
};
playerHurtChannel = playerHurtSound.play();
} else {
if ((enemyRace.mc is Cyberdemon)){
if (skillLevel == 1){
enemyRace.enemyDamage = 60;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 70;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 80;
};
};
};
playerHurtChannel = playerHurtSound.play();
} else {
if ((enemyRace.mc is Imp)){
if (enemyRace.attackNear == true){
if (skillLevel == 1){
enemyRace.enemyDamage = 0.5;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 1;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 1.5;
};
};
};
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
} else {
if (skillLevel == 1){
enemyRace.enemyDamage = 10;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 12.5;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 15;
};
};
};
playerHurtChannel = playerHurtSound.play();
};
} else {
if ((enemyRace.mc is Baron)){
if (enemyRace.attackNear == true){
if (skillLevel == 1){
enemyRace.enemyDamage = 2;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 2.5;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 3;
};
};
};
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
} else {
if (skillLevel == 1){
enemyRace.enemyDamage = 20;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 25;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 30;
};
};
};
playerHurtChannel = playerHurtSound.play();
};
} else {
if ((enemyRace.mc is Cacodemon)){
if (skillLevel == 1){
enemyRace.enemyDamage = 20;
} else {
if (skillLevel == 2){
enemyRace.enemyDamage = 25;
} else {
if (skillLevel == 3){
enemyRace.enemyDamage = 30;
};
};
};
playerHurtChannel = playerHurtSound.play();
} else {
if ((enemyRace.mc is nukage)){
enemyRace.enemyDamage = 7;
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
} else {
if ((enemyRace.mc is lava)){
enemyRace.enemyDamage = 12;
if (playerHurtChannel == null){
playerHurtChannel = playerHurtSound.play();
};
};
};
};
};
};
};
};
};
};
};
};
playerHurtChannel.addEventListener(Event.SOUND_COMPLETE, playerHurtHandler);
if ((((((((((((((((((((player.lastHitTime == 0)) || ((enemyRace.mc is ZombieMan)))) || ((enemyRace.mc is ShotgunGuy)))) || ((enemyRace.mc is Cacodemon)))) || ((enemyRace.mc is Cyberdemon)))) || ((enemyRace.mc is Mastermind)))) || ((((enemyRace.mc is Imp)) && ((enemyRace.attackNear == false)))))) || ((enemyRace.mc is nukage)))) || ((((enemyRace.mc is Baron)) && ((enemyRace.attackNear == false)))))) || ((enemyRace.mc is lava)))){
if (player.armor > 0){
player.armor = (player.armor - (enemyRace.enemyDamage * 0.4));
player.health = (player.health - (enemyRace.enemyDamage * 0.6));
} else {
if (player.armor < 1){
player.health = (player.health - enemyRace.enemyDamage);
player.armor = 0;
};
};
if (player.health < 1){
playerDies();
};
};
}
public function keyDownFunction(_arg1:KeyboardEvent){
var switchWeapons:Function;
var playMusicAgainPos:Function;
var setChainsawTaken:Function;
var evt = _arg1;
switchWeapons = function (_arg1:String):void{
var nextWeaponBfgTimer:Timer;
var nextWeaponAfterBfg:Function;
var weapon = _arg1;
nextWeaponAfterBfg = function (_arg1:TimerEvent):void{
player.currentWeapon = weapon;
switchHUDWeapons(player.currentWeapon);
nextWeaponBfgTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, nextWeaponAfterBfg);
};
nextWeaponBfgTimer = new Timer(750, 1);
nextWeaponBfgTimer.addEventListener(TimerEvent.TIMER_COMPLETE, nextWeaponAfterBfg);
nextWeaponBfgTimer.start();
};
if (gameMode != "game"){
return;
};
if ((((evt.keyCode == Keyboard.LEFT)) || ((evt.charCode == 97)))){
if (player.blockLeft == false){
player.moveLeft = true;
};
if (player.blockRotate == true){
player.mc.scaleX = -1;
player.direction = -1;
};
} else {
if ((((evt.keyCode == Keyboard.RIGHT)) || ((evt.charCode == 100)))){
if (player.blockRight == false){
player.moveRight = true;
};
if (player.blockRotate == true){
player.mc.scaleX = 1;
player.direction = 1;
};
} else {
if ((((evt.keyCode == Keyboard.UP)) || ((evt.charCode == 119)))){
if (!player.inAir){
player.jump = true;
};
} else {
if (evt.keyCode == Keyboard.CONTROL){
if ((((player.outOfAmmo == false)) && (((!((player.currentWeapon == "fist"))) && (!((player.currentWeapon == "chainsaw"))))))){
player.shoots = true;
} else {
if ((((player.currentWeapon == "fist")) || ((player.currentWeapon == "chainsaw")))){
player.punches = true;
};
};
} else {
if (evt.keyCode == Keyboard.SPACE){
player.pressedUse = true;
} else {
if (evt.charCode == 109){
if (musicIsStopped == false){
Mute_mc.nextFrame();
lastMusicPosition = musicChannel.position;
musicChannel.stop();
musicIsStopped = true;
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "music turned off.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
} else {
if (musicIsStopped == true){
playMusicAgainPos = function (_arg1:Event):void{
lastMusicPosition = 0;
musicChannel = currentMusic.play(lastMusicPosition);
musicChannel.addEventListener(Event.SOUND_COMPLETE, playMusicAgainPos);
};
Mute_mc.prevFrame();
musicChannel = currentMusic.play(lastMusicPosition);
musicIsStopped = false;
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "music turned on.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
musicChannel.addEventListener(Event.SOUND_COMPLETE, playMusicAgainPos);
};
};
} else {
if (evt.charCode == 111){
if (player.autoswitch == true){
player.autoswitch = false;
Autoswitch_mc.nextFrame();
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "autoswitch weapon off.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
} else {
if (player.autoswitch == false){
player.autoswitch = true;
Autoswitch_mc.prevFrame();
PickupTextBox_mc.alpha = 0.85;
pickup_txt.text = "autoswitch weapon on.";
pickup_txt.setTextFormat(doomFormat);
if (pickup_txtTimerValue == false){
pickup_txtTimerFunction();
};
};
};
} else {
if (evt.charCode == 49){
if ((((((((player.currentWeapon == "chainsaw")) || ((player.chainsaw == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("fist");
} else {
player.currentWeapon = "fist";
switchHUDWeapons(player.currentWeapon);
};
} else {
if (((((((!((player.currentWeapon == "chainsaw"))) && ((player.chainsaw == true)))) && ((player.shoots == false)))) && ((player.punches == false)))){
player.chainsawPulled = false;
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("chainsaw");
} else {
setChainsawTaken = function (_arg1:Event):void{
player.chainsawPulled = true;
};
player.currentWeapon = "chainsaw";
switchHUDWeapons(player.currentWeapon);
sawTakeChannel = sawTake.play();
sawTakeChannel.addEventListener(Event.SOUND_COMPLETE, setChainsawTaken);
};
};
};
} else {
if (evt.charCode == 50){
if ((((((((player.pistol == true)) && ((player.outOfBullets == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("pistol");
} else {
player.currentWeapon = "pistol";
switchHUDWeapons(player.currentWeapon);
};
};
} else {
if (evt.charCode == 51){
if ((((((((player.shotgun == true)) && ((player.outOfShells == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("shotgun");
} else {
player.currentWeapon = "shotgun";
switchHUDWeapons(player.currentWeapon);
};
};
} else {
if (evt.charCode == 52){
if ((((((((player.chaingun == true)) && ((player.outOfBullets == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("chaingun");
} else {
player.currentWeapon = "chaingun";
switchHUDWeapons(player.currentWeapon);
};
};
} else {
if (evt.charCode == 53){
if ((((((((player.rocketlauncher == true)) && ((player.outOfRockets == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("rocketlauncher");
} else {
player.currentWeapon = "rocketlauncher";
switchHUDWeapons(player.currentWeapon);
};
};
} else {
if (evt.charCode == 54){
if ((((((((player.plasmagun == true)) && ((player.outOfCells == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
if ((((player.currentWeapon == "bfg")) && ((player.bfgShot == true)))){
switchWeapons("plasmagun");
} else {
player.currentWeapon = "plasmagun";
switchHUDWeapons(player.currentWeapon);
};
};
} else {
if (evt.charCode == 55){
if ((((((((player.bfg == true)) && ((player.outOfCells == false)))) && ((player.shoots == false)))) && ((player.punches == false)))){
player.currentWeapon = "bfg";
switchHUDWeapons(player.currentWeapon);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function mouseOutHandler(_arg1:Event):void{
if ((((player.shoots == true)) || ((player.punches == true)))){
player.shoots = false;
player.punches = false;
};
}
public function checkCollisions():void{
var i:int;
var enemySpotPlayerFirstTime:Function;
var secret_txt:TextField;
var secret_txtTimer:Timer;
var secret_txtHandler:Function;
var playerLeftside:Number;
var playerRightside:Number;
var playerUpside:Number;
var playerDownside:Number;
var enemyLeftside:Number;
var enemyRightside:Number;
var enemyUpside:Number;
var enemyDownside:Number;
var k:int;
var j:int;
var impAttackNearChannelHandler:Function;
enemySpotPlayerFirstTime = function (_arg1:Object):void{
var _local2:Number;
var _local3:Number;
if ((((((((((((((_arg1.direction == 1)) && ((player.direction == 1)))) && ((_arg1.mc.x < player.mc.x)))) || ((((((_arg1.direction == -1)) && ((player.direction == -1)))) && ((_arg1.mc.x > player.mc.x)))))) || ((((((_arg1.direction == 1)) && ((player.direction == -1)))) && ((_arg1.mc.x < player.mc.x)))))) || ((((((_arg1.direction == -1)) && ((player.direction == 1)))) && ((_arg1.mc.x > player.mc.x)))))) && ((player.playerDead == false)))){
if (_arg1.sawPlayerOnce == false){
_arg1.sawPlayerOnce = true;
if ((_arg1.mc is Pinky)){
pinkySpot.play();
} else {
if ((_arg1.mc is Cacodemon)){
cacoSpot.play();
} else {
if ((_arg1.mc is Cyberdemon)){
cyberSpot.play();
} else {
if ((_arg1.mc is Mastermind)){
masterSpot.play();
} else {
if ((_arg1.mc is Baron)){
baronSpot.play();
} else {
if ((_arg1.mc is Imp)){
_local2 = Math.round((Math.random() * 1));
if (_local2 == 0){
impChannel2 = impSpot1.play();
} else {
if (_local2 == 1){
impChannel2 = impSpot2.play();
};
};
} else {
if ((((_arg1.mc is ZombieMan)) || ((_arg1.mc is ShotgunGuy)))){
_local3 = Math.round((Math.random() * 2));
if (_local3 == 0){
zombieChannel3 = zombieSpot1.play();
} else {
if (_local3 == 1){
zombieChannel3 = zombieSpot2.play();
} else {
if (_local3 == 2){
zombieChannel3 = zombieSpot3.play();
};
};
};
};
};
};
};
};
};
};
};
};
};
player.blockRight = false;
player.blockLeft = false;
player.blockRotate = false;
scanline.x = player.mc.x;
scanline.y = (player.mc.y - (player.mc.height / 2));
k = 0;
while (k < secrets.length) {
if (player.mc.hitTestObject(secrets[k].mc)){
secret_txtHandler = function (_arg1:TimerEvent):void{
currentMap.removeChild(secret_txt);
secret_txtTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, secret_txtHandler);
};
foundSecrets++;
secret.play();
currentMap.removeChild(secrets[k].mc);
secrets.splice(secrets[k], 1);
secret_txt = new TextField();
secret_txt.text = "a secret is revealed";
secret_txt.x = (player.mc.x - 97);
secret_txt.y = (player.mc.y - (player.mc.height / 2));
secret_txt.embedFonts = true;
secret_txt.mouseEnabled = false;
secret_txt.selectable = false;
secret_txt.setTextFormat(doomFormat);
secret_txt.width = 200;
secret_txt.alpha = 0.75;
secret_txt.textColor = 0xFFFF00;
currentMap.addChild(secret_txt);
secret_txtTimer = new Timer(2500, 1);
secret_txtTimer.addEventListener(TimerEvent.TIMER_COMPLETE, secret_txtHandler);
secret_txtTimer.start();
};
k = (k + 1);
};
i = (enemies.length - 1);
while (i >= 0) {
if (enemies[i].checkPlayerColl == true){
playerLeftside = (player.mc.x - (player.mc.width / 2));
playerRightside = (player.mc.x + (player.mc.width / 2));
playerUpside = (player.mc.y + player.mc.height);
playerDownside = player.mc.y;
enemyLeftside = (enemies[i].mc.x - (enemies[i].mc.width / 2));
enemyRightside = (enemies[i].mc.x + (enemies[i].mc.width / 2));
enemyUpside = (enemies[i].mc.y + enemies[i].mc.height);
enemyDownside = enemies[i].mc.y;
enemies[i].playerScanlineHit = false;
k = 0;
while (k < enemyBlockBoxes.length) {
if (((enemies[i].mc.hitTestObject(enemyBlockBoxes[k].mc)) && ((enemies[i].sawPlayerOnce == false)))){
if ((enemyBlockBoxes[k].mc is enemyBlockBox)){
if (enemies[i].moveRight == true){
enemies[i].moveRight = false;
enemies[i].moveLeft = true;
enemies[i].mc.x = (enemyBlockBoxes[k].mc.x - (enemies[i].mc.width / 1.5));
break;
} else {
if (enemies[i].moveLeft == true){
enemies[i].moveLeft = false;
enemies[i].moveRight = true;
enemies[i].mc.x = ((enemyBlockBoxes[k].mc.x + enemyBlockBoxes[k].mc.width) + (enemies[i].mc.width / 1.5));
break;
};
};
} else {
if ((enemyBlockBoxes[k].mc is enemyBlockBoxAir)){
if (enemies[i].moveUp == true){
enemies[i].moveUp = false;
enemies[i].moveDown = true;
break;
} else {
if (enemies[i].moveDown == true){
enemies[i].moveDown = false;
enemies[i].moveUp = true;
break;
};
};
};
};
};
k = (k + 1);
};
if (scanline.hitTestObject(enemies[i].mc)){
enemies[i].playerScanlineHit = true;
};
j = 0;
while (j < fixedObjects.length) {
if (scanline.hitTestObject(fixedObjects[j].mc)){
if ((((((fixedObjects[j].mc.x > player.mc.x)) && ((fixedObjects[j].mc.x < enemies[i].mc.x)))) && ((fixedObjects[j].blocks == true)))){
enemies[i].playerScanlineHit = false;
};
if ((((((fixedObjects[j].mc.x < player.mc.x)) && ((fixedObjects[j].mc.x > enemies[i].mc.x)))) && ((fixedObjects[j].blocks == true)))){
enemies[i].playerScanlineHit = false;
};
};
j = (j + 1);
};
if ((((enemies[i].mc is Pinky)) || ((enemies[i].mc is LostSoul)))){
if ((((((player.mc.y >= (enemies[i].mc.y - enemies[i].actHeight))) && ((player.mc.y <= (enemies[i].mc.y + enemies[i].actHeight))))) && ((enemies[i].playerScanlineHit == true)))){
enemySpotPlayerFirstTime(enemies[i]);
if ((enemies[i].mc is Pinky)){
if (((((enemyLeftside - playerRightside) > 0)) && (((enemyLeftside - playerRightside) < 200)))){
enemies[i].mc.scaleX = -1;
enemies[i].direction = -1;
if (enemies[i].moveRight == true){
enemies[i].moveRight = false;
enemies[i].moveLeft = true;
};
} else {
if (((((playerLeftside - enemyRightside) > 0)) && (((playerLeftside - enemyRightside) < 200)))){
enemies[i].mc.scaleX = 1;
enemies[i].direction = 1;
if (enemies[i].moveLeft == true){
enemies[i].moveLeft = false;
enemies[i].moveRight = true;
};
};
};
};
if ((enemies[i].mc is LostSoul)){
if (((((enemyLeftside - playerRightside) > 0)) && (((enemyLeftside - playerRightside) < 150)))){
enemies[i].walkSpeed = 0.31;
enemies[i].mc.gotoAndPlay("attackNear");
enemies[i].mc.scaleX = -1;
enemies[i].direction = -1;
if (enemies[i].moveRight == true){
enemies[i].moveRight = false;
enemies[i].moveLeft = true;
};
} else {
if (((((playerLeftside - enemyRightside) > 0)) && (((playerLeftside - enemyRightside) < 150)))){
enemies[i].walkSpeed = 0.31;
enemies[i].mc.gotoAndPlay("attackNear");
enemies[i].mc.scaleX = 1;
enemies[i].direction = 1;
if (enemies[i].moveLeft == true){
enemies[i].moveLeft = false;
enemies[i].moveRight = true;
};
};
};
if (player.mc.y >= enemies[i].mc.y){
enemies[i].moveUp = false;
enemies[i].moveDown = true;
} else {
if (player.mc.y <= enemies[i].mc.y){
enemies[i].moveUp = true;
enemies[i].moveDown = false;
};
};
};
};
};
if ((((((((((((((enemies[i].mc is ZombieMan)) || ((enemies[i].mc is ShotgunGuy)))) || ((enemies[i].mc is Imp)))) || ((enemies[i].mc is Baron)))) || ((enemies[i].mc is Cacodemon)))) || ((enemies[i].mc is Cyberdemon)))) || ((enemies[i].mc is Mastermind)))){
if ((((((player.mc.y >= (enemies[i].mc.y - enemies[i].actHeight))) && ((player.mc.y <= (enemies[i].mc.y + enemies[i].actHeight))))) && ((enemies[i].playerScanlineHit == true)))){
enemySpotPlayerFirstTime(enemies[i]);
if ((enemies[i].mc is Cacodemon)){
if (player.mc.y >= enemies[i].mc.y){
enemies[i].moveUp = false;
enemies[i].moveDown = true;
} else {
if (player.mc.y <= enemies[i].mc.y){
enemies[i].moveUp = true;
enemies[i].moveDown = false;
};
};
};
if (((((enemyLeftside - playerRightside) > 0)) && (((enemyLeftside - playerRightside) < 300)))){
enemies[i].mc.scaleX = -1;
enemies[i].direction = -1;
enemies[i].moveRight = false;
enemies[i].moveLeft = true;
initRandomShot(enemies[i]);
} else {
if (((((playerLeftside - enemyRightside) > 0)) && (((playerLeftside - enemyRightside) < 300)))){
enemies[i].mc.scaleX = 1;
enemies[i].direction = 1;
enemies[i].moveLeft = false;
enemies[i].moveRight = true;
initRandomShot(enemies[i]);
};
};
};
};
if (player.playerDead == false){
if (player.mc.hitTestObject(enemies[i].mc)){
enemySpotPlayerFirstTime(enemies[i]);
if ((((player.mc.y >= (enemies[i].mc.y - enemies[i].actHeight))) && ((player.mc.y <= (enemies[i].mc.y + enemies[i].actHeight))))){
player.blockRotate = true;
if ((enemies[i].mc is Pinky)){
enemies[i].attackNear = true;
} else {
if ((enemies[i].mc is LostSoul)){
enemies[i].attackNear = true;
enemies[i].mc.gotoAndPlay("attackNear");
} else {
if ((((enemies[i].mc is Imp)) || ((enemies[i].mc is Baron)))){
impAttackNearChannelHandler = function (_arg1:Event):void{
impAttackNearChannel = null;
};
enemies[i].attackNear = true;
enemies[i].attackWide = false;
if (impAttackNearChannel == null){
impAttackNearChannel = impAttackNear.play();
};
impAttackNearChannel.addEventListener(Event.SOUND_COMPLETE, impAttackNearChannelHandler);
} else {
if ((((((((((enemies[i].mc is ZombieMan)) || ((enemies[i].mc is ShotgunGuy)))) || ((enemies[i].mc is Cacodemon)))) || ((enemies[i].mc is Cyberdemon)))) || ((enemies[i].mc is Mastermind)))){
enemies[i].attackWide = true;
};
};
};
};
if ((enemies[i].mc is Cacodemon)){
enemies[i].mc.gotoAndPlay("attackWide");
};
if (playerLeftside <= enemyLeftside){
enemies[i].mc.scaleX = -1;
enemies[i].direction = -1;
player.blockRight = true;
player.moveRight = false;
} else {
if (playerRightside >= enemyRightside){
enemies[i].mc.scaleX = 1;
enemies[i].direction = 1;
player.blockLeft = true;
player.moveLeft = false;
};
};
if (enemies[i].moveLeft == true){
enemies[i].moveLeft = false;
} else {
if (enemies[i].moveRight == true){
enemies[i].moveRight = false;
};
};
if ((((((((((((enemies[i].mc is Pinky)) || ((enemies[i].mc is Imp)))) || ((enemies[i].mc is Baron)))) || ((enemies[i].mc is LostSoul)))) && ((enemies[i].enemyDead == false)))) && ((player.playerDead == false)))){
playerHurt(enemies[i]);
};
};
} else {
enemies[i].attackNear = false;
};
};
};
i = (i - 1);
};
i = (otherObjects.length - 1);
while (i >= 0) {
if (player.mc.hitTestObject(otherObjects[i])){
getObject(i);
};
i = (i - 1);
};
}
public function cleanUp():void{
pickup_txt.text = "";
PickupTextBox_mc.alpha = 0;
player.autoswitch = true;
killedEnemies = 0;
collectedItems = 0;
maxItems = 0;
foundSecrets = 0;
allSecrets = 0;
player.berserk = false;
player.biosuit = false;
levelIsComplete = false;
removeChild(biosuitAlpha);
removeChild(berserkAlpha);
firstExamine = true;
this.removeEventListener(Event.ENTER_FRAME, gameLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
removeChild(currentMap);
}
public function enemyHit(_arg1:int):void{
var pinkyChannelHandler:Function;
var lostSoulChannelHandler:Function;
var cacoChannelHandler:Function;
var zombieChannelHandler:Function;
var zombieChannel2Handler:Function;
var impChannelHandler:Function;
var cyberChannelHandler:Function;
var masterChannelHandler:Function;
var baronChannelHandler:Function;
var enemyNum = _arg1;
player.fistHits = true;
if (enemies[enemyNum].enemyDead == false){
if ((enemies[enemyNum].mc is Pinky)){
pinkyChannelHandler = function (_arg1:Event):void{
pinkyChannel = null;
};
if (pinkyChannel == null){
pinkyChannel = pinkyHit.play();
};
pinkyChannel.addEventListener(Event.SOUND_COMPLETE, pinkyChannelHandler);
} else {
if ((enemies[enemyNum].mc is LostSoul)){
lostSoulChannelHandler = function (_arg1:Event):void{
lostSoulChannel = null;
};
if (lostSoulChannel == null){
lostSoulChannel = pinkyHit.play();
};
lostSoulChannel.addEventListener(Event.SOUND_COMPLETE, lostSoulChannelHandler);
} else {
if ((enemies[enemyNum].mc is Cacodemon)){
cacoChannelHandler = function (_arg1:Event):void{
cacoChannel = null;
};
if (cacoChannel == null){
cacoChannel = pinkyHit.play();
};
cacoChannel.addEventListener(Event.SOUND_COMPLETE, cacoChannelHandler);
} else {
if ((enemies[enemyNum].mc is ZombieMan)){
zombieChannelHandler = function (_arg1:Event):void{
zombieChannel = null;
};
if (zombieChannel == null){
zombieChannel = zombieHit.play();
};
zombieChannel.addEventListener(Event.SOUND_COMPLETE, zombieChannelHandler);
} else {
if ((enemies[enemyNum].mc is ShotgunGuy)){
zombieChannel2Handler = function (_arg1:Event):void{
zombieChannel2 = null;
};
if (zombieChannel2 == null){
zombieChannel2 = zombieHit.play();
};
zombieChannel2.addEventListener(Event.SOUND_COMPLETE, zombieChannel2Handler);
} else {
if ((enemies[enemyNum].mc is Imp)){
impChannelHandler = function (_arg1:Event):void{
impChannel = null;
};
if (impChannel == null){
impChannel = zombieHit.play();
};
impChannel.addEventListener(Event.SOUND_COMPLETE, impChannelHandler);
} else {
if ((enemies[enemyNum].mc is Cyberdemon)){
cyberChannelHandler = function (_arg1:Event):void{
cyberChannel = null;
};
if (cyberChannel == null){
cyberChannel = pinkyHit.play();
};
cyberChannel.addEventListener(Event.SOUND_COMPLETE, cyberChannelHandler);
} else {
if ((enemies[enemyNum].mc is Mastermind)){
masterChannelHandler = function (_arg1:Event):void{
masterChannel = null;
};
if (masterChannel == null){
masterChannel = pinkyHit.play();
};
masterChannel.addEventListener(Event.SOUND_COMPLETE, masterChannelHandler);
} else {
if ((enemies[enemyNum].mc is Baron)){
baronChannelHandler = function (_arg1:Event):void{
baronChannel = null;
};
if (baronChannel == null){
baronChannel = pinkyHit.play();
};
baronChannel.addEventListener(Event.SOUND_COMPLETE, baronChannelHandler);
};
};
};
};
};
};
};
};
};
if (enemies[enemyNum].rocketPuffHit == true){
enemies[enemyNum].rocketPuffHit = false;
enemies[enemyNum].health = (enemies[enemyNum].health - (player.weaponDamage * 0.5));
} else {
if (enemies[enemyNum].bfgPuffHit == true){
enemies[enemyNum].bfgPuffHit = false;
enemies[enemyNum].health = (enemies[enemyNum].health - player.weaponDamage);
} else {
if ((((enemies[enemyNum].rocketPuffHit == false)) && ((enemies[enemyNum].bfgPuffHit == false)))){
enemies[enemyNum].health = (enemies[enemyNum].health - player.weaponDamage);
};
};
};
};
if (enemies[enemyNum].health <= 0){
enemyDies(enemyNum);
};
enemies[enemyNum].bfgPuff2hit = false;
}
public function playNow(_arg1:MouseEvent):void{
introtxt_mc.skip_btn.removeEventListener(MouseEvent.CLICK, skipNow);
introtxt_mc.play_btn.removeEventListener(MouseEvent.CLICK, playNow);
introtxt_mc.play_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand2);
introtxt_mc.skip_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand2);
introtxt_mc.play_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse2);
introtxt_mc.skip_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse2);
removeEventListener(Event.ENTER_FRAME, moveMetalhand2);
removeChild(metalhand);
musicChannel.removeEventListener(Event.SOUND_COMPLETE, playIntroMusicAgain);
gotoAndPlay("game");
}
public function checkNPCs():void{
var krawallTimer:Timer;
var krawallTimerHandler:Function;
if (currentMap.krawall){
if (player.mc.hitTestObject(currentMap.krawall)){
currentMap.krawall.gotoAndPlay("say");
if (player.sawKrawall == false){
krawallTimerHandler = function (_arg1:TimerEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
krawallTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, krawallTimerHandler);
_local2 = new Plasmagun();
_local2.x = (currentMap.krawall.x - 84);
_local2.y = (currentMap.krawall.y - 92);
currentMap.addChildAt(_local2, (currentMap.numChildren - 3));
examineMap();
_local3 = new TeleportAnim();
_local3.x = (_local2.x + 28);
_local3.y = (_local2.y + 4);
currentMap.addChildAt(_local3, (currentMap.numChildren - 3));
_local3.play();
};
player.sawKrawall = true;
krawallTimer = new Timer(2000, 1);
krawallTimer.addEventListener(TimerEvent.TIMER_COMPLETE, krawallTimerHandler);
krawallTimer.start();
};
};
};
if (currentMap.knarrenheinz){
if (player.mc.hitTestObject(currentMap.knarrenheinz)){
currentMap.knarrenheinz.gotoAndPlay("say");
};
};
if (currentMap.romero){
if (player.mc.hitTestObject(currentMap.romero)){
currentMap.romero.gotoAndPlay("say");
};
};
if (currentMap.manolo666){
if (player.mc.hitTestObject(currentMap.manolo666)){
currentMap.manolo666.gotoAndPlay("say");
};
};
if (currentMap.dark_odyssey){
if (player.mc.hitTestObject(currentMap.dark_odyssey)){
currentMap.dark_odyssey.gotoAndPlay("say");
};
};
if (currentMap.cybershark){
if (player.mc.hitTestObject(currentMap.cybershark)){
currentMap.cybershark.gotoAndPlay("say");
};
};
if (currentMap.kilgore){
if (player.mc.hitTestObject(currentMap.kilgore)){
currentMap.kilgore.gotoAndPlay("say");
};
};
if (currentMap.doomguy){
if (player.mc.hitTestObject(currentMap.doomguy)){
currentMap.doomguy.gotoAndPlay("say");
};
};
if (currentMap.errorXXX){
if (player.mc.hitTestObject(currentMap.errorXXX)){
currentMap.errorXXX.gotoAndPlay("say");
};
};
if (currentMap.hurrican){
if (player.mc.hitTestObject(currentMap.hurrican)){
currentMap.hurrican.gotoAndPlay("say");
};
};
if (currentMap.knarrenheinzSecret){
if (player.mc.hitTestObject(currentMap.knarrenheinzSecret)){
currentMap.knarrenheinzSecret.gotoAndPlay("say");
};
};
if (currentMap.nero){
if (player.mc.hitTestObject(currentMap.nero)){
currentMap.nero.gotoAndPlay("say");
};
};
}
public function createPlayer():void{
var _local1:int;
player = new Object();
player.mc = currentMap.player;
player.velocityX = 0;
player.velocityY = 0;
player.inAir = false;
player.health = 100;
player.armor = 0;
player.bullets = 10;
player.shells = 0;
player.rockets = 0;
player.cells = 0;
player.outOfBullets = false;
player.outOfShells = false;
player.outOfCells = false;
player.outOfRockets = false;
player.outOfAmmo = false;
player.pressedUse = false;
player.autoswitch = true;
player.hitsDoor = false;
player.bfgShot = false;
player.sawKrawall = false;
player.maxBullets = 200;
player.maxCells = 300;
player.maxShells = 50;
player.maxRockets = 50;
player.fist = true;
player.chainsaw = false;
player.chainsawPulled = false;
player.pistol = true;
player.shotgun = false;
player.chaingun = false;
player.rocketlauncher = false;
player.plasmagun = false;
player.bfg = false;
if (playerKeepsInventory == false){
player.currentWeapon = "pistol";
};
player.weaponDamage = 0;
player.rocketPuffDamage = 0;
player.bluekey = false;
player.redkey = false;
player.yellowkey = false;
player.direction = 1;
player.shootDirection = 1;
if (playerLooksLeft == true){
player.direction = -1;
player.shootDirection = -1;
player.mc.scaleX = -1;
};
player.animstate = "stand";
player.walkAnimation = new Array(3, 4, 5, 6);
player.shootAnimation = new Array(7, 8);
player.hitAnimation = new Array(9, 10, 11);
player.deathAnimation = new Array(12, 13, 14, 15, 16, 17, 18);
player.fistAnimation = new Array(19, 20);
player.sawAnimation = new Array(21, 22);
player.animstep = 0;
player.lastShotTime = 0;
player.lastHitTime = 0;
player.lastHitAnimTime = 0;
player.lastIdleTime = 0;
player.blockLeft = false;
player.blockRight = false;
player.blockRotate = false;
player.fistHits = false;
player.deathAnim = true;
player.hitWallLeft = false;
player.hitWallRight = false;
player.playerDead = false;
player.jump = false;
player.moveLeft = false;
player.moveRight = false;
player.shoots = false;
player.punches = false;
player.biosuit = false;
player.berserk = false;
player.playerHit = false;
player.jumpSpeed = 0.725;
player.walkSpeed = 0.3;
player.shotSpeed = 40;
player.punchSpeed = 40;
player.plasmaSpeed = 0.7;
player.rocketSpeed = 0.6;
player.bfgSpeed = 0.6;
player.width = 30;
player.height = 50;
player.startX = player.mc.x;
player.startY = player.mc.y;
if (playerKeepsInventory == true){
player.health = playerDummy.health;
player.armor = playerDummy.armor;
player.bullets = playerDummy.bullets;
player.shells = playerDummy.shells;
player.rockets = playerDummy.rockets;
player.cells = playerDummy.cells;
player.maxBullets = playerDummy.maxBullets;
player.maxCells = playerDummy.maxCells;
player.maxShells = playerDummy.maxShells;
player.maxRockets = playerDummy.maxRockets;
_local1 = 0;
while (_local1 < playerObjects.length) {
if (playerObjects[_local1] == "shotgun"){
player.shotgun = true;
};
if (playerObjects[_local1] == "chainsaw"){
player.chainsaw = true;
};
if (playerObjects[_local1] == "chaingun"){
player.chaingun = true;
};
if (playerObjects[_local1] == "plasmagun"){
player.plasmagun = true;
};
if (playerObjects[_local1] == "bfg"){
player.bfg = true;
};
if (playerObjects[_local1] == "rocketlauncher"){
player.rocketlauncher = true;
};
_local1++;
};
player.currentWeapon = String(playerLastWeapon);
};
}
public function moveMetalhand(_arg1:Event):void{
metalhand.x = mouseX;
metalhand.y = mouseY;
}
public function cleanMenu():void{
start_btn.removeEventListener(MouseEvent.CLICK, chooseSkill);
ctrl_btn.removeEventListener(MouseEvent.CLICK, showControls);
about_btn.removeEventListener(MouseEvent.CLICK, showAbout);
heyNotTooRough_btn.removeEventListener(MouseEvent.CLICK, playDoomNotTooRough);
hurtMePlenty_btn.removeEventListener(MouseEvent.CLICK, playDoomPlenty);
ultraViolence_btn.removeEventListener(MouseEvent.CLICK, playDoomUltra);
start_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
about_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
ctrl_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
back_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
heyNotTooRough_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
hurtMePlenty_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
ultraViolence_btn.removeEventListener(MouseEvent.ROLL_OVER, showMetalhand);
start_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
about_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
ctrl_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
back_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
heyNotTooRough_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
hurtMePlenty_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
ultraViolence_btn.removeEventListener(MouseEvent.ROLL_OUT, showMouse);
removeEventListener(Event.ENTER_FRAME, moveMetalhand);
removeChild(metalhand);
musicChannel.removeEventListener(Event.SOUND_COMPLETE, playMenuMusicAgain);
gotoAndPlay("intro");
}
public function switchHUDWeapons(_arg1:String):void{
HUD_mc.chainsaw_HUD.alpha = 0;
HUD_mc.shotgun_HUD.alpha = 0;
HUD_mc.chaingun_HUD.alpha = 0;
HUD_mc.RL_HUD.alpha = 0;
HUD_mc.plasma_HUD.alpha = 0;
HUD_mc.fist_HUD.alpha = 0;
HUD_mc.pistol_HUD.alpha = 0;
HUD_mc.bfg_HUD.alpha = 0;
bullets_txt.alpha = 0;
cells_txt.alpha = 0;
shells_txt.alpha = 0;
rockets_txt.alpha = 0;
if (_arg1 == "fist"){
HUD_mc.fist_HUD.alpha = 1;
} else {
if (_arg1 == "chainsaw"){
HUD_mc.chainsaw_HUD.alpha = 1;
} else {
if (_arg1 == "pistol"){
HUD_mc.pistol_HUD.alpha = 1;
bullets_txt.alpha = 0.85;
} else {
if (_arg1 == "chaingun"){
HUD_mc.chaingun_HUD.alpha = 1;
bullets_txt.alpha = 0.85;
} else {
if (_arg1 == "shotgun"){
HUD_mc.shotgun_HUD.alpha = 1;
shells_txt.alpha = 0.85;
} else {
if (_arg1 == "rocketlauncher"){
HUD_mc.RL_HUD.alpha = 1;
rockets_txt.alpha = 0.85;
} else {
if (_arg1 == "plasmagun"){
HUD_mc.plasma_HUD.alpha = 1;
cells_txt.alpha = 0.85;
} else {
if (_arg1 == "bfg"){
HUD_mc.bfg_HUD.alpha = 1;
cells_txt.alpha = 0.85;
};
};
};
};
};
};
};
};
}
public function keyUpFunction(_arg1:KeyboardEvent):void{
var useTimer:Timer;
var setUseFalse:Function;
var evt = _arg1;
if ((((evt.keyCode == Keyboard.LEFT)) || ((evt.charCode == 97)))){
player.moveLeft = false;
} else {
if ((((evt.keyCode == Keyboard.RIGHT)) || ((evt.charCode == 100)))){
player.moveRight = false;
} else {
if (evt.keyCode == Keyboard.SPACE){
setUseFalse = function (_arg1:TimerEvent):void{
player.pressedUse = false;
useTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, setUseFalse);
};
useTimer = new Timer(100, 1);
useTimer.addEventListener(TimerEvent.TIMER_COMPLETE, setUseFalse);
useTimer.start();
} else {
if (evt.keyCode == Keyboard.CONTROL){
if ((((player.currentWeapon == "fist")) || ((player.currentWeapon == "chainsaw")))){
player.animstep = 0;
};
player.punches = false;
player.shoots = false;
};
};
};
};
}
public function playMenuMusicAgain(_arg1:Event):void{
musicChannel = menuMusic.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, playMenuMusicAgain);
}
public function updateHUD():void{
var nextWeapon:Function;
var nextWeaponBfgTimer:Timer;
var nextWeaponAfterBfg:Function;
var idleDiff:Number;
nextWeapon = function ():void{
if ((((player.outOfCells == false)) && ((player.plasmagun == true)))){
player.currentWeapon = "plasmagun";
switchHUDWeapons(player.currentWeapon);
} else {
if ((((player.outOfShells == false)) && ((player.shotgun == true)))){
player.currentWeapon = "shotgun";
switchHUDWeapons(player.currentWeapon);
} else {
if (player.outOfBullets == false){
if (player.chaingun == true){
player.currentWeapon = "chaingun";
switchHUDWeapons(player.currentWeapon);
} else {
player.currentWeapon = "pistol";
switchHUDWeapons(player.currentWeapon);
};
} else {
if ((((player.outOfAmmo == true)) || ((((((player.outOfBullets == true)) && ((player.outOfShells == true)))) && ((player.outOfCells == true)))))){
if (player.chainsaw == true){
player.currentWeapon = "chainsaw";
switchHUDWeapons(player.currentWeapon);
player.shoots = false;
player.punches = true;
} else {
player.currentWeapon = "fist";
switchHUDWeapons(player.currentWeapon);
player.shoots = false;
player.punches = true;
};
};
};
};
};
};
health_txt.text = String(Math.floor(player.health));
armor_txt.text = String(Math.floor(player.armor));
bullets_txt.text = String(((player.bullets + " / ") + player.maxBullets));
shells_txt.text = String(((player.shells + " / ") + player.maxShells));
rockets_txt.text = String(((player.rockets + " / ") + player.maxRockets));
cells_txt.text = String(((player.cells + " / ") + player.maxCells));
health_txt.setTextFormat(doomFormatBig);
armor_txt.setTextFormat(doomFormatBig);
bullets_txt.setTextFormat(doomFormat);
shells_txt.setTextFormat(doomFormat);
rockets_txt.setTextFormat(doomFormat);
cells_txt.setTextFormat(doomFormat);
if (player.bluekey == true){
HUD_mc.bluekey_HUD.alpha = 0.8;
};
if (player.redkey == true){
HUD_mc.redkey_HUD.alpha = 0.8;
};
if (player.yellowkey == true){
HUD_mc.yellowkey_HUD.alpha = 0.8;
};
if (player.bullets <= 0){
player.outOfBullets = true;
if ((((player.currentWeapon == "pistol")) || ((player.currentWeapon == "chaingun")))){
nextWeapon();
};
};
if (player.shells <= 0){
player.outOfShells = true;
if (player.currentWeapon == "shotgun"){
nextWeapon();
};
};
if (player.cells <= 0){
player.outOfCells = true;
if (player.currentWeapon == "plasmagun"){
nextWeapon();
};
};
if (player.cells < 40){
if (player.currentWeapon == "bfg"){
nextWeaponAfterBfg = function (_arg1:TimerEvent):void{
nextWeapon();
nextWeaponBfgTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, nextWeaponAfterBfg);
};
nextWeaponBfgTimer = new Timer(1500, 1);
nextWeaponBfgTimer.addEventListener(TimerEvent.TIMER_COMPLETE, nextWeaponAfterBfg);
nextWeaponBfgTimer.start();
};
};
if (player.rockets <= 0){
player.outOfRockets = true;
if (player.currentWeapon == "rocketlauncher"){
nextWeapon();
};
};
if ((((((((player.outOfBullets == true)) && ((player.outOfShells == true)))) && ((player.outOfCells == true)))) && ((player.outOfRockets == true)))){
player.outOfAmmo = true;
player.shoots = false;
} else {
if ((((((((player.outOfBullets == false)) || ((player.outOfShells == false)))) || ((player.outOfCells == false)))) || ((player.outOfRockets == false)))){
player.outOfAmmo = false;
};
};
if ((((player.chainsawPulled == true)) && ((player.punches == false)))){
if (player.lastIdleTime == 0){
player.lastIdleTime = getTimer();
};
idleDiff = (getTimer() - player.lastIdleTime);
if (idleDiff >= 165){
sawIdleChannel = sawIdle.play();
player.lastIdleTime = 0;
if (player.currentWeapon != "chainsaw"){
sawIdleChannel.stop();
};
};
};
if (player.armor < 1){
player.armor = 0;
};
}
public function initRandomShot(_arg1:Object):void{
var enemyShotTime:int;
var enemyRandomShotTimeDiff:Number;
var enemyRandomShotTimer:Timer;
var setEnemyRandomShotTime:Function;
var enemy = _arg1;
enemyShotTime = 0;
if ((enemy.mc is ZombieMan)){
enemyShotTime = 400;
} else {
if ((((enemy.mc is ShotgunGuy)) || ((enemy.mc is Cyberdemon)))){
enemyShotTime = 800;
} else {
if ((((((((enemy.mc is Imp)) || ((enemy.mc is Baron)))) || ((enemy.mc is Cacodemon)))) || ((enemy.mc is Mastermind)))){
enemyShotTime = 1000;
};
};
};
if (enemy.enemyRandomShotTime == 0){
enemy.enemyRandomShotTime = getTimer();
};
enemyRandomShotTimeDiff = (getTimer() - enemy.enemyRandomShotTime);
if (enemyRandomShotTimeDiff >= enemyShotTime){
setEnemyRandomShotTime = function (_arg1:TimerEvent):void{
enemy.enemyRandomShotTime = 0;
enemyRandomShotTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, setEnemyRandomShotTime);
};
enemyRandomShotTimer = new Timer(enemyShotTime, 1);
enemyRandomShotTimer.addEventListener(TimerEvent.TIMER_COMPLETE, setEnemyRandomShotTime);
enemyRandomShotTimer.start();
enemy.attackWide = true;
enemy.moveRight = false;
enemy.moveLeft = false;
if ((enemy.mc is Cacodemon)){
enemy.mc.gotoAndPlay("attackWide");
};
};
}
public function enemyDies(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:MovieClip;
var _local5:MovieClip;
_local2 = Math.round(Math.random());
_local3 = Math.round((Math.random() * 2));
if (enemies[_arg1].enemyDead == false){
if ((enemies[_arg1].mc is Pinky)){
pinkyChannel.stop();
pinkyChannel = pinkyDeath.play();
pinkyChannel = null;
} else {
if ((enemies[_arg1].mc is LostSoul)){
lostSoulChannel.stop();
lostSoulChannel = plasmaExplode.play();
lostSoulChannel = null;
} else {
if ((enemies[_arg1].mc is Cacodemon)){
cacoChannel.stop();
cacoChannel = cacoDeath.play();
cacoChannel = null;
} else {
if ((enemies[_arg1].mc is Cyberdemon)){
cyberChannel.stop();
cyberChannel = cyberDeath.play();
cyberChannel = null;
} else {
if ((enemies[_arg1].mc is Mastermind)){
masterChannel.stop();
masterChannel = masterDeath.play();
masterChannel = null;
} else {
if ((enemies[_arg1].mc is ZombieMan)){
zombieChannel.stop();
if (_local3 == 0){
zombieChannel = zombieDeath1.play();
} else {
if (_local3 == 1){
zombieChannel = zombieDeath2.play();
};
};
if (_local3 == 2){
zombieChannel = zombieDeath3.play();
};
zombieChannel = null;
_local4 = new Ammoclip();
_local4.x = enemies[_arg1].mc.x;
_local4.y = (enemies[_arg1].mc.y - 8);
currentMap.addChildAt(_local4, (currentMap.numChildren - 2));
examineMap();
} else {
if ((enemies[_arg1].mc is ShotgunGuy)){
zombieChannel2.stop();
if (_local3 == 0){
zombieChannel2 = zombieDeath1.play();
} else {
if (_local3 == 1){
zombieChannel2 = zombieDeath2.play();
};
};
if (_local3 == 2){
zombieChannel2 = zombieDeath3.play();
};
zombieChannel2 = null;
_local5 = new ZombieShotgun();
_local5.x = (enemies[_arg1].mc.x - 20);
_local5.y = (enemies[_arg1].mc.y - 8);
currentMap.addChildAt(_local5, (currentMap.numChildren - 3));
examineMap();
} else {
if ((enemies[_arg1].mc is Imp)){
impChannel.stop();
if (_local2 == 0){
impChannel = impDeath1.play();
};
if (_local2 == 1){
impChannel = impDeath2.play();
};
impChannel = null;
} else {
if ((enemies[_arg1].mc is Baron)){
baronChannel.stop();
baronChannel = baronDeath.play();
baronChannel = null;
};
};
};
};
};
};
};
};
};
};
enemies[_arg1].enemyDead = true;
enemies[_arg1].checkPlayerColl = false;
}
public function startGame():void{
doomFormat.font = doomFont.fontName;
doomFormat.color = 0x666600;
doomFormat.size = 14;
doomFormat.align = "center";
doomFormatBig.font = doomFont.fontName;
doomFormatBig.color = 0x666600;
doomFormatBig.size = 18;
doomFormatBig.align = "center";
health_txt.x = 57;
health_txt.y = 38;
health_txt.width = 200;
health_txt.height = 30;
health_txt.blendMode = BlendMode.LAYER;
health_txt.alpha = 0.85;
health_txt.embedFonts = true;
health_txt.mouseEnabled = false;
addChild(health_txt);
armor_txt.x = 539;
armor_txt.y = 38;
armor_txt.width = 200;
armor_txt.height = 30;
armor_txt.blendMode = BlendMode.LAYER;
armor_txt.alpha = 0.85;
armor_txt.embedFonts = true;
armor_txt.mouseEnabled = false;
addChild(armor_txt);
bullets_txt.x = 422;
bullets_txt.y = 40;
bullets_txt.width = 200;
bullets_txt.height = 30;
bullets_txt.blendMode = BlendMode.LAYER;
bullets_txt.embedFonts = true;
bullets_txt.mouseEnabled = false;
addChild(bullets_txt);
cells_txt.x = 422;
cells_txt.y = 40;
cells_txt.width = 200;
cells_txt.height = 30;
cells_txt.blendMode = BlendMode.LAYER;
cells_txt.embedFonts = true;
cells_txt.mouseEnabled = false;
addChild(cells_txt);
shells_txt.x = 422;
shells_txt.y = 40;
shells_txt.width = 200;
shells_txt.height = 30;
shells_txt.blendMode = BlendMode.LAYER;
shells_txt.embedFonts = true;
shells_txt.mouseEnabled = false;
addChild(shells_txt);
rockets_txt.x = 422;
rockets_txt.y = 40;
rockets_txt.width = 200;
rockets_txt.height = 30;
rockets_txt.blendMode = BlendMode.LAYER;
rockets_txt.embedFonts = true;
rockets_txt.mouseEnabled = false;
addChild(rockets_txt);
pickup_txt.x = 150;
pickup_txt.y = 571.5;
pickup_txt.width = 500;
pickup_txt.height = 30;
pickup_txt.blendMode = BlendMode.LAYER;
pickup_txt.embedFonts = true;
pickup_txt.mouseEnabled = false;
pickup_txt.alpha = 0.85;
addChild(pickup_txt);
PickupTextBox_mc.alpha = 0;
addChild(berserkAlpha);
addChild(biosuitAlpha);
biosuitAlpha.alpha = 0;
berserkAlpha.alpha = 0;
scanline.alpha = 0;
currentMap.addChild(scanline);
if (playerKeepsInventory == false){
playerObjects = new Array();
};
gameMode = "game";
}
public function showMouse(_arg1:MouseEvent):void{
Mouse.show();
metalhand.alpha = 0;
}
}
}//package
Section 78
//DoomFont (DoomFont)
package {
import flash.text.*;
public dynamic class DoomFont extends Font {
}
}//package
Section 79
//door1 (door1)
package {
import flash.display.*;
public dynamic class door1 extends MovieClip {
}
}//package
Section 80
//door2 (door2)
package {
import flash.display.*;
public dynamic class door2 extends MovieClip {
}
}//package
Section 81
//DoorClose (DoorClose)
package {
import flash.media.*;
public dynamic class DoorClose extends Sound {
}
}//package
Section 82
//DoorOpen (DoorOpen)
package {
import flash.media.*;
public dynamic class DoorOpen extends Sound {
}
}//package
Section 83
//E1M1 (E1M1)
package {
import flash.media.*;
public dynamic class E1M1 extends Sound {
}
}//package
Section 84
//E1M2 (E1M2)
package {
import flash.media.*;
public dynamic class E1M2 extends Sound {
}
}//package
Section 85
//E1M3 (E1M3)
package {
import flash.media.*;
public dynamic class E1M3 extends Sound {
}
}//package
Section 86
//E1M4 (E1M4)
package {
import flash.media.*;
public dynamic class E1M4 extends Sound {
}
}//package
Section 87
//E1M5 (E1M5)
package {
import flash.media.*;
public dynamic class E1M5 extends Sound {
}
}//package
Section 88
//E1M6 (E1M6)
package {
import flash.media.*;
public dynamic class E1M6 extends Sound {
}
}//package
Section 89
//E1M7 (E1M7)
package {
import flash.media.*;
public dynamic class E1M7 extends Sound {
}
}//package
Section 90
//E1M8 (E1M8)
package {
import flash.media.*;
public dynamic class E1M8 extends Sound {
}
}//package
Section 91
//Easy (Easy)
package {
import flash.display.*;
public dynamic class Easy extends SimpleButton {
}
}//package
Section 92
//End (End)
package {
import flash.media.*;
public dynamic class End extends Sound {
}
}//package
Section 93
//enemyBlockBox (enemyBlockBox)
package {
import flash.display.*;
public dynamic class enemyBlockBox extends MovieClip {
}
}//package
Section 94
//enemyBlockBoxAir (enemyBlockBoxAir)
package {
import flash.display.*;
public dynamic class enemyBlockBoxAir extends MovieClip {
}
}//package
Section 95
//EnemyChaingun (EnemyChaingun)
package {
import flash.media.*;
public dynamic class EnemyChaingun extends Sound {
}
}//package
Section 96
//exitdoor (exitdoor)
package {
import flash.display.*;
public dynamic class exitdoor extends MovieClip {
}
}//package
Section 97
//exitswitch (exitswitch)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class exitswitch extends MovieClip {
public var switchSound:Sound;
public var switchSoundChannel:SoundChannel;
public function exitswitch(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
switchSound = new Switch();
switchSoundChannel = switchSound.play();
switchSoundChannel.addEventListener(Event.SOUND_COMPLETE, switchSoundChannelHandler);
}
public function switchSoundChannelHandler(_arg1:Event):void{
switchSoundChannel = null;
}
}
}//package
Section 98
//exitswitch2 (exitswitch2)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class exitswitch2 extends MovieClip {
public var switchSound:Sound;
public var switchSoundChannel:SoundChannel;
public function exitswitch2(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
switchSound = new Switch();
switchSoundChannel = switchSound.play();
switchSoundChannel.addEventListener(Event.SOUND_COMPLETE, switchSoundChannelHandler);
}
public function switchSoundChannelHandler(_arg1:Event):void{
switchSoundChannel = null;
}
}
}//package
Section 99
//eye (eye)
package {
import flash.display.*;
public dynamic class eye extends MovieClip {
}
}//package
Section 100
//fackel (fackel)
package {
import flash.display.*;
public dynamic class fackel extends MovieClip {
}
}//package
Section 101
//Fist (Fist)
package {
import flash.media.*;
public dynamic class Fist extends Sound {
}
}//package
Section 102
//floorTile (floorTile)
package {
import flash.display.*;
public dynamic class floorTile extends MovieClip {
}
}//package
Section 103
//Gibs1 (Gibs1)
package {
import flash.display.*;
public dynamic class Gibs1 extends MovieClip {
}
}//package
Section 104
//grayline (grayline)
package {
import flash.display.*;
public dynamic class grayline extends MovieClip {
}
}//package
Section 105
//GreenArmor (GreenArmor)
package {
import flash.display.*;
public dynamic class GreenArmor extends MovieClip {
}
}//package
Section 106
//Hahaha (Hahaha)
package {
import flash.media.*;
public dynamic class Hahaha extends Sound {
}
}//package
Section 107
//HurtMePlenty (HurtMePlenty)
package {
import flash.display.*;
public dynamic class HurtMePlenty extends SimpleButton {
}
}//package
Section 108
//Imp (Imp)
package {
import flash.display.*;
public dynamic class Imp extends MovieClip {
public function Imp(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 109
//ImpAttackNear (ImpAttackNear)
package {
import flash.media.*;
public dynamic class ImpAttackNear extends Sound {
}
}//package
Section 110
//ImpBall (ImpBall)
package {
import flash.display.*;
public dynamic class ImpBall extends MovieClip {
}
}//package
Section 111
//ImpDeath1 (ImpDeath1)
package {
import flash.media.*;
public dynamic class ImpDeath1 extends Sound {
}
}//package
Section 112
//ImpDeath2 (ImpDeath2)
package {
import flash.media.*;
public dynamic class ImpDeath2 extends Sound {
}
}//package
Section 113
//ImpPuff (ImpPuff)
package {
import flash.display.*;
public dynamic class ImpPuff extends MovieClip {
public function ImpPuff(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 114
//ImpShot (ImpShot)
package {
import flash.media.*;
public dynamic class ImpShot extends Sound {
}
}//package
Section 115
//ImpSpot1 (ImpSpot1)
package {
import flash.media.*;
public dynamic class ImpSpot1 extends Sound {
}
}//package
Section 116
//ImpSpot2 (ImpSpot2)
package {
import flash.media.*;
public dynamic class ImpSpot2 extends Sound {
}
}//package
Section 117
//Intermission (Intermission)
package {
import flash.media.*;
public dynamic class Intermission extends Sound {
}
}//package
Section 118
//Interpic (Interpic)
package {
import flash.display.*;
public dynamic class Interpic extends MovieClip {
}
}//package
Section 119
//IntroMusic (IntroMusic)
package {
import flash.media.*;
public dynamic class IntroMusic extends Sound {
}
}//package
Section 120
//introtxt (introtxt)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class introtxt extends MovieClip {
public var txtTimer1:Timer;
public var txtTimer2:Timer;
public var skip_btn:Skip;
public var play_btn:Play;
public function introtxt(){
addFrameScript(0, frame1, 201, frame202, 401, frame402, 601, frame602);
}
function frame602(){
stop();
skip_btn.alpha = 0;
play_btn.alpha = 0.75;
skip_btn.mouseEnabled = false;
play_btn.mouseEnabled = true;
}
function frame202(){
this.stop();
txtTimer1 = new Timer(1000, 6);
txtTimer1.addEventListener(TimerEvent.TIMER_COMPLETE, nextTxt);
txtTimer1.start();
}
public function showTxt2(_arg1:TimerEvent):void{
this.play();
}
function frame1(){
play_btn.alpha = 0;
skip_btn.alpha = 0.75;
play_btn.mouseEnabled = false;
}
public function nextTxt(_arg1:TimerEvent):void{
this.play();
}
function frame402(){
this.stop();
txtTimer2 = new Timer(1000, 7);
txtTimer2.addEventListener(TimerEvent.TIMER_COMPLETE, showTxt2);
txtTimer2.start();
}
}
}//package
Section 121
//ItemGet (ItemGet)
package {
import flash.media.*;
public dynamic class ItemGet extends Sound {
}
}//package
Section 122
//Knarrenheinz (Knarrenheinz)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Knarrenheinz extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Knarrenheinz(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package
Section 123
//Krawall (Krawall)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class Krawall extends MovieClip {
public var radio:Sound;
public var radioChannel:SoundChannel;
public function Krawall(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
radio = new Radio();
radioChannel = radio.play();
radioChannel.addEventListener(Event.SOUND_COMPLETE, radioChannelHandler);
}
public function radioChannelHandler(_arg1:Event):void{
radioChannel = null;
}
}
}//package
Section 124
//lava (lava)
package {
import flash.display.*;
public dynamic class lava extends MovieClip {
}
}//package
Section 125
//lionheaddoor (lionheaddoor)
package {
import flash.display.*;
public dynamic class lionheaddoor extends MovieClip {
}
}//package
Section 126
//LostSoul (LostSoul)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class LostSoul extends MovieClip {
public var lostSoulAttack:Sound;
public var lostSoulAttackChannel:SoundChannel;
public function LostSoul(){
addFrameScript(5, frame6, 13, frame14);
}
public function lostSoulAttackChannelHandler(_arg1:Event):void{
lostSoulAttackChannel = null;
}
function frame14(){
stop();
this.parent.removeChild(this);
}
function frame6(){
lostSoulAttack = new LostSoulAttack();
if (lostSoulAttackChannel == null){
lostSoulAttackChannel = lostSoulAttack.play();
};
lostSoulAttackChannel.addEventListener(Event.SOUND_COMPLETE, lostSoulAttackChannelHandler);
}
}
}//package
Section 127
//LostSoulAttack (LostSoulAttack)
package {
import flash.media.*;
public dynamic class LostSoulAttack extends Sound {
}
}//package
Section 128
//Mastermind (Mastermind)
package {
import flash.display.*;
public dynamic class Mastermind extends MovieClip {
public function Mastermind(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 129
//MastermindDeath (MastermindDeath)
package {
import flash.media.*;
public dynamic class MastermindDeath extends Sound {
}
}//package
Section 130
//MastermindSpot (MastermindSpot)
package {
import flash.media.*;
public dynamic class MastermindSpot extends Sound {
}
}//package
Section 131
//MastermindWalk1 (MastermindWalk1)
package {
import flash.media.*;
public dynamic class MastermindWalk1 extends Sound {
}
}//package
Section 132
//MastermindWalk2 (MastermindWalk2)
package {
import flash.media.*;
public dynamic class MastermindWalk2 extends Sound {
}
}//package
Section 133
//Medikit (Medikit)
package {
import flash.display.*;
public dynamic class Medikit extends MovieClip {
}
}//package
Section 134
//MenuMusic (MenuMusic)
package {
import flash.media.*;
public dynamic class MenuMusic extends Sound {
}
}//package
Section 135
//Metalhand (Metalhand)
package {
import flash.display.*;
public dynamic class Metalhand extends MovieClip {
}
}//package
Section 136
//MuteButton (MuteButton)
package {
import flash.display.*;
public dynamic class MuteButton extends MovieClip {
public function MuteButton(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 137
//NextLevel (NextLevel)
package {
import flash.display.*;
public dynamic class NextLevel extends SimpleButton {
}
}//package
Section 138
//nukage (nukage)
package {
import flash.display.*;
public dynamic class nukage extends MovieClip {
}
}//package
Section 139
//PickupTextBox (PickupTextBox)
package {
import flash.display.*;
public dynamic class PickupTextBox extends MovieClip {
}
}//package
Section 140
//Pinky (Pinky)
package {
import flash.media.*;
import flash.display.*;
public dynamic class Pinky extends MovieClip {
public var pinkyAttack:Sound;
public function Pinky(){
addFrameScript(5, frame6);
}
function frame6(){
pinkyAttack = new PinkyAttack();
pinkyAttack.play();
}
}
}//package
Section 141
//PinkyAttack (PinkyAttack)
package {
import flash.media.*;
public dynamic class PinkyAttack extends Sound {
}
}//package
Section 142
//PinkyDeath (PinkyDeath)
package {
import flash.media.*;
public dynamic class PinkyDeath extends Sound {
}
}//package
Section 143
//PinkyHit (PinkyHit)
package {
import flash.media.*;
public dynamic class PinkyHit extends Sound {
}
}//package
Section 144
//PinkySpot (PinkySpot)
package {
import flash.media.*;
public dynamic class PinkySpot extends Sound {
}
}//package
Section 145
//Pistol (Pistol)
package {
import flash.display.*;
public dynamic class Pistol extends MovieClip {
}
}//package
Section 146
//PlasmaExplode (PlasmaExplode)
package {
import flash.media.*;
public dynamic class PlasmaExplode extends Sound {
}
}//package
Section 147
//Plasmagun (Plasmagun)
package {
import flash.display.*;
public dynamic class Plasmagun extends MovieClip {
}
}//package
Section 148
//PlasmaPuff (PlasmaPuff)
package {
import flash.display.*;
public dynamic class PlasmaPuff extends MovieClip {
public function PlasmaPuff(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package
Section 149
//PlasmaShot (PlasmaShot)
package {
import flash.display.*;
public dynamic class PlasmaShot extends MovieClip {
}
}//package
Section 150
//PlasmaSound (PlasmaSound)
package {
import flash.media.*;
public dynamic class PlasmaSound extends Sound {
}
}//package
Section 151
//Play (Play)
package {
import flash.display.*;
public dynamic class Play extends SimpleButton {
}
}//package
Section 152
//Player (Player)
package {
import flash.display.*;
public dynamic class Player extends MovieClip {
public function Player(){
addFrameScript(22, frame23);
}
function frame23(){
stop();
}
}
}//package
Section 153
//PlayerDeath (PlayerDeath)
package {
import flash.media.*;
public dynamic class PlayerDeath extends Sound {
}
}//package
Section 154
//PlayerHurt (PlayerHurt)
package {
import flash.media.*;
public dynamic class PlayerHurt extends Sound {
}
}//package
Section 155
//PolecorpseTwitch (PolecorpseTwitch)
package {
import flash.display.*;
public dynamic class PolecorpseTwitch extends MovieClip {
}
}//package
Section 156
//Poof (Poof)
package {
import flash.media.*;
public dynamic class Poof extends Sound {
}
}//package
Section 157
//Puff (Puff)
package {
import flash.display.*;
public dynamic class Puff extends MovieClip {
public function Puff(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 158
//Radio (Radio)
package {
import flash.media.*;
public dynamic class Radio extends Sound {
}
}//package
Section 159
//reddoor2 (reddoor2)
package {
import flash.display.*;
public dynamic class reddoor2 extends MovieClip {
}
}//package
Section 160
//RedKey (RedKey)
package {
import flash.display.*;
public dynamic class RedKey extends MovieClip {
}
}//package
Section 161
//RedKeyHUD (RedKeyHUD)
package {
import flash.display.*;
public dynamic class RedKeyHUD extends MovieClip {
}
}//package
Section 162
//redlhdoor (redlhdoor)
package {
import flash.display.*;
public dynamic class redlhdoor extends MovieClip {
}
}//package
Section 163
//RedSkull (RedSkull)
package {
import flash.display.*;
public dynamic class RedSkull extends MovieClip {
}
}//package
Section 164
//RestartButton (RestartButton)
package {
import flash.display.*;
public dynamic class RestartButton extends SimpleButton {
}
}//package
Section 165
//Rocket (Rocket)
package {
import flash.display.*;
public dynamic class Rocket extends MovieClip {
}
}//package
Section 166
//RocketBox (RocketBox)
package {
import flash.display.*;
public dynamic class RocketBox extends MovieClip {
}
}//package
Section 167
//RocketExplode (RocketExplode)
package {
import flash.media.*;
public dynamic class RocketExplode extends Sound {
}
}//package
Section 168
//RocketLauncher (RocketLauncher)
package {
import flash.display.*;
public dynamic class RocketLauncher extends MovieClip {
}
}//package
Section 169
//RocketLauncherSound (RocketLauncherSound)
package {
import flash.media.*;
public dynamic class RocketLauncherSound extends Sound {
}
}//package
Section 170
//RocketPuff (RocketPuff)
package {
import flash.display.*;
public dynamic class RocketPuff extends MovieClip {
public function RocketPuff(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 171
//SawAttack (SawAttack)
package {
import flash.media.*;
public dynamic class SawAttack extends Sound {
}
}//package
Section 172
//SawHit (SawHit)
package {
import flash.media.*;
public dynamic class SawHit extends Sound {
}
}//package
Section 173
//SawIdle (SawIdle)
package {
import flash.media.*;
public dynamic class SawIdle extends Sound {
}
}//package
Section 174
//SawTake (SawTake)
package {
import flash.media.*;
public dynamic class SawTake extends Sound {
}
}//package
Section 175
//Scanline (Scanline)
package {
import flash.display.*;
public dynamic class Scanline extends MovieClip {
}
}//package
Section 176
//Secret (Secret)
package {
import flash.media.*;
public dynamic class Secret extends Sound {
}
}//package
Section 177
//secretBox (secretBox)
package {
import flash.display.*;
public dynamic class secretBox extends MovieClip {
}
}//package
Section 178
//secretExitswitchFromSecretMap (secretExitswitchFromSecretMap)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class secretExitswitchFromSecretMap extends MovieClip {
public var switchSound:Sound;
public var switchSoundChannel:SoundChannel;
public function secretExitswitchFromSecretMap(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
switchSound = new Switch();
switchSoundChannel = switchSound.play();
switchSoundChannel.addEventListener(Event.SOUND_COMPLETE, switchSoundChannelHandler);
}
public function switchSoundChannelHandler(_arg1:Event):void{
switchSoundChannel = null;
}
}
}//package
Section 179
//secretExitswitchToSecretMap (secretExitswitchToSecretMap)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public dynamic class secretExitswitchToSecretMap extends MovieClip {
public var switchSound:Sound;
public var switchSoundChannel:SoundChannel;
public function secretExitswitchToSecretMap(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
switchSound = new Switch();
switchSoundChannel = switchSound.play();
switchSoundChannel.addEventListener(Event.SOUND_COMPLETE, switchSoundChannelHandler);
}
public function switchSoundChannelHandler(_arg1:Event):void{
switchSoundChannel = null;
}
}
}//package
Section 180
//ShellBox (ShellBox)
package {
import flash.display.*;
public dynamic class ShellBox extends MovieClip {
}
}//package
Section 181
//Shells (Shells)
package {
import flash.display.*;
public dynamic class Shells extends MovieClip {
}
}//package
Section 182
//Shot (Shot)
package {
import flash.display.*;
public dynamic class Shot extends MovieClip {
}
}//package
Section 183
//Shotgun (Shotgun)
package {
import flash.display.*;
public dynamic class Shotgun extends MovieClip {
}
}//package
Section 184
//ShotgunGuy (ShotgunGuy)
package {
import flash.display.*;
public dynamic class ShotgunGuy extends MovieClip {
public function ShotgunGuy(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 185
//ShotgunSound (ShotgunSound)
package {
import flash.media.*;
public dynamic class ShotgunSound extends Sound {
}
}//package
Section 186
//SingleRocket (SingleRocket)
package {
import flash.display.*;
public dynamic class SingleRocket extends MovieClip {
}
}//package
Section 187
//Skip (Skip)
package {
import flash.display.*;
public dynamic class Skip extends SimpleButton {
}
}//package
Section 188
//skull (skull)
package {
import flash.display.*;
public dynamic class skull extends MovieClip {
}
}//package
Section 189
//skulldoor (skulldoor)
package {
import flash.display.*;
public dynamic class skulldoor extends MovieClip {
}
}//package
Section 190
//Spopd (Spopd)
package {
import flash.media.*;
public dynamic class Spopd extends Sound {
}
}//package
Section 191
//SSG (SSG)
package {
import flash.display.*;
public dynamic class SSG extends MovieClip {
}
}//package
Section 192
//StartGame (StartGame)
package {
import flash.display.*;
public dynamic class StartGame extends SimpleButton {
}
}//package
Section 193
//Stimpak (Stimpak)
package {
import flash.display.*;
public dynamic class Stimpak extends MovieClip {
}
}//package
Section 194
//SuperItemGet (SuperItemGet)
package {
import flash.media.*;
public dynamic class SuperItemGet extends Sound {
}
}//package
Section 195
//Superschorsch (Superschorsch)
package {
import flash.display.*;
public dynamic class Superschorsch extends MovieClip {
}
}//package
Section 196
//Switch (Switch)
package {
import flash.media.*;
public dynamic class Switch extends Sound {
}
}//package
Section 197
//Switch2 (Switch2)
package {
import flash.media.*;
public dynamic class Switch2 extends Sound {
}
}//package
Section 198
//TeleportAnim (TeleportAnim)
package {
import flash.display.*;
public dynamic class TeleportAnim extends MovieClip {
public function TeleportAnim(){
addFrameScript(50, frame51);
}
function frame51(){
this.stop();
}
}
}//package
Section 199
//txt2 (txt2)
package {
import flash.display.*;
public dynamic class txt2 extends MovieClip {
}
}//package
Section 200
//txt3 (txt3)
package {
import flash.display.*;
public dynamic class txt3 extends MovieClip {
}
}//package
Section 201
//UltraViolence (UltraViolence)
package {
import flash.display.*;
public dynamic class UltraViolence extends SimpleButton {
}
}//package
Section 202
//WeaponGet (WeaponGet)
package {
import flash.media.*;
public dynamic class WeaponGet extends Sound {
}
}//package
Section 203
//Veggies (Veggies)
package {
import flash.media.*;
public dynamic class Veggies extends Sound {
}
}//package
Section 204
//woodleft (woodleft)
package {
import flash.display.*;
public dynamic class woodleft extends MovieClip {
}
}//package
Section 205
//woodright (woodright)
package {
import flash.display.*;
public dynamic class woodright extends MovieClip {
}
}//package
Section 206
//yellowdoor2 (yellowdoor2)
package {
import flash.display.*;
public dynamic class yellowdoor2 extends MovieClip {
}
}//package
Section 207
//YellowKey (YellowKey)
package {
import flash.display.*;
public dynamic class YellowKey extends MovieClip {
}
}//package
Section 208
//YellowKeyHUD (YellowKeyHUD)
package {
import flash.display.*;
public dynamic class YellowKeyHUD extends MovieClip {
}
}//package
Section 209
//yellowlhdoor (yellowlhdoor)
package {
import flash.display.*;
public dynamic class yellowlhdoor extends MovieClip {
}
}//package
Section 210
//YellowSkull (YellowSkull)
package {
import flash.display.*;
public dynamic class YellowSkull extends MovieClip {
}
}//package
Section 211
//YellowSkullHUD (YellowSkullHUD)
package {
import flash.display.*;
public dynamic class YellowSkullHUD extends MovieClip {
}
}//package
Section 212
//ZombieDeath1 (ZombieDeath1)
package {
import flash.media.*;
public dynamic class ZombieDeath1 extends Sound {
}
}//package
Section 213
//ZombieDeath2 (ZombieDeath2)
package {
import flash.media.*;
public dynamic class ZombieDeath2 extends Sound {
}
}//package
Section 214
//ZombieDeath3 (ZombieDeath3)
package {
import flash.media.*;
public dynamic class ZombieDeath3 extends Sound {
}
}//package
Section 215
//ZombieHit (ZombieHit)
package {
import flash.media.*;
public dynamic class ZombieHit extends Sound {
}
}//package
Section 216
//ZombieMan (ZombieMan)
package {
import flash.display.*;
public dynamic class ZombieMan extends MovieClip {
public function ZombieMan(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 217
//ZombieShotgun (ZombieShotgun)
package {
import flash.display.*;
public dynamic class ZombieShotgun extends MovieClip {
}
}//package
Section 218
//ZombieSpot1 (ZombieSpot1)
package {
import flash.media.*;
public dynamic class ZombieSpot1 extends Sound {
}
}//package
Section 219
//ZombieSpot2 (ZombieSpot2)
package {
import flash.media.*;
public dynamic class ZombieSpot2 extends Sound {
}
}//package
Section 220
//ZombieSpot3 (ZombieSpot3)
package {
import flash.media.*;
public dynamic class ZombieSpot3 extends Sound {
}
}//package