Section 1
//BloodSpatter (effects.BloodSpatter)
package effects {
public dynamic class BloodSpatter extends VFX {
}
}//package effects
Section 2
//BloodStain (effects.BloodStain)
package effects {
import flash.display.*;
import flash.geom.*;
public class BloodStain extends MovieClip {
public var matrix:Matrix;
public function BloodStain(_arg1:BitmapData=null, _arg2:Number=0, _arg3:Number=0){
matrix = new Matrix();
gotoAndStop(Math.ceil((Math.random() * 3)));
x = _arg2;
y = _arg3;
matrix.tx = _arg2;
matrix.ty = _arg3;
if (_arg1){
_arg1.draw(this, matrix);
};
}
}
}//package effects
Section 3
//PatchDecal (effects.PatchDecal)
package effects {
import flash.geom.*;
public class PatchDecal {
public var frameRect:Rectangle;
public var pt:Point;
public function PatchDecal(_arg1:Number, _arg2:Number, _arg3:int=1){
pt = new Point((_arg1 - 100), (_arg2 - 50));
frameRect = new Rectangle(0, ((_arg3 * 100) - 100), 200, 100);
}
}
}//package effects
Section 4
//VFX (effects.VFX)
package effects {
import flash.display.*;
import flash.events.*;
public class VFX extends MovieClip {
public var junk:Boolean;
public var z:int;// = 3
public function VFX(_arg1:Number=0, _arg2:Number=0){
z = 3;
super();
x = _arg1;
y = _arg2;
}
public function routine(_arg1:Event=null){
if (currentFrame == totalFrames){
junk = true;
stop();
};
}
}
}//package effects
Section 5
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 6
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 7
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 8
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 9
//attack1_30 (Game_fla.attack1_30)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class attack1_30 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 10
//bulletmeter_51 (Game_fla.bulletmeter_51)
package Game_fla {
import flash.display.*;
public dynamic class bulletmeter_51 extends MovieClip {
public function bulletmeter_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 11
//die1_24 (Game_fla.die1_24)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class die1_24 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 12
//die2_25 (Game_fla.die2_25)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class die2_25 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 13
//die3_26 (Game_fla.die3_26)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class die3_26 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 14
//flip_31 (Game_fla.flip_31)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class flip_31 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 15
//getdown1_18 (Game_fla.getdown1_18)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class getdown1_18 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 16
//getdown2_19 (Game_fla.getdown2_19)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class getdown2_19 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 17
//getup1_20 (Game_fla.getup1_20)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class getup1_20 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 18
//getup2_21 (Game_fla.getup2_21)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class getup2_21 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 19
//helpnote_63 (Game_fla.helpnote_63)
package Game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class helpnote_63 extends MovieClip {
public var scoreTxt:TextField;
}
}//package Game_fla
Section 20
//hit1_27 (Game_fla.hit1_27)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class hit1_27 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 21
//hit2_28 (Game_fla.hit2_28)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class hit2_28 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 22
//hit3_29 (Game_fla.hit3_29)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class hit3_29 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 23
//idle0_6 (Game_fla.idle0_6)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class idle0_6 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 24
//idle1_16 (Game_fla.idle1_16)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class idle1_16 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 25
//idle2_17 (Game_fla.idle2_17)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class idle2_17 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 26
//intropage_39 (Game_fla.intropage_39)
package Game_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class intropage_39 extends MovieClip {
public var p;
public function intropage_39(){
addFrameScript(79, frame80);
}
function frame80(){
p = parent;
p.play();
}
}
}//package Game_fla
Section 27
//pelicula_37 (Game_fla.pelicula_37)
package Game_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class pelicula_37 extends MovieClip {
public var p;
public function pelicula_37(){
addFrameScript(89, frame90);
}
function frame90(){
p = parent;
p.play();
}
}
}//package Game_fla
Section 28
//polaroid_52 (Game_fla.polaroid_52)
package Game_fla {
import flash.display.*;
public dynamic class polaroid_52 extends MovieClip {
public var photo:MovieClip;
}
}//package Game_fla
Section 29
//reticle_61 (Game_fla.reticle_61)
package Game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class reticle_61 extends MovieClip {
public var zoomTxt:TextField;
}
}//package Game_fla
Section 30
//run_23 (Game_fla.run_23)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class run_23 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 31
//soundscontainer_2 (Game_fla.soundscontainer_2)
package Game_fla {
import flash.display.*;
public dynamic class soundscontainer_2 extends MovieClip {
public function soundscontainer_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Game_fla
Section 32
//walk_22 (Game_fla.walk_22)
package Game_fla {
import flash.display.*;
import sniper.*;
public dynamic class walk_22 extends MovieClip {
public var bHand:BipedHand;
public var fHand:BipedHand;
public var bWeapon:BipedWeapon;
public var fWeapon:BipedWeapon;
public var fArm:BipedForearm;
public var fFoot:BipedFoot;
public var bLeg:BipedLeg;
public var fThigh:BipedThigh;
public var bBicep:BipedBicep;
public var bArm:BipedForearm;
public var mBody:BipedBody;
public var fLeg:BipedLeg;
public var bThigh:BipedThigh;
public var fBicep:BipedBicep;
public var mHead:BipedHead;
public var bFoot:BipedFoot;
}
}//package Game_fla
Section 33
//MochiDigits (mochi.MochiDigits)
package mochi {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi
Section 34
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 35
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__ms_";
private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
public static var netup:Boolean = true;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
};
return (_local2);
}
public static function getVersion():String{
return ("1.43");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
public static function get id():String{
return (_id);
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
trace("connected!");
_connecting = false;
_connected = true;
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var vars:URLVariables;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servicesURL != undefined){
_servicesURL = urlOptions(clip).servicesURL;
};
MochiServices.allowDomains(_servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999))));
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_servicesURL);
vars = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
req.data = vars;
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 36
//GamePage (pages.GamePage)
package pages {
import flash.display.*;
import flash.events.*;
import sniper.*;
import utils.*;
import flash.geom.*;
import fl.transitions.easing.*;
import fl.transitions.*;
import flash.text.*;
import flash.ui.*;
public class GamePage extends MovieClip {
public const GAMEOVER:String = "gameover";
public var stopwatch:Watch;
var sndGoal;
var photo:Bitmap;
public var reticle:MovieClip;
var screenData:BitmapData;
var screenRect:Rectangle;
var screen:Bitmap;
public var dashboard:MovieClip;
public var score:Number;// = 0
public var playSFX:Function;
var screenHeight:Number;// = 100
public var shots:int;// = 0
var screenWidth:Number;// = 100
var ammo:int;// = 10
public var helpNote:MovieClip;
public var headshots:int;// = 0
public var accuracy:Number;// = 0
var photoData:BitmapData;
public var statusTxt:TextField;
public var hits:int;// = 0
public var cursor:MovieClip;
var maxZoom:Number;// = 5
var sndHit;
var tgtEnemy:Biped;
public var bullets:MovieClip;
var sndRicochet;
public var polaroid:MovieClip;
public var toggleSounds:Function;
var activated:Boolean;// = true
var zoom:Number;// = 2
var sndSniper;
public var playArea:PlayArea;
public var kills1:int;// = 0
public var kills2:int;// = 0
public function GamePage(){
activated = true;
screenWidth = 100;
screenHeight = 100;
photoData = new BitmapData(120, 100, true, 0xFFFFFF);
photo = new Bitmap(photoData);
sndSniper = new SndSniper();
sndRicochet = new SndRicochet();
sndHit = new SndHit();
sndGoal = new SndGoal();
kills1 = 0;
kills2 = 0;
headshots = 0;
shots = 0;
hits = 0;
score = 0;
accuracy = 0;
zoom = 2;
maxZoom = 5;
ammo = 10;
super();
statusTxt.mouseEnabled = false;
screenData = new BitmapData(screenWidth, screenHeight);
screen = new Bitmap(screenData);
screenRect = new Rectangle(0, 0, screenWidth, screenHeight);
addChildAt(screen, getChildIndex(reticle));
mouseEnabled = false;
reticle.mouseEnabled = false;
Mouse.hide();
stopwatch.addEventListener(stopwatch.END_TIMER, gameOver, false, 0, true);
playArea.addEventListener(playArea.DONE_ROUTINE, routine, false, 0, true);
playArea.addEventListener(playArea.SET_TARGET, getTargetPic, false, 0, true);
playArea.addEventListener(playArea.TARGET_KILLED, targetKilled, false, 0, true);
playArea.addEventListener(MouseEvent.MOUSE_DOWN, mClick, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_DOWN, kDown, false, 0, true);
stage.addEventListener(Event.ACTIVATE, mHide, false, 0, true);
stage.addEventListener(Event.DEACTIVATE, mShow, false, 0, true);
}
protected function updateBullets(){
bullets.gotoAndStop((ammo + 2));
}
protected function routine(_arg1:Event){
if (ammo < 1){
gameOver(_arg1);
};
if (!tgtEnemy){
playArea.newTarget();
};
renderScreen(_arg1);
}
protected function clearScreen(_arg1:Event){
screenData.lock();
screenData.fillRect(screenRect, 0xFFFFFF);
screenData.unlock();
screen.bitmapData = screenData;
}
protected function mClick(_arg1:MouseEvent){
var _local2:Point;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:Boolean;
var _local7:int;
var _local8:PlayItem;
if (ammo > 0){
playSFX(sndSniper);
_local2 = new Point(reticle.x, reticle.y);
_local3 = playArea.getObjectsUnderPoint(_local2);
_local4 = _local3.length;
_local5 = 1;
_local6 = false;
_local7 = (_local4 - 1);
while (_local7 >= 0) {
if ((_local3[_local7].parent is PlayItem)){
_local8 = _local3[_local7].parent;
_local5 = (_local5 - _local8.armor);
_local8.hit(reticle.x, reticle.y);
if ((_local8 is BipedPart)){
playSFX(sndHit);
_local6 = true;
hits++;
if (_local8.name == "mHead"){
headshots++;
statusTxt.appendText("\n + HEADSHOT bonus!");
ammo++;
stopwatch.addTime(2);
};
};
if (_local5 < 1){
break;
};
};
_local7--;
};
if (!_local6){
statusTxt.text = "miss";
playSFX(sndRicochet);
};
shots++;
clearScreen(_arg1);
reticle.y = (reticle.y - 20);
ammo--;
updateScore(_arg1);
updateBullets();
};
}
protected function mShow(_arg1:Event){
activated = false;
Mouse.show();
}
protected function updateScore(_arg1:Event):Number{
if ((((shots > 0)) && ((hits > 0)))){
accuracy = Math.round(((hits / shots) * 100));
} else {
accuracy = 0;
};
score = (((kills1 * 500) + (kills2 * 100)) + (headshots * 250));
trace(((((kills1 + ", ") + kills2) + ", ") + headshots));
trace(((((hits + "/") + shots) + " = ") + accuracy));
return (score);
}
protected function mHide(_arg1:Event){
activated = true;
Mouse.hide();
}
protected function targetKilled(_arg1:Event){
var _local2:*;
_local2 = playArea.lastKill;
if (_local2 == tgtEnemy){
statusTxt.text = "major target killed.";
playSFX(sndGoal);
kills1++;
ammo = (ammo + 2);
if (ammo > 10){
ammo = 10;
};
stopwatch.addTime(5);
statusTxt.appendText("\n + time and ammo.");
updateBullets();
playArea.newTarget();
} else {
kills2++;
statusTxt.text = "minor target killed.";
statusTxt.appendText("\n no bonus");
};
helpNote.scoreTxt.text = String(updateScore(_arg1));
}
protected function getTargetPic(_arg1:Event){
var _local2:Matrix;
var _local3:ColorTransform;
var _local4:Rectangle;
tgtEnemy = playArea.tgtEnemy;
_local2 = new Matrix();
_local2.tx = 12;
_local2.ty = 55;
_local2.scale(5, 5);
_local3 = new ColorTransform(1, 1, 1);
_local4 = new Rectangle(0, 0, 120, 100);
photoData.fillRect(_local4, 4294967295);
photoData.draw(tgtEnemy, _local2, _local3);
photo.bitmapData = photoData;
polaroid.photo.addChildAt(photo, 1);
polaroid.xTween = new Tween(polaroid, "x", Strong.easeOut, -100, 78, 1, true);
}
protected function renderScreen(_arg1:Event){
var _local2:Rectangle;
var _local3:Matrix;
if (activated){
cursor.x = mouseX;
cursor.y = mouseY;
reticle.x = (reticle.x + ((cursor.x - reticle.x) / 5));
reticle.y = (reticle.y + ((cursor.y - reticle.y) / 5));
if (Math.abs((cursor.x - reticle.x)) < 0.5){
reticle.x = cursor.x;
};
if (Math.abs((cursor.y - reticle.y)) < 0.5){
reticle.y = cursor.y;
};
reticle.zoomTxt.text = (String(zoom) + "X ZOOM");
screen.x = (reticle.x - (screenWidth / 2));
screen.y = (reticle.y - (screenHeight / 2));
_local2 = new Rectangle(0, 0, screenWidth, screenHeight);
_local3 = new Matrix();
_local3.scale(zoom, zoom);
_local3.tx = ((screenWidth / 2) - (reticle.x * zoom));
_local3.ty = ((screenHeight / 2) - (reticle.y * zoom));
screenData.lock();
screenData.fillRect(screenRect, 0xFFFFFF);
screenData.draw(playArea, _local3, null, null, _local2);
screenData.unlock();
screen.bitmapData = screenData;
};
}
protected function kDown(_arg1:KeyboardEvent){
if ((((_arg1.keyCode == 65)) || ((_arg1.keyCode == 37)))){
getTargetPic(null);
} else {
if ((((_arg1.keyCode == 39)) || ((_arg1.keyCode == 68)))){
getTargetPic(null);
};
};
if ((((_arg1.keyCode == 38)) || ((_arg1.keyCode == 87)))){
if (zoom < maxZoom){
zoom = (zoom + 0.5);
};
} else {
if ((((_arg1.keyCode == 83)) || ((_arg1.keyCode == 40)))){
if (zoom > 1){
zoom = (zoom - 0.5);
};
};
};
}
protected function gameOver(_arg1:Event){
updateScore(_arg1);
playArea.removeEventListener(playArea.DONE_ROUTINE, routine);
playArea.removeEventListener(playArea.SET_TARGET, getTargetPic);
playArea.removeEventListener(playArea.TARGET_KILLED, targetKilled);
playArea.removeEventListener(MouseEvent.MOUSE_DOWN, mClick);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kDown);
stage.removeEventListener(Event.ACTIVATE, mHide);
stage.removeEventListener(Event.DEACTIVATE, mShow);
dispatchEvent(new Event(GAMEOVER, false, false));
}
}
}//package pages
Section 37
//Biped (sniper.Biped)
package sniper {
import flash.display.*;
import tileClasses.*;
import flash.events.*;
import utils.*;
import flash.geom.*;
import fl.transitions.easing.*;
import fl.transitions.*;
public class Biped extends PlayItem {
public const MOVED:String = "moved";
public const ADD_PANIC:String = "add_panic";
public const HIT:String = "hit";
public var aA:Array;
var moving:Boolean;
var calm:Number;// = 100
var speed:Number;// = 0.4
var dead:Boolean;// = false
var panic:Number;// = 0
var aTween:Tween;
public var energy:Number;// = 100
public var fA:Array;
var looping:Number;// = 0
var xTween:Tween;
var active:Number;// = 50
public var hitX:Number;
public var hitY:Number;
var stance:Number;// = 0
var aMax:Number;// = 100
var aCnt:Number;// = 0
public var doll:MovieClip;
var yTween:Tween;
public var mP:Array;
var fArray:Array;
var thinking:Boolean;// = false
var sense:Number;// = 30
public var pA:Array;
var pF:Pathfinder;
var facing;// = 1
public function Biped(){
var _local1:*;
var _local2:*;
var _local3:*;
mP = new Array();
pA = new Array("head", "body", "bicep", "arm", "hand", "thigh", "leg", "foot", "weapon");
fA = new Array(2, 2, [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]);
aA = new Array();
facing = 1;
active = 50;
calm = 100;
speed = 0.4;
sense = 30;
panic = 0;
energy = 100;
aCnt = 0;
aMax = 100;
looping = 0;
stance = 0;
thinking = false;
dead = false;
super();
addFrameScript(0, frame1);
mouseChildren = false;
nick = "Soldier";
lifeMax = 2;
life = lifeMax;
_local1 = (Math.ceil((Math.random() * 8)) + 1);
_local2 = (Math.ceil((Math.random() * 5)) + 1);
_local3 = (Math.ceil((Math.random() * 2)) + 2);
fA = new Array(_local1, _local2, [_local2, _local2], [_local2, _local2], [2, 2], [_local2, _local2], [_local2, _local2], [2, 2], [_local3, 2]);
mP = new Array();
fixFacing();
}
public function modPart(_arg1:String, _arg2):int{
var _local3:Array;
var _local4:int;
var _local5:String;
_local3 = splicePartName(_arg1);
_local4 = _local3[0];
_local5 = _local3[1];
switch (_local5){
case "f":
if (facing > 0){
fA[_local4][0] = _arg2;
} else {
fA[_local4][1] = _arg2;
};
break;
case "b":
if (facing > 0){
fA[_local4][1] = _arg2;
} else {
fA[_local4][0] = _arg2;
};
break;
case "m":
fA[_local4] = _arg2;
break;
};
return (_arg2);
}
public function moveTo(_arg1:Number, _arg2:Number):Number{
var _local3:Tile;
var _local4:Number;
var _local5:Point;
var _local6:Point;
var _local7:Number;
var _local8:Number;
energy = (energy - 2);
if (panic > 0){
panic = (panic - 2);
};
_local3 = tM.getTile2(_arg1, _arg2);
if (_arg1 < tile.xPos){
facing = -1;
} else {
if (_arg1 > tile.xPos){
facing = 1;
};
};
if (!fixFacing()){
if (_local3.passable){
tile.passable = true;
tile.occupant = null;
tile = _local3;
z = tile.z;
tile.passable = false;
tile.occupant = this;
looping = 2;
_local5 = new Point(x, y);
_local6 = new Point(_local3.x, _local3.y);
_local7 = Point.distance(_local5, _local6);
_local8 = speed;
if (panic > 50){
_local8 = (speed * 2);
};
_local4 = Math.ceil((_local7 / _local8));
xTween.continueTo(_local3.x, _local4);
yTween.continueTo(_local3.y, _local4);
} else {
_local4 = 0;
mP = new Array();
};
} else {
mP = new Array();
_local4 = 0;
};
return (_local4);
}
protected function fixFacing():Boolean{
var _local1:Number;
_local1 = scaleX;
scaleX = (size * facing);
scaleY = size;
if (_local1 != scaleX){
gotoAndStop("flip");
looping = 0;
moving = true;
return (true);
};
return (false);
}
public function getPart(_arg1:String){
var _local2:Array;
var _local3:int;
var _local4:String;
var _local5:*;
_local2 = splicePartName(_arg1);
_local3 = _local2[0];
_local4 = _local2[1];
switch (_local4){
case "f":
if (facing > 0){
_local5 = fA[_local3][0];
} else {
_local5 = fA[_local3][1];
};
break;
case "b":
if (facing > 0){
_local5 = fA[_local3][1];
} else {
_local5 = fA[_local3][0];
};
break;
case "m":
_local5 = fA[_local3];
break;
};
return (_local5);
}
protected function getup(){
if (!moving){
if (stance > 0){
gotoAndStop(("getup" + stance));
stance--;
looping = 0;
moving = true;
};
};
}
function frame1(){
stop();
}
public function unpack(_arg1, _arg2:int, _arg3:int){
moving = false;
stance = 0;
gotoAndStop("idle0");
room = _arg1;
room.addChild(this);
tM = room.tM;
pF = new Pathfinder(tM);
pF.addEventListener(pF.PATH_COMPLETE, newPath, false, 0, true);
tile = tM.getTile2(_arg2, _arg3);
tile.passable = false;
x = tile.x;
y = (tile.y - tile.h);
xTween = new Tween(this, "x", None.easeNone, x, x, 1, false);
yTween = new Tween(this, "y", None.easeNone, y, y, 1, false);
xTween.fforward();
yTween.fforward();
xTween.addEventListener(TweenEvent.MOTION_CHANGE, whileMoving, false, 0, true);
xTween.addEventListener(TweenEvent.MOTION_FINISH, finishMoving, false, 0, true);
}
protected function finishMoving(_arg1:Event){
moving = false;
looping = 0;
if (mP.length == 0){
gotoAndStop("idle");
};
dispatchEvent(new Event(MOVED, false, false));
}
public function routine(_arg1:Event=null){
var _local2:*;
var _local3:*;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if (doll){
_local2 = doll.currentFrame;
if (_local2 == doll.totalFrames){
if (looping == 0){
gotoAndStop(("idle" + stance));
moving = false;
} else {
if (looping == 1){
doll.stop();
} else {
if (looping == -1){
doll.stop();
looping = -2;
junk = true;
};
};
};
};
};
if (!dead){
if (!moving){
if (!thinking){
if (mP.length > 0){
if (stance == 0){
_local3 = mP[0];
_local4 = _local3.xPos;
_local5 = _local3.yPos;
mP.splice(0, 1);
moveTo(_local4, _local5);
} else {
getup();
};
} else {
aCnt = (aCnt + active);
if (aCnt > aMax){
aCnt = 0;
_local6 = (Math.random() * 100);
panic--;
if (panic > 50){
dispatchEvent(new Event(ADD_PANIC, false, false));
};
switch (stance){
case 0:
if (panic > 70){
roam();
} else {
if (energy < 50){
getdown();
} else {
if ((_local6 + 50) < energy){
roam();
};
};
};
break;
case 1:
energy = (energy + 1);
if (panic > 50){
getup();
} else {
if (energy > 80){
getup();
};
};
break;
case 2:
break;
};
};
};
} else {
pF.findPath();
};
};
};
}
public function hitThis(_arg1:String, _arg2:Number=0, _arg3:Number=0):Boolean{
var _local4:Array;
var _local5:int;
var _local6:int;
xTween.stop();
yTween.stop();
hitX = _arg2;
hitY = _arg3;
mP = new Array();
panic = 100;
alert();
moving = true;
if (!dead){
_local4 = splicePartName(_arg1);
_local5 = _local4[0];
doll[_arg1].gotoAndStop(modPart(_arg1, "hit"));
if (_local5 < 1){
_local6 = 1;
life = 0;
} else {
if (_local5 < 4){
_local6 = 2;
life = (life - 2);
} else {
_local6 = 3;
life = (life - 1);
};
};
if (life < 1){
dead = true;
tile.occupant = null;
tile.passable = true;
looping = -1;
gotoAndStop(("die" + _local6));
dispatchEvent(new Event(HIT, false, false));
return (true);
};
gotoAndStop(("hit" + _local6));
looping = 0;
dispatchEvent(new Event(HIT, false, false));
return (false);
};
return (false);
}
protected function whileMoving(_arg1:Event){
if (!moving){
if (panic > 50){
if (currentLabel != "run"){
gotoAndStop("run");
};
moving = true;
} else {
if (currentLabel != "walk"){
gotoAndStop("walk");
};
moving = true;
};
};
}
protected function getdown(){
if (!moving){
mP = new Array();
if (stance < 2){
stance++;
looping = 0;
moving = true;
gotoAndStop(("getdown" + stance));
};
};
}
protected function junkThis(_arg1:Event){
tile.passable = true;
tile.occupied = null;
junk = true;
}
protected function roam(){
var _local1:*;
_local1 = tM.tileArray[Math.floor((Math.random() * (tM.xTiles - 1)))][Math.floor((Math.random() * (tM.yTiles - 1)))];
thinking = true;
pF.generatePath(tile, _local1);
}
protected function alert(){
var _local1:Array;
var _local2:*;
var _local3:Biped;
var _local4:Number;
_local1 = searchNear();
for (_local2 in _local1) {
if ((_local1[_local2] is Biped)){
_local3 = _local1[_local2];
_local4 = Math.round(getDistance(x, y, _local3.x, _local3.y));
_local3.panic = (_local3.panic + _local4);
};
};
}
protected function updateParts(){
doll.mHead.gotoAndStop(fA[0]);
doll.mBody.gotoAndStop(fA[1]);
if (facing > 0){
doll.fBicep.gotoAndStop(fA[2][0]);
doll.fArm.gotoAndStop(fA[3][0]);
doll.fHand.gotoAndStop(fA[4][0]);
doll.fThigh.gotoAndStop(fA[5][0]);
doll.fLeg.gotoAndStop(fA[6][0]);
doll.fFoot.gotoAndStop(fA[7][0]);
doll.fWeapon.gotoAndStop(fA[8][0]);
doll.bBicep.gotoAndStop(fA[2][1]);
doll.bArm.gotoAndStop(fA[3][1]);
doll.bHand.gotoAndStop(fA[4][1]);
doll.bThigh.gotoAndStop(fA[5][1]);
doll.bLeg.gotoAndStop(fA[6][1]);
doll.bFoot.gotoAndStop(fA[7][1]);
doll.bWeapon.gotoAndStop(fA[8][1]);
} else {
doll.fBicep.gotoAndStop(fA[2][1]);
doll.fArm.gotoAndStop(fA[3][1]);
doll.fHand.gotoAndStop(fA[4][1]);
doll.fThigh.gotoAndStop(fA[5][1]);
doll.fLeg.gotoAndStop(fA[6][1]);
doll.fFoot.gotoAndStop(fA[7][1]);
doll.fWeapon.gotoAndStop(fA[8][1]);
doll.bBicep.gotoAndStop(fA[2][0]);
doll.bArm.gotoAndStop(fA[3][0]);
doll.bHand.gotoAndStop(fA[4][0]);
doll.bThigh.gotoAndStop(fA[5][0]);
doll.bLeg.gotoAndStop(fA[6][0]);
doll.bFoot.gotoAndStop(fA[7][0]);
doll.bWeapon.gotoAndStop(fA[8][0]);
};
}
public function splicePartName(_arg1:String):Array{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:int;
_local2 = _arg1;
_local3 = _local2.substr(0, 1);
_local4 = _local2.substring(1, _local2.length).toLowerCase();
_local5 = pA.indexOf(_local4);
return ([_local5, _local3, _local4]);
}
protected function newPath(_arg1:Event){
mP = pF.movePath;
thinking = false;
}
protected function searchNear():Array{
var _local1:Number;
var _local2:Number;
var _local3:Array;
var _local4:Tile;
var _local5:*;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Array;
_local1 = Math.ceil((sense / 10));
_local6 = tile.xPos;
_local7 = tile.yPos;
_local10 = new Array();
_local2 = 1;
while (_local2 <= _local1) {
_local3 = new Array();
_local8 = (_local6 - _local2);
while (_local8 <= (_local6 + _local2)) {
_local9 = (_local7 - _local2);
while (_local9 <= (_local7 + _local2)) {
_local4 = tM.getTile2(_local8, _local9);
if (_local4){
if (_local4 != tile){
_local5 = _local4.occupant;
if ((_local5 is PlayItem)){
_local10.push(_local5);
};
};
};
_local9++;
};
_local8++;
};
_local2++;
};
return (_local10);
}
}
}//package sniper
Section 38
//BipedBicep (sniper.BipedBicep)
package sniper {
public dynamic class BipedBicep extends BipedPart {
}
}//package sniper
Section 39
//BipedBody (sniper.BipedBody)
package sniper {
public dynamic class BipedBody extends BipedPart {
}
}//package sniper
Section 40
//BipedFoot (sniper.BipedFoot)
package sniper {
public dynamic class BipedFoot extends BipedPart {
}
}//package sniper
Section 41
//BipedForearm (sniper.BipedForearm)
package sniper {
public dynamic class BipedForearm extends BipedPart {
}
}//package sniper
Section 42
//BipedHand (sniper.BipedHand)
package sniper {
public dynamic class BipedHand extends BipedPart {
}
}//package sniper
Section 43
//BipedHead (sniper.BipedHead)
package sniper {
public dynamic class BipedHead extends BipedPart {
}
}//package sniper
Section 44
//BipedLeg (sniper.BipedLeg)
package sniper {
public dynamic class BipedLeg extends BipedPart {
}
}//package sniper
Section 45
//BipedPart (sniper.BipedPart)
package sniper {
public class BipedPart extends PlayItem {
var tgtFrame;
var main;
public function BipedPart(){
main = parent.parent;
tgtFrame = main.getPart(name);
super();
gotoAndStop(tgtFrame);
}
override public function hit(_arg1:Number=0, _arg2:Number=0){
return (main.hitThis(name, _arg1, _arg2));
}
}
}//package sniper
Section 46
//BipedThigh (sniper.BipedThigh)
package sniper {
public dynamic class BipedThigh extends BipedPart {
}
}//package sniper
Section 47
//BipedWeapon (sniper.BipedWeapon)
package sniper {
public dynamic class BipedWeapon extends BipedPart {
}
}//package sniper
Section 48
//DecalBitmap (sniper.DecalBitmap)
package sniper {
import flash.display.*;
public class DecalBitmap extends Bitmap {
public var z:int;// = 2
public function DecalBitmap(_arg1:BitmapData){
z = 2;
super(_arg1);
}
}
}//package sniper
Section 49
//PlayArea (sniper.PlayArea)
package sniper {
import flash.display.*;
import tileClasses.*;
import flash.events.*;
import utils.*;
import effects.*;
import flash.geom.*;
import flash.filters.*;
public class PlayArea extends MovieClip {
public const TARGET_KILLED:String = "target_killed";
public const SET_TARGET:String = "set_target";
public const ADD_PANIC:String = "add_panic";
public const DONE_ROUTINE:String = "done_routine";
var patchSheet:PatchSheet;
public var lastKill:Biped;
var enemies:int;// = 15
public var cA:Array;
public var dM:IsoDepthManager;
public var dB:Bitmap;
public var tM:Tilemap;
public var eA:Array;
public var ground:MovieClip;
var trees:int;// = 20
var filtersOn:Boolean;// = false
public var dBD:BitmapData;
public var tgtEnemy:Biped;
public var wA:Array;
public var pA:Array;
public function PlayArea(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:PatchDecal;
cA = new Array();
pA = new Array();
eA = new Array();
wA = new Array();
trees = 20;
enemies = 15;
filtersOn = false;
patchSheet = new PatchSheet(0, 0);
super();
mouseEnabled = false;
dBD = new BitmapData(600, 400, true, 0xFFFFFF);
dB = new DecalBitmap(dBD);
addChild(dB);
dM = new IsoDepthManager(this);
tM = new Tilemap(this, 21, 16, 30, 20);
tM.hBorder(0);
tM.hBorder(1);
tM.hBorder(2);
tM.hBorder(15);
tM.vBorder(0);
tM.vBorder(20);
ground.z = 0;
_local2 = 30;
_local1 = 0;
while (_local1 < _local2) {
_local3 = Math.round((Math.random() * ground.width));
_local4 = Math.round((Math.random() * ground.height));
_local5 = new PatchDecal(_local3, _local4, (Math.ceil((Math.random() * 2)) + 1));
dBD.copyPixels(patchSheet, _local5.frameRect, _local5.pt, null, null, true);
_local1++;
};
_local1 = 0;
while (_local1 < trees) {
addTree();
_local1++;
};
_local1 = 0;
while (_local1 < enemies) {
addBiped();
_local1++;
};
startSim();
}
function bipedHit(_arg1:Event):void{
var _local2:*;
var _local3:BloodStain;
var _local4:VFX;
_local2 = _arg1.currentTarget;
_local3 = new BloodStain(dBD, _local2.x, _local2.y);
_local4 = new BloodSpatter();
eA.push(_local4);
addChild(_local4);
_local4.x = _local2.hitX;
_local4.y = _local2.hitY;
if (_local2.dead){
lastKill = _local2;
dispatchEvent(new Event(TARGET_KILLED, false, false));
addBiped();
};
}
public function startSim(){
dM.fixDepth(null);
addEventListener(Event.ENTER_FRAME, routine, false, 0, true);
}
public function endSim(){
removeEventListener(Event.ENTER_FRAME, routine);
}
function sTarget(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
if ((_local2 is Biped)){
_local2.filters = new Array(new GlowFilter(0xFF0000, 1, 4, 4, 3));
} else {
_local2.filters = new Array(new GlowFilter(0xEEEEEE, 1, 4, 4, 3));
_local2.alpha = 0.5;
};
}
function addBiped(_arg1:Number=-1, _arg2:Number=-1):Biped{
var _local3:int;
var _local4:Biped;
var _local5:Array;
var _local6:int;
var _local7:Number;
var _local8:Tile;
if (_arg1 < 0){
_local5 = tM.getUnoccupied();
_local6 = _local5.length;
_local7 = Math.floor((Math.random() * _local6));
_local8 = _local5[_local7];
_arg1 = _local8.xPos;
_arg2 = _local8.yPos;
};
_local3 = cA.length;
cA[_local3] = new Biped();
_local4 = cA[_local3];
_local4.unpack(this, _arg1, _arg2);
_local4.addEventListener(_local4.HIT, bipedHit, false, 0, true);
_local4.addEventListener(_local4.ADD_PANIC, addPanic, false, 0, true);
_local4.addEventListener(_local4.MOVED, fixDepth, false, 0, true);
_local4.addEventListener(MouseEvent.MOUSE_OVER, sTarget, false, 0, true);
_local4.addEventListener(MouseEvent.MOUSE_OUT, bTarget, false, 0, true);
if (filtersOn){
_local4.filters = new Array(new GlowFilter(0, 1, 2, 2, 3));
};
return (_local4);
}
public function newTarget():Biped{
var _local1:*;
for (_local1 in cA) {
if (!cA[_local1].dead){
tgtEnemy = cA[_local1];
tgtEnemy.energy = 100;
dispatchEvent(new Event(SET_TARGET, false, false));
return (cA[_local1]);
};
};
trace("no more enemies left");
return (null);
}
function bTarget(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.filters = new Array();
_local2.alpha = 1;
}
protected function fixDepth(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
dM.singleFix(_local2);
}
protected function addPanic(_arg1:Event){
dispatchEvent(new Event(ADD_PANIC, false, false));
}
protected function routine(_arg1:Event){
dispatchEvent(new Event(DONE_ROUTINE, false, false));
runRoutine(cA);
runRoutine(eA);
}
protected function runRoutine(_arg1:Array){
var _local2:*;
var _local3:*;
var _local4:Matrix;
for (_local2 in _arg1) {
_local3 = _arg1[_local2];
if (!_local3.junk){
_local3.routine(null);
} else {
if ((_local3 is Biped)){
_local3.filters = new Array();
_local4 = new Matrix();
_local4.scale(_local3.scaleX, _local3.scaleY);
_local4.tx = _local3.x;
_local4.ty = _local3.y;
dBD.draw(_local3, _local4);
dB.bitmapData = dBD;
};
removeChild(_local3);
_arg1.splice(_local2, 1);
_local2--;
};
};
}
function clearStage(){
var _local1:int;
var _local2:int;
_local1 = 0;
_local2 = numChildren;
_local1 = 0;
while (_local1 < _local2) {
removeChildAt(0);
_local1++;
};
}
function addTree(_arg1:Number=-1, _arg2:Number=-1):Tree1{
var _local3:int;
var _local4:Tree1;
var _local5:Array;
var _local6:int;
var _local7:Number;
var _local8:Tile;
if (_arg1 < 0){
_local5 = tM.getUnoccupied();
_local6 = _local5.length;
_local7 = Math.floor((Math.random() * _local6));
_local8 = _local5[_local7];
_arg1 = _local8.xPos;
_arg2 = _local8.yPos;
};
_local3 = pA.length;
pA[_local3] = new Tree1();
_local4 = pA[_local3];
_local4.unpack(this, _arg1, _arg2);
if (filtersOn){
_local4.filters = new Array(new GlowFilter(0, 1, 2, 2, 3));
};
_local4.addEventListener(MouseEvent.MOUSE_OVER, sTarget, false, 0, true);
_local4.addEventListener(MouseEvent.MOUSE_OUT, bTarget, false, 0, true);
return (_local4);
}
}
}//package sniper
Section 50
//PlayItem (sniper.PlayItem)
package sniper {
import flash.display.*;
import tileClasses.*;
import flash.geom.*;
public class PlayItem extends MovieClip {
public var size:Number;// = 0.4
public var life:Number;// = 1
public var armor:int;// = 1
public var junk:Boolean;
public var nick:String;// = "play item"
var tM:Tilemap;
public var desc:String;// = "play item"
public var z:int;// = 2
public var tile:Tile;
public var lifeMax:Number;// = 1
public var room;
public function PlayItem(){
life = 1;
lifeMax = 1;
nick = "play item";
desc = "play item";
size = 0.4;
z = 2;
armor = 1;
super();
}
function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Point;
var _local6:Point;
var _local7:Number;
_local5 = new Point(_arg1, _arg2);
_local6 = new Point(_arg3, _arg4);
_local7 = Point.distance(_local5, _local6);
return (_local7);
}
public function hit(_arg1:Number=0, _arg2:Number=0){
}
}
}//package sniper
Section 51
//Tree1 (sniper.Tree1)
package sniper {
public class Tree1 extends PlayItem {
public var trunk:TreeTrunk;
public var leaves:TreeLeaves;
public function unpack(_arg1, _arg2:int, _arg3:int){
room = _arg1;
room.addChild(this);
tM = room.tM;
tile = tM.getTile2(_arg2, _arg3);
tile.passable = false;
tile.occupied = this;
x = tile.x;
y = (tile.y - tile.h);
scaleX = size;
scaleY = size;
leaves.armor = 0;
}
}
}//package sniper
Section 52
//Pathfinder (tileClasses.Pathfinder)
package tileClasses {
import flash.display.*;
import flash.events.*;
public class Pathfinder extends MovieClip {
public const PATH_COMPLETE:String = "path_complete";
var curDist:Number;// = 0
var targety:Number;
var curTile;
var path:Object;
var targetx:Number;
var maxDist:Number;// = 10
var starty:Number;
var startx:Number;
var tM:Tilemap;
public var movePath:Array;
var tgtTile:Tile;
var nodes:Number;
var cost:Number;
public function Pathfinder(_arg1:Tilemap){
maxDist = 10;
curDist = 0;
super();
tM = _arg1;
}
function addNode(_arg1, _arg2, _arg3, _arg4, _arg5):void{
var _local6:*;
var _local7:Number;
var _local8:Number;
nodes++;
_local6 = tM.getTile2(_arg2, _arg3);
_local7 = (Math.abs((_arg2 - _arg4)) + Math.abs((_arg3 - _arg5)));
if (_local6){
if (!path[((("node" + _arg2) + "_") + _arg3)]){
path.name = ((("node" + _arg2) + "_") + _arg3);
if (_local6.passable){
path[path.name] = {x:_arg2, y:_arg3, visited:false, parentx:_arg1.x, parenty:_arg1.y, cost:_local7};
_local8 = 0;
while (_local8 < path.uN.length) {
if (_local7 < path.uN[_local8].cost){
path.uN.splice(_local8, 0, path[path.name]);
break;
};
_local8++;
};
if (_local8 >= path.uN.length){
path.uN[path.uN.length] = path[path.name];
};
};
};
};
}
public function generatePath(_arg1:Tile, _arg2:Tile):void{
tgtTile = _arg2;
movePath = new Array();
curDist = 0;
startx = _arg1.xPos;
starty = _arg1.yPos;
targetx = _arg2.xPos;
targety = _arg2.yPos;
cost = (Math.abs((startx - targetx)) + Math.abs((starty - targety)));
nodes = 0;
path = new Object();
path.uN = new Array();
path.done = false;
path.targetx = targetx;
path.targety = targety;
path.name = ((("node" + startx) + "_") + starty);
path[path.name] = new Object();
path[path.name] = {x:startx, y:starty, visited:true, parentx:null, parenty:null, cost:cost};
path.uN.unshift(path[path.name]);
}
public function findPath():void{
if (path.uN.length > 0){
curDist++;
if (curDist < maxDist){
curTile = path.uN.shift();
if ((((curTile.x == targetx)) && ((curTile.y == targety)))){
make_path(curTile);
path.done = true;
path = null;
dispatchEvent(new Event(PATH_COMPLETE, false, false));
} else {
curTile.visited = true;
addNode(curTile, (curTile.x + 1), (curTile.y + 1), targetx, targety);
addNode(curTile, (curTile.x - 1), (curTile.y - 1), targetx, targety);
addNode(curTile, (curTile.x - 1), (curTile.y + 1), targetx, targety);
addNode(curTile, (curTile.x + 1), (curTile.y - 1), targetx, targety);
addNode(curTile, (curTile.x + 1), curTile.y, targetx, targety);
addNode(curTile, (curTile.x - 1), curTile.y, targetx, targety);
addNode(curTile, curTile.x, (curTile.y + 1), targetx, targety);
addNode(curTile, curTile.x, (curTile.y - 1), targetx, targety);
};
} else {
if (curTile){
make_path(curTile);
};
path.done = true;
path = null;
dispatchEvent(new Event(PATH_COMPLETE, false, false));
};
} else {
if (curTile){
make_path(curTile);
};
path.done = true;
path = null;
dispatchEvent(new Event(PATH_COMPLETE, false, false));
};
}
function make_path(_arg1):void{
while (_arg1.parentx != null) {
movePath.unshift(tM.getTile2(_arg1.x, _arg1.y));
_arg1 = path[((("node" + _arg1.parentx) + "_") + _arg1.parenty)];
};
}
}
}//package tileClasses
Section 53
//Tile (tileClasses.Tile)
package tileClasses {
import flash.display.*;
public dynamic class Tile extends Sprite {
public var yPos:Number;
public var ai:String;
public var h:int;// = 0
public var z:int;// = 2
public var tile:TileSprite;
public var occupant;
public var xPos:Number;
public var passable:Boolean;
public function Tile(){
z = 2;
h = 0;
super();
passable = false;
tile.y = h;
}
}
}//package tileClasses
Section 54
//Tilemap (tileClasses.Tilemap)
package tileClasses {
import flash.display.*;
import flash.geom.*;
public dynamic class Tilemap {
var timeline:MovieClip;
public var tileArray:Array;
public var yTiles:Number;
public var xTiles:Number;
var tileList:Array;
public var tileHeight:Number;
public var tileWidth:Number;
public function Tilemap(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Tile;
super();
tileWidth = _arg4;
tileHeight = _arg5;
xTiles = _arg2;
yTiles = _arg3;
timeline = _arg1;
tileArray = new Array();
tileList = new Array();
_local6 = 0;
_local7 = 0;
_local8 = 0;
_local6 = 0;
while (_local6 < xTiles) {
tileArray[_local6] = new Array();
_local7 = 0;
while (_local7 < yTiles) {
this[("tile" + _local8)] = new Tile();
_local9 = this[("tile" + _local8)];
tileArray[_local6].push(_local9);
_local9.xPos = _local6;
_local9.yPos = _local7;
_local9.x = (_local6 * tileWidth);
_local9.y = (_local7 * tileHeight);
_local9.passable = true;
_local9.tile.width = tileWidth;
_local9.tile.height = tileHeight;
_local9.occupant = null;
_local9.name = ((("tile_" + _local6) + "_") + _local7);
_local9.h = Math.floor((Math.random() * 10));
tileList.push(_local9);
_local8++;
_local7++;
};
_local6++;
};
}
public function getTile(_arg1:Number, _arg2:Number):Tile{
var _local3:Number;
var _local4:Number;
var _local5:Tile;
_local3 = Math.round((_arg1 / tileWidth));
_local4 = Math.round((_arg2 / tileHeight));
if (tileArray[_local3]){
if (tileArray[_local3][_local4]){
_local5 = tileArray[_local3][_local4];
};
};
if (_local5){
return (_local5);
};
return (null);
}
public function vBorder(_arg1:Number){
var _local2:Number;
_local2 = 0;
_local2 = 0;
while (_local2 < yTiles) {
tileArray[_arg1][_local2].passable = false;
_local2++;
};
}
public function getTile2(_arg1:Number, _arg2:Number):Tile{
var _local3:Tile;
if (tileArray[_arg1]){
if (tileArray[_arg1][_arg2]){
_local3 = tileArray[_arg1][_arg2];
};
};
if (_local3){
return (_local3);
};
return (null);
}
public function getUnoccupied():Array{
var _local1:Array;
var _local2:*;
_local1 = new Array();
for (_local2 in tileList) {
if (tileList[_local2].passable){
if (!tileList[_local2].occupied){
_local1.push(tileList[_local2]);
};
};
};
return (_local1);
}
public function hBorder(_arg1:Number){
var _local2:Number;
_local2 = 0;
_local2 = 0;
while (_local2 < xTiles) {
tileArray[_local2][_arg1].passable = false;
_local2++;
};
}
}
}//package tileClasses
Section 55
//FPSCounter (utils.FPSCounter)
package utils {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class FPSCounter extends Sprite {
private var ticks:uint;// = 0
private var tf:TextField;
private var last:uint;
public function FPSCounter(_arg1:int=0, _arg2:int=0, _arg3:uint=0xFFFFFF, _arg4:Boolean=false, _arg5:uint=0){
last = getTimer();
ticks = 0;
super();
x = _arg1;
y = _arg2;
tf = new TextField();
tf.textColor = _arg3;
tf.text = "----- fps";
tf.selectable = false;
tf.background = _arg4;
tf.backgroundColor = _arg5;
tf.autoSize = TextFieldAutoSize.LEFT;
addChild(tf);
width = tf.textWidth;
height = tf.textHeight;
addEventListener(Event.ENTER_FRAME, tick);
}
public function tick(_arg1:Event):void{
var _local2:uint;
var _local3:uint;
var _local4:Number;
ticks++;
_local2 = getTimer();
_local3 = (_local2 - last);
if (_local3 >= 1000){
_local4 = ((ticks / _local3) * 1000);
tf.text = (_local4.toFixed(1) + " fps");
ticks = 0;
last = _local2;
};
}
}
}//package utils
Section 56
//IsoDepthManager (utils.IsoDepthManager)
package utils {
import flash.display.*;
import flash.events.*;
public class IsoDepthManager {
var tL:MovieClip;
public function IsoDepthManager(_arg1:MovieClip){
tL = _arg1;
}
public function singleFix(_arg1){
var _local2:Array;
var _local3:Number;
var _local4:*;
var _local5:Number;
var _local6:*;
_local2 = new Array();
_local3 = tL.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local6 = tL.getChildAt(_local4);
_local2[_local4] = _local6;
_local4++;
};
_local2.sortOn(["z", "y"], Array.NUMERIC);
tL.setChildIndex(_arg1, _local2.indexOf(_arg1));
}
public function fixDepth(_arg1:Event){
var _local2:Array;
var _local3:Number;
var _local4:*;
var _local5:Number;
var _local6:*;
_local2 = new Array();
_local3 = tL.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local6 = tL.getChildAt(_local4);
_local2[_local4] = _local6;
_local4++;
};
_local2.sortOn(["z", "y"], Array.NUMERIC);
for (_local4 in _local2) {
tL.setChildIndex(_local2[_local4], _local4);
};
}
}
}//package utils
Section 57
//Watch (utils.Watch)
package utils {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Watch extends MovieClip {
public const END_TIMER:String = "end_timer";
var timer:Timer;
var mins:int;
public var secHand:MovieClip;
var secs:int;// = 300
public var minHand:MovieClip;
public function Watch(){
secs = 300;
timer = new Timer(1000, secs);
super();
timer.addEventListener(TimerEvent.TIMER, newSec, false, 0, true);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, endTimer, false, 0, true);
timer.start();
addEventListener(Event.REMOVED, stopTimer, false, 0, true);
}
public function addTime(_arg1:int){
secs = (secs + _arg1);
timer.repeatCount = secs;
timer.reset();
timer.start();
}
function endTimer(_arg1:Event){
dispatchEvent(new Event(END_TIMER, false, false));
}
function stopTimer(_arg1:Event){
timer.stop();
}
function newSec(_arg1:TimerEvent):void{
secs--;
mins = Math.floor((secs / 60));
minHand.rotation = (mins * 6);
secHand.rotation = (secs * 6);
}
public function resetWatch(_arg1:int){
timer.repeatCount = _arg1;
secs = _arg1;
timer.reset();
timer.start();
}
}
}//package utils
Section 58
//BGMCovert (BGMCovert)
package {
import flash.media.*;
public dynamic class BGMCovert extends Sound {
}
}//package
Section 59
//Buzz1 (Buzz1)
package {
import flash.media.*;
public dynamic class Buzz1 extends Sound {
}
}//package
Section 60
//Game (Game)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import utils.*;
import fl.transitions.easing.*;
import mochi.*;
import fl.transitions.*;
import flash.text.*;
import flash.ui.*;
import pages.*;
import flash.net.*;
public dynamic class Game extends MovieClip {
public var stopwatch:Watch;
var sfxVol:Number;// = 1
public var gameoverText:MovieClip;
public var evilBtn:MovieClip;
public var sfxMute:Boolean;// = false
public var mochiBoard:MovieClip;
public var introBtn:MovieClip;
public var gameLogoBtn:MovieClip;
var cm:ContextMenu;
public var scoresBtn:MovieClip;
public var scoreTxt:TextField;
public var menuBtn:MovieClip;
public var bgmCovert;
var currentBGM:Sound;
public var playBtn:MovieClip;
var score:Number;
public var logoBtn:MovieClip;
public var accuracyTxt:TextField;
var shots:int;
public var moreBtn:MovieClip;
public var kills1Txt:TextField;
public var headshotsTxt:TextField;
var headshots:int;
var bgmVol:Number;// = 0.5
public var shotsTxt:TextField;
var accuracy:Number;
public var hitsTxt:TextField;
var bgmChannel:SoundChannel;
public var bgmMute:Boolean;// = false
public var submitBtn:MovieClip;
public var kills2Txt:TextField;
var hits:int;
public var _mochiads_game_id:String;
public var helpBtn:MovieClip;
public var creditsBtn:MovieClip;
var level:int;
public var sndClick;
public var gamePage:GamePage;
public var loadTxt:TextField;
public var titleText:MovieClip;
public var bullets:MovieClip;
public var mascot:MovieClip;
public var polaroid:MovieClip;
var kills1:int;
var kills2:int;
public function Game(){
bgmMute = false;
sfxMute = false;
bgmVol = 0.5;
sfxVol = 1;
cm = new ContextMenu();
super();
addFrameScript(0, frame1, 8, frame9, 9, frame10, 19, frame20, 20, frame21, 29, frame30, 39, frame40, 49, frame50, 59, frame60, 69, frame70, 89, frame90);
}
function backToLanding(_arg1:Event){
gotoAndStop("landing");
}
public function bgmPlay(_arg1){
var _local2:SoundTransform;
bgmStop();
currentBGM = _arg1;
bgmChannel = currentBGM.play();
_local2 = new SoundTransform(bgmVol);
bgmChannel.soundTransform = _local2;
bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmLoop);
}
function navClick(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
clearStage();
gotoAndStop(_local2.tgtPage);
}
public function addBtnFX(_arg1:MovieClip):MovieClip{
var _local2:*;
_arg1.origX = _arg1.scaleX;
_arg1.origY = _arg1.scaleY;
_local2 = _arg1.parent;
_arg1.hitRect = new Sprite();
_arg1.hitRect.graphics.beginFill(0xFFFFFF);
_arg1.hitRect.graphics.drawRect(-((_arg1.width / 2)), -((_arg1.height / 2)), _arg1.width, _arg1.height);
_arg1.hitRect.graphics.endFill();
_arg1.hitRect.x = _arg1.x;
_arg1.hitRect.y = _arg1.y;
_arg1.hitRect.mouseEnabled = false;
_local2.addChild(_arg1.hitRect);
_arg1.hitArea = _arg1.hitRect;
_arg1.hitRect.visible = false;
_arg1.addEventListener(MouseEvent.MOUSE_OVER, mOver, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, mOut, false, 0, true);
_arg1.addEventListener(MouseEvent.CLICK, mClick, false, 0, true);
_arg1.xsTween = new Tween(_arg1, "scaleX", Strong.easeOut, _arg1.scaleX, _arg1.origX, 0.2, true);
_arg1.ysTween = new Tween(_arg1, "scaleY", Strong.easeOut, _arg1.scaleY, _arg1.origY, 0.2, true);
return (_arg1);
}
function frame10(){
_mochiads_game_id = "9f7a33f1df53153d";
sndClick = new SndClick();
bgmCovert = new BGMCovert();
cm.hideBuiltInItems();
contextMenu = cm;
stage.addEventListener(KeyboardEvent.KEY_DOWN, mainKeys, false, 0, true);
}
function frame1(){
MochiServices.connect("9f7a33f1df53153d", this);
stop();
addEventListener(Event.ENTER_FRAME, loading);
}
function frame9(){
MochiBot.track(this, "037adefe");
}
function frame20(){
stop();
introBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=intro";
introBtn.addEventListener(MouseEvent.CLICK, gotoSite, false, 0, true);
}
function frame30(){
stop();
evilBtn.tgtPage = "http://www.evilspacechicken.com";
evilBtn.addEventListener(MouseEvent.CLICK, gotoSite, false, 0, true);
}
public function toggleSFX(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
if (sfxMute){
sfxMute = false;
sfxVol = 1;
_local2.alpha = 1;
trace("unmute SXF");
} else {
sfxMute = true;
sfxVol = 0;
_local2.alpha = 0.5;
trace("mute SXF");
};
}
function frame21(){
}
function frame40(){
score = 0;
level = 0;
stop();
bgmPlay(bgmCovert);
logoBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=bunny";
addBtnFX(logoBtn).clickFunc = gotoSite;
creditsBtn.tgtPage = "credits";
addBtnFX(creditsBtn).clickFunc = navClick;
playBtn.tgtPage = "game";
addBtnFX(playBtn).clickFunc = navClick;
helpBtn.tgtPage = "help";
addBtnFX(helpBtn).clickFunc = navClick;
addBtnFX(scoresBtn).clickFunc = viewScores;
moreBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=more";
addBtnFX(moreBtn).clickFunc = gotoSite;
mascot.xTween = new Tween(mascot, "x", Strong.easeOut, 600, 302, 2, true);
titleText.xTween = new Tween(titleText, "x", Strong.easeOut, -300, 18, 1, true);
playBtn.xTween = new Tween(playBtn, "x", Strong.easeOut, -200, 140, 0.5, true);
helpBtn.xTween = new Tween(helpBtn, "x", Strong.easeOut, -200, 140, 0.7, true);
scoresBtn.xTween = new Tween(scoresBtn, "x", Strong.easeOut, -200, 140, 0.9, true);
moreBtn.xTween = new Tween(moreBtn, "x", Strong.easeOut, -200, 140, 1.1, true);
creditsBtn.xTween = new Tween(creditsBtn, "x", Strong.easeOut, -200, 140, 1.1, true);
addChild(mochiBoard);
}
public function playSFX(_arg1:Sound){
var _local2:SoundChannel;
var _local3:SoundTransform;
_local2 = _arg1.play();
_local3 = new SoundTransform(sfxVol);
_local2.soundTransform = _local3;
}
function clearStage(){
var _local1:int;
var _local2:int;
_local1 = 0;
_local2 = numChildren;
_local1 = 0;
while (_local1 < _local2) {
removeChildAt(0);
_local1++;
};
}
function frame50(){
menuBtn.tgtPage = "landing";
addBtnFX(menuBtn).clickFunc = navClick;
}
function mOver(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.xsTween.continueTo((_local2.origX * 1.2), 0.2);
_local2.ysTween.continueTo((_local2.origY * 1.2), 0.2);
}
function frame60(){
stop();
addChild(new FPSCounter());
gamePage.playSFX = playSFX;
gamePage.toggleSounds = toggleSounds;
gamePage.addEventListener(gamePage.GAMEOVER, gameOver, false, 0, true);
gameLogoBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=bunny";
addBtnFX(gameLogoBtn).clickFunc = gotoSite;
}
public function bgmStop(){
if (bgmChannel){
bgmChannel.stop();
};
}
function frame70(){
kills1Txt.text = String(kills1);
kills2Txt.text = String(kills2);
headshotsTxt.text = String(headshots);
shotsTxt.text = String(shots);
hitsTxt.text = String(hits);
accuracyTxt.text = String(accuracy);
scoreTxt.text = String(score);
logoBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=bunny";
addBtnFX(logoBtn).clickFunc = gotoSite;
menuBtn.tgtPage = "landing";
addBtnFX(menuBtn).clickFunc = navClick;
moreBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=more";
addBtnFX(moreBtn).clickFunc = gotoSite;
addBtnFX(submitBtn).clickFunc = submitScore;
mascot.xTween = new Tween(mascot, "x", Strong.easeOut, 600, 370, 2, true);
gameoverText.xTween = new Tween(gameoverText, "x", Strong.easeOut, -350, 31, 1, true);
submitBtn.xTween = new Tween(submitBtn, "x", Strong.easeOut, -200, 160, 0.8, true);
menuBtn.xTween = new Tween(menuBtn, "x", Strong.easeOut, -200, 160, 1, true);
moreBtn.xTween = new Tween(moreBtn, "x", Strong.easeOut, -200, 160, 1, true);
addChild(mochiBoard);
}
public function toggleBGM(_arg1:Event){
var _local2:*;
var _local3:SoundTransform;
_local2 = _arg1.currentTarget;
if (bgmMute){
bgmMute = false;
bgmVol = 1;
_local2.alpha = 1;
trace("unmute BGM");
} else {
bgmMute = true;
bgmVol = 0;
_local2.alpha = 0.5;
trace("mute BGM");
};
_local3 = new SoundTransform(bgmVol);
bgmChannel.soundTransform = _local3;
}
function mClick(_arg1:Event){
var _local2:*;
playSFX(sndClick);
_local2 = _arg1.currentTarget;
_local2.scaleX = _local2.origX;
_local2.scaleY = _local2.origY;
_local2.clickFunc(_arg1);
}
public function viewScores(_arg1:Event){
Mouse.show();
MochiScores.showLeaderboard({boardID:"a998a13fe72d87ae", res:"600x400", onClose:mouseShow, clip:mochiBoard});
}
public function loading(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
_local4 = Math.round(((_local3 * 100) / _local2));
loadTxt.text = String(_local4);
if (_local3 >= _local2){
gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, loading);
};
}
function frame90(){
mascot.xTween = new Tween(mascot, "x", Strong.easeOut, 600, 302, 2, true);
addBtnFX(logoBtn).clickFunc = gotoSite;
menuBtn.tgtPage = "landing";
addBtnFX(menuBtn).clickFunc = navClick;
logoBtn.tgtPage = "http://www.bunnygames.com/in.php?game=silent_kill&zone=bunny";
addBtnFX(logoBtn).clickFunc = gotoSite;
}
function mouseShow(_arg1:Event){
Mouse.show();
}
function mainKeys(_arg1:KeyboardEvent){
var _local2:Number;
_local2 = _arg1.keyCode;
switch (_local2){
case 81:
if (stage.quality == "LOW"){
stage.quality = "MEDIUM";
} else {
if (stage.quality == "MEDIUM"){
stage.quality = "HIGH";
} else {
if (stage.quality == "HIGH"){
stage.quality = "LOW";
};
};
};
break;
case 77:
toggleSounds(null);
break;
};
}
public function submitScore(_arg1:Event){
Mouse.show();
MochiScores.showLeaderboard({boardID:"a998a13fe72d87ae", res:"600x400", score:score, onClose:backToLanding, clip:mochiBoard});
}
function gotoSite(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
navigateToURL(new URLRequest(_local2.tgtPage), "_blank");
}
function bgmLoop(_arg1:Event){
bgmPlay(currentBGM);
}
function mOut(_arg1:Event){
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.xsTween.continueTo(_local2.origX, 0.2);
_local2.ysTween.continueTo(_local2.origY, 0.2);
}
public function toggleSounds(_arg1:Event){
var _local2:SoundTransform;
if (((!(sfxMute)) || (!(bgmMute)))){
trace("mute all");
sfxMute = true;
sfxVol = 0;
bgmMute = true;
bgmVol = 0;
_local2 = new SoundTransform(bgmVol);
bgmChannel.soundTransform = _local2;
} else {
trace("unmute all");
bgmMute = false;
bgmVol = 0.5;
sfxMute = false;
sfxVol = 1;
_local2 = new SoundTransform(bgmVol);
bgmChannel.soundTransform = _local2;
};
}
public function gameOver(_arg1:Event){
kills1 = gamePage.kills1;
kills2 = gamePage.kills2;
headshots = gamePage.headshots;
hits = gamePage.hits;
shots = gamePage.shots;
accuracy = gamePage.accuracy;
score = gamePage.score;
removeChild(gamePage);
gamePage = null;
Mouse.show();
gotoAndStop("gameover");
}
}
}//package
Section 61
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 62
//PatchSheet (PatchSheet)
package {
import flash.display.*;
public dynamic class PatchSheet extends BitmapData {
public function PatchSheet(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 63
//SndClick (SndClick)
package {
import flash.media.*;
public dynamic class SndClick extends Sound {
}
}//package
Section 64
//SndGoal (SndGoal)
package {
import flash.media.*;
public dynamic class SndGoal extends Sound {
}
}//package
Section 65
//SndHit (SndHit)
package {
import flash.media.*;
public dynamic class SndHit extends Sound {
}
}//package
Section 66
//SndRicochet (SndRicochet)
package {
import flash.media.*;
public dynamic class SndRicochet extends Sound {
}
}//package
Section 67
//SndSniper (SndSniper)
package {
import flash.media.*;
public dynamic class SndSniper extends Sound {
}
}//package
Section 68
//TileSprite (TileSprite)
package {
import flash.display.*;
public dynamic class TileSprite extends Sprite {
}
}//package
Section 69
//TreeLeaves (TreeLeaves)
package {
import sniper.*;
public dynamic class TreeLeaves extends PlayItem {
}
}//package
Section 70
//TreeTrunk (TreeTrunk)
package {
import sniper.*;
public dynamic class TreeTrunk extends PlayItem {
}
}//package