Section 1
//Bounce (fl.transitions.easing.Bounce)
package fl.transitions.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 3
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 4
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 5
//Achiev_Achievments_68 (Here2Collect_fla.Achiev_Achievments_68)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Achiev_Achievments_68 extends MovieClip {
public var timePlayed:TextField;
public var yuptext:TextField;
public var yotd:MovieClip;
public var wwtext:TextField;
public var jlctext:TextField;
public var thwtext:TextField;
public var warrentsPage2:MovieClip;
public var totalAmmo:TextField;
public var yotdtext:TextField;
public var be:MovieClip;
public var hol:MovieClip;
public var bk:MovieClip;
public var warrentsPage3:MovieClip;
public var rmwt:MovieClip;
public var sr:MovieClip;
public var bm:MovieClip;
public var sw:MovieClip;
public var ta:MovieClip;
public var thw:MovieClip;
public var warrents:MovieClip;
public var grtext:TextField;
public var fd:MovieClip;
public var yup:MovieClip;
public var wp:MovieClip;
public var wt:MovieClip;
public var totalDeaths:TextField;
public var ww:MovieClip;
public var general:MovieClip;
public var gr:MovieClip;
public var gw:MovieClip;
public var bktext:TextField;
public var snbtext:TextField;
public var tatext:TextField;
public var pltext:TextField;
public var weaponry:MovieClip;
public var snb:MovieClip;
public var tsbtext:TextField;
public var tpc:MovieClip;
public var jlc:MovieClip;
public var generalPage2:MovieClip;
public var kamtext:TextField;
public var rmwttext:TextField;
public var wttext:TextField;
public var swtext:TextField;
public var wptext:TextField;
public var mb:MovieClip;
public var totalWaves:TextField;
public var tsb:MovieClip;
public var totalMoney:TextField;
public var kam:MovieClip;
public var weaponryPage2:MovieClip;
public var totalKills:TextField;
public var betext:TextField;
public var bmtext:TextField;
public var pl:MovieClip;
public function Achiev_Achievments_68(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 14, frame15, 20, frame21, 23, frame24, 26, frame27, 30, frame31, 35, frame36);
}
public function upFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("up");
}
function frame2(){
stop();
timePlayed.text = String(((((MovieClip(root).achiev.hoursPlayed + ":") + MovieClip(root).achiev.minutesPlayed) + ":") + MovieClip(root).achiev.secondsPlayed));
totalMoney.text = MovieClip(root).achiev.totalMoney;
totalKills.text = (((MovieClip(root).achiev.killedMuts + MovieClip(root).achiev.killedWitches) + MovieClip(root).achiev.killedGolems) + MovieClip(root).achiev.killedWolves);
totalDeaths.text = MovieClip(root).achiev.deaths;
totalAmmo.text = (((MovieClip(root).achiev.bulletsShot + MovieClip(root).achiev.shellsShot) + MovieClip(root).achiev.boltsShot) + MovieClip(root).achiev.roundsShot);
totalWaves.text = MovieClip(root).achiev.totalWaves;
}
function frame15(){
general.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
general.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
general.addEventListener(MouseEvent.CLICK, downFunc);
kam.gotoAndStop(MovieClip(root).achiev.kamikaze);
bk.gotoAndStop(MovieClip(root).achiev.bigKahuna);
if (MovieClip(root).achiev.waves > 75){
kamtext.text = String("(75)");
} else {
kamtext.text = String((("(" + MovieClip(root).achiev.waves) + ")"));
};
if (MovieClip(root).achiev.waves > 100){
bktext.text = String("(100)");
} else {
bktext.text = String((("(" + MovieClip(root).achiev.waves) + ")"));
};
}
function frame11(){
generalPage2.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
generalPage2.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
generalPage2.addEventListener(MouseEvent.CLICK, downFunc);
ta.gotoAndStop(MovieClip(root).achiev.transactionApproved);
hol.gotoAndStop(MovieClip(root).achiev.hookedOnLead);
yup.gotoAndStop(MovieClip(root).achiev.yuppie);
ww.gotoAndStop(MovieClip(root).achiev.waveWako);
if (MovieClip(root).achiev.totalMoney > 1000000){
tatext.text = String("(1,000,000)");
} else {
tatext.text = String((("(" + MovieClip(root).achiev.totalMoney) + ")"));
};
if (MovieClip(root).achiev.waves > 25){
yuptext.text = String("(25)");
} else {
yuptext.text = String((("(" + MovieClip(root).achiev.waves) + ")"));
};
if (MovieClip(root).achiev.waves > 50){
wwtext.text = String("(50)");
} else {
wwtext.text = String((("(" + MovieClip(root).achiev.waves) + ")"));
};
}
function frame24(){
warrentsPage3.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
warrentsPage3.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
warrentsPage3.addEventListener(MouseEvent.CLICK, downFunc);
warrents.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
warrents.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
warrents.addEventListener(MouseEvent.CLICK, downFunc);
wp.gotoAndStop(MovieClip(root).achiev.witchPlease);
sw.gotoAndStop(MovieClip(root).achiev.salemWho);
fd.gotoAndStop(MovieClip(root).achiev.fleshyDemise);
snb.gotoAndStop(MovieClip(root).achiev.stitchesNBolts);
if (MovieClip(root).achiev.killedWitches > 5){
wptext.text = String("(5)");
} else {
wptext.text = String((("(" + MovieClip(root).achiev.killedWitches) + ")"));
};
if (MovieClip(root).achiev.killedWitches > 10){
swtext.text = String("(10)");
} else {
swtext.text = String((("(" + MovieClip(root).achiev.killedWitches) + ")"));
};
if (MovieClip(root).achiev.killedGolems > 5){
snbtext.text = String("(5)");
} else {
snbtext.text = String((("(" + MovieClip(root).achiev.killedGolems) + ")"));
};
}
function frame21(){
warrentsPage2.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
warrentsPage2.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
warrentsPage2.addEventListener(MouseEvent.CLICK, downFunc);
thw.gotoAndStop(MovieClip(root).achiev.inTheHead);
gr.gotoAndStop(MovieClip(root).achiev.graveyardRhade);
yotd.gotoAndStop(MovieClip(root).achiev.yawnOfTheDead);
ww.gotoAndStop(MovieClip(root).achiev.whichWitch);
if (MovieClip(root).achiev.killedMuts > 25){
thwtext.text = String("(25)");
} else {
thwtext.text = String((("(" + MovieClip(root).achiev.killedMuts) + ")"));
};
if (MovieClip(root).achiev.killedMuts > 100){
grtext.text = String("(100)");
} else {
grtext.text = String((("(" + MovieClip(root).achiev.killedMuts) + ")"));
};
if (MovieClip(root).achiev.killedMuts > 1000){
yotdtext.text = String("(1000)");
} else {
yotdtext.text = String((("(" + MovieClip(root).achiev.killedMuts) + ")"));
};
}
function frame36(){
weaponry.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
weaponry.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
weaponry.addEventListener(MouseEvent.CLICK, downFunc);
rmwt.gotoAndStop(MovieClip(root).achiev.realMenWearTights);
sr.gotoAndStop(MovieClip(root).achiev.speedRound);
jlc.gotoAndStop(MovieClip(root).achiev.justLikeCandy);
if (MovieClip(root).achiev.boltsShot > 1000){
rmwttext.text = String("(1000)");
} else {
rmwttext.text = String((("(" + MovieClip(root).achiev.boltsShot) + ")"));
};
if (MovieClip(root).achiev.roundsShot > 1000){
jlctext.text = String("(1000)");
} else {
jlctext.text = String((("(" + MovieClip(root).achiev.roundsShot) + ")"));
};
}
function frame27(){
warrentsPage2.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
warrentsPage2.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
warrentsPage2.addEventListener(MouseEvent.CLICK, downFunc);
bm.gotoAndStop(MovieClip(root).achiev.bloodyMess);
pl.gotoAndStop(MovieClip(root).achiev.profLupin);
wt.gotoAndStop(MovieClip(root).achiev.whatTime);
be.gotoAndStop(MovieClip(root).achiev.bigEars);
if (MovieClip(root).achiev.killedGolems > 10){
bmtext.text = String("(10)");
} else {
bmtext.text = String((("(" + MovieClip(root).achiev.killedGolems) + ")"));
};
if (MovieClip(root).achiev.killedWolves > 25){
pltext.text = String("(25)");
} else {
pltext.text = String((("(" + MovieClip(root).achiev.killedWolves) + ")"));
};
if (MovieClip(root).achiev.killedWolves > 100){
wttext.text = String("(100)");
} else {
wttext.text = String((("(" + MovieClip(root).achiev.killedWolves) + ")"));
};
if (MovieClip(root).achiev.killedWolves > 1000){
betext.text = String("(1000)");
} else {
betext.text = String((("(" + MovieClip(root).achiev.killedWolves) + ")"));
};
}
public function downFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("down");
gotoAndStop(_arg1.target.name);
}
function frame31(){
weaponryPage2.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
weaponryPage2.addEventListener(MouseEvent.MOUSE_OUT, upFunc);
weaponryPage2.addEventListener(MouseEvent.CLICK, downFunc);
mb.gotoAndStop(MovieClip(root).achiev.masterBlaster);
tpc.gotoAndStop(MovieClip(root).achiev.twoPumpChump);
tsb.gotoAndStop(MovieClip(root).achiev.twoSmokingBarrels);
gw.gotoAndStop(MovieClip(root).achiev.gotWood);
if (MovieClip(root).achiev.bulletsShot > 1000){
bmtext.text = String("(1000)");
} else {
bmtext.text = String((("(" + MovieClip(root).achiev.bulletsShot) + ")"));
};
if (MovieClip(root).achiev.shellsShot > 1000){
tsbtext.text = String("(1000)");
} else {
tsbtext.text = String((("(" + MovieClip(root).achiev.shellsShot) + ")"));
};
}
function frame1(){
stop();
}
public function overFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("over");
}
}
}//package Here2Collect_fla
Section 6
//Achiev_Arrow_73 (Here2Collect_fla.Achiev_Arrow_73)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Achiev_Arrow_73 extends MovieClip {
public function Achiev_Arrow_73(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 7
//Achiev_General_64 (Here2Collect_fla.Achiev_General_64)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Achiev_General_64 extends MovieClip {
public function Achiev_General_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 8
//Achiev_Summary_66 (Here2Collect_fla.Achiev_Summary_66)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Achiev_Summary_66 extends MovieClip {
public function Achiev_Summary_66(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 9
//Achiev_Warrents_65 (Here2Collect_fla.Achiev_Warrents_65)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Achiev_Warrents_65 extends MovieClip {
public function Achiev_Warrents_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 10
//Achiev_Weaponry_67 (Here2Collect_fla.Achiev_Weaponry_67)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Achiev_Weaponry_67 extends MovieClip {
public function Achiev_Weaponry_67(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 11
//AGlogo_mc_1 (Here2Collect_fla.AGlogo_mc_1)
package Here2Collect_fla {
import flash.display.*;
public dynamic class AGlogo_mc_1 extends MovieClip {
public var agButton_btn:SimpleButton;
}
}//package Here2Collect_fla
Section 12
//AGteaser_mc_6 (Here2Collect_fla.AGteaser_mc_6)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import fl.transitions.*;
import flash.net.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class AGteaser_mc_6 extends MovieClip {
public var smash:Smash;
public var timer:Timer;
public var p_in;
public var AGpresented_mc:MovieClip;
public var AGskip_btn:SimpleButton;
public var AGclick_btn:SimpleButton;
public var AGlogo_mc:MovieClip;
public function AGteaser_mc_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
smash = new Smash();
AGpresented_mc.alpha = 0;
AGclick_btn.visible = false;
AGlogo_mc.y = -70;
timer = new Timer(4000);
timer.addEventListener(TimerEvent.TIMER, done);
timer.start();
p_in = new Tween(AGpresented_mc, "alpha", Strong.easeIn, 0, 100, 12, false);
p_in.addEventListener(TweenEvent.MOTION_FINISH, logo);
AGskip_btn.addEventListener(MouseEvent.CLICK, done);
AGclick_btn.addEventListener(MouseEvent.CLICK, loadAG);
}
public function done(_arg1:Event){
timer.stop();
MovieClip(root).gotoAndStop("Loading");
}
public function loadAG(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.addictinggames.com");
navigateToURL(_local2, "_blank");
}
public function logo(_arg1:TweenEvent){
var logo_in:*;
var crunch:Function;
var event = _arg1;
crunch = function (_arg1:TweenEvent){
smash.play();
AGclick_btn.visible = true;
new Tween(AGlogo_mc, "y", Bounce.easeOut, 60, 85, 6, false);
new Tween(AGlogo_mc, "x", Bounce.easeOut, 30, 50, 6, false);
new Tween(AGpresented_mc, "y", Bounce.easeOut, 15, 25, 6, false);
new Tween(AGpresented_mc, "x", Bounce.easeOut, 110, 100, 6, false);
};
logo_in = new Tween(AGlogo_mc, "y", Strong.easeIn, -75, 85, 12, false);
logo_in.addEventListener(TweenEvent.MOTION_FINISH, crunch);
}
}
}//package Here2Collect_fla
Section 13
//GP_BrokenWall_98 (Here2Collect_fla.GP_BrokenWall_98)
package Here2Collect_fla {
import flash.display.*;
public dynamic class GP_BrokenWall_98 extends MovieClip {
public function GP_BrokenWall_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 14
//hcMenu_51 (Here2Collect_fla.hcMenu_51)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class hcMenu_51 extends MovieClip {
public var hcMnuAchievments:MovieClip;
public var restart:MovieClip;
public var music:MovieClip;
public var resume:MovieClip;
public var fade:MovieClip;
public var sfx:MovieClip;
public var thing:MovieClip;
public var InterfaceControls:IFC;
public function hcMenu_51(){
addFrameScript(0, frame1, 5, frame6, 10, frame11);
}
public function restartFunction(_arg1:MouseEvent){
MovieClip(root).gotoAndStop("MainMenu");
this.gotoAndStop("up");
}
public function sfxToggle(_arg1:MouseEvent){
if (InterfaceControls.SFX == true){
InterfaceControls.SFX = false;
_arg1.target.toggle.gotoAndStop("off");
} else {
if (InterfaceControls.SFX == false){
InterfaceControls.SFX = true;
_arg1.target.toggle.gotoAndStop("on");
};
};
}
public function resumeClick(_arg1:MouseEvent){
InterfaceControls.Pause = false;
this.gotoAndStop("up");
}
public function achievClick(_arg1:MouseEvent){
if (MovieClip(root).currentLabel == "AchievmentMenu"){
return;
};
if ((((((((MovieClip(root).currentLabel == "MainMenu")) || ((MovieClip(root).currentLabel == "Credits")))) || ((MovieClip(root).currentLabel == "Intructions")))) || ((MovieClip(root).currentLabel == "Intructions1")))){
MovieClip(root).gotoAndStop("AchievmentMenu");
} else {
if (MovieClip(root).currentLabel == "PlayGame"){
MovieClip(root).achievPage.visible = true;
};
};
this.gotoAndStop("thing");
}
function frame1(){
stop();
}
function frame6(){
thing.addEventListener(MouseEvent.CLICK, clickFunction);
}
public function outFunction(_arg1:MouseEvent){
_arg1.currentTarget.gotoAndStop("up");
}
public function clickFunction(_arg1:MouseEvent){
gotoAndStop(_arg1.target.name);
}
function frame11(){
InterfaceControls = new IFC();
InterfaceControls.Pause = true;
stop();
resume.addEventListener(MouseEvent.ROLL_OVER, overFunction);
resume.addEventListener(MouseEvent.ROLL_OUT, outFunction);
resume.addEventListener(MouseEvent.CLICK, resumeClick);
hcMnuAchievments.addEventListener(MouseEvent.ROLL_OVER, overFunction);
hcMnuAchievments.addEventListener(MouseEvent.ROLL_OUT, outFunction);
hcMnuAchievments.addEventListener(MouseEvent.CLICK, achievClick);
music.addEventListener(MouseEvent.ROLL_OVER, overFunction);
music.addEventListener(MouseEvent.ROLL_OUT, outFunction);
music.addEventListener(MouseEvent.CLICK, musicToggle);
sfx.addEventListener(MouseEvent.ROLL_OVER, overFunction);
sfx.addEventListener(MouseEvent.ROLL_OUT, outFunction);
sfx.addEventListener(MouseEvent.CLICK, sfxToggle);
restart.addEventListener(MouseEvent.ROLL_OVER, overFunction);
restart.addEventListener(MouseEvent.ROLL_OUT, outFunction);
restart.addEventListener(MouseEvent.CLICK, restartFunction);
}
public function overFunction(_arg1:MouseEvent){
_arg1.currentTarget.gotoAndStop("over");
}
public function musicToggle(_arg1:MouseEvent){
if (InterfaceControls.Audio == true){
InterfaceControls.Audio = false;
_arg1.target.toggle.gotoAndStop("off");
MovieClip(root).soundChan.stop();
} else {
if (InterfaceControls.Audio == false){
InterfaceControls.Audio = true;
_arg1.target.toggle.gotoAndStop("on");
};
};
}
}
}//package Here2Collect_fla
Section 15
//mc_Exit_58 (Here2Collect_fla.mc_Exit_58)
package Here2Collect_fla {
import flash.display.*;
public dynamic class mc_Exit_58 extends MovieClip {
public function mc_Exit_58(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 16
//mc_Music_54 (Here2Collect_fla.mc_Music_54)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class mc_Music_54 extends MovieClip {
public var toggle:MovieClip;
public function mc_Music_54(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (MovieClip(parent).InterfaceControls.Audio == false){
toggle.gotoAndStop("off");
};
if (MovieClip(parent).InterfaceControls.Audio == true){
toggle.gotoAndStop("on");
};
}
}
}//package Here2Collect_fla
Section 17
//mc_OnOff_55 (Here2Collect_fla.mc_OnOff_55)
package Here2Collect_fla {
import flash.display.*;
public dynamic class mc_OnOff_55 extends MovieClip {
public function mc_OnOff_55(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 18
//mc_Restart_57 (Here2Collect_fla.mc_Restart_57)
package Here2Collect_fla {
import flash.display.*;
public dynamic class mc_Restart_57 extends MovieClip {
public function mc_Restart_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 19
//mc_Return_53 (Here2Collect_fla.mc_Return_53)
package Here2Collect_fla {
import flash.display.*;
public dynamic class mc_Return_53 extends MovieClip {
public function mc_Return_53(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 20
//mc_SFX_56 (Here2Collect_fla.mc_SFX_56)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class mc_SFX_56 extends MovieClip {
public var toggle:MovieClip;
public function mc_SFX_56(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
if (MovieClip(parent).InterfaceControls.SFX == false){
toggle.gotoAndStop("off");
};
if (MovieClip(parent).InterfaceControls.SFX == true){
toggle.gotoAndStop("on");
};
}
}
}//package Here2Collect_fla
Section 21
//Menu_Achievments_50 (Here2Collect_fla.Menu_Achievments_50)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Menu_Achievments_50 extends MovieClip {
public function Menu_Achievments_50(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 22
//Menu_Credits_49 (Here2Collect_fla.Menu_Credits_49)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Menu_Credits_49 extends MovieClip {
public function Menu_Credits_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 23
//Menu_Instructions_48 (Here2Collect_fla.Menu_Instructions_48)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Menu_Instructions_48 extends MovieClip {
public function Menu_Instructions_48(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 24
//Menu_MainMenu_60 (Here2Collect_fla.Menu_MainMenu_60)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Menu_MainMenu_60 extends MovieClip {
public function Menu_MainMenu_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 25
//Menu_play_47 (Here2Collect_fla.Menu_play_47)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Menu_play_47 extends MovieClip {
public function Menu_play_47(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 26
//Menu_Retry_95 (Here2Collect_fla.Menu_Retry_95)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Menu_Retry_95 extends MovieClip {
public function Menu_Retry_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 27
//Planks_99 (Here2Collect_fla.Planks_99)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Planks_99 extends MovieClip {
public function Planks_99(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 28
//theBar_96 (Here2Collect_fla.theBar_96)
package Here2Collect_fla {
import flash.display.*;
public dynamic class theBar_96 extends MovieClip {
public var planks1:Node;
public var planks2:Node;
public var wallNode:Node;
public var bg:MovieClip;
public var fish:Block;
public var basementNode:Node;
public var thePlank:MovieClip;
public var stairsNode:Node;
public var fireplace:Node;
public var lowerStairs:MovieClip;
public var doorNode:Node;
public var _hero:Player;
public var theWall:MovieClip;
public function theBar_96(){
addFrameScript(0, frame1);
}
function frame1(){
this.setChildIndex(theWall, 1);
}
}
}//package Here2Collect_fla
Section 29
//Transition3_41 (Here2Collect_fla.Transition3_41)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Transition3_41 extends MovieClip {
public function Transition3_41(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Here2Collect_fla
Section 30
//Transition4_39 (Here2Collect_fla.Transition4_39)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Transition4_39 extends MovieClip {
public function Transition4_39(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Here2Collect_fla
Section 31
//Transition5_43 (Here2Collect_fla.Transition5_43)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Transition5_43 extends MovieClip {
public function Transition5_43(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package Here2Collect_fla
Section 32
//Transition6_45 (Here2Collect_fla.Transition6_45)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Transition6_45 extends MovieClip {
public function Transition6_45(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package Here2Collect_fla
Section 33
//Transition7_46 (Here2Collect_fla.Transition7_46)
package Here2Collect_fla {
import flash.display.*;
public dynamic class Transition7_46 extends MovieClip {
public function Transition7_46(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package Here2Collect_fla
Section 34
//UI_AchievmentPage_62 (Here2Collect_fla.UI_AchievmentPage_62)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class UI_AchievmentPage_62 extends MovieClip {
public var achievTotal:TextField;
public var weaponry:MovieClip;
public var warrents:MovieClip;
public var theBox:MovieClip;
public var summary:MovieClip;
public var closeMe:MovieClip;
public var general:MovieClip;
public function UI_AchievmentPage_62(){
addFrameScript(0, frame1);
}
function frame1(){
summary.addEventListener(MouseEvent.ROLL_OVER, overFunc);
summary.addEventListener(MouseEvent.ROLL_OUT, upFunc);
summary.addEventListener(MouseEvent.CLICK, downFunc);
general.addEventListener(MouseEvent.ROLL_OVER, overFunc);
general.addEventListener(MouseEvent.ROLL_OUT, upFunc);
general.addEventListener(MouseEvent.CLICK, downFunc);
warrents.addEventListener(MouseEvent.ROLL_OVER, overFunc);
warrents.addEventListener(MouseEvent.ROLL_OUT, upFunc);
warrents.addEventListener(MouseEvent.CLICK, downFunc);
weaponry.addEventListener(MouseEvent.ROLL_OVER, overFunc);
weaponry.addEventListener(MouseEvent.ROLL_OUT, upFunc);
weaponry.addEventListener(MouseEvent.CLICK, downFunc);
closeMe.addEventListener(MouseEvent.ROLL_OVER, overFunc);
closeMe.addEventListener(MouseEvent.ROLL_OUT, upFunc);
closeMe.addEventListener(MouseEvent.CLICK, closeThis);
achievTotal.text = MovieClip(root).achiev.totalAchievments;
if (theBox.currentLabel == "summary"){
summary.gotoAndStop("down");
};
if ((((theBox.currentLabel == "general")) || ((theBox.currentLabel == "generalPage2")))){
general.gotoAndStop("down");
};
if ((((theBox.currentLabel == "weaponry")) || ((theBox.currentLabel == "weaponryPage2")))){
weaponry.gotoAndStop("down");
};
if ((((((theBox.currentLabel == "warrents")) || ((theBox.currentLabel == "warrentsPage2")))) || ((theBox.currentLabel == "warrentsPage3")))){
warrents.gotoAndStop("down");
};
}
public function downFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("down");
theBox.gotoAndStop(_arg1.target.name);
}
public function closeThis(_arg1:MouseEvent){
_arg1.target.gotoAndStop("down");
this.visible = false;
MovieClip(root).hcMenu.gotoAndStop("thing");
}
public function overFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("over");
}
public function upFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("up");
}
}
}//package Here2Collect_fla
Section 35
//UI_Close_63 (Here2Collect_fla.UI_Close_63)
package Here2Collect_fla {
import flash.display.*;
public dynamic class UI_Close_63 extends MovieClip {
public function UI_Close_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Here2Collect_fla
Section 36
//UI_CrossbowIcon_105 (Here2Collect_fla.UI_CrossbowIcon_105)
package Here2Collect_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_CrossbowIcon_105 extends MovieClip {
public var allAmmo:TextField;
public var theClip:TextField;
public function UI_CrossbowIcon_105(){
addFrameScript(0, frame1, 4, frame5, 11, frame12);
}
function frame12(){
allAmmo.visible = true;
theClip.visible = true;
}
function frame1(){
allAmmo.visible = false;
theClip.visible = false;
}
function frame5(){
allAmmo.visible = false;
theClip.visible = false;
}
}
}//package Here2Collect_fla
Section 37
//UI_GatlingIcon_104 (Here2Collect_fla.UI_GatlingIcon_104)
package Here2Collect_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_GatlingIcon_104 extends MovieClip {
public var allAmmo:TextField;
public var theClip:TextField;
public function UI_GatlingIcon_104(){
addFrameScript(0, frame1, 4, frame5, 11, frame12);
}
function frame12(){
allAmmo.visible = true;
theClip.visible = true;
}
function frame1(){
allAmmo.visible = false;
theClip.visible = false;
}
function frame5(){
allAmmo.visible = false;
theClip.visible = false;
}
}
}//package Here2Collect_fla
Section 38
//UI_HealthBar_101 (Here2Collect_fla.UI_HealthBar_101)
package Here2Collect_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class UI_HealthBar_101 extends MovieClip {
public function UI_HealthBar_101(){
addFrameScript(0, frame1, 12, frame13);
}
function frame1(){
stop();
}
function frame13(){
MovieClip(root).hero.dead = true;
MovieClip(root).achiev.incDeaths();
MovieClip(root).gotoAndStop("GameOver");
}
}
}//package Here2Collect_fla
Section 39
//UI_PistolIcon_103 (Here2Collect_fla.UI_PistolIcon_103)
package Here2Collect_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_PistolIcon_103 extends MovieClip {
public var allAmmo:TextField;
public var theClip:TextField;
public function UI_PistolIcon_103(){
addFrameScript(0, frame1, 4, frame5, 11, frame12);
}
function frame12(){
allAmmo.visible = true;
theClip.visible = true;
}
function frame1(){
allAmmo.visible = false;
theClip.visible = false;
}
function frame5(){
allAmmo.visible = false;
theClip.visible = false;
}
}
}//package Here2Collect_fla
Section 40
//UI_ShotgunIcon_102 (Here2Collect_fla.UI_ShotgunIcon_102)
package Here2Collect_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_ShotgunIcon_102 extends MovieClip {
public var allAmmo:TextField;
public var theClip:TextField;
public function UI_ShotgunIcon_102(){
addFrameScript(0, frame1, 4, frame5, 11, frame12);
}
function frame12(){
allAmmo.visible = true;
theClip.visible = true;
}
function frame1(){
allAmmo.visible = false;
theClip.visible = false;
}
function frame5(){
allAmmo.visible = false;
theClip.visible = false;
}
}
}//package Here2Collect_fla
Section 41
//$blood ($blood)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class $blood extends MovieClip {
private var timer:Timer;
public function $blood(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
this.y = (_arg2 + randRange(-(_arg4), _arg4));
this.x = (_arg1 + randRange(-(_arg3), _arg3));
this.scaleX = randRange(0.25, 1);
this.scaleY = randRange(0.25, 1);
this.alpha = randRange(0.4, 0.75);
timer = new Timer(2000);
timer.addEventListener(TimerEvent.TIMER, reduceAlpha);
timer.start();
}
private function randRange(_arg1:Number, _arg2:Number){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function removeMe(){
parent.removeChild(this);
timer.removeEventListener(TimerEvent.TIMER, reduceAlpha);
timer = null;
delete ??getglobalscope
[this];
}
private function reduceAlpha(_arg1:TimerEvent){
if (this.alpha <= 0){
removeMe();
};
this.alpha = (this.alpha - 0.1);
}
}
}//package
Section 42
//$click ($click)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class $click extends MovieClip {
private var dy:Number;
private var dx;
public function $click(_arg1:int, _arg2:int, _arg3:int, _arg4:String){
var _local5:Timer;
super();
this.gotoAndStop(_arg4);
this.x = (_arg1 + Math.cos((((2 * Math.PI) * randRange(0, 360)) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * randRange(0, 360)) / 360)));
dx = (_arg3 * Math.cos((((2 * Math.PI) * randRange(-135, -45)) / 360)));
dy = (_arg3 * Math.sin((((2 * Math.PI) * randRange(-135, -45)) / 360)));
_local5 = new Timer(100);
_local5.addEventListener(TimerEvent.TIMER, reduceAlpha);
this.addEventListener(Event.ENTER_FRAME, moveParticle);
_local5.start();
}
private function randRange(_arg1:Number, _arg2:Number){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function removeMe(){
parent.removeChild(this);
removeEventListener(TimerEvent.TIMER, reduceAlpha);
this.removeEventListener(Event.ENTER_FRAME, moveParticle);
delete ??getglobalscope
[this];
}
private function moveParticle(_arg1:Event){
this.x = (this.x + dx);
this.y = (this.y + dy);
if (this.alpha <= 0){
removeMe();
};
}
private function reduceAlpha(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
}
}//package
Section 43
//$dazed ($dazed)
package {
import flash.display.*;
public dynamic class $dazed extends MovieClip {
}
}//package
Section 44
//$flame ($flame)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class $flame extends MovieClip {
private var dy:Number;
private var dx;
public function $flame(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
var _local5:Timer;
super();
this.y = (_arg2 + Math.sin((((2 * Math.PI) * randRange(0, 360)) / 360)));
this.x = (_arg1 + randRange(-(_arg3), _arg3));
dx = (_arg4 * Math.cos((((2 * Math.PI) * randRange(-120, -60)) / 360)));
dy = (_arg4 * Math.sin((((2 * Math.PI) * randRange(-120, -60)) / 360)));
this.scaleX = randRange(0.5, 1);
this.scaleY = randRange(0.5, 1);
this.alpha = randRange(0.4, 0.75);
_local5 = new Timer(200);
_local5.addEventListener(TimerEvent.TIMER, reduceAlpha);
this.addEventListener(Event.ENTER_FRAME, moveParticle);
_local5.start();
}
private function randRange(_arg1:Number, _arg2:Number){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function removeMe(){
parent.removeChild(this);
removeEventListener(TimerEvent.TIMER, reduceAlpha);
this.removeEventListener(Event.ENTER_FRAME, moveParticle);
delete ??getglobalscope
[this];
}
private function moveParticle(_arg1:Event){
this.x = (this.x + dx);
this.y = (this.y + dy);
this.scaleX = (this.scaleY = this.alpha);
if (this.alpha <= 0){
removeMe();
};
}
private function reduceAlpha(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
}
}//package
Section 45
//$smoke ($smoke)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class $smoke extends MovieClip {
private var dy:Number;
private var dx;
public function $smoke(_arg1:int, _arg2:int, _arg3:int){
var _local4:Timer;
super();
this.x = (_arg1 + Math.cos((((2 * Math.PI) * randRange(0, 360)) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * randRange(0, 360)) / 360)));
dx = (_arg3 * Math.cos((((2 * Math.PI) * randRange(-135, -45)) / 360)));
dy = (_arg3 * Math.sin((((2 * Math.PI) * randRange(-135, -45)) / 360)));
this.scaleX = (this.scaleY = randRange(0.5, 1));
this.alpha = randRange(0.4, 0.9);
this.rotation = randRange(0, 360);
_local4 = new Timer(100);
_local4.addEventListener(TimerEvent.TIMER, reduceAlpha);
this.addEventListener(Event.ENTER_FRAME, moveParticle);
_local4.start();
}
private function randRange(_arg1:Number, _arg2:Number){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function removeMe(){
parent.removeChild(this);
removeEventListener(TimerEvent.TIMER, reduceAlpha);
this.removeEventListener(Event.ENTER_FRAME, moveParticle);
delete ??getglobalscope
[this];
}
private function moveParticle(_arg1:Event){
this.x = (this.x + dx);
this.y = (this.y + dy);
this.scaleX = (this.scaleY = (this.scaleY + 0.09));
if (this.alpha <= 0){
removeMe();
};
}
private function reduceAlpha(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
}
}//package
Section 46
//Achievments (Achievments)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
public class Achievments {
private var parentMC:MovieClip;
private var popUp:UI_Achievment;
private var _sharedObject:SharedObject;
private var ifc:IFC;
private var popUpDone:Boolean;// = true
static var _yawnOfTheDead:Boolean = false;
static var _justLikeCandy:Boolean = false;
static var _bloodyMess:Boolean = false;
static var _hoursPlayed:uint = 0;
static var hasShotgun:Boolean = false;
static var _bulletsShot:uint = 0;
static var _inTheHead:Boolean = false;
static var _whatTime:Boolean = false;
static var _boltsShot:uint = 0;
static var _gotWood:Boolean = false;
static var _waves:uint = 0;
static var _deaths:uint = 0;
static var _killedWolves:uint = 0;
static var _profLupin:Boolean = false;
static var _killedGolems:uint = 0;
static var _waveWako:Boolean = false;
static var _minutesPlayed:uint = 0;
static var _speedRound:Boolean = false;
static var _secondsPlayed:uint = 0;
static var _salemWho:Boolean = false;
static var _fleshyDemise:Boolean = false;
static var _twoPumpChump:Boolean = false;
static var _totalAchievments:uint = 0;
static var hasCrossbow:Boolean = false;
static var _bigEars:Boolean = false;
static var _whichWitch:Boolean = false;
static var _onTheHouse:Boolean = false;
static var _stitchesNBolts:Boolean = false;
static var _bottlesShot:uint = 0;
static var _fishShot:uint = 0;
static var _kamikaze:Boolean = false;
static var _totalWaves:uint = 0;
static var hasGatling:Boolean = false;
static var _yuppie:Boolean = false;
static var _witchPlease:Boolean = false;
static var _graveyardRhade:Boolean = false;
static var _roundsShot:uint = 0;
static var _hookedOnLead:Boolean = false;
static var _masterBlaster:Boolean = false;
static var _killedMuts:uint = 0;
static var _realMenWearTights:Boolean = false;
static var _twoSmokingBarrels:Boolean = false;
static var _bigKahuna:Boolean = false;
static var _killedWitches:uint = 0;
static var _totalMoney:uint = 0;
static var _shellsShot:uint = 0;
static var _transactionApproved:Boolean = false;
public function Achievments(){
popUpDone = true;
ifc = new IFC();
super();
}
public function get justLikeCandy(){
return (_justLikeCandy);
}
public function incDeaths(){
_deaths++;
}
public function get yawnOfTheDead(){
return (_yawnOfTheDead);
}
public function get hookedOnLead(){
return (_hookedOnLead);
}
public function get speedRound(){
return (_speedRound);
}
public function loadGame(){
try {
_sharedObject = SharedObject.getLocal("testv099");
} catch(error:Error) {
return;
};
_totalAchievments = _sharedObject.data.TotalAchievments;
_totalMoney = _sharedObject.data.Money;
_totalWaves = _sharedObject.data.TotalWaves;
_yuppie = _sharedObject.data.Yuppie;
_kamikaze = _sharedObject.data.Kamikaze;
_waveWako = _sharedObject.data.WaveWako;
_bigKahuna = _sharedObject.data.BigKahuna;
_killedMuts = _sharedObject.data.KilledMutants;
_killedWitches = _sharedObject.data.KilledWitches;
_killedGolems = _sharedObject.data.KilledGolems;
_killedWolves = _sharedObject.data.KilledWolves;
_bulletsShot = _sharedObject.data.BulletsShot;
_shellsShot = _sharedObject.data.ShellsShot;
_boltsShot = _sharedObject.data.BoltsShot;
_roundsShot = _sharedObject.data.RoundsShot;
_twoPumpChump = _sharedObject.data.TwoPumpChump;
_gotWood = _sharedObject.data.GotWood;
_speedRound = _sharedObject.data.SpeedRound;
_justLikeCandy = _sharedObject.data.JustLikeCandy;
_masterBlaster = _sharedObject.data.MasterBlaster;
_realMenWearTights = _sharedObject.data.RealMenWearTights;
_twoSmokingBarrels = _sharedObject.data.TwoSmokingBarrels;
_hookedOnLead = _sharedObject.data.HookedOnLead;
_onTheHouse = _sharedObject.data.OnTheHouse;
_transactionApproved = _sharedObject.data.TransactionApproved;
_inTheHead = _sharedObject.data.InTheHead;
_graveyardRhade = _sharedObject.data.GraveyardRhade;
_yawnOfTheDead = _sharedObject.data.YawnOfTheDead;
_whichWitch = _sharedObject.data.WhichWitch;
_witchPlease = _sharedObject.data.WitchPlease;
_salemWho = _sharedObject.data.SalemWho;
_fleshyDemise = _sharedObject.data.FleshyDemise;
_stitchesNBolts = _sharedObject.data.StitchesNBolts;
_bloodyMess = _sharedObject.data.BloodyMess;
_profLupin = _sharedObject.data.ProfLupin;
_whatTime = _sharedObject.data.WhatTime;
_bigEars = _sharedObject.data.BigEars;
_secondsPlayed = _sharedObject.data.SecondsPlayed;
_minutesPlayed = _sharedObject.data.MinutesPlayed;
_hoursPlayed = _sharedObject.data.HoursPlayed;
_deaths = _sharedObject.data.PlayerDeaths;
}
public function get witchPlease(){
return (_witchPlease);
}
public function get minutesPlayed(){
return (_minutesPlayed);
}
public function get profLupin(){
return (_profLupin);
}
public function get bigEars(){
return (_bigEars);
}
private function removeAchievment(_arg1:TimerEvent){
var _local2:Timer;
_local2 = new Timer(25, (popUp.height / 3));
_local2.addEventListener(TimerEvent.TIMER, popUpPushDown);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, deleteAchievment);
_local2.start();
}
public function checkAchievments(){
if (!popUpDone){
return;
};
if ((((_waves >= 25)) && (!(_yuppie)))){
_yuppie = true;
pushAchievment("yuppie");
_totalAchievments++;
return;
};
if ((((_waves >= 75)) && (!(_kamikaze)))){
_kamikaze = true;
pushAchievment("kamikaze");
_totalAchievments++;
return;
};
if ((((_waves >= 50)) && (!(_waveWako)))){
_waveWako = true;
pushAchievment("wakeWako");
_totalAchievments++;
return;
};
if ((((_waves >= 100)) && (!(_bigKahuna)))){
_bigKahuna = true;
pushAchievment("bigKahuna");
_totalAchievments++;
return;
};
if (((hasShotgun) && (!(_twoPumpChump)))){
_twoPumpChump = true;
pushAchievment("twoPumpChump");
_totalAchievments++;
return;
};
if (((hasCrossbow) && (!(_gotWood)))){
_gotWood = true;
pushAchievment("gotWood");
_totalAchievments++;
return;
};
if (((hasGatling) && (!(_speedRound)))){
_speedRound = true;
pushAchievment("speedRound");
_totalAchievments++;
return;
};
if ((((_roundsShot >= 1000)) && (!(_justLikeCandy)))){
_justLikeCandy = true;
pushAchievment("justLikeCandy");
_totalAchievments++;
return;
};
if ((((_bulletsShot >= 1000)) && (!(_masterBlaster)))){
_masterBlaster = true;
pushAchievment("masterBlaster");
_totalAchievments++;
return;
};
if ((((_shellsShot >= 1000)) && (!(_twoSmokingBarrels)))){
_twoSmokingBarrels = true;
pushAchievment("twoSmokingBarrels");
_totalAchievments++;
return;
};
if ((((_boltsShot >= 1000)) && (!(_realMenWearTights)))){
_realMenWearTights = true;
pushAchievment("realMenWearTights");
_totalAchievments++;
return;
};
if ((((_fishShot >= 100)) && (!(_hookedOnLead)))){
_hookedOnLead = true;
pushAchievment("hookedOnLead");
_totalAchievments++;
return;
};
if ((((_bottlesShot >= 15)) && (!(_onTheHouse)))){
_onTheHouse = true;
pushAchievment("onTheHouse");
_totalAchievments++;
return;
};
if ((((_totalMoney >= 1000000)) && (!(_transactionApproved)))){
_transactionApproved = true;
pushAchievment("transactionApproved");
_totalAchievments++;
return;
};
if ((((_killedMuts >= 25)) && (!(_inTheHead)))){
_inTheHead = true;
pushAchievment("inTheHead");
_totalAchievments++;
return;
};
if ((((_killedMuts >= 100)) && (!(_graveyardRhade)))){
_graveyardRhade = true;
pushAchievment("graveyardRhade");
_totalAchievments++;
return;
};
if ((((_killedMuts >= 1000)) && (!(_yawnOfTheDead)))){
_yawnOfTheDead = true;
pushAchievment("yawnOfTheDead");
_totalAchievments++;
return;
};
if ((((_killedWitches >= 1)) && (!(_whichWitch)))){
_whichWitch = true;
pushAchievment("whichWitch");
_totalAchievments++;
return;
};
if ((((_killedWitches >= 5)) && (!(_witchPlease)))){
_witchPlease = true;
pushAchievment("witchPlease");
_totalAchievments++;
return;
};
if ((((_killedWitches >= 10)) && (!(_salemWho)))){
_salemWho = true;
pushAchievment("salemWho");
_totalAchievments++;
return;
};
if ((((_killedGolems >= 1)) && (!(_fleshyDemise)))){
_fleshyDemise = true;
pushAchievment("fleshyDemise");
_totalAchievments++;
return;
};
if ((((_killedGolems >= 5)) && (!(_stitchesNBolts)))){
_stitchesNBolts = true;
pushAchievment("stitchesNBolts");
_totalAchievments++;
return;
};
if ((((_killedGolems >= 10)) && (!(_bloodyMess)))){
_bloodyMess = true;
pushAchievment("bloodyMess");
_totalAchievments++;
return;
};
if ((((_killedWolves >= 25)) && (!(_profLupin)))){
_profLupin = true;
pushAchievment("profLupin");
_totalAchievments++;
return;
};
if ((((_killedWolves >= 100)) && (!(_whatTime)))){
_whatTime = true;
pushAchievment("whatTime");
_totalAchievments++;
return;
};
if ((((_killedWolves >= 1000)) && (!(_bigEars)))){
_bigEars = true;
pushAchievment("bigEars");
_totalAchievments++;
return;
};
}
public function get waves(){
return (_waves);
}
public function get inTheHead(){
return (_inTheHead);
}
public function set secondsPlayed(_arg1:uint){
_secondsPlayed = _arg1;
}
public function saveGame(){
try {
_sharedObject = SharedObject.getLocal("testv099");
} catch(error:Error) {
return;
};
_sharedObject.data.TotalAchievments = _totalAchievments;
_sharedObject.data.Money = _totalMoney;
_sharedObject.data.TotalWaves = (_totalWaves + _waves);
_sharedObject.data.Yuppie = _yuppie;
_sharedObject.data.Kamikaze = _kamikaze;
_sharedObject.data.WaveWako = _waveWako;
_sharedObject.data.BigKahuna = _bigKahuna;
_sharedObject.data.KilledMutants = _killedMuts;
_sharedObject.data.KilledWitches = _killedWitches;
_sharedObject.data.KilledGolems = _killedGolems;
_sharedObject.data.KilledWolves = _killedWolves;
_sharedObject.data.BulletsShot = _bulletsShot;
_sharedObject.data.ShellsShot = _shellsShot;
_sharedObject.data.BoltsShot = _boltsShot;
_sharedObject.data.RoundsShot = _roundsShot;
_sharedObject.data.TwoPumpChump = twoPumpChump;
_sharedObject.data.GotWood = _gotWood;
_sharedObject.data.SpeedRound = _speedRound;
_sharedObject.data.JustLikeCandy = _justLikeCandy;
_sharedObject.data.MasterBlaster = _masterBlaster;
_sharedObject.data.TwoSmokingBarrels = _twoSmokingBarrels;
_sharedObject.data.RealMenWearTights = _realMenWearTights;
_sharedObject.data.HookedOnLead = _hookedOnLead;
_sharedObject.data.OnTheHouse = _onTheHouse;
_sharedObject.data.TransactionApproved = _transactionApproved;
_sharedObject.data.InTheHead = _inTheHead;
_sharedObject.data.GraveyardRhade = _graveyardRhade;
_sharedObject.data.YawnOfTheDead = _yawnOfTheDead;
_sharedObject.data.WhichWitch = _whichWitch;
_sharedObject.data.WitchPlease = _witchPlease;
_sharedObject.data.SalemWho = _salemWho;
_sharedObject.data.FleshyDemise = _fleshyDemise;
_sharedObject.data.StitchesNBolts = _stitchesNBolts;
_sharedObject.data.BloodyMess = _bloodyMess;
_sharedObject.data.ProfLupin = _profLupin;
_sharedObject.data.WhatTime = _whatTime;
_sharedObject.data.BigEars = _bigEars;
_sharedObject.data.SecondsPlayed = _secondsPlayed;
_sharedObject.data.MinutesPlayed = _minutesPlayed;
_sharedObject.data.HoursPlayed = _hoursPlayed;
_sharedObject.data.PlayerDeaths = _deaths;
_sharedObject.flush();
_sharedObject.close();
}
public function get boltsShot(){
return (_boltsShot);
}
public function incMinutes(){
_minutesPlayed++;
}
public function incKilledGolems(){
_killedGolems++;
}
public function incRounds(){
_roundsShot++;
}
public function gotGatling(){
hasGatling = true;
}
private function popUpPushDone(_arg1:TimerEvent){
var _local2:Timer;
_local2 = new Timer(1000, 1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, removeAchievment);
_local2.start();
}
public function get whichWitch(){
return (_whichWitch);
}
public function get killedGolems(){
return (_killedGolems);
}
private function pushAchievment(_arg1:String){
var _local2:Timer;
var _local3:sfx_Achievment;
if (ifc.Audio){
_local3 = new sfx_Achievment();
_local3.play(1);
};
popUpDone = false;
popUp = new UI_Achievment();
popUp.gotoAndStop(_arg1);
popUp.x = 700;
popUp.y = (500 + popUp.height);
parentMC.addChild(popUp);
_local2 = new Timer(25, (popUp.height / 3));
_local2.addEventListener(TimerEvent.TIMER, popUpPushUp);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, popUpPushDone);
_local2.start();
}
public function get graveyardRhade(){
return (_graveyardRhade);
}
public function get onTheHouse(){
return (_onTheHouse);
}
public function get checkGatling(){
return (hasGatling);
}
public function get whatTime(){
return (_whatTime);
}
public function get checkCrossbow(){
return (hasCrossbow);
}
public function set minutesPlayed(_arg1:uint){
_minutesPlayed = _arg1;
}
public function get transactionApproved(){
return (_transactionApproved);
}
public function get totalWaves(){
return (_totalWaves);
}
public function get yuppie(){
return (_yuppie);
}
public function linkMe(_arg1:MovieClip){
parentMC = _arg1;
}
public function incKilledWitches(){
_killedWitches++;
}
public function gotCrossbow(){
hasCrossbow = true;
}
public function get stitchesNBolts(){
return (_stitchesNBolts);
}
public function get roundsShot(){
return (_roundsShot);
}
public function incShells(){
_shellsShot++;
}
public function incKilledMuts(){
_killedMuts++;
}
public function get killedMuts(){
return (_killedMuts);
}
public function incBolts(){
_boltsShot++;
}
public function incSeconds(){
_secondsPlayed++;
}
public function get hoursPlayed(){
return (_hoursPlayed);
}
public function get secondsPlayed(){
return (_secondsPlayed);
}
public function get bulletsShot(){
return (_bulletsShot);
}
public function get waveWako(){
return (_waveWako);
}
private function popUpPushDown(_arg1:TimerEvent){
popUp.y = (popUp.y + 3);
}
private function popUpPushUp(_arg1:TimerEvent){
popUp.y = (popUp.y - 3);
}
public function incHours(){
_hoursPlayed++;
}
public function get fleshyDemise(){
return (_fleshyDemise);
}
public function get bloodyMess(){
return (_bloodyMess);
}
public function get salemWho(){
return (_salemWho);
}
public function get gotWood(){
return (_gotWood);
}
public function gotShotgun(){
hasShotgun = true;
}
public function get totalAchievments(){
return (_totalAchievments);
}
public function get checkShotgun(){
return (hasShotgun);
}
public function get twoPumpChump(){
return (_twoPumpChump);
}
public function get shellsShot(){
return (_shellsShot);
}
public function get masterBlaster(){
return (_masterBlaster);
}
public function incKilledWolves(){
_killedWolves++;
}
public function get realMenWearTights(){
return (_realMenWearTights);
}
public function get killedWolves(){
return (_killedWolves);
}
public function incFishShot(){
_fishShot++;
}
public function get fishShot(){
return (_fishShot);
}
public function incBullets(){
_bulletsShot++;
}
public function incWaves(){
_waves++;
}
public function get bigKahuna(){
return (_bigKahuna);
}
public function updateMoney(_arg1:uint){
_totalMoney = (_totalMoney + _arg1);
}
public function get killedWitches(){
return (_killedWitches);
}
public function get kamikaze(){
return (_kamikaze);
}
public function get twoSmokingBarrels(){
return (_twoSmokingBarrels);
}
private function deleteAchievment(_arg1:TimerEvent){
parentMC.removeChild(popUp);
popUpDone = true;
}
public function get totalMoney(){
return (_totalMoney);
}
public function get deaths(){
return (_deaths);
}
}
}//package
Section 47
//AIManager (AIManager)
package {
public class AIManager {
private static var aiArray:Array;
private static var isInit:Boolean = false;
public function AIManager():void{
}
public function pushAI(_arg1):void{
aiArray.push(_arg1);
}
public function getAIEnt(_arg1:int){
return (aiArray[_arg1]);
}
public function Update():void{
var _local1:*;
for (_local1 in aiArray) {
aiArray[_local1].Type.updatePos(aiArray[_local1]);
};
}
public function removeAI(_arg1):void{
var _local2:*;
for (_local2 in aiArray) {
if (aiArray[_local2] == _arg1){
aiArray.splice(_local2, 1);
};
};
}
public function initManager():void{
if (!isInit){
aiArray = new Array();
isInit = true;
} else {
throw (new Error("AI Manager already Initialized"));
};
}
public function aiLength(){
return (aiArray.length);
}
}
}//package
Section 48
//Ammo (Ammo)
package {
import flash.display.*;
public class Ammo extends MovieClip {
private var _type:String;
public function Ammo(){
addFrameScript(4, frame5, 16, frame17, 23, frame24, 33, frame34);
}
public function AmmoType(_arg1:String){
_type = _arg1;
gotoAndStop(_type);
}
function frame17(){
gotoAndPlay("arm");
}
function frame24(){
gotoAndPlay("corpse");
}
function frame5(){
play();
}
function frame34(){
gotoAndPlay("orb");
}
public function getAmmoType(){
return (_type);
}
}
}//package
Section 49
//Arm (Arm)
package {
import flash.display.*;
import flash.events.*;
public class Arm extends Ammo {
private var speed:Number;// = 10
private var dx:Number;
private var dy:Number;
private var degree:Number;
private var ifc:IFC;
public function Arm(_arg1, _arg2:Number, _arg3:Number){
ifc = new IFC();
speed = 10;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
this.rotation = _arg3;
AmmoType("arm");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
addEventListener(Event.ENTER_FRAME, moveArm);
}
public function removeMe(){
MovieClip(root).removeArm(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveArm);
delete ??getglobalscope
[this];
}
public function getRot(){
return (degree);
}
private function moveArm(_arg1:Event){
if (ifc.Pause){
this.stop();
return;
};
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 10)) || ((this.x > 1240)))){
removeMe();
} else {
if ((((this.y < 10)) || ((this.y > 990)))){
removeMe();
};
};
}
}
}//package
Section 50
//Bar (Bar)
package {
import flash.display.*;
public dynamic class Bar extends MovieClip {
}
}//package
Section 51
//Barrel (Barrel)
package {
import flash.display.*;
public dynamic class Barrel extends MovieClip {
}
}//package
Section 52
//BGM_Battle (BGM_Battle)
package {
import flash.media.*;
public dynamic class BGM_Battle extends Sound {
}
}//package
Section 53
//BGM_Menu (BGM_Menu)
package {
import flash.media.*;
public dynamic class BGM_Menu extends Sound {
}
}//package
Section 54
//Block (Block)
package {
import flash.display.*;
public dynamic class Block extends MovieClip {
}
}//package
Section 55
//Bolt (Bolt)
package {
import flash.display.*;
import flash.events.*;
public class Bolt extends Ammo {
private var speed:Number;// = 30
private var dx:Number;
private var dy:Number;
private var degree:Number;
private var ifc:IFC;
public function Bolt(_arg1, _arg2:Number, _arg3:Number){
ifc = new IFC();
speed = 30;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
this.rotation = _arg3;
AmmoType("bolt");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
addEventListener(Event.ENTER_FRAME, moveBolts);
}
private function moveBolts(_arg1:Event){
if (ifc.Pause){
return;
};
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 10)) || ((this.x > 1240)))){
removeMe();
} else {
if ((((this.y < 10)) || ((this.y > 990)))){
removeMe();
};
};
}
public function removeMe(){
MovieClip(root).removeBolt(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBolts);
delete ??getglobalscope
[this];
}
public function getRot(){
return (degree);
}
}
}//package
Section 56
//Bullet (Bullet)
package {
import flash.display.*;
import flash.events.*;
public class Bullet extends Ammo {
private var speed:Number;// = 30
private var dx:Number;
private var dy:Number;
private var degree:Number;
private var ifc:IFC;
public function Bullet(_arg1, _arg2:Number, _arg3:Number){
ifc = new IFC();
speed = 30;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
this.rotation = _arg3;
AmmoType("bullet");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
addEventListener(Event.ENTER_FRAME, moveBullets);
}
public function removeMe(){
MovieClip(root).removeBullet(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBullets);
delete ??getglobalscope
[this];
}
public function getRot(){
return (degree);
}
private function moveBullets(_arg1:Event){
if (ifc.Pause){
return;
};
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 10)) || ((this.x > 1240)))){
removeMe();
} else {
if ((((this.y < 10)) || ((this.y > 990)))){
removeMe();
};
};
}
}
}//package
Section 57
//Corpse (Corpse)
package {
import flash.display.*;
import flash.events.*;
public class Corpse extends Ammo {
private var life:uint;// = 0
private var speed:Number;// = 10
private var dx:Number;
private var dy:Number;
public var hitPC;// = false
private var degree:Number;
private var ifc:IFC;
static const MAX_LIFE:uint = 60;
public function Corpse(_arg1, _arg2:Number, _arg3:Number){
ifc = new IFC();
speed = 10;
life = 0;
hitPC = false;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
AmmoType("corpse");
gotoAndPlay("corpse");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
}
public function removeMe(){
MovieClip(root).removeBullet(this);
MovieClip(parent).removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveCorpse);
delete ??getglobalscope
[this];
}
public function thrown(){
addEventListener(Event.ENTER_FRAME, moveCorpse);
}
private function hitPlayer(){
removeEventListener(Event.ENTER_FRAME, moveCorpse);
playDead();
}
public function getRot(){
return (degree);
}
private function moveCorpse(_arg1:Event){
if (ifc.Pause){
return;
};
life++;
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 10)) || ((this.x > 1240)))){
removeMe();
} else {
if ((((this.y < 10)) || ((this.y > 990)))){
removeMe();
};
};
if (life >= MAX_LIFE){
removeEventListener(Event.ENTER_FRAME, moveCorpse);
playDead();
};
}
private function playDead(){
this.gotoAndStop("dead");
hitPC = true;
removeMe();
}
}
}//package
Section 58
//CustomCursor (CustomCursor)
package {
import flash.display.*;
public dynamic class CustomCursor extends MovieClip {
}
}//package
Section 59
//Golem (Golem)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Golem extends MovieClip {
public var node:Node;
public var health:int;// = 50
private var speed:uint;// = 100
private var lastTime:int;
public var isAttacking;// = false
private var achiev:Achievments;
private var dy:Number;// = 1
private var stren:uint;
private var dx:Number;// = 1
private var stunned:Boolean;// = false
public var unitwidth:Number;
private var aiMgr:AIManager;
private var ifc:IFC;
private var fixedObjects:Array;
private var canthrow:Boolean;// = true
private var degrees:Number;
public var bulletHit:Boolean;// = false
public var Type:Class;
private var body:Corpse;
public var unitheight:Number;
private var canWalk:Boolean;// = false
private var counter:Boolean;// = false
public function Golem(_arg1:int, _arg2:int, _arg3:Array){
Type = Golem;
canWalk = false;
achiev = new Achievments();
dx = 1;
dy = 1;
speed = 100;
health = 50;
canthrow = true;
ifc = new IFC();
isAttacking = false;
stunned = false;
counter = false;
bulletHit = false;
super();
addFrameScript(0, frame1, 16, frame17, 28, frame29, 29, frame30, 45, frame46, 57, frame58, 58, frame59, 74, frame75, 86, frame87, 87, frame88, 103, frame104, 115, frame116, 116, frame117, 121, frame122, 124, frame125, 133, frame134, 139, frame140, 142, frame143, 151, frame152, 157, frame158, 160, frame161, 169, frame170, 175, frame176, 178, frame179, 187, frame188, 188, frame189, 207, frame208, 209, frame210, 210, frame211, 229, frame230, 231, frame232, 232, frame233, 251, frame252, 253, frame254, 254, frame255, 273, frame274, 275, frame276, 287, frame288, 299, frame300, 311, frame312, 323, frame324);
this.x = _arg1;
this.y = _arg2;
node.visible = false;
this.alpha = 0;
unitwidth = (this.width / 2);
unitheight = (this.height / 3);
aiMgr = new AIManager();
fixedObjects = _arg3;
setInterval(mayThrow, 4000);
}
function frame152(){
gotoAndPlay("neWalk");
}
function frame158(){
isAttacking = true;
}
function frame276(){
gotoAndPlay("seWalk");
}
private function randRange(_arg1:uint, _arg2:uint){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function throwCorpse(){
if (canthrow){
body = new Corpse((this.x + node.x), (this.y + node.y), traceOffsets());
MovieClip(root).bullets.push(body);
MovieClip(root).dasBar.addChildAt(body, (MovieClip(root).dasBar.numChildren - 1));
canthrow = false;
};
}
function frame274(){
body.thrown();
}
function frame288(){
stop();
}
function frame161(){
isAttacking = false;
}
function frame176(){
isAttacking = true;
}
function frame170(){
gotoAndPlay("swWalk");
}
function frame179(){
isAttacking = false;
}
private function moveCharacter(_arg1:Event){
}
function frame1(){
canWalk = false;
}
function frame188(){
gotoAndPlay("seWalk");
}
function frame29(){
gotoAndPlay("swWalk");
}
function frame17(){
canWalk = true;
}
private function fade(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
function frame189(){
throwCorpse();
}
function frame30(){
canWalk = false;
}
private function mayThrow(){
canthrow = true;
}
function frame46(){
canWalk = true;
}
private function killMob(_arg1:TimerEvent){
removeMe();
}
function frame59(){
canWalk = false;
}
function frame58(){
gotoAndPlay("seWalk");
}
private function traceHero(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - this.x);
_local2 = (MovieClip(parent)._hero.y - this.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
private function fadeMob(_arg1:TimerEvent){
var _local2:Timer;
_local2 = new Timer(100, 10);
_local2.addEventListener(TimerEvent.TIMER, fade);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local2.start();
}
function frame300(){
stop();
}
function frame75(){
canWalk = true;
}
public function updateList(_arg1:Array){
}
function frame312(){
stop();
}
function frame87(){
gotoAndPlay("nwWalk");
}
function frame88(){
canWalk = false;
}
public function pushBack(_arg1:Number, _arg2:uint){
bulletHit = true;
degrees = _arg1;
stren = _arg2;
}
private function inRange(_arg1:Object, _arg2:Object){
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.abs((_arg1.x - _arg2.x));
_local4 = Math.abs((_arg1.y - _arg2.y));
_local5 = (Math.sqrt(_local3) + Math.sqrt(_local4));
return (_local5);
}
public function removeMe(){
parent.removeChild(this);
delete ??getglobalscope
[this];
}
private function traceOffsets(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - (this.x + node.x));
_local2 = (MovieClip(parent)._hero.y - (this.y + node.y));
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
function frame208(){
body.thrown();
}
function frame211(){
throwCorpse();
}
private function launchTimer(){
var _local1:Timer;
if (counter){
return;
};
counter = true;
_local1 = new Timer(stren, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local1.start();
}
function frame210(){
gotoAndPlay("nwWalk");
}
function frame324(){
stop();
}
function frame104(){
canWalk = true;
}
function frame230(){
body.thrown();
}
function frame233(){
throwCorpse();
}
function frame116(){
gotoAndPlay("neWalk");
}
function frame117(){
canWalk = false;
}
private function checkHealth(){
var _local1:Timer;
if (health <= 0){
isAttacking = false;
if ((((((this.currentLabel == "nwWalk")) || ((this.currentLabel == "nwAttack")))) || ((this.currentLabel == "nwThrow")))){
gotoAndPlay("nwHit");
} else {
if ((((((this.currentLabel == "neWalk")) || ((this.currentLabel == "neAttack")))) || ((this.currentLabel == "nwThrow")))){
gotoAndPlay("neHit");
} else {
if ((((((this.currentLabel == "swWalk")) || ((this.currentLabel == "swAttack")))) || ((this.currentLabel == "nwThrow")))){
gotoAndPlay("swHit");
} else {
if ((((((this.currentLabel == "seWalk")) || ((this.currentLabel == "seAttack")))) || ((this.currentLabel == "nwThrow")))){
gotoAndPlay("seHit");
};
};
};
};
achiev.incKilledGolems();
MovieClip(root).thingsKilled++;
MovieClip(root)._money = (MovieClip(root)._money + 5000);
achiev.updateMoney(5000);
aiMgr.removeAI(this);
_local1 = new Timer(7000, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local1.start();
};
}
public function hit(_arg1:uint){
health = (health - _arg1);
}
function frame232(){
gotoAndPlay("neWalk");
}
private function timerComplete(_arg1:TimerEvent){
counter = false;
bulletHit = false;
}
function frame122(){
isAttacking = true;
}
function frame125(){
isAttacking = false;
}
function frame252(){
body.thrown();
}
function frame134(){
gotoAndPlay("nwWalk");
}
function frame254(){
gotoAndPlay("swWalk");
}
function frame255(){
throwCorpse();
}
function frame140(){
isAttacking = true;
}
function frame143(){
isAttacking = false;
}
public static function updatePos(_arg1:Golem){
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Object;
var _local8:int;
if (_arg1.ifc.Pause){
_arg1.lastTime = 0;
_arg1.stop();
return;
};
if (_arg1.alpha < 1){
_arg1.alpha = (_arg1.alpha + 0.05);
return;
};
if (_arg1.lastTime == 0){
_arg1.lastTime = getTimer();
};
_arg1.checkHealth();
_local2 = (getTimer() - _arg1.lastTime);
_arg1.lastTime = (_arg1.lastTime + _local2);
_local3 = _arg1.traceHero();
_arg1.dx = (_arg1.speed * Math.cos((((2 * Math.PI) * _local3) / 360)));
_arg1.dy = (_arg1.speed * Math.sin((((2 * Math.PI) * _local3) / 360)));
if ((((_local2 < 1)) || ((_arg1.health <= 0)))){
return;
};
if ((((((((((((((((_arg1.currentLabel == "neAttack")) || ((_arg1.currentLabel == "nwAttack")))) || ((_arg1.currentLabel == "seAttack")))) || ((_arg1.currentLabel == "swAttack")))) || ((_arg1.currentLabel == "neThrow")))) || ((_arg1.currentLabel == "nwThrow")))) || ((_arg1.currentLabel == "seThrow")))) || ((_arg1.currentLabel == "swThrow")))){
return;
};
if ((((((_local3 < 0)) && ((_local3 > -90)))) && (!((_arg1.currentLabel == "neWalk"))))){
_arg1.gotoAndPlay("neWalk");
} else {
if ((((((_local3 < -90)) && ((_local3 > -179)))) && (!((_arg1.currentLabel == "nwWalk"))))){
_arg1.gotoAndPlay("nwWalk");
} else {
if ((((((_local3 < 180)) && ((_local3 > 90)))) && (!((_arg1.currentLabel == "swWalk"))))){
_arg1.gotoAndPlay("swWalk");
} else {
if ((((((_local3 < 90)) && ((_local3 > 0)))) && (!((_arg1.currentLabel == "seWalk"))))){
_arg1.gotoAndPlay("seWalk");
};
};
};
};
_local4 = _arg1.inRange(MovieClip(_arg1.parent)._hero, _arg1);
if ((((((((_arg1.currentLabel == "neWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "neAttack"))))) && (!(_arg1.canWalk)))){
_arg1.gotoAndPlay("neAttack");
} else {
if ((((((((_arg1.currentLabel == "nwWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "nwAttack"))))) && (!(_arg1.canWalk)))){
_arg1.gotoAndPlay("nwAttack");
} else {
if ((((((((_arg1.currentLabel == "swWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "swAttack"))))) && (!(_arg1.canWalk)))){
_arg1.gotoAndPlay("swAttack");
} else {
if ((((((((_arg1.currentLabel == "seWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "seAttack"))))) && (!(_arg1.canWalk)))){
_arg1.gotoAndPlay("seAttack");
};
};
};
};
if ((((((((((_arg1.currentLabel == "neWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "neThrow"))))) && (!(_arg1.canWalk)))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("neThrow");
} else {
if ((((((((((_arg1.currentLabel == "nwWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "nwThrow"))))) && (!(_arg1.canWalk)))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("nwThrow");
} else {
if ((((((((((_arg1.currentLabel == "swWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "swThrow"))))) && (!(_arg1.canWalk)))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("swThrow");
} else {
if ((((((((((_arg1.currentLabel == "seWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "seThrow"))))) && (!(_arg1.canWalk)))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("seThrow");
};
};
};
};
if (!_arg1.canWalk){
return;
};
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
if (_arg1.bulletHit){
if (_arg1.currentLabel == "nwWalk"){
_arg1.gotoAndPlay("nwHit");
} else {
if (_arg1.currentLabel == "neWalk"){
_arg1.gotoAndPlay("neHit");
} else {
if (_arg1.currentLabel == "swWalk"){
_arg1.gotoAndPlay("swHit");
} else {
if (_arg1.currentLabel == "seWalk"){
_arg1.gotoAndPlay("seHit");
};
};
};
};
_arg1.dx = (_arg1.stren * Math.cos((((2 * Math.PI) * _arg1.degrees) / 360)));
_arg1.dy = (_arg1.stren * Math.sin((((2 * Math.PI) * _arg1.degrees) / 360)));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_arg1.launchTimer();
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && (((_arg1.x + _arg1.unitwidth) > _local7.leftside)))) && (((_arg1.x - _arg1.unitwidth) < _local7.rightside)))){
if ((((_arg1.y <= _local7.topside)) && ((_local5 > _local7.topside)))){
_local5 = _local7.topside;
break;
};
if ((((_arg1.y >= _local7.bottomside)) && ((_local5 < (_local7.bottomside + _arg1.unitheight))))){
_local5 = (_local7.bottomside + _arg1.unitheight);
break;
};
};
};
_local8++;
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && ((_local5 > _local7.topside)))) && (((_local5 - _arg1.unitheight) < _local7.bottomside)))){
if (((((_arg1.x - _arg1.unitwidth) >= _local7.rightside)) && (((_local6 - _arg1.unitwidth) <= _local7.rightside)))){
_local6 = (_local7.rightside + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= _local7.leftside)) && (((_local6 + _arg1.unitwidth) >= _local7.leftside)))){
_local6 = (_local7.leftside - _arg1.unitwidth);
break;
};
};
};
_local8++;
};
_arg1.x = _local6;
_arg1.y = _local5;
}
}
}//package
Section 60
//Here2Collect (Here2Collect)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.geom.*;
public class Here2Collect extends MovieClip {
private var crossbowClip:uint;// = 10
private var gang:Array;
public var nextWaveUI:MovieClip;
public var myCursor:CustomCursor;
public var ctxMenu:ContextMenu;
public var lastCount:uint;// = 0
public var thingsKilled:uint;// = 0
public var roundTimePlayed:TextField;
public var totalAmmo:TextField;
private var gatlingFiredRecently:Boolean;// = false
public var pistolUI:MovieClip;
private var isPistolReloaded:Boolean;// = true
public var battlePlaying:Boolean;
private var gatlingEquip:Boolean;// = false
private var mobsSpawned:int;// = 0
public var battleMusic:BGM_Battle;
public var gatlingUI:MovieClip;
private var shotgunClip:uint;// = 2
private var keyObject:Object;
private var seconds:uint;// = 0
private var lastTime:int;
public var AchievmentMenu:MovieClip;
public var achiev:Achievments;
public var agButton_btn:SimpleButton;
public var dasBar:MovieClip;
public var themeID:uint;
public var Credits:MovieClip;
public var trans:SoundTransform;
private var itemDrop:Array;
private var gatlingRounds:uint;// = 0
private var crossbowEquip:Boolean;// = false
public var waves:uint;// = 4
private var enemySpawn:Timer;
public var aiMgr:AIManager;
public var MainMenu:MovieClip;
public var player:Player;
private var ifc:IFC;
private var summon:Boolean;// = false
private var droppedShotty:Boolean;// = false
private var currentWeapon:uint;// = 1
private var minutes:uint;// = 0
private var pistolEquip:Boolean;// = true
public var hcMenu:MovieClip;
private var havePistol:Boolean;// = true
private var fixedObjects:Array;
public var soundChan:SoundChannel;
private var isCrossbowReloaded:Boolean;// = true
public var achievTotal:TextField;
private var haveCrossbow:Boolean;// = false
public var Instructions1:MovieClip;
public var shotgunUI:MovieClip;
private var crossbowBolts:uint;// = 0
public var sound:sfx_GameOver;
private var isGatlingReloading:Boolean;// = false
public var menuCopyright:ContextMenuItem;
public var cash:TextField;
private var isCrossbowReloading:Boolean;// = false
private var timePlayedID:uint;
private var brokenFloor:Boolean;// = false
private var brokenWall:Boolean;// = false
public var achievPage:MovieClip;
private var gatlingClip:uint;// = 40
public var hcLogo:MovieClip;
private var haveGatling:Boolean;// = false
private var gatlingFiring:Boolean;// = false
public var loadBar:MovieClip;
public var PlayGame:MovieClip;
private var isGatlingReloaded:Boolean;// = true
private var isPistolReloading:Boolean;// = false
private var hours:uint;// = 0
private var pistolClip:uint;// = 12
private var haveShotgun:Boolean;// = false
private var triggerNewSpawn:Boolean;// = false
private var isShotgunReloaded:Boolean;// = true
private var mobs2Spawn:int;// = 0
public var crossbowUI:MovieClip;
public var isPlaying:Boolean;
private var isShotgunReloading:Boolean;// = false
public var bullets:Array;
private var ammoUsed:uint;// = 0
public var totalWaves:TextField;
public var _money:uint;// = 0
public var Instructions:MovieClip;
public var theme:BGM_Menu;
private var shotgunEquip:Boolean;// = false
public var hitsUI:MovieClip;
private var spawnID:uint;
public var totalMoney:TextField;
private var shotgunShells:uint;// = 0
private var autoSaveID:uint;
public var window:MovieClip;
public var totalKills:TextField;
public var hero:Object;
private var holdSpawn:Boolean;// = false
private var _hitReduction:Timer;
static const edgeDistance:Number = 200;
static const BOLTDAMAGE = 3;
static const PISTOLFULL = 12;
static const BG = 0;
static const GATLINGFULL = 40;
static const BULLETDAMAGE = 1;
static const FX = 1;
static const SHOTGUNFULL = 2;
static const CROSSBOWFULL = 10;
static const ROUNDDAMAGE = 3;
static const SHELLDAMAGE = 2;
public function Here2Collect(){
ifc = new IFC();
brokenWall = false;
brokenFloor = false;
summon = false;
droppedShotty = false;
currentWeapon = 1;
mobsSpawned = 0;
mobs2Spawn = 0;
_money = 0;
lastCount = 0;
waves = 4;
holdSpawn = false;
triggerNewSpawn = false;
isPistolReloaded = true;
isPistolReloading = false;
pistolEquip = true;
havePistol = true;
pistolClip = PISTOLFULL;
isShotgunReloaded = true;
isShotgunReloading = false;
shotgunEquip = false;
haveShotgun = false;
shotgunClip = SHOTGUNFULL;
shotgunShells = 0;
isCrossbowReloaded = true;
isCrossbowReloading = false;
crossbowEquip = false;
haveCrossbow = false;
crossbowClip = CROSSBOWFULL;
crossbowBolts = 0;
isGatlingReloaded = true;
isGatlingReloading = false;
gatlingFiredRecently = false;
gatlingFiring = false;
gatlingEquip = false;
haveGatling = false;
gatlingClip = GATLINGFULL;
gatlingRounds = 0;
seconds = 0;
minutes = 0;
hours = 0;
ammoUsed = 0;
thingsKilled = 0;
super();
addFrameScript(0, frame1, 1, frame2, 160, frame161, 161, frame162, 162, frame163, 163, frame164, 170, frame171, 180, frame181, 189, frame190, 196, frame197);
}
private function timePlayed(){
achiev.incSeconds();
seconds++;
if (achiev.secondsPlayed > 60){
achiev.secondsPlayed = 0;
achiev.incMinutes();
seconds = 0;
minutes++;
};
if (achiev.minutesPlayed > 60){
achiev.minutesPlayed = 0;
achiev.incHours();
minutes = 0;
hours++;
};
achiev.checkAchievments();
}
private function keyCheck(){
if (((((((keyObject.wKey) || (keyObject.aKey))) || (keyObject.sKey))) || (keyObject.dKey))){
hero.moving = true;
} else {
if (((((((!(keyObject.wKey)) && (!(keyObject.aKey)))) && (!(keyObject.sKey)))) && (!(keyObject.dKey)))){
hero.moving = false;
};
};
}
private function fireBolt(){
var _local1:$click;
var _local2:sfx_crossbowTwang;
var _local3:Bolt;
var _local4:sfx_Arrow;
if (isCrossbowReloading){
_local1 = new $click((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), 2, "twang");
dasBar.addChildAt(_local1, (dasBar.numChildren - 1));
if (ifc.SFX){
_local2 = new sfx_crossbowTwang();
_local2.play(1);
};
return;
};
if (isCrossbowReloaded){
_local3 = new Bolt((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), (getGunOffsetDegree() + randRange(-3, 3)));
crossbowClip--;
bullets.push(_local3);
dasBar.addChild(_local3);
if (ifc.SFX){
_local4 = new sfx_Arrow();
_local4.play(1);
};
achiev.incBolts();
ammoUsed++;
if (crossbowClip == 0){
isCrossbowReloaded = false;
reloadCrossbow();
};
};
}
private function reloadCrossbowMag(_arg1:TimerEvent){
var _local2:HUDText;
var _local3:int;
var _local4:HUDText;
if (crossbowBolts == 0){
_local4 = new HUDText(dasBar, "Crossbow Empty", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
return;
};
_local2 = new HUDText(dasBar, "Crossbow Reloaded", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isCrossbowReloaded = true;
isCrossbowReloading = false;
_local3 = (crossbowClip + 1);
while (_local3 <= CROSSBOWFULL) {
if ((((crossbowBolts == 0)) || ((crossbowClip == CROSSBOWFULL)))){
break;
};
crossbowClip = _local3;
crossbowBolts--;
_local3++;
};
}
public function dropShotgun(_arg1:Object){
var _local2:int;
var _local3:Item;
_local2 = 0;
while (_local2 < aiMgr.aiLength()) {
if (aiMgr.getAIEnt(_local2) == _arg1){
_local3 = new Item(5);
_local3.x = _arg1.x;
_local3.y = _arg1.y;
itemDrop.push(_local3);
dasBar.addChild(_local3);
};
_local2++;
};
}
public function removeShell(_arg1:Shell){
var _local2:*;
for (_local2 in bullets) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function keyPressedDown(_arg1:KeyboardEvent){
if (_arg1.keyCode == 27){
ifc.Pause = !(ifc.Pause);
};
if (ifc.Pause){
return;
};
if (_arg1.keyCode == 87){
hero.moveUp = true;
keyObject.wKey = true;
};
if (_arg1.keyCode == 65){
hero.moveLeft = true;
keyObject.aKey = true;
};
if (_arg1.keyCode == 83){
hero.moveDown = true;
keyObject.sKey = true;
};
if (_arg1.keyCode == 68){
hero.moveRight = true;
keyObject.dKey = true;
};
if (_arg1.keyCode == 82){
switch (currentWeapon){
case 1:
reloadPistol();
break;
case 2:
reloadShotgun();
break;
case 3:
reloadCrossbow();
break;
case 4:
reloadGatling();
break;
default:
break;
};
};
}
function frame163(){
MainMenu.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_UP, downFunc);
PlayGame.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
PlayGame.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
PlayGame.addEventListener(MouseEvent.MOUSE_UP, downFunc);
}
private function createWitch(_arg1:Number, _arg2:Number, _arg3:Boolean){
var _local4:Witch;
_local4 = new Witch(_arg1, _arg2, fixedObjects, _arg3);
dasBar.addChild(_local4);
aiMgr.pushAI(_local4);
mobsSpawned++;
}
private function reloadGatlingMag(_arg1:TimerEvent){
var _local2:HUDText;
var _local3:int;
var _local4:HUDText;
if (gatlingRounds == 0){
_local4 = new HUDText(dasBar, "Gatling Empty", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
return;
};
_local2 = new HUDText(dasBar, "Gatling Reloaded", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isGatlingReloaded = true;
isGatlingReloading = false;
_local3 = (gatlingClip + 1);
while (_local3 <= GATLINGFULL) {
if (gatlingRounds == 0){
break;
};
gatlingClip = _local3;
gatlingRounds--;
_local3++;
};
}
function frame164(){
MainMenu.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_UP, downFunc);
}
private function hitReduction(_arg1:TimerEvent){
if (ifc.Pause){
return;
};
if ((((hero.numOfHits > 0)) && (!(hero.dead)))){
hero.numOfHits--;
hitsUI.gotoAndStop((hero.numOfHits + 1));
};
}
private function reloadShotgun(){
var _local1:HUDText;
var _local2:Timer;
if (((isShotgunReloading) || ((shotgunShells <= 0)))){
return;
};
_local1 = new HUDText(dasBar, "Reloading Shotgun", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isShotgunReloading = true;
_local2 = new Timer(2000, 1);
_local2.addEventListener(TimerEvent.TIMER, reloadShotgunMag);
_local2.start();
}
private function lookForGolems(){
var _local1:Boolean;
var _local2:int;
_local1 = false;
_local2 = 0;
while (_local2 < aiMgr.aiLength()) {
if ((aiMgr.getAIEnt(_local2) is Golem)){
_local1 = true;
};
_local2++;
};
return (_local1);
}
private function createBWolf(){
var _local1:Werewolf;
var _local2:Werewolf;
_local1 = new Werewolf(dasBar.planks1.x, dasBar.planks1.y, fixedObjects, true);
_local2 = new Werewolf(dasBar.planks2.x, dasBar.planks2.y, fixedObjects, false);
dasBar.addChild(_local1);
dasBar.addChild(_local2);
aiMgr.pushAI(_local1);
aiMgr.pushAI(_local2);
mobsSpawned++;
mobsSpawned++;
}
private function keyPressRelease(_arg1:KeyboardEvent){
if (ifc.Pause){
return;
};
if (_arg1.keyCode == 87){
hero.moveUp = false;
keyObject.wKey = false;
};
if (_arg1.keyCode == 65){
hero.moveLeft = false;
keyObject.aKey = false;
};
if (_arg1.keyCode == 83){
hero.moveDown = false;
keyObject.sKey = false;
};
if (_arg1.keyCode == 68){
hero.moveRight = false;
keyObject.dKey = false;
};
if (_arg1.keyCode == 49){
if (havePistol){
currentWeapon = 1;
pistolEquip = true;
shotgunEquip = false;
crossbowEquip = false;
gatlingEquip = false;
};
};
if (_arg1.keyCode == 50){
if (haveShotgun){
currentWeapon = 2;
pistolEquip = false;
shotgunEquip = true;
crossbowEquip = false;
gatlingEquip = false;
};
};
if (_arg1.keyCode == 51){
if (haveCrossbow){
currentWeapon = 3;
pistolEquip = false;
shotgunEquip = false;
crossbowEquip = true;
gatlingEquip = false;
};
};
if (_arg1.keyCode == 52){
if (haveGatling){
currentWeapon = 4;
pistolEquip = false;
shotgunEquip = false;
crossbowEquip = false;
gatlingEquip = true;
};
};
}
private function gatlingCanFire(_arg1:TimerEvent){
gatlingFiredRecently = false;
}
public function removeListeners(){
stage.removeEventListener(Event.ENTER_FRAME, gameLoop);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyPressRelease);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, clickPress);
stage.removeEventListener(MouseEvent.MOUSE_UP, clickRelease);
}
public function removeMutant(_arg1:Object){
var _local2:*;
for (_local2 in gang) {
if (gang[_local2] == _arg1){
gang.splice(_local2, 1);
break;
};
};
}
public function mouseMoveHandler(_arg1:MouseEvent):void{
myCursor.x = mouseX;
myCursor.y = mouseY;
}
private function uiTick(_arg1:TimerEvent){
var _local2:sfx_Chime;
if (((ifc.Audio) && ((_arg1.target.currentCount <= 5)))){
_local2 = new sfx_Chime();
_local2.play(1);
};
nextWaveUI.prevFrame();
}
private function getGunOffsetDegree(){
var _local1:Point;
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
_local1 = new Point((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y));
_local1 = dasBar.localToGlobal(_local1);
_local2 = (mouseX - _local1.x);
_local3 = (mouseY - _local1.y);
_local4 = Math.atan2(_local3, _local2);
_local5 = (360 * (_local4 / (2 * Math.PI)));
return (_local5);
}
private function defineHero(){
hero = new Object();
hero.mc = dasBar._hero;
hero.mc.stop();
hero.speed = 0.1;
hero.numOfHits = 0;
hero.height = (hero.mc.height / 3);
hero.width = hero.mc.width;
hero.startX = hero.mc.x;
hero.startY = hero.mc.y;
hero.moveLeft = false;
hero.moveRight = false;
hero.moveUp = false;
hero.moveDown = false;
hero.stren = 0;
hero.degrees = 0;
hero.counter = false;
hero.moving = false;
hero.mc.gunNode.visible = false;
hero.mc.pickup.visible = false;
hero.dead = false;
}
private function reloadPistol(){
var _local1:HUDText;
var _local2:Timer;
if (isPistolReloading){
return;
};
_local1 = new HUDText(dasBar, "Reloading Pistol", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isPistolReloading = true;
_local2 = new Timer(1500, 1);
_local2.addEventListener(TimerEvent.TIMER, reloadPistolMag);
_local2.start();
}
function frame2(){
ctxMenu = new ContextMenu();
menuCopyright = new ContextMenuItem("Copyright © hardcircle.com");
ctxMenu.hideBuiltInItems();
ctxMenu.customItems.push(menuCopyright);
this.contextMenu = ctxMenu;
stop();
addEventListener(Event.ENTER_FRAME, loading);
}
function frame181(){
MainMenu.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_UP, downFunc);
window.closeMe.visible = false;
hcMenu.gotoAndStop("up");
}
function frame171(){
MainMenu.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_UP, downFunc);
}
private function randRange(_arg1:Number, _arg2:Number){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
private function reloadCrossbow(){
var _local1:HUDText;
var _local2:Timer;
if (((isCrossbowReloading) || ((crossbowBolts <= 0)))){
return;
};
_local1 = new HUDText(dasBar, "Reloading Crossbow", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isCrossbowReloading = true;
_local2 = new Timer(1500, 1);
_local2.addEventListener(TimerEvent.TIMER, reloadCrossbowMag);
_local2.start();
}
public function startMatch(){
bullets = new Array();
gang = new Array();
itemDrop = new Array();
examineLevel();
defineHero();
keySetup();
aiMgr = new AIManager();
aiMgr.initManager();
dasBar.theWall.gotoAndStop(brokenWall);
pistolUI.gotoAndStop("active");
myCursor.visible = true;
Mouse.hide();
achievPage.x = 20.5;
achievPage.y = 15;
achievPage.visible = false;
nextWaveUI.visible = false;
ifc.Pause = false;
timePlayedID = setInterval(timePlayed, 1000);
autoSaveID = setInterval(autoSave, 5000);
spawnID = setInterval(spawn, 1500);
_hitReduction = new Timer(10000);
_hitReduction.addEventListener(TimerEvent.TIMER, hitReduction);
_hitReduction.start();
stage.addEventListener(Event.ENTER_FRAME, gameLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyPressRelease);
stage.addEventListener(MouseEvent.MOUSE_DOWN, clickPress);
stage.addEventListener(MouseEvent.MOUSE_UP, clickRelease);
}
private function createGolem(){
var _local1:Golem;
_local1 = new Golem(dasBar.wallNode.x, dasBar.wallNode.y, fixedObjects);
dasBar.addChild(_local1);
aiMgr.pushAI(_local1);
mobsSpawned++;
}
private function checkWaves(){
var _local1:Timer;
if ((((mobsSpawned >= mobs2Spawn)) && (triggerNewSpawn))){
mobsSpawned = 0;
triggerNewSpawn = false;
holdSpawn = true;
_local1 = new Timer(1000, 3);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, nextWave);
_local1.start();
};
}
private function examineLevel(){
var _local1:int;
var _local2:*;
var _local3:Object;
fixedObjects = new Array();
_local1 = 0;
while (_local1 < this.dasBar.numChildren) {
_local2 = this.dasBar.getChildAt(_local1);
if ((_local2 is Block)){
_local3 = new Object();
_local3.type = "Block";
_local3.mc = _local2;
_local3.mc.visible = false;
_local3.leftside = _local2.x;
_local3.rightside = (_local2.x + _local2.width);
_local3.topside = _local2.y;
_local3.bottomside = (_local2.y + _local2.height);
fixedObjects.push(_local3);
};
if ((_local2 is Node)){
_local2.visible = false;
};
_local1++;
};
}
public function removeBullet(_arg1:Object){
var _local2:*;
for (_local2 in bullets) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function nextWave(_arg1:TimerEvent){
var _local2:Timer;
var _local3:sfx_Chime;
nextWaveUI.visible = true;
nextWaveUI.gotoAndStop(6);
if (ifc.Audio){
_local3 = new sfx_Chime();
_local3.play(1);
};
_local2 = new Timer(1000, 6);
_local2.addEventListener(TimerEvent.TIMER, uiTick);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, waveTimerComplete);
_local2.start();
}
private function getCursor(){
var _local1:Point;
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
_local1 = new Point(hero.mc.x, (hero.mc.y - (hero.mc.height / 2)));
_local1 = dasBar.localToGlobal(_local1);
_local2 = (mouseX - _local1.x);
_local3 = (mouseY - _local1.y);
_local4 = Math.atan2(_local3, _local2);
_local5 = (360 * (_local4 / (2 * Math.PI)));
return (_local5);
}
public function dropItem(_arg1:Object){
var _local2:int;
var _local3:Item;
var _local4:uint;
var _local5:uint;
_local2 = 0;
while (_local2 < aiMgr.aiLength()) {
if (aiMgr.getAIEnt(_local2) == _arg1){
_local5 = Math.ceil(randRange(0, 3));
if (_local5 == 1){
if (haveShotgun){
_local4 = Math.ceil(randRange(0, 2));
};
if (haveCrossbow){
_local4 = Math.ceil(randRange(0, 3));
};
if (haveGatling){
_local4 = Math.ceil(randRange(0, 4));
};
if (((((!(haveShotgun)) && (!(haveCrossbow)))) && (!(haveGatling)))){
_local4 = 1;
};
_local3 = new Item(_local4);
_local3.x = _arg1.x;
_local3.y = _arg1.y;
itemDrop.push(_local3);
dasBar.addChild(_local3);
};
};
_local2++;
};
}
public function downFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("down");
gotoAndStop(_arg1.target.name);
}
private function createSpecialMut(){
var _local1:Mutant;
_local1 = new Mutant(dasBar.doorNode.x, dasBar.doorNode.y, fixedObjects, true);
dasBar.addChild(_local1);
aiMgr.pushAI(_local1);
mobsSpawned++;
}
private function createMutant(){
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:RMutant;
var _local6:Mutant;
var _local7:Werewolf;
var _local8:uint;
_local1 = Math.ceil(randRange(0, 6));
_local2 = Math.ceil(randRange(0, 10));
_local3 = Math.ceil(randRange(0, 20));
_local4 = Math.ceil(randRange(0, 10));
if (_local2 <= 7){
if (_local1 == 1){
_local6 = new Mutant(dasBar.doorNode.x, dasBar.doorNode.y, fixedObjects, false);
} else {
if (_local1 == 2){
_local6 = new Mutant(dasBar.basementNode.x, dasBar.basementNode.y, fixedObjects, false);
} else {
if (_local1 == 3){
_local6 = new Mutant(dasBar.stairsNode.x, dasBar.stairsNode.y, fixedObjects, false);
} else {
if (_local1 == 4){
if (brokenWall){
_local6 = new Mutant(dasBar.wallNode.x, dasBar.wallNode.y, fixedObjects, false);
} else {
_local6 = new Mutant(dasBar.doorNode.x, dasBar.doorNode.y, fixedObjects, false);
};
} else {
if (_local1 == 5){
if (brokenFloor){
_local6 = new Mutant(dasBar.planks1.x, dasBar.planks1.y, fixedObjects, false);
} else {
_local6 = new Mutant(dasBar.basementNode.x, dasBar.basementNode.y, fixedObjects, false);
};
} else {
if (_local1 == 6){
if (brokenFloor){
_local6 = new Mutant(dasBar.planks2.x, dasBar.planks2.y, fixedObjects, false);
} else {
_local6 = new Mutant(dasBar.stairsNode.x, dasBar.stairsNode.y, fixedObjects, false);
};
};
};
};
};
};
};
dasBar.addChild(_local6);
aiMgr.pushAI(_local6);
mobsSpawned++;
};
if (_local2 >= 8){
if (_local1 == 1){
_local5 = new RMutant(dasBar.doorNode.x, dasBar.doorNode.y, fixedObjects, false);
} else {
if (_local1 == 2){
_local5 = new RMutant(dasBar.basementNode.x, dasBar.basementNode.y, fixedObjects, false);
} else {
if (_local1 == 3){
_local5 = new RMutant(dasBar.stairsNode.x, dasBar.stairsNode.y, fixedObjects, false);
} else {
if (_local1 == 4){
if (brokenWall == true){
_local5 = new RMutant(dasBar.wallNode.x, dasBar.wallNode.y, fixedObjects, false);
} else {
_local5 = new RMutant(dasBar.doorNode.x, dasBar.doorNode.y, fixedObjects, false);
};
} else {
if (_local1 == 5){
if (brokenFloor){
_local5 = new RMutant(dasBar.planks1.x, dasBar.planks1.y, fixedObjects, false);
} else {
_local5 = new RMutant(dasBar.basementNode.x, dasBar.basementNode.y, fixedObjects, false);
};
} else {
if (_local1 == 6){
if (brokenFloor){
_local5 = new RMutant(dasBar.planks2.x, dasBar.planks2.y, fixedObjects, false);
} else {
_local5 = new RMutant(dasBar.stairsNode.x, dasBar.stairsNode.y, fixedObjects, false);
};
};
};
};
};
};
};
dasBar.addChild(_local5);
aiMgr.pushAI(_local5);
mobsSpawned++;
};
if (_local3 == 10){
if (((brokenWall) && ((lookForGolems() == false)))){
createGolem();
};
};
if (_local4 == 4){
if (brokenFloor){
_local8 = Math.ceil(randRange(0, 4));
if (_local8 == 1){
_local7 = new Werewolf(dasBar.wallNode.x, dasBar.wallNode.y, fixedObjects, false);
} else {
if (_local8 == 2){
_local7 = new Werewolf(dasBar.doorNode.x, dasBar.doorNode.y, fixedObjects, false);
} else {
if (_local8 == 3){
_local7 = new Werewolf(dasBar.planks1.x, dasBar.planks1.y, fixedObjects, false);
} else {
if (_local8 == 4){
_local7 = new Werewolf(dasBar.planks2.x, dasBar.planks2.y, fixedObjects, false);
};
};
};
};
dasBar.addChild(_local7);
aiMgr.pushAI(_local7);
mobsSpawned++;
};
};
if (_local1 == 1){
if (((summon) && ((_local3 == 9)))){
if (_local1 == 1){
createWitch(dasBar.wallNode.x, dasBar.wallNode.y, false);
} else {
if (_local1 == 2){
createWitch(dasBar.doorNode.x, dasBar.doorNode.y, false);
} else {
if (_local1 == 3){
createWitch(dasBar.planks1.x, dasBar.planks1.y, false);
} else {
if (_local1 == 4){
createWitch(dasBar.planks2.x, dasBar.planks2.y, false);
} else {
if (_local1 == 5){
createWitch(dasBar.stairsNode.x, dasBar.stairsNode.y, false);
} else {
if (_local1 == 6){
createWitch(dasBar.basementNode.x, dasBar.basementNode.y, false);
};
};
};
};
};
};
};
};
}
function frame1(){
stop();
}
private function fireGatling(){
var _local1:$click;
var _local2:sfx_PistolClick;
var _local3:Round;
var _local4:Timer;
var _local5:sfx_PistolShot;
if (gatlingFiredRecently){
return;
};
if (((isGatlingReloading) || ((((gatlingRounds == 0)) && ((gatlingClip == 0)))))){
_local1 = new $click((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), 2, "click");
dasBar.addChildAt(_local1, (dasBar.numChildren - 1));
if (ifc.SFX){
_local2 = new sfx_PistolClick();
_local2.play(1);
};
return;
};
if (isGatlingReloaded){
_local3 = new Round((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), (getGunOffsetDegree() + randRange(-10, 10)));
gatlingClip--;
bullets.push(_local3);
dasBar.addChild(_local3);
if (ifc.SFX){
_local5 = new sfx_PistolShot();
_local5.play(1);
};
gatlingFiredRecently = true;
achiev.incRounds();
ammoUsed++;
_local4 = new Timer(125, 1);
_local4.addEventListener(TimerEvent.TIMER_COMPLETE, gatlingCanFire);
_local4.start();
if (gatlingClip == 0){
isGatlingReloaded = false;
reloadGatling();
};
};
}
function frame197(){
startMatch();
myCursor.gotoAndStop("crosshair");
soundChan.stop();
isPlaying = false;
if (((ifc.Audio) && (!(battlePlaying)))){
soundChan = battleMusic.play(0, 99, trans);
battlePlaying = true;
} else {
if (!ifc.Audio){
soundChan.stop();
battlePlaying = false;
};
};
}
function frame190(){
player.gunNode.visible = false;
player.pickup.visible = false;
player.gotoAndPlay("swHit");
myCursor.gotoAndStop("point");
MainMenu.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
MainMenu.addEventListener(MouseEvent.MOUSE_UP, downFunc);
PlayGame.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
PlayGame.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
PlayGame.addEventListener(MouseEvent.MOUSE_UP, downFunc);
achievTotal.text = MovieClip(root).achiev.totalAchievments;
roundTimePlayed.text = String(((((hours + ":") + minutes) + ":") + seconds));
totalMoney.text = String(_money);
totalKills.text = String(thingsKilled);
totalAmmo.text = String(ammoUsed);
totalWaves.text = String(waves);
achiev.saveGame();
resetGame();
if (ifc.Audio){
sound = new sfx_GameOver();
sound.play(1);
soundChan.stop();
battlePlaying = false;
};
}
function frame162(){
myCursor.visible = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
agButton_btn.addEventListener(MouseEvent.MOUSE_DOWN, goToAG);
hcMenu.addEventListener(MouseEvent.ROLL_OVER, overFunc);
hcMenu.addEventListener(MouseEvent.ROLL_OUT, outFunc);
stop();
achiev = new Achievments();
ifc.Pause = false;
hcMenu.gotoAndStop("up");
achiev.linkMe(this);
achiev.loadGame();
resetGame();
myCursor.gotoAndStop("point");
Instructions1.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
Instructions1.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
Instructions1.addEventListener(MouseEvent.MOUSE_UP, downFunc);
Instructions.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
Instructions.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
Instructions.addEventListener(MouseEvent.MOUSE_UP, downFunc);
AchievmentMenu.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
AchievmentMenu.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
AchievmentMenu.addEventListener(MouseEvent.MOUSE_UP, downFunc);
Credits.addEventListener(MouseEvent.MOUSE_OVER, overFunc);
Credits.addEventListener(MouseEvent.MOUSE_OUT, outFunc);
Credits.addEventListener(MouseEvent.MOUSE_UP, downFunc);
if (battlePlaying){
soundChan.stop();
battlePlaying = false;
};
if (((ifc.Audio) && (!(isPlaying)))){
soundChan = theme.play(0, 99);
isPlaying = true;
} else {
if (!ifc.Audio){
soundChan.stop();
isPlaying = false;
};
};
}
private function reloadPistolMag(_arg1:TimerEvent){
var _local2:HUDText;
_local2 = new HUDText(dasBar, "Pistol Reloaded", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isPistolReloaded = true;
isPistolReloading = false;
pistolClip = PISTOLFULL;
}
private function newDepthControl(_arg1:MovieClip){
var _local2:int;
var _local3:int;
var _local4:*;
_local2 = dasBar.getChildIndex(_arg1);
while (_local3 < dasBar.numChildren) {
_local4 = dasBar.getChildAt(_local3);
if ((((((_local4 is Table)) || ((_local4 is Bar)))) || ((_local4 is Player)))){
if (_local4.y < _arg1.y){
if (dasBar.getChildIndex(_arg1) < _local3){
dasBar.setChildIndex(_arg1, (_local3 + 1));
};
};
if (_local4.y > _arg1.y){
if (dasBar.getChildIndex(_arg1) > _local3){
dasBar.setChildIndex(_arg1, _local3);
};
};
};
_local3++;
};
}
public function goToAG(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.addictinggames.com");
navigateToURL(_local2);
}
function frame161(){
isPlaying = false;
battlePlaying = false;
soundChan = new SoundChannel();
trans = new SoundTransform(0.4, 0);
theme = new BGM_Menu();
battleMusic = new BGM_Battle();
}
private function fireShotgun(){
var _local1:$click;
var _local2:sfx_PistolClick;
var _local3:int;
var _local4:Shell;
var _local5:sfx_ShotgunShot;
if (isShotgunReloading){
_local1 = new $click((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), 2, "click");
dasBar.addChildAt(_local1, (dasBar.numChildren - 1));
if (ifc.SFX){
_local2 = new sfx_PistolClick();
_local2.play(1);
};
return;
};
if (isShotgunReloaded){
_local3 = 0;
while (_local3 < 6) {
_local4 = new Shell(((hero.mc.x + hero.mc.gunNode.x) + Math.ceil(randRange(-4, 4))), ((hero.mc.y + hero.mc.gunNode.y) + Math.ceil(randRange(-4, 4))), (getGunOffsetDegree() + Math.ceil(randRange(-25, 25))));
bullets.push(_local4);
dasBar.addChild(_local4);
if (ifc.SFX){
_local5 = new sfx_ShotgunShot();
_local5.play(0, 1, trans);
};
_local3++;
};
shotgunClip--;
achiev.incShells();
ammoUsed++;
if (shotgunClip == 0){
isShotgunReloaded = false;
reloadShotgun();
};
};
}
public function removeCorpse(_arg1:Corpse){
var _local2:*;
for (_local2 in bullets) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function playerHit(_arg1:uint, _arg2:Number, _arg3:uint){
var _local4:sfx_pHit;
if (hero.beenHit){
return;
};
if (ifc.SFX){
_local4 = new sfx_pHit();
_local4.play(1);
};
hero.beenHit = true;
hero.numOfHits = (hero.numOfHits + _arg1);
hero.degrees = _arg2;
hero.stren = _arg3;
hitsUI.gotoAndStop((hero.numOfHits + 1));
}
private function waveTimerComplete(_arg1:TimerEvent){
var _local2:HUDText;
waves++;
achiev.incWaves();
_local2 = new HUDText(dasBar, String(("Wave: " + waves)), hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
holdSpawn = false;
nextWaveUI.visible = false;
}
private function inRange(_arg1:Object, _arg2:Object){
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.abs((_arg1.x - _arg2.x));
_local4 = Math.abs((((_arg1.height / 2) + _arg1.y) - ((_arg2.height / 2) + _arg2.y)));
_local5 = (Math.sqrt(_local3) + Math.sqrt(_local4));
return (_local5);
}
public function outFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("up");
}
public function removeBolt(_arg1:Bolt){
var _local2:*;
for (_local2 in bullets) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function launchTimer(){
var _local1:Timer;
if (hero.counter){
return;
};
hero.counter = true;
_local1 = new Timer(hero.stren, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local1.start();
}
public function loading(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
_local4 = Math.round(((_local3 * 100) / _local2));
loadBar.gotoAndPlay(_local4);
if (_local3 >= _local2){
removeEventListener(Event.ENTER_FRAME, loading);
removeChild(loadBar);
gotoAndPlay("Intro");
};
}
private function weaponUICheck(){
if (((havePistol) && (!(pistolEquip)))){
pistolUI.gotoAndStop("inactive");
} else {
if (!havePistol){
pistolUI.gotoAndStop("na");
} else {
if (pistolEquip){
pistolUI.gotoAndStop("active");
};
};
};
if (((haveShotgun) && (!(shotgunEquip)))){
shotgunUI.gotoAndStop("inactive");
} else {
if (!haveShotgun){
shotgunUI.gotoAndStop("na");
} else {
if (shotgunEquip){
shotgunUI.gotoAndStop("active");
};
};
};
if (((haveCrossbow) && (!(crossbowEquip)))){
crossbowUI.gotoAndStop("inactive");
} else {
if (!haveCrossbow){
crossbowUI.gotoAndStop("na");
} else {
if (crossbowEquip){
crossbowUI.gotoAndStop("active");
};
};
};
if (((haveGatling) && (!(gatlingEquip)))){
gatlingUI.gotoAndStop("inactive");
} else {
if (!haveGatling){
gatlingUI.gotoAndStop("na");
} else {
if (gatlingEquip){
gatlingUI.gotoAndStop("active");
};
};
};
}
private function clickRelease(_arg1:MouseEvent){
gatlingFiring = false;
}
public function removeRound(_arg1:Round){
var _local2:*;
for (_local2 in bullets) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function moveHero(_arg1:Number){
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
if (_arg1 < 1){
return;
};
_local2 = 0;
_local3 = 0;
if (hero.moveLeft){
_local2 = (-(hero.speed) * _arg1);
} else {
if (hero.moveRight){
_local2 = (hero.speed * _arg1);
};
};
if (hero.moveUp){
_local3 = (-(hero.speed) * _arg1);
} else {
if (hero.moveDown){
_local3 = (hero.speed * _arg1);
};
};
if (currentWeapon == 1){
if ((((getCursor() > -110)) && ((getCursor() < -71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nWalk"))))){
hero.mc.gotoAndPlay("nWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "n"))))){
hero.mc.gotoAndStop("n");
};
};
} else {
if ((((getCursor() > -70)) && ((getCursor() < -21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "neWalk"))))){
hero.mc.gotoAndPlay("neWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "ne"))))){
hero.mc.gotoAndStop("ne");
};
};
} else {
if ((((getCursor() > -20)) && ((getCursor() < 21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "eWalk"))))){
hero.mc.gotoAndPlay("eWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "e"))))){
hero.mc.gotoAndStop("e");
};
};
} else {
if ((((getCursor() > 20)) && ((getCursor() < 71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "seWalk"))))){
hero.mc.gotoAndPlay("seWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "se"))))){
hero.mc.gotoAndStop("se");
};
};
} else {
if ((((getCursor() > 70)) && ((getCursor() < 111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "sWalk"))))){
hero.mc.gotoAndPlay("sWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "s"))))){
hero.mc.gotoAndStop("s");
};
};
} else {
if ((((getCursor() > 110)) && ((getCursor() < 161)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "swWalk"))))){
hero.mc.gotoAndPlay("swWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "sw"))))){
hero.mc.gotoAndStop("sw");
};
};
} else {
if ((((getCursor() < -160)) || ((getCursor() > 160)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "wWalk"))))){
hero.mc.gotoAndPlay("wWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "w"))))){
hero.mc.gotoAndStop("w");
};
};
} else {
if ((((getCursor() > -160)) && ((getCursor() < -111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nwWalk"))))){
hero.mc.gotoAndPlay("nwWalk");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nw"))))){
hero.mc.gotoAndStop("nw");
};
};
};
};
};
};
};
};
};
};
};
if (currentWeapon == 2){
if ((((getCursor() > -110)) && ((getCursor() < -71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nWalkShot"))))){
hero.mc.gotoAndPlay("nWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nShot"))))){
hero.mc.gotoAndStop("nShot");
};
};
} else {
if ((((getCursor() > -70)) && ((getCursor() < -21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "neWalkShot"))))){
hero.mc.gotoAndPlay("neWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "neShot"))))){
hero.mc.gotoAndStop("neShot");
};
};
} else {
if ((((getCursor() > -20)) && ((getCursor() < 21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "eWalkShot"))))){
hero.mc.gotoAndPlay("eWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "eShot"))))){
hero.mc.gotoAndStop("eShot");
};
};
} else {
if ((((getCursor() > 20)) && ((getCursor() < 71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "seWalkShot"))))){
hero.mc.gotoAndPlay("seWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "seShot"))))){
hero.mc.gotoAndStop("seShot");
};
};
} else {
if ((((getCursor() > 70)) && ((getCursor() < 111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "sWalkShot"))))){
hero.mc.gotoAndPlay("sWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "sShot"))))){
hero.mc.gotoAndStop("sShot");
};
};
} else {
if ((((getCursor() > 110)) && ((getCursor() < 161)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "swWalkShot"))))){
hero.mc.gotoAndPlay("swWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "swShot"))))){
hero.mc.gotoAndStop("swShot");
};
};
} else {
if ((((getCursor() < -160)) || ((getCursor() > 160)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "wWalkShot"))))){
hero.mc.gotoAndPlay("wWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "wShot"))))){
hero.mc.gotoAndStop("wShot");
};
};
} else {
if ((((getCursor() > -160)) && ((getCursor() < -111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nwWalkShot"))))){
hero.mc.gotoAndPlay("nwWalkShot");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nwShot"))))){
hero.mc.gotoAndStop("nwShot");
};
};
};
};
};
};
};
};
};
};
};
if (currentWeapon == 3){
if ((((getCursor() > -110)) && ((getCursor() < -71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nWalkCross"))))){
hero.mc.gotoAndPlay("nWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nCross"))))){
hero.mc.gotoAndStop("nCross");
};
};
} else {
if ((((getCursor() > -70)) && ((getCursor() < -21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "neWalkCross"))))){
hero.mc.gotoAndPlay("neWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "neCross"))))){
hero.mc.gotoAndStop("neCross");
};
};
} else {
if ((((getCursor() > -20)) && ((getCursor() < 21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "eWalkCross"))))){
hero.mc.gotoAndPlay("eWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "eCross"))))){
hero.mc.gotoAndStop("eCross");
};
};
} else {
if ((((getCursor() > 20)) && ((getCursor() < 71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "seWalkCross"))))){
hero.mc.gotoAndPlay("seWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "seCross"))))){
hero.mc.gotoAndStop("seCross");
};
};
} else {
if ((((getCursor() > 70)) && ((getCursor() < 111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "sWalkCross"))))){
hero.mc.gotoAndPlay("sWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "sCross"))))){
hero.mc.gotoAndStop("sCross");
};
};
} else {
if ((((getCursor() > 110)) && ((getCursor() < 161)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "swWalkCross"))))){
hero.mc.gotoAndPlay("swWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "swCross"))))){
hero.mc.gotoAndStop("swCross");
};
};
} else {
if ((((getCursor() < -160)) || ((getCursor() > 160)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "wWalkCross"))))){
hero.mc.gotoAndPlay("wWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "wCross"))))){
hero.mc.gotoAndStop("wCross");
};
};
} else {
if ((((getCursor() > -160)) && ((getCursor() < -111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nwWalkCross"))))){
hero.mc.gotoAndPlay("nwWalkCross");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nwCross"))))){
hero.mc.gotoAndStop("nwCross");
};
};
};
};
};
};
};
};
};
};
};
if (currentWeapon == 4){
if ((((getCursor() > -110)) && ((getCursor() < -71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nWalkGatling"))))){
hero.mc.gotoAndPlay("nWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nGatling"))))){
hero.mc.gotoAndStop("nGatling");
};
};
} else {
if ((((getCursor() > -70)) && ((getCursor() < -21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "neWalkGatling"))))){
hero.mc.gotoAndPlay("neWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "neGatling"))))){
hero.mc.gotoAndStop("neGatling");
};
};
} else {
if ((((getCursor() > -20)) && ((getCursor() < 21)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "eWalkGatling"))))){
hero.mc.gotoAndPlay("eWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "eGatling"))))){
hero.mc.gotoAndStop("eGatling");
};
};
} else {
if ((((getCursor() > 20)) && ((getCursor() < 71)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "seWalkGatling"))))){
hero.mc.gotoAndPlay("seWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "seGatling"))))){
hero.mc.gotoAndStop("seGatling");
};
};
} else {
if ((((getCursor() > 70)) && ((getCursor() < 111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "sWalkGatling"))))){
hero.mc.gotoAndPlay("sWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "sGatling"))))){
hero.mc.gotoAndStop("sGatling");
};
};
} else {
if ((((getCursor() > 110)) && ((getCursor() < 161)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "swWalkGatling"))))){
hero.mc.gotoAndPlay("swWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "swGatling"))))){
hero.mc.gotoAndStop("swGatling");
};
};
} else {
if ((((getCursor() < -160)) || ((getCursor() > 160)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "wWalkGatling"))))){
hero.mc.gotoAndPlay("wWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "wGatling"))))){
hero.mc.gotoAndStop("wGatling");
};
};
} else {
if ((((getCursor() > -160)) && ((getCursor() < -111)))){
if (((hero.moving) && (!((hero.mc.currentLabel == "nwWalkGatling"))))){
hero.mc.gotoAndPlay("nwWalkGatling");
} else {
if (((!(hero.moving)) && (!((hero.mc.currentLabel == "nwGatling"))))){
hero.mc.gotoAndStop("nwGatling");
};
};
};
};
};
};
};
};
};
};
};
_local4 = (hero.mc.y + _local3);
_local5 = (hero.mc.x + _local2);
if (hero.beenHit){
if ((((hero.mc.currentLabel == "nwWalk")) || ((hero.mc.currentLabel == "nw")))){
hero.mc.gotoAndPlay("nwHit");
} else {
if ((((((((hero.mc.currentLabel == "neWalk")) || ((hero.mc.currentLabel == "ne")))) || ((hero.mc.currentLabel == "nWalk")))) || ((hero.mc.currentLabel == "n")))){
hero.mc.gotoAndPlay("neHit");
} else {
if ((((((((hero.mc.currentLabel == "swWalk")) || ((hero.mc.currentLabel == "sw")))) || ((hero.mc.currentLabel == "wWalk")))) || ((hero.mc.currentLabel == "w")))){
hero.mc.gotoAndPlay("swHit");
} else {
if ((((((((((((hero.mc.currentLabel == "seWalk")) || ((hero.mc.currentLabel == "se")))) || ((hero.mc.currentLabel == "eWalk")))) || ((hero.mc.currentLabel == "e")))) || ((hero.mc.currentLabel == "sWalk")))) || ((hero.mc.currentLabel == "s")))){
hero.mc.gotoAndPlay("seHit");
};
};
};
};
_local2 = (hero.stren * Math.cos((((2 * Math.PI) * hero.degrees) / 360)));
_local3 = (hero.stren * Math.sin((((2 * Math.PI) * hero.degrees) / 360)));
_local5 = (hero.mc.x + ((_local2 * _arg1) / 1000));
_local4 = (hero.mc.y + ((_local3 * _arg1) / 1000));
launchTimer();
};
_local6 = 0;
while (_local6 < fixedObjects.length) {
if (inRange(hero.mc, fixedObjects[_local6].mc) < 30){
if ((((((fixedObjects[_local6].type == "Block")) && (((hero.mc.x + (hero.width / 2)) > fixedObjects[_local6].leftside)))) && (((hero.mc.x - (hero.width / 2)) < fixedObjects[_local6].rightside)))){
if ((((hero.mc.y <= fixedObjects[_local6].topside)) && ((_local4 > fixedObjects[_local6].topside)))){
_local4 = fixedObjects[_local6].topside;
break;
};
if ((((hero.mc.y >= fixedObjects[_local6].bottomside)) && ((_local4 < (fixedObjects[_local6].bottomside + hero.height))))){
_local4 = (fixedObjects[_local6].bottomside + hero.height);
break;
};
};
};
_local6++;
};
_local6 = 0;
while (_local6 < fixedObjects.length) {
if (inRange(hero.mc, fixedObjects[_local6].mc) < 30){
if ((((((fixedObjects[_local6].type == "Block")) && ((_local4 > fixedObjects[_local6].topside)))) && (((_local4 - hero.height) < fixedObjects[_local6].bottomside)))){
if (((((hero.mc.x - (hero.width / 2)) >= fixedObjects[_local6].rightside)) && (((_local5 - (hero.width / 2)) <= fixedObjects[_local6].rightside)))){
_local5 = (fixedObjects[_local6].rightside + (hero.width / 2));
break;
};
if (((((hero.mc.x + (hero.width / 2)) <= fixedObjects[_local6].leftside)) && (((_local5 + (hero.width / 2)) >= fixedObjects[_local6].leftside)))){
_local5 = (fixedObjects[_local6].leftside - (hero.width / 2));
break;
};
};
};
_local6++;
};
hero.mc.x = _local5;
hero.mc.y = _local4;
}
public function removeArm(_arg1:Arm){
var _local2:*;
for (_local2 in bullets) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function firePistol(){
var _local1:$click;
var _local2:sfx_PistolClick;
var _local3:Bullet;
var _local4:sfx_PistolShot;
if (isPistolReloading){
_local1 = new $click((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), 2, "click");
dasBar.addChildAt(_local1, (dasBar.numChildren - 1));
if (ifc.SFX){
_local2 = new sfx_PistolClick();
_local2.play(1);
};
return;
};
if (isPistolReloaded){
_local3 = new Bullet((hero.mc.x + hero.mc.gunNode.x), (hero.mc.y + hero.mc.gunNode.y), (getGunOffsetDegree() + randRange(-2, 3)));
pistolClip--;
bullets.push(_local3);
dasBar.addChild(_local3);
achiev.incBullets();
ammoUsed++;
if (ifc.SFX){
_local4 = new sfx_PistolShot();
_local4.play(1);
};
if (pistolClip == 0){
isPistolReloaded = false;
reloadPistol();
};
};
}
private function spawn(){
if (((((ifc.Pause) || (hero.dead))) || (holdSpawn))){
return;
};
mobs2Spawn = (8 + (2 * waves));
if (mobs2Spawn > 30){
mobs2Spawn = 30;
};
if ((((((mobsSpawned == mobs2Spawn)) && ((aiMgr.aiLength() <= 0)))) || ((mobsSpawned > mobs2Spawn)))){
triggerNewSpawn = true;
};
if ((((aiMgr.aiLength() <= 20)) && ((mobsSpawned <= mobs2Spawn)))){
createMutant();
if ((((waves == 3)) && (!(droppedShotty)))){
createSpecialMut();
droppedShotty = true;
};
if ((((waves == 5)) && (!(brokenWall)))){
createGolem();
brokenWall = true;
dasBar.theWall.gotoAndStop(brokenWall);
};
if ((((waves == 8)) && (!(brokenFloor)))){
createBWolf();
brokenFloor = true;
dasBar.thePlank.gotoAndStop(brokenFloor);
};
if ((((waves == 12)) && (!(summon)))){
createWitch(dasBar.doorNode.x, dasBar.doorNode.y, true);
summon = true;
};
};
checkWaves();
}
private function keySetup(){
keyObject = new Object();
keyObject.wKey = false;
keyObject.aKey = false;
keyObject.sKey = false;
keyObject.dKey = false;
}
public function dropCrossbow(_arg1:Object){
var _local2:int;
var _local3:Item;
_local2 = 0;
while (_local2 < aiMgr.aiLength()) {
if (aiMgr.getAIEnt(_local2) == _arg1){
_local3 = new Item(6);
_local3.x = _arg1.x;
_local3.y = _arg1.y;
itemDrop.push(_local3);
dasBar.addChild(_local3);
};
_local2++;
};
}
private function clickPress(_arg1:MouseEvent){
if (ifc.Pause){
return;
};
switch (currentWeapon){
case 1:
firePistol();
break;
case 2:
fireShotgun();
break;
case 3:
fireBolt();
break;
case 4:
gatlingFiring = true;
break;
default:
firePistol();
};
}
private function timerComplete(_arg1:TimerEvent){
hero.counter = false;
hero.beenHit = false;
}
public function removeOrb(_arg1:Orb){
var _local2:*;
for (_local2 in _arg1) {
if (bullets[_local2] == _arg1){
bullets.splice(_local2, 1);
break;
};
};
}
private function gameLoop(_arg1:Event){
var _local2:int;
var _local3:int;
keyCheck();
if (hero.dead){
achiev.saveGame();
removeListeners();
return;
};
if (ifc.Pause){
achiev.saveGame();
lastTime = 0;
hcMenu.gotoAndStop("thing");
Mouse.show();
myCursor.visible = false;
hero.mc.stop();
return;
};
Mouse.hide();
myCursor.visible = true;
achievPage.visible = false;
if (lastTime == 0){
lastTime = getTimer();
};
_local2 = (getTimer() - lastTime);
lastTime = (lastTime + _local2);
newDepthControl(dasBar._hero);
_local3 = 0;
while (_local3 < aiMgr.aiLength()) {
newDepthControl(aiMgr.getAIEnt(_local3));
_local3++;
};
_local3 = 0;
while (_local3 < itemDrop.length) {
newDepthControl(itemDrop[_local3]);
_local3++;
};
weaponUICheck();
check4Hits();
moveHero(_local2);
scrollWithHero();
aiMgr.Update();
dasBar.setChildIndex(dasBar.lowerStairs, (dasBar.numChildren - 1));
switch (currentWeapon){
case 1:
pistolUI.theClip.text = String(pistolClip);
pistolUI.allAmmo.text = "∞";
break;
case 2:
shotgunUI.theClip.text = String(shotgunClip);
shotgunUI.allAmmo.text = String(shotgunShells);
break;
case 3:
crossbowUI.theClip.text = String(crossbowClip);
crossbowUI.allAmmo.text = String(crossbowBolts);
break;
case 4:
gatlingUI.theClip.text = String(gatlingClip);
gatlingUI.allAmmo.text = String(gatlingRounds);
break;
default:
break;
};
cash.text = String(_money);
if (gatlingFiring){
fireGatling();
};
}
public function goToHC(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.hardcircle.com");
navigateToURL(_local2);
}
private function autoSave(){
achiev.saveGame();
}
public function overFunc(_arg1:MouseEvent){
_arg1.target.gotoAndStop("over");
}
public function dropGatling(_arg1:Object){
var _local2:int;
var _local3:Item;
_local2 = 0;
while (_local2 < aiMgr.aiLength()) {
if (aiMgr.getAIEnt(_local2) == _arg1){
_local3 = new Item(7);
_local3.x = _arg1.x;
_local3.y = _arg1.y;
itemDrop.push(_local3);
dasBar.addChild(_local3);
};
_local2++;
};
}
private function scrollWithHero(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local1 = (dasBar.x + hero.mc.x);
_local2 = (dasBar.y + hero.mc.y);
_local3 = (stage.stageWidth - edgeDistance);
_local4 = edgeDistance;
_local5 = edgeDistance;
_local6 = (stage.stageHeight - edgeDistance);
if (_local1 > _local3){
dasBar.x = (dasBar.x - (_local1 - _local3));
if (dasBar.x < -((1250 - stage.stageWidth))){
dasBar.x = -((1250 - stage.stageWidth));
};
};
if (_local1 < _local4){
dasBar.x = (dasBar.x + (_local4 - _local1));
if (dasBar.x > 0){
dasBar.x = 0;
};
};
if (_local2 < _local5){
dasBar.y = (dasBar.y - (_local2 - _local5));
if (dasBar.y > 0){
dasBar.y = 0;
};
};
if (_local2 > _local6){
dasBar.y = (dasBar.y - (_local2 - _local6));
if (dasBar.y < -((1000 - stage.stageHeight))){
dasBar.y = -((1000 - stage.stageHeight));
};
};
}
private function reloadShotgunMag(_arg1:TimerEvent){
var _local2:HUDText;
var _local3:int;
var _local4:HUDText;
if (shotgunShells == 0){
_local4 = new HUDText(dasBar, "Shotgun Empty", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
return;
};
_local2 = new HUDText(dasBar, "Shotgun Reloaded", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isShotgunReloaded = true;
isShotgunReloading = false;
_local3 = (shotgunClip + 1);
while (_local3 <= SHOTGUNFULL) {
if (shotgunShells == 0){
break;
};
shotgunClip = _local3;
shotgunShells--;
_local3++;
};
}
private function resetGame(){
var _local1:*;
removeListeners();
currentWeapon = 1;
_money = 0;
lastCount = 0;
waves = 1;
isPistolReloaded = true;
isPistolReloading = false;
pistolEquip = true;
havePistol = true;
pistolClip = PISTOLFULL;
isShotgunReloaded = true;
isShotgunReloading = false;
shotgunEquip = false;
haveShotgun = false;
shotgunClip = SHOTGUNFULL;
shotgunShells = 0;
isCrossbowReloaded = true;
isCrossbowReloading = false;
crossbowEquip = false;
haveCrossbow = false;
crossbowClip = CROSSBOWFULL;
crossbowBolts = 0;
isGatlingReloaded = true;
isGatlingReloading = false;
gatlingFiredRecently = false;
gatlingFiring = false;
gatlingEquip = false;
haveGatling = false;
gatlingClip = GATLINGFULL;
gatlingRounds = 0;
mobsSpawned = 0;
holdSpawn = false;
triggerNewSpawn = false;
brokenWall = false;
brokenFloor = false;
droppedShotty = false;
summon = false;
mobs2Spawn = 0;
seconds = 0;
minutes = 0;
hours = 0;
ammoUsed = 0;
thingsKilled = 0;
clearInterval(timePlayedID);
clearInterval(autoSaveID);
clearInterval(spawnID);
hero = new Object();
lastTime = 0;
for (_local1 in bullets) {
bullets[_local1].removeMe();
bullets.splice(_local1, 1);
};
_local1 = 0;
for (_local1 in gang) {
gang[_local1].removeMe();
gang.splice(_local1, 1);
};
_local1 = 0;
for (_local1 in fixedObjects) {
fixedObjects.splice(_local1, 1);
};
_local1 = 0;
for (_local1 in itemDrop) {
itemDrop.splice(_local1, 1);
};
_local1 = 0;
}
private function check4Hits(){
var txt:HUDText;
var splatNum:uint;
var mc:MovieClip;
var blood:$blood;
var bulletNum:int;
var itemNum:int;
var playHitSound:Function;
var gangMember:*;
var enemyNum:int;
var i:int;
var dx:int;
var dy:int;
var enemyAngle:Number;
var enemyDegree:Number;
var pickupSound:sfx_PickUp;
var income:uint;
playHitSound = function (){
var _local1:Object;
if (ifc.SFX){
if (Math.ceil(randRange(0, 2)) == 1){
_local1 = new sfx_Hit1();
} else {
if (Math.ceil(randRange(0, 2)) == 2){
_local1 = new sfx_Hit2();
} else {
_local1 = new sfx_Hit1();
};
};
_local1.play(1);
};
};
splatNum = Math.ceil(randRange(1, 3));
mc = new MovieClip();
bulletNum = 0;
while (bulletNum < bullets.length) {
if (((bullets[bulletNum].hitTestObject(hero.mc.pickup)) && ((bullets[bulletNum].getAmmoType() == "arm")))){
playerHit(1, bullets[bulletNum].getRot(), 100);
bullets[bulletNum].removeMe();
break;
};
if (((bullets[bulletNum].hitTestObject(hero.mc.pickup)) && ((bullets[bulletNum].getAmmoType() == "orb")))){
playerHit(2, bullets[bulletNum].getRot(), 100);
bullets[bulletNum].removeMe();
break;
};
if (((((bullets[bulletNum].hitTestObject(hero.mc.pickup)) && ((bullets[bulletNum].getAmmoType() == "corpse")))) && (!(bullets[bulletNum].hitPC)))){
playerHit(2, bullets[bulletNum].getRot(), 300);
bullets[bulletNum].hitPC = true;
break;
};
if (bullets[bulletNum].hitTestObject(dasBar.fish)){
achiev.incFishShot();
bullets[bulletNum].removeMe();
};
enemyNum = 0;
while (enemyNum < aiMgr.aiLength()) {
gangMember = aiMgr.getAIEnt(enemyNum);
if (gangMember.health > 0){
if (((((((bullets[bulletNum].hitTestObject(gangMember)) && (!((bullets[bulletNum].getAmmoType() == "arm"))))) && (!((bullets[bulletNum].getAmmoType() == "corpse"))))) && (!((bullets[bulletNum].getAmmoType() == "orb"))))){
playHitSound();
if (bullets[bulletNum].getAmmoType() == "bullet"){
gangMember.hit(BULLETDAMAGE);
if ((((((((gangMember is Mutant)) || ((gangMember is RMutant)))) || ((gangMember is Werewolf)))) || ((gangMember is Witch)))){
gangMember.pushBack(bullets[bulletNum].getRot(), 100);
} else {
if ((gangMember is Golem)){
gangMember.pushBack(bullets[bulletNum].getRot(), 10);
};
};
i = 0;
while (i <= splatNum) {
blood = new $blood(gangMember.x, gangMember.y, 20, 20);
mc.addChild(blood);
i = (i + 1);
};
dasBar.addChildAt(mc, (dasBar.getChildIndex(dasBar.theWall) + 1));
bullets[bulletNum].removeMe();
break;
};
if (bullets[bulletNum].getAmmoType() == "shell"){
gangMember.hit(SHELLDAMAGE);
if ((((((((gangMember is Mutant)) || ((gangMember is RMutant)))) || ((gangMember is Werewolf)))) || ((gangMember is Witch)))){
gangMember.pushBack(bullets[bulletNum].getRot(), 200);
} else {
if ((gangMember is Golem)){
gangMember.pushBack(bullets[bulletNum].getRot(), 50);
};
};
i = 0;
while (i <= splatNum) {
blood = new $blood(gangMember.x, gangMember.y, 40, 40);
mc.addChild(blood);
i = (i + 1);
};
dasBar.addChildAt(mc, (dasBar.getChildIndex(dasBar.theWall) + 1));
bullets[bulletNum].removeMe();
break;
};
if (bullets[bulletNum].getAmmoType() == "bolt"){
gangMember.hit(BOLTDAMAGE);
if ((((((((gangMember is Mutant)) || ((gangMember is RMutant)))) || ((gangMember is Werewolf)))) || ((gangMember is Witch)))){
gangMember.pushBack(bullets[bulletNum].getRot(), 50);
gangMember.stun(2);
} else {
if ((gangMember is Golem)){
gangMember.pushBack(bullets[bulletNum].getRot(), 10);
};
};
i = 0;
while (i <= (splatNum - 1)) {
blood = new $blood(gangMember.x, gangMember.y, 10, 10);
mc.addChild(blood);
i = (i + 1);
};
dasBar.addChildAt(mc, (dasBar.getChildIndex(dasBar.theWall) + 1));
bullets[bulletNum].removeMe();
break;
};
if (bullets[bulletNum].getAmmoType() == "round"){
gangMember.hit(ROUNDDAMAGE);
if ((((((((gangMember is Mutant)) || ((gangMember is RMutant)))) || ((gangMember is Werewolf)))) || ((gangMember is Witch)))){
gangMember.pushBack(bullets[bulletNum].getRot(), 200);
} else {
if ((gangMember is Golem)){
gangMember.pushBack(bullets[bulletNum].getRot(), 30);
};
};
i = 0;
while (i <= splatNum) {
blood = new $blood(gangMember.x, gangMember.y, 40, 40);
mc.addChild(blood);
i = (i + 1);
};
dasBar.addChildAt(mc, (dasBar.getChildIndex(dasBar.theWall) + 1));
bullets[bulletNum].removeMe();
break;
};
};
};
enemyNum = (enemyNum + 1);
};
bulletNum = (bulletNum + 1);
};
enemyNum = 0;
while (enemyNum < aiMgr.aiLength()) {
if (((aiMgr.getAIEnt(enemyNum).isAttacking) && (aiMgr.getAIEnt(enemyNum).hitTestObject(hero.mc.pickup)))){
if ((((((((aiMgr.getAIEnt(enemyNum) is Mutant)) || ((aiMgr.getAIEnt(enemyNum) is Golem)))) || ((aiMgr.getAIEnt(enemyNum) is Werewolf)))) || ((aiMgr.getAIEnt(enemyNum) is Witch)))){
dx = (hero.mc.x - aiMgr.getAIEnt(enemyNum).x);
dy = (hero.mc.y - aiMgr.getAIEnt(enemyNum).y);
enemyAngle = Math.atan2(dy, dx);
enemyDegree = (360 * (enemyAngle / (2 * Math.PI)));
playerHit(1, enemyDegree, 100);
};
};
enemyNum = (enemyNum + 1);
};
itemNum = 0;
while (itemNum < itemDrop.length) {
if (hero.mc.pickup.hitTestObject(itemDrop[itemNum].icons)){
if (ifc.SFX){
pickupSound = new sfx_PickUp();
pickupSound.play(1);
};
if (itemDrop[itemNum].currentLabel == "cash"){
income = (9 + (9 * waves));
_money = (_money + income);
achiev.updateMoney(income);
txt = new HUDText(dasBar, String(("+$" + income)), hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
if (itemDrop[itemNum].currentLabel == "shells"){
shotgunShells = (shotgunShells + 6);
txt = new HUDText(dasBar, "Shells + 6", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
if (itemDrop[itemNum].currentLabel == "bolts"){
crossbowBolts = (crossbowBolts + 10);
txt = new HUDText(dasBar, "Bolts + 10", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
if (itemDrop[itemNum].currentLabel == "rounds"){
gatlingRounds = (gatlingRounds + 20);
txt = new HUDText(dasBar, "Rounds + 20", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
if (itemDrop[itemNum].currentLabel == "shotgun"){
achiev.gotShotgun();
shotgunShells = (shotgunShells + 10);
haveShotgun = true;
txt = new HUDText(dasBar, "Shotgun", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
if (itemDrop[itemNum].currentLabel == "crossbow"){
achiev.gotCrossbow();
crossbowBolts = (crossbowBolts + 20);
haveCrossbow = true;
txt = new HUDText(dasBar, "Crossbow", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
if (itemDrop[itemNum].currentLabel == "gatling"){
achiev.gotGatling();
gatlingRounds = (gatlingRounds + 40);
haveGatling = true;
txt = new HUDText(dasBar, "Gatling", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
} else {
txt = new HUDText(dasBar, "Unknown Item Pick-up", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
dasBar.removeChild(itemDrop[itemNum]);
itemDrop.splice(itemNum, 1);
};
};
};
};
};
};
};
};
itemNum = (itemNum + 1);
};
}
private function reloadGatling(){
var _local1:HUDText;
var _local2:Timer;
if (((isGatlingReloading) || ((gatlingRounds <= 0)))){
return;
};
_local1 = new HUDText(dasBar, "Reloading Gatling", hero.mc.x, (hero.mc.y - dasBar._hero.height), "scrollup");
isGatlingReloading = true;
_local2 = new Timer(2000, 1);
_local2.addEventListener(TimerEvent.TIMER, reloadGatlingMag);
_local2.start();
}
}
}//package
Section 61
//HUDText (HUDText)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class HUDText extends Sprite {
private var tSprite:Sprite;
private var scrollType:String;
private var animTimer:Timer;
private var parentMC:MovieClip;
private var ifc:IFC;
private var tField:TextField;
static const animStepTime:int = 50;
static const fontSize:uint = 14;
static const fontFace:String = "Arnprior";
static const fontBold:Boolean = true;
static const fontColour:Number = 13434879;
static const animSteps:int = 15;
public function HUDText(_arg1:MovieClip, _arg2:Object, _arg3, _arg4:Number, _arg5:String){
var _local6:TextFormat;
ifc = new IFC();
super();
scrollType = _arg5;
_local6 = new TextFormat();
_local6.font = fontFace;
_local6.size = fontSize;
_local6.bold = fontBold;
_local6.color = fontColour;
_local6.align = "center";
tField = new TextField();
tField.selectable = false;
tField.defaultTextFormat = _local6;
tField.autoSize = TextFieldAutoSize.CENTER;
tField.text = String(_arg2);
tField.x = -((tField.width / 2));
tField.y = -((tField.height / 2));
tSprite = new Sprite();
tSprite.x = _arg3;
tSprite.y = _arg4;
tSprite.scaleX = 0;
tSprite.scaleY = 0;
tSprite.alpha = 0;
tSprite.addChild(tField);
parentMC = _arg1;
parentMC.addChildAt(tSprite, (parentMC.numChildren - 1));
animTimer = new Timer(animStepTime, animSteps);
animTimer.addEventListener(TimerEvent.TIMER, scrollText);
animTimer.addEventListener(TimerEvent.TIMER_COMPLETE, removeText);
animTimer.start();
}
private function scrollText(_arg1:TimerEvent){
var _local2:Number;
if (ifc.Pause){
return;
};
_local2 = (_arg1.target.currentCount / animSteps);
if (scrollType == "burst"){
tSprite.scaleX = (((1 - _local2) * 0) + (_local2 * 2));
tSprite.scaleY = (((1 - _local2) * 0) + (_local2 * 2));
tSprite.alpha = (1 - _local2);
};
if (scrollType == "scrollup"){
tSprite.scaleX = 1;
tSprite.scaleY = 1;
tSprite.y--;
tSprite.alpha = (1 - _local2);
};
if (scrollType == "scrolldown"){
tSprite.scaleX = 1;
tSprite.scaleY = 1;
tSprite.y++;
tSprite.alpha = (1 - _local2);
};
}
private function removeText(_arg1:TimerEvent){
tSprite.removeChild(tField);
parentMC.removeChild(tSprite);
tField = null;
tSprite = null;
delete ??getglobalscope
[this];
}
}
}//package
Section 62
//IFC (IFC)
package {
public class IFC {
private static var _SFX:Boolean = true;
private static var _Pause:Boolean = false;
private static var _Audio:Boolean = true;
public function get SFX():Boolean{
return (_SFX);
}
public function get Audio():Boolean{
return (_Audio);
}
public function set SFX(_arg1:Boolean){
_SFX = _arg1;
}
public function set Pause(_arg1:Boolean){
_Pause = _arg1;
}
public function set Audio(_arg1:Boolean){
_Audio = _arg1;
}
public function get Pause():Boolean{
return (_Pause);
}
}
}//package
Section 63
//Item (Item)
package {
import flash.display.*;
public class Item extends MovieClip {
public var icons:MovieClip;
public function Item(_arg1:uint){
addFrameScript(10, frame11, 21, frame22, 32, frame33, 43, frame44, 54, frame55, 65, frame66, 76, frame77);
switch (_arg1){
case 0:
break;
case 1:
gotoAndPlay("cash");
break;
case 2:
gotoAndPlay("shells");
break;
case 3:
gotoAndPlay("bolts");
break;
case 4:
gotoAndPlay("rounds");
break;
case 5:
gotoAndPlay("shotgun");
break;
case 6:
gotoAndPlay("crossbow");
break;
case 7:
gotoAndPlay("gatling");
break;
default:
break;
};
}
function frame77(){
gotoAndPlay("gatling");
}
function frame22(){
gotoAndPlay("shells");
}
function frame11(){
gotoAndPlay("cash");
}
function frame44(){
gotoAndPlay("rounds");
}
function frame33(){
gotoAndPlay("bolts");
}
function frame55(){
gotoAndPlay("shotgun");
}
function frame66(){
gotoAndPlay("crossbow");
}
}
}//package
Section 64
//Mutant (Mutant)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Mutant extends MovieClip {
private var fixedObjects:Array;
private var counter:Boolean;// = false
private var weaponDrop:Boolean;
private var degrees:Number;
private var bulletHit:Boolean;
private var speed:Number;
public var health:int;// = 4
public var Type:Class;
private var stars:$dazed;
private var lastTime:int;
public var isAttacking;// = false
private var dy:Number;// = 1
private var stren:uint;
private var dx:Number;// = 1
private var stunned:Boolean;// = false
public var unitheight:Number;
private var achiev:Achievments;
public var unitwidth:Number;
private var ifc:IFC;
private static var aiMgr:AIManager;
public function Mutant(_arg1, _arg2:Number, _arg3:Array, _arg4:Boolean){
Type = Mutant;
ifc = new IFC();
dx = 1;
dy = 1;
health = 4;
fixedObjects = new Array();
stars = new $dazed();
achiev = new Achievments();
stunned = false;
counter = false;
isAttacking = false;
super();
addFrameScript(15, frame16, 31, frame32, 47, frame48, 63, frame64, 75, frame76, 77, frame78, 80, frame81, 88, frame89, 90, frame91, 93, frame94, 101, frame102, 103, frame104, 106, frame107, 114, frame115, 116, frame117, 119, frame120, 130, frame131, 141, frame142, 152, frame153, 163, frame164);
weaponDrop = _arg4;
aiMgr = new AIManager();
if (weaponDrop){
};
this.x = _arg1;
this.y = _arg2;
this.alpha = 0;
speed = randRange(20, 40);
fixedObjects = _arg3;
unitwidth = (this.width / 2);
unitheight = (this.height / 3);
}
function frame153(){
stop();
}
function frame64(){
gotoAndPlay("seWalk");
}
public function updateList(_arg1:Array){
}
function frame76(){
this.isAttacking = true;
}
function frame164(){
stop();
}
private function inRange(_arg1:Object, _arg2:Object){
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.abs((_arg1.x - _arg2.x));
_local4 = Math.abs((((_arg1.height / 2) + _arg1.y) - ((_arg2.height / 2) + _arg2.y)));
_local5 = (Math.sqrt(_local3) + Math.sqrt(_local4));
return (_local5);
}
function frame81(){
gotoAndPlay("nwWalk");
}
public function removeMe(){
parent.removeChild(this);
delete ??getglobalscope
[this];
}
public function pushBack(_arg1:Number, _arg2:uint){
bulletHit = true;
degrees = _arg1;
stren = _arg2;
}
private function randRange(_arg1:uint, _arg2:uint){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
function frame94(){
gotoAndPlay("neWalk");
}
function frame91(){
this.isAttacking = false;
}
function frame89(){
this.isAttacking = true;
}
private function fadeMob(_arg1:TimerEvent){
var _local2:Timer;
_local2 = new Timer(100, 10);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local2.start();
}
private function launchTimer(){
var _local1:Timer;
if (counter){
return;
};
counter = true;
_local1 = new Timer(stren, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local1.start();
}
function frame107(){
gotoAndPlay("swWalk");
}
function frame102(){
this.isAttacking = true;
}
function frame104(){
this.isAttacking = false;
}
function frame16(){
gotoAndPlay("nwWalk");
}
function frame117(){
this.isAttacking = false;
}
public function moveCharacter(_arg1:Mutant){
}
function frame115(){
this.isAttacking = true;
}
private function checkHealth(){
var _local1:Timer;
if (health <= 0){
isAttacking = false;
if ((((this.currentLabel == "nwWalk")) || ((this.currentLabel == "nwAttack")))){
gotoAndPlay("nwHit");
} else {
if ((((this.currentLabel == "neWalk")) || ((this.currentLabel == "neAttack")))){
gotoAndPlay("neHit");
} else {
if ((((this.currentLabel == "swWalk")) || ((this.currentLabel == "swAttack")))){
gotoAndPlay("swHit");
} else {
if ((((this.currentLabel == "seWalk")) || ((this.currentLabel == "seAttack")))){
gotoAndPlay("seHit");
};
};
};
};
achiev.incKilledMuts();
MovieClip(root).thingsKilled++;
MovieClip(root)._money = (MovieClip(root)._money + 35);
achiev.updateMoney(35);
if (!weaponDrop){
MovieClip(root).dropItem(this);
};
if (weaponDrop){
MovieClip(root).dropShotgun(this);
};
_local1 = new Timer(2000, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local1.start();
aiMgr.removeAI(this);
};
}
private function fade(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
private function timerComplete(_arg1:TimerEvent){
counter = false;
bulletHit = false;
}
function frame48(){
gotoAndPlay("swWalk");
}
function frame78(){
this.isAttacking = false;
}
function frame32(){
gotoAndPlay("neWalk");
}
function frame120(){
gotoAndPlay("seWalk");
}
private function killMob(_arg1:TimerEvent){
removeMe();
}
public function stun(_arg1:int){
var _local2:Timer;
stunned = true;
_local2 = new Timer(1000, _arg1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, unstun);
_local2.start();
}
private function unstun(_arg1:TimerEvent){
stunned = false;
}
public function hit(_arg1:uint){
health = (health - _arg1);
}
function frame131(){
stop();
}
function frame142(){
stop();
}
private function traceHero(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - this.x);
_local2 = (MovieClip(parent)._hero.y - this.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
public static function updatePos(_arg1:Mutant){
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Object;
var _local8:int;
var _local9:*;
var _local10:int;
if (_arg1.ifc.Pause){
_arg1.lastTime = 0;
_arg1.stop();
return;
};
if (_arg1.alpha < 1){
_arg1.alpha = (_arg1.alpha + 0.05);
return;
};
if (_arg1.lastTime == 0){
_arg1.lastTime = getTimer();
};
_arg1.checkHealth();
_local2 = (getTimer() - _arg1.lastTime);
_arg1.lastTime = (_arg1.lastTime + _local2);
_local3 = _arg1.traceHero();
_arg1.dx = (_arg1.speed * Math.cos((((2 * Math.PI) * _local3) / 360)));
_arg1.dy = (_arg1.speed * Math.sin((((2 * Math.PI) * _local3) / 360)));
if ((((((_local2 < 1)) || ((_arg1.health <= 0)))) || (_arg1.stunned))){
return;
};
if ((((((((_arg1.currentLabel == "neAttack")) || ((_arg1.currentLabel == "nwAttack")))) || ((_arg1.currentLabel == "seAttack")))) || ((_arg1.currentLabel == "swAttack")))){
return;
};
if ((((((_local3 < 0)) && ((_local3 > -90)))) && (!((_arg1.currentLabel == "neWalk"))))){
_arg1.gotoAndPlay("neWalk");
} else {
if ((((((_local3 < -90)) && ((_local3 > -179)))) && (!((_arg1.currentLabel == "nwWalk"))))){
_arg1.gotoAndPlay("nwWalk");
} else {
if ((((((_local3 < 180)) && ((_local3 > 90)))) && (!((_arg1.currentLabel == "swWalk"))))){
_arg1.gotoAndPlay("swWalk");
} else {
if ((((((_local3 < 90)) && ((_local3 > 0)))) && (!((_arg1.currentLabel == "seWalk"))))){
_arg1.gotoAndPlay("seWalk");
};
};
};
};
_local4 = _arg1.inRange(MovieClip(_arg1.parent)._hero, _arg1);
if ((((((_arg1.currentLabel == "neWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "neAttack"))))){
_arg1.gotoAndPlay("neAttack");
} else {
if ((((((_arg1.currentLabel == "nwWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "nwAttack"))))){
_arg1.gotoAndPlay("nwAttack");
} else {
if ((((((_arg1.currentLabel == "swWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "swAttack"))))){
_arg1.gotoAndPlay("swAttack");
} else {
if ((((((_arg1.currentLabel == "seWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "seAttack"))))){
_arg1.gotoAndPlay("seAttack");
};
};
};
};
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
if (_arg1.bulletHit){
if (_arg1.currentLabel == "nwWalk"){
_arg1.gotoAndPlay("nwHit");
} else {
if (_arg1.currentLabel == "neWalk"){
_arg1.gotoAndPlay("neHit");
} else {
if (_arg1.currentLabel == "swWalk"){
_arg1.gotoAndPlay("swHit");
} else {
if (_arg1.currentLabel == "seWalk"){
_arg1.gotoAndPlay("seHit");
};
};
};
};
_arg1.dx = (_arg1.stren * Math.cos((((2 * Math.PI) * _arg1.degrees) / 360)));
_arg1.dy = (_arg1.stren * Math.sin((((2 * Math.PI) * _arg1.degrees) / 360)));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_arg1.launchTimer();
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && (((_arg1.x + _arg1.unitwidth) > _local7.leftside)))) && (((_arg1.x - _arg1.unitwidth) < _local7.rightside)))){
if ((((_arg1.y <= _local7.topside)) && ((_local5 > _local7.topside)))){
_local5 = _local7.topside;
break;
};
if ((((_arg1.y >= _local7.bottomside)) && ((_local5 < (_local7.bottomside + _arg1.unitheight))))){
_local5 = (_local7.bottomside + _arg1.unitheight);
break;
};
};
};
_local8++;
};
_local10 = 0;
while (_local10 < aiMgr.aiLength()) {
_local9 = aiMgr.getAIEnt(_local10);
if (_local9.health <= 0){
break;
};
if (_arg1.inRange(_arg1, _local9) < 30){
if (((((!((_local9 == null))) && (((_arg1.x + _arg1.unitwidth) > (_local9.x - _local9.unitwidth))))) && (((_arg1.x - _arg1.unitwidth) < (_local9.x + _local9.unitwidth))))){
if ((((_arg1.y <= (_local9.y - _local9.unitheight))) && ((_local5 > (_local9.y - _local9.unitheight))))){
_local5 = (_local9.y - _local9.unitheight);
break;
};
};
};
_local10++;
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && ((_local5 > _local7.topside)))) && (((_local5 - _arg1.unitheight) < _local7.bottomside)))){
if (((((_arg1.x - _arg1.unitwidth) >= _local7.rightside)) && (((_local6 - _arg1.unitwidth) <= _local7.rightside)))){
_local6 = (_local7.rightside + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= _local7.leftside)) && (((_local6 + _arg1.unitwidth) >= _local7.leftside)))){
_local6 = (_local7.leftside - _arg1.unitwidth);
break;
};
};
};
_local8++;
};
_local10 = 0;
while (_local10 < aiMgr.aiLength()) {
_local9 = aiMgr.getAIEnt(_local10);
if (_local9.health <= 0){
break;
};
if (_arg1.inRange(_arg1, _local9) < 30){
if (((((!((_local9 == null))) && ((_local5 > (_local9.y - _local9.unitheight))))) && (((_local5 - _arg1.unitheight) < _local9.y)))){
if (((((_arg1.x - _arg1.unitwidth) >= (_local9.x + _local9.unitwidth))) && (((_local6 - _arg1.unitwidth) <= (_local9.x + _local9.unitwidth))))){
_local6 = ((_local9.x + _local9.unitwidth) + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= (_local9.x - _local9.unitwidth))) && (((_local6 + _arg1.unitwidth) >= (_local9.x - _local9.unitwidth))))){
_local6 = ((_local9.x - _local9.unitwidth) - _arg1.unitwidth);
break;
};
};
};
_local10++;
};
_arg1.x = _local6;
_arg1.y = _local5;
}
}
}//package
Section 65
//Node (Node)
package {
import flash.display.*;
public dynamic class Node extends MovieClip {
}
}//package
Section 66
//Orb (Orb)
package {
import flash.display.*;
import flash.events.*;
public class Orb extends Ammo {
private var speed:Number;// = 15
private var dx:Number;
private var dy:Number;
private var degree:Number;
private var ifc:IFC;
public function Orb(_arg1, _arg2:Number, _arg3:Number){
ifc = new IFC();
speed = 15;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
this.rotation = _arg3;
AmmoType("orb");
gotoAndPlay("orb");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
addEventListener(Event.ENTER_FRAME, moveBullets);
}
public function removeMe(){
MovieClip(root).removeBullet(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBullets);
delete ??getglobalscope
[this];
}
public function getRot(){
return (degree);
}
private function moveBullets(_arg1:Event){
if (ifc.Pause){
return;
};
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 10)) || ((this.x > 1240)))){
removeMe();
} else {
if ((((this.y < 10)) || ((this.y > 990)))){
removeMe();
};
};
}
}
}//package
Section 67
//Player (Player)
package {
import flash.display.*;
public dynamic class Player extends MovieClip {
public var gunNode:Node;
public var pickup:Node;
public function Player(){
addFrameScript(17, frame18, 35, frame36, 53, frame54, 71, frame72, 89, frame90, 107, frame108, 125, frame126, 143, frame144, 154, frame155, 165, frame166, 176, frame177, 187, frame188, 205, frame206, 223, frame224, 241, frame242, 259, frame260, 277, frame278, 295, frame296, 313, frame314, 331, frame332, 349, frame350, 367, frame368, 385, frame386, 403, frame404, 421, frame422, 439, frame440, 457, frame458, 475, frame476, 493, frame494, 511, frame512, 529, frame530, 547, frame548, 565, frame566, 583, frame584, 601, frame602, 619, frame620);
}
function frame155(){
stop();
}
function frame144(){
gotoAndPlay("seWalk");
}
function frame72(){
gotoAndPlay("nwWalk");
}
function frame314(){
gotoAndPlay("eWalkShot");
}
function frame278(){
gotoAndPlay("nWalkShot");
}
function frame548(){
gotoAndPlay("nwWalkGatling");
}
function frame440(){
gotoAndPlay("neWalkCross");
}
function frame166(){
stop();
}
function frame206(){
gotoAndPlay("sWalkShot");
}
function frame386(){
gotoAndPlay("wWalkCross");
}
function frame602(){
gotoAndPlay("eWalkGatling");
}
function frame90(){
gotoAndPlay("nWalk");
}
function frame332(){
gotoAndPlay("seWalkShot");
}
function frame18(){
gotoAndPlay("sWalk");
}
function frame177(){
stop();
}
function frame188(){
stop();
}
function frame224(){
gotoAndPlay("swWalkShot");
}
function frame458(){
gotoAndPlay("eWalkCross");
}
function frame108(){
gotoAndPlay("neWalk");
}
function frame620(){
gotoAndPlay("seWalkGatling");
}
function frame36(){
gotoAndPlay("swWalk");
}
function frame584(){
gotoAndPlay("neWalkGatling");
}
function frame476(){
gotoAndPlay("seWalkCross");
}
function frame512(){
gotoAndPlay("swWalkGatling");
}
function frame350(){
gotoAndPlay("sWalkCross");
}
function frame126(){
gotoAndPlay("eWalk");
}
function frame566(){
gotoAndPlay("nWalkGatling");
}
function frame368(){
gotoAndPlay("swWalkCross");
}
function frame296(){
gotoAndPlay("neWalkShot");
}
function frame404(){
gotoAndPlay("nwWalkCross");
}
function frame242(){
gotoAndPlay("wWalkShot");
}
function frame494(){
gotoAndPlay("sWalkGatling");
}
function frame530(){
gotoAndPlay("wWalkGatling");
}
function frame54(){
gotoAndPlay("wWalk");
}
function frame260(){
gotoAndPlay("nwWalkShot");
}
function frame422(){
gotoAndPlay("nWalkCross");
}
}
}//package
Section 68
//RMutant (RMutant)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class RMutant extends MovieClip {
private var gang:Array;
public var health:int;// = 4
private var speed:Number;
private var stars:$dazed;
public var armNode:Node;
private var lastTime:int;
public var isAttacking:Boolean;// = false
private var dx:Number;// = 1
private var dy:Number;// = 1
private var stren:uint;
private var achiev:Achievments;
private var stunned:Boolean;// = false
public var unitwidth:Number;
public var aiMgr:AIManager;
private var ifc:IFC;
private var fixedObjects:Array;
private var timerID:uint;
private var canthrow:Boolean;// = false
private var weaponDrop:Boolean;
private var degrees:Number;
private var bulletHit:Boolean;
public var Type:Class;
public var unitheight:Number;
private var counter:Boolean;// = false
public function RMutant(_arg1, _arg2:Number, _arg3:Array, _arg4:Boolean){
Type = RMutant;
ifc = new IFC();
dx = 1;
dy = 1;
health = 4;
fixedObjects = new Array();
gang = new Array();
stars = new $dazed();
achiev = new Achievments();
stunned = false;
counter = false;
isAttacking = false;
canthrow = false;
super();
addFrameScript(15, frame16, 31, frame32, 47, frame48, 63, frame64, 75, frame76, 77, frame78, 89, frame90, 91, frame92, 103, frame104, 105, frame106, 117, frame118, 119, frame120, 130, frame131, 141, frame142, 152, frame153, 163, frame164);
weaponDrop = _arg4;
this.x = _arg1;
this.y = _arg2;
this.alpha = 0;
unitwidth = (this.width / 2);
unitheight = (this.height / 3);
speed = randRange(20, 40);
armNode.visible = false;
fixedObjects = _arg3;
timerID = setInterval(mayThrow, 2000);
aiMgr = new AIManager();
}
function frame153(){
stop();
}
private function randRange(_arg1:uint, _arg2:uint){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
function frame164(){
stop();
}
function frame16(){
gotoAndPlay("nwWalk");
}
private function moveCharacter(_arg1:Event){
}
private function fade(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
function frame32(){
gotoAndPlay("neWalk");
}
private function mayThrow(){
canthrow = true;
}
function frame48(){
gotoAndPlay("swWalk");
}
public function stun(_arg1:int){
var _local2:Timer;
stunned = true;
_local2 = new Timer(1000, _arg1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, unstun);
_local2.start();
}
private function killMob(_arg1:TimerEvent){
removeMe();
}
private function unstun(_arg1:TimerEvent){
stunned = false;
}
private function traceHero(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - this.x);
_local2 = (MovieClip(parent)._hero.y - this.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
private function fadeMob(_arg1:TimerEvent){
}
function frame64(){
gotoAndPlay("seWalk");
}
public function updateList(_arg1:Array){
}
function frame76(){
throwArm();
}
function frame78(){
gotoAndPlay("nwWalk");
}
private function inRange(_arg1:Object, _arg2:Object){
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.abs((_arg1.x - _arg2.x));
_local4 = Math.abs((((_arg1.height / 2) + _arg1.y) - ((_arg2.height / 2) + _arg2.y)));
_local5 = (Math.sqrt(_local3) + Math.sqrt(_local4));
return (_local5);
}
public function pushBack(_arg1:Number, _arg2:uint){
bulletHit = true;
degrees = _arg1;
stren = _arg2;
}
public function removeMe(){
clearInterval(timerID);
parent.removeChild(this);
delete ??getglobalscope
[this];
}
function frame90(){
throwArm();
}
function frame92(){
gotoAndPlay("neWalk");
}
private function launchTimer(){
var _local1:Timer;
if (counter){
return;
};
counter = true;
_local1 = new Timer(stren, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local1.start();
}
function frame106(){
gotoAndPlay("swWalk");
}
function frame104(){
throwArm();
}
private function checkHealth(){
var _local1:Timer;
if (health <= 0){
isAttacking = false;
removeEventListener(Event.ENTER_FRAME, moveCharacter);
if ((((this.currentLabel == "nwWalk")) || ((this.currentLabel == "nwAttack")))){
gotoAndPlay("nwHit");
} else {
if ((((this.currentLabel == "neWalk")) || ((this.currentLabel == "neAttack")))){
gotoAndPlay("neHit");
} else {
if ((((this.currentLabel == "swWalk")) || ((this.currentLabel == "swAttack")))){
gotoAndPlay("swHit");
} else {
if ((((this.currentLabel == "seWalk")) || ((this.currentLabel == "seAttack")))){
gotoAndPlay("seHit");
};
};
};
};
achiev.incKilledMuts();
MovieClip(root).thingsKilled++;
MovieClip(root)._money = (MovieClip(root)._money + 35);
aiMgr.removeAI(this);
achiev.updateMoney(35);
MovieClip(root).dropItem(this);
_local1 = new Timer(2000, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local1.start();
};
}
function frame118(){
throwArm();
}
public function hit(_arg1:uint){
health = (health - _arg1);
}
private function throwArm(){
var _local1:Arm;
if (canthrow){
_local1 = new Arm((this.x + armNode.x), (this.y + armNode.y), traceHero());
MovieClip(root).bullets.push(_local1);
MovieClip(root).dasBar.addChildAt(_local1, (MovieClip(root).dasBar.numChildren - 1));
canthrow = false;
};
}
private function timerComplete(_arg1:TimerEvent){
counter = false;
bulletHit = false;
}
function frame120(){
gotoAndPlay("seWalk");
}
function frame131(){
stop();
}
function frame142(){
stop();
}
public static function updatePos(_arg1:RMutant){
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Object;
var _local8:int;
var _local9:*;
var _local10:int;
if (_arg1.ifc.Pause){
_arg1.lastTime = 0;
_arg1.stop();
return;
};
if (_arg1.alpha < 1){
_arg1.alpha = (_arg1.alpha + 0.05);
return;
};
if (_arg1.lastTime == 0){
_arg1.lastTime = getTimer();
};
_arg1.checkHealth();
_local2 = (getTimer() - _arg1.lastTime);
_arg1.lastTime = (_arg1.lastTime + _local2);
_local3 = _arg1.traceHero();
_arg1.dx = (_arg1.speed * Math.cos((((2 * Math.PI) * _local3) / 360)));
_arg1.dy = (_arg1.speed * Math.sin((((2 * Math.PI) * _local3) / 360)));
if ((((((_local2 < 1)) || ((_arg1.health <= 0)))) || (_arg1.stunned))){
return;
};
if ((((((((_arg1.currentLabel == "neAttack")) || ((_arg1.currentLabel == "nwAttack")))) || ((_arg1.currentLabel == "seAttack")))) || ((_arg1.currentLabel == "swAttack")))){
return;
};
if ((((((_local3 < 0)) && ((_local3 > -90)))) && (!((_arg1.currentLabel == "neWalk"))))){
_arg1.gotoAndPlay("neWalk");
} else {
if ((((((_local3 < -90)) && ((_local3 > -179)))) && (!((_arg1.currentLabel == "nwWalk"))))){
_arg1.gotoAndPlay("nwWalk");
} else {
if ((((((_local3 < 180)) && ((_local3 > 90)))) && (!((_arg1.currentLabel == "swWalk"))))){
_arg1.gotoAndPlay("swWalk");
} else {
if ((((((_local3 < 90)) && ((_local3 > 0)))) && (!((_arg1.currentLabel == "seWalk"))))){
_arg1.gotoAndPlay("seWalk");
};
};
};
};
_local4 = _arg1.inRange(MovieClip(_arg1.parent)._hero, _arg1);
if ((((((((_arg1.currentLabel == "neWalk")) && ((_local4 <= 20)))) && (!((_arg1.currentLabel == "neAttack"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("neAttack");
} else {
if ((((((((_arg1.currentLabel == "nwWalk")) && ((_local4 <= 20)))) && (!((_arg1.currentLabel == "nwAttack"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("nwAttack");
} else {
if ((((((((_arg1.currentLabel == "swWalk")) && ((_local4 <= 20)))) && (!((_arg1.currentLabel == "swAttack"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("swAttack");
} else {
if ((((((((_arg1.currentLabel == "seWalk")) && ((_local4 <= 20)))) && (!((_arg1.currentLabel == "seAttack"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("seAttack");
};
};
};
};
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
if (_arg1.bulletHit){
if (_arg1.currentLabel == "nwWalk"){
_arg1.gotoAndPlay("nwHit");
} else {
if (_arg1.currentLabel == "neWalk"){
_arg1.gotoAndPlay("neHit");
} else {
if (_arg1.currentLabel == "swWalk"){
_arg1.gotoAndPlay("swHit");
} else {
if (_arg1.currentLabel == "seWalk"){
_arg1.gotoAndPlay("seHit");
};
};
};
};
_arg1.dx = (_arg1.stren * Math.cos((((2 * Math.PI) * _arg1.degrees) / 360)));
_arg1.dy = (_arg1.stren * Math.sin((((2 * Math.PI) * _arg1.degrees) / 360)));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_arg1.launchTimer();
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && (((_arg1.x + _arg1.unitwidth) > _local7.leftside)))) && (((_arg1.x - _arg1.unitwidth) < _local7.rightside)))){
if ((((_arg1.y <= _local7.topside)) && ((_local5 > _local7.topside)))){
_local5 = _local7.topside;
break;
};
if ((((_arg1.y >= _local7.bottomside)) && ((_local5 < (_local7.bottomside + _arg1.unitheight))))){
_local5 = (_local7.bottomside + _arg1.unitheight);
break;
};
};
};
_local8++;
};
_local10 = 0;
while (_local10 < _arg1.aiMgr.aiLength()) {
_local9 = _arg1.aiMgr.getAIEnt(_local10);
if (_local9.health <= 0){
break;
};
if (_arg1.inRange(_arg1, _local9) < 30){
if (((((!((_local9 == null))) && (((_arg1.x + _arg1.unitwidth) > (_local9.x - _local9.unitwidth))))) && (((_arg1.x - _arg1.unitwidth) < (_local9.x + _local9.unitwidth))))){
if ((((_arg1.y <= (_local9.y - _local9.unitheight))) && ((_local5 > (_local9.y - _local9.unitheight))))){
_local5 = (_local9.y - _local9.unitheight);
break;
};
};
};
_local10++;
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && ((_local5 > _local7.topside)))) && (((_local5 - _arg1.unitheight) < _local7.bottomside)))){
if (((((_arg1.x - _arg1.unitwidth) >= _local7.rightside)) && (((_local6 - _arg1.unitwidth) <= _local7.rightside)))){
_local6 = (_local7.rightside + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= _local7.leftside)) && (((_local6 + _arg1.unitwidth) >= _local7.leftside)))){
_local6 = (_local7.leftside - _arg1.unitwidth);
break;
};
};
};
_local8++;
};
_local10 = 0;
while (_local10 < _arg1.aiMgr.aiLength()) {
_local9 = _arg1.aiMgr.getAIEnt(_local10);
if (_local9.health <= 0){
break;
};
if (_arg1.inRange(_arg1, _local9) < 30){
if (((((!((_local9 == null))) && ((_local5 > (_local9.y - _local9.unitheight))))) && (((_local5 - _arg1.unitheight) < _local9.y)))){
if (((((_arg1.x - _arg1.unitwidth) >= (_local9.x + _local9.unitwidth))) && (((_local6 - _arg1.unitwidth) <= (_local9.x + _local9.unitwidth))))){
_local6 = ((_local9.x + _local9.unitwidth) + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= (_local9.x - _local9.unitwidth))) && (((_local6 + _arg1.unitwidth) >= (_local9.x - _local9.unitwidth))))){
_local6 = ((_local9.x - _local9.unitwidth) - _arg1.unitwidth);
break;
};
};
};
_local10++;
};
_arg1.x = _local6;
_arg1.y = _local5;
}
}
}//package
Section 69
//Round (Round)
package {
import flash.display.*;
import flash.events.*;
public class Round extends Ammo {
private var speed:Number;// = 30
private var dx:Number;
private var dy:Number;
private var degree:Number;
private var ifc:IFC;
public function Round(_arg1, _arg2:Number, _arg3:Number){
ifc = new IFC();
speed = 30;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
this.rotation = _arg3;
AmmoType("round");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
addEventListener(Event.ENTER_FRAME, moveBullets);
}
public function removeMe(){
MovieClip(root).removeRound(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBullets);
delete ??getglobalscope
[this];
}
public function getRot(){
return (degree);
}
private function moveBullets(_arg1:Event){
if (ifc.Pause){
return;
};
this.x = (this.x + dx);
this.y = (this.y + dy);
if ((((this.x < 10)) || ((this.x > 1240)))){
removeMe();
} else {
if ((((this.y < 10)) || ((this.y > 990)))){
removeMe();
};
};
}
}
}//package
Section 70
//sfx_Achievment (sfx_Achievment)
package {
import flash.media.*;
public dynamic class sfx_Achievment extends Sound {
}
}//package
Section 71
//sfx_Arrow (sfx_Arrow)
package {
import flash.media.*;
public dynamic class sfx_Arrow extends Sound {
}
}//package
Section 72
//sfx_Chime (sfx_Chime)
package {
import flash.media.*;
public dynamic class sfx_Chime extends Sound {
}
}//package
Section 73
//sfx_crossbowTwang (sfx_crossbowTwang)
package {
import flash.media.*;
public dynamic class sfx_crossbowTwang extends Sound {
}
}//package
Section 74
//sfx_GameOver (sfx_GameOver)
package {
import flash.media.*;
public dynamic class sfx_GameOver extends Sound {
}
}//package
Section 75
//sfx_Hit1 (sfx_Hit1)
package {
import flash.media.*;
public dynamic class sfx_Hit1 extends Sound {
}
}//package
Section 76
//sfx_Hit2 (sfx_Hit2)
package {
import flash.media.*;
public dynamic class sfx_Hit2 extends Sound {
}
}//package
Section 77
//sfx_pHit (sfx_pHit)
package {
import flash.media.*;
public dynamic class sfx_pHit extends Sound {
}
}//package
Section 78
//sfx_PickUp (sfx_PickUp)
package {
import flash.media.*;
public dynamic class sfx_PickUp extends Sound {
}
}//package
Section 79
//sfx_PistolClick (sfx_PistolClick)
package {
import flash.media.*;
public dynamic class sfx_PistolClick extends Sound {
}
}//package
Section 80
//sfx_PistolShot (sfx_PistolShot)
package {
import flash.media.*;
public dynamic class sfx_PistolShot extends Sound {
}
}//package
Section 81
//sfx_Pulse (sfx_Pulse)
package {
import flash.media.*;
public dynamic class sfx_Pulse extends Sound {
}
}//package
Section 82
//sfx_ShotgunShot (sfx_ShotgunShot)
package {
import flash.media.*;
public dynamic class sfx_ShotgunShot extends Sound {
}
}//package
Section 83
//Shell (Shell)
package {
import flash.display.*;
import flash.events.*;
public class Shell extends Ammo {
private var life:uint;// = 0
private var speed:Number;// = 30
private var maxLife:uint;// = 4
private var dx:Number;
private var dy:Number;
private var degree:Number;
public function Shell(_arg1, _arg2:Number, _arg3:Number){
life = 0;
maxLife = 4;
speed = 30;
super();
degree = _arg3;
this.x = (_arg1 + Math.cos((((2 * Math.PI) * _arg3) / 360)));
this.y = (_arg2 + Math.sin((((2 * Math.PI) * _arg3) / 360)));
this.rotation = _arg3;
AmmoType("shell");
dx = (speed * Math.cos((((2 * Math.PI) * _arg3) / 360)));
dy = (speed * Math.sin((((2 * Math.PI) * _arg3) / 360)));
addEventListener(Event.ENTER_FRAME, moveBullets);
}
public function removeMe(){
MovieClip(root).removeShell(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBullets);
delete ??getglobalscope
[this];
}
public function getRot(){
return (degree);
}
private function moveBullets(_arg1:Event){
this.x = (this.x + dx);
this.y = (this.y + dy);
if (life == maxLife){
removeMe();
};
life++;
}
}
}//package
Section 84
//Smash (Smash)
package {
import flash.media.*;
public dynamic class Smash extends Sound {
}
}//package
Section 85
//Table (Table)
package {
import flash.display.*;
public dynamic class Table extends MovieClip {
}
}//package
Section 86
//UI_Achievment (UI_Achievment)
package {
import flash.display.*;
public dynamic class UI_Achievment extends MovieClip {
}
}//package
Section 87
//Werewolf (Werewolf)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Werewolf extends MovieClip {
private var gang:Array;
public var health:int;// = 20
private var speed:Number;
private var stars:$dazed;
private var lastTime:int;
public var isAttacking;// = false
private var dx:Number;// = 1
private var dy:Number;// = 1
private var stren:uint;
private var achiev:Achievments;
private var stunned:Boolean;// = false
public var unitwidth:Number;
private var aiMgr:AIManager;
private var ifc:IFC;
private var fixedObjects:Array;
private var weaponDrop:Boolean;
private var degrees:Number;
private var bulletHit:Boolean;
public var Type:Class;
public var unitheight:Number;
private var counter:Boolean;// = false
public function Werewolf(_arg1, _arg2:Number, _arg3:Array, _arg4:Boolean){
Type = Werewolf;
ifc = new IFC();
dx = 1;
dy = 1;
health = 20;
fixedObjects = new Array();
gang = new Array();
stars = new $dazed();
achiev = new Achievments();
stunned = false;
counter = false;
isAttacking = false;
super();
addFrameScript(19, frame20, 39, frame40, 59, frame60, 79, frame80, 80, frame81, 85, frame86, 87, frame88, 89, frame90, 95, frame96, 97, frame98, 99, frame100, 105, frame106, 107, frame108, 109, frame110, 115, frame116, 117, frame118, 119, frame120, 130, frame131, 141, frame142, 152, frame153, 163, frame164);
weaponDrop = _arg4;
this.x = _arg1;
this.y = _arg2;
this.alpha = 0;
speed = randRange(50, 70);
fixedObjects = _arg3;
unitwidth = (this.width / 2);
unitheight = (this.height / 3);
aiMgr = new AIManager();
}
function frame153(){
stop();
}
private function randRange(_arg1:uint, _arg2:uint){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
function frame164(){
stop();
}
private function moveCharacter(_arg1:Event){
}
function frame20(){
gotoAndPlay("swWalk");
}
private function fade(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
function frame40(){
gotoAndPlay("seWalk");
}
public function stun(_arg1:int){
var _local2:Timer;
stunned = true;
_local2 = new Timer(1000, _arg1);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, unstun);
_local2.start();
}
private function killMob(_arg1:TimerEvent){
removeMe();
}
private function unstun(_arg1:TimerEvent){
stunned = false;
}
private function traceHero(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - this.x);
_local2 = (MovieClip(parent)._hero.y - this.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
private function fadeMob(_arg1:TimerEvent){
var _local2:Timer;
_local2 = new Timer(100, 10);
_local2.addEventListener(TimerEvent.TIMER, fade);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local2.start();
}
function frame60(){
gotoAndPlay("nwWalk");
}
public function updateList(_arg1:Array){
}
function frame80(){
gotoAndPlay("neWalk");
}
function frame81(){
this.isAttacking = false;
}
private function inRange(_arg1:Object, _arg2:Object){
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.abs((_arg1.x - _arg2.x));
_local4 = Math.abs((((_arg1.height / 2) + _arg1.y) - ((_arg2.height / 2) + _arg2.y)));
_local5 = (Math.sqrt(_local3) + Math.sqrt(_local4));
return (_local5);
}
function frame86(){
this.isAttacking = true;
}
public function pushBack(_arg1:Number, _arg2:uint){
bulletHit = true;
degrees = _arg1;
stren = _arg2;
}
public function removeMe(){
parent.removeChild(this);
delete ??getglobalscope
[this];
}
function frame90(){
gotoAndPlay("nwWalk");
}
function frame88(){
this.isAttacking = false;
}
function frame98(){
this.isAttacking = false;
}
private function launchTimer(){
var _local1:Timer;
if (counter){
return;
};
counter = true;
_local1 = new Timer(stren, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local1.start();
}
function frame96(){
this.isAttacking = true;
}
function frame100(){
gotoAndPlay("neWalk");
}
function frame106(){
this.isAttacking = true;
}
function frame108(){
this.isAttacking = false;
}
function frame110(){
gotoAndPlay("swWalk");
}
function frame116(){
this.isAttacking = true;
}
function frame118(){
this.isAttacking = false;
}
public function hit(_arg1:uint){
health = (health - _arg1);
}
private function checkHealth(){
var _local1:Timer;
if (health <= 0){
isAttacking = false;
removeEventListener(Event.ENTER_FRAME, moveCharacter);
if ((((this.currentLabel == "nwWalk")) || ((this.currentLabel == "nwAttack")))){
gotoAndPlay("nwHit");
} else {
if ((((this.currentLabel == "neWalk")) || ((this.currentLabel == "neAttack")))){
gotoAndPlay("neHit");
} else {
if ((((this.currentLabel == "swWalk")) || ((this.currentLabel == "swAttack")))){
gotoAndPlay("swHit");
} else {
if ((((this.currentLabel == "seWalk")) || ((this.currentLabel == "seAttack")))){
gotoAndPlay("seHit");
};
};
};
};
achiev.incKilledWolves();
MovieClip(root).thingsKilled++;
MovieClip(root)._money = (MovieClip(root)._money + 750);
achiev.updateMoney(750);
if (!weaponDrop){
MovieClip(root).dropItem(this);
};
if (weaponDrop){
MovieClip(root).dropCrossbow(this);
};
aiMgr.removeAI(this);
_local1 = new Timer(2000, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local1.start();
};
}
private function timerComplete(_arg1:TimerEvent){
counter = false;
bulletHit = false;
}
function frame120(){
gotoAndPlay("seWalk");
}
function frame131(){
stop();
}
function frame142(){
stop();
}
public static function updatePos(_arg1:Werewolf){
var _local2:int;
var _local3:*;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:Object;
var _local8:int;
var _local9:*;
var _local10:int;
if (_arg1.ifc.Pause){
_arg1.lastTime = 0;
_arg1.stop();
return;
};
if (_arg1.alpha < 1){
_arg1.alpha = (_arg1.alpha + 0.05);
return;
};
if (_arg1.lastTime == 0){
_arg1.lastTime = getTimer();
};
_arg1.checkHealth();
_local2 = (getTimer() - _arg1.lastTime);
_arg1.lastTime = (_arg1.lastTime + _local2);
_local3 = _arg1.traceHero();
_arg1.dx = (_arg1.speed * Math.cos((((2 * Math.PI) * _local3) / 360)));
_arg1.dy = (_arg1.speed * Math.sin((((2 * Math.PI) * _local3) / 360)));
if ((((((_local2 < 1)) || ((_arg1.health <= 0)))) || (_arg1.stunned))){
return;
};
if ((((((((_arg1.currentLabel == "neAttack")) || ((_arg1.currentLabel == "nwAttack")))) || ((_arg1.currentLabel == "seAttack")))) || ((_arg1.currentLabel == "swAttack")))){
return;
};
if ((((((_local3 < 0)) && ((_local3 > -90)))) && (!((_arg1.currentLabel == "neWalk"))))){
_arg1.gotoAndPlay("neWalk");
} else {
if ((((((_local3 < -90)) && ((_local3 > -179)))) && (!((_arg1.currentLabel == "nwWalk"))))){
_arg1.gotoAndPlay("nwWalk");
} else {
if ((((((_local3 < 180)) && ((_local3 > 90)))) && (!((_arg1.currentLabel == "swWalk"))))){
_arg1.gotoAndPlay("swWalk");
} else {
if ((((((_local3 < 90)) && ((_arg1.traceHero() > 0)))) && (!((_arg1.currentLabel == "seWalk"))))){
_arg1.gotoAndPlay("seWalk");
};
};
};
};
_local4 = _arg1.inRange(MovieClip(_arg1.parent)._hero, _arg1);
if ((((((_arg1.currentLabel == "neWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "neAttack"))))){
_arg1.gotoAndPlay("neAttack");
} else {
if ((((((_arg1.currentLabel == "nwWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "nwAttack"))))){
_arg1.gotoAndPlay("nwAttack");
} else {
if ((((((_arg1.currentLabel == "swWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "swAttack"))))){
_arg1.gotoAndPlay("swAttack");
} else {
if ((((((_arg1.currentLabel == "seWalk")) && ((_local4 <= 10)))) && (!((_arg1.currentLabel == "seAttack"))))){
_arg1.gotoAndPlay("seAttack");
};
};
};
};
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
if (_arg1.bulletHit){
if (_arg1.currentLabel == "nwWalk"){
_arg1.gotoAndPlay("nwHit");
} else {
if (_arg1.currentLabel == "neWalk"){
_arg1.gotoAndPlay("neHit");
} else {
if (_arg1.currentLabel == "swWalk"){
_arg1.gotoAndPlay("swHit");
} else {
if (_arg1.currentLabel == "seWalk"){
_arg1.gotoAndPlay("seHit");
};
};
};
};
_arg1.dx = (_arg1.stren * Math.cos((((2 * Math.PI) * _arg1.degrees) / 360)));
_arg1.dy = (_arg1.stren * Math.sin((((2 * Math.PI) * _arg1.degrees) / 360)));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_arg1.launchTimer();
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && (((_arg1.x + _arg1.unitwidth) > _local7.leftside)))) && (((_arg1.x - _arg1.unitwidth) < _local7.rightside)))){
if ((((_arg1.y <= _local7.topside)) && ((_local5 > _local7.topside)))){
_local5 = _local7.topside;
break;
};
if ((((_arg1.y >= _local7.bottomside)) && ((_local5 < (_local7.bottomside + _arg1.unitheight))))){
_local5 = (_local7.bottomside + _arg1.unitheight);
break;
};
};
};
_local8++;
};
_local10 = 0;
while (_local10 < _arg1.aiMgr.aiLength()) {
_local9 = _arg1.aiMgr.getAIEnt(_local10);
if (_local9.health <= 0){
break;
};
if (_arg1.inRange(_arg1, _local9) < 30){
if (((((!((_local9 == null))) && (((_arg1.x + _arg1.unitwidth) > (_local9.x - _local9.unitwidth))))) && (((_arg1.x - _arg1.unitwidth) < (_local9.x + _local9.unitwidth))))){
if ((((_arg1.y <= (_local9.y - _local9.unitheight))) && ((_local5 > (_local9.y - _local9.unitheight))))){
_local5 = (_local9.y - _local9.unitheight);
break;
};
};
};
_local10++;
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && ((_local5 > _local7.topside)))) && (((_local5 - _arg1.unitheight) < _local7.bottomside)))){
if (((((_arg1.x - _arg1.unitwidth) >= _local7.rightside)) && (((_local6 - _arg1.unitwidth) <= _local7.rightside)))){
_local6 = (_local7.rightside + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= _local7.leftside)) && (((_local6 + _arg1.unitwidth) >= _local7.leftside)))){
_local6 = (_local7.leftside - _arg1.unitwidth);
break;
};
};
};
_local8++;
};
_local10 = 0;
while (_local10 < _arg1.aiMgr.aiLength()) {
_local9 = _arg1.aiMgr.getAIEnt(_local10);
if (_local9.health <= 0){
break;
};
if (_arg1.inRange(_arg1, _local9) < 30){
if (((((!((_local9 == null))) && ((_local5 > (_local9.y - _local9.unitheight))))) && (((_local5 - _arg1.unitheight) < _local9.y)))){
if (((((_arg1.x - _arg1.unitwidth) >= (_local9.x + _local9.unitwidth))) && (((_local6 - _arg1.unitwidth) <= (_local9.x + _local9.unitwidth))))){
_local6 = ((_local9.x + _local9.unitwidth) + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= (_local9.x - _local9.unitwidth))) && (((_local6 + _arg1.unitwidth) >= (_local9.x - _local9.unitwidth))))){
_local6 = ((_local9.x - _local9.unitwidth) - _arg1.unitwidth);
break;
};
};
};
_local10++;
};
_arg1.x = _local6;
_arg1.y = _local5;
}
}
}//package
Section 88
//Witch (Witch)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Witch extends MovieClip {
public var health:int;// = 40
private var speed:uint;// = 50
private var lastTime:int;
public var isAttacking;// = false
private var achiev:Achievments;
private var dy:Number;// = 1
private var stren:uint;
private var dx:Number;// = 1
private var stunned:Boolean;// = false
public var unitwidth:Number;// = 5
private var aiMgr:AIManager;
private var ifc:IFC;
private var fixedObjects:Array;
private var canthrow:Boolean;// = false
private var weaponDrop:Boolean;
private var degrees:Number;
private var timerID:uint;
public var bulletHit:Boolean;// = false
public var Type:Class;
public var orbNode:Node;
public var unitheight:Number;// = 5
private var counter:Boolean;// = false
public function Witch(_arg1:int, _arg2:int, _arg3:Array, _arg4:Boolean){
Type = Witch;
achiev = new Achievments();
dx = 1;
dy = 1;
speed = 50;
health = 40;
ifc = new IFC();
isAttacking = false;
canthrow = false;
unitwidth = 5;
unitheight = 5;
stunned = false;
counter = false;
bulletHit = false;
super();
addFrameScript(16, frame17, 33, frame34, 50, frame51, 67, frame68, 68, frame69, 88, frame89, 104, frame105, 105, frame106, 125, frame126, 141, frame142, 142, frame143, 162, frame163, 178, frame179, 179, frame180, 199, frame200, 215, frame216, 233, frame234, 240, frame241, 258, frame259, 265, frame266, 283, frame284, 290, frame291, 308, frame309, 315, frame316, 347, frame348, 379, frame380, 412, frame413, 445, frame446);
weaponDrop = _arg4;
this.x = _arg1;
this.y = _arg2;
orbNode.visible = false;
this.alpha = 0;
fixedObjects = _arg3;
timerID = setInterval(mayThrow, 4000);
aiMgr = new AIManager();
unitwidth = (this.width / 2);
unitheight = (this.height / 3);
}
private function randRange(_arg1:uint, _arg2:uint){
var _local3:Number;
_local3 = ((Math.random() * (_arg2 - _arg1)) + _arg1);
return (_local3);
}
function frame163(){
isAttacking = true;
}
function frame284(){
fireOrb();
}
function frame291(){
gotoAndPlay("neWalk");
}
function frame179(){
isAttacking = false;
gotoAndPlay("neWalk");
}
function frame17(){
gotoAndPlay("swWalk");
}
function frame180(){
isAttacking = false;
}
private function moveCharacter(_arg1:Event){
}
private function fade(_arg1:TimerEvent){
this.alpha = (this.alpha - 0.1);
}
private function mayThrow(){
canthrow = true;
}
function frame34(){
gotoAndPlay("seWalk");
}
private function fireOrb(){
var _local1:Orb;
if (canthrow){
_local1 = new Orb((this.x + orbNode.x), (this.y + orbNode.y), traceOffsets());
MovieClip(root).bullets.push(_local1);
MovieClip(root).dasBar.addChildAt(_local1, (MovieClip(root).dasBar.numChildren - 1));
canthrow = false;
};
}
private function killMob(_arg1:TimerEvent){
removeMe();
}
private function traceHero(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - this.x);
_local2 = (MovieClip(parent)._hero.y - this.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
function frame51(){
gotoAndPlay("neWalk");
}
private function fadeMob(_arg1:TimerEvent){
var _local2:Timer;
_local2 = new Timer(100, 10);
_local2.addEventListener(TimerEvent.TIMER, fade);
_local2.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local2.start();
}
function frame68(){
gotoAndPlay("nwWalk");
}
function frame69(){
isAttacking = false;
}
function frame309(){
fireOrb();
}
function frame316(){
gotoAndPlay("nwWalk");
}
public function updateList(_arg1:Array){
}
function frame446(){
stop();
}
function frame200(){
isAttacking = true;
}
public function pushBack(_arg1:Number, _arg2:uint){
bulletHit = true;
degrees = _arg1;
stren = _arg2;
}
function frame89(){
isAttacking = true;
}
private function inRange(_arg1:Object, _arg2:Object){
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = Math.abs((_arg1.x - _arg2.x));
_local4 = Math.abs((_arg1.y - _arg2.y));
_local5 = (Math.sqrt(_local3) + Math.sqrt(_local4));
return (_local5);
}
public function removeMe(){
clearInterval(timerID);
parent.removeChild(this);
delete ??getglobalscope
[this];
}
private function traceOffsets(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
if (health <= 0){
return (0);
};
_local1 = (MovieClip(parent)._hero.x - (this.x + orbNode.x));
_local2 = (MovieClip(parent)._hero.y - (this.y + orbNode.y));
_local3 = Math.atan2(_local2, _local1);
_local4 = (360 * (_local3 / (2 * Math.PI)));
return (_local4);
}
function frame413(){
stop();
}
private function launchTimer(){
var _local1:Timer;
if (counter){
return;
};
counter = true;
_local1 = new Timer(stren, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
_local1.start();
}
function frame216(){
isAttacking = false;
gotoAndPlay("nwWalk");
}
function frame105(){
isAttacking = false;
gotoAndPlay("swWalk");
}
function frame106(){
isAttacking = false;
}
function frame348(){
stop();
}
private function checkHealth(){
var _local1:Timer;
if (health <= 0){
isAttacking = false;
removeEventListener(Event.ENTER_FRAME, moveCharacter);
if ((((((this.currentLabel == "nwWalk")) || ((this.currentLabel == "nwAttack")))) || ((this.currentLabel == "nwRanged")))){
gotoAndPlay("nwHit");
} else {
if ((((((this.currentLabel == "neWalk")) || ((this.currentLabel == "neAttack")))) || ((this.currentLabel == "nwRanged")))){
gotoAndPlay("neHit");
} else {
if ((((((this.currentLabel == "swWalk")) || ((this.currentLabel == "swAttack")))) || ((this.currentLabel == "nwRanged")))){
gotoAndPlay("swHit");
} else {
if ((((((this.currentLabel == "seWalk")) || ((this.currentLabel == "seAttack")))) || ((this.currentLabel == "nwRanged")))){
gotoAndPlay("seHit");
};
};
};
};
achiev.incKilledWitches();
MovieClip(root).thingsKilled++;
MovieClip(root)._money = (MovieClip(root)._money + 5000);
achiev.updateMoney(5000);
if (!weaponDrop){
MovieClip(root).dropItem(this);
};
if (weaponDrop){
MovieClip(root).dropGatling(this);
};
aiMgr.removeAI(this);
_local1 = new Timer(7000, 1);
_local1.addEventListener(TimerEvent.TIMER_COMPLETE, killMob);
_local1.start();
};
}
function frame234(){
fireOrb();
}
public function hit(_arg1:uint){
health = (health - _arg1);
}
private function timerComplete(_arg1:TimerEvent){
counter = false;
bulletHit = false;
}
function frame241(){
gotoAndPlay("swWalk");
}
function frame126(){
isAttacking = true;
}
function frame259(){
fireOrb();
}
function frame380(){
stop();
}
function frame142(){
isAttacking = false;
gotoAndPlay("seWalk");
}
function frame143(){
isAttacking = false;
}
function frame266(){
gotoAndPlay("seWalk");
}
public static function updatePos(_arg1:Witch){
var _local2:int;
var _local3:Number;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:Object;
var _local8:int;
if (_arg1.ifc.Pause){
_arg1.lastTime = 0;
_arg1.stop();
return;
};
if (_arg1.alpha < 1){
_arg1.alpha = (_arg1.alpha + 0.05);
return;
};
if (_arg1.lastTime == 0){
_arg1.lastTime = getTimer();
};
_arg1.checkHealth();
_local2 = (getTimer() - _arg1.lastTime);
_arg1.lastTime = (_arg1.lastTime + _local2);
_local3 = _arg1.traceHero();
_arg1.dx = (_arg1.speed * Math.cos((((2 * Math.PI) * _local3) / 360)));
_arg1.dy = (_arg1.speed * Math.sin((((2 * Math.PI) * _local3) / 360)));
if ((((_local2 < 1)) || ((_arg1.health <= 0)))){
return;
};
if ((((((((((((((((_arg1.currentLabel == "neAttack")) || ((_arg1.currentLabel == "nwAttack")))) || ((_arg1.currentLabel == "seAttack")))) || ((_arg1.currentLabel == "swAttack")))) || ((_arg1.currentLabel == "neRanged")))) || ((_arg1.currentLabel == "nwRanged")))) || ((_arg1.currentLabel == "seRanged")))) || ((_arg1.currentLabel == "swRanged")))){
return;
};
if ((((((_local3 < 0)) && ((_local3 > -90)))) && (!((_arg1.currentLabel == "neWalk"))))){
_arg1.gotoAndPlay("neWalk");
} else {
if ((((((_local3 < -90)) && ((_local3 > -179)))) && (!((_arg1.currentLabel == "nwWalk"))))){
_arg1.gotoAndPlay("nwWalk");
} else {
if ((((((_local3 < 180)) && ((_local3 > 90)))) && (!((_arg1.currentLabel == "swWalk"))))){
_arg1.gotoAndPlay("swWalk");
} else {
if ((((((_local3 < 90)) && ((_local3 > 0)))) && (!((_arg1.currentLabel == "seWalk"))))){
_arg1.gotoAndPlay("seWalk");
};
};
};
};
_local4 = _arg1.inRange(MovieClip(_arg1.parent)._hero, _arg1);
if ((((((_arg1.currentLabel == "neWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "neAttack"))))){
_arg1.gotoAndPlay("neAttack");
} else {
if ((((((_arg1.currentLabel == "nwWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "nwAttack"))))){
_arg1.gotoAndPlay("nwAttack");
} else {
if ((((((_arg1.currentLabel == "swWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "swAttack"))))){
_arg1.gotoAndPlay("swAttack");
} else {
if ((((((_arg1.currentLabel == "seWalk")) && ((_local4 <= 12)))) && (!((_arg1.currentLabel == "seAttack"))))){
_arg1.gotoAndPlay("seAttack");
};
};
};
};
if ((((((((_arg1.currentLabel == "neWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "neRanged"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("neRanged");
} else {
if ((((((((_arg1.currentLabel == "nwWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "nwRanged"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("nwRanged");
} else {
if ((((((((_arg1.currentLabel == "swWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "swRanged"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("swRanged");
} else {
if ((((((((_arg1.currentLabel == "seWalk")) && ((((_local4 >= 12)) && ((_local4 >= 20)))))) && (!((_arg1.currentLabel == "seRanged"))))) && (_arg1.canthrow))){
_arg1.gotoAndPlay("seRanged");
};
};
};
};
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
if (_arg1.bulletHit){
if (_arg1.currentLabel == "nwWalk"){
_arg1.gotoAndPlay("nwHit");
} else {
if (_arg1.currentLabel == "neWalk"){
_arg1.gotoAndPlay("neHit");
} else {
if (_arg1.currentLabel == "swWalk"){
_arg1.gotoAndPlay("swHit");
} else {
if (_arg1.currentLabel == "seWalk"){
_arg1.gotoAndPlay("seHit");
};
};
};
};
_arg1.dx = (_arg1.stren * Math.cos((((2 * Math.PI) * _arg1.degrees) / 360)));
_arg1.dy = (_arg1.stren * Math.sin((((2 * Math.PI) * _arg1.degrees) / 360)));
_local6 = (_arg1.x + ((_arg1.dx * _local2) / 1000));
_local5 = (_arg1.y + ((_arg1.dy * _local2) / 1000));
_arg1.launchTimer();
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && (((_arg1.x + _arg1.unitwidth) > _local7.leftside)))) && (((_arg1.x - _arg1.unitwidth) < _local7.rightside)))){
if ((((_arg1.y <= _local7.topside)) && ((_local5 > _local7.topside)))){
_local5 = _local7.topside;
break;
};
if ((((_arg1.y >= _local7.bottomside)) && ((_local5 < (_local7.bottomside + _arg1.unitheight))))){
_local5 = (_local7.bottomside + _arg1.unitheight);
break;
};
};
};
_local8++;
};
_local8 = 0;
while (_local8 < _arg1.fixedObjects.length) {
_local7 = _arg1.fixedObjects[_local8];
if (_arg1.inRange(_arg1, _local7.mc) < 30){
if ((((((_local7.type == "Block")) && ((_local5 > _local7.topside)))) && (((_local5 - _arg1.unitheight) < _local7.bottomside)))){
if (((((_arg1.x - _arg1.unitwidth) >= _local7.rightside)) && (((_local6 - _arg1.unitwidth) <= _local7.rightside)))){
_local6 = (_local7.rightside + _arg1.unitwidth);
break;
};
if (((((_arg1.x + _arg1.unitwidth) <= _local7.leftside)) && (((_local6 + _arg1.unitwidth) >= _local7.leftside)))){
_local6 = (_local7.leftside - _arg1.unitwidth);
break;
};
};
};
_local8++;
};
_arg1.x = _local6;
_arg1.y = _local5;
}
}
}//package