Section 1
//boom2_81 (final_fla.boom2_81)
package final_fla {
import flash.display.*;
public dynamic class boom2_81 extends MovieClip {
public function boom2_81(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
}
}
}//package final_fla
Section 2
//boom3_157 (final_fla.boom3_157)
package final_fla {
import flash.display.*;
public dynamic class boom3_157 extends MovieClip {
public function boom3_157(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package final_fla
Section 3
//callout_150 (final_fla.callout_150)
package final_fla {
import flash.display.*;
public dynamic class callout_150 extends MovieClip {
public function callout_150(){
addFrameScript(0, frame1, 44, frame45, 45, frame46, 108, frame109, 148, frame149);
}
function frame1(){
}
function frame109(){
stop();
}
function frame46(){
stop();
}
function frame45(){
stop();
}
function frame149(){
stop();
}
}
}//package final_fla
Section 4
//dad_holdingbombs_75 (final_fla.dad_holdingbombs_75)
package final_fla {
import flash.display.*;
public dynamic class dad_holdingbombs_75 extends MovieClip {
public function dad_holdingbombs_75(){
addFrameScript(38, frame39);
}
function frame39(){
stop();
}
}
}//package final_fla
Section 5
//dad_idle_60 (final_fla.dad_idle_60)
package final_fla {
import flash.display.*;
public dynamic class dad_idle_60 extends MovieClip {
public function dad_idle_60(){
addFrameScript(13, frame14);
}
function frame14(){
gotoAndPlay(2);
}
}
}//package final_fla
Section 6
//dad_punching_65 (final_fla.dad_punching_65)
package final_fla {
import flash.display.*;
public dynamic class dad_punching_65 extends MovieClip {
public function dad_punching_65(){
addFrameScript(0, frame1, 8, frame9, 16, frame17, 29, frame30);
}
function frame1(){
stop();
}
function frame17(){
stop();
}
function frame9(){
stop();
}
function frame30(){
stop();
}
}
}//package final_fla
Section 7
//fatkid_33 (final_fla.fatkid_33)
package final_fla {
import flash.display.*;
public dynamic class fatkid_33 extends MovieClip {
public function fatkid_33(){
addFrameScript(0, frame1, 88, frame89, 93, frame94, 95, frame96, 116, frame117, 128, frame129, 173, frame174, 180, frame181, 199, frame200);
}
function frame200(){
stop();
}
function frame89(){
stop();
}
function frame94(){
stop();
}
function frame174(){
stop();
}
function frame181(){
stop();
}
function frame1(){
stop();
}
function frame96(){
stop();
}
function frame117(){
gotoAndPlay("run");
}
function frame129(){
stop();
}
}
}//package final_fla
Section 8
//fuse_77 (final_fla.fuse_77)
package final_fla {
import flash.display.*;
public dynamic class fuse_77 extends MovieClip {
public function fuse_77(){
addFrameScript(197, frame198);
}
function frame198(){
MovieClip(parent).gotoAndPlay("react2");
stop();
}
}
}//package final_fla
Section 9
//hitStreak_mc_149 (final_fla.hitStreak_mc_149)
package final_fla {
import flash.display.*;
import flash.text.*;
public dynamic class hitStreak_mc_149 extends MovieClip {
public var hitStreak_txt:TextField;
public function hitStreak_mc_149(){
addFrameScript(0, frame1, 1, frame2, 33, frame34);
}
function frame1(){
stop();
hitStreak_txt.visible = false;
}
function frame2(){
hitStreak_txt.visible = true;
}
function frame34(){
hitStreak_txt.visible = false;
stop();
}
}
}//package final_fla
Section 10
//MainTimeline (final_fla.MainTimeline)
package final_fla {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
import gs.easing.*;
public dynamic class MainTimeline extends MovieClip {
public var myScroller:Parallax;
public var fatkid_mc:MovieClip;
public var myGrenade;
public var myTargetProjectile:Target;
public var grenade_mc:GrenadeClip;
public var projectile2_mc:Projectile;
public var intro_mc:MovieClip;
public var gunShape_mc:GunShape;
public var bomb_mc:Bomb;
public var bomb2_mc:Bomb;
public var bombGravity2:GravityObject;
public var myBomb:Target;
public var myTarget:Target;
public var particles:Array;
public var myRoot;
public var myThrower;
public var myTargetProjectile2:Target;
public var dadpunch_mc:MovieClip;
public var myWeapon:Weapon;
public var sword_mc:Sword;
public var projectileInPlay:Number;
public var dartFly_mc:DartFly;
public var bombGravity:GravityObject;
public var dad_mc;
public var blank:Blank;
public var mom_mc:MovieClip;
public var bombsInPlay:Number;
public var dadClip:MovieClip;
public var myBomb2:Target;
public var dartShape_mc:DartShape;
public var maxParticles:int;
public var projectile_mc:Projectile;
public var myPlayer:Player;
public var hud_mc:Hud;
public var gameInSession:Boolean;
public var parallax_bg:parallaxClip;
public var myGun:Gun;
public var counter:int;
public var preloader_mc:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 32, frame33, 113, frame114, 201, frame202, 203, frame204, 286, frame287, 346, frame347, 444, frame445, 505, frame506, 540, frame541, 593, frame594, 605, frame606, 617, frame618, 627, frame628, 649, frame650, 753, frame754, 850, frame851);
}
public function randRange(_arg1:Number, _arg2:Number){
return (((Math.random() * (_arg2 - _arg1)) + _arg1));
}
function frame287(){
fatkid_mc.gotoAndStop("shock");
}
public function deployBomb(){
trace(("DEPLOY BOMB!!!!! bombInPlay:" + bombsInPlay));
if (bombsInPlay == 1){
bombsInPlay = 2;
myBomb.reviveTarget();
bombGravity.posX = dadClip.x;
bombGravity.posY = dadClip.y;
bombGravity.velX = 100;
bombGravity.velY = Math.ceil((Math.random() * 60));
} else {
if (bombsInPlay == 2){
bombsInPlay = 1;
myBomb2.reviveTarget();
bombGravity2.posX = dadClip.x;
bombGravity2.posY = dadClip.y;
bombGravity2.velX = 100;
bombGravity2.velY = Math.ceil((Math.random() * 60));
};
};
}
function frame606(){
dadpunch_mc.gotoAndPlay("punch1");
}
function frame618(){
dadpunch_mc.gotoAndPlay("punch2");
}
function frame851(){
myRoot = this;
blank = new Blank();
addChild(blank);
gameInSession = true;
bombsInPlay = 1;
projectileInPlay = 1;
bomb_mc = new Bomb();
bomb2_mc = new Bomb();
sword_mc = new Sword();
parallax_bg = new parallaxClip();
dartShape_mc = new DartShape();
dartFly_mc = new DartFly();
grenade_mc = new GrenadeClip();
gunShape_mc = new GunShape();
hud_mc = new Hud();
projectile_mc = new Projectile();
projectile2_mc = new Projectile();
addChild(parallax_bg);
addChild(projectile_mc);
addChild(projectile2_mc);
addChild(bomb_mc);
addChild(bomb2_mc);
addChild(hud_mc);
addChild(sword_mc);
addChild(dartShape_mc);
addChild(dartFly_mc);
addChild(grenade_mc);
addChild(gunShape_mc);
hud_mc.replay_bt.addEventListener(MouseEvent.MOUSE_UP, resetGame);
hud_mc.replay_bt.visible = false;
hud_mc.krButton.addEventListener(MouseEvent.MOUSE_UP, clickthru1);
hud_mc.chButton.addEventListener(MouseEvent.MOUSE_UP, clickthru2);
hud_mc.tfButton.addEventListener(MouseEvent.MOUSE_UP, clickthru3);
hud_mc.ngButton.addEventListener(MouseEvent.MOUSE_UP, clickthru4);
dartShape_mc.visible = false;
dartFly_mc.visible = false;
grenade_mc.visible = false;
sword_mc.visible = true;
gunShape_mc.visible = false;
projectile_mc.visible = false;
projectile2_mc.visible = false;
myPlayer = new Player(35, hud_mc);
myScroller = new Parallax(parallax_bg, "mouse", 3);
myGun = new Gun(myPlayer, gunShape_mc);
myWeapon = new Weapon(myPlayer, sword_mc, new Array(18, 33, 48, 62, 79, 82, 85, 88, 91, 94, 97, 100, 102), true, 116, 129);
myThrower = new Thrower(myPlayer, dartShape_mc, dartFly_mc, new Array(2, 3));
myGrenade = new Grenade(myPlayer, grenade_mc, 10, 475, new Array(11, 15, 19));
myTargetProjectile = new Target(myPlayer, projectile_mc, 3, true, false, new Array(100, 0), new Array(0, 100), new Array(38, 77, 116, 154), 0);
myTargetProjectile2 = new Target(myPlayer, projectile2_mc, 3, true, false, new Array(100, 0), new Array(0, 100), new Array(9, 10), 0);
myBomb = new Target(myPlayer, bomb_mc, 3, false, false, new Array(100, 0), new Array(100, 0), new Array(22, 26), 0);
myBomb2 = new Target(myPlayer, bomb2_mc, 3, false, false, new Array(100, 0), new Array(100, 0), new Array(22, 26), 0);
bombGravity = new GravityObject(bomb_mc, 0, 0, 1.7, 0.5, 0.9, 0);
bombGravity2 = new GravityObject(bomb2_mc, 0, 0, 1.7, 0.5, 0.9, 0);
myPlayer.addTarget(myBomb);
myPlayer.addTarget(myBomb2);
myPlayer.addTarget(myTargetProjectile);
myPlayer.addTarget(myTargetProjectile2);
deployTarget(1);
maxParticles = 200;
particles = new Array();
counter = 0;
addEventListener(Event.ENTER_FRAME, frameLoop);
stop();
}
function frame1(){
stop();
}
function frame628(){
dadpunch_mc.gotoAndPlay("punch3");
}
function frame2(){
intro_mc.play();
stop();
}
function frame506(){
fatkid_mc.gotoAndPlay("grab");
}
function frame754(){
fatkid_mc.gotoAndPlay("angry");
}
function frame33(){
mom_mc.gotoAndPlay("speak");
}
public function makeSparks(_arg1:Class, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number){
var _local7:*;
var _local8:Particle;
var _local9:int;
_local7 = _arg2;
_local9 = 0;
while (_local9 < _local7) {
_local8 = new Particle(_arg1, this, _arg5, _arg6);
switch (_arg3){
case "left":
_local8.xVel = randRange(-1, -30);
_local8.yVel = randRange(-15, 15);
break;
case "right":
_local8.xVel = randRange(1, 30);
_local8.yVel = randRange(-15, 15);
case "up":
_local8.xVel = randRange(-1, 1);
_local8.yVel = randRange(-5, -30);
case "all":
_local8.xVel = randRange(-15, 15);
_local8.yVel = randRange(-15, 15);
default:
_local8.xVel = randRange(-15, 15);
_local8.yVel = randRange(-15, 15);
break;
};
_local8.drag = 0.96;
_local8.gravity = _arg4;
_local8.spin = randRange(-20, 20);
_local8.clip.rotation = randRange(0, 360);
_local8.clip.scaleX = (_local8.clip.scaleY = randRange(0.1, 1.5));
_local8.shrink = 0.99;
particles.push(_local8);
_local9++;
};
}
function frame650(){
mom_mc.gotoAndStop("dead without knife");
}
public function clickthru1(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://kyleroberts.newgrounds.com/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function clickthru2(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.chrishathway.co.uk/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function clickthru4(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.newgrounds.com/collection/halloween";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public function clickthru3(_arg1:MouseEvent){
var _local2:String;
var _local3:URLRequest;
_local2 = "http://tomfulp.newgrounds.com/";
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
function frame541(){
fatkid_mc.gotoAndPlay("catch");
}
public function bringObjectsToFront(_arg1:Array){
var _local2:uint;
_local2 = 0;
while (_local2 < _arg1.length) {
swapChildren(_arg1[_local2], myWeapon.getTargetMC());
swapChildren(_arg1[_local2], bomb_mc);
swapChildren(_arg1[_local2], projectile_mc);
_local2++;
};
}
function frame204(){
fatkid_mc.gotoAndStop("shock");
}
function frame202(){
mom_mc.gotoAndPlay("dead");
}
function frame445(){
fatkid_mc.gotoAndPlay("run");
}
public function deployTarget(_arg1:Number){
switch (_arg1){
case 1:
dad_mc = new Dad();
addChild(dad_mc);
dad_mc.x = 305;
dad_mc.y = 379;
myTarget = new Target(myPlayer, dad_mc, 25, true, true, new Array(10, 10, 5, 20, 25, 15, 15), new Array(60, 40), new Array(59, 103, 126, 129, 133, 136, 140, 143, 147, 230, 231, 240, 241, 247, 248), 2500);
myPlayer.addTarget(myTarget);
dadClip = myTarget.getTargetMC();
bringObjectsToFront(new Array(dad_mc));
break;
case 2:
removeChild(dad_mc);
dad_mc = new Dad_spider();
addChild(dad_mc);
dad_mc.x = 305;
dad_mc.y = 379;
myTarget = null;
myTarget = new Target(myPlayer, dad_mc, 25, true, true, new Array(10, 35, 0, 40, 15, 0, 0), new Array(40, 30, 30), new Array(62, 103, 126, 157, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212), 2500);
myPlayer.addTarget(myTarget);
dadClip = myTarget.getTargetMC();
trace(("DAD CLIP IS NOW: " + dadClip));
bringObjectsToFront(new Array(dad_mc));
break;
};
}
public function endGame(){
hud_mc.replay_bt.visible = true;
gameInSession = false;
myTarget.targetTimer.stop();
myTarget.targetMC.stop();
removeChild(dad_mc);
}
public function shootProjectile(){
var _local1:Target;
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (projectileInPlay == 1){
_local1 = myTargetProjectile;
(projectileInPlay == 2);
} else {
_local1 = myTargetProjectile2;
(projectileInPlay == 1);
};
_local1.targetMC.visible = false;
trace(("SHOOTING!!! projectileInPlay: " + projectileInPlay));
_local1.reviveTarget();
_local2 = new Point(dadClip.spawnPoint_mc.x, dadClip.spawnPoint_mc.y);
_local2 = dadClip.localToGlobal(_local2);
_local1.targetMC.x = _local2.x;
_local1.targetMC.y = _local2.y;
_local1.targetMC.rotation = (dadClip.rotation - 90);
_local3 = Math.ceil((Math.random() * 4));
_local1.targetMC.visible = true;
_local1.targetMC.gotoAndPlay(("path" + _local3));
trace(("___________PATH " + _local3));
_local4 = Math.ceil(((Math.random() * 600) + 200));
_local5 = Math.ceil(((Math.random() * 400) + 200));
}
function frame347(){
fatkid_mc.gotoAndStop("look");
}
function frame594(){
fatkid_mc.gotoAndPlay("struck");
}
function frame114(){
fatkid_mc.gotoAndPlay("speak");
}
public function frameLoop(_arg1:Event){
var _local2:Particle;
var _local3:int;
_local3 = 0;
while (_local3 < particles.length) {
particles[_local3].update();
_local3++;
};
while (particles.length > maxParticles) {
_local2 = particles.shift();
_local2.destroy();
};
}
public function resetGame(_arg1:MouseEvent){
hud_mc.replay_bt.visible = false;
gameInSession = true;
hud_mc.gotoAndStop(1);
myPlayer.healPlayer(50);
myWeapon.getTargetMC().visible = true;
deployTarget(1);
}
}
}//package final_fla
Section 11
//mom_44 (final_fla.mom_44)
package final_fla {
import flash.display.*;
public dynamic class mom_44 extends MovieClip {
public var knife_mc:MovieClip;
public function mom_44(){
addFrameScript(0, frame1, 78, frame79, 83, frame84, 88, frame89);
}
function frame79(){
stop();
}
function frame84(){
stop();
}
function frame89(){
stop();
}
function frame1(){
stop();
}
}
}//package final_fla
Section 12
//movingTankBG_1 (final_fla.movingTankBG_1)
package final_fla {
import flash.display.*;
public dynamic class movingTankBG_1 extends MovieClip {
public var playButton:SimpleButton;
public function movingTankBG_1(){
addFrameScript(0, frame1, 507, frame508);
}
function frame1(){
stop();
}
function frame508(){
stop();
MovieClip(root).nextScene();
}
}
}//package final_fla
Section 13
//Timeline_23 (final_fla.Timeline_23)
package final_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public dynamic class Timeline_23 extends MovieClip {
public const FRAME_RATE_ADJUST:Boolean = true;
public const LOADER_FRAME_RATE:Number = 30;
public const AUTO_PLAY:Boolean = false;
public var bar:MovieClip;
public var ngButton:SimpleButton;
public var playButton:SimpleButton;
public var movieFrameRate:Number;
public var loadingComplete:Boolean;
public var initialized:Boolean;
public function Timeline_23(){
addFrameScript(0, frame1, 50, frame51);
}
public function init():void{
if (initialized){
return;
};
movieFrameRate = 0;
if (((FRAME_RATE_ADJUST) && (stage))){
movieFrameRate = stage.frameRate;
stage.frameRate = LOADER_FRAME_RATE;
};
initialized = true;
stop();
if (((root) && ((root is MovieClip)))){
MovieClip(root).stop();
};
loadingComplete = false;
ngButton.addEventListener(MouseEvent.CLICK, ngButtonClickHandler, false, 0, true);
addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true);
if (meetsVersion([9, 0, 28, 0])){
addEventListener(Event.REMOVED_FROM_STAGE, cleanup, false, 0, true);
};
enterFrameHandler();
}
public function enterFrameHandler(_arg1:Event=null):void{
var _local2:Number;
if (((((!(movieFrameRate)) && (FRAME_RATE_ADJUST))) && (stage))){
movieFrameRate = stage.frameRate;
stage.frameRate = LOADER_FRAME_RATE;
};
if (!loadingComplete){
_local2 = 0;
if (loaderInfo){
_local2 = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
};
if (bar){
bar.scaleX = _local2;
};
if (_local2 == 1){
loadingComplete = true;
if (AUTO_PLAY){
startMovie();
} else {
gotoAndPlay("loaded");
};
};
};
}
public function meetsVersion(_arg1:Array):Boolean{
var _local2:Array;
var _local3:uint;
_local2 = String(Capabilities.version.split(" ")[1]).split(",");
_local3 = 0;
while (_local3 < _arg1.length) {
if (uint(_local2[_local3]) > _arg1[_local3]){
return (true);
};
if (uint(_local2[_local3]) < _arg1[_local3]){
return (false);
};
_local3++;
};
return (true);
}
public function playButtonClickHandler(_arg1:Event=null):void{
startMovie();
}
function frame1(){
initialized = false;
init();
}
public function ngButtonClickHandler(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com"), "_blank");
}
public function cleanup(_arg1:Event=null){
if (initialized){
ngButton.removeEventListener(MouseEvent.CLICK, ngButtonClickHandler);
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
if (meetsVersion([9, 0, 28, 0])){
removeEventListener(Event.REMOVED_FROM_STAGE, cleanup);
};
if (movieFrameRate){
stage.frameRate = movieFrameRate;
movieFrameRate = 0;
};
};
initialized = false;
}
function frame51(){
stop();
if (((playButton) && (!(playButton.hasEventListener(MouseEvent.CLICK))))){
playButton.addEventListener(MouseEvent.CLICK, playButtonClickHandler, false, 0, true);
};
}
public function startMovie():void{
cleanup();
if (((root) && ((root is MovieClip)))){
MovieClip(root).play();
};
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package final_fla
Section 14
//Timeline_29 (final_fla.Timeline_29)
package final_fla {
import flash.display.*;
public dynamic class Timeline_29 extends MovieClip {
public function Timeline_29(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package final_fla
Section 15
//Bounce (fl.motion.easing.Bounce)
package fl.motion.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package fl.motion.easing
Section 16
//TweenFilterLite (gs.TweenFilterLite)
package gs {
import flash.display.*;
import flash.filters.*;
public class TweenFilterLite extends TweenLite {
private var _endMatrix:Array;
private var _hf:Boolean;// = false
private var _matrix:Array;
private var _cmf:ColorMatrixFilter;
private var _clrsa:Array;
private var _filters:Array;
public static var defaultEase:Function = TweenLite.defaultEase;
private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
private static var _lumB:Number = 0.072169;
public static var version:Number = 7.14;
public static var delayedCall:Function = TweenLite.delayedCall;
public static var killTweensOf:Function = TweenLite.killTweensOf;
private static var _lumG:Number = 0.71516;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _lumR:Number = 0.212671;
public function TweenFilterLite(_arg1:Object, _arg2:Number, _arg3:Object){
_hf = false;
_filters = [];
super(_arg1, _arg2, _arg3);
if ((((TweenLite.version < 6.23)) || (isNaN(TweenLite.version)))){
trace("ERROR! Please update your TweenLite class or try deleting your ASO files. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com.");
};
if (_arg3.type != undefined){
trace((("TweenFilterLite error: " + _arg1) + " is using deprecated syntax. Please update to the new syntax. See http://www.TweenFilterLite.com for details."));
};
}
override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:int;
var _local4:Object;
var _local5:Object;
var _local6:Object;
_clrsa = [];
_filters = [];
_matrix = _idMatrix.slice();
_arg2 = (_arg2 + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter ");
if ((this.target is DisplayObject)){
if (this.vars.blurFilter != undefined){
_local4 = this.vars.blurFilter;
addFilter("blur", _local4, BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, ((_local4.quality) || (2))));
};
if (this.vars.glowFilter != undefined){
_local4 = this.vars.glowFilter;
addFilter("glow", _local4, GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((_local4.strength) || (1)), ((_local4.quality) || (2)), _local4.inner, _local4.knockout));
};
if (this.vars.colorMatrixFilter != undefined){
_local4 = this.vars.colorMatrixFilter;
_local5 = addFilter("colorMatrix", _local4, ColorMatrixFilter, [], new ColorMatrixFilter(_matrix));
_cmf = _local5.filter;
_matrix = ColorMatrixFilter(_cmf).matrix;
if (((!((_local4.matrix == undefined))) && ((_local4.matrix is Array)))){
_endMatrix = _local4.matrix;
} else {
if (_local4.relative == true){
_endMatrix = _matrix.slice();
} else {
_endMatrix = _idMatrix.slice();
};
_endMatrix = setBrightness(_endMatrix, _local4.brightness);
_endMatrix = setContrast(_endMatrix, _local4.contrast);
_endMatrix = setHue(_endMatrix, _local4.hue);
_endMatrix = setSaturation(_endMatrix, _local4.saturation);
_endMatrix = setThreshold(_endMatrix, _local4.threshold);
if (!isNaN(_local4.colorize)){
_endMatrix = colorize(_endMatrix, _local4.colorize, _local4.amount);
} else {
if (!isNaN(_local4.color)){
_endMatrix = colorize(_endMatrix, _local4.color, _local4.amount);
};
};
};
_local3 = 0;
while (_local3 < _endMatrix.length) {
if (((!((_matrix[_local3] == _endMatrix[_local3]))) && (!((_matrix[_local3] == undefined))))){
this.tweens.push({o:_matrix, p:_local3.toString(), s:_matrix[_local3], c:(_endMatrix[_local3] - _matrix[_local3])});
};
_local3++;
};
};
if (this.vars.dropShadowFilter != undefined){
_local4 = this.vars.dropShadowFilter;
addFilter("dropShadow", _local4, DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_local4.quality) || (2)), _local4.inner, _local4.knockout, _local4.hideObject));
};
if (this.vars.bevelFilter != undefined){
_local4 = this.vars.bevelFilter;
addFilter("bevel", _local4, BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_local4.quality) || (2))));
};
if (this.vars.runBackwards == true){
_local3 = (_clrsa.length - 1);
while (_local3 > -1) {
_local6 = _clrsa[_local3];
_clrsa[_local3].sr = (_local6.sr + _local6.cr);
_local6.cr = (_local6.cr * -1);
_local6.sg = (_local6.sg + _local6.cg);
_local6.cg = (_local6.cg * -1);
_local6.sb = (_local6.sb + _local6.cb);
_local6.cb = (_local6.cb * -1);
_local6.f[_local6.p] = (((_local6.sr << 16) | (_local6.sg << 8)) | _local6.sb);
_local3--;
};
};
super.initTweenVals(true, _arg2);
} else {
super.initTweenVals(_arg1, _arg2);
};
}
override public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:Array;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = 1;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hf){
_local5 = (_clrsa.length - 1);
while (_local5 > -1) {
_local4 = _clrsa[_local5];
_local6 = (_local4.sr + (_local3 * _local4.cr));
_local7 = (_local4.sg + (_local3 * _local4.cg));
_local8 = (_local4.sb + (_local3 * _local4.cb));
_local4.f[_local4.p] = (((_local6 << 16) | (_local7 << 8)) | _local8);
_local5--;
};
if (_cmf != null){
ColorMatrixFilter(_cmf).matrix = _matrix;
};
_local10 = this.target.filters;
_local5 = 0;
while (_local5 < _filters.length) {
_local9 = (_local10.length - 1);
while (_local9 > -1) {
if ((_local10[_local9] is _filters[_local5].type)){
_local10.splice(_local9, 1, _filters[_local5].filter);
break;
};
_local9--;
};
_local5++;
};
this.target.filters = _local10;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
super.complete(true);
};
}
private function addFilter(_arg1:String, _arg2:Object, _arg3:Class, _arg4:Array, _arg5:BitmapFilter):Object{
var _local6:Object;
var _local7:Array;
var _local8:int;
var _local9:String;
var _local10:Number;
var _local11:Object;
var _local12:Object;
_local6 = {type:_arg3};
_local7 = this.target.filters;
_local8 = 0;
while (_local8 < _local7.length) {
if ((_local7[_local8] is _arg3)){
_local6.filter = _local7[_local8];
break;
};
_local8++;
};
if (_local6.filter == undefined){
_local6.filter = _arg5;
_local7.push(_local6.filter);
this.target.filters = _local7;
};
_local8 = 0;
while (_local8 < _arg4.length) {
_local9 = _arg4[_local8];
if (_arg2[_local9] != undefined){
if ((((((_local9 == "color")) || ((_local9 == "highlightColor")))) || ((_local9 == "shadowColor")))){
_local11 = HEXtoRGB(_local6.filter[_local9]);
_local12 = HEXtoRGB(_arg2[_local9]);
_clrsa.push({f:_local6.filter, p:_local9, sr:_local11.rb, cr:(_local12.rb - _local11.rb), sg:_local11.gb, cg:(_local12.gb - _local11.gb), sb:_local11.bb, cb:(_local12.bb - _local11.bb)});
} else {
if ((((((((_local9 == "quality")) || ((_local9 == "inner")))) || ((_local9 == "knockout")))) || ((_local9 == "hideObject")))){
_local6.filter[_local9] = _arg2[_local9];
} else {
if (typeof(_arg2[_local9]) == "number"){
_local10 = (_arg2[_local9] - _local6.filter[_local9]);
} else {
_local10 = Number(_arg2[_local9]);
};
this.tweens.push({o:_local6.filter, p:_local9, s:_local6.filter[_local9], c:_local10});
};
};
};
_local8++;
};
_filters.push(_local6);
_hf = true;
return (_local6);
}
public function HEXtoRGB(_arg1:Number):Object{
return ({rb:(_arg1 >> 16), gb:((_arg1 >> 8) & 0xFF), bb:(_arg1 & 0xFF)});
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
_local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=100):Array{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
_local4 = (((_arg2 >> 16) & 0xFF) / 0xFF);
_local5 = (((_arg2 >> 8) & 0xFF) / 0xFF);
_local6 = ((_arg2 & 0xFF) / 0xFF);
_local7 = (1 - _arg3);
_local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = (1 - _arg2);
_local4 = (_local3 * _lumR);
_local5 = (_local3 * _lumG);
_local6 = (_local3 * _lumB);
_local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
_local3 = [];
_local4 = 0;
_local5 = 0;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{
_arg3.runBackwards = true;
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
var _local3:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
var _local3:Number;
var _local4:Number;
var _local5:Array;
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
_local3 = Math.cos(_arg2);
_local4 = Math.sin(_arg2);
_local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{
return (new TweenFilterLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 17
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
public class TweenLite {
public var delay:Number;
protected var _initted:Boolean;
protected var _subTweens:Array;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _active:Boolean;
public var vars:Object;
public var tweens:Array;
public var initTime:int;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 6.23;
private static var _sprite:Sprite = new Sprite();
protected static var _all:Dictionary = new Dictionary();
public static var killDelayedCallsTo:Function = killTweensOf;
protected static var _curTime:uint;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){
delete _all[_arg1];
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.target = _arg1;
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
_active = (((_arg2 == 0)) && ((this.delay == 0)));
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
_classInitted = true;
};
this.initTime = _curTime;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
this.startTime = _curTime;
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:Function, _arg2:Object, _arg3:Object, _arg4:Object=null):void{
var _local5:Object;
var _local6:String;
_local5 = {proxy:_arg1, target:_arg2, info:_arg4};
_subTweens.push(_local5);
for (_local6 in _arg3) {
if (typeof(_arg3[_local6]) == "number"){
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:(_arg3[_local6] - _arg2[_local6]), sub:_local5});
} else {
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:Number(_arg3[_local6]), sub:_local5});
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:Boolean;
var _local4:String;
var _local5:int;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Object;
_local3 = (this.target is DisplayObject);
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local5 = 0;
while (_local5 < _local6.length) {
if (((!((this.target[_local5] == _local6[_local5]))) && (!((this.target[_local5] == undefined))))){
this.tweens.push({o:this.target, p:_local5.toString(), s:this.target[_local5], c:(_local6[_local5] - this.target[_local5])});
};
_local5++;
};
} else {
for (_local4 in this.vars) {
if ((((((((((((((((((((((((((((((((((((_local4 == "ease")) || ((_local4 == "delay")))) || ((_local4 == "overwrite")))) || ((_local4 == "onComplete")))) || ((_local4 == "onCompleteParams")))) || ((_local4 == "onCompleteScope")))) || ((_local4 == "runBackwards")))) || ((_local4 == "onUpdate")))) || ((_local4 == "onUpdateParams")))) || ((_local4 == "onUpdateScope")))) || ((_local4 == "autoAlpha")))) || ((_local4 == "onStart")))) || ((_local4 == "onStartParams")))) || ((_local4 == "onStartScope")))) || ((_local4 == "renderOnStart")))) || ((_local4 == "proxiedEase")))) || ((_local4 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local4) + " ")) == -1))))))){
} else {
if ((((_local4 == "tint")) && (_local3))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (this.vars.alpha != undefined){
_local8.alphaMultiplier = this.vars.alpha;
delete this.vars.alpha;
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
if (this.tweens[_local5].p == "alpha"){
this.tweens.splice(_local5, 1);
break;
};
_local5--;
};
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((((!((this.vars[_local4] == null))) && (!((this.vars[_local4] == ""))))) || ((this.vars[_local4] == 0)))){
_local8.color = this.vars[_local4];
};
addSubTween(tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
} else {
if ((((_local4 == "frame")) && (_local3))){
addSubTween(frameProxy, {frame:this.target.currentFrame}, {frame:this.vars[_local4]}, {target:this.target});
} else {
if ((((_local4 == "volume")) && (((_local3) || ((this.target is SoundChannel)))))){
addSubTween(volumeProxy, this.target.soundTransform, {volume:this.vars[_local4]}, {target:this.target});
} else {
if (typeof(this.vars[_local4]) == "number"){
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:(this.vars[_local4] - this.target[_local4])});
} else {
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:Number(this.vars[_local4])});
};
};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local9 = this.tweens[_local5];
this.tweens[_local5].s = (_local9.s + _local9.c);
_local9.c = (_local9.c * -1);
_local5--;
};
};
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0))));
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (!_initted){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(this.vars.onStartScope, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
_local2 = ((_arg1 - this.startTime) / 1000);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = 1;
} else {
_local3 = this.vars.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - (this.duration * 1000));
render(_curTime);
return;
};
if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){
this.target.visible = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams);
};
removeTween(this);
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
delete _all[_arg1.target][_arg1];
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, onCompleteScope:_arg4, overwrite:false}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Object;
var _local5:Object;
_local2 = (_curTime = getTimer());
if (_listening){
_local3 = _all;
for each (_local4 in _local3) {
for (_local5 in _local4) {
if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){
_local4[_local5].render(_local2);
};
};
};
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local2:uint;
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
_local2 = 0;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:Object;
_local2 = _arg1.target.progress;
_local3 = (1 - _local2);
_local4 = _arg1.info.color;
_local5 = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 18
//TweenMax (gs.TweenMax)
package gs {
import flash.utils.*;
public class TweenMax extends TweenFilterLite {
protected var _pauseTime:int;
protected static const _RAD2DEG:Number = 57.2957795130823;
public static var removeTween:Function = TweenLite.removeTween;
public static var defaultEase:Function = TweenLite.defaultEase;
public static var version:Number = 1.17;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killDelayedCallsTo;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
_pauseTime = -1;
if ((((TweenFilterLite.version < 7.14)) || (isNaN(TweenFilterLite.version)))){
trace("TweenMax error! Please update your TweenFilterLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com.");
};
}
override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local5:Object;
var _local6:Object;
var _local7:Array;
var _local8:Function;
_arg2 = (_arg2 + " hexColors bezier bezierThrough orientToBezier quaternions onCompleteAll onCompleteAllParams ");
_local8 = bezierProxy;
if (this.vars.orientToBezier == true){
this.vars.orientToBezier = [["x", "y", "rotation", 0]];
_local8 = bezierProxy2;
} else {
if ((this.vars.orientToBezier is Array)){
_local8 = bezierProxy2;
};
};
if (((!((this.vars.bezier == undefined))) && ((this.vars.bezier is Array)))){
_local6 = {};
_local7 = this.vars.bezier;
_local4 = 0;
while (_local4 < _local7.length) {
for (_local3 in _local7[_local4]) {
if (_local6[_local3] == undefined){
_local6[_local3] = [this.target[_local3]];
};
if (typeof(_local7[_local4][_local3]) == "number"){
_local6[_local3].push(_local7[_local4][_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3])));
};
};
_local4++;
};
for (_local3 in _local6) {
if (typeof(this.vars[_local3]) == "number"){
_local6[_local3].push(this.vars[_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(this.vars[_local3])));
};
delete this.vars[_local3];
};
addSubTween(_local8, {t:0}, {t:1}, {props:parseBeziers(_local6, false), target:this.target, orientToBezier:this.vars.orientToBezier});
};
if (((!((this.vars.bezierThrough == undefined))) && ((this.vars.bezierThrough is Array)))){
_local6 = {};
_local7 = this.vars.bezierThrough;
_local4 = 0;
while (_local4 < _local7.length) {
for (_local3 in _local7[_local4]) {
if (_local6[_local3] == undefined){
_local6[_local3] = [this.target[_local3]];
};
if (typeof(_local7[_local4][_local3]) == "number"){
_local6[_local3].push(_local7[_local4][_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3])));
};
};
_local4++;
};
for (_local3 in _local6) {
if (typeof(this.vars[_local3]) == "number"){
_local6[_local3].push(this.vars[_local3]);
} else {
_local6[_local3].push((this.target[_local3] + Number(this.vars[_local3])));
};
delete this.vars[_local3];
};
addSubTween(_local8, {t:0}, {t:1}, {props:parseBeziers(_local6, true), target:this.target, orientToBezier:this.vars.orientToBezier});
};
if (((!((this.vars.hexColors == undefined))) && ((typeof(this.vars.hexColors) == "object")))){
for (_local3 in this.vars.hexColors) {
addSubTween(hexColorsProxy, {r:(this.target[_local3] >> 16), g:((this.target[_local3] >> 8) & 0xFF), b:(this.target[_local3] & 0xFF)}, {r:(this.vars.hexColors[_local3] >> 16), g:((this.vars.hexColors[_local3] >> 8) & 0xFF), b:(this.vars.hexColors[_local3] & 0xFF)}, {prop:_local3, target:this.target});
};
};
super.initTweenVals(true, _arg2);
}
override public function get active():Boolean{
if (_active){
return (true);
};
if (_pauseTime != -1){
return (false);
};
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (!_initted){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function set progress(_arg1:Number):void{
var _local2:Number;
var _local3:Boolean;
_local2 = (_curTime - ((this.duration * _arg1) * 1000));
this.initTime = (_local2 - (this.delay * 1000));
_local3 = this.active;
this.startTime = _local2;
render(_curTime);
}
public function set paused(_arg1:Boolean):void{
if (_arg1){
this.pause();
} else {
this.resume();
};
}
public function resume():void{
var _local1:Number;
if (_pauseTime != -1){
_local1 = (_curTime - _pauseTime);
this.initTime = (this.initTime + _local1);
if (!isNaN(this.startTime)){
this.startTime = (this.startTime + _local1);
};
_pauseTime = -1;
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
};
};
}
public function get paused():Boolean{
if (_pauseTime != -1){
return (true);
};
return (false);
}
public function get progress():Number{
var _local1:Number;
_local1 = (((((_curTime - this.startTime) / 1000) / this.duration)) || (0));
if (_local1 > 1){
return (1);
};
return (_local1);
}
public function pause():void{
if (_pauseTime == -1){
_pauseTime = _curTime;
_active = false;
};
}
public static function sequence(_arg1:Object, _arg2:Array):Array{
var _local3:Boolean;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:uint;
var _local9:Object;
var _local10:String;
var _local11:Object;
_local3 = true;
if (_arg2[0].overwrite == false){
_local3 = false;
};
_local4 = [];
_local5 = 0;
_local8 = 0;
while (_local8 < _arg2.length) {
_local11 = _arg2[_local8];
_local7 = ((_local11.time) || (0));
_local9 = {};
for (_local10 in _local11) {
_local9[_local10] = _local11[_local10];
};
delete _local9.time;
_local6 = ((_local9.delay) || (0));
_local9.delay = (_local5 + _local6);
_local9.overwrite = _local3;
_local4.push(new TweenMax(_arg1, _local7, _local9));
_local5 = (_local5 + (_local7 + _local6));
_local3 = false;
_local8++;
};
return (_local4);
}
public static function hexColorsProxy(_arg1:Object):void{
_arg1.info.target[_arg1.info.prop] = (((_arg1.target.r << 16) | (_arg1.target.g << 8)) | _arg1.target.b);
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object;
_local7 = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5.push({s:_local4[0], cp:(_local4[1] - ((_local4[2] - _local4[0]) / 4)), e:_local4[1]});
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5.push({s:_local4[_local3], cp:(_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)].cp)), e:_local4[(_local3 + 1)]});
_local3++;
};
} else {
_local5.push({s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]});
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5.push({s:_local4[0], cp:_local4[1], e:((_local4[1] + _local4[2]) / 2)});
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5.push({s:_local5[(_local3 - 2)].e, cp:_local4[_local3], e:((_local4[_local3] + _local4[(_local3 + 1)]) / 2)});
_local3++;
};
_local5.push({s:_local5[(_local5.length - 1)].e, cp:_local4[(_local4.length - 2)], e:_local4[(_local4.length - 1)]});
} else {
if (_local4.length == 3){
_local5.push({s:_local4[0], cp:_local4[1], e:_local4[2]});
} else {
if (_local4.length == 2){
_local5.push({s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]});
};
};
};
};
};
return (_local7);
}
public static function bezierProxy2(_arg1:Object):void{
var _local2:Object;
var _local3:Object;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local9:Number;
var _local10:uint;
bezierProxy(_arg1);
_local2 = {};
_local3 = _arg1.info.target;
_arg1.info.target = _local2;
_arg1.target.t = (_arg1.target.t + 0.01);
bezierProxy(_arg1);
_local4 = _arg1.info.orientToBezier;
_local10 = 0;
while (_local10 < _local4.length) {
_local8 = _local4[_local10];
_local9 = ((_local8[3]) || (0));
_local6 = (_local2[_local8[0]] - _local3[_local8[0]]);
_local7 = (_local2[_local8[1]] - _local3[_local8[1]]);
_local3[_local8[2]] = ((Math.atan2(_local7, _local6) * _RAD2DEG) + _local9);
_local10++;
};
_arg1.info.target = _local3;
_arg1.target.t = (_arg1.target.t - 0.01);
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(true, _arg1, _arg2);
}
public static function getTweensOf(_arg1:Object):Array{
var _local2:Dictionary;
var _local3:Array;
var _local4:Object;
_local2 = _all[_arg1];
_local3 = [];
if (_local2 != null){
for (_local4 in _local2) {
if (_local2[_local4].tweens != undefined){
_local3.push(_local2[_local4]);
};
};
};
return (_local3);
}
public static function killAllDelayedCalls(_arg1:Boolean=false):void{
killAll(_arg1, false, true);
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4=null):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, onCompleteScope:_arg4, overwrite:false}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:Array;
var _local3:int;
_local2 = getTweensOf(_arg1);
_local3 = (_local2.length - 1);
while (_local3 > -1) {
if (_local2[_local3].active){
return (true);
};
_local3--;
};
return (false);
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local4:Array;
var _local5:int;
_local4 = getAllTweens();
_local5 = (_local4.length - 1);
while (_local5 > -1) {
if (((((_local4[_local5].target is Function) == _arg3)) || (!(((_local4[_local5].target is Function) == _arg2))))){
if (_arg1){
_local4[_local5].complete();
} else {
TweenLite.removeTween(_local4[_local5]);
};
};
_local5--;
};
}
public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local4:Array;
var _local5:int;
_local4 = getAllTweens();
_local5 = (_local4.length - 1);
while (_local5 > -1) {
if (((((_local4[_local5].target is Function) == _arg3)) || (!(((_local4[_local5].target is Function) == _arg2))))){
_local4[_local5].paused = _arg1;
};
_local5--;
};
}
public static function bezierProxy(_arg1:Object):void{
var _local2:Number;
var _local3:Object;
var _local4:Object;
var _local5:int;
var _local6:String;
var _local7:Object;
var _local8:Number;
var _local9:uint;
_local2 = _arg1.target.t;
_local3 = _arg1.info.props;
_local4 = _arg1.info.target;
for (_local6 in _local3) {
_local9 = _local3[_local6].length;
if (_local2 < 0){
_local5 = 0;
} else {
if (_local2 >= 1){
_local5 = (_local9 - 1);
} else {
_local5 = int((_local9 * _local2));
};
};
_local8 = ((_local2 - (_local5 * (1 / _local9))) * _local9);
_local7 = _local3[_local6][_local5];
_local4[_local6] = (_local7.s + (_local8 * (((2 * (1 - _local8)) * (_local7.cp - _local7.s)) + (_local8 * (_local7.e - _local7.s)))));
};
}
public static function callbackProxy(_arg1:Array, _arg2:Array=null):void{
var _local3:uint;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3] != undefined){
_arg1[_local3].apply(null, _arg2[_local3]);
};
_local3++;
};
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object):Array{
_arg3.runBackwards = true;
return (allTo(_arg1, _arg2, _arg3));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function killAllTweens(_arg1:Boolean=false):void{
killAll(_arg1, true, false);
}
public static function getAllTweens():Array{
var _local1:Dictionary;
var _local2:Array;
var _local3:Object;
var _local4:Object;
_local1 = _all;
_local2 = [];
for (_local3 in _local1) {
for (_local4 in _local1[_local3]) {
if (_local1[_local3][_local4] != undefined){
_local2.push(_local1[_local3][_local4]);
};
};
};
return (_local2);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object):Array{
var _local4:int;
var _local5:Object;
var _local6:String;
var _local7:Number;
var _local8:Object;
var _local9:Array;
var _local10:Number;
if (_arg1.length == 0){
return ([]);
};
_local9 = [];
_local10 = ((_arg3.delayIncrement) || (0));
delete _arg3.delayIncrement;
if (_arg3.onCompleteAll == undefined){
_local8 = _arg3;
} else {
_local8 = {};
for (_local6 in _arg3) {
_local8[_local6] = _arg3[_local6];
};
_local8.onCompleteParams = [[_arg3.onComplete, _arg3.onCompleteAll], [_arg3.onCompleteParams, _arg3.onCompleteAllParams]];
_local8.onComplete = TweenMax.callbackProxy;
delete _arg3.onCompleteAll;
};
delete _arg3.onCompleteAllParams;
if (_local10 == 0){
_local4 = 0;
while (_local4 < (_arg1.length - 1)) {
_local5 = {};
for (_local6 in _arg3) {
_local5[_local6] = _arg3[_local6];
};
_local9.push(new TweenMax(_arg1[_local4], _arg2, _local5));
_local4++;
};
} else {
_local7 = ((_arg3.delay) || (0));
_local4 = 0;
while (_local4 < (_arg1.length - 1)) {
_local5 = {};
for (_local6 in _arg3) {
_local5[_local6] = _arg3[_local6];
};
_local5.delay = (_local7 + (_local4 * _local10));
_local9.push(new TweenMax(_arg1[_local4], _arg2, _local5));
_local4++;
};
_local8.delay = (_local7 + ((_arg1.length - 1) * _local10));
};
_local9.push(new TweenMax(_arg1[(_arg1.length - 1)], _arg2, _local8));
return (_local9);
}
}
}//package gs
Section 19
//Blank (Blank)
package {
import flash.display.*;
public dynamic class Blank extends MovieClip {
}
}//package
Section 20
//Blood (Blood)
package {
import flash.display.*;
public dynamic class Blood extends MovieClip {
}
}//package
Section 21
//Bomb (Bomb)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Bomb extends MovieClip {
public var strikeZone_mc:MovieClip;
public var fuse_mc:MovieClip;
public var myPoint:Point;
public var spawnPoint_mc:MovieClip;
public var hitZone_mc:MovieClip;
public function Bomb(){
addFrameScript(0, frame1, 14, frame15, 18, frame19, 21, frame22, 29, frame30, 35, frame36, 52, frame53);
}
function frame15(){
trace(("WHICH BOMB?? " + this.name));
if (this.name == "instance2"){
MovieClip(parent).bombGravity.bonk();
} else {
MovieClip(parent).bombGravity2.bonk();
};
}
function frame1(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
stop();
}
function frame22(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Fragments, 40, "up", 0.2, myPoint.x, myPoint.y);
}
function frame30(){
stop();
}
function frame36(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Fragments, 40, "up", 1, myPoint.x, myPoint.y);
}
function frame19(){
gotoAndStop(1);
}
function frame53(){
stop();
}
}
}//package
Section 22
//Boom (Boom)
package {
import flash.display.*;
public dynamic class Boom extends MovieClip {
public function Boom(){
addFrameScript(22, frame23);
}
function frame23(){
MovieClip(parent).removeChild(this);
stop();
}
}
}//package
Section 23
//Bullet (Bullet)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Bullet extends MovieClip {
private var gun:Gun;
private var lastTime:int;
private var dy:Number;
public var timePassed:int;
private var player:Player;
private var attackPointFrames:Array;
public function Bullet(_arg1:Player, _arg2:Gun, _arg3, _arg4:Number, _arg5:Number, _arg6:Array){
addFrameScript(0, frame1, 6, frame7);
trace(((((((("*****NEW BULLET!!! " + this) + "x: ") + _arg3) + " y: ") + _arg4) + " speed: ") + _arg5));
this.player = _arg1;
this.gun = _arg2;
this.x = _arg3;
this.y = _arg4;
this.dy = _arg5;
this.attackPointFrames = _arg6;
this.lastTime = getTimer();
this.addEventListener(Event.ENTER_FRAME, moveBullet);
this.addEventListener(Event.ENTER_FRAME, this.checkCollision);
}
public function checkCollision(_arg1:Event){
var _local2:uint;
while (_local2 < this.player.attackTargets.length) {
if (this.hitTestObject(this.player.attackTargets[_local2].targetMC.hitZone_mc)){
if (this.checkWeaponRange("attack")){
if (player.attackTargets[_local2].targetMC.currentFrame < 3){
player.attackTargets[_local2].damageTarget(2);
this.gotoAndPlay("explode");
};
};
};
_local2++;
};
}
function frame7(){
stop();
}
function frame1(){
stop();
}
private function checkWeaponRange(_arg1:String):Boolean{
var _local2:uint;
switch (_arg1){
case "attack":
_local2 = 0;
while (_local2 < attackPointFrames.length) {
if (this.currentFrame == attackPointFrames[_local2]){
return (true);
};
_local2++;
};
return (false);
case "block":
default:
return (false);
};
}
public function moveBullet(_arg1:Event){
this.timePassed = (getTimer() - this.lastTime);
this.lastTime = (this.lastTime + this.timePassed);
this.y = (this.y + ((dy * timePassed) / 1000));
if (this.y < 0){
this.deleteBullet();
};
}
public function deleteBullet(){
trace("---removing bullet");
this.gun.removeBullet(this);
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveBullet);
}
}
}//package
Section 24
//Creature (Creature)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Creature extends MovieClip {
public var strikeZone_mc:MovieClip;
public var whichWay:Number;
public var hitZone_mc:MovieClip;
public function Creature(){
addFrameScript(0, frame1, 1, frame2, 17, frame18, 30, frame31, 41, frame42, 60, frame61, 68, frame69, 87, frame88, 98, frame99, 102, frame103, 112, frame113, 129, frame130);
}
function frame88(){
gotoAndPlay("choice1");
}
function frame18(){
gotoAndStop("idle");
}
function frame1(){
whichWay = Math.ceil((Math.random() * 3));
}
function frame103(){
gotoAndStop("idle");
}
function frame2(){
whichWay = Math.ceil((Math.random() * 3));
stop();
}
function frame113(){
whichWay = Math.ceil((Math.random() * 3));
if (whichWay == 2){
gotoAndPlay("choice2");
} else {
gotoAndStop("idle");
};
}
function frame31(){
gotoAndStop("idle");
}
function frame99(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame42(){
gotoAndPlay("choice1");
}
function frame130(){
parent.removeChild(this);
stop();
}
function frame61(){
gotoAndStop("idle");
}
function frame69(){
whichWay = Math.ceil((Math.random() * 3));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 60;
break;
case 2:
this.x = 300;
break;
case 3:
this.x = 600;
break;
default:
this.x = 300;
};
}
}
}//package
Section 25
//Creature_a (Creature_a)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Creature_a extends MovieClip {
public var strikeZone_mc:MovieClip;
public var whichWay:Number;
public var hitZone_mc:MovieClip;
public function Creature_a(){
addFrameScript(0, frame1, 1, frame2, 17, frame18, 30, frame31, 41, frame42, 60, frame61, 68, frame69, 87, frame88, 98, frame99, 102, frame103, 112, frame113, 129, frame130);
}
function frame88(){
gotoAndPlay("choice1");
}
function frame18(){
gotoAndStop("idle");
}
function frame1(){
whichWay = Math.ceil((Math.random() * 3));
}
function frame103(){
gotoAndStop("idle");
}
function frame2(){
whichWay = Math.ceil((Math.random() * 3));
stop();
}
function frame113(){
whichWay = Math.ceil((Math.random() * 3));
if (whichWay == 2){
gotoAndPlay("choice2");
} else {
gotoAndStop("idle");
};
}
function frame31(){
gotoAndStop("idle");
}
function frame99(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame42(){
gotoAndPlay("choice1");
}
function frame130(){
parent.removeChild(this);
stop();
}
function frame61(){
gotoAndStop("idle");
}
function frame69(){
whichWay = Math.ceil((Math.random() * 3));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 60;
break;
case 2:
this.x = 300;
break;
case 3:
this.x = 600;
break;
default:
this.x = 300;
};
}
}
}//package
Section 26
//Creature_b (Creature_b)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Creature_b extends MovieClip {
public var strikeZone_mc:MovieClip;
public var whichWay:Number;
public var hitZone_mc:MovieClip;
public function Creature_b(){
addFrameScript(0, frame1, 1, frame2, 17, frame18, 30, frame31, 41, frame42, 60, frame61, 68, frame69, 87, frame88, 98, frame99, 102, frame103, 112, frame113, 129, frame130);
}
function frame88(){
gotoAndPlay("choice1");
}
function frame18(){
gotoAndStop("idle");
}
function frame1(){
whichWay = Math.ceil((Math.random() * 3));
}
function frame103(){
gotoAndStop("idle");
}
function frame2(){
whichWay = Math.ceil((Math.random() * 3));
stop();
}
function frame113(){
whichWay = Math.ceil((Math.random() * 3));
if (whichWay == 2){
gotoAndPlay("choice2");
} else {
gotoAndStop("idle");
};
}
function frame31(){
gotoAndStop("idle");
}
function frame99(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame42(){
gotoAndPlay("choice1");
}
function frame130(){
MovieClip(parent).deployTarget(2);
parent.removeChild(this);
stop();
}
function frame61(){
gotoAndStop("idle");
}
function frame69(){
whichWay = Math.ceil((Math.random() * 3));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 60;
break;
case 2:
this.x = 300;
break;
case 3:
this.x = 600;
break;
default:
this.x = 300;
};
}
}
}//package
Section 27
//Creature2 (Creature2)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Creature2 extends MovieClip {
public var strikeZone_mc:MovieClip;
public var whichWay:Number;
public var hitZone_mc:MovieClip;
public function Creature2(){
addFrameScript(0, frame1, 17, frame18, 30, frame31, 41, frame42, 60, frame61, 68, frame69, 87, frame88, 98, frame99, 102, frame103, 118, frame119);
}
function frame88(){
gotoAndPlay("choice1");
}
function frame18(){
gotoAndStop("idle");
}
function frame1(){
stop();
}
function frame103(){
gotoAndStop("idle");
}
function frame31(){
gotoAndStop("idle");
}
function frame99(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame119(){
MovieClip(parent).deployTarget(3);
stop();
}
function frame42(){
gotoAndPlay("choice1");
}
function frame61(){
gotoAndStop("idle");
}
function frame69(){
whichWay = Math.ceil((Math.random() * 3));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 60;
break;
case 2:
this.x = 300;
break;
case 3:
this.x = 600;
break;
default:
this.x = 300;
};
}
}
}//package
Section 28
//Creature3 (Creature3)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Creature3 extends MovieClip {
public var strikeZone_mc:MovieClip;
public var whichWay:Number;
public var hitZone_mc:MovieClip;
public function Creature3(){
addFrameScript(0, frame1, 17, frame18, 30, frame31, 41, frame42, 60, frame61, 68, frame69, 87, frame88, 98, frame99, 102, frame103, 118, frame119);
}
function frame88(){
gotoAndPlay("choice1");
}
function frame18(){
gotoAndStop("idle");
}
function frame1(){
stop();
}
function frame103(){
gotoAndStop("idle");
}
function frame31(){
gotoAndStop("idle");
}
function frame99(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame119(){
stop();
}
function frame42(){
gotoAndPlay("choice1");
}
function frame61(){
gotoAndStop("idle");
}
function frame69(){
whichWay = Math.ceil((Math.random() * 3));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 60;
break;
case 2:
this.x = 300;
break;
case 3:
this.x = 600;
break;
default:
this.x = 300;
};
}
}
}//package
Section 29
//Dad (Dad)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Dad extends MovieClip {
public var strikeZone_mc:MovieClip;
public var whichWay:Number;
public var dadHead_mc:MovieClip;
public var hitZone_mc:MovieClip;
public function Dad(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 17, frame18, 30, frame31, 41, frame42, 62, frame63, 74, frame75, 89, frame90, 102, frame103, 106, frame107, 117, frame118, 119, frame120, 150, frame151, 152, frame153, 166, frame167, 178, frame179, 194, frame195, 203, frame204, 208, frame209, 249, frame250, 0xFF, frame256, 266, frame267, 272, frame273, 277, frame278, 282, frame283, 287, frame288, 292, frame293, 297, frame298, 302, frame303, 307, frame308, 312, frame313, 316, frame317, 328, frame329);
}
function frame151(){
gotoAndStop("idle");
}
function frame273(){
trace(("!!!!WTF IS MY TARGET? - " + MovieClip(parent).dadClip));
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame313(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame153(){
if (this.x < 200){
gotoAndPlay("choice6right");
} else {
if (this.x > 500){
gotoAndPlay("choice6left");
} else {
whichWay = Math.ceil((Math.random() * 2));
switch (whichWay){
case 1:
gotoAndPlay("choice6right");
break;
case 2:
gotoAndPlay("choice6left");
break;
default:
gotoAndPlay("choice6right");
};
};
};
}
function frame75(){
whichWay = Math.ceil((Math.random() * 3));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 110;
break;
case 2:
this.x = 315;
break;
case 3:
this.x = 524;
break;
default:
this.x = 315;
};
}
function frame278(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame308(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame317(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame167(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame204(){
gotoAndStop("idle");
}
function frame288(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame329(){
MovieClip(parent).deployTarget(2);
stop();
}
function frame209(){
MovieClip(parent).myPlayer.freezePlayer();
MovieClip(parent).myWeapon.targetMC.stop();
MovieClip(parent).hud_mc.callouts_mc.gotoAndPlay("fury");
}
function frame283(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame293(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame90(){
gotoAndPlay("choice1");
}
function frame10(){
MovieClip(parent).makeSparks(Blood, 40, "both", 1, MovieClip(parent).mouseX, MovieClip(parent).mouseY);
}
function frame18(){
gotoAndStop("idle");
}
function frame298(){
trace(("!!!!WTF IS MY TARGET? - " + MovieClip(parent).dadClip));
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame1(){
whichWay = Math.ceil((Math.random() * 3));
}
function frame103(){
}
function frame179(){
gotoAndStop("idle");
}
function frame107(){
gotoAndStop("idle");
}
function frame2(){
whichWay = Math.ceil((Math.random() * 3));
stop();
}
function frame195(){
MovieClip(parent).myWeapon.dropWeapon();
}
function frame31(){
gotoAndStop("idle");
}
function frame120(){
gotoAndStop("idle");
}
function frame118(){
MovieClip(parent).deployBomb();
}
function frame42(){
gotoAndPlay("choice1");
}
function frame256(){
MovieClip(parent).myPlayer.unfreezePlayer();
MovieClip(parent).myWeapon.targetMC.play();
}
function frame250(){
MovieClip(parent).myPlayer.unfreezePlayer();
}
function frame267(){
gotoAndStop("idle");
}
function frame303(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), MovieClip(parent).dadClip.y);
}
function frame63(){
gotoAndStop("idle");
}
}
}//package
Section 30
//Dad_spider (Dad_spider)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Dad_spider extends MovieClip {
public var strikeZone_mc:MovieClip;
public var myPoint:Point;
public var spawnPoint_mc:MovieClip;
public var whichWay:Number;
public var hitZone_mc:MovieClip;
public function Dad_spider(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 23, frame24, 37, frame38, 48, frame49, 61, frame62, 69, frame70, 81, frame82, 96, frame97, 109, frame110, 113, frame114, 119, frame120, 123, frame124, 242, frame243, 282, frame283, 286, frame287, 291, frame292, 294, frame295, 298, frame299, 304, frame305, 311, frame312, 339, frame340, 412, frame413, 418, frame419);
}
function frame70(){
gotoAndStop("idle");
}
function frame312(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame82(){
whichWay = Math.ceil((Math.random() * 4));
trace(("Moving: " + whichWay));
switch (whichWay){
case 1:
this.x = 305;
this.y = 379;
this.rotation = 0;
break;
case 2:
this.x = 235;
this.y = 219;
this.rotation = 90;
break;
case 3:
this.x = 463;
this.y = 237;
this.rotation = 180;
break;
case 4:
this.x = 563;
this.y = 390;
this.rotation = 270;
break;
default:
this.x = 315;
};
}
function frame305(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame287(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame283(){
MovieClip(parent).hud_mc.gotoAndPlay("final");
MovieClip(parent).myScroller.stopScrolling();
this.rotation = 0;
this.x = 331.1;
this.y = 307.2;
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame292(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame299(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame295(){
MovieClip(parent).makeSparks(Blood, 50, "up", 1, (MovieClip(parent).dadClip.x + 60), (MovieClip(parent).dadClip.y - 20));
}
function frame10(){
MovieClip(parent).makeSparks(Blood, 40, "both", 1, MovieClip(parent).mouseX, MovieClip(parent).mouseY);
}
function frame97(){
gotoAndPlay("idle");
}
function frame340(){
MovieClip(parent).myWeapon.targetMC.visible = false;
}
function frame1(){
whichWay = Math.ceil((Math.random() * 3));
}
function frame24(){
gotoAndStop("idle");
}
function frame110(){
}
function frame114(){
gotoAndStop("idle");
}
function frame38(){
gotoAndStop("idle");
}
function frame124(){
gotoAndStop("idle");
}
function frame120(){
MovieClip(parent).shootProjectile();
}
function frame243(){
gotoAndStop("idle");
}
function frame2(){
whichWay = Math.ceil((Math.random() * 3));
stop();
}
function frame49(){
gotoAndPlay("idle");
}
function frame413(){
MovieClip(parent).hud_mc.gotoAndPlay("deathblow");
}
function frame419(){
stop();
}
function frame62(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Goop, 40, "both", 5, myPoint.x, myPoint.y);
}
}
}//package
Section 31
//DartFly (DartFly)
package {
import flash.display.*;
public dynamic class DartFly extends MovieClip {
public function DartFly(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 32
//DartShape (DartShape)
package {
import flash.display.*;
public dynamic class DartShape extends MovieClip {
}
}//package
Section 33
//DropWeapon (DropWeapon)
package {
import flash.display.*;
public dynamic class DropWeapon extends MovieClip {
public function DropWeapon(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 34
//Ember (Ember)
package {
import flash.display.*;
public dynamic class Ember extends MovieClip {
}
}//package
Section 35
//Explosion (Explosion)
package {
import flash.display.*;
public dynamic class Explosion extends MovieClip {
public function Explosion(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package
Section 36
//Fragments (Fragments)
package {
import flash.display.*;
public dynamic class Fragments extends MovieClip {
}
}//package
Section 37
//Goop (Goop)
package {
import flash.display.*;
public dynamic class Goop extends MovieClip {
}
}//package
Section 38
//GravityObject (GravityObject)
package {
import flash.display.*;
import flash.events.*;
public class GravityObject extends MovieClip {
var friction:Number;
var oldY:Number;
var oldX:Number;
public var velX:Number;
var gravity:Number;
public var velY:Number;
var restitution:Number;
var dragging:Boolean;// = false
var movieWidth:int;
var movieHeight:int;
public var posX:Number;
var radius:Number;
public var posY:Number;
var targetMC:MovieClip;
var gradualRotation:Number;
public function GravityObject(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number){
dragging = false;
super();
this.targetMC = _arg1;
this.gravity = _arg4;
this.restitution = _arg5;
this.friction = _arg6;
this.gradualRotation = _arg7;
this.velX = 100;
this.velY = Math.ceil((Math.random() * 60));
this.posX = _arg2;
this.posY = _arg3;
this.oldX = this.targetMC.x;
this.oldY = this.targetMC.y;
this.radius = (this.targetMC.width / 2);
this.movieWidth = 800;
this.movieHeight = 600;
this.addEventListener(Event.ENTER_FRAME, this.applyGravity);
}
private function applyGravity(_arg1:Event){
if (!this.dragging){
this.velY = (this.velY + this.gravity);
this.posX = (this.posX + this.velX);
this.posY = (this.posY + this.velY);
if ((this.posY + this.radius) > this.movieHeight){
this.posY = (this.movieHeight - this.radius);
this.velY = (this.velY * -(this.restitution));
this.velX = (this.velX * this.friction);
};
if ((this.posX + this.radius) > this.movieWidth){
this.posX = (this.movieWidth - this.radius);
this.velX = (this.velX * -(this.restitution));
};
if (this.posX < this.radius){
this.posX = this.radius;
this.velX = (this.velX * -(this.restitution));
};
this.targetMC.x = this.posX;
this.targetMC.y = this.posY;
if (this.velX > 4){
this.targetMC.rotation = (this.targetMC.rotation + this.gradualRotation);
};
} else {
this.oldX = this.posX;
this.oldY = this.posY;
this.posX = this.targetMC.x;
this.posY = this.targetMC.y;
this.velX = (this.posX - (this.oldX / 2));
this.velY = (this.posY - (this.oldY / 2));
};
}
public function targetReact(){
this.targetMC.gotoAndPlay("react");
}
public function bonk(){
if (this.velX > (this.movieWidth / 2)){
this.velX = -70;
} else {
this.velX = 70;
};
this.velY = Math.ceil((Math.random() * 60));
}
}
}//package
Section 39
//Grenade (Grenade)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import fl.motion.easing.*;
public class Grenade extends MovieClip {
var endBlockRange:int;
private var maxAmmo:Number;
var g:GravityObject;
var scaleRate:Number;// = 0.98
var attackTargets:Array;
var startBlockRange:int;
public var ammo:Number;
private var player:Player;
var targetY:Number;
public var targetMC:MovieClip;
public var groundYLevel:Number;
var attackPointFrames:Array;
var targetX:Number;
public function Grenade(_arg1:Player, _arg2:MovieClip, _arg3:Number, _arg4:Number, _arg5:Array){
scaleRate = 0.98;
attackTargets = new Array();
super();
this.player = _arg1;
this.targetMC = _arg2;
this.ammo = _arg3;
this.maxAmmo = this.ammo;
this.groundYLevel = _arg4;
this.attackPointFrames = _arg5;
this.targetMC.addEventListener(MouseEvent.MOUSE_DOWN, this.setTarget);
this.targetMC.addEventListener(MouseEvent.MOUSE_UP, this.releaseGrenade);
this.targetMC.addEventListener(Event.ENTER_FRAME, this.checkCollision);
this.targetMC.addEventListener(Event.ENTER_FRAME, this.aim);
}
private function explode(){
this.ammo--;
this.targetMC.scaleX = 1;
this.targetMC.scaleY = 1;
this.targetMC.gotoAndPlay("explode");
}
public function checkCollision(_arg1:Event){
var _local2:uint;
while (_local2 < player.attackTargets.length) {
if (this.targetMC.hitTestObject(player.attackTargets[_local2].targetMC.hitZone_mc)){
if (this.checkWeaponRange("attack")){
if (player.attackTargets[_local2].targetMC.currentFrame < 3){
player.attackTargets[_local2].damageTarget(2);
};
};
};
_local2++;
};
}
private function aim(_arg1:Event){
if (this.targetMC.currentFrame == 1){
this.targetMC.x = mouseX;
this.targetMC.y = mouseY;
if (this.ammo == 0){
this.targetMC.visible = false;
};
};
}
public function resetGrenades(){
this.ammo = this.maxAmmo;
}
private function releaseGrenade(_arg1:MouseEvent){
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (((this.targetMC.visible) && ((this.ammo > 0)))){
this.targetMC.gotoAndStop(1);
this.targetMC.x = mouseX;
this.targetMC.y = mouseY;
this.targetMC.scaleX = 1;
this.targetMC.scaleY = 1;
_local2 = (this.targetX - this.targetMC.x);
_local3 = (this.targetY - this.targetMC.y);
_local4 = (Math.sqrt(((_local2 * _local2) + (_local3 * _local3))) / 2);
if (this.targetX < this.targetMC.x){
_local4 = (_local4 * -1);
};
TweenMax.to(this.targetMC, 1.5, {x:this.targetX, y:this.groundYLevel, bezierThrough:[{x:(this.targetMC.x + _local4), y:(this.targetMC.y - 250)}], orientToBezier:true, scaleX:0.5, scaleY:0.5, ease:Bounce.easeOut, onComplete:this.explode});
};
}
private function checkWeaponRange(_arg1:String):Boolean{
var _local2:uint;
switch (_arg1){
case "attack":
_local2 = 0;
while (_local2 < attackPointFrames.length) {
if (this.targetMC.currentFrame == attackPointFrames[_local2]){
return (true);
};
_local2++;
};
return (false);
case "block":
if ((((this.targetMC.currentFrame < startBlockRange)) || ((this.targetMC.currentFrame > endBlockRange)))){
return (false);
};
return (true);
default:
return (false);
};
}
private function setTarget(_arg1:MouseEvent){
this.targetX = mouseX;
this.targetY = mouseY;
}
trace("new grenade!!");
}
}//package
Section 40
//GrenadeClip (GrenadeClip)
package {
import flash.display.*;
public dynamic class GrenadeClip extends MovieClip {
public function GrenadeClip(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
gotoAndStop(1);
}
}
}//package
Section 41
//Gun (Gun)
package {
import flash.display.*;
import flash.events.*;
public class Gun extends MovieClip {
public var speed:Number;
public var b:Bullet;
public var leftArrow;
public var lastTime:int;
public var shotsLeft:Number;
private var timePassed:Number;
public var rightArrow:Boolean;
private var bullets:Array;
private var newX:Number;
private var player:Player;
public var targetMC:MovieClip;
public function Gun(_arg1:Player, _arg2:MovieClip){
trace(((("-----NEW GUN! player: " + _arg1) + " targetMC: ") + _arg2));
this.speed = 50;
this.player = _arg1;
this.targetMC = _arg2;
this.shotsLeft = 100;
this.targetMC.x = 369;
this.targetMC.y = 600;
this.bullets = new Array();
this.addEventListener(Event.ENTER_FRAME, moveGun);
this.targetMC.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunction);
this.targetMC.stage.addEventListener(MouseEvent.MOUSE_UP, this.fireBulletFromMouse);
}
public function fireBullet(){
if (this.targetMC.visible){
if (this.shotsLeft <= 0){
return;
};
this.b = new Bullet(this.player, this, this.targetMC.x, this.targetMC.y, -300, new Array(1, 2));
this.targetMC.stage.addChild(this.b);
this.bullets.push(this.b);
trace(("BULLETS: " + this.bullets));
this.shotsLeft--;
};
}
public function fireBulletFromMouse(_arg1:Event){
this.fireBullet();
}
public function keyUpFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 37){
this.leftArrow = false;
} else {
if (_arg1.keyCode == 39){
this.rightArrow = false;
};
};
}
public function removeBullet(_arg1:Bullet){
var _local2:*;
for (_local2 in this.bullets) {
if (this.bullets[_local2] == _arg1){
this.bullets.splice(_local2, 1);
break;
};
};
}
public function keyDownFunction(_arg1:KeyboardEvent){
if (_arg1.keyCode == 32){
this.fireBullet();
};
}
public function moveGun(_arg1:Event){
this.targetMC.x = this.mouseX;
}
public function deleteGun(){
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, moveGun);
}
}
}//package
Section 42
//GunShape (GunShape)
package {
import flash.display.*;
public dynamic class GunShape extends MovieClip {
}
}//package
Section 43
//Hud (Hud)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Hud extends MovieClip {
public var chButton:SimpleButton;
public var fatkid_mc:MovieClip;
public var callouts_mc:MovieClip;
public var tfButton:SimpleButton;
public var ngButton:SimpleButton;
public var magicBar_mc:MovieClip;
public var krButton:SimpleButton;
public var replay_bt:SimpleButton;
public var hitStreak_mc:MovieClip;
public var healthBar_mc:MovieClip;
public var blockStreak_txt:TextField;
public var swingStreak_txt:TextField;
public function Hud(){
addFrameScript(0, frame1, 14, frame15, 15, frame16, 16, frame17, 37, frame38, 48, frame49, 119, frame120, 120, frame121, 190, frame191);
}
function frame15(){
gotoAndStop(1);
}
function frame16(){
stop();
}
function frame1(){
healthBar_mc.visible = true;
krButton.visible = false;
chButton.visible = false;
tfButton.visible = false;
ngButton.visible = false;
stop();
}
function frame17(){
if (MovieClip(parent).myWeapon.targetMC.visible == true){
MovieClip(parent).myWeapon.targetMC.visible = false;
} else {
MovieClip(parent).myWeapon.droppedMC.visible = false;
};
}
function frame191(){
MovieClip(parent).endGame();
krButton.visible = true;
chButton.visible = true;
tfButton.visible = true;
ngButton.visible = true;
stop();
}
function frame38(){
fatkid_mc.gotoAndStop("dead");
}
function frame120(){
stop();
}
function frame49(){
MovieClip(parent).endGame();
krButton.visible = true;
chButton.visible = true;
tfButton.visible = true;
ngButton.visible = true;
stop();
}
function frame121(){
healthBar_mc.visible = false;
}
}
}//package
Section 44
//Parallax (Parallax)
package {
import flash.display.*;
import flash.events.*;
public class Parallax extends MovieClip {
private var moveVel:Number;
private var centerPoint:Number;
private var autoScroll:String;
private var autoScrollSpeed:Number;
private var layerNum:Number;
private var scrollLeft:Boolean;
private var allowScrolling:Boolean;
public var targetMC:MovieClip;
public function Parallax(_arg1:MovieClip, _arg2:String, _arg3:Number){
this.allowScrolling = true;
this.targetMC = _arg1;
trace(("-----added: " + _arg1));
this.layerNum = 3;
this.scrollLeft = scrollLeft;
this.centerPoint = 400;
trace(("CENTERPOINT: " + centerPoint));
this.autoScroll = _arg2;
this.autoScrollSpeed = _arg3;
this.targetMC.addEventListener(Event.ENTER_FRAME, this.checkScroll);
}
public function checkScroll(_arg1:Event){
var _local2:*;
var _local3:MovieClip;
var _local4:MovieClip;
if (this.allowScrolling){
switch (this.autoScroll){
case "mouse":
this.moveVel = (Math.floor((mouseX - this.centerPoint)) / 30);
break;
case "right":
this.moveVel = this.autoScrollSpeed;
break;
case "left":
this.moveVel = (this.autoScrollSpeed * -1);
break;
default:
this.moveVel = (Math.floor((mouseX - this.centerPoint)) / 30);
};
_local2 = 1;
while (_local2 <= layerNum) {
_local3 = this.targetMC[(("back" + _local2) + "a_mc")];
_local4 = this.targetMC[(("back" + _local2) + "b_mc")];
if (this.scrollLeft){
_local3.x = (_local3.x - (this.moveVel / _local2));
_local4.x = (_local4.x - (this.moveVel / _local2));
} else {
_local3.x = (_local3.x + (this.moveVel / _local2));
_local4.x = (_local4.x + (this.moveVel / _local2));
};
if (_local3.x < -(_local3.width)){
_local3.x = (_local4.x + _local4.width);
};
if (_local4.x < -(_local4.width)){
_local4.x = (_local3.x + _local3.width);
};
if (_local3.x > (_local3.width - 10)){
_local3.x = (_local4.x - _local4.width);
};
if (_local4.x > _local4.width){
_local4.x = (_local3.x - _local3.width);
};
_local2++;
};
};
}
public function stopScrolling(){
this.allowScrolling = false;
}
trace("new parllax bg!");
}
}//package
Section 45
//parallaxClip (parallaxClip)
package {
import flash.display.*;
public dynamic class parallaxClip extends MovieClip {
public var back2b_mc:MovieClip;
public var back1a_mc:MovieClip;
public var back3a_mc:MovieClip;
public var back1b_mc:MovieClip;
public var back3b_mc:MovieClip;
public var back2a_mc:MovieClip;
}
}//package
Section 46
//Particle (Particle)
package {
import flash.display.*;
public class Particle {
public var spin:Number;// = 0
public var fade:Number;// = 0
public var yVel:Number;// = 0
public var xVel:Number;// = 0
public var shrink:Number;// = 1
public var gravity:Number;// = 0
public var clip:DisplayObject;
public var drag:Number;// = 1
public function Particle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number){
xVel = 0;
yVel = 0;
drag = 1;
gravity = 0;
shrink = 1;
fade = 0;
spin = 0;
super();
if (_arg1){
clip = new (_arg1);
_arg2.addChild(clip);
clip.x = _arg3;
clip.y = _arg4;
};
}
public function destroy():void{
clip.parent.removeChild(clip);
}
public function setVel(_arg1:Number, _arg2:Number):void{
xVel = _arg1;
yVel = _arg2;
}
public function update():void{
clip.x = (clip.x + xVel);
clip.y = (clip.y + yVel);
xVel = (xVel * drag);
yVel = (yVel * drag);
yVel = (yVel + gravity);
clip.scaleX = (clip.scaleX * shrink);
clip.scaleY = (clip.scaleY * shrink);
clip.alpha = (clip.alpha - fade);
clip.rotation = (clip.rotation + spin);
}
}
}//package
Section 47
//Player (Player)
package {
import flash.display.*;
import flash.events.*;
public class Player extends MovieClip {
public var maxMagicPoints:Number;
private var hud:MovieClip;
public var swingStreak:Number;
public var hitPoints:Number;
public var maxHitPoints:Number;
public var blockStreak:Number;
public var attackTargets:Array;
public var playerCanMove:Boolean;
public var hitStreak:Number;
public var magicPoints:Number;
public function Player(_arg1:Number, _arg2:Hud){
attackTargets = new Array();
super();
this.hitPoints = _arg1;
this.magicPoints = 0;
this.maxMagicPoints = 30;
this.hitStreak = 0;
this.blockStreak = 0;
this.swingStreak = 0;
this.maxHitPoints = this.hitPoints;
this.hud = _arg2;
this.playerCanMove = true;
trace(("new player created! ---> hitPoints: " + this.hitPoints));
}
public function healPlayer(_arg1:Number){
this.hitPoints = (this.hitPoints + _arg1);
this.hud.healthBar_mc.scaleX = (this.hitPoints / this.maxHitPoints);
if (this.hitPoints > this.maxHitPoints){
this.hitPoints = this.maxHitPoints;
this.hud.healthBar_mc.scaleX = (this.hitPoints / this.maxHitPoints);
};
}
private function checkForBlockPrompt(){
if ((((((this.hitPoints / this.maxHitPoints) * 100) < 90)) && ((this.blockStreak < 2)))){
this.hud.callouts_mc.gotoAndPlay("block");
};
}
public function addToMagic(_arg1:Number){
this.magicPoints = (this.magicPoints + _arg1);
this.hud.magicBar_mc.scaleX = (this.magicPoints / this.maxMagicPoints);
}
public function damagePlayer(_arg1:Number){
this.hitPoints = (this.hitPoints - _arg1);
this.hud.gotoAndPlay("hurt");
this.resetHitStreak();
this.checkForBlockPrompt();
trace(("++++++++++HEALTH: " + ((this.hitPoints / this.maxHitPoints) * 100)));
if (this.hitPoints > 0){
this.hud.healthBar_mc.scaleX = (this.hitPoints / this.maxHitPoints);
} else {
this.hud.gotoAndPlay("playerDeath");
};
}
public function removeTarget(_arg1:MovieClip){
var _local2:uint;
trace(("--------REMOVING TARGET FROM LIST... WAS: " + this.attackTargets));
_local2 = 0;
while (_local2 < attackTargets.length) {
trace((((("COMPARING: " + this.attackTargets[_local2]) + " With ") + _arg1) + "..."));
if (this.attackTargets[_local2] == _arg1){
this.attackTargets = this.attackTargets.splice(_local2, 1);
};
_local2++;
};
trace(("--------IS NOW: " + this.attackTargets));
}
public function freezePlayer(){
this.playerCanMove = false;
}
public function resetHitStreak(){
this.hitStreak = 0;
}
public function unfreezePlayer(){
this.playerCanMove = true;
}
public function subtractFromMagic(_arg1:Number){
this.magicPoints = (this.magicPoints - _arg1);
this.hud.magicBar_mc.scaleX = (this.magicPoints / this.maxMagicPoints);
}
public function addToHitStreak(){
this.hitStreak++;
this.addToMagic(1);
if (this.hitStreak >= 3){
this.hud.hitStreak_mc.hitStreak_txt.text = this.hitStreak;
this.hud.hitStreak_mc.gotoAndPlay(2);
};
}
private function findAttackTarget(_arg1:MovieClip){
var _local2:uint;
_local2 = 0;
while (_local2 < attackTargets.length) {
if (attackTargets[_local2] == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public function addToSwingStreak(){
this.swingStreak++;
this.hud.swingStreak_txt.text = this.swingStreak;
}
public function addTarget(_arg1:MovieClip){
if (!findAttackTarget(_arg1)){
this.attackTargets.push(_arg1);
trace(("-----Target Added! --- " + _arg1));
trace(("-----Now in array: --- " + this.attackTargets));
} else {
trace("---Already a target of this name stored in the array!");
};
}
public function resetSwingStreak(){
this.swingStreak = 0;
}
public function resetBlockStreak(){
this.blockStreak = 0;
}
public function addToBlockStreak(){
this.blockStreak++;
this.hud.blockStreak_txt.text = this.blockStreak;
}
}
}//package
Section 48
//Projectile (Projectile)
package {
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Projectile extends MovieClip {
public var strikeZone_mc:MovieClip;
public var myPoint:Point;
public var spawnPoint_mc:MovieClip;
public var hitZone_mc:MovieClip;
public function Projectile(){
addFrameScript(0, frame1, 38, frame39, 77, frame78, 116, frame117, 154, frame155);
}
function frame155(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Ember, 20, "up", 0.8, myPoint.x, myPoint.y);
stop();
}
function frame78(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Ember, 20, "up", 0.8, myPoint.x, myPoint.y);
stop();
}
function frame1(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
stop();
}
function frame117(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Ember, 20, "up", 0.8, myPoint.x, myPoint.y);
stop();
}
function frame39(){
myPoint = new Point(spawnPoint_mc.x, spawnPoint_mc.y);
myPoint = localToGlobal(myPoint);
MovieClip(parent).makeSparks(Ember, 20, "up", 0.8, myPoint.x, myPoint.y);
stop();
}
}
}//package
Section 49
//Sword (Sword)
package {
import flash.display.*;
public dynamic class Sword extends MovieClip {
public function Sword(){
addFrameScript(0, frame1, 26, frame27, 41, frame42, 56, frame57, 71, frame72, 102, frame103, 115, frame116, 128, frame129, 135, frame136);
}
function frame72(){
gotoAndStop("idle");
}
function frame1(){
stop();
}
function frame103(){
gotoAndStop("idle");
}
function frame27(){
gotoAndStop("idle");
}
function frame116(){
stop();
}
function frame42(){
gotoAndStop("idle");
}
function frame129(){
stop();
}
function frame136(){
gotoAndStop("idle");
}
function frame57(){
gotoAndStop("idle");
}
}
}//package
Section 50
//Target (Target)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Target extends MovieClip {
private var statePercentage:Array;
private var stateClips:Array;
private var choicePercentage:Array;
public var throwsProjectile:Boolean;
private var numOfReacts:Number;
private var whichActionThrowsIt:Number;
private var numOfChoices:Number;
public var itemsThatCanHitTarget:Array;
public var targetTimer:Timer;
private var timerInterval:Number;
public var hitPoints:Number;
private var makesDecisions:Boolean;
private var blockable:Boolean;
private var maxHitPoints:Number;
private var reactPercentage:Array;
public var player:Player;
private var tempArray:Array;
public var projectile:Target;
private var tempArray2:Array;
public var targetMC:MovieClip;
public var attackPointFrames:Array;
public function Target(_arg1:Player, _arg2:MovieClip, _arg3:Number, _arg4:Boolean, _arg5:Boolean, _arg6:Array, _arg7:Array, _arg8:Array, _arg9:Number){
var _local10:uint;
var _local11:uint;
choicePercentage = new Array();
tempArray = new Array();
tempArray2 = new Array();
reactPercentage = new Array();
statePercentage = new Array();
stateClips = new Array();
itemsThatCanHitTarget = new Array();
super();
this.player = _arg1;
this.targetMC = _arg2;
this.hitPoints = _arg3;
this.blockable = _arg4;
this.makesDecisions = _arg5;
this.maxHitPoints = _arg3;
this.throwsProjectile = false;
this.choicePercentage = _arg6;
this.reactPercentage = _arg7;
this.numOfChoices = this.choicePercentage.length;
this.numOfReacts = this.reactPercentage.length;
this.itemsThatCanHitTarget = ["all"];
this.attackPointFrames = _arg8;
this.timerInterval = _arg9;
if (_arg9 > 0){
this.targetTimer = new Timer(_arg9);
this.targetTimer.addEventListener(TimerEvent.TIMER, this.targetChoice);
this.targetTimer.start();
};
_local10 = 0;
while (_local10 < this.choicePercentage.length) {
this.tempArray[_local10] = 0;
_local11 = 0;
while (_local11 <= _local10) {
this.tempArray[_local10] = (this.tempArray[_local10] + this.choicePercentage[_local11]);
_local11++;
};
_local10++;
};
_local10 = 0;
while (_local10 < this.reactPercentage.length) {
this.tempArray2[_local10] = 0;
_local11 = 0;
while (_local11 <= _local10) {
this.tempArray2[_local10] = (this.tempArray2[_local10] + this.reactPercentage[_local11]);
_local11++;
};
_local10++;
};
trace(((((((((((("new target created! --->" + this.targetMC) + " OPPONENT: ") + this.player) + " numOfChoices: ") + this.numOfChoices) + " BLOCKABLE: ") + this.blockable) + " numOfReacts: ") + this.numOfReacts) + " attackPointFrames: ") + this.attackPointFrames));
}
public function changeChoicePercentage(_arg1:Array){
this.choicePercentage = _arg1;
}
public function changeAttackPointFrames(_arg1:Array){
this.attackPointFrames = _arg1;
}
public function generateProjectile(){
this.projectile.reviveTarget();
this.projectile.targetMC.x = this.targetMC.spawnPoint_mc.x;
this.projectile.targetMC.y = this.targetMC.spawnPoint_mc.y;
this.projectile.rotation = this.targetMC.rotation;
}
public function makeTargetThrowProjectile(_arg1:Boolean, _arg2:Number, _arg3:Target){
this.throwsProjectile = _arg1;
this.whichActionThrowsIt = _arg2;
this.projectile = _arg3;
}
public function addState(_arg1:Array, _arg2:Array){
var _local3:uint;
this.stateClips = _arg1;
this.statePercentage = _arg2;
_local3 = 0;
while (_local3 < this.stateClips.length) {
this.stateClips[_local3].visible = false;
_local3++;
};
}
public function getTargetMC(){
trace(("GETTING TARGETMC: " + this.targetMC));
return (this.targetMC);
}
public function shutTimerDown(){
trace("-------------SHUTTING TIMER DOWN");
this.targetTimer.stop();
}
public function targetReact(){
var _local1:int;
var _local2:uint;
if (this.numOfReacts > 0){
_local1 = (Math.floor((Math.random() * 100)) + 1);
_local2 = 0;
while (_local2 < this.tempArray2.length) {
if (_local1 <= this.tempArray2[_local2]){
this.targetMC.gotoAndPlay(("react" + (_local2 + 1)));
if (_local2 == 0){
this.player.addToHitStreak();
this.damageTarget(1);
};
break;
};
_local2++;
};
};
}
public function targetChoice(_arg1:Event){
var _local2:int;
var _local3:uint;
trace(("----Target is choosing..." + this.targetMC.currentFrame));
if (this.numOfChoices > 0){
if (this.targetMC.currentFrame <= 2){
_local2 = (Math.floor((Math.random() * 100)) + 1);
_local3 = 0;
while (_local3 < this.tempArray.length) {
if (_local2 <= this.tempArray[_local3]){
this.targetMC.gotoAndPlay(("choice" + (_local3 + 1)));
if ((_local3 + 1) == this.whichActionThrowsIt){
this.generateProjectile();
};
break;
};
_local3++;
};
};
};
}
public function reviveTarget(){
this.targetMC.visible = true;
this.targetMC.hitZone_mc.visible = true;
this.targetMC.strikeZone_mc.visible = true;
this.hitPoints = this.maxHitPoints;
this.targetMC.gotoAndStop(1);
if (this.makesDecisions){
this.targetTimer.start();
};
}
public function changeReactPercentage(_arg1:Array){
this.reactPercentage = _arg1;
}
private function checkState(){
var _local1:*;
var _local2:uint;
_local1 = Math.round(((this.hitPoints / this.maxHitPoints) * 100));
_local2 = 0;
while (_local2 < this.statePercentage.length) {
if (_local1 < this.statePercentage[_local2]){
stateClips[_local2].x = this.targetMC.x;
stateClips[_local2].y = this.targetMC.y;
this.targetMC.visible = false;
this.targetMC = stateClips[_local2];
this.targetMC.visible = true;
};
_local2++;
};
}
public function makeTargetVulnerable(_arg1:Array){
this.itemsThatCanHitTarget = _arg1;
}
public function damageTarget(_arg1:Number){
this.hitPoints = (this.hitPoints - _arg1);
trace(("GOT HIM!!! Now: " + this.hitPoints));
if (this.hitPoints >= 1){
this.targetMC.gotoAndPlay("react1");
} else {
if (this.timerInterval > 0){
this.targetTimer.stop();
};
this.targetMC.hitZone_mc.visible = false;
this.targetMC.strikeZone_mc.visible = false;
this.targetMC.gotoAndPlay("death");
};
this.checkState();
}
}
}//package
Section 51
//TestButton (TestButton)
package {
import flash.display.*;
public dynamic class TestButton extends SimpleButton {
}
}//package
Section 52
//Thrower (Thrower)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Thrower extends MovieClip {
var xoffset:Number;
var endBlockRange:int;
var lift:Number;
var end_x:Number;
var end_y:Number;
var start_y:Number;
var scaleArray:Array;
var lateraloffset:Number;
var endTime:Number;
var yoffset:Number;
var scaleFactor:Number;
var sp:Sprite;
var pos_y:Number;
var elapsedTime:Number;
var startTime:Number;
var g:Graphics;
var scaling:Number;
var attackTargets:Array;
var perspective_scalefactor:Number;// = 0.998
var max_dist:Number;// = 500
var offsetDistance:Number;
var boardDist:Number;// = 400
var speedFactor:Number;
var pos_x:Number;
var startBlockRange:int;
var fall:Number;
var pos_z:Number;
var start_x:Number;
var speed:Number;
var player:Player;
var throwTargetMC:MovieClip;
var targetMC:MovieClip;
var attackPointFrames:Array;
public function Thrower(_arg1:Player, _arg2:MovieClip, _arg3:MovieClip, _arg4:Array){
var _local5:Number;
sp = new Sprite();
attackTargets = new Array();
perspective_scalefactor = 0.998;
max_dist = 500;
boardDist = 400;
scaleArray = new Array();
super();
this.player = _arg1;
this.targetMC = _arg2;
this.throwTargetMC = _arg3;
this.attackPointFrames = _arg4;
this.startBlockRange = startBlockRange;
this.endBlockRange = endBlockRange;
this.perspective_scalefactor = 0.998;
this.scaling = 100;
this.max_dist = 500;
this.fall = 4;
this.pos_z = 0;
trace(((("TARGET MC: " + this.targetMC) + " THROW TARGET: ") + this.throwTargetMC));
this.targetMC.addEventListener(Event.ENTER_FRAME, this.aim);
this.targetMC.addEventListener(MouseEvent.MOUSE_DOWN, this.shoot_click);
this.targetMC.addEventListener(MouseEvent.MOUSE_UP, this.shoot_release);
this.throwTargetMC.addEventListener(Event.ENTER_FRAME, this.checkCollision);
_local5 = 0;
while (_local5 <= max_dist) {
this.scaling = (this.scaling * this.perspective_scalefactor);
this.scaleArray.push(this.scaling);
_local5++;
};
}
public function getThrowTargetMC(){
return (this.throwTargetMC);
}
private function aim(_arg1:Event){
this.targetMC.x = mouseX;
this.targetMC.y = mouseY;
}
public function getTargetMC(){
return (this.targetMC);
}
public function shoot_click(_arg1:MouseEvent){
this.startTime = getTimer();
this.start_x = mouseX;
this.start_y = mouseY;
}
private function checkWeaponRange(_arg1:String):Boolean{
var _local2:uint;
switch (_arg1){
case "attack":
_local2 = 0;
while (_local2 < attackPointFrames.length) {
if (this.throwTargetMC.currentFrame == attackPointFrames[_local2]){
return (true);
};
_local2++;
};
return (false);
case "block":
if ((((this.targetMC.currentFrame < startBlockRange)) || ((this.targetMC.currentFrame > endBlockRange)))){
return (false);
};
return (true);
default:
return (false);
};
}
public function checkCollision(_arg1:Event){
var _local2:uint;
while (_local2 < player.attackTargets.length) {
if (this.throwTargetMC.hitTestObject(player.attackTargets[_local2].targetMC.hitZone_mc)){
if (this.checkWeaponRange("attack")){
if (player.attackTargets[_local2].targetMC.currentFrame < 3){
player.attackTargets[_local2].damageTarget(2);
};
};
};
_local2++;
};
}
public function fly(_arg1:Event){
this.pos_x = (this.pos_x + this.lateraloffset);
this.pos_y = (this.pos_y - this.lift);
this.pos_z = (this.pos_z + this.speed);
this.scaleFactor = this.scaleArray[Math.round(this.pos_z)];
this.throwTargetMC.visible = true;
this.throwTargetMC.scaleX = (this.scaleFactor / 100);
this.throwTargetMC.scaleY = (this.scaleFactor / 100);
this.throwTargetMC.x = this.pos_x;
this.throwTargetMC.y = this.pos_y;
this.lift = (this.lift - this.fall);
this.speed = (this.speed * 0.96);
if ((((this.pos_z >= this.boardDist)) || ((this.pos_y >= 2000)))){
this.throwTargetMC.gotoAndPlay("hit");
this.targetMC.removeEventListener(Event.ENTER_FRAME, this.fly);
this.targetMC.visible = true;
this.targetMC.addEventListener(Event.ENTER_FRAME, this.aim);
};
}
public function shoot_release(_arg1:MouseEvent){
this.endTime = getTimer();
this.end_x = mouseX;
this.end_y = mouseY;
this.xoffset = (Math.abs((this.start_x - this.end_x)) + 1);
this.yoffset = (Math.abs((this.start_y - this.end_y)) + 1);
this.offsetDistance = Math.sqrt((Math.pow(this.xoffset, 2) + Math.pow(this.yoffset, 2)));
this.elapsedTime = (this.endTime - this.startTime);
this.speedFactor = (((this.offsetDistance / this.elapsedTime) * 10) - 10);
this.speed = (50 + this.speedFactor);
this.lift = (this.speed * 0.8);
this.lateraloffset = ((this.start_x - this.end_x) * 0.15);
this.pos_x = this.end_x;
this.pos_y = this.end_y;
this.pos_z = 0;
if (this.start_y > this.end_y){
this.lateraloffset = (this.lateraloffset * -1);
};
this.targetMC.addEventListener(Event.ENTER_FRAME, this.fly);
this.targetMC.visible = false;
this.throwTargetMC.gotoAndStop(1);
}
trace("new thrower!!");
}
}//package
Section 53
//Weapon (Weapon)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class Weapon extends MovieClip {
var endBlockRange:int;
var chargeable:Boolean;
var chargeAmount:Number;
var endTime:Number;
var droppedMC:MovieClip;
var startTime:Number;
var weaponGravity:GravityObject;
var startBlockRange:int;
var player:Player;
var targetMC:MovieClip;
var attackPointFrames:Array;
var dragOffset:Point;
public function Weapon(_arg1:Player, _arg2:MovieClip, _arg3:Array, _arg4:Boolean, _arg5:int, _arg6:int){
this.player = _arg1;
this.targetMC = _arg2;
this.dragOffset = new Point(45, 110);
this.attackPointFrames = _arg3;
this.chargeable = _arg4;
this.startBlockRange = _arg5;
this.endBlockRange = _arg6;
this.chargeAmount = 800;
this.addEventListener(Event.ENTER_FRAME, this.checkCollision);
this.targetMC.addEventListener(Event.ENTER_FRAME, this.dragWeapon);
this.targetMC.addEventListener(MouseEvent.MOUSE_DOWN, this.chargeWeapon);
this.targetMC.addEventListener(MouseEvent.MOUSE_UP, this.swingWeapon);
this.targetMC.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.blockWeapon);
this.targetMC.stage.addEventListener(KeyboardEvent.KEY_UP, this.unblockWeapon);
}
public function chargeWeapon(_arg1:MouseEvent){
this.startTime = getTimer();
}
public function blockWeapon(_arg1:KeyboardEvent){
if (this.player.playerCanMove){
if (_arg1.keyCode == 32){
if (!checkWeaponRange("block")){
this.targetMC.gotoAndPlay("block");
};
};
};
}
public function checkCollision(_arg1:Event){
var _local2:uint;
var _local3:uint;
if (player.attackTargets.length > 0){
while (_local2 < player.attackTargets.length) {
if (this.targetMC.hitTestObject(this.player.attackTargets[_local2].targetMC.hitZone_mc)){
if (this.checkWeaponRange("attack")){
if (player.attackTargets[_local2].targetMC.currentFrame < 3){
player.attackTargets[_local2].targetReact();
};
};
};
_local3 = 0;
while (_local3 < player.attackTargets[_local2].attackPointFrames.length) {
if (player.attackTargets[_local2].targetMC.currentFrame == player.attackTargets[_local2].attackPointFrames[_local3]){
if (((this.targetMC.hitTestObject(player.attackTargets[_local2].targetMC.strikeZone_mc)) && (!((player.attackTargets[_local2].targetMC.currentLabels[0].name == "unblockable"))))){
trace(("IS THIS TARGET UNBLOCKABLE? ...." + player.attackTargets[_local2].targetMC.currentLabels[0].name));
if (this.checkWeaponRange("block")){
this.targetMC.gotoAndPlay("blockAttack");
this.player.addToBlockStreak();
} else {
if (player.hitPoints > 0){
player.damagePlayer(1);
};
};
} else {
if (player.hitPoints > 0){
player.damagePlayer(1);
};
};
};
_local3++;
};
_local2++;
};
} else {
trace("---------attackTargets is empty!");
};
}
public function dropWeapon(){
if (this.targetMC.visible){
this.targetMC.visible = false;
this.droppedMC = new DropWeapon();
this.targetMC.stage.addChild(droppedMC);
droppedMC.x = this.targetMC.x;
droppedMC.y = this.targetMC.y;
this.weaponGravity = new GravityObject(droppedMC, this.targetMC.x, this.targetMC.y, 3.8, 0.5, 0.9, 0);
this.droppedMC.addEventListener(MouseEvent.MOUSE_UP, pickupWeapon);
};
}
private function dragWeapon(_arg1:Event){
if (this.player.playerCanMove){
this.targetMC.x = (mouseX - this.dragOffset.x);
this.targetMC.y = (mouseY - this.dragOffset.y);
};
}
public function getTargetMC(){
return (this.targetMC);
}
private function checkWeaponRange(_arg1:String):Boolean{
var _local2:uint;
switch (_arg1){
case "attack":
_local2 = 0;
while (_local2 < attackPointFrames.length) {
if (this.targetMC.currentFrame == attackPointFrames[_local2]){
return (true);
};
_local2++;
};
return (false);
case "block":
if ((((this.targetMC.currentFrame < startBlockRange)) || ((this.targetMC.currentFrame > endBlockRange)))){
return (false);
};
return (true);
default:
return (false);
};
}
public function swingWeapon(_arg1:MouseEvent){
var _local2:int;
if (this.player.playerCanMove){
this.endTime = getTimer();
_local2 = Math.ceil((Math.random() * 4));
if (((((this.endTime - this.startTime) < this.chargeAmount)) && (this.chargeable))){
if (this.targetMC.currentFrame < 30){
switch (_local2){
case 1:
this.targetMC.gotoAndPlay("attack");
break;
case 2:
this.targetMC.gotoAndPlay("attack2");
break;
case 3:
this.targetMC.gotoAndPlay("attack3");
break;
case 4:
this.targetMC.gotoAndPlay("attack4");
break;
default:
this.targetMC.gotoAndPlay("attack");
};
this.player.addToSwingStreak();
};
} else {
this.targetMC.gotoAndPlay("special");
};
};
}
public function swingWeapon2(_arg1:MouseEvent){
trace("------DOUBLE CLICK!!");
}
public function unblockWeapon(_arg1:KeyboardEvent){
if (this.player.playerCanMove){
if (_arg1.keyCode == 32){
this.targetMC.gotoAndPlay("unblock");
};
};
}
public function pickupWeapon(_arg1:Event){
this.targetMC.stage.removeChild(droppedMC);
this.weaponGravity = null;
this.targetMC.visible = true;
}
}
}//package