Section 1
//LevelAnimationAbs (animations.LevelAnimationAbs)
package animations {
import flash.display.*;
import flash.events.*;
public class LevelAnimationAbs extends MovieClip {
protected var _onScene:Boolean;// = false
public static var ANIMATIONS_ENABLED:Boolean = true;
public function LevelAnimationAbs(){
mouseChildren = false;
mouseEnabled = false;
this.addEventListener(Event.ADDED_TO_STAGE, handleAddedOnStage, false, 0, true);
this.addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage, false, 0, true);
}
protected function set playAnimation(_arg1:Boolean){
_onScene = _arg1;
if (LevelAnimationAbs.ANIMATIONS_ENABLED){
_onScene = false;
};
}
protected function handleAddedOnStage(_arg1:Event){
playAnimation = true;
}
protected function handleRemovedFromStage(_arg1:Event){
playAnimation = false;
}
}
}//package animations
Section 2
//LevelAnimDelayedAbs (animations.LevelAnimDelayedAbs)
package animations {
import flash.events.*;
import flash.utils.*;
public class LevelAnimDelayedAbs extends LevelAnimationAbs {
private var _timer:Timer;
public static var PROBABILITY:Number = 0.02;
public function LevelAnimDelayedAbs(){
_timer = new Timer(1000);
_timer.addEventListener(TimerEvent.TIMER, handleTimer, false, 0, true);
gotoAndStop(this.totalFrames);
}
override protected function set playAnimation(_arg1:Boolean){
super.playAnimation = _arg1;
if (_arg1){
_timer.start();
} else {
_timer.stop();
};
}
protected function startDelayedAnimation(){
if (this.currentFrame == this.totalFrames){
gotoAndPlay(1);
};
}
protected function handleTimer(_arg1:TimerEvent){
if (ANIMATIONS_ENABLED){
if (Math.random() < PROBABILITY){
startDelayedAnimation();
};
};
}
}
}//package animations
Section 3
//LevelAnimDelayedDangerAbs (animations.LevelAnimDelayedDangerAbs)
package animations {
import flash.display.*;
import flash.events.*;
public class LevelAnimDelayedDangerAbs extends LevelAnimDelayedAbs {
private var initRota;
private var speed:Number;// = 10
private var initX;
private var initY;
public var i_hitarea:MovieClip;
private var _hitA:MovieClip;
private var distanceMax:Number;// = 1200
private var spX;
private var spY:Number;
private var running:Boolean;// = false
public function LevelAnimDelayedDangerAbs(){
_hitA = (getChildByName("i_hitarea") as MovieClip);
this.hitArea = _hitA;
_hitA.visible = false;
mouseChildren = false;
mouseEnabled = false;
visible = false;
}
override protected function startDelayedAnimation(){
var _local1:Number;
if (!running){
running = true;
parent.addChild(this);
initX = x;
initY = y;
initRota = rotation;
visible = true;
_local1 = ((rotation * Math.PI) / 180);
spX = (Math.cos(_local1) * speed);
spY = (Math.sin(_local1) * speed);
addEventListener(Event.ENTER_FRAME, eFrame);
};
}
public function get isRunning():Boolean{
return (running);
}
private function eFrame(_arg1:Event){
x = (x + spX);
y = (y + spY);
var _local2:Number = Math.sqrt((((x - initX) * (x - initX)) + ((y - initY) * (y - initY))));
if (_local2 > distanceMax){
x = initX;
y = initY;
removeEventListener(Event.ENTER_FRAME, eFrame);
visible = false;
running = false;
};
}
public function get hitA():MovieClip{
return (_hitA);
}
}
}//package animations
Section 4
//Anomalia_1 (anomalies.Anomalia_1)
package anomalies {
import flash.display.*;
public class Anomalia_1 extends AnomaliaAbstract {
public var i_mc_anomalieShape:MovieClip;
public var i_obstacle:MovieClip;
public function Anomalia_1(){
_damage = 1;
_deathType = 1;
}
}
}//package anomalies
Section 5
//Anomalia_2 (anomalies.Anomalia_2)
package anomalies {
import flash.display.*;
public class Anomalia_2 extends AnomaliaAbstract {
public var i_mc_anomalieShape:MovieClip;
public var i_obstacle:MovieClip;
public function Anomalia_2(){
_damage = 2;
_deathType = 0;
}
}
}//package anomalies
Section 6
//Anomalia_3 (anomalies.Anomalia_3)
package anomalies {
import flash.display.*;
public class Anomalia_3 extends AnomaliaAbstract {
public var i_mc_anomalieShape:MovieClip;
public var i_obstacle:MovieClip;
public function Anomalia_3(){
_damage = 3;
_deathType = 2;
}
}
}//package anomalies
Section 7
//Anomalia_4 (anomalies.Anomalia_4)
package anomalies {
import flash.display.*;
public class Anomalia_4 extends AnomaliaAbstract {
public var i_mc_anomalieShape:MovieClip;
public var i_obstacle:MovieClip;
public function Anomalia_4(){
_damage = 4;
_deathType = 0;
}
}
}//package anomalies
Section 8
//anomalia_fake (anomalies.anomalia_fake)
package anomalies {
import flash.display.*;
public class anomalia_fake extends AnomaliaAbstract {
public var i_mc_anomalieShape:MovieClip;
public var i_obstacle:MovieClip;
public function anomalia_fake(){
_damage = 1;
_deathType = 1;
}
}
}//package anomalies
Section 9
//AnomaliaAbstract (anomalies.AnomaliaAbstract)
package anomalies {
import flash.display.*;
import flash.events.*;
public class AnomaliaAbstract extends MovieClip {
protected var _completed:Boolean;// = false
protected var _dangerZone:MovieClip;
protected var _deathType:int;// = 0
protected var _damage:Number;// = 2
protected var _disappearProb:Number;// = 0.0001
protected var _scaleAccel:Number;// = 0.01
protected var _disappearProbAcc:Number;// = 5E-5
protected var _scaleSpeedInit:Number;// = 0.03
protected var _obstacle:MovieClip;
protected var _scaleSpeed:Number;// = 0.03
public static const EVT_DONE:String = "Anomalia_dead_already";
public function AnomaliaAbstract(){
_obstacle = (getChildByName("i_obstacle") as MovieClip);
_obstacle.visible = false;
_dangerZone = (getChildByName("i_mc_anomalieShape") as MovieClip);
_dangerZone.visible = false;
scaleX = 0.1;
scaleY = scaleX;
addEventListener(Event.ENTER_FRAME, eFrameStart);
_scaleSpeed = _scaleSpeedInit;
}
public function get completed():Boolean{
return (_completed);
}
public function get obstacle():MovieClip{
return (_obstacle);
}
private function eFrameRun(_arg1:Event){
if (Math.random() < _disappearProb){
removeEventListener(Event.ENTER_FRAME, eFrameRun);
addEventListener(Event.ENTER_FRAME, eFrameDone);
_scaleSpeed = _scaleSpeedInit;
};
_disappearProb = (_disappearProb + _disappearProbAcc);
}
public function destruct(){
removeEventListener(Event.ENTER_FRAME, eFrameStart);
removeEventListener(Event.ENTER_FRAME, eFrameRun);
removeEventListener(Event.ENTER_FRAME, eFrameDone);
_completed = true;
_obstacle = null;
}
public function get deathType():int{
return (_deathType);
}
private function eFrameDone(_arg1:Event){
if (scaleX > 0.1){
scaleX = (scaleX - _scaleSpeed);
scaleY = scaleX;
_scaleSpeed = (_scaleSpeed + _scaleAccel);
} else {
scaleX = 0.1;
removeEventListener(Event.ENTER_FRAME, eFrameDone);
_completed = true;
_damage = 0;
dispatchEvent(new Event(EVT_DONE));
};
}
public function get dangerZone():MovieClip{
return (_dangerZone);
}
public function get damage():Number{
return (_damage);
}
private function eFrameStart(_arg1:Event){
if (scaleX < 1){
scaleX = (scaleX + _scaleSpeed);
scaleY = scaleX;
_scaleSpeed = (_scaleSpeed + _scaleAccel);
} else {
scaleX = 1;
removeEventListener(Event.ENTER_FRAME, eFrameStart);
addEventListener(Event.ENTER_FRAME, eFrameRun);
};
}
}
}//package anomalies
Section 10
//CBonusAbstract (Bonuses.CBonusAbstract)
package Bonuses {
import flash.display.*;
import itemz.*;
import flash.events.*;
public dynamic class CBonusAbstract extends CObjectAbstract {
protected var expired:Boolean;// = false
protected var lifetime:int;// = 450
protected var _shine:MovieClip;
protected var _item:CItemAbstract;
public function CBonusAbstract(... _args){
_shine = new mcBonusShine();
super();
addEventListener(Event.ENTER_FRAME, onAction);
}
public function get Expired():Boolean{
return (expired);
}
override public function onAction(_arg1:Event){
lifetime--;
if (lifetime < 0){
removeEventListener(Event.ENTER_FRAME, onAction);
_item = null;
_shine = null;
removeme();
expired = true;
} else {
_shine.rotation = (_shine.rotation - 7);
};
}
public function pickedup(){
removeEventListener(Event.ENTER_FRAME, onAction);
_item = null;
_shine = null;
removeme();
}
public function set Bonus(_arg1:CItemAbstract){
_item = _arg1;
addChild(_item);
addChild(_shine);
}
public function get Bonus():CItemAbstract{
return (_item);
}
}
}//package Bonuses
Section 11
//AmmoCell (character.AmmoCell)
package character {
public class AmmoCell {
public var ammoCount:int;// = 0
public var ammoName:String;// = ""
}
}//package character
Section 12
//AmmoStorage (character.AmmoStorage)
package character {
public class AmmoStorage {
private var items:ObjectList;
public function AmmoStorage(){
items = new ObjectList();
}
public function setAmmoCount(_arg1:String, _arg2:int){
var _local3:AmmoCell = getAmmoByName(_arg1);
if (_local3 != null){
_local3.ammoCount = _arg2;
};
}
public function getAmmo(_arg1:int):AmmoCell{
return (AmmoCell(items.getItem(_arg1)));
}
public function getAmmoByName(_arg1:String):AmmoCell{
var _local3:AmmoCell;
var _local2:int;
while (_local2 < items.count) {
_local3 = getAmmo(_local2);
if (_local3.ammoName == _arg1){
return (_local3);
};
_local2++;
};
return (null);
}
public function changeAmmoCount(_arg1:String, _arg2:int){
var _local3:AmmoCell = getAmmoByName(_arg1);
if (_local3 != null){
_local3.ammoCount = (_local3.ammoCount + _arg2);
};
}
public function get itemsCount():int{
return (items.count);
}
public function addAmmo(_arg1:String, _arg2:int){
var _local3:AmmoCell;
_local3 = new AmmoCell();
_local3.ammoCount = _arg2;
_local3.ammoName = _arg1;
items.add(_local3);
}
}
}//package character
Section 13
//CChar (character.CChar)
package character {
import flash.display.*;
import gunz.*;
import itemz.*;
import gunz.bullets.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
public class CChar extends Sprite {
protected const divPI:Number = 57.2957795130823;
private var keyLeft:Boolean;// = false
private var _spXmax:Number;
private var i_shot:MovieClip;
private var imgreload:MovieClip;
private var armored:Boolean;// = false
var shadow:DropShadowFilter;
private var armorabsorb:int;// = 0
private var armorpercent:Number;// = 0
private var narcospeedmod:Number;// = 1
private var armor:CArmorAbstract;
private var stepspeedbase:Number;// = 2.1
private var moving:Boolean;// = false
private var narcotixspeed:Boolean;// = true
private var keyUp:Boolean;// = false
public var _hpmax:int;// = 80
private var _spYmax:Number;
private var bleeding:Boolean;// = false
public var def_bullet:Class;
private var armorhpmax:int;// = 0
private var _relIndic:ReloadIndicator;
private var armorhp:int;// = 0
private var _aimX:Number;
private var _aimY:Number;
private var armoravoid:Number;// = 0.1
private var armorclass:Number;// = 0.4
private var _aimDistance:Number;
private var keyDown:Boolean;// = false
private var narcotixspeedtime;// = 0
public var _hp:int;// = 80
private var footDirection:Number;
private var imgstall:MovieClip;
private var _hppercent:Number;// = 1
private var imgfoot:MovieClip;
private var img:MovieClip;
private var armormodspeed:Number;// = 1
private var obstacles:ObjectList;
private var currentWeaponType:String;// = "Pistol"
private var shotpoint:Point;
private var _spX:Number;// = 0
private var imgshotblood:MovieClip;
private var _spY:Number;// = 0
private var stepspeeddefault:Number;// = 2.1
private var _cX:Number;// = 370
private var _cY:Number;// = 300
private var stepspeed:Number;// = 2.1
private var keyRight:Boolean;// = false
public function CChar(_arg1:Number=370, _arg2:Number=300){
imgshotblood = new someBlood();
shotpoint = new Point(0, 0);
_spXmax = stepspeed;
_spYmax = stepspeed;
armor = new CArmorNone();
def_bullet = CBulletStandart;
shadow = new DropShadowFilter(6, 45, 0x111111, 1, 2, 2, 1, 1, false, false, false);
obstacles = new ObjectList();
super();
imgfoot = new mcCharFeet();
addChild(imgfoot);
imgfoot.rotation = 90;
imgfoot.gotoAndStop(4);
imgstall = new mcHero_Top_Pistol();
imgreload = new mcHero_Top_Pistol_1_Rel();
imgreload.x = -6;
imgreload.y = -17;
i_shot = new mcChar_weaponShot();
i_shot.x = 30;
i_shot.y = 2.5;
shotpoint.x = 30;
shotpoint.y = 2.5;
img = imgstall;
img.addChild(i_shot);
i_shot.gotoAndStop(1);
addChild(img);
_cX = _arg1;
_cY = _arg2;
x = _cX;
y = _cY;
setNoArmor();
addEventListener(Event.ENTER_FRAME, onAction);
filters = [shadow];
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage, false, 0, true);
}
public function go(){
imgfoot.play();
}
public function shot(){
if (i_shot.currentFrame == 1){
i_shot.gotoAndPlay(2);
};
}
public function get armorPercent():Number{
if (armored){
return (armorpercent);
};
return (0);
}
private function setGlow(){
this.filters = [ImgHyperSpeed.GLOW];
}
public function gotKicked(_arg1):Boolean{
var _local2:int = _arg1;
if (armorhp > 0){
_local2 = (_local2 - armorabsorb);
_local2 = (_local2 * armorclass);
};
if ((((Math.random() < armoravoid)) || ((_local2 < 0)))){
_local2 = 0;
};
_hp = (_hp - _local2);
armorhp = (armorhp - _arg1);
if (armorhp < 0){
armorhp = 0;
setNoArmor();
};
_hppercent = (_hp / _hpmax);
armorpercent = (armorhp / armorhpmax);
if (_hp < 0){
return (true);
};
_cX = (_cX - (_spX / 2));
_cY = (_cY - (_spY / 2));
if (((!(bleeding)) && ((_local2 > 0)))){
bleeding = true;
imgshotblood.gotoAndPlay(1);
addChild(imgshotblood);
};
return (false);
}
public function nomove(_arg1:uint){
if ((((_arg1 == 37)) || ((_arg1 == 65)))){
keyLeft = false;
};
if ((((_arg1 == 39)) || ((_arg1 == 68)))){
keyRight = false;
};
if ((((_arg1 == 38)) || ((_arg1 == 87)))){
keyUp = false;
};
if ((((_arg1 == 40)) || ((_arg1 == 83)))){
keyDown = false;
};
}
public function hitToObstacle(_arg1:Sprite){
if (obstacles.getItemIndex(_arg1) == -1){
obstacles.add(_arg1);
};
}
public function get Armor():CArmorAbstract{
return (armor);
}
public function setWeapon(_arg1:String){
if (currentWeaponType != _arg1){
currentWeaponType = _arg1;
removeChild(img);
if (_arg1 == CGunProps.THROWING){
imgstall = new mcHero_Top_Grenade();
imgreload = new mcHero_Top_Grenade_Rel();
imgreload.x = -7;
imgreload.y = -11;
i_shot = new MovieClip();
shotpoint.x = 0;
shotpoint.y = 0;
} else {
if (_arg1 == CGunProps.PISTOL){
imgstall = new mcHero_Top_Pistol();
imgreload = new mcHero_Top_Pistol_1_Rel();
imgreload.x = -6;
imgreload.y = -17;
i_shot = new mcChar_weaponShot();
i_shot.x = 30;
i_shot.y = 2.5;
shotpoint.x = 30;
shotpoint.y = 2.5;
} else {
if (_arg1 == CGunProps.DUALPISTOL){
imgstall = new mcHero_Top_Pistol_2();
imgreload = new mcHero_Top_Pistol_2_Rel();
imgreload.x = -7;
imgreload.y = -22;
i_shot = new mcChar_weaponShot_DualPistol();
i_shot.x = 30;
i_shot.y = 0;
shotpoint.x = 30;
shotpoint.y = 0;
} else {
if ((((((_arg1 == CGunProps.SMG)) || ((_arg1 == CGunProps.RIFLE)))) || ((_arg1 == CGunProps.SHOTGUN)))){
imgstall = new mcHero_Top_Rifle();
imgreload = new mcHero_Top_Rifle_Rel();
imgreload.x = -7;
imgreload.y = -15;
i_shot = new mcChar_weaponShot();
i_shot.x = 29;
i_shot.y = 5.5;
i_shot.scaleX = 1.3;
i_shot.scaleY = 1.3;
shotpoint.x = 29;
shotpoint.y = 5.5;
} else {
imgstall = new mcHero_Top_Machine();
imgreload = new mcHero_Top_Machine_Rel();
imgreload.x = -12;
imgreload.y = -20;
i_shot = new mcChar_weaponShot();
i_shot.x = 32;
i_shot.y = 0;
i_shot.scaleX = 1.5;
i_shot.scaleY = 1.7;
shotpoint.x = 32;
shotpoint.y = 0;
};
};
};
};
imgreload.gotoAndStop(1);
img = imgstall;
img.addChild(i_shot);
i_shot.gotoAndStop(1);
addChild(img);
};
}
private function removeGlow(){
this.filters = [];
}
public function ReloadIndicatorSet(_arg1:uint){
ReloadIndicatorRemove();
_relIndic = new ReloadIndicator(_arg1);
_relIndic.rotation = 180;
addChildAt(_relIndic, 0);
}
public function set newarmor(_arg1:CArmorAbstract){
if ((_arg1.maxHP * 0.7) > armorhp){
armor = _arg1;
armorhpmax = _arg1.maxHP;
armorhp = armorhpmax;
armorabsorb = _arg1.Absorb;
armorclass = _arg1.armorClass;
armoravoid = _arg1.AvoidProv;
armorpercent = 1;
armormodspeed = _arg1.speedModifier;
armored = true;
armorpercent = (armorhp / armorhpmax);
stepSpeedUpdate();
};
}
private function handleRemovedFromStage(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, onAction);
removeEventListener(Event.REMOVED, handleRemovedFromStage);
}
public function aim(_arg1:Number, _arg2:Number){
_aimX = _arg1;
_aimY = _arg2;
aimcontrol();
}
public function setNoArmor(){
var _local1:CArmorAbstract = new CArmorNone();
armor = _local1;
armorhpmax = _local1.maxHP;
armorhp = armorhpmax;
armorabsorb = _local1.Absorb;
armorclass = _local1.armorClass;
armoravoid = _local1.AvoidProv;
armorpercent = 1;
armormodspeed = _local1.speedModifier;
armored = true;
armorpercent = (armorhp / armorhpmax);
armored = false;
stepSpeedUpdate();
}
public function get hpPercent():Number{
return (_hppercent);
}
public function get aimDistance():Number{
return (_aimDistance);
}
public function getNarcotix(_arg1:CItemNarcotix){
if ((_arg1 is CItemNarcotixSpeed)){
if (narcotixspeed){
narcotixspeedtime = _arg1.time;
} else {
narcotixspeed = true;
narcotixspeedtime = _arg1.time;
narcospeedmod = _arg1.modifier;
stepSpeedUpdate();
trace("stepsepeeed", stepspeed);
};
};
}
public function nogo(){
imgfoot.gotoAndStop(5);
}
public function moveon(_arg1:uint){
if ((((_arg1 == 37)) || ((_arg1 == 65)))){
keyLeft = true;
};
if ((((_arg1 == 39)) || ((_arg1 == 68)))){
keyRight = true;
};
if ((((_arg1 == 38)) || ((_arg1 == 87)))){
keyUp = true;
};
if ((((_arg1 == 40)) || ((_arg1 == 83)))){
keyDown = true;
};
}
private function aimcontrol(){
rotation = (90 - (Math.atan2((_aimX - _cX), (_aimY - _cY)) * divPI));
_aimDistance = Math.sqrt((((aimX - _cX) * (aimX - _cX)) + ((_aimY - _cY) * (_aimY - _cY))));
}
public function ReloadIndicatorRemove(){
if (_relIndic != null){
removeChild(_relIndic);
_relIndic = null;
};
}
private function stepSpeedUpdate(){
stepspeed = ((stepspeedbase * armormodspeed) * narcospeedmod);
_spXmax = stepspeed;
_spYmax = stepspeed;
}
private function NoOverSpeedin(){
if (_spX < 0){
if (_spX < -(_spXmax)){
_spX = -(_spXmax);
};
} else {
if (_spX > _spXmax){
_spX = _spXmax;
};
};
if (_spY < 0){
if (_spY < -(_spYmax)){
_spY = -(_spYmax);
};
} else {
if (_spY > _spYmax){
_spY = _spYmax;
};
};
}
public function get ShotPoint():Point{
var _local1:Point;
_local1 = localToGlobal(shotpoint);
return (_local1);
}
public function reload(){
removeChild(img);
img = imgreload;
img.play();
addChild(img);
}
public function getImgHyperSpeed():ImgHyperSpeed{
var _local2:Number;
var _local3:Number;
var _local4:DisplayObject;
var _local1:Sprite = new Sprite();
_local2 = img.x;
_local3 = img.y;
_local4 = img.getChildAt(0);
var _local5:Number = _local4.x;
var _local6:Number = _local4.y;
img.x = 0;
img.y = 0;
_local4.x = 0;
_local4.y = 0;
var _local7:BitmapData = new BitmapData(img.width, img.height, true, 0);
_local7.draw(img);
var _local8:Bitmap = new Bitmap(_local7, "auto", true);
img.x = _local2;
img.y = _local3;
_local4.x = _local5;
_local4.y = _local6;
_local8.x = _local5;
_local8.y = _local6;
_local1.addChild(_local8);
_local1.x = _local2;
_local1.y = _local3;
var _local9:ImgHyperSpeed = new ImgHyperSpeed(_local1);
_local9.x = x;
_local9.y = y;
_local9.rotation = rotation;
return (_local9);
}
public function get aimX():Number{
return (_aimX);
}
public function get aimY():Number{
return (_aimY);
}
public function get stepSpeedChar():Number{
return (stepspeed);
}
public function get isOnHyperSpeed():Boolean{
return ((narcospeedmod > 1));
}
public function setSpeedMod(_arg1:Number){
stepspeedbase = (stepspeeddefault * _arg1);
stepSpeedUpdate();
}
public function stopmoving(){
_spX = 0;
_spY = 0;
keyDown = false;
keyRight = false;
keyUp = false;
keyLeft = false;
}
public function set MaxHp(_arg1:int){
_hpmax = _arg1;
_hp = _hpmax;
}
public function heal(_arg1:int){
_hp = (_hp + _arg1);
if (_hp > _hpmax){
_hp = _hpmax;
};
_hppercent = (_hp / _hpmax);
}
public function fullheal(){
_hp = _hpmax;
_hppercent = 1;
}
public function onAction(_arg1:Event){
var obs:Sprite;
var dist:Number;
var dist2:Number;
var e = _arg1;
var compDistance:Function = function ():Number{
var _local1:Number = (obs.x - _cX);
var _local2:Number = (obs.y - _cY);
return (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))));
};
if (keyLeft){
_spX = -(stepspeed);
} else {
if (keyRight){
_spX = stepspeed;
} else {
_spX = 0;
};
};
if (keyUp){
_spY = -(stepspeed);
} else {
if (keyDown){
_spY = stepspeed;
} else {
_spY = 0;
};
};
var sp:Boolean = ((!((_spX == 0))) || (!((_spY == 0))));
var tri:Boolean = ((!((_spX == 0))) && (!((_spY == 0))));
if (tri){
_spX = (_spX * 0.7071);
_spY = (_spY * 0.7071);
};
if (narcotixspeed){
narcotixspeedtime--;
if (narcotixspeedtime < 1){
narcotixspeed = false;
narcospeedmod = 1;
stepSpeedUpdate();
};
};
if (moving){
if (sp){
} else {
nogo();
moving = false;
};
} else {
if (sp){
go();
moving = true;
};
};
var dx:Number = ((_spX * narcospeedmod) * armormodspeed);
var dy:Number = ((_spY * narcospeedmod) * armormodspeed);
var oi:int = obstacles.count;
while (oi > 0) {
oi = (oi - 1);
obs = (obstacles.getItem(oi) as Sprite);
dist = compDistance();
if (dist < (obs.width / 1.6)){
_cX = (_cX + dx);
_cY = (_cY + dy);
dist2 = compDistance();
if (dist > dist2){
_cX = (_cX - dx);
_cY = (_cY - dy);
dx = 0;
dy = 0;
break;
};
} else {
obstacles.remove(oi);
};
};
_cX = (_cX + dx);
_cY = (_cY + dy);
if (_cX > 730){
_cX = 730;
};
if (_cY > 640){
_cY = 640;
};
if (_cX < 10){
_cX = 10;
};
if (_cY < 10){
_cY = 10;
};
x = int(_cX);
y = int(_cY);
aimcontrol();
if (i_shot.currentFrame == i_shot.totalFrames){
i_shot.gotoAndStop(1);
};
if (imgreload.currentFrame == imgreload.totalFrames){
removeChild(img);
img.gotoAndStop(1);
img = imgstall;
addChild(img);
};
if (bleeding){
if (imgshotblood.currentFrame == imgshotblood.totalFrames){
removeChild(imgshotblood);
bleeding = false;
};
};
var dir:Number = (90 + (Math.atan2(_spY, _spX) * divPI));
var diff:Number = (dir - rotation);
if (diff < 180){
imgfoot.rotation = diff;
} else {
imgfoot.rotation = (diff - 180);
};
}
}
}//package character
Section 14
//CInventory (character.CInventory)
package character {
import gunz.*;
import itemz.*;
public class CInventory {
public var Ammo1:int;// = 99
public var Ammo2:int;// = 0
public var Ammo3:int;// = 0
private var weaponsInUse:ObjectList;
public var Ammo4:int;// = 0
private var oldWeapon:CGunAbstract;
public var sameammo:Boolean;// = false
private var weaponarray:Array;
public var armor:CArmorAbstract;
public var money:int;// = 0
public var ammoStorage:AmmoStorage;
private var _weapon1:CGunAbstract;
private var _weapon2:CGunAbstract;
private var _weapon3:CGunAbstract;
private var _weapon4:CGunAbstract;
public function CInventory(){
weaponarray = new Array();
armor = new CArmorNone();
super();
weaponsInUse = new ObjectList();
var _local1:Array = CGunzPropBank.gimmeAllOfThem;
_local1.reverse();
var _local2:CGunAbstract = (_local1[0] as CGunAbstract);
addWeapon(_local2);
addWeaponInUse(_local2);
_weapon1 = _local2;
_weapon2 = new CGunAbstract();
addWeaponInUse(_weapon2);
_weapon3 = new CGunAbstract();
addWeaponInUse(_weapon3);
_weapon4 = new CGunAbstract();
addWeaponInUse(_weapon4);
ammoStorage = new AmmoStorage();
initAmmoStorage();
money = 1600;
}
public function getWeaponAmmo(_arg1:CGunAbstract):AmmoCell{
var _local2:AmmoCell = ammoStorage.getAmmoByName(_arg1.props.ammotype);
return (_local2);
}
public function addWeaponInUse(_arg1:CGunAbstract){
weaponsInUse.add(_arg1);
}
public function get weapon1():CGunAbstract{
var _local1:CGunAbstract = _weapon1;
if (_local1 == null){
_local1 = new CGunAbstract();
_weapon1 = new CGunAbstract();
};
return (_local1);
}
public function get weapon3():CGunAbstract{
var _local1:CGunAbstract = _weapon3;
if (_local1 == null){
_local1 = new CGunAbstract();
_weapon3 = new CGunAbstract();
};
return (_local1);
}
public function get weapon4():CGunAbstract{
var _local1:CGunAbstract = _weapon4;
if (_local1 == null){
_local1 = new CGunAbstract();
_weapon4 = new CGunAbstract();
};
return (_local1);
}
public function addWeapon(_arg1:CGunAbstract){
if (!haveThisWeapon(_arg1)){
weaponarray.push(_arg1);
} else {
trace("weapon:", _arg1.props.name, "already present");
};
}
public function gimmeWeapon(_arg1:CGunAbstract):CGunAbstract{
var _local2:int = (weaponarray.length - 1);
while (_local2 > -1) {
if (_arg1.props.name == weaponarray[_local2].props.name){
return (weaponarray[_local2]);
};
_local2--;
};
return (null);
}
public function get ArmorIconClass():Class{
return (armor.ArmorIconClass);
}
public function setWeaponInUse(_arg1:CGunAbstract, _arg2:int){
if (weaponsInUse.count > _arg2){
oldWeapon = CGunAbstract(weaponsInUse.getItem(_arg2));
oldWeapon = _arg1;
};
}
public function get weapon2():CGunAbstract{
var _local1:CGunAbstract = _weapon2;
if (_local1 == null){
_local1 = new CGunAbstract();
_weapon2 = new CGunAbstract();
};
return (_local1);
}
public function get Armor():CArmorAbstract{
return (armor);
}
public function set weapon1(_arg1:CGunAbstract){
if (_arg1 == null){
_weapon1 = new CGunAbstract();
} else {
_weapon1 = _arg1;
};
}
public function getWeaponByNr(_arg1:int){
switch (_arg1){
case 0:
return (_weapon1);
case 1:
if (Ammo2 > 0){
return (_weapon2);
};
return (_weapon1);
case 2:
if (Ammo3 > 0){
return (_weapon3);
};
return (_weapon1);
case 3:
if (Ammo4 > 0){
return (_weapon4);
};
return (_weapon1);
default:
return (_weapon1);
};
}
private function setSlot1(_arg1:CGunAbstract):Boolean{
if (haveThisWeapon(_arg1)){
if (_arg1.props.guntype == CGunProps.PISTOL){
_weapon1 = _arg1;
return (true);
};
};
return (false);
}
private function initAmmoStorage(){
ammoStorage.addAmmo(CGunProps.AMMO_NONE, 0);
ammoStorage.addAmmo(CGunProps.AMMO_PISTOL, 9999);
ammoStorage.addAmmo(CGunProps.AMMO_STANDART, 0);
ammoStorage.addAmmo(CGunProps.AMMO_SHELLS, 0);
ammoStorage.addAmmo(CGunProps.AMMO_CHAIN, 0);
ammoStorage.addAmmo(CGunProps.AMMO_ROCKETS, 0);
ammoStorage.addAmmo(CGunProps.AMMO_ENERGY, 0);
ammoStorage.addAmmo(CGunProps.AMMO_FUEL, 0);
ammoStorage.addAmmo(CGunProps.AMMO_THROWING, 0);
ammoStorage.addAmmo(CGunProps.AMMO_KNIVES, 0);
ammoStorage.addAmmo(CGunProps.AMMO_GRENADES, 0);
ammoStorage.addAmmo(CGunProps.AMMO_TORNADO, 0);
ammoStorage.addAmmo(CGunProps.AMMO_MOLOTOV, 0);
}
public function set weapon4(_arg1:CGunAbstract){
if (_arg1 == null){
_weapon4 = new CGunAbstract();
} else {
_weapon4 = _arg1;
};
}
public function getWeaponAmmoByProps(_arg1:CGunProps):int{
var _local2:int = ammoStorage.getAmmoByName(_arg1.ammotype).ammoCount;
return (_local2);
}
public function getWeaponByNrNoAmmoCheck(_arg1:int){
switch (_arg1){
case 0:
return (_weapon1);
case 1:
return (_weapon2);
case 2:
return (_weapon3);
case 3:
return (_weapon4);
default:
return (_weapon1);
};
}
public function bulletGone(_arg1:int):int{
switch (_arg1){
case 0:
return (99);
case 1:
ammoStorage.changeAmmoCount(_weapon2.props.ammotype, -1);
if (Ammo2 > 0){
if (sameammo){
Ammo3--;
};
return (--Ammo2);
} else {
return (Ammo2);
};
case 2:
ammoStorage.changeAmmoCount(_weapon3.props.ammotype, -1);
if (Ammo3 > 0){
if (sameammo){
Ammo2--;
};
return (--Ammo3);
} else {
return (Ammo3);
};
case 3:
ammoStorage.changeAmmoCount(_weapon4.props.ammotype, -1);
if (Ammo4 > 0){
return (--Ammo4);
};
return (Ammo4);
default:
return (-66);
};
}
public function set weapon2(_arg1:CGunAbstract){
if (_arg1 == null){
_weapon2 = new CGunAbstract();
} else {
_weapon2 = _arg1;
};
}
public function settestInventory(){
weaponsInUse.clear();
var _local1:CGunProps = CGunzPropBank.Gun13;
_local1.upAccuracy = true;
_local1.upClip = true;
_local1.upSpeed = true;
_weapon1 = new CGunAbstract();
_weapon1.props = _local1;
addWeaponInUse(_weapon1);
_local1 = CGunzPropBank.Gun33;
_weapon2 = new CGunAbstract();
_weapon2.props = _local1;
addWeaponInUse(_weapon2);
_local1 = CGunzPropBank.Gun74;
_weapon3 = new CGunAbstract();
_weapon3.props = _local1;
addWeaponInUse(_weapon3);
_local1 = CGunzPropBank.Gun82;
_weapon4 = new CGunAbstract();
_weapon4.props = _local1;
addWeaponInUse(_weapon4);
ammoStorage.addAmmo(CGunProps.AMMO_PISTOL, 9999);
ammoStorage.addAmmo(CGunProps.AMMO_STANDART, 100);
ammoStorage.addAmmo(CGunProps.AMMO_SHELLS, 100);
ammoStorage.addAmmo(CGunProps.AMMO_CHAIN, 100);
ammoStorage.addAmmo(CGunProps.AMMO_ROCKETS, 100);
ammoStorage.addAmmo(CGunProps.AMMO_ENERGY, 100);
ammoStorage.addAmmo(CGunProps.AMMO_FUEL, 100);
ammoStorage.addAmmo(CGunProps.AMMO_THROWING, 100);
ammoStorage.addAmmo(CGunProps.AMMO_KNIVES, 2);
ammoStorage.addAmmo(CGunProps.AMMO_GRENADES, 2);
ammoStorage.addAmmo(CGunProps.AMMO_TORNADO, 2);
ammoStorage.addAmmo(CGunProps.AMMO_MOLOTOV, 2);
checkAmmoSlots();
weaponarray.push(_weapon1);
weaponarray.push(_weapon2);
weaponarray.push(_weapon3);
weaponarray.push(_weapon4);
money = 1000000;
armor = new CArmorMedium();
}
private function setSlot2(_arg1:CGunAbstract):Boolean{
if (haveThisWeapon(_arg1)){
if (((!((_arg1.props.guntype == CGunProps.PISTOL))) && (!((_arg1.props.guntype == CGunProps.THROWING))))){
_weapon1 = _arg1;
return (true);
};
};
return (false);
}
public function set weapon3(_arg1:CGunAbstract){
if (_arg1 == null){
_weapon3 = new CGunAbstract();
} else {
_weapon3 = _arg1;
};
}
public function checkAmmoSlots(){
checkSameAmmo();
var _local1:AmmoCell;
if (_weapon1 != null){
_local1 = ammoStorage.getAmmoByName(_weapon1.props.ammotype);
if (_local1 != null){
Ammo1 = _local1.ammoCount;
};
};
if (_weapon2 != null){
_local1 = ammoStorage.getAmmoByName(_weapon2.props.ammotype);
if (_local1 != null){
Ammo2 = _local1.ammoCount;
};
};
if (_weapon3 != null){
if (sameammo){
Ammo3 = Ammo2;
} else {
_local1 = ammoStorage.getAmmoByName(_weapon3.props.ammotype);
if (_local1 != null){
Ammo3 = _local1.ammoCount;
};
};
};
if (_weapon4 != null){
_local1 = ammoStorage.getAmmoByName(_weapon4.props.ammotype);
if (_local1 != null){
Ammo4 = _local1.ammoCount;
};
};
}
public function haveThisWeapon(_arg1:CGunAbstract):Boolean{
var _local3:CGunAbstract;
var _local2:int = (weaponarray.length - 1);
while (_local2 > -1) {
_local3 = weaponarray[_local2];
if (_arg1.props.name == _local3.props.name){
return (true);
};
_local2--;
};
return (false);
}
public function checkSameAmmo(){
var _local1:AmmoCell;
if (((!((_weapon2 == null))) && (!((_weapon3 == null))))){
_local1 = ammoStorage.getAmmoByName(_weapon2.props.ammotype);
if (_local1 != null){
if (_local1.ammoName == _weapon3.props.ammotype){
sameammo = true;
return;
};
};
};
sameammo = false;
}
public function setArmor(_arg1:CArmorAbstract){
armor = _arg1;
}
}
}//package character
Section 15
//CStats (character.CStats)
package character {
import flash.display.*;
public class CStats {
private var stat_Dexterity:int;// = 4
private var stat_Luck_max:int;// = 10
private var stat_Dexterity_min:int;// = 1
private var stat_Speed_min:int;// = 1
private var stat_Perception:int;// = 4
public var sT_totaltime:int;// = 0
private var stat_Dexterity_max:int;// = 10
private var stat_Perception_min:int;// = 1
private var stat_Accuracy:int;// = 4
public var player_level:int;// = 1
private var stat_Speed_max:int;// = 10
public var player_name:String;// = "Anonymous"
private var stat_Perception_max:int;// = 10
private var stat_Accuracy_min:int;// = 1
public var player_up:int;// = 0
private var stat_Power:int;// = 4
private var stat_Agility:int;// = 4
private var stat_Accuracy_max:int;// = 10
private var stat_Power_min:int;// = 1
private var stat_Agility_min:int;// = 1
public var st_shots:int;// = 0
private var stat_Luck:int;// = 4
private var stat_Power_max:int;// = 10
public var st_hits:int;// = 0
private var stat_Agility_max:int;// = 10
private var stat_Luck_min:int;// = 1
public var st_kills:int;// = 0
private var stat_Speed:int;// = 4
private var charPresetNumber:int;// = 0
public static const ID_DEXTERITY:String = "stat_dex";
public static const ID_AGILITY:String = "stat_agi";
public static const ID_SPEED:String = "stat_speed";
public static const ID_STRENGTH:String = "stat_str";
public static const ID_PERCEPTION:String = "stat_perc";
public static const CHAR_PORTRAIT_CLASSES:Array = [mc_charPortrait1, mc_charPortrait2, mc_charPortrait3, mc_charPortrait4, mc_charPortrait5, mc_charPortrait6];
public static const STATS_ID_ORDER:Array = [ID_STRENGTH, ID_SPEED, ID_DEXTERITY, ID_AGILITY, ID_ACCURACY, ID_PERCEPTION, ID_LUCK];
public static const OWERWEIGHT_RELOAD_FACTOR:Number = 2;
public static const ID_LUCK:String = "stat_luck";
public static const STATS_PRESETS:Array = [[6, 2, 4, 3, 2, 1, 3], [5, 1, 6, 1, 2, 2, 4], [3, 4, 2, 1, 5, 3, 3], [3, 5, 1, 2, 2, 3, 5], [4, 3, 2, 3, 3, 4, 2], [2, 6, 1, 2, 3, 3, 4]];
public static const ID_ACCURACY:String = "stat_accuracy";
public static const OWERWEIGHT_SPEED_FACTOR:Number = 0.6;
public function getCurrentStatsStr():String{
var _local1:int = ((((((stat_Power + stat_Speed) + stat_Dexterity) + stat_Agility) + stat_Accuracy) + stat_Perception) + stat_Luck);
var _local2:String = ((((((((((((((("St:" + stat_Power) + " Sp:") + stat_Speed) + " Dx:") + stat_Dexterity) + " Ag:") + stat_Agility) + " Ac:") + stat_Accuracy) + " Pe:") + stat_Perception) + " Lu:") + stat_Luck) + " T:") + _local1);
return (_local2);
}
public function setSpeed(_arg1:int):Boolean{
if ((((_arg1 < stat_Speed_min)) || ((_arg1 > stat_Speed_max)))){
return (false);
};
stat_Speed = _arg1;
return (true);
}
public function get currentUpPoints():int{
var _local1 = 21;
var _local2:int = (_local1 + Math.ceil((player_level / 2)));
var _local3:int = ((((((stat_Power + stat_Accuracy) + stat_Agility) + stat_Dexterity) + stat_Luck) + stat_Perception) + stat_Speed);
var _local4:int = (_local2 - _local3);
if (_local4 < 0){
_local4 = 0;
};
return (_local4);
}
public function getCharPortrait():Sprite{
var _local1:Class = CHAR_PORTRAIT_CLASSES[charPresetNumber];
var _local2:Sprite = new (_local1);
return (_local2);
}
public function setDexterity(_arg1:int):Boolean{
if ((((_arg1 < stat_Dexterity_min)) || ((_arg1 > stat_Dexterity_max)))){
return (false);
};
stat_Dexterity = _arg1;
return (true);
}
public function applyMinStats(){
stat_Power = stat_Power_min;
stat_Speed = stat_Speed_min;
stat_Dexterity = stat_Dexterity_min;
stat_Agility = stat_Agility_min;
stat_Accuracy = stat_Accuracy_min;
stat_Perception = stat_Perception_min;
stat_Luck = stat_Luck_min;
}
public function get Accuracy():int{
return (stat_Accuracy);
}
public function setAgility(_arg1:int):Boolean{
if ((((_arg1 < stat_Agility_min)) || ((_arg1 > stat_Agility_max)))){
return (false);
};
stat_Agility = _arg1;
return (true);
}
public function setAccuracy(_arg1:int):Boolean{
if ((((_arg1 < stat_Accuracy_min)) || ((_arg1 > stat_Accuracy_max)))){
return (false);
};
stat_Accuracy = _arg1;
return (true);
}
public function setPerception(_arg1:int):Boolean{
if ((((_arg1 < stat_Perception_min)) || ((_arg1 > stat_Perception_max)))){
return (false);
};
stat_Perception = _arg1;
return (true);
}
public function get score():int{
var _local1:Number = 0;
_local1 = ((((st_kills * (st_hits / st_shots)) * 1000000) * player_level) / sT_totaltime);
return (_local1);
}
public function get Dexterity():int{
return (stat_Dexterity);
}
public function get Agility():int{
return (stat_Agility);
}
public function get Speed():int{
return (stat_Speed);
}
public function getCharPortraitClass():Class{
var _local1:Class = CHAR_PORTRAIT_CLASSES[charPresetNumber];
return (_local1);
}
public function setPower(_arg1:int):Boolean{
if ((((_arg1 < stat_Power_min)) || ((_arg1 > stat_Power_max)))){
return (false);
};
stat_Power = _arg1;
return (true);
}
public function setLuck(_arg1:int):Boolean{
if ((((_arg1 < stat_Luck_min)) || ((_arg1 > stat_Luck_max)))){
return (false);
};
stat_Luck = _arg1;
return (true);
}
public function get Luck():int{
return (stat_Luck);
}
public function get charPreset():int{
return (charPresetNumber);
}
public function get Perception():int{
return (stat_Perception);
}
public function get currentHp():int{
var _local1:int = ((20 + (stat_Dexterity * 3)) + ((2 + int((stat_Dexterity / 2))) * player_level));
return (_local1);
}
public function get Power():int{
return (stat_Power);
}
public function applyPreset(_arg1:Number=0){
charPresetNumber = _arg1;
stat_Power = CStats.STATS_PRESETS[_arg1][0];
stat_Speed = CStats.STATS_PRESETS[_arg1][1];
stat_Dexterity = CStats.STATS_PRESETS[_arg1][2];
stat_Agility = CStats.STATS_PRESETS[_arg1][3];
stat_Accuracy = CStats.STATS_PRESETS[_arg1][4];
stat_Perception = CStats.STATS_PRESETS[_arg1][5];
stat_Luck = CStats.STATS_PRESETS[_arg1][6];
}
}
}//package character
Section 16
//ImgHyperSpeed (character.ImgHyperSpeed)
package character {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
public class ImgHyperSpeed extends MovieClip {
public static var GLOW:GlowFilter = new GlowFilter(0xFF9900, 1, 2, 2, 2, 2, false, true);
public function ImgHyperSpeed(_arg1:Sprite){
addChild(_arg1);
_arg1.filters = [GLOW];
addEventListener(Event.ENTER_FRAME, handleE);
alpha = 0.7;
}
private function handleE(_arg1:Event){
var e = _arg1;
alpha = (alpha - 0.05);
if (alpha <= 0){
removeEventListener(Event.ENTER_FRAME, handleE);
try {
if (this.parent != null){
this.parent.removeChild(this);
};
} catch(e:Error) {
};
};
}
}
}//package character
Section 17
//ReloadIndicator (character.ReloadIndicator)
package character {
import flash.display.*;
import flash.events.*;
public class ReloadIndicator extends MovieClip {
public var i_ind_6:MovieClip;
public var i_ind_7:MovieClip;
public var i_ind_9:MovieClip;
public var i_ind_8:MovieClip;
private var _framesTotal:int;
private var _frames:int;
public var i_ind_10:MovieClip;
public var i_ind_11:MovieClip;
public var i_ind_12:MovieClip;
public var i_ind_13:MovieClip;
public var i_ind_14:MovieClip;
public var i_ind_15:MovieClip;
private var _insttxt:String;// = "i_ind_"
public var i_ind_0:MovieClip;
public var i_ind_1:MovieClip;
public var i_ind_2:MovieClip;
public var i_ind_3:MovieClip;
public var i_ind_4:MovieClip;
public var i_ind_5:MovieClip;
public function ReloadIndicator(_arg1:int=40){
this.blendMode = BlendMode.OVERLAY;
alpha = 0.5;
_framesTotal = _arg1;
_frames = _arg1;
addEventListener(Event.ENTER_FRAME, handleEframe);
}
private function handleEframe(_arg1:Event){
_frames--;
var _local2:Number = (_frames / _framesTotal);
var _local3:int = (16 * _local2);
var _local4:String = (_insttxt + _local3.toString());
getChildByName(_local4).visible = false;
if (_frames <= 0){
removeEventListener(Event.ENTER_FRAME, handleEframe);
};
}
}
}//package character
Section 18
//BFChat (chat.BFChat)
package chat {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class BFChat extends MovieClip {
private const _delay_letter:int = 32;
private const _delay_phrase:int = 1500;
private var _portrait_opponent:MovieClip;
private var _textOpponent:TextField;
private var _portrait_player_cont:MovieClip;
private var _textPlayer:TextField;
private var _isOpponentTalking:Boolean;// = true
public var i_tf_text_two:TextField;
public var i_btn_skip:SimpleButton;
public var i_tf_text_one:TextField;
private var _currentTF:TextField;
private var _textArray:Array;
private var _isItPause:Boolean;// = false
private var _timer_pause:Timer;
public var i_portrait_two:MovieClip;
private var _portrait_player:MovieClip;
private var _timer_letter:Timer;
private var _portrait_opponent_cont:MovieClip;
private var _letterIterator:int;// = 0
public var i_portrait_one:MovieClip;
private var _btn_skip:SimpleButton;
private var _arrayIterator:int;// = 0
private var _currentString:String;
public static const EVT_CLOSED:String = "BF_CHAT_CLOSED";
public function BFChat(_arg1:Class, _arg2:Class, _arg3:Array){
_portrait_player_cont = (getChildByName("i_portrait_two") as MovieClip);
_portrait_opponent_cont = (getChildByName("i_portrait_one") as MovieClip);
_textPlayer = (getChildByName("i_tf_text_two") as TextField);
_textOpponent = (getChildByName("i_tf_text_one") as TextField);
_btn_skip = (getChildByName("i_btn_skip") as SimpleButton);
_portrait_player = new (_arg1);
_portrait_opponent = new (_arg2);
CClipTools.clearDisplayContainer(_portrait_player_cont);
CClipTools.clearDisplayContainer(_portrait_opponent_cont);
_portrait_player_cont.addChild(_portrait_player);
_portrait_opponent_cont.addChild(_portrait_opponent);
_textArray = _arg3;
clearTexts();
_timer_letter = new Timer(_delay_letter);
_timer_letter.addEventListener(TimerEvent.TIMER, handleNextLetter, false, 0, true);
_timer_pause = new Timer(_delay_phrase);
_timer_pause.addEventListener(TimerEvent.TIMER, handlePauseTimer, false, 0, true);
this.addEventListener(MouseEvent.CLICK, handleAreaClick, false, 0, true);
_btn_skip.addEventListener(MouseEvent.CLICK, handleSkipClick, false, 0, true);
_currentTF = _textOpponent;
_currentString = (_textArray[_arrayIterator] as String);
_timer_letter.start();
}
private function handleSkipClick(_arg1:MouseEvent){
destructAndRemove();
}
private function clearTexts(){
_textPlayer.text = "";
_textOpponent.text = "";
}
private function handlePauseTimer(_arg1:TimerEvent){
if (_isOpponentTalking){
_currentTF = _textPlayer;
_isOpponentTalking = false;
} else {
_currentTF = _textOpponent;
_isOpponentTalking = true;
};
_currentTF.text = "";
_arrayIterator++;
if (_arrayIterator >= _textArray.length){
destructAndRemove();
} else {
_currentString = (_textArray[_arrayIterator] as String);
_letterIterator = 0;
_timer_pause.stop();
_timer_letter.start();
};
_isItPause = false;
}
private function handleAreaClick(_arg1:MouseEvent){
if (_isItPause){
_timer_pause.stop();
handlePauseTimer(null);
} else {
_currentTF.text = _currentString;
_timer_letter.stop();
_timer_pause.start();
_isItPause = true;
};
}
private function destructAndRemove(){
_timer_letter.stop();
_timer_pause.stop();
_timer_letter.removeEventListener(TimerEvent.TIMER, handleNextLetter);
_timer_pause.removeEventListener(TimerEvent.TIMER, handlePauseTimer);
_timer_letter = null;
_timer_pause = null;
this.removeEventListener(MouseEvent.CLICK, handleAreaClick);
_btn_skip.removeEventListener(MouseEvent.CLICK, handleSkipClick);
dispatchEvent(new Event(EVT_CLOSED));
}
private function handleNextLetter(_arg1:TimerEvent){
var _local2:String;
_local2 = _currentString.charAt(_letterIterator);
_currentTF.appendText(_local2);
_letterIterator++;
if (_letterIterator >= _currentString.length){
_timer_letter.stop();
_timer_pause.start();
_isItPause = true;
};
}
}
}//package chat
Section 19
//CDeathClip (enemies.CDeathClip)
package enemies {
import flash.display.*;
public class CDeathClip extends MovieClip {
private const enemyDeathsClasses:Array;
private var Ccorpse:Class;
private var smoke:MovieClip;
private var dt:int;// = 0
private var blood:MovieClip;
private var monstertype:int;// = 0
public function CDeathClip(_arg1:CEnemyAbstract, _arg2:int=0){
var _local3:int;
enemyDeathsClasses = [[mcCorpse_m1_1, mcCorpse_m1_2, mcCorpse_m1_3], [mcCorpse_m2_1, mcCorpse_m2_2, mcCorpse_m2_3], [mcCorpse_m3_1, mcCorpse_m3_2, mcCorpse_m3_3], [mcCorpse_m4_1, mcCorpse_m4_2, mcCorpse_m4_3], [mcCorpse_m5_1, mcCorpse_m5_2, mcCorpse_m5_3], [mcCorpse_m6_1, mcCorpse_m6_2, mcCorpse_m6_3]];
super();
dt = _arg2;
monstertype = _arg1.monsterType;
x = _arg1.x;
y = _arg1.y;
if (_arg2 == 0){
_local3 = (Math.random() * 3);
if (_local3 == 0){
blood = new mcEnemyDeath();
Ccorpse = Bloodmc;
} else {
if (_local3 == 1){
blood = new mcEnemyDeath1();
Ccorpse = Bloodmc1;
} else {
blood = new mcEnemyDeath2();
Ccorpse = Bloodmc2;
};
};
blood.rotation = (_arg1.rotation - 180);
addChild(blood);
} else {
if (_arg2 == 1){
blood = new mcEnemyDeathSmoke();
blood.rotation = (_arg1.rotation - 180);
smoke = new mcSmokeFire();
Ccorpse = mcAshes;
addChild(blood);
addChild(smoke);
} else {
if (_arg2 == 2){
blood = new mcEnemyDeathPlasma();
blood.rotation = (_arg1.rotation - 180);
smoke = new mcSmokePlasma();
Ccorpse = mcPlasmaBody;
addChild(blood);
addChild(smoke);
} else {
throw (new Error("Unknown deathtype", _arg2));
};
};
};
}
public function get completed():Boolean{
return ((blood.currentFrame == blood.totalFrames));
}
public function get finalClip():Sprite{
var _local1:Sprite = new Ccorpse();
if ((_local1 is DisplayObject)){
_local1.rotation = blood.rotation;
} else {
throw (new Error("Corpse class is not Display object. Should be."));
};
smoke = null;
blood = null;
return (_local1);
}
public function get finalBody():Sprite{
var _local1:Class;
var _local2:int;
var _local3:Sprite;
if (dt == 0){
_local2 = (Math.random() * 3);
_local1 = enemyDeathsClasses[monstertype][_local2];
_local3 = (new (_local1) as Sprite);
return (_local3);
};
return (new Sprite());
}
}
}//package enemies
Section 20
//CEnemy_1_Emo (enemies.CEnemy_1_Emo)
package enemies {
public class CEnemy_1_Emo extends CEnemyAbstract {
public function CEnemy_1_Emo(_arg1:int=1){
trace(":MONSTER: EMO here");
super(_arg1);
monstertype = 0;
stl_str_base = 1;
stl_spd_base = 3;
stl_hls_base = 1;
stl_str_prob = 0.2;
stl_spd_prob = 0.6;
stl_hls_prob = 0.2;
stp_dmgmin_base = 1;
stp_dmgmax_base = 3;
stp_speedmin_base = 2.1;
stp_speedmax_base = 2.4;
stp_healthmin_base = 1;
stp_healthmax_base = 3;
generatestats(_arg1);
imgwalk = new mcEnemy_Knife_Walk();
imgwalk.x = -17;
imgwalk.y = -16;
imgkick = new mcEnemy_Knife_Fight();
imgkick.x = -17;
imgkick.y = -15;
imghit = new mcEnemy_Knife_Hit();
imghit.x = -7;
imghit.y = -14;
imgshotblood = new someBlood();
imgshotblood.x = 0;
imgshotblood.y = 0;
img = imgwalk;
addChild(img);
_kickingframe1 = 7;
_kickingframe2 = 12;
}
}
}//package enemies
Section 21
//CEnemy_2_Hippie (enemies.CEnemy_2_Hippie)
package enemies {
public class CEnemy_2_Hippie extends CEnemyAbstract {
public function CEnemy_2_Hippie(_arg1:int=1){
trace(":MONSTER: HIPPIE here");
super(_arg1);
monstertype = 1;
stl_str_base = 2;
stl_spd_base = 2;
stl_hls_base = 1;
stl_str_prob = 0.4;
stl_spd_prob = 0.4;
stl_hls_prob = 0.2;
stp_dmgmin_base = 2;
stp_dmgmax_base = 6;
stp_speedmin_base = 1.8;
stp_speedmax_base = 2.2;
stp_healthmin_base = 2;
stp_healthmax_base = 4;
generatestats(_arg1);
imgwalk = new mcEnemy_Hippie_Walk();
imgwalk.x = -16;
imgwalk.y = -14;
imgkick = new mcEnemy_Hippie_Fight();
imgkick.x = -13;
imgkick.y = -21;
imghit = new mcEnemy_Hippie_Hit();
imghit.x = -15;
imghit.y = -14;
imgshotblood = new someBlood();
imgshotblood.x = -2;
imgshotblood.y = 0;
img = imgwalk;
addChild(img);
_kickingframe1 = 5;
_kickingframe2 = 9;
}
}
}//package enemies
Section 22
//CEnemy_3_Civil (enemies.CEnemy_3_Civil)
package enemies {
public class CEnemy_3_Civil extends CEnemyAbstract {
public function CEnemy_3_Civil(_arg1:int=1){
trace(":MONSTER: CIVILIAN here");
super(_arg1);
monstertype = 2;
stl_str_base = 2;
stl_spd_base = 1;
stl_hls_base = 2;
stl_str_prob = 0.3;
stl_spd_prob = 0.3;
stl_hls_prob = 0.4;
stp_dmgmin_base = 2;
stp_dmgmax_base = 4;
stp_speedmin_base = 1.7;
stp_speedmax_base = 2;
stp_healthmin_base = 3;
stp_healthmax_base = 4;
generatestats(_arg1);
imgwalk = new mcEnemy_Sabre_Walk();
imgwalk.x = -18;
imgwalk.y = -20;
imgkick = new mcEnemy_Sabre_Fight();
imgkick.x = -17;
imgkick.y = -34;
imghit = new mcEnemy_Sabre_Hit();
imghit.x = -18;
imghit.y = -26;
imgshotblood = new someBlood();
imgshotblood.x = -1;
imgshotblood.y = 0;
img = imgwalk;
addChild(img);
_kickingframe1 = 10;
_kickingframe2 = 13;
}
}
}//package enemies
Section 23
//CEnemy_4_Hooligan (enemies.CEnemy_4_Hooligan)
package enemies {
public class CEnemy_4_Hooligan extends CEnemyAbstract {
public function CEnemy_4_Hooligan(_arg1:int=1){
trace(":MONSTER: HOOLIGAN here");
super(_arg1);
monstertype = 3;
stl_str_base = 2;
stl_spd_base = 1;
stl_hls_base = 2;
stl_str_prob = 0.4;
stl_spd_prob = 0.2;
stl_hls_prob = 0.4;
stp_dmgmin_base = 2;
stp_dmgmax_base = 6;
stp_speedmin_base = 1.6;
stp_speedmax_base = 1.85;
stp_healthmin_base = 4;
stp_healthmax_base = 6;
generatestats(_arg1);
imgwalk = new mcEnemy_Fist_Walk();
imgwalk.x = -16;
imgwalk.y = -14;
imgkick = new mcEnemy_Fist_Fight();
imgkick.x = -11;
imgkick.y = -17;
imghit = new mcEnemy_Fist_Hit();
imghit.x = -15;
imghit.y = -17;
imgshotblood = new someBlood();
img = imgwalk;
addChild(img);
_kickingframe1 = 5;
_kickingframe2 = 11;
}
}
}//package enemies
Section 24
//CEnemy_5_Biker (enemies.CEnemy_5_Biker)
package enemies {
public class CEnemy_5_Biker extends CEnemyAbstract {
public function CEnemy_5_Biker(_arg1:int=1){
trace(":MONSTER: BIKER here");
super(_arg1);
monstertype = 4;
stl_str_base = 1;
stl_spd_base = 1;
stl_hls_base = 3;
stl_str_prob = 0.35;
stl_spd_prob = 0.15;
stl_hls_prob = 0.5;
stp_dmgmin_base = 3;
stp_dmgmax_base = 7;
stp_speedmin_base = 1.4;
stp_speedmax_base = 1.7;
stp_healthmin_base = 7;
stp_healthmax_base = 10;
generatestats(_arg1);
imgwalk = new mcEnemy_Biker_Walk();
imgwalk.x = -10;
imgwalk.y = -17;
imgkick = new mcEnemy_Biker_Fight();
imgkick.x = -12;
imgkick.y = -17;
imghit = new mcEnemy_Biker_Hit();
imghit.x = -6;
imghit.y = -15;
imgshotblood = new someBlood();
img = imgwalk;
addChild(img);
_kickingframe1 = 7;
_kickingframe2 = 13;
}
}
}//package enemies
Section 25
//CEnemy_6_Skin (enemies.CEnemy_6_Skin)
package enemies {
public class CEnemy_6_Skin extends CEnemyAbstract {
public function CEnemy_6_Skin(_arg1:int=1){
trace(":MONSTER: SKINHEAD here");
super(_arg1);
monstertype = 5;
stl_str_base = 3;
stl_spd_base = 1;
stl_hls_base = 1;
stl_str_prob = 0.46;
stl_spd_prob = 0.27;
stl_hls_prob = 0.27;
stp_dmgmin_base = 4;
stp_dmgmax_base = 8;
stp_speedmin_base = 1.4;
stp_speedmax_base = 1.7;
stp_healthmin_base = 5;
stp_healthmax_base = 8;
generatestats(_arg1);
imgwalk = new mcEnemy_Bita_Walk();
imgwalk.x = -15;
imgwalk.y = -30;
imgkick = new mcEnemy_Bita_Fight();
imgkick.x = -35;
imgkick.y = -25;
imghit = new mcEnemy_Bita_Hit();
imghit.x = -26;
imghit.y = -11;
imgshotblood = new someBlood();
imgshotblood.x = -1;
imgshotblood.y = 0;
img = imgwalk;
addChild(img);
_kickingframe1 = 10;
_kickingframe2 = 13;
}
}
}//package enemies
Section 26
//CEnemyAbstract (enemies.CEnemyAbstract)
package enemies {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
public class CEnemyAbstract extends CObjectAbstract {
protected var stp_speedmax_base:Number;// = 3
protected var hp:int;// = 1
protected var stp_healthmin_base:Number;// = 1
protected var imgwalk:MovieClip;
protected var monstertype:int;// = 0
protected var stl_str:Number;// = 1
var shadow:DropShadowFilter;
protected var _KICK:Boolean;// = false
protected var stl_str_prob:Number;// = 0.33
protected var stp_healthmax_base:Number;// = 3
protected var stl_hls_prob:Number;// = 0.33
protected var stp_speed:Number;// = 2
protected var _kickingframe1:int;// = 2
protected var _kickingframe2:int;// = 7
protected var _speed:Number;// = 4
protected var obstAware:Boolean;// = false
protected var _hpdestroyed:int;// = 0
protected var maxA:Number;// = 0.196349540849362
protected var bleeding:Boolean;// = false
protected var stp_health:int;// = 1
protected var maxA2:Number;// = 0.392699081698724
protected var stl_spd_prob:Number;// = 0.34
protected var imgkick:MovieClip;
protected var stp_dmgmin_base:Number;// = 1
protected var _aimX:Number;// = 400
protected var stl_spd:Number;// = 1
protected var _aimY:Number;// = 400
protected var _kicking:Boolean;// = false
protected var stp_dmgmin:int;// = 1
public var nischebrod:Boolean;// = false
protected var stl_str_base:Number;// = 1
protected var stl_hls_base:Number;// = 1
protected var stp_dmgmax:int;// = 2
protected var obstaSteps:int;// = 0
private var _mutant:Boolean;// = false
protected var handDmgMin;
protected var obstacles:ObjectList;
protected var stp_dmgmax_base:Number;// = 2
protected var _angle:Number;// = 0
protected var stp_speedmin_base:Number;// = 2
protected var stl_hls:Number;// = 1
protected var imgshotblood:MovieClip;
protected var _spX:Number;// = 0
protected var handDmgMax:int;
protected var _spY:Number;// = 0
protected var imghit:MovieClip;
protected var _cX:Number;// = 0
protected var _cY:Number;// = 0
protected var stl_spd_base:Number;// = 1
public function CEnemyAbstract(_arg1:int=1){
shadow = new DropShadowFilter(6, 45, 0x333333, 1, 0, 0, 1, 1, false, false, false);
super();
if (Math.random() > 0.9){
mutation();
_mutant = true;
};
}
public function get hpdestroyed():int{
return (_hpdestroyed);
}
public function get monsterType():int{
return (monstertype);
}
public function aim(_arg1:Number, _arg2:Number, _arg3:ObjectList){
_aimX = _arg1;
_aimY = _arg2;
obstacles = _arg3;
if ((((obstaSteps < 1)) && (!(obstAware)))){
aimcontrol();
} else {
obstaSteps--;
};
obstaclecontrol();
}
public function get KICK():Boolean{
return ((((imgkick.currentFrame == _kickingframe2)) || ((imgkick.currentFrame == _kickingframe1))));
}
public function generatestats(_arg1:int=1){
var _local3:Number;
stl_str = stl_str_base;
stl_hls = stl_hls_base;
stl_spd = stl_spd_base;
var _local2 = 1;
while (_local2 < _arg1) {
_local3 = Math.random();
if (_local3 < stl_str_prob){
if (stl_str < 11){
stl_str++;
};
} else {
if (_local3 < (stl_str_prob + stl_spd_prob)){
if (stl_spd < 11){
stl_spd++;
};
} else {
if (stl_hls < 11){
stl_hls++;
};
};
};
_local2++;
};
var _local4:Number = ((stp_healthmin_base * stl_hls) * 3);
var _local5:Number = ((stp_healthmax_base * stl_hls) * 3);
stp_health = (_local4 + (Math.random() * (_local5 - _local4)));
stp_dmgmin = ((stp_dmgmin_base * stl_str) * 0.6);
stp_dmgmax = ((stp_dmgmax_base * stl_str) * 0.6);
var _local6:Number = (stp_speedmin_base + ((stl_spd - 1) * 0.08));
var _local7:Number = (stp_speedmax_base + ((stl_spd - 1) * 0.08));
stp_speed = (_local6 + (Math.random() * (_local7 - _local6)));
stp_dmgmin = ((stp_dmgmin < 1)) ? 1 : stp_dmgmin;
trace("HP", stp_health, "SPEED", stp_speed, "DMG", stp_dmgmin, "-", stp_dmgmax);
hp = stp_health;
_speed = stp_speed;
if (_mutant){
hp = (stp_health * 2);
_speed = (stp_speed * 1.4);
};
}
public function kickAss(){
if (!bleeding){
removeChild(img);
img = imgkick;
imgkick.gotoAndPlay(1);
addChild(img);
_kicking = true;
};
}
public function kickStop(){
if (!bleeding){
removeChild(img);
img = imgwalk;
addChild(img);
};
_kicking = false;
}
protected function aimcontrol(){
var _local1:Number = (_aimX - _cX);
var _local2:Number = (_aimY - _cY);
var _local3:Number = Math.atan2(_local2, _local1);
if (Math.random() > 0.83){
if ((((Math.random() > 0.8)) || ((Math.abs((_angle - _local3)) < maxA2)))){
_angle = _local3;
} else {
if (_angle < _local3){
_angle = (_angle + maxA);
} else {
_angle = (_angle - maxA);
};
};
_spX = (Math.cos(_angle) * _speed);
_spY = (Math.sin(_angle) * _speed);
rotation = (_angle * divPI);
} else {
if (Math.random() > 0.4){
_angle = (_angle + ((Math.random() * 0.3) - 0.15));
_spX = (Math.cos(_angle) * _speed);
_spY = (Math.sin(_angle) * _speed);
rotation = (_angle * divPI);
};
};
}
public function spawn(_arg1:Point){
_cX = _arg1.x;
_cY = _arg1.y;
x = _arg1.x;
y = _arg1.y;
addEventListener(Event.ENTER_FRAME, onAction);
}
public function gotshot(_arg1):Boolean{
_cX = (_cX - (_spX * 3));
_cY = (_cY - (_spY * 3));
_hpdestroyed = hp;
hp = (hp - _arg1);
if (hp < 0){
hp = 0;
};
_hpdestroyed = (_hpdestroyed - hp);
if (hp <= 0){
imgshotblood = null;
imgkick = null;
shadow = null;
imgwalk = null;
img = null;
removeEventListener(Event.ENTER_FRAME, onAction);
return (true);
};
if (!bleeding){
bleeding = true;
imgshotblood.gotoAndPlay(1);
removeChild(img);
img = imghit;
imghit.gotoAndPlay(1);
addChild(img);
addChild(imgshotblood);
};
return (false);
}
public function get Damage():int{
var _local1:int = ((Math.random() * (stp_dmgmax - stp_dmgmin)) + stp_dmgmin);
return (_local1);
}
public function get Img():MovieClip{
return (img);
}
public function mutation(){
var rn:Function = function ():Number{
return ((Math.random() * 0.6));
};
var matrix:Array = [rn(), rn(), rn(), 0, 0, rn(), rn(), rn(), 0, 0, rn(), rn(), rn(), 0, 0, 0, 0, 0, 1, 0];
var goGreyScale:ColorMatrixFilter = new ColorMatrixFilter(matrix);
var filtersArr:Array = filters;
filtersArr.unshift(goGreyScale);
filters = filtersArr;
}
public function get kicking():Boolean{
return (_kicking);
}
protected function obstaclecontrol(){
var obs:Sprite;
var o_sqx:Number;
var o_sqy:Number;
var difx:Number;
var dify:Number;
var squaretest:Boolean;
var obsRad:Number;
var distance:Number;
var choice:int;
var newAngle:Number;
var compDistance:Function = function ():Number{
var _local1:Number = (obs.x - _cX);
var _local2:Number = (obs.y - _cY);
return (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))));
};
var i:int = obstacles.count;
while (i > 0) {
i = (i - 1);
obs = (obstacles.getItem(i) as Sprite);
o_sqx = (obs.x >> 5);
o_sqy = (obs.y >> 5);
difx = (o_sqx - sqx);
dify = (o_sqy - sqy);
squaretest = (((((difx ^ (difx >> 31)) - (difx >> 31)) < 2)) && ((((dify ^ (dify >> 31)) - (dify >> 31)) < 2)));
if (squaretest){
obsRad = (obs.width + 30);
distance = compDistance();
if (distance < obsRad){
obstaSteps = 3;
obstAware = true;
choice = 1;
if (Math.random() > 0.5){
choice = -1;
};
newAngle = (_angle + (choice * maxA));
_cX = (_cX + (Math.cos(newAngle) * _speed));
_cY = (_cY + (Math.sin(newAngle) * _speed));
if (distance > compDistance()){
_cX = (_cX - (Math.cos(newAngle) * _speed));
_cY = (_cY - (Math.sin(newAngle) * _speed));
newAngle = (_angle - (choice * maxA2));
_angle = newAngle;
} else {
_cX = (_cX - (Math.cos(newAngle) * _speed));
_cY = (_cY - (Math.sin(newAngle) * _speed));
_angle = newAngle;
};
_spX = (Math.cos(_angle) * _speed);
_spY = (Math.sin(_angle) * _speed);
} else {
obstAware = false;
obstaSteps = 0;
};
};
};
}
override public function onAction(_arg1:Event){
if (!kicking){
_cX = (_cX + _spX);
_cY = (_cY + _spY);
} else {
_cX = (_cX + (_spX / 20));
_cY = (_cY + (_spY / 20));
};
x = int(_cX);
y = int(_cY);
aimcontrol();
if (((_kicking) && ((imgkick.currentFrame == imgkick.totalFrames)))){
kickStop();
};
if (bleeding){
if (imgshotblood.currentFrame == imgshotblood.totalFrames){
removeChild(imgshotblood);
imgshotblood.gotoAndStop(1);
};
if (imghit.currentFrame == imghit.totalFrames){
removeChild(img);
img = imgwalk;
imghit.stop();
addChild(img);
bleeding = false;
};
};
}
}
}//package enemies
Section 27
//CEnemyBus (enemies.CEnemyBus)
package enemies {
import flash.display.*;
import levels.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
public class CEnemyBus extends MovieClip {
private var _delay:int;// = 10000
public var obstacle:MovieClip;
public var bus1_crash:MovieClip;
public var bus3_crash:MovieClip;
private var _delayTimer:Timer;
private var _hp:int;// = 200
private var _monsterLevel:int;// = 1
private var _monsterLevelDev:int;// = 0
public var busObstacle:Sprite;
public var bus1:MovieClip;
public var bus3:MovieClip;
public var bus2:MovieClip;
private var hitGlowCount:int;// = 0
private var hitGlow:GlowFilter;
public var nr:int;
private var readyToDeliver:Boolean;// = false
private var _monsterTypePr:Array;
public var bus2_crash:MovieClip;
public var drop:MovieClip;
private var _spawn:CSpawnLocation;
public static const EVT_BUS_COME:String = "Bus came, have to set up obsacle!";
public function CEnemyBus(){
_monsterTypePr = [1, 1, 1, 1, 1, 1];
hitGlow = new GlowFilter(0xFF6600, 1, 12, 12, 1, 3, true, false);
super();
stop();
}
private function die(){
removeEventListener(Event.ENTER_FRAME, handleEFrame);
readyToDeliver = false;
filters = [];
hitGlowCount = 0;
gotoAndPlay(41);
}
public function get isReadyToDeliver():Boolean{
return (readyToDeliver);
}
public function hit(_arg1:int){
if (_hp > 0){
_hp = (_hp - _arg1);
filters = [hitGlow];
hitGlowCount = 2;
if (_hp <= 0){
die();
};
};
}
public function getSpawnedMonster():CEnemyAbstract{
var _local1:CEnemyAbstract;
var _local3:Class;
var _local2:int = _monsterLevel;
if (_monsterLevelDev > 0){
_local2 = ((_monsterLevel - _monsterLevelDev) + int((Math.random() * ((_monsterLevelDev * 2) + 1))));
};
var _local4:Number = Math.random();
if (_local4 < _monsterTypePr[0]){
_local3 = CMonsterIncubator.MonsterTypes[0];
} else {
if (_local4 < _monsterTypePr[1]){
_local3 = CMonsterIncubator.MonsterTypes[1];
} else {
if (_local4 < _monsterTypePr[2]){
_local3 = CMonsterIncubator.MonsterTypes[2];
} else {
if (_local4 < _monsterTypePr[3]){
_local3 = CMonsterIncubator.MonsterTypes[3];
} else {
if (_local4 < _monsterTypePr[4]){
_local3 = CMonsterIncubator.MonsterTypes[4];
} else {
_local3 = CMonsterIncubator.MonsterTypes[5];
};
};
};
};
};
_local1 = new _local3(_local2);
var _local5:Point = _spawn.spawnpoint;
_local1.spawn(_local5);
return (_local1);
}
public function destruct(){
removeEventListener(Event.ENTER_FRAME, handleEFrame);
_hp = 0;
readyToDeliver = false;
filters = [];
hitGlowCount = 0;
if (_delayTimer != null){
_delayTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleDelayTimer);
_delayTimer.stop();
};
_delayTimer = null;
_monsterTypePr = null;
busObstacle = null;
stop();
}
public function get hp():int{
return (_hp);
}
public function get isFinished():Boolean{
return ((currentFrame == totalFrames));
}
public function get isAlive():Boolean{
return ((_hp > 0));
}
private function handleDelayTimer(_arg1:TimerEvent){
addEventListener(Event.ENTER_FRAME, handleEFrame);
gotoAndPlay(2);
trace("----------- BUS GOEZ!!");
SoundManager.inst().play(SoundManager.BUS_CAME);
_delayTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleDelayTimer);
_delayTimer = null;
}
private function handleEFrame(_arg1:Event){
if (currentFrame == 39){
dispatchEvent(new Event(EVT_BUS_COME));
};
if (currentFrame == 40){
readyToDeliver = true;
} else {
readyToDeliver = false;
};
if (hitGlowCount == 0){
filters = [];
} else {
hitGlowCount--;
};
parent.addChild(this);
}
public function startMonsters(_arg1:Array, _arg2:int=10000, _arg3:int=200, _arg4:int=1, _arg5:int=0){
_delay = _arg2;
_hp = _arg3;
_monsterLevel = _arg4;
_monsterLevelDev = _arg5;
if (_arg4 < 1){
_monsterLevel = 1;
} else {
_monsterLevel = _arg4;
};
if (_arg5 > _monsterLevel){
_monsterLevelDev = (_monsterLevel - 1);
if (_monsterLevelDev < 0){
_monsterLevelDev = 0;
};
} else {
_monsterLevelDev = _arg5;
};
_monsterTypePr = _arg1;
var _local6:Number = (((((_monsterTypePr[0] + _monsterTypePr[1]) + _monsterTypePr[2]) + _monsterTypePr[3]) + _monsterTypePr[4]) + _monsterTypePr[5]);
var _local7:int;
while (_local7 < 6) {
_monsterTypePr[_local7] = (_monsterTypePr[_local7] / _local6);
_local7++;
};
var _local8:Sprite = (getChildByName("drop") as Sprite);
trace((x + _local8.x), (y + _local8.y), ((x + _local8.x) + _local8.width), ((y + _local8.y) + _local8.height));
_spawn = new CSpawnLocation(((x + _local8.x) + this.parent.x), ((y + _local8.y) + this.parent.y), (((x + _local8.x) + this.parent.x) + _local8.width), (((y + _local8.y) + this.parent.y) + _local8.height));
removeChild(_local8);
_local8 = null;
_delayTimer = new Timer(_delay, 1);
_delayTimer.addEventListener(TimerEvent.TIMER_COMPLETE, handleDelayTimer, false, 0, true);
_delayTimer.start();
busObstacle = (getChildByName("obstacle") as Sprite);
busObstacle.visible = false;
busObstacle.x = (busObstacle.x + (this.parent.x + x));
busObstacle.y = (busObstacle.y + (this.parent.y + y));
}
}
}//package enemies
Section 28
//CEnemyTiolkaEnemy (enemies.CEnemyTiolkaEnemy)
package enemies {
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
public class CEnemyTiolkaEnemy extends CEnemyAbstract {
private var _strafeProb:Number;// = 0.5
private var glowfilter:GlowFilter;
private var tiolka_distance:int;// = 100
private var _strafe:Boolean;// = false
private var _strafeFrames:int;// = 0
private var _strafeMul:Number;// = 3
private var _speedBase:int;// = 2
private var shadowfilter:DropShadowFilter;
public function CEnemyTiolkaEnemy(_arg1:int=1){
glowfilter = new GlowFilter(0xFF0000, 1, 2, 2, 1, 3, false, false);
shadowfilter = new DropShadowFilter(4, 45, 0x111111, 0.8, 2, 2, 1, 1, false, false, false);
super();
trace(":MONSTER: TIOLKA here");
monstertype = 5;
stl_str_base = 7;
stl_spd_base = 2;
stl_hls_base = 20;
stl_str_prob = 0.46;
stl_spd_prob = 0.27;
stl_hls_prob = 0.27;
stp_dmgmin_base = 4;
stp_dmgmax_base = 8;
stp_speedmin_base = 2.6;
stp_speedmax_base = 3;
stp_healthmin_base = 95;
stp_healthmax_base = 100;
generatestats(25);
_speedBase = _speed;
imgwalk = new mcTiolkaWalk();
imgwalk.x = 0;
imgwalk.y = 0;
imgkick = new mcTiolkaHit();
imgkick.x = 0;
imgkick.y = 0;
imghit = new mcTiolkaHit();
imghit.x = 0;
imghit.y = 0;
imgshotblood = new someBlood();
imgshotblood.x = -1;
imgshotblood.y = 0;
img = imgwalk;
addChild(img);
_kickingframe1 = 2;
_kickingframe2 = 3;
filters = [glowfilter, shadowfilter];
scaleX = 1.4;
scaleY = 1.4;
var _local2:ColorTransform = new ColorTransform(1.2, 0.2, 0.2, 1, 0, 0, 0, 0);
this.transform.colorTransform = _local2;
}
override protected function aimcontrol(){
if (!_strafe){
super.aimcontrol();
};
}
override public function gotshot(_arg1):Boolean{
var _local2:Number = _strafeProb;
if (_strafe){
_local2 = (_strafeProb / 10);
};
if (Math.random() < _local2){
if (_strafe){
_strafe = false;
aimcontrol();
};
_strafe = true;
_strafeFrames = (int((Math.random() * 10)) + 8);
_speed = (_speedBase * _strafeMul);
if (Math.random() > 0.5){
_angle = (_angle + (Math.PI / 4));
} else {
_angle = (_angle - (Math.PI / 4));
};
_spX = (Math.cos(_angle) * _speed);
_spY = (Math.sin(_angle) * _speed);
};
_cX = (_cX - (_spX * 0.4));
_cY = (_cY - (_spY * 0.4));
_hpdestroyed = hp;
hp = (hp - _arg1);
if (hp < 0){
hp = 0;
};
_hpdestroyed = (_hpdestroyed - hp);
if (hp <= 0){
imgshotblood = null;
imgkick = null;
shadow = null;
imgwalk = null;
img = null;
removeEventListener(Event.ENTER_FRAME, onAction);
return (true);
};
if (!bleeding){
bleeding = true;
imgshotblood.gotoAndPlay(1);
removeChild(img);
img = imghit;
imghit.gotoAndPlay(1);
addChild(img);
addChild(imgshotblood);
};
return (false);
}
override public function onAction(_arg1:Event){
var e = _arg1;
var compDistance:Function = function ():Number{
var _local1:Number = (_aimX - _cX);
var _local2:Number = (_aimY - _cY);
return (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))));
};
if (_strafe){
_strafeFrames--;
if (_strafeFrames <= 0){
_strafe = false;
};
};
if (compDistance() > tiolka_distance){
if (_speedBase != _speed){
_speed = _speedBase;
};
} else {
if ((((_speedBase == _speed)) && ((Math.random() > 0.85)))){
_speed = (_speed * 2.5);
_spX = (_spX * 2.5);
_spY = (_spY * 2.5);
};
};
if (!kicking){
_cX = (_cX + _spX);
_cY = (_cY + _spY);
} else {
_cX = (_cX + (_spX / 20));
_cY = (_cY + (_spY / 20));
};
img.play();
aimcontrol();
x = int(_cX);
y = int(_cY);
if (((_kicking) && ((imgkick.currentFrame == imgkick.totalFrames)))){
kickStop();
};
if (bleeding){
if (imgshotblood.currentFrame == imgshotblood.totalFrames){
removeChild(imgshotblood);
imgshotblood.gotoAndStop(1);
};
if (imghit.currentFrame == imghit.totalFrames){
removeChild(img);
img = imgwalk;
imghit.stop();
addChild(img);
bleeding = false;
};
};
if (glowfilter.strength < 3){
glowfilter.blurX = (glowfilter.blurX + 1);
glowfilter.blurY = (glowfilter.blurY + 1);
glowfilter.strength = (glowfilter.strength + 0.2);
} else {
glowfilter.blurX = 2;
glowfilter.blurY = 2;
glowfilter.strength = 1;
};
filters = [glowfilter, shadowfilter];
}
}
}//package enemies
Section 29
//CEnemyTiolkaFriend (enemies.CEnemyTiolkaFriend)
package enemies {
import flash.events.*;
import flash.filters.*;
public class CEnemyTiolkaFriend extends CEnemyAbstract {
private var shadowfilter:DropShadowFilter;
private var glowfilter:GlowFilter;
public static const tiolka_distance:Number = 80;
public function CEnemyTiolkaFriend(_arg1:int=1){
glowfilter = new GlowFilter(0xFF5500, 1, 2, 2, 1, 3, false, false);
shadowfilter = new DropShadowFilter(4, 45, 0x111111, 0.8, 2, 2, 1, 1, false, false, false);
super();
trace(":MONSTER: TIOLKA here");
monstertype = 5;
stl_str_base = 3;
stl_spd_base = 2;
stl_hls_base = 1;
stl_str_prob = 0.46;
stl_spd_prob = 0.35;
stl_hls_prob = 0.35;
stp_dmgmin_base = 4;
stp_dmgmax_base = 8;
stp_speedmin_base = 1.9;
stp_speedmax_base = 2.1;
stp_healthmin_base = 10;
stp_healthmax_base = 15;
generatestats(_arg1);
imgwalk = new mcTiolkaWalk();
imgwalk.x = 0;
imgwalk.y = 0;
imgkick = new mcTiolkaWalk();
imgkick.x = 0;
imgkick.y = 0;
imghit = new mcTiolkaHit();
imghit.x = 0;
imghit.y = 0;
imgshotblood = new someBlood();
imgshotblood.x = -1;
imgshotblood.y = 0;
img = imgwalk;
addChild(img);
_kickingframe1 = 10;
_kickingframe2 = 13;
filters = [glowfilter, shadowfilter];
}
override public function onAction(_arg1:Event){
var e = _arg1;
var compDistance:Function = function ():Number{
var _local1:Number = (_aimX - _cX);
var _local2:Number = (_aimY - _cY);
return (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))));
};
if (compDistance() > tiolka_distance){
if (!kicking){
_cX = (_cX + _spX);
_cY = (_cY + _spY);
} else {
_cX = (_cX + (_spX / 20));
_cY = (_cY + (_spY / 20));
};
img.play();
aimcontrol();
} else {
img.gotoAndStop(3);
};
x = int(_cX);
y = int(_cY);
if (((_kicking) && ((imgkick.currentFrame == imgkick.totalFrames)))){
kickStop();
};
if (bleeding){
if (imgshotblood.currentFrame == imgshotblood.totalFrames){
removeChild(imgshotblood);
imgshotblood.gotoAndStop(1);
};
if (imghit.currentFrame == imghit.totalFrames){
removeChild(img);
img = imgwalk;
imghit.stop();
addChild(img);
bleeding = false;
};
};
}
override protected function aimcontrol(){
var _local1:Number = (_aimX - _cX);
var _local2:Number = (_aimY - _cY);
var _local3:Number = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 > tiolka_distance){
super.aimcontrol();
};
}
}
}//package enemies
Section 30
//Bounce (fl.motion.easing.Bounce)
package fl.motion.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.motion.easing
Section 31
//Fly (fl.transitions.Fly)
package fl.transitions {
import flash.display.*;
import flash.geom.*;
public class Fly extends Transition {
protected var _stagePoints:Object;
public var className:String;// = "Fly"
protected var _yInitial:Number;
protected var _xInitial:Number;
protected var _startPoint:Number;// = 4
protected var _yFinal:Number;
protected var _xFinal:Number;
public function Fly(_arg1:MovieClip, _arg2:Object, _arg3:TransitionManager){
var _local7:String;
var _local8:Rectangle;
super(_arg1, _arg2, _arg3);
if (_arg2.startPoint){
this._startPoint = _arg2.startPoint;
};
this._xFinal = this.manager.contentAppearance.x;
this._yFinal = this.manager.contentAppearance.y;
var _local4:Stage = _arg1.stage;
var _local5:String = _local4.scaleMode;
_local4.scaleMode = StageScaleMode.SHOW_ALL;
var _local6:Object = (this._stagePoints = {});
_local6[1] = new Point(0, 0);
_local6[2] = new Point(0, 0);
_local6[3] = new Point(_local4.stageWidth, 0);
_local6[4] = new Point(0, 0);
_local6[5] = new Point((_local4.stageWidth / 2), (_local4.stageHeight / 2));
_local6[6] = new Point(_local4.stageWidth, 0);
_local6[7] = new Point(0, _local4.stageHeight);
_local6[8] = new Point(0, _local4.stageHeight);
_local6[9] = new Point(_local4.stageWidth, _local4.stageHeight);
for (_local7 in _local6) {
this._content.parent.globalToLocal(_local6[_local7]);
};
_local8 = this._innerBounds;
_local6[1].x = (_local6[1].x - _local8.right);
_local6[1].y = (_local6[1].y - _local8.bottom);
_local6[2].x = this.manager.contentAppearance.x;
_local6[2].y = (_local6[2].y - _local8.bottom);
_local6[3].x = (_local6[3].x - _local8.left);
_local6[3].y = (_local6[3].y - _local8.bottom);
_local6[4].x = (_local6[4].x - _local8.right);
_local6[4].y = this.manager.contentAppearance.y;
_local6[5].x = (_local6[5].x - ((_local8.right + _local8.left) / 2));
_local6[5].y = (_local6[5].y - ((_local8.bottom + _local8.top) / 2));
_local6[6].x = (_local6[6].x - _local8.left);
_local6[6].y = this.manager.contentAppearance.y;
_local6[7].x = (_local6[7].x - _local8.right);
_local6[7].y = (_local6[7].y - _local8.top);
_local6[8].x = this.manager.contentAppearance.x;
_local6[8].y = (_local6[8].y - _local8.top);
_local6[9].x = (_local6[9].x - _local8.left);
_local6[9].y = (_local6[9].y - _local8.top);
this._xInitial = this._stagePoints[this._startPoint].x;
this._yInitial = this._stagePoints[this._startPoint].y;
_local4.scaleMode = _local5;
}
override protected function _render(_arg1:Number):void{
this._content.x = (this._xFinal + ((this._xInitial - this._xFinal) * (1 - _arg1)));
this._content.y = (this._yFinal + ((this._yInitial - this._yFinal) * (1 - _arg1)));
}
override public function get type():Class{
return (Fly);
}
}
}//package fl.transitions
Section 32
//Transition (fl.transitions.Transition)
package fl.transitions {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
public class Transition extends EventDispatcher {
protected var _direction:uint;// = 0
protected var _height:Number;// = NAN
protected var _easing:Function;
protected var _twn:Tween;
protected var _width:Number;// = NAN
protected var _outerBounds:Rectangle;
protected var _progress:Number;
public var ID:int;
protected var _innerBounds:Rectangle;
protected var _manager:TransitionManager;
protected var _duration:Number;// = 2
protected var _content:MovieClip;
public static const IN:uint = 0;
public static const OUT:uint = 1;
public function Transition(_arg1:MovieClip, _arg2:Object, _arg3:TransitionManager){
this.content = _arg1;
this.direction = _arg2.direction;
this.duration = _arg2.duration;
this.easing = _arg2.easing;
this.manager = _arg3;
this._innerBounds = this.manager._innerBounds;
this._outerBounds = this.manager._outerBounds;
this._width = this.manager._width;
this._height = this.manager._height;
this._resetTween();
}
public function get type():Class{
return (Transition);
}
public function cleanUp():void{
this.removeEventListener("transitionInDone", this._manager.transitionInDone);
this.removeEventListener("transitionOutDone", this._manager.transitionOutDone);
this.stop();
}
public function stop():void{
this._twn.fforward();
this._twn.stop();
}
public function onMotionFinished(_arg1:Object):void{
if (this.direction == Transition.OUT){
this.dispatchEvent(new Event("transitionOutDone"));
} else {
this.dispatchEvent(new Event("transitionInDone"));
};
}
public function set easing(_arg1:Function):void{
this._easing = _arg1;
if (this._twn){
this._twn.func = _arg1;
};
}
public function set manager(_arg1:TransitionManager):void{
if (this._manager){
this.removeEventListener("transitionInDone", this._manager.transitionInDone);
this.removeEventListener("transitionOutDone", this._manager.transitionOutDone);
};
this._manager = _arg1;
this.addEventListener("transitionInDone", this._manager.transitionInDone);
this.addEventListener("transitionOutDone", this._manager.transitionOutDone);
}
private function _resetTween():void{
if (this._twn){
this._twn.stop();
this._twn.removeEventListener(TweenEvent.MOTION_FINISH, this.onMotionFinished);
};
this._twn = new Tween(this, "", this.easing, 0, 1, this.duration, true);
this._twn.stop();
this._twn.prop = "progress";
this._twn.addEventListener(TweenEvent.MOTION_FINISH, this.onMotionFinished, false, 0, true);
}
public function drawBox(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
_arg1.graphics.moveTo(_arg2, _arg3);
_arg1.graphics.lineTo((_arg2 + _arg4), _arg3);
_arg1.graphics.lineTo((_arg2 + _arg4), (_arg3 + _arg5));
_arg1.graphics.lineTo(_arg2, (_arg3 + _arg5));
_arg1.graphics.lineTo(_arg2, _arg3);
}
public function set progress(_arg1:Number):void{
if (this._progress == _arg1){
return;
};
this._progress = _arg1;
if (this._direction){
this._render((1 - _arg1));
} else {
this._render(_arg1);
};
this.dispatchEvent(new Event("transitionProgress"));
}
public function get duration():Number{
return (this._duration);
}
public function set duration(_arg1:Number):void{
if (_arg1){
this._duration = _arg1;
if (this._twn){
this._twn.duration = _arg1;
};
};
}
public function start():void{
this.content.visible = true;
this._twn.start();
}
public function get easing():Function{
return (this._easing);
}
public function get manager():TransitionManager{
return (this._manager);
}
public function set content(_arg1:MovieClip):void{
if (_arg1){
this._content = _arg1;
if (this._twn){
this._twn.obj = _arg1;
};
};
}
protected function _render(_arg1:Number):void{
}
public function get content():MovieClip{
return (this._content);
}
public function drawCircle(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number):void{
_arg1.graphics.moveTo((_arg2 + _arg4), _arg3);
_arg1.graphics.curveTo((_arg4 + _arg2), ((Math.tan((Math.PI / 8)) * _arg4) + _arg3), ((Math.sin((Math.PI / 4)) * _arg4) + _arg2), ((Math.sin((Math.PI / 4)) * _arg4) + _arg3));
_arg1.graphics.curveTo(((Math.tan((Math.PI / 8)) * _arg4) + _arg2), (_arg4 + _arg3), _arg2, (_arg4 + _arg3));
_arg1.graphics.curveTo(((-(Math.tan((Math.PI / 8))) * _arg4) + _arg2), (_arg4 + _arg3), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg2), ((Math.sin((Math.PI / 4)) * _arg4) + _arg3));
_arg1.graphics.curveTo((-(_arg4) + _arg2), ((Math.tan((Math.PI / 8)) * _arg4) + _arg3), (-(_arg4) + _arg2), _arg3);
_arg1.graphics.curveTo((-(_arg4) + _arg2), ((-(Math.tan((Math.PI / 8))) * _arg4) + _arg3), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg2), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg3));
_arg1.graphics.curveTo(((-(Math.tan((Math.PI / 8))) * _arg4) + _arg2), (-(_arg4) + _arg3), _arg2, (-(_arg4) + _arg3));
_arg1.graphics.curveTo(((Math.tan((Math.PI / 8)) * _arg4) + _arg2), (-(_arg4) + _arg3), ((Math.sin((Math.PI / 4)) * _arg4) + _arg2), ((-(Math.sin((Math.PI / 4))) * _arg4) + _arg3));
_arg1.graphics.curveTo((_arg4 + _arg2), ((-(Math.tan((Math.PI / 8))) * _arg4) + _arg3), (_arg4 + _arg2), _arg3);
}
public function get progress():Number{
return (this._progress);
}
private function _noEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public function set direction(_arg1:Number):void{
this._direction = (_arg1) ? 1 : 0;
}
public function get direction():Number{
return (this._direction);
}
}
}//package fl.transitions
Section 33
//TransitionManager (fl.transitions.TransitionManager)
package fl.transitions {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
public class TransitionManager extends EventDispatcher {
public var type:Object;
public var _width:Number;// = NAN
public var _height:Number;// = NAN
public var _outerBounds:Rectangle;
private var _visualPropList:Object;
private var _triggerEvent:String;
public var className:String;// = "TransitionManager"
public var _innerBounds:Rectangle;
private var _content:MovieClip;
private var _contentAppearance:Object;
private var _transitions:Object;
private static var IDCount:int = 0;
public function TransitionManager(_arg1:MovieClip){
this.type = TransitionManager;
this._visualPropList = {x:null, y:null, scaleX:null, scaleY:null, alpha:null, rotation:null};
super();
this.content = _arg1;
this._transitions = {};
}
public function removeTransition(_arg1:Transition):Boolean{
if (((((!(_arg1)) || (!(this._transitions)))) || (!(this._transitions[_arg1.ID])))){
return (false);
};
_arg1.cleanUp();
return (delete this._transitions[_arg1.ID]);
}
public function saveContentAppearance():void{
var _local2:Object;
var _local3:String;
var _local1:MovieClip = this._content;
if (!this._contentAppearance){
_local2 = (this._contentAppearance = {});
for (_local3 in this._visualPropList) {
_local2[_local3] = _local1[_local3];
};
_local2.colorTransform = _local1.transform.colorTransform;
};
this._innerBounds = _local1.getBounds(_local1);
this._outerBounds = _local1.getBounds(_local1.parent);
this._width = _local1.width;
this._height = _local1.height;
}
public function removeAllTransitions():void{
var _local1:Transition;
for each (_local1 in this._transitions) {
_local1.cleanUp();
this.removeTransition(_local1);
};
}
function transitionInDone(_arg1:Object):void{
var _local2:Boolean;
this.removeTransition(_arg1.target);
if (this.numInTransitions == 0){
_local2 = this._content.visible;
if ((((this._triggerEvent == "hide")) || ((this._triggerEvent == "hideChild")))){
this._content.visible = false;
};
if (_local2){
this.dispatchEvent(new Event("allTransitionsInDone"));
};
};
}
public function addTransition(_arg1:Transition):Transition{
_arg1.ID = ++TransitionManager.IDCount;
this._transitions[_arg1.ID] = _arg1;
return (_arg1);
}
public function startTransition(_arg1:Object):Transition{
this.removeTransition(this.findTransition(_arg1));
var _local2:Class = _arg1.type;
var _local3:Transition = new _local2(this._content, _arg1, this);
this.addTransition(_local3);
_local3.start();
return (_local3);
}
function transitionOutDone(_arg1:Object):void{
var _local2:Boolean;
this.removeTransition(_arg1.target);
if (this.numOutTransitions == 0){
this.restoreContentAppearance();
_local2 = this._content.visible;
if (((_local2) && ((((this._triggerEvent == "hide")) || ((this._triggerEvent == "hideChild")))))){
this._content.visible = false;
};
if (_local2){
this.dispatchEvent(new Event("allTransitionsOutDone"));
};
};
}
public function restoreContentAppearance():void{
var _local3:String;
var _local1:MovieClip = this._content;
var _local2:Object = this._contentAppearance;
for (_local3 in this._visualPropList) {
_local1[_local3] = _local2[_local3];
};
_local1.transform.colorTransform = _local2.colorTransform;
}
public function get numTransitions():Number{
var _local2:Transition;
var _local1:Number = 0;
for each (_local2 in this._transitions) {
_local1++;
};
return (_local1);
}
public function findTransition(_arg1:Object):Transition{
var _local2:Transition;
for each (_local2 in this._transitions) {
if (_local2.type == _arg1.type){
return (_local2);
};
};
return (null);
}
public function set content(_arg1:MovieClip):void{
this._content = _arg1;
this.saveContentAppearance();
}
public function get numInTransitions():Number{
var _local3:Transition;
var _local1:Number = 0;
var _local2:Object = this._transitions;
for each (_local3 in _local2) {
if (!_local3.direction){
_local1++;
};
};
return (_local1);
}
public function get numOutTransitions():Number{
var _local3:Transition;
var _local1:Number = 0;
var _local2:Object = this._transitions;
for each (_local3 in _local2) {
if (_local3.direction){
_local1++;
};
};
return (_local1);
}
public function get content():MovieClip{
return (this._content);
}
public function get transitionsList():Object{
return (this._transitions);
}
public function get contentAppearance():Object{
return (this._contentAppearance);
}
public static function start(_arg1:MovieClip, _arg2:Object):Transition{
if (!_arg1.__transitionManager){
_arg1.__transitionManager = new TransitionManager(_arg1);
};
if (_arg2.direction == 1){
_arg1.__transitionManager._triggerEvent = "hide";
} else {
_arg1.__transitionManager._triggerEvent = "reveal";
};
return (_arg1.__transitionManager.startTransition(_arg2));
}
}
}//package fl.transitions
Section 34
//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
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var begin:Number;// = NAN
private var _finish:Number;// = NAN
public var change: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){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
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();
}
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 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 = 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 stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
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();
};
};
}
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 get position():Number{
return (this.getPosition(this._time));
}
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 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 35
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var position:Number;// = NAN
public var time: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){
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 36
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _target:Object;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 37
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
}
}//package gs.plugins
Section 38
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class FramePlugin extends TweenPlugin {
protected var _target:MovieClip;
public var frame:int;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package gs.plugins
Section 39
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 40
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import flash.display.*;
import flash.geom.*;
import gs.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _target:DisplayObject;
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
public static const VERSION:Number = 1.1;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _target.transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_target.transform.colorTransform = _ct;
}
}
}//package gs.plugins
Section 41
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var overwriteProps:Array;
protected var _tweens:Array;
public var propName:String;
public var onComplete:Function;
public var round:Boolean;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function get changeFactor():Number{
return (_changeFactor);
}
public static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 42
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _visible:Boolean;
protected var _tween:TweenLite;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
}
}//package gs.plugins
Section 43
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package gs.plugins
Section 44
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 45
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var start:Number;
public var name:String;
public var change:Number;
public var target:Object;
public var property:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 46
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import gs.utils.tween.*;
import gs.plugins.*;
import flash.utils.*;
public class TweenLite {
public var started:Boolean;
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _hasPlugins:Boolean;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
public var gc:Boolean;
public var tweens:Array;
public var vars:Object;
public var ease:Function;
public var exposedVars:Object;
public var initTime:Number;
public var combinedTimeScale:Number;
public static const version:Number = 10.092;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
var _local2:uint = (currentTime = getTimer());
var _local3:Dictionary = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local3:Object;
var _local2:Dictionary = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 47
//CBulletAbstract (gunz.bullets.CBulletAbstract)
package gunz.bullets {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.ui.*;
public class CBulletAbstract extends CObjectAbstract {
protected var _decreased:Boolean;// = false
protected var _hita:Array;
protected var _damage:int;// = 1
protected var hitpointsnum:int;
protected var _ang:Number;// = 0
protected var _deathtype:int;// = 0
protected var _scale0:Number;// = 0.3
protected var _speed:Number;// = 20
protected var _speedsize:Number;// = 0.3
public var alive:Number;// = 1
protected var _skipVisualFrame:int;// = 1
protected var _distance:Number;// = 0
protected var _spX:Number;// = 0
protected var _spY:Number;// = 0
protected var _pointhit:Boolean;// = true
protected var hitpointsdist:Number;
protected var _props:CBulletProps;
protected var _cX:Number;// = 0
protected var _cY:Number;// = 0
public static const AMMO_ID:int = 0;
public function CBulletAbstract(){
_hita = new Array();
_props = new CBulletProps();
super();
}
public function get pointhit():Boolean{
return (_pointhit);
}
public function hit(_arg1:int):int{
if (_props.slowing){
_damage = (_damage - _arg1);
if (_damage < 1){
removeme();
alive = 0;
};
} else {
if (!_props.penetrating){
alive = 0;
_damage = 0;
removeme();
};
};
return (_damage);
}
public function damageNull(){
_damage = -1;
}
override protected function removeme(){
super.removeme();
removeEventListener(Event.ENTER_FRAME, onAction);
}
public function get hita():Array{
return (_hita);
}
public function removeit(){
alive = 0;
removeme();
}
public function get deathtype():int{
return (_deathtype);
}
public function set props(_arg1:CBulletProps){
_props = _arg1;
var _local2:int = (2 - (Math.random() * 4));
_speed = (_props.speed + _local2);
hitpointsnum = (_speed >> 3);
hitpointsdist = (1 / hitpointsnum);
var _local3:Number = ((10 - _props.skill) / 10);
var _local4:Number = (_props.damage_max - _props.damage_min);
_damage = ((_props.damage_min + ((Math.random() * _local4) * 2)) - (_local4 * _local3));
if (_damage > _props.damage_max){
_damage = _props.damage_max;
} else {
if (_damage < _props.damage_min){
_damage = _props.damage_min;
};
};
}
public function get damage():Number{
return (_damage);
}
public function get props():CBulletProps{
return (_props);
}
public function shot(_arg1, _arg2, _arg3):void{
var _local5:Point;
_ang = _arg3;
_spX = (-(Math.sin(_arg3)) * _speed);
_spY = (-(Math.cos(_arg3)) * _speed);
_arg1 = (_arg1 - _spX);
_arg2 = (_arg2 - _spY);
_minX = (_minX - _speed);
_minY = (_minY - _speed);
_maxX = (_maxX + _speed);
_maxY = (_maxY + _speed);
rotation = (-90 - (_arg3 * divPI));
scaleX = _scale0;
_cX = (_arg1 + ((_spX / _speed) * 20));
_cY = (_arg2 + ((_spY / _speed) * 20));
x = int(_cX);
y = int(_cY);
comsquare();
var _local4:int = hitpointsnum;
_hita = new Array();
while (_local4 > 0) {
_local5 = new Point((_cX + ((_spX * hitpointsdist) * _local4)), (_cY + ((_spY * hitpointsdist) * _local4)));
_hita.push(_local5);
_local4--;
};
visible = false;
_skipVisualFrame = 1;
addEventListener(Event.ENTER_FRAME, onAction);
}
override public function onAction(_arg1:Event){
var _local3:Point;
if (_skipVisualFrame > 0){
_skipVisualFrame--;
} else {
visible = true;
};
var _local2:int = (hitpointsnum - 1);
while (_local2 > -1) {
_local3 = hita[_local2];
_local3.x = (_local3.x + _spX);
_local3.y = (_local3.y + _spY);
_local2--;
};
_cX = (_cX + _spX);
_cY = (_cY + _spY);
x = int(_cX);
y = int(_cY);
if (scaleX < 3){
scaleX = (scaleX + _speedsize);
};
_distance = (_distance + _speed);
if ((((_distance > _props.distance)) && (!(_decreased)))){
_damage = (_damage * _props.decrease);
_decreased = true;
alpha = 0.5;
if (_damage < 1){
alive = 0;
removeme();
};
};
}
}
}//package gunz.bullets
Section 48
//CBulletBullet (gunz.bullets.CBulletBullet)
package gunz.bullets {
public class CBulletBullet extends CBulletAbstract {
public function CBulletBullet(){
img = new mcBullet1Bullet();
addChild(img);
scaleX = 0.2;
}
}
}//package gunz.bullets
Section 49
//CBulletElectro (gunz.bullets.CBulletElectro)
package gunz.bullets {
public class CBulletElectro extends CBulletSplashing {
public function CBulletElectro(){
img = new mcBullet5Electric();
addChild(img);
_speedsize = 0.3;
_scale0 = 0;
_splashclass = CBulletSplashElectro;
}
override public function aimpoint(_arg1, _arg2){
_aimdistance = 1000;
}
}
}//package gunz.bullets
Section 50
//CBulletFlamer (gunz.bullets.CBulletFlamer)
package gunz.bullets {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.ui.*;
public class CBulletFlamer extends CBulletAbstract {
public function CBulletFlamer(){
img = new mcBullet4Flamer();
addChild(img);
scaleX = 0.2;
scaleY = 0.2;
_deathtype = 1;
_pointhit = false;
}
override public function onAction(_arg1:Event){
var _local3:Point;
if (_skipVisualFrame > 0){
_skipVisualFrame--;
} else {
visible = true;
};
var _local2:int = (hitpointsnum - 1);
while (_local2 > -1) {
_local3 = hita[_local2];
_local3.x = (_local3.x + _spX);
_local3.y = (_local3.y + _spY);
_local2--;
};
_cX = (_cX + _spX);
_cY = (_cY + _spY);
x = int(_cX);
y = int(_cY);
if (scaleX < 1){
scaleX = (scaleX + 0.1);
};
if (scaleY < 1){
scaleY = (scaleY + 0.1);
};
_distance = (_distance + _speed);
if ((((_distance > _props.distance)) && (!(_decreased)))){
_damage = (_damage * _props.decrease);
_decreased = true;
alpha = 0.5;
if (_damage < 1){
removeme();
};
};
}
}
}//package gunz.bullets
Section 51
//CBulletGrenade (gunz.bullets.CBulletGrenade)
package gunz.bullets {
import flash.events.*;
public class CBulletGrenade extends CBulletSplashing {
public function CBulletGrenade(){
img = new mcBulletGrenade();
addChild(img);
_scale0 = 1;
scaleX = 1;
scaleY = 1;
_speedsize = 0;
}
override public function onAction(_arg1:Event){
super.onAction(_arg1);
rotation = (rotation + 15);
}
}
}//package gunz.bullets
Section 52
//CBulletGrenadeTriple (gunz.bullets.CBulletGrenadeTriple)
package gunz.bullets {
import flash.events.*;
public class CBulletGrenadeTriple extends CBulletSplashing {
public function CBulletGrenadeTriple(){
img = new mcBulletGrenade();
addChild(img);
_scale0 = 1;
scaleX = 1;
scaleY = 1;
_speedsize = 0;
_splashclass = CBulletSplashTripled;
}
override public function onAction(_arg1:Event){
super.onAction(_arg1);
rotation = (rotation + 15);
}
}
}//package gunz.bullets
Section 53
//CBulletKnife (gunz.bullets.CBulletKnife)
package gunz.bullets {
public class CBulletKnife extends CBulletAbstract {
public function CBulletKnife(){
img = new mcBulletKnife();
addChild(img);
_scale0 = 1;
scaleX = 1;
scaleY = 1;
_speedsize = 0;
}
}
}//package gunz.bullets
Section 54
//CBulletLaser (gunz.bullets.CBulletLaser)
package gunz.bullets {
public class CBulletLaser extends CBulletAbstract {
public function CBulletLaser(){
img = new mcBullet3Laser();
addChild(img);
scaleX = 0.2;
_speedsize = 0.1;
_deathtype = 1;
}
}
}//package gunz.bullets
Section 55
//CBulletMolotov (gunz.bullets.CBulletMolotov)
package gunz.bullets {
import flash.events.*;
public class CBulletMolotov extends CBulletSplashing {
public function CBulletMolotov(){
img = new mcBulletBottle();
addChild(img);
_scale0 = 1;
scaleX = 1;
scaleY = 1;
_speedsize = 0;
}
override public function onAction(_arg1:Event){
super.onAction(_arg1);
rotation = (rotation + 15);
}
}
}//package gunz.bullets
Section 56
//CBulletPlasma (gunz.bullets.CBulletPlasma)
package gunz.bullets {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.ui.*;
public class CBulletPlasma extends CBulletAbstract {
public function CBulletPlasma(){
img = new mcBullet2Plasma();
addChild(img);
_scale0 = 0.5;
scaleY = 0.4;
_speedsize = 0.2;
_deathtype = 2;
}
override public function onAction(_arg1:Event){
var _local3:Point;
if (_skipVisualFrame > 0){
_skipVisualFrame--;
} else {
visible = true;
};
var _local2:int = (hitpointsnum - 1);
while (_local2 > -1) {
_local3 = hita[_local2];
_local3.x = (_local3.x + _spX);
_local3.y = (_local3.y + _spY);
_local2--;
};
_cX = (_cX + _spX);
_cY = (_cY + _spY);
x = int(_cX);
y = int(_cY);
if (scaleX < 1.8){
scaleX = (scaleX + _speedsize);
};
if (scaleY < 1){
scaleY = (scaleY + 0.1);
};
_distance = (_distance + _speed);
if ((((_distance > _props.distance)) && (!(_decreased)))){
_damage = (_damage * _props.decrease);
_decreased = true;
alpha = 0.5;
if (_damage < 1){
removeme();
};
};
}
}
}//package gunz.bullets
Section 57
//CBulletPlasmaSplashing (gunz.bullets.CBulletPlasmaSplashing)
package gunz.bullets {
public class CBulletPlasmaSplashing extends CBulletSplashing {
public function CBulletPlasmaSplashing(){
img = new mcBullet2Plasma();
addChild(img);
_scale0 = 0.4;
scaleY = 1;
_speedsize = 0.2;
_splashclass = CBulletSplashPlasma;
}
}
}//package gunz.bullets
Section 58
//CBulletProps (gunz.bullets.CBulletProps)
package gunz.bullets {
public class CBulletProps {
public var slowing:Boolean;// = false
public var damage_min:int;// = 5
public var penetrating:Boolean;// = false
public var speed:int;// = 20
public var skill:int;// = 5
public var damage_max:int;// = 10
public var distance:int;// = 100
public var splash:Boolean;// = false
public var decrease:Number;// = 0.4
}
}//package gunz.bullets
Section 59
//CBulletRANDOM (gunz.bullets.CBulletRANDOM)
package gunz.bullets {
public class CBulletRANDOM extends CBulletAbstract {
public function CBulletRANDOM(){
var _local1:Number = Math.random();
if (_local1 < 0.2){
img = new mcBulletRocket();
scaleX = 1;
scaleY = 1;
_speedsize = 0;
} else {
if (_local1 < 0.4){
img = new mcBullet1Bullet();
scaleX = 0.3;
} else {
if (_local1 < 0.6){
img = new mcBullet5Electric();
_speedsize = 0.3;
_scale0 = 0;
} else {
if (_local1 < 0.8){
img = new mcBullet3Laser();
scaleX = 0.2;
_speedsize = 0.1;
_deathtype = 1;
} else {
img = new mcBullet2Plasma();
_scale0 = 0.5;
scaleY = 0.4;
_speedsize = 0.2;
_deathtype = 2;
};
};
};
};
addChild(img);
}
}
}//package gunz.bullets
Section 60
//CBulletRocket (gunz.bullets.CBulletRocket)
package gunz.bullets {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.ui.*;
public class CBulletRocket extends CBulletSplashing {
public function CBulletRocket(){
img = new mcBulletRocket();
addChild(img);
_scale0 = 1;
_speedsize = 0;
}
override public function onAction(_arg1:Event){
var _local3:Point;
if (_skipVisualFrame > 0){
_skipVisualFrame--;
} else {
visible = true;
};
var _local2:int = (hitpointsnum - 1);
while (_local2 > -1) {
_local3 = hita[_local2];
_local3.x = (_local3.x + _spX);
_local3.y = (_local3.y + _spY);
_local2--;
};
_cX = (_cX + _spX);
_cY = (_cY + _spY);
x = int(_cX);
y = int(_cY);
if (scaleX < 3){
scaleX = (scaleX + _speedsize);
};
_distance = (_distance + _speed);
if (_distance > _props.distance){
_damage = (_damage * _props.decrease);
_decreased = true;
if (_damage < 1){
removeme();
};
};
}
}
}//package gunz.bullets
Section 61
//CBulletRocketSpecial (gunz.bullets.CBulletRocketSpecial)
package gunz.bullets {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.ui.*;
public class CBulletRocketSpecial extends CBulletRocket {
private var rota:Number;
public function CBulletRocketSpecial(){
img = new mcBulletRocket();
addChild(img);
_scale0 = 1;
_speedsize = 0;
}
public function goGoMonster(_arg1, _arg2){
_ang = Math.atan2((x - _arg1), (y - _arg2));
_spX = (-(Math.sin(_ang)) * _speed);
_spY = (-(Math.cos(_ang)) * _speed);
rotation = (-90 - (_ang * divPI));
}
override public function onAction(_arg1:Event){
var _local3:Point;
if (_skipVisualFrame > 0){
_skipVisualFrame--;
} else {
visible = true;
};
var _local2:int = (hitpointsnum - 1);
while (_local2 > -1) {
_local3 = hita[_local2];
_local3.x = (_local3.x + _spX);
_local3.y = (_local3.y + _spY);
_local2--;
};
_cX = (_cX + _spX);
_cY = (_cY + _spY);
x = int(_cX);
y = int(_cY);
if (scaleX < 3){
scaleX = (scaleX + _speedsize);
};
_distance = (_distance + _speed);
if ((((_distance > _props.distance)) || ((_distance > _aimdistance)))){
if (!_decreased){
_decreased = true;
if (Math.random() > 0.5){
rota = (Math.PI / 16);
} else {
rota = (-(Math.PI) / 16);
};
} else {
_ang = (_ang + (rota + ((Math.random() * 0.4) - 0.2)));
_spX = (-(Math.sin(_ang)) * _speed);
_spY = (-(Math.cos(_ang)) * _speed);
rotation = (-90 - (_ang * divPI));
};
if (_damage < 1){
removeme();
};
};
}
}
}//package gunz.bullets
Section 62
//CBulletSplash (gunz.bullets.CBulletSplash)
package gunz.bullets {
import flash.events.*;
public class CBulletSplash extends CBulletSplashAbstract {
public function CBulletSplash(){
trace("splash here");
_speedsize = 1;
img = new mcSplashDefault();
addChild(img);
addEventListener(Event.ENTER_FRAME, onAction);
_framestolive = 9;
img.rotation = (Math.random() * 360);
}
override public function onAction(_arg1:Event){
_framestolive--;
if (_framestolive < 1){
_damage = 0;
_decreased = true;
removeme();
};
}
}
}//package gunz.bullets
Section 63
//CBulletSplashAbstract (gunz.bullets.CBulletSplashAbstract)
package gunz.bullets {
import flash.events.*;
public class CBulletSplashAbstract extends CBulletAbstract {
protected var _framestolive:Number;// = 5
public function CBulletSplashAbstract(){
trace("splash here");
_speedsize = 1;
_scale0 = 1;
scaleX = _scale0;
scaleY = _scale0;
addEventListener(Event.ENTER_FRAME, onAction);
}
override public function onAction(_arg1:Event){
_speedsize = (_speedsize * 1.2);
scaleX = (scaleX + _speedsize);
scaleY = (scaleY + _speedsize);
_framestolive--;
if (_framestolive < 1){
_damage = 0;
_decreased = true;
removeme();
};
}
override public function get damage():Number{
if (_decreased){
return (0);
};
_damage = (_props.damage_min + (Math.random() * (_props.damage_max - _props.damage_min)));
return (_damage);
}
}
}//package gunz.bullets
Section 64
//CBulletSplashElectro (gunz.bullets.CBulletSplashElectro)
package gunz.bullets {
import flash.events.*;
public class CBulletSplashElectro extends CBulletSplashAbstract {
public function CBulletSplashElectro(){
trace("plasma splash here");
_speedsize = 0;
img = new mcBulletElectroSplash();
addChild(img);
addEventListener(Event.ENTER_FRAME, onAction);
_deathtype = 2;
_framestolive = 9;
img.rotation = (Math.random() * 360);
}
override public function onAction(_arg1:Event){
_framestolive--;
if (_framestolive < 1){
_damage = 0;
_decreased = true;
removeme();
};
}
}
}//package gunz.bullets
Section 65
//CBulletSplashing (gunz.bullets.CBulletSplashing)
package gunz.bullets {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.ui.*;
public class CBulletSplashing extends CBulletAbstract {
protected var _splashclass:Class;
protected var _aimdistance:Number;// = 0
public function CBulletSplashing(){
_splashclass = CBulletSplash;
super();
}
override public function set props(_arg1:CBulletProps){
_props = _arg1;
_speed = _props.speed;
hitpointsnum = (_speed >> 3);
hitpointsdist = (1 / hitpointsnum);
_damage = (_props.damage_min + (Math.random() * (_props.damage_max - _props.damage_min)));
_props.splash = true;
}
override public function onAction(_arg1:Event){
var _local3:Point;
if (_skipVisualFrame > 0){
_skipVisualFrame--;
} else {
visible = true;
};
var _local2:int = (hitpointsnum - 1);
while (_local2 > -1) {
_local3 = hita[_local2];
_local3.x = (_local3.x + _spX);
_local3.y = (_local3.y + _spY);
_local2--;
};
_cX = (_cX + _spX);
_cY = (_cY + _spY);
x = int(_cX);
y = int(_cY);
if (scaleX < 3){
scaleX = (scaleX + _speedsize);
};
_distance = (_distance + _speed);
if ((((_distance > _props.distance)) || ((_distance > _aimdistance)))){
_damage = (_damage * _props.decrease);
trace("_distance", _distance, "_props.distance", _props.distance);
trace("decreased, dmg now", _damage);
_decreased = true;
if (_damage < 1){
removeme();
};
};
}
public function get splash():CBulletSplashAbstract{
var _local1:CBulletSplashAbstract = new _splashclass();
_local1.x = x;
_local1.y = y;
_local1.props.damage_max = (_props.damage_max * 0.7);
_local1.props.damage_min = (_props.damage_min * 0.7);
return (_local1);
}
public function aimpoint(_arg1, _arg2){
_aimdistance = Math.sqrt((((x - _arg1) * (x - _arg1)) + ((y - _arg2) * (y - _arg2))));
}
override public function hit(_arg1:int):int{
_damage = 0;
return (0);
}
}
}//package gunz.bullets
Section 66
//CBulletSplashPlasma (gunz.bullets.CBulletSplashPlasma)
package gunz.bullets {
import flash.events.*;
public class CBulletSplashPlasma extends CBulletSplashAbstract {
public function CBulletSplashPlasma(){
trace("plasma splash here");
_speedsize = 0;
_scale0 = 0.8;
img = new mcBulletSplashPlasma();
addChild(img);
scaleX = _scale0;
scaleY = _scale0;
addEventListener(Event.ENTER_FRAME, onAction);
_deathtype = 2;
_framestolive = 8;
}
override public function onAction(_arg1:Event){
_framestolive--;
if (_framestolive < 1){
_damage = 0;
_decreased = true;
removeme();
};
}
}
}//package gunz.bullets
Section 67
//CBulletSplashTripled (gunz.bullets.CBulletSplashTripled)
package gunz.bullets {
import flash.events.*;
public class CBulletSplashTripled extends CBulletSplashAbstract {
public function CBulletSplashTripled(){
trace("triple splash here");
_speedsize = 1;
img = new mcSplashPowerGrenade();
addChild(img);
addEventListener(Event.ENTER_FRAME, onAction);
_framestolive = 10;
img.rotation = (Math.random() * 360);
}
override public function onAction(_arg1:Event){
_framestolive--;
if (_framestolive < 1){
_damage = 0;
_decreased = true;
removeme();
};
}
}
}//package gunz.bullets
Section 68
//CBulletStandart (gunz.bullets.CBulletStandart)
package gunz.bullets {
public class CBulletStandart extends CBulletAbstract {
public function CBulletStandart(){
img = new mcBullet1Bullet();
addChild(img);
scaleX = 0.2;
}
}
}//package gunz.bullets
Section 69
//CAmmoProps (gunz.CAmmoProps)
package gunz {
public class CAmmoProps {
public var iconClass:Class;
public var name:String;// = "ammo"
private var _pricePerPack:Number;// = 1
private var _packAmount:int;// = 1
public var type:String;// = "unknown"
public var description:String;// = "Someammo"
public function CAmmoProps(){
iconClass = mcAmmoIcon_Standart;
super();
}
public function set pricePerPack(_arg1:int){
if (_arg1 > 0){
_pricePerPack = _arg1;
};
}
public function set packAmount(_arg1:int){
if (_arg1 > 0){
_packAmount = _arg1;
};
}
public function get pricePerPack():int{
return (_pricePerPack);
}
public function get packAmount():int{
return (_packAmount);
}
}
}//package gunz
Section 70
//CAmmoPropsBank (gunz.CAmmoPropsBank)
package gunz {
public class CAmmoPropsBank {
public static function getAmmoProps(_arg1:String):CAmmoProps{
var _local2:CAmmoProps = new CAmmoProps();
_local2.type = _arg1;
switch (_arg1){
case CGunProps.AMMO_STANDART:
_local2.name = CLocale.BULLETS_STANDART_NAME;
_local2.description = CLocale.BULLETS_STANDART_DESC;
_local2.iconClass = mcAmmoIcon_Standart;
_local2.packAmount = 50;
_local2.pricePerPack = 50;
break;
case CGunProps.AMMO_SHELLS:
_local2.name = CLocale.BULLETS_SHOTGUN_NAME;
_local2.description = CLocale.BULLETS_SHOTGUN_DESC;
_local2.iconClass = mcAmmoIcon_Shells;
_local2.packAmount = 25;
_local2.pricePerPack = 500;
break;
case CGunProps.AMMO_CHAIN:
_local2.name = CLocale.BULLETS_MACHINE_NAME;
_local2.description = CLocale.BULLETS_MACHINE_DESC;
_local2.iconClass = mcAmmoIcon_Chain;
_local2.packAmount = 100;
_local2.pricePerPack = 380;
break;
case CGunProps.AMMO_ROCKETS:
_local2.name = CLocale.BULLETS_ROCKET_NAME;
_local2.description = CLocale.BULLETS_ROCKET_DESC;
_local2.iconClass = mcAmmoIcon_Rocket;
_local2.packAmount = 10;
_local2.pricePerPack = 250;
break;
case CGunProps.AMMO_ENERGY:
_local2.name = CLocale.BULLETS_ENERGY_NAME;
_local2.description = CLocale.BULLETS_ENERGY_DESC;
_local2.iconClass = mcAmmoIcon_Battery;
_local2.packAmount = 40;
_local2.pricePerPack = 450;
break;
case CGunProps.AMMO_FUEL:
_local2.name = CLocale.BULLETS_FLAMER_NAME;
_local2.description = CLocale.BULLETS_FLAMER_DESC;
_local2.iconClass = mcAmmoIcon_Fuel;
_local2.packAmount = 50;
_local2.pricePerPack = 240;
break;
case CGunProps.AMMO_KNIVES:
_local2.name = "Knives";
_local2.packAmount = 50;
_local2.pricePerPack = 50;
break;
default:
throw (new Error("unknown ammo type:", _arg1));
};
return (_local2);
}
}
}//package gunz
Section 71
//CGunAbstract (gunz.CGunAbstract)
package gunz {
import flash.display.*;
import gunz.bullets.*;
public dynamic class CGunAbstract {
protected var _clip:int;// = 1
public var props:CGunProps;
protected var _totalammo:int;// = 10
protected var bulprops:CBulletProps;
protected static var imgClass:Class = mcWeapon62GatlingLaser;
public function CGunAbstract(){
props = new CGunProps();
}
public function get bullet():CBulletAbstract{
setbulletProps();
var _local1:CBulletAbstract = new CBulletAbstract();
_local1.props = bulprops;
return (_local1);
}
public function set totalammo(_arg1:int){
if (_arg1 > _totalammo){
_totalammo = _arg1;
};
}
public function set clip(_arg1:int){
_clip = _arg1;
}
protected function setbulletProps(){
bulprops = new CBulletProps();
bulprops.damage_max = props.damage_max;
bulprops.damage_min = props.damage_min;
bulprops.decrease = props.decrease;
bulprops.distance = props.range;
bulprops.speed = props.speed;
bulprops.penetrating = props.penetrating;
bulprops.slowing = props.slowing;
}
public function get totalammo():int{
return (_totalammo);
}
public function reload():int{
var _local1:int = (props.clipmax - clip);
if (_totalammo < _local1){
_local1 = _totalammo;
_totalammo = 0;
} else {
_totalammo = (_totalammo - _local1);
};
_clip = _local1;
return (_clip);
}
public function get clip():int{
return (_clip);
}
public static function get img():Sprite{
return (new imgClass());
}
}
}//package gunz
Section 72
//CGunProps (gunz.CGunProps)
package gunz {
import flash.display.*;
import gunz.bullets.*;
public class CGunProps {
public var ammotype:String;// = "NoAmmo"
public var guntype:String;// = "no gun"
public var name:String;// = "no gun"
public var ammoiconclass:Class;
public var imgclass:Class;
public var upClip:Boolean;// = false
public var upReload:Boolean;// = false
public var repause:int;// = 0
public var penetrating:Boolean;// = false
public var automatic:Boolean;// = false
public var upAccuracy:Boolean;// = false
private var _shellsangle:Number;// = 0
public var throwing:Boolean;// = false
private var _shotpause:int;// = 5
private var _range:int;// = 100
public var slowing:Boolean;// = false
private var _reloadpause:int;// = 30
public var price:int;// = 500
private var _speed:int;// = 20
public var clip:int;// = 10
public var upgradesAllowed:Array;
private var _minpower:int;// = 2
private var _clipmax:int;// = 10
private var _accuracy:int;// = 5
private var _dmg_min:int;// = 1
private var _pershot:int;// = 1
private var _dmg_max:int;// = 1000000
public var splash:Boolean;// = false
public var upRange:Boolean;// = false
public var ammoclass:Class;
public var upSpeed:Boolean;// = false
public var upDamage:Boolean;// = false
private var _minStrength:int;// = 6
public var description:String;// = ""
private var _decrease:Number;// = 0.4
public static const AMMO_MOLOTOV:String = "Molotov";
public static const AMMO_FUEL:String = "UniversalFlamerFuel";
public static const AMMO_PISTOL:String = "InfinityBullets";
public static const AMMO_NONE:String = "NoAmmo";
public static const AMMO_THROWING:String = "WeaponEqualsAmmo";
public static const AMMO_ROCKETS:String = "UniversalRockets";
public static const AMMO_KNIVES:String = "Knives";
public static const MACHINEGUN:String = "Machine gun";
public static const AMMO_STANDART:String = "StandartBullets";
public static const AMMO_ENERGY:String = "EnergyBatteries";
public static const UPGRADE_RANGE:String = "upgrade_range";
public static const HEAVY:String = "Heavy";
public static const RIFLE:String = "Rifle";
public static const UPGRADE_DAMAGE:String = "upgrade_damage";
public static const UPGRADE_SPEED:String = "upgrade_speed";
public static const SMG:String = "Submachine gun";
public static const UPGRADE_CLIP:String = "upgrade_clip";
public static const AMMO_GRENADES:String = "Grenades";
public static const THROWING:String = "Throwing";
public static const AMMO_TORNADO:String = "Tornado";
public static const UPGRADE_RELOAD:String = "upgrade_reload";
public static const CLOSECOMBAT:String = "Closecombat";
public static const AMMO_SHELLS:String = "ShotGunShells";
public static const UPGRADE_ACCURACY:String = "upgrade_accuracy";
public static const SHOTGUN:String = "Shotgun";
public static const AMMO_ALL_TYPES:Array = [AMMO_PISTOL, AMMO_STANDART, AMMO_SHELLS, AMMO_CHAIN, AMMO_ROCKETS, AMMO_ENERGY, AMMO_FUEL, AMMO_THROWING, AMMO_KNIVES, AMMO_MOLOTOV, AMMO_GRENADES, AMMO_TORNADO];
public static const AMMO_CHAIN:String = "MachineGunChain";
public static const UPGRADES_ID_ORDER:Array = [UPGRADE_RANGE, UPGRADE_ACCURACY, UPGRADE_DAMAGE, UPGRADE_SPEED, UPGRADE_CLIP, UPGRADE_RELOAD];
public static const DUALPISTOL:String = "DualPistol";
public static const PISTOL:String = "Pistol";
public function CGunProps(){
ammoclass = CBulletBullet;
imgclass = mcWeapon0;
ammoiconclass = Sprite;
upgradesAllowed = [1, 1, 1, 1, 1, 1];
super();
}
public function get accuracy():int{
if (upAccuracy){
return ((_accuracy * 1.3));
};
return (_accuracy);
}
public function set damage_min(_arg1:int){
if (_arg1 < 1){
_dmg_min = 1;
} else {
if (_arg1 > _dmg_max){
_dmg_min = (_dmg_max - 1);
} else {
_dmg_min = _arg1;
};
};
}
public function set shotpause(_arg1:int){
if (_arg1 < 0){
_shotpause = 0;
} else {
if (_arg1 > 12){
_shotpause = 12;
} else {
_shotpause = _arg1;
};
};
}
public function get reloadpause():int{
if (upReload){
return ((_reloadpause * 0.8));
};
return (_reloadpause);
}
public function set speed(_arg1:int){
if (_arg1 < 1){
_speed = 1;
} else {
_speed = _arg1;
};
}
public function set range(_arg1:int){
if (_arg1 < 10){
_range = 10;
} else {
if (_arg1 > 600){
_range = 600;
} else {
_range = _arg1;
};
};
}
public function get pershot():int{
return (_pershot);
}
public function set reloadpause(_arg1:int){
if (_arg1 < 0){
_reloadpause = 0;
} else {
if (_arg1 > 100){
_reloadpause = 100;
} else {
_reloadpause = _arg1;
};
};
}
public function get damage_max():int{
if (upDamage){
return ((_dmg_max * 1.2));
};
return (_dmg_max);
}
public function get decrease():Number{
return (_decrease);
}
public function set pershot(_arg1:int){
if (_arg1 < 1){
_pershot = 1;
} else {
_pershot = _arg1;
};
}
public function get damage_min():int{
if (upDamage){
return ((_dmg_min * 1.2));
};
return (_dmg_min);
}
public function get clipmax():int{
var _local1:int;
if (((upClip) && (!(throwing)))){
_local1 = ((_clipmax * 1.2) + 1);
return (_local1);
};
return (_clipmax);
}
public function set damage_max(_arg1:int){
if (_arg1 < _dmg_min){
_dmg_max = (_dmg_min + 1);
} else {
_dmg_max = _arg1;
};
}
public function get minStrength():int{
return (_minStrength);
}
public function get shotpause():int{
var _local1:int;
if (upSpeed){
_local1 = (_shotpause * 0.8);
if (_local1 == _shotpause){
if (_shotpause > 2){
_local1 = (_shotpause - 1);
} else {
_local1 = _shotpause;
};
};
return (_local1);
//unresolved jump
};
return (_shotpause);
}
public function get speed():int{
return (_speed);
}
public function set decrease(_arg1:Number){
if (_arg1 < 0){
_decrease = 0;
} else {
_decrease = _arg1;
};
}
public function get range():int{
if (upRange){
return ((_range * 1.2));
};
return (_range);
}
public function set shellsangle(_arg1:Number){
if (_arg1 > (Math.PI / 6)){
_shellsangle = (Math.PI / 6);
} else {
if (_arg1 < 0){
_shellsangle = 0;
} else {
_shellsangle = _arg1;
};
};
}
public function set clipmax(_arg1:int){
if (!throwing){
if (_arg1 < 1){
_clipmax = 1;
} else {
_clipmax = _arg1;
};
} else {
_clipmax = 1;
};
clip = _clipmax;
}
public function set UpgradesArr(_arg1:Array){
upRange = _arg1[0];
upAccuracy = _arg1[1];
upDamage = _arg1[2];
upSpeed = _arg1[3];
upClip = _arg1[4];
upReload = _arg1[5];
}
public function set minpower(_arg1:int){
if (_arg1 < 1){
_minpower = 1;
} else {
if (_arg1 > 7){
_minpower = 7;
} else {
_minpower = _arg1;
};
};
}
public function set minStrength(_arg1:int){
_minStrength = _arg1;
}
public function set accuracy(_arg1:int){
if (_arg1 < 3){
_accuracy = 3;
} else {
if (_arg1 > 10){
_accuracy = 10;
} else {
_accuracy = _arg1;
};
};
}
public function get minpower():int{
return (_minpower);
}
public function get UpgradeAble():Boolean{
var _local1:int = upgradesAllowed.length;
var _local2:int;
while (_local1-- > 0) {
_local2 = (_local2 + upgradesAllowed[_local1]);
};
var _local3:Boolean;
if (_local2 > 0){
_local3 = ((_local3) || (((!(upRange)) && ((upgradesAllowed[0] > 0)))));
_local3 = ((_local3) || (((!(upAccuracy)) && ((upgradesAllowed[1] > 0)))));
_local3 = ((_local3) || (((!(upDamage)) && ((upgradesAllowed[2] > 0)))));
_local3 = ((_local3) || (((!(upSpeed)) && ((upgradesAllowed[3] > 0)))));
_local3 = ((_local3) || (((!(upClip)) && ((upgradesAllowed[4] > 0)))));
_local3 = ((_local3) || (((!(upReload)) && ((upgradesAllowed[5] > 0)))));
};
return (_local3);
}
public function get shellsangle():Number{
return (_shellsangle);
}
public function get UpgradesArr():Array{
return ([upRange, upAccuracy, upDamage, upSpeed, upClip, upReload]);
}
}
}//package gunz
Section 73
//CGunzPropBank (gunz.CGunzPropBank)
package gunz {
import flash.display.*;
import gunz.bullets.*;
public class CGunzPropBank {
public static function get Gun11():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.PISTOL;
_local1.name = CLocale.GUN_MAGNUM_NAME;
_local1.description = CLocale.GUN_MAGNUM_DESC;
_local1.price = 500;
_local1.range = 160;
_local1.decrease = 0.4;
_local1.damage_min = 5;
_local1.damage_max = 10;
_local1.shotpause = 6;
_local1.pershot = 1;
_local1.clipmax = 6;
_local1.reloadpause = 20;
_local1.accuracy = 6;
_local1.speed = 25;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 2;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon11Magnum44;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_PISTOL;
_local1.minStrength = 2;
_local1.upgradesAllowed = [0, 0, 0, 0, 0, 0];
return (_local1);
}
public static function get Gun12():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.DUALPISTOL;
_local1.name = CLocale.GUN_DUALBERETTA_NAME;
_local1.description = CLocale.GUN_DUALBERETTA_DESC;
_local1.price = 3000;
_local1.range = 200;
_local1.decrease = 0.4;
_local1.damage_min = 5;
_local1.damage_max = 10;
_local1.shotpause = 6;
_local1.pershot = 2;
_local1.shellsangle = (Math.PI / 16);
_local1.clipmax = 10;
_local1.reloadpause = 35;
_local1.accuracy = 4;
_local1.speed = 27;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 2;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon12DualBeretta;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_PISTOL;
_local1.minStrength = 3;
return (_local1);
}
public static function get Gun13():CGunProps{
var _local1:CGunProps;
_local1 = new CGunProps();
_local1.guntype = CGunProps.PISTOL;
_local1.name = CLocale.GUN_DEAGLE_NAME;
_local1.description = CLocale.GUN_DEAGLE_DESC;
_local1.price = 8000;
_local1.range = 240;
_local1.decrease = 0.6;
_local1.damage_min = 16;
_local1.damage_max = 26;
_local1.shotpause = 7;
_local1.pershot = 1;
_local1.clipmax = 9;
_local1.reloadpause = 25;
_local1.accuracy = 6;
_local1.speed = 30;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 3;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon13PistolDesertEagle;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_PISTOL;
_local1.minStrength = 4;
return (_local1);
}
public static function get Gun14():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.PISTOL;
_local1.name = CLocale.GUN_GAUSSPISTOL_NAME;
_local1.description = CLocale.GUN_GAUSSPISTOL_DESC;
_local1.price = 16000;
_local1.range = 360;
_local1.decrease = 0.8;
_local1.damage_min = 24;
_local1.damage_max = 36;
_local1.shotpause = 7;
_local1.pershot = 1;
_local1.clipmax = 12;
_local1.reloadpause = 40;
_local1.accuracy = 7;
_local1.speed = 36;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 2;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon14Gauss;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_PISTOL;
_local1.minStrength = 2;
return (_local1);
}
public static function get Gun74():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.HEAVY;
_local1.name = CLocale.GUN_ZF1_NAME;
_local1.description = CLocale.GUN_ZF1_DESC;
_local1.price = 400000;
_local1.range = 600;
_local1.decrease = 0.5;
_local1.damage_min = 60;
_local1.damage_max = 150;
_local1.shotpause = 1;
_local1.pershot = 2;
_local1.clipmax = 80;
_local1.reloadpause = 90;
_local1.accuracy = 6;
_local1.speed = 40;
_local1.automatic = true;
_local1.penetrating = true;
_local1.slowing = false;
_local1.throwing = false;
_local1.splash = true;
_local1.minpower = 6;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletRANDOM;
_local1.imgclass = mcWeapon74ZF1;
_local1.ammoiconclass = mcAmmoIcon_Battery;
_local1.ammotype = CGunProps.AMMO_ENERGY;
_local1.minStrength = 10;
return (_local1);
}
public static function get Gun31():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.RIFLE;
_local1.name = CLocale.GUN_ASSAULT_NAME;
_local1.description = CLocale.GUN_ASSAULT_DESC;
_local1.price = 6999;
_local1.range = 280;
_local1.decrease = 0.4;
_local1.damage_min = 14;
_local1.damage_max = 28;
_local1.shotpause = 4;
_local1.pershot = 1;
_local1.clipmax = 30;
_local1.reloadpause = 25;
_local1.accuracy = 7;
_local1.speed = 40;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon31AssalutRifle;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_STANDART;
_local1.minStrength = 4;
return (_local1);
}
public static function get Gun33():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.RIFLE;
_local1.name = CLocale.GUN_SNIPER_NAME;
_local1.description = CLocale.GUN_SNIPER_DESC;
_local1.price = 16000;
_local1.range = 450;
_local1.decrease = 0.9;
_local1.damage_min = 30;
_local1.damage_max = 50;
_local1.shotpause = 8;
_local1.pershot = 1;
_local1.clipmax = 12;
_local1.reloadpause = 30;
_local1.accuracy = 9;
_local1.speed = 30;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon33Sniper;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_STANDART;
_local1.minStrength = 6;
return (_local1);
}
public static function get Gun34():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.RIFLE;
_local1.name = CLocale.GUN_M72_NAME;
_local1.description = CLocale.GUN_M72_DESC;
_local1.price = 39999;
_local1.range = 600;
_local1.decrease = 0.5;
_local1.damage_min = 40;
_local1.damage_max = 60;
_local1.shotpause = 8;
_local1.pershot = 1;
_local1.clipmax = 17;
_local1.reloadpause = 60;
_local1.accuracy = 10;
_local1.speed = 45;
_local1.automatic = false;
_local1.penetrating = true;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon34Gauss;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_STANDART;
_local1.minStrength = 4;
return (_local1);
}
public static function get Gun73():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.HEAVY;
_local1.name = CLocale.GUN_STINGER_NAME;
_local1.description = CLocale.GUN_STINGER_DESC;
_local1.price = 50000;
_local1.range = 800;
_local1.decrease = 1;
_local1.damage_min = 45;
_local1.damage_max = 110;
_local1.shotpause = 7;
_local1.pershot = 1;
_local1.clipmax = 4;
_local1.reloadpause = 80;
_local1.accuracy = 10;
_local1.speed = 15;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.splash = true;
_local1.minpower = 6;
_local1.upgradesAllowed = [1, 0, 1, 1, 1, 1];
_local1.ammoclass = CBulletRocketSpecial;
_local1.imgclass = mcWeapon73Stinger;
_local1.ammoiconclass = mcAmmoIcon_Rocket;
_local1.ammotype = CGunProps.AMMO_ROCKETS;
_local1.minStrength = 8;
return (_local1);
}
public static function get Gun81():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.THROWING;
_local1.name = CLocale.GUN_KNIVES_NAME;
_local1.description = CLocale.GUN_KNIVES_DESC;
_local1.price = 1;
_local1.range = 30;
_local1.decrease = 0;
_local1.damage_min = 15;
_local1.damage_max = 50;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 1;
_local1.reloadpause = 15;
_local1.accuracy = 4;
_local1.speed = 18;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.upgradesAllowed = [0, 0, 0, 0, 0, 0];
_local1.ammoclass = CBulletKnife;
_local1.imgclass = mcWeapon81Knives;
_local1.ammoiconclass = Sprite;
_local1.ammotype = CGunProps.AMMO_KNIVES;
_local1.minStrength = 2;
return (_local1);
}
public static function get Gun82():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.THROWING;
_local1.name = CLocale.GUN_MOLOTOV_NAME;
_local1.description = CLocale.GUN_MOLOTOV_DESC;
_local1.price = 50;
_local1.range = 28;
_local1.decrease = 0;
_local1.damage_min = 4;
_local1.damage_max = 16;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 1;
_local1.reloadpause = 35;
_local1.accuracy = 3;
_local1.speed = 8;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = true;
_local1.splash = true;
_local1.minpower = 5;
_local1.upgradesAllowed = [0, 0, 0, 0, 0, 0];
_local1.ammoclass = CBulletMolotov;
_local1.imgclass = mcWeapon82Molotov;
_local1.ammoiconclass = Sprite;
_local1.ammotype = CGunProps.AMMO_MOLOTOV;
_local1.minStrength = 5;
return (_local1);
}
public static function get Gun61():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.MACHINEGUN;
_local1.name = CLocale.GUN_MINIGUN_NAME;
_local1.description = CLocale.GUN_MINIGUN_DESC;
_local1.price = 28000;
_local1.range = 300;
_local1.decrease = 0.5;
_local1.damage_min = 8;
_local1.damage_max = 12;
_local1.shotpause = 1;
_local1.pershot = 2;
_local1.shellsangle = (Math.PI / 16);
_local1.clipmax = 160;
_local1.reloadpause = 60;
_local1.accuracy = 3;
_local1.speed = 35;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 6;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon61Gatling;
_local1.ammoiconclass = mcAmmoIcon_Chain;
_local1.ammotype = CGunProps.AMMO_CHAIN;
_local1.minStrength = 8;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun62():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.MACHINEGUN;
_local1.name = CLocale.GUN_LMINI_NAME;
_local1.description = CLocale.GUN_LMINI_DESC;
_local1.price = 59999;
_local1.range = 400;
_local1.decrease = 0.5;
_local1.damage_min = 11;
_local1.damage_max = 23;
_local1.shotpause = 0;
_local1.pershot = 1;
_local1.clipmax = 160;
_local1.reloadpause = 70;
_local1.accuracy = 4;
_local1.speed = 30;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 6;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletLaser;
_local1.imgclass = mcWeapon62GatlingLaser;
_local1.ammoiconclass = mcAmmoIcon_Battery;
_local1.ammotype = CGunProps.AMMO_ENERGY;
_local1.minStrength = 7;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun63():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.MACHINEGUN;
_local1.name = CLocale.GUN_BOZAR_NAME;
_local1.description = CLocale.GUN_BOZAR_DESC;
_local1.price = 98000;
_local1.range = 500;
_local1.decrease = 0.5;
_local1.damage_min = 19;
_local1.damage_max = 31;
_local1.shotpause = 2;
_local1.pershot = 1;
_local1.clipmax = 100;
_local1.reloadpause = 40;
_local1.accuracy = 8;
_local1.speed = 40;
_local1.automatic = true;
_local1.penetrating = true;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 6;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon63BUZZAR;
_local1.ammoiconclass = mcAmmoIcon_Chain;
_local1.ammotype = CGunProps.AMMO_CHAIN;
_local1.minStrength = 8;
return (_local1);
}
public static function get Gun42():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SHOTGUN;
_local1.name = CLocale.GUN_SOSHOTGUN_NAME;
_local1.description = CLocale.GUN_SOSHOTGUN_DESC;
_local1.price = 4900;
_local1.range = 140;
_local1.decrease = 0.4;
_local1.damage_min = 5;
_local1.damage_max = 10;
_local1.shotpause = 10;
_local1.pershot = 12;
_local1.shellsangle = (Math.PI / 6);
_local1.clipmax = 8;
_local1.reloadpause = 50;
_local1.accuracy = 2;
_local1.speed = 35;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon42SOSG;
_local1.ammoiconclass = mcAmmoIcon_Shells;
_local1.ammotype = CGunProps.AMMO_SHELLS;
_local1.minStrength = 4;
_local1.upgradesAllowed = [1, 0, 1, 1, 1, 1];
return (_local1);
}
public static function get Gun21():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SMG;
_local1.name = CLocale.GUN_UZI_NAME;
_local1.description = CLocale.GUN_UZI_DESC;
_local1.price = 2100;
_local1.range = 180;
_local1.decrease = 0.4;
_local1.damage_min = 6;
_local1.damage_max = 12;
_local1.shotpause = 3;
_local1.pershot = 1;
_local1.clipmax = 25;
_local1.reloadpause = 30;
_local1.accuracy = 4;
_local1.speed = 28;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 3;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon21uzi;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_STANDART;
_local1.minStrength = 2;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun22():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SMG;
_local1.name = CLocale.GUN_MP5_NAME;
_local1.description = CLocale.GUN_MP5_DESC;
_local1.price = 8500;
_local1.range = 220;
_local1.decrease = 0.5;
_local1.damage_min = 7;
_local1.damage_max = 14;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 30;
_local1.reloadpause = 26;
_local1.accuracy = 6;
_local1.speed = 33;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 3;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon22mp5k;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_STANDART;
_local1.minStrength = 3;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun23():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SMG;
_local1.name = CLocale.GUN_FN90_NAME;
_local1.description = CLocale.GUN_FN90_DESC;
_local1.price = 12000;
_local1.range = 300;
_local1.decrease = 0.5;
_local1.damage_min = 10;
_local1.damage_max = 20;
_local1.shotpause = 2;
_local1.pershot = 1;
_local1.clipmax = 50;
_local1.reloadpause = 37;
_local1.accuracy = 5;
_local1.speed = 40;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 3;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon23P90;
_local1.ammoiconclass = mcAmmoIcon_Standart;
_local1.ammotype = CGunProps.AMMO_STANDART;
_local1.minStrength = 4;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun84():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.THROWING;
_local1.name = CLocale.GUN_TORNADO_NAME;
_local1.description = CLocale.GUN_TORNADO_DESC;
_local1.price = 1000;
_local1.range = 35;
_local1.decrease = 0;
_local1.damage_min = 90;
_local1.damage_max = 270;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 1;
_local1.reloadpause = 30;
_local1.accuracy = 5;
_local1.speed = 8;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = true;
_local1.splash = true;
_local1.minpower = 4;
_local1.upgradesAllowed = [0, 0, 0, 0, 0, 0];
_local1.ammoclass = CBulletGrenadeTriple;
_local1.imgclass = mcWeapon84TornadoGrenades;
_local1.ammoiconclass = Sprite;
_local1.ammotype = CGunProps.AMMO_TORNADO;
_local1.minStrength = 4;
return (_local1);
}
public static function get Gun41():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SHOTGUN;
_local1.name = CLocale.GUN_SHOTGUN_NAME;
_local1.description = CLocale.GUN_SHOTGUN_DESC;
_local1.price = 1300;
_local1.range = 170;
_local1.decrease = 0.4;
_local1.damage_min = 6;
_local1.damage_max = 12;
_local1.shotpause = 8;
_local1.pershot = 6;
_local1.shellsangle = (Math.PI / 8);
_local1.clipmax = 2;
_local1.reloadpause = 36;
_local1.accuracy = 3;
_local1.speed = 35;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon41SG;
_local1.ammoiconclass = mcAmmoIcon_Shells;
_local1.ammotype = CGunProps.AMMO_SHELLS;
_local1.minStrength = 5;
_local1.upgradesAllowed = [1, 0, 1, 1, 0, 1];
return (_local1);
}
public static function get Gun64():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.MACHINEGUN;
_local1.name = CLocale.GUN_PLASMAGUN_NAME;
_local1.description = CLocale.GUN_PLASMAGUN_DESC;
_local1.price = 131000;
_local1.range = 450;
_local1.decrease = 0.3;
_local1.damage_min = 22;
_local1.damage_max = 37;
_local1.shotpause = 1;
_local1.pershot = 2;
_local1.shellsangle = (Math.PI / 16);
_local1.clipmax = 120;
_local1.reloadpause = 68;
_local1.accuracy = 5;
_local1.speed = 25;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 6;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletPlasma;
_local1.imgclass = mcWeapon64Plasma;
_local1.ammoiconclass = mcAmmoIcon_Battery;
_local1.ammotype = CGunProps.AMMO_ENERGY;
_local1.minStrength = 6;
return (_local1);
}
public static function get Gun43():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SHOTGUN;
_local1.name = CLocale.GUN_COMBATSG_NAME;
_local1.description = CLocale.GUN_COMBATSG_DESC;
_local1.price = 29000;
_local1.range = 270;
_local1.decrease = 0.5;
_local1.damage_min = 7;
_local1.damage_max = 14;
_local1.shotpause = 6;
_local1.pershot = 8;
_local1.shellsangle = (Math.PI / 10);
_local1.clipmax = 12;
_local1.reloadpause = 60;
_local1.accuracy = 4;
_local1.speed = 35;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon43CombatSG;
_local1.ammoiconclass = mcAmmoIcon_Shells;
_local1.ammotype = CGunProps.AMMO_SHELLS;
_local1.minStrength = 6;
_local1.upgradesAllowed = [1, 0, 1, 1, 1, 1];
return (_local1);
}
public static function get Gun44():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SHOTGUN;
_local1.name = CLocale.GUN_PANCOR_NAME;
_local1.description = CLocale.GUN_PANCOR_DESC;
_local1.price = 79000;
_local1.range = 300;
_local1.decrease = 0.4;
_local1.damage_min = 9;
_local1.damage_max = 15;
_local1.shotpause = 4;
_local1.pershot = 8;
_local1.shellsangle = (Math.PI / 10);
_local1.clipmax = 15;
_local1.reloadpause = 80;
_local1.accuracy = 4;
_local1.speed = 40;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletBullet;
_local1.imgclass = mcWeapon44Pancor;
_local1.ammoiconclass = mcAmmoIcon_Shells;
_local1.ammotype = CGunProps.AMMO_SHELLS;
_local1.minStrength = 6;
_local1.upgradesAllowed = [1, 0, 1, 1, 1, 1];
return (_local1);
}
public static function get Gun24():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.SMG;
_local1.name = CLocale.GUN_TOMMYPLASMA_NAME;
_local1.description = CLocale.GUN_TOMMYPLASMA_DESC;
_local1.price = 17000;
_local1.range = 360;
_local1.decrease = 0.7;
_local1.damage_min = 20;
_local1.damage_max = 36;
_local1.shotpause = 3;
_local1.pershot = 1;
_local1.clipmax = 30;
_local1.reloadpause = 45;
_local1.accuracy = 6;
_local1.speed = 20;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 3;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletPlasma;
_local1.imgclass = mcWeapon24tommy;
_local1.ammoiconclass = mcAmmoIcon_Battery;
_local1.ammotype = CGunProps.AMMO_ENERGY;
_local1.minStrength = 4;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun83():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.THROWING;
_local1.name = CLocale.GUN_GRENADE_NAME;
_local1.description = CLocale.GUN_GRENADE_DESC;
_local1.price = 150;
_local1.range = 35;
_local1.decrease = 0;
_local1.damage_min = 30;
_local1.damage_max = 90;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 1;
_local1.reloadpause = 27;
_local1.accuracy = 2;
_local1.speed = 8;
_local1.automatic = false;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = true;
_local1.splash = true;
_local1.minpower = 4;
_local1.upgradesAllowed = [0, 0, 0, 0, 0, 0];
_local1.ammoclass = CBulletGrenade;
_local1.imgclass = mcWeapon83Grenades;
_local1.ammoiconclass = Sprite;
_local1.ammotype = CGunProps.AMMO_GRENADES;
_local1.minStrength = 4;
return (_local1);
}
public static function get Gun65():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.MACHINEGUN;
_local1.name = CLocale.GUN_RAIL_NAME;
_local1.description = CLocale.GUN_RAIL_DESC;
_local1.price = 235000;
_local1.range = 1000;
_local1.decrease = 0;
_local1.damage_min = 18;
_local1.damage_max = 33;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.shellsangle = (Math.PI / 16);
_local1.clipmax = 100;
_local1.reloadpause = 90;
_local1.accuracy = 6;
_local1.speed = 40;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 6;
_local1.splash = true;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletElectro;
_local1.imgclass = mcWeapon65Lightning;
_local1.ammoiconclass = mcAmmoIcon_Battery;
_local1.ammotype = CGunProps.AMMO_ENERGY;
_local1.minStrength = 6;
return (_local1);
}
public static function get gimmeAllOfThem():Array{
var _local4:CGunAbstract;
var _local1:Array = new Array();
_local1.push(Gun11);
_local1.push(Gun12);
_local1.push(Gun13);
_local1.push(Gun14);
_local1.push(Gun21);
_local1.push(Gun22);
_local1.push(Gun23);
_local1.push(Gun24);
_local1.push(Gun31);
_local1.push(Gun32);
_local1.push(Gun33);
_local1.push(Gun34);
_local1.push(Gun41);
_local1.push(Gun42);
_local1.push(Gun43);
_local1.push(Gun44);
_local1.push(Gun51);
_local1.push(Gun52);
_local1.push(Gun53);
_local1.push(Gun65);
_local1.push(Gun61);
_local1.push(Gun62);
_local1.push(Gun63);
_local1.push(Gun64);
_local1.push(Gun71);
_local1.push(Gun72);
_local1.push(Gun73);
_local1.push(Gun74);
_local1.push(Gun81);
_local1.push(Gun82);
_local1.push(Gun83);
_local1.push(Gun84);
var _local2:Array = new Array();
var _local3:* = _local1.length;
while (_local3-- > 0) {
_local4 = new CGunAbstract();
_local4.props = (_local1[_local3] as CGunProps);
_local2.push(_local4);
};
return (_local2);
}
public static function get Gun71():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.HEAVY;
_local1.name = CLocale.GUN_GRENADELAU_NAME;
_local1.description = CLocale.GUN_GRENADELAU_DESC;
_local1.price = 16500;
_local1.range = 280;
_local1.decrease = 0;
_local1.damage_min = 20;
_local1.damage_max = 60;
_local1.shotpause = 7;
_local1.pershot = 1;
_local1.clipmax = 5;
_local1.reloadpause = 40;
_local1.accuracy = 3;
_local1.speed = 15;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = true;
_local1.splash = true;
_local1.minpower = 6;
_local1.ammoclass = CBulletGrenade;
_local1.imgclass = mcWeapon71GrenadeLauncher;
_local1.ammoiconclass = mcAmmoIcon_Rocket;
_local1.ammotype = CGunProps.AMMO_ROCKETS;
_local1.minStrength = 6;
return (_local1);
}
public static function get Gun72():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.HEAVY;
_local1.name = CLocale.GUN_ROCKETL_NAME;
_local1.description = CLocale.GUN_ROCKETL_DESC;
_local1.price = 28999;
_local1.range = 900;
_local1.decrease = 0;
_local1.damage_min = 35;
_local1.damage_max = 100;
_local1.shotpause = 9;
_local1.pershot = 1;
_local1.clipmax = 4;
_local1.reloadpause = 75;
_local1.accuracy = 7;
_local1.speed = 12;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.splash = true;
_local1.minpower = 6;
_local1.ammoclass = CBulletRocket;
_local1.imgclass = mcWeapon72RocketLaunchar;
_local1.ammoiconclass = mcAmmoIcon_Rocket;
_local1.ammotype = CGunProps.AMMO_ROCKETS;
_local1.minStrength = 8;
return (_local1);
}
public static function get Gun51():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.CLOSECOMBAT;
_local1.name = CLocale.GUN_ACID_NAME;
_local1.description = CLocale.GUN_ACID_DESC;
_local1.price = 9000;
_local1.range = 65;
_local1.decrease = 0;
_local1.damage_min = 6;
_local1.damage_max = 14;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 30;
_local1.reloadpause = 37;
_local1.accuracy = 5;
_local1.speed = 16;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 4;
_local1.ammoclass = CBulletPlasmaSplashing;
_local1.imgclass = mcWeapon51Acid;
_local1.ammoiconclass = mcAmmoIcon_Fuel;
_local1.ammotype = CGunProps.AMMO_FUEL;
_local1.minStrength = 3;
_local1.upgradesAllowed = [0, 0, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun52():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.CLOSECOMBAT;
_local1.name = CLocale.GUN_FLAMER_NAME;
_local1.description = CLocale.GUN_FLAMER_DESC;
_local1.price = 14100;
_local1.range = 70;
_local1.decrease = 0;
_local1.damage_min = 20;
_local1.damage_max = 45;
_local1.shotpause = 1;
_local1.pershot = 1;
_local1.clipmax = 40;
_local1.reloadpause = 60;
_local1.accuracy = 5;
_local1.speed = 8;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 5;
_local1.ammoclass = CBulletFlamer;
_local1.imgclass = mcWeapon52LightFlamer;
_local1.ammoiconclass = mcAmmoIcon_Fuel;
_local1.ammotype = CGunProps.AMMO_FUEL;
_local1.minStrength = 6;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun53():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.CLOSECOMBAT;
_local1.name = CLocale.GUN_HFLAMER_NAME;
_local1.description = CLocale.GUN_HFLAMER_DESC;
_local1.price = 70000;
_local1.range = 130;
_local1.decrease = 0;
_local1.damage_min = 40;
_local1.damage_max = 60;
_local1.shotpause = 2;
_local1.pershot = 1;
_local1.clipmax = 45;
_local1.reloadpause = 70;
_local1.accuracy = 6;
_local1.speed = 10;
_local1.automatic = true;
_local1.penetrating = true;
_local1.slowing = true;
_local1.throwing = false;
_local1.minpower = 5;
_local1.ammoclass = CBulletFlamer;
_local1.imgclass = mcWeapon53HeavyFlamer;
_local1.ammoiconclass = mcAmmoIcon_Fuel;
_local1.ammotype = CGunProps.AMMO_FUEL;
_local1.minStrength = 8;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
public static function get Gun32():CGunProps{
var _local1:CGunProps = new CGunProps();
_local1.guntype = CGunProps.RIFLE;
_local1.name = CLocale.GUN_LASERRIFLE_NAME;
_local1.description = CLocale.GUN_LASERRIFLE_DESC;
_local1.price = 12000;
_local1.range = 340;
_local1.decrease = 0.5;
_local1.damage_min = 22;
_local1.damage_max = 29;
_local1.shotpause = 3;
_local1.pershot = 1;
_local1.clipmax = 30;
_local1.reloadpause = 30;
_local1.accuracy = 8;
_local1.speed = 30;
_local1.automatic = true;
_local1.penetrating = false;
_local1.slowing = false;
_local1.throwing = false;
_local1.minpower = 4;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
_local1.ammoclass = CBulletLaser;
_local1.imgclass = mcWeapon32RifleLaser;
_local1.ammoiconclass = mcAmmoIcon_Battery;
_local1.ammotype = CGunProps.AMMO_ENERGY;
_local1.minStrength = 5;
_local1.upgradesAllowed = [1, 1, 1, 0, 1, 1];
return (_local1);
}
}
}//package gunz
Section 74
//CArmorAbstract (itemz.CArmorAbstract)
package itemz {
public class CArmorAbstract extends CItemAbstract {
protected var _AvoidProb:Number;// = 0.1
protected var _Absorb:int;// = 0
protected var _maxHP:int;// = 100
protected var _Class:Number;// = 0.2
protected var _speedMod:Number;// = 1
public var armorClassId:int;// = 0
protected var IconClass:Class;
public function CArmorAbstract(){
IconClass = mcArmorLight;
super();
}
public function get armorClass():Number{
return (_Class);
}
public function get maxHP():int{
return (_maxHP);
}
public function get AvoidProv():Number{
return (_AvoidProb);
}
public function get ArmorIconClass():Class{
return (IconClass);
}
public function get speedModifier():Number{
return (_speedMod);
}
public function get Absorb():int{
return (_Absorb);
}
}
}//package itemz
Section 75
//CArmorHeavy (itemz.CArmorHeavy)
package itemz {
public class CArmorHeavy extends CArmorAbstract {
public function CArmorHeavy(){
_img = new mcArmorHeavy();
IconClass = bmdbronek3;
_name = CLocale.ARM_HEAVY_NAME;
_description = CLocale.ARM_HEAVY_DESC;
_onscreendesc = CLocale.ARM_HEAVY_SCR;
_maxHP = 500;
_AvoidProb = 0.2;
_Absorb = 2;
_Class = 0.5;
_speedMod = 0.8;
price = 9000;
armorClassId = 3;
addChild(_img);
}
}
}//package itemz
Section 76
//CArmorLight (itemz.CArmorLight)
package itemz {
public class CArmorLight extends CArmorAbstract {
public function CArmorLight(){
_img = new mcArmorLight();
IconClass = bmdbronek1;
_name = CLocale.ARM_LIGHT_NAME;
_description = CLocale.ARM_LIGHT_DESC;
_onscreendesc = CLocale.ARM_LIGHT_SCR;
_maxHP = 100;
_AvoidProb = 0.1;
_Absorb = 0;
_Class = 0.2;
_speedMod = 1;
price = 1000;
armorClassId = 1;
addChild(_img);
}
}
}//package itemz
Section 77
//CArmorMedium (itemz.CArmorMedium)
package itemz {
public class CArmorMedium extends CArmorAbstract {
public function CArmorMedium(){
_img = new mcArmorMedium();
IconClass = bmdbronek2;
_name = CLocale.ARM_MED_NAME;
_description = CLocale.ARM_MED_DESC;
_onscreendesc = CLocale.ARM_MED_SCR;
_maxHP = 250;
_AvoidProb = 0.2;
_Absorb = 1;
_Class = 0.3;
_speedMod = 1;
price = 4500;
armorClassId = 2;
addChild(_img);
}
}
}//package itemz
Section 78
//CArmorNone (itemz.CArmorNone)
package itemz {
public class CArmorNone extends CArmorAbstract {
public function CArmorNone(){
_img = new mcArmorNONE();
IconClass = bmdbronek0;
_name = "T-Shirt";
_description = "Your lovely T-Shirt";
_onscreendesc = "T-Shirt";
_maxHP = 0;
_AvoidProb = 0;
_Absorb = 0;
_Class = 0;
_speedMod = 1;
addChild(_img);
}
}
}//package itemz
Section 79
//CItemAbstract (itemz.CItemAbstract)
package itemz {
import flash.display.*;
public class CItemAbstract extends Sprite {
protected var _img:MovieClip;
public var price:int;// = 0
protected var _name:String;// = "Item"
protected var _onscreendesc:String;// = "+"
protected var _description:String;// = "Description"
public function get fullname():String{
return (_name);
}
public function get img():MovieClip{
return (_img);
}
public function get onscreendesc():String{
return (_onscreendesc);
}
public function get description():String{
return (_description);
}
}
}//package itemz
Section 80
//CItemBuks (itemz.CItemBuks)
package itemz {
public class CItemBuks extends CItemAbstract {
private var _amount:int;// = 50
public var monsterLoh:Boolean;// = false
public function CItemBuks(){
_img = new mcBonuBsucks();
_name = CLocale.BN_BUCKS_NAME;
_description = CLocale.BN_BUCKS_DESC;
_onscreendesc = CLocale.BN_BUCKS_SCR;
addChild(_img);
}
public function get amount():int{
var _local1:int = _amount;
if (monsterLoh){
_local1 = (_amount / 10);
};
return (_local1);
}
}
}//package itemz
Section 81
//CItemMedikit (itemz.CItemMedikit)
package itemz {
public class CItemMedikit extends CItemAbstract {
private var _HP:int;// = 25
public function CItemMedikit(){
_img = new mcMedikit();
_name = CLocale.BN_MEDI_NAME;
_description = CLocale.BN_MEDI_DESC;
_onscreendesc = CLocale.BN_MEDI_SCR;
addChild(_img);
}
public function get HP():int{
return (_HP);
}
}
}//package itemz
Section 82
//CItemMedikitFull (itemz.CItemMedikitFull)
package itemz {
public class CItemMedikitFull extends CItemAbstract {
public function CItemMedikitFull(){
_img = new mcMedikitFull();
_name = CLocale.BN_FULLMEDI_NAME;
_description = CLocale.BN_FULLMEDI_DESC;
_onscreendesc = CLocale.BN_FULLMEDI_SCR;
addChild(_img);
}
}
}//package itemz
Section 83
//CItemNarcotix (itemz.CItemNarcotix)
package itemz {
public class CItemNarcotix extends CItemAbstract {
public function CItemNarcotix(){
_name = "SOME NARCO";
}
public function get time():int{
return (0);
}
public function get modifier():Number{
return (0);
}
}
}//package itemz
Section 84
//CItemNarcotixSpeed (itemz.CItemNarcotixSpeed)
package itemz {
public class CItemNarcotixSpeed extends CItemNarcotix {
private var _speedMod:Number;// = 1.3
private var _workingtime:int;// = 300
public function CItemNarcotixSpeed(){
_img = new mcNarkotixSpeed();
_name = CLocale.BN_NARCO_NAME;
_description = CLocale.BN_NARCO_DESC;
_onscreendesc = CLocale.BN_NARCO_SCR;
addChild(_img);
}
override public function get modifier():Number{
return (_speedMod);
}
override public function get time():int{
return (_workingtime);
}
}
}//package itemz
Section 85
//CLevelBank (levels.CLevelBank)
package levels {
import flash.display.*;
import flash.geom.*;
import enemies.*;
import animations.*;
public class CLevelBank {
private const TYPE_SPAWNS_ALLRANDOM:Array;
private const maxlevels:int = 50;
private var LevelBuses:Array;
private var iterator:int;// = 0
private var Multiki:Array;
private var LevelMap:Array;
private var LevelIncubators:Array;
public function CLevelBank(){
LevelMap = [{nr:0, source:LevelSource_Yard, quote:1, dark:false, shady:false, maxEnemies:2, enemyProb:0.95, anMax:0, anProb:0}, {nr:1, source:LevelSource_Yard, quote:2, dark:false, shady:false, maxEnemies:4, enemyProb:0.94, anMax:0, anProb:0}, {nr:2, source:LevelSource_Parking, quote:1, dark:false, shady:false, maxEnemies:7, enemyProb:0.8, anMax:0, anProb:0}, {nr:3, source:LevelSource_Parking, quote:2, dark:false, shady:true, maxEnemies:10, enemyProb:0.95, anMax:1, anProb:0.02}, {nr:4, source:LevelSource_Parking, quote:3, dark:true, shady:false, maxEnemies:5, enemyProb:0.97, anMax:0, anProb:0}, {nr:5, source:LevelSource_Street, quote:1, dark:false, shady:false, maxEnemies:12, enemyProb:0.83, anMax:0, anProb:0.02}, {nr:6, source:LevelSource_Street, quote:2, dark:true, shady:false, maxEnemies:13, enemyProb:0.94, anMax:0, anProb:0}, {nr:7, source:LevelSource_Street, quote:3, dark:false, shady:false, maxEnemies:10, enemyProb:0.92, anMax:0, anProb:0}, {nr:8, source:LevelSource_Yard, quote:3, dark:false, shady:false, maxEnemies:12, enemyProb:0.7, anMax:1, anProb:0.02}, {nr:9, source:LevelSource_Yard, quote:4, dark:false, shady:false, maxEnemies:16, enemyProb:0.7, anMax:1, anProb:0.04}, {nr:10, source:LevelSource_Museum, quote:1, dark:false, shady:false, maxEnemies:20, enemyProb:0.8, anMax:2, anProb:0.03}, {nr:11, source:LevelSource_Museum, quote:2, dark:false, shady:false, maxEnemies:14, enemyProb:0.915, anMax:1, anProb:0.02}, {nr:12, source:LevelSource_Park, quote:1, dark:false, shady:true, maxEnemies:10, enemyProb:0.9, anMax:1, anProb:0.02}, {nr:13, source:LevelSource_Park, quote:2, dark:false, shady:false, maxEnemies:12, enemyProb:0.88, anMax:1, anProb:0.02}, {nr:14, source:LevelSource_Park, quote:3, dark:false, shady:false, maxEnemies:16, enemyProb:0.4, anMax:2, anProb:0.06}, {nr:15, source:LevelSource_Parking, quote:4, dark:false, shady:false, maxEnemies:20, enemyProb:0.5, anMax:1, anProb:0.02}, {nr:16, source:LevelSource_Parking, quote:5, dark:true, shady:false, maxEnemies:9, enemyProb:0.9, anMax:1, anProb:0.01}, {nr:17, source:LevelSource_Park, quote:4, dark:true, shady:false, maxEnemies:7, enemyProb:0.96, anMax:1, anProb:0.01}, {nr:18, source:LevelSource_Park, quote:5, dark:false, shady:false, maxEnemies:20, enemyProb:0.8, anMax:1, anProb:0.02}, {nr:19, source:LevelSource_Park, quote:6, dark:false, shady:false, maxEnemies:22, enemyProb:0.86, anMax:2, anProb:0.04}, {nr:20, source:LevelSource_Street, quote:4, dark:false, shady:false, maxEnemies:23, enemyProb:0.5, anMax:3, anProb:0.06}, {nr:21, source:LevelSource_Street, quote:5, dark:false, shady:true, maxEnemies:14, enemyProb:0.92, anMax:0, anProb:0}, {nr:22, source:LevelSource_Street, quote:6, dark:false, shady:false, maxEnemies:12, enemyProb:0.7, anMax:1, anProb:0.02}, {nr:23, source:LevelSource_Yard, quote:5, dark:false, shady:false, maxEnemies:30, enemyProb:0.4, anMax:1, anProb:0.03}, {nr:24, source:LevelSource_Yard, quote:6, dark:true, shady:false, maxEnemies:11, enemyProb:0.9, anMax:1, anProb:0.02}, {nr:25, source:LevelSource_Yard, quote:7, dark:false, shady:false, maxEnemies:24, enemyProb:0.2, anMax:1, anProb:0.03}, {nr:26, source:LevelSource_Parking, quote:6, dark:false, shady:false, maxEnemies:30, enemyProb:0.2, anMax:2, anProb:0.07}, {nr:27, source:LevelSource_Parking, quote:7, dark:false, shady:false, maxEnemies:20, enemyProb:0.91, anMax:1, anProb:0.02}, {nr:28, source:LevelSource_Parking, quote:8, dark:false, shady:true, maxEnemies:13, enemyProb:0.9, anMax:2, anProb:0.02}, {nr:29, source:LevelSource_Museum, quote:3, dark:true, shady:false, maxEnemies:20, enemyProb:0.95, anMax:1, anProb:0.02}, {nr:30, source:LevelSource_Museum, quote:4, dark:false, shady:true, maxEnemies:22, enemyProb:0.9, anMax:2, anProb:0.02}, {nr:31, source:LevelSource_Museum, quote:5, dark:false, shady:false, maxEnemies:10, enemyProb:0.9, anMax:2, anProb:0.03}, {nr:32, source:LevelSource_Parking, quote:9, dark:false, shady:false, maxEnemies:30, enemyProb:0.6, anMax:1, anProb:0.04}, {nr:33, source:LevelSource_Museum, quote:6, dark:false, shady:false, maxEnemies:24, enemyProb:0.5, anMax:3, anProb:0.04}, {nr:34, source:LevelSource_Museum, quote:7, dark:false, shady:true, maxEnemies:28, enemyProb:0.91, anMax:1, anProb:0.02}, {nr:35, source:LevelSource_Street, quote:7, dark:false, shady:false, maxEnemies:30, enemyProb:0.3, anMax:1, anProb:0.02}, {nr:36, source:LevelSource_Street, quote:8, dark:false, shady:false, maxEnemies:30, enemyProb:0.9, anMax:1, anProb:0.03}, {nr:37, source:LevelSource_Park, quote:7, dark:true, shady:false, maxEnemies:13, enemyProb:0.88, anMax:1, anProb:0.01}, {nr:38, source:LevelSource_Park, quote:8, dark:false, shady:false, maxEnemies:24, enemyProb:0.9, anMax:1, anProb:0.02}, {nr:39, source:LevelSource_Park, quote:9, dark:false, shady:false, maxEnemies:26, enemyProb:0.4, anMax:2, anProb:0.08}, {nr:40, source:LevelSource_Yard, quote:8, dark:false, shady:false, maxEnemies:24, enemyProb:0.3, anMax:1, anProb:0.03}, {nr:41, source:LevelSource_Yard, quote:9, dark:false, shady:true, maxEnemies:20, enemyProb:0.8, anMax:2, anProb:0.03}, {nr:42, source:LevelSource_Museum, quote:8, dark:true, shady:false, maxEnemies:20, enemyProb:0.82, anMax:1, anProb:0.03}, {nr:43, source:LevelSource_Museum, quote:9, dark:false, shady:false, maxEnemies:1, enemyProb:0.2, anMax:0, anProb:0}, {nr:44, source:LevelSource_Museum, quote:10, dark:false, shady:false, maxEnemies:30, enemyProb:0.5, anMax:2, anProb:0.04}, {nr:45, source:LevelSource_Park, quote:10, dark:false, shady:false, maxEnemies:30, enemyProb:0.1, anMax:3, anProb:0.03}, {nr:46, source:LevelSource_Street, quote:9, dark:false, shady:true, maxEnemies:20, enemyProb:0.8, anMax:2, anProb:0.04}, {nr:47, source:LevelSource_Parking, quote:10, dark:true, shady:false, maxEnemies:16, enemyProb:0.87, anMax:2, anProb:0.05}, {nr:48, source:LevelSource_Street, quote:10, dark:false, shady:false, maxEnemies:24, enemyProb:0.4, anMax:2, anProb:0.04}, {nr:49, source:LevelSource_Yard, quote:10, dark:false, shady:false, maxEnemies:30, enemyProb:0.1, anMax:2, anProb:0.06}];
TYPE_SPAWNS_ALLRANDOM = [0, 0, 0, 0, 0, 0];
LevelIncubators = [{nr:0, tFrnd:false, mLev:1, mDev:0, rnd:true, rev:false, quant:[2, 0, 1, 3, 0, 0], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:1, tFrnd:false, mLev:1, mDev:0, rnd:true, rev:false, quant:[3, 1, 3, 3, 0, 0], spwn:[[7], [7], [6], [6], 0, 0]}, {nr:2, tFrnd:false, mLev:1, mDev:0, rnd:true, rev:false, quant:[0, 0, 10, 8, 5, 5], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:3, tFrnd:false, mLev:2, mDev:0, rnd:false, rev:false, quant:[16, 0, 20, 8, 0, 0], spwn:[[0, 8], 0, [0], [6, 7, 8, 9], 0, 0]}, {nr:4, tFrnd:false, mLev:2, mDev:1, rnd:false, rev:true, quant:[0, 0, 10, 5, 5, 2], spwn:[0, 0, [3], [7, 9], [7, 9], [2]]}, {nr:5, tFrnd:false, mLev:3, mDev:0, rnd:true, rev:false, quant:[0, 2, 50, 2, 1, 5], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:6, tFrnd:false, mLev:4, mDev:1, rnd:false, rev:true, quant:[50, 20, 2, 2, 2, 2], spwn:[[5, 11], [8], [9], [10], [1, 2], [5, 6]]}, {nr:7, tFrnd:true, mLev:3, mDev:0, rnd:false, rev:false, quant:[10, 10, 10, 10, 10, 3], spwn:[0, 0, [0, 1], [6, 0], [6, 0], 0]}, {nr:8, tFrnd:false, mLev:4, mDev:1, rnd:false, rev:false, quant:[20, 5, 30, 20, 20, 20], spwn:[[6, 7], [7, 0], [0, 1], [3], [5], [2]]}, {nr:9, tFrnd:false, mLev:5, mDev:1, rnd:true, rev:false, quant:[2, 70, 2, 2, 2, 2], spwn:[0, [0, 6, 7, 3], 0, 0, 0, 0]}, {nr:10, tFrnd:false, mLev:5, mDev:2, rnd:false, rev:true, quant:[2, 10, 30, 70, 10, 30], spwn:[0, [1], [8], [5, 7, 9], [7, 9], [5, 8]]}, {nr:11, tFrnd:true, mLev:6, mDev:1, rnd:true, rev:false, quant:[20, 3, 50, 20, 2, 2], spwn:[[1], 0, [5, 7, 8], 0, 0, 0]}, {nr:12, tFrnd:false, mLev:6, mDev:2, rnd:false, rev:false, quant:[41, 1, 1, 100, 50, 30], spwn:[[0, 9], [3], [0, 10], [5, 6, 7, 8], 0, [1]]}, {nr:13, tFrnd:false, mLev:7, mDev:1, rnd:true, rev:false, quant:[42, 80, 40, 40, 20, 5], spwn:[[0, 2], [6, 10], [4, 5], [3, 4], 0, 0]}, {nr:14, tFrnd:false, mLev:7, mDev:2, rnd:false, rev:true, quant:[10, 10, 15, 80, 80, 20], spwn:[0, 0, 0, [0, 1, 3], [6, 7, 8], 0]}, {nr:15, tFrnd:false, mLev:8, mDev:1, rnd:true, rev:false, quant:[22, 130, 2, 2, 2, 130], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:16, tFrnd:false, mLev:8, mDev:2, rnd:true, rev:false, quant:[3, 50, 30, 30, 50, 30], spwn:[0, [2], [9], [5], [11], 0]}, {nr:17, tFrnd:true, mLev:9, mDev:1, rnd:false, rev:false, quant:[20, 8, 20, 20, 50, 20], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:18, tFrnd:false, mLev:9, mDev:2, rnd:true, rev:false, quant:[60, 60, 60, 60, 60, 60], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:19, tFrnd:false, mLev:10, mDev:1, rnd:true, rev:false, quant:[5, 5, 5, 170, 2, 5], spwn:[0, 0, 0, [4, 9], 0, 0]}, {nr:20, tFrnd:false, mLev:10, mDev:3, rnd:true, rev:false, quant:[8, 8, 8, 8, 160, 8], spwn:[0, 0, 0, 0, [1, 2, 3, 4, 5], 0]}, {nr:21, tFrnd:true, mLev:11, mDev:1, rnd:true, rev:false, quant:[150, 10, 9, 9, 9, 1], spwn:[[2, 9, 10, 11], 0, 0, 0, 0, [2, 8, 9, 10, 11]]}, {nr:22, tFrnd:true, mLev:11, mDev:2, rnd:false, rev:false, quant:[20, 20, 70, 20, 20, 20], spwn:[0, [2, 8], [9, 10, 1], [6], 0, [1, 2]]}, {nr:23, tFrnd:false, mLev:12, mDev:1, rnd:true, rev:false, quant:[30, 70, 10, 10, 40, 80], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:24, tFrnd:false, mLev:12, mDev:1, rnd:false, rev:true, quant:[30, 10, 20, 70, 90, 20], spwn:[[2], [5], 0, [0, 6, 7], [3, 4], 0]}, {nr:25, tFrnd:false, mLev:13, mDev:1, rnd:true, rev:false, quant:[10, 10, 140, 10, 10, 10], spwn:[0, 0, [1, 2, 5], 0, 0, 0]}, {nr:26, tFrnd:false, mLev:13, mDev:3, rnd:true, rev:false, quant:[90, 100, 20, 20, 20, 80], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:27, tFrnd:true, mLev:14, mDev:1, rnd:false, rev:true, quant:[50, 30, 30, 40, 20, 20], spwn:[[2], [0], [8], [9, 11], 0, [5, 6, 7]]}, {nr:28, tFrnd:true, mLev:14, mDev:2, rnd:false, rev:false, quant:[20, 20, 20, 20, 20, 20], spwn:[[1], [2], [4], [6], [9], [11]]}, {nr:29, tFrnd:false, mLev:15, mDev:3, rnd:true, rev:false, quant:[10, 70, 20, 30, 70, 30], spwn:[0, [7], 0, [7], [5], [9]]}, {nr:30, tFrnd:false, mLev:15, mDev:2, rnd:true, rev:false, quant:[300, 8, 8, 8, 8, 8], spwn:[[7, 8, 9], 0, 0, 0, 0, 0]}, {nr:31, tFrnd:false, mLev:16, mDev:2, rnd:false, rev:false, quant:[20, 20, 20, 20, 90, 130], spwn:[[4, 6], [0, 2], [8, 9], [5, 7], 0, [0, 1, 2, 8, 5]]}, {nr:32, tFrnd:false, mLev:16, mDev:2, rnd:false, rev:true, quant:[61, 90, 30, 10, 2, 120], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:33, tFrnd:false, mLev:17, mDev:3, rnd:true, rev:false, quant:[80, 6, 80, 6, 80, 20], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:34, tFrnd:false, mLev:17, mDev:1, rnd:false, rev:false, quant:[20, 90, 6, 90, 8, 90], spwn:[0, [5, 7], [8], [9], 0, [0, 2, 4, 6]]}, {nr:35, tFrnd:false, mLev:18, mDev:2, rnd:true, rev:false, quant:[14, 10, 10, 10, 10, 164], spwn:[0, 0, 0, 0, 0, [0]]}, {nr:36, tFrnd:true, mLev:18, mDev:2, rnd:true, rev:false, quant:[65, 40, 65, 88, 65, 65], spwn:[[0], [1], [2], [3], [4], 0]}, {nr:37, tFrnd:true, mLev:19, mDev:1, rnd:false, rev:true, quant:[20, 30, 20, 40, 20, 66], spwn:[[4], [9], 0, [1], 0, [7]]}, {nr:38, tFrnd:false, mLev:19, mDev:3, rnd:true, rev:false, quant:[50, 50, 50, 50, 50, 100], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:39, tFrnd:false, mLev:20, mDev:4, rnd:false, rev:false, quant:[90, 60, 90, 30, 50, 100], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:40, tFrnd:true, mLev:20, mDev:2, rnd:true, rev:false, quant:[150, 150, 30, 30, 20, 30], spwn:[[0, 6, 7], [1, 0, 7], [5, 6], [2], [0, 6, 7], 0]}, {nr:41, tFrnd:false, mLev:21, mDev:2, rnd:false, rev:true, quant:[22, 22, 22, 100, 250, 100], spwn:[0, 0, 0, [3], [0, 1, 2], [4, 5]]}, {nr:42, tFrnd:false, mLev:21, mDev:2, rnd:false, rev:false, quant:[22, 200, 2, 2, 2, 100], spwn:[0, [5, 8, 9], 0, 0, [7], [0, 5, 6, 7, 9]]}, {nr:43, tFrnd:false, mLev:22, mDev:1, rnd:true, rev:false, quant:[999, 0, 0, 0, 0, 0], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:44, tFrnd:false, mLev:22, mDev:3, rnd:true, rev:false, quant:[73, 73, 73, 73, 73, 73], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:45, tFrnd:false, mLev:23, mDev:3, rnd:true, rev:false, quant:[120, 180, 30, 30, 200, 22], spwn:[[0, 2], [6], [7], [7], [0, 2, 4, 10], 0]}, {nr:46, tFrnd:false, mLev:23, mDev:2, rnd:false, rev:true, quant:[100, 50, 20, 20, 20, 100], spwn:[0, [0], [10], [4], [1], 0]}, {nr:47, tFrnd:false, mLev:24, mDev:2, rnd:true, rev:false, quant:[76, 76, 76, 76, 76, 76], spwn:TYPE_SPAWNS_ALLRANDOM}, {nr:48, tFrnd:false, mLev:24, mDev:3, rnd:false, rev:true, quant:[120, 100, 200, 100, 70, 50], spwn:[[4, 7, 8, 11], 0, [0, 5], [2, 3, 4], [10], [6]]}, {nr:49, tFrnd:false, mLev:25, mDev:4, rnd:true, rev:false, quant:[110, 130, 110, 130, 130, 160], spwn:TYPE_SPAWNS_ALLRANDOM}];
LevelBuses = [{nr:0, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:1, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:2, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:3, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:4, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:5, isThere:true, probPerBus:[[2, 2, 1, 1, 1, 1], 0, 0], hitPerBus:[200, 200, 200], delay:[15, 20, 30]}, {nr:6, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:7, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:8, isThere:true, probPerBus:[[1, 1, 3, 2, 1, 1], 0, 0], hitPerBus:[340, 200, 200], delay:[10, 20, 30]}, {nr:9, isThere:true, probPerBus:[0, [1, 1, 1, 3, 3, 1], 0], hitPerBus:[300, 400, 200], delay:[10, 20, 30]}, {nr:10, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:11, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:12, isThere:true, probPerBus:[[1, 1, 1, 2, 2, 2], 0, 0], hitPerBus:[500, 200, 200], delay:[2, 20, 30]}, {nr:13, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:14, isThere:true, probPerBus:[[1, 1, 1, 1, 3, 3], [4, 3, 2, 1, 1, 1], 0], hitPerBus:[600, 400, 200], delay:[10, 25, 30]}, {nr:15, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:16, isThere:true, probPerBus:[[9, 1, 1, 1, 1, 8], 0, 0], hitPerBus:[600, 200, 200], delay:[20, 20, 30]}, {nr:17, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:18, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:19, isThere:true, probPerBus:[[5, 5, 1, 1, 1, 1], [1, 1, 1, 1, 1, 10], 0], hitPerBus:[600, 700, 200], delay:[10, 5, 30]}, {nr:20, isThere:true, probPerBus:[[1, 1, 10, 1, 1, 1], [1, 1, 1, 1, 10, 1], [1, 10, 1, 1, 1, 1]], hitPerBus:[700, 700, 700], delay:[14, 28, 36]}, {nr:21, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:22, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:23, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:24, isThere:true, probPerBus:[[1, 1, 1, 7, 1, 7], 0, 0], hitPerBus:[800, 200, 200], delay:[30, 20, 30]}, {nr:25, isThere:true, probPerBus:[[10, 10, 1, 1, 1, 1], [1, 1, 1, 10, 10, 1], 0], hitPerBus:[800, 500, 200], delay:[30, 10, 30]}, {nr:26, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:27, isThere:true, probPerBus:[0, [1, 1, 1, 1, 10, 1], [1, 1, 10, 1, 1, 1]], hitPerBus:[500, 500, 1000], delay:[10, 25, 30]}, {nr:28, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:29, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:30, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:31, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:32, isThere:true, probPerBus:[[1, 1, 1, 1, 1, 1], 0, 0], hitPerBus:[1000, 1000, 1000], delay:[3, 20, 30]}, {nr:33, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:34, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:35, isThere:true, probPerBus:[[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]], hitPerBus:[1200, 200, 1200], delay:[10, 10, 10]}, {nr:36, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:37, isThere:true, probPerBus:[[1, 1, 1, 7, 1, 7], 0, 0], hitPerBus:[1300, 200, 200], delay:[2, 20, 30]}, {nr:38, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:39, isThere:true, probPerBus:[[1, 1, 1, 10, 10, 1], [10, 1, 1, 1, 1, 1], 0], hitPerBus:[1400, 1400, 200], delay:[10, 11, 30]}, {nr:40, isThere:true, probPerBus:[0, [1, 1, 1, 1, 1, 10], 0], hitPerBus:[900, 9990, 200], delay:[10, 20, 30]}, {nr:41, isThere:true, probPerBus:[[1, 1, 1, 1, 1, 1], 0, 0], hitPerBus:[1600, 200, 200], delay:[3, 20, 30]}, {nr:42, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:43, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:44, isThere:false, probPerBus:[0, 0, 0], hitPerBus:[200, 200, 200], delay:[10, 20, 30]}, {nr:45, isThere:true, probPerBus:[[1, 1, 1, 5, 5, 5], [1, 15, 1, 1, 1, 1], 0], hitPerBus:[1700, 1700, 200], delay:[10, 2, 30]}, {nr:46, isThere:true, probPerBus:[[10, 10, 1, 1, 1, 1], [1, 1, 10, 10, 1, 1], [1, 1, 1, 1, 10, 10]], hitPerBus:[1600, 1800, 2200], delay:[1, 2, 3]}, {nr:47, isThere:true, probPerBus:[[1, 1, 1, 10, 10, 1], [1, 1, 1, 1, 1, 10], [1, 1, 1, 1, 1, 1]], hitPerBus:[2200, 2200, 2200], delay:[20, 20, 39]}, {nr:48, isThere:true, probPerBus:[[1, 6, 1, 1, 1, 1], [1, 1, 1, 1, 6, 1], 0], hitPerBus:[2300, 2500, 200], delay:[1, 20, 30]}, {nr:49, isThere:true, probPerBus:[[1, 1, 10, 10, 1, 1], [1, 10, 1, 1, 1, 10], [1, 1, 1, 1, 1, 1]], hitPerBus:[2600, 2700, 3000], delay:[5, 31, 30]}];
Multiki = [{nr:0, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:1, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:2, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:3, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:4, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:5, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:6, isThere:true, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:mc_Movie_Scene_2}, {nr:7, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT1, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:8, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:9, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:10, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT11, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:11, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT12, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:12, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:13, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:14, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:15, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:16, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT17, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:17, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:18, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:19, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:20, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:21, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:22, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:23, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:24, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:25, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:26, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT27, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:27, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:28, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:29, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:30, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:31, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:32, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:33, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:34, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:35, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT36, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:36, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:37, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:38, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:39, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT40, chatPortrait:mc_charPortraitTiolka, sceneClass:Sprite}, {nr:40, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:41, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:42, isThere:true, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:mc_Movie_Scene_3}, {nr:43, isThere:true, isChat:true, chatText:CLocale.DIALOGUE_CHAT2, chatPortrait:mc_charPortraitZvir, sceneClass:Sprite}, {nr:44, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:45, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:46, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:47, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:48, isThere:false, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:Sprite}, {nr:49, isThere:true, isChat:false, chatText:[], chatPortrait:Sprite, sceneClass:mc_Movie_Scene_4}];
super();
trace("levelbank created");
}
public function setLevel(_arg1:int):Boolean{
var _local2:Boolean;
if ((((_arg1 >= 0)) && ((_arg1 <= maxlevels)))){
iterator = _arg1;
_local2 = true;
};
return (_local2);
}
public function get isNextLevel():Boolean{
return ((maxlevels > iterator));
}
private function getSpawns(_arg1:MovieClip):Array{
var _local5:Sprite;
var _local6:CSpawnLocation;
var _local2:Sprite = (_arg1.getChildByName("spawns") as Sprite);
var _local3:Array = new Array();
var _local4:int;
while (_local4 < _local2.numChildren) {
_local5 = (_local2.getChildByName(("spawn" + _local4.toString())) as Sprite);
_local6 = new CSpawnLocation(_local5.x, _local5.y, (_local5.x + _local5.width), (_local5.y + _local5.height));
trace("SPAWN n", _local4, "loc", _local5.x, _local5.y, (_local5.x + _local5.width), (_local5.y + _local5.height));
_local3.push(_local6);
_local4++;
};
return (_local3);
}
public function get currentLevelNr():int{
return ((iterator + 1));
}
public function get nextLevel():CLevelProperties{
var _local1:CLevelProperties = generateLevel(iterator);
trace("level nr", iterator, "created");
trace(_local1);
iterator++;
Saver.inst.lastLevel = iterator;
return (_local1);
}
private function generateLevel(_arg1:int):CLevelProperties{
var _local15:Sprite;
var _local16:int;
var _local17:CEnemyBus;
var _local18:Number;
var _local2:CLevelProperties = new CLevelProperties();
_local2.levelNumberStr = CLocale.STAGE_NUMBERS[_arg1];
_local2.levelIntroStr = CLocale.STAGE_INTROS[_arg1];
var _local3:Object = LevelMap[_arg1];
var _local4:Class = (_local3.source as Class);
var _local5:MovieClip = new (_local4);
_local2.levelSourceClass = _local4;
var _local6:Sprite = (_local5.getChildByName("citata") as Sprite);
var _local7:Sprite = (_local6.getChildByName(("citata" + int(_local3.quote).toString())) as Sprite);
_local2.levelNumber = _local3.nr;
_local2.DarkLevel = _local3.dark;
_local2.ShadyLevel = _local3.shady;
_local2.maxEnemiesOnScreen = _local3.maxEnemies;
_local2.nextEnemyProb = _local3.enemyProb;
_local2.anomaliesMax = _local3.anMax;
_local2.anomaliesProb = _local3.anProb;
_local2.levelAnimations = (_local5.getChildByName("i_level_animations") as MovieClip);
_local2.levelBackGroundBitmap = CClipTools.getBitmapData((_local5.getChildByName("background") as Sprite));
_local2.levelTreesLayer = (_local5.getChildByName("overlay") as Sprite);
_local2.levelShadowLayer = (_local5.getChildByName("shadow") as Sprite);
var _local8:MovieClip = (_local5.getChildByName("i_anim_danger") as MovieClip);
if (_local8 != null){
_local2.isThereDangerAnimations = true;
_local2.levelDangerAnimationsClip = _local8;
_local2.levelDangerAnimations = new Array();
_local2.levelDangerAnimations.push((_local8.getChildAt(0) as LevelAnimDelayedDangerAbs));
_local2.levelDangerAnimations.push((_local8.getChildAt(1) as LevelAnimDelayedDangerAbs));
};
_local2.asphaltMessage = CClipTools.getBitmapData(_local7);
_local2.asphaltMessagePoint = new Point((_local7.x + _local6.x), (_local7.y + _local6.y));
var _local9:Array = getSpawns(_local5);
var _local10:CMonsterIncubator = new CMonsterIncubator();
_local10.Spawns = _local9;
var _local11:Object = LevelIncubators[_arg1];
_local10.TypeQuantity = (_local11.quant as Array);
_local10.TypeSpawns = (_local11.spwn as Array);
_local10.setEnemyLevelandDeviation(_local11.mLev, _local11.mDev);
_local10.initialize(_local11.rnd, _local11.rev);
var _local12:Array = new Array();
var _local13:Object = LevelBuses[_arg1];
if (_local13.isThere){
_local15 = (_local5.getChildByName("buses") as Sprite);
_local16 = _local13.probPerBus.length;
while (_local16 > 0) {
_local16--;
if ((_local13.probPerBus[_local16] is Array)){
_local17 = (_local15.getChildByName(("bus" + _local16.toString())) as CEnemyBus);
trace(_local17);
trace(_local15.getChildAt(_local16));
trace(_local15.getChildByName(("bus" + _local16.toString())));
_local18 = 3.3;
_local17.startMonsters(_local13.probPerBus[_local16], (_local13.delay[_local16] * 1000), (_local13.hitPerBus[_local16] * _local18), _local11.mLev, _local11.mDev);
_local17.x = (_local17.x + _local15.x);
_local17.y = (_local17.y + _local15.y);
_local10.buses.add(_local17);
trace("LEVEL BUS COUNT", _local10.buses.count);
};
};
};
_local2.incubator = _local10;
_local2.theTiolkaFriend = _local11.tFrnd;
var _local14:Object = Multiki[_arg1];
_local2.multikIsThere = _local14.isThere;
_local2.multikIsChat = _local14.isChat;
_local2.multikChatPortrait = (_local14.chatPortrait as Class);
_local2.multikChatText = (_local14.chatText as Array);
_local2.multikSceneClass = (_local14.sceneClass as Class);
if (_arg1 == 0){
_local2.helpMessageSpr = new sprBgHelp1();
} else {
if (_arg1 == 1){
_local2.helpMessageSpr = new sprBgHelp2();
} else {
if (_arg1 == 2){
_local2.helpMessageSpr = new sprBgHelp3();
};
};
};
_local3 = null;
_local4 = null;
_local5 = null;
_local6 = null;
_local7 = null;
_local10 = null;
_local9 = null;
_local11 = null;
_local10 = null;
return (_local2);
}
public function reset(){
iterator = 0;
}
}
}//package levels
Section 86
//CLevelProperties (levels.CLevelProperties)
package levels {
import flash.display.*;
import flash.geom.*;
public class CLevelProperties {
public var levelNumberStr:String;// = "Stage 1. Level 1"
public var multikChatPortrait:Class;
public var levelDangerAnimationsClip:MovieClip;
public var DarkLevel:Boolean;// = false
public var levelAnimations:MovieClip;
public var levelDangerAnimations:Array;
public var multikChatText:Array;
public var multikIsChat:Boolean;// = false
public var asphaltMessagePoint:Point;
public var multikIsThere:Boolean;// = false
public var theTiolkaFriend:Boolean;// = false
public var levelBackGroundBitmap:BitmapData;
public var anomaliesMax:Number;// = 3
public var multikSceneClass:Class;
public var asphaltMessage:BitmapData;
public var levelIntroStr:String;// = "Same shit, another day"
public var nextEnemyProb:Number;// = 0.8
public var helpMessageSpr:Sprite;
public var incubator:CMonsterIncubator;
public var anomaliesProb:Number;// = 0.01
public var levelTreesLayer:Sprite;
public var ShadyLevel:Boolean;// = false
public var isThereDangerAnimations:Boolean;// = false
public var levelNumber:Number;// = 0
public var levelShadowLayer:Sprite;
public var levelSourceClass:Class;
public var maxEnemiesOnScreen:int;// = 1
public function CLevelProperties(){
helpMessageSpr = new Sprite();
asphaltMessage = new BitmapData(1, 1);
asphaltMessagePoint = new Point();
levelTreesLayer = new Sprite();
levelShadowLayer = new Sprite();
super();
}
}
}//package levels
Section 87
//CMonsterIncubator (levels.CMonsterIncubator)
package levels {
import enemies.*;
public class CMonsterIncubator {
private var totalMonsters:int;// = 1
private var monsterLevel:int;// = 1
private var busIterator:int;// = 0
private var propsetcount:int;// = 0
private var monsterSpawns:Array;
private var monsterLevelDeviation:int;// = 0
private var monsters:Array;
private var initialized:Boolean;// = false
private var monsterTypeQuantity:Array;
private var monsterTypeSpawns:Array;
private var allpropertiesConut:int;// = 4
public var buses:ObjectList;
private var iterator:int;// = 0
public static const MonsterTypes:Array = [Class(CEnemy_1_Emo), Class(CEnemy_2_Hippie), Class(CEnemy_3_Civil), Class(CEnemy_4_Hooligan), Class(CEnemy_5_Biker), Class(CEnemy_6_Skin)];
public function CMonsterIncubator(){
monsters = new Array();
monsterSpawns = [new CSpawnLocation(0, 0, 860, 0)];
monsterTypeQuantity = [1, 0, 0, 0, 0, 0];
monsterTypeSpawns = [0, 0, 0, 0, 0, 0];
buses = new ObjectList();
super();
}
public function get monstersLeft():int{
checkInit();
return ((totalMonsters - iterator));
}
public function setEnemyLevelandDeviation(_arg1:int, _arg2:int){
if (_arg1 < 1){
monsterLevel = 1;
} else {
monsterLevel = _arg1;
};
if (_arg2 > monsterLevel){
monsterLevelDeviation = (monsterLevel - 1);
if (monsterLevelDeviation < 0){
monsterLevelDeviation = 0;
};
} else {
monsterLevelDeviation = _arg2;
};
propsetcount++;
}
public function initialize(_arg1:Boolean=false, _arg2:Boolean=false){
if (propsetcount == allpropertiesConut){
AllocateMonsters(_arg1, _arg2);
initialized = true;
} else {
throw (Error(new Error((((":::::Initialization failed. Not All properties ready. Set " + propsetcount) + " of ") + allpropertiesConut))));
};
}
public function get isNext():Boolean{
checkInit();
return ((((monsters.length > iterator)) || (isThereBuses)));
}
public function set TypeQuantity(_arg1:Array){
if ((((_arg1.length > 6)) || ((_arg1.length < 1)))){
throw (Error(new Error(((":::::wrong Quantities Array Length " + _arg1.length) + " should be 6"))));
};
monsterTypeQuantity = new Array();
monsterTypeQuantity = _arg1;
propsetcount++;
}
public function get allPropertiesSet():Boolean{
return ((propsetcount == allpropertiesConut));
}
private function AllocateMonsters(_arg1:Boolean=true, _arg2:Boolean=false){
var _local5:int;
var _local6:Class;
var _local8:int;
var _local10:CMonsterProperties;
var _local3:Array = new Array();
var _local4:int = (monsterTypeQuantity.length - 1);
var _local7:int = monsterLevel;
var _local9:int;
while (_local4 > -1) {
_local5 = monsterTypeQuantity[_local4];
if (_local5 == 999){
_local6 = CEnemyTiolkaEnemy;
_local5 = 1;
} else {
_local6 = MonsterTypes[_local4];
};
while (_local5-- > 0) {
_local10 = new CMonsterProperties();
if (monsterLevelDeviation > 0){
_local7 = ((monsterLevel - monsterLevelDeviation) + int((Math.random() * ((monsterLevelDeviation * 2) + 1))));
};
_local10.Monster = new _local6(_local7);
if (monsterTypeSpawns[_local4] === 0){
_local8 = int((Math.random() * monsterSpawns.length));
_local10.Spawn = monsterSpawns[_local8];
} else {
if (monsterTypeSpawns[_local4].length == 1){
_local9 = monsterTypeSpawns[_local4][0];
_local10.Spawn = monsterSpawns[_local9];
} else {
_local8 = int((Math.random() * monsterTypeSpawns[_local4].length));
_local9 = monsterTypeSpawns[_local4][_local8];
_local10.Spawn = monsterSpawns[_local9];
};
};
_local3.push(_local10);
};
_local4--;
};
if (_arg1){
_local5 = (_local3.length - 1);
while (_local5 > -1) {
_local8 = int((Math.random() * _local3.length));
monsters.push(_local3[_local8]);
_local3.splice(_local8, 1);
_local5--;
};
} else {
monsters = _local3;
};
if (_arg2){
monsters.reverse();
};
totalMonsters = monsters.length;
iterator = 0;
}
public function nextMonster():CEnemyAbstract{
var _local1:CEnemyAbstract;
checkInit();
if (isThereBuses){
if ((((Math.random() > 0.5)) && ((monstersLeft > 0)))){
_local1 = getQueuedMonster();
} else {
_local1 = getBusMonster();
};
} else {
_local1 = getQueuedMonster();
};
return (_local1);
}
private function TestIncubator(){
monsterSpawns = [new CSpawnLocation(0, 0, 860, 0), new CSpawnLocation(0, 760, 860, 760), new CSpawnLocation(0, 0, 0, 760), new CSpawnLocation(860, 0, 860, 760)];
monsterTypeQuantity = [3, 3, 6, 3, 3, 3];
monsterTypeSpawns = [[0], [0], [2, 3], [1], [1], 0];
monsterLevel = 5;
monsterLevelDeviation = 2;
AllocateMonsters(true, false);
}
public function set Spawns(_arg1:Array){
var _local2:int;
if (_arg1.length > 0){
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
if (!(_arg1[_local2] is CSpawnLocation)){
throw (Error(new Error(((((":::::object " + _arg1[_local2]) + " nr ") + _local2) + " is not CSpawnLocation"))));
};
_local2--;
};
monsterSpawns = new Array();
monsterSpawns = _arg1;
propsetcount++;
};
}
private function getQueuedMonster():CEnemyAbstract{
var _local1:CEnemyAbstract;
var _local2:CSpawnLocation;
var _local3:CMonsterProperties = monsters[iterator];
iterator++;
_local1 = _local3.Monster;
_local2 = _local3.Spawn;
_local1.spawn(_local2.spawnpoint);
return (_local1);
}
private function get isThereBuses():Boolean{
var _local2:CEnemyBus;
var _local1:int = buses.count;
while (_local1 > 0) {
_local1--;
_local2 = (buses.getItem(_local1) as CEnemyBus);
if (!_local2.isAlive){
buses.remove(_local1);
};
};
return ((buses.count > 0));
}
private function getBusMonster():CEnemyAbstract{
var _local1:CEnemyAbstract;
var _local2:CEnemyBus = (buses.getItem(busIterator) as CEnemyBus);
if (((_local2.isReadyToDeliver) && ((Math.random() > 0.91)))){
_local1 = _local2.getSpawnedMonster();
_local1.nischebrod = true;
} else {
_local1 = null;
};
busIterator++;
if (busIterator >= buses.count){
busIterator = 0;
};
return (_local1);
}
private function checkInit(){
if (!initialized){
throw (Error(new Error(":::::Incubator can't be used until initialized")));
};
}
public function set TypeSpawns(_arg1:Array){
if ((((_arg1.length > 6)) || ((_arg1.length < 1)))){
throw (Error(new Error(((":::::wrong Type Spawns Array Length " + _arg1.length) + " should be 6"))));
};
monsterTypeSpawns = new Array();
monsterTypeSpawns = _arg1;
propsetcount++;
}
}
}//package levels
import enemies.*;
class CMonsterProperties {
public var Monster:CEnemyAbstract;
public var Spawn:CSpawnLocation;
private function CMonsterProperties(){
}
}
Section 88
//CSpawnLocation (levels.CSpawnLocation)
package levels {
import flash.geom.*;
public class CSpawnLocation {
private var _y1:int;// = 0
private var _x1:int;// = 0
private var _x2:int;// = 0
private var _y2:int;// = 0
public function CSpawnLocation(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
_x1 = ((_arg1 < _arg3)) ? _arg1 : _arg3;
_x2 = ((_arg3 > _arg1)) ? _arg3 : _arg1;
_y1 = ((_arg2 < _arg4)) ? _arg2 : _arg4;
_y2 = ((_arg4 > _arg2)) ? _arg4 : _arg2;
}
public function get spawnpoint():Point{
var _local1:Point = new Point();
_local1.x = (_x1 + (Math.random() * (_x2 - _x1)));
_local1.y = (_y1 + (Math.random() * (_y2 - _y1)));
return (_local1);
}
}
}//package levels
Section 89
//CASlot (shop.CASlot)
package shop {
import flash.display.*;
import itemz.*;
import flash.events.*;
import flash.filters.*;
class CASlot extends Sprite {
private var _armor:CArmorAbstract;
private var _fl_select_stroke:GlowFilter;
private var _fl_shade:ColorMatrixFilter;
private var _imgArmSelect:Sprite;
private var _fl_select_glow:GlowFilter;
public var owned:Boolean;// = false
private var _fl_available:GlowFilter;
private var _fl_unavailable:GlowFilter;
private var _imgArm:Sprite;
function CASlot(_arg1:CArmorAbstract){
_imgArm = new Sprite();
_imgArmSelect = new Sprite();
_fl_available = new GlowFilter(0xFF00, 1, 8, 8, 2, 3, false, false);
_fl_unavailable = new GlowFilter(0xFFFFFF, 0.9, 2, 2, 3, 3);
_fl_shade = new ColorMatrixFilter([0.1, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 1, 0]);
_fl_select_stroke = new GlowFilter(0xFFFFFF, 1, 2, 2, 10, 1, false, true);
_fl_select_glow = new GlowFilter(16777062, 1, 18, 18, 6, 3, false, false);
super();
_armor = _arg1;
var _local2:Bitmap = new Bitmap(new _armor.ArmorIconClass(60, 35));
_imgArm.addChild(_local2);
var _local3:* = new Bitmap(new _armor.ArmorIconClass(60, 35));
_imgArmSelect.addChild(_local3);
addChild(_imgArmSelect);
addChild(_imgArm);
mouseEnabled = true;
buttonMode = true;
useHandCursor = true;
mouseChildren = false;
}
private function drawOwned(){
_imgArm.filters = null;
var _local1:Array = [_fl_available];
_imgArm.filters = _local1;
alpha = 1;
}
public function setAvailable(){
drawAvailable();
owned = false;
}
public function setUnavailable(){
drawUnavailable();
owned = false;
}
private function drawUnselected(){
_imgArmSelect.filters = null;
}
private function animateSelected(_arg1:Event){
_imgArmSelect.alpha = (_imgArmSelect.alpha + 0.15);
if (_imgArmSelect.alpha > 1){
_imgArmSelect.alpha = 1;
_imgArmSelect.removeEventListener(Event.ENTER_FRAME, animateSelected);
};
}
public function setSelected(){
drawSelected();
}
public function get Armor():CArmorAbstract{
return (_armor);
}
public function setOwned(){
drawOwned();
owned = true;
}
private function drawUnavailable(){
_imgArm.filters = null;
var _local1:Array = [_fl_shade, _fl_unavailable];
_imgArm.filters = _local1;
alpha = 0.5;
}
private function drawAvailable(){
_imgArm.filters = null;
alpha = 1;
}
public function setUnselected(){
drawUnselected();
}
private function drawSelected(){
var _local1:Array = [_fl_select_stroke, _fl_select_glow];
_imgArmSelect.filters = _local1;
_imgArmSelect.alpha = 0;
_imgArmSelect.addEventListener(Event.ENTER_FRAME, animateSelected, false, 0, true);
}
}
}//package shop
Section 90
//CCharStatChanger (shop.CCharStatChanger)
package shop {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
class CCharStatChanger extends Sprite {
private var minchange:Boolean;// = false
private var do_arrow_minus:InteractiveObject;
private var tf_stats_changed:TextFormat;
private var pluschange:Boolean;// = false
private var do_arrow_plus:InteractiveObject;
private var filter_txt_easystroke:GlowFilter;
private var txtst:TextField;
private var btn_arrow_plus:SimpleButton;
private var stat_current:int;// = 1
private var btn_arrow_minus:SimpleButton;
private var mc_arrow_minus:Sprite;
private var tf_stats:TextFormat;
private var img_stat_bg:Sprite;
private var stat_base:int;// = 1
private var mc_arrow_plus:Sprite;
private var filter_txt_heavystroke:GlowFilter;
private var txt:TextField;
private var tf_standart:TextFormat;
public var statName:String;// = ""
public static const ON_OVER:String = "ON_OVER";
function CCharStatChanger(_arg1:String, _arg2:int, _arg3:Boolean, _arg4:Boolean, _arg5:String){
filter_txt_heavystroke = new GlowFilter(0, 1, 6, 6, 10, 1, false, false);
filter_txt_easystroke = new GlowFilter(0, 1, 4, 4, 3, 2, false, false);
txt = new TextField();
txtst = new TextField();
tf_standart = new TextFormat("MonoCondencedDi", 14, 0xFFFFFF, false, false, false, null, null, TextFormatAlign.LEFT);
tf_stats = new TextFormat("MonoCondencedDi", 15, 0xFFFFFF, false, false, false, null, null, TextFormatAlign.CENTER);
tf_stats_changed = new TextFormat("MonoCondencedDi", 15, 0xFFFF00, false, false, false, null, null, TextFormatAlign.CENTER);
btn_arrow_plus = new mcShopCharStatChangeRight();
mc_arrow_plus = new mcShopCharStatChangeRight_empty();
btn_arrow_minus = new mcShopCharStatChangeLeft();
mc_arrow_minus = new mcShopCharStatChangeLeft_empty();
img_stat_bg = new mcShopCharStatChangeBg();
super();
statName = _arg5;
stat_current = _arg2;
stat_base = _arg2;
minchange = _arg3;
pluschange = _arg4;
btn_arrow_plus.x = 144;
btn_arrow_plus.addEventListener(MouseEvent.CLICK, onPlusButton, false, 0, true);
mc_arrow_plus.x = 144;
if (pluschange){
do_arrow_plus = btn_arrow_plus;
} else {
do_arrow_plus = mc_arrow_plus;
};
addChild(do_arrow_plus);
img_stat_bg.x = 117;
addChild(img_stat_bg);
btn_arrow_minus.x = 104;
btn_arrow_minus.addEventListener(MouseEvent.CLICK, onMinusButton, false, 0, true);
mc_arrow_minus.x = 104;
if (minchange){
do_arrow_minus = btn_arrow_minus;
} else {
do_arrow_minus = mc_arrow_minus;
};
addChild(do_arrow_minus);
txt.selectable = false;
txt.embedFonts = true;
txt.border = false;
txt.multiline = false;
txt.mouseEnabled = false;
txt.mouseWheelEnabled = false;
txt.antiAliasType = AntiAliasType.ADVANCED;
tf_standart.letterSpacing = 0.5;
txt.defaultTextFormat = tf_standart;
txt.text = _arg1;
var _local6:Array = [filter_txt_heavystroke];
txt.filters = _local6;
txt.width = 100;
txt.x = 0;
txt.y = 0;
addChild(txt);
txt.addEventListener(MouseEvent.MOUSE_MOVE, handleTextOver, false, 0, true);
txtst.selectable = false;
txtst.embedFonts = true;
txtst.border = false;
txtst.multiline = false;
txtst.mouseEnabled = false;
txtst.mouseWheelEnabled = false;
txtst.antiAliasType = AntiAliasType.ADVANCED;
txtst.defaultTextFormat = tf_stats;
txtst.text = stat_current.toString();
_local6 = [filter_txt_easystroke];
txtst.filters = _local6;
txtst.x = 118;
txtst.y = 1;
txtst.width = 25;
addChild(txtst);
txtst.addEventListener(MouseEvent.MOUSE_MOVE, handleTextOver, false, 0, true);
}
public function set Stat(_arg1:int){
stat_current = _arg1;
txtst.text = stat_current.toString();
}
private function handleTextOver(_arg1:MouseEvent){
dispatchEvent(new Event(ON_OVER));
}
public function set plusallowed(_arg1:Boolean){
if (((_arg1) && (!(pluschange)))){
pluschange = true;
removeChild(do_arrow_plus);
do_arrow_plus = btn_arrow_plus;
addChild(btn_arrow_plus);
} else {
if (((!(_arg1)) && (pluschange))){
pluschange = false;
removeChild(do_arrow_plus);
do_arrow_plus = mc_arrow_plus;
addChild(do_arrow_plus);
};
};
}
public function get minusallowed():Boolean{
return (minchange);
}
public function get plusallowed():Boolean{
return (pluschange);
}
private function onMinusButton(_arg1:MouseEvent){
stat_current--;
txtst.text = stat_current.toString();
if (stat_current > stat_base){
minusallowed = true;
} else {
minusallowed = false;
};
dispatchEvent(new Event("MINUS_BUTTON_DOWN"));
}
private function onPlusButton(_arg1:MouseEvent){
dispatchEvent(new Event("PLUS_BUTTON_DOWN"));
}
public function set minusallowed(_arg1:Boolean){
if (((_arg1) && (!(minchange)))){
minchange = true;
removeChild(do_arrow_minus);
do_arrow_minus = btn_arrow_minus;
addChild(btn_arrow_minus);
txtst.defaultTextFormat = tf_stats_changed;
txtst.text = stat_current.toString();
} else {
if (((!(_arg1)) && (minchange))){
minchange = false;
removeChild(do_arrow_minus);
do_arrow_minus = mc_arrow_minus;
addChild(do_arrow_minus);
txtst.defaultTextFormat = tf_stats;
txtst.text = stat_current.toString();
};
};
}
public function StatPlusPlus(){
stat_current++;
txtst.text = stat_current.toString();
if (stat_current > stat_base){
minusallowed = true;
} else {
minusallowed = false;
};
}
public function get Stat():int{
return (stat_current);
}
public function get statValue():int{
return (stat_current);
}
}
}//package shop
Section 91
//CGSlot (shop.CGSlot)
package shop {
import flash.display.*;
import gunz.*;
import flash.events.*;
import flash.filters.*;
class CGSlot extends Sprite {
private var _gun:CGunAbstract;
private var _fl_select_stroke:GlowFilter;
private var _gunImg:Sprite;
public var available:Boolean;// = false
private var _gunImgShadow:Sprite;
private var _fl_shade:ColorMatrixFilter;
private var _fl_select_glow:GlowFilter;
private var _fl_shadow:DropShadowFilter;
private var _gunImgSelect:Sprite;
public var owned:Boolean;// = false
private var _fl_available:GlowFilter;
private var _fl_unavailable:GlowFilter;
function CGSlot(_arg1:CGunAbstract){
_fl_shadow = new DropShadowFilter(10, 80, 0, 0.8, 8, 8, 1, 3, false, false, true);
_fl_available = new GlowFilter(0xFF00, 1, 6, 6, 1, 3, false, false);
_fl_unavailable = new GlowFilter(0xFFFFFF, 0.7, 2, 2, 1, 3);
_fl_shade = new ColorMatrixFilter([0.1, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 1, 0]);
_fl_select_stroke = new GlowFilter(0xFFFFFF, 1, 2, 2, 10, 1, false, true);
_fl_select_glow = new GlowFilter(16777062, 1, 18, 18, 6, 3, false, false);
super();
_gun = _arg1;
_gunImg = new _gun.props.imgclass();
_gunImgShadow = new _gun.props.imgclass();
_gunImgSelect = new _gun.props.imgclass();
var _local2:Array = [_fl_shadow];
_gunImgShadow.filters = _local2;
addChild(_gunImgShadow);
addChild(_gunImgSelect);
addChild(_gunImg);
mouseEnabled = true;
buttonMode = true;
useHandCursor = true;
mouseChildren = false;
}
public function setUnselected(){
drawUnselected();
}
public function setAvailable(){
drawAvailable();
owned = false;
available = true;
}
public function setUnavailable(){
drawUnavailable();
owned = false;
available = false;
}
public function get gunDrag():CGunDrag{
var _local1:CGunDrag;
_local1 = new CGunDrag(_gun);
_local1.x = x;
_local1.y = y;
return (_local1);
}
private function drawUnselected(){
_gunImgSelect.filters = null;
}
private function drawOwned(){
_gunImg.filters = null;
var _local1:Array = [_fl_available];
_gunImg.filters = _local1;
alpha = 1;
}
public function setSelected(){
drawSelected();
}
public function get Gun():CGunAbstract{
return (_gun);
}
public function setOwned(){
drawOwned();
owned = true;
}
private function animateSelected(_arg1:Event){
_gunImgSelect.alpha = (_gunImgSelect.alpha + 0.15);
if (_gunImgSelect.alpha > 1){
_gunImgSelect.alpha = 1;
_gunImgSelect.removeEventListener(Event.ENTER_FRAME, animateSelected);
};
}
private function drawUnavailable(){
_gunImg.filters = null;
var _local1:Array = [_fl_shade, _fl_unavailable];
_gunImg.filters = _local1;
alpha = 0.9;
}
private function drawAvailable(){
_gunImg.filters = null;
alpha = 1;
}
private function drawSelected(){
var _local1:Array = [_fl_select_stroke, _fl_select_glow];
_gunImgSelect.filters = _local1;
_gunImgSelect.alpha = 0;
_gunImgSelect.addEventListener(Event.ENTER_FRAME, animateSelected, false, 0, true);
}
}
}//package shop
Section 92
//CGunDrag (shop.CGunDrag)
package shop {
import flash.display.*;
import gunz.*;
class CGunDrag extends Sprite {
private var _gun:CGunAbstract;
private var _img:Sprite;
function CGunDrag(_arg1:CGunAbstract){
_gun = _arg1;
_img = new _gun.props.imgclass();
addChild(_img);
mouseChildren = false;
_img.mouseEnabled = false;
}
public function get Gun():CGunAbstract{
return (_gun);
}
}
}//package shop
Section 93
//CInfoPanel (shop.CInfoPanel)
package shop {
import flash.display.*;
import gunz.*;
import itemz.*;
import character.*;
import flash.events.*;
import flash.text.*;
import shop.*;
import flash.filters.*;
class CInfoPanel extends Sprite {
private var armor_:CArmorAbstract;
private var txt_GunName:TextField;
var tfAmmoName:TextFormat;
var txtAmmoName:TextField;
var tfArmorName:TextFormat;
private var star1:CInfoPanelStar;
private var star2:CInfoPanelStar;
private var star3:CInfoPanelStar;
private var star4:CInfoPanelStar;
private var star5:CInfoPanelStar;
private var star6:CInfoPanelStar;
private var _imgPriceBtnBr:Sprite;
private var _imgOwnedSetBg1:Sprite;
private var _imgOwnedSetBg2:Sprite;
private var _imgOwnedSetBg3:Sprite;
private var _imgGunIcon:Sprite;
private var starArray:Array;
public var ammo_:CAmmoProps;
private var txt_GunDescription:TextField;
private var filter_txt_whiteshadow:DropShadowFilter;
private var _imgPriceBtn:SimpleButton;
private var _imgOwnedUpgradeBg:Sprite;
private var _gun:CGunAbstract;
private var inventory_:CInventory;
private var _imgOwnedUpgradeBtn:SimpleButton;
private var _imgAmmoIcon:Sprite;
private var filter_txt_easystroke:GlowFilter;
private var txt_Info2:TextField;
private var _imgOwnedSetBtn1:SimpleButton;
private var _imgOwnedSetBtn2:SimpleButton;
private var _imgOwnedSetBtn3:SimpleButton;
private var txt_Info6:TextField;
private var txt_Price:TextField;
private var txt_Info1:TextField;
private var txt_Info3:TextField;
private var txt_Info4:TextField;
private var txt_Info5:TextField;
private var filter_txt_heavystroke:GlowFilter;
private var tf_gundesctiption:TextFormat;
private var filter_txt_heavystroke_nonav:GlowFilter;
private var tf_settext:TextFormat;
private var _imgPriceBuyBg:Sprite;
private var txtArray:Array;
private var _imgPriceBg:Sprite;
private var imgArmorIcon:Bitmap;
private var filter_txt_heavystroke_avail:GlowFilter;
var txtArmorName:TextField;
private var _imgOwnedSetBtnBr1:Sprite;
private var _imgOwnedSetBtnBr2:Sprite;
private var _imgOwnedSetBtnBr3:Sprite;
private var _imgOwnedUpgradeBtnDr:Sprite;
private var tf_standart:TextFormat;
private var tf_gunname:TextFormat;
public static const ON_BUY_ARMOR:String = "ON_BUY_ARMOR";
public static const ON_BUY_AMMO:String = "ON_BUY_AMMO";
public static const ON_BUY:String = "BUTTON_BUY";
public static const ON_BUTTON_UPGRADE:String = "BUTTON_UPGRADE";
public static const ON_BUY_AMMO_FOR_THIS:String = "ON_BUY_AMMO_FOR_THIS";
public static const ON_BUTTON_SETSLOT1:String = "BUTTON_SETSLOT1";
public static const ON_BUTTON_SETSLOT2:String = "BUTTON_SETSLOT2";
function CInfoPanel(_arg1:CInventory){
_imgPriceBg = new mcShop_Buy_Price_Bg();
_imgPriceBtn = new mcShop_Buy_Btn();
_imgPriceBtnBr = new mcShop_Buy_Btn_Brd();
_imgPriceBuyBg = new mcShop_Buy_Bg();
txt_Price = new TextField();
_imgOwnedSetBg1 = new mcShopSetAreaBg();
_imgOwnedSetBg2 = new mcShopSetAreaBg();
_imgOwnedSetBg3 = new mcShopSetAreaBg();
_imgOwnedSetBtn1 = new mcShopSetButton();
_imgOwnedSetBtn2 = new mcShopSetButton();
_imgOwnedSetBtn3 = new mcShopSetButton();
_imgOwnedSetBtnBr1 = new mcShopSetButtonBrd();
_imgOwnedSetBtnBr2 = new mcShopSetButtonBrd();
_imgOwnedSetBtnBr3 = new mcShopSetButtonBrd();
_imgOwnedUpgradeBg = new mcShopUpgradeBg();
_imgOwnedUpgradeBtn = new mcShopUpgradeButton();
_imgOwnedUpgradeBtnDr = new mcShop_Buy_Btn_Brd();
txt_GunName = new TextField();
txt_GunDescription = new TextField();
txt_Info1 = new TextField();
txt_Info2 = new TextField();
txt_Info3 = new TextField();
txt_Info4 = new TextField();
txt_Info5 = new TextField();
txt_Info6 = new TextField();
txtArray = [txt_Info1, txt_Info2, txt_Info3, txt_Info4, txt_Info5, txt_Info6];
star1 = new CInfoPanelStar();
star2 = new CInfoPanelStar();
star3 = new CInfoPanelStar();
star4 = new CInfoPanelStar();
star5 = new CInfoPanelStar();
star6 = new CInfoPanelStar();
starArray = [star1, star2, star3, star4, star5, star6];
tf_standart = new TextFormat("MonoCondencedDi", 14, 0, true, false, false, null, null, TextFormatAlign.LEFT);
tf_gunname = new TextFormat("MonoCondencedDi", 18, 0, true, false, false, null, null, TextFormatAlign.LEFT);
tf_gundesctiption = new TextFormat("MonoCondencedDi", 12, 0, false, false, false, null, null, TextFormatAlign.LEFT);
tf_settext = new TextFormat("MonoCondencedDi", 14, 0xFFFFFF, true, false, false, null, null, TextFormatAlign.LEFT);
filter_txt_heavystroke = new GlowFilter(0xFFFFFF, 1, 6, 6, 10, 1, false, false);
filter_txt_heavystroke_nonav = new GlowFilter(0xFF0000, 1, 4, 4, 4, 3, false, false);
filter_txt_heavystroke_avail = new GlowFilter(14548957, 1, 6, 6, 4, 3, false, false);
filter_txt_easystroke = new GlowFilter(0xFFFFFF, 1, 4, 4, 1, 3, false, false);
filter_txt_whiteshadow = new DropShadowFilter(1, 45, 0xFFFFFF, 0.9, 2, 2, 1, 3, false, false, false);
super();
x = 186;
y = 341;
inventory_ = _arg1;
}
public function setAvailableButtons(){
setUnAvailableButtons();
_imgPriceBuyBg.x = 250;
_imgPriceBuyBg.y = 111;
addChild(_imgPriceBuyBg);
_imgPriceBtn.x = 286;
_imgPriceBtn.y = 125;
addChild(_imgPriceBtn);
_imgPriceBtn.addEventListener(MouseEvent.CLICK, onButtonBuy, false, 0, true);
_imgPriceBtn.mouseEnabled = true;
_imgPriceBtn.useHandCursor = true;
_imgPriceBtnBr.x = 285;
_imgPriceBtnBr.y = 124;
addChild(_imgPriceBtnBr);
_imgPriceBtnBr.mouseEnabled = false;
var _local1:Array = [filter_txt_heavystroke_avail];
txt_Price.filters = _local1;
}
private function addAmmoTexts(_arg1:int){
var _local10:TextField;
var _local11:Array;
var _local2 = 35;
var _local3 = 61;
var _local4 = 16;
var _local5:int;
while (_local5 < _arg1) {
_local10 = (txtArray[_local5] as TextField);
setTextFieldFormat(_local10, tf_gunname);
_local11 = [filter_txt_whiteshadow];
_local10.filters = _local11;
_local10.width = 140;
_local10.x = _local2;
_local10.y = (_local3 + (_local4 * _local5));
addChild(_local10);
_local5++;
};
tfAmmoName = tf_gunname;
txtAmmoName = txt_GunName;
setTextFieldFormat(txtAmmoName, tfAmmoName);
txtAmmoName.sharpness = -200;
var _local6:Array = [filter_txt_heavystroke];
txtAmmoName.filters = _local6;
txtAmmoName.x = 120;
txtAmmoName.y = 3;
txtAmmoName.width = 275;
txtAmmoName.text = ammo_.name;
addChild(txtAmmoName);
var _local7:TextField = txt_GunDescription;
var _local8:TextFormat = tf_gundesctiption;
setTextFieldFormat(_local7, _local8);
var _local9:Array = [filter_txt_easystroke];
_local7.filters = _local9;
_local7.x = 120;
_local7.y = 26;
_local7.width = 290;
_local7.multiline = true;
_local7.wordWrap = true;
_local7.autoSize = TextFieldAutoSize.LEFT;
_local7.text = ammo_.description;
if (_local7.numLines == 1){
_local7.y = 32;
};
addChild(_local7);
}
private function onButtonWearArmor(_arg1:Event){
}
public function get Gun():CGunAbstract{
return (_gun);
}
private function onButtonBuyAmmo(_arg1:Event){
if (inventory_ != null){
if (inventory_.money >= ammo_.pricePerPack){
inventory_.money = (inventory_.money - ammo_.pricePerPack);
inventory_.ammoStorage.changeAmmoCount(ammo_.type, ammo_.packAmount);
dispatchEvent(new Event(ON_BUY_AMMO));
};
};
}
public function setOwnedArmorButtons(){
_imgOwnedSetBg1.x = 190;
_imgOwnedSetBg1.y = 58;
addChild(_imgOwnedSetBg1);
_imgOwnedSetBtn1.x = 317;
_imgOwnedSetBtn1.y = 64;
addChild(_imgOwnedSetBtn1);
_imgOwnedSetBtn1.mouseEnabled = true;
_imgOwnedSetBtn1.useHandCursor = true;
_imgOwnedSetBtn1.addEventListener(MouseEvent.CLICK, onButtonWearArmor, false, 0, true);
_imgOwnedSetBtnBr1.x = 311;
_imgOwnedSetBtnBr1.y = 55;
addChild(_imgOwnedSetBtnBr1);
_imgOwnedSetBtnBr1.mouseEnabled = false;
var _local1:TextField = new TextField();
setTextFieldFormat(_local1, tf_settext);
var _local2:Array = [filter_txt_easystroke];
_local1.filters = _local2;
_local1.x = 205;
_local1.y = 63;
_local1.width = 105;
_local1.autoSize = TextFieldAutoSize.LEFT;
_local1.text = "GET ARMOR";
}
private function addStars(_arg1:int){
var _local5:int;
var _local6:CInfoPanelStar;
var _local2 = 22;
var _local3 = 64;
var _local4 = 16;
if (_arg1 > 6){
throw (new Error(("Too many stars " + _arg1)));
};
_local5 = 0;
while (_local5 < _arg1) {
_local6 = (starArray[_local5] as CInfoPanelStar);
_local6.x = _local2;
_local6.y = (_local3 + (_local4 * _local5));
if (_gun.props.upgradesAllowed[_local5] != 0){
if (_gun.props.UpgradesArr[_local5]){
_local6.active = true;
};
addChild(_local6);
};
_local5++;
};
}
public function setUnAvailableButtons(){
_imgPriceBg.x = 225;
_imgPriceBg.y = 64;
addChild(_imgPriceBg);
setTextFieldFormat(txt_Price, tf_gunname);
txt_Price.sharpness = -200;
var _local1:Array = [filter_txt_heavystroke_nonav];
txt_Price.filters = _local1;
txt_Price.x = 234;
txt_Price.y = 75;
txt_Price.width = 145;
txt_Price.autoSize = TextFieldAutoSize.CENTER;
txt_Price.text = ("PRICE: $" + _gun.props.price.toString());
addChild(txt_Price);
}
public function get armor():CArmorAbstract{
return (armor_);
}
public function showStrengthWarning(_arg1:int){
hideStrengthWarning();
var _local2:MinStrItem = new MinStrItem();
_local2.setStrength(_arg1);
_local2.x = 300;
addChild(_local2);
_local2.name = "MINSTRWARN";
}
private function setTextFieldFormat(_arg1:TextField, _arg2:TextFormat){
_arg1.selectable = false;
_arg1.embedFonts = true;
_arg1.border = false;
_arg1.multiline = false;
_arg1.mouseEnabled = false;
_arg1.mouseWheelEnabled = false;
_arg1.antiAliasType = AntiAliasType.ADVANCED;
_arg1.thickness = 200;
_arg1.sharpness = -100;
_arg2.letterSpacing = 0.5;
_arg1.defaultTextFormat = _arg2;
}
private function addArmorTexts(_arg1:int){
var _local10:TextField;
var _local11:Array;
var _local2 = 35;
var _local3 = 61;
var _local4 = 16;
var _local5:int;
while (_local5 < _arg1) {
_local10 = (txtArray[_local5] as TextField);
setTextFieldFormat(_local10, tf_standart);
_local11 = [filter_txt_whiteshadow];
_local10.filters = _local11;
_local10.width = 140;
_local10.x = _local2;
_local10.y = (_local3 + (_local4 * _local5));
addChild(_local10);
_local5++;
};
tfArmorName = tf_gunname;
txtArmorName = txt_GunName;
setTextFieldFormat(txtArmorName, tfArmorName);
txtArmorName.sharpness = -200;
var _local6:Array = [filter_txt_heavystroke];
txtArmorName.filters = _local6;
txtArmorName.x = 120;
txtArmorName.y = 3;
txtArmorName.width = 275;
txtArmorName.text = armor_.fullname;
addChild(txtArmorName);
var _local7:TextField = txt_GunDescription;
var _local8:TextFormat = tf_gundesctiption;
setTextFieldFormat(_local7, _local8);
var _local9:Array = [filter_txt_easystroke];
_local7.filters = _local9;
_local7.x = 120;
_local7.y = 26;
_local7.width = 290;
_local7.multiline = true;
_local7.wordWrap = true;
_local7.autoSize = TextFieldAutoSize.LEFT;
_local7.text = armor_.description;
if (_local7.numLines == 1){
_local7.y = 32;
};
addChild(_local7);
}
public function setAvailableArmorButtons(){
setUnAvailableArmorButtons();
_imgPriceBuyBg.x = 250;
_imgPriceBuyBg.y = 111;
addChild(_imgPriceBuyBg);
_imgPriceBtn.x = 286;
_imgPriceBtn.y = 125;
addChild(_imgPriceBtn);
_imgPriceBtn.addEventListener(MouseEvent.CLICK, onButtonBuyArmor, false, 0, true);
_imgPriceBtn.mouseEnabled = true;
_imgPriceBtn.useHandCursor = true;
_imgPriceBtnBr.x = 285;
_imgPriceBtnBr.y = 124;
addChild(_imgPriceBtnBr);
_imgPriceBtnBr.mouseEnabled = false;
var _local1:Array = [filter_txt_heavystroke_avail];
txt_Price.filters = _local1;
}
private function onButtonBuyArmor(_arg1:Event){
if (inventory_ != null){
if (inventory_.money >= armor_.price){
inventory_.money = (inventory_.money - armor_.price);
inventory_.armor = armor_;
dispatchEvent(new Event(ON_BUY_ARMOR));
};
};
}
public function setTextAmmoInfo(_arg1:CAmmoProps){
ammo_ = _arg1;
var _local2:MovieClip = new ammo_.iconClass();
_local2.x = 95;
_local2.y = 33;
addChild(_local2);
addAmmoTexts(1);
txt_Info1.text = (ammo_.packAmount.toString() + " PER PACK");
}
public function hideStrengthWarning(){
var _local1:DisplayObject = getChildByName("MINSTRWARN");
if (_local1 != null){
removeChild(_local1);
};
}
public function setUnAvailableAmmoButtons(){
_imgPriceBg.x = 225;
_imgPriceBg.y = 64;
addChild(_imgPriceBg);
setTextFieldFormat(txt_Price, tfAmmoName);
txt_Price.sharpness = -200;
var _local1:Array = [filter_txt_heavystroke_nonav];
txt_Price.filters = _local1;
txt_Price.x = 234;
txt_Price.y = 75;
txt_Price.width = 145;
txt_Price.autoSize = TextFieldAutoSize.CENTER;
txt_Price.text = ("PRICE: $" + ammo_.pricePerPack.toString());
addChild(txt_Price);
}
public function setTextArmorInfo(_arg1:CArmorAbstract){
armor_ = _arg1;
var _local2:Bitmap = new Bitmap(new armor_.ArmorIconClass(60, 35));
_local2.x = 5;
_local2.y = 12;
addChild(_local2);
addArmorTexts(6);
txt_Info1.text = ("HITPOINTS: " + armor_.maxHP.toString());
txt_Info2.text = ("EVADE CHANCE: " + _arg1.AvoidProv.toString());
txt_Info3.text = ("ABSORPTION: " + _arg1.Absorb.toString());
txt_Info4.text = ("SPEED MODIFIER:" + _arg1.speedModifier.toString());
}
public function setOwnedButtons(){
var _local3:int;
var _local4:TextField;
var _local5:Array;
var _local6:TextField;
var _local7:Array;
if (_gun.props.UpgradeAble){
_imgOwnedUpgradeBg.x = 342;
_imgOwnedUpgradeBg.y = 58;
addChild(_imgOwnedUpgradeBg);
_imgOwnedUpgradeBtn.x = 357;
_imgOwnedUpgradeBtn.y = 86;
addChild(_imgOwnedUpgradeBtn);
_imgOwnedUpgradeBtn.mouseEnabled = true;
_imgOwnedUpgradeBtn.useHandCursor = true;
_imgOwnedUpgradeBtn.addEventListener(MouseEvent.CLICK, onButtonUpgrade, false, 0, true);
_imgOwnedUpgradeBtnDr.x = 357;
_imgOwnedUpgradeBtnDr.y = 86;
addChild(_imgOwnedUpgradeBtnDr);
_imgOwnedUpgradeBtnDr.mouseEnabled = false;
};
_imgOwnedSetBg1.x = 190;
_imgOwnedSetBg1.y = 58;
addChild(_imgOwnedSetBg1);
_imgOwnedSetBtn1.x = 317;
_imgOwnedSetBtn1.y = 64;
addChild(_imgOwnedSetBtn1);
_imgOwnedSetBtn1.mouseEnabled = true;
_imgOwnedSetBtn1.useHandCursor = true;
_imgOwnedSetBtn1.addEventListener(MouseEvent.CLICK, onButtonSetSlot1, false, 0, true);
_imgOwnedSetBtnBr1.x = 311;
_imgOwnedSetBtnBr1.y = 55;
addChild(_imgOwnedSetBtnBr1);
_imgOwnedSetBtnBr1.mouseEnabled = false;
var _local1:TextField = new TextField();
setTextFieldFormat(_local1, tf_settext);
var _local2:Array = [filter_txt_easystroke];
_local1.filters = _local2;
_local1.x = 205;
_local1.y = 63;
_local1.width = 105;
_local1.autoSize = TextFieldAutoSize.LEFT;
addChild(_local1);
if ((((_gun.props.guntype == CGunProps.DUALPISTOL)) || ((_gun.props.guntype == CGunProps.PISTOL)))){
_local1.text = CLocale.SHOP_CAP_PISTOL;
} else {
if (_gun.props.guntype == CGunProps.THROWING){
setAvailableButtons();
_local1.text = "GET PROJECTILE";
_local3 = 10;
_imgOwnedSetBg1.y = (_imgOwnedSetBg1.y - _local3);
_imgOwnedSetBtn1.y = (_imgOwnedSetBtn1.y - _local3);
_imgOwnedSetBtnBr1.y = (_imgOwnedSetBtnBr1.y - _local3);
_local1.y = (_local1.y - _local3);
_imgPriceBuyBg.y = (_imgPriceBuyBg.y + 10);
_imgPriceBtn.y = (_imgPriceBtn.y + 2);
_imgPriceBtnBr.y = (_imgPriceBtnBr.y + 2);
_imgPriceBuyBg.x = (_imgPriceBuyBg.x + 3);
_imgPriceBtn.x = (_imgPriceBtn.x + 5);
_imgPriceBtnBr.x = (_imgPriceBtnBr.x + 5);
txt_Price.y = (txt_Price.y + 12);
_imgPriceBg.y = (_imgPriceBg.y + 12);
} else {
_local1.text = CLocale.SHOP_CAP_PRIMARY;
_imgOwnedSetBg2.x = 190;
_imgOwnedSetBg2.y = 93;
addChild(_imgOwnedSetBg2);
_imgOwnedSetBtn2.x = 317;
_imgOwnedSetBtn2.y = 99;
addChild(_imgOwnedSetBtn2);
_imgOwnedSetBtn2.mouseEnabled = true;
_imgOwnedSetBtn2.useHandCursor = true;
_imgOwnedSetBtn2.addEventListener(MouseEvent.CLICK, onButtonSetSlot2, false, 0, true);
_imgOwnedSetBtnBr2.x = 311;
_imgOwnedSetBtnBr2.y = 90;
addChild(_imgOwnedSetBtnBr2);
_imgOwnedSetBtnBr2.mouseEnabled = false;
_local4 = new TextField();
setTextFieldFormat(_local4, tf_settext);
_local5 = [filter_txt_easystroke];
_local4.filters = _local5;
_local4.x = 205;
_local4.y = 98;
_local4.width = 105;
_local4.autoSize = TextFieldAutoSize.LEFT;
_local4.text = CLocale.SHOP_CAP_SECONDARY;
addChild(_local4);
_imgOwnedSetBg3.x = 190;
_imgOwnedSetBg3.y = 128;
addChild(_imgOwnedSetBg3);
_imgOwnedSetBtn3.x = 317;
_imgOwnedSetBtn3.y = 134;
addChild(_imgOwnedSetBtn3);
_imgOwnedSetBtn3.mouseEnabled = true;
_imgOwnedSetBtn3.useHandCursor = true;
_imgOwnedSetBtn3.addEventListener(MouseEvent.CLICK, onButtonSetSlot3, false, 0, true);
_imgOwnedSetBtnBr3.x = 311;
_imgOwnedSetBtnBr3.y = 125;
addChild(_imgOwnedSetBtnBr3);
_imgOwnedSetBtnBr3.mouseEnabled = false;
_local6 = new TextField();
setTextFieldFormat(_local6, tf_settext);
_local7 = [filter_txt_easystroke];
_local6.filters = _local7;
_local6.x = 205;
_local6.y = 133;
_local6.width = 105;
_local6.autoSize = TextFieldAutoSize.LEFT;
_local6.text = CLocale.SHOP_CAP_AMMO;
addChild(_local6);
};
};
}
public function setTextPlayerStatInfo(_arg1:String, _arg2:MovieClip){
var _local3:Sprite = new mcShop_info_portrait();
_arg2.scaleX = 0.6;
_arg2.scaleY = 0.6;
_arg2.x = 13;
_arg2.y = 0;
addChild(_arg2);
setTextFieldFormat(txt_GunName, tf_gunname);
txt_GunName.sharpness = -200;
var _local4:Array = [filter_txt_heavystroke];
txt_GunName.filters = _local4;
txt_GunName.x = 120;
txt_GunName.y = 3;
txt_GunName.width = 275;
txt_GunName.text = _arg1;
addChild(txt_GunName);
setTextFieldFormat(txt_GunDescription, tf_gundesctiption);
var _local5:Array = [filter_txt_easystroke];
txt_GunDescription.filters = _local5;
txt_GunDescription.x = 120;
txt_GunDescription.y = 26;
txt_GunDescription.width = 290;
txt_GunDescription.multiline = true;
txt_GunDescription.wordWrap = true;
txt_GunDescription.autoSize = TextFieldAutoSize.LEFT;
var _local6:int = CLocale.STATS_NAMES.indexOf(_arg1);
if (_local6 > -1){
txt_GunDescription.text = CLocale.STATS_DESCRIPTION[_local6];
};
if (txt_GunDescription.numLines == 1){
txt_GunDescription.y = 32;
};
addChild(txt_GunDescription);
}
private function onButtonSetSlot2(_arg1:Event){
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
dispatchEvent(new Event(ON_BUTTON_SETSLOT2));
trace("BUTTON_SETSLOT2");
}
private function onButtonSetSlot3(_arg1:Event){
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
dispatchEvent(new Event(ON_BUY_AMMO_FOR_THIS));
trace("ON_BUY_AMMO_FOR_THIS");
}
private function addTexts(_arg1:int){
var _local8:TextField;
var _local9:Array;
var _local2 = 35;
var _local3 = 61;
var _local4 = 16;
if (_arg1 > 6){
throw (new Error(("Too many stars " + _arg1)));
};
var _local5:int;
while (_local5 < _arg1) {
_local8 = (txtArray[_local5] as TextField);
setTextFieldFormat(_local8, tf_standart);
_local9 = [filter_txt_whiteshadow];
_local8.filters = _local9;
_local8.width = 140;
_local8.x = _local2;
_local8.y = (_local3 + (_local4 * _local5));
addChild(_local8);
_local5++;
};
setTextFieldFormat(txt_GunName, tf_gunname);
txt_GunName.sharpness = -200;
var _local6:Array = [filter_txt_heavystroke];
txt_GunName.filters = _local6;
txt_GunName.x = 120;
txt_GunName.y = 3;
txt_GunName.width = 275;
txt_GunName.text = _gun.props.name;
addChild(txt_GunName);
setTextFieldFormat(txt_GunDescription, tf_gundesctiption);
var _local7:Array = [filter_txt_easystroke];
txt_GunDescription.filters = _local7;
txt_GunDescription.x = 120;
txt_GunDescription.y = 26;
txt_GunDescription.width = 290;
txt_GunDescription.multiline = true;
txt_GunDescription.wordWrap = true;
txt_GunDescription.autoSize = TextFieldAutoSize.LEFT;
txt_GunDescription.text = _gun.props.description;
if (txt_GunDescription.numLines == 1){
txt_GunDescription.y = 32;
};
addChild(txt_GunDescription);
}
public function setTextsGunInfo(_arg1:CGunAbstract){
_gun = _arg1;
_imgGunIcon = new _gun.props.imgclass();
_imgGunIcon.x = 5;
_imgGunIcon.y = 12;
addChild(_imgGunIcon);
_imgAmmoIcon = new _gun.props.ammoiconclass();
_imgAmmoIcon.x = 95;
_imgAmmoIcon.y = 33;
addChild(_imgAmmoIcon);
addStars(6);
addTexts(6);
txt_Info1.text = ("RANGE: " + _gun.props.range.toString());
txt_Info2.text = ("ACCURACY: " + _gun.props.accuracy.toString());
var _local2:int = _gun.props.pershot;
txt_Info3.text = ((("DAMAGE: " + int((_gun.props.damage_min * _local2)).toString()) + "-") + int((_gun.props.damage_max * _local2)).toString());
if (_gun.props.guntype == CGunProps.SHOTGUN){
_local2 = 1;
};
txt_Info4.text = (("SPEED: " + Math.ceil((((60 * 30) / _gun.props.shotpause) * _local2)).toString()) + "rpm");
txt_Info5.text = ("CARTRIDGE: " + _gun.props.clipmax);
txt_Info6.text = (("RELOAD: " + (Math.ceil((_gun.props.reloadpause / 3)) / 10).toString()) + " sec");
}
public function setAvailableAmmoButtons(){
setUnAvailableAmmoButtons();
_imgPriceBuyBg.x = 250;
_imgPriceBuyBg.y = 111;
addChild(_imgPriceBuyBg);
_imgPriceBtn.x = 286;
_imgPriceBtn.y = 125;
addChild(_imgPriceBtn);
_imgPriceBtn.addEventListener(MouseEvent.CLICK, onButtonBuyAmmo, false, 0, true);
_imgPriceBtn.mouseEnabled = true;
_imgPriceBtn.useHandCursor = true;
_imgPriceBtnBr.x = 285;
_imgPriceBtnBr.y = 124;
addChild(_imgPriceBtnBr);
_imgPriceBtnBr.mouseEnabled = false;
var _local1:Array = [filter_txt_heavystroke_avail];
txt_Price.filters = _local1;
}
public function setUnAvailableArmorButtons(){
_imgPriceBg.x = 225;
_imgPriceBg.y = 64;
addChild(_imgPriceBg);
setTextFieldFormat(txt_Price, tfArmorName);
txt_Price.sharpness = -200;
var _local1:Array = [filter_txt_heavystroke_nonav];
txt_Price.filters = _local1;
txt_Price.x = 234;
txt_Price.y = 75;
txt_Price.width = 145;
txt_Price.autoSize = TextFieldAutoSize.CENTER;
txt_Price.text = ("PRICE: $" + armor_.price.toString());
addChild(txt_Price);
}
private function onButtonBuy(_arg1:Event){
if (inventory_ != null){
if (inventory_.money >= Gun.props.price){
inventory_.money = (inventory_.money - Gun.props.price);
inventory_.addWeapon(Gun);
if (Gun.props.guntype == CGunProps.THROWING){
inventory_.ammoStorage.changeAmmoCount(Gun.props.ammotype, 1);
inventory_.checkAmmoSlots();
};
SoundManager.inst().play(SoundManager.CLICK_SHOP_BUY);
dispatchEvent(new Event(ON_BUY));
};
};
}
public function get ammo():CAmmoProps{
return (ammo_);
}
private function onButtonSetSlot1(_arg1:Event){
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
dispatchEvent(new Event(ON_BUTTON_SETSLOT1));
trace("BUTTON_SETSLOT1");
}
private function onButtonUpgrade(_arg1:Event){
SoundManager.inst().play(SoundManager.CLICK_SHOP_BUY);
dispatchEvent(new Event("BUTTON_UPGRADE"));
}
}
}//package shop
Section 94
//CInfoPanelStar (shop.CInfoPanelStar)
package shop {
import flash.display.*;
class CInfoPanelStar extends Sprite {
var img:Sprite;
var _active:Boolean;// = false
function CInfoPanelStar(){
img = new Sprite();
addChild(img);
draw();
}
private function draw(){
removeChild(img);
if (_active){
img = new mcShopUprgadeStarActive();
} else {
img = new mcShopUprgadeStarInactive();
};
addChild(img);
}
public function set active(_arg1:Boolean){
_active = _arg1;
draw();
}
public function get active():Boolean{
return (_active);
}
}
}//package shop
Section 95
//CShop (shop.CShop)
package shop {
import flash.display.*;
import gunz.*;
import itemz.*;
import character.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
public class CShop extends Sprite {
private var tf_standart:TextFormat;
private var btnDone:SimpleButton;
private var arrayASlots:Array;
private var img_main_bg:Sprite;
private var txt_player_level:TextField;
private var infopanel:CInfoPanel;
private var txt_player_hp:TextField;
private var arrayBullets:Array;
private var uiInventory:UIShopInventory;
private var savedGun:CGunAbstract;// = null
private var arrayGunz:Array;
private var isTutor:Boolean;// = false
private var stCh_Dexterity;
private var stCh_Speed;
private var txt_player_money:TextField;
private var stCh_Array:Array;
private var filter_txt_whiteshadow:DropShadowFilter;
private var stCh_Agility;
private var filter_txt_easystroke:GlowFilter;
private var stCh_Accuracy;
private var img_portrait:Sprite;
private var _stats:CStats;
private var filter_txt_heavystroke:GlowFilter;
private var txt_player_up:TextField;
private var arrayBSlots:Array;
private var ammoStore:ObjectList;
private var _upPoints:int;// = 0
private var arrayGSlots:Array;
private var stCh_Luck;
private var arrayArmors:Array;
private var tf_playername:TextFormat;
private var stCh_Strength;
private var _inventory:CInventory;
private var img_portrait_con:Sprite;
private var txt_player_name:TextField;
private var img_portrait_br:Sprite;
private var stCh_Perception;
public function CShop(_arg1:CInventory, _arg2:CStats){
var _local11:CGunAbstract;
var _local14:CGSlot;
var _local19:CGunAbstract;
var _local21:CASlot;
var _local22:CArmorAbstract;
var _local23:MovieClip;
var _local24:MovieClip;
img_main_bg = new mcShop_BG();
btnDone = new mcShop_Btn_Done();
ammoStore = new ObjectList();
tf_standart = new TextFormat("MonoCondencedDi", 14, 0xFFFFFF, false, false, false, null, null, TextFormatAlign.LEFT);
tf_playername = new TextFormat("MonoCondencedDi", 16, 0xFFFFFF, true, false, false, null, null, TextFormatAlign.LEFT);
filter_txt_heavystroke = new GlowFilter(0, 1, 6, 6, 10, 1, false, false);
filter_txt_easystroke = new GlowFilter(0, 1, 4, 4, 1, 3, false, false);
filter_txt_whiteshadow = new DropShadowFilter(2, 45, 0xFFFFFF, 0.7, 2, 2, 1, 3, false, false, false);
img_portrait_con = new Sprite();
img_portrait = new mcShop_info_portrait();
img_portrait_br = new mcShop_info_portrait_border();
txt_player_name = new TextField();
txt_player_level = new TextField();
txt_player_money = new TextField();
txt_player_hp = new TextField();
txt_player_up = new TextField();
stCh_Array = new Array();
arrayGunz = new Array();
arrayGSlots = new Array();
arrayArmors = new Array();
arrayASlots = new Array();
arrayBullets = new Array();
arrayBSlots = new Array();
super();
_inventory = _arg1;
_stats = _arg2;
addChild(img_main_bg);
addChild(btnDone);
btnDone.x = 600;
btnDone.y = 500;
btnDone.addEventListener(MouseEvent.CLICK, btnDone_Click_Handler, false, 0, true);
var _local3:Class = _stats.getCharPortraitClass();
var _local4:MovieClip = new (_local3);
_local4.scaleX = 0.6;
_local4.scaleY = 0.6;
img_portrait_con.addChild(_local4);
_local4.x = (_local4.x + 7);
img_portrait.x = 20;
img_portrait.y = 3;
img_portrait_con.addChild(img_portrait_br);
img_main_bg.addChild(img_portrait_con);
setTextFieldFormat(txt_player_name, tf_playername);
txt_player_name.text = _stats.player_name;
var _local5:Array = [filter_txt_whiteshadow];
txt_player_name.filters = _local5;
txt_player_name.x = 65;
txt_player_name.y = 2;
txt_player_name.width = 120;
img_main_bg.addChild(txt_player_name);
setTextFieldFormat(txt_player_level, tf_standart);
txt_player_level.text = ("Level: " + _stats.player_level.toString());
_local5 = [filter_txt_heavystroke];
txt_player_level.filters = _local5;
txt_player_level.x = 65;
txt_player_level.y = 26;
txt_player_level.width = 120;
img_main_bg.addChild(txt_player_level);
setTextFieldFormat(txt_player_money, tf_standart);
txt_player_money.text = ("Money: $" + _inventory.money.toString());
_local5 = [filter_txt_heavystroke];
txt_player_money.filters = _local5;
txt_player_money.x = 65;
txt_player_money.y = 42;
txt_player_money.width = 120;
img_main_bg.addChild(txt_player_money);
setTextFieldFormat(txt_player_hp, tf_standart);
txt_player_hp.text = ("Health Points: " + _stats.currentHp.toString());
_local5 = [filter_txt_heavystroke];
txt_player_hp.filters = _local5;
txt_player_hp.x = 5;
txt_player_hp.y = 71;
txt_player_hp.width = 150;
img_main_bg.addChild(txt_player_hp);
setTextFieldFormat(txt_player_up, tf_standart);
txt_player_up.text = ("Upgrade Points: " + _stats.currentUpPoints.toString());
_local5 = [filter_txt_heavystroke];
txt_player_up.filters = _local5;
txt_player_up.x = 5;
txt_player_up.y = 89;
txt_player_up.width = 150;
img_main_bg.addChild(txt_player_up);
_upPoints = _stats.currentUpPoints;
var _local6 = (_stats.currentUpPoints > 0);
stCh_Strength = new CCharStatChanger("STRENGTH", _stats.Power, false, _local6, CLocale.STATS_NAMES[0]);
stCh_Strength.x = 5;
stCh_Strength.y = 118;
img_main_bg.addChild(stCh_Strength);
stCh_Speed = new CCharStatChanger("SPEED", _stats.Speed, false, _local6, CLocale.STATS_NAMES[1]);
stCh_Speed.x = 5;
stCh_Speed.y = 141;
img_main_bg.addChild(stCh_Speed);
stCh_Dexterity = new CCharStatChanger("ENDURANCE", _stats.Dexterity, false, _local6, CLocale.STATS_NAMES[2]);
stCh_Dexterity.x = 5;
stCh_Dexterity.y = 164;
img_main_bg.addChild(stCh_Dexterity);
stCh_Agility = new CCharStatChanger("AGILITY", _stats.Agility, false, _local6, CLocale.STATS_NAMES[3]);
stCh_Agility.x = 5;
stCh_Agility.y = 187;
img_main_bg.addChild(stCh_Agility);
stCh_Accuracy = new CCharStatChanger("ACCURACY", _stats.Accuracy, false, _local6, CLocale.STATS_NAMES[4]);
stCh_Accuracy.x = 5;
stCh_Accuracy.y = 210;
img_main_bg.addChild(stCh_Accuracy);
stCh_Perception = new CCharStatChanger("PERCEPTION", _stats.Perception, false, _local6, CLocale.STATS_NAMES[5]);
stCh_Perception.x = 5;
stCh_Perception.y = 233;
img_main_bg.addChild(stCh_Perception);
stCh_Luck = new CCharStatChanger("LUCK", _stats.Luck, false, _local6, CLocale.STATS_NAMES[6]);
stCh_Luck.x = 5;
stCh_Luck.y = 0x0100;
img_main_bg.addChild(stCh_Luck);
stCh_Array = [stCh_Accuracy, stCh_Agility, stCh_Dexterity, stCh_Luck, stCh_Perception, stCh_Speed, stCh_Strength];
var _local7:* = 7;
while (_local7-- > 0) {
stCh_Array[_local7].addEventListener("PLUS_BUTTON_DOWN", stats_PlusBtn);
stCh_Array[_local7].addEventListener("MINUS_BUTTON_DOWN", stats_MinusBtn);
stCh_Array[_local7].addEventListener(MouseEvent.MOUSE_OVER, stats_MouseOver);
stCh_Array[_local7].addEventListener(MouseEvent.MOUSE_OUT, stats_MouseOut);
};
uiInventory = (img_main_bg.getChildByName("i_mc_shop_inventory") as UIShopInventory);
var _local8:int = uiInventory.x;
var _local9:int = uiInventory.y;
img_main_bg.removeChild(uiInventory);
img_main_bg.addChild(uiInventory);
uiInventory.x = _local8;
uiInventory.y = _local9;
uiInventory.addEventListener(UIShopInventory.ON_ITEM_SELECT, handleInventoryItemSelect, false, 0, true);
arrayGunz = CGunzPropBank.gimmeAllOfThem;
arrayGunz.reverse();
var _local10:int = arrayGunz.length;
while (_local10-- > 0) {
_local11 = (arrayGunz[_local10] as CGunAbstract);
if (_inventory.haveThisWeapon(_local11)){
trace("found in inventory", _local11.props.name, _local11.props.UpgradesArr);
arrayGunz[_local10] = _inventory.gimmeWeapon(_local11);
trace("listed ", arrayGunz[_local10].props.name, arrayGunz[_local10].props.UpgradesArr);
};
};
var _local12 = 203;
var _local13 = 3;
var _local15:int;
var _local16:int;
var _local17 = 80;
var _local18 = 40;
var _local20:int = arrayGunz.length;
_local7 = 0;
while (_local7 < _local20) {
_local19 = (arrayGunz[_local7] as CGunAbstract);
_local14 = new CGSlot(_local19);
_local14.x = (_local12 + (_local15 * _local17));
_local14.y = (_local13 + (_local16 * _local18));
addChild(_local14);
arrayGSlots.push(_local14);
_local14.addEventListener(MouseEvent.MOUSE_DOWN, gSlotMouseDown, false, 0, true);
_local15++;
if (_local15 > 3){
_local15 = 0;
_local16++;
};
_local7++;
};
examineGuns();
arrayGSlots[0].setSelected();
createNewPanel();
infopanel.setTextsGunInfo(arrayGSlots[0].Gun);
if (_local19.props.minStrength > _stats.Power){
infopanel.showStrengthWarning(_local19.props.minStrength);
};
infopanel.setOwnedButtons();
addChild(infopanel);
infopanel.addEventListener(CInfoPanel.ON_BUY, hanldeBuyWeapon, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUY_ARMOR, handleBuyArmor, false, 0, true);
arrayArmors = [new CArmorLight(), new CArmorMedium(), new CArmorHeavy()];
_local12 = 524;
_local13 = 27;
_local18 = 41;
_local20 = arrayArmors.length;
_local7 = 0;
while (_local7 < _local20) {
_local22 = (arrayArmors[_local7] as CArmorAbstract);
_local21 = new CASlot(_local22);
_local21.x = _local12;
_local21.y = (_local13 + (_local7 * _local18));
addChild(_local21);
arrayASlots.push(_local21);
_local21.addEventListener(MouseEvent.MOUSE_DOWN, aSlotMouseDown, false, 0, true);
_local7++;
};
examineArmors();
initAmmoStore();
examineAmmo();
isTutor = false;
if (TutorManager.inst.tutorEnabled){
_local23 = TutorManager.inst.getShopTutor(_stats.player_level);
if (_local23 != null){
if (TutorManager.inst.shopAppearance == 1){
showGunInfo(arrayGSlots[4].Gun);
} else {
if (TutorManager.inst.shopAppearance == 2){
showGunInfo(arrayGSlots[0].Gun);
};
};
addChild(_local23);
isTutor = true;
};
};
if (((!(isTutor)) && ((_upPoints > 0)))){
_local24 = TutorManager.inst.getShopPointsReminder();
addChild(_local24);
};
if (uiInventory != null){
uiInventory.inventory = _inventory;
uiInventory.showItems();
};
}
private function showArmorInfo(_arg1:CArmorAbstract){
removeChild(infopanel);
createNewPanel();
infopanel.setTextArmorInfo(_arg1);
addChild(infopanel);
if (_inventory.armor.fullname == _arg1.fullname){
} else {
if (_inventory.money >= _arg1.price){
infopanel.setAvailableArmorButtons();
} else {
infopanel.setUnAvailableArmorButtons();
};
};
}
private function handleAmmoClick(_arg1:Event){
var _local2:UIAmmoItem = UIAmmoItem(_arg1.target);
examineAmmo();
_local2.setSelected();
examineArmors();
examineGuns();
removeChild(infopanel);
createNewPanel();
infopanel.setTextAmmoInfo(_local2.props);
addChild(infopanel);
if (_inventory.money >= _local2.props.pricePerPack){
infopanel.setAvailableAmmoButtons();
} else {
infopanel.setUnAvailableAmmoButtons();
};
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
}
private function handleUpgradeBuy(_arg1:Event){
showPlayerMoney();
examineGuns();
var _local2:CGunAbstract = infopanel.Gun;
removeChild(infopanel);
createNewPanel();
infopanel.setTextsGunInfo(_local2);
infopanel.setOwnedButtons();
var _local3:UIWeaponUpgrade = UIWeaponUpgrade(_arg1.target);
getChildIndex(_local3);
addChildAt(infopanel, (getChildIndex(_local3) - 1));
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
}
private function showPlayerMoney(){
txt_player_money.text = ("Money: $" + _inventory.money.toString());
}
private function handleInventoryItemSelect(_arg1:Event){
var _local2:CGunAbstract = uiInventory.selectedItem.gun;
if (_local2.props.guntype != CLocale.GUN_NULL){
if (_inventory.haveThisWeapon(_local2)){
_local2 = _inventory.gimmeWeapon(_local2);
};
showGunInfo(_local2);
if (_local2.props.minStrength > _stats.Power){
infopanel.showStrengthWarning(_local2.props.minStrength);
} else {
infopanel.hideStrengthWarning();
};
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
};
}
private function stats_MouseOut(_arg1:MouseEvent){
if (savedGun != null){
showGunInfo(savedGun);
};
}
private function handleBuyAmmo(_arg1:Event){
showPlayerMoney();
examineAll();
uiInventory.showItems();
var _local2:CAmmoProps = infopanel.ammo;
showAmmoInfo(_local2);
SoundManager.inst().play(SoundManager.CLICK_SHOP_BUY);
}
private function examineGuns(){
var _local2:CGunAbstract;
var _local3:CGSlot;
var _local1:int = arrayGSlots.length;
while (_local1-- > 0) {
_local3 = (arrayGSlots[_local1] as CGSlot);
_local2 = _local3.Gun;
if (_inventory.haveThisWeapon(_local2)){
_local3.setOwned();
} else {
if (_inventory.money > _local2.props.price){
_local3.setAvailable();
} else {
_local3.setUnavailable();
};
};
_local3.setUnselected();
};
}
private function handleBuyAmmoForThis(_arg1:Event){
var ammoprops:CAmmoProps;
var e = _arg1;
try {
examineAmmo();
examineArmors();
examineGuns();
ammoprops = CAmmoPropsBank.getAmmoProps(infopanel.Gun.props.ammotype);
removeChild(infopanel);
createNewPanel();
infopanel.setTextAmmoInfo(ammoprops);
addChild(infopanel);
if (_inventory.money >= ammoprops.pricePerPack){
infopanel.setAvailableAmmoButtons();
} else {
infopanel.setUnAvailableAmmoButtons();
};
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
} catch(e:Error) {
};
}
private function stats_MouseOver(_arg1:MouseEvent){
var _local2:CCharStatChanger;
var _local3:Class;
var _local4:MovieClip;
trace("stats over");
if ((_arg1.target is CCharStatChanger)){
_local2 = CCharStatChanger(_arg1.target);
removeChild(infopanel);
createNewPanel();
addChild(infopanel);
_local3 = _stats.getCharPortraitClass();
_local4 = new (_local3);
infopanel.setTextPlayerStatInfo(_local2.statName, _local4);
};
}
private function setTextFieldFormat(_arg1:TextField, _arg2:TextFormat){
_arg1.selectable = false;
_arg1.embedFonts = true;
_arg1.border = false;
_arg1.multiline = false;
_arg1.mouseEnabled = false;
_arg1.mouseWheelEnabled = false;
_arg1.antiAliasType = AntiAliasType.ADVANCED;
_arg2.letterSpacing = 0.5;
_arg1.defaultTextFormat = _arg2;
}
private function gDragMouseUp(_arg1:MouseEvent){
var _local2:CGunDrag = (_arg1.target as CGunDrag);
_local2.stopDrag();
_local2.filters = [];
removeChild(_local2);
if (uiInventory.hitTestPoint(_arg1.stageX, _arg1.stageY, false)){
uiInventory.putItem(_arg1.stageX, _arg1.stageY, _local2.Gun);
};
_local2.removeEventListener(MouseEvent.MOUSE_UP, gDragMouseUp);
_local2 = null;
Mouse.show();
}
private function createNewPanel(){
infopanel = new CInfoPanel(_inventory);
infopanel.addEventListener(CInfoPanel.ON_BUY, hanldeBuyWeapon, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUY_ARMOR, handleBuyArmor, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUY_AMMO, handleBuyAmmo, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUTTON_SETSLOT1, handleSetSlot1, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUTTON_SETSLOT2, handleSetSlot2, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUTTON_UPGRADE, handleUpgrade, false, 0, true);
infopanel.addEventListener(CInfoPanel.ON_BUY_AMMO_FOR_THIS, handleBuyAmmoForThis, false, 0, true);
}
private function stats_AllAllowMinus(_arg1:Boolean){
var _local2:* = 7;
while (_local2-- > 0) {
stCh_Array[_local2].minusallowed = _arg1;
};
}
private function gSlotMouseDown(_arg1:MouseEvent){
var _local3:CGunDrag;
var _local2:CGSlot = (_arg1.target as CGSlot);
if (_local2.owned){
_local3 = _local2.gunDrag;
addChild(_local3);
_local3.startDrag();
_local3.filters = [new GlowFilter(0xFFFFFF, 1, 2, 2, 10, 1, false), new DropShadowFilter(12, 45, 0, 0.8, 4, 4, 1, 2)];
Mouse.hide();
_local3.addEventListener(MouseEvent.MOUSE_UP, gDragMouseUp, false, 0, true);
_local3 = null;
};
examineGuns();
examineArmors();
_local2.setSelected();
showGunInfo(_local2.Gun);
}
private function saveInventory():void{
_stats.setAccuracy(stCh_Accuracy.Stat);
_stats.setAgility(stCh_Agility.Stat);
_stats.setDexterity(stCh_Dexterity.Stat);
_stats.setLuck(stCh_Luck.Stat);
_stats.setPerception(stCh_Perception.Stat);
_stats.setPower(stCh_Strength.Stat);
_stats.setSpeed(stCh_Speed.Stat);
_inventory.checkAmmoSlots();
}
private function checkStats(_arg1:String, _arg2:int){
switch (_arg1){
case CLocale.STATS_NAMES[0]:
_stats.setPower(_arg2);
break;
case CLocale.STATS_NAMES[1]:
_stats.setSpeed(_arg2);
break;
case CLocale.STATS_NAMES[2]:
_stats.setDexterity(_arg2);
break;
case CLocale.STATS_NAMES[3]:
_stats.setAgility(_arg2);
break;
case CLocale.STATS_NAMES[4]:
_stats.setAccuracy(_arg2);
break;
case CLocale.STATS_NAMES[5]:
_stats.setPerception(_arg2);
break;
case CLocale.STATS_NAMES[6]:
_stats.setLuck(_arg2);
break;
};
}
private function showGunInfo(_arg1:CGunAbstract){
removeChild(infopanel);
createNewPanel();
infopanel.setTextsGunInfo(_arg1);
if (_arg1.props.minStrength > _stats.Power){
infopanel.showStrengthWarning(_arg1.props.minStrength);
};
if (_inventory.haveThisWeapon(_arg1)){
infopanel.setOwnedButtons();
} else {
if (_inventory.money > _arg1.props.price){
infopanel.setAvailableButtons();
} else {
infopanel.setUnAvailableButtons();
};
};
savedGun = _arg1;
addChild(infopanel);
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
}
private function examineAll(){
showPlayerMoney();
examineArmors();
examineGuns();
examineAmmo();
uiInventory.showItems();
}
private function initAmmoStore(){
var _local1:UIAmmoItem = new UIAmmoItem();
_local1.mc = (img_main_bg.getChildByName("i_mc_ammo1") as MovieClip);
_local1.props = CAmmoPropsBank.getAmmoProps(CGunProps.AMMO_STANDART);
ammoStore.add(_local1);
_local1 = new UIAmmoItem();
_local1.mc = (img_main_bg.getChildByName("i_mc_ammo2") as MovieClip);
_local1.props = CAmmoPropsBank.getAmmoProps(CGunProps.AMMO_SHELLS);
ammoStore.add(_local1);
_local1 = new UIAmmoItem();
_local1.mc = (img_main_bg.getChildByName("i_mc_ammo3") as MovieClip);
_local1.props = CAmmoPropsBank.getAmmoProps(CGunProps.AMMO_CHAIN);
ammoStore.add(_local1);
_local1 = new UIAmmoItem();
_local1.mc = (img_main_bg.getChildByName("i_mc_ammo4") as MovieClip);
_local1.props = CAmmoPropsBank.getAmmoProps(CGunProps.AMMO_FUEL);
ammoStore.add(_local1);
_local1 = new UIAmmoItem();
_local1.mc = (img_main_bg.getChildByName("i_mc_ammo5") as MovieClip);
_local1.props = CAmmoPropsBank.getAmmoProps(CGunProps.AMMO_ROCKETS);
ammoStore.add(_local1);
_local1 = new UIAmmoItem();
_local1.mc = (img_main_bg.getChildByName("i_mc_ammo6") as MovieClip);
_local1.props = CAmmoPropsBank.getAmmoProps(CGunProps.AMMO_ENERGY);
ammoStore.add(_local1);
var _local2:int;
while (_local2 < ammoStore.count) {
_local1 = UIAmmoItem(ammoStore.getItem(_local2));
_local1.addEventListener(UIAmmoItem.ON_CLICK, handleAmmoClick, false, 0, true);
_local2++;
};
}
private function stats_MinusBtn(_arg1:Event){
var _local3:CCharStatChanger;
_upPoints++;
if ((_arg1.currentTarget is CCharStatChanger)){
_local3 = CCharStatChanger(_arg1.target);
checkStats(_local3.statName, _local3.statValue);
};
if (_upPoints > _stats.currentUpPoints){
throw (new Error(((("_upPoints " + _upPoints.toString) + " when was ") + _stats.currentUpPoints)));
};
var _local2 = (_upPoints > 0);
stats_AllAllowPlus(_local2);
txt_player_up.text = ("Upgrade Points: " + _upPoints.toString());
if (infopanel.Gun != null){
if (infopanel.Gun.props.minStrength > _stats.Power){
infopanel.showStrengthWarning(infopanel.Gun.props.minpower);
} else {
infopanel.hideStrengthWarning();
};
};
txt_player_hp.text = ("Health Points: " + _stats.currentHp.toString());
}
private function destruct():void{
_inventory = null;
_stats = null;
arrayGunz = null;
arrayGSlots = null;
}
private function handleBuyArmor(_arg1:Event){
examineAll();
var _local2:CArmorAbstract = infopanel.armor;
removeChild(infopanel);
createNewPanel();
infopanel.setTextArmorInfo(_local2);
addChild(infopanel);
}
private function aSlotMouseDown(_arg1:MouseEvent){
var _local2:CASlot = (_arg1.target as CASlot);
examineArmors();
examineGuns();
_local2.setSelected();
showArmorInfo(_local2.Armor);
}
private function stats_AllAllowPlus(_arg1:Boolean){
var _local2:* = 7;
while (_local2-- > 0) {
stCh_Array[_local2].plusallowed = _arg1;
};
}
private function showAmmoInfo(_arg1:CAmmoProps){
removeChild(infopanel);
createNewPanel();
addChild(infopanel);
infopanel.setTextAmmoInfo(_arg1);
infopanel.setAvailableAmmoButtons();
}
private function stats_PlusBtn(_arg1:Event){
var _local2:CCharStatChanger;
if (_upPoints > 0){
_upPoints--;
_local2 = (_arg1.target as CCharStatChanger);
_local2.StatPlusPlus();
txt_player_up.text = ("Upgrade Points: " + _upPoints.toString());
};
var _local3 = (_upPoints > 0);
stats_AllAllowPlus(_local3);
if ((_arg1.currentTarget is CCharStatChanger)){
_local2 = CCharStatChanger(_arg1.target);
checkStats(_local2.statName, _local2.statValue);
};
if (infopanel.Gun != null){
if (infopanel.Gun.props.minpower > _stats.Power){
infopanel.showStrengthWarning(infopanel.Gun.props.minpower);
} else {
infopanel.hideStrengthWarning();
};
};
txt_player_hp.text = ("Health Points: " + _stats.currentHp.toString());
}
private function setAmmoAmount(_arg1:String){
var _local2:TextField = new TextField();
switch (_arg1){
case CGunProps.AMMO_STANDART:
_local2 = (img_main_bg.getChildByName("i_txt_ammo1") as TextField);
break;
case CGunProps.AMMO_SHELLS:
_local2 = (img_main_bg.getChildByName("i_txt_ammo2") as TextField);
break;
case CGunProps.AMMO_CHAIN:
_local2 = (img_main_bg.getChildByName("i_txt_ammo3") as TextField);
break;
case CGunProps.AMMO_FUEL:
_local2 = (img_main_bg.getChildByName("i_txt_ammo4") as TextField);
break;
case CGunProps.AMMO_ROCKETS:
_local2 = (img_main_bg.getChildByName("i_txt_ammo5") as TextField);
break;
case CGunProps.AMMO_ENERGY:
_local2 = (img_main_bg.getChildByName("i_txt_ammo6") as TextField);
break;
};
var _local3:AmmoCell = _inventory.ammoStorage.getAmmoByName(_arg1);
_local2.text = _local3.ammoCount.toString();
}
private function examineAmmo(){
var _local2:UIAmmoItem;
var _local1:int;
while (_local1 < ammoStore.count) {
_local2 = UIAmmoItem(ammoStore.getItem(_local1));
if (_inventory.money >= _local2.props.pricePerPack){
_local2.setAvailable();
} else {
_local2.setUnavailable();
};
_local2.setUnselected();
setAmmoAmount(_local2.props.type);
_local1++;
};
}
private function btnDone_Click_Handler(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
saveInventory();
destruct();
trace("Shop done");
dispatchEvent(new Event("SHOP_DONE"));
}
private function handleUpgrade(_arg1:Event){
var _local2:UIWeaponUpgrade;
if (infopanel.Gun != null){
_local2 = new UIWeaponUpgrade(infopanel.Gun, _inventory);
_local2.addEventListener(UIWeaponUpgrade.ON_BUY_CLICK, handleUpgradeBuy, false, 0, true);
addChild(_local2);
};
}
private function examineArmors(){
var _local2:CArmorAbstract;
var _local3:CASlot;
var _local1:int = arrayASlots.length;
while (_local1-- > 0) {
_local3 = (arrayASlots[_local1] as CASlot);
_local2 = _local3.Armor;
trace("inv", _inventory.armor.fullname, "shop", _local2.fullname);
if (_inventory.armor.fullname == _local2.fullname){
_local3.setOwned();
trace("Arm owned", _inventory.armor.name);
} else {
if (_inventory.money > _local2.price){
_local3.setAvailable();
} else {
_local3.setUnavailable();
};
};
_local3.setUnselected();
};
}
private function hanldeBuyWeapon(_arg1:Event){
var _local3:MovieClip;
txt_player_money.text = ("Money: $" + _inventory.money.toString());
examineGuns();
var _local2:CGunAbstract = infopanel.Gun;
removeChild(infopanel);
createNewPanel();
addChild(infopanel);
infopanel.setTextsGunInfo(_local2);
infopanel.setOwnedButtons();
uiInventory.showItems();
if ((((((TutorManager.inst.shopGunzBought < 2)) && ((_stats.player_level < 6)))) && (!((_local2.props.guntype == CGunProps.THROWING))))){
_local3 = TutorManager.inst.getShopGunSlotReminder();
addChild(_local3);
};
}
private function handleSetSlot1(_arg1:Event){
var _local2:CGunAbstract = infopanel.Gun;
if (_local2 == null){
return;
};
if ((((_local2.props.guntype == CGunProps.DUALPISTOL)) || ((_local2.props.guntype == CGunProps.PISTOL)))){
uiInventory.putItemToSlot(0, _local2);
_inventory.weapon1 = _local2;
_inventory.checkAmmoSlots();
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
return;
};
if (_local2.props.guntype == CGunProps.THROWING){
uiInventory.putItemToSlot(3, _local2);
_inventory.weapon4 = _local2;
_inventory.checkAmmoSlots();
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
return;
};
var _local3:Boolean = (((((((((((_local2.props.guntype == CGunProps.SMG)) || ((_local2.props.guntype == CGunProps.SHOTGUN)))) || ((_local2.props.guntype == CGunProps.CLOSECOMBAT)))) || ((_local2.props.guntype == CGunProps.HEAVY)))) || ((_local2.props.guntype == CGunProps.MACHINEGUN)))) || ((_local2.props.guntype == CGunProps.RIFLE)));
if (_local3){
uiInventory.putItemToSlot(1, _local2);
_inventory.weapon2 = _local2;
_inventory.checkAmmoSlots();
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
return;
};
}
private function handleSetSlot2(_arg1:Event){
var _local2:CGunAbstract = infopanel.Gun;
if (_local2 == null){
return;
};
uiInventory.putItemToSlot(2, _local2);
_inventory.weapon3 = _local2;
_inventory.checkAmmoSlots();
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
}
}
}//package shop
Section 96
//MinStrItem (shop.MinStrItem)
package shop {
import flash.display.*;
import flash.text.*;
public class MinStrItem extends MovieClip {
public var i_tf_str:TextField;
private var strTf:TextField;
public function MinStrItem(){
strTf = (getChildByName("i_tf_str") as TextField);
strTf.mouseEnabled = false;
}
public function setStrength(_arg1:int){
if ((((_arg1 < 11)) && ((_arg1 > 0)))){
strTf.text = _arg1.toString();
};
}
}
}//package shop
Section 97
//UIAmmoItem (shop.UIAmmoItem)
package shop {
import flash.display.*;
import gunz.*;
import flash.events.*;
import flash.filters.*;
public class UIAmmoItem extends EventDispatcher {
private var _fl_select_stroke:GlowFilter;
public var mc_:MovieClip;// = null
private var _fl_shade:ColorMatrixFilter;
private var _fl_select_glow:GlowFilter;
private var _fl_available:GlowFilter;
public var props:CAmmoProps;// = null
private var _fl_unavailable:GlowFilter;
private var _fl_shadow:DropShadowFilter;
public static const ON_CLICK:String = "ON_CLICK";
public function UIAmmoItem(){
_fl_shadow = new DropShadowFilter(10, 80, 0, 0.8, 8, 8, 1, 3, false, false, true);
_fl_available = new GlowFilter(0xFF00, 1, 6, 6, 1, 3, false, false);
_fl_unavailable = new GlowFilter(0xFFFFFF, 0.7, 2, 2, 2, 3);
_fl_shade = new ColorMatrixFilter([0.15, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0]);
_fl_select_stroke = new GlowFilter(0xFFFFFF, 1, 2, 2, 10, 1, false, false);
_fl_select_glow = new GlowFilter(16777062, 1, 18, 18, 2, 3, false, false);
super();
}
public function setAvailable(){
drawAvailable();
}
private function drawOwned(){
mc_.filters = null;
var _local1:Array = [_fl_available];
mc_.filters = _local1;
mc_.alpha = 1;
}
public function setUnavailable(){
drawUnavailable();
}
private function handleClipClick(_arg1:MouseEvent){
dispatchEvent(new Event(ON_CLICK));
}
private function drawUnselected(){
mc_.filters = null;
}
public function set mc(_arg1:MovieClip){
mc_ = _arg1;
mc_.addEventListener(MouseEvent.CLICK, handleClipClick, false, 0, true);
mc_.useHandCursor = true;
}
private function animateSelected(_arg1:Event){
mc_.alpha = (mc_.alpha + 0.15);
if (mc_.alpha > 1){
mc_.alpha = 1;
mc_.removeEventListener(Event.ENTER_FRAME, animateSelected);
};
}
public function setSelected(){
drawSelected();
}
public function setOwned(){
drawOwned();
}
private function drawAvailable(){
mc_.filters = null;
mc_.alpha = 1;
}
private function drawUnavailable(){
mc_.filters = null;
var _local1:Array = [_fl_shade, _fl_unavailable];
mc_.filters = _local1;
mc_.alpha = 0.6;
}
public function get mc():MovieClip{
return (mc_);
}
public function setUnselected(){
drawUnselected();
}
private function drawSelected(){
var _local1:Array = [_fl_select_stroke, _fl_select_glow];
mc_.filters = _local1;
mc_.alpha = 0;
mc_.addEventListener(Event.ENTER_FRAME, animateSelected, false, 0, true);
}
}
}//package shop
Section 98
//UIShopInventory (shop.UIShopInventory)
package shop {
import flash.display.*;
import gunz.*;
import character.*;
import flash.events.*;
import flash.text.*;
public class UIShopInventory extends MovieClip {
private var mcSlot3_:MovieClip;
private var mcSlot1_:MovieClip;
private var inventory_:CInventory;
public var i_mc_inventory_item1:MovieClip;
public var i_mc_inventory_item2:MovieClip;
public var i_mc_inventory_item3:MovieClip;
public var i_mc_inventory_item4:MovieClip;
public var selectedItem:UIShopInventoryItem;// = null
private var mcSlot4_:MovieClip;
private var mcSlot2_:MovieClip;
private var slots:ObjectList;
public static const ON_ITEM_SELECT:String = "ON_ITEM_SELECT";
public function UIShopInventory(){
slots = new ObjectList();
getInstances();
subscribeForEvents();
}
private function subscribeItemForEvents(_arg1:MovieClip){
_arg1.useHandCursor = true;
_arg1.addEventListener(MouseEvent.CLICK, handleItemClick, false, 0, true);
}
private function handleOut(_arg1:MouseEvent){
var _local3:*;
var _local2:MovieClip = getSlot(_arg1.target);
if (_local2 != null){
_local3 = _local2.getChildByName("overlay");
if (_local3 != null){
_local2.removeChild(_local3);
};
_local2.removeEventListener(MouseEvent.MOUSE_OUT, handleOut, false);
_local2.addEventListener(MouseEvent.MOUSE_OVER, handleOver, false, 0, true);
};
}
private function getInstances(){
mcSlot1_ = i_mc_inventory_item1;
slots.add(mcSlot1_);
mcSlot2_ = i_mc_inventory_item2;
slots.add(mcSlot2_);
mcSlot3_ = i_mc_inventory_item3;
slots.add(mcSlot3_);
mcSlot4_ = i_mc_inventory_item4;
slots.add(mcSlot4_);
}
private function handleMouseMove(_arg1:MouseEvent){
dragOver(_arg1.stageX, _arg1.stageY);
}
private function subscribeForEvents(){
var _local2:MovieClip;
var _local1:int;
while (_local1 < slots.count) {
_local2 = getSlotByIndex(_local1);
_local2.addEventListener(MouseEvent.CLICK, handleItemClick, false, 0, true);
_local2.useHandCursor = true;
_local1++;
};
}
public function putItem(_arg1:int, _arg2:int, _arg3:CGunAbstract){
var _local5:MovieClip;
var _local6:UIShopInventoryItem;
var _local7:Boolean;
var _local8:MovieClip;
var _local4:int;
while (_local4 < slots.count) {
_local5 = getSlotByIndex(_local4);
if (_local5.hitTestPoint(_arg1, _arg2, false)){
_local6 = getItemByIndex(_local4);
if (((!((_local6 == null))) && (!((_local6.gun == _arg3))))){
if ((((_local4 == 0)) && (!((((_arg3.props.guntype == CGunProps.DUALPISTOL)) || ((_arg3.props.guntype == CGunProps.PISTOL))))))){
return;
};
if ((((_local4 == 3)) && (!((_arg3.props.guntype == CGunProps.THROWING))))){
return;
};
_local7 = (((((((((((_arg3.props.guntype == CGunProps.SMG)) || ((_arg3.props.guntype == CGunProps.SHOTGUN)))) || ((_arg3.props.guntype == CGunProps.CLOSECOMBAT)))) || ((_arg3.props.guntype == CGunProps.HEAVY)))) || ((_arg3.props.guntype == CGunProps.MACHINEGUN)))) || ((_arg3.props.guntype == CGunProps.RIFLE)));
if ((((((_local4 == 1)) || ((_local4 == 2)))) && (!(_local7)))){
return;
};
_local8 = MovieClip(_local5.getChildByName("UIShopInventoryItem"));
while (_local8 != null) {
_local5.removeChild(_local8);
_local8 = MovieClip(_local5.getChildByName("UIShopInventoryItem"));
};
_local6 = new UIShopInventoryItem();
_local6.name = "UIShopInventoryItem";
_local6.gun = _arg3;
_local5.addChild(_local6);
showAmmo(_arg3, _local6);
if (_local4 == 0){
inventory_.weapon1 = _arg3;
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
};
if (_local4 == 1){
inventory_.weapon2 = _arg3;
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
};
if (_local4 == 2){
inventory_.weapon3 = _arg3;
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
};
if (_local4 == 3){
inventory_.weapon4 = _arg3;
SoundManager.inst().play(SoundManager.CLICK_SHOP_INSERTVEAPON);
};
};
};
_local4++;
};
showItems();
}
public function showItems(){
var _local1:UIShopInventoryItem;
var _local2:CGunAbstract;
clearSlots();
if (inventory_ != null){
_local1 = new UIShopInventoryItem();
_local2 = inventory_.weapon1;
if (inventory_.haveThisWeapon(_local2)){
_local2 = inventory_.gimmeWeapon(_local2);
};
_local1.gun = _local2;
_local1.name = "UIShopInventoryItem";
mcSlot1_.addChild(_local1);
showAmmo(_local1.gun, mcSlot1_);
_local1 = new UIShopInventoryItem();
_local1.name = "UIShopInventoryItem";
_local1.gun = inventory_.weapon2;
mcSlot2_.addChild(_local1);
showAmmo(_local1.gun, mcSlot2_);
_local1 = new UIShopInventoryItem();
_local1.name = "UIShopInventoryItem";
_local1.gun = inventory_.weapon3;
mcSlot3_.addChild(_local1);
showAmmo(_local1.gun, mcSlot3_);
_local1 = new UIShopInventoryItem();
_local1.name = "UIShopInventoryItem";
_local1.gun = inventory_.weapon4;
mcSlot4_.addChild(_local1);
showAmmo(_local1.gun, mcSlot4_);
};
}
public function getItemByGun(_arg1:CGunAbstract){
var _local3:UIShopInventoryItem;
var _local2:int;
while (_local2 < slots.count) {
_local3 = getItemByIndex(_local2);
if (((!((_local3 == null))) && ((_local3.gun == _arg1)))){
return (_local3);
};
_local2++;
};
return (null);
}
public function get inventory():CInventory{
return (inventory_);
}
private function handleOver(_arg1:MouseEvent){
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
if ((_arg1.target is MovieClip)){
_local2 = (_arg1.target as MovieClip);
_local3 = getSlot(_arg1.target);
if (_local3 != null){
_local4 = new mc_item_overlay();
_local4.name = "overlay";
_local3.addChild(_local4);
_local3.removeEventListener(MouseEvent.MOUSE_OVER, handleOver, false);
_local3.addEventListener(MouseEvent.MOUSE_OUT, handleOut, false, 0, true);
};
};
}
public function getSlotByIndex(_arg1:int):MovieClip{
return (MovieClip(slots.getItem(_arg1)));
}
private function clearSlots(){
var _local1:MovieClip = (mcSlot1_.getChildByName("UIShopInventoryItem") as MovieClip);
if (_local1 != null){
mcSlot1_.removeChild(_local1);
};
_local1 = (mcSlot1_.getChildByName("UIShopInventoryItem") as MovieClip);
if (_local1 != null){
mcSlot2_.removeChild(_local1);
};
_local1 = (mcSlot1_.getChildByName("UIShopInventoryItem") as MovieClip);
if (_local1 != null){
mcSlot3_.removeChild(_local1);
};
_local1 = (mcSlot1_.getChildByName("UIShopInventoryItem") as MovieClip);
if (_local1 != null){
mcSlot4_.removeChild(_local1);
};
}
private function getSlotByCoords(_arg1:int, _arg2:int):MovieClip{
var _local4:MovieClip;
var _local3:int;
while (_local3 < slots.count) {
_local4 = getSlotByIndex(_local3);
if (_local4.hitTestPoint(_arg1, _arg2, false)){
return (_local4);
};
_local3++;
};
return (null);
}
private function showAmmo(_arg1:CGunAbstract, _arg2:MovieClip){
var _local4:AmmoCell;
var _local3:TextField = TextField(_arg2.getChildByName("i_tf_ammo"));
if (_local3 != null){
_local4 = inventory_.ammoStorage.getAmmoByName(_arg1.props.ammotype);
if (_local4 != null){
_local3.text = _local4.ammoCount.toString();
};
};
}
private function handleItemClick(_arg1:MouseEvent){
var _local2:MovieClip;
var _local3:UIShopInventoryItem;
var _local4:DisplayObject;
if (selectedItem != null){
CClipTools.removeFilters(selectedItem);
};
if ((_arg1.currentTarget is MovieClip)){
_local2 = (_arg1.currentTarget as MovieClip);
_local3 = UIShopInventoryItem(_local2.getChildByName("UIShopInventoryItem"));
if (_local3 != null){
CClipTools.addMcGlow(_local3, 0xF0F000);
selectedItem = _local3;
dispatchEvent(new Event(ON_ITEM_SELECT));
SoundManager.inst().play(SoundManager.CLICK_SHOP_BTN);
};
_local4 = (_arg1.target as DisplayObject);
if ((_local4.parent is UIShopInventoryItem)){
};
};
}
private function addOverlay(_arg1:MovieClip){
var _local2:MovieClip = new mc_item_overlay();
_local2.name = "overlay";
CClipTools.addMcGlow(_local2, 0xFF0000);
_arg1.addChild(_local2);
}
public function getItemByIndex(_arg1:int):UIShopInventoryItem{
var _local2:MovieClip = getSlotByIndex(_arg1);
var _local3:DisplayObject = _local2.getChildByName("UIShopInventoryItem");
return (UIShopInventoryItem(_local3));
}
private function getSlot(_arg1:Object):MovieClip{
var _local3:MovieClip;
var _local2:int;
while (_local2 < slots.count) {
_local3 = getSlotByIndex(_local2);
if (_local3 == _arg1){
return (_local3);
};
_local2++;
};
return (null);
}
public function dragOver(_arg1:int, _arg2:int){
var _local3:MovieClip = getSlotByCoords(_arg1, _arg2);
addOverlay(_local3);
removeOverlays(_local3);
}
public function set inventory(_arg1:CInventory){
inventory_ = _arg1;
}
private function removeOverlays(_arg1:MovieClip){
var _local3:MovieClip;
var _local4:DisplayObject;
var _local2:int;
while (_local2 < slots.count) {
_local3 = getSlotByIndex(_local2);
_local4 = _local3.getChildByName("overlay");
if (((!((_local3 == _arg1))) && (!((_local4 == null))))){
_local3.removeChild(_local4);
};
_local2++;
};
}
public function putItemToSlot(_arg1:int, _arg2:CGunAbstract){
var _local5:MovieClip;
if (getItemByGun(_arg2) != null){
return;
};
var _local3:UIShopInventoryItem = getItemByIndex(_arg1);
var _local4:MovieClip = getSlotByIndex(_arg1);
if (_local4 != null){
if (_local3 != null){
if (_local4.getChildByName(_local3.name) != null){
_local4.removeChild(_local3);
};
};
_local5 = MovieClip(_local4.getChildByName("UIShopInventoryItem"));
while (_local5 != null) {
_local4.removeChild(_local5);
_local5 = MovieClip(_local4.getChildByName("UIShopInventoryItem"));
};
_local3 = new UIShopInventoryItem();
_local3.name = "UIShopInventoryItem";
_local3.gun = _arg2;
_local4.addChild(_local3);
showAmmo(_arg2, _local4);
};
}
}
}//package shop
Section 99
//UIShopInventoryItem (shop.UIShopInventoryItem)
package shop {
import flash.display.*;
import gunz.*;
import flash.filters.*;
public class UIShopInventoryItem extends MovieClip {
var gun_:CGunAbstract;
public function UIShopInventoryItem(){
useHandCursor = true;
}
public function get gun():CGunAbstract{
return (gun_);
}
public function set gun(_arg1:CGunAbstract){
if (_arg1 == null){
gun_ = new CGunAbstract();
} else {
gun_ = _arg1;
drawGun();
};
}
private function drawGun(){
var _local1:Sprite;
var _local2:Sprite;
var _local3:int;
var _local4:int;
var _local5:GlowFilter;
if (gun_.props.guntype != CLocale.GUN_NULL){
_local1 = new gun_.props.imgclass();
_local1.useHandCursor = true;
addChild(_local1);
_local1.y = (_local1.y - 2);
_local2 = new gun_.props.ammoiconclass();
_local3 = _local1.x;
_local4 = ((_local1.y + _local1.height) + 4);
_local5 = new GlowFilter(0, 1, 2, 2, 5, 3);
_local2.filters = [_local5];
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
_local2.x = _local3;
_local2.y = _local4;
addChild(_local2);
};
}
}
}//package shop
Section 100
//UIUpgradeItem (shop.UIUpgradeItem)
package shop {
import flash.display.*;
import flash.events.*;
public class UIUpgradeItem extends EventDispatcher {
private var hitArea:MovieClip;
public var no:int;// = 0
public var owned:Boolean;// = false
public var movie:MovieClip;// = null
public var upgradeName:String;// = ""
public static const ON_SELECT:String = "ON_SELECT";
public function UIUpgradeItem(_arg1:int, _arg2:MovieClip){
no = _arg1;
movie = _arg2;
hitArea = (movie.getChildByName("i_mc_hitArea") as MovieClip);
hitArea.addEventListener(MouseEvent.CLICK, handleItemClick, false, 0, true);
}
private function handleItemClick(_arg1:MouseEvent){
dispatchEvent(new Event(ON_SELECT));
}
public function setStateSelected(){
CClipTools.removeFilters(movie);
CClipTools.addMcGlow(movie, 0xFFFF00);
}
public function setStateOwned(){
CClipTools.removeFilters(movie);
CClipTools.addMcGlow(movie, 0xFF00);
movie.mouseEnabled = false;
owned = true;
}
public function setStateAvaible(){
CClipTools.removeFilters(movie);
}
}
}//package shop
Section 101
//UIWeaponUpgrade (shop.UIWeaponUpgrade)
package shop {
import flash.display.*;
import gunz.*;
import character.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
public class UIWeaponUpgrade extends MovieClip {
private var gun:CGunAbstract;
private var upgradeItems:ObjectList;
var tfPrice:TextField;
var btnBuy:SimpleButton;
public var i_btn_buy:SimpleButton;
var selectedItem:UIUpgradeItem;// = null
public var i_tf_upgradeName:TextField;
var tfUpgradeInfo:TextField;
var tfWeaponName:TextField;
var btnExit:SimpleButton;
public var i_tf_weaponName:TextField;
private var inventory:CInventory;
public var i_tf_upgradePrice:TextField;
var mcWeaponImage:MovieClip;
private var filter_txt_heavystroke_nonav:GlowFilter;
private var filter_txt_heavystroke_avail:GlowFilter;
public var i_tf_upgradeInfo:TextField;
var tfUpgradeName:TextField;
public var i_mc_upgradeItems:MovieClip;
public var i_mc_weaponImg:MovieClip;
public var i_btn_exit:SimpleButton;
public static const ON_BUY_CLICK:String = "ON_BUY_CLICK";
public function UIWeaponUpgrade(_arg1:CGunAbstract, _arg2:CInventory){
filter_txt_heavystroke_nonav = new GlowFilter(0xFF0000, 1, 4, 4, 4, 3, false, false);
filter_txt_heavystroke_avail = new GlowFilter(14548957, 1, 6, 6, 4, 3, false, false);
upgradeItems = new ObjectList();
super();
inventory = _arg2;
gun = _arg1;
getInstances();
subscribeForEvents();
var _local3:Sprite = new gun.props.imgclass();
mcWeaponImage.addChild(_local3);
tfPrice.text = "";
btnBuy.visible = false;
tfUpgradeName.text = "";
tfUpgradeInfo.text = "";
tfUpgradeInfo.wordWrap = true;
build();
selectedItem = UIUpgradeItem(upgradeItems.getItem(0));
selectedItem.setStateSelected();
showSelectedItemInfo();
}
private function build(){
var _local2:UIUpgradeItem;
var _local1:int;
while (_local1 < gun.props.upgradesAllowed.length) {
_local2 = getUIUpgradeItemByNo(_local1);
if (_local2 != null){
if (gun.props.upgradesAllowed[_local1] == 0){
_local2.movie.visible = false;
} else {
_local2.movie.visible = true;
if (gun.props.UpgradesArr[_local1]){
_local2.setStateOwned();
} else {
_local2.setStateAvaible();
};
};
};
_local1++;
};
tfWeaponName.text = gun.props.name;
}
private function handleExitClick(_arg1:MouseEvent){
if (this.parent != null){
this.parent.removeChild(this);
};
}
private function handleItemSelect(_arg1:Event){
build();
selectedItem = UIUpgradeItem(_arg1.target);
selectedItem.setStateSelected();
showSelectedItemInfo();
}
private function handleBuyClick(_arg1:MouseEvent){
var _local2:int = int((gun.props.price / 5));
inventory.money = (inventory.money - _local2);
if (selectedItem != null){
switch (selectedItem.no){
case 0:
gun.props.upRange = true;
break;
case 1:
gun.props.upAccuracy = true;
break;
case 2:
gun.props.upDamage = true;
break;
case 3:
gun.props.upSpeed = true;
break;
case 4:
gun.props.upClip = true;
break;
case 5:
gun.props.upReload = true;
break;
};
build();
showSelectedItemInfo();
};
dispatchEvent(new Event(ON_BUY_CLICK));
}
private function showSelectedItemInfo(){
var filg:Array;
var price:int = int((gun.props.price / 5));
tfPrice.text = (price.toString() + " $");
tfUpgradeName.text = selectedItem.upgradeName;
try {
tfUpgradeInfo.text = CLocale.UPGRADES_DESCRIPTION[selectedItem.no];
} catch(e:Error) {
};
if (selectedItem.owned){
btnBuy.visible = false;
tfPrice.text = CLocale.UPGRADE_SHOP_OWNED;
} else {
filg = [];
tfPrice.filters = filg;
if (inventory.money >= price){
btnBuy.visible = true;
filg = [];
tfPrice.filters = filg;
} else {
btnBuy.visible = false;
filg = [filter_txt_heavystroke_nonav];
tfPrice.filters = filg;
};
};
}
private function getInstances(){
var _local1:MovieClip;
var _local2:UIUpgradeItem;
btnBuy = i_btn_buy;
btnExit = i_btn_exit;
tfWeaponName = i_tf_weaponName;
tfUpgradeName = i_tf_upgradeName;
tfUpgradeInfo = i_tf_upgradeInfo;
mcWeaponImage = i_mc_weaponImg;
tfPrice = i_tf_upgradePrice;
_local1 = i_mc_upgradeItems.i_mc_range;
_local2 = new UIUpgradeItem(0, _local1);
upgradeItems.add(_local2);
_local2.upgradeName = "RANGE";
_local1 = i_mc_upgradeItems.i_mc_accuracy;
_local2 = new UIUpgradeItem(1, _local1);
upgradeItems.add(_local2);
_local2.upgradeName = "ACCURACY";
_local1 = i_mc_upgradeItems.i_mc_power;
_local2 = new UIUpgradeItem(2, _local1);
upgradeItems.add(_local2);
_local2.upgradeName = "POWER";
_local1 = i_mc_upgradeItems.i_mc_speed;
_local2 = new UIUpgradeItem(3, _local1);
upgradeItems.add(_local2);
_local2.upgradeName = "SPEED";
_local1 = i_mc_upgradeItems.i_mc_extendCartridge;
_local2 = new UIUpgradeItem(4, _local1);
upgradeItems.add(_local2);
_local2.upgradeName = "EXTEND CARTRIDGE";
_local1 = i_mc_upgradeItems.i_mc_reloadSpeed;
_local2 = new UIUpgradeItem(5, _local1);
upgradeItems.add(_local2);
_local2.upgradeName = "RELOAD SPEED";
}
private function getUIUpgradeItemByNo(_arg1:int){
var _local3:UIUpgradeItem;
var _local2:int;
while (_local2 < upgradeItems.count) {
_local3 = UIUpgradeItem(upgradeItems.getItem(_local2));
if (_local3.no == _arg1){
return (_local3);
};
_local2++;
};
return (null);
}
private function subscribeForEvents(){
var _local2:UIUpgradeItem;
btnBuy.addEventListener(MouseEvent.CLICK, handleBuyClick, false, 0, true);
btnExit.addEventListener(MouseEvent.CLICK, handleExitClick, false, 0, true);
var _local1:int;
while (_local1 < upgradeItems.count) {
_local2 = UIUpgradeItem(upgradeItems.getItem(_local1));
_local2.addEventListener(UIUpgradeItem.ON_SELECT, handleItemSelect, false, 0, true);
_local1++;
};
}
}
}//package shop
Section 102
//introzombieHead_511 (TrueMadnessPre_fla.introzombieHead_511)
package TrueMadnessPre_fla {
import flash.display.*;
public dynamic class introzombieHead_511 extends MovieClip {
public function introzombieHead_511(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package TrueMadnessPre_fla
Section 103
//introzombieStateWalk_505 (TrueMadnessPre_fla.introzombieStateWalk_505)
package TrueMadnessPre_fla {
import flash.display.*;
public dynamic class introzombieStateWalk_505 extends MovieClip {
public var head:MovieClip;
public function introzombieStateWalk_505(){
addFrameScript(0, frame1);
}
function frame1(){
head.gotoAndStop("attack");
}
}
}//package TrueMadnessPre_fla
Section 104
//MC_assetPreloader_6 (TrueMadnessPre_fla.MC_assetPreloader_6)
package TrueMadnessPre_fla {
import flash.display.*;
public dynamic class MC_assetPreloader_6 extends MovieClip {
public function MC_assetPreloader_6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrueMadnessPre_fla
Section 105
//mc_music_authors_179 (TrueMadnessPre_fla.mc_music_authors_179)
package TrueMadnessPre_fla {
import flash.display.*;
public dynamic class mc_music_authors_179 extends MovieClip {
public function mc_music_authors_179(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package TrueMadnessPre_fla
Section 106
//sponsorSplashIntro_503 (TrueMadnessPre_fla.sponsorSplashIntro_503)
package TrueMadnessPre_fla {
import flash.display.*;
public dynamic class sponsorSplashIntro_503 extends MovieClip {
public function sponsorSplashIntro_503(){
addFrameScript(278, frame279);
}
function frame279(){
stop();
}
}
}//package TrueMadnessPre_fla
Section 107
//zombieBossTankBody_532 (TrueMadnessPre_fla.zombieBossTankBody_532)
package TrueMadnessPre_fla {
import flash.display.*;
public dynamic class zombieBossTankBody_532 extends MovieClip {
public function zombieBossTankBody_532(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TrueMadnessPre_fla
Section 108
//anim_drakon_levmusanim (anim_drakon_levmusanim)
package {
import animations.*;
public dynamic class anim_drakon_levmusanim extends LevelAnimDelayedAbs {
public function anim_drakon_levmusanim(){
addFrameScript(177, frame178);
}
function frame178(){
stop();
}
}
}//package
Section 109
//armM4B (armM4B)
package {
import flash.display.*;
public dynamic class armM4B extends MovieClip {
public function armM4B(){
addFrameScript(0, frame1, 2, frame3, 34, frame35);
}
function frame1(){
stop();
}
function frame3(){
gotoAndStop("idle");
}
function frame35(){
gotoAndStop("idle");
}
}
}//package
Section 110
//armOpenDoorB (armOpenDoorB)
package {
import flash.display.*;
public dynamic class armOpenDoorB extends MovieClip {
public function armOpenDoorB(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package
Section 111
//armOpenDoorF (armOpenDoorF)
package {
import flash.display.*;
public dynamic class armOpenDoorF extends MovieClip {
public function armOpenDoorF(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
gotoAndPlay(2);
}
function frame1(){
stop();
}
}
}//package
Section 112
//armSCARF (armSCARF)
package {
import flash.display.*;
public dynamic class armSCARF extends MovieClip {
public var magOut:MovieClip;
public var bulletOut:MovieClip;
public var shellOut:MovieClip;
public function armSCARF(){
addFrameScript(0, frame1, 2, frame3, 34, frame35);
}
function frame1(){
stop();
}
function frame3(){
gotoAndStop("idle");
}
function frame35(){
gotoAndStop("idle");
}
}
}//package
Section 113
//ArrowToMonster (ArrowToMonster)
package {
import flash.display.*;
public class ArrowToMonster extends MovieClip {
public function ArrowToMonster(){
alpha = 0.6;
}
public function aim(_arg1:Number, _arg2:Number){
var _local3:Number = (_arg1 - x);
var _local4:Number = (_arg2 - y);
var _local5:Number = Math.atan2(_local4, _local3);
rotation = ((_local5 * 180) / Math.PI);
if (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))) < 150){
visible = false;
} else {
visible = true;
};
}
}
}//package
Section 114
//blindsClip (blindsClip)
package {
import flash.display.*;
public dynamic class blindsClip extends MovieClip {
}
}//package
Section 115
//Bloodmc (Bloodmc)
package {
import flash.display.*;
public dynamic class Bloodmc extends MovieClip {
}
}//package
Section 116
//Bloodmc1 (Bloodmc1)
package {
import flash.display.*;
public dynamic class Bloodmc1 extends MovieClip {
}
}//package
Section 117
//Bloodmc2 (Bloodmc2)
package {
import flash.display.*;
public dynamic class Bloodmc2 extends MovieClip {
}
}//package
Section 118
//bmdbronek0 (bmdbronek0)
package {
import flash.display.*;
public dynamic class bmdbronek0 extends BitmapData {
public function bmdbronek0(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 119
//bmdbronek1 (bmdbronek1)
package {
import flash.display.*;
public dynamic class bmdbronek1 extends BitmapData {
public function bmdbronek1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 120
//bmdbronek2 (bmdbronek2)
package {
import flash.display.*;
public dynamic class bmdbronek2 extends BitmapData {
public function bmdbronek2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 121
//bmdbronek3 (bmdbronek3)
package {
import flash.display.*;
public dynamic class bmdbronek3 extends BitmapData {
public function bmdbronek3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 122
//btn_sceneSkip (btn_sceneSkip)
package {
import flash.display.*;
public dynamic class btn_sceneSkip extends SimpleButton {
}
}//package
Section 123
//btn_tutor_donot_show (btn_tutor_donot_show)
package {
import flash.display.*;
public dynamic class btn_tutor_donot_show extends SimpleButton {
}
}//package
Section 124
//btnHUD_exit (btnHUD_exit)
package {
import flash.display.*;
public dynamic class btnHUD_exit extends SimpleButton {
}
}//package
Section 125
//btnHUD_Pause (btnHUD_Pause)
package {
import flash.display.*;
public dynamic class btnHUD_Pause extends SimpleButton {
}
}//package
Section 126
//CClipTools (CClipTools)
package {
import flash.display.*;
import flash.filters.*;
public class CClipTools {
public static function desaturateClip(_arg1:DisplayObject, _arg2:Number=1){
var _local3:Array = [0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 33, 0];
var _local4:ColorMatrixFilter = new ColorMatrixFilter(_local3);
var _local5:Array = _arg1.filters;
_local5.unshift(_local4);
_arg1.filters = _local5;
}
public static function fullClearDisplayObject(_arg1:DisplayObjectContainer){
var _local2:DisplayObject;
while (_arg1.numChildren > 0) {
_local2 = _arg1.getChildAt(0);
if (_local2 != null){
_arg1.removeChild(_local2);
if ((_local2 is DisplayObjectContainer)){
fullClearDisplayObject((_local2 as DisplayObjectContainer));
};
};
};
}
public static function addMcGlow(_arg1:MovieClip, _arg2:uint=0xFFFF00){
var _local3:GlowFilter = new GlowFilter(_arg2, 1, 6, 6, 2, 3, false, false);
var _local4:Array = _arg1.filters;
_local4.unshift(_local3);
_arg1.filters = _local4;
}
public static function getBitmap(_arg1:DisplayObject):Bitmap{
var _local2:BitmapData = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local2.draw(_arg1);
var _local3:Bitmap = new Bitmap(_local2, "auto", true);
return (_local3);
}
public static function removeFilters(_arg1:DisplayObject){
_arg1.filters = null;
_arg1.filters = new Array();
}
public static function getBlurryBitmapSprite(_arg1:DisplayObject, _arg2:int=10, _arg3:int=1):Sprite{
var _local4:Sprite = new Sprite();
var _local5:Number = _arg1.width;
var _local6:Number = _arg1.height;
if (_arg1.width > 600){
_local5 = 600;
};
if (_arg1.height > 500){
_local6 = 500;
};
var _local7:BitmapData = new BitmapData(_local5, _local6, true, 0);
_local7.draw(_arg1);
var _local8:Bitmap = new Bitmap(_local7, "auto", true);
_local4.addChild(_local8);
var _local9:BlurFilter = new BlurFilter(_arg2, _arg2, _arg3);
_local4.filters = [_local9];
return (_local4);
}
public static function copyMovieBitmap(_arg1:MovieClip, _arg2:MovieClip){
var _local3:BitmapData = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local3.draw(_arg1);
var _local4:Bitmap = new Bitmap(_local3, "auto", true);
_arg2.addChild(_local4);
}
public static function clearDisplayContainer(_arg1:DisplayObjectContainer){
while (_arg1.numChildren > 0) {
_arg1.removeChildAt(0);
};
}
public static function getBitmapData(_arg1:DisplayObject):BitmapData{
var _local2:BitmapData = new BitmapData(_arg1.width, _arg1.height, true, 0);
_local2.draw(_arg1);
return (_local2);
}
}
}//package
Section 127
//CLocale (CLocale)
package {
public class CLocale {
public static const DIALOGUE_CHAT36 = ["I thought you'll never come back...", "Tss. Come on, I think I know how to get out of city. First - through the parking.", "It's almost dark already!", "Thanks, Captain. Move on!"];
public static const GUN_SHOTGUN_NAME:String = "Shotgun";
public static const STAGE_INTROS:Array = ["Looks like it's a bad district.", "More bastards.", "Ah! They hit you? \nWell, shoot 'em back!", "We Can't Stop Here! \nThis Is Bad Country!", "Strangers in the night. \nKeep eye on your ass!", "Kernel panic.", "What We Got Here \nIs a Failure to Communicate", "Weehooo! Run, Lola, run!", "Collective unconscious", "You see dead people, don't ya?", "Is it safe?", "Keep your friends close, \nbut your enemies closer.", "Assholes in the dark. \nI told ya, take Chuck's number..", "...a way of life based on one simple rule: Be kind.", "Well, Nobody's Perfect. Especially those guys in a park.", "Show me the monsters!", "Oops! Do we have to buy x-ray glasses?", "Now, do you want to be alone?", "First the hunt, then the revels!", "This could be the beginning of the ultimate contagium,\n the coming plague.", "Magic Mirror on the Wall, \nWho is the fairest one of all?", "The horror... the horror.", "Do you still remember your mantra?", "They ate your dog!", "How do you find your way back in the dark?", "May the Force Be With You", "This city is like a box of chocolates; \nyou never know what you're gonna get.", "Well, here's another nice mess \nyou've gotten into!", "If they move, kill 'em.", "Where did you get those wonderful toys?", "Check your guns. \nIt's going to be a bumpy night.", "We find the defendants incredibly guilty.", "You're like the freakin' town patrol, man!", "Look, they're really upset about this.", "When you have to shoot, \nshoot…don't talk.", "Hey, Zombies want your ass for dinner!", "Frankly, my dear. \nThey don't give a damn.", "We're still pretty freakin' far from okay.", "I love the smell of napalm in the morning...\nsmells like...victory.", "Life is dangerous. Get a helmet.", "Zombies don't read. They ain't hooked on phonics. \nSo give it a rest.", "To beat death, you've got to know death.", "You can consider yourself the luckiest man \non the face of the earth", "She needs to be killed. \nAnd by someone who knows how!", "Don't apologize - it's a sign of weakness.", "Et cetera, et cetera, \net cetera and so forth.", "They never drink... wine.", "After all, tomorrow is another day!", "What are you waiting for? Christmas?", "NO FATE.", "", "", "", "", "", "", ""];
public static const GUN_SHOTGUN_DESC:String = "Standart pump-action shotgun";
public static const GUN_BOZAR_NAME:String = "BUZZAR";
public static const GUN_BOZAR_DESC:String = "Kinda sniper-machinegun";
public static const GUN_TORNADO_NAME:String = "Tornado Grenades";
public static const ARM_LIGHT_NAME:String = "Leather Armor";
public static const DIALOGUE_CHAT40 = ["There are more and more of freaking zombies!", "You don't seems to be disappointed somewhy.", "I feel very brave together with you.", "Right. We're going back to museum, I'll clear the place, so we can stay there for night."];
public static const STATS_DESCRIPTION:Array = ["Higher strength allows you to carry heavy weapons without any problems and increases grenades throwing range.", "Your movement speed. Nice thing when action means life and staying means death.", "Determines your hitpoints - maximum of damage you can get before death.", "Allows faster reloads. Master of agility reloads his weapon twice faster than normally.", "This is for you if you like when your bullet goes exactly where you send it.", "Perception Master always sees enemy's weaknesses, so he always does maximum of damage.", "When you're lucky, you get more bonuses and more money dropped from monsters."];
public static const ARM_LIGHT_DESC:String = "Leather armor gives low protection, but enemies have a chance to miss you";
public static const UPGRADE_SHOP_OWNED:String = "Owned!";
public static const GUN_TORNADO_DESC:String = "Interesting fact: same weight - tripled power!";
public static const ARM_HEAVY_SCR:String = "Heavy";
public static const BULLETS_ENERGY_NAME:String = "Fission batteries";
public static const BULLETS_ENERGY_DESC:String = "High capacity energy cells for energy weapons - plasma, laser and electric guns";
public static const GUN_ZF1_NAME:String = "ZF-1";
public static const GUN_ZF1_DESC:String = "Why to use only one ammo? Burn, kill and blow up your enemies!";
public static const GUN_GAUSSPISTOL_NAME:String = "Gauss Pistol";
public static const GUN_GAUSSPISTOL_DESC:String = "Extreme range and power! Bullets penetrate through bodies!";
public static const GUN_MINIGUN_NAME:String = "Minigun";
public static const GUN_MINIGUN_DESC:String = "Classic 6-barrel mimigun for tough guys";
public static const SHOP_CAP_AMMO:String = "BUY AMMO";
public static const GUN_ACID_NAME:String = "Acid gun";
public static const BN_NARCO_NAME:String = "Speeeeeeeeeed!";
public static const GUN_ACID_DESC:String = "Reassembled toy. Looks like a toy. Hurts like a hell!";
public static const BN_NARCO_DESC:String = "Allows you to move faster. For some time. Take care.";
public static const BN_BUCKS_NAME:String = "Bucks";
public static const GUN_PLASMAGUN_NAME:String = "Plasmagun";
public static const SHOP_CAP_PRIMARY:String = "SET PRIMARY";
public static const BULLETS_STANDART_NAME:String = "Standard bullets";
public static const GUN_PLASMAGUN_DESC:String = "Doomed thing. Forbidden in many countries";
public static const GUN_FN90_DESC:String = "Mighty and fast gun with 50 bullets in the cartridge";
public static const NO_AMMO:String = "OUT OF AMMO!";
public static const BULLETS_STANDART_DESC:String = "Ammo for any kind of sub-machine guns and rifles";
public static const BN_BUCKS_DESC:String = "That's money, dude!";
public static const GUN_SOSHOTGUN_NAME:String = "Sawed-off Shotgun";
public static const GUN_FLAMER_DESC:String = "Make your enemies burn!";
public static const GUN_PANCOR_NAME:String = "Pancor Jackhammer";
public static const GUN_FN90_NAME:String = "FN P90";
public static const GUN_SOSHOTGUN_DESC:String = "Sawed barrel is very effective on short distance, but accuracy just sucks";
public static const GUN_PANCOR_DESC:String = "Well... just try it";
public static const GUN_HFLAMER_NAME:String = "Hell Flamer";
public static const GUN_DEAGLE_NAME:String = "Desert Eagle";
public static const GUN_HFLAMER_DESC:String = "Gun for real pyromaniacs";
public static const GUN_DEAGLE_DESC:String = "Legendary Magnum pistol - exceptional power, quality and range";
public static const DIALOGUE_CHAT1 = ["Hello there.", "Nice hair, but you have to take care about your haircut. Weather is just not good.", "I can handle it.", "Of course you can. Pity, I came little early to see that.", "Wow, not only brave, but smartass. I like it.", "Come on, it's better to get your nice ass outta here.", "Weather gonna be worse, huh?", "Yeah, you got it, baby."];
public static const DIALOGUE_CHAT2 = ["You IDIOT!", "Yep, you're right, little asshole. I am. I protected alien for all this time.", "You! You screw everything!", "Hah, that's the nice news, really. Firstly for a long, long time.", "You don't understand, pity worm, you just CAN'T understand...", "So tell me!", "You can't kill me. You can't kill US! We. Will. Be. Back!", "Sure. Welcome anytime. I'll wait for you with my little six metal friends in my pocket."];
public static const HEAVY_WEAPON:String = "HEAVY WEAPON!";
public static const GAME_NAME:String = "BloodField";
public static const GUN_FLAMER_NAME:String = "Flamer";
public static const GUN_STINGER_NAME:String = "Stinger Rockets";
public static const GUN_RAIL_DESC:String = "Very fast and effective like electric chairs. EXPLODES when meets the body!";
public static const GUN_STINGER_DESC:String = "Why to aim?";
public static const GUN_M72_DESC:String = "Legendary perfect weapon. One shot - many corpses";
public static const SAVED_GAME:String = "You have saved your game progress already! If you start new game now, all progress will be lost. Would you like to start new game?";
public static const BN_BUCKS_SCR:String = "$";
public static const GUN_RAIL_NAME:String = "Rail-Lightning gun";
public static const GUN_M72_NAME:String = "M72 Gauss Rifle";
public static const STATS_ID:Array = [];
public static const ARM_LIGHT_SCR:String = "Leather";
public static const SHOP_CAP_PROJECTILE:String = "SET PROJECTILE";
public static const BN_FULLMEDI_NAME:String = "Extra Medikit";
public static const ARM_HEAVY_DESC:String = "Heavy composite armor provides good protection level, but it's heavy - so your speed goes down";
public static const GUN_KNIVES_NAME:String = "Throwing Knives";
public static const BN_FULLMEDI_DESC:String = "Full resurrection!";
public static const GUN_KNIVES_DESC:String = "Well-balanced steel knives";
public static const ARM_HEAVY_NAME:String = "Heavy Armor";
public static const GUN_LMINI_NAME:String = "Laser Minigun";
public static const GUN_LMINI_DESC:String = "Ultimate laser-beam weapon";
public static const GUN_ROCKETL_NAME:String = "Rocket Launcher";
public static const BULLETS_SHOTGUN_NAME:String = "Shotgun shells";
public static const GUN_ROCKETL_DESC:String = "Much funnier than fireworks!";
public static const BULLETS_SHOTGUN_DESC:String = "Ammo for any kind of shotgun";
public static const LEVEL_FAIL_MSG:String = "You've been fucked up.
PRESS "SPACE" TO CONTINUE.";
public static const GUN_SNIPER_NAME:String = "Sniper Rifle";
public static const BN_MEDI_DESC:String = "Healing some damage";
public static const BN_MEDI_NAME:String = "Standart Medikit";
public static const GUN_SNIPER_DESC:String = "Perfect range. High-damage FMJ bullets. Very effective on long distances";
public static const GUN_COMBATSG_NAME:String = "Combat Shotgun";
public static const GUN_NULL:String = "no gun";
public static const GUN_COMBATSG_DESC:String = "Extended range automatic shotgun";
public static const BN_NARCO_SCR:String = "Speeeed!";
public static const GUN_MAGNUM_NAME:String = "Magnum Revolver";
public static const GUN_MAGNUM_DESC:String = "Classic gun, not very accurate";
public static const BULLETS_ROCKET_NAME:String = "Universal rockets";
public static const BULLETS_ROCKET_DESC:String = "Rockets for rocket launchers";
public static const GUN_MOLOTOV_NAME:String = "Molotov Cocktail";
public static const LEVEL_FAIL_TIOLKA_MSG:String = "She is dead, man... She is dead.
PRESS "SPACE" TO CONTINUE.";
public static const GUN_MOLOTOV_DESC:String = "Nice method of spirit bottles re-use. Really burns!";
public static const BN_MEDI_SCR:String = "Medikit";
public static const UPGRADES_DESCRIPTION:Array = ["Range upgrade: no escapers anymore!", "Accuracy upgrade: hit enemy in his eye!", "Damage upgrade: blow 'em up!", "Shooting speed upgrade: more shoots per second!", "Clip capacity upgrade: tired of reloading? Get bigger clip!", "Reload speed upgrade: brand-new handy reload mechanism!"];
public static const BULLETS_FLAMER_NAME:String = "Flamer fuel";
public static const BULLETS_FLAMER_DESC:String = "Fuel with extremely high burning temperature";
public static const SHOP_CAP_SECONDARY:String = "SET SECONDARY";
public static const GUN_TOMMYPLASMA_NAME:String = "Tommy Plasma";
public static const SHOP_CAP_PISTOL:String = "SET PISTOL";
public static const GUN_LASERRIFLE_NAME:String = "Laser Rifle";
public static const GUN_TOMMYPLASMA_DESC:String = "Light plasma-cell weapon designed in honor of old good Tommy Gun";
public static const BULLETS_MACHINE_NAME:String = "Machinegun Chain";
public static const BULLETS_MACHINE_DESC:String = "Bullets loaded in high-density chains for fast-speed machine guns";
public static const GUN_LASERRIFLE_DESC:String = "Light assault automatic-laser weapon. Actually faster and more accurate than classic rifle";
public static const LEVEL_DONE_MSG:String = "Level clear.
PRESS "SPACE" TO CONTINUE.";
public static const STATS_NAMES:Array = ["Strength", "Speed", "Endurance", "Agility", "Accuracy", "Perception", "Luck"];
public static const GUN_ASSAULT_NAME:String = "Assault Rifle";
public static const BN_FULLMEDI_SCR:String = "100% health";
public static const GUN_ASSAULT_DESC:String = "Mid-range automatic rifle with good penetration and accuracy capabilities";
public static const GUN_DUALBERETTA_NAME:String = "Dual Beretta";
public static const GUN_GRENADE_NAME:String = "Grenades";
public static const DIALOGUE_CHAT11 = ["I'm scared...", "Alright, come on, hold closer to me.", "Ok..", "And watch my back!", "With pleasure!", "Let's go."];
public static const DIALOGUE_CHAT12 = ["You were great!", "Yeah, yeah, yeah. We have to move on!", "Tsss. Listen! They're coming!", "Find a place and hide. Wait for me there."];
public static const GUN_GRENADE_DESC:String = "Don't forget to pull the ring out";
public static const DIALOGUE_CHAT17 = ["You're back!", "We need to go through the park, it's too dangerous to stay in museum."];
public static const GUN_DUALBERETTA_DESC:String = "Two Beretta pistols, shoot two bullets instead of one!";
public static const STAGE_NUMBERS:Array = ["Episode 1. Stage 1.", "Episode 1. Stage 2.", "Episode 1. Stage 3.", "Episode 1. Stage 4.", "Episode 1. Stage 5.", "Episode 1. Stage 6.", "Episode 1. Stage 7.", "Episode 1. Stage 8.", "Episode 1. Stage 9.", "Episode 1. Stage 10.", "Episode 2. Stage 1.", "Episode 2. Stage 2.", "Episode 2. Stage 3.", "Episode 2. Stage 4.", "Episode 2. Stage 5.", "Episode 2. Stage 6.", "Episode 2. Stage 7.", "Episode 2. Stage 8.", "Episode 2. Stage 9.", "Episode 2. Stage 10.", "Episode 3. Stage 1.", "Episode 3. Stage 2.", "Episode 3. Stage 3.", "Episode 3. Stage 4.", "Episode 3. Stage 5.", "Episode 3. Stage 6.", "Episode 3. Stage 7.", "Episode 3. Stage 8.", "Episode 3. Stage 9.", "Episode 3. Stage 10.", "Episode 4. Stage 1.", "Episode 4. Stage 2.", "Episode 4. Stage 3.", "Episode 4. Stage 4.", "Episode 4. Stage 5.", "Episode 4. Stage 6.", "Episode 4. Stage 7.", "Episode 4. Stage 8.", "Episode 4. Stage 9.", "Episode 4. Stage 10.", "Episode 5. Stage 1.", "Episode 5. Stage 2.", "Episode 5. Stage 3.", "Episode 5. Stage 4.", "Episode 5. Stage 5.", "Episode 5. Stage 6.", "Episode 5. Stage 7.", "Episode 5. Stage 8.", "Episode 5. Stage 9.", "Episode 5. Stage 10."];
public static const ARM_MED_NAME:String = "Kevlar Armor";
public static const DIALOGUE_CHAT27 = ["Hey!..", "I told you to wait!", "They found me! I barely escaped!", "Sure. ", "We need to find the way to escape from the city.", "This is exactly what I'm doing here, so don't interfere me!", "I'll be careful. And i like to watch your back though!", "Try to stay alive also!"];
public static const GUN_UZI_NAME:String = "Uzi";
public static const ARM_MED_DESC:String = "Kevlar-metal plates armor. Low weight, acceptable protection";
public static const GUN_UZI_DESC:String = "Compact, boxy, and lightweight submachine gun";
public static const ARM_MED_SCR:String = "Composed";
public static const GUN_MP5_NAME:String = "H&K MP5";
public static const GUN_GRENADELAU_NAME:String = "Grenade launcher";
public static const GUN_MP5_DESC:String = "Compact, accurate and the fastest submachine gun";
public static const GUN_GRENADELAU_DESC:String = "Standard grenade launcher. Much faster than your hands!";
}
}//package
Section 128
//CObjectAbstract (CObjectAbstract)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public dynamic class CObjectAbstract extends MovieClip {
protected const divPI:Number = 57.2957795130823;
protected const PIdiv:Number = 0.0174532925199433;
protected const PI:Number = 3.14159265358979;
protected const PIdiv2:Number = 1.5707963267949;
protected var img:MovieClip;
protected var _maxX:Number;// = 600
protected var _maxY:Number;// = 500
public var sqx:int;// = 0
protected var removed:Boolean;// = false
public var sqy:int;// = 0
protected var _minX:Number;// = 0
protected var _minY:Number;// = 0
public function CObjectAbstract(... _args){
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage, false, 0, true);
}
protected function checkout(){
if ((((((((x > 800)) || ((x < 0)))) || ((y > 700)))) || ((y < 0)))){
removeme();
};
}
protected function removeme(){
var _local1:*;
if (!removed){
removeEventListener(Event.ENTER_FRAME, onAction);
_local1 = this.parent;
_local1.removeChild(this);
removed = true;
};
}
public function comsquare(){
sqx = (x >> 5);
sqy = (y >> 5);
}
public function onAction(_arg1:Event){
}
public function pause(){
removeEventListener(Event.ENTER_FRAME, onAction);
}
private function handleRemovedFromStage(_arg1:Event){
removeEventListener(Event.ENTER_FRAME, onAction);
removeEventListener(Event.REMOVED, handleRemovedFromStage);
}
public function unpause(){
addEventListener(Event.ENTER_FRAME, onAction);
}
}
}//package
Section 129
//Complex (Complex)
package {
import flash.text.*;
public dynamic class Complex extends Font {
}
}//package
Section 130
//danger_tramvay (danger_tramvay)
package {
import animations.*;
public dynamic class danger_tramvay extends LevelAnimDelayedDangerAbs {
}
}//package
Section 131
//EndLevelScreen (EndLevelScreen)
package {
import flash.display.*;
import gs.*;
import flash.text.*;
public class EndLevelScreen extends MovieClip {
public var i_tf_levelNum:TextField;
public var i_tf_shots:TextField;
private var bucksTotalTF:TextField;
public var i_tf_killsTotal:TextField;
public var i_exitBtn:SimpleButton;
public var i_tf_acc:TextField;
public var i_tf_kps:TextField;
private var bucksTF:TextField;
public var i_tf_buks:TextField;
public var i_tf_spkAv:TextField;
private var levelNrTF:TextField;
public var i_tf_kpsAv:TextField;
public var i_tf_kills:TextField;
public var i_tf_accAv:TextField;
public var i_tf_shotsTotal:TextField;
private var totalStatisticTFa:Array;
public var i_bkls:MovieClip;
public var btnClose:SimpleButton;
public var i_tf_bukstotal:TextField;
public var i_tf_spk:TextField;
private var currentStatisticTFa:Array;
public function EndLevelScreen(){
btnClose = (i_exitBtn as SimpleButton);
levelNrTF = i_tf_levelNum;
bucksTF = i_tf_buks;
bucksTotalTF = i_tf_bukstotal;
currentStatisticTFa = [i_tf_kills, i_tf_shots, i_tf_spk, i_tf_kps, i_tf_acc];
totalStatisticTFa = [i_tf_killsTotal, i_tf_shotsTotal, i_tf_spkAv, i_tf_kpsAv, i_tf_accAv];
TweenLite.from(this, 0.8, {alpha:0.1});
}
public function setStats(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean=true){
var _local7:Array;
if (_arg6){
_local7 = currentStatisticTFa;
} else {
_local7 = totalStatisticTFa;
};
TextField(_local7[0]).text = _arg1.toString();
TextField(_local7[1]).text = _arg2.toString();
TextField(_local7[2]).text = _arg3.toString();
TextField(_local7[3]).text = _arg4.toString();
TextField(_local7[4]).text = (_arg5.toString() + "%");
}
public function setLevelNr(_arg1:int){
levelNrTF.text = _arg1.toString();
}
public function setBuks(_arg1:int, _arg2:int){
bucksTF.text = ("+ $" + _arg1.toString());
bucksTotalTF.text = ("$" + _arg2.toString());
}
}
}//package
Section 132
//handGunHitBody (handGunHitBody)
package {
import flash.media.*;
public dynamic class handGunHitBody extends Sound {
}
}//package
Section 133
//IntersiderealQuest (IntersiderealQuest)
package {
import flash.text.*;
public dynamic class IntersiderealQuest extends Font {
}
}//package
Section 134
//l_3_anim_dog (l_3_anim_dog)
package {
import animations.*;
public dynamic class l_3_anim_dog extends LevelAnimDelayedAbs {
public function l_3_anim_dog(){
addFrameScript(247, frame248);
}
function frame248(){
stop();
}
}
}//package
Section 135
//lev_4_anumluk_anim (lev_4_anumluk_anim)
package {
import animations.*;
public dynamic class lev_4_anumluk_anim extends LevelAnimDelayedAbs {
public function lev_4_anumluk_anim(){
addFrameScript(188, frame189);
}
function frame189(){
stop();
}
}
}//package
Section 136
//lev_anim_anim_dog (lev_anim_anim_dog)
package {
import animations.*;
public dynamic class lev_anim_anim_dog extends LevelAnimDelayedAbs {
public function lev_anim_anim_dog(){
addFrameScript(292, frame293);
}
function frame293(){
stop();
}
}
}//package
Section 137
//lev_anim_anim_dog2 (lev_anim_anim_dog2)
package {
import animations.*;
public dynamic class lev_anim_anim_dog2 extends LevelAnimDelayedAbs {
public function lev_anim_anim_dog2(){
addFrameScript(335, frame336);
}
function frame336(){
stop();
}
}
}//package
Section 138
//LevelSource_Museum (LevelSource_Museum)
package {
import flash.display.*;
public dynamic class LevelSource_Museum extends MovieClip {
public var citata:MovieClip;
public var i_level_animations:MovieClip;
public var background:MovieClip;
public var overlay:MovieClip;
public var shadow:MovieClip;
public var spawns:MovieClip;
}
}//package
Section 139
//LevelSource_Park (LevelSource_Park)
package {
import flash.display.*;
public dynamic class LevelSource_Park extends MovieClip {
public var citata:MovieClip;
public var i_level_animations:MovieClip;
public var background:MovieClip;
public var overlay:MovieClip;
public var buses:MovieClip;
public var shadow:MovieClip;
public var spawns:MovieClip;
}
}//package
Section 140
//LevelSource_Parking (LevelSource_Parking)
package {
import flash.display.*;
public dynamic class LevelSource_Parking extends MovieClip {
public var citata:MovieClip;
public var i_level_animations:MovieClip;
public var shadow:MovieClip;
public var buses:MovieClip;
public var overlay:MovieClip;
public var background:MovieClip;
public var i_anim_danger:MovieClip;
public var spawns:MovieClip;
}
}//package
Section 141
//LevelSource_Street (LevelSource_Street)
package {
import flash.display.*;
public dynamic class LevelSource_Street extends MovieClip {
public var citata:MovieClip;
public var i_level_animations:MovieClip;
public var shadow:MovieClip;
public var buses:MovieClip;
public var overlay:MovieClip;
public var background:MovieClip;
public var i_anim_danger:MovieClip;
public var spawns:MovieClip;
}
}//package
Section 142
//LevelSource_Yard (LevelSource_Yard)
package {
import flash.display.*;
public dynamic class LevelSource_Yard extends MovieClip {
public var citata:MovieClip;
public var i_level_animations:MovieClip;
public var background:MovieClip;
public var overlay:MovieClip;
public var buses:MovieClip;
public var shadow:MovieClip;
public var spawns:MovieClip;
}
}//package
Section 143
//LooseScreenAbs (LooseScreenAbs)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
public class LooseScreenAbs extends MovieClip {
public var i_btn_mainMenu:SimpleButton;
private var _btnMainMenu:SimpleButton;
private var _btnTryAgain:SimpleButton;
public var i_btn_tryAgain:SimpleButton;
public static const EVT_MENU:String = "evt quit to menu";
public static const EVT_AGAIN:String = "evt try again";
public function LooseScreenAbs(){
_btnTryAgain = (i_btn_tryAgain as SimpleButton);
_btnMainMenu = (i_btn_mainMenu as SimpleButton);
_btnMainMenu.addEventListener(MouseEvent.CLICK, handleMenu);
_btnTryAgain.addEventListener(MouseEvent.CLICK, handleAgain);
TweenLite.from(this, 0.8, {alpha:0.1});
}
private function handleMenu(_arg1:MouseEvent){
_btnMainMenu.removeEventListener(MouseEvent.CLICK, handleMenu);
_btnMainMenu.removeEventListener(MouseEvent.CLICK, handleAgain);
dispatchEvent(new Event(EVT_MENU));
}
private function handleAgain(_arg1:MouseEvent){
_btnMainMenu.removeEventListener(MouseEvent.CLICK, handleMenu);
_btnMainMenu.removeEventListener(MouseEvent.CLICK, handleAgain);
dispatchEvent(new Event(EVT_AGAIN));
}
}
}//package
Section 144
//magM4 (magM4)
package {
import flash.display.*;
public dynamic class magM4 extends MovieClip {
}
}//package
Section 145
//mc_bonus_txt (mc_bonus_txt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mc_bonus_txt extends MovieClip {
public var i_txt:TextField;
}
}//package
Section 146
//mc_charPortrait1 (mc_charPortrait1)
package {
import flash.display.*;
public dynamic class mc_charPortrait1 extends MovieClip {
}
}//package
Section 147
//mc_charPortrait2 (mc_charPortrait2)
package {
import flash.display.*;
public dynamic class mc_charPortrait2 extends MovieClip {
}
}//package
Section 148
//mc_charPortrait3 (mc_charPortrait3)
package {
import flash.display.*;
public dynamic class mc_charPortrait3 extends MovieClip {
}
}//package
Section 149
//mc_charPortrait4 (mc_charPortrait4)
package {
import flash.display.*;
public dynamic class mc_charPortrait4 extends MovieClip {
}
}//package
Section 150
//mc_charPortrait5 (mc_charPortrait5)
package {
import flash.display.*;
public dynamic class mc_charPortrait5 extends MovieClip {
}
}//package
Section 151
//mc_charPortrait6 (mc_charPortrait6)
package {
import flash.display.*;
public dynamic class mc_charPortrait6 extends MovieClip {
}
}//package
Section 152
//mc_charPortraitTiolka (mc_charPortraitTiolka)
package {
import flash.display.*;
public dynamic class mc_charPortraitTiolka extends MovieClip {
}
}//package
Section 153
//mc_charPortraitZvir (mc_charPortraitZvir)
package {
import flash.display.*;
public dynamic class mc_charPortraitZvir extends MovieClip {
}
}//package
Section 154
//mc_girlDie (mc_girlDie)
package {
public dynamic class mc_girlDie extends LooseScreenAbs {
}
}//package
Section 155
//mc_item_overlay (mc_item_overlay)
package {
import flash.display.*;
public dynamic class mc_item_overlay extends MovieClip {
}
}//package
Section 156
//mc_Kicked_clip (mc_Kicked_clip)
package {
import flash.display.*;
public dynamic class mc_Kicked_clip extends MovieClip {
public function mc_Kicked_clip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 157
//mc_level_txt (mc_level_txt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class mc_level_txt extends MovieClip {
public var i_txt:TextField;
}
}//package
Section 158
//mc_manDie (mc_manDie)
package {
public dynamic class mc_manDie extends LooseScreenAbs {
}
}//package
Section 159
//mc_Movie_Scene_1 (mc_Movie_Scene_1)
package {
public dynamic class mc_Movie_Scene_1 extends MovieSceneAbstract {
public function mc_Movie_Scene_1(){
addFrameScript(870, frame871);
}
function frame871(){
stop();
}
}
}//package
Section 160
//mc_Movie_Scene_2 (mc_Movie_Scene_2)
package {
public dynamic class mc_Movie_Scene_2 extends MovieSceneAbstract {
public function mc_Movie_Scene_2(){
addFrameScript(1027, frame1028);
}
function frame1028(){
stop();
}
}
}//package
Section 161
//mc_Movie_Scene_3 (mc_Movie_Scene_3)
package {
public dynamic class mc_Movie_Scene_3 extends MovieSceneAbstract {
public function mc_Movie_Scene_3(){
addFrameScript(961, frame962);
}
function frame962(){
stop();
}
}
}//package
Section 162
//mc_Movie_Scene_4 (mc_Movie_Scene_4)
package {
public dynamic class mc_Movie_Scene_4 extends MovieSceneAbstract {
public function mc_Movie_Scene_4(){
addFrameScript(279, frame280);
}
function frame280(){
stop();
}
}
}//package
Section 163
//mc_portrait_opponent (mc_portrait_opponent)
package {
import flash.display.*;
public dynamic class mc_portrait_opponent extends MovieClip {
}
}//package
Section 164
//mc_portrait_player (mc_portrait_player)
package {
import flash.display.*;
public dynamic class mc_portrait_player extends MovieClip {
}
}//package
Section 165
//mc_sceneBlackBg (mc_sceneBlackBg)
package {
import flash.display.*;
public dynamic class mc_sceneBlackBg extends MovieClip {
}
}//package
Section 166
//mc_theEnd_screen (mc_theEnd_screen)
package {
import flash.display.*;
public dynamic class mc_theEnd_screen extends MovieClip {
}
}//package
Section 167
//mc_tutor_lev_1 (mc_tutor_lev_1)
package {
import flash.display.*;
public dynamic class mc_tutor_lev_1 extends MovieClip {
}
}//package
Section 168
//mc_tutor_lev_2 (mc_tutor_lev_2)
package {
import flash.display.*;
public dynamic class mc_tutor_lev_2 extends MovieClip {
}
}//package
Section 169
//mc_tutor_lev_3 (mc_tutor_lev_3)
package {
import flash.display.*;
public dynamic class mc_tutor_lev_3 extends MovieClip {
}
}//package
Section 170
//mc_tutor_lev_anomalies (mc_tutor_lev_anomalies)
package {
import flash.display.*;
public dynamic class mc_tutor_lev_anomalies extends MovieClip {
}
}//package
Section 171
//mc_tutor_lev_autobus (mc_tutor_lev_autobus)
package {
import flash.display.*;
public dynamic class mc_tutor_lev_autobus extends MovieClip {
}
}//package
Section 172
//mc_tutor_lev_girl (mc_tutor_lev_girl)
package {
import flash.display.*;
public dynamic class mc_tutor_lev_girl extends MovieClip {
}
}//package
Section 173
//mc_tutor_shop_1 (mc_tutor_shop_1)
package {
import flash.display.*;
public dynamic class mc_tutor_shop_1 extends MovieClip {
}
}//package
Section 174
//mc_tutor_shop_2 (mc_tutor_shop_2)
package {
import flash.display.*;
public dynamic class mc_tutor_shop_2 extends MovieClip {
}
}//package
Section 175
//mc_tutor_shop_upgradePointsAwailable (mc_tutor_shop_upgradePointsAwailable)
package {
import flash.display.*;
public dynamic class mc_tutor_shop_upgradePointsAwailable extends MovieClip {
}
}//package
Section 176
//mc_tutor_shop_useslot (mc_tutor_shop_useslot)
package {
import flash.display.*;
public dynamic class mc_tutor_shop_useslot extends MovieClip {
}
}//package
Section 177
//mc_wrong (mc_wrong)
package {
import flash.display.*;
public dynamic class mc_wrong extends MovieClip {
}
}//package
Section 178
//mcAmmoIcon_Battery (mcAmmoIcon_Battery)
package {
import flash.display.*;
public dynamic class mcAmmoIcon_Battery extends MovieClip {
}
}//package
Section 179
//mcAmmoIcon_Chain (mcAmmoIcon_Chain)
package {
import flash.display.*;
public dynamic class mcAmmoIcon_Chain extends MovieClip {
}
}//package
Section 180
//mcAmmoIcon_Fuel (mcAmmoIcon_Fuel)
package {
import flash.display.*;
public dynamic class mcAmmoIcon_Fuel extends MovieClip {
}
}//package
Section 181
//mcAmmoIcon_Rocket (mcAmmoIcon_Rocket)
package {
import flash.display.*;
public dynamic class mcAmmoIcon_Rocket extends MovieClip {
}
}//package
Section 182
//mcAmmoIcon_Shells (mcAmmoIcon_Shells)
package {
import flash.display.*;
public dynamic class mcAmmoIcon_Shells extends MovieClip {
}
}//package
Section 183
//mcAmmoIcon_Standart (mcAmmoIcon_Standart)
package {
import flash.display.*;
public dynamic class mcAmmoIcon_Standart extends MovieClip {
}
}//package
Section 184
//mcArmorHeavy (mcArmorHeavy)
package {
import flash.display.*;
public dynamic class mcArmorHeavy extends MovieClip {
}
}//package
Section 185
//mcArmorLight (mcArmorLight)
package {
import flash.display.*;
public dynamic class mcArmorLight extends MovieClip {
}
}//package
Section 186
//mcArmorLine (mcArmorLine)
package {
import flash.display.*;
public dynamic class mcArmorLine extends MovieClip {
}
}//package
Section 187
//mcArmorMedium (mcArmorMedium)
package {
import flash.display.*;
public dynamic class mcArmorMedium extends MovieClip {
}
}//package
Section 188
//mcArmorNONE (mcArmorNONE)
package {
import flash.display.*;
public dynamic class mcArmorNONE extends MovieClip {
}
}//package
Section 189
//mcAshes (mcAshes)
package {
import flash.display.*;
public dynamic class mcAshes extends MovieClip {
}
}//package
Section 190
//mcBonuBsucks (mcBonuBsucks)
package {
import flash.display.*;
public dynamic class mcBonuBsucks extends MovieClip {
}
}//package
Section 191
//mcBonusShine (mcBonusShine)
package {
import flash.display.*;
public dynamic class mcBonusShine extends MovieClip {
}
}//package
Section 192
//mcBullet1Bullet (mcBullet1Bullet)
package {
import flash.display.*;
public dynamic class mcBullet1Bullet extends MovieClip {
}
}//package
Section 193
//mcBullet2Plasma (mcBullet2Plasma)
package {
import flash.display.*;
public dynamic class mcBullet2Plasma extends MovieClip {
}
}//package
Section 194
//mcBullet3Laser (mcBullet3Laser)
package {
import flash.display.*;
public dynamic class mcBullet3Laser extends MovieClip {
}
}//package
Section 195
//mcBullet4Flamer (mcBullet4Flamer)
package {
import flash.display.*;
public dynamic class mcBullet4Flamer extends MovieClip {
}
}//package
Section 196
//mcBullet5Electric (mcBullet5Electric)
package {
import flash.display.*;
public dynamic class mcBullet5Electric extends MovieClip {
}
}//package
Section 197
//mcBulletBottle (mcBulletBottle)
package {
import flash.display.*;
public dynamic class mcBulletBottle extends MovieClip {
}
}//package
Section 198
//mcBulletElectroSplash (mcBulletElectroSplash)
package {
import flash.display.*;
public dynamic class mcBulletElectroSplash extends MovieClip {
}
}//package
Section 199
//mcBulletGrenade (mcBulletGrenade)
package {
import flash.display.*;
public dynamic class mcBulletGrenade extends MovieClip {
}
}//package
Section 200
//mcBulletKnife (mcBulletKnife)
package {
import flash.display.*;
public dynamic class mcBulletKnife extends MovieClip {
}
}//package
Section 201
//mcBulletRocket (mcBulletRocket)
package {
import flash.display.*;
public dynamic class mcBulletRocket extends MovieClip {
}
}//package
Section 202
//mcBulletSplashPlasma (mcBulletSplashPlasma)
package {
import flash.display.*;
public dynamic class mcBulletSplashPlasma extends MovieClip {
}
}//package
Section 203
//mcChar_weaponShot (mcChar_weaponShot)
package {
import flash.display.*;
public dynamic class mcChar_weaponShot extends MovieClip {
}
}//package
Section 204
//mcChar_weaponShot_DualPistol (mcChar_weaponShot_DualPistol)
package {
import flash.display.*;
public dynamic class mcChar_weaponShot_DualPistol extends MovieClip {
}
}//package
Section 205
//mcCharFeet (mcCharFeet)
package {
import flash.display.*;
public dynamic class mcCharFeet extends MovieClip {
}
}//package
Section 206
//mcCorpse_m1_1 (mcCorpse_m1_1)
package {
import flash.display.*;
public dynamic class mcCorpse_m1_1 extends MovieClip {
}
}//package
Section 207
//mcCorpse_m1_2 (mcCorpse_m1_2)
package {
import flash.display.*;
public dynamic class mcCorpse_m1_2 extends MovieClip {
}
}//package
Section 208
//mcCorpse_m1_3 (mcCorpse_m1_3)
package {
import flash.display.*;
public dynamic class mcCorpse_m1_3 extends MovieClip {
}
}//package
Section 209
//mcCorpse_m2_1 (mcCorpse_m2_1)
package {
import flash.display.*;
public dynamic class mcCorpse_m2_1 extends MovieClip {
}
}//package
Section 210
//mcCorpse_m2_2 (mcCorpse_m2_2)
package {
import flash.display.*;
public dynamic class mcCorpse_m2_2 extends MovieClip {
}
}//package
Section 211
//mcCorpse_m2_3 (mcCorpse_m2_3)
package {
import flash.display.*;
public dynamic class mcCorpse_m2_3 extends MovieClip {
}
}//package
Section 212
//mcCorpse_m3_1 (mcCorpse_m3_1)
package {
import flash.display.*;
public dynamic class mcCorpse_m3_1 extends MovieClip {
}
}//package
Section 213
//mcCorpse_m3_2 (mcCorpse_m3_2)
package {
import flash.display.*;
public dynamic class mcCorpse_m3_2 extends MovieClip {
}
}//package
Section 214
//mcCorpse_m3_3 (mcCorpse_m3_3)
package {
import flash.display.*;
public dynamic class mcCorpse_m3_3 extends MovieClip {
}
}//package
Section 215
//mcCorpse_m4_1 (mcCorpse_m4_1)
package {
import flash.display.*;
public dynamic class mcCorpse_m4_1 extends MovieClip {
}
}//package
Section 216
//mcCorpse_m4_2 (mcCorpse_m4_2)
package {
import flash.display.*;
public dynamic class mcCorpse_m4_2 extends MovieClip {
}
}//package
Section 217
//mcCorpse_m4_3 (mcCorpse_m4_3)
package {
import flash.display.*;
public dynamic class mcCorpse_m4_3 extends MovieClip {
}
}//package
Section 218
//mcCorpse_m5_1 (mcCorpse_m5_1)
package {
import flash.display.*;
public dynamic class mcCorpse_m5_1 extends MovieClip {
}
}//package
Section 219
//mcCorpse_m5_2 (mcCorpse_m5_2)
package {
import flash.display.*;
public dynamic class mcCorpse_m5_2 extends MovieClip {
}
}//package
Section 220
//mcCorpse_m5_3 (mcCorpse_m5_3)
package {
import flash.display.*;
public dynamic class mcCorpse_m5_3 extends MovieClip {
}
}//package
Section 221
//mcCorpse_m6_1 (mcCorpse_m6_1)
package {
import flash.display.*;
public dynamic class mcCorpse_m6_1 extends MovieClip {
}
}//package
Section 222
//mcCorpse_m6_2 (mcCorpse_m6_2)
package {
import flash.display.*;
public dynamic class mcCorpse_m6_2 extends MovieClip {
}
}//package
Section 223
//mcCorpse_m6_3 (mcCorpse_m6_3)
package {
import flash.display.*;
public dynamic class mcCorpse_m6_3 extends MovieClip {
}
}//package
Section 224
//mcCorpseGirl (mcCorpseGirl)
package {
import flash.display.*;
public dynamic class mcCorpseGirl extends MovieClip {
}
}//package
Section 225
//mcCrossChair (mcCrossChair)
package {
import flash.display.*;
public dynamic class mcCrossChair extends Sprite {
}
}//package
Section 226
//mcCrossCircle (mcCrossCircle)
package {
import flash.display.*;
public dynamic class mcCrossCircle extends MovieClip {
}
}//package
Section 227
//mcDarkness (mcDarkness)
package {
import flash.display.*;
public dynamic class mcDarkness extends MovieClip {
}
}//package
Section 228
//mcEnemy_Biker_Fight (mcEnemy_Biker_Fight)
package {
import flash.display.*;
public dynamic class mcEnemy_Biker_Fight extends MovieClip {
}
}//package
Section 229
//mcEnemy_Biker_Hit (mcEnemy_Biker_Hit)
package {
import flash.display.*;
public dynamic class mcEnemy_Biker_Hit extends MovieClip {
}
}//package
Section 230
//mcEnemy_Biker_Walk (mcEnemy_Biker_Walk)
package {
import flash.display.*;
public dynamic class mcEnemy_Biker_Walk extends MovieClip {
}
}//package
Section 231
//mcEnemy_Bita_Fight (mcEnemy_Bita_Fight)
package {
import flash.display.*;
public dynamic class mcEnemy_Bita_Fight extends MovieClip {
}
}//package
Section 232
//mcEnemy_Bita_Hit (mcEnemy_Bita_Hit)
package {
import flash.display.*;
public dynamic class mcEnemy_Bita_Hit extends MovieClip {
}
}//package
Section 233
//mcEnemy_Bita_Walk (mcEnemy_Bita_Walk)
package {
import flash.display.*;
public dynamic class mcEnemy_Bita_Walk extends MovieClip {
}
}//package
Section 234
//mcEnemy_Fist_Fight (mcEnemy_Fist_Fight)
package {
import flash.display.*;
public dynamic class mcEnemy_Fist_Fight extends MovieClip {
}
}//package
Section 235
//mcEnemy_Fist_Hit (mcEnemy_Fist_Hit)
package {
import flash.display.*;
public dynamic class mcEnemy_Fist_Hit extends MovieClip {
}
}//package
Section 236
//mcEnemy_Fist_Walk (mcEnemy_Fist_Walk)
package {
import flash.display.*;
public dynamic class mcEnemy_Fist_Walk extends MovieClip {
}
}//package
Section 237
//mcEnemy_Hippie_Fight (mcEnemy_Hippie_Fight)
package {
import flash.display.*;
public dynamic class mcEnemy_Hippie_Fight extends MovieClip {
}
}//package
Section 238
//mcEnemy_Hippie_Hit (mcEnemy_Hippie_Hit)
package {
import flash.display.*;
public dynamic class mcEnemy_Hippie_Hit extends MovieClip {
}
}//package
Section 239
//mcEnemy_Hippie_Walk (mcEnemy_Hippie_Walk)
package {
import flash.display.*;
public dynamic class mcEnemy_Hippie_Walk extends MovieClip {
}
}//package
Section 240
//mcEnemy_Knife_Fight (mcEnemy_Knife_Fight)
package {
import flash.display.*;
public dynamic class mcEnemy_Knife_Fight extends MovieClip {
}
}//package
Section 241
//mcEnemy_Knife_Hit (mcEnemy_Knife_Hit)
package {
import flash.display.*;
public dynamic class mcEnemy_Knife_Hit extends MovieClip {
}
}//package
Section 242
//mcEnemy_Knife_Walk (mcEnemy_Knife_Walk)
package {
import flash.display.*;
public dynamic class mcEnemy_Knife_Walk extends MovieClip {
}
}//package
Section 243
//mcEnemy_Sabre_Fight (mcEnemy_Sabre_Fight)
package {
import flash.display.*;
public dynamic class mcEnemy_Sabre_Fight extends MovieClip {
}
}//package
Section 244
//mcEnemy_Sabre_Hit (mcEnemy_Sabre_Hit)
package {
import flash.display.*;
public dynamic class mcEnemy_Sabre_Hit extends MovieClip {
}
}//package
Section 245
//mcEnemy_Sabre_Walk (mcEnemy_Sabre_Walk)
package {
import flash.display.*;
public dynamic class mcEnemy_Sabre_Walk extends MovieClip {
}
}//package
Section 246
//mcEnemyDeath (mcEnemyDeath)
package {
import flash.display.*;
public dynamic class mcEnemyDeath extends MovieClip {
}
}//package
Section 247
//mcEnemyDeath1 (mcEnemyDeath1)
package {
import flash.display.*;
public dynamic class mcEnemyDeath1 extends MovieClip {
}
}//package
Section 248
//mcEnemyDeath2 (mcEnemyDeath2)
package {
import flash.display.*;
public dynamic class mcEnemyDeath2 extends MovieClip {
}
}//package
Section 249
//mcEnemyDeathPlasma (mcEnemyDeathPlasma)
package {
import flash.display.*;
public dynamic class mcEnemyDeathPlasma extends MovieClip {
}
}//package
Section 250
//mcEnemyDeathSmoke (mcEnemyDeathSmoke)
package {
import flash.display.*;
public dynamic class mcEnemyDeathSmoke extends MovieClip {
}
}//package
Section 251
//mcHeartBeat (mcHeartBeat)
package {
import flash.display.*;
public dynamic class mcHeartBeat extends MovieClip {
}
}//package
Section 252
//mcHeartBlink (mcHeartBlink)
package {
import flash.display.*;
public dynamic class mcHeartBlink extends MovieClip {
}
}//package
Section 253
//mcHeartLine (mcHeartLine)
package {
import flash.display.*;
public dynamic class mcHeartLine extends Sprite {
}
}//package
Section 254
//mcHero_Top_Grenade (mcHero_Top_Grenade)
package {
import flash.display.*;
public dynamic class mcHero_Top_Grenade extends MovieClip {
}
}//package
Section 255
//mcHero_Top_Grenade_Rel (mcHero_Top_Grenade_Rel)
package {
import flash.display.*;
public dynamic class mcHero_Top_Grenade_Rel extends MovieClip {
}
}//package
Section 256
//mcHero_Top_Grenade_Throw (mcHero_Top_Grenade_Throw)
package {
import flash.display.*;
public dynamic class mcHero_Top_Grenade_Throw extends MovieClip {
}
}//package
Section 257
//mcHero_Top_Machine (mcHero_Top_Machine)
package {
import flash.display.*;
public dynamic class mcHero_Top_Machine extends MovieClip {
}
}//package
Section 258
//mcHero_Top_Machine_Rel (mcHero_Top_Machine_Rel)
package {
import flash.display.*;
public dynamic class mcHero_Top_Machine_Rel extends MovieClip {
}
}//package
Section 259
//mcHero_Top_Pistol (mcHero_Top_Pistol)
package {
import flash.display.*;
public dynamic class mcHero_Top_Pistol extends MovieClip {
}
}//package
Section 260
//mcHero_Top_Pistol_1_Rel (mcHero_Top_Pistol_1_Rel)
package {
import flash.display.*;
public dynamic class mcHero_Top_Pistol_1_Rel extends MovieClip {
}
}//package
Section 261
//mcHero_Top_Pistol_2 (mcHero_Top_Pistol_2)
package {
import flash.display.*;
public dynamic class mcHero_Top_Pistol_2 extends MovieClip {
}
}//package
Section 262
//mcHero_Top_Pistol_2_Rel (mcHero_Top_Pistol_2_Rel)
package {
import flash.display.*;
public dynamic class mcHero_Top_Pistol_2_Rel extends MovieClip {
}
}//package
Section 263
//mcHero_Top_Rifle (mcHero_Top_Rifle)
package {
import flash.display.*;
public dynamic class mcHero_Top_Rifle extends MovieClip {
}
}//package
Section 264
//mcHero_Top_Rifle_Rel (mcHero_Top_Rifle_Rel)
package {
import flash.display.*;
public dynamic class mcHero_Top_Rifle_Rel extends MovieClip {
}
}//package
Section 265
//mcHUD_WSLOT_AmmoScreen (mcHUD_WSLOT_AmmoScreen)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_AmmoScreen extends MovieClip {
}
}//package
Section 266
//mcHUD_WSLOT_closed (mcHUD_WSLOT_closed)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_closed extends MovieClip {
}
}//package
Section 267
//mcHUD_WSLOT_closing (mcHUD_WSLOT_closing)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_closing extends MovieClip {
}
}//package
Section 268
//mcHUD_WSLOT_light (mcHUD_WSLOT_light)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_light extends MovieClip {
}
}//package
Section 269
//mcHUD_WSLOT_N1 (mcHUD_WSLOT_N1)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_N1 extends MovieClip {
}
}//package
Section 270
//mcHUD_WSLOT_N2 (mcHUD_WSLOT_N2)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_N2 extends MovieClip {
}
}//package
Section 271
//mcHUD_WSLOT_N3 (mcHUD_WSLOT_N3)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_N3 extends MovieClip {
}
}//package
Section 272
//mcHUD_WSLOT_N4 (mcHUD_WSLOT_N4)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_N4 extends MovieClip {
}
}//package
Section 273
//mcHUD_WSLOT_open (mcHUD_WSLOT_open)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_open extends MovieClip {
}
}//package
Section 274
//mcHUD_WSLOT_opening (mcHUD_WSLOT_opening)
package {
import flash.display.*;
public dynamic class mcHUD_WSLOT_opening extends MovieClip {
}
}//package
Section 275
//mcMeDead (mcMeDead)
package {
import flash.display.*;
public dynamic class mcMeDead extends MovieClip {
}
}//package
Section 276
//mcMedikit (mcMedikit)
package {
import flash.display.*;
public dynamic class mcMedikit extends MovieClip {
}
}//package
Section 277
//mcMedikitFull (mcMedikitFull)
package {
import flash.display.*;
public dynamic class mcMedikitFull extends MovieClip {
}
}//package
Section 278
//mcNarkotixSpeed (mcNarkotixSpeed)
package {
import flash.display.*;
public dynamic class mcNarkotixSpeed extends MovieClip {
}
}//package
Section 279
//mcPlasmaBody (mcPlasmaBody)
package {
import flash.display.*;
public dynamic class mcPlasmaBody extends MovieClip {
}
}//package
Section 280
//mcShop_BG (mcShop_BG)
package {
import flash.display.*;
import flash.text.*;
import shop.*;
public dynamic class mcShop_BG extends MovieClip {
public var i_txt_ammo3:TextField;
public var i_txt_ammo4:TextField;
public var i_txt_ammo6:TextField;
public var i_txt_ammo1:TextField;
public var i_txt_ammo5:TextField;
public var i_mc_shop_inventory:UIShopInventory;
public var i_mc_ammo1:mcAmmoIcon_Standart;
public var i_mc_ammo2:mcAmmoIcon_Shells;
public var i_mc_ammo3:mcAmmoIcon_Chain;
public var i_mc_ammo4:mcAmmoIcon_Fuel;
public var i_mc_ammo5:mcAmmoIcon_Rocket;
public var i_mc_ammo6:mcAmmoIcon_Battery;
public var i_txt_ammo2:TextField;
}
}//package
Section 281
//mcShop_Btn_Done (mcShop_Btn_Done)
package {
import flash.display.*;
public dynamic class mcShop_Btn_Done extends SimpleButton {
}
}//package
Section 282
//mcShop_Buy_Bg (mcShop_Buy_Bg)
package {
import flash.display.*;
public dynamic class mcShop_Buy_Bg extends MovieClip {
}
}//package
Section 283
//mcShop_Buy_Btn (mcShop_Buy_Btn)
package {
import flash.display.*;
public dynamic class mcShop_Buy_Btn extends SimpleButton {
}
}//package
Section 284
//mcShop_Buy_Btn_Brd (mcShop_Buy_Btn_Brd)
package {
import flash.display.*;
public dynamic class mcShop_Buy_Btn_Brd extends MovieClip {
}
}//package
Section 285
//mcShop_Buy_Price_Bg (mcShop_Buy_Price_Bg)
package {
import flash.display.*;
public dynamic class mcShop_Buy_Price_Bg extends MovieClip {
}
}//package
Section 286
//mcShop_info_portrait (mcShop_info_portrait)
package {
import flash.display.*;
public dynamic class mcShop_info_portrait extends MovieClip {
}
}//package
Section 287
//mcShop_info_portrait_border (mcShop_info_portrait_border)
package {
import flash.display.*;
public dynamic class mcShop_info_portrait_border extends MovieClip {
}
}//package
Section 288
//mcShopCharStatChangeBg (mcShopCharStatChangeBg)
package {
import flash.display.*;
public dynamic class mcShopCharStatChangeBg extends MovieClip {
}
}//package
Section 289
//mcShopCharStatChangeLeft (mcShopCharStatChangeLeft)
package {
import flash.display.*;
public dynamic class mcShopCharStatChangeLeft extends SimpleButton {
}
}//package
Section 290
//mcShopCharStatChangeLeft_empty (mcShopCharStatChangeLeft_empty)
package {
import flash.display.*;
public dynamic class mcShopCharStatChangeLeft_empty extends MovieClip {
}
}//package
Section 291
//mcShopCharStatChangeRight (mcShopCharStatChangeRight)
package {
import flash.display.*;
public dynamic class mcShopCharStatChangeRight extends SimpleButton {
}
}//package
Section 292
//mcShopCharStatChangeRight_empty (mcShopCharStatChangeRight_empty)
package {
import flash.display.*;
public dynamic class mcShopCharStatChangeRight_empty extends MovieClip {
}
}//package
Section 293
//mcShopSetAreaBg (mcShopSetAreaBg)
package {
import flash.display.*;
public dynamic class mcShopSetAreaBg extends MovieClip {
}
}//package
Section 294
//mcShopSetButton (mcShopSetButton)
package {
import flash.display.*;
public dynamic class mcShopSetButton extends SimpleButton {
}
}//package
Section 295
//mcShopSetButtonBrd (mcShopSetButtonBrd)
package {
import flash.display.*;
public dynamic class mcShopSetButtonBrd extends MovieClip {
}
}//package
Section 296
//mcShopUpgradeBg (mcShopUpgradeBg)
package {
import flash.display.*;
public dynamic class mcShopUpgradeBg extends MovieClip {
}
}//package
Section 297
//mcShopUpgradeButton (mcShopUpgradeButton)
package {
import flash.display.*;
public dynamic class mcShopUpgradeButton extends SimpleButton {
}
}//package
Section 298
//mcShopUprgadeStarActive (mcShopUprgadeStarActive)
package {
import flash.display.*;
public dynamic class mcShopUprgadeStarActive extends MovieClip {
}
}//package
Section 299
//mcShopUprgadeStarInactive (mcShopUprgadeStarInactive)
package {
import flash.display.*;
public dynamic class mcShopUprgadeStarInactive extends MovieClip {
}
}//package
Section 300
//mcSmokeFire (mcSmokeFire)
package {
import flash.display.*;
public dynamic class mcSmokeFire extends MovieClip {
}
}//package
Section 301
//mcSmokePlasma (mcSmokePlasma)
package {
import flash.display.*;
public dynamic class mcSmokePlasma extends MovieClip {
}
}//package
Section 302
//mcSplashDefault (mcSplashDefault)
package {
import flash.display.*;
public dynamic class mcSplashDefault extends MovieClip {
}
}//package
Section 303
//mcSplashPowerGrenade (mcSplashPowerGrenade)
package {
import flash.display.*;
public dynamic class mcSplashPowerGrenade extends MovieClip {
}
}//package
Section 304
//mcTiolkaHit (mcTiolkaHit)
package {
import flash.display.*;
public dynamic class mcTiolkaHit extends MovieClip {
}
}//package
Section 305
//mcTiolkaWalk (mcTiolkaWalk)
package {
import flash.display.*;
public dynamic class mcTiolkaWalk extends MovieClip {
}
}//package
Section 306
//mcWeapon0 (mcWeapon0)
package {
import flash.display.*;
public dynamic class mcWeapon0 extends MovieClip {
}
}//package
Section 307
//mcWeapon11Magnum44 (mcWeapon11Magnum44)
package {
import flash.display.*;
public dynamic class mcWeapon11Magnum44 extends MovieClip {
}
}//package
Section 308
//mcWeapon12DualBeretta (mcWeapon12DualBeretta)
package {
import flash.display.*;
public dynamic class mcWeapon12DualBeretta extends MovieClip {
}
}//package
Section 309
//mcWeapon13PistolDesertEagle (mcWeapon13PistolDesertEagle)
package {
import flash.display.*;
public dynamic class mcWeapon13PistolDesertEagle extends MovieClip {
}
}//package
Section 310
//mcWeapon14Gauss (mcWeapon14Gauss)
package {
import flash.display.*;
public dynamic class mcWeapon14Gauss extends MovieClip {
}
}//package
Section 311
//mcWeapon21uzi (mcWeapon21uzi)
package {
import flash.display.*;
public dynamic class mcWeapon21uzi extends MovieClip {
}
}//package
Section 312
//mcWeapon22mp5k (mcWeapon22mp5k)
package {
import flash.display.*;
public dynamic class mcWeapon22mp5k extends MovieClip {
}
}//package
Section 313
//mcWeapon23P90 (mcWeapon23P90)
package {
import flash.display.*;
public dynamic class mcWeapon23P90 extends MovieClip {
}
}//package
Section 314
//mcWeapon24tommy (mcWeapon24tommy)
package {
import flash.display.*;
public dynamic class mcWeapon24tommy extends MovieClip {
}
}//package
Section 315
//mcWeapon31AssalutRifle (mcWeapon31AssalutRifle)
package {
import flash.display.*;
public dynamic class mcWeapon31AssalutRifle extends MovieClip {
}
}//package
Section 316
//mcWeapon32RifleLaser (mcWeapon32RifleLaser)
package {
import flash.display.*;
public dynamic class mcWeapon32RifleLaser extends MovieClip {
}
}//package
Section 317
//mcWeapon33Sniper (mcWeapon33Sniper)
package {
import flash.display.*;
public dynamic class mcWeapon33Sniper extends MovieClip {
}
}//package
Section 318
//mcWeapon34Gauss (mcWeapon34Gauss)
package {
import flash.display.*;
public dynamic class mcWeapon34Gauss extends MovieClip {
}
}//package
Section 319
//mcWeapon41SG (mcWeapon41SG)
package {
import flash.display.*;
public dynamic class mcWeapon41SG extends MovieClip {
}
}//package
Section 320
//mcWeapon42SOSG (mcWeapon42SOSG)
package {
import flash.display.*;
public dynamic class mcWeapon42SOSG extends MovieClip {
}
}//package
Section 321
//mcWeapon43CombatSG (mcWeapon43CombatSG)
package {
import flash.display.*;
public dynamic class mcWeapon43CombatSG extends MovieClip {
}
}//package
Section 322
//mcWeapon44Pancor (mcWeapon44Pancor)
package {
import flash.display.*;
public dynamic class mcWeapon44Pancor extends MovieClip {
}
}//package
Section 323
//mcWeapon51Acid (mcWeapon51Acid)
package {
import flash.display.*;
public dynamic class mcWeapon51Acid extends MovieClip {
}
}//package
Section 324
//mcWeapon52LightFlamer (mcWeapon52LightFlamer)
package {
import flash.display.*;
public dynamic class mcWeapon52LightFlamer extends MovieClip {
}
}//package
Section 325
//mcWeapon53HeavyFlamer (mcWeapon53HeavyFlamer)
package {
import flash.display.*;
public dynamic class mcWeapon53HeavyFlamer extends MovieClip {
}
}//package
Section 326
//mcWeapon61Gatling (mcWeapon61Gatling)
package {
import flash.display.*;
public dynamic class mcWeapon61Gatling extends MovieClip {
}
}//package
Section 327
//mcWeapon62GatlingLaser (mcWeapon62GatlingLaser)
package {
import flash.display.*;
public dynamic class mcWeapon62GatlingLaser extends MovieClip {
}
}//package
Section 328
//mcWeapon62GatlingLazer (mcWeapon62GatlingLazer)
package {
import flash.display.*;
public dynamic class mcWeapon62GatlingLazer extends MovieClip {
}
}//package
Section 329
//mcWeapon63BUZZAR (mcWeapon63BUZZAR)
package {
import flash.display.*;
public dynamic class mcWeapon63BUZZAR extends MovieClip {
}
}//package
Section 330
//mcWeapon64Plasma (mcWeapon64Plasma)
package {
import flash.display.*;
public dynamic class mcWeapon64Plasma extends MovieClip {
}
}//package
Section 331
//mcWeapon65Lightning (mcWeapon65Lightning)
package {
import flash.display.*;
public dynamic class mcWeapon65Lightning extends MovieClip {
}
}//package
Section 332
//mcWeapon71GrenadeLauncher (mcWeapon71GrenadeLauncher)
package {
import flash.display.*;
public dynamic class mcWeapon71GrenadeLauncher extends MovieClip {
}
}//package
Section 333
//mcWeapon72RocketLaunchar (mcWeapon72RocketLaunchar)
package {
import flash.display.*;
public dynamic class mcWeapon72RocketLaunchar extends MovieClip {
}
}//package
Section 334
//mcWeapon73Stinger (mcWeapon73Stinger)
package {
import flash.display.*;
public dynamic class mcWeapon73Stinger extends MovieClip {
}
}//package
Section 335
//mcWeapon74ZF1 (mcWeapon74ZF1)
package {
import flash.display.*;
public dynamic class mcWeapon74ZF1 extends MovieClip {
}
}//package
Section 336
//mcWeapon81Knives (mcWeapon81Knives)
package {
import flash.display.*;
public dynamic class mcWeapon81Knives extends MovieClip {
}
}//package
Section 337
//mcWeapon82Molotov (mcWeapon82Molotov)
package {
import flash.display.*;
public dynamic class mcWeapon82Molotov extends MovieClip {
}
}//package
Section 338
//mcWeapon83Grenades (mcWeapon83Grenades)
package {
import flash.display.*;
public dynamic class mcWeapon83Grenades extends MovieClip {
}
}//package
Section 339
//mcWeapon84TornadoGrenades (mcWeapon84TornadoGrenades)
package {
import flash.display.*;
public dynamic class mcWeapon84TornadoGrenades extends MovieClip {
}
}//package
Section 340
//MenuPlayerName (MenuPlayerName)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.ui.*;
public class MenuPlayerName extends Sprite {
private const _defname:String = "Anonymous";
private var _inputTxt:TextField;
public var i_ip_playerName:TextField;
public var i_btn_ok:SimpleButton;
private var _btnOk:SimpleButton;
public static const EVT_CLOSE:String = "username entered evt";
public function MenuPlayerName(){
_inputTxt = (i_ip_playerName as TextField);
_btnOk = (i_btn_ok as SimpleButton);
_inputTxt.text = _defname;
_btnOk.addEventListener(MouseEvent.CLICK, handleBtnOk);
_inputTxt.addEventListener(MouseEvent.CLICK, handleInputClick);
_inputTxt.addEventListener(KeyboardEvent.KEY_DOWN, handlerKeyDown);
addEventListener(Event.ADDED, handleAdded);
}
private function handleInputClick(_arg1:MouseEvent){
if (_inputTxt.text == _defname){
_inputTxt.text = "";
};
}
public function get playerName():String{
return (_inputTxt.text);
}
private function handleBtnOk(_arg1:MouseEvent){
_btnOk.removeEventListener(MouseEvent.CLICK, handleBtnOk);
_inputTxt.removeEventListener(MouseEvent.CLICK, handleInputClick);
_inputTxt.removeEventListener(KeyboardEvent.KEY_DOWN, handlerKeyDown);
removeEventListener(Event.ADDED, handleAdded);
if (_inputTxt.text == ""){
_inputTxt.text = _defname;
};
dispatchEvent(new Event(EVT_CLOSE));
}
private function handlerKeyDown(_arg1:KeyboardEvent){
if (_inputTxt.text == _defname){
_inputTxt.text = "";
};
if (_arg1.keyCode == Keyboard.ENTER){
handleBtnOk(null);
};
}
private function handleAdded(_arg1:Event){
var _local2:Stage = this.stage;
if (_local2 != null){
_local2.focus = _inputTxt;
_inputTxt.selectable = true;
_inputTxt.setSelection(0, _inputTxt.text.length);
};
}
}
}//package
Section 341
//MenuPlayerSelector (MenuPlayerSelector)
package {
import flash.display.*;
import character.*;
import flash.events.*;
public class MenuPlayerSelector extends MovieClip {
private var buttonsSelection:Array;
public var i_mc_darkBg:MovieClip;
private var guysShadow:MovieClip;
public var i_mc_select1:SimpleButton;
public var i_mc_select2:SimpleButton;
public var i_mc_select3:SimpleButton;
public var i_mc_select4:SimpleButton;
public var i_mc_select5:SimpleButton;
public var i_mc_select6:SimpleButton;
private var statsScreen:MovieClip;
public var i_mc_characteristics:MovieClip;
private var _selectedChar:int;// = 0
private var mainShadow:MovieClip;
public var i_mc_guysShadow:MovieClip;
public static const EVT_PLAYERSELECTED:String = "player_selector_player_selected";
public function MenuPlayerSelector(){
buttonsSelection = [i_mc_select1, i_mc_select2, i_mc_select3, i_mc_select4, i_mc_select5, i_mc_select6];
statsScreen = (i_mc_characteristics as MovieClip);
guysShadow = (i_mc_guysShadow as MovieClip);
mainShadow = (i_mc_darkBg as MovieClip);
turnOff();
}
public function turnOff(){
var _local2:SimpleButton;
var _local1:int;
while (_local1 < buttonsSelection.length) {
_local2 = (buttonsSelection[_local1] as SimpleButton);
_local2.removeEventListener(MouseEvent.CLICK, handlePlayerSelectClick);
_local2.removeEventListener(MouseEvent.ROLL_OVER, handleBtnOver);
_local2.removeEventListener(MouseEvent.ROLL_OUT, handleBtnOut);
_local2.visible = false;
_local1++;
};
statsScreen.visible = false;
guysShadow.visible = false;
mainShadow.visible = false;
}
private function handlePlayerSelectClick(_arg1:MouseEvent){
trace("Selected:", _arg1.target.name);
_selectedChar = getCharNumber((_arg1.target as SimpleButton));
SoundManager.inst().play(SoundManager.CLICK_CHARCHOOSE_CLICK);
dispatchEvent(new Event(EVT_PLAYERSELECTED));
}
private function getCharNumber(_arg1:SimpleButton):int{
var _local2:String = _arg1.name;
var _local3:int;
switch (_local2){
case "i_mc_select1":
_local3 = 0;
break;
case "i_mc_select2":
_local3 = 1;
break;
case "i_mc_select3":
_local3 = 2;
break;
case "i_mc_select4":
_local3 = 3;
break;
case "i_mc_select5":
_local3 = 4;
break;
case "i_mc_select6":
_local3 = 5;
break;
default:
throw (new Error("Unknown button:", _local2));
};
return (_local3);
}
private function handleBtnOver(_arg1:MouseEvent){
guysShadow.visible = false;
statsScreen.visible = true;
setCharStatsInfo(getCharNumber((_arg1.target as SimpleButton)));
SoundManager.inst().play(SoundManager.CLICK_CHARCHOOSE_OVER);
}
public function get selectedChar():int{
return (_selectedChar);
}
private function handleBtnOut(_arg1:MouseEvent){
guysShadow.visible = true;
statsScreen.visible = false;
}
private function setCharStatsInfo(_arg1:int){
statsScreen.i_tf_str.text = CStats.STATS_PRESETS[_arg1][0];
statsScreen.i_tf_spd.text = CStats.STATS_PRESETS[_arg1][1];
statsScreen.i_tf_dex.text = CStats.STATS_PRESETS[_arg1][2];
statsScreen.i_tf_agi.text = CStats.STATS_PRESETS[_arg1][3];
statsScreen.i_tf_acc.text = CStats.STATS_PRESETS[_arg1][4];
statsScreen.i_tf_prc.text = CStats.STATS_PRESETS[_arg1][5];
statsScreen.i_tf_luck.text = CStats.STATS_PRESETS[_arg1][6];
}
public function turnOn(){
var _local2:SimpleButton;
var _local1:int;
while (_local1 < buttonsSelection.length) {
_local2 = (buttonsSelection[_local1] as SimpleButton);
_local2.addEventListener(MouseEvent.CLICK, handlePlayerSelectClick, false, 0, true);
_local2.addEventListener(MouseEvent.ROLL_OVER, handleBtnOver, false, 1, true);
_local2.addEventListener(MouseEvent.ROLL_OUT, handleBtnOut, false, 0, true);
_local2.visible = true;
_local1++;
};
statsScreen.visible = false;
guysShadow.visible = true;
mainShadow.visible = true;
}
}
}//package
Section 342
//MonoCondencedDi (MonoCondencedDi)
package {
import flash.text.*;
public dynamic class MonoCondencedDi extends Font {
}
}//package
Section 343
//MovieSceneAbstract (MovieSceneAbstract)
package {
import flash.display.*;
import flash.events.*;
public class MovieSceneAbstract extends MovieClip {
private var _btnSkip:SimpleButton;
public static const EVT_DONE:String = "EVENT_SCENE_DONE";
public function MovieSceneAbstract(){
_btnSkip = new btn_sceneSkip();
_btnSkip.x = 600;
_btnSkip.y = 500;
addChild(_btnSkip);
_btnSkip.addEventListener(MouseEvent.CLICK, handleBtn);
addEventListener(Event.ENTER_FRAME, handleFrame);
}
private function done(){
stop();
removeEventListener(Event.ENTER_FRAME, handleFrame);
_btnSkip.removeEventListener(MouseEvent.CLICK, handleBtn);
dispatchEvent(new Event(EVT_DONE));
}
private function handleFrame(_arg1:Event){
addChild(_btnSkip);
if (currentFrame == totalFrames){
done();
};
}
private function handleBtn(_arg1:MouseEvent){
gotoAndPlay(totalFrames);
}
}
}//package
Section 344
//ObjectList (ObjectList)
package {
public class ObjectList {
private var list_:Array;
public function ObjectList(){
list_ = new Array();
}
public function getItemIndex(_arg1:Object):int{
var _local3:Object;
var _local2:int;
while (_local2 < count) {
_local3 = getItem(_local2);
if (_local3 == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
public function add(_arg1:Object){
list_.push(_arg1);
}
public function remove(_arg1:int){
var _local2:Object = Object(list_[_arg1]);
var _local3:Array = new Array();
var _local4:int;
while (_local4 < list_.length) {
if (_local2 != Object(list_[_local4])){
_local3.push(Object(list_[_local4]));
};
_local4++;
};
clear();
list_ = _local3;
}
public function setItem(_arg1:int, _arg2:Object){
list_[_arg1] = _arg2;
}
public function getItem(_arg1:int):Object{
return (list_[_arg1]);
}
public function removeObject(_arg1:Object){
var _local3:Object;
var _local2:int;
while (_local2 < count) {
_local3 = getItem(_local2);
if (_local3 == _arg1){
remove(_local2);
return;
};
_local2++;
};
}
public function insert(_arg1:int, _arg2:Object){
var _local3:Array = new Array();
var _local4:int;
while (_local4 < _arg1) {
_local3.push(list_[_local4]);
_local4++;
};
_local3.push(_arg2);
while (_local4 < list_.length) {
_local3.push(list_[_local4]);
_local4++;
};
list_ = _local3;
}
public function clear(){
while (list_.length > 0) {
list_.pop();
};
}
public function get count():Number{
return (list_.length);
}
}
}//package
Section 345
//Parking_bus_1 (Parking_bus_1)
package {
import enemies.*;
public dynamic class Parking_bus_1 extends CEnemyBus {
public function Parking_bus_1(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 346
//Parking_bus_2 (Parking_bus_2)
package {
import enemies.*;
public dynamic class Parking_bus_2 extends CEnemyBus {
public function Parking_bus_2(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 347
//Parking_bus_3 (Parking_bus_3)
package {
import enemies.*;
public dynamic class Parking_bus_3 extends CEnemyBus {
public function Parking_bus_3(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 348
//PauseScreen (PauseScreen)
package {
import flash.display.*;
public dynamic class PauseScreen extends MovieClip {
public var i_clickable_button:SimpleButton;
public var i_btn_menu:SimpleButton;
public var i_clickable:MovieClip;
}
}//package
Section 349
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class Preloader extends MovieClip {
private var progressTxt:TextField;
public var textKB:TextField;
private var progressBar:Sprite;
public var sprLoaderProgressInstance:MovieClip;
public var sp_button:SimpleButton;
private var btnSp:SimpleButton;
public static const ENTRY_FRAME:Number = 4;
public static const DOCUMENT_CLASS:String = "TrueMadnessMainScreen";
public function Preloader(){
stop();
var _local1:Stage = this.stage;
_local1.scaleMode = StageScaleMode.NO_SCALE;
progressBar = (getChildByName("sprLoaderProgressInstance") as Sprite);
progressBar.scaleX = 0;
progressTxt = (getChildByName("textKB") as TextField);
progressTxt.selectable = false;
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loaderInfo.addEventListener(Event.COMPLETE, completeHandler);
btnSp = (sp_button as SimpleButton);
btnSp.addEventListener(MouseEvent.CLICK, handleSpButton, false, 0, true);
}
private function main():void{
var _local1:Class = (loaderInfo.applicationDomain.getDefinition(_slot1.DOCUMENT_CLASS) as Class);
var _local2:Sprite = (new (_local1) as Sprite);
addChild(_local2);
}
private function completeHandler(_arg1:Event):void{
play();
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event):void{
if (currentFrame >= _slot1.ENTRY_FRAME){
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stop();
main();
};
}
private function handleSpButton(_arg1:MouseEvent){
navigateToURL(new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=bloodfield&utm_source=domain.com&utm_content=ingame"), "_blank");
}
private function progressHandler(_arg1:ProgressEvent):void{
var _local2:uint = _arg1.bytesLoaded;
var _local3:uint = _arg1.bytesTotal;
progressBar.scaleX = (_local2 / _local3);
_local2 = (_local2 / 1000);
_local3 = (_local3 / 1000);
progressTxt.text = (((_local2.toString() + " of ") + _local3.toString()) + " Kb");
}
}
}//package
Section 350
//preText (preText)
package {
import flash.display.*;
public dynamic class preText extends MovieClip {
}
}//package
Section 351
//SaveObject (SaveObject)
package {
public class SaveObject {
public var money:int;// = 0
public var stat_Power:int;// = 1
public var armor:int;// = 0
public var gunz:Array;
public var statistic_shots:int;// = 0
public var progress_lastLevel:int;// = 0
public var ammo:Array;
public var statistic_hits:int;// = 0
public var stat_Perception:int;// = 1
public var stat_Luck:int;// = 1
public var slot2:String;
public var statistic_totaltime:int;// = 0
public var stat_Accuracy:int;// = 1
public var statistic_kills:int;// = 0
public var char_PresetNumber:int;// = 0
public var slot1:String;
public var slot3:String;
public var slot4:String;
public var stat_Dexterity:int;// = 1
public var stat_Agility:int;// = 1
public var char_Name:String;// = "NoName"
public var stat_Speed:int;// = 1
}
}//package
Section 352
//Saver (Saver)
package {
import gunz.*;
import itemz.*;
import character.*;
import flash.net.*;
import flash.utils.*;
public class Saver {
private const ARMOR_CLS:Array;
private var so:SharedObject;
private var _lastLevel:int;// = -1
private static var _instance:Saver;
private static var _allowInstance:Boolean;
public function Saver(){
ARMOR_CLS = [CArmorNone, CArmorLight, CArmorMedium, CArmorHeavy];
super();
so = SharedObject.getLocal("TikislabBloodFieldSave");
if (!Saver._allowInstance){
throw (new Error("Error: Use Saver.inst instead of the new keyword."));
};
}
public function loadData(_arg1:CStats, _arg2:CInventory):Boolean{
var save:Object;
var cls:Class;
var arr:Array;
var i:int;
var saveguns:Array;
var allGuns:Array;
var tmpGuns:Array;
var gun:CGunAbstract;
var stats = _arg1;
var inventory = _arg2;
var success:Boolean;
if (so.size == 0){
trace("SO SAVE NOT FOUND");
saveData(stats, inventory);
} else {
try {
var getGun:Function = function (_arg1:String, _arg2:Array):CGunAbstract{
var _local3:int = (_arg2.length - 1);
while (_local3 > -1) {
if (_arg1 == _arg2[_local3].props.name){
return (_arg2[_local3]);
};
_local3--;
};
return (null);
};
save = so.data.save;
_lastLevel = save.progress_lastLevel;
stats.player_name = save.char_Name;
stats.applyPreset(save.char_PresetNumber);
stats.setPower(save.stat_Power);
stats.setSpeed(save.stat_Speed);
stats.setDexterity(save.stat_Dexterity);
stats.setAgility(save.stat_Agility);
stats.setAccuracy(save.stat_Accuracy);
stats.setPerception(save.stat_Perception);
stats.setLuck(save.stat_Luck);
stats.st_hits = save.statistic_hits;
stats.st_kills = save.statistic_kills;
stats.st_shots = save.statistic_shots;
stats.sT_totaltime = save.statistic_totaltime;
inventory.money = save.money;
cls = (ARMOR_CLS[save.armor] as Class);
inventory.armor = new (cls);
arr = (save.ammo as Array);
inventory.ammoStorage = new AmmoStorage();
i = arr.length;
while (i > 0) {
i = (i - 1);
inventory.ammoStorage.addAmmo(arr[i].ammoName, arr[i].ammoCount);
};
inventory.checkAmmoSlots();
saveguns = (save.gunz as Array);
allGuns = CGunzPropBank.gimmeAllOfThem;
tmpGuns = new Array();
i = saveguns.length;
while (i > 0) {
i = (i - 1);
gun = getGun(saveguns[i].gunName, allGuns);
gun.props.UpgradesArr = saveguns[i].upgrades;
inventory.addWeapon(gun);
tmpGuns.push(gun);
};
inventory.weapon1 = getGun(save.slot1, tmpGuns);
inventory.weapon2 = getGun(save.slot2, tmpGuns);
inventory.weapon3 = getGun(save.slot3, tmpGuns);
inventory.weapon4 = getGun(save.slot4, tmpGuns);
if (_lastLevel >= 0){
success = true;
trace("SO SAVE LOADED");
};
} catch(e:Error) {
trace("LOADING ERROR:", e);
};
};
return (success);
}
public function get lastLevel():int{
return (_lastLevel);
}
public function saveData(_arg1:CStats, _arg2:CInventory, _arg3:int=-1):Boolean{
var _local5:SaveObject;
var _local10:CGunAbstract;
var _local11:Array;
var _local12:String;
var _local13:Object;
var _local4:Boolean;
_local5 = new SaveObject();
_local5.char_Name = _arg1.player_name;
_local5.char_PresetNumber = _arg1.charPreset;
_local5.progress_lastLevel = _arg3;
if (_arg3 == -1){
_local5.progress_lastLevel = _lastLevel;
};
_local5.stat_Power = _arg1.Power;
_local5.stat_Speed = _arg1.Speed;
_local5.stat_Dexterity = _arg1.Dexterity;
_local5.stat_Agility = _arg1.Agility;
_local5.stat_Accuracy = _arg1.Accuracy;
_local5.stat_Perception = _arg1.Perception;
_local5.stat_Luck = _arg1.Luck;
_local5.statistic_hits = _arg1.st_hits;
_local5.statistic_kills = _arg1.st_kills;
_local5.statistic_shots = _arg1.st_shots;
_local5.statistic_totaltime = _arg1.sT_totaltime;
_local5.money = _arg2.money;
_local5.armor = _arg2.armor.armorClassId;
var _local6:Array = new Array();
var _local7:int = _arg2.ammoStorage.itemsCount;
while (_local7 > 0) {
_local7--;
_local6.push(_arg2.ammoStorage.getAmmo(_local7));
};
_local5.ammo = _local6;
var _local8:Array = new Array();
var _local9:Array = CGunzPropBank.gimmeAllOfThem;
_local7 = _local9.length;
while (_local7 > 0) {
_local7--;
_local10 = (_local9[_local7] as CGunAbstract);
if (_arg2.haveThisWeapon(_local10)){
_local10 = _arg2.gimmeWeapon(_local10);
_local12 = _local10.props.name;
_local11 = _local10.props.UpgradesArr;
_local13 = new Object();
_local13.gunName = _local12;
_local13.upgrades = _local11;
_local8.push(_local13);
};
};
_local5.gunz = _local8;
_local5.slot1 = _arg2.weapon1.props.name;
_local5.slot2 = _arg2.weapon2.props.name;
_local5.slot3 = _arg2.weapon3.props.name;
_local5.slot4 = _arg2.weapon4.props.name;
so.clear();
so.data.save = _local5;
so.flush(4000);
trace("SO SAVE SAVED");
return (_local4);
}
public function set lastLevel(_arg1:int){
_lastLevel = _arg1;
}
public static function get inst():Saver{
if (Saver._instance == null){
Saver._allowInstance = true;
Saver._instance = new (Saver);
Saver._allowInstance = false;
};
return (Saver._instance);
}
}
}//package
Section 353
//slon_danger_anim (slon_danger_anim)
package {
import animations.*;
public dynamic class slon_danger_anim extends LevelAnimDelayedDangerAbs {
}
}//package
Section 354
//sndAnom_START (sndAnom_START)
package {
import flash.media.*;
public dynamic class sndAnom_START extends Sound {
}
}//package
Section 355
//sndBUS_CAME (sndBUS_CAME)
package {
import flash.media.*;
public dynamic class sndBUS_CAME extends Sound {
}
}//package
Section 356
//sndCharChoice (sndCharChoice)
package {
import flash.media.*;
public dynamic class sndCharChoice extends Sound {
}
}//package
Section 357
//sndClick (sndClick)
package {
import flash.media.*;
public dynamic class sndClick extends Sound {
}
}//package
Section 358
//sndCLICK_CHARCHOOSE_CLICK (sndCLICK_CHARCHOOSE_CLICK)
package {
import flash.media.*;
public dynamic class sndCLICK_CHARCHOOSE_CLICK extends Sound {
}
}//package
Section 359
//sndCLICK_CHARCHOOSE_OVER (sndCLICK_CHARCHOOSE_OVER)
package {
import flash.media.*;
public dynamic class sndCLICK_CHARCHOOSE_OVER extends Sound {
}
}//package
Section 360
//sndCLICK_MENU_BTN (sndCLICK_MENU_BTN)
package {
import flash.media.*;
public dynamic class sndCLICK_MENU_BTN extends Sound {
}
}//package
Section 361
//sndCLICK_SHOP_BTN (sndCLICK_SHOP_BTN)
package {
import flash.media.*;
public dynamic class sndCLICK_SHOP_BTN extends Sound {
}
}//package
Section 362
//sndCLICK_SHOP_BUY (sndCLICK_SHOP_BUY)
package {
import flash.media.*;
public dynamic class sndCLICK_SHOP_BUY extends Sound {
}
}//package
Section 363
//sndCLICK_SHOP_INSERTVEAPON (sndCLICK_SHOP_INSERTVEAPON)
package {
import flash.media.*;
public dynamic class sndCLICK_SHOP_INSERTVEAPON extends Sound {
}
}//package
Section 364
//sndDead (sndDead)
package {
import flash.media.*;
public dynamic class sndDead extends Sound {
}
}//package
Section 365
//sndDeath_PLAYER (sndDeath_PLAYER)
package {
import flash.media.*;
public dynamic class sndDeath_PLAYER extends Sound {
}
}//package
Section 366
//sndDeath_PLAYER_GIRL (sndDeath_PLAYER_GIRL)
package {
import flash.media.*;
public dynamic class sndDeath_PLAYER_GIRL extends Sound {
}
}//package
Section 367
//sndDie_ENEMY1 (sndDie_ENEMY1)
package {
import flash.media.*;
public dynamic class sndDie_ENEMY1 extends Sound {
}
}//package
Section 368
//sndDie_ENEMY2 (sndDie_ENEMY2)
package {
import flash.media.*;
public dynamic class sndDie_ENEMY2 extends Sound {
}
}//package
Section 369
//sndDie_ENEMY3 (sndDie_ENEMY3)
package {
import flash.media.*;
public dynamic class sndDie_ENEMY3 extends Sound {
}
}//package
Section 370
//sndEXPLODE_BUS (sndEXPLODE_BUS)
package {
import flash.media.*;
public dynamic class sndEXPLODE_BUS extends Sound {
}
}//package
Section 371
//sndEXPLODE_GRENADE (sndEXPLODE_GRENADE)
package {
import flash.media.*;
public dynamic class sndEXPLODE_GRENADE extends Sound {
}
}//package
Section 372
//sndEXPLODE_PLASMA (sndEXPLODE_PLASMA)
package {
import flash.media.*;
public dynamic class sndEXPLODE_PLASMA extends Sound {
}
}//package
Section 373
//sndHit_ENEMY1 (sndHit_ENEMY1)
package {
import flash.media.*;
public dynamic class sndHit_ENEMY1 extends Sound {
}
}//package
Section 374
//sndHit_ENEMY2 (sndHit_ENEMY2)
package {
import flash.media.*;
public dynamic class sndHit_ENEMY2 extends Sound {
}
}//package
Section 375
//sndHit_ENEMY3 (sndHit_ENEMY3)
package {
import flash.media.*;
public dynamic class sndHit_ENEMY3 extends Sound {
}
}//package
Section 376
//sndHit_GIRL (sndHit_GIRL)
package {
import flash.media.*;
public dynamic class sndHit_GIRL extends Sound {
}
}//package
Section 377
//sndHit_PLAYER (sndHit_PLAYER)
package {
import flash.media.*;
public dynamic class sndHit_PLAYER extends Sound {
}
}//package
Section 378
//sndKick_ENEMY1 (sndKick_ENEMY1)
package {
import flash.media.*;
public dynamic class sndKick_ENEMY1 extends Sound {
}
}//package
Section 379
//sndKick_ENEMY2 (sndKick_ENEMY2)
package {
import flash.media.*;
public dynamic class sndKick_ENEMY2 extends Sound {
}
}//package
Section 380
//sndKick_ENEMY3 (sndKick_ENEMY3)
package {
import flash.media.*;
public dynamic class sndKick_ENEMY3 extends Sound {
}
}//package
Section 381
//sndMusic0 (sndMusic0)
package {
import flash.media.*;
public dynamic class sndMusic0 extends Sound {
}
}//package
Section 382
//sndMusic1 (sndMusic1)
package {
import flash.media.*;
public dynamic class sndMusic1 extends Sound {
}
}//package
Section 383
//sndMusic2 (sndMusic2)
package {
import flash.media.*;
public dynamic class sndMusic2 extends Sound {
}
}//package
Section 384
//sndMusic3 (sndMusic3)
package {
import flash.media.*;
public dynamic class sndMusic3 extends Sound {
}
}//package
Section 385
//sndOther_WINLEVEL (sndOther_WINLEVEL)
package {
import flash.media.*;
public dynamic class sndOther_WINLEVEL extends Sound {
}
}//package
Section 386
//sndOtherLoose (sndOtherLoose)
package {
import flash.media.*;
public dynamic class sndOtherLoose extends Sound {
}
}//package
Section 387
//sndReload_MACHINE (sndReload_MACHINE)
package {
import flash.media.*;
public dynamic class sndReload_MACHINE extends Sound {
}
}//package
Section 388
//sndReload_SHOTGUN (sndReload_SHOTGUN)
package {
import flash.media.*;
public dynamic class sndReload_SHOTGUN extends Sound {
}
}//package
Section 389
//sndReloadPistol (sndReloadPistol)
package {
import flash.media.*;
public dynamic class sndReloadPistol extends Sound {
}
}//package
Section 390
//sndReloadSmg (sndReloadSmg)
package {
import flash.media.*;
public dynamic class sndReloadSmg extends Sound {
}
}//package
Section 391
//sndShot_DUAL (sndShot_DUAL)
package {
import flash.media.*;
public dynamic class sndShot_DUAL extends Sound {
}
}//package
Section 392
//sndShot_ELECTRIC (sndShot_ELECTRIC)
package {
import flash.media.*;
public dynamic class sndShot_ELECTRIC extends Sound {
}
}//package
Section 393
//sndShot_FIRE (sndShot_FIRE)
package {
import flash.media.*;
public dynamic class sndShot_FIRE extends Sound {
}
}//package
Section 394
//sndShot_GRENADE (sndShot_GRENADE)
package {
import flash.media.*;
public dynamic class sndShot_GRENADE extends Sound {
}
}//package
Section 395
//sndShot_LASER (sndShot_LASER)
package {
import flash.media.*;
public dynamic class sndShot_LASER extends Sound {
}
}//package
Section 396
//sndShot_MACHINE (sndShot_MACHINE)
package {
import flash.media.*;
public dynamic class sndShot_MACHINE extends Sound {
}
}//package
Section 397
//sndShot_PISTOL (sndShot_PISTOL)
package {
import flash.media.*;
public dynamic class sndShot_PISTOL extends Sound {
}
}//package
Section 398
//sndShot_PLASMA (sndShot_PLASMA)
package {
import flash.media.*;
public dynamic class sndShot_PLASMA extends Sound {
}
}//package
Section 399
//sndShot_RIFLE (sndShot_RIFLE)
package {
import flash.media.*;
public dynamic class sndShot_RIFLE extends Sound {
}
}//package
Section 400
//sndShot_ROCKET (sndShot_ROCKET)
package {
import flash.media.*;
public dynamic class sndShot_ROCKET extends Sound {
}
}//package
Section 401
//sndShot_SHOTGUN (sndShot_SHOTGUN)
package {
import flash.media.*;
public dynamic class sndShot_SHOTGUN extends Sound {
}
}//package
Section 402
//sndShot_SMG (sndShot_SMG)
package {
import flash.media.*;
public dynamic class sndShot_SMG extends Sound {
}
}//package
Section 403
//someBlood (someBlood)
package {
import flash.display.*;
public dynamic class someBlood extends MovieClip {
}
}//package
Section 404
//SoundManager (SoundManager)
package {
import gunz.*;
import gunz.bullets.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
public class SoundManager {
private var _musicPos:Number;
private var _soundChannelMusic:SoundChannel;
private var _soundtransform:SoundTransform;
private var _soundtransformMusic:SoundTransform;
private var _soundCurrentMusic:Sound;
private var _musicPause:Boolean;// = false
private var _musixVolume:Number;// = 0.4
private var _musicEnabled:Boolean;// = true
private var _globalVolume:Number;// = 0.6
public static const SHOT_MACHINEGUN:Class = sndShot_MACHINE;
public static const CLICK_SHOP_INSERTVEAPON:Class = sndCLICK_SHOP_INSERTVEAPON;
public static const CLICK_CHARCHOOSE_OVER:Class = sndCLICK_CHARCHOOSE_OVER;
public static const ENEMY_DEATH0:Class = sndDie_ENEMY3;
public static const ENEMY_KICK1:Class = sndKick_ENEMY2;
public static const ENEMY_DEATH2:Class = sndDie_ENEMY1;
public static const ENEMY_KICK0:Class = sndKick_ENEMY1;
public static const ENEMY_DEATH1:Class = sndDie_ENEMY2;
public static const ENEMY_KICK2:Class = sndKick_ENEMY3;
public static const SHOT_RIFLE:Class = sndShot_RIFLE;
public static const PLAYER_HIT:Class = sndHit_PLAYER;
public static const SHOT_LASER:Class = sndShot_LASER;
public static const SHOT_PLASMA:Class = sndShot_PLASMA;
public static const RELOAD_ROCKET:Class = sndReload_MACHINE;
public static const RELOAD_SHOTGUN:Class = sndReload_SHOTGUN;
public static const MUSICLIB:Array = [sndMusic0, sndMusic1, sndMusic2, sndMusic3];
public static const PLAYER_HIT_TIOLKA:Class = sndHit_GIRL;
public static const CLICK_MENU_BTN:Class = sndCLICK_MENU_BTN;
public static const SHOT_DUALPISTOL:Class = sndShot_DUAL;
public static const RELOAD_DUALPISTOL:Class = sndReloadPistol;
public static const SHOT_FIRE:Class = sndShot_FIRE;
public static const SHOT_PISTOL:Class = sndShot_PISTOL;
public static const SHOT_SMG:Class = sndShot_SMG;
public static const OTHER_LOSE_LEVEL:Class = sndOtherLoose;
public static const CLICK_SHOP_BTN:Class = sndCLICK_SHOP_BTN;
public static const ANOMALY_APPEAR:Class = sndAnom_START;
public static const PLAYER_DEATH:Class = sndDeath_PLAYER;
public static const EXPLODE_PLASMA:Class = sndEXPLODE_PLASMA;
public static const RELOAD_HEAVY:Class = sndReload_MACHINE;
public static const RELOAD_RIFLE:Class = sndReloadSmg;
public static const RELOAD_SMG:Class = sndReloadSmg;
public static const OTHER_GOTBONUS:Class = sndCLICK_SHOP_INSERTVEAPON;
public static const CLICK_CHARCHOOSE_CLICK:Class = sndCLICK_CHARCHOOSE_CLICK;
public static const EXPLODE0:Class = sndEXPLODE_GRENADE;
public static const EXPLODE1:Class = sndEXPLODE_BUS;
public static const OTHER_WIN_LEVEL:Class = sndOther_WINLEVEL;
public static const ENEMY_HIT0:Class = sndHit_ENEMY3;
public static const ENEMY_HIT1:Class = sndHit_ENEMY2;
public static const ENEMY_HIT2:Class = sndHit_ENEMY1;
public static const CLICK_SHOP_BUY:Class = sndCLICK_SHOP_BUY;
public static const SHOT_SHOTGUN:Class = sndShot_SHOTGUN;
public static const ENEMY_KICKS_ARR:Array = [ENEMY_KICK0, ENEMY_KICK1, ENEMY_KICK2];
public static const SHOT_ROCKET:Class = sndShot_ROCKET;
public static const OTHER_GOTBONUS_BUCKS:Class = sndCLICK_SHOP_INSERTVEAPON;
public static const ENEMY_HITS_ARR:Array = [ENEMY_HIT0, ENEMY_HIT1, ENEMY_HIT2];
public static const ENEMY_DEATHS_ARR:Array = [ENEMY_DEATH0, ENEMY_DEATH1, ENEMY_DEATH2];
public static const SHOT_ELECTRIC:Class = sndShot_ELECTRIC;
public static const PLAYER_DEATH_TIOLKA:Class = sndDeath_PLAYER_GIRL;
public static const RELOAD_PISTOL:Class = sndReloadPistol;
public static const SHOT_THROWING:Class = sndShot_GRENADE;
public static const BUS_CAME:Class = sndBUS_CAME;
public static const RELOAD_MACHINEGUN:Class = sndReload_MACHINE;
private static var _allowInstance:Boolean;
private static var so:SharedObject = SharedObject.getLocal("TikislabBloodFieldSound");
private static var _instance:SoundManager;
private static var soundLoaded:Boolean = false;
public function SoundManager(){
loadSound();
_soundtransform = new SoundTransform(_globalVolume, 0);
_soundtransformMusic = new SoundTransform(_musixVolume, 0);
if (!SoundManager._allowInstance){
throw (new Error("Error: Use SoundManager.inst() instead of the new keyword."));
};
}
public function stopMusic(){
_soundChannelMusic.stop();
}
public function playRandomSound(_arg1:Array){
var _local2:int = (Math.random() * _arg1.length);
var _local3:Class = (_arg1[_local2] as Class);
play(_local3);
}
private function loadSound():void{
if (so.size == 0){
trace("SO SOUND NOT FOUND");
saveSound();
} else {
_globalVolume = Number(so.data.sndfx);
if ((((_globalVolume < 0)) || ((_globalVolume > 1)))){
_globalVolume = 0.6;
};
_musixVolume = Number(so.data.sndmusic);
if ((((_musixVolume < 0)) || ((_musixVolume > 1)))){
_musixVolume = 0.4;
};
soundLoaded = true;
trace("SO SOUND LOADED fx:", _globalVolume, "music:", _musixVolume);
};
}
public function set volume(_arg1:Number){
if ((((_arg1 >= 0)) && ((_arg1 <= 1)))){
_globalVolume = _arg1;
_soundtransform.volume = _globalVolume;
saveSound();
};
}
public function pauseMusic(){
if (_soundChannelMusic != null){
_musicPos = _soundChannelMusic.position;
_musicPause = true;
_soundChannelMusic.stop();
};
}
public function playShot(_arg1:CGunProps){
var _local2:Class;
switch (_arg1.guntype){
case CGunProps.PISTOL:
_local2 = (SHOT_PISTOL as Class);
break;
case CGunProps.DUALPISTOL:
_local2 = (SHOT_DUALPISTOL as Class);
break;
case CGunProps.SMG:
_local2 = (SHOT_SMG as Class);
break;
case CGunProps.RIFLE:
_local2 = (SHOT_RIFLE as Class);
break;
case CGunProps.SHOTGUN:
_local2 = (SHOT_SHOTGUN as Class);
break;
case CGunProps.MACHINEGUN:
_local2 = (SHOT_MACHINEGUN as Class);
break;
case CGunProps.HEAVY:
_local2 = (SHOT_ROCKET as Class);
break;
case CGunProps.THROWING:
_local2 = (SHOT_THROWING as Class);
break;
};
if (_arg1.ammoclass == CBulletElectro){
_local2 = (SHOT_ELECTRIC as Class);
} else {
if (_arg1.ammoclass == CBulletFlamer){
_local2 = (SHOT_FIRE as Class);
} else {
if ((((_arg1.ammoclass == CBulletLaser)) || ((_arg1.ammoclass == CBulletRANDOM)))){
_local2 = (SHOT_ELECTRIC as Class);
} else {
if ((((_arg1.ammoclass == CBulletPlasma)) || ((_arg1.ammoclass == CBulletPlasmaSplashing)))){
_local2 = (SHOT_PLASMA as Class);
};
};
};
};
play(_local2);
}
public function set volumeMusic(_arg1:Number){
if ((((_arg1 >= 0)) && ((_arg1 <= 1)))){
_musixVolume = _arg1;
_soundtransformMusic.volume = _musixVolume;
if (_soundChannelMusic != null){
_soundChannelMusic.soundTransform = _soundtransformMusic;
};
saveSound();
};
}
public function get volume():Number{
return (_globalVolume);
}
private function saveSound():void{
so.data.sndfx = _globalVolume.toString();
so.data.sndmusic = _musixVolume.toString();
trace("SO SOUND SAVED fx:", so.data.sndfx, "music:", so.data.sndmusic);
}
public function get musicEnabled():Boolean{
return (_musicEnabled);
}
public function set musicEnabled(_arg1:Boolean){
if (_musicEnabled){
if (!_arg1){
stopMusic();
};
} else {
if (_arg1){
startMusic();
};
};
_musicEnabled = _arg1;
}
public function unpauseMusic(){
if (((_musicPause) && (_musicEnabled))){
_musicPause = false;
_soundChannelMusic.removeEventListener(Event.SOUND_COMPLETE, handleMusicEnd);
_soundChannelMusic = null;
_soundChannelMusic = _soundCurrentMusic.play(_musicPos, 0, _soundtransformMusic);
_soundChannelMusic.addEventListener(Event.SOUND_COMPLETE, handleMusicEnd, false, 0, true);
};
}
public function playReload(_arg1:CGunProps){
var _local2:Class;
switch (_arg1.guntype){
case CGunProps.PISTOL:
_local2 = (RELOAD_PISTOL as Class);
break;
case CGunProps.DUALPISTOL:
_local2 = (RELOAD_DUALPISTOL as Class);
break;
case CGunProps.SMG:
_local2 = (RELOAD_SMG as Class);
break;
case CGunProps.RIFLE:
_local2 = (RELOAD_RIFLE as Class);
break;
case CGunProps.SHOTGUN:
_local2 = (RELOAD_SHOTGUN as Class);
break;
case CGunProps.MACHINEGUN:
_local2 = (RELOAD_MACHINEGUN as Class);
break;
case CGunProps.HEAVY:
_local2 = (RELOAD_ROCKET as Class);
break;
};
play(_local2);
}
public function startMusic(){
var _local1:Class;
_musicPause = false;
if (_soundChannelMusic != null){
_soundChannelMusic.stop();
_soundChannelMusic = null;
};
if (_musicEnabled){
_local1 = (MUSICLIB[0] as Class);
_soundCurrentMusic = new (_local1);
_soundChannelMusic = _soundCurrentMusic.play(0, 0, _soundtransformMusic);
_soundChannelMusic.addEventListener(Event.SOUND_COMPLETE, handleMusicEnd, false, 0, true);
};
}
public function play(_arg1:Class):SoundChannel{
var _local2:Sound;
var _local3:SoundChannel;
if (_arg1 != null){
_local2 = new (_arg1);
_local3 = _local2.play(0, 0, _soundtransform);
} else {
return (null);
};
return (_local3);
}
public function get volumeMusic():Number{
return (_musixVolume);
}
private function handleMusicEnd(_arg1:Event){
var _local2:int;
var _local3:Class;
if (_musicEnabled){
_local2 = (Math.random() * MUSICLIB.length);
_soundChannelMusic.removeEventListener(Event.SOUND_COMPLETE, handleMusicEnd);
_soundChannelMusic = null;
_local3 = (MUSICLIB[_local2] as Class);
_soundCurrentMusic = new (_local3);
_soundChannelMusic = _soundCurrentMusic.play(0, 0, _soundtransformMusic);
_soundChannelMusic.addEventListener(Event.SOUND_COMPLETE, handleMusicEnd, false, 0, true);
};
}
public static function inst():SoundManager{
if (SoundManager._instance == null){
SoundManager._allowInstance = true;
SoundManager._instance = new (SoundManager);
SoundManager._allowInstance = false;
};
return (SoundManager._instance);
}
}
}//package
Section 405
//sponsorMoreGamesMC (sponsorMoreGamesMC)
package {
import flash.display.*;
import flash.events.*;
public class sponsorMoreGamesMC extends MovieClip {
public var i_logo:MovieClip;
public var i_btn:SimpleButton;
private var logo:MovieClip;
private var btn:SimpleButton;
public function sponsorMoreGamesMC(){
btn = (i_btn as SimpleButton);
logo = (i_logo as MovieClip);
btn.addEventListener(MouseEvent.CLICK, handleClick);
logo.addEventListener(MouseEvent.CLICK, handleClick);
}
private function handleClick(_arg1:MouseEvent){
SponsorStuff.openMoreGames();
}
}
}//package
Section 406
//sponsorMoreGamesMCLoose (sponsorMoreGamesMCLoose)
package {
public dynamic class sponsorMoreGamesMCLoose extends sponsorMoreGamesMC {
}
}//package
Section 407
//SponsorStuff (SponsorStuff)
package {
import flash.events.*;
import flash.net.*;
public class SponsorStuff extends EventDispatcher {
public static const MORE_GAMES_URL:String = "http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=bloodfield&utm_source=domain.com&utm_content=ingame";
public static const VIEW_SCORE_URL:String = "http://www.playhub.com/highscores.php?gid=1900";
public static const SEND_SCORE_URL:String = "http://www.playhub.com/highscores.php?gid=1900";
private static function openHandler(_arg1:Event):void{
}
public static function openMoreGames(){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
navigateToURL(new URLRequest(MORE_GAMES_URL), "_blank");
}
public static function sendScore(_arg1:String, _arg2:String){
var playerName = _arg1;
var playerScore = _arg2;
var request:URLRequest = new URLRequest(SEND_SCORE_URL);
request.method = URLRequestMethod.POST;
var variables:URLVariables = new URLVariables();
variables.gameid = CLocale.GAME_NAME;
variables.userid = playerName;
variables.score = playerScore;
variables.gamemode = "";
trace(("SCORE VARS " + variables.toString()));
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
configureListeners(loader);
try {
loader.load(request);
} catch(error:Error) {
trace("Unable to load requested document.");
};
}
public static function openScoreView(){
navigateToURL(new URLRequest(VIEW_SCORE_URL), "_blank");
}
private static function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("SENDioErrorHandler: " + _arg1));
}
private static function completeHandler(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
trace(("SENDcompleteHandler: " + _local2.data));
trace("complete");
SponsorStuff.openScoreView();
}
private static function httpStatusHandler(_arg1:HTTPStatusEvent):void{
}
private static function configureListeners(_arg1:IEventDispatcher):void{
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(Event.OPEN, openHandler);
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_arg1.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
private static function securityErrorHandler(_arg1:SecurityErrorEvent):void{
trace(("SENDsecurityErrorHandler: " + _arg1));
}
private static function progressHandler(_arg1:ProgressEvent):void{
}
}
}//package
Section 408
//sprBgHelp1 (sprBgHelp1)
package {
import flash.display.*;
public dynamic class sprBgHelp1 extends MovieClip {
}
}//package
Section 409
//sprBgHelp2 (sprBgHelp2)
package {
import flash.display.*;
public dynamic class sprBgHelp2 extends MovieClip {
}
}//package
Section 410
//sprBgHelp3 (sprBgHelp3)
package {
import flash.display.*;
public dynamic class sprBgHelp3 extends MovieClip {
}
}//package
Section 411
//sprIfcBg (sprIfcBg)
package {
import flash.display.*;
public dynamic class sprIfcBg extends Sprite {
}
}//package
Section 412
//Street_bus_1 (Street_bus_1)
package {
import enemies.*;
public dynamic class Street_bus_1 extends CEnemyBus {
public function Street_bus_1(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 413
//Street_bus_2 (Street_bus_2)
package {
import enemies.*;
public dynamic class Street_bus_2 extends CEnemyBus {
public function Street_bus_2(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 414
//Street_bus_3 (Street_bus_3)
package {
import enemies.*;
public dynamic class Street_bus_3 extends CEnemyBus {
public function Street_bus_3(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 415
//submitScoreScr (submitScoreScr)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class submitScoreScr extends MovieClip {
private var plName:String;
private var txt:TextField;
public var i_yes:SimpleButton;
private var btNo:SimpleButton;
private var btYes:SimpleButton;
private var plScore:int;
public var i_no:SimpleButton;
public var i_txt:TextField;
public function submitScoreScr(_arg1:String, _arg2:int){
btNo = (i_no as SimpleButton);
btYes = (i_yes as SimpleButton);
txt = (i_txt as TextField);
plName = _arg1;
plScore = _arg2;
txt.text = _arg2.toString();
btNo.addEventListener(MouseEvent.CLICK, handleNo, false, 0, true);
btYes.addEventListener(MouseEvent.CLICK, handleYes, false, 0, true);
}
private function handleNo(_arg1:MouseEvent){
parent.removeChild(this);
}
private function handleYes(_arg1:MouseEvent){
SponsorStuff.sendScore(plName, plScore.toString());
parent.removeChild(this);
}
}
}//package
Section 416
//Submitter (Submitter)
package {
import character.*;
import flash.events.*;
import flash.net.*;
public class Submitter extends EventDispatcher {
private static const EVT_SUCCESS:String = "success submittiong";
private static const EVT_ERROR:String = "someError submittiong";
private static var _instance:Submitter;
private static var _allowInstance:Boolean;
public function Submitter(){
if (!Submitter._allowInstance){
throw (new Error("Error: Use Submitter.inst instead of the new keyword."));
};
}
private function configureListeners(_arg1:IEventDispatcher):void{
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(Event.OPEN, openHandler);
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_arg1.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
private function completeHandler(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
trace(("SENDcompleteHandler: " + _local2.data));
trace(_local2.data.hash);
trace("complete");
if (_local2.data.hash == "666"){
dispatchEvent(new Event(EVT_SUCCESS));
trace("Successfully sent");
};
}
private function securityErrorHandler(_arg1:SecurityErrorEvent):void{
trace(("SENDsecurityErrorHandler: " + _arg1));
dispatchEvent(new Event(EVT_ERROR));
}
private function httpStatusHandler(_arg1:HTTPStatusEvent):void{
}
public function sendStatisticsPrecise(_arg1:String="--", _arg2:String="--", _arg3:String="--", _arg4:String="--", _arg5:String="--", _arg6:String="--", _arg7:String="--", _arg8:String="--", _arg9:String="--", _arg10:String="--", _arg11:String="--"){
var _evt = _arg1;
var _name = _arg2;
var _level = _arg3;
var _char = _arg4;
var _money = _arg5;
var _kills = _arg6;
var _shots = _arg7;
var _hits = _arg8;
var _totaltime = _arg9;
var _score = _arg10;
var _gunz = _arg11;
var presets:Array = ["1 - Vinnie", "2 - Hulk", "3 - Neo", "4 - Jay", "5 - bruce", "6 - Emo"];
var arr:Array = new Array();
arr[0] = _evt;
arr[1] = _name;
arr[2] = _level;
arr[3] = _char;
try {
arr[3] = presets[int(_char)];
} catch(e:Error) {
};
arr[4] = _money;
arr[5] = _kills;
arr[6] = _shots;
arr[7] = _hits;
arr[8] = _totaltime;
arr[9] = _score;
arr[10] = _gunz;
sendPlayer(arr);
}
public function sendStatistic(_arg1:String, _arg2:CInventory, _arg3:CStats){
var str:String;
var _evt = _arg1;
var _inv = _arg2;
var _stats = _arg3;
var presets:Array = ["1 - Vinnie", "2 - Hulk", "3 - Neo", "4 - Jay", "5 - bruce", "6 - Emo"];
var arr:Array = new Array();
arr[0] = _evt;
arr[1] = _stats.player_name;
arr[2] = _stats.player_level;
arr[3] = _stats.charPreset;
try {
str = ((presets[int(_stats.charPreset)] + " ") + _stats.getCurrentStatsStr());
arr[3] = str;
} catch(e:Error) {
};
arr[4] = _inv.money;
arr[5] = _stats.st_kills;
arr[6] = _stats.st_shots;
arr[7] = _stats.st_hits;
arr[8] = _stats.sT_totaltime;
arr[9] = _stats.score;
var gunzstr = "GUNZ:";
gunzstr = (gunzstr + (_inv.weapon1.props.name + "; "));
gunzstr = (gunzstr + (_inv.weapon2.props.name + "; "));
gunzstr = (gunzstr + (_inv.weapon3.props.name + "; "));
gunzstr = (gunzstr + (_inv.weapon4.props.name + "; "));
gunzstr = (gunzstr + " AMMO:");
gunzstr = (gunzstr + (("1:" + _inv.ammoStorage.getAmmoByName(_inv.weapon2.props.ammotype).ammoCount) + "; "));
gunzstr = (gunzstr + (("2:" + _inv.ammoStorage.getAmmoByName(_inv.weapon3.props.ammotype).ammoCount) + "; "));
gunzstr = (gunzstr + (("g:" + _inv.ammoStorage.getAmmoByName(_inv.weapon4.props.ammotype).ammoCount) + "; "));
arr[10] = gunzstr;
sendPlayer(arr);
}
public function sendPlayer(_arg1:Array){
var vars = _arg1;
var request:URLRequest = new URLRequest("http://bf.tikislab.com/stat.php?set=stat");
request.method = URLRequestMethod.POST;
var variables:URLVariables = new URLVariables();
variables.variable1 = "-";
variables.variable2 = "-";
variables.variable3 = "-";
variables.variable4 = "-";
variables.variable5 = "-";
variables.variable6 = "-";
variables.variable7 = "-";
variables.variable8 = "-";
variables.variable9 = "-";
variables.variable10 = "-";
variables.variable11 = "-";
variables.variable1 = vars[0];
variables.variable2 = vars[1];
variables.variable3 = vars[2];
variables.variable4 = vars[3];
variables.variable5 = vars[4];
variables.variable6 = vars[5];
variables.variable7 = vars[6];
variables.variable8 = vars[7];
variables.variable9 = vars[8];
variables.variable10 = vars[9];
variables.variable11 = vars[10];
trace(("VARS " + variables.toString()));
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
configureListeners(loader);
try {
loader.load(request);
} catch(error:Error) {
trace("Unable to load requested document.");
};
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("SENDioErrorHandler: " + _arg1));
dispatchEvent(new Event(EVT_ERROR));
}
private function progressHandler(_arg1:ProgressEvent):void{
}
private function openHandler(_arg1:Event):void{
}
public static function get inst():Submitter{
if (Submitter._instance == null){
Submitter._allowInstance = true;
Submitter._instance = new (Submitter);
Submitter._allowInstance = false;
};
return (Submitter._instance);
}
}
}//package
Section 417
//trase1_lev_anim (trase1_lev_anim)
package {
import animations.*;
public dynamic class trase1_lev_anim extends LevelAnimDelayedAbs {
public function trase1_lev_anim(){
addFrameScript(229, frame230);
}
function frame230(){
stop();
}
}
}//package
Section 418
//trase2_lev_anim (trase2_lev_anim)
package {
import animations.*;
public dynamic class trase2_lev_anim extends LevelAnimDelayedAbs {
public function trase2_lev_anim(){
addFrameScript(212, frame213);
}
function frame213(){
stop();
}
}
}//package
Section 419
//TrueMadnessGame (TrueMadnessGame)
package {
import flash.display.*;
import gunz.*;
import itemz.*;
import character.*;
import levels.*;
import gunz.bullets.*;
import flash.geom.*;
import flash.events.*;
import enemies.*;
import fl.transitions.*;
import Bonuses.*;
import flash.text.*;
import fl.motion.easing.*;
import flash.utils.*;
import anomalies.*;
import animations.*;
import flash.ui.*;
import fl.transitions.easing.*;
public class TrueMadnessGame extends MovieClip {
private var bonusprobabilityMEDIKIT:Number;// = 0.8
private var clipmax:int;// = 100
private var difx;
private var dify:int;
private var splashing:Boolean;// = false
private var bonusprobabilityARMORHEAVY:Number;// = 0.05
private var aPanel:CArmorPanel;
private var isDangers:Boolean;// = false
private var bonusprobabilityARMOR:Number;// = 0.04
private var automatic:Boolean;// = false
private var scrolled:Boolean;// = false
private var bulhitax;
private var bulhitay:Number;
private var totalaccuracy:Number;
private var slowing:Boolean;// = false
private var maxenemies:int;// = 25
private var charMinYStage:int;// = 160
private var bo:Array;
private var scrYold:int;
private var bu:Array;
private var stat:CStats;
private var pauseScr:Sprite;
private var sp:Array;
private var st_hits:int;// = 0
private var c:int;
private var i;
private var j;
private var BucksTotal:int;// = 0
private var bonusprobabilityARMORLIGHT:Number;// = 0.8
private var h:Boolean;
private var txt:TextField;
private var tf:TextFormat;
private var shellsangle:Number;// = 0
private var FPTpr:int;// = 0
private var scrX;
private var scrY;
private var bul:CBulletAbstract;
private var inventoryLoaded:Boolean;// = false
private var k;
private var bulletspeed:int;// = 35
private var tfBucks:TextFormat;
private var bonusprobabilitybase:Number;// = 0.14
private var killed:Boolean;// = false
private var levelLooseScreen:LooseScreenAbs;
private var playerluckmodifierbucks:Number;
private var playerreloadmodifier:Number;
private var radius:Number;// = 20
private var damage_max:int;// = 50
private var ed:Array;
private var en:Array;
private var bmpBg:Bitmap;
private var FPST:Timer;
private var shotpausemax:int;// = 1
private var prevslot:int;// = 0
private var bonusprobability:Number;
private var mouseonscreen:Boolean;// = false
private var MessageStart:String;// = ""
private var charxS;
private var incubator:CMonsterIncubator;
private var bonusprobabilityBUCKS:Number;// = 0.8
private var playerdead;// = false
private var bulsqx;
private var FPT:int;// = 0
private var darkness:Boolean;// = false
private var FPS:int;// = 0
private var bulsqy;
private var spawnLocProb:Array;
private var layerDanger:Sprite;
private var arrowToMonster:ArrowToMonster;
private var playeraccuracy:Number;
private var startpause:int;// = 110
private var _iWantTocontinue:Boolean;// = false
private var playerspeedmodifier:Number;
private var bonusprobabilityARMORMEDIUM:Number;// = 0.15
private var charyS:Number;
private var repausemax:int;// = 30
private var charGy;
private var playerluckmodifier:Number;
private var enj:CEnemyAbstract;
private var currentslot:int;// = 0
private var anomalyProb:Number;// = 0.001
private var accuracy:Number;// = 4
private var btnPause:SimpleButton;
private var lPanel:CLifePanel;
private var tiolkaGx;
private var tiolkaGy:Number;
private var charGx;
private var bonusprobabilityMEDIKITFULL:Number;// = 0.2
private var deathcount:uint;// = 0
private var child:Sprite;
private var anomaliesList:ObjectList;
private var thisstage:Stage;
private var penetrating:Boolean;// = false
private var scrollX;
private var scrollY:Number;
private var paused:Boolean;// = false
private var squaretest:Boolean;
private var layerKick:MovieClip;
private var levelDoneScreen:EndLevelScreen;
private var charMaxXStage:int;// = 440
private var range:int;// = 500
private var layerDarkness:Sprite;
private var shotpause:int;// = 0
private var txtBucks:TextField;
private var nextEnemyProb:Number;// = 0.9
private var throwing:Boolean;// = false
private var FPmin:int;// = 30
private var layerBG:Sprite;
private var clip:int;// = 100
private var spawnLocProbAbs:Array;
private var inventory:CInventory;
private var char:CChar;
private var anomalyMax:int;// = 0
private var st_shots:int;// = 0
private var arrowToM_enabled:Boolean;// = false
private var shadowness:Boolean;// = false
private var currentWeaponProps:CGunProps;
private var layerScroll:Sprite;
private var damage_min:int;// = 30
private var statsLoaded:Boolean;// = false
private var allEnemiesDown:Boolean;// = false
private var dangersArray:Array;
private var shootin:Boolean;// = false
private var tiolkax;
private var spawnLocArray:Array;
private var pershot:int;// = 1
private var tiolkay;
private var thetiolka:CEnemyTiolkaFriend;
private var btnExit:SimpleButton;
private var BonusNarcotixTime:int;// = 0
private var bmdBg:BitmapData;
private var layerInfo:Sprite;
private var layerAnimations:Sprite;
private var anomalyClasses:Array;
private var pauseMenuBtn:SimpleButton;
private var bulletdecoy:Number;// = 0.1
private var currentlevel:int;// = 1
private var BucksDeviation:Number;// = 0.5
private var charMinXStage:int;// = 160
private var isTiolka:Boolean;// = false
private var bonusprobabilityNARCOTIX:Number;// = 0.06
private var bulletclass:Class;
private var scrollspeedmax:Number;// = 3
private var repause:int;// = 0
private var enjx;
private var enjy:Number;
private var obstacles:ObjectList;
private var layerTrees:Sprite;
private var wPanel:CWeaponPanel;
private var layerShadow:Sprite;
private var bonusprobabilityMEDI:Number;// = 0.1
private var scrollacceleration:Number;// = 0.2
private var isZF:Boolean;// = false
private var layerWar:Sprite;
private var charMaxYStage:int;// = 300
private var inittime:Number;
private var bns:CBonusAbstract;
private var charx;
private var pauseTime:Number;// = 0
private var blurrySpr:Sprite;
private var chary;
private var scrXold;
private var pauseinitTime:Number;// = 0
private var playerhpbase:int;
private var scrollspeedX:Number;// = 0
private var scrollspeedY:Number;// = 0
public function TrueMadnessGame(_arg1:CLevelProperties){
txt = new TextField();
tf = new TextFormat("_sans", 14, 0xFFFF00, true);
txtBucks = new TextField();
tfBucks = new TextFormat("_sans", 10, 0xFFFF00);
btnPause = new btnHUD_Pause();
btnExit = new btnHUD_exit();
en = new Array();
bu = new Array();
ed = new Array();
sp = new Array();
bo = new Array();
obstacles = new ObjectList();
anomaliesList = new ObjectList();
anomalyClasses = [Anomalia_1, Anomalia_2, Anomalia_3, Anomalia_4];
spawnLocArray = [new CSpawnLocation(0, 0, 860, 0), new CSpawnLocation(0, 760, 860, 760), new CSpawnLocation(0, 0, 0, 760), new CSpawnLocation(860, 0, 860, 760)];
spawnLocProb = [0.1, 0.1, 0.2, 0.6];
spawnLocProbAbs = [0.1, 0.2, 0.4, 1];
dangersArray = new Array();
layerKick = new mc_Kicked_clip();
layerDarkness = new mcDarkness();
layerShadow = new Sprite();
layerAnimations = new Sprite();
layerTrees = new Sprite();
layerInfo = new Sprite();
layerWar = new Sprite();
layerBG = new Sprite();
bmpBg = new Bitmap();
layerDanger = new Sprite();
bulletclass = CBulletBullet;
bonusprobability = (bonusprobabilitybase * playerluckmodifier);
layerScroll = new Sprite();
pauseScr = new PauseScreen();
arrowToMonster = new ArrowToMonster();
FPST = new Timer(1000);
super();
trace("--------- NEW LEVEL CREATED: ", _arg1.levelNumberStr);
currentlevel = (_arg1.levelNumber + 1);
darkness = _arg1.DarkLevel;
incubator = _arg1.incubator;
bmpBg.bitmapData = _arg1.levelBackGroundBitmap;
bmpBg.bitmapData.draw(_arg1.helpMessageSpr, new Matrix(1, 0, 0, 1, 470, 200), null, "overlay");
var _local2:Number = _arg1.asphaltMessagePoint.x;
var _local3:Number = _arg1.asphaltMessagePoint.y;
bmpBg.bitmapData.draw(_arg1.asphaltMessage, new Matrix(1, 0, 0, 1, _local2, _local3));
layerTrees = _arg1.levelTreesLayer;
shadowness = _arg1.ShadyLevel;
layerShadow = _arg1.levelShadowLayer;
layerAnimations = _arg1.levelAnimations;
MessageStart = ((_arg1.levelNumberStr + "\n") + _arg1.levelIntroStr);
maxenemies = _arg1.maxEnemiesOnScreen;
nextEnemyProb = _arg1.nextEnemyProb;
isDangers = _arg1.isThereDangerAnimations;
if (isDangers){
layerDanger = _arg1.levelDangerAnimationsClip;
dangersArray = _arg1.levelDangerAnimations;
};
anomalyProb = _arg1.anomaliesProb;
anomalyMax = _arg1.anomaliesMax;
isTiolka = _arg1.theTiolkaFriend;
pauseMenuBtn = (pauseScr.getChildByName("i_btn_menu") as SimpleButton);
pauseScr.getChildByName("i_clickable").addEventListener(MouseEvent.CLICK, handlePauseClick, false, 0, true);
pauseScr.getChildByName("i_clickable_button").addEventListener(MouseEvent.CLICK, handlePauseClick, false, 0, true);
pauseMenuBtn.addEventListener(MouseEvent.CLICK, handlePauseMenuClick, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_WHEEL, handleMouseWheel);
var _local4:Number = 200;
var _local5:Number = 200;
switch (_arg1.levelSourceClass){
case LevelSource_Yard:
_local4 = 350;
_local5 = 350;
break;
case LevelSource_Museum:
_local4 = 350;
_local5 = 150;
break;
case LevelSource_Parking:
_local4 = 180;
_local5 = 300;
break;
case LevelSource_Street:
_local4 = 450;
_local5 = 270;
break;
case LevelSource_Park:
_local4 = 200;
_local5 = 200;
break;
};
char = new CChar(_local4, _local5);
}
private function showLooseMan(){
levelLooseScreen = new mc_manDie();
showLooseGeneric();
}
private function handleLevelDoneScreen(_arg1:Event){
levelDone();
}
private function handleMouseWheel(_arg1:MouseEvent){
if (_arg1.delta < -1){
nextWeapon();
} else {
if (_arg1.delta > 1){
prevWeapon();
};
};
}
private function debugListWarLayerObjects(){
var nm:String;
var arr:Array = new Array();
var i:int;
while (i < layerWar.numChildren) {
arr[i] = layerWar.getChildAt(i);
nm = "";
try {
nm = arr[i].name;
} catch(e:Error) {
};
if ((arr[i] is CBulletAbstract)){
trace("obj", i, ":", arr[i], getQualifiedClassName(arr[i]), "DAMAGE:", arr[i].damage);
} else {
trace("obj", i, ":", arr[i], getQualifiedClassName(arr[i]), "name:", nm);
};
i = (i + 1);
};
trace("LIST SHOWED");
}
private function updateStatTotalTime(){
stat.sT_totaltime = (stat.sT_totaltime + ((new Date().time - inittime) - pauseTime));
}
private function handleLooseContinue(_arg1:Event){
removeLooseGeneric();
_iWantTocontinue = true;
gameover();
}
private function setRedScreen(){
SoundManager.inst().play(SoundManager.OTHER_LOSE_LEVEL);
}
private function eframe(_arg1:Event){
var _local3:int;
var _local4:int;
var _local5:MovieClip;
var _local6:CEnemyBus;
var _local7:CBulletSplashing;
var _local8:CBulletSplashAbstract;
var _local9:int;
var _local10:CEnemyBus;
var _local11:CBulletSplashing;
var _local12:Boolean;
var _local13:Boolean;
var _local14:Boolean;
var _local15:CBulletSplashing;
var _local16:CDeathClip;
var _local17:Sprite;
var _local18:Sprite;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Matrix;
var _local23:CEnemyBus;
var _local24:Matrix;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:MovieClip;
var _local30:int;
var _local31:LevelAnimDelayedDangerAbs;
var _local32:int;
var _local33:AnomaliaAbstract;
var _local34:Sprite;
var _local35:int;
var _local36:AnomaliaAbstract;
FPS++;
shotpause++;
var _local2:CGunProps = inventory.getWeaponByNr(currentslot).props;
if (_local2.clip == 0){
_local2.repause++;
if (_local2.repause > repausemax){
_local2.clip = _local2.clipmax;
if (currentslot != 0){
_local3 = inventory.getWeaponAmmoByProps(_local2);
if (_local3 < _local2.clipmax){
_local2.clip = _local3;
};
};
_local2.repause = 0;
wPanel.updateClip();
char.ReloadIndicatorRemove();
};
};
if (((shootin) && (!((_local2.clip == 0))))){
if (shotpause > shotpausemax){
_local2.clip--;
wPanel.updateClip();
shot();
if (!automatic){
shootin = false;
};
if (_local2.clip == 0){
char.reload();
char.ReloadIndicatorSet(repausemax);
SoundManager.inst().playReload(currentWeaponProps);
};
};
};
startpause--;
if (startpause == 0){
_local4 = maxenemies;
while (_local4 > 0) {
enemygenerator();
_local4--;
};
} else {
if (startpause < 0){
if (Math.random() > nextEnemyProb){
enemygenerator();
};
if (Math.random() < anomalyProb){
newAnomaly();
};
};
};
if (startpause < 0){
if (arrowToM_enabled){
arrowToMonster.x = char.x;
arrowToMonster.y = char.y;
};
if (en.length < 2){
_local5 = null;
if (en.length == 0){
if (incubator.buses.count > 0){
_local6 = (incubator.buses.getItem(_local9) as CEnemyBus);
if (_local6.isReadyToDeliver){
_local5 = _local6;
};
};
} else {
_local5 = en[0];
};
if (_local5 != null){
arrowToMonster.aim(_local5.x, _local5.y);
if (!arrowToM_enabled){
arrowToM_enabled = true;
layerWar.addChild(arrowToMonster);
};
} else {
if (arrowToM_enabled){
arrowToM_enabled = false;
layerWar.removeChild(arrowToMonster);
};
};
} else {
if (arrowToM_enabled){
arrowToM_enabled = false;
layerWar.removeChild(arrowToMonster);
};
};
};
scrollX = layerScroll.x;
scrollY = layerScroll.y;
charx = char.x;
chary = char.y;
charGx = (charx + scrollX);
charGy = (chary + scrollY);
if (isTiolka){
tiolkax = thetiolka.x;
tiolkay = thetiolka.y;
tiolkaGx = (tiolkax + scrollX);
tiolkaGy = (tiolkay + scrollY);
};
_local4 = (bu.length - 1);
while (_local4 > -1) {
bul = bu[_local4];
if (bul.damage < 1){
if (bul.props.splash){
_local7 = CBulletSplashing(bul);
_local8 = _local7.splash;
bu[_local4] = _local8;
layerWar.addChild(_local8);
if ((((_local8 is CBulletSplashPlasma)) || ((_local8 is CBulletSplashElectro)))){
SoundManager.inst().play(SoundManager.EXPLODE_PLASMA);
} else {
SoundManager.inst().play(SoundManager.EXPLODE0);
};
} else {
bu.splice(_local4, 1);
};
} else {
if ((bul is CBulletSplashAbstract)){
j = (en.length - 1);
while (j > -1) {
enj = en[j];
enjx = (enj.x + scrollX);
enjy = (enj.y + scrollY);
if (bul.hitTestPoint(enjx, enjy, true)){
checkenemydeath((bul.alive * bul.damage));
};
j--;
};
_local9 = incubator.buses.count;
while (_local9 > 0) {
_local9--;
_local10 = (incubator.buses.getItem(_local9) as CEnemyBus);
if (_local10.isReadyToDeliver){
if (((_local10.hitTestObject(bul)) && (_local10.isAlive))){
_local10.hit((bul.alive * bul.damage));
if (!_local10.isAlive){
ed.push(_local10);
SoundManager.inst().play(SoundManager.EXPLODE1);
obstacles.removeObject(_local10.busObstacle);
layerWar.removeChild(_local10.busObstacle);
};
h = true;
break;
};
};
};
} else {
if (!throwing){
bul.comsquare();
bulsqx = bul.sqx;
bulsqy = bul.sqy;
k = (bul.hita.length - 1);
while (k > -1) {
h = false;
bulhitax = (bul.hita[k].x + scrollX);
bulhitay = (bul.hita[k].y + scrollY);
if ((((((((bulsqx > 22)) || ((bulsqx < 0)))) || ((bulsqy > 19)))) || ((bulsqy < 0)))){
bul.removeit();
bu.splice(_local4, 1);
break;
};
_local9 = incubator.buses.count;
while (_local9 > 0) {
_local9--;
_local10 = (incubator.buses.getItem(_local9) as CEnemyBus);
if (_local10.isReadyToDeliver){
if (((_local10.hitTestPoint(bulhitax, bulhitay, true)) && (_local10.isAlive))){
_local10.hit((bul.alive * bul.damage));
bul.damageNull();
bul.hit(10000);
if (bul.props.splash){
_local11 = CBulletSplashing(bul);
bu[_local4] = _local11.splash;
layerWar.addChild(bu[_local4]);
} else {
bu.splice(_local4, 1);
};
if (!_local10.isAlive){
ed.push(_local10);
SoundManager.inst().play(SoundManager.EXPLODE1);
obstacles.removeObject(_local10.busObstacle);
layerWar.removeChild(_local10.busObstacle);
};
h = true;
break;
};
};
};
j = (en.length - 1);
while (j > -1) {
enj = en[j];
enjx = (enj.x + scrollX);
enjy = (enj.y + scrollY);
difx = (bulsqx - enj.sqx);
dify = (bulsqy - enj.sqy);
squaretest = (((((difx ^ (difx >> 31)) - (difx >> 31)) < 2)) && ((((dify ^ (dify >> 31)) - (dify >> 31)) < 2)));
if (squaretest){
_local12 = false;
if ((bul is CBulletRocketSpecial)){
_local12 = true;
CBulletRocketSpecial(bul).goGoMonster(enj.x, enj.y);
};
_local13 = false;
_local14 = bul.pointhit;
if (_local14){
_local13 = ((enj.hitTestPoint(bulhitax, bulhitay)) || (_local12));
} else {
_local13 = bul.hitTestPoint(enjx, enjy);
};
if (_local13){
st_hits++;
checkenemydeath((bul.alive * bul.damage));
if (bul.hit(enj.hpdestroyed) < 1){
if (bul.props.splash){
_local15 = CBulletSplashing(bul);
bu[_local4] = _local15.splash;
layerWar.addChild(bu[_local4]);
} else {
bu.splice(_local4, 1);
};
if (_local14){
h = true;
break;
};
};
if (bul.props.penetrating){
h = true;
break;
};
};
};
j--;
};
if (h){
break;
};
k--;
};
};
};
};
_local4--;
};
_local4 = (bo.length - 1);
while (_local4 > -1) {
bns = bo[_local4];
if (bns.Expired){
bo.splice(_local4, 1);
} else {
if (bns.hitTestObject(char)){
setBonus(bns.Bonus);
bns.pickedup();
bo.splice(_local4, 1);
break;
};
};
_local4--;
};
_local4 = (ed.length - 1);
while (_local4 > -1) {
if ((ed[_local4] is CDeathClip)){
_local16 = (ed[_local4] as CDeathClip);
if (_local16.completed){
layerBG.removeChild(_local16);
ed.splice(_local4, 1);
_local17 = _local16.finalClip;
_local18 = _local16.finalBody;
_local19 = ((_local17.rotation * Math.PI) / 180);
_local20 = Math.sin(_local19);
_local21 = Math.cos(_local19);
_local22 = new Matrix(_local21, _local20, -(_local20), _local21, _local16.x, _local16.y);
bmpBg.bitmapData.draw(_local18, _local22, null, "normal");
bmpBg.bitmapData.draw(_local17, _local22, null, "overlay");
};
} else {
if ((ed[_local4] is CEnemyBus)){
_local23 = (ed[_local4] as CEnemyBus);
if (_local23.isFinished){
_local24 = new Matrix(1, 0, 0, 1, _local23.x, _local23.y);
bmpBg.bitmapData.draw(_local23, _local24, null, "normal");
layerWar.removeChild(_local23);
ed.splice(_local4, 1);
_local23.destruct();
};
};
};
_local4--;
};
charxS = (char.x + scrX);
charyS = (char.y + scrY);
if (charxS < charMinXStage){
scrollspeedX = (scrollspeedX + scrollacceleration);
if (scrollspeedX > scrollspeedmax){
scrollspeedX = scrollspeedmax;
};
scrX = (scrX + scrollspeedX);
if (scrX > 12){
scrX = 12;
scrollspeedX = 0;
};
} else {
if (charxS > charMaxXStage){
scrollspeedX = (scrollspeedX - scrollacceleration);
if (scrollspeedX < -(scrollspeedmax)){
scrollspeedX = -(scrollspeedmax);
};
scrX = (scrX + scrollspeedX);
if (scrX < -152){
scrX = -152;
scrollspeedX = 0;
};
} else {
scrollspeedX = 0;
};
};
if (charyS < charMinYStage){
scrollspeedY = (scrollspeedY + scrollacceleration);
if (scrollspeedY > scrollspeedmax){
scrollspeedY = scrollspeedmax;
};
scrY = (scrY + scrollspeedY);
if (scrY > 12){
scrY = 12;
scrollspeedY = 0;
};
} else {
if (charyS > charMaxYStage){
scrollspeedY = (scrollspeedY - scrollacceleration);
if (scrollspeedY < -(scrollspeedmax)){
scrollspeedY = -(scrollspeedmax);
};
scrY = (scrY + scrollspeedY);
if (scrY < -204){
scrY = -204;
scrollspeedY = 0;
};
} else {
scrollspeedY = 0;
};
};
scrolled = false;
if (int(scrX) != scrXold){
layerScroll.x = int(scrX);
scrXold = int(scrX);
scrolled = true;
};
if (int(scrY) != scrYold){
layerScroll.y = int(scrY);
scrYold = int(scrY);
scrolled = true;
};
if (scrolled){
_local25 = (mouseX - scrollX);
_local26 = (mouseY - scrollY);
char.aim(_local25, _local26);
};
if (darkness){
layerDarkness.x = char.x;
layerDarkness.y = char.y;
layerDarkness.rotation = (char.rotation + 90);
};
if (FPmin > FPT){
FPmin = FPT;
};
if (!allEnemiesDown){
if ((((((en.length == 0)) && (!(incubator.isNext)))) && ((ed.length == 0)))){
allEnemiesDown = true;
showLevelDoneScreen();
SoundManager.inst().play(SoundManager.OTHER_WIN_LEVEL);
};
};
_local4 = (en.length - 1);
while (_local4 > -1) {
enj = en[_local4];
enj.aim(charx, chary, obstacles);
enj.comsquare();
_local27 = (enj.x + scrollX);
_local28 = (enj.y + scrollY);
if (enj.hitTestPoint(charGx, charGy)){
if (!enj.kicking){
enj.kickAss();
SoundManager.inst().playRandomSound(SoundManager.ENEMY_KICKS_ARR);
} else {
if (enj.KICK){
if (checkPlayerKick(enj.Damage)){
break;
};
};
};
} else {
if (isTiolka){
if (enj.hitTestPoint(tiolkaGx, tiolkaGy)){
if (!enj.kicking){
enj.kickAss();
SoundManager.inst().playRandomSound(SoundManager.ENEMY_KICKS_ARR);
} else {
if (enj.KICK){
if (thetiolka.gotshot(enj.Damage)){
SoundManager.inst().play(SoundManager.PLAYER_DEATH_TIOLKA);
layerWar.removeChild(thetiolka);
_local29 = new mcCorpseGirl();
_local29.x = tiolkax;
_local29.y = tiolkay;
_local29.rotation = thetiolka.rotation;
layerBG.addChild(_local29);
removeEventListener(MouseEvent.MOUSE_MOVE, handlerMouseMove);
removeEventListener(MouseEvent.MOUSE_DOWN, handlerMouseDown);
removeEventListener(MouseEvent.MOUSE_MOVE, handlerMouseUp);
removeEventListener(Event.ENTER_FRAME, eframe);
FPST.stop();
playerdead = true;
setRedScreen();
showLooseGirl();
break;
} else {
SoundManager.inst().play(SoundManager.PLAYER_HIT_TIOLKA);
};
};
};
};
} else {
if (isDangers){
_local30 = dangersArray.length;
while (_local30 > 0) {
_local30--;
_local31 = (dangersArray[_local30] as LevelAnimDelayedDangerAbs);
if (_local31.isRunning){
if (_local31.hitA.hitTestPoint(_local27, _local28, true)){
enj.gotshot(1000000);
addEnemyDeath(enj, 0);
en.splice(_local4, 1);
};
};
};
};
};
};
if (anomaliesList.count > 0){
_local32 = anomaliesList.count;
while (_local32 > 0) {
_local32--;
_local33 = (anomaliesList.getItem(_local32) as AnomaliaAbstract);
if (_local33.dangerZone.hitTestPoint(_local27, _local28, true)){
if (enj.gotshot(_local33.damage)){
addEnemyDeath(enj, _local33.deathType);
en.splice(_local4, 1);
};
};
};
};
_local4--;
};
_local4 = obstacles.count;
while (_local4 > 0) {
_local4--;
_local34 = (obstacles.getItem(_local4) as Sprite);
if (_local34.hitTestPoint(charGx, charGy)){
char.hitToObstacle(_local34);
};
};
if (anomaliesList.count > 0){
_local35 = anomaliesList.count;
while (_local35 > 0) {
_local35--;
_local36 = (anomaliesList.getItem(_local35) as AnomaliaAbstract);
if (_local36.dangerZone.hitTestPoint(charGx, charGy, true)){
if (checkPlayerKick(_local36.damage)){
break;
};
};
};
};
if (isTiolka){
thetiolka.aim(charx, chary, obstacles);
};
if (char.isOnHyperSpeed){
layerWar.addChild(char.getImgHyperSpeed());
};
}
public function handlerKeyUp(_arg1:KeyboardEvent){
if (!paused){
char.nomove(_arg1.keyCode);
};
}
private function fpsMEAS(_arg1:Event){
FPT = FPS;
FPS = 0;
var _local2:int = stage.frameRate;
if ((((FPT < 26)) && ((_local2 < 50)))){
stage.frameRate = (stage.frameRate + 4);
} else {
if ((((FPT < 28)) && ((_local2 < 50)))){
stage.frameRate = (stage.frameRate + 2);
} else {
if ((((FPT > 34)) && ((_local2 > 34)))){
stage.frameRate = (stage.frameRate - 3);
} else {
if ((((FPT > 30)) && ((_local2 > 31)))){
stage.frameRate = (stage.frameRate - 1);
};
};
};
};
}
public function set PlayerStats(_arg1:CStats){
stat = _arg1;
computeStats();
statsLoaded = true;
}
private function prevWeapon(){
var next:int;
var swapit:Function = function (){
var _local1:AmmoCell;
next--;
if (next < 0){
next = 3;
swapweapon(next);
} else {
_local1 = inventory.ammoStorage.getAmmoByName(inventory.getWeaponByNrNoAmmoCheck(next).props.ammotype);
if (_local1.ammoCount > 0){
swapweapon(next);
} else {
swapit();
};
};
};
next = currentslot;
swapit();
}
private function enemygenerator(){
if (en.length < maxenemies){
if (incubator.isNext){
enj = incubator.nextMonster();
if (enj != null){
en.push(enj);
layerWar.addChild(enj);
};
};
};
}
public function start(){
var _local1:int;
var _local2:EventDispatcher;
var _local3:MovieClip;
if (!inventoryLoaded){
throw (new Error("Can't start game, INVENTORY NOT LOADED"));
};
if (!statsLoaded){
throw (new Error("Can't start game, PLAYER STATS NOT LOADED"));
};
trace("--- level Started");
addChild(layerScroll);
layerScroll.x = -70;
layerScroll.y = -70;
scrX = layerScroll.x;
scrXold = scrX;
scrY = layerScroll.y;
scrYold = scrY;
layerScroll.addChild(layerBG);
layerBG.mouseChildren = false;
layerBG.mouseEnabled = false;
layerBG.addChild(bmpBg);
layerScroll.addChild(layerAnimations);
layerAnimations.mouseChildren = false;
layerAnimations.mouseEnabled = false;
layerScroll.addChild(layerWar);
layerWar.mouseEnabled = false;
layerWar.mouseChildren = false;
if (isDangers){
layerWar.addChild((dangersArray[0] as LevelAnimDelayedDangerAbs));
layerWar.addChild((dangersArray[1] as LevelAnimDelayedDangerAbs));
};
layerScroll.addChild(layerTrees);
layerTrees.mouseChildren = false;
layerTrees.mouseEnabled = false;
if (darkness){
layerScroll.addChild(layerDarkness);
layerDarkness.mouseChildren = false;
layerDarkness.mouseEnabled = false;
};
if (shadowness){
layerScroll.addChild(layerShadow);
layerShadow.mouseChildren = false;
layerShadow.mouseEnabled = false;
};
if (incubator.buses.count > 0){
_local1 = incubator.buses.count;
while (_local1 > 0) {
_local1--;
layerWar.addChild((incubator.buses.getItem(_local1) as MovieClip));
_local2 = (incubator.buses.getItem(_local1) as EventDispatcher);
_local2.addEventListener(CEnemyBus.EVT_BUS_COME, handleBusObstacle);
};
};
addChild(layerInfo);
layerInfo.addChild(new sprIfcBg());
addChild(btnExit);
btnExit.x = 582;
btnExit.mouseEnabled = true;
btnExit.useHandCursor = true;
btnExit.addEventListener(MouseEvent.CLICK, onExitClick, false, 0, true);
addChild(btnPause);
btnPause.x = 559;
btnPause.mouseEnabled = true;
btnPause.useHandCursor = true;
btnPause.addEventListener(MouseEvent.CLICK, onPauseClick, false, 0, true);
wPanel = new CWeaponPanel(inventory);
wPanel.x = 0;
wPanel.y = 443;
addChild(wPanel);
lPanel = new CLifePanel();
lPanel.x = 405;
lPanel.y = 450;
layerInfo.addChild(lPanel);
aPanel = new CArmorPanel();
aPanel.x = 530;
aPanel.y = 458;
aPanel.newArmor(inventory.ArmorIconClass);
char.newarmor = inventory.Armor;
trace("char.armorPercent", char.armorPercent);
aPanel.setArmor(char.armorPercent);
layerInfo.addChild(aPanel);
layerInfo.addChild(txtBucks);
txtBucks.selectable = false;
tfBucks.align = TextFormatAlign.CENTER;
txtBucks.defaultTextFormat = tfBucks;
txtBucks.x = 52;
txtBucks.y = 1;
txtBucks.autoSize = TextFieldAutoSize.NONE;
txtBucks.width = 57;
txtBucks.text = inventory.money.toString();
txt.x = 200;
txt.y = -4;
txt.defaultTextFormat = tf;
txt.autoSize = TextFieldAutoSize.LEFT;
txt.text = "FPS: 30";
addEventListener(MouseEvent.MOUSE_MOVE, handlerMouseMove);
addEventListener(MouseEvent.MOUSE_DOWN, handlerMouseDown);
addEventListener(MouseEvent.MOUSE_UP, handlerMouseUp);
addEventListener(Event.ACTIVATE, handleFocusGain);
addEventListener(Event.DEACTIVATE, handleFocusLoss);
layerWar.addChild(char);
computeStats();
swapweapon(0);
addChild(layerKick);
if (isTiolka){
thetiolka = new CEnemyTiolkaFriend(currentlevel);
thetiolka.spawn(new Point((char.x + 100), (char.x + 150)));
layerWar.addChild(thetiolka);
};
if (TutorManager.inst.tutorEnabled){
_local3 = TutorManager.inst.getSceneTutor(currentlevel);
if (_local3 != null){
addChild(_local3);
TutorManager.inst.addEventListener(TutorManager.EVT_TUTOR_CLOSED, handleTutorClosed);
} else {
runThisAtLast();
};
} else {
runThisAtLast();
};
}
private function handlePauseMenuClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
gameover();
}
private function showLevelDoneScreen(){
pauseGame();
removeChild(pauseScr);
levelDoneScreen = new EndLevelScreen();
levelDoneScreen.btnClose.addEventListener(MouseEvent.CLICK, handleLevelDoneScreen);
levelDoneScreen.setLevelNr(currentlevel);
levelDoneScreen.setBuks((currentlevel * 1000), (inventory.money + (currentlevel * 1000)));
var _local1:Number = (uint(((100000 * deathcount) / ((new Date().time - inittime) - pauseTime))) / 100);
var _local2:Number = (int(((10 * st_shots) / deathcount)) / 10);
var _local3:Number = (int(((1000 * st_hits) / st_shots)) / 10);
levelDoneScreen.setStats(deathcount, st_shots, _local2, _local1, _local3, true);
updateStatitics();
_local1 = (uint(((100000 * stat.st_kills) / stat.sT_totaltime)) / 100);
_local2 = (int(((10 * stat.st_shots) / stat.st_kills)) / 10);
_local3 = (int(((1000 * stat.st_hits) / stat.st_shots)) / 10);
levelDoneScreen.setStats(stat.st_kills, stat.st_shots, _local2, _local1, _local3, false);
addChild(levelDoneScreen);
}
private function getBonus(_arg1:Boolean=false):CBonusAbstract{
var _local3:CItemAbstract;
var _local2:CBonusAbstract = new CBonusAbstract();
var _local4:Number = Math.random();
var _local5:Number = Math.random();
if (_local4 < bonusprobabilityBUCKS){
_local3 = new CItemBuks();
CItemBuks(_local3).monsterLoh = _arg1;
} else {
if (_local4 < (bonusprobabilityBUCKS + bonusprobabilityMEDI)){
if (_local5 < bonusprobabilityMEDIKITFULL){
_local3 = new CItemMedikitFull();
} else {
_local3 = new CItemMedikit();
};
} else {
if (_local4 < ((bonusprobabilityBUCKS + bonusprobabilityMEDI) + bonusprobabilityARMOR)){
if (_local5 < bonusprobabilityARMORLIGHT){
_local3 = new CArmorLight();
} else {
if (_local5 < (bonusprobabilityARMORLIGHT + bonusprobabilityARMORMEDIUM)){
_local3 = new CArmorMedium();
} else {
_local3 = new CArmorHeavy();
};
};
} else {
_local3 = new CItemNarcotixSpeed();
};
};
};
_local2.Bonus = _local3;
return (_local2);
}
private function onPauseClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
if (paused){
unpauseGame();
} else {
pauseGame();
};
char.nomove(32);
}
private function unpauseGame(){
addEventListener(Event.ENTER_FRAME, eframe);
FPST.start();
i = (en.length - 1);
while (i > -1) {
enj = en[i];
enj.unpause();
i--;
};
i = (bu.length - 1);
while (i > -1) {
bul = bu[i];
bul.unpause();
i--;
};
i = (bo.length - 1);
while (i > -1) {
bns = bo[i];
bns.unpause();
i--;
};
removeChild(blurrySpr);
blurrySpr = null;
try {
removeChild(pauseScr);
} catch(e:Error) {
};
LevelAnimationAbs.ANIMATIONS_ENABLED = true;
pauseTime = (pauseTime + (new Date().time - pauseinitTime));
trace("UNPAUSE");
paused = false;
}
private function runThisAtLast(){
addEventListener(Event.ENTER_FRAME, eframe);
inittime = new Date().time;
FPST.start();
FPST.addEventListener(TimerEvent.TIMER, fpsMEAS);
var _local1:CTextService = new CTextService(MessageStart);
layerInfo.addChild(_local1);
var _local2:Transition = TransitionManager.start(_local1, {type:Fly, direction:Transition.IN, duration:1.8, easing:Bounce.easeOut, startPoint:2});
}
public function set Inventory(_arg1:CInventory){
inventory = _arg1;
inventoryLoaded = true;
}
private function onPlayerDeath(){
SoundManager.inst().play(SoundManager.PLAYER_DEATH);
removeEventListener(MouseEvent.MOUSE_MOVE, handlerMouseMove);
removeEventListener(MouseEvent.MOUSE_DOWN, handlerMouseDown);
removeEventListener(MouseEvent.MOUSE_MOVE, handlerMouseUp);
removeEventListener(Event.ENTER_FRAME, eframe);
FPST.stop();
playerdead = true;
layerInfo.addChild(new CTextService(CLocale.LEVEL_FAIL_MSG, true));
setRedScreen();
showLooseMan();
}
private function handlerMouseDown(_arg1:MouseEvent){
if (!mouseonscreen){
shootin = true;
} else {
if (mouseY > 440){
if (mouseX < 100){
swapweapon(0);
} else {
if (mouseX < 200){
swapweapon(1);
} else {
if (mouseX < 300){
swapweapon(2);
} else {
if (mouseX < 400){
swapweapon(3);
};
};
};
};
};
};
}
private function handleFocusLoss(_arg1:Event){
if (!paused){
pauseGame();
};
}
private function computeStats(){
playeraccuracy = ((stat.Accuracy * 20) / 100);
playerspeedmodifier = ((stat.Speed * 0.1) + 0.5);
char.setSpeedMod(playerspeedmodifier);
playerhpbase = (20 + (stat.Dexterity * 3));
char.MaxHp = (playerhpbase + ((2 + int((stat.Dexterity / 2))) * currentlevel));
trace("maxhp", (playerhpbase + ((2 + int((stat.Dexterity / 2))) * currentlevel)).toString());
playerreloadmodifier = (1.5 - (stat.Agility * 0.1));
playerluckmodifier = ((stat.Luck * 0.1) + 0.5);
playerluckmodifierbucks = ((stat.Luck * 0.05) + 0.75);
bonusprobability = (bonusprobabilitybase * playerluckmodifier);
}
private function nextWeapon(){
var next:int;
var swapit:Function = function (){
var _local1:AmmoCell;
next++;
if (next > 3){
next = 0;
swapweapon(next);
} else {
_local1 = inventory.ammoStorage.getAmmoByName(inventory.getWeaponByNrNoAmmoCheck(next).props.ammotype);
if (_local1.ammoCount > 0){
swapweapon(next);
} else {
swapit();
};
};
};
next = currentslot;
swapit();
}
private function updateStatitics(){
stat.st_kills = (stat.st_kills + deathcount);
stat.st_shots = (stat.st_shots + st_shots);
stat.st_hits = (stat.st_hits + st_hits);
updateStatTotalTime();
}
private function onMouseOutButton(_arg1:MouseEvent){
}
private function checkenemydeath(_arg1:Number){
var _local2:Number;
var _local3:CBonusAbstract;
var _local4:Transition;
if (enj.gotshot(_arg1)){
_local2 = bonusprobability;
if (enj.nischebrod){
_local2 = (bonusprobability / 4);
};
if (Math.random() < _local2){
_local3 = getBonus(enj.nischebrod);
layerWar.addChild(_local3);
_local3.x = enj.x;
_local3.y = enj.y;
bo.push(_local3);
_local4 = TransitionManager.start(_local3, {type:Fly, direction:Transition.IN, duration:1, easing:Bounce.easeOut, startPoint:int(((Math.random() * 9) - 1))});
};
addEnemyDeath(enj, bul.deathtype);
en.splice(j, 1);
};
}
private function showLooseGeneric(){
updateStatTotalTime();
pauseGame();
removeChild(pauseScr);
addChild(levelLooseScreen);
levelLooseScreen.addEventListener(LooseScreenAbs.EVT_AGAIN, handleLooseContinue);
levelLooseScreen.addEventListener(LooseScreenAbs.EVT_MENU, handleLooseMenu);
}
public function handlerKeyDown(_arg1:KeyboardEvent){
var _local2:Number = _arg1.keyCode;
if (_arg1.altKey){
nextWeapon();
};
if (_local2 == 32){
if (allEnemiesDown){
levelDone();
} else {
if (playerdead){
gameover();
} else {
if (paused){
unpauseGame();
} else {
pauseGame();
};
char.nomove(32);
};
};
};
if (!paused){
char.moveon(_local2);
};
if ((((_local2 > 48)) && ((_local2 < 53)))){
swapweapon((_local2 - 49));
};
if (_local2 == 82){
inventory.getWeaponByNrNoAmmoCheck(currentslot).props.clip = 0;
wPanel.updateClip();
char.reload();
char.ReloadIndicatorSet(repausemax);
SoundManager.inst().playReload(currentWeaponProps);
shootin = false;
};
if (_local2 == 81){
swapweapon(prevslot);
};
}
private function setBonus(_arg1:CItemAbstract){
var _local4:CItemBuks;
var _local5:int;
var _local6:CArmorAbstract;
var _local7:CItemMedikit;
var _local8:CItemNarcotixSpeed;
var _local2:String = _arg1.fullname;
if ((_arg1 is CItemBuks)){
_local4 = (_arg1 as CItemBuks);
_local5 = (int(((_local4.amount - (BucksDeviation * _local4.amount)) + (((_local4.amount * Math.random()) * 2) * BucksDeviation))) * playerluckmodifierbucks);
_local5 = (_local5 * (1 + ((currentlevel + 1) / 12)));
inventory.money = (inventory.money + _local5);
trace(("money +" + _local5));
BucksTotal = inventory.money;
_local2 = ("$ " + _local5);
txtBucks.text = inventory.money.toString();
SoundManager.inst().play(SoundManager.OTHER_GOTBONUS_BUCKS);
} else {
if ((_arg1 is CArmorAbstract)){
_local6 = (_arg1 as CArmorAbstract);
char.newarmor = _local6;
inventory.armor = char.Armor;
aPanel.setArmor(char.armorPercent);
aPanel.newArmor(char.Armor.ArmorIconClass);
} else {
if ((_arg1 is CItemMedikit)){
_local7 = (_arg1 as CItemMedikit);
char.heal(_local7.HP);
lPanel.setLife(char.hpPercent);
} else {
if ((_arg1 is CItemMedikitFull)){
char.fullheal();
lPanel.setLife(char.hpPercent);
} else {
if ((_arg1 is CItemNarcotixSpeed)){
_local8 = (_arg1 as CItemNarcotixSpeed);
char.getNarcotix(_local8);
};
};
};
};
};
SoundManager.inst().play(SoundManager.OTHER_GOTBONUS);
var _local3:CTextBonus = new CTextBonus(_local2, char.x, char.y);
layerScroll.addChild(_local3);
}
private function levelDone(){
inventory.money = (inventory.money + (currentlevel * 1000));
if (levelDoneScreen != null){
try {
removeChild(levelDoneScreen);
levelDoneScreen.btnClose.removeEventListener(MouseEvent.CLICK, handleLevelDoneScreen);
levelDoneScreen = null;
removeChild(blurrySpr);
blurrySpr = null;
} catch(e:Error) {
};
};
removeEventListener(MouseEvent.MOUSE_MOVE, handlerMouseMove);
removeEventListener(MouseEvent.MOUSE_DOWN, handlerMouseDown);
removeEventListener(MouseEvent.MOUSE_MOVE, handlerMouseUp);
FPST.removeEventListener(TimerEvent.TIMER, fpsMEAS);
FPST.stop();
removeEventListener(Event.ENTER_FRAME, eframe);
trace("LEVEL DONE");
dispatchEvent(new Event("LEVEL_DONE"));
}
public function get iWantTocontinue():Boolean{
return (_iWantTocontinue);
}
private function pauseGame(){
removeEventListener(Event.ENTER_FRAME, eframe);
FPST.stop();
char.stopmoving();
i = (en.length - 1);
while (i > -1) {
enj = en[i];
enj = en[i];
enj.pause();
i--;
};
i = (bu.length - 1);
while (i > -1) {
bul = bu[i];
bul.pause();
i--;
};
i = (bo.length - 1);
while (i > -1) {
bns = bo[i];
bns.pause();
i--;
};
blurrySpr = CClipTools.getBlurryBitmapSprite(this);
addChild(blurrySpr);
addChild(pauseScr);
LevelAnimationAbs.ANIMATIONS_ENABLED = false;
pauseinitTime = new Date().time;
trace("PAUSE");
paused = true;
}
private function handleFocusGain(_arg1:Event){
if (paused){
unpauseGame();
};
}
private function handleTutorClosed(_arg1:Event){
TutorManager.inst.removeEventListener(TutorManager.EVT_TUTOR_CLOSED, handleTutorClosed);
runThisAtLast();
}
private function addEnemyDeath(_arg1:CEnemyAbstract, _arg2:int){
SoundManager.inst().playRandomSound(SoundManager.ENEMY_DEATHS_ARR);
layerWar.removeChild(_arg1);
var _local3:CDeathClip = new CDeathClip(_arg1, _arg2);
ed.push(_local3);
layerBG.addChild(_local3);
deathcount++;
}
private function handlePauseClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
unpauseGame();
}
private function newAnomaly(){
var _local1:AnomaliaAbstract;
var _local2:int;
var _local3:Class;
if (anomaliesList.count < anomalyMax){
_local2 = int((Math.random() * anomalyClasses.length));
trace("ADDING ANOMALY! nr", _local2);
_local3 = (anomalyClasses[_local2] as Class);
_local1 = new (_local3);
_local1.x = ((Math.random() * 700) + 20);
_local1.y = ((Math.random() * 600) + 25);
layerWar.addChild(_local1);
anomaliesList.add(_local1);
_local1.obstacle.x = _local1.x;
_local1.obstacle.y = _local1.y;
layerWar.addChild(_local1.obstacle);
obstacles.add(_local1.obstacle);
_local1.addEventListener(AnomaliaAbstract.EVT_DONE, removeAnomaly);
SoundManager.inst().play(SoundManager.ANOMALY_APPEAR);
};
}
private function handlerMouseUp(_arg1:MouseEvent){
shootin = false;
}
public function killme(){
var _local2:CEnemyBus;
var _local3:AnomaliaAbstract;
removeEventListener(Event.ACTIVATE, handleFocusGain);
removeEventListener(Event.DEACTIVATE, handleFocusLoss);
pauseScr.getChildByName("i_clickable").removeEventListener(MouseEvent.CLICK, handlePauseClick);
pauseScr.getChildByName("i_clickable_button").removeEventListener(MouseEvent.CLICK, handlePauseClick);
pauseMenuBtn.removeEventListener(MouseEvent.CLICK, handlePauseMenuClick);
this.removeEventListener(MouseEvent.MOUSE_WHEEL, handleMouseWheel);
var _local1:int = incubator.buses.count;
while (_local1 > 0) {
_local1--;
_local2 = (incubator.buses.getItem(_local1) as CEnemyBus);
_local2.removeEventListener(CEnemyBus.EVT_BUS_COME, handleBusObstacle);
_local2.destruct();
_local2 = null;
};
_local1 = anomaliesList.count;
while (_local1 > 0) {
_local1--;
_local3 = (anomaliesList.getItem(_local1) as AnomaliaAbstract);
obstacles.removeObject(_local3.obstacle);
anomaliesList.removeObject(_local3);
_local3.removeEventListener(AnomaliaAbstract.EVT_DONE, removeAnomaly);
_local3.destruct();
_local3 = null;
};
thisstage = null;
txt = null;
tf = null;
wPanel = null;
lPanel = null;
aPanel = null;
en = null;
bu = null;
ed = null;
sp = null;
bo = null;
char = null;
stat = null;
inventory = null;
spawnLocArray = null;
spawnLocProb = null;
spawnLocProbAbs = null;
layerBG = null;
layerDarkness = null;
layerInfo = null;
layerScroll = null;
layerTrees = null;
layerWar = null;
bmdBg = null;
bmpBg = null;
bulletclass = null;
incubator = null;
pauseScr = null;
FPST = null;
enj = null;
bns = null;
bul = null;
thetiolka = null;
obstacles = null;
paused = true;
layerDanger = null;
dangersArray = null;
anomaliesList = null;
arrowToMonster = null;
CClipTools.fullClearDisplayObject(this);
}
private function swapweapon(_arg1:Number){
var _local2:AmmoCell;
var _local3:CGunAbstract;
var _local4:CGunProps;
var _local5:CTextBonus;
var _local6:ColorTransform;
if ((((_arg1 < 0)) || ((_arg1 > 3)))){
throw (Error(new Error("SLOTNUMBER 0-3!")));
};
if (inventory.getWeaponByNrNoAmmoCheck(_arg1).props.guntype != CLocale.GUN_NULL){
_local2 = inventory.ammoStorage.getAmmoByName(inventory.getWeaponByNrNoAmmoCheck(_arg1).props.ammotype);
if (_local2.ammoCount > 0){
trace("SWAPPING GUN:", inventory.getWeaponByNrNoAmmoCheck(_arg1).props.guntype);
if (prevslot != currentslot){
prevslot = currentslot;
};
currentslot = _arg1;
wPanel.changeSlot(_arg1);
_local3 = inventory.getWeaponByNr(_arg1);
_local4 = _local3.props;
currentWeaponProps = _local3.props;
char.ReloadIndicatorRemove();
if (_local4.minStrength > stat.Power){
trace("-- HEAVY WEAPON! --");
_local5 = new CTextBonus(CLocale.HEAVY_WEAPON, char.x, char.y);
_local6 = new ColorTransform(1.2, 0.2, 0.2, 1, 0, 0, 0, 0);
_local5.transform.colorTransform = _local6;
layerScroll.addChild(_local5);
char.setSpeedMod((playerspeedmodifier * CStats.OWERWEIGHT_SPEED_FACTOR));
repausemax = ((_local4.reloadpause * playerreloadmodifier) * CStats.OWERWEIGHT_RELOAD_FACTOR);
} else {
char.setSpeedMod(playerspeedmodifier);
repausemax = (_local4.reloadpause * playerreloadmodifier);
};
if (_local3.props.name == "ZF-1"){
isZF = true;
} else {
isZF = false;
};
shootin = false;
shotpause = 0;
shotpausemax = _local4.shotpause;
repause = _local4.repause;
if (repause > 0){
if ((repausemax - repause) > 2){
char.ReloadIndicatorSet((repausemax - repause));
};
};
range = _local4.range;
accuracy = _local4.accuracy;
totalaccuracy = ((accuracy * playeraccuracy) * 0.6);
pershot = _local4.pershot;
shellsangle = _local4.shellsangle;
damage_min = _local4.damage_min;
damage_max = _local4.damage_max;
bulletspeed = _local4.speed;
bulletdecoy = _local4.decrease;
bulletclass = _local4.ammoclass;
automatic = _local4.automatic;
slowing = _local4.slowing;
splashing = _local4.splash;
throwing = _local4.throwing;
if (_local4.guntype == CGunProps.THROWING){
trace("range", range);
range = (range * stat.Power);
trace("throwrange", range);
};
penetrating = _local4.penetrating;
char.setWeapon(_local4.guntype);
};
};
}
private function shot(){
var _local1:CBulletAbstract;
var _local6:Number;
var _local7:CTextBonus;
var _local8:ColorTransform;
SoundManager.inst().playShot(currentWeaponProps);
i = pershot;
char.shot();
var _local2:CBulletProps = new CBulletProps();
if (!isZF){
_local2.damage_min = damage_min;
_local2.damage_max = damage_max;
_local2.decrease = bulletdecoy;
_local2.distance = range;
_local2.speed = bulletspeed;
_local2.slowing = slowing;
_local2.penetrating = penetrating;
_local2.skill = stat.Perception;
} else {
_local2.damage_min = (damage_min * ((Math.random() * 0.5) + 0.5));
_local2.damage_max = (damage_max * ((Math.random() * 0.5) + 0.5));
_local2.decrease = (bulletdecoy * ((Math.random() * 0.5) + 0.5));
_local2.distance = range;
_local2.speed = bulletspeed;
_local2.slowing = (Math.random() > 0.7);
if (!_local2.slowing){
_local2.penetrating = (Math.random() > 0.4);
} else {
_local2.penetrating = false;
};
_local2.skill = stat.Perception;
};
var _local3:Number = Math.atan2((char.x - char.aimX), (char.y - char.aimY));
var _local4:Number = ((((Math.random() * Math.PI) / 4) - (Math.PI / 8)) / totalaccuracy);
var _local5:Number = (_local3 + _local4);
while (i > 0) {
_local6 = (_local5 + ((Math.random() * shellsangle) - (shellsangle / 2)));
_local1 = new bulletclass();
_local1.props = _local2;
_local1.shot((char.ShotPoint.x - scrX), (char.ShotPoint.y - scrY), _local6);
if ((_local1 is CBulletSplashing)){
CBulletSplashing(_local1).aimpoint(char.aimX, char.aimY);
};
layerWar.addChild(_local1);
bu.push(_local1);
i--;
st_shots++;
};
shotpause = 0;
if (inventory.bulletGone(currentslot) <= 0){
wPanel.updateClip();
swapweapon(0);
_local7 = new CTextBonus(CLocale.NO_AMMO, char.x, char.y);
_local8 = new ColorTransform(1.2, 0.2, 0.2, 1, 0, 0, 0, 0);
_local7.transform.colorTransform = _local8;
layerScroll.addChild(_local7);
};
wPanel.rewriteAmmo();
}
private function onMouseOverButton(_arg1:MouseEvent){
}
private function gameover(){
FPST.removeEventListener(TimerEvent.TIMER, fpsMEAS);
FPST.stop();
removeEventListener(Event.ENTER_FRAME, eframe);
trace("GAME_OVER");
dispatchEvent(new Event("GAME_OVER"));
}
private function removeAnomaly(_arg1:Event){
var _local2:AnomaliaAbstract = (_arg1.target as AnomaliaAbstract);
obstacles.removeObject(_local2.obstacle);
layerWar.removeChild(_local2.obstacle);
layerWar.removeChild(_local2);
anomaliesList.removeObject(_local2);
_local2.removeEventListener(AnomaliaAbstract.EVT_DONE, removeAnomaly);
}
private function showLooseGirl(){
levelLooseScreen = new mc_girlDie();
showLooseGeneric();
}
private function onExitClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
gameover();
}
private function handlerMouseMove(_arg1:MouseEvent){
var _local2:Number = (mouseX - scrollX);
var _local3:Number = (mouseY - scrollY);
char.aim(_local2, _local3);
var _local4:Number = mouseY;
if ((((_local4 < 15)) || ((_local4 > 440)))){
if (!mouseonscreen){
mouseonscreen = true;
};
} else {
if (mouseonscreen){
mouseonscreen = false;
};
};
}
private function handleLooseMenu(_arg1:Event){
removeLooseGeneric();
gameover();
}
private function checkPlayerKick(_arg1:Number):Boolean{
var _local2:MovieClip;
layerKick.gotoAndPlay(2);
if (char.gotKicked(_arg1)){
_local2 = new mcMeDead();
_local2.x = charx;
_local2.y = chary;
layerBG.addChild(_local2);
_local2.gotoAndStop(_local2.totalFrames);
_local2.scaleX = 2;
_local2.scaleY = 2;
char.visible = false;
onPlayerDeath();
return (true);
};
lPanel.setLife(char.hpPercent);
aPanel.newArmor(char.Armor.ArmorIconClass);
aPanel.setArmor(char.armorPercent);
SoundManager.inst().play(SoundManager.PLAYER_HIT);
return (false);
}
private function handleBusObstacle(_arg1:Event){
var _local2:CEnemyBus = (_arg1.target as CEnemyBus);
layerWar.addChild(_local2.busObstacle);
obstacles.add(_local2.busObstacle);
_local2.removeEventListener(CEnemyBus.EVT_BUS_COME, handleBusObstacle);
}
private function removeLooseGeneric(){
removeChild(levelLooseScreen);
levelLooseScreen.removeEventListener(LooseScreenAbs.EVT_AGAIN, handleLooseContinue);
levelLooseScreen.removeEventListener(LooseScreenAbs.EVT_MENU, handleLooseMenu);
levelLooseScreen = null;
}
}
}//package
import flash.display.*;
import gunz.*;
import character.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
class CWslot extends Sprite {
private const opennrY:int = 7;
private const opennrX:int = 72;
private const closednrX:int = 43;
private const closednrY:int = 45;
private var imgSlotNr:Sprite;
private var imgContainer:Sprite;
private var imgClosed:Sprite;
private var filterGlowActive:GlowFilter;
private var imgLight:Sprite;
private var animationduration:int;// = 4
private var assignedGun:CGunAbstract;
private var imgWeaponActive:Sprite;
private var inactiveFiltersArray:Array;
private var imgOpen:Sprite;
private var imgAmmoScr:Sprite;
private var filterGlowInactive:GlowFilter;
private var imgWeapon:Sprite;
private var _open:Boolean;// = false
private var activeFiltersArray:Array;
private var imgWeaponInactive:Sprite;
private var tfOK:TextFormat;
private var animationindex:int;// = 0
private var imgClosING:MovieClip;
private var txtAmmo:TextField;
private var txtClip:TextField;
private var imgOpenING:MovieClip;
private var tfNOK:TextFormat;
private function CWslot(_arg1:int, _arg2:CGunAbstract){
imgClosed = new mcHUD_WSLOT_closed();
imgClosING = new mcHUD_WSLOT_closing();
imgOpen = new mcHUD_WSLOT_open();
imgOpenING = new mcHUD_WSLOT_opening();
imgLight = new mcHUD_WSLOT_light();
imgAmmoScr = new mcHUD_WSLOT_AmmoScreen();
tfOK = new TextFormat("_sans", 10, 0xFF00, null, null, null, null, null, TextFormatAlign.CENTER);
tfNOK = new TextFormat("_sans", 10, 0xFF0000, null, null, null, null, null, TextFormatAlign.CENTER);
txtClip = new TextField();
txtAmmo = new TextField();
filterGlowActive = new GlowFilter(16777045, 1, 2, 2, 4, 3);
activeFiltersArray = [filterGlowActive];
filterGlowInactive = new GlowFilter(16777045, 1, 2, 2, 4, 3);
inactiveFiltersArray = new Array();
imgContainer = new Sprite();
super();
if ((((_arg1 < 1)) || ((_arg1 > 4)))){
throw (new Error((("wrong slot number " + _arg1) + " should be 1-4")));
};
if (_arg1 == 1){
imgSlotNr = new mcHUD_WSLOT_N1();
} else {
if (_arg1 == 2){
imgSlotNr = new mcHUD_WSLOT_N2();
} else {
if (_arg1 == 3){
imgSlotNr = new mcHUD_WSLOT_N3();
} else {
if (_arg1 == 4){
imgSlotNr = new mcHUD_WSLOT_N4();
};
};
};
};
mouseChildren = false;
if (_arg2.props.guntype == CLocale.GUN_NULL){
mouseEnabled = false;
useHandCursor = false;
} else {
mouseEnabled = true;
useHandCursor = true;
};
assignedGun = _arg2;
imgWeaponActive = new _arg2.props.imgclass();
imgWeaponActive.filters = activeFiltersArray;
imgWeaponInactive = new _arg2.props.imgclass();
var _local3:Array = new Array();
_local3 = _local3.concat([0.1, 0, 0, 0, 0]);
_local3 = _local3.concat([0, 0.1, 0, 0, 0]);
_local3 = _local3.concat([0, 0, 0.1, 0, 0]);
_local3 = _local3.concat([0, 0, 0, 1, 0]);
var _local4:ColorMatrixFilter = new ColorMatrixFilter(_local3);
inactiveFiltersArray = [_local4, filterGlowInactive];
imgWeaponInactive.filters = inactiveFiltersArray;
imgWeaponInactive.alpha = 0.7;
imgWeaponActive.x = 14;
imgWeaponActive.y = 7;
imgWeaponInactive.x = 14;
imgWeaponInactive.y = 7;
imgAmmoScr.x = 5;
imgAmmoScr.y = 42;
txtClip.x = 7;
txtClip.y = 40;
txtClip.width = 28;
txtClip.defaultTextFormat = tfOK;
txtClip.text = "0";
txtClip.selectable = false;
txtAmmo.x = 63;
txtAmmo.y = 40;
txtAmmo.width = 28;
txtAmmo.defaultTextFormat = tfOK;
txtAmmo.text = "0";
txtAmmo.selectable = false;
addChild(imgContainer);
drawClosed();
}
private function eframeOpening(_arg1:Event){
imgLight.alpha = (imgLight.alpha + 0.2);
imgWeaponActive.alpha = (imgWeaponActive.alpha + 2);
animationindex++;
if (animationindex >= animationduration){
removeEventListener(Event.ENTER_FRAME, eframeOpening);
imgOpenING.gotoAndStop(1);
animationindex = 0;
drawOpen();
};
}
private function animateClosing(){
removeChild(imgContainer);
imgContainer = new Sprite();
imgContainer.addChild(imgClosING);
imgContainer.addChild(imgWeaponInactive);
imgContainer.addChild(txtClip);
imgContainer.addChild(txtAmmo);
imgContainer.addChild(imgSlotNr);
imgSlotNr.x = opennrX;
imgSlotNr.y = opennrX;
imgContainer.addChild(imgLight);
addChild(imgContainer);
imgLight.alpha = 1;
imgWeaponInactive.alpha = 0;
addEventListener(Event.ENTER_FRAME, eframeClosing);
}
private function drawOpen(){
removeChild(imgContainer);
imgContainer = new Sprite();
imgContainer.addChild(imgOpen);
imgContainer.addChild(imgWeaponActive);
imgContainer.addChild(imgAmmoScr);
imgContainer.addChild(txtClip);
imgContainer.addChild(txtAmmo);
imgContainer.addChild(imgSlotNr);
imgSlotNr.x = opennrX;
imgSlotNr.y = opennrY;
imgContainer.addChild(imgLight);
addChild(imgContainer);
}
private function animateOpening(){
removeChild(imgContainer);
imgContainer = new Sprite();
imgContainer.addChild(imgOpenING);
imgContainer.addChild(imgWeaponActive);
imgContainer.addChild(txtClip);
imgContainer.addChild(txtAmmo);
imgContainer.addChild(imgSlotNr);
imgSlotNr.x = opennrX;
imgSlotNr.y = opennrX;
imgContainer.addChild(imgLight);
addChild(imgContainer);
imgLight.alpha = 0;
imgWeaponActive.alpha = 0;
addEventListener(Event.ENTER_FRAME, eframeOpening);
}
public function set AmmoClip(_arg1:int){
if (_arg1 < 1){
txtClip.text = "0";
} else {
txtClip.text = _arg1.toString();
};
}
public function AmmoClipUpdate(){
txtClip.text = assignedGun.props.clip.toString();
}
public function setOpen(){
if (!_open){
removeEventListener(Event.ENTER_FRAME, eframeClosing);
removeEventListener(Event.ENTER_FRAME, eframeOpening);
imgClosING.gotoAndStop(1);
animationindex = 0;
animateOpening();
_open = true;
};
}
private function drawClosed(){
removeChild(imgContainer);
imgContainer = new Sprite();
imgContainer.addChild(imgClosed);
imgContainer.addChild(imgWeaponInactive);
imgWeaponInactive.alpha = 0.6;
imgContainer.addChild(imgAmmoScr);
imgContainer.addChild(txtClip);
imgContainer.addChild(txtAmmo);
imgContainer.addChild(imgSlotNr);
imgSlotNr.x = closednrX;
imgSlotNr.y = closednrY;
addChild(imgContainer);
}
public function get open():Boolean{
return (_open);
}
private function eframeClosing(_arg1:Event){
imgLight.alpha = (imgLight.alpha - 0.2);
imgWeaponInactive.alpha = (imgWeaponInactive.alpha + 2);
animationindex++;
if (animationindex >= animationduration){
removeEventListener(Event.ENTER_FRAME, eframeClosing);
imgClosING.gotoAndStop(1);
animationindex = 0;
drawClosed();
};
}
public function setClosed(){
if (open){
removeEventListener(Event.ENTER_FRAME, eframeClosing);
removeEventListener(Event.ENTER_FRAME, eframeOpening);
imgOpenING.gotoAndStop(1);
animationindex = 0;
animateClosing();
_open = false;
};
}
public function set AmmoTotal(_arg1:int){
if (_arg1 < 1){
txtAmmo.defaultTextFormat = tfNOK;
txtAmmo.text = "0";
} else {
txtAmmo.text = _arg1.toString();
};
}
}
dynamic class CTextService extends MovieClip {
private var txt:TextField;
private var filterShadow:DropShadowFilter;
private var lifetime:int;// = 130
private var tfm:TextFormat;
private var _static:Boolean;// = false
private function CTextService(_arg1:String, _arg2:Boolean=false){
txt = new TextField();
tfm = new TextFormat("MonoCondencedDi", 24, 0xFFFFFF, true);
filterShadow = new DropShadowFilter(4, 45, 0, 1, 6, 6, 3, 3);
super();
var _local3:Sprite = new mc_level_txt();
txt = (_local3.getChildByName("i_txt") as TextField);
txt.autoSize = TextFieldAutoSize.CENTER;
addChild(txt);
_local3 = null;
addChild(txt);
txt.text = _arg1;
txt.x = (-(width) / 2);
x = 300;
y = 230;
_static = _arg2;
addEventListener(Event.ENTER_FRAME, eframe);
}
private function eframe(_arg1:Event){
var _local2:*;
if (!_static){
lifetime--;
if (lifetime < 30){
alpha = (alpha - 0.033);
};
if (lifetime < 0){
removeEventListener(Event.ENTER_FRAME, eframe);
_local2 = this.parent;
if ((_local2 is DisplayObjectContainer)){
_local2.removeChild(this);
};
};
};
}
}
class CArmorPanel extends Sprite {
private var heartline:Sprite;
private var heartbeat:Bitmap;
private function CArmorPanel(){
heartbeat = new Bitmap(new bmdbronek0(60, 35));
heartline = new mcArmorLine();
super();
heartbeat.x = 0;
heartbeat.y = 0;
heartline.x = -34;
heartline.y = 31;
addChild(heartbeat);
addChild(heartline);
heartline.scaleX = 0;
}
public function newArmor(_arg1:Class){
removeChild(heartbeat);
heartbeat = new Bitmap(new _arg1(60, 35));
heartbeat.x = 0;
heartbeat.y = 0;
addChild(heartbeat);
reset();
}
public function setArmor(_arg1:Number){
if (_arg1 < 0){
(_arg1 == 0);
} else {
if (_arg1 > 1){
(_arg1 == 1);
};
};
heartline.scaleX = _arg1;
}
public function reset(){
heartline.scaleX = 1;
}
}
class CWeaponPanel extends Sprite {
private var container:Sprite;
private var activeslot:int;// = 0
private var weapons:CInventory;
private var slot:Array;
private function CWeaponPanel(_arg1:CInventory){
slot = new Array();
super();
weapons = _arg1;
slot.push(new CWslot(1, weapons.weapon1));
slot.push(new CWslot(2, weapons.weapon2));
slot.push(new CWslot(3, weapons.weapon3));
slot.push(new CWslot(4, weapons.weapon4));
slot[0].setOpen();
slot[0].x = 0;
addChild(slot[0]);
slot[1].setClosed();
slot[1].x = 100;
addChild(slot[1]);
slot[2].setClosed();
slot[2].x = 200;
addChild(slot[2]);
slot[3].x = 300;
slot[3].setClosed();
addChild(slot[3]);
slot[0].AmmoClip = weapons.weapon1.props.clipmax;
slot[0].AmmoTotal = 9999;
var _local2:int = weapons.getWeaponAmmoByProps(weapons.weapon2.props);
slot[1].AmmoClip = weapons.weapon2.props.clipmax;
if (weapons.weapon2.props.clipmax > _local2){
slot[1].AmmoClip = _local2;
weapons.weapon2.props.clip = _local2;
};
_local2 = weapons.getWeaponAmmoByProps(weapons.weapon3.props);
slot[2].AmmoClip = weapons.weapon3.props.clipmax;
if (weapons.weapon3.props.clipmax > _local2){
slot[2].AmmoClip = _local2;
weapons.weapon3.props.clip = _local2;
};
_local2 = weapons.getWeaponAmmoByProps(weapons.weapon4.props);
slot[3].AmmoClip = weapons.weapon4.props.clipmax;
if (weapons.weapon4.props.clipmax > _local2){
slot[3].AmmoClip = _local2;
weapons.weapon4.props.clip = _local2;
};
rewriteAmmo();
}
private function redraw(){
var _local1:int;
while (_local1 < 4) {
trace("slot", _local1);
if (_local1 == activeslot){
slot[_local1].setOpen();
trace("---------opening");
} else {
slot[_local1].setClosed();
trace("---------closing");
};
_local1++;
};
}
public function changeSlot(_arg1){
activeslot = _arg1;
trace("changeslot", _arg1);
redraw();
}
public function updateClip(){
slot[activeslot].AmmoClipUpdate();
}
public function rewriteAmmo(){
slot[1].AmmoTotal = weapons.Ammo2;
slot[2].AmmoTotal = weapons.Ammo3;
slot[3].AmmoTotal = weapons.Ammo4;
slot[activeslot].AmmoClipUpdate();
}
}
class CTextBonus extends MovieClip {
private var txt:TextField;
private var lifetime:int;// = 30
private var tfm:TextFormat;
private var speed:Number;// = 1
private function CTextBonus(_arg1:String, _arg2, _arg3){
tfm = new TextFormat("_sans", 12, 0xFFFFFF, true);
super();
var _local4:Sprite = new mc_bonus_txt();
txt = (_local4.getChildByName("i_txt") as TextField);
txt.autoSize = TextFieldAutoSize.CENTER;
addChild(txt);
txt.text = _arg1;
txt.y = -(txt.height);
x = _arg2;
y = _arg3;
addEventListener(Event.ENTER_FRAME, eframe);
_local4 = null;
}
private function eframe(_arg1:Event){
var _local2:*;
lifetime--;
y = (y - speed);
if (lifetime < 20){
alpha = (alpha - 0.05);
};
if (lifetime < 0){
removeEventListener(Event.ENTER_FRAME, eframe);
_local2 = this.parent;
if ((_local2 is DisplayObjectContainer)){
_local2.removeChild(this);
};
};
}
}
class CLifePanel extends Sprite {
private var heartline:Sprite;
private var heartbeat:MovieClip;
private var lamp:MovieClip;
private function CLifePanel(){
heartbeat = new mcHeartBeat();
heartline = new mcHeartLine();
lamp = new mcHeartBlink();
super();
heartbeat.x = 8;
heartbeat.y = 12;
heartline.x = 58;
heartline.y = 6;
lamp.x = 30;
lamp.y = 26;
lamp.gotoAndStop(1);
addChild(heartbeat);
addChild(heartline);
addChild(lamp);
}
public function reset(){
heartline.scaleX = 1;
}
public function setLife(_arg1:Number){
if (_arg1 < 0){
(_arg1 == 0);
} else {
if (_arg1 > 1){
(_arg1 == 1);
};
};
heartline.scaleX = _arg1;
if (_arg1 < 0.3){
lamp.play();
} else {
lamp.gotoAndStop(1);
};
}
}
Section 420
//TrueMadnessMainScreen (TrueMadnessMainScreen)
package {
import flash.display.*;
import character.*;
import levels.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import enemies.*;
import flash.text.*;
import shop.*;
import flash.net.*;
import chat.*;
import flash.ui.*;
public class TrueMadnessMainScreen extends MovieClip {
private var tf:TextFormat;
private var currentLevel:CLevelProperties;
private var theeshop:CShop;
public var i_mc_intro:MovieClip;
private var isUrlOk:Boolean;// = true
private var currentMultik:MovieClip;
private var text:TextField;
public var i_btn_goTikislab:SimpleButton;
public var i_mc_selectPlayer:MenuPlayerSelector;
private var theEndScreen:MovieClip;
public var i_mc_soundContorls:UISoundControl;
private var playerStats:CStats;
private var _isGameLoaded:Boolean;// = false
private var _btnStart:SimpleButton;
private var _btnHighscores:SimpleButton;
private var charSelector:MenuPlayerSelector;
private var _btnMoreGames:SimpleButton;
private var alert:UIAlert;
private var levelBank:CLevelBank;
private var nameselector:MenuPlayerName;
private var _btnContinue:SimpleButton;
private var multikBlackBg:MovieClip;
private var mcIntro:MovieClip;
private var game:TrueMadnessGame;
public var i_mc_mainMenu:MovieClip;
private var playerInventory:CInventory;
public function TrueMadnessMainScreen(){
text = new TextField();
tf = new TextFormat("_sans", 25, 0xFFFFFF, true);
multikBlackBg = new mc_sceneBlackBg();
levelBank = new CLevelBank();
theEndScreen = new mc_theEnd_screen();
super();
tabEnabled = false;
tabChildren = false;
charSelector = (i_mc_selectPlayer as MenuPlayerSelector);
charSelector.addEventListener(MenuPlayerSelector.EVT_PLAYERSELECTED, handleCharSelected, false, 0, true);
_btnStart = i_mc_mainMenu.i_btn_newGame;
_btnContinue = i_mc_mainMenu.i_btn_continue;
_btnHighscores = i_mc_mainMenu.i_btn_highscores;
_btnMoreGames = i_btn_goTikislab;
_btnStart.addEventListener(MouseEvent.CLICK, handleBtnStartClick);
_btnContinue.addEventListener(MouseEvent.CLICK, handleBtnContinueClick);
_btnHighscores.addEventListener(MouseEvent.CLICK, handleBtnHSClick);
_btnMoreGames.addEventListener(MouseEvent.CLICK, handleBtnTLClick);
playerInventory = new CInventory();
playerStats = new CStats();
checkLoadGame();
theEndScreen.addEventListener(MouseEvent.CLICK, handleTheEndScreenClick);
mcIntro = (i_mc_intro as MovieClip);
addEventListener(Event.ENTER_FRAME, handleIntro);
mcIntro.addEventListener(MouseEvent.CLICK, handleIntroClick);
}
private function removeMultik(){
SoundManager.inst().unpauseMusic();
currentMultik.removeEventListener(MovieSceneAbstract.EVT_DONE, handleMultikDone);
currentMultik.removeEventListener(BFChat.EVT_CLOSED, handleMultikDone);
removeChild(multikBlackBg);
removeChild(currentMultik);
var _local1:SoundTransform = new SoundTransform(0, 0);
currentMultik.soundTransform = _local1;
CClipTools.fullClearDisplayObject(currentMultik);
currentMultik = null;
}
private function handleBtnStartClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
if (_isGameLoaded){
alert = new UIAlert(CLocale.SAVED_GAME);
addChild(alert);
alert.addEventListener(UIAlert.EVT_OK, handleAlertNewOk);
alert.addEventListener(UIAlert.EVT_NO, handleAlertNewNo);
} else {
playerStats = new CStats();
charSelector.turnOn();
};
}
private function saveGame():Boolean{
var _local1:Boolean;
_local1 = Saver.inst.saveData(playerStats, playerInventory);
return (_local1);
}
private function gameStart(){
playerInventory = new CInventory();
levelBank.reset();
currentLevel = levelBank.nextLevel;
launchLevel();
}
private function checkMultik(_arg1:Event){
saveGame();
gameStop(null);
if (currentLevel.multikIsThere){
if (currentLevel.multikIsChat){
multikChatStart(currentLevel.multikChatPortrait, currentLevel.multikChatText);
} else {
multikSceneStart(currentLevel.multikSceneClass);
};
} else {
showShop(null);
};
}
private function showShop(_arg1:Event){
if (levelBank.isNextLevel){
playerStats.player_level = levelBank.currentLevelNr;
theeshop = new CShop(playerInventory, playerStats);
theeshop.addEventListener("SHOP_DONE", shopDone, false, 0, true);
addChild(theeshop);
} else {
addChild(theEndScreen);
Submitter.inst.sendStatistic("Evt: GAME WON", playerInventory, playerStats);
};
}
private function launchLevel(){
game = new TrueMadnessGame(currentLevel);
game.PlayerStats = playerStats;
game.Inventory = playerInventory;
addChild(game);
stage.addEventListener(KeyboardEvent.KEY_DOWN, game.handlerKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, game.handlerKeyUp);
game.addEventListener("GAME_OVER", gameStop);
game.addEventListener("LEVEL_DONE", checkMultik);
game.start();
}
private function gameStop(_arg1:Event){
removeChild(game);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, game.handlerKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, game.handlerKeyUp);
game.removeEventListener("GAME_OVER", gameStop);
game.removeEventListener("LEVEL_DONE", checkMultik);
game.killme();
var _local2:Boolean = game.iWantTocontinue;
game = null;
immediatelyGC();
Mouse.show();
playerStats = new CStats();
playerInventory = new CInventory();
checkLoadGame();
if (_local2){
if (_isGameLoaded){
showShop(null);
};
};
}
private function shopDone(_arg1:Event){
trace("main. shop done");
removeChild(theeshop);
theeshop = null;
nextLevel();
}
private function checkLoadGame(){
_isGameLoaded = Saver.inst.loadData(playerStats, playerInventory);
_isGameLoaded = ((_isGameLoaded) && (levelBank.setLevel(Saver.inst.lastLevel)));
if (!_isGameLoaded){
_btnContinue.removeEventListener(MouseEvent.CLICK, handleBtnContinueClick);
CClipTools.desaturateClip(_btnContinue);
_btnContinue.useHandCursor = false;
_btnContinue.mouseEnabled = false;
} else {
_btnContinue.addEventListener(MouseEvent.CLICK, handleBtnContinueClick);
CClipTools.removeFilters(_btnContinue);
_btnContinue.useHandCursor = true;
_btnContinue.mouseEnabled = true;
};
}
private function handleIntro(_arg1:Event){
if (mcIntro.currentFrame == mcIntro.totalFrames){
mcIntro.stop();
removeChild(mcIntro);
removeEventListener(Event.ENTER_FRAME, handleIntro);
SoundManager.inst().startMusic();
};
}
private function killAlert(){
removeChild(alert);
alert.removeEventListener(UIAlert.EVT_OK, handleAlertNewOk);
alert.removeEventListener(UIAlert.EVT_NO, handleAlertNewNo);
CClipTools.fullClearDisplayObject(alert);
alert = null;
}
private function handleFirstSceneDone(_arg1:Event){
currentMultik.removeEventListener(MovieSceneAbstract.EVT_DONE, handleFirstSceneDone);
removeMultik();
gameStart();
}
private function multikSceneStart(_arg1:Class){
SoundManager.inst().pauseMusic();
currentMultik = new (_arg1);
var _local2:SoundTransform = new SoundTransform(SoundManager.inst().volume, 0);
currentMultik.soundTransform = _local2;
currentMultik.addEventListener(MovieSceneAbstract.EVT_DONE, handleMultikDone);
addChild(multikBlackBg);
addChild(currentMultik);
}
private function handleBtnHSClick(_arg1:MouseEvent){
SponsorStuff.openScoreView();
}
private function handleTheEndScreenClick(_arg1:MouseEvent){
removeChild(theEndScreen);
var _local2:MovieClip = new submitScoreScr(playerStats.player_name, playerStats.score);
addChild(_local2);
}
private function handleNameEntered(_arg1:Event){
playerStats.player_name = nameselector.playerName;
removeChild(nameselector);
nameselector.removeEventListener(MenuPlayerName.EVT_CLOSE, handleNameEntered);
CClipTools.fullClearDisplayObject(nameselector);
nameselector = null;
charSelector.turnOff();
launchFirstScene();
Submitter.inst.sendStatistic("Evt: NEW GAME", playerInventory, playerStats);
}
private function handleMultikDone(_arg1:Event){
removeMultik();
showShop(null);
}
private function handleIntroClick(_arg1:MouseEvent){
SponsorStuff.openMoreGames();
}
private function handleAlertNewNo(_arg1:Event){
killAlert();
}
private function checkUrl(){
var domain:String;
var wrong:MovieClip;
try {
domain = this.loaderInfo.url;
trace(domain);
if ((((((domain.indexOf("bin") == -1)) && ((domain.indexOf("tikislab.com") == -1)))) && ((domain.indexOf("flashgamelicense.com") == -1)))){
wrong = new mc_wrong();
addChild(wrong);
isUrlOk = false;
} else {
trace("site is allowed");
isUrlOk = true;
};
} catch(e:Error) {
};
}
private function multikChatStart(_arg1:Class, _arg2:Array){
currentMultik = new BFChat(playerStats.getCharPortraitClass(), _arg1, _arg2);
currentMultik.addEventListener(BFChat.EVT_CLOSED, handleMultikDone);
addChild(multikBlackBg);
addChild(currentMultik);
}
private function nextLevel(){
currentLevel = levelBank.nextLevel;
launchLevel();
}
private function handleCharSelected(_arg1:Event){
trace("selection handled");
playerStats.applyPreset(charSelector.selectedChar);
nameselector = new MenuPlayerName();
addChild(nameselector);
nameselector.addEventListener(MenuPlayerName.EVT_CLOSE, handleNameEntered);
}
private function immediatelyGC():void{
trace("run GC");
var _local1:Array = new Array();
var _local2:int;
while (_local2 < 100000) {
_local1.push(new Object());
_local2++;
};
}
private function handleAlertNewOk(_arg1:Event){
killAlert();
playerStats = new CStats();
charSelector.turnOn();
}
private function handleBtnContinueClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
showShop(null);
}
private function launchFirstScene(){
SoundManager.inst().pauseMusic();
currentMultik = new mc_Movie_Scene_1();
currentMultik.addEventListener(MovieSceneAbstract.EVT_DONE, handleFirstSceneDone);
addChild(multikBlackBg);
addChild(currentMultik);
}
private function handleBtnTLClick(_arg1:MouseEvent){
SoundManager.inst().play(SoundManager.CLICK_MENU_BTN);
navigateToURL(new URLRequest("http://tikislab.com"));
}
}
}//package
Section 421
//TutorManager (TutorManager)
package {
import flash.display.*;
import flash.events.*;
public class TutorManager extends EventDispatcher {
private var _tutorEnabled:Boolean;// = true
private var _tutor:MovieClip;
private var _shopAppearance:int;// = 0
private var _shopGunzBought:int;// = 0
private var _btn:SimpleButton;
public static const EVT_TUTOR_CLOSED:String = "some tutorial was just closed ebvent";
private static var _instance:TutorManager;
private static var _allowInstance:Boolean;
public function TutorManager(){
if (!TutorManager._allowInstance){
throw (new Error("Error: Use SoundManager.inst() instead of the new keyword."));
};
}
public function getSceneTutor(_arg1:int):MovieClip{
var _local2:MovieClip;
if (_tutorEnabled){
switch (_arg1){
case 1:
_local2 = new mc_tutor_lev_1();
break;
case 2:
_local2 = new mc_tutor_lev_2();
break;
case 3:
_local2 = new mc_tutor_lev_3();
break;
case 4:
_local2 = new mc_tutor_lev_anomalies();
break;
case 6:
_local2 = new mc_tutor_lev_autobus();
break;
case 8:
_local2 = new mc_tutor_lev_girl();
break;
};
if (_local2 != null){
addBtn(_local2);
_local2.addEventListener(MouseEvent.CLICK, handleTutorClose);
if ((((_shopAppearance > 2)) && ((_arg1 > 8)))){
_tutorEnabled = false;
};
_tutor = _local2;
};
};
return (_local2);
}
private function addBtn(_arg1:DisplayObjectContainer){
_btn = new btn_tutor_donot_show();
_arg1.addChild(_btn);
_btn.x = 180;
_btn.y = 463;
_btn.addEventListener(MouseEvent.CLICK, handleBtnClick);
}
private function handleBtnClick(_arg1:MouseEvent){
_tutorEnabled = false;
}
public function getShopGunSlotReminder():MovieClip{
_shopGunzBought++;
var _local1:MovieClip = new mc_tutor_shop_useslot();
addBtn(_local1);
_local1.addEventListener(MouseEvent.CLICK, handleTutorClose);
_btn.visible = false;
_tutor = _local1;
return (_local1);
}
public function disableTutorial(){
_tutorEnabled = false;
}
public function enableTutorial(_arg1:Boolean=true){
_tutorEnabled = true;
if (_arg1){
_shopAppearance = 0;
};
}
public function get shopAppearance():int{
return (_shopAppearance);
}
private function handleTutorClose(_arg1:MouseEvent){
_btn.removeEventListener(MouseEvent.CLICK, handleBtnClick);
_btn = null;
_tutor.addEventListener(MouseEvent.CLICK, handleTutorClose);
if (_tutor.parent != null){
_tutor.parent.removeChild(_tutor);
};
CClipTools.fullClearDisplayObject(_tutor);
_tutor = null;
dispatchEvent(new Event(EVT_TUTOR_CLOSED));
}
public function get tutorEnabled():Boolean{
return (_tutorEnabled);
}
public function getShopTutor(_arg1:int):MovieClip{
var _local2:MovieClip;
_shopAppearance++;
if (_tutorEnabled){
if ((((_shopAppearance == 1)) && ((_arg1 == 2)))){
_local2 = new mc_tutor_shop_1();
addBtn(_local2);
_local2.addEventListener(MouseEvent.CLICK, handleTutorClose);
_tutor = _local2;
} else {
if ((((_shopAppearance == 2)) && ((_arg1 == 3)))){
_local2 = new mc_tutor_shop_2();
addBtn(_local2);
_local2.addEventListener(MouseEvent.CLICK, handleTutorClose);
_tutor = _local2;
};
};
};
return (_local2);
}
public function get shopGunzBought():int{
return (_shopGunzBought);
}
public function getShopPointsReminder():MovieClip{
var _local1:MovieClip = new mc_tutor_shop_upgradePointsAwailable();
addBtn(_local1);
_local1.addEventListener(MouseEvent.CLICK, handleTutorClose);
_btn.visible = false;
_tutor = _local1;
return (_local1);
}
public function set tutorEnabled(_arg1:Boolean){
_tutorEnabled = _arg1;
}
public static function get inst():TutorManager{
if (TutorManager._instance == null){
TutorManager._allowInstance = true;
TutorManager._instance = new (TutorManager);
TutorManager._allowInstance = false;
};
return (TutorManager._instance);
}
}
}//package
Section 422
//UIAlert (UIAlert)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class UIAlert extends Sprite {
private var _btnOk:SimpleButton;
public var i_btn_no:SimpleButton;
private var _isOkChoice:Boolean;// = false
public var i_btn_yes:SimpleButton;
public var i_tf_alertText:TextField;
private var _textF:TextField;
private var _btnNo:SimpleButton;
public static const EVT_OK:String = "alert event ok";
public static const EVT_NO:String = "alert event fuckoff";
public function UIAlert(_arg1:String, _arg2:Boolean=true){
_textF = (i_tf_alertText as TextField);
_btnOk = (i_btn_yes as SimpleButton);
_btnNo = (i_btn_no as SimpleButton);
_btnNo.visible = _arg2;
_textF.wordWrap = true;
_textF.text = _arg1;
_btnOk.addEventListener(MouseEvent.CLICK, handleOk);
_btnNo.addEventListener(MouseEvent.CLICK, handleNo);
}
private function removeListeners(){
_btnOk.removeEventListener(MouseEvent.CLICK, handleOk);
_btnNo.removeEventListener(MouseEvent.CLICK, handleNo);
}
public function get isOkChoice():Boolean{
return (_isOkChoice);
}
private function handleNo(_arg1:MouseEvent){
removeListeners();
dispatchEvent(new Event(EVT_NO));
}
private function handleOk(_arg1:MouseEvent){
removeListeners();
_isOkChoice = true;
dispatchEvent(new Event(EVT_OK));
}
}
}//package
Section 423
//UISoundControl (UISoundControl)
package {
import flash.display.*;
import flash.events.*;
public class UISoundControl extends MovieClip {
public var i_mc_soundControl:UIsoundSlider;
private var _musicControl:UIsoundSlider;
public var i_mc_musicControl:UIsoundSlider;
private var _fxControl:UIsoundSlider;
public function UISoundControl(){
_musicControl = (i_mc_musicControl as UIsoundSlider);
_fxControl = (i_mc_soundControl as UIsoundSlider);
_musicControl.volumeLevel = SoundManager.inst().volumeMusic;
_fxControl.volumeLevel = SoundManager.inst().volume;
_musicControl.addEventListener(UIsoundSlider.EVT_CHANGE, handleMusicChange, false, 0, true);
_fxControl.addEventListener(UIsoundSlider.EVT_CHANGE, handleFxChange, false, 0, true);
}
private function handleFxChange(_arg1:Event){
SoundManager.inst().volume = _fxControl.volumeLevel;
SoundManager.inst().play(SoundManager.SHOT_RIFLE);
}
private function handleMusicChange(_arg1:Event){
SoundManager.inst().volumeMusic = _musicControl.volumeLevel;
}
}
}//package
Section 424
//UIsoundSlider (UIsoundSlider)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
public class UIsoundSlider extends MovieClip {
private var _lenX:Number;
private var _minX:Number;// = 0
private var _volumeLevel:Number;
private var _maxX:Number;// = 65
public var i_btn_slider:MovieClip;
private var _btnSlider:MovieClip;
public static const EVT_CHANGE:String = "event_SliderChanged";
public function UIsoundSlider(){
_lenX = (_maxX - _minX);
_btnSlider = (i_btn_slider as MovieClip);
_btnSlider.addEventListener(MouseEvent.MOUSE_DOWN, handleBtnDown, false, 0, true);
_btnSlider.addEventListener(MouseEvent.MOUSE_UP, handleBtnUp, false, 0, true);
}
private function updateVolume(){
_btnSlider.stopDrag();
var _local1:Stage = this.stage;
_local1.removeEventListener(MouseEvent.MOUSE_UP, handleBtnUpOutside);
_volumeLevel = ((_btnSlider.x - _minX) / _lenX);
dispatchEvent(new Event(EVT_CHANGE));
}
private function handleBtnUpOutside(_arg1:Event){
updateVolume();
}
private function handleBtnUp(_arg1:Event){
updateVolume();
}
public function get volumeLevel():Number{
return (_volumeLevel);
}
private function updatePos(){
_btnSlider.x = (_minX + (_lenX * _volumeLevel));
}
public function set volumeLevel(_arg1:Number){
if ((((_arg1 >= 0)) || ((_arg1 <= 1)))){
_volumeLevel = _arg1;
updatePos();
};
}
private function handleBtnDown(_arg1:Event){
_btnSlider.startDrag(false, new Rectangle(_minX, _btnSlider.y, (_maxX - _minX), 0));
var _local2:Stage = this.stage;
_local2.addEventListener(MouseEvent.MOUSE_UP, handleBtnUpOutside);
}
}
}//package
Section 425
//weaponSCARLogo (weaponSCARLogo)
package {
import flash.display.*;
public dynamic class weaponSCARLogo extends MovieClip {
public function weaponSCARLogo(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 426
//vodoprovad1 (vodoprovad1)
package {
import animations.*;
public dynamic class vodoprovad1 extends LevelAnimDelayedAbs {
public function vodoprovad1(){
addFrameScript(129, frame130);
}
function frame130(){
stop();
}
}
}//package
Section 427
//Yard_bus_1 (Yard_bus_1)
package {
import enemies.*;
public dynamic class Yard_bus_1 extends CEnemyBus {
public function Yard_bus_1(){
addFrameScript(39, frame40, 49, frame50);
}
function frame50(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 428
//yard_bus_2 (yard_bus_2)
package {
import enemies.*;
public dynamic class yard_bus_2 extends CEnemyBus {
public function yard_bus_2(){
addFrameScript(39, frame40, 50, frame51);
}
function frame51(){
stop();
}
function frame40(){
stop();
}
}
}//package
Section 429
//yard_bus_3 (yard_bus_3)
package {
import enemies.*;
public dynamic class yard_bus_3 extends CEnemyBus {
public function yard_bus_3(){
addFrameScript(39, frame40, 50, frame51);
}
function frame51(){
stop();
}
function frame40(){
stop();
}
}
}//package