Section 1
//FoofaApplication (FoofaCore.FoofaApplication)
package FoofaCore {
import flash.utils.*;
public class FoofaApplication extends FSM {
public function FoofaApplication():void{
}
public function GetCPULag():int{
var _local1:Timer;
var _local2:Number;
_local1 = new Timer(1);
_local2 = 0;
_local1.start();
while (Number(_local2) < 5000) {
_local2 = (Number(_local2) + 1);
};
_local1.stop();
return (_local1.currentCount);
}
}
}//package FoofaCore
Section 2
//FrameRateCounter (FoofaCore.FrameRateCounter)
package FoofaCore {
import flash.utils.*;
public class FrameRateCounter {
private var _frameCount:uint;
private var _paused:Boolean;
private var _initialized:Boolean;
private var _totalPauseTime:int;
private var _tempTime:int;
private var _lastTime:int;
private var _deltaTime:int;
private var _totalRunningTime:int;
public function FrameRateCounter(){
_paused = false;
_initialized = false;
_frameCount = 0;
_totalRunningTime = 0;
_deltaTime = 0;
_tempTime = 0;
_lastTime = 0;
}
public function get averageFps():Number{
return (((1000 * _frameCount) / _totalRunningTime));
}
public function Play():void{
if (!_initialized){
_initialized = true;
_totalPauseTime = getTimer();
_lastTime = _totalPauseTime;
};
_paused = false;
}
public function OnFrameStep():void{
_tempTime = getTimer();
_deltaTime = (_tempTime - _lastTime);
if (!_paused){
_frameCount++;
_totalRunningTime = (_tempTime - _totalPauseTime);
} else {
_totalPauseTime = (_tempTime - _totalRunningTime);
};
_lastTime = _tempTime;
}
public function get fps():Number{
return ((1000 / _deltaTime));
}
public function get paused():Boolean{
return (_paused);
}
public function Stop():void{
_paused = true;
}
}
}//package FoofaCore
Section 3
//FSM (FoofaCore.FSM)
package FoofaCore {
public class FSM {
private var _skipStep:Boolean;
private var _initialized:Boolean;
private var _currentState:FSM_State;
public function FSM(){
_initialized = false;
_skipStep = false;
}
public function Loop():void{
if (!_skipStep){
_currentState.Step();
};
}
public function ChangeState(_arg1:FSM_State):void{
if (_initialized){
_currentState.End();
};
_initialized = true;
_currentState = _arg1;
_currentState.Init();
}
public function get currentState():FSM_State{
return (_currentState);
}
}
}//package FoofaCore
Section 4
//FSM_State (FoofaCore.FSM_State)
package FoofaCore {
public interface FSM_State {
function Init():void;
function End():void;
function Step():void;
}
}//package FoofaCore
Section 5
//Key (FoofaCore.Key)
package FoofaCore {
import flash.display.*;
import flash.events.*;
public class Key {
private static var initialized:Boolean = false;
private static var keysDown:Object = new Object();
public static function initialize(_arg1:Stage):void{
keysDown = new Object();
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeys);
initialized = true;
};
}
private static function clearKeys(_arg1:Event):void{
keysDown = new Object();
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean((_arg1 in keysDown)));
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
private static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
}
}//package FoofaCore
Section 6
//AABB (FoofaGeom.AABB)
package FoofaGeom {
public class AABB {
public var yMax:Number;
public var xMax:Number;
public var yMin:Number;
public var xMin:Number;
public function AABB(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.xMin = _arg1;
this.xMax = _arg2;
this.yMin = _arg3;
this.yMax = _arg4;
}
public function toString():String{
return ([xMin, xMax, yMin, yMax].toString());
}
public function intersect(_arg1:AABB):Boolean{
if ((((xMin > _arg1.xMax)) || ((xMax < _arg1.xMin)))){
return (false);
};
if ((((yMin > _arg1.yMax)) || ((yMax < _arg1.yMin)))){
return (false);
};
return (true);
}
}
}//package FoofaGeom
Section 7
//ConvexPoly (FoofaGeom.ConvexPoly)
package FoofaGeom {
import flash.display.*;
public class ConvexPoly {
protected var aabb:AABB;
public var particles:Array;
public function ConvexPoly(_arg1:Array){
this.particles = _arg1;
computeAABB();
}
public function draw(_arg1:Graphics):void{
var _local2:int;
var _local3:Particle;
var _local4:Particle;
_local3 = particles[0];
_arg1.moveTo(_local3.x, _local3.y);
_local2 = 1;
while (_local2 < particles.length) {
_local4 = Particle(particles[_local2]);
_arg1.lineTo(_local4.x, _local4.y);
_local2++;
};
_arg1.lineTo(_local3.x, _local3.y);
}
public function getAABB():AABB{
return (aabb);
}
private function computeAABB():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Particle;
_local1 = Number.POSITIVE_INFINITY;
_local2 = Number.POSITIVE_INFINITY;
_local3 = Number.NEGATIVE_INFINITY;
_local4 = Number.NEGATIVE_INFINITY;
for each (_local5 in particles) {
if (_local5.x < _local1){
_local1 = _local5.x;
};
if (_local5.x > _local3){
_local3 = _local5.x;
};
if (_local5.y < _local2){
_local2 = _local5.y;
};
if (_local5.y > _local4){
_local4 = _local5.y;
};
};
aabb = new AABB(_local1, _local3, _local2, _local4);
}
}
}//package FoofaGeom
Section 8
//Particle (FoofaGeom.Particle)
package FoofaGeom {
import flash.geom.*;
public class Particle {
public var vx:Number;
public var vy:Number;
var ty:Number;
var tx:Number;
public var x:Number;
public var y:Number;
public function Particle(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
vx = (vy = 0);
}
public function integrate(_arg1:Number):void{
x = (tx + (vx * _arg1));
y = (ty + (vy * _arg1));
}
public function update():void{
tx = x;
ty = y;
}
public function move():void{
tx = x;
ty = y;
x = (x + vx);
y = (y + vy);
}
public function toPoint():Point{
return (new Point(x, y));
}
public function getVector(_arg1:Particle):Vector2{
return (new Vector2((x - _arg1.x), (y - _arg1.y)));
}
}
}//package FoofaGeom
Section 9
//Vector2 (FoofaGeom.Vector2)
package FoofaGeom {
import flash.geom.*;
public class Vector2 extends Point {
public function Vector2(_arg1:Number=0, _arg2:Number=0){
super(_arg1, _arg2);
}
public function CloneVector():Vector2{
return (new Vector2(x, y));
}
public function get rightNormal():Vector2{
var _local1:Vector2;
_local1 = new Vector2(-(y), x);
return (_local1);
}
public function get leftNormal():Vector2{
var _local1:Vector2;
_local1 = new Vector2(y, -(x));
return (_local1);
}
public function Copy(_arg1:Vector2):void{
x = _arg1.x;
y = _arg1.y;
}
public function get squaredLength():Number{
return (((x * x) + (y * y)));
}
}
}//package FoofaGeom
Section 10
//Camera2d (FoofaView.Camera2d)
package FoofaView {
import flash.geom.*;
public interface Camera2d {
function Update():void;
function get centerPosition():Point;
}
}//package FoofaView
Section 11
//Camera2d_FollowTargetInBounds (FoofaView.Camera2d_FollowTargetInBounds)
package FoofaView {
import flash.display.*;
import flash.geom.*;
public class Camera2d_FollowTargetInBounds implements Camera2d {
private var shakingIntencity:Number;
private var shaking:Boolean;
private var tempX:Number;
private var tempY:Number;
private var shakingCount:Number;
protected var target:Point;
private var shakingForce:Number;
private var scrollX:Number;
private var scrollY:Number;
protected var worldObject:DisplayObject;
protected var screenHeight:int;
private var bounds:Rectangle;
private var shakingDuration:Number;
protected var screenWidth:int;
public function Camera2d_FollowTargetInBounds(_arg1:DisplayObject, _arg2:Point, _arg3:int, _arg4:int, _arg5:Rectangle):void{
target = _arg2;
worldObject = _arg1;
screenWidth = _arg3;
screenHeight = _arg4;
bounds = _arg5;
scrollX = 0;
scrollY = 0;
shaking = false;
SetBounds(bounds.left, bounds.right, bounds.top, bounds.bottom);
}
public function get rightBound():Number{
return (bounds.right);
}
public function set rightBound(_arg1:Number):void{
bounds.right = _arg1;
}
public function set topBound(_arg1:Number):void{
bounds.top = _arg1;
}
public function get bottomBound():Number{
return (bounds.bottom);
}
public function ShakingEffect(_arg1:Number, _arg2:Number, _arg3:Number){
shaking = true;
shakingCount = -1;
shakingDuration = _arg1;
shakingForce = _arg2;
shakingIntencity = _arg3;
}
public function SetBounds(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
bounds.left = _arg1;
bounds.right = _arg2;
bounds.top = _arg3;
bounds.bottom = _arg4;
}
public function set bottomBound(_arg1:Number):void{
bounds.bottom = _arg1;
}
public function get centerPosition():Point{
return (target);
}
public function get topBound():Number{
return (bounds.top);
}
public function Update():void{
tempX = (-(target.x) + (screenWidth / 2));
tempY = (-(target.y) + (screenHeight / 2));
if ((((-(tempX) > bounds.left)) && ((-(tempX) < (bounds.right - screenWidth))))){
scrollX = tempX;
} else {
if (-(tempX) >= (bounds.right - screenWidth)){
scrollX = -((bounds.right - screenWidth));
} else {
if (-(tempX) <= bounds.left){
scrollX = -(bounds.left);
};
};
};
if ((((-(tempY) > bounds.top)) && ((-(tempY) < (bounds.bottom - screenHeight))))){
scrollY = tempY;
} else {
if (-(tempY) >= (bounds.bottom - screenHeight)){
scrollY = -((bounds.bottom - screenHeight));
} else {
if (-(tempX) <= bounds.top){
scrollY = -(bounds.top);
};
};
};
if (shaking){
if ((shakingCount % (shakingIntencity * 2)) == 0){
scrollX = (scrollX + shakingForce);
scrollY = (scrollY + shakingForce);
} else {
if ((shakingCount % (shakingIntencity * 2)) == shakingIntencity){
scrollX = (scrollX - shakingForce);
scrollY = (scrollY - shakingForce);
};
};
shakingCount++;
if (shakingCount > shakingDuration){
shaking = false;
};
};
worldObject.scrollRect = new Rectangle(-(scrollX), -(scrollY), screenWidth, screenHeight);
}
public function set centerPosition(_arg1:Point):void{
target = _arg1;
}
public function set leftBound(_arg1:Number):void{
bounds.left = _arg1;
}
public function get leftBound():Number{
return (bounds.left);
}
}
}//package FoofaView
Section 12
//barriera_118 (OmegaWarrior_fla.barriera_118)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class barriera_118 extends MovieClip {
public function barriera_118(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(5);
}
}
}//package OmegaWarrior_fla
Section 13
//CMG_Logo_Animation_1 (OmegaWarrior_fla.CMG_Logo_Animation_1)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class CMG_Logo_Animation_1 extends MovieClip {
public var mc_preloader:MovieClip;
public var cgm_logo:MovieClip;
public function CMG_Logo_Animation_1(){
addFrameScript(0, frame1, 80, frame81);
}
function frame81(){
stop();
}
function frame1(){
}
}
}//package OmegaWarrior_fla
Section 14
//combo_204 (OmegaWarrior_fla.combo_204)
package OmegaWarrior_fla {
import flash.display.*;
import flash.text.*;
public dynamic class combo_204 extends MovieClip {
public var comboText:TextField;
}
}//package OmegaWarrior_fla
Section 15
//etromIntro_43 (OmegaWarrior_fla.etromIntro_43)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class etromIntro_43 extends MovieClip {
public function etromIntro_43(){
addFrameScript(45, frame46);
}
function frame46(){
gotoAndPlay(31);
}
}
}//package OmegaWarrior_fla
Section 16
//gamewin_214 (OmegaWarrior_fla.gamewin_214)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class gamewin_214 extends MovieClip {
public function gamewin_214(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package OmegaWarrior_fla
Section 17
//INTROFOOFASTUDIOS_221 (OmegaWarrior_fla.INTROFOOFASTUDIOS_221)
package OmegaWarrior_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class INTROFOOFASTUDIOS_221 extends MovieClip {
public var mcBtn_foofaz:pulsanteschermataintro;
public var mcBtn_xploredz:pulsanteschermataintro;
public var btn_xplored:DisplayObject;
public var btn_foofa:DisplayObject;
public var mcXploredBtn:SimpleButton;
public var btn_pm:DisplayObject;
public var mcBtn_pm:pulsanteschermataintro;
public function INTROFOOFASTUDIOS_221(){
addFrameScript(0, frame1, 106, frame107, 142, frame143);
}
function frame143(){
}
public function onClickXplored(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.xplored.com/play/"), "_blank");
}
function frame107(){
}
function frame1(){
btn_xplored = getChildByName("mcBtn_xploredz");
btn_foofa = getChildByName("mcBtn_foofaz");
btn_pm = getChildByName("mcBtn_pm");
btn_foofa.addEventListener(MouseEvent.MOUSE_UP, onClickFoofa);
btn_xplored.addEventListener(MouseEvent.MOUSE_UP, onClickXplored);
btn_pm.addEventListener(MouseEvent.MOUSE_UP, onClickPM);
}
public function onClickFoofa(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.foofa.net"), "_blank");
}
public function onClickPM(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.pmstudios.it"), "_blank");
}
}
}//package OmegaWarrior_fla
Section 18
//istruzioni_38 (OmegaWarrior_fla.istruzioni_38)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class istruzioni_38 extends MovieClip {
public var intro2:MovieClip;
}
}//package OmegaWarrior_fla
Section 19
//lanciavita_201 (OmegaWarrior_fla.lanciavita_201)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class lanciavita_201 extends MovieClip {
public var maskLife:MovieClip;
}
}//package OmegaWarrior_fla
Section 20
//load_barMC_12 (OmegaWarrior_fla.load_barMC_12)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class load_barMC_12 extends MovieClip {
public var bar:MovieClip;
}
}//package OmegaWarrior_fla
Section 21
//MainTimeline (OmegaWarrior_fla.MainTimeline)
package OmegaWarrior_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
public dynamic class MainTimeline extends MovieClip {
public var foointro:MovieClip;
public var g_UrlLoader:URLLoader;
public var txt:TextField;
public var cgm_logoclip:MovieClip;
public var clip_foointro:MovieClip;
public var cgmClip:MovieClip;
public var preloader_bar:MovieClip;
public var barz:MovieClip;
public var perc:Number;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24);
}
public function goToUrl(_arg1:String):void{
var success:Boolean;
var url = _arg1;
success = false;
if (((ExternalInterface.available) && (!((Capabilities.playerType == "External"))))){
try {
ExternalInterface.call("window.open", url, "win", "");
success = true;
} catch(error:Error) {
} catch(error:SecurityError) {
};
};
if (success != true){
navigateToURL(new URLRequest(url), "_BLANK");
};
}
public function onClickOnPlay(_arg1:MouseEvent){
preloader_bar.removeEventListener(MouseEvent.MOUSE_UP, onClickOnPlay);
this.gotoAndPlay(2);
}
public function onRootLoaderInit(_arg1:Event):void{
cgm_logoclip = MovieClip(MovieClip(this.getChildByName("cgmClip")).getChildByName("cgm_logo"));
preloader_bar = MovieClip(MovieClip(this.getChildByName("cgmClip")).getChildByName("mc_preloader"));
barz = MovieClip(MovieClip(preloader_bar.getChildByName("mc_loadingBar")).getChildByName("bar"));
cgm_logoclip.addEventListener(MouseEvent.MOUSE_UP, onClickCGM);
cgm_logoclip.useHandCursor = true;
cgm_logoclip.buttonMode = true;
}
public function onRootLoaderComplete(_arg1:Event):void{
if (preloader_bar.currentFrame != 2){
preloader_bar.gotoAndStop(2);
};
}
public function onRootLoaderProgress(_arg1:ProgressEvent):void{
perc = (_arg1.bytesLoaded / _arg1.bytesTotal);
barz.scaleX = perc;
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
preloader_bar.gotoAndStop(2);
this.removeEventListener("enterFrame", onEnterFrame);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onRootLoaderProgress);
preloader_bar.addEventListener(MouseEvent.MOUSE_UP, onClickOnPlay);
};
}
function frame10(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame14(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame18(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame12(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame6(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame1(){
this.stage.frameRate = 24;
this.loaderInfo.addEventListener(Event.INIT, onRootLoaderInit);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onRootLoaderProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onRootLoaderComplete);
this.addEventListener("enterFrame", onEnterFrame);
stop();
g_UrlLoader = null;
}
function frame3(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame4(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame5(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame9(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame13(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame16(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame8(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame21(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame2(){
while (this.numChildren > 0) {
this.removeChildAt((this.numChildren - 1));
};
gotoAndPlay((currentFrame + 1));
}
function frame15(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame23(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame7(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame20(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame17(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame22(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame11(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
function frame24(){
foointro = MovieClip(this.getChildByName("clip_foointro"));
foointro.addEventListener(Event.ENTER_FRAME, OnEnterFrame3);
stop();
}
function frame19(){
SoundMixer.stopAll();
gotoAndPlay((currentFrame + 1));
}
public function onEnterFrame(_arg1:Event){
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
preloader_bar.gotoAndPlay(2);
this.removeEventListener("enterFrame", onEnterFrame);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onRootLoaderProgress);
preloader_bar.addEventListener(MouseEvent.MOUSE_UP, onClickOnPlay);
};
}
public function OnEnterFrame3(_arg1:Event):void{
if (foointro.currentFrame > 142){
gotoAndStop(39);
foointro.removeEventListener(Event.ENTER_FRAME, OnEnterFrame3);
};
}
public function onClickCGM(_arg1:MouseEvent){
goToUrl("http://crazymonkeygames.com");
}
}
}//package OmegaWarrior_fla
Section 22
//monkey_blink_18 (OmegaWarrior_fla.monkey_blink_18)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class monkey_blink_18 extends MovieClip {
public function monkey_blink_18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package OmegaWarrior_fla
Section 23
//MORTEBOSS_216 (OmegaWarrior_fla.MORTEBOSS_216)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class MORTEBOSS_216 extends MovieClip {
public function MORTEBOSS_216(){
addFrameScript(22, frame23);
}
function frame23(){
stop();
}
}
}//package OmegaWarrior_fla
Section 24
//musicbutton_63 (OmegaWarrior_fla.musicbutton_63)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class musicbutton_63 extends MovieClip {
public var musicOnBtn:SimpleButton;
public var musicOffBtn:SimpleButton;
public function musicbutton_63(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package OmegaWarrior_fla
Section 25
//ondatafrecce1_106 (OmegaWarrior_fla.ondatafrecce1_106)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class ondatafrecce1_106 extends MovieClip {
public function ondatafrecce1_106(){
addFrameScript(26, frame27);
}
function frame27(){
stop();
}
}
}//package OmegaWarrior_fla
Section 26
//ondatafrecce2_109 (OmegaWarrior_fla.ondatafrecce2_109)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class ondatafrecce2_109 extends MovieClip {
public function ondatafrecce2_109(){
addFrameScript(26, frame27);
}
function frame27(){
stop();
}
}
}//package OmegaWarrior_fla
Section 27
//Preloader_2 (OmegaWarrior_fla.Preloader_2)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class Preloader_2 extends MovieClip {
public var mc_loadingBar:MovieClip;
public function Preloader_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package OmegaWarrior_fla
Section 28
//soundfxbutton_58 (OmegaWarrior_fla.soundfxbutton_58)
package OmegaWarrior_fla {
import flash.display.*;
public dynamic class soundfxbutton_58 extends MovieClip {
public var soundFxOffBtn:SimpleButton;
public var soundFxOnBtn:SimpleButton;
public function soundfxbutton_58(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package OmegaWarrior_fla
Section 29
//BloodSplash (ThisGame.BloodSplash)
package ThisGame {
import flash.display.*;
public class BloodSplash extends MovieClip {
public var swapToGround:Boolean;
public function BloodSplash():void{
swapToGround = false;
}
}
}//package ThisGame
Section 30
//Bonus (ThisGame.Bonus)
package ThisGame {
import flash.display.*;
public class Bonus extends MovieClip {
public function Bonus():void{
}
public function Step(_arg1:State_InGame, _arg2:Player):void{
if ((((x - _arg2.pos.x) * (x - _arg2.pos.x)) + ((y - _arg2.pos.y) * (y - _arg2.pos.y))) < 200){
_arg2.health = (_arg2.health + 100);
if (_arg2.health > _arg2.maxHealth){
_arg2.health = _arg2.maxHealth;
};
_arg1.RemoveBonus(this);
};
}
}
}//package ThisGame
Section 31
//CollisionClip (ThisGame.CollisionClip)
package ThisGame {
import flash.display.*;
import flash.geom.*;
import FoofaGeom.*;
public class CollisionClip extends MovieClip {
public var collisionPoly:ConvexPoly;
public var toDispose:Boolean;
public function CollisionClip():void{
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Point;
super();
toDispose = false;
_local1 = new Point(MovieClip(this.getChildByName("p1")).x, MovieClip(this.getChildByName("p1")).y);
_local2 = new Point(MovieClip(this.getChildByName("p2")).x, MovieClip(this.getChildByName("p2")).y);
_local3 = new Point(MovieClip(this.getChildByName("p3")).x, MovieClip(this.getChildByName("p3")).y);
_local4 = new Point(MovieClip(this.getChildByName("p4")).x, MovieClip(this.getChildByName("p4")).y);
_local1 = localToGlobal(_local1);
_local2 = localToGlobal(_local2);
_local3 = localToGlobal(_local3);
_local4 = localToGlobal(_local4);
_local1.x = (_local1.x - this.parent.x);
_local1.y = (_local1.y - this.parent.y);
_local2.x = (_local2.x - this.parent.x);
_local2.y = (_local2.y - this.parent.y);
_local3.x = (_local3.x - this.parent.x);
_local3.y = (_local3.y - this.parent.y);
_local4.x = (_local4.x - this.parent.x);
_local4.y = (_local4.y - this.parent.y);
collisionPoly = new ConvexPoly(new Array(new Particle(_local1.x, _local1.y), new Particle(_local2.x, _local2.y), new Particle(_local3.x, _local3.y), new Particle(_local4.x, _local4.y)));
}
public function Step(_arg1:State_InGame):void{
}
}
}//package ThisGame
Section 32
//Main_Application (ThisGame.Main_Application)
package ThisGame {
import flash.events.*;
import FoofaCore.*;
import flash.media.*;
public class Main_Application extends FoofaApplication {
public var maxLevel:Number;
public var bridge:Sound;
public var thisLevel:Number;
public var menuMusic:Sound;
public var sound:Boolean;
public var gameMusic:Sound;
public var bridgeMusic:Sound;
public var musicVolume;
public var points:Number;
public var music:Boolean;
public var musicChannel:SoundChannel;
public var nextMusic:Sound;
public function Main_Application():void{
points = 0;
thisLevel = 2;
maxLevel = 3;
music = true;
sound = true;
musicVolume = 1;
}
private function soundCompleteHandler(_arg1:Event):void{
if (bridge == null){
musicChannel = nextMusic.play(0, 1, new SoundTransform(musicVolume));
} else {
musicChannel = bridge.play(0, 1, new SoundTransform(musicVolume));
bridge = null;
};
musicChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
public function InitMusics():void{
bridge = null;
menuMusic = new menu_music();
bridgeMusic = new bridge_music();
gameMusic = new game_music();
musicVolume = 1;
ChangeMusic(menuMusic);
}
public function ChangeMusic(_arg1:Sound):void{
bridge = null;
nextMusic = _arg1;
if (musicChannel != null){
musicChannel.stop();
};
musicChannel = _arg1.play(0, 1, new SoundTransform(musicVolume));
musicChannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
}
}//package ThisGame
Section 33
//Player (ThisGame.Player)
package ThisGame {
import flash.display.*;
import flash.geom.*;
import FoofaCore.*;
import FoofaGeom.*;
import flash.media.*;
public class Player extends MovieClip {
private const speed:Number = 50;
protected const ferita1:Number = 320;
protected const ferita2:Number = 320;
public const parata_frecce:Number = 77;
protected const scudata_semplice:Number = 111;
protected const lanciata_in_corsa:Number = 310;
protected const run:Number = 45;
protected const scudata_rotante:Number = 147;
protected const scudata_combo_2:Number = 130;
protected const scudata_combo_3:Number = 147;
public const maxHealth:Number = 200;
private const maxVelWalk:Number = 6;
private const maxVelAttack:Number = 0.2;
private const terrainFriction:Number = 0.4;
protected const lanciata_semplice:Number = 72;
protected const scudo:Number = 373;
protected const morte:Number = 328;
protected const scudata_in_corsa:Number = 310;
protected const walk:Number = 21;
protected const stand:Number = 1;
protected const scudata_back:Number = 147;
private const maxVelRunning:Number = 10;
protected const lanciata_combo_2:Number = 107;
protected const lanciata_combo_3:Number = 77;
public var canSwapMove:Boolean;
private var leftPressed:Number;
public var weapon:MovieClip;
public var comboCount:Number;
public var snd_scudata_in_corsa_impatto:Sound;
private var lastTimeKeyReleased:Number;
private var last1:Number;
private var last2:Number;
private var last3:Number;
public var pos:Vector2;
private var rightPressed:Number;
public var health:Number;
private var last4:Number;
private var velx:Number;
private var vely:Number;
public var hitArray:Array;
public var snd_carne_1:Sound;
public var snd_carne_3:Sound;
public var snd_carne_2:Sound;
public var snd_carne_4:Sound;
public var snd_lanciata_1:Sound;
public var snd_lanciata_3:Sound;
public var snd_colpo_sordo_1:Sound;
public var snd_lanciata_2:Sound;
private var count:Number;
public var lastHit:Number;
public var canArrowCover:Boolean;
public var snd_lanciata_in_corsa:Sound;
public var dying:Boolean;
private var fowardKey:Number;
private var shooting:Boolean;
public var colliderClip:DisplayObject;
private var backwardKey:Number;
private var keyBuffer:Array;
public var lastMove:Number;
private var dirx:Number;
protected var nextMove:Number;
private var maxVel:Number;
public var hit:Boolean;
public var weaponClip:DisplayObject;
private var diry:Number;
private var lastTimeKeyPressed:Number;
public var lastHitBool:Boolean;
private var lastTimeShieldKeyPressed:Number;
public var scudoPremuto:Boolean;
public var snd_lanciata_in_corsa_impatto:Sound;
private var gameState:State_InGame;
public var snd_scudata_in_corsa:Sound;
public var snd_calcio:Sound;
private var charDirX:Number;
public var died:Boolean;
public var snd_scudata_3:Sound;
public var snd_scudata_2:Sound;
public var collider:MovieClip;
public var snd_scudata_1:Sound;
public var snd_scudata_rotante:Sound;
public function Player():void{
canSwapMove = true;
scudoPremuto = false;
fowardKey = State_InGame.KEY_RIGHT;
backwardKey = State_InGame.KEY_DOWN;
keyBuffer = new Array(-1, -1, -1, -1);
last1 = -1;
last2 = -1;
last3 = -1;
last4 = -1;
lastTimeShieldKeyPressed = 0;
lastTimeKeyPressed = 0;
lastTimeKeyReleased = 0;
shooting = false;
leftPressed = 0;
rightPressed = 0;
charDirX = 1;
nextMove = stand;
lastMove = stand;
pos = new Vector2(x, y);
maxVel = maxVelWalk;
lastHit = 0;
canArrowCover = false;
scaleY = 0.812;
hitArray = new Array();
comboCount = 0;
health = maxHealth;
died = false;
dying = false;
snd_lanciata_1 = new arma_swish_1();
snd_lanciata_2 = new arma_swish_2();
snd_lanciata_3 = new arma_swish_4();
snd_scudata_1 = new scudo_swish_1();
snd_scudata_2 = new scudo_swish_2();
snd_scudata_3 = new scudo_swish_3();
snd_calcio = new arma_swish_2();
snd_scudata_rotante = new arma_swish_4();
snd_scudata_in_corsa = new scudo_swish_2();
snd_lanciata_in_corsa = new arma_swish_1();
snd_carne_1 = new carne_1();
snd_carne_2 = new carne_2();
snd_carne_3 = new carne_3();
snd_carne_4 = new carne_4();
snd_scudata_in_corsa_impatto = new scudata_corsa_impatto();
snd_lanciata_in_corsa_impatto = new lanciata_corsa_impatto();
snd_colpo_sordo_1 = new colpo_sordo_1();
count = 0;
}
public function OnKeyPressed(_arg1:State_InGame, _arg2:Number){
lastTimeKeyPressed = _arg1._time;
if (_arg2 == State_InGame.shieldKey){
lastTimeShieldKeyPressed = lastTimeKeyPressed;
};
keyBuffer.push(_arg2);
}
private function ClearHit():void{
hit = 0;
while (hitArray.length > 0) {
hitArray.pop();
};
}
public function GetDamage(_arg1:State_InGame):Number{
count++;
if (lastMove == scudata_in_corsa){
_arg1.PlaySound(snd_scudata_in_corsa_impatto);
} else {
if (lastMove == scudata_in_corsa){
_arg1.PlaySound(snd_scudata_in_corsa_impatto);
} else {
switch ((count % 4)){
case 0:
_arg1.PlaySound(snd_carne_1);
break;
case 1:
_arg1.PlaySound(snd_carne_2);
break;
case 2:
_arg1.PlaySound(snd_carne_3);
break;
case 3:
_arg1.PlaySound(snd_carne_4);
break;
};
};
};
switch (lastMove){
default:
return (2);
};
}
function UpdateCharacter(_arg1:State_InGame):void{
var _local2:Number;
var _local3:Number;
if (((dying) || (died))){
return;
};
_local2 = terrainFriction;
_local3 = speed;
if ((((lastMove == scudata_in_corsa)) || ((lastMove == lanciata_in_corsa)))){
_local3 = maxVelRunning;
};
if ((((((lastMove == run)) || ((lastMove == scudata_in_corsa)))) || ((lastMove == lanciata_in_corsa)))){
maxVel = maxVelRunning;
} else {
if ((((lastMove == stand)) || ((lastMove == walk)))){
maxVel = maxVelWalk;
} else {
maxVel = maxVelAttack;
};
};
velx = (dirx * _local3);
if (velx < -(maxVel)){
velx = -(maxVel);
} else {
if (velx > maxVel){
velx = maxVel;
} else {
if (Math.abs(velx) < 0.05){
velx = 0;
};
};
};
vely = (diry * _local3);
if (vely < -(maxVel)){
vely = -(maxVel);
} else {
if (vely > maxVel){
vely = maxVel;
} else {
if (Math.abs(vely) < 0.05){
vely = 0;
};
};
};
if (((!((lastMove == scudata_in_corsa))) && (!((lastMove == lanciata_in_corsa))))){
pos.x = (pos.x + velx);
pos.y = (pos.y + (vely * 0.5));
} else {
if (lastMove == scudata_in_corsa){
pos.x = (pos.x + (charDirX * maxVelRunning));
} else {
if (lastMove == lanciata_in_corsa){
pos.x = (pos.x + (charDirX * maxVelWalk));
};
};
};
if (((((!((velx == 0))) || (!((vely == 0))))) && ((lastMove == stand)))){
lastMove = walk;
gotoAndPlay(walk);
};
if ((((((velx == 0)) && ((vely == 0)))) && ((((lastMove == walk)) || ((lastMove == run)))))){
lastMove = stand;
gotoAndPlay(stand);
};
if ((((((lastMove == stand)) || ((lastMove == walk)))) || ((lastMove == run)))){
if (charDirX > 0){
fowardKey = State_InGame.KEY_RIGHT;
backwardKey = State_InGame.KEY_LEFT;
scaleX = 0.812;
} else {
if (charDirX < 0){
fowardKey = State_InGame.KEY_LEFT;
backwardKey = State_InGame.KEY_RIGHT;
scaleX = -0.812;
};
};
};
lastHitBool = false;
if ((_arg1._time - lastHit) < 700){
lastHitBool = true;
};
if ((_arg1._time - lastHit) > 1500){
comboCount = 0;
};
if (canSwapMove == true){
if ((((((((canArrowCover == true)) && ((last1 == State_InGame.shieldKey)))) && ((last2 == State_InGame.KEY_DOWN)))) && ((last3 == State_InGame.KEY_DOWN)))){
ClearHit();
charDirX = 1;
fowardKey = State_InGame.KEY_RIGHT;
backwardKey = State_InGame.KEY_LEFT;
scaleX = 0.812;
canSwapMove = false;
nextMove = 0;
lastMove = parata_frecce;
gotoAndPlay(parata_frecce);
} else {
if ((((lastMove == run)) && ((last1 == State_InGame.shieldKey)))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = scudata_in_corsa;
gotoAndPlay(scudata_in_corsa);
_arg1.PlaySound(snd_scudata_in_corsa);
} else {
if ((((lastMove == run)) && ((last1 == State_InGame.lanceKey)))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = lanciata_in_corsa;
gotoAndPlay(lanciata_in_corsa);
_arg1.PlaySound(snd_lanciata_in_corsa);
} else {
if (((((((!((lastMove == scudata_rotante))) && ((last1 == State_InGame.lanceKey)))) && ((last2 == State_InGame.KEY_UP)))) && ((last3 == State_InGame.KEY_DOWN)))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = scudata_rotante;
gotoAndPlay(scudata_rotante);
_arg1.PlaySound(snd_scudata_rotante);
} else {
if (((((!((lastMove == scudata_back))) && ((((last1 == State_InGame.shieldKey)) || ((last1 == State_InGame.lanceKey)))))) && ((last2 == backwardKey)))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = scudata_back;
gotoAndPlay(scudata_back);
_arg1.PlaySound(snd_calcio);
} else {
if (((((((((((!((lastMove == lanciata_combo_3))) && (lastHitBool))) && ((last1 == State_InGame.lanceKey)))) && ((((last2 == State_InGame.lanceKey)) || ((last2 == State_InGame.shieldKey)))))) && ((((last3 == State_InGame.lanceKey)) || ((last3 == State_InGame.shieldKey)))))) && ((((lastMove == lanciata_combo_2)) || ((lastMove == scudata_combo_2)))))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = lanciata_combo_3;
gotoAndPlay(lanciata_combo_3);
_arg1.PlaySound(snd_lanciata_3);
} else {
if (((((((((((!((lastMove == scudata_combo_3))) && (lastHitBool))) && ((last1 == State_InGame.shieldKey)))) && ((((last2 == State_InGame.lanceKey)) || ((last2 == State_InGame.shieldKey)))))) && ((((last3 == State_InGame.lanceKey)) || ((last3 == State_InGame.shieldKey)))))) && ((((lastMove == lanciata_combo_2)) || ((lastMove == scudata_combo_2)))))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = scudata_combo_3;
gotoAndPlay(scudata_combo_3);
_arg1.PlaySound(snd_scudata_3);
} else {
if (((((((!((lastMove == lanciata_combo_2))) && ((last1 == State_InGame.lanceKey)))) && ((((last2 == State_InGame.lanceKey)) || ((last2 == State_InGame.shieldKey)))))) && ((((lastMove == lanciata_semplice)) || ((lastMove == scudata_semplice)))))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = lanciata_combo_2;
gotoAndPlay(lanciata_combo_2);
_arg1.PlaySound(snd_lanciata_2);
} else {
if (((((((!((lastMove == scudata_combo_2))) && ((last1 == State_InGame.shieldKey)))) && ((((last2 == State_InGame.lanceKey)) || ((last2 == State_InGame.shieldKey)))))) && ((((lastMove == lanciata_semplice)) || ((lastMove == scudata_semplice)))))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = scudata_combo_2;
gotoAndPlay(scudata_combo_2);
_arg1.PlaySound(snd_scudata_2);
} else {
if (((((!((lastMove == lanciata_semplice))) && ((last1 == State_InGame.lanceKey)))) && ((((((lastMove == stand)) || ((lastMove == walk)))) || ((lastMove == run)))))){
ClearHit();
canSwapMove = false;
nextMove = 0;
lastMove = lanciata_semplice;
gotoAndPlay(lanciata_semplice);
_arg1.PlaySound(snd_lanciata_1);
} else {
if (((((!((lastMove == scudata_semplice))) && ((last1 == State_InGame.shieldKey)))) && ((((((lastMove == stand)) || ((lastMove == walk)))) || ((lastMove == run)))))){
ClearHit();
canSwapMove = true;
nextMove = 0;
lastMove = scudata_semplice;
gotoAndPlay(scudata_semplice);
_arg1.PlaySound(snd_scudata_1);
} else {
if (((((!((lastMove == scudo))) && ((last1 == State_InGame.shield)))) && ((((((lastMove == stand)) || ((lastMove == walk)))) || ((lastMove == run)))))){
ClearHit();
canSwapMove = true;
nextMove = 0;
lastMove = scudo;
gotoAndPlay(scudo);
_arg1.PlaySound(snd_scudata_1);
} else {
if ((((((((lastMove == stand)) || ((lastMove == walk)))) && ((last1 == fowardKey)))) && ((last2 == fowardKey)))){
canSwapMove = true;
nextMove = 0;
lastMove = run;
gotoAndPlay(run);
} else {
if (nextMove == stand){
canSwapMove = false;
nextMove = 0;
lastMove = stand;
gotoAndPlay(stand);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function ThrowBloodSplash():BloodSplash{
switch (Math.floor((Math.random() * 3.99))){
case 0:
return (new Sangue01());
case 1:
return (new Sangue02());
case 2:
return (new Sangue03());
case 3:
return (new Sangue04());
default:
return (new Sangue01());
};
}
public function CollisionBounds(_arg1:Rectangle, _arg2:Number):void{
if (pos.x < _arg1.left){
pos.x = _arg1.left;
velx = 0;
};
if (pos.x > Math.floor(_arg1.right)){
pos.x = Math.floor(_arg1.right);
velx = 0;
};
if (pos.y < (_arg1.bottom - _arg2)){
pos.y = (_arg1.bottom - _arg2);
vely = 0;
};
if (pos.y > (_arg1.bottom + 20)){
pos.y = (_arg1.bottom + 20);
vely = 0;
};
}
public function UpdateInput(_arg1:State_InGame, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean):void{
if (((dying) || (died))){
return;
};
if ((((((lastMove == scudata_in_corsa)) || ((lastMove == lanciata_in_corsa)))) || ((lastMove == scudata_rotante)))){
return;
};
dirx = 0;
diry = 0;
shooting = false;
if (Key.isDown(State_InGame.KEY_LEFT) != Key.isDown(State_InGame.KEY_RIGHT)){
if (Key.isDown(State_InGame.KEY_LEFT)){
leftPressed++;
dirx = -1;
} else {
leftPressed = 0;
};
if (Key.isDown(State_InGame.KEY_RIGHT)){
rightPressed++;
dirx = 1;
} else {
rightPressed = 0;
};
if (leftPressed > 3){
charDirX = -1;
};
if (rightPressed > 3){
charDirX = 1;
};
};
if (Key.isDown(State_InGame.KEY_UP)){
diry = -1;
};
if (Key.isDown(State_InGame.KEY_DOWN)){
diry = 1;
};
if ((_arg1._time - lastTimeKeyPressed) > 400){
keyBuffer.push(-1);
lastTimeKeyPressed = _arg1._time;
};
while (keyBuffer.length > 4) {
keyBuffer.splice(0, 1);
};
last1 = keyBuffer[(keyBuffer.length - 1)];
last2 = keyBuffer[(keyBuffer.length - 2)];
last3 = keyBuffer[(keyBuffer.length - 3)];
last4 = keyBuffer[(keyBuffer.length - 4)];
}
public function Step(_arg1:State_InGame):void{
}
public function ThrowBloodSplashPlayer():BloodSplash{
switch (Math.floor((Math.random() * 3.99))){
case 0:
return (new Sangue05());
case 1:
return (new Sangue05());
case 2:
return (new Sangue05());
case 3:
return (new Sangue05());
default:
return (new Sangue05());
};
}
public function OnHit(_arg1:State_InGame, _arg2:Number):void{
if (((dying) || (died))){
return;
};
if (scudoPremuto == false){
health = (health - _arg2);
if (health <= 0){
health = -1;
dying = true;
this.gotoAndPlay(morte);
} else {
ClearHit();
canSwapMove = true;
nextMove = 0;
if (Math.random() > 0.5){
lastMove = ferita1;
gotoAndPlay(ferita1);
} else {
lastMove = ferita2;
gotoAndPlay(ferita2);
};
};
};
}
public function OnKeyReleased(_arg1:State_InGame, _arg2:Number){
}
public function GetFlyForce():Vector2{
switch (lastMove){
case scudata_in_corsa:
return (new Vector2((charDirX * maxVel), 4));
case scudata_combo_3:
return (new Vector2((charDirX * 1), 5));
case lanciata_in_corsa:
return (new Vector2((charDirX * 6), 8));
case scudata_rotante:
if (currentFrame < 182){
return (new Vector2((-(charDirX) * 6), 4));
};
return (new Vector2((charDirX * 6), 4));
default:
return (new Vector2(0, 0));
};
}
protected function HideColliders(){
colliderClip = DisplayObject(this.getChildByName("collider"));
weaponClip = DisplayObject(this.getChildByName("weapon"));
if (colliderClip != null){
colliderClip.visible = false;
};
if (weaponClip != null){
weaponClip.visible = false;
};
}
}
}//package ThisGame
Section 34
//Png (ThisGame.Png)
package ThisGame {
import flash.display.*;
import FoofaGeom.*;
public class Png extends MovieClip {
public const SCALE:Number = 0.88;
protected var lifeTime:Number;
protected var die_start:Number;
public var died:Boolean;
public var toDispose:Boolean;
protected var iaStatus:Number;
protected var charDir:Number;
protected var walkingSpeed:Number;
public var health:Number;
protected var walkingStart:Number;
public var colliderClip:DisplayObject;
public var pos:Vector2;
public var h:Number;
public var falling:Boolean;
protected var walking:Boolean;
public var hit:Boolean;
public var flyVector:Vector2;
public var flying:Boolean;
protected var walkingEnd:Number;
protected var fall_start:Number;
public var lastShot:Number;
public var weaponClip:DisplayObject;
protected var fly_start:Number;
protected var suffering_start:Number;
protected var charDirY:Number;
public function Png():void{
hit = false;
toDispose = false;
died = false;
health = 4;
lastShot = 0;
falling = false;
flying = false;
pos = new Vector2(x, y);
flyVector = new Vector2(0, 0);
h = 0;
suffering_start = 57;
die_start = 59;
charDir = 1;
charDirY = 1;
iaStatus = 0;
scaleX = SCALE;
scaleY = SCALE;
walking = false;
fly_start = 85;
fall_start = 88;
falling = false;
}
public function Step(_arg1:State_InGame):void{
if (flying){
flyVector.y = (flyVector.y - 0.9);
h = (h + flyVector.y);
if (h < 0){
h = 0;
flying = false;
gotoAndPlay(fall_start);
falling = true;
};
pos.x = (pos.x + flyVector.x);
};
x = pos.x;
y = (pos.y - h);
if (charDir >= 0){
scaleX = SCALE;
} else {
scaleX = -(SCALE);
};
}
public function OnHit(_arg1:State_InGame, _arg2:Number, _arg3:Vector2):void{
if (died){
return;
};
walking = false;
if (currentFrame < die_start){
health = (health - _arg2);
if (health < 0){
gotoAndPlay(die_start);
} else {
if (_arg3.length > 0){
flying = true;
flyVector.x = _arg3.x;
flyVector.y = _arg3.y;
gotoAndStop(fly_start);
} else {
gotoAndPlay(suffering_start);
};
};
iaStatus = 2;
};
}
public function GetDamage():Number{
return (1);
}
public function HideColliders(){
colliderClip = DisplayObject(this.getChildByName("collider"));
weaponClip = DisplayObject(this.getChildByName("weapon"));
if (colliderClip != null){
colliderClip.visible = false;
};
if (weaponClip != null){
weaponClip.visible = false;
};
if (((died) && ((currentFrame < die_start)))){
gotoAndPlay(die_start);
};
}
public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((died == true)) || ((health < 0)))){
return;
};
}
public function LookAtPlayer(_arg1:Player):void{
if (pos.x >= _arg1.pos.x){
charDir = -1;
} else {
charDir = 1;
};
if (pos.y >= _arg1.pos.y){
charDirY = -1;
} else {
charDirY = 1;
};
}
}
}//package ThisGame
Section 35
//Png_bispada (ThisGame.Png_bispada)
package ThisGame {
import flash.display.*;
public class Png_bispada extends Png {
public var weapon:MovieClip;
var hangingBegin:Number;
var distance2:Number;
var distanceX:Number;
var distanceY:Number;
var hangingTime:Number;
var dirPriority:Number;
public var collider:MovieClip;
public function Png_bispada():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92, 92, frame93, 93, frame94, 94, frame95, 95, frame96, 96, frame97, 97, frame98, 98, frame99, 99, frame100, 100, frame101, 101, frame102, 102, frame103, 103, frame104);
walkingStart = 11;
walkingEnd = 40;
health = 18;
dirPriority = (1 + Math.floor((Math.random() * 3)));
walking = false;
walkingSpeed = (3 + (Math.random() * 2));
hangingTime = (800 + (Math.random() * 1500));
}
override public function GetDamage():Number{
return (12);
}
function frame10(){
HideColliders();
gotoAndPlay(1);
}
function frame14(){
HideColliders();
}
function frame16(){
HideColliders();
}
function frame15(){
HideColliders();
}
function frame17(){
HideColliders();
}
function frame2(){
HideColliders();
}
function frame3(){
HideColliders();
}
function frame4(){
HideColliders();
}
function frame7(){
HideColliders();
}
function frame19(){
HideColliders();
}
function frame23(){
HideColliders();
}
function frame5(){
HideColliders();
}
function frame6(){
HideColliders();
}
function frame13(){
HideColliders();
}
function frame1(){
HideColliders();
}
function frame22(){
HideColliders();
}
function frame25(){
HideColliders();
}
function frame9(){
HideColliders();
}
function frame24(){
HideColliders();
}
function frame26(){
HideColliders();
}
function frame8(){
HideColliders();
}
function frame21(){
HideColliders();
}
function frame11(){
HideColliders();
}
function frame27(){
HideColliders();
}
function frame29(){
HideColliders();
}
function frame36(){
HideColliders();
}
function frame30(){
HideColliders();
}
function frame12(){
HideColliders();
}
function frame28(){
HideColliders();
}
function frame35(){
HideColliders();
}
function frame20(){
HideColliders();
}
function frame38(){
HideColliders();
gotoAndPlay(11);
}
function frame18(){
HideColliders();
}
function frame32(){
HideColliders();
}
function frame34(){
HideColliders();
}
function frame39(){
HideColliders();
}
function frame43(){
HideColliders();
}
function frame31(){
HideColliders();
}
function frame33(){
HideColliders();
}
function frame37(){
HideColliders();
}
function frame45(){
HideColliders();
}
function frame47(){
HideColliders();
}
function frame42(){
HideColliders();
}
function frame46(){
HideColliders();
}
function frame40(){
HideColliders();
}
function frame41(){
HideColliders();
}
function frame44(){
HideColliders();
}
function frame48(){
HideColliders();
}
function frame49(){
HideColliders();
}
function frame53(){
HideColliders();
}
function frame54(){
HideColliders();
}
function frame55(){
HideColliders();
}
function frame56(){
HideColliders();
gotoAndPlay(1);
}
function frame52(){
HideColliders();
}
function frame57(){
HideColliders();
}
function frame50(){
HideColliders();
}
function frame59(){
HideColliders();
}
function frame51(){
HideColliders();
}
function frame60(){
HideColliders();
}
function frame58(){
HideColliders();
gotoAndPlay(1);
}
function frame62(){
HideColliders();
}
function frame63(){
HideColliders();
}
function frame64(){
HideColliders();
}
function frame66(){
HideColliders();
}
function frame67(){
HideColliders();
}
function frame61(){
HideColliders();
}
function frame68(){
HideColliders();
}
function frame69(){
HideColliders();
}
private function HangAround(_arg1:State_InGame, _arg2:Player){
if (Math.abs((pos.x - _arg2.pos.x)) > 20){
LookAtPlayer(_arg2);
};
if ((_arg1._time - hangingBegin) < (hangingTime * 0.7)){
MoveBackFromPlayer(_arg1, _arg2);
} else {
if (currentFrame >= walkingStart){
walking = false;
gotoAndPlay(1);
};
};
if ((_arg1._time - hangingBegin) > hangingTime){
iaStatus = 2;
};
}
function frame70(){
HideColliders();
}
function frame72(){
HideColliders();
}
function frame73(){
HideColliders();
}
function frame75(){
HideColliders();
}
function frame77(){
HideColliders();
}
function frame76(){
HideColliders();
}
function frame78(){
HideColliders();
}
function frame65(){
HideColliders();
}
function frame74(){
HideColliders();
}
function frame80(){
HideColliders();
}
function frame71(){
HideColliders();
}
function frame86(){
HideColliders();
}
function frame82(){
HideColliders();
}
function frame83(){
HideColliders();
}
function frame84(){
HideColliders();
}
function frame85(){
HideColliders();
}
function frame87(){
HideColliders();
gotoAndPlay(85);
}
function frame89(){
HideColliders();
}
function frame81(){
HideColliders();
died = true;
stop();
}
function frame88(){
HideColliders();
}
function frame93(){
HideColliders();
}
function frame79(){
HideColliders();
}
function frame95(){
HideColliders();
}
function frame91(){
HideColliders();
}
function frame92(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
function frame94(){
HideColliders();
}
function frame97(){
HideColliders();
}
function frame90(){
HideColliders();
}
function frame99(){
HideColliders();
}
function frame98(){
HideColliders();
}
function frame96(){
HideColliders();
}
function frame101(){
HideColliders();
}
function frame102(){
HideColliders();
}
function frame100(){
HideColliders();
}
function frame103(){
HideColliders();
}
function frame104(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((((((died == true)) || ((health < 0)))) || ((flying == true)))) || ((falling == true)))){
return;
};
distanceX = Math.abs((pos.x - _arg2.pos.x));
distanceY = Math.abs((pos.y - _arg2.pos.y));
distance2 = ((distanceX * distanceX) + (distanceY * distanceY));
switch (iaStatus){
case 0:
hangingBegin = _arg1._time;
lifeTime = _arg1._time;
iaStatus = 1;
LookAtPlayer(_arg2);
break;
case 1:
HangAround(_arg1, _arg2);
break;
case 2:
default:
if (distanceX > 20){
LookAtPlayer(_arg2);
};
if ((((distanceX > 150)) || ((distanceY > 20)))){
MoveNearPlayer(_arg1, _arg2);
} else {
if ((((_arg2.dying == false)) && (((_arg1._time - lastShot) > 2000)))){
walking = false;
hit = false;
gotoAndPlay(41);
lastShot = _arg1._time;
} else {
if (currentFrame < walkingStart){
hangingBegin = _arg1._time;
hangingTime = (1000 + (Math.random() * 2000));
iaStatus = 1;
};
};
};
break;
};
if (pos.y < (_arg1.bounds.bottom - _arg1.movingHeight)){
pos.y = (_arg1.bounds.bottom - _arg1.movingHeight);
};
if (pos.y > (_arg1.bounds.bottom + 30)){
pos.y = (_arg1.bounds.bottom + 30);
};
}
private function MoveBackFromPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 0:
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
} else {
if (distanceY < 55){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
};
break;
case 1:
if (distanceY < 55){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
} else {
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
};
break;
case 2:
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
if (distanceY < 55){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
break;
};
};
}
private function MoveNearPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 1:
if (distanceX > 150){
pos.x = (pos.x + (charDir * walkingSpeed));
} else {
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
};
break;
case 2:
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
} else {
if (distanceX > 150){
pos.x = (pos.x + (charDir * walkingSpeed));
};
};
break;
case 3:
if (distanceX > 150){
pos.x = (pos.x + (charDir * walkingSpeed));
};
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
break;
};
};
}
}
}//package ThisGame
Section 36
//Png_bitesta (ThisGame.Png_bitesta)
package ThisGame {
import flash.display.*;
import FoofaGeom.*;
import flash.media.*;
import FoofaView.*;
public class Png_bitesta extends Png {
const attack_foot:Number = 39;
const attack_fork:Number = 39;
public var weapon:MovieClip;
var hangingBegin:Number;
var snd_terremoto:Sound;
var enemyCount:Number;
var enemyTime:Number;
var lastEnemyTime:Number;
var distance2:Number;
var distanceX:Number;
var distanceY:Number;
var camera:Camera2d_FollowTargetInBounds;
var lastShotFoot:Number;
var hangingTime:Number;
var attackType:Number;
public var collider:MovieClip;
public function Png_bitesta():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92, 92, frame93, 93, frame94, 94, frame95, 95, frame96, 96, frame97, 97, frame98, 98, frame99, 99, frame100, 100, frame101, 101, frame102, 102, frame103, 103, frame104);
lastShotFoot = 0;
health = 45;
walkingStart = 11;
suffering_start = 57;
die_start = 60;
attackType = 0;
hangingTime = 2600;
enemyTime = 10000;
walking = false;
walkingSpeed = 3;
enemyCount = 0;
lastEnemyTime = 0;
snd_terremoto = new terremoto_mix();
}
override public function GetDamage():Number{
switch (attackType){
case attack_foot:
return (10);
case attack_fork:
return (8);
default:
return (0);
};
}
function frame10(){
HideColliders();
gotoAndPlay(1);
}
function frame14(){
HideColliders();
}
function frame16(){
HideColliders();
}
function frame15(){
HideColliders();
}
function frame2(){
HideColliders();
}
function frame3(){
HideColliders();
}
function frame7(){
HideColliders();
}
function frame19(){
HideColliders();
}
function frame4(){
HideColliders();
}
function frame5(){
HideColliders();
}
function frame6(){
HideColliders();
}
function frame13(){
HideColliders();
}
function frame1(){
HideColliders();
}
function frame22(){
HideColliders();
}
function frame25(){
HideColliders();
}
function frame9(){
HideColliders();
}
function frame24(){
HideColliders();
}
function frame17(){
HideColliders();
}
function frame8(){
HideColliders();
}
function frame21(){
HideColliders();
}
function frame11(){
HideColliders();
}
function frame27(){
HideColliders();
}
function frame29(){
HideColliders();
}
function frame23(){
HideColliders();
}
function frame30(){
HideColliders();
}
function frame12(){
HideColliders();
}
function frame28(){
HideColliders();
}
function frame36(){
HideColliders();
}
function frame20(){
HideColliders();
}
function frame38(){
HideColliders();
gotoAndPlay(11);
}
function frame18(){
HideColliders();
}
function frame32(){
HideColliders();
}
function frame34(){
HideColliders();
}
function frame35(){
HideColliders();
}
function frame39(){
HideColliders();
}
function frame43(){
HideColliders();
}
function frame31(){
HideColliders();
}
function frame33(){
HideColliders();
}
function frame41(){
HideColliders();
}
function frame37(){
HideColliders();
}
function frame45(){
HideColliders();
}
function frame26(){
HideColliders();
}
function frame42(){
HideColliders();
}
function frame46(){
HideColliders();
}
function frame47(){
HideColliders();
}
function frame44(){
HideColliders();
}
function frame48(){
HideColliders();
}
function frame49(){
HideColliders();
}
function frame40(){
HideColliders();
}
function frame54(){
HideColliders();
}
function frame55(){
HideColliders();
}
function frame52(){
HideColliders();
}
function frame56(){
HideColliders();
gotoAndPlay(1);
}
function frame57(){
HideColliders();
}
function frame50(){
HideColliders();
}
function frame53(){
HideColliders();
}
function frame59(){
HideColliders();
}
function frame51(){
HideColliders();
}
function frame60(){
HideColliders();
}
function frame58(){
HideColliders();
gotoAndPlay(1);
}
function frame62(){
HideColliders();
}
function frame64(){
HideColliders();
}
function frame66(){
HideColliders();
}
function frame67(){
HideColliders();
}
function frame61(){
HideColliders();
}
private function MoveInLineWithPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
if (distanceX > 350){
pos.x = (pos.x + ((charDir * walkingSpeed) * 0.5));
} else {
if (distanceX < 300){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
};
if (distanceY > 15){
pos.y = (pos.y + ((charDirY * walkingSpeed) * 0.5));
};
};
}
function frame68(){
HideColliders();
}
function frame69(){
HideColliders();
}
private function HangAround(_arg1:State_InGame, _arg2:Player){
if ((((currentFrame >= walkingStart)) && ((currentFrame < attack_foot)))){
walking = false;
gotoAndPlay(1);
};
if ((_arg1._time - hangingBegin) > hangingTime){
iaStatus = 2;
};
}
function frame70(){
HideColliders();
}
function frame72(){
HideColliders();
}
function frame73(){
HideColliders();
}
function frame75(){
HideColliders();
}
function frame77(){
HideColliders();
}
function frame76(){
HideColliders();
}
override public function OnHit(_arg1:State_InGame, _arg2:Number, _arg3:Vector2):void{
if (died){
return;
};
walking = false;
if (currentFrame < die_start){
health = (health - _arg2);
if (health < 0){
gotoAndPlay(die_start);
};
};
}
function frame78(){
HideColliders();
}
function frame63(){
HideColliders();
}
function frame65(){
HideColliders();
}
function frame74(){
HideColliders();
}
function frame71(){
HideColliders();
}
function frame86(){
HideColliders();
}
function frame82(){
HideColliders();
}
function frame83(){
HideColliders();
}
function frame84(){
HideColliders();
}
function frame85(){
HideColliders();
}
function frame87(){
HideColliders();
gotoAndPlay(85);
}
function frame80(){
HideColliders();
}
function frame88(){
HideColliders();
}
function frame93(){
HideColliders();
}
function frame79(){
HideColliders();
}
function frame95(){
HideColliders();
}
function frame91(){
HideColliders();
}
function frame92(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
function frame94(){
HideColliders();
}
function frame89(){
HideColliders();
}
function frame97(){
HideColliders();
}
function frame99(){
HideColliders();
}
function frame98(){
HideColliders();
}
function frame81(){
HideColliders();
died = true;
stop();
}
function frame96(){
HideColliders();
}
function frame101(){
HideColliders();
}
function frame90(){
HideColliders();
}
function frame100(){
HideColliders();
}
function frame102(){
HideColliders();
}
function frame103(){
HideColliders();
}
private function LaunchEnemy(_arg1:State_InGame, _arg2:Player){
var _local3:Png;
enemyCount++;
switch ((Math.floor(enemyCount) % 4)){
case 0:
_local3 = new Png_vichingo();
break;
case 1:
_local3 = new Png_bispada();
break;
case 2:
_local3 = new Png_gobbo();
break;
case 3:
_local3 = new Png_sarracino();
break;
};
_local3.pos.y = _arg2.pos.y;
_local3.pos.x = _arg2.pos.x;
if (Math.random() < 0.5){
_local3.pos.x = (_local3.pos.x - 700);
} else {
_local3.pos.x = (_local3.pos.x + 700);
};
_arg1.AddEnemy(_local3, _local3.pos.x, _local3.pos.y);
}
function frame104(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((((died == true)) || ((health < 0)))) || ((flying == true)))){
return;
};
distanceX = Math.abs((pos.x - _arg2.pos.x));
distanceY = Math.abs((pos.y - _arg2.pos.y));
distance2 = ((distanceX * distanceX) + (distanceY * distanceY));
switch (iaStatus){
case 0:
hangingBegin = _arg1._time;
lifeTime = _arg1._time;
iaStatus = 1;
LookAtPlayer(_arg2);
lastEnemyTime = (_arg1._time + 8000);
break;
case 1:
HangAround(_arg1, _arg2);
break;
case 2:
default:
if (distanceX > 20){
LookAtPlayer(_arg2);
};
if (currentFrame >= attack_foot){
break;
};
if ((((_arg2.dying == false)) && (((_arg1._time - lastShotFoot) > 4500)))){
attackType = attack_foot;
hit = false;
walking = false;
gotoAndPlay(attack_foot);
_arg1.PlaySound(snd_terremoto);
lastShotFoot = _arg1._time;
hangingBegin = _arg1._time;
iaStatus = 1;
camera = _arg1.camera;
} else {
if ((((((_arg2.dying == false)) && (((_arg1._time - lastShot) > 900)))) && ((distanceX < 250)))){
attackType = attack_fork;
hit = false;
walking = false;
gotoAndPlay(attack_fork);
lastShot = _arg1._time;
} else {
if (distanceY > 20){
MoveInLineWithPlayer(_arg1, _arg2);
};
};
};
break;
};
if (_arg1._time > (lastEnemyTime + enemyTime)){
if (enemyTime > 5000){
enemyTime = (enemyTime - 10);
};
lastEnemyTime = _arg1._time;
LaunchEnemy(_arg1, _arg2);
};
if (pos.y < (_arg1.bounds.bottom - _arg1.movingHeight)){
pos.y = (_arg1.bounds.bottom - _arg1.movingHeight);
};
if (pos.y > (_arg1.bounds.bottom + 20)){
pos.y = (_arg1.bounds.bottom + 20);
};
}
}
}//package ThisGame
Section 37
//Png_freccia (ThisGame.Png_freccia)
package ThisGame {
import flash.display.*;
public class Png_freccia extends Png {
private var speed:Number;
private var startTime:Number;
private var time:Number;
private var waveFirst:Number;
private var arrowStatus:Number;
private var waveCount:Number;
private var waveTimer:Number;
public var sign:DisplayObject;
public function Png_freccia():void{
addFrameScript(0, frame1, 96, frame97);
hit = false;
time = -1;
arrowStatus = 0;
waveFirst = 2000;
waveTimer = 560;
waveCount = 1;
stop();
}
function frame1(){
stop();
}
function frame97(){
stop();
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
switch (arrowStatus){
case 0:
sign = _arg1.arrowsSign;
sign.visible = true;
startTime = _arg1._time;
time = 0;
arrowStatus = 1;
_arg2.canArrowCover = true;
this.stop();
break;
case 1:
time = (_arg1._time - startTime);
if (time > waveFirst){
arrowStatus = 2;
this.gotoAndPlay(1);
_arg1.PlaySound(_arg1.arrowsAudio);
};
break;
case 2:
time = (_arg1._time - startTime);
if (time > (waveFirst + (waveCount * waveTimer))){
if (waveCount > 5){
if ((((_arg2.lastMove == _arg2.parata_frecce)) && ((_arg2.currentFrame == 285)))){
_arg2.gotoAndPlay(286);
died = true;
} else {
if (_arg2.lastMove != _arg2.parata_frecce){
died = true;
};
};
_arg2.canSwapMove = true;
_arg2.canArrowCover = false;
} else {
if ((((_arg2.lastMove == _arg2.parata_frecce)) && ((_arg2.currentFrame < 228)))){
_arg2.gotoAndPlay(229);
};
sign.visible = false;
if (_arg2.lastMove != _arg2.parata_frecce){
_arg2.OnHit(_arg1, 10);
};
waveCount++;
};
};
break;
};
}
}
}//package ThisGame
Section 38
//Png_gobbo (ThisGame.Png_gobbo)
package ThisGame {
import flash.display.*;
public class Png_gobbo extends Png {
public var weapon:MovieClip;
var hangingBegin:Number;
var distance2:Number;
var distanceX:Number;
var distanceY:Number;
var hangingTime:Number;
var dirPriority:Number;
public var collider:MovieClip;
public function Png_gobbo():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92);
walkingStart = 11;
walkingEnd = 42;
health = 12;
dirPriority = (1 + Math.floor((Math.random() * 3)));
walking = false;
walkingSpeed = (1.5 + (Math.random() * 1));
hangingTime = (Math.random() * 1500);
}
override public function GetDamage():Number{
return (3);
}
function frame10(){
HideColliders();
gotoAndPlay(1);
}
function frame14(){
HideColliders();
}
function frame16(){
HideColliders();
}
function frame15(){
HideColliders();
}
function frame17(){
HideColliders();
}
function frame2(){
HideColliders();
}
function frame3(){
HideColliders();
}
function frame4(){
HideColliders();
}
function frame7(){
HideColliders();
}
function frame19(){
HideColliders();
}
function frame23(){
HideColliders();
}
function frame5(){
HideColliders();
}
function frame6(){
HideColliders();
}
function frame13(){
HideColliders();
}
function frame1(){
HideColliders();
}
function frame22(){
HideColliders();
}
function frame25(){
HideColliders();
}
function frame9(){
HideColliders();
}
function frame24(){
HideColliders();
}
function frame26(){
HideColliders();
}
function frame8(){
HideColliders();
}
function frame21(){
HideColliders();
}
function frame11(){
HideColliders();
}
function frame27(){
HideColliders();
}
function frame29(){
HideColliders();
}
function frame36(){
HideColliders();
}
function frame30(){
HideColliders();
}
function frame12(){
HideColliders();
}
function frame28(){
HideColliders();
}
function frame35(){
HideColliders();
}
function frame20(){
HideColliders();
}
function frame38(){
HideColliders();
gotoAndPlay(11);
}
function frame18(){
HideColliders();
}
function frame32(){
HideColliders();
}
function frame34(){
HideColliders();
}
function frame39(){
HideColliders();
}
function frame43(){
HideColliders();
}
function frame31(){
HideColliders();
}
function frame33(){
HideColliders();
}
function frame37(){
HideColliders();
}
function frame45(){
HideColliders();
}
function frame47(){
HideColliders();
}
function frame42(){
HideColliders();
}
function frame46(){
HideColliders();
}
function frame40(){
HideColliders();
}
function frame41(){
HideColliders();
}
function frame44(){
HideColliders();
}
function frame48(){
HideColliders();
}
function frame49(){
HideColliders();
}
function frame53(){
HideColliders();
}
function frame54(){
HideColliders();
}
function frame55(){
HideColliders();
}
function frame56(){
HideColliders();
}
function frame52(){
HideColliders();
}
function frame57(){
HideColliders();
}
function frame50(){
HideColliders();
}
function frame59(){
HideColliders();
}
function frame51(){
HideColliders();
}
function frame60(){
HideColliders();
}
function frame58(){
HideColliders();
gotoAndPlay(1);
}
function frame62(){
HideColliders();
}
function frame63(){
HideColliders();
}
function frame64(){
HideColliders();
}
function frame66(){
HideColliders();
}
function frame67(){
HideColliders();
}
function frame61(){
HideColliders();
}
function frame68(){
HideColliders();
}
function frame69(){
HideColliders();
}
private function HangAround(_arg1:State_InGame, _arg2:Player){
if (Math.abs((pos.x - _arg2.pos.x)) > 20){
LookAtPlayer(_arg2);
};
if ((_arg1._time - hangingBegin) < (hangingTime * 0.7)){
MoveBackFromPlayer(_arg1, _arg2);
} else {
if (currentFrame >= walkingStart){
walking = false;
gotoAndPlay(1);
};
};
if ((_arg1._time - hangingBegin) > hangingTime){
iaStatus = 2;
};
}
function frame70(){
HideColliders();
}
function frame72(){
HideColliders();
}
function frame73(){
HideColliders();
}
function frame75(){
HideColliders();
}
function frame77(){
HideColliders();
}
function frame76(){
HideColliders();
}
function frame78(){
HideColliders();
}
function frame65(){
HideColliders();
}
function frame74(){
HideColliders();
}
function frame80(){
HideColliders();
}
function frame71(){
HideColliders();
}
function frame86(){
HideColliders();
}
function frame82(){
HideColliders();
}
function frame83(){
HideColliders();
}
function frame84(){
HideColliders();
}
function frame85(){
HideColliders();
}
function frame87(){
HideColliders();
gotoAndPlay(85);
}
function frame89(){
HideColliders();
}
function frame81(){
HideColliders();
}
function frame88(){
HideColliders();
}
function frame79(){
HideColliders();
died = true;
stop();
}
function frame91(){
HideColliders();
}
function frame92(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
function frame90(){
HideColliders();
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((((((died == true)) || ((health < 0)))) || ((flying == true)))) || ((falling == true)))){
return;
};
distanceX = Math.abs((pos.x - _arg2.pos.x));
distanceY = Math.abs((pos.y - _arg2.pos.y));
distance2 = ((distanceX * distanceX) + (distanceY * distanceY));
switch (iaStatus){
case 0:
hangingBegin = _arg1._time;
lifeTime = _arg1._time;
iaStatus = 1;
LookAtPlayer(_arg2);
break;
case 1:
HangAround(_arg1, _arg2);
break;
case 2:
default:
if (distanceX > 20){
LookAtPlayer(_arg2);
};
if ((((distanceX > 150)) || ((distanceY > 20)))){
MoveNearPlayer(_arg1, _arg2);
} else {
if ((((_arg2.dying == false)) && (((_arg1._time - lastShot) > 2000)))){
walking = false;
hit = false;
gotoAndPlay(43);
lastShot = _arg1._time;
} else {
if (currentFrame < walkingStart){
hangingBegin = _arg1._time;
hangingTime = (1000 + (Math.random() * 2000));
iaStatus = 1;
};
};
};
break;
};
if (pos.y < (_arg1.bounds.bottom - _arg1.movingHeight)){
pos.y = (_arg1.bounds.bottom - _arg1.movingHeight);
};
if (pos.y > (_arg1.bounds.bottom + 30)){
pos.y = (_arg1.bounds.bottom + 30);
};
}
private function MoveBackFromPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 0:
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
} else {
if (distanceY < 35){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
};
break;
case 1:
if (distanceY < 35){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
} else {
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
};
break;
case 2:
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
if (distanceY < 35){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
break;
};
};
}
private function MoveNearPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 1:
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
} else {
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
};
break;
case 2:
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
} else {
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
};
};
break;
case 3:
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
};
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
break;
};
};
}
}
}//package ThisGame
Section 39
//Png_leone (ThisGame.Png_leone)
package ThisGame {
import flash.display.*;
import FoofaGeom.*;
import flash.media.*;
public class Png_leone extends Png {
public var weapon:MovieClip;
var hangingBegin:Number;
var snd_roar1:Sound;
var snd_roar2:Sound;
var distance2:Number;
var distanceX:Number;
var distanceY:Number;
var hangingTime:Number;
var attackCount:Number;
public var collider:MovieClip;
static var snd_count:Number = 0;
public function Png_leone():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57);
health = 5;
suffering_start = 31;
die_start = 46;
walkingStart = 13;
walkingEnd = 30;
walking = false;
walkingSpeed = 13;
hangingTime = 3000;
snd_roar1 = new ruggito_1();
snd_roar2 = new ruggito_2();
}
private function Rest(_arg1:State_InGame, _arg2:Player):void{
if (((((_arg1._time - hangingBegin) > hangingTime)) || ((distanceX < 300)))){
snd_count++;
iaStatus = 1;
};
}
override public function GetDamage():Number{
return (9);
}
function frame10(){
HideColliders();
}
function frame14(){
HideColliders();
}
function frame16(){
HideColliders();
}
function frame15(){
HideColliders();
}
function frame17(){
HideColliders();
}
function frame2(){
HideColliders();
}
function frame3(){
HideColliders();
}
function frame4(){
HideColliders();
}
function frame7(){
HideColliders();
}
function frame5(){
HideColliders();
}
function frame6(){
HideColliders();
}
function frame13(){
weapon._visible = false;
hit = false;
HideColliders();
}
function frame1(){
collider._visible = false;
HideColliders();
}
function frame22(){
HideColliders();
}
function frame23(){
HideColliders();
}
function frame19(){
HideColliders();
}
function frame9(){
HideColliders();
}
function frame24(){
HideColliders();
}
function frame25(){
HideColliders();
}
function frame26(){
HideColliders();
}
function frame8(){
HideColliders();
}
function frame21(){
HideColliders();
}
function frame11(){
HideColliders();
}
function frame27(){
HideColliders();
}
function frame29(){
HideColliders();
}
function frame36(){
HideColliders();
}
function frame30(){
HideColliders();
gotoAndPlay(13);
}
function frame12(){
HideColliders();
gotoAndPlay(1);
}
function frame28(){
HideColliders();
}
function frame35(){
HideColliders();
}
function frame20(){
HideColliders();
}
function frame38(){
HideColliders();
}
function frame18(){
HideColliders();
}
function frame32(){
HideColliders();
}
function frame34(){
HideColliders();
}
function frame39(){
HideColliders();
}
function frame43(){
HideColliders();
}
function frame31(){
HideColliders();
}
function frame33(){
HideColliders();
}
function frame41(){
HideColliders();
}
function frame37(){
HideColliders();
}
function frame45(){
HideColliders();
gotoAndPlay(1);
}
function frame47(){
HideColliders();
}
function frame42(){
HideColliders();
}
function frame46(){
HideColliders();
}
function frame40(){
HideColliders();
}
function frame44(){
HideColliders();
}
function frame48(){
HideColliders();
}
function frame49(){
HideColliders();
}
function frame53(){
HideColliders();
}
function frame54(){
HideColliders();
}
function frame55(){
HideColliders();
}
function frame56(){
HideColliders();
}
function frame52(){
HideColliders();
}
function frame57(){
HideColliders();
died = true;
stop();
}
function frame50(){
HideColliders();
}
function frame51(){
HideColliders();
}
private function MoveInLineWithPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
if (distanceY > 15){
pos.y = (pos.y + ((charDirY * walkingSpeed) * 0.5));
};
};
}
override public function OnHit(_arg1:State_InGame, _arg2:Number, _arg3:Vector2):void{
if (died){
return;
};
walking = false;
if (currentFrame < die_start){
health = (health - _arg2);
if (health < 0){
gotoAndPlay(die_start);
} else {
gotoAndPlay(suffering_start);
};
iaStatus = 2;
};
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((((died == true)) || ((health < 0)))) || ((flying == true)))){
return;
};
distanceX = Math.abs((pos.x - _arg2.pos.x));
distanceY = Math.abs((pos.y - _arg2.pos.y));
distance2 = ((distanceX * distanceX) + (distanceY * distanceY));
switch (iaStatus){
case 0:
lifeTime = _arg1._time;
iaStatus = 1;
LookAtPlayer(_arg2);
attackCount = 0;
break;
case 1:
LookAtPlayer(_arg2);
if (attackCount > 2){
attackCount = 0;
LookAtPlayer(_arg2);
hangingBegin = _arg1._time;
iaStatus = 3;
};
if (distanceY < 20){
iaStatus = 2;
};
MoveInLineWithPlayer(_arg1, _arg2);
break;
case 2:
if (distanceX > 600){
if ((((((pos.x >= _arg2.pos.x)) && ((charDir == 1)))) || ((((pos.x < _arg2.pos.x)) && ((charDir == -1)))))){
attackCount++;
iaStatus = 1;
};
} else {
(distanceX < 600);
};
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
pos.x = (pos.x + (charDir * walkingSpeed));
};
break;
case 3:
default:
Rest(_arg1, _arg2);
break;
};
if (pos.y < (_arg1.bounds.bottom - _arg1.movingHeight)){
pos.y = (_arg1.bounds.bottom - _arg1.movingHeight);
};
if (pos.y > (_arg1.bounds.bottom + 20)){
pos.y = (_arg1.bounds.bottom + 20);
};
}
}
}//package ThisGame
Section 40
//Png_sarracino (ThisGame.Png_sarracino)
package ThisGame {
import flash.display.*;
public class Png_sarracino extends Png {
public var weapon:MovieClip;
var hangingBegin:Number;
var distance2:Number;
var distanceX:Number;
var distanceY:Number;
var hangingTime:Number;
var dirPriority:Number;
public var collider:MovieClip;
public function Png_sarracino():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92, 92, frame93, 93, frame94, 94, frame95, 95, frame96, 96, frame97, 97, frame98, 98, frame99, 99, frame100, 100, frame101, 101, frame102, 102, frame103, 103, frame104);
walkingStart = 11;
walkingEnd = 42;
health = 2;
dirPriority = (1 + Math.floor((Math.random() * 3)));
walking = false;
walkingSpeed = (2 + (Math.random() * 2));
hangingTime = (1000 + (Math.random() * 1000));
}
override public function GetDamage():Number{
return (2);
}
function frame10(){
HideColliders();
gotoAndPlay(1);
}
function frame14(){
HideColliders();
}
function frame16(){
HideColliders();
}
function frame15(){
HideColliders();
}
function frame17(){
HideColliders();
}
function frame2(){
HideColliders();
}
function frame3(){
HideColliders();
}
function frame4(){
HideColliders();
}
function frame7(){
HideColliders();
}
function frame19(){
HideColliders();
}
function frame23(){
HideColliders();
}
function frame5(){
HideColliders();
}
function frame6(){
HideColliders();
}
function frame13(){
HideColliders();
}
function frame1(){
HideColliders();
}
function frame22(){
HideColliders();
}
function frame25(){
HideColliders();
}
function frame9(){
HideColliders();
}
function frame24(){
HideColliders();
}
function frame26(){
HideColliders();
}
function frame8(){
HideColliders();
}
function frame21(){
HideColliders();
}
function frame11(){
HideColliders();
}
function frame27(){
HideColliders();
}
function frame29(){
HideColliders();
}
function frame36(){
HideColliders();
}
function frame30(){
HideColliders();
}
function frame12(){
HideColliders();
}
function frame28(){
HideColliders();
}
function frame35(){
HideColliders();
}
function frame20(){
HideColliders();
}
function frame38(){
HideColliders();
gotoAndPlay(11);
}
function frame18(){
HideColliders();
}
function frame32(){
HideColliders();
}
function frame34(){
HideColliders();
}
function frame39(){
HideColliders();
}
function frame43(){
HideColliders();
}
function frame31(){
HideColliders();
}
function frame33(){
HideColliders();
}
function frame37(){
HideColliders();
}
function frame45(){
HideColliders();
}
function frame47(){
HideColliders();
}
function frame42(){
HideColliders();
}
function frame46(){
HideColliders();
}
function frame40(){
HideColliders();
}
function frame41(){
HideColliders();
}
function frame44(){
HideColliders();
}
function frame48(){
HideColliders();
}
function frame49(){
HideColliders();
}
function frame53(){
HideColliders();
}
function frame54(){
HideColliders();
gotoAndPlay(1);
}
function frame55(){
HideColliders();
}
function frame56(){
HideColliders();
}
function frame52(){
HideColliders();
}
function frame57(){
HideColliders();
}
function frame50(){
HideColliders();
}
function frame59(){
HideColliders();
}
function frame51(){
HideColliders();
}
function frame60(){
HideColliders();
}
function frame58(){
HideColliders();
gotoAndPlay(1);
}
function frame62(){
HideColliders();
}
function frame63(){
HideColliders();
}
function frame64(){
HideColliders();
}
function frame66(){
HideColliders();
}
function frame67(){
HideColliders();
}
function frame61(){
HideColliders();
}
function frame68(){
HideColliders();
}
function frame69(){
HideColliders();
}
private function HangAround(_arg1:State_InGame, _arg2:Player){
if (Math.abs((pos.x - _arg2.pos.x)) > 20){
LookAtPlayer(_arg2);
};
if (_arg1._time < (hangingBegin + (hangingTime * 0.7))){
MoveBackFromPlayer(_arg1, _arg2);
} else {
if (currentFrame >= walkingStart){
walking = false;
gotoAndPlay(1);
};
};
if ((_arg1._time - hangingBegin) > hangingTime){
iaStatus = 2;
};
}
function frame70(){
HideColliders();
}
function frame72(){
HideColliders();
}
function frame73(){
HideColliders();
}
function frame75(){
HideColliders();
}
function frame77(){
HideColliders();
}
function frame76(){
HideColliders();
}
function frame78(){
HideColliders();
}
function frame65(){
HideColliders();
}
function frame74(){
HideColliders();
}
function frame80(){
HideColliders();
}
function frame71(){
HideColliders();
}
function frame86(){
HideColliders();
}
function frame82(){
HideColliders();
}
function frame83(){
HideColliders();
}
function frame84(){
HideColliders();
}
function frame85(){
HideColliders();
}
function frame87(){
HideColliders();
}
function frame89(){
HideColliders();
}
function frame81(){
HideColliders();
died = true;
stop();
}
function frame88(){
HideColliders();
}
function frame93(){
HideColliders();
}
function frame79(){
HideColliders();
}
function frame95(){
HideColliders();
}
function frame91(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
function frame92(){
HideColliders();
}
function frame94(){
HideColliders();
}
function frame97(){
HideColliders();
}
function frame90(){
HideColliders();
}
function frame99(){
HideColliders();
}
function frame98(){
HideColliders();
}
function frame96(){
HideColliders();
}
function frame101(){
HideColliders();
}
function frame102(){
HideColliders();
}
function frame100(){
HideColliders();
}
function frame103(){
HideColliders();
}
function frame104(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((((((died == true)) || ((health < 0)))) || ((flying == true)))) || ((falling == true)))){
return;
};
distanceX = Math.abs((pos.x - _arg2.pos.x));
distanceY = Math.abs((pos.y - _arg2.pos.y));
distance2 = ((distanceX * distanceX) + (distanceY * distanceY));
switch (iaStatus){
case 0:
hangingBegin = _arg1._time;
lifeTime = _arg1._time;
iaStatus = 1;
LookAtPlayer(_arg2);
break;
case 1:
HangAround(_arg1, _arg2);
break;
case 2:
default:
if (distanceX > 20){
LookAtPlayer(_arg2);
};
if ((((distanceX > 150)) || ((distanceY > 20)))){
MoveNearPlayer(_arg1, _arg2);
} else {
if ((((_arg2.dying == false)) && (((_arg1._time - lastShot) > 2000)))){
walking = false;
hit = false;
gotoAndPlay(43);
lastShot = _arg1._time;
} else {
if (currentFrame < walkingStart){
hangingBegin = _arg1._time;
hangingTime = (1000 + (Math.random() * 2000));
iaStatus = 1;
};
};
};
break;
};
if (pos.y < (_arg1.bounds.bottom - _arg1.movingHeight)){
pos.y = (_arg1.bounds.bottom - _arg1.movingHeight);
};
if (pos.y > (_arg1.bounds.bottom + 30)){
pos.y = (_arg1.bounds.bottom + 30);
};
}
private function MoveBackFromPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 1:
if (distanceX < 450){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
} else {
if (distanceY < 45){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
};
break;
case 2:
if (distanceY < 45){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
} else {
if (distanceX < 450){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
};
break;
case 3:
if (distanceX < 450){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
if (distanceY < 45){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
break;
};
};
}
private function MoveNearPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 1:
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
} else {
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
};
break;
case 2:
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
} else {
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
};
};
break;
case 3:
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
};
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
break;
};
};
}
}
}//package ThisGame
Section 41
//Png_vichingo (ThisGame.Png_vichingo)
package ThisGame {
import flash.display.*;
public class Png_vichingo extends Png {
public var weapon:MovieClip;
var hangingBegin:Number;
var distance2:Number;
var distanceX:Number;
var distanceY:Number;
var hangingTime:Number;
var dirPriority:Number;
public var collider:MovieClip;
public function Png_vichingo():void{
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 80, frame81, 81, frame82, 82, frame83, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 87, frame88, 88, frame89, 89, frame90, 90, frame91, 91, frame92);
walkingStart = 11;
walkingEnd = 42;
health = 8;
dirPriority = (1 + Math.floor((Math.random() * 3)));
walking = false;
walkingSpeed = (2 + (Math.random() * 2));
hangingTime = (1000 + (Math.random() * 1000));
}
override public function GetDamage():Number{
return (6);
}
function frame10(){
HideColliders();
gotoAndPlay(1);
}
function frame14(){
HideColliders();
}
function frame16(){
HideColliders();
}
function frame15(){
HideColliders();
}
function frame17(){
HideColliders();
}
function frame2(){
HideColliders();
}
function frame3(){
HideColliders();
}
function frame4(){
HideColliders();
}
function frame7(){
HideColliders();
}
function frame19(){
HideColliders();
}
function frame23(){
HideColliders();
}
function frame5(){
HideColliders();
}
function frame6(){
HideColliders();
}
function frame13(){
HideColliders();
}
function frame1(){
HideColliders();
}
function frame22(){
HideColliders();
}
function frame25(){
HideColliders();
}
function frame9(){
HideColliders();
}
function frame24(){
HideColliders();
}
function frame26(){
HideColliders();
}
function frame8(){
HideColliders();
}
function frame21(){
HideColliders();
}
function frame11(){
HideColliders();
}
function frame27(){
HideColliders();
}
function frame29(){
HideColliders();
}
function frame36(){
HideColliders();
}
function frame30(){
HideColliders();
}
function frame12(){
HideColliders();
}
function frame28(){
HideColliders();
}
function frame35(){
HideColliders();
}
function frame20(){
HideColliders();
}
function frame38(){
HideColliders();
gotoAndPlay(11);
}
function frame18(){
HideColliders();
}
function frame32(){
HideColliders();
}
function frame34(){
HideColliders();
}
function frame39(){
HideColliders();
}
function frame43(){
HideColliders();
}
function frame31(){
HideColliders();
}
function frame33(){
HideColliders();
}
function frame37(){
HideColliders();
}
function frame45(){
HideColliders();
}
function frame47(){
HideColliders();
}
function frame42(){
HideColliders();
}
function frame46(){
HideColliders();
}
function frame40(){
HideColliders();
}
function frame41(){
HideColliders();
}
function frame44(){
HideColliders();
}
function frame48(){
HideColliders();
}
function frame49(){
HideColliders();
}
function frame53(){
HideColliders();
}
function frame54(){
HideColliders();
}
function frame55(){
HideColliders();
}
function frame56(){
HideColliders();
}
function frame52(){
HideColliders();
}
function frame57(){
HideColliders();
}
function frame50(){
HideColliders();
}
function frame59(){
HideColliders();
}
function frame51(){
HideColliders();
}
function frame60(){
HideColliders();
}
function frame58(){
HideColliders();
gotoAndPlay(1);
}
function frame62(){
HideColliders();
}
function frame63(){
HideColliders();
}
function frame64(){
HideColliders();
}
function frame66(){
HideColliders();
}
function frame67(){
HideColliders();
}
function frame61(){
HideColliders();
}
function frame68(){
HideColliders();
}
function frame69(){
HideColliders();
}
private function HangAround(_arg1:State_InGame, _arg2:Player){
if (Math.abs((pos.x - _arg2.pos.x)) > 10){
LookAtPlayer(_arg2);
};
if ((_arg1._time - hangingBegin) < (hangingTime * 0.7)){
MoveBackFromPlayer(_arg1, _arg2);
} else {
if (currentFrame >= walkingStart){
walking = false;
gotoAndPlay(1);
};
};
if ((_arg1._time - hangingBegin) > hangingTime){
iaStatus = 2;
};
}
function frame70(){
HideColliders();
}
function frame72(){
HideColliders();
}
function frame73(){
HideColliders();
}
function frame75(){
HideColliders();
}
function frame77(){
HideColliders();
}
function frame76(){
HideColliders();
}
function frame78(){
HideColliders();
}
function frame65(){
HideColliders();
}
function frame74(){
HideColliders();
}
function frame80(){
HideColliders();
}
function frame71(){
HideColliders();
}
function frame86(){
HideColliders();
}
function frame82(){
HideColliders();
}
function frame83(){
HideColliders();
}
function frame84(){
HideColliders();
}
function frame85(){
HideColliders();
}
function frame87(){
HideColliders();
gotoAndPlay(85);
}
function frame89(){
HideColliders();
}
function frame81(){
HideColliders();
}
function frame88(){
HideColliders();
}
function frame79(){
HideColliders();
died = true;
stop();
}
function frame91(){
HideColliders();
}
function frame92(){
HideColliders();
falling = false;
gotoAndPlay(1);
}
function frame90(){
HideColliders();
}
override public function UpdateIA(_arg1:State_InGame, _arg2:Player):void{
if ((((((((died == true)) || ((health < 0)))) || ((flying == true)))) || ((falling == true)))){
return;
};
distanceX = Math.abs((pos.x - _arg2.pos.x));
distanceY = Math.abs((pos.y - _arg2.pos.y));
distance2 = ((distanceX * distanceX) + (distanceY * distanceY));
switch (iaStatus){
case 0:
hangingBegin = _arg1._time;
lifeTime = _arg1._time;
iaStatus = 1;
LookAtPlayer(_arg2);
break;
case 1:
HangAround(_arg1, _arg2);
break;
case 2:
default:
if (distanceX > 20){
LookAtPlayer(_arg2);
};
if ((((distanceX > 150)) || ((distanceY > 20)))){
MoveNearPlayer(_arg1, _arg2);
} else {
if ((((_arg2.dying == false)) && (((_arg1._time - lastShot) > 2000)))){
walking = false;
hit = false;
gotoAndPlay(41);
lastShot = _arg1._time;
} else {
if (currentFrame < walkingStart){
hangingBegin = _arg1._time;
hangingTime = (1000 + (Math.random() * 2000));
iaStatus = 1;
};
};
};
break;
};
if (pos.y < (_arg1.bounds.bottom - _arg1.movingHeight)){
pos.y = (_arg1.bounds.bottom - _arg1.movingHeight);
};
if (pos.y > (_arg1.bounds.bottom + 30)){
pos.y = (_arg1.bounds.bottom + 30);
};
}
private function MoveBackFromPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 0:
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
} else {
if (distanceY < 15){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
};
break;
case 1:
if (distanceY < 15){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
} else {
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
};
break;
case 2:
if (distanceX < 350){
pos.x = (pos.x + ((-(charDir) * walkingSpeed) * 0.5));
};
if (distanceY < 15){
pos.y = (pos.y + ((-(charDirY) * walkingSpeed) * 0.5));
};
break;
};
};
}
private function MoveNearPlayer(_arg1:State_InGame, _arg2:Player){
if (walking == false){
walking = true;
gotoAndPlay(walkingStart);
} else {
switch (dirPriority){
case 1:
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
} else {
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
};
break;
case 2:
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
} else {
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
};
};
break;
case 3:
if (distanceX > 100){
pos.x = (pos.x + (charDir * walkingSpeed));
};
if (distanceY > 15){
pos.y = (pos.y + (charDirY * walkingSpeed));
};
break;
};
};
}
}
}//package ThisGame
Section 42
//State_GameOverMenu (ThisGame.State_GameOverMenu)
package ThisGame {
import flash.display.*;
import flash.events.*;
import FoofaCore.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
public class State_GameOverMenu implements FSM_State {
private var submitClip:DisplayObjectContainer;
private var outputText:TextField;
private var menuClip:DisplayObjectContainer;
private var scoreText:TextField;
private var app:Main_Application;
var g_UrlLoader:URLLoader;// = null
private var gameStage:DisplayObjectContainer;
private var nickText:TextField;
public function State_GameOverMenu(_arg1:Main_Application, _arg2:DisplayObjectContainer):void{
g_UrlLoader = null;
super();
app = _arg1;
gameStage = _arg2;
}
function random(_arg1:int):int{
return (int((Math.random() * _arg1)));
}
public function Step():void{
}
function BackButtonPressed(_arg1:MouseEvent){
app.ChangeState(new State_MainMenu(app, gameStage));
}
function goToUrl(_arg1:String):void{
var success:Boolean;
var url = _arg1;
success = false;
if (((ExternalInterface.available) && (!((Capabilities.playerType == "External"))))){
try {
ExternalInterface.call("window.open", url, "win", "");
success = true;
} catch(error:Error) {
} catch(error:SecurityError) {
};
};
if (success != true){
navigateToURL(new URLRequest(url), "_BLANK");
};
}
function submitOurScore(_arg1:String, _arg2:uint):void{
var url_data:*;
var url:URLRequest;
var url_loader:URLLoader;
var playerName = _arg1;
var playerScore = _arg2;
url_data = new URLVariables();
url_data.name = playerName;
url_data.score = playerScore;
url_data.gameId = "297";
url_data.gameVersion = "1.0";
url_data.key = (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((random(8).toString() + random(0).toString()) + random(9).toString()) + random(9).toString()) + random(2).toString()) + random(7).toString()) + random(9).toString()) + random(1).toString()) + random(4).toString()) + random(5).toString()) + random(0).toString()) + random(2).toString()) + random(2).toString()) + random(5).toString()) + random(7).toString()) + random(2).toString()) + random(7).toString()) + random(6).toString()) + random(8).toString()) + random(4).toString()) + random(0).toString()) + random(8).toString()) + random(9).toString()) + random(4).toString()) + random(3).toString()) + random(3).toString()) + random(8).toString()) + random(5).toString()) + random(3).toString()) + random(9).toString()) + random(5).toString()) + random(1).toString()) + random(0).toString()) + random(4).toString()) + random(1).toString()) + random(3).toString()) + random(1).toString()) + random(0).toString()) + random(4).toString()) + random(6).toString()) + random(6).toString()) + random(5).toString()) + random(8).toString()) + random(8).toString()) + random(0).toString()) + random(5).toString()) + random(1).toString()) + random(7).toString()) + random(2).toString()) + random(9).toString()) + random(1).toString()) + random(2).toString()) + random(7).toString()) + random(1).toString()) + random(6).toString()) + random(1).toString()) + random(5).toString()) + random(5).toString()) + random(7).toString()) + random(8).toString()) + random(5).toString()) + random(3).toString()) + random(0).toString()) + random(6).toString()) + random(7).toString()) + random(1).toString()) + random(9).toString()) + random(9).toString()) + random(1).toString()) + random(4).toString()) + random(5).toString()) + random(8).toString()) + random(9).toString()) + random(4).toString()) + random(6).toString()) + random(0).toString()) + random(0).toString()) + random(7).toString()) + random(7).toString()) + random(2).toString()) + random(6).toString()) + random(9).toString()) + random(5).toString()) + random(4).toString()) + random(1).toString()) + random(2).toString()) + random(5).toString()) + random(6).toString()) + random(8).toString()) + random(3).toString()) + random(5).toString()) + random(3).toString()) + random(6).toString()) + random(5).toString()) + random(9).toString()) + random(3).toString()) + random(7).toString()) + random(9).toString()) + random(3).toString()) + random(9).toString()) + random(4).toString()) + random(9).toString()) + random(7).toString()) + random(4).toString()) + random(3).toString()) + random(3).toString()) + random(5).toString()) + random(3).toString()) + random(1).toString()) + random(3).toString()) + random(6).toString()) + random(7).toString()) + random(2).toString()) + random(1).toString()) + random(1).toString()) + random(4).toString()) + random(4).toString()) + random(7).toString()) + random(0).toString()) + random(2).toString()) + random(0).toString()) + random(5).toString()) + random(5).toString()) + random(6).toString()) + random(1).toString()) + random(5).toString()) + random(0).toString()) + random(9).toString());
url = new URLRequest("http://scores.crazymonkeygames.com/hs/regscores.php");
url.method = URLRequestMethod.POST;
url.data = url_data;
url_loader = new URLLoader();
g_UrlLoader = url_loader;
url_loader.addEventListener("complete", function (_arg1:Event){
var _local2:URLVariables;
_local2 = new URLVariables(url_loader.data.replace("&", ""));
if (_local2.ok == 1){
goToUrl("http://scores.crazymonkeygames.com/hs/listscores.php?id=297");
} else {
if (_local2.ok == 0){
} else {
if (_local2.ok == 2){
goToUrl("http://scores.crazymonkeygames.com/hs/pleaseupdate.php");
};
};
};
});
url_loader.addEventListener("ioError", function (_arg1:IOErrorEvent){
});
url_loader.load(url);
}
function ContinueButtonPressed(_arg1:MouseEvent){
var _local2:MovieClip;
switch (app.thisLevel){
case 1:
_local2 = MovieClip(new Level_1());
break;
case 2:
_local2 = MovieClip(new Level_2());
break;
case 3:
_local2 = MovieClip(new Level_3());
break;
};
app.ChangeState(new State_InGame(app, gameStage, _local2));
}
function SubmitButtonPressed(_arg1:MouseEvent){
if (((!((nickText.text == ""))) && (!((nickText.text == "nickgame"))))){
submitOurScore(nickText.text, app.points);
submitClip.visible = false;
};
}
public function End():void{
gameStage.removeChild(menuClip);
submitClip = null;
scoreText = null;
menuClip = null;
}
public function Init():void{
menuClip = new GameOverMenu();
menuClip.getChildByName("backBtn").addEventListener(MouseEvent.MOUSE_UP, BackButtonPressed);
menuClip.getChildByName("continueBtn").addEventListener(MouseEvent.MOUSE_UP, ContinueButtonPressed);
submitClip = DisplayObjectContainer(menuClip.getChildByName("submitClip"));
submitClip.getChildByName("submitBtn").addEventListener(MouseEvent.MOUSE_UP, SubmitButtonPressed);
nickText = TextField(submitClip.getChildByName("nickInput"));
scoreText = TextField(submitClip.getChildByName("scoreTextField"));
scoreText.text = ("" + app.points);
submitClip.visible = true;
gameStage.addChild(menuClip);
}
}
}//package ThisGame
Section 43
//State_InGame (ThisGame.State_InGame)
package ThisGame {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import FoofaCore.*;
import FoofaGeom.*;
import flash.media.*;
import FoofaView.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class State_InGame implements FSM_State {
public const movingHeight:Number = 160;
private const screenHeight:Number = 480;
private const screenWidth:Number = 660;
private var skyClip:MovieClip;
private var fps_txt:TextField;
public var abortMoreGames:DisplayObject;
private var abortWnd:AbortGameWnd;
private var app:Main_Application;
public var camera:Camera2d_FollowTargetInBounds;
private var _deltaTime:Number;
private var gameStage:DisplayObjectContainer;
private var _physicStep:Number;
private var gui:DisplayObjectContainer;
private var overClip:MovieClip;
private var bonusesArray:Array;
private var frameRateCounter:FrameRateCounter;
private var goodKeys:Array;
public var _pauseTime:Number;
public var arrowsSign:DisplayObject;
private var lastUpdateFPS:Number;
private var comboSign:MovieClip;
public var arrowsAudio:Sound;
private var healthMask:MovieClip;
private var worldObject:DisplayObjectContainer;
public var testAudio:Sound;
private var groundClip:MovieClip;
private var leftTarget:Number;
public var debug_txt:TextField;
public var _time:Number;
public var inGameMusic:Sound;
private var _physicCounter:Number;
private var toDepthSortObjectArray;
public var bounds:Rectangle;
private var enemyArray:Array;
private var pauseMode:Boolean;
private var _physicCounterRounded:Number;
private var testCollision:CollisionClip;
private var goSign:MovieClip;
private var playerPos:Point;
private var rightTarget:Number;
private var soundCheckBox:MovieClip;
private var comboText:TextField;
private var waveArray:Array;
public var player:Player;
private var _lastFrameTime:Number;
private var musicCheckBox:MovieClip;
public var _pauseBegin:Number;
private var bloodTemp:DisplayObject;
public static const KEY_LEFT:Number = 37;
public static const shield:Number = 68;
public static const lanceKey:Number = 83;
public static const KEY_DOWN:Number = 40;
public static const shieldKey:Number = 65;
public static const KEY_UP:Number = 38;
public static const KEY_RIGHT:Number = 39;
public function State_InGame(_arg1:Main_Application, _arg2:DisplayObjectContainer, _arg3:DisplayObjectContainer):void{
toDepthSortObjectArray = new Array();
super();
app = _arg1;
gameStage = _arg2;
worldObject = _arg3;
}
public function GameOver():void{
app.ChangeMusic(app.menuMusic);
app.ChangeState(new State_GameOverMenu(app, gameStage));
}
public function RemoveBonus(_arg1:Bonus):void{
var _local2:int;
overClip.removeChild(_arg1);
_local2 = 0;
while (_local2 < bonusesArray.length) {
if (bonusesArray[_local2] == _arg1){
bonusesArray.splice(_local2, 1);
break;
};
_local2++;
};
}
public function ToggleMusic(_arg1:Event):void{
app.music = !(app.music);
if (app.music){
app.musicVolume = 1;
app.musicChannel.soundTransform = new SoundTransform(app.musicVolume);
musicCheckBox.gotoAndStop(2);
} else {
app.musicVolume = 0;
if (app.musicChannel != null){
app.musicChannel.soundTransform = new SoundTransform(app.musicVolume);
};
musicCheckBox.gotoAndStop(1);
};
}
public function PlaySound(_arg1:Sound){
if (app.sound){
_arg1.play();
};
}
function UpdateDepthSort():void{
var _local1:DisplayObject;
var _local2:int;
toDepthSortObjectArray = new Array();
toDepthSortObjectArray.splice(0, toDepthSortObjectArray.length);
while (overClip.numChildren > 0) {
_local1 = overClip.getChildAt(0);
if ((((_local1 is BloodSplash)) && ((BloodSplash(_local1).swapToGround == true)))){
_local1.cacheAsBitmap = true;
groundClip.addChild(_local1);
} else {
toDepthSortObjectArray.push(_local1);
overClip.removeChildAt(0);
};
};
toDepthSortObjectArray.push(player);
toDepthSortObjectArray.sortOn("y", Array.NUMERIC);
_local2 = 0;
while (_local2 < toDepthSortObjectArray.length) {
overClip.addChild(toDepthSortObjectArray[_local2]);
_local2++;
};
}
public function AbortGame(_arg1:Event):void{
app.ChangeMusic(app.menuMusic);
app.ChangeState(new State_MainMenu(app, gameStage));
}
public function Init():void{
frameRateCounter = new FrameRateCounter();
fps_txt = new TextField();
fps_txt.width = 300;
debug_txt = new TextField();
debug_txt.background = true;
debug_txt.width = 100;
debug_txt.height = 100;
debug_txt.x = 500;
debug_txt.y = 440;
gui = new _gui();
arrowsSign = gui.getChildByName("arrowsSign");
if (arrowsSign == null){
throw (new Error("ArrowSign mancante!"));
};
arrowsSign.visible = false;
goSign = MovieClip(gui.getChildByName("goSign"));
if (goSign == null){
throw (new Error("goSign mancante!"));
};
comboSign = MovieClip(gui.getChildByName("comboSign"));
if (comboSign == null){
throw (new Error("comboSign mancante!"));
};
comboText = TextField(comboSign.getChildByName("comboText"));
comboSign.alpha = 0;
healthMask = MovieClip(MovieClip(gui.getChildByName("healthBar")).getChildByName("maskLife"));
overClip = new MovieClip();
groundClip = new MovieClip();
worldObject.addChild(groundClip);
worldObject.addChild(overClip);
skyClip = new cielosfondo();
gameStage.addChild(skyClip);
gameStage.addChild(worldObject);
gameStage.addChild(gui);
player = Player(worldObject.getChildByName("main_character"));
if (player == null){
throw (new Error("Movieclip main_character not found"));
};
leftTarget = 0;
rightTarget = 1500;
bounds = new Rectangle(leftTarget, 0, rightTarget, 480);
camera = new Camera2d_FollowTargetInBounds(worldObject, player.pos, screenWidth, screenHeight, bounds);
gameStage.stage.quality = StageQuality.MEDIUM;
Key.initialize(gameStage.stage);
gameStage.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.keyPressed, true, 1);
gameStage.stage.addEventListener(KeyboardEvent.KEY_UP, this.keyReleased, true, 1);
gameStage.stage.focus = gameStage;
goodKeys = new Array(KEY_UP, KEY_DOWN, KEY_RIGHT, KEY_LEFT, shieldKey, lanceKey, shield);
InitWaves();
enemyArray = new Array();
bonusesArray = new Array();
_lastFrameTime = getTimer();
_physicStep = 30;
_physicCounter = 0;
lastUpdateFPS = 0;
pauseMode = false;
abortWnd = new AbortGameWnd();
musicCheckBox = MovieClip(abortWnd.getChildByName("music"));
soundCheckBox = MovieClip(abortWnd.getChildByName("sound"));
musicCheckBox.addEventListener(MouseEvent.CLICK, ToggleMusic);
soundCheckBox.addEventListener(MouseEvent.CLICK, ToggleSound);
abortWnd.getChildByName("yesBtn").addEventListener(MouseEvent.CLICK, AbortGame);
abortWnd.getChildByName("noBtn").addEventListener(MouseEvent.CLICK, CancelAbortGame);
_pauseTime = 0;
inGameMusic = new game_music();
testAudio = new sound_arrow();
app.bridge = app.bridgeMusic;
app.nextMusic = app.gameMusic;
arrowsAudio = new frecce();
frameRateCounter.Play();
}
function EnableWave(_arg1:Wave):void{
var _local2:int;
var _local3:DisplayObject;
_local2 = 0;
while (_local2 < _arg1.numChildren) {
_local3 = _arg1.getChildAt(_local2);
if ((_local3 is Png)){
AddEnemy(Png(_local3), (Png(_local3).pos.x + _arg1.x), (Png(_local3).pos.y + _arg1.y));
_local2--;
};
if ((_local3 is Bonus)){
Bonus(_local3).x = (Bonus(_local3).x + _arg1.x);
Bonus(_local3).y = (Bonus(_local3).y + _arg1.y);
overClip.addChild(_local3);
bonusesArray.push(_local3);
_local2--;
};
_local2++;
};
leftTarget = _arg1.leftBound;
rightTarget = _arg1.rightBound;
}
private function InitWaves():void{
var _local1:Wave;
var _local2:int;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
var _local6:int;
waveArray = new Array();
_local2 = 0;
while (_local2 < worldObject.numChildren) {
if ((worldObject.getChildAt(_local2) is Wave)){
_local1 = Wave(worldObject.getChildAt(_local2));
_local3 = false;
_local4 = false;
_local5 = false;
_local6 = 0;
while (_local6 < _local1.numChildren) {
if ((_local1.getChildAt(_local6) is Left_wave_bound)){
_local4 = true;
_local1.leftBound = (_local1.x + _local1.getChildAt(_local6).x);
} else {
if ((_local1.getChildAt(_local6) is Right_wave_bound)){
_local5 = true;
_local1.rightBound = (_local1.x + _local1.getChildAt(_local6).x);
} else {
if ((_local1.getChildAt(_local6) is Trigger_wave)){
_local3 = true;
_local1.triggerX = (_local1.x + _local1.getChildAt(_local6).x);
};
};
};
_local6++;
};
if ((((((_local3 == true)) && ((_local4 == true)))) && ((_local5 == true)))){
_local1.triggered = false;
waveArray.push(_local1);
worldObject.removeChild(_local1);
_local2--;
} else {
if (_local3 == false){
};
if (_local4 == false){
};
if (_local5 == false){
};
};
};
_local2++;
};
}
private function UpdateInput():void{
if ((((pauseMode == false)) && (Key.isDown(27)))){
_pauseBegin = _time;
pauseMode = true;
gameStage.addChild(abortWnd);
} else {
if (pauseMode == false){
player.UpdateInput(this, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, lanceKey, shieldKey);
};
};
}
public function AddEnemy(_arg1:Png, _arg2:Number, _arg3:Number){
_arg1.pos.x = _arg2;
_arg1.pos.y = _arg3;
_arg1.x = _arg1.pos.x;
_arg1.y = _arg1.pos.y;
if ((_arg1 is Png_freccia)){
arrowsSign.visible = true;
Png_freccia(_arg1).sign = arrowsSign;
};
overClip.addChild(_arg1);
enemyArray.push(_arg1);
}
public function UpdateGui():void{
healthMask.scaleY = (player.health / player.maxHealth);
if (player.comboCount > 2){
if (comboSign.alpha < 1){
comboSign.alpha = (comboSign.alpha + 0.1);
};
comboText.text = ("" + player.comboCount);
} else {
if (comboSign.alpha > 0){
comboSign.alpha = (comboSign.alpha - 0.1);
};
};
}
public function End():void{
while (gameStage.numChildren > 0) {
gameStage.removeChildAt(0);
};
frameRateCounter.Stop();
overClip = null;
groundClip = null;
playerPos = null;
frameRateCounter = null;
fps_txt = null;
debug_txt = null;
bounds = null;
camera = null;
gui = null;
abortWnd = null;
enemyArray = null;
}
private function keyPressed(_arg1:KeyboardEvent):void{
var _local2:Number;
if (Key.isDown(_arg1.keyCode) == false){
_local2 = 0;
while (_local2 < goodKeys.length) {
if (_arg1.keyCode == 68){
player.scudoPremuto = true;
} else {
player.scudoPremuto = false;
};
if (_arg1.keyCode == goodKeys[_local2]){
player.OnKeyPressed(this, Number(_arg1.keyCode));
break;
};
_local2++;
};
};
}
private function keyReleased(_arg1:KeyboardEvent):void{
var _local2:Number;
_local2 = 0;
while (_local2 < goodKeys.length) {
if (_arg1.keyCode == 68){
player.scudoPremuto = false;
};
if (_arg1.keyCode == goodKeys[_local2]){
player.OnKeyReleased(this, Number(_arg1.keyCode));
break;
};
_local2++;
};
}
function CheckWaveTriggers(){
var _local1:Number;
_local1 = 0;
while (_local1 < waveArray.length) {
if (player.x > waveArray[_local1].triggerX){
EnableWave(waveArray[_local1]);
waveArray.splice(_local1, 1);
break;
};
_local1++;
};
}
public function CancelAbortGame(_arg1:Event):void{
pauseMode = false;
gameStage.removeChild(abortWnd);
}
public function Step():void{
var _local1:int;
var _local2:int;
var _local3:int;
gameStage.stage.focus = gameStage;
frameRateCounter.OnFrameStep();
_time = getTimer();
_time = (_time - _pauseTime);
_deltaTime = (_time - _lastFrameTime);
if ((_time - lastUpdateFPS) > 1000){
lastUpdateFPS = _time;
this.fps_txt.text = ((("fps: " + frameRateCounter.fps.toPrecision(3)) + " , avgfps: ") + frameRateCounter.averageFps.toPrecision(3));
};
if (pauseMode == false){
_local2 = 0;
while (_local2 < bonusesArray.length) {
bonusesArray[_local2].Step(this, player);
_local2++;
};
UpdateInput();
player.UpdateCharacter(this);
player.CollisionBounds(bounds, movingHeight);
player.Step(this);
player.x = player.pos.x;
player.y = player.pos.y;
camera.Update();
UpdateDepthSort();
if (player.dying == false){
UpdateEnemies();
};
UpdateGui();
UpdateLogic();
};
_lastFrameTime = _time;
}
public function CompleteMission():void{
app.points = (app.points + (app.thisLevel * 100000));
if (app.thisLevel < app.maxLevel){
app.ChangeState(new State_MissionComplete(app, gameStage));
} else {
app.ChangeMusic(app.menuMusic);
app.ChangeState(new State_WinGameOverMenu(app, gameStage));
};
}
public function ToggleSound(_arg1:Event):void{
app.sound = !(app.sound);
if (app.sound){
soundCheckBox.gotoAndStop(2);
} else {
soundCheckBox.gotoAndStop(1);
};
}
function UpdateLogic():void{
if (player.died){
GameOver();
return;
};
if (waveArray.length == 0){
CompleteMission();
return;
};
if (enemyArray.length == 0){
if (goSign.visible == false){
goSign.gotoAndPlay(1);
};
goSign.visible = true;
rightTarget = 20000;
CheckWaveTriggers();
camera.leftBound = leftTarget;
} else {
goSign.visible = false;
};
if (camera.rightBound < rightTarget){
camera.rightBound = (camera.rightBound + 5);
} else {
camera.rightBound = rightTarget;
};
}
private function UpdateEnemies():void{
var _local1:Number;
var _local2:*;
var _local3:Number;
_local1 = 0;
while (_local1 < enemyArray.length) {
enemyArray[_local1].Step(this);
enemyArray[_local1].UpdateIA(this, player);
if (enemyArray[_local1].died == true){
enemyArray.splice(_local1, 1);
_local1--;
} else {
if (Math.abs((player.pos.y - enemyArray[_local1].pos.y)) < 22){
if (((((((!((enemyArray[_local1].weaponClip == null))) && (!((player.colliderClip == null))))) && ((enemyArray[_local1].hit == false)))) && ((enemyArray[_local1].weaponClip.hitTestObject(player.colliderClip) == true)))){
if (player.scudoPremuto == false){
enemyArray[_local1].hit = true;
player.OnHit(this, enemyArray[_local1].GetDamage());
bloodTemp = player.ThrowBloodSplashPlayer();
bloodTemp.x = player.x;
bloodTemp.y = (player.y + 1);
bloodTemp.scaleX = (1.5 + (Math.random() * 0.5));
bloodTemp.scaleY = bloodTemp.scaleX;
overClip.addChild(bloodTemp);
};
};
if (((((!((player.weaponClip == null))) && (!((enemyArray[_local1].colliderClip == null))))) && ((player.weaponClip.hitTestObject(enemyArray[_local1].colliderClip) == true)))){
_local2 = false;
_local3 = 0;
while (_local3 < enemyArray.length) {
if (enemyArray[_local1] == player.hitArray[_local3]){
_local2 = true;
break;
};
_local3++;
};
if (_local2 == false){
player.hitArray.push(enemyArray[_local1]);
enemyArray[_local1].OnHit(this, player.GetDamage(this), player.GetFlyForce());
player.lastHit = _time;
player.comboCount++;
app.points = (app.points + (player.comboCount * 10));
bloodTemp = player.ThrowBloodSplash();
bloodTemp.x = enemyArray[_local1].x;
bloodTemp.y = (enemyArray[_local1].y + 1);
bloodTemp.scaleX = (1.5 + (Math.random() * 0.5));
bloodTemp.scaleY = bloodTemp.scaleX;
if ((bloodTemp.x - player.x) > 0){
bloodTemp.scaleX = -(bloodTemp.scaleX);
};
overClip.addChild(bloodTemp);
};
};
};
};
_local1++;
};
}
}
}//package ThisGame
Section 44
//State_InstructionMenu (ThisGame.State_InstructionMenu)
package ThisGame {
import flash.display.*;
import flash.events.*;
import FoofaCore.*;
public class State_InstructionMenu implements FSM_State {
private var app:Main_Application;
private var viewed:Boolean;
private var gameStage:DisplayObjectContainer;
private var menuClip:DisplayObjectContainer;
public function State_InstructionMenu(_arg1:Main_Application, _arg2:DisplayObjectContainer):void{
app = _arg1;
gameStage = _arg2;
menuClip = new InstructionMenu();
viewed = false;
}
public function End():void{
gameStage.removeChild(menuClip);
menuClip = null;
}
public function Init():void{
menuClip.getChildByName("playBtn2").addEventListener(MouseEvent.MOUSE_UP, buttonPressed);
}
function buttonPressed(_arg1:MouseEvent){
var _local2:MovieClip;
if ((((viewed == false)) && ((MovieClip(MovieClip(menuClip.getChildByName("intro1")).getChildByName("intro2")).currentFrame < 555)))){
MovieClip(MovieClip(menuClip.getChildByName("intro1")).getChildByName("intro2")).gotoAndPlay(555);
} else {
app.thisLevel = 1;
_local2 = MovieClip(new Level_1());
app.ChangeState(new State_InGame(app, gameStage, _local2));
};
}
public function Step():void{
gameStage.addChild(menuClip);
}
}
}//package ThisGame
Section 45
//State_MainMenu (ThisGame.State_MainMenu)
package ThisGame {
import flash.display.*;
import flash.events.*;
import FoofaCore.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
public class State_MainMenu implements FSM_State {
private var btn_pm:DisplayObject;
private var btn_foofa:DisplayObject;
private var btn_xplored:DisplayObject;
private var menuClip:DisplayObjectContainer;
private var app:Main_Application;
private var gameStage:DisplayObjectContainer;
private var btn_more:DisplayObject;
private var scoresBtn:DisplayObject;
public function State_MainMenu(_arg1:Main_Application, _arg2:DisplayObjectContainer):void{
app = _arg1;
gameStage = _arg2;
menuClip = new MainMenu();
}
public function Step():void{
gameStage.addChild(menuClip);
}
public function End():void{
gameStage.removeChild(menuClip);
menuClip = null;
}
function onClickXplored(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.xplored.com/play/"), "_blank");
}
function buttonPressed(_arg1:MouseEvent){
app.ChangeState(new State_InstructionMenu(app, gameStage));
}
function onClickFoofa(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.foofa.net"), "_blank");
}
function onClickMore(_arg1:Event):void{
goToUrl("http://www.crazymonkeygames.com");
}
function onClickScore(_arg1:Event):void{
goToUrl("http://scores.crazymonkeygames.com/hs/listscores.php?id=297");
}
function goToUrl(_arg1:String):void{
var success:Boolean;
var url = _arg1;
success = false;
if (((ExternalInterface.available) && (!((Capabilities.playerType == "External"))))){
try {
ExternalInterface.call("window.open", url, "win", "");
success = true;
} catch(error:Error) {
} catch(error:SecurityError) {
};
};
if (success != true){
navigateToURL(new URLRequest(url), "_BLANK");
};
}
function onClickPM(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.pmstudios.it"), "_blank");
}
public function Init():void{
menuClip.getChildByName("playBtn").addEventListener(MouseEvent.MOUSE_UP, buttonPressed);
app.points = 0;
app.thisLevel = 1;
btn_pm = menuClip.getChildByName("PmBtn");
btn_xplored = menuClip.getChildByName("xploredBtn");
btn_foofa = menuClip.getChildByName("foofaBtn");
btn_more = menuClip.getChildByName("moregamesBtn");
scoresBtn = menuClip.getChildByName("scoresBtn");
btn_more.addEventListener(MouseEvent.MOUSE_UP, onClickMore);
btn_foofa.addEventListener(MouseEvent.MOUSE_UP, onClickFoofa);
btn_xplored.addEventListener(MouseEvent.MOUSE_UP, onClickXplored);
btn_pm.addEventListener(MouseEvent.MOUSE_UP, onClickPM);
scoresBtn.addEventListener(MouseEvent.MOUSE_UP, onClickScore);
}
}
}//package ThisGame
Section 46
//State_MissionComplete (ThisGame.State_MissionComplete)
package ThisGame {
import flash.display.*;
import flash.events.*;
import FoofaCore.*;
import flash.text.*;
public class State_MissionComplete implements FSM_State {
private var app:Main_Application;
private var gameStage:DisplayObjectContainer;
private var menuClip:LevelCompleteMenu;
private var levelText:TextField;
private var scoreText:TextField;
public function State_MissionComplete(_arg1:Main_Application, _arg2:DisplayObjectContainer):void{
app = _arg1;
gameStage = _arg2;
}
public function End():void{
gameStage.removeChild(menuClip);
scoreText = null;
levelText = null;
menuClip = null;
}
function backButtonPressed(_arg1:MouseEvent){
app.ChangeState(new State_MainMenu(app, gameStage));
}
public function Init():void{
menuClip = new LevelCompleteMenu();
gameStage.addChild(menuClip);
menuClip.getChildByName("nextBtn").addEventListener(MouseEvent.MOUSE_UP, nextButtonPressed);
scoreText = TextField(menuClip.getChildByName("scoreTxt"));
scoreText.text = ("Score: " + app.points);
levelText = TextField(menuClip.getChildByName("levelTxt"));
levelText.text = (("Level " + app.thisLevel) + " complete");
}
function nextButtonPressed(_arg1:MouseEvent){
var _local2:MovieClip;
app.thisLevel++;
switch (app.thisLevel){
case 1:
_local2 = MovieClip(new Level_1());
break;
case 2:
_local2 = MovieClip(new Level_2());
break;
case 3:
_local2 = MovieClip(new Level_3());
break;
};
app.ChangeState(new State_InGame(app, gameStage, _local2));
}
public function Step():void{
}
}
}//package ThisGame
Section 47
//State_WinGameOverMenu (ThisGame.State_WinGameOverMenu)
package ThisGame {
import flash.display.*;
import flash.events.*;
import FoofaCore.*;
import flash.text.*;
import flash.net.*;
import flash.external.*;
import flash.system.*;
public class State_WinGameOverMenu implements FSM_State {
private var submitClip:DisplayObjectContainer;
private var menuClip:DisplayObjectContainer;
private var scoreText:TextField;
private var app:Main_Application;
var g_UrlLoader:URLLoader;// = null
private var gameStage:DisplayObjectContainer;
private var nickText:TextField;
public function State_WinGameOverMenu(_arg1:Main_Application, _arg2:DisplayObjectContainer):void{
g_UrlLoader = null;
super();
app = _arg1;
gameStage = _arg2;
menuClip = new WinGameOverMenu();
}
function random(_arg1:int):int{
return (int((Math.random() * _arg1)));
}
public function Step():void{
}
function BackButtonPressed(_arg1:MouseEvent){
app.ChangeState(new State_MainMenu(app, gameStage));
}
function goToUrl(_arg1:String):void{
var success:Boolean;
var url = _arg1;
success = false;
if (((ExternalInterface.available) && (!((Capabilities.playerType == "External"))))){
try {
ExternalInterface.call("window.open", url, "win", "");
success = true;
} catch(error:Error) {
} catch(error:SecurityError) {
};
};
if (success != true){
navigateToURL(new URLRequest(url), "_BLANK");
};
}
function submitOurScore(_arg1:String, _arg2:uint):void{
var url_data:*;
var url:URLRequest;
var url_loader:URLLoader;
var playerName = _arg1;
var playerScore = _arg2;
url_data = new URLVariables();
url_data.name = playerName;
url_data.score = playerScore;
url_data.gameId = "297";
url_data.gameVersion = "1.0";
url_data.key = (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((random(8).toString() + random(0).toString()) + random(9).toString()) + random(9).toString()) + random(2).toString()) + random(7).toString()) + random(9).toString()) + random(1).toString()) + random(4).toString()) + random(5).toString()) + random(0).toString()) + random(2).toString()) + random(2).toString()) + random(5).toString()) + random(7).toString()) + random(2).toString()) + random(7).toString()) + random(6).toString()) + random(8).toString()) + random(4).toString()) + random(0).toString()) + random(8).toString()) + random(9).toString()) + random(4).toString()) + random(3).toString()) + random(3).toString()) + random(8).toString()) + random(5).toString()) + random(3).toString()) + random(9).toString()) + random(5).toString()) + random(1).toString()) + random(0).toString()) + random(4).toString()) + random(1).toString()) + random(3).toString()) + random(1).toString()) + random(0).toString()) + random(4).toString()) + random(6).toString()) + random(6).toString()) + random(5).toString()) + random(8).toString()) + random(8).toString()) + random(0).toString()) + random(5).toString()) + random(1).toString()) + random(7).toString()) + random(2).toString()) + random(9).toString()) + random(1).toString()) + random(2).toString()) + random(7).toString()) + random(1).toString()) + random(6).toString()) + random(1).toString()) + random(5).toString()) + random(5).toString()) + random(7).toString()) + random(8).toString()) + random(5).toString()) + random(3).toString()) + random(0).toString()) + random(6).toString()) + random(7).toString()) + random(1).toString()) + random(9).toString()) + random(9).toString()) + random(1).toString()) + random(4).toString()) + random(5).toString()) + random(8).toString()) + random(9).toString()) + random(4).toString()) + random(6).toString()) + random(0).toString()) + random(0).toString()) + random(7).toString()) + random(7).toString()) + random(2).toString()) + random(6).toString()) + random(9).toString()) + random(5).toString()) + random(4).toString()) + random(1).toString()) + random(2).toString()) + random(5).toString()) + random(6).toString()) + random(8).toString()) + random(3).toString()) + random(5).toString()) + random(3).toString()) + random(6).toString()) + random(5).toString()) + random(9).toString()) + random(3).toString()) + random(7).toString()) + random(9).toString()) + random(3).toString()) + random(9).toString()) + random(4).toString()) + random(9).toString()) + random(7).toString()) + random(4).toString()) + random(3).toString()) + random(3).toString()) + random(5).toString()) + random(3).toString()) + random(1).toString()) + random(3).toString()) + random(6).toString()) + random(7).toString()) + random(2).toString()) + random(1).toString()) + random(1).toString()) + random(4).toString()) + random(4).toString()) + random(7).toString()) + random(0).toString()) + random(2).toString()) + random(0).toString()) + random(5).toString()) + random(5).toString()) + random(6).toString()) + random(1).toString()) + random(5).toString()) + random(0).toString()) + random(9).toString());
url = new URLRequest("http://scores.crazymonkeygames.com/hs/regscores.php");
url.method = URLRequestMethod.POST;
url.data = url_data;
url_loader = new URLLoader();
g_UrlLoader = url_loader;
url_loader.addEventListener("complete", function (_arg1:Event){
var _local2:URLVariables;
_local2 = new URLVariables(url_loader.data.replace("&", ""));
if (_local2.ok == 1){
goToUrl("http://scores.crazymonkeygames.com/hs/listscores.php?id=297");
} else {
if (_local2.ok == 0){
} else {
if (_local2.ok == 2){
goToUrl("http://scores.crazymonkeygames.com/hs/pleaseupdate.php");
};
};
};
});
url_loader.addEventListener("ioError", function (_arg1:IOErrorEvent){
});
url_loader.load(url);
}
function ContinueButtonPressed(_arg1:MouseEvent){
var _local2:MovieClip;
switch (app.thisLevel){
case 1:
_local2 = MovieClip(new Level_1());
break;
case 2:
_local2 = MovieClip(new Level_2());
break;
case 3:
_local2 = MovieClip(new Level_3());
break;
};
app.ChangeState(new State_InGame(app, gameStage, _local2));
}
function SubmitButtonPressed(_arg1:MouseEvent){
if (((!((nickText.text == ""))) && (!((nickText.text == "nickgame"))))){
submitOurScore(nickText.text, app.points);
submitClip.visible = false;
};
}
public function End():void{
gameStage.removeChild(menuClip);
submitClip = null;
scoreText = null;
menuClip = null;
}
public function Init():void{
menuClip = new WinGameOverMenu();
menuClip.getChildByName("backBtn").addEventListener(MouseEvent.MOUSE_UP, BackButtonPressed);
submitClip = DisplayObjectContainer(menuClip.getChildByName("winSubmitClip"));
submitClip.getChildByName("submitBtn").addEventListener(MouseEvent.MOUSE_UP, SubmitButtonPressed);
nickText = TextField(submitClip.getChildByName("nickInput"));
scoreText = TextField(submitClip.getChildByName("scoreTextField"));
scoreText.text = ("" + app.points);
gameStage.addChild(menuClip);
}
}
}//package ThisGame
Section 48
//Wave (ThisGame.Wave)
package ThisGame {
import flash.display.*;
public class Wave extends MovieClip {
public var triggered:Boolean;
public var triggerX:Number;
public var leftBound:Number;
public var rightBound:Number;
}
}//package ThisGame
Section 49
//_gui (_gui)
package {
import flash.display.*;
public dynamic class _gui extends MovieClip {
public var healthBar:MovieClip;
public var comboSign:MovieClip;
public var arrowsSign:MovieClip;
public var goSign:GoSign;
}
}//package
Section 50
//_SpriteSpartano (_SpriteSpartano)
package {
import ThisGame.*;
public dynamic class _SpriteSpartano extends Player {
public function _SpriteSpartano(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 71, frame72, 72, frame73, 75, frame76, 76, frame77, 79, frame80, 83, frame84, 84, frame85, 85, frame86, 86, frame87, 89, frame90, 92, frame93, 96, frame97, 97, frame98, 100, frame101, 106, frame107, 109, frame110, 113, frame114, 117, frame118, 120, frame121, 124, frame125, 125, frame126, 127, frame128, 128, frame129, 142, frame143, 145, frame146, 146, frame147, 156, frame157, 159, frame160, 161, frame162, 179, frame180, 181, frame182, 183, frame184, 187, frame188, 189, frame190, 205, frame206, 212, frame213, 217, frame218, 218, frame219, 226, frame227, 284, frame285, 285, frame286, 298, frame299, 299, frame300, 308, frame309, 313, frame314, 317, frame318, 319, frame320, 322, frame323, 325, frame326, 371, frame372, 372, frame373, 375, frame376, 379, frame380, 380, frame381, 381, frame382, 382, frame383, 384, frame385, 387, frame388);
}
function frame385(){
HideColliders();
}
function frame157(){
canSwapMove = true;
}
function frame388(){
this.nextMove = this.stand;
stop();
HideColliders();
}
function frame160(){
this.nextMove = this.stand;
stop();
}
function frame162(){
HideColliders();
}
function frame286(){
HideColliders();
}
function frame285(){
stop();
}
function frame10(){
canSwapMove = true;
}
function frame14(){
canSwapMove = true;
}
function frame16(){
canSwapMove = true;
}
function frame12(){
canSwapMove = true;
}
function frame15(){
canSwapMove = true;
}
function frame2(){
canSwapMove = true;
}
function frame3(){
canSwapMove = true;
}
function frame6(){
canSwapMove = true;
}
function frame7(){
canSwapMove = true;
}
function frame1(){
canSwapMove = true;
HideColliders();
}
function frame19(){
canSwapMove = true;
}
function frame13(){
canSwapMove = true;
}
function frame9(){
canSwapMove = true;
}
function frame22(){
canSwapMove = true;
}
function frame17(){
canSwapMove = true;
}
function frame5(){
canSwapMove = true;
}
function frame21(){
canSwapMove = true;
}
function frame188(){
canSwapMove = true;
}
function frame4(){
canSwapMove = true;
}
function frame26(){
canSwapMove = true;
}
function frame8(){
canSwapMove = true;
}
function frame24(){
canSwapMove = true;
}
function frame29(){
canSwapMove = true;
}
function frame35(){
canSwapMove = true;
}
function frame23(){
canSwapMove = true;
}
function frame30(){
canSwapMove = true;
}
function frame27(){
canSwapMove = true;
}
function frame28(){
canSwapMove = true;
}
function frame36(){
canSwapMove = true;
}
function frame20(){
canSwapMove = true;
gotoAndPlay(1);
}
function frame38(){
canSwapMove = true;
}
function frame32(){
canSwapMove = true;
}
function frame25(){
canSwapMove = true;
}
function frame11(){
canSwapMove = true;
}
function frame31(){
canSwapMove = true;
}
function frame182(){
HideColliders();
}
function frame33(){
canSwapMove = true;
}
function frame34(){
canSwapMove = true;
}
function frame39(){
canSwapMove = true;
}
function frame43(){
canSwapMove = true;
}
function frame44(){
canSwapMove = true;
gotoAndPlay(21);
}
function frame45(){
canSwapMove = true;
}
function frame40(){
canSwapMove = true;
}
function frame37(){
canSwapMove = true;
}
function frame18(){
canSwapMove = true;
}
function frame41(){
canSwapMove = true;
}
function frame42(){
canSwapMove = true;
}
function frame46(){
canSwapMove = true;
}
function frame47(){
canSwapMove = true;
}
function frame49(){
canSwapMove = true;
}
function frame184(){
HideColliders();
}
function frame48(){
canSwapMove = true;
}
function frame52(){
canSwapMove = true;
}
function frame53(){
canSwapMove = true;
}
function frame54(){
canSwapMove = true;
}
function frame55(){
canSwapMove = true;
}
function frame56(){
canSwapMove = true;
}
function frame51(){
canSwapMove = true;
}
function frame57(){
canSwapMove = true;
}
function frame299(){
canSwapMove = true;
}
function frame300(){
this.nextMove = this.stand;
stop();
}
function frame58(){
canSwapMove = true;
}
function frame59(){
canSwapMove = true;
}
function frame60(){
canSwapMove = true;
}
function frame61(){
canSwapMove = true;
}
function frame63(){
canSwapMove = true;
}
function frame50(){
canSwapMove = true;
}
function frame309(){
HideColliders();
}
function frame62(){
canSwapMove = true;
gotoAndPlay(45);
}
function frame65(){
canSwapMove = true;
}
function frame180(){
this.nextMove = this.stand;
stop();
HideColliders();
}
function frame73(){
canSwapMove = true;
}
function frame64(){
canSwapMove = true;
}
function frame314(){
canSwapMove = true;
}
function frame72(){
canSwapMove = true;
}
function frame84(){
canSwapMove = true;
}
function frame85(){
canSwapMove = true;
}
function frame86(){
}
function frame80(){
canSwapMove = true;
}
function frame77(){
HideColliders();
}
function frame326(){
HideColliders();
}
function frame206(){
HideColliders();
}
function frame87(){
canSwapMove = true;
}
function frame190(){
this.nextMove = this.stand;
stop();
}
function frame76(){
this.nextMove = this.stand;
stop();
}
function frame318(){
this.nextMove = this.stand;
stop();
}
function frame320(){
HideColliders();
}
function frame323(){
this.nextMove = this.stand;
stop();
}
function frame90(){
canSwapMove = true;
}
function frame93(){
HideColliders();
}
function frame98(){
this.nextMove = this.stand;
stop();
}
function frame219(){
canSwapMove = false;
}
function frame218(){
this.nextMove = this.stand;
stop();
}
function frame213(){
canSwapMove = true;
}
function frame97(){
canSwapMove = true;
}
function frame227(){
stop();
}
function frame107(){
canSwapMove = true;
}
function frame101(){
canSwapMove = true;
}
function frame110(){
}
function frame118(){
canSwapMove = true;
}
function frame126(){
HideColliders();
}
function frame128(){
HideColliders();
}
function frame121(){
canSwapMove = false;
}
function frame114(){
canSwapMove = true;
}
function frame129(){
this.nextMove = this.stand;
stop();
}
function frame372(){
died = true;
stop();
}
function frame373(){
HideColliders();
}
function frame376(){
canSwapMove = true;
HideColliders();
}
function frame125(){
canSwapMove = true;
}
function frame382(){
HideColliders();
}
function frame383(){
if (scudoPremuto == true){
gotoAndPlay(382);
};
}
function frame143(){
canSwapMove = true;
}
function frame380(){
canSwapMove = true;
}
function frame146(){
this.nextMove = this.stand;
stop();
}
function frame381(){
canSwapMove = true;
}
function frame147(){
HideColliders();
}
}
}//package
Section 51
//_wave_01 (_wave_01)
package {
import ThisGame.*;
public dynamic class _wave_01 extends Wave {
}
}//package
Section 52
//_wave_02 (_wave_02)
package {
import ThisGame.*;
public dynamic class _wave_02 extends Wave {
}
}//package
Section 53
//_wave_03 (_wave_03)
package {
import ThisGame.*;
public dynamic class _wave_03 extends Wave {
}
}//package
Section 54
//_wave_04 (_wave_04)
package {
import ThisGame.*;
public dynamic class _wave_04 extends Wave {
}
}//package
Section 55
//_wave_05 (_wave_05)
package {
import ThisGame.*;
public dynamic class _wave_05 extends Wave {
}
}//package
Section 56
//_wave_06 (_wave_06)
package {
import ThisGame.*;
public dynamic class _wave_06 extends Wave {
}
}//package
Section 57
//_wave_07 (_wave_07)
package {
import ThisGame.*;
public dynamic class _wave_07 extends Wave {
}
}//package
Section 58
//_wave_08 (_wave_08)
package {
import ThisGame.*;
public dynamic class _wave_08 extends Wave {
}
}//package
Section 59
//_wave_09 (_wave_09)
package {
import ThisGame.*;
public dynamic class _wave_09 extends Wave {
}
}//package
Section 60
//_wave_empty (_wave_empty)
package {
import ThisGame.*;
public dynamic class _wave_empty extends Wave {
}
}//package
Section 61
//AbortGameWnd (AbortGameWnd)
package {
import flash.display.*;
public dynamic class AbortGameWnd extends MovieClip {
public var yesBtn:SimpleButton;
public var sound:MovieClip;
public var music:MovieClip;
public var noBtn:SimpleButton;
public function AbortGameWnd(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 62
//arma_swish_1 (arma_swish_1)
package {
import flash.media.*;
public dynamic class arma_swish_1 extends Sound {
}
}//package
Section 63
//arma_swish_2 (arma_swish_2)
package {
import flash.media.*;
public dynamic class arma_swish_2 extends Sound {
}
}//package
Section 64
//arma_swish_4 (arma_swish_4)
package {
import flash.media.*;
public dynamic class arma_swish_4 extends Sound {
}
}//package
Section 65
//bridge_music (bridge_music)
package {
import flash.media.*;
public dynamic class bridge_music extends Sound {
}
}//package
Section 66
//carne_1 (carne_1)
package {
import flash.media.*;
public dynamic class carne_1 extends Sound {
}
}//package
Section 67
//carne_2 (carne_2)
package {
import flash.media.*;
public dynamic class carne_2 extends Sound {
}
}//package
Section 68
//carne_3 (carne_3)
package {
import flash.media.*;
public dynamic class carne_3 extends Sound {
}
}//package
Section 69
//carne_4 (carne_4)
package {
import flash.media.*;
public dynamic class carne_4 extends Sound {
}
}//package
Section 70
//cielosfondo (cielosfondo)
package {
import flash.display.*;
public dynamic class cielosfondo extends MovieClip {
}
}//package
Section 71
//cliphs (cliphs)
package {
import flash.display.*;
import flash.text.*;
public dynamic class cliphs extends MovieClip {
public var submitBtn:SimpleButton;
public var nickInput:TextField;
public var scoreTextField:TextField;
public var scoreTxt:MovieClip;
}
}//package
Section 72
//colpo_sordo_1 (colpo_sordo_1)
package {
import flash.media.*;
public dynamic class colpo_sordo_1 extends Sound {
}
}//package
Section 73
//frecce (frecce)
package {
import flash.media.*;
public dynamic class frecce extends Sound {
}
}//package
Section 74
//game_music (game_music)
package {
import flash.media.*;
public dynamic class game_music extends Sound {
}
}//package
Section 75
//GameOverMenu (GameOverMenu)
package {
import flash.display.*;
public dynamic class GameOverMenu extends MovieClip {
public var backBtn:SimpleButton;
public var continueBtn:SimpleButton;
public var submitClip:cliphs;
}
}//package
Section 76
//GoSign (GoSign)
package {
import flash.display.*;
public dynamic class GoSign extends MovieClip {
public function GoSign(){
addFrameScript(13, frame14);
}
function frame14(){
gotoAndPlay(7);
}
}
}//package
Section 77
//InstructionMenu (InstructionMenu)
package {
import flash.display.*;
public dynamic class InstructionMenu extends MovieClip {
public var intro1:MovieClip;
public var playBtn2:SimpleButton;
public function InstructionMenu(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 78
//l2_wave_01 (l2_wave_01)
package {
import ThisGame.*;
public dynamic class l2_wave_01 extends Wave {
}
}//package
Section 79
//l2_wave_02 (l2_wave_02)
package {
import ThisGame.*;
public dynamic class l2_wave_02 extends Wave {
}
}//package
Section 80
//l2_wave_03 (l2_wave_03)
package {
import ThisGame.*;
public dynamic class l2_wave_03 extends Wave {
}
}//package
Section 81
//l2_wave_04 (l2_wave_04)
package {
import ThisGame.*;
public dynamic class l2_wave_04 extends Wave {
}
}//package
Section 82
//l2_wave_05 (l2_wave_05)
package {
import ThisGame.*;
public dynamic class l2_wave_05 extends Wave {
}
}//package
Section 83
//l2_wave_06 (l2_wave_06)
package {
import ThisGame.*;
public dynamic class l2_wave_06 extends Wave {
}
}//package
Section 84
//l2_wave_07 (l2_wave_07)
package {
import ThisGame.*;
public dynamic class l2_wave_07 extends Wave {
}
}//package
Section 85
//l2_wave_08 (l2_wave_08)
package {
import ThisGame.*;
public dynamic class l2_wave_08 extends Wave {
}
}//package
Section 86
//l2_wave_09 (l2_wave_09)
package {
import ThisGame.*;
public dynamic class l2_wave_09 extends Wave {
}
}//package
Section 87
//l2_wave_10 (l2_wave_10)
package {
import ThisGame.*;
public dynamic class l2_wave_10 extends Wave {
}
}//package
Section 88
//l3_wave_01 (l3_wave_01)
package {
import ThisGame.*;
public dynamic class l3_wave_01 extends Wave {
}
}//package
Section 89
//l3_wave_02 (l3_wave_02)
package {
import ThisGame.*;
public dynamic class l3_wave_02 extends Wave {
}
}//package
Section 90
//l3_wave_03 (l3_wave_03)
package {
import ThisGame.*;
public dynamic class l3_wave_03 extends Wave {
}
}//package
Section 91
//l3_wave_04 (l3_wave_04)
package {
import ThisGame.*;
public dynamic class l3_wave_04 extends Wave {
}
}//package
Section 92
//l3_wave_05 (l3_wave_05)
package {
import ThisGame.*;
public dynamic class l3_wave_05 extends Wave {
}
}//package
Section 93
//l3_wave_06 (l3_wave_06)
package {
import ThisGame.*;
public dynamic class l3_wave_06 extends Wave {
}
}//package
Section 94
//l3_wave_07 (l3_wave_07)
package {
import ThisGame.*;
public dynamic class l3_wave_07 extends Wave {
}
}//package
Section 95
//l3_wave_08 (l3_wave_08)
package {
import ThisGame.*;
public dynamic class l3_wave_08 extends Wave {
}
}//package
Section 96
//lanciata_corsa_impatto (lanciata_corsa_impatto)
package {
import flash.media.*;
public dynamic class lanciata_corsa_impatto extends Sound {
}
}//package
Section 97
//Left_wave_bound (Left_wave_bound)
package {
import flash.display.*;
public dynamic class Left_wave_bound extends MovieClip {
}
}//package
Section 98
//Level_1 (Level_1)
package {
import flash.display.*;
public dynamic class Level_1 extends MovieClip {
public var main_character:_SpriteSpartano;
public function Level_1(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 99
//Level_2 (Level_2)
package {
import flash.display.*;
public dynamic class Level_2 extends MovieClip {
public var main_character:_SpriteSpartano;
public function Level_2(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 100
//Level_3 (Level_3)
package {
import flash.display.*;
public dynamic class Level_3 extends MovieClip {
public var main_character:_SpriteSpartano;
public function Level_3(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 101
//LevelCompleteMenu (LevelCompleteMenu)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LevelCompleteMenu extends MovieClip {
public var levelTxt:TextField;
public var nextBtn:SimpleButton;
public var scoreTxt:TextField;
public function LevelCompleteMenu(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 102
//MainMenu (MainMenu)
package {
import flash.display.*;
public dynamic class MainMenu extends MovieClip {
public var moregamesBtn:SimpleButton;
public var scoresBtn:SimpleButton;
public var xploredBtn:SimpleButton;
public var playBtn:SimpleButton;
public var foofaBtn:SimpleButton;
public var PmBtn:SimpleButton;
public function MainMenu(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 103
//menu_music (menu_music)
package {
import flash.media.*;
public dynamic class menu_music extends Sound {
}
}//package
Section 104
//pulsanteschermataintro (pulsanteschermataintro)
package {
import flash.display.*;
public dynamic class pulsanteschermataintro extends SimpleButton {
}
}//package
Section 105
//Right_wave_bound (Right_wave_bound)
package {
import flash.display.*;
public dynamic class Right_wave_bound extends MovieClip {
}
}//package
Section 106
//ruggito_1 (ruggito_1)
package {
import flash.media.*;
public dynamic class ruggito_1 extends Sound {
}
}//package
Section 107
//ruggito_2 (ruggito_2)
package {
import flash.media.*;
public dynamic class ruggito_2 extends Sound {
}
}//package
Section 108
//Sangue01 (Sangue01)
package {
import ThisGame.*;
public dynamic class Sangue01 extends BloodSplash {
public function Sangue01(){
addFrameScript(23, frame24);
}
function frame24(){
swapToGround = true;
stop();
}
}
}//package
Section 109
//Sangue02 (Sangue02)
package {
import ThisGame.*;
public dynamic class Sangue02 extends BloodSplash {
public function Sangue02(){
addFrameScript(23, frame24);
}
function frame24(){
swapToGround = true;
stop();
}
}
}//package
Section 110
//Sangue03 (Sangue03)
package {
import ThisGame.*;
public dynamic class Sangue03 extends BloodSplash {
public function Sangue03(){
addFrameScript(23, frame24);
}
function frame24(){
swapToGround = true;
stop();
}
}
}//package
Section 111
//Sangue04 (Sangue04)
package {
import ThisGame.*;
public dynamic class Sangue04 extends BloodSplash {
public function Sangue04(){
addFrameScript(23, frame24);
}
function frame24(){
swapToGround = true;
stop();
}
}
}//package
Section 112
//Sangue05 (Sangue05)
package {
import ThisGame.*;
public dynamic class Sangue05 extends BloodSplash {
public function Sangue05(){
addFrameScript(23, frame24);
}
function frame24(){
swapToGround = true;
stop();
}
}
}//package
Section 113
//scoreSubmission (scoreSubmission)
package {
import flash.display.*;
import flash.text.*;
public dynamic class scoreSubmission extends MovieClip {
public var scoreTxt:TextField;
}
}//package
Section 114
//scudata_corsa_impatto (scudata_corsa_impatto)
package {
import flash.media.*;
public dynamic class scudata_corsa_impatto extends Sound {
}
}//package
Section 115
//scudo_swish_1 (scudo_swish_1)
package {
import flash.media.*;
public dynamic class scudo_swish_1 extends Sound {
}
}//package
Section 116
//scudo_swish_2 (scudo_swish_2)
package {
import flash.media.*;
public dynamic class scudo_swish_2 extends Sound {
}
}//package
Section 117
//scudo_swish_3 (scudo_swish_3)
package {
import flash.media.*;
public dynamic class scudo_swish_3 extends Sound {
}
}//package
Section 118
//sound_arrow (sound_arrow)
package {
import flash.media.*;
public dynamic class sound_arrow extends Sound {
}
}//package
Section 119
//Symbol1 (Symbol1)
package {
import flash.display.*;
import flash.events.*;
import ThisGame.*;
import flash.ui.*;
public dynamic class Symbol1 extends MovieClip {
public var app:Main_Application;
public function Symbol1(){
addFrameScript(0, frame1);
}
public function OnEnterFrame_main(_arg1:Event):void{
app.Loop();
}
function frame1(){
contextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
app = new Main_Application();
app.ChangeState(new State_MainMenu(app, this));
this.addEventListener(Event.ENTER_FRAME, OnEnterFrame_main);
app.InitMusics();
}
}
}//package
Section 120
//terremoto_mix (terremoto_mix)
package {
import flash.media.*;
public dynamic class terremoto_mix extends Sound {
}
}//package
Section 121
//Trigger_wave (Trigger_wave)
package {
import flash.display.*;
public dynamic class Trigger_wave extends MovieClip {
}
}//package
Section 122
//WinGameOverMenu (WinGameOverMenu)
package {
import flash.display.*;
public dynamic class WinGameOverMenu extends MovieClip {
public var backBtn:SimpleButton;
public var winSubmitClip:WinSubmitClip;
public var submitClip:MovieClip;
public function WinGameOverMenu(){
addFrameScript(0, frame1, 52, frame53, 54, frame55);
}
function frame1(){
getChildByName("winSubmitClip").visible = false;
getChildByName("backBtn").visible = false;
}
function frame55(){
stop();
}
function frame53(){
getChildByName("winSubmitClip").visible = true;
getChildByName("backBtn").visible = true;
}
}
}//package
Section 123
//WinSubmitClip (WinSubmitClip)
package {
import flash.display.*;
import flash.text.*;
public dynamic class WinSubmitClip extends MovieClip {
public var submitBtn:SimpleButton;
public var nickInput:TextField;
public var scoreTextField:TextField;
}
}//package