Section 1
//Clip (com.nitrome.engine.Clip)
package com.nitrome.engine {
import flash.display.*;
public class Clip {
public var init_x:int;
public var init_y:int;
public var block:Boolean;// = false
public var layer:int;
public var tile_id:int;
public var map_x:int;
public var mc:Sprite;
public var map_y:int;
public var g:Game;
public var force_field:Boolean;// = false
public var :Boolean;// = false
public function Clip(_arg1:Sprite, _arg2:Game){
block = false;
force_field = false;
= false;
super();
this.mc = _arg1;
this.g = _arg2;
}
public function remove():void{
mc.parent.removeChild(mc);
g.scroller.map_array_layers[layer][map_y][map_x] = tile_id;
}
}
}//package com.nitrome.engine
Section 2
//Debris (com.nitrome.engine.Debris)
package com.nitrome.engine {
import flash.display.*;
public class Debris extends Sprite {
public var active:Boolean;
public var px:Number;
public var py:Number;
public var dir:Number;
public var temp_x:Number;
public var temp_y:Number;
public var _x:Number;
public var _y:Number;
public var :Boolean;
public function Debris(){
dir = ((Math.random() > 0.5)) ? 15 : -15;
= true;
active = true;
}
protected function updateMC():void{
if ( ){
rotation = (rotation + dir);
};
x = (_x >> 0);
y = (_y >> 0);
}
protected function ():void{
var _local1:*;
var _local2:*;
_local1 = _x;
_local2 = _y;
_x = (_x + ((_x - px) * 0.95));
_y = (_y + ((_y - py) + 1));
px = _local1;
py = _local2;
}
public function addVelocity(_arg1:Number, _arg2:Number):void{
px = (px - _arg1);
py = (py - _arg2);
}
public function main(){
();
updateMC();
}
}
}//package com.nitrome.engine
Section 3
//Dot (com.nitrome.engine.Dot)
package com.nitrome.engine {
public class Dot {
public var ix:Number;
public var iy:Number;
public var x:Number;
public var y:Number;
public function Dot(_arg1:Number=0, _arg2:Number=0){
this.x = (ix = _arg1);
this.y = (iy = _arg2);
}
public function (_arg1:Number){
x = (x * _arg1);
y = (y * _arg1);
}
public function pin():void{
x = ix;
y = iy;
}
}
}//package com.nitrome.engine
Section 4
//Encounter (com.nitrome.engine.Encounter)
package com.nitrome.engine {
import flash.display.*;
import com.nitrome.engine_specific.*;
public class Encounter extends Clip {
public var active:Boolean;
public var :Boolean;
public var reward:HiddenInt;
public var has_main:Boolean;
public var has_collision:Boolean;
public var spawned:Boolean;// = false
public var free:Boolean;
public var x:Number;
public var y:Number;
public var skip:Boolean;
public function Encounter(_arg1:Sprite, _arg2:Game, _arg3:Boolean){
spawned = false;
super(_arg1, _arg2);
this.free = _arg3;
= true;
x = _arg1.x;
y = _arg1.y;
active = true;
has_main = false;
has_collision = true;
= false;
skip = false;
_arg2. (this);
}
override public function remove():void{
var _local1:int;
var _local2:int;
if (active){
active = false;
if (!free){
g.scroller.map_array_layers[layer][init_y][init_x] = tile_id;
} else {
_local1 = ((x * g.SCALE) >> 0);
_local2 = ((y * g.SCALE) >> 0);
if ((((g.scroller.map_array_layers[layer][_local2][_local1] == 0)) || ((g.scroller.map_array_layers[layer][_local2][_local1] == null)))){
g.scroller.map_array_layers[layer][_local2][_local1] = tile_id;
} else {
g.scroller.map_array_layers[layer][init_y][init_x] = tile_id;
};
};
};
}
public function standdown():void{
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
return (false);
}
public function intersects(_arg1:Rect):Boolean{
return (false);
}
public function resolvePlayerCollision(_arg1:Player):void{
}
public function alert():void{
}
public function debug():void{
}
public function resolveWeaponCollision(_arg1:Star):void{
}
public function unpause():void{
}
}
}//package com.nitrome.engine
Section 5
//HiddenInt (com.nitrome.engine.HiddenInt)
package com.nitrome.engine {
public class HiddenInt {
private var _value:int;
private var r:int;
public function HiddenInt(_arg1:int=0){
r = (int((Math.random() * 2000000)) - 1000000);
_value = (r + _arg1);
}
public function get value():int{
return ((_value - r));
}
public function set value(_arg1:int):void{
r = (int((Math.random() * 2000000)) - 1000000);
_value = (r + _arg1);
}
}
}//package com.nitrome.engine
Section 6
//Line (com.nitrome.engine.Line)
package com.nitrome.engine {
import flash.display.*;
public class Line {
public var vy:Number;
public var vx:Number;
public var ly:Number;
public var ry:Number;
public var lx:Number;
public var dx:Number;
public var rx:Number;
public var len:Number;
public var
:Number;
public var a:Dot;
public var b:Dot;
public var dy:Number;
public function Line(_arg1:Dot, _arg2:Dot){
this.a = _arg1;
this.b = _arg2;
updateLine();
}
public function atan2():Number{
= Math.atan2(vy, vx);
return (
);
}
public function
(_arg1:Number):void{
_arg1 = (_arg1 + atan2());
= _arg1;
a.x = (b.x + (Math.cos(_arg1) * len));
a.y = (b.y + (Math.sin(_arg1) * len));
updateLine();
}
public function proximity(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Dot;
var _local5:Line;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:*;
_local4 = new Dot(_arg1, _arg2);
_local5 = this;
_local6 = (_local4.x - a.x);
_local7 = (_local4.y - a.y);
_local8 = dot(_local5, _local5);
_local9 = ((_local6 * _local5.vx) + (_local7 * _local5.vy));
if (_local9 < 0){
if (Util.proximity(a.x, a.y, _local4.x, _local4.y, _arg3)){
return (true);
};
} else {
if (_local9 > _local8){
if (Util.proximity(b.x, b.y, _local4.x, _local4.y, _arg3)){
return (true);
};
} else {
if ((((_local9 >= 0)) && ((_local9 <= _local8)))){
_local10 = ((_local6 * -(_local5.lx)) + (_local7 * -(_local5.ly)));
_local11 = (_local10 * _local5.lx);
_local12 = (_local10 * _local5.ly);
_local13 = ((_local11 * _local11) + (_local12 * _local12));
if (((_arg3 * _arg3) - _local13) >= 0){
return (true);
};
};
};
};
return (false);
}
public function draw(_arg1:Graphics):void{
_arg1.moveTo(a.x, a.y);
_arg1.lineTo(b.x, b.y);
}
public function updateLine():void{
vx = (b.x - a.x);
vy = (b.y - a.y);
len = Math.sqrt(((vx * vx) + (vy * vy)));
if (len > 0){
dx = (vx / len);
dy = (vy / len);
} else {
dx = 0;
dy = 0;
};
rx = -(dy);
ry = dx;
lx = dy;
ly = -(dx);
}
public function copy():Line{
return (new Line(new Dot(a.x, a.y), new Dot(b.x, b.y)));
}
public function (_arg1:Number):Object{
return ({x:(b.x + ((a.x - b.x) * _arg1)), y:(b.y + ((a.y - b.y) * _arg1))});
}
public function toString():String{
return ((((((((("a:(" + a.x) + ",") + a.y) + ") b:(") + b.x) + ",") + b.y) + ")"));
}
public function (_arg1:Number):void{
_arg1 = (_arg1 + atan2());
= _arg1;
b.x = (a.x + (Math.cos(_arg1) * len));
b.y = (a.y + (Math.sin(_arg1) * len));
updateLine();
}
public static function perP(_arg1:Object, _arg2:Object):Number{
var _local3:*;
_local3 = ((_arg1.vx * _arg2.vy) - (_arg1.vy * _arg2.vx));
return (_local3);
}
public static function intersects(_arg1:Object, _arg2:Object):Boolean{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local3 = {vx:(_arg2.a.x - _arg1.a.x), vy:(_arg2.a.y - _arg1.a.y)};
_local4 = perP(_local3, _arg2);
_local5 = perP(_arg1, _arg2);
_local6 = (_local4 / _local5);
_local7 = (_local5 / _local4);
return ((((((((_local6 >= 0)) && ((_local6 <= 1)))) && ((_local7 >= 0)))) && ((_local7 <= 1))));
}
public static function intersectionPoint(_arg1:Object, _arg2:Object):Object{
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = {vx:(_arg2.a.x - _arg1.a.x), vy:(_arg2.a.y - _arg1.a.y)};
_local4 = (perP(_local3, _arg2) / perP(_arg1, _arg2));
_local5 = {};
_local5.x = (_arg1.a.x + (_arg1.vx * _local4));
_local5.y = (_arg1.a.y + (_arg1.vy * _local4));
return (_local5);
}
public static function dot(_arg1:Object, _arg2:Object):Number{
return (((_arg1.vx * _arg2.vx) + (_arg1.vy * _arg2.vy)));
}
public static function miniPerP(_arg1:Object, _arg2:Object):Number{
var _local3:*;
_local3 = ((_arg1.dx * _arg2.dy) - (_arg1.dy * _arg2.dx));
return (_local3);
}
public static function normal(_arg1:Object, _arg2:Object):Object{
var _local3:*;
var _local4:*;
_local3 = {x:(_arg1.x - _arg2.x), y:(_arg1.y - _arg2.y)};
_local4 = _local3.length;
_local3.x = (_local3.x / _local4);
_local3.y = (_local3.y / _local4);
return (_local3);
}
public static function projection(_arg1:Line, _arg2:Line):Line{
var _local3:*;
_local3 = Line.dot(_arg1, _arg2);
return (new Line(new Dot(0, 0), new Dot((_arg1.dx * _local3), (_arg1.dy * _local3))));
}
}
}//package com.nitrome.engine
Section 7
//Particle (com.nitrome.engine.Particle)
package com.nitrome.engine {
public class Particle extends Dot {
public var px:Number;
public var py:Number;
public var temp_x:Number;
public var temp_y:Number;
public function Particle(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
px = (temp_x = _arg1);
py = (temp_y = _arg2);
}
override public function pin():void{
x = (px = (temp_x = ix));
y = (py = (temp_y = iy));
}
public function speed():Number{
return (Math.sqrt((((x - px) * (x - px)) + ((y - py) * (y - py)))));
}
public function (_arg1:Number, _arg2:Number, _arg3:Number):void{
temp_x = x;
temp_y = y;
x = (x + ((_arg3 * (x - px)) + _arg1));
y = (y + ((_arg3 * (y - py)) + _arg2));
px = temp_x;
py = temp_y;
}
public function (_arg1:Number):void{
var _local2:Number;
var _local3:Number;
_local2 = (px - x);
_local3 = (py - y);
addVelocity((_local2 * _arg1), (_local3 * _arg1));
}
public function addVelocity(_arg1:Number, _arg2:Number):void{
px = (px - _arg1);
py = (py - _arg2);
}
public function ():Number{
return ((x - px));
}
public function ():Line{
return (new Line(new Dot(px, py), this));
}
public function (_arg1:Number, _arg2:Number):void{
this.x = (px = (temp_x = (ix = _arg1)));
this.y = (py = (temp_y = (iy = _arg2)));
}
public function toString():String{
return (((((((("(" + x) + ",") + y) + ") ") + x) + ",") + y));
}
public function ():Number{
return ((y - py));
}
public function copy():Particle{
var _local1:*;
_local1 = new Particle(x, y);
_local1.px = px;
_local1.py = py;
return (_local1);
}
public function pinTo(_arg1:Number, _arg2:Number):void{
this.x = (ix = (px = (temp_x = _arg1)));
this.y = (iy = (py = (temp_y = _arg2)));
}
}
}//package com.nitrome.engine
Section 8
//Rect (com.nitrome.engine.Rect)
package com.nitrome.engine {
import flash.display.*;
public class Rect {
public var width:Number;
public var height:Number;
public var cx:Number;
public var cy:Number;
public var x:Number;
public var y:Number;
public static const DOWN:int = 4;
public static const LEFT:int = 8;
public static const UP:int = 1;
public static const RIGHT:int = 2;
public function Rect(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.x = _arg1;
this.y = _arg2;
this.width = _arg3;
this.height = _arg4;
}
public function draw(_arg1:Graphics):void{
_arg1.drawRect(x, y, width, height);
}
public function (_arg1:Array):Array{
_arg1[0].x = x;
_arg1[0].y = y;
_arg1[1].x = ((x + width) - 1);
_arg1[1].y = y;
_arg1[2].x = ((x + width) - 1);
_arg1[2].y = ((y + height) - 1);
_arg1[3].x = x;
_arg1[3].y = ((y + height) - 1);
return (_arg1);
}
public function intersection(_arg1:Rect):Rect{
return (new Rect(Math.max(x, _arg1.x), Math.max(y, _arg1.y), Math.abs((Math.max(x, _arg1.x) - Math.min((x + width), (_arg1.x + _arg1.width)))), Math.abs((Math.max(y, _arg1.y) - Math.min((y + height), (_arg1.y + _arg1.height))))));
}
public function sideOf(_arg1:Number, _arg2:Number):int{
var _local3:Number;
var _local4:Number;
cx = (this.x + (width * 0.5));
cy = (this.y + (height * 0.5));
if ((((_arg1 == cx)) && ((_arg2 == cy)))){
return (2);
};
_local3 = (_arg1 - cx);
_local4 = (_arg2 - cy);
if ((((((_arg1 > cx)) && ((_arg2 > cy)))) && ((Math.abs(_local4) < Math.abs(_local3))))){
return (2);
};
if ((((((_arg1 > cx)) && ((_arg2 > cy)))) && ((Math.abs(_local4) > Math.abs(_local3))))){
return (4);
};
if ((((((_arg1 < cx)) && ((_arg2 > cy)))) && ((Math.abs(_local4) > Math.abs(_local3))))){
return (4);
};
if ((((((_arg1 < cx)) && ((_arg2 > cy)))) && ((Math.abs(_local4) < Math.abs(_local3))))){
return (8);
};
if ((((((_arg1 < cx)) && ((_arg2 < cy)))) && ((Math.abs(_local4) < Math.abs(_local3))))){
return (8);
};
if ((((((_arg1 < cx)) && ((_arg2 < cy)))) && ((Math.abs(_local4) > Math.abs(_local3))))){
return (1);
};
if ((((((_arg1 > cx)) && ((_arg2 < cy)))) && ((Math.abs(_local4) > Math.abs(_local3))))){
return (1);
};
if ((((((_arg1 > cx)) && ((_arg2 < cy)))) && ((Math.abs(_local4) < Math.abs(_local3))))){
return (2);
};
if ((((_arg2 == cy)) && ((_arg1 > cx)))){
return (2);
};
if ((((_arg1 == cx)) && ((_arg2 > cy)))){
return (4);
};
if ((((_arg2 == cy)) && ((_arg1 < cx)))){
return (8);
};
if ((((_arg1 == cx)) && ((_arg2 < cy)))){
return (1);
};
if ((((_local3 == Math.abs(_local3))) && ((_local4 == -(Math.abs(_local4)))))){
return (2);
};
if ((((_local4 == Math.abs(_local4))) && ((_local3 == Math.abs(_local3))))){
return (4);
};
if ((((_local4 == Math.abs(_local4))) && ((_local3 == -(Math.abs(_local3)))))){
return (8);
};
if ((((_local4 == -(Math.abs(_local4)))) && ((_local3 == -(Math.abs(_local3)))))){
return (1);
};
return (0);
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
return ((((((((_arg1 >= this.x)) && ((_arg2 >= this.y)))) && ((_arg1 < (this.x + width))))) && ((_arg2 < (this.y + height)))));
}
public function intersectsCircle(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
var _local4:Number;
var _local5:Number;
_local4 = _arg1;
_local5 = _arg2;
if (_local4 < x){
_local4 = x;
};
if (_local4 > ((x + width) - 1)){
_local4 = ((x + width) - 1);
};
if (_local5 < y){
_local5 = y;
};
if (_local5 > ((y + height) - 1)){
_local5 = ((y + height) - 1);
};
return (((((_arg1 - _local4) * (_arg1 - _local4)) + ((_arg2 - _local5) * (_arg2 - _local5))) < (_arg3 * _arg3)));
}
public function toString():String{
return ((((((((("(x:" + x) + " y:") + y) + " width:") + width) + " height:") + height) + ")"));
}
public function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
this.x = _arg1;
this.y = _arg2;
this.width = _arg3;
this.height = _arg4;
}
public function intersects(_arg1:Rect):Boolean{
return (!((((((((this.x > (_arg1.x + (_arg1.width - 1)))) || (((this.x + (this.width - 1)) < _arg1.x)))) || ((this.y > (_arg1.y + (_arg1.height - 1)))))) || (((this.y + (this.height - 1)) < _arg1.y)))));
}
public function (_arg1:Rect){
return (((((((((x + (width - 1)) < (_arg1.x + _arg1.width))) && (((y + (height - 1)) < (_arg1.y + _arg1.height))))) && ((x >= _arg1.x)))) && ((y >= _arg1.y))));
}
public static function oppositeSide(_arg1:Number):Number{
if (_arg1 == UP){
return (DOWN);
};
if (_arg1 == RIGHT){
return (LEFT);
};
if (_arg1 == DOWN){
return (UP);
};
if (_arg1 == LEFT){
return (RIGHT);
};
return (0);
}
public static function boundingBox(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Rect{
return (new Rect(Math.min(_arg1, _arg3), Math.min(_arg2, _arg4), Math.abs((_arg1 - _arg3)), Math.abs((_arg2 - _arg4))));
}
}
}//package com.nitrome.engine
Section 9
//Scroller (com.nitrome.engine.Scroller)
package com.nitrome.engine {
import flash.display.*;
import com.nitrome.engine_specific.*;
public class Scroller {
public var :Array;
public var :Array;
public var :int;
public var current_layer:int;
public var scroll_x:Boolean;
public var scroll_y:Boolean;
public var tiles:Sprite;
public var :int;
public var :int;
public var
:int;
public var signage:Array;
public var :Array;
public var
:Array;
public var height:int;
public var SCALE:Number;
public var
:Array;
public var
:int;
public var map_array:Array;
public var
:int;
public var layers:int;
public var
:int;
public var width:int;
public var :Array;
public var scale:Number;
public var :int;
public var :Array;
public var :int;
public var :Array;
public var :Array;
public var tile_holder:Sprite;
public var :int;
public var
:int;
public var map_rect:Rect;
public var map_array_layers:Array;
public var tile_maker:TileMaker;
public var :Array;
public var :Array;
public var stage:Sprite;
public static const ENCOUNTER_LAYER:int = 3;
public static const BLOCK_LAYER:int = 2;
public function Scroller(_arg1:Game, _arg2:Sprite, _arg3:Sprite, _arg4:Number, _arg5:int, _arg6:int, _arg7:int, _arg8:int){
this.stage = _arg2;
this.tile_holder = _arg3;
this.scale = _arg4;
SCALE = (1 / _arg4);
this.width = _arg5;
this.height = _arg6;
this.
= _arg7;
this. = _arg8;
tile_maker = new TileMaker(_arg1, this);
scroll_x = true;
scroll_y = true;
= new Array(1, 1, 3, 3, 1);
= new Array(1, 1, 3, 3, 1);
= Math.ceil((_arg7 / _arg4));
= Math.ceil((_arg8 / _arg4));
= new Array();
= new Array();
map_array_layers = new Array();
= new Array();
= new Array();
= new Array();
= new Array();
current_layer = 0;
layers = 0;
= BLOCK_LAYER;
= 0;
= 0;
= 0;
= 0;
map_rect = new Rect(0, 0, (_arg5 * _arg4), (_arg6 * _arg4));
}
protected function (_arg1:int):void{
var _local2:int;
.push(new Array());
.push(_arg1);
_local2 = 0;
while (_local2 < .length) {
[( .length - 1)].push(tile_maker.mapElement((_local2 + [0]), _arg1));
_local2++;
};
}
public function changeLayer(_arg1:int):void{
tiles = [_arg1];
map_array = map_array_layers[_arg1];
= [_arg1];
= [_arg1];
= [_arg1];
current_layer = _arg1;
}
protected function
(_arg1:Number):void{
var _local2:int;
.push(_arg1);
_local2 = 0;
while (_local2 <
.length) {
[_local2].push(tile_maker.mapElement(_arg1, (_local2 +
[0])));
_local2++;
};
}
public function addTileLayer(_arg1:Sprite){
.push(_arg1);
}
protected function
():void{
var _local1:int;
_local1 = 0;
while (_local1 <
.length) {
if ( [_local1][0] != null){
[_local1][0].remove();
};
[_local1].shift();
_local1++;
};
.shift();
}
protected function
():void{
var _local1:int;
_local1 = 0;
while (_local1 <
.length) {
if ( [_local1][(.length - 1)] != null){
[_local1][(.length - 1)].remove();
};
[_local1].pop();
_local1++;
};
.pop();
}
public function addLayer(_arg1:Array):void{
var _local2:Sprite;
if (.length == layers){
_local2 = new Sprite();
tile_holder.addChild(_local2);
.push(_local2);
};
map_array_layers.push(_arg1);
.push(new Array());
.push(new Array());
.push(new Array());
.push(true);
layers++;
}
public function intersects(_arg1:Rect):Boolean{
return (!(((((((( > (_arg1.x + (_arg1.width - 1)))) || ((( - 1) < _arg1.x)))) || ((
> (_arg1.y + (_arg1.height - 1)))))) || ((( - 1) < _arg1.y)))));
}
protected function
(_arg1:Number):void{
var _local2:int;
.unshift(_arg1);
_local2 = 0;
while (_local2 <
.length) {
[_local2].unshift(tile_maker.mapElement(_arg1, (_local2 +
[0])));
_local2++;
};
}
public function
(_arg1:int, _arg2:Boolean):void{
[_arg1] = _arg2;
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
return ((((((((_arg1 < ( - 1))) && ((_arg1 >= )))) && ((_arg2 < ( - 1))))) && ((_arg2 >=
))));
}
protected function ():void{
var _local1:int;
_local1 = 0;
while (_local1 < .length) {
if ( [( .length - 1)][_local1] != null){
[( .length - 1)][_local1].remove();
};
_local1++;
};
.pop();
.pop();
}
public function debug(_arg1:Graphics):void{
_arg1.moveTo(,
);
_arg1.lineTo(,
);
_arg1.lineTo(, );
_arg1.lineTo(, );
_arg1.lineTo(,
);
_arg1.moveTo(-(stage.x), -(stage.y));
_arg1.lineTo((-(stage.x) +
), -(stage.y));
_arg1.lineTo((-(stage.x) +
), (-(stage.y) + ));
_arg1.lineTo(-(stage.x), (-(stage.y) + ));
_arg1.lineTo(-(stage.x), -(stage.y));
}
protected function (_arg1:int):void{
var _local2:int;
.unshift(new Array());
.unshift(_arg1);
_local2 = 0;
while (_local2 < .length) {
[0].push(tile_maker.mapElement((_local2 + [0]), _arg1));
_local2++;
};
}
public function (_arg1:int, _arg2:int, _arg3:int):void{
map_array_layers[_arg1][_arg3][_arg2] = 0;
}
public function clipManager():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
_local1 = ((stage.x * SCALE) >> 0);
_local2 = ((stage.y * SCALE) >> 0);
_local4 = 0;
while (_local4 < layers) {
changeLayer(_local4);
if ([_local4]){
if (scroll_x){
if (-(_local1) > ){
if (((([0] > 0)) && (([0] > (-(_local1) - [_local4]))))){
_local3 = ([0] - (-(_local1) - [_local4]));
while (_local3 > 0) {
(([0] - 1));
if (_local4 ==
){
= ( - scale);
};
_local3--;
if ([0] == 0){
break;
};
};
};
if ([(.length - 1)] > ((-(_local1) +
) + [_local4])){
_local3 = ([(.length - 1)] - ((-(_local1) +
) + [_local4]));
while (_local3 > 0) {
();
if (_local4 ==
){
= ( - scale);
};
_local3--;
};
};
};
if (_local1 < ){
if (((([(.length - 1)] < (width - 1))) && (([(.length - 1)] < ((-(_local1) +
) + [_local4]))))){
_local3 = (((-(_local1) +
) + [_local4]) - [(.length - 1)]);
while (_local3 > 0) {
(([(.length - 1)] + 1));
if (_local4 ==
){
= ( + scale);
};
_local3--;
if ([(.length - 1)] == (width - 1)){
break;
};
};
};
if ([0] < (-(_local1) - [_local4])){
_local3 = ((-(_local1) - [_local4]) - [0]);
while (_local3 > 0) {
();
if (_local4 ==
){
= ( + scale);
};
_local3--;
};
};
};
};
if (scroll_y){
if (_local2 > ){
if ((((
[0] > 0)) && ((
[0] > (-(_local2) -
[_local4]))))){
_local3 = (
[0] - (-(_local2) -
[_local4]));
while (_local3 > 0) {
((
[0] - 1));
if (_local4 ==
){
= (
- scale);
};
_local3--;
if (
[0] == 0){
break;
};
};
};
if (
[(
.length - 1)] > ((-(_local2) +
) +
[_local4])){
_local3 = (
[(
.length - 1)] - ((-(_local2) +
) +
[_local4]));
while (_local3 > 0) {
();
if (_local4 ==
){
= ( - scale);
};
_local3--;
};
};
};
if (_local2 < ){
if ((((
[(
.length - 1)] < (height - 1))) && ((
[(
.length - 1)] < ((-(_local2) +
) +
[_local4]))))){
_local3 = (((-(_local2) +
) +
[_local4]) -
[(
.length - 1)]);
while (_local3 > 0) {
((
[(
.length - 1)] + 1));
if (_local4 ==
){
= ( + scale);
};
_local3--;
if (
[(
.length - 1)] == (height - 1)){
break;
};
};
};
if (
[0] < (-(_local2) -
[_local4])){
_local3 = ((-(_local2) -
[_local4]) -
[0]);
while (_local3 > 0) {
();
if (_local4 ==
){
= (
+ scale);
};
_local3--;
};
};
};
};
};
_local4++;
};
= _local1;
= _local2;
}
public function setSignage(_arg1:Array):void{
this.signage = _arg1;
}
public function (_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{
map_array_layers[_arg1][_arg3][_arg2] = _arg4;
}
public function reset():void{
= ((stage.x * SCALE) >> 0);
= ((stage.y * SCALE) >> 0);
}
public function rezBeginning(_arg1:int, _arg2:int):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:int;
var _local10:int;
var _local11:int;
= new Array();
= new Array();
= new Array();
_local3 = Math.round((
* 0.5));
_local4 = Math.round((
* 0.5));
stage.x = -(((_arg1 - _local3) * scale));
stage.y = -(((_arg2 - _local4) * scale));
= ((stage.x / scale) >> 0);
= ((stage.y / scale) >> 0);
_local5 = ((_arg1 - _local3) - ([
] * 2));
_local6 = ((_arg2 - _local4) - (
[
] * 2));
_local7 = ((_local5 +
) + ([
] * 4));
_local8 = ((_local6 +
) + (
[
] * 4));
if (_local5 < 0){
_local5 = 0;
};
if (_local6 < 0){
_local6 = 0;
};
if (_local7 > width){
_local7 = width;
};
if (_local8 > height){
_local8 = height;
};
= (_local5 * scale);
= (_local6 * scale);
= (_local7 * scale);
= (_local8 * scale);
_local11 = 0;
while (_local11 < layers) {
changeLayer(_local11);
if ([_local11]){
_local9 = _local5;
while (_local9 < _local7) {
.push(_local9);
_local9++;
};
_local10 = _local6;
while (_local10 < _local8) {
(_local10);
_local10++;
};
};
_local11++;
};
}
protected function ():void{
var _local1:int;
_local1 = 0;
while (_local1 < .length) {
if ( [0][_local1] != null){
[0][_local1].remove();
};
_local1++;
};
.shift();
.shift();
}
}
}//package com.nitrome.engine
Section 10
//Spring (com.nitrome.engine.Spring)
package com.nitrome.engine {
public class Spring extends Line {
public var stiffness:Number;
public var rest_len:Number;
public function Spring(_arg1:Dot, _arg2:Dot){
super(_arg1, _arg2);
stiffness = 0.5;
rest_len = len;
}
public function
(_arg1:Number, _arg2:Number):void{
updateLine();
if (len < _arg1){
b.x = (a.x + (_arg1 * dx));
b.y = (a.y + (_arg1 * dy));
updateLine();
} else {
if (len > _arg2){
b.x = (a.x + (_arg2 * dx));
b.y = (a.y + (_arg2 * dy));
updateLine();
};
};
}
public function (_arg1:Number, _arg2:Number):void{
updateLine();
if (len < _arg1){
a.x = (b.x + (_arg1 * -(dx)));
a.y = (b.y + (_arg1 * -(dy)));
updateLine();
} else {
if (len > _arg2){
a.x = (b.x + (_arg2 * -(dx)));
a.y = (b.y + (_arg2 * -(dy)));
updateLine();
};
};
}
public function updateSpring():void{
var _local1:Number;
var _local2:Number;
var _local3:Dot;
vx = (b.x - a.x);
vy = (b.y - a.y);
len = Math.sqrt(((vx * vx) + (vy * vy)));
_local1 = 0;
if (len > 0){
_local1 = ((len - rest_len) / len);
};
_local2 = (_local1 * stiffness);
_local3 = new Dot((-(vx) * _local2), (-(vy) * _local2));
a.x = (a.x - _local3.x);
a.y = (a.y - _local3.y);
b.x = (b.x + _local3.x);
b.y = (b.y + _local3.y);
updateLine();
}
}
}//package com.nitrome.engine
Section 11
//Trig (com.nitrome.engine.Trig)
package com.nitrome.engine {
public class Trig {
public static const sin:Array = [0, 0.0174524064372835, 0.034899496702501, 0.0523359562429438, 0.0697564737441253, 0.0871557427476582, 0.104528463267653, 0.121869343405147, 0.139173100960065, 0.156434465040231, 0.17364817766693, 0.190808995376545, 0.207911690817759, 0.224951054343865, 0.241921895599668, 0.258819045102521, 0.275637355816999, 0.292371704722737, 0.309016994374947, 0.325568154457157, 0.342020143325669, 0.3583679495453, 0.374606593415912, 0.390731128489274, 0.4067366430758, 0.4226182617407, 0.438371146789078, 0.453990499739547, 0.469471562785891, 0.484809620246337, 0.5, 0.515038074910054, 0.529919264233205, 0.544639035015027, 0.559192903470747, 0.573576436351046, 0.587785252292473, 0.601815023152049, 0.615661475325659, 0.629320391049838, 0.64278760968654, 0.656059028990508, 0.669130606358859, 0.681998360062499, 0.694658370458998, 0.707106781186548, 0.719339800338652, 0.731353701619171, 0.743144825477395, 0.754709580222772, 0.766044443118979, 0.777145961456971, 0.788010753606722, 0.798635510047293, 0.809016994374948, 0.819152044288992, 0.829037572555042, 0.838670567945424, 0.848048096156427, 0.857167300702113, 0.866025403784439, 0.874619707139396, 0.882947592858927, 0.891006524188368, 0.898794046299167, 0.90630778703665, 0.913545457642601, 0.920504853452441, 0.927183854566788, 0.933580426497202, 0.939692620785909, 0.945518575599317, 0.951056516295154, 0.956304755963036, 0.961261695938319, 0.965925826289069, 0.970295726275997, 0.974370064785236, 0.978147600733806, 0.981627183447664, 0.984807753012208, 0.987688340595138, 0.99026806874157, 0.992546151641322, 0.994521895368274, 0.996194698091746, 0.997564050259824, 0.998629534754574, 0.999390827019096, 0.999847695156391, 1, 0.999847695156391, 0.999390827019096, 0.998629534754574, 0.997564050259824, 0.996194698091745, 0.994521895368273, 0.992546151641322, 0.99026806874157, 0.987688340595137, 0.984807753012208, 0.981627183447664, 0.978147600733805, 0.974370064785235, 0.970295726275996, 0.965925826289068, 0.961261695938318, 0.956304755963035, 0.951056516295153, 0.945518575599316, 0.939692620785908, 0.933580426497201, 0.927183854566787, 0.920504853452439, 0.9135454576426, 0.906307787036649, 0.898794046299166, 0.891006524188367, 0.882947592858926, 0.874619707139395, 0.866025403784438, 0.857167300702112, 0.848048096156426, 0.838670567945424, 0.829037572555042, 0.819152044288992, 0.809016994374947, 0.798635510047293, 0.788010753606722, 0.777145961456971, 0.766044443118979, 0.754709580222773, 0.743144825477395, 0.731353701619171, 0.719339800338652, 0.707106781186549, 0.694658370458999, 0.6819983600625, 0.66913060635886, 0.656059028990509, 0.642787609686541, 0.62932039104984, 0.615661475325661, 0.601815023152051, 0.587785252292476, 0.573576436351049, 0.55919290347075, 0.544639035015031, 0.529919264233209, 0.515038074910058, 0.500000000000004, 0.484809620246341, 0.469471562785895, 0.453990499739552, 0.438371146789082, 0.422618261740705, 0.406736643075806, 0.390731128489279, 0.374606593415918, 0.358367949545306, 0.342020143325675, 0.325568154457163, 0.309016994374954, 0.292371704722744, 0.275637355817006, 0.258819045102528, 0.241921895599676, 0.224951054343873, 0.207911690817768, 0.190808995376553, 0.173648177666939, 0.15643446504024, 0.139173100960075, 0.121869343405157, 0.104528463267663, 0.0871557427476679, 0.0697564737441353, 0.052335956242954, 0.0348994967025113, 0.0174524064372941, 1.07806057163162E-14, -0.0174524064372725, -0.0348994967024898, -0.0523359562429325, -0.0697564737441138, -0.0871557427476465, -0.104528463267642, -0.121869343405135, -0.139173100960053, -0.156434465040218, -0.173648177666918, -0.190808995376532, -0.207911690817746, -0.224951054343852, -0.241921895599655, -0.258819045102507, -0.275637355816986, -0.292371704722723, -0.309016994374934, -0.325568154457143, -0.342020143325655, -0.358367949545286, -0.374606593415898, -0.39073112848926, -0.406736643075786, -0.422618261740685, -0.438371146789063, -0.453990499739532, -0.469471562785876, -0.484809620246323, -0.499999999999986, -0.51503807491004, -0.52991926423319, -0.544639035015013, -0.559192903470732, -0.573576436351032, -0.587785252292459, -0.601815023152034, -0.615661475325644, -0.629320391049823, -0.642787609686525, -0.656059028990493, -0.669130606358844, -0.681998360062484, -0.694658370458983, -0.707106781186534, -0.719339800338637, -0.731353701619157, -0.743144825477381, -0.754709580222759, -0.766044443118965, -0.777145961456958, -0.788010753606709, -0.79863551004728, -0.809016994374935, -0.819152044288979, -0.829037572555029, -0.838670567945412, -0.848048096156414, -0.857167300702101, -0.866025403784427, -0.874619707139385, -0.882947592858916, -0.891006524188357, -0.898794046299157, -0.90630778703664, -0.913545457642591, -0.920504853452431, -0.927183854566778, -0.933580426497193, -0.9396926207859, -0.945518575599309, -0.951056516295146, -0.956304755963028, -0.961261695938312, -0.965925826289062, -0.97029572627599, -0.974370064785229, -0.9781476007338, -0.981627183447659, -0.984807753012203, -0.987688340595134, -0.990268068741567, -0.992546151641319, -0.994521895368271, -0.996194698091743, -0.997564050259822, -0.998629534754572, -0.999390827019095, -0.999847695156391, -1, -0.999847695156392, -0.999390827019097, -0.998629534754575, -0.997564050259826, -0.996194698091748, -0.994521895368276, -0.992546151641326, -0.990268068741574, -0.987688340595142, -0.984807753012213, -0.98162718344767, -0.978147600733812, -0.974370064785242, -0.970295726276004, -0.965925826289076, -0.961261695938328, -0.956304755963045, -0.951056516295164, -0.945518575599327, -0.93969262078592, -0.933580426497214, -0.9271838545668, -0.920504853452453, -0.913545457642615, -0.906307787036664, -0.898794046299182, -0.891006524188383, -0.882947592858943, -0.874619707139413, -0.866025403784456, -0.85716730070213, -0.848048096156444, -0.838670567945443, -0.829037572555061, -0.819152044289012, -0.809016994374968, -0.798635510047314, -0.788010753606744, -0.777145961456994, -0.766044443119002, -0.754709580222796, -0.743144825477419, -0.731353701619196, -0.719339800338677, -0.707106781186574, -0.694658370459024, -0.681998360062526, -0.669130606358887, -0.656059028990536, -0.642787609686569, -0.629320391049868, -0.615661475325689, -0.601815023152079, -0.587785252292505, -0.573576436351078, -0.55919290347078, -0.544639035015061, -0.529919264233239, -0.515038074910089, -0.500000000000035, -0.484809620246373, -0.469471562785927, -0.453990499739583, -0.438371146789115, -0.422618261740737, -0.406736643075838, -0.390731128489312, -0.374606593415951, -0.35836794954534, -0.342020143325709, -0.325568154457197, -0.309016994374988, -0.292371704722778, -0.275637355817041, -0.258819045102563, -0.24192189559971, -0.224951054343908, -0.207911690817802, -0.190808995376588, -0.173648177666974, -0.156434465040275, -0.13917310096011, -0.121869343405192, -0.104528463267698, -0.0871557427477034, -0.0697564737441708, -0.0523359562429896, -0.034899496702547, -0.0174524064373297];
public static const cos:Array = [1, 0.999847695156391, 0.999390827019096, 0.998629534754574, 0.997564050259824, 0.996194698091746, 0.994521895368273, 0.992546151641322, 0.99026806874157, 0.987688340595138, 0.984807753012208, 0.981627183447664, 0.978147600733806, 0.974370064785235, 0.970295726275996, 0.965925826289068, 0.961261695938319, 0.956304755963035, 0.951056516295154, 0.945518575599317, 0.939692620785908, 0.933580426497202, 0.927183854566787, 0.92050485345244, 0.913545457642601, 0.90630778703665, 0.898794046299167, 0.891006524188368, 0.882947592858927, 0.874619707139396, 0.866025403784438, 0.857167300702112, 0.848048096156426, 0.838670567945424, 0.829037572555042, 0.819152044288992, 0.809016994374947, 0.798635510047293, 0.788010753606722, 0.777145961456971, 0.766044443118978, 0.754709580222772, 0.743144825477394, 0.73135370161917, 0.719339800338651, 0.707106781186547, 0.694658370458997, 0.681998360062498, 0.669130606358858, 0.656059028990507, 0.642787609686539, 0.629320391049837, 0.615661475325658, 0.601815023152048, 0.587785252292472, 0.573576436351045, 0.559192903470746, 0.544639035015026, 0.529919264233204, 0.515038074910053, 0.499999999999999, 0.484809620246336, 0.46947156278589, 0.453990499739546, 0.438371146789076, 0.422618261740698, 0.406736643075799, 0.390731128489273, 0.374606593415911, 0.358367949545299, 0.342020143325668, 0.325568154457155, 0.309016994374946, 0.292371704722735, 0.275637355816998, 0.258819045102519, 0.241921895599666, 0.224951054343864, 0.207911690817758, 0.190808995376543, 0.173648177666929, 0.156434465040229, 0.139173100960064, 0.121869343405146, 0.104528463267652, 0.0871557427476566, 0.0697564737441237, 0.0523359562429422, 0.0348994967024993, 0.0174524064372818, -1.71512449944288E-15, -0.0174524064372853, -0.0348994967025027, -0.0523359562429456, -0.0697564737441271, -0.08715574274766, -0.104528463267655, -0.121869343405149, -0.139173100960067, -0.156434465040233, -0.173648177666932, -0.190808995376547, -0.207911690817761, -0.224951054343867, -0.24192189559967, -0.258819045102523, -0.275637355817001, -0.292371704722739, -0.309016994374949, -0.325568154457159, -0.342020143325671, -0.358367949545302, -0.374606593415914, -0.390731128489276, -0.406736643075802, -0.422618261740701, -0.438371146789079, -0.453990499739548, -0.469471562785892, -0.484809620246338, -0.500000000000001, -0.515038074910055, -0.529919264233206, -0.544639035015028, -0.559192903470747, -0.573576436351046, -0.587785252292473, -0.601815023152048, -0.615661475325658, -0.629320391049837, -0.642787609686539, -0.656059028990506, -0.669130606358857, -0.681998360062497, -0.694658370458996, -0.707106781186546, -0.71933980033865, -0.731353701619169, -0.743144825477393, -0.75470958022277, -0.766044443118976, -0.777145961456969, -0.78801075360672, -0.798635510047291, -0.809016994374945, -0.81915204428899, -0.829037572555039, -0.838670567945422, -0.848048096156424, -0.85716730070211, -0.866025403784436, -0.874619707139393, -0.882947592858924, -0.891006524188365, -0.898794046299164, -0.906307787036647, -0.913545457642598, -0.920504853452438, -0.927183854566785, -0.933580426497199, -0.939692620785906, -0.945518575599315, -0.951056516295151, -0.956304755963033, -0.961261695938317, -0.965925826289066, -0.970295726275995, -0.974370064785233, -0.978147600733804, -0.981627183447662, -0.984807753012207, -0.987688340595136, -0.990268068741569, -0.992546151641321, -0.994521895368272, -0.996194698091745, -0.997564050259824, -0.998629534754573, -0.999390827019095, -0.999847695156391, -1, -0.999847695156391, -0.999390827019096, -0.998629534754574, -0.997564050259825, -0.996194698091747, -0.994521895368275, -0.992546151641324, -0.990268068741572, -0.98768834059514, -0.98480775301221, -0.981627183447666, -0.978147600733808, -0.974370064785238, -0.970295726276, -0.965925826289072, -0.961261695938323, -0.95630475596304, -0.951056516295158, -0.945518575599322, -0.939692620785913, -0.933580426497207, -0.927183854566793, -0.920504853452446, -0.913545457642607, -0.906307787036657, -0.898794046299174, -0.891006524188375, -0.882947592858935, -0.874619707139404, -0.866025403784447, -0.857167300702121, -0.848048096156435, -0.838670567945433, -0.829037572555052, -0.819152044289002, -0.809016994374958, -0.798635510047304, -0.788010753606733, -0.777145961456983, -0.76604444311899, -0.754709580222784, -0.743144825477407, -0.731353701619184, -0.719339800338665, -0.707106781186561, -0.694658370459012, -0.681998360062513, -0.669130606358873, -0.656059028990523, -0.642787609686555, -0.629320391049854, -0.615661475325675, -0.601815023152065, -0.58778525229249, -0.573576436351064, -0.559192903470765, -0.544639035015046, -0.529919264233224, -0.515038074910073, -0.50000000000002, -0.484809620246357, -0.469471562785911, -0.453990499739568, -0.438371146789098, -0.422618261740721, -0.406736643075822, -0.390731128489296, -0.374606593415934, -0.358367949545323, -0.342020143325692, -0.32556815445718, -0.309016994374971, -0.292371704722761, -0.275637355817024, -0.258819045102545, -0.241921895599693, -0.22495105434389, -0.207911690817785, -0.190808995376571, -0.173648177666957, -0.156434465040257, -0.139173100960092, -0.121869343405174, -0.104528463267681, -0.0871557427476857, -0.069756473744153, -0.0523359562429718, -0.0348994967025292, -0.0174524064373119, -2.86054064502761E-14, 0.0174524064372547, 0.034899496702472, 0.0523359562429147, 0.069756473744096, 0.0871557427476287, 0.104528463267624, 0.121869343405118, 0.139173100960036, 0.156434465040201, 0.1736481776669, 0.190808995376515, 0.207911690817729, 0.224951054343835, 0.241921895599637, 0.25881904510249, 0.275637355816969, 0.292371704722706, 0.309016994374917, 0.325568154457126, 0.342020143325638, 0.35836794954527, 0.374606593415881, 0.390731128489243, 0.40673664307577, 0.422618261740669, 0.438371146789047, 0.453990499739517, 0.469471562785861, 0.484809620246307, 0.49999999999997, 0.515038074910024, 0.529919264233175, 0.544639035014998, 0.559192903470717, 0.573576436351017, 0.587785252292444, 0.60181502315202, 0.61566147532563, 0.629320391049809, 0.642787609686511, 0.65605902899048, 0.669130606358831, 0.681998360062471, 0.69465837045897, 0.707106781186521, 0.719339800338625, 0.731353701619145, 0.743144825477369, 0.754709580222747, 0.766044443118953, 0.777145961456946, 0.788010753606698, 0.798635510047269, 0.809016994374924, 0.819152044288969, 0.82903757255502, 0.838670567945402, 0.848048096156405, 0.857167300702092, 0.866025403784418, 0.874619707139376, 0.882947592858908, 0.891006524188349, 0.898794046299149, 0.906307787036632, 0.913545457642584, 0.920504853452424, 0.927183854566772, 0.933580426497187, 0.939692620785894, 0.945518575599303, 0.95105651629514, 0.956304755963023, 0.961261695938307, 0.965925826289057, 0.970295726275986, 0.974370064785225, 0.978147600733796, 0.981627183447656, 0.9848077530122, 0.987688340595131, 0.990268068741564, 0.992546151641317, 0.994521895368269, 0.996194698091742, 0.997564050259821, 0.998629534754572, 0.999390827019094, 0.99984769515639];
}
}//package com.nitrome.engine
Section 12
//Util (com.nitrome.engine.Util)
package com.nitrome.engine {
import flash.display.*;
import flash.geom.*;
public class Util {
public static const RIGHT:Number = 2;
public static const UP_RIGHT_ROTATION:Number = 45;
public static const LEFT:Number = 8;
public static const UP_LEFT_ROTATION:Number = 315;
public static const DOWN_LEFT_ROTATION:Number = 225;
public static const UP:Number = 1;
public static const DOWN_RIGHT_ROTATION:Number = 135;
public static const RIGHT_ROTATION:Number = 90;
public static const UP_ROTATION:Number = 0;
public static const DOWN:Number = 4;
public static const LEFT_ROTATION:Number = 270;
public static const DOWN_ROTATION:Number = 180;
public static function stopClips(_arg1:DisplayObjectContainer):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.numChildren) {
if ((_arg1.getChildAt(_local2) is MovieClip)){
(_arg1.getChildAt(_local2) as MovieClip).stop();
};
if ((_arg1.getChildAt(_local2) is DisplayObjectContainer)){
stopClips((_arg1.getChildAt(_local2) as DisplayObjectContainer));
};
_local2++;
};
}
public static function localToLocal(_arg1:Point, _arg2:DisplayObject, _arg3:DisplayObject):Point{
_arg1.x = (_arg1.y = 0);
_arg1 = _arg2.localToGlobal(_arg1);
_arg1 = _arg3.globalToLocal(_arg1);
return (_arg1);
}
public static function mcToString2(_arg1:Sprite, _arg2:Sprite):String{
var _local3:Point;
_local3 = new Point();
_local3 = Util.localToLocal(_local3, _arg1, _arg2);
return ((((("pos.x = " + _local3.x) + ";\npos.y = ") + _local3.y) + ";"));
}
public static function circlePolyCollision(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array){
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = Number.MAX_VALUE;
_local6 = Number.MAX_VALUE;
_local7 = Number.MIN_VALUE;
_local8 = Number.MIN_VALUE;
_local9 = 0;
while (_local9 < _arg4.length) {
if (_arg4[_local9].x < _local5){
_local5 = _arg4[_local9].x;
};
if (_arg4[_local9].y < _local6){
_local6 = _arg4[_local9].y;
};
if (_arg4[_local9].x > _local7){
_local7 = _arg4[_local9].x;
};
if (_arg4[_local9].y > _local8){
_local8 = _arg4[_local9].y;
};
_local9++;
};
if ((((((((_local5 > (_arg1 + ((_arg3 * 2) - 1)))) || (((_local5 + (_local7 - 1)) < _arg1)))) || ((_local6 > (_arg2 + ((_arg3 * 2) - 1)))))) || (((_local6 + (_local8 - 1)) < _arg2)))){
return (false);
};
return (false);
}
public static function circleOverlap(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Boolean{
return (((((_arg4 - _arg1) * (_arg4 - _arg1)) + ((_arg5 - _arg2) * (_arg5 - _arg2))) <= ((_arg3 + _arg6) * (_arg3 + _arg6))));
}
public static function rectContains(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Boolean{
return ((((((((_arg5 >= _arg1)) && ((_arg6 >= _arg2)))) && ((_arg5 < (_arg1 + _arg3))))) && ((_arg6 < (_arg2 + _arg4)))));
}
public static function degreeLerp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
_arg1 = (_arg1 + ((Math.abs((_arg2 - _arg1)))>180) ? ((_arg1)<_arg2) ? 360 : -(360) : 0);
return ((_arg1 + ((_arg2 - _arg1) * _arg3)));
}
public static function wrapLerp(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Number{
var _local6:Number;
_local6 = Math.abs((_arg4 - _arg5));
_arg1 = (_arg1 + ((Math.abs((_arg2 - _arg1)))>(_local6 * 0.5)) ? ((_arg1)<_arg2) ? _local6 : -(_local6) : 0);
return ((_arg1, _arg2, _arg3));
}
public static function sideToString(_arg1:int):String{
if (_arg1 == UP){
return ("UP");
};
if (_arg1 == RIGHT){
return ("RIGHT");
};
if (_arg1 == DOWN){
return ("DOWN");
};
if (_arg1 == LEFT){
return ("LEFT");
};
return ("null");
}
public static function onScreen(_arg1:Number, _arg2:Number, _arg3:Game, _arg4:Number):Boolean{
return (((((((((_arg1 + _arg4) >= -(_arg3.canvas.x))) && (((_arg2 + _arg4) >= -(_arg3.canvas.y))))) && (((_arg1 - _arg4) < (-(_arg3.canvas.x) + _arg3.width))))) && (((_arg2 - _arg4) < (-(_arg3.canvas.y) + _arg3.height)))));
}
public static function startClips(_arg1:DisplayObjectContainer):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.numChildren) {
if ((_arg1.getChildAt(_local2) is MovieClip)){
(_arg1.getChildAt(_local2) as MovieClip).gotoAndPlay((_arg1.getChildAt(_local2) as MovieClip).currentFrame);
};
if ((_arg1.getChildAt(_local2) is DisplayObjectContainer)){
startClips((_arg1.getChildAt(_local2) as DisplayObjectContainer));
};
_local2++;
};
}
public static function circleInside(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Boolean{
return (((((_arg4 - _arg1) * (_arg4 - _arg1)) + ((_arg5 - _arg2) * (_arg5 - _arg2))) <= ((_arg6 - _arg3) * (_arg6 - _arg3))));
}
public static function getRotation(_arg1:int):Number{
var _local2:int;
_local2 = 0;
switch (_arg1){
case UP:
_local2 = UP_ROTATION;
break;
case RIGHT:
_local2 = RIGHT_ROTATION;
break;
case DOWN:
_local2 = DOWN_ROTATION;
break;
case LEFT:
_local2 = LEFT_ROTATION;
break;
};
return (_local2);
}
public static function thetaLerp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
_arg1 = (_arg1 + ((Math.abs((_arg2 - _arg1)))>Math.PI) ? ((_arg1)<_arg2) ? (Math.PI * 2) : -((Math.PI * 2)) : 0);
return ((_arg1 + ((_arg2 - _arg1) * _arg3)));
}
public static function (_arg1:Number, _arg2:Number, _arg3:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * _arg3)));
}
public static function mcToString(_arg1:Sprite):String{
return ((((("(" + _arg1.x) + " ") + _arg1.y) + ")"));
}
public static function proximity(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{
return (((((_arg3 - _arg1) * (_arg3 - _arg1)) + ((_arg4 - _arg2) * (_arg4 - _arg2))) <= (_arg5 * _arg5)));
}
}
}//package com.nitrome.engine
Section 13
//ArmPos (com.nitrome.engine_specific.ArmPos)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
public class ArmPos {
static function getPos(_arg1:Dot, _arg2:String, _arg3:int=1):Dot{
if (_arg2 == "run_left"){
_arg1.x = 6;
if (_arg3 == 1){
_arg1.y = -23;
} else {
if (_arg3 == 2){
_arg1.y = -21;
} else {
if (_arg3 == 3){
_arg1.y = -22;
} else {
if (_arg3 == 4){
_arg1.y = -22;
} else {
if (_arg3 == 5){
_arg1.y = -23;
} else {
if (_arg3 == 6){
_arg1.y = -24;
} else {
if (_arg3 == 7){
_arg1.y = -23;
} else {
if (_arg3 == 8){
_arg1.y = -21;
} else {
if (_arg3 == 9){
_arg1.y = -22;
} else {
if (_arg3 == 10){
_arg1.y = -22;
} else {
if (_arg3 == 11){
_arg1.y = -23;
} else {
if (_arg3 == 12){
_arg1.y = -24;
};
};
};
};
};
};
};
};
};
};
};
};
return (_arg1);
} else {
if (_arg2 == "run_right"){
_arg1.x = -6;
if (_arg3 == 1){
_arg1.y = -23;
} else {
if (_arg3 == 2){
_arg1.y = -21;
} else {
if (_arg3 == 3){
_arg1.y = -22;
} else {
if (_arg3 == 4){
_arg1.y = -22;
} else {
if (_arg3 == 5){
_arg1.y = -23;
} else {
if (_arg3 == 6){
_arg1.y = -24;
} else {
if (_arg3 == 7){
_arg1.y = -23;
} else {
if (_arg3 == 8){
_arg1.y = -21;
} else {
if (_arg3 == 9){
_arg1.y = -22;
} else {
if (_arg3 == 10){
_arg1.y = -22;
} else {
if (_arg3 == 11){
_arg1.y = -23;
} else {
if (_arg3 == 12){
_arg1.y = -24;
};
};
};
};
};
};
};
};
};
};
};
};
return (_arg1);
} else {
if ((((_arg2 == "wait_left")) || ((_arg2 == "wait_in_left")))){
_arg1.x = 10;
_arg1.y = -15;
return (_arg1);
};
if ((((_arg2 == "wait_right")) || ((_arg2 == "wait_in_right")))){
_arg1.x = -10;
_arg1.y = -15;
return (_arg1);
};
if (_arg2 == "jump_left"){
_arg1.x = 13;
_arg1.y = -27;
return (_arg1);
};
if (_arg2 == "jump_right"){
_arg1.x = -13;
_arg1.y = -27;
return (_arg1);
};
if (_arg2 == "fall_left"){
_arg1.x = 11;
_arg1.y = -21;
return (_arg1);
};
if (_arg2 == "fall_right"){
_arg1.x = -11;
_arg1.y = -21;
return (_arg1);
};
if (_arg2 == "swing_left"){
_arg1.x = 11;
_arg1.y = -21;
return (_arg1);
};
if (_arg2 == "swing_right"){
_arg1.x = -11;
_arg1.y = -21;
return (_arg1);
};
if (_arg2 == "wall_left"){
_arg1.x = 9;
_arg1.y = -17;
return (_arg1);
};
if (_arg2 == "wall_right"){
_arg1.x = -9;
_arg1.y = -17;
return (_arg1);
};
if (_arg2 == "stealth"){
_arg1.x = 0;
_arg1.y = 0;
return (_arg1);
};
};
};
return (_arg1);
}
}
}//package com.nitrome.engine_specific
Section 14
//Back (com.nitrome.engine_specific.Back)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
import flash.events.*;
public class Back extends Sprite {
private var
:Array;
private var
:Array;
public var buildings_1:MovieClip;
public var buildings_2:MovieClip;
private var dot:Dot;
private var i:int;
private var j:int;
private var
:Sprite;
public static const NUM_TRAILS:int = 8;
public static const TRAIL_COL:int = 16751440;
public function Back(){
var _local1:Sprite;
super();
= new Array();
= new Array();
= new Sprite();
i = 0;
while (i < NUM_TRAILS) {
_local1 = ((Math.random() >= 0.5)) ? new CarMC1() : new CarMC2();
_local1.x = (Math.random() * 550);
_local1.y = (150 + (Math.random() * 200));
.push(((2 + ((Math.random() * 2) >> 0)) * ((Math.random() >= 0.5)) ? 1 : -1));
.addChild(_local1);
.push(_local1);
i++;
};
addChildAt(
, 1);
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
}
public function onEnterFrame(_arg1:Event):void{
i = 0;
while (i <
.length) {
[i].x = (
[i].x -
[i]);
if (
[i].x < -10){
[i].x = 555;
[i].y = (150 + (Math.random() * 200));
};
if (
[i].x > 560){
[i].x = -5;
[i].y = (150 + (Math.random() * 200));
};
i++;
};
}
}
}//package com.nitrome.engine_specific
Section 15
//BladeMan (com.nitrome.engine_specific.BladeMan)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class BladeMan extends Encounter {
public var py:Number;
public var state:int;
public var scan:Line;
public var dir:int;
public var count:int;
public var grid_x:int;
public var grid_y:int;
public var cast:RayCastReport;
public var previous_state:int;
public var dot:Dot;
public var temp_y:Number;
public var collision_rect:Rect;
public var health:int;// = 3
public var platform:Boolean;
public var attack_rect:Rect;
public static const RIGHT:int = 2;
public static const LEFT:int = 8;
private static const GRAVITY_Y:Number = 1.3;
public static const DEFLECT:int = 32;
private static const JUMP_ATTACK_Y:Array = [-21, -21, -21, -21, -21, -21, -21, -21, -21, -51, -81, -121, -154, -169, -170, -170, -170, -170, -170, -170, -118, -58, -21, -21, -21, -21, -21, -21, -21, -21, -21];
private static const INTO_DEFEND_DELAY:int = 8;
public static const UP:int = 1;
private static const JUMP_ATTACK_DELAY:int = 30;
public static const RUNNING:int = 1;
private static const FLOOR_DEPTH:int = 6;
public static const DOWN:int = 4;
private static const ATTACK_DELAY:int = 13;
public static const WAITING:int = 4;
public static const SPEED:Number = 6;
private static const RECOVER_DELAY:int = 10;
private static const DEFLECT_DELAY:int = 3;
public static const TEST_DEPTH:int = 5;
private static const JUMP_ATTACK_DIST:int = 150;
private static const DAMPING_Y:Number = 0.99;
public static const RIGHT_ID:int = 380;
private static const height:int = 42;
public static const RECOVER:int = 64;
public static const DEFEND:int = 128;
private static const width:int = 26;
public static const ATTACK:int = 8;
private static const ATTACK_DIST:int = 50;
public static const LEFT_ID:int = 379;
public static const FALLING:int = 2;
public static const INTO_DEFEND:int = 254;
public static const JUMP_ATTACK:int = 16;
public function BladeMan(_arg1:int, _arg2:Sprite, _arg3:Game){
health = 3;
super(_arg2, _arg3, true);
has_main = true;
has_collision = true;
this.dir = _arg1;
collision_rect = new Rect((x - (width >> 1)), (y - (height >> 1)), 26, 42);
attack_rect = new Rect();
map_x = ((x * _arg3.SCALE) >> 0);
map_y = ((y * _arg3.SCALE) >> 0);
py = y;
if (_arg3.blocks_in_play[(map_y + 1)][map_x] == _arg3.IN_PLAY){
platform = true;
state = WAITING;
} else {
platform = false;
state = FALLING;
};
if (_arg3.player != null){
scan = new Line(new Dot(_arg2.x, _arg2.y), _arg3.player);
};
reward = new HiddenInt(70);
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
public function toString():String{
var _local1:String;
_local1 = "";
if (state == ATTACK){
_local1 = "ATTACK";
} else {
if (state == JUMP_ATTACK){
_local1 = "JUMP_ATTACK";
} else {
if (state == RUNNING){
_local1 = "RUNNING";
} else {
if (state == WAITING){
_local1 = "WAITING";
} else {
if (state == RECOVER){
_local1 = "RECOVER";
} else {
if (state == FALLING){
_local1 = "FALLING";
} else {
if (state == INTO_DEFEND){
_local1 = "INTO_DEFEND";
} else {
if (state == DEFEND){
_local1 = "DEFEND";
} else {
if (state == DEFLECT){
_local1 = "DEFLECT";
};
};
};
};
};
};
};
};
};
_local1 = (_local1 + ((((("(" + x) + ",") + y) + ")") + count));
return (_local1);
}
override public function intersects(_arg1:Rect):Boolean{
return (attack_rect.intersects(_arg1));
}
public function updateAnimState():void{
if (state == RUNNING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "run_right"){
(mc as MovieClip).gotoAndStop("run_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "run_left"){
(mc as MovieClip).gotoAndStop("run_left");
};
};
};
} else {
if ((((state == WAITING)) || ((state == RECOVER)))){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "wait_right"){
(mc as MovieClip).gotoAndStop("wait_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "wait_left"){
(mc as MovieClip).gotoAndStop("wait_left");
};
};
};
} else {
if (state == ATTACK){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "attack_right"){
(mc as MovieClip).gotoAndStop("attack_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "attack_left"){
(mc as MovieClip).gotoAndStop("attack_left");
};
};
};
} else {
if (state == JUMP_ATTACK){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "jump_attack_right"){
(mc as MovieClip).gotoAndStop("jump_attack_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "jump_attack_left"){
(mc as MovieClip).gotoAndStop("jump_attack_left");
};
};
};
} else {
if (state == FALLING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "fall_right"){
(mc as MovieClip).gotoAndStop("fall_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "fall_left"){
(mc as MovieClip).gotoAndStop("fall_left");
};
};
};
} else {
if (state == INTO_DEFEND){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "into_defend_right"){
(mc as MovieClip).gotoAndStop("into_defend_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "into_defend_left"){
(mc as MovieClip).gotoAndStop("into_defend_left");
};
};
};
} else {
if (state == DEFEND){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "defend_right"){
(mc as MovieClip).gotoAndStop("defend_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "defend_left"){
(mc as MovieClip).gotoAndStop("defend_left");
};
};
};
} else {
if (state == DEFLECT){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "deflect_right"){
(mc as MovieClip).gotoAndStop("deflect_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "deflect_left"){
(mc as MovieClip).gotoAndStop("deflect_left");
};
};
};
};
};
};
};
};
};
};
};
}
public function main():void{
if (!g.scroller.contains(x, y)){
remove();
return;
};
if (!g.player.active){
state = WAITING;
};
if (state == WAITING){
if (scan != null){
scan.a.x = mc.x;
scan.a.y = mc.y;
scan.updateLine();
cast = RayCast.playerCast(scan, g.block_map, g.player);
if (((((g.player.active) && (cast.found))) && ((((((g.player.x < x)) && ((dir == LEFT)))) || ((((g.player.x > x)) && ((dir == RIGHT)))))))){
state = RUNNING;
};
} else {
if (g.player != null){
scan = new Line(new Dot(mc.x, mc.y), g.player);
};
};
};
if (state == RUNNING){
move();
scan.updateLine();
cast = RayCast.playerCast(scan, g.block_map, g.player);
if (((((g.player.active) && (!((g.player.state == Player.STEALTH))))) && ((g.player.x < (x - (width >> 1)))))){
dir = LEFT;
tile_id = LEFT_ID;
} else {
if (((((g.player.active) && (!((g.player.state == Player.STEALTH))))) && ((g.player.x > (x + (width >> 1)))))){
dir = RIGHT;
tile_id = RIGHT_ID;
};
};
if (((((((g.player.active) && (!((g.player.state == Player.STEALTH))))) && ((g.player.map_y == map_y)))) && (Util.proximity(x, y, g.player.x, g.player.y, ATTACK_DIST)))){
state = ATTACK;
count = 0;
} else {
if (((((((((g.player.active) && (!((g.player.state == Player.STEALTH))))) && (cast.found))) && ((g.player.map_y < map_y)))) && (Util.proximity(x, y, g.player.x, g.player.y, JUMP_ATTACK_DIST)))){
state = JUMP_ATTACK;
count = 0;
};
};
if (dir == RIGHT){
grid_x = ((((x + (width >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
grid_y = map_y;
if (g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY){
state = INTO_DEFEND;
count = 0;
};
grid_y = ((((y + (height >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
if (g.blocks_in_play[grid_y][grid_x] != g.IN_PLAY){
state = INTO_DEFEND;
count = 0;
};
} else {
if (dir == LEFT){
grid_x = ((((x - (width >> 1)) - TEST_DEPTH) * g.SCALE) >> 0);
grid_y = map_y;
if (g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY){
state = INTO_DEFEND;
count = 0;
};
grid_y = ((((y + (height >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
if (g.blocks_in_play[grid_y][grid_x] != g.IN_PLAY){
state = INTO_DEFEND;
count = 0;
};
};
};
} else {
if (state == FALLING){
findFloor();
if (platform == false){
verletY(GRAVITY_Y, DAMPING_Y);
};
} else {
if (state == INTO_DEFEND){
count++;
if (count >= INTO_DEFEND_DELAY){
state = DEFEND;
};
} else {
if (state == DEFEND){
if (((!((g.player.state == Player.STEALTH))) && ((((((dir == RIGHT)) && ((g.player.x < x)))) || ((((dir == LEFT)) && ((g.player.x > x)))))))){
state = RUNNING;
};
} else {
if (state == DEFLECT){
count++;
if (count >= DEFLECT_DELAY){
state = previous_state;
};
} else {
if (state == ATTACK){
count++;
if (count >= ATTACK_DELAY){
state = RECOVER;
count = 0;
};
} else {
if (state == JUMP_ATTACK){
count++;
if (count >= JUMP_ATTACK_DELAY){
state = RECOVER;
count = 0;
};
} else {
if (state == RECOVER){
count++;
if (count >= RECOVER_DELAY){
state = RUNNING;
count = 0;
};
};
};
};
};
};
};
};
};
updateAnimState();
updateMC();
updateCollisionRect();
}
public function verletY(_arg1:Number, _arg2:Number):void{
temp_y = y;
y = (y + ((_arg2 * (y - py)) + _arg1));
py = temp_y;
map_y = ((y * g.SCALE) >> 0);
}
override public function resolvePlayerCollision(_arg1:Player):void{
if ((((state == ATTACK)) || ((state == JUMP_ATTACK)))){
if (state == JUMP_ATTACK){
if ((((count == 18)) || ((count == 19)))){
if (!_arg1.collision_rect.intersectsCircle(x, (collision_rect.y + (height >> 1)), 40)){
return;
};
};
};
if (state == ATTACK){
if ((((count == 3)) || ((count == 4)))){
if (!_arg1.collision_rect.intersectsCircle(x, (y - 5), 40)){
return;
};
};
};
_arg1.hit();
};
}
public function kill(_arg1:Number):void{
var _local2:MovieClip;
if (!active){
return;
};
NitromeGame.bonus.buddha.value = 0;
active = false;
_local2 = new BangSmallMC();
_local2.x = mc.x;
_local2.y = mc.y;
g.explosion_holder.addChild(_local2);
g.addDebris(_local2.x, _local2.y, ((_arg1 > 0)) ? 10 : -10, "BorgDebris1", "BorgDebris2", "BorgDebris3", "SwordDebris");
}
public function move():void{
if (dir == RIGHT){
x = (x + SPEED);
scan.a.x = (scan.a.x + SPEED);
} else {
if (dir == LEFT){
x = (x - SPEED);
scan.a.x = (scan.a.x - SPEED);
};
};
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
}
override public function resolveWeaponCollision(_arg1:Star):void{
var _local2:MovieClip;
var _local3:int;
if (!(((state == WAITING)) || ((state == RECOVER)))){
if (!(((state == ATTACK)) || ((state == JUMP_ATTACK)))){
previous_state = state;
state = DEFLECT;
count = 0;
};
return;
};
health--;
_local2 = new HitSparkMC();
_local2.x = (_arg1.x >> 0);
_local2.y = (_arg1.y >> 0);
_local3 = collision_rect.sideOf(_arg1.x, _arg1.y);
if (_local3 == UP){
} else {
if (_local3 == RIGHT){
_local2.rotation = 90;
} else {
if (_local3 == DOWN){
_local2.rotation = 180;
} else {
if (_local3 == LEFT){
_local2.rotation = 270;
};
};
};
};
g.effect_holder.addChild(_local2);
if (health <= 0){
if (!spawned){
g.addScore(reward.value);
} else {
g.addScore((reward.value / 10));
};
kill((_arg1.x - _arg1.px));
NitromeGame.sound_manager.playSound("smithdie");
} else {
NitromeGame.sound_manager.playSound("smithhit");
};
}
public function findFloor():void{
if (g.blocks_in_play[(map_y + 1)][map_x] == g.IN_PLAY){
if (((((map_x * g.scale) > ((-1 + x) + (width >> 1)))) || (((((map_x * g.scale) + g.scale) - 1) < (x - (width >> 1)))))){
return;
};
if (((((y + (height >> 1)) < ((map_y + 1) * g.scale))) || (((y + (height >> 1)) > ((((map_y + 1) * g.scale) + FLOOR_DEPTH) + (y - py)))))){
return;
};
platform = true;
y = (((map_y + 1) * g.scale) - (height >> 1));
updateCollisionRect();
state = WAITING;
};
}
public function updateCollisionRect():void{
collision_rect.x = (x - (width >> 1));
collision_rect.y = (y - (height >> 1));
attack_rect.x = (attack_rect.y = (attack_rect.width = (attack_rect.height = 0)));
if (state == JUMP_ATTACK){
collision_rect.y = (y + JUMP_ATTACK_Y[count]);
if (count == 9){
attack_rect.x = ((dir == LEFT)) ? (x - 46) : (x - 20);
attack_rect.y = (y - 49);
attack_rect.width = 72;
attack_rect.height = 30;
} else {
if (count == 11){
attack_rect.x = ((dir == LEFT)) ? (x - 43) : (x - 23);
attack_rect.y = (y - 111);
attack_rect.width = 72;
attack_rect.height = 30;
} else {
if ((((count == 18)) || ((count == 19)))){
attack_rect.x = ((dir == LEFT)) ? (x - 48) : (x - 46);
attack_rect.y = (y - 203);
attack_rect.width = 92;
attack_rect.height = 92;
} else {
if (count == 20){
attack_rect.x = ((dir == LEFT)) ? (x - 39) : (x + 9);
attack_rect.y = (y - 88);
attack_rect.width = 30;
attack_rect.height = 5;
} else {
if ((((count >= 22)) && ((count <= 24)))){
attack_rect.x = ((dir == LEFT)) ? (x - 39) : (x + 9);
attack_rect.y = (y + 11);
attack_rect.width = 30;
attack_rect.height = 5;
};
};
};
};
};
};
if (state == ATTACK){
if ((((count == 3)) || ((count == 4)))){
attack_rect.x = ((dir == LEFT)) ? (x - 47) : (x - 41);
attack_rect.y = (y - 65);
attack_rect.width = 92;
attack_rect.height = 92;
} else {
if ((((count >= 5)) && ((count <= 7)))){
attack_rect.x = ((dir == LEFT)) ? (x - 39) : (x + 9);
attack_rect.y = (y + 11);
attack_rect.width = 30;
attack_rect.height = 5;
};
};
};
}
}
}//package com.nitrome.engine_specific
Section 16
//Block (com.nitrome.engine_specific.Block)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
public class Block extends Rect {
public var active:Boolean;
public var block:Boolean;// = true
public var :Boolean;// = false
public var attachable:Boolean;
public var force_field:Boolean;// = false
public var stacked:int;
public function Block(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
block = true;
force_field = false;
= false;
super(_arg1, _arg2, _arg3, _arg4);
stacked = 0;
attachable = true;
active = true;
}
public function stack(_arg1:int):void{
stacked = (stacked | _arg1);
}
}
}//package com.nitrome.engine_specific
Section 17
//BlockClip (com.nitrome.engine_specific.BlockClip)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class BlockClip extends Clip {
public var b:Block;
public var spawn:Boolean;// = false
public function BlockClip(_arg1:Sprite, _arg2:Game){
spawn = false;
super(_arg1, _arg2);
block = true;
}
public function debug():void{
b.draw(g.debug);
if (b.stacked > 0){
if ((b.stacked & Rect.UP)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo((b.x + (b.width * 0.5)), b.y);
};
if ((b.stacked & Rect.RIGHT)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo((b.x + b.width), (b.y + (b.height * 0.5)));
};
if ((b.stacked & Rect.DOWN)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo((b.x + (b.width * 0.5)), (b.y + b.height));
};
if ((b.stacked & Rect.LEFT)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo(b.x, (b.y + (b.height * 0.5)));
};
};
}
}
}//package com.nitrome.engine_specific
Section 18
//Boss (com.nitrome.engine_specific.Boss)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Boss extends Encounter {
public var count:int;
public var :Number;
public var type:int;
public var cast:RayCastReport;
public var gun:MovieClip;
public var strength:Number;
public var firing_count:int;
public var :MovieClip;
public var :int;
private var i:int;
public var health:int;// = 30
public var shield:Sprite;
public var :Boolean;
public var attack_rect:Rect;
public var scan:Line;
public var collisions:int;
public var :Number;
public var target:Line;
public var dir:int;
public var state:int;
public var scan_holder:Sprite;
public var wobble:int;
public var
:MovieClip;
public var grid_x:int;
public var grid_y:int;
public var on_screen:Boolean;
public var :int;
public var collision_rect:Rect;
public var angle:int;// = 0
public var :MovieClip;
public static const LEFT:int = 8;
public static const SWORD_LENGTH:Number = 172;
public static const RIGHT:int = 2;
public static const FIRST:int = 1;
public static const FIRING_DELAY:int = 11;
public static const UP:int = 1;
public static const BANG_DELAY:int = 75;
public static const SPEED:Number = 4;
public static const DOWN:int = 4;
public static const STOPPED:int = 1;
public static const WARM_UP_STEP:Number = 0.08;
public static const WOBBLE_STEP:int = 6;
public static const INTO_GOING:int = 2;
public static const TEST_DEPTH:Number = 172;
private static const width:int = 54;
private static const height:int = 54;
private static const ALPHA:Array = [0.45, 0.25, 0.15];
public static const MOVING:int = 16;
public static const SWORD_ANGLE:Number = 99;
public static const STOPPING_DELAY:int = 10;
public static const HEALTH:int = 30;
public static const INTO_GOING_DELAY:int = 10;
public static const GOING:int = 4;
public static const FIRING_CHARGE_DELAY:int = 6;
public static const TURN_SPEED:Number = 1;
public static const FLOOR_TEST_DEPTH:Number = 49;
public static const DEAD:int = 16;
public static const ATTACK_RANGE:Number = 100;
public static const STOPPING:int = 8;
private static const COLS:Array = [0xFA0092, 0xF900FA, 0xED00FA];
public static const SECOND:int = 2;
public function Boss(_arg1:int, _arg2:Sprite, _arg3:Game){
var _local4:Dot;
var _local5:Sprite;
angle = 0;
health = 30;
super(_arg2, _arg3, true);
this.type = _arg1;
firing_count = 0;
strength = 0;
has_main = true;
_local4 = new Dot(x, (y - 0));
scan = new Line(_local4, new Dot(_local4.x, (_local4.y - (_arg3.width + _arg3.height))));
if (_arg3.player != null){
target = new Line(_local4, _arg3.player);
};
gun = new GunMC();
gun.y = (gun.y - 0);
gun.rotation = -90;
_arg2.addChildAt(gun, 0);
scan_holder = new Sprite();
_arg2.addChildAt(scan_holder, 0);
if (_arg1 == SECOND){
= new ChainsawMC();
_arg2.addChildAt(, 0);
= UP;
= 0;
= 0;
= new FlamesLeftMC();
= new FlamesRightMC();
_arg2.addChild();
_arg2.addChild(
);
.alpha = 0;
.alpha = 0;
};
_local5 = new BossBackMC();
_arg2.addChildAt(_local5, 0);
attack_rect = new Rect();
collision_rect = new Rect((x - 38), (y - 81), 75, 98);
state = STOPPED;
reward = new HiddenInt(1000);
NitromeGame.timeline.enemy_health_panel.bar.scaleX = 1;
}
override public function unpause():void{
if (gun.currentFrame < 3){
gun.stop();
};
if ( == MOVING){
.stop();
};
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
override public function intersects(_arg1:Rect):Boolean{
return (attack_rect.intersects(_arg1));
}
public function fire():void{
firing_count++;
if (firing_count == (FIRING_DELAY - FIRING_CHARGE_DELAY)){
gun.gotoAndPlay("fire");
};
if (firing_count >= FIRING_DELAY){
NitromeGame.sound_manager.playSound("shot");
g.createBullet((x + (scan.dx * 55)), ((gun.y + y) + (scan.dy * 55)), ((gun.rotation + 360) % 360));
firing_count = 0;
if ((((cast == null)) || (((!((cast == null))) && (!(cast.found)))))){
= false;
};
};
}
public function updateAnimState():void{
if (state == INTO_GOING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "go_right"){
(mc as MovieClip).gotoAndStop("go_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "go_left"){
(mc as MovieClip).gotoAndStop("go_left");
};
};
};
} else {
if (state == STOPPING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "stop_right"){
(mc as MovieClip).gotoAndStop("stop_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "stop_left"){
(mc as MovieClip).gotoAndStop("stop_left");
};
};
};
} else {
if (state == GOING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "right"){
(mc as MovieClip).gotoAndStop("right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "left"){
(mc as MovieClip).gotoAndStop("left");
};
};
};
} else {
if (state == STOPPED){
if ((mc as MovieClip).currentLabel != "stopped"){
(mc as MovieClip).gotoAndStop("stopped");
};
} else {
if (state == DEAD){
if ((mc as MovieClip).currentLabel != "dead"){
(mc as MovieClip).gotoAndStop("dead");
};
};
};
};
};
};
}
public function rotate():void{
scan.dx = Trig.cos[((gun.rotation + 360) % 360)];
scan.dy = Trig.sin[((gun.rotation + 360) % 360)];
scan.vx = (scan.dx * scan.len);
scan.vy = (scan.dy * scan.len);
scan.b.x = (scan.a.x + scan.vx);
scan.b.y = (scan.a.y + scan.vy);
scan.rx = -(scan.dy);
scan.ry = scan.dx;
scan.lx = scan.dy;
scan.ly = -(scan.dx);
}
public function kill(_arg1:Number):void{
var _local2:MovieClip;
if (!active){
return;
};
active = false;
_local2 = new BangMegaMC();
_local2.x = mc.x;
_local2.y = mc.y;
g.explosion_holder.addChild(_local2);
g.shake_count = 1;
g.addDebris(mc.x, mc.y, ((_arg1 > 0)) ? 10 : -10, "BossDebris1", "BossDebris2", "BossDebris3", "BossDebris4", "BossDebris5", "BossDebris6");
}
public function toString():String{
var _local1:String;
_local1 = "";
if (state == INTO_GOING){
_local1 = "INTO_GOING";
} else {
if (state == GOING){
_local1 = "GOING";
} else {
if (state == STOPPING){
_local1 = "STOPPING";
} else {
if (state == STOPPED){
_local1 = "STOPPED";
};
};
};
};
if ( == UP){
_local1 = (_local1 + " UP");
} else {
if ( == RIGHT){
_local1 = (_local1 + " RIGHT");
} else {
if ( == LEFT){
_local1 = (_local1 + " LEFT");
} else {
if ( == MOVING){
_local1 = (_local1 + " MOVING");
};
};
};
};
_local1 = (_local1 + ((((("(" + x) + ",") + y) + ")") + count));
return (_local1);
}
public function main():void{
var _local1:Number;
if (state != DEAD){
if (type == SECOND){
if (((( == RIGHT)) || (( == LEFT)))){
if ( == RIGHT){
if (
.alpha < 1){
.alpha = (
.alpha + 0.2);
};
attack_rect.x = (x + 49);
attack_rect.y = (y - 10);
};
if ( == LEFT){
if (.alpha < 1){
.alpha = (.alpha + 0.2);
};
attack_rect.x = (x - 172);
attack_rect.y = (y - 10);
};
if (g.player.y < y){
= MOVING;
= 0;
attack_rect.x = (attack_rect.y = (attack_rect.width = (attack_rect.height = 0)));
.stop();
} else {
if (((( == LEFT)) && ((g.player.x > x)))){
= MOVING;
= SWORD_ANGLE;
attack_rect.x = (attack_rect.y = (attack_rect.width = (attack_rect.height = 0)));
.stop();
} else {
if (((( == RIGHT)) && ((g.player.x < x)))){
= MOVING;
= -(SWORD_ANGLE);
attack_rect.x = (attack_rect.y = (attack_rect.width = (attack_rect.height = 0)));
.stop();
};
};
};
} else {
if ( == UP){
attack_rect.x = (x - 23);
attack_rect.y = (y - 172);
if (g.player.y >= y){
if (g.player.x <= x){
= MOVING;
= -(SWORD_ANGLE);
attack_rect.x = (attack_rect.y = (attack_rect.width = (attack_rect.height = 0)));
.stop();
} else {
if (g.player.x > x){
= MOVING;
= SWORD_ANGLE;
attack_rect.x = (attack_rect.y = (attack_rect.width = (attack_rect.height = 0)));
.stop();
};
};
};
} else {
if ( == MOVING){
if (.alpha > 0){
.alpha = (.alpha - 0.2);
};
if (
.alpha > 0){
.alpha = (
.alpha - 0.2);
};
if ( < ){
= ( - (TURN_SPEED * 5));
} else {
if ( > ){
= ( + (TURN_SPEED * 5));
};
};
if (Math.abs(( - )) < 10){
= ;
if ( == 0){
= UP;
attack_rect.x = (x - 23);
attack_rect.y = (y - 172);
attack_rect.width = 48;
attack_rect.height = 123;
} else {
if ( == SWORD_ANGLE){
= RIGHT;
attack_rect.x = (x + 49);
attack_rect.y = (y - 10);
attack_rect.width = 123;
attack_rect.height = 48;
} else {
if ( == -(SWORD_ANGLE)){
= LEFT;
attack_rect.x = (x - 172);
attack_rect.y = (y - 10);
attack_rect.width = 123;
attack_rect.height = 48;
};
};
};
.gotoAndPlay(1);
};
.rotation = ;
};
};
};
};
if ( ){
fire();
} else {
if (((!((target == null))) && (!((g.player.state == Player.STEALTH))))){
target.updateLine();
_local1 = ((target.vx * scan.lx) + (target.vy * scan.ly));
if (_local1 <= -100){
gun.rotation = (gun.rotation + (TURN_SPEED * 5));
} else {
if (_local1 < 0){
gun.rotation = (gun.rotation + TURN_SPEED);
} else {
if (_local1 < 100){
gun.rotation = (gun.rotation - TURN_SPEED);
} else {
if (_local1 >= 100){
gun.rotation = (gun.rotation - (TURN_SPEED * 5));
};
};
};
};
} else {
if (g.player != null){
target = new Line(scan.a, g.player);
};
};
if (((((!((g.player.state == Player.STEALTH))) && (!((cast == null))))) && (cast.found))){
if (((((!(Util.proximity(g.player.x, g.player.y, x, y, 60))) && (!( )))) && ((strength >= 1)))){
= true;
};
};
};
rotate();
};
if (state == DEAD){
--;
if ( == 0){
if (type == FIRST){
Util.stopClips(mc);
(mc as MovieClip).gotoAndStop("stopped");
g.levelComplete();
} else {
if (type == SECOND){
kill(0);
g.levelComplete();
};
};
return;
};
if ( < 2){
(mc as MovieClip).gotoAndStop("stopped");
Util.stopClips(mc);
return;
};
} else {
if (state == STOPPED){
if (g.player.state != Player.STEALTH){
if (g.player.y >= y){
if (g.player.x <= x){
if (((((x - g.player.x) > SWORD_LENGTH)) && (!((collisions & LEFT))))){
dir = LEFT;
state = INTO_GOING;
count = 0;
collisions = 0;
} else {
if (((((x - g.player.x) < ATTACK_RANGE)) && (!((collisions & RIGHT))))){
dir = RIGHT;
state = INTO_GOING;
count = 0;
collisions = 0;
};
};
} else {
if (g.player.x > x){
if (((((g.player.x - x) > SWORD_LENGTH)) && (!((collisions & RIGHT))))){
dir = RIGHT;
state = INTO_GOING;
count = 0;
collisions = 0;
} else {
if (((((g.player.x - x) < ATTACK_RANGE)) && (!((collisions & LEFT))))){
dir = LEFT;
state = INTO_GOING;
count = 0;
collisions = 0;
};
};
};
};
} else {
if (g.player.x <= x){
if (((((x - g.player.x) > SWORD_LENGTH)) && (!((collisions & LEFT))))){
dir = LEFT;
state = INTO_GOING;
count = 0;
collisions = 0;
} else {
if (((((x - g.player.x) < ATTACK_RANGE)) && (!((collisions & RIGHT))))){
dir = RIGHT;
state = INTO_GOING;
count = 0;
collisions = 0;
};
};
} else {
if (g.player.x > x){
if (((((g.player.x - x) > SWORD_LENGTH)) && (!((collisions & RIGHT))))){
dir = RIGHT;
state = INTO_GOING;
count = 0;
collisions = 0;
} else {
if (((((g.player.x - x) < ATTACK_RANGE)) && (!((collisions & LEFT))))){
dir = LEFT;
state = INTO_GOING;
count = 0;
collisions = 0;
};
};
};
};
};
};
} else {
if ((((state == INTO_GOING)) || ((state == GOING)))){
if (dir == RIGHT){
grid_x = ((((x + (width >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
grid_y = map_y;
if (g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY){
state = STOPPING;
count = 0;
collisions = (collisions | RIGHT);
};
grid_y = (((y + FLOOR_TEST_DEPTH) * g.SCALE) >> 0);
if (g.blocks_in_play[grid_y][grid_x] != g.IN_PLAY){
state = STOPPING;
count = 0;
collisions = (collisions | RIGHT);
};
} else {
if (dir == LEFT){
grid_x = ((((x - (width >> 1)) - TEST_DEPTH) * g.SCALE) >> 0);
grid_y = map_y;
if (g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY){
state = STOPPING;
count = 0;
collisions = (collisions | LEFT);
};
grid_y = (((y + FLOOR_TEST_DEPTH) * g.SCALE) >> 0);
if (g.blocks_in_play[grid_y][grid_x] != g.IN_PLAY){
state = STOPPING;
count = 0;
collisions = (collisions | LEFT);
};
};
};
if (g.player.y >= y){
if ((((((g.player.x < (x - ATTACK_RANGE))) && ((g.player.x > (x - SWORD_LENGTH))))) || ((((g.player.x > (x + ATTACK_RANGE))) && ((g.player.x < (x + SWORD_LENGTH))))))){
state = STOPPING;
count = 0;
};
} else {
if ((((((g.player.x < x)) && ((g.player.x > (x - ATTACK_RANGE))))) || ((((g.player.x > x)) && ((g.player.x < (x + ATTACK_RANGE))))))){
state = STOPPING;
count = 0;
};
};
if (state == INTO_GOING){
count++;
if (count >= INTO_GOING_DELAY){
state = GOING;
};
};
if (state != STOPPING){
move();
};
} else {
if (state == STOPPING){
count++;
if (count >= STOPPING){
state = STOPPED;
};
};
};
};
};
on_screen = Util.onScreen(x, y, g, 100);
if (on_screen){
cast = RayCast.playerCast(scan, g.block_map, g.player);
};
if ((((strength < 1)) && (on_screen))){
strength = (strength + WARM_UP_STEP);
} else {
if (strength > 0){
strength = (strength - WARM_UP_STEP);
};
};
updateAnimState();
updateMC();
updateCollisionRect();
}
override public function resolvePlayerCollision(_arg1:Player):void{
_arg1.hit();
}
public function move():void{
if (dir == RIGHT){
x = (x + SPEED);
scan.a.x = (scan.a.x + SPEED);
} else {
if (dir == LEFT){
x = (x - SPEED);
scan.a.x = (scan.a.x - SPEED);
};
};
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
}
override public function resolveWeaponCollision(_arg1:Star):void{
var _local2:MovieClip;
var _local3:int;
if (state == DEAD){
return;
};
health--;
NitromeGame.sound_manager.playSound("cough");
NitromeGame.timeline.enemy_health_panel.bar.scaleX = ((1 / HEALTH) * health);
_local2 = new HitSparkMC();
_local2.x = (_arg1.x >> 0);
_local2.y = (_arg1.y >> 0);
_local3 = collision_rect.sideOf(_arg1.x, _arg1.y);
if (_local3 == UP){
} else {
if (_local3 == RIGHT){
_local2.rotation = 90;
} else {
if (_local3 == DOWN){
_local2.rotation = 180;
} else {
if (_local3 == LEFT){
_local2.rotation = 270;
};
};
};
};
g.effect_holder.addChild(_local2);
if (health <= 0){
g.addScore(reward.value);
state = DEAD;
g.god_mode = true;
= BANG_DELAY;
};
}
public function updateCollisionRect():void{
collision_rect.x = (x - 38);
collision_rect.y = (y - 81);
}
}
}//package com.nitrome.engine_specific
Section 19
//Bullet (com.nitrome.engine_specific.Bullet)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Bullet extends Encounter {
public var px:Number;
public var py:Number;
public var temp_x:Number;
public var temp_y:Number;
public static const SPEED:Number = 8;
public function Bullet(_arg1:Number, _arg2:Number, _arg3:MovieClip, _arg4:Game){
super(_arg3, _arg4, true);
has_main = true;
= true;
px = (x - (_arg1 * SPEED));
py = (y - (_arg2 * SPEED));
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
override public function intersects(_arg1:Rect):Boolean{
return (_arg1.intersectsCircle(x, y, 3));
}
public function erase():void{
active = false;
}
public function main():void{
var _local1:Block;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Rect;
var _local6:*;
var _local7:Number;
var _local8:Number;
temp_x = x;
temp_y = y;
x = (x + (x - px));
y = (y + (y - py));
px = temp_x;
py = temp_y;
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
updateMC();
if (!g.scroller.contains(x, y)){
erase();
return;
};
if (((((isNaN(g.block_map[map_y][map_x])) && (!((g.block_map[map_y][map_x] == null))))) && (g.block_map[map_y][map_x].block))){
_local1 = g.block_map[map_y][map_x].b;
_local2 = _local1.sideOf(x, y);
_local3 = (x - px);
_local4 = (y - py);
_local5 = new Rect(0, 0, 0, 0);
_local5.x = Math.min(x, px);
_local5.y = Math.min(y, py);
_local5.width = Math.abs((x - px));
_local5.height = Math.abs((y - py));
_local6 = _local5.intersection(_local1);
_local7 = 0;
_local8 = 0;
if (_local3 != 0){
_local7 = (Math.min(Math.abs(_local3), _local6.width) * ((_local3 > 0)) ? 1 : -1);
};
if (_local4 != 0){
_local8 = (Math.min(Math.abs(_local4), _local6.height) * ((_local4 > 0)) ? 1 : -1);
};
x = (x - _local7);
y = (y - _local8);
_local2 = _local1.sideOf(x, y);
if ((_local1.stacked & _local2)){
if ((((_local2 == Rect.UP)) || ((_local2 == Rect.DOWN)))){
if (x < (_local1.x + (_local1.width * 0.5))){
x = (_local1.x - 1);
_local2 = Rect.LEFT;
} else {
x = (_local1.x + _local1.width);
_local2 = Rect.RIGHT;
};
} else {
if ((((_local2 == Rect.RIGHT)) || ((_local2 == Rect.LEFT)))){
if (y < (_local1.y + (_local1.height * 0.5))){
y = (_local1.y - 1);
_local2 = Rect.UP;
} else {
y = (_local1.y + _local1.height);
_local2 = Rect.DOWN;
};
};
};
} else {
if (_local2 == Rect.LEFT){
x = (_local1.x - 1);
} else {
if (_local2 == Rect.UP){
y = (_local1.y - 1);
};
};
};
updateMC();
kill();
};
}
public function setDirection(_arg1:Number, _arg2:Number):void{
}
override public function resolvePlayerCollision(_arg1:Player):void{
_arg1.hit();
kill();
}
public function kill():void{
var _local1:MovieClip;
if (!active){
return;
};
active = false;
_local1 = new BulletHitMC();
_local1.x = mc.x;
_local1.y = mc.y;
g.effect_holder.addChild(_local1);
}
}
}//package com.nitrome.engine_specific
Section 20
//Coin (com.nitrome.engine_specific.Coin)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Coin extends Encounter {
public var collision_rect:Rect;
public function Coin(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2, false);
collision_rect = new Rect((_arg1.x + 15), (_arg1.y + 36), 35, 28);
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
override public function intersects(_arg1:Rect):Boolean{
return (collision_rect.intersects(_arg1));
}
override public function resolvePlayerCollision(_arg1:Player):void{
g.addScore(50);
kill();
}
public function kill():void{
var _local1:MovieClip;
if (!active){
return;
};
_local1 = new CoinFadeMC();
NitromeGame.sound_manager.playSound("coins");
NitromeGame.bonus.cash_count.value--;
_local1.x = mc.x;
_local1.y = mc.y;
g.star_holder.addChild(_local1);
g.scroller.map_array_layers[layer][map_y][map_x] = 0;
active = false;
}
override public function resolveWeaponCollision(_arg1:Star):void{
g.addScore(50);
kill();
}
}
}//package com.nitrome.engine_specific
Section 21
//DeadStar (com.nitrome.engine_specific.DeadStar)
package com.nitrome.engine_specific {
import flash.display.*;
import flash.events.*;
public class DeadStar extends Sprite {
private static const FADE_RATE:Number = 0.2;
public function init(_arg1:int):void{
if (_arg1 == 1){
} else {
if (_arg1 == 2){
rotation = 22.5;
} else {
if (_arg1 == 3){
rotation = 45;
} else {
if (_arg1 == 4){
rotation = 67.5;
};
};
};
};
}
public function kill():void{
addEventListener(Event.ENTER_FRAME, main, false, 0, true);
}
private function main(_arg1:Event):void{
if (alpha > 0){
alpha = (alpha - FADE_RATE);
} else {
removeEventListener(Event.ENTER_FRAME, main);
if (parent != null){
parent.removeChild(this);
};
};
}
}
}//package com.nitrome.engine_specific
Section 22
//ElectricBlock (com.nitrome.engine_specific.ElectricBlock)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class ElectricBlock extends EncounterBlock {
var collision_rect:Rect;
public function ElectricBlock(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2);
collision_rect = new Rect((x - 5), (y - 5), (_arg2.scale + 10), (_arg2.scale + 10));
has_collision = true;
}
override public function intersects(_arg1:Rect):Boolean{
return (collision_rect.intersects(_arg1));
}
override public function resolvePlayerCollision(_arg1:Player):void{
_arg1.hit();
}
}
}//package com.nitrome.engine_specific
Section 23
//EncounterBlock (com.nitrome.engine_specific.EncounterBlock)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class EncounterBlock extends Encounter {
public var b:Block;
public var spawn:Boolean;// = false
public function EncounterBlock(_arg1:Sprite, _arg2:Game){
spawn = false;
super(_arg1, _arg2, false);
block = true;
free = false;
has_collision = false;
}
override public function debug():void{
b.draw(g.debug);
if (b.stacked > 0){
if ((b.stacked & Rect.UP)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo((b.x + (b.width * 0.5)), b.y);
};
if ((b.stacked & Rect.RIGHT)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo((b.x + b.width), (b.y + (b.height * 0.5)));
};
if ((b.stacked & Rect.DOWN)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo((b.x + (b.width * 0.5)), (b.y + b.height));
};
if ((b.stacked & Rect.LEFT)){
g.debug.moveTo((b.x + (b.width * 0.5)), (b.y + (b.height * 0.5)));
g.debug.lineTo(b.x, (b.y + (b.height * 0.5)));
};
};
}
}
}//package com.nitrome.engine_specific
Section 24
//Finish (com.nitrome.engine_specific.Finish)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Finish extends Encounter {
public var collision_rect:Rect;
public function Finish(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2, false);
collision_rect = new Rect((_arg1.x + 19), (_arg1.y + 16), 24, 32);
}
override public function intersects(_arg1:Rect):Boolean{
return (collision_rect.intersects(_arg1));
}
override public function resolvePlayerCollision(_arg1:Player):void{
g.player.levelComplete();
kill();
}
public function kill():void{
var _local1:MovieClip;
if (!active){
return;
};
_local1 = new FinishFadeMC();
NitromeGame.sound_manager.playSound("yatta");
_local1.x = mc.x;
_local1.y = mc.y;
g.star_holder.addChild(_local1);
g.scroller.map_array_layers[layer][map_y][map_x] = 0;
active = false;
g.mouse_pressed = false;
g.levelComplete();
}
}
}//package com.nitrome.engine_specific
Section 25
//FlyingGun (com.nitrome.engine_specific.FlyingGun)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class FlyingGun extends Encounter {
public var shield:Sprite;
public var state:int;
public var scan:Line;
public var dir:int;
public var wobble:int;
public var r:Number;
public var best_node:Node;
public var nodes:Array;
private var i:int;
public var cast:RayCastReport;
public var gun:MovieClip;
public var strength:Number;
public var firing_count:int;
public var previous_state:int;
public var best_h:int;
public var on_screen:Boolean;
public var collision_rect:Rect;
public var health:int;// = 3
public var angle:int;// = 0
public static const WOBBLE_STEP:int = 6;
public static const LEFT:int = 8;
public static const RIGHT_ID:int = 366;
public static const LEFT_ID:int = 368;
public static const MOVING:int = 1;
public static const FIRING_DELAY:int = 11;
public static const DOWN_ID:int = 365;
public static const UP:int = 1;
public static const FIRING_CHARGE_DELAY:int = 6;
public static const TURN_SPEED:Number = 3;
public static const SPEED:Number = 4;
public static const DOWN:int = 4;
public static const TURNING:int = 2;
private static const COLS:Array = [0xFA0092, 0xF900FA, 0xED00FA];
public static const FIRING:int = 4;
public static const RIGHT:int = 2;
public static const WARM_UP_STEP:Number = 0.08;
private static const ALPHA:Array = [0.45, 0.25, 0.15];
public static const UP_ID:int = 367;
public function FlyingGun(_arg1:int, _arg2:MovieClip, _arg3:Game){
var _local4:Dot;
angle = 0;
health = 3;
super(_arg2, _arg3, true);
has_main = true;
has_collision = true;
this.dir = _arg1;
firing_count = 0;
strength = 0;
map_x = (init_x = ((x * _arg3.SCALE) >> 0));
map_y = (init_y = ((y * _arg3.SCALE) >> 0));
nodes = new Array();
nodes[0] = new Node();
nodes[1] = new Node();
nodes[2] = new Node();
nodes[3] = new Node();
gun = new GunMC();
if ((((_arg3.alert_state == _arg3.INACTIVE)) || ((_arg3.player == null)))){
selectPatrolPath();
} else {
selectSeekPath();
};
state = MOVING;
collision_rect = new Rect((x - 16), (y - 16), 32, 50);
if (this.dir == DOWN){
gun.rotation = (angle = 90);
} else {
if (this.dir == RIGHT){
gun.rotation = (angle = 0);
} else {
if (this.dir == UP){
gun.rotation = (angle = -90);
} else {
if (this.dir == LEFT){
gun.rotation = (angle = 180);
};
};
};
};
_local4 = new Dot((_arg2.x + 0.5), (_arg2.y + 0.5));
if (_arg1 == DOWN){
scan = new Line(_local4, new Dot(_local4.x, (_local4.y + (_arg3.width + _arg3.height))));
} else {
if (_arg1 == RIGHT){
scan = new Line(_local4, new Dot((_local4.x + (_arg3.width + _arg3.height)), _local4.y));
} else {
if (_arg1 == UP){
scan = new Line(_local4, new Dot(_local4.x, (_local4.y - (_arg3.width + _arg3.height))));
} else {
if (_arg1 == LEFT){
scan = new Line(_local4, new Dot((_local4.x - (_arg3.width + _arg3.height)), _local4.y));
};
};
};
};
rotate();
_arg2.addChildAt(gun, 0);
shield = new SmallShieldMC();
shield.blendMode = BlendMode.LIGHTEN;
_arg2.addChild(shield);
reward = new HiddenInt(70);
}
public function rotate():void{
scan.dx = Trig.cos[((gun.rotation + 360) % 360)];
scan.dy = Trig.sin[((gun.rotation + 360) % 360)];
scan.vx = (scan.dx * scan.len);
scan.vy = (scan.dy * scan.len);
scan.b.x = (scan.a.x + scan.vx);
scan.b.y = (scan.a.y + scan.vy);
scan.rx = -(scan.dy);
scan.ry = scan.dx;
scan.lx = scan.dy;
scan.ly = -(scan.dx);
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
wobble = ((wobble + WOBBLE_STEP) % 360);
if (cast != null){
i = 1;
while (i < 4) {
g.scan_holder.graphics.lineStyle((i * 3), COLS[(i - 1)], (strength * (ALPHA[(i - 1)] + Math.abs((Trig.sin[wobble] * 0.25)))));
g.scan_holder.graphics.moveTo(mc.x, mc.y);
g.scan_holder.graphics.lineTo(cast.ax, cast.ay);
i++;
};
};
if (state != FIRING){
if (shield.alpha < 0.6){
shield.alpha = (shield.alpha + WARM_UP_STEP);
} else {
if (shield.alpha > 0.6){
shield.alpha = (shield.alpha - WARM_UP_STEP);
};
};
} else {
if (shield.alpha > 0){
shield.alpha = (shield.alpha - (WARM_UP_STEP * 2));
};
};
}
override public function intersects(_arg1:Rect):Boolean{
if (g.player.state == Player.STEALTH){
return (false);
};
if (cast != null){
return (cast.found);
};
return (false);
}
public function main():void{
if (!g.scroller.contains(x, y)){
remove();
return;
};
if (state == MOVING){
move();
if ((((dir == UP)) || ((dir == DOWN)))){
if (((y - 32) * g.SCALE) == map_y){
if (g.alert_state == g.ACTIVE){
selectSeekPath();
} else {
if (g.alert_state == g.INACTIVE){
selectPatrolPath();
};
};
};
} else {
if ((((dir == LEFT)) || ((dir == RIGHT)))){
if (((x - 32) * g.SCALE) == map_x){
if (g.alert_state == g.ACTIVE){
selectSeekPath();
} else {
if (g.alert_state == g.INACTIVE){
selectPatrolPath();
};
};
};
};
};
} else {
if (state == TURNING){
if (Math.abs((angle - gun.rotation)) <= TURN_SPEED){
gun.rotation = angle;
state = MOVING;
} else {
r = gun.rotation;
r = (r + ((Math.abs((angle - r)))>180) ? ((r)<angle) ? 360 : -(360) : 0);
r = (r + (((angle - r) > 0)) ? TURN_SPEED : -(TURN_SPEED));
gun.rotation = r;
};
rotate();
} else {
if (state == FIRING){
fire();
};
};
};
on_screen = Util.onScreen(x, y, g, 100);
if (on_screen){
cast = RayCast.playerCast(scan, g.block_map, g.player);
} else {
cast = null;
};
if ((((strength < 1)) && (on_screen))){
strength = (strength + WARM_UP_STEP);
} else {
if (strength > 0){
strength = (strength - WARM_UP_STEP);
};
};
updateMC();
updateCollisionRect();
}
public function selectPatrolPath():void{
if ((((dir == UP)) || ((dir == DOWN)))){
if (dir == UP){
if ((((map_y == 0)) || (!((((g.block_map[(map_y - 1)][map_x] == 0)) || ((g.block_map[(map_y - 1)][map_x] == null))))))){
dir = DOWN;
tile_id = DOWN_ID;
angle = 90;
state = TURNING;
};
} else {
if (dir == DOWN){
if ((((map_y == (g.scroller.height - 1))) || (!((((g.block_map[(map_y + 1)][map_x] == 0)) || ((g.block_map[(map_y + 1)][map_x] == null))))))){
dir = UP;
tile_id = UP_ID;
angle = -90;
state = TURNING;
gun.rotation = (gun.rotation + 1);
};
};
};
} else {
if ((((dir == RIGHT)) || ((dir == LEFT)))){
if (dir == LEFT){
if ((((map_x == 0)) || (!((((g.block_map[map_y][(map_x - 1)] == 0)) || ((g.block_map[map_y][(map_x - 1)] == null))))))){
dir = RIGHT;
tile_id = RIGHT_ID;
angle = 0;
state = TURNING;
gun.rotation = (gun.rotation + 1);
};
} else {
if (dir == RIGHT){
if ((((map_x == (g.scroller.width - 1))) || (!((((g.block_map[map_y][(map_x + 1)] == 0)) || ((g.block_map[map_y][(map_x + 1)] == null))))))){
dir = LEFT;
tile_id = LEFT_ID;
angle = 180;
state = TURNING;
};
};
};
};
};
}
override public function resolvePlayerCollision(_arg1:Player):void{
if (((((!((state == FIRING))) && ((strength >= 1)))) && (!(Util.proximity(_arg1.x, _arg1.y, x, y, 60))))){
previous_state = state;
state = FIRING;
};
}
public function kill(_arg1:Number):void{
var _local2:MovieClip;
if (!active){
return;
};
active = false;
NitromeGame.bonus.buddha.value = 0;
_local2 = new BangBigMC();
_local2.x = mc.x;
_local2.y = mc.y;
g.explosion_holder.addChild(_local2);
g.addDebris(mc.x, mc.y, ((_arg1 > 0)) ? 10 : -10, "FlyingGunDebris1", "FlyingGunDebris2", "FlyingGunDebris3");
}
public function selectSeekPath():void{
var _local1:int;
best_h = int.MAX_VALUE;
nodes[3].x = map_x;
nodes[3].y = (map_y - 1);
nodes[3].walkable = (((map_y > 0)) && ((((g.block_map[nodes[3].y][nodes[3].x] == 0)) || ((g.block_map[nodes[3].y][nodes[3].x] == null)))));
nodes[3].setH(g.player.map_x, g.player.map_y);
nodes[0].x = (map_x + 1);
nodes[0].y = map_y;
nodes[0].walkable = (((map_x < (g.scroller.width - 1))) && ((((g.block_map[nodes[0].y][nodes[0].x] == 0)) || ((g.block_map[nodes[0].y][nodes[0].x] == null)))));
nodes[0].setH(g.player.map_x, g.player.map_y);
nodes[1].x = map_x;
nodes[1].y = (map_y + 1);
nodes[1].walkable = (((map_y < (g.scroller.height - 1))) && ((((g.block_map[nodes[1].y][nodes[1].x] == 0)) || ((g.block_map[nodes[1].y][nodes[1].x] == null)))));
nodes[1].setH(g.player.map_x, g.player.map_y);
nodes[2].x = (map_x - 1);
nodes[2].y = map_y;
nodes[2].walkable = (((map_x > 0)) && ((((g.block_map[nodes[2].y][nodes[2].x] == 0)) || ((g.block_map[nodes[2].y][nodes[2].x] == null)))));
nodes[2].setH(g.player.map_x, g.player.map_y);
_local1 = 0;
while (_local1 < nodes.length) {
if (((nodes[_local1].walkable) && ((nodes[_local1].h < best_h)))){
best_h = nodes[_local1].h;
best_node = nodes[_local1];
};
_local1++;
};
if (best_node.y < map_y){
if (dir != UP){
dir = UP;
angle = -90;
state = TURNING;
tile_id = UP_ID;
};
} else {
if (best_node.x > map_x){
if (dir != RIGHT){
dir = RIGHT;
angle = 0;
state = TURNING;
tile_id = RIGHT_ID;
};
} else {
if (best_node.y > map_y){
if (dir != DOWN){
dir = DOWN;
angle = 90;
state = TURNING;
tile_id = DOWN_ID;
};
} else {
if (best_node.x < map_x){
if (dir != LEFT){
dir = LEFT;
angle = 180;
state = TURNING;
tile_id = LEFT_ID;
};
};
};
};
};
}
override public function resolveWeaponCollision(_arg1:Star):void{
var _local2:MovieClip;
var _local3:int;
if (state == FIRING){
health--;
_local2 = new HitSparkMC();
_local2.x = (_arg1.x >> 0);
_local2.y = (_arg1.y >> 0);
_local3 = collision_rect.sideOf(_arg1.x, _arg1.y);
if (_local3 == UP){
} else {
if (_local3 == RIGHT){
_local2.rotation = 90;
} else {
if (_local3 == DOWN){
_local2.rotation = 180;
} else {
if (_local3 == LEFT){
_local2.rotation = 270;
};
};
};
};
g.effect_holder.addChild(_local2);
if (health <= 0){
if (!spawned){
g.addScore(reward.value);
} else {
g.addScore((reward.value / 10));
};
kill((_arg1.x - _arg1.px));
};
} else {
shield.alpha = 1;
};
}
public function updateCollisionRect():void{
collision_rect.x = (x - 16);
collision_rect.y = (y - 16);
}
public function fire():void{
firing_count++;
if (firing_count == (FIRING_DELAY - FIRING_CHARGE_DELAY)){
gun.gotoAndPlay("fire");
};
if (firing_count >= FIRING_DELAY){
NitromeGame.sound_manager.playSound("shot");
g.createBullet((x + (scan.dx * 55)), (y + (scan.dy * 55)), ((gun.rotation + 360) % 360));
firing_count = 0;
if ((((cast == null)) || (((!((cast == null))) && (!(cast.found)))))){
state = previous_state;
};
};
}
public function move():void{
if (dir == UP){
y = (y - SPEED);
scan.a.y = (scan.a.y - SPEED);
scan.b.y = (scan.b.y - SPEED);
} else {
if (dir == RIGHT){
x = (x + SPEED);
scan.a.x = (scan.a.x + SPEED);
scan.b.x = (scan.b.x + SPEED);
} else {
if (dir == LEFT){
x = (x - SPEED);
scan.a.x = (scan.a.x - SPEED);
scan.b.x = (scan.b.x - SPEED);
} else {
if (dir == DOWN){
y = (y + SPEED);
scan.a.y = (scan.a.y + SPEED);
scan.b.y = (scan.b.y + SPEED);
};
};
};
};
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
}
override public function unpause():void{
if (gun.currentFrame < 3){
gun.stop();
};
}
}
}//package com.nitrome.engine_specific
Section 26
//ForceField (com.nitrome.engine_specific.ForceField)
package com.nitrome.engine_specific {
import flash.display.*;
public class ForceField extends EncounterBlock {
public const ACTIVE:int = 2;
public const INACTIVE:int = 1;
public var state:int;
public function ForceField(_arg1:MovieClip, _arg2:Game){
super(_arg1, _arg2);
force_field = true;
if (_arg2.alert_state == _arg2.INACTIVE){
state = INACTIVE;
block = false;
(_arg1 as MovieClip).gotoAndStop("inactive");
} else {
if (_arg2.alert_state == _arg2.ACTIVE){
state = ACTIVE;
block = true;
(_arg1 as MovieClip).gotoAndStop("active");
};
};
}
override public function alert():void{
state = ACTIVE;
(mc as MovieClip).gotoAndPlay("activate");
block = true;
}
override public function standdown():void{
state = INACTIVE;
(mc as MovieClip).gotoAndPlay("deactivate");
block = false;
}
override public function unpause():void{
if (g.alert_state == g.INACTIVE){
(mc as MovieClip).gotoAndStop("inactive");
} else {
if (g.alert_state == g.ACTIVE){
(mc as MovieClip).gotoAndStop("active");
};
};
}
}
}//package com.nitrome.engine_specific
Section 27
//GunBlock (com.nitrome.engine_specific.GunBlock)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class GunBlock extends EncounterBlock {
public var firing_count:int;
public var
:Object;
public var angle:int;
public static const FIRING_CHARGE_DELAY:int = 12;
public static const FIRING_DELAY:int = 50;
public function GunBlock(_arg1:MovieClip, _arg2:Game){
super(_arg1, _arg2);
has_main = true;
firing_count = (_arg2.frame_count % FIRING_DELAY);
}
public function main():void{
firing_count++;
if (firing_count == (FIRING_DELAY - FIRING_CHARGE_DELAY)){
(mc as MovieClip).gun.gotoAndPlay("fire");
};
if (firing_count >= FIRING_DELAY){
g.createBullet(x, y, angle);
firing_count = 0;
};
}
public function setDirection(_arg1:int):void{
if (_arg1 == Rect.UP){
x = (b.x + (g.scale >> 1));
y = (b.y - 15);
angle = 270;
} else {
if (_arg1 == Rect.RIGHT){
x = ((b.x + g.scale) + 14);
y = (b.y + (g.scale >> 1));
angle = 0;
} else {
if (_arg1 == Rect.DOWN){
x = (b.x + (g.scale >> 1));
y = ((b.y + g.scale) + 14);
angle = 90;
} else {
if (_arg1 == Rect.LEFT){
x = (b.x - 15);
y = (b.y + (g.scale >> 1));
angle = 180;
};
};
};
};
}
override public function unpause():void{
if ((mc as MovieClip).gun.currentFrame < 3){
(mc as MovieClip).gun.stop();
};
}
}
}//package com.nitrome.engine_specific
Section 28
//GunMan (com.nitrome.engine_specific.GunMan)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class GunMan extends Encounter {
public var py:Number;
public var state:int;
public var scan:Line;
public var dir:int;
public var grid_x:int;
public var grid_y:int;
public var firing_count:int;
public var cast:RayCastReport;
public var dot:Dot;
public var temp_y:Number;
public var collision_rect:Rect;
public var health:int;// = 2
public var platform:Boolean;
public static const RIGHT:int = 2;
private static const width:int = 26;
public static const LEFT:int = 8;
private static const height:int = 42;
private static const DAMPING_Y:Number = 0.99;
private static const GRAVITY_Y:Number = 1.3;
private static const FLOOR_DEPTH:int = 6;
public static const LEFT_ID:int = 377;
public static const FIRING_DELAY:int = 11;
public static const UP:int = 1;
public static const RUNNING:int = 1;
public static const FIRING_CHARGE_DELAY:int = 8;
public static const SPEED:Number = 4;
public static const DOWN:int = 4;
public static const FALLING:int = 2;
public static const FIRING:int = 4;
public static const TEST_DEPTH:int = 5;
public static const RIGHT_ID:int = 378;
public function GunMan(_arg1:int, _arg2:Sprite, _arg3:Game){
var _local4:Dot;
health = 2;
super(_arg2, _arg3, true);
has_main = true;
has_collision = true;
this.dir = _arg1;
collision_rect = new Rect((x - (width >> 1)), (y - (height >> 1)), 26, 42);
map_x = ((x * _arg3.SCALE) >> 0);
map_y = ((y * _arg3.SCALE) >> 0);
py = y;
if (_arg3.blocks_in_play[(map_y + 1)][map_x] == _arg3.IN_PLAY){
platform = true;
state = RUNNING;
} else {
platform = false;
state = FALLING;
};
_local4 = new Dot((_arg2.x + 0.5), (_arg2.y + 0.5));
if (_arg1 == RIGHT){
scan = new Line(_local4, new Dot((_local4.x + (_arg3.width + _arg3.height)), _local4.y));
} else {
if (_arg1 == LEFT){
scan = new Line(_local4, new Dot((_local4.x - (_arg3.width + _arg3.height)), _local4.y));
};
};
reward = new HiddenInt(40);
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
override public function intersects(_arg1:Rect):Boolean{
if (g.player.state == Player.STEALTH){
return (false);
};
if (cast != null){
return (cast.found);
};
return (false);
}
public function fire():void{
firing_count++;
if (firing_count == FIRING_CHARGE_DELAY){
NitromeGame.sound_manager.playSound("shot");
g.createBullet((x + ((dir == RIGHT)) ? 41 : -41), (y + 9), ((dir == RIGHT)) ? 0 : 180);
};
if (firing_count >= FIRING_DELAY){
firing_count = 0;
if ((((cast == null)) || (((!((cast == null))) && (!(cast.found)))))){
state = RUNNING;
};
};
}
public function updateAnimState():void{
if (state == RUNNING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "run_right"){
(mc as MovieClip).gotoAndStop("run_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "run_left"){
(mc as MovieClip).gotoAndStop("run_left");
};
};
};
} else {
if (state == FALLING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "fall_right"){
(mc as MovieClip).gotoAndStop("fall_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "fall_left"){
(mc as MovieClip).gotoAndStop("fall_left");
};
};
};
} else {
if (state == FIRING){
if (dir == RIGHT){
if ((mc as MovieClip).currentLabel != "fire_right"){
(mc as MovieClip).gotoAndStop("fire_right");
};
} else {
if (dir == LEFT){
if ((mc as MovieClip).currentLabel != "fire_left"){
(mc as MovieClip).gotoAndStop("fire_left");
};
};
};
};
};
};
}
public function main():void{
if (!g.scroller.contains(x, y)){
remove();
return;
};
if (state == RUNNING){
cast = RayCast.playerCast(scan, g.block_map, g.player);
move();
if (dir == RIGHT){
grid_x = ((((x + (width >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
grid_y = map_y;
if (g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY){
dir = LEFT;
tile_id = LEFT_ID;
scan.b.x = (scan.b.x - (scan.len * 2));
scan.updateLine();
};
grid_y = ((((y + (height >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
if (((isFinite(g.block_map[grid_y][grid_x])) || (!((g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY))))){
dir = LEFT;
tile_id = LEFT_ID;
scan.b.x = (scan.b.x - (scan.len * 2));
scan.updateLine();
};
} else {
if (dir == LEFT){
grid_x = ((((x - (width >> 1)) - TEST_DEPTH) * g.SCALE) >> 0);
grid_y = map_y;
if (g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY){
dir = RIGHT;
tile_id = RIGHT_ID;
scan.b.x = (scan.b.x + (scan.len * 2));
scan.updateLine();
};
grid_y = ((((y + (height >> 1)) + TEST_DEPTH) * g.SCALE) >> 0);
if (((isFinite(g.block_map[grid_y][grid_x])) || (!((g.blocks_in_play[grid_y][grid_x] == g.IN_PLAY))))){
dir = RIGHT;
tile_id = RIGHT_ID;
scan.b.x = (scan.b.x + (scan.len * 2));
scan.updateLine();
};
};
};
} else {
if (state == FALLING){
findFloor();
if (platform == false){
verletY(GRAVITY_Y, DAMPING_Y);
};
} else {
if (state == FIRING){
cast = RayCast.playerCast(scan, g.block_map, g.player);
fire();
};
};
};
updateAnimState();
updateMC();
updateCollisionRect();
}
public function verletY(_arg1:Number, _arg2:Number):void{
temp_y = y;
y = (y + ((_arg2 * (y - py)) + _arg1));
py = temp_y;
scan.a.y = y;
scan.b.y = y;
map_y = ((y * g.SCALE) >> 0);
}
override public function resolvePlayerCollision(_arg1:Player):void{
if (((!(Util.proximity(_arg1.x, _arg1.y, x, y, 60))) && (!((state == FIRING))))){
state = FIRING;
};
}
public function kill(_arg1:Number):void{
var _local2:MovieClip;
if (!active){
return;
};
active = false;
NitromeGame.bonus.buddha.value = 0;
_local2 = new BangSmallMC();
_local2.x = mc.x;
_local2.y = mc.y;
g.explosion_holder.addChild(_local2);
g.addDebris(_local2.x, _local2.y, ((_arg1 > 0)) ? 10 : -10, "BorgDebris1", "BorgDebris2", "BorgDebris3", "SmallGunDebris");
}
public function move():void{
if (dir == RIGHT){
x = (x + SPEED);
scan.a.x = (scan.a.x + SPEED);
scan.b.x = (scan.b.x + SPEED);
} else {
if (dir == LEFT){
x = (x - SPEED);
scan.a.x = (scan.a.x - SPEED);
scan.b.x = (scan.b.x - SPEED);
};
};
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
}
override public function resolveWeaponCollision(_arg1:Star):void{
var _local2:MovieClip;
var _local3:int;
health--;
_local2 = new HitSparkMC();
_local2.x = (_arg1.x >> 0);
_local2.y = (_arg1.y >> 0);
_local3 = collision_rect.sideOf(_arg1.x, _arg1.y);
if (_local3 == UP){
} else {
if (_local3 == RIGHT){
_local2.rotation = 90;
} else {
if (_local3 == DOWN){
_local2.rotation = 180;
} else {
if (_local3 == LEFT){
_local2.rotation = 270;
};
};
};
};
g.effect_holder.addChild(_local2);
if (health <= 0){
if (!spawned){
g.addScore(reward.value);
} else {
g.addScore((reward.value / 10));
};
kill((_arg1.x - _arg1.px));
NitromeGame.sound_manager.playSound("smithdie");
} else {
NitromeGame.sound_manager.playSound("smithhit");
};
}
public function findFloor():void{
if (g.blocks_in_play[(map_y + 1)][map_x] == g.IN_PLAY){
if (((((map_x * g.scale) > ((-1 + x) + (width >> 1)))) || (((((map_x * g.scale) + g.scale) - 1) < (x - (width >> 1)))))){
return;
};
if (((((y + (height >> 1)) < ((map_y + 1) * g.scale))) || (((y + (height >> 1)) > ((((map_y + 1) * g.scale) + FLOOR_DEPTH) + (y - py)))))){
return;
};
platform = true;
y = (((map_y + 1) * g.scale) - (height >> 1));
updateCollisionRect();
state = RUNNING;
};
}
public function updateCollisionRect():void{
collision_rect.x = (x - (width >> 1));
collision_rect.y = (y - (height >> 1));
}
}
}//package com.nitrome.engine_specific
Section 29
//Health (com.nitrome.engine_specific.Health)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Health extends Encounter {
public var collision_rect:Rect;
public function Health(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2, false);
collision_rect = new Rect((_arg1.x + 11), (_arg1.y + 34), 38, 30);
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
override public function intersects(_arg1:Rect):Boolean{
return (collision_rect.intersects(_arg1));
}
override public function resolvePlayerCollision(_arg1:Player):void{
if (_arg1.health.value < 3){
_arg1.health.value++;
NitromeGame.timeline.health_panel.gotoAndStop(("_" + g.player.health.value));
};
kill();
}
public function kill():void{
var _local1:MovieClip;
if (!active){
return;
};
_local1 = new HealthFadeMC();
NitromeGame.sound_manager.playSound("oishii");
_local1.x = mc.x;
_local1.y = mc.y;
g.star_holder.addChild(_local1);
g.scroller.map_array_layers[layer][map_y][map_x] = 0;
active = false;
}
override public function resolveWeaponCollision(_arg1:Star):void{
if (g.player.health.value < 3){
g.player.health.value++;
NitromeGame.timeline.health_panel.gotoAndStop(("_" + g.player.health.value));
};
kill();
}
}
}//package com.nitrome.engine_specific
Section 30
//Info (com.nitrome.engine_specific.Info)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Info extends Encounter {
public var text:String;
public var collision_rect:Rect;
public var :Boolean;
public var colliding:Boolean;
public function Info(_arg1:String, _arg2:Sprite, _arg3:Game){
super(_arg2, _arg3, false);
this.text = _arg1;
= false;
colliding = false;
has_main = true;
collision_rect = new Rect((x + 12), (y + 11), 39, 44);
}
override public function intersects(_arg1:Rect):Boolean{
return (collision_rect.intersects(_arg1));
}
public function main():void{
if (){
if (!colliding){
= false;
g.hideTextMessage();
};
colliding = false;
};
}
override public function resolvePlayerCollision(_arg1:Player):void{
if (!active){
return;
};
if (!){
= true;
g.textMessage(text);
};
colliding = true;
}
}
}//package com.nitrome.engine_specific
Section 31
//Laser (com.nitrome.engine_specific.Laser)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Laser extends Encounter {
public const ACTIVE:int = 2;
public const WARM_UP_STEP:Number = 0.2;
public const DELAY:int = 50;
public const INACTIVE:int = 1;
var state:int;
var count:int;
var :Boolean;
var collision_rect:Rect;
public function Laser(_arg1:Boolean, _arg2:Rect, _arg3:MovieClip, _arg4:Game){
super(_arg3, _arg4, false);
collision_rect = _arg2;
this. = _arg1;
state = ACTIVE;
if (_arg1){
has_main = true;
count = (_arg4.frame_count % 100);
if (count >= 50){
count = (count % 50);
state = INACTIVE;
_arg3.alpha = 0;
};
};
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return ((((state == ACTIVE)) && (collision_rect.contains(_arg1, _arg2))));
}
override public function intersects(_arg1:Rect):Boolean{
if (state == ACTIVE){
return (collision_rect.intersects(_arg1));
};
return (false);
}
public function main():void{
count++;
if (state == ACTIVE){
if (count >= DELAY){
state = INACTIVE;
count = 0;
};
if (mc.alpha < 1){
mc.alpha = (mc.alpha + WARM_UP_STEP);
};
} else {
if (state == INACTIVE){
if (count >= DELAY){
state = ACTIVE;
count = 0;
};
if (mc.alpha > 0){
mc.alpha = (mc.alpha - WARM_UP_STEP);
};
};
};
}
override public function resolvePlayerCollision(_arg1:Player):void{
_arg1.hit();
}
override public function debug():void{
collision_rect.draw(g.debug);
}
}
}//package com.nitrome.engine_specific
Section 32
//LiveStar (com.nitrome.engine_specific.LiveStar)
package com.nitrome.engine_specific {
import flash.display.*;
public class LiveStar extends DeadStar {
public var star:MovieClip;
}
}//package com.nitrome.engine_specific
Section 33
//Node (com.nitrome.engine_specific.Node)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
public class Node extends Dot {
var walkable:Boolean;// = true
var h:int;// = 0
public function Node(_arg1:int=0, _arg2:int=0){
h = 0;
walkable = true;
super();
}
function setH(_arg1:int, _arg2:int):void{
var _local3:*;
var _local4:*;
_local3 = (this.x - _arg1);
_local4 = (this.y - _arg2);
h = (((_local3 < 0)) ? -(_local3) : _local3 + ((_local4 < 0)) ? -(_local4) : _local4);
}
}
}//package com.nitrome.engine_specific
Section 34
//Player (com.nitrome.engine_specific.Player)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
import flash.geom.*;
import com.nitrome.game.*;
import flash.ui.*;
public class Player extends Particle {
public var :Number;
public var :Number;
public var :Sprite;
public var rope_end:Rope;
public var :Boolean;
public var :Sprite;
public var
:Boolean;
public var :Rect;
public var :int;
public var :int;
public var :MovieClip;
public var :Number;
public var :RayCastReport;
public var map_x:int;
public var map_y:int;
public var health:HiddenInt;
public var :Number;
public var
:Array;
public var g:Game;
private var i:int;
public var platform:Block;
public var cx:Number;
public var cy:Number;
public var
:Number;
public var :Number;
public var :Number;
public var :MovieClip;
public var
:int;
public var
:Boolean;
private var block:Block;
public var state:int;
public var dx:Number;
public var dy:Number;
public var
:Block;
public var
:int;
public var
:Boolean;
public var
:int;
public var dir:int;
public var
:Boolean;
public var
:Rectangle;
public var
:Boolean;
public var anchor:RopeAnchor;
public var
:Number;
public var vy:Number;
public var
:int;
public var vx:Number;
public var :Boolean;
public var collision_rect:Rect;
public var :int;
public var :Number;
public var :Number;
public var :int;
public var :int;
public var map_rect:Rect;
public var :Bitmap;
public var
:int;
public var rope:Array;
public var :Sprite;
public var
:Boolean;
public var :int;
public var :int;
public var active:Boolean;
public var :int;
public var :Boolean;
public var :Array;
public var :Number;
public var :MovieClip;
public var :BitmapData;
public var :int;
public var
:Number;
public var
:Shape;
public var :Shape;
public var :Boolean;
public var
:int;
public var
:Trail;
public var
:MovieClip;
public var
:int;
public var colliding:Boolean;
public var
:Matrix;
public var collisions:int;
public var scroll_x:Number;
public var scroll_y:Number;
public var
:Point;
public var mc:MovieClip;
public var
:Trail;
public var
:Number;
public var
:MovieClip;
public var
:MovieClip;
public var running:Boolean;
public var :Number;
public var :Number;
public var :Boolean;
public var :MovieClip;
private var
:Dot;
private static const WALLSLIDE_DAMPING_Y:Number = 0.85;
public static const LEFT:int = 8;
public static const DAMPING_STEP:Number = 0.001;
private static const JUMP_DELAY:Number = 5.8;
private static const SWING_DAMPING_X:Number = 0.99;
public static const DOWN_RIGHT:int = 32;
private static const LOST:int = 4;
public static const START_DELAY:int = 10;
public static const height:int = 42;
public static const NUM_STARS:int = 20;
public static const SCALE:Number = 0.015625;
public static const SPEED:Number = 7.5;
public static const EXTEND_ROPE_OFF_DELAY:int = 10;
public static const HURT_DELAY:int = 50;
public static const FALL_RIGHT:int = 64;
public static const WALLSLIDE_DELAY:int = 25;
private static const DAMPING_X:Number = 0.55;
private static const DAMPING_Y:Number = 0.99;
private static const MIN_KICK = 1.5;
public static const OUCH_DEATH_DELAY:int = 20;
public static const SWINGING:int = 8;
public static const WALL_RIGHT:int = 0x0100;
private static const JUMP_DECAY:Number = 0.7;
public static const scale:int = 64;
public static const UP_LEFT:int = 128;
public static const ROPE_ALPHA_FADE:Number = 0.1;
public static const FALL_LEFT:int = 128;
public static const MAX_ROPE_LENGTH:int = 800;
public static const RUNNING_RIGHT:int = 2;
public static const UP_RIGHT:int = 16;
public static const JUMP_FRAME_DELAY = 3;
private static const MAX_KICK = 4;
public static const WALL_LEFT:int = 0x0200;
public static const DEAD:int = 16;
public static const SWING_FLOOR_DELAY = 5;
public static const MAX_ROPE_SPEED:Number = 10;
public static const JUMP_LEFT:int = 32;
private static const READY:int = 1;
public static const DOWN_LEFT:int = 64;
private static const GRAVITY_X:Number = 0;
private static const GRAVITY_Y:Number = 1.3;
private static const FLOOR_DEPTH:int = 6;
public static const WAIT_LEFT:int = 8;
private static const FORCED_WALLSLIDE_DAMPING_Y:Number = 0.6;
public static const RUNNING:int = 1;
public static const DOWN:int = 4;
public static const READY_DELAY:int = 2;
public static const THROW_DELAY:int = 2;
public static const JUMP_RIGHT:int = 16;
public static const RUNNING_LEFT:int = 1;
public static const WAIT_RIGHT:int = 4;
public static const UP:int = 1;
public static const width:int = 24;
public static const MIN_ROPE_SPEED:Number = 3;
private static const THROW:int = 2;
public static const JUMPING:int = 2;
public static const STEALTH:int = 4;
public static const STEALTH_ANIM:int = 0x0400;
public static const OUCH_DELAY:int = 10;
public static const RIGHT:int = 2;
public function Player(_arg1:MovieClip, _arg2:MovieClip, _arg3:int, _arg4:int, _arg5:Game){
super(_arg3, _arg4);
state = STEALTH;
dir = RIGHT;
colliding = false;
= false;
= 0;
= false;
= 0;
= false;
= false;
= 0;
= 0;
= 0;
= MIN_ROPE_SPEED;
= 0;
= 0;
= 0;
= 0;
= 0;
running = false;
active = true;
= START_DELAY;
= false;
this.g = _arg5;
this.mc = _arg1;
this.
= _arg2;
_arg1.x = ( = (_arg3 >> 0));
_arg1.y = ( = ((_arg4 >> 0) + (height >> 1)));
map_x = ((_arg3 * SCALE) >> 0);
map_y = ((_arg4 * SCALE) >> 0);
= MIN_KICK;
platform = _arg5.block_map[(map_y + 1)][map_x].b;
health = new HiddenInt(3);
NitromeGame.timeline.health_panel.gotoAndStop("_3");
collision_rect = new Rect(0, 0, 0, 0);
updateCollisionRect();
= new Array(4);
map_rect = _arg5.scroller.map_rect;
= new Rect(NitromeGame.timeline.scroll_border.x, NitromeGame.timeline.scroll_border.y, NitromeGame.timeline.scroll_border.width, NitromeGame.timeline.scroll_border.height);
NitromeGame.timeline.scroll_border.visible = false;
scroll_x = 0;
scroll_y = .height;
= ((-(_arg1.x) + .x) + scroll_x);
= ((-(_arg1.y) + .y) + scroll_y);
= Math.min(0, );
= Math.min(0, );
= Math.max(((-(_arg5.scroller.width) * scale) + _arg5.width), );
= Math.max(((-(_arg5.scroller.height) * scale) + _arg5.height), );
_arg5.canvas.x = ((0.1 + ) >> 0);
_arg5.canvas.y = ((0.1 + ) >> 0);
= _arg5.canvas.x;
= _arg5.canvas.y;
();
_arg5.scroller.reset();
= DAMPING_X;
rope = new Array();
= new Array();
= new Dot();
= new LeftArmMC();
= new RightArmMC();
= new LeftArmMC();
= new RightArmMC();
_arg5.player_holder.addChild( );
_arg5.player_holder.addChild(
);
_arg2.addChild();
_arg2.addChild( );
= new BitmapData(80, 80, true, 0xFFFFFF);
= new Bitmap();
_arg5.player_holder.addChild();
_arg5.player_holder.addChild(_arg2);
.alpha = 1;
_arg2.cacheAsBitmap = true;
.cacheAsBitmap = true;
.mask = _arg2;
= new Matrix();
= new Rectangle(0, 0, .width, .height);
= false;
= new StealthOutlineMC();
.blendMode = BlendMode.OVERLAY;
_arg5.player_holder.addChild();
.alpha = 0;
= new EyeGlowMC();
.alpha = 0;
_arg5.player_holder.addChild();
= new WallSlideLeftMC();
= new WallSlideRightMC();
.alpha = 0;
.alpha = 0;
_arg5.player_holder.addChild(
);
_arg5.player_holder.addChild();
= new Sprite();
= new Shape();
= new Shape();
_arg5.player_holder.addChild();
.addChild(
);
.addChild();
= new Point();
= Util.localToLocal(
, _arg1.body.left_eye, _arg5.canvas);
= new Trail(
.x,
.y, 7, 0.6);
= Util.localToLocal(
, _arg1.body.right_eye, _arg5.canvas);
= new Trail(
.x,
.y, 7, 0.6);
= false;
Key.forceClearKeys();
}
public function ():void{
if (){
.visible = false;
.visible = false;
.visible = false;
.visible = false;
return;
};
if (state == STEALTH){
.visible = false;
.visible = false;
.visible = false;
.visible = false;
return;
};
if (dir == RIGHT){
.visible = false;
.visible = mc.visible;
.visible = false;
.visible = true;
} else {
if (dir == LEFT){
.visible = false;
.visible = mc.visible;
.visible = false;
.visible = true;
};
};
if (
){
if (
== READY){
.rotation = 0;
.gotoAndStop("ready");
.rotation = 0;
.gotoAndStop("ready");
.rotation = 0;
.gotoAndStop("ready");
.rotation = 0;
.gotoAndStop("ready");
} else {
if ((((
== THROW)) && ((
> 0)))){
if (anchor != null){
if (!anchor.locked){
if (dir == LEFT){
= (g.ONE80DIVIDEDBYPI * anchor.rope.atan2());
} else {
if (dir == RIGHT){
= (g.ONE80DIVIDEDBYPI * anchor.rope.atan2());
= (
+ 180);
};
};
} else {
if (rope_end != null){
if (dir == LEFT){
= (g.ONE80DIVIDEDBYPI * rope_end.atan2());
} else {
if (dir == RIGHT){
= (g.ONE80DIVIDEDBYPI * rope_end.atan2());
= (
+ 180);
};
};
};
};
= sideOf(
);
.rotation =
;
.rotation =
;
.rotation =
;
.rotation =
;
};
if (
== RIGHT){
.gotoAndStop("right");
.gotoAndStop("right");
.gotoAndStop("right");
.gotoAndStop("right");
} else {
if (
== LEFT){
.gotoAndStop("left");
.gotoAndStop("left");
.gotoAndStop("left");
.gotoAndStop("left");
};
};
} else {
.rotation = 0;
.rotation = 0;
.rotation = 0;
.rotation = 0;
if ((((state == RUNNING)) && (running))){
.gotoAndStop("run_rest");
.gotoAndStop("run_rest");
.gotoAndStop("run_rest");
.gotoAndStop("run_rest");
} else {
if ((((((state == RUNNING)) && (!(running)))) || ((((state == SWINGING)) && ((collisions & DOWN)))))){
.gotoAndStop("wait_rest");
.gotoAndStop("wait_rest");
.gotoAndStop("wait_rest");
.gotoAndStop("wait_rest");
} else {
if ((((state == JUMPING)) && (!(
)))){
.gotoAndStop("jump_rest");
.gotoAndStop("jump_rest");
.gotoAndStop("jump_rest");
.gotoAndStop("jump_rest");
} else {
if ((((((((((state == JUMPING)) && (
))) && (( == 0)))) && (!((collisions & DOWN))))) || ((state == SWINGING)))){
.gotoAndStop("fall_rest");
.gotoAndStop("fall_rest");
.gotoAndStop("fall_rest");
.gotoAndStop("fall_rest");
} else {
if ((((((state == JUMPING)) && (
))) && ())){
.gotoAndStop("wall_rest");
.gotoAndStop("wall_rest");
.gotoAndStop("wall_rest");
.gotoAndStop("wall_rest");
};
};
};
};
};
};
};
} else {
.rotation = 0;
.rotation = 0;
.rotation = 0;
.rotation = 0;
if ((((state == RUNNING)) && (running))){
.gotoAndStop("run_rest");
.gotoAndStop("run_rest");
.gotoAndStop("run_rest");
.gotoAndStop("run_rest");
} else {
if ((((((state == RUNNING)) && (!(running)))) || ((((state == SWINGING)) && ((collisions & DOWN)))))){
.gotoAndStop("wait_rest");
.gotoAndStop("wait_rest");
.gotoAndStop("wait_rest");
.gotoAndStop("wait_rest");
} else {
if ((((state == JUMPING)) && (!(
)))){
.gotoAndStop("jump_rest");
.gotoAndStop("jump_rest");
.gotoAndStop("jump_rest");
.gotoAndStop("jump_rest");
} else {
if ((((((((((state == JUMPING)) && (
))) && (( == 0)))) && (!((collisions & DOWN))))) || ((state == SWINGING)))){
.gotoAndStop("fall_rest");
.gotoAndStop("fall_rest");
.gotoAndStop("fall_rest");
.gotoAndStop("fall_rest");
} else {
if ((((((state == JUMPING)) && (
))) && ())){
.gotoAndStop("wall_rest");
.gotoAndStop("wall_rest");
.gotoAndStop("wall_rest");
.gotoAndStop("wall_rest");
};
};
};
};
};
};
if (mc.body != null){
= ArmPos.getPos(
, mc.currentLabel, mc.body.currentFrame);
} else {
= ArmPos.getPos(
, mc.currentLabel);
};
.x =
.x;
.y =
.y;
.x =
.x;
.y =
.y;
.x = (
.x + mc.x);
.y = (
.y + mc.y);
.x = (
.x + mc.x);
.y = (
.y + mc.y);
if (state == STEALTH){
.visible = false;
.visible = false;
.visible = false;
.visible = false;
};
}
public function ():void{
var _local1:int;
collision_rect = new Rect();
mc.visible = false;
.visible = false;
.visible = false;
.visible = false;
.visible = false;
.graphics.clear();
.graphics.clear();
g.rope_holder.graphics.clear();
g.mouse_pressed = false;
running = false;
g.rope_holder.graphics.clear();
if (anchor != null){
anchor.convertToStar();
};
_local1 = 0;
while (_local1 <
.length) {
[_local1].kill();
_local1++;
};
map_x = (map_y = 0);
}
public function createRope():void{
rope = new Array();
rope_end = new Rope(anchor, this);
rope.push(rope_end);
if (rope_end.b.y > rope_end.a.y){
if (rope_end.rest_len > height){
rope_end.rest_len = (rope_end.rest_len - (height * 0.6));
} else {
rope_end.rest_len = (rope_end.rest_len * 0.8);
};
rope_end.stiffness = (rope_end.stiffness * 0.3);
};
= ( = rope_end.rest_len);
state = SWINGING;
= SWING_DAMPING_X;
= true;
platform = null;
}
public function updateMC():void{
if (state == STEALTH){
();
};
= mc.x;
= mc.y;
mc.x = ((x + 0.1) >> 0);
mc.y = (((y + 0.1) >> 0) + (height >> 1));
.x = (mc.x - (.width * 0.5));
.y = (mc.y - .height);
.x = mc.x;
.y = mc.y;
if (state == STEALTH){
.x = (.x = mc.x);
.y = (.y = mc.y);
if (.alpha < 1){
.alpha = (.alpha + 0.1);
};
if (.alpha < 1){
.alpha = (.alpha + 0.2);
};
if (.alpha < 1){
.alpha = (.alpha + 0.2);
};
} else {
if (.alpha > 0){
.alpha = (.alpha - 0.02);
};
if (.alpha > 0){
.alpha = (.alpha - 0.2);
};
if (.alpha > 0){
.alpha = 0;
};
};
if (((((((!()) && ((state == JUMPING)))) && (
))) && ())){
.x = (mc.x - (width >> 1));
.x = (mc.x + (width >> 1));
.y = (.y = mc.y);
} else {
if (
.alpha > 0){
.alpha = (
.alpha - 0.1);
};
if (.alpha > 0){
.alpha = (.alpha - 0.1);
};
};
();
if ((((state == RUNNING)) && (running))){
if (dir == RIGHT){
if (
.alpha > 0){
.alpha = (
.alpha - 0.1);
} else {
if (.alpha < 1){
.alpha = (.alpha + 0.2);
};
};
} else {
if (dir == LEFT){
if (.alpha > 0){
.alpha = (.alpha - 0.1);
} else {
if (
.alpha < 1){
.alpha = (
.alpha + 0.2);
};
};
};
};
} else {
if (.alpha < 1){
.alpha = (.alpha + 0.2);
};
if (
.alpha < 1){
.alpha = (
.alpha + 0.2);
};
};
if (
.alpha > 0){
.graphics.clear();
.graphics.moveTo(
.dots[(
.dots.length - 1)].x,
.dots[(
.dots.length - 1)].y);
i = 1;
while (i <
.dots.length) {
.graphics.lineStyle(2, 0xFF00, (0.035 * i));
.graphics.lineTo(
.dots[i].x,
.dots[i].y);
i++;
};
};
if (.alpha > 0){
.graphics.clear();
.graphics.moveTo(
.dots[(
.dots.length - 1)].x,
.dots[(
.dots.length - 1)].y);
i = 1;
while (i <
.dots.length) {
.graphics.lineStyle(2, 0xFF00, (0.035 * i));
.graphics.lineTo(
.dots[i].x,
.dots[i].y);
i++;
};
};
if (!(state & DEAD)){
if (NitromeGame.timeline.mouseX < 200){
if (scroll_x < .width){
scroll_x = (scroll_x + 4);
};
} else {
if (NitromeGame.timeline.mouseX > 350){
if (scroll_x > 0){
scroll_x = (scroll_x - 4);
};
};
};
if (NitromeGame.timeline.mouseX < 100){
if (scroll_x < .width){
scroll_x = (scroll_x + 4);
};
} else {
if (NitromeGame.timeline.mouseX > 450){
if (scroll_x > 0){
scroll_x = (scroll_x - 4);
};
};
};
if ((((((NitromeGame.timeline.mouseY > 300)) || ((((Math.abs(( - mc.y)) > 2)) && (( < mc.y)))))) && ((scroll_y > 0)))){
scroll_y = (scroll_y - 2);
} else {
if ((((NitromeGame.timeline.mouseY < 100)) && ((scroll_y < (.height + 60))))){
scroll_y = (scroll_y + 2);
} else {
if (scroll_y < .height){
scroll_y = (scroll_y + 2);
} else {
if (scroll_y > .height){
scroll_y = (scroll_y - 2);
};
};
};
};
= ((-(mc.x) + .x) + scroll_x);
= ((-(mc.y) + .y) + scroll_y);
};
();
g.scroller.clipManager();
}
public function (_arg1:Encounter):Boolean{
return (_arg1.intersects(collision_rect));
}
public function updateAnimState(_arg1:MovieClip):void{
var _local2:Boolean;
_local2 = false;
if (!){
if ((((state == RUNNING)) && (running))){
if (dir == LEFT){
if (_arg1.currentLabel != "run_left"){
_arg1.gotoAndStop("run_left");
};
} else {
if (dir == RIGHT){
if (_arg1.currentLabel != "run_right"){
_arg1.gotoAndStop("run_right");
};
};
};
} else {
if ((((((state == RUNNING)) && (!(running)))) || ((((state == SWINGING)) && ((
> 0)))))){
if (dir == LEFT){
if (((((!((platform == null))) && ((collision_rect.x <= (platform.x + 5))))) && (((!((platform.stacked & LEFT))) || ((((map_x > 0)) && ((g.blocks_in_play[map_y][(map_x - 1)] == g.IN_PLAY)))))))){
if (_arg1.currentLabel != "wait_in_left"){
_arg1.gotoAndStop("wait_in_left");
};
} else {
if (_arg1.currentLabel != "wait_left"){
_arg1.gotoAndStop("wait_left");
};
};
} else {
if (dir == RIGHT){
if (((((!((platform == null))) && (((collision_rect.x + collision_rect.width) >= ((platform.x + platform.width) - 5))))) && (((!((platform.stacked & RIGHT))) || ((((map_x < (g.scroller.width - 1))) && ((g.blocks_in_play[map_y][(map_x + 1)] == g.IN_PLAY)))))))){
if (_arg1.currentLabel != "wait_in_right"){
_arg1.gotoAndStop("wait_in_right");
};
} else {
if (_arg1.currentLabel != "wait_right"){
_arg1.gotoAndStop("wait_right");
};
};
};
};
} else {
if ((((state == JUMPING)) && (!(
)))){
if (dir == LEFT){
if (_arg1.currentLabel != "jump_left"){
_arg1.gotoAndStop("jump_left");
};
} else {
if (dir == RIGHT){
if (_arg1.currentLabel != "jump_right"){
_arg1.gotoAndStop("jump_right");
};
};
};
} else {
if ((((((state == JUMPING)) && (
))) && (( == 0)))){
if (dir == LEFT){
if (_arg1.currentLabel != "fall_left"){
_arg1.gotoAndStop("fall_left");
};
} else {
if (dir == RIGHT){
if (_arg1.currentLabel != "fall_right"){
_arg1.gotoAndStop("fall_right");
};
};
};
} else {
if (state == SWINGING){
if (dir == LEFT){
if (_arg1.currentLabel != "swing_left"){
_arg1.gotoAndStop("swing_left");
};
} else {
if (dir == RIGHT){
if (_arg1.currentLabel != "swing_right"){
_arg1.gotoAndStop("swing_right");
};
};
};
} else {
if ((((((state == JUMPING)) && (
))) && ())){
if (dir == LEFT){
if (
.alpha < 1){
.alpha = (
.alpha + 0.1);
};
if (_arg1.currentLabel != "wall_left"){
_arg1.gotoAndStop("wall_left");
.alpha = 0;
};
} else {
if (dir == RIGHT){
if (.alpha < 1){
.alpha = (.alpha + 0.1);
};
if (_arg1.currentLabel != "wall_right"){
_arg1.gotoAndStop("wall_right");
.alpha = 0;
};
};
};
} else {
if (state == STEALTH){
if (_arg1.currentLabel != "stealth"){
_arg1.gotoAndStop("stealth");
};
};
};
};
};
};
};
};
} else {
if (dir == LEFT){
if (_arg1.currentLabel != "ouch_left"){
_arg1.gotoAndStop("ouch_left");
};
} else {
if (dir == RIGHT){
if (_arg1.currentLabel != "ouch_right"){
_arg1.gotoAndStop("ouch_right");
};
};
};
};
}
public function debug():void{
g.debug.lineStyle(2, 0xFF00);
collision_rect.draw(g.debug);
i = 0;
while (i < .length) {
if (((((isNaN([i])) && (!(([i] == null))))) && ([i].block))){
[i].debug();
};
i++;
};
}
override public function toString():String{
var _local1:String;
_local1 = "";
if (state == RUNNING){
_local1 = "RUNNING";
} else {
if (state == JUMPING){
_local1 = "JUMPING";
} else {
if (state == DEAD){
_local1 = "DEAD";
} else {
if (state == SWINGING){
_local1 = "SWINGING";
} else {
if (state == STEALTH){
_local1 = "STEALTH";
};
};
};
};
};
return ((((((("(" + (x >> 0)) + ",") + (y >> 0)) + ",") + _local1) + ")"));
}
public function ():void{
var _local1:MovieClip;
if (((g.god_mode) || (!(active)))){
return;
};
active = false;
NitromeGame.sound_manager.playSound("aiiee");
_local1 = new BangBigMC();
_local1.x = mc.x;
_local1.y = (mc.y - (height >> 1));
g.explosion_holder.addChild(_local1);
();
g.gameOver();
}
public function addStar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Star{
var _local5:Sprite;
var _local6:Star;
_local5 = new LiveStar();
g.star_holder.addChild(_local5);
_local6 = new Star(_arg1, _arg2, _arg3, _arg4, _local5, g);
.push(_local6);
return (_local6);
}
public function
(_arg1:Block):void{
var _local2:int;
var _local3:Rect;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = _arg1.sideOf((collision_rect.x + (width >> 1)), (collision_rect.y + (height >> 1)));
_local3 = collision_rect.intersection(_arg1);
if (_local3.width < _local3.height){
if ((_local2 & _arg1.stacked)){
if ((((_local2 == UP)) || ((_local2 == DOWN)))){
if (x < (_arg1.x + (scale >> 1))){
x = (_arg1.x - (width >> 1));
px = x;
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
x = ((_arg1.x + scale) + (width >> 1));
px = x;
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
};
} else {
if ((((_local2 == LEFT)) || ((_local2 == RIGHT)))){
if (y < (_arg1.y + (scale >> 1))){
y = (_arg1.y - (height >> 1));
collisions = (collisions | DOWN);
} else {
y = ((_arg1.y + _arg1.height) + (height >> 1));
collisions = (collisions | UP);
};
};
};
} else {
if (((!((_arg1.stacked & LEFT))) && ((x < (_arg1.x + (scale >> 1)))))){
x = (_arg1.x - (width >> 1));
px = x;
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
if (!(_arg1.stacked & RIGHT)){
x = ((_arg1.x + scale) + (width >> 1));
px = x;
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
if (y < (_arg1.y + (scale >> 1))){
y = (_arg1.y - (height >> 1));
collisions = (collisions | DOWN);
} else {
y = ((_arg1.y + _arg1.height) + (height >> 1));
collisions = (collisions | UP);
};
};
};
};
} else {
if (_local3.height < _local3.width){
if ((_local2 & _arg1.stacked)){
if ((((_local2 == UP)) || ((_local2 == DOWN)))){
if (x < (_arg1.x + (scale >> 1))){
x = (_arg1.x - (width >> 1));
px = x;
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
x = ((_arg1.x + scale) + (width >> 1));
px = x;
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
};
} else {
if ((((_local2 == LEFT)) || ((_local2 == RIGHT)))){
if (y < (_arg1.y + (scale >> 1))){
y = (_arg1.y - (height >> 1));
collisions = (collisions | DOWN);
} else {
y = ((_arg1.y + _arg1.height) + (height >> 1));
collisions = (collisions | UP);
};
};
};
} else {
if (y < (_arg1.y + (scale >> 1))){
y = (_arg1.y - (height >> 1));
collisions = (collisions | DOWN);
if (!(((((state & JUMPING)) && (!(
)))) || ((state == SWINGING)))){
platform = _arg1;
state = RUNNING;
= false;
};
} else {
y = ((_arg1.y + scale) + (height >> 1));
collisions = (collisions | UP);
};
};
} else {
if (_local3.width == _local3.height){
_local4 = (_arg1.x + _arg1.width);
_local5 = (_arg1.y + _arg1.height);
_local6 = x;
_local7 = (y - height);
if ((((_local6 > _local4)) && ((_local7 > _local5)))){
if ((_arg1.stacked & Rect.RIGHT)){
y = ((_arg1.y + scale) + (height >> 1));
collisions = (collisions | UP);
} else {
if ((_arg1.stacked & DOWN)){
x = ((_arg1.x + scale) + (width >> 1));
px = x;
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
x = ((_arg1.x + scale) + (width >> 1));
px = x;
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
};
};
} else {
if ((((_local6 < _local4)) && ((_local7 > _local5)))){
if ((_arg1.stacked & LEFT)){
y = ((_arg1.y + _arg1.height) + (height >> 1));
collisions = (collisions | UP);
} else {
if ((_arg1.stacked & UP)){
x = (_arg1.x - (width >> 1));
px = x;
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
x = (_arg1.x - (width >> 1));
px = x;
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
};
};
} else {
if ((((_local6 < _local4)) && ((_local7 < _local5)))){
if ((_arg1.stacked & LEFT)){
y = (_arg1.y - (height >> 1));
collisions = (collisions | DOWN);
} else {
if ((_arg1.stacked & DOWN)){
x = (_arg1.x - (width >> 1));
px = x;
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
x = (_arg1.x - (width >> 1));
px = x;
y = (_arg1.y - (height >> 1));
collisions = (collisions | LEFT);
if (((((( == LEFT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
collisions = (collisions | DOWN);
if (!(((((state & JUMPING)) && (!(
)))) || ((state == SWINGING)))){
platform = _arg1;
state = RUNNING;
= false;
};
};
};
} else {
if ((((_local6 > _local4)) && ((_local7 < _local5)))){
if ((_arg1.stacked & RIGHT)){
y = (_arg1.y - (height >> 1));
collisions = (collisions | DOWN);
} else {
if ((_arg1.stacked & DOWN)){
x = ((_arg1.x + scale) + (width >> 1));
px = x;
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
} else {
x = ((_arg1.x + scale) + (width >> 1));
px = x;
y = (_arg1.y + (height >> 1));
collisions = (collisions | RIGHT);
if (((((( == RIGHT)) && ((((_arg1.stacked & UP)) || (((y - (height >> 1)) > _arg1.y)))))) && ((((_arg1.stacked & DOWN)) || ((y < (_arg1.y + _arg1.height))))))){
if ((((state == JUMPING)) && (!(
)))){
= WALLSLIDE_DELAY;
};
= _arg1;
= false;
};
collisions = (collisions | DOWN);
if (!(((((state & JUMPING)) && (!(
)))) || ((state == SWINGING)))){
platform = _arg1;
state = RUNNING;
= false;
};
};
};
};
};
};
};
};
};
};
updateCollisionRect();
}
public function levelComplete():void{
if (((!(active)) || ())){
return;
};
= true;
}
public function ():void{
if (
.length >= NUM_STARS){
[0].kill();
.shift();
};
i = 0;
while (i <
.length) {
[i].main();
if (
[i].dead){
.splice(i, 1);
i--;
};
i++;
};
}
public function ():void{
var _local1:MovieClip;
var _local2:Sprite;
= 0;
if (state == RUNNING){
running = false;
if (((((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A)))) && (!(((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D))))))){
= DAMPING_X;
px = (px + SPEED);
dir = LEFT;
running = true;
= LEFT;
};
if (((((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D)))) && (!(((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A))))))){
= DAMPING_X;
px = (px - SPEED);
dir = RIGHT;
running = true;
= RIGHT;
};
if (((((Key.isDown(Keyboard.UP)) || (Key.isDown(Key.W)))) && (!()))){
= true;
state = JUMPING;
= JUMP_DELAY;
= JUMP_FRAME_DELAY;
py = (y + );
= ( - JUMP_DECAY);
platform = null;
_local1 = new JumpMC();
_local1.x = mc.x;
_local1.y = mc.y;
g.effect_holder.addChild(_local1);
NitromeGame.sound_manager.playSound("jump");
} else {
if ((((((((((((g.alert_state == g.INACTIVE)) && (!()))) && (!()))) && (!(g.mouse_pressed)))) && (!(((((((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D)))) || (Key.isDown(Keyboard.LEFT)))) || (Key.isDown(Key.A))))))) && (((Key.isDown(Keyboard.DOWN)) || (Key.isDown(Key.S)))))){
state = STEALTH;
= true;
(dir == LEFT);
NitromeGame.sound_manager.playSound("wom");
};
};
} else {
if (state == JUMPING){
if (((
) || (
))){
if (
){
px = (px + SPEED);
dir = LEFT;
};
if (
){
px = (px - SPEED);
dir = RIGHT;
};
} else {
if ((
& RIGHT)){
dir = RIGHT;
} else {
if ((
& LEFT)){
dir = LEFT;
};
};
if (){
= false;
};
if (((((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A)))) && (!(((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D))))))){
= DAMPING_X;
px = (px + SPEED);
dir = LEFT;
= LEFT;
};
if (((((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D)))) && (!(((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A))))))){
= DAMPING_X;
px = (px - SPEED);
dir = RIGHT;
= RIGHT;
};
};
if (((( > 0)) || (((((((((Key.isDown(Keyboard.UP)) || (Key.isDown(Key.W)))) && (!(
)))) && (( > 0)))) && ())))){
--;
py = (py + );
= ( - JUMP_DECAY);
};
if (((((( > 0)) && (!()))) && (((((!(((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D))))) && (((((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A)))) && ((
& RIGHT)))))) || (((((!(((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A))))) && (((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D)))))) && ((
& LEFT)))))))){
= true;
= false;
state = JUMPING;
= JUMP_DELAY;
= JUMP_FRAME_DELAY;
py = (y + );
= ( - JUMP_DECAY);
platform = null;
= 0;
= null;
if ((
& LEFT)){
= true;
};
if ((
& RIGHT)){
= true;
};
NitromeGame.sound_manager.playSound("jump");
};
if (!
){
= (
= false);
};
} else {
if (state == SWINGING){
if ((((collisions == 0)) && ((rope_end.b.y > rope_end.a.y)))){
if (x < rope_end.a.x){
if (((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D)))){
px = (px + (rope_end.rx * ));
py = (py + (rope_end.ry * ));
};
} else {
if (x > rope_end.a.x){
if (((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A)))){
px = (px + (rope_end.lx * ));
py = (py + (rope_end.ly * ));
};
} else {
if (x == rope_end.a.x){
if (((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(Key.D)))){
px = (px + (rope_end.rx * ));
py = (py + (rope_end.ry * ));
} else {
if (((Key.isDown(Keyboard.LEFT)) || (Key.isDown(Key.A)))){
px = (px + (rope_end.lx * ));
py = (py + (rope_end.ly * ));
};
};
};
};
};
};
if (((((((
) && (((Key.isDown(Keyboard.UP)) || (Key.isDown(Key.W)))))) && (!((collisions & UP))))) && ((rope_end.len > height)))){
i = 0;
while (i < rope.length) {
rope[i].rest_len = (rope[i].rest_len -
);
i++;
};
= ( -
);
if ((((
< MAX_ROPE_SPEED)) && (( > 100)))){
= (
+ ((MAX_ROPE_SPEED -
) * 0.1));
} else {
if (
> MIN_ROPE_SPEED){
= (
+ ((MIN_ROPE_SPEED -
) * 0.1));
};
};
} else {
if ((((((((((((rope_end.b.y > rope_end.a.y)) && (( < MAX_ROPE_LENGTH)))) && (((Key.isDown(Keyboard.DOWN)) || (Key.isDown(Key.S)))))) && (!((collisions & DOWN))))) && (( == 0)))) && (!((((((rope_end.b.x > rope_end.a.x)) && ((collisions & RIGHT)))) || ((((rope_end.b.x < rope_end.a.x)) && ((collisions & LEFT))))))))){
i = 0;
while (i < rope.length) {
rope[i].rest_len = (rope[i].rest_len +
);
i++;
};
= ( +
);
if ((((
< MAX_ROPE_SPEED)) && (( < (MAX_ROPE_LENGTH - 100))))){
= (
+ ((MAX_ROPE_SPEED -
) * 0.1));
} else {
if (
> MIN_ROPE_SPEED){
= (
+ ((MIN_ROPE_SPEED -
) * 0.1));
};
};
} else {
if (((((((((Key.isDown(Keyboard.UP)) || (Key.isDown(Key.W)))) && (!((collisions & UP))))) && ((((collisions & LEFT)) || ((collisions & RIGHT)))))) && ((rope_end.len <= height)))){
rope_end = null;
rope = new Array();
anchor = null;
= false;
= true;
state = JUMPING;
= JUMP_DELAY;
= JUMP_FRAME_DELAY;
py = (y + );
= ( - JUMP_DECAY);
NitromeGame.sound_manager.playSound("jump");
platform = null;
} else {
= MIN_ROPE_SPEED;
};
};
};
} else {
if (state == STEALTH){
};
};
};
};
if (!((((((Key.isDown(Keyboard.UP)) || (Key.isDown(Key.W)))) || (
))) || (
))){
= false;
};
if (!((Key.isDown(Keyboard.DOWN)) || (Key.isDown(Key.S)))){
= false;
if (state == STEALTH){
state = RUNNING;
};
};
if ((((((((
== 0)) && (!((state == STEALTH))))) && (g.mouse_pressed))) && (!()))){
= READY;
vx = (g.canvas.mouseX - x);
vy = (g.canvas.mouseY - y);
= Math.sqrt(((vx * vx) + (vy * vy)));
dx = (vx /
);
dy = (vy /
);
= READY_DELAY;
} else {
if (
== READY){
if (--
<= 0){
_local2 = new LiveStar();
g.star_holder.addChild(_local2);
anchor = new RopeAnchor(x, y, dx, dy, _local2, g);
= 0;
= false;
= THROW;
= THROW_DELAY;
};
} else {
if ((((
== THROW)) && (!(g.mouse_pressed)))){
if (--
<= 0){
= 0;
};
} else {
if (anchor == null){
--;
};
};
};
};
if (){
g.mouse_pressed = false;
};
if (!g.mouse_pressed){
if (((!((anchor == null))) && (anchor.active))){
anchor.convertToStar();
};
};
}
public function ():void{
if ((map_rect.x + (map_rect.width - 1)) < (x + (width >> 1))){
x = (px = ((-((width >> 1)) + map_rect.x) + (map_rect.width - 1)));
};
if ((map_rect.y + (map_rect.height - 1)) < y){
();
return;
};
if (map_rect.x >= (x - (width >> 1))){
x = (px = (map_rect.x + (width >> 1)));
};
if (map_rect.y >= (y - (height >> 1))){
y = (py = (map_rect.y + (height >> 1)));
};
map_x = (((x - (width >> 1)) * SCALE) >> 0);
map_y = (((y - (height >> 1)) * SCALE) >> 0);
if (map_y >= (g.scroller.height - 1)){
map_y = (g.scroller.height - 2);
};
[0] = g.block_map[map_y][map_x];
[1] = g.block_map[map_y][(map_x + 1)];
[2] = g.block_map[(map_y + 1)][map_x];
[3] = g.block_map[(map_y + 1)][(map_x + 1)];
i = 0;
while (i < .length) {
if (((((isNaN([i])) && (!(([i] == null))))) && ([i].block))){
block = [i].b;
if (block.intersects(collision_rect)){
(block);
};
};
i++;
};
if (((!((platform == null))) || (!(
)))){
= 0;
= 0;
} else {
if (collisions > 0){
= collisions;
if ((collisions & DOWN)){
= EXTEND_ROPE_OFF_DELAY;
};
};
};
if ((((state == SWINGING)) && ((collisions & DOWN)))){
= SWING_FLOOR_DELAY;
} else {
if (state == SWINGING){
--;
};
};
}
public function ():void{
mc.visible = false;
.visible = false;
.visible = false;
.visible = false;
.visible = false;
.visible = false;
NitromeGame.timeline.loading_clip.visible = false;
= Util.localToLocal(
, mc, NitromeGame.timeline);
.tx = (-(
.x) + (.width * 0.5));
.ty = (-(
.y) + .height);
.draw(NitromeGame.timeline,
, null, null,
);
mc.visible = true;
.visible = true;
.visible = true;
.visible = true;
NitromeGame.timeline.loading_clip.visible = true;
}
public function ():void{
if (mc.body != null){
if (dir == LEFT){
= Util.localToLocal(
, mc.body.left_eye, g.canvas);
.move(
.x,
.y);
.main();
= Util.localToLocal(
, mc.body.right_eye, g.canvas);
.move(
.x,
.y);
.main();
} else {
if (dir == RIGHT){
= Util.localToLocal(
, mc.body.right_eye, g.canvas);
.move(
.x,
.y);
.main();
= Util.localToLocal(
, mc.body.left_eye, g.canvas);
.move(
.x,
.y);
.main();
};
};
};
}
public function
():void{
var _local1:int;
var _local2:Dot;
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Rope;
var _local7:Number;
var _local8:Number;
if (anchor != null){
anchor.main();
if (((((!((anchor == null))) && (anchor.locked))) && (anchor.active))){
if (
){
rope_end.updateSpring();
} else {
rope_end.updateLine();
};
rope_end.a.pin();
map_x = ((x * SCALE) >> 0);
map_y = ((y * SCALE) >> 0);
if (map_y >= g.scroller.height){
return;
};
if (((((isNaN(g.block_map[map_y][map_x])) && (!((g.block_map[map_y][map_x] == null))))) && (g.block_map[map_y][map_x].block))){
(g.block_map[map_y][map_x].b);
rope_end.updateLine();
};
if (!
){
if (rope_end.b.y <= rope_end.a.y){
= true;
};
if ((((collisions & DOWN)) && ((rope_end.b.y <= rope_end.a.y)))){
rope_end.rest_len = rope_end.len;
};
if ((((collisions & DOWN)) || ((rope_end.b.y > rope_end.a.y)))){
= true;
if (
){
rope_end.rest_len = rope_end.len;
};
= false;
};
};
if (((((!((rope_end.stiffness == 0.5))) && ((((rope_end.len < )) || ((rope_end.len < height)))))) && ((y > rope_end.a.y)))){
rope_end.stiffness = 0.5;
};
= RayCast.ropeCast(rope_end, g.block_map);
if ( != null){
_local1 = 0;
while (_local1 < 100) {
if ( == null){
break;
};
_local3 = 0;
_local4 = 0;
if (rope_end.from){
if (rope_end.block == .block){
if (rope_end.from == Rope.UP_LEFT){
if ( .exit_side == RIGHT){
.access_side = UP;
} else {
if ( .exit_side == DOWN){
.access_side = LEFT;
};
};
} else {
if (rope_end.from == Rope.UP_RIGHT){
if ( .exit_side == LEFT){
.access_side = UP;
} else {
if ( .exit_side == DOWN){
.access_side = RIGHT;
};
};
} else {
if (rope_end.from == Rope.DOWN_RIGHT){
if ( .exit_side == LEFT){
.access_side = DOWN;
} else {
if ( .exit_side == UP){
.access_side = RIGHT;
};
};
} else {
if (rope_end.from == Rope.DOWN_LEFT){
if ( .exit_side == RIGHT){
.access_side = DOWN;
} else {
if ( .exit_side == UP){
.access_side = LEFT;
};
};
};
};
};
};
};
};
if ( .access_side == UP){
if ( .exit_side == RIGHT){
i = 0;
while (i < 1000) {
if (( .block.stacked & RIGHT)){
.map_x++;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x + scale), .block.y);
_local3 = RIGHT;
_local4 = Rope.UP_RIGHT;
} else {
if ( .exit_side == LEFT){
i = 0;
while (i < 1000) {
if (( .block.stacked & LEFT)){
.map_x--;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x - 1), .block.y);
_local3 = LEFT;
_local4 = Rope.UP_LEFT;
} else {
if ( .exit_side == DOWN){
if (px > x){
_local2 = new Dot(( .block.x + scale), .block.y);
_local3 = RIGHT;
_local4 = Rope.UP_RIGHT;
} else {
if (px < x){
_local2 = new Dot(( .block.x - 1), .block.y);
_local3 = LEFT;
_local4 = Rope.UP_LEFT;
} else {
if (px == 0){
if ( .ax > (( .block.x + scale) >> 1)){
_local2 = new Dot(( .block.x + scale), .block.y);
_local3 = RIGHT;
_local4 = Rope.UP_RIGHT;
} else {
_local2 = new Dot(( .block.x - 1), .block.y);
_local3 = LEFT;
_local4 = Rope.UP_LEFT;
};
};
};
};
};
};
};
} else {
if ( .access_side == RIGHT){
if ( .exit_side == DOWN){
i = 0;
while (i < 1000) {
if (( .block.stacked & DOWN)){
.map_y++;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x + scale), ( .block.y + scale));
_local3 = RIGHT;
_local4 = Rope.DOWN_RIGHT;
} else {
if ( .exit_side == UP){
i = 0;
while (i < 1000) {
if (( .block.stacked & UP)){
.map_y--;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x + scale), .block.y);
_local3 = LEFT;
_local4 = Rope.UP_RIGHT;
} else {
if ( .exit_side == LEFT){
if (py > y){
_local2 = new Dot(( .block.x + scale), ( .block.y + scale));
_local3 = RIGHT;
_local4 = Rope.DOWN_RIGHT;
} else {
if (py < y){
_local2 = new Dot(( .block.x + scale), .block.y);
_local3 = LEFT;
_local4 = Rope.UP_RIGHT;
} else {
if (py == 0){
if ( .ay > (( .block.y + scale) >> 1)){
_local2 = new Dot(( .block.x + scale), ( .block.y + scale));
_local3 = RIGHT;
_local4 = Rope.DOWN_RIGHT;
} else {
_local2 = new Dot(( .block.x + scale), .block.y);
_local3 = LEFT;
_local4 = Rope.UP_RIGHT;
};
};
};
};
};
};
};
} else {
if ( .access_side == DOWN){
if ( .exit_side == RIGHT){
i = 0;
while (i < 1000) {
if (( .block.stacked & RIGHT)){
.map_x++;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x + scale), ( .block.y + scale));
_local3 = LEFT;
_local4 = Rope.DOWN_RIGHT;
} else {
if ( .exit_side == LEFT){
i = 0;
while (i < 1000) {
if (( .block.stacked & LEFT)){
.map_x--;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x - 1), ( .block.y + scale));
_local3 = RIGHT;
_local4 = Rope.DOWN_LEFT;
} else {
if ( .exit_side == UP){
if (px > x){
_local2 = new Dot(( .block.x + scale), ( .block.y + scale));
_local3 = LEFT;
_local4 = Rope.DOWN_RIGHT;
} else {
if (px < x){
_local2 = new Dot(( .block.x - 1), ( .block.y + scale));
_local3 = RIGHT;
_local4 = Rope.DOWN_LEFT;
} else {
if (px == 0){
if ( .ax > (( .block.x + scale) >> 1)){
_local2 = new Dot(( .block.x - 1), ( .block.y + scale));
_local3 = LEFT;
_local4 = Rope.DOWN_LEFT;
} else {
_local2 = new Dot(( .block.x + scale), ( .block.y + scale));
_local3 = RIGHT;
_local4 = Rope.DOWN_RIGHT;
};
};
};
};
};
};
};
} else {
if ( .access_side == LEFT){
if ( .exit_side == DOWN){
i = 0;
while (i < 1000) {
if (( .block.stacked & DOWN)){
.map_y++;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x - 1), ( .block.y + scale));
_local3 = LEFT;
_local4 = Rope.DOWN_LEFT;
} else {
if ( .exit_side == UP){
i = 0;
while (i < 1000) {
if (( .block.stacked & UP)){
.map_y--;
.block = g.block_map[ .map_y][ .map_x].b;
} else {
break;
};
i++;
};
_local2 = new Dot(( .block.x - 1), .block.y);
_local3 = RIGHT;
_local4 = Rope.UP_LEFT;
} else {
if ( .exit_side == RIGHT){
if (py > y){
_local2 = new Dot(( .block.x - 1), ( .block.y + scale));
_local3 = LEFT;
_local4 = Rope.DOWN_LEFT;
} else {
if (py < y){
_local2 = new Dot(( .block.x - 1), .block.y);
_local3 = RIGHT;
_local4 = Rope.UP_LEFT;
} else {
if (py == 0){
if ( .ay > (( .block.y + scale) >> 1)){
_local2 = new Dot(( .block.x - 1), ( .block.y + scale));
_local3 = LEFT;
_local4 = Rope.DOWN_LEFT;
} else {
_local2 = new Dot(( .block.x - 1), .block.y);
_local3 = RIGHT;
_local4 = Rope.UP_LEFT;
};
};
};
};
};
};
};
};
};
};
};
if (_local2 != null){
_local5 = rope_end.rest_len;
rope_end.b = _local2;
rope_end.updateLine();
if (_local3 == RIGHT){
rope_end.unwrap_x = rope_end.lx;
rope_end.unwrap_y = rope_end.ly;
} else {
rope_end.unwrap_x = rope_end.rx;
rope_end.unwrap_y = rope_end.ry;
};
_local6 = new Rope(_local2, this);
rope_end = _local6;
rope_end.from = _local4;
rope_end.block = .block;
rope.push(rope_end);
};
= RayCast.ropeCast(rope_end, g.block_map);
_local1++;
};
};
if (rope.length > 1){
_local7 = ((rope_end.dx * rope[(rope.length - 2)].unwrap_x) + (rope_end.dy * rope[(rope.length - 2)].unwrap_y));
if (_local7 > 0){
_local8 = (rope[(rope.length - 2)].len + rope_end.len);
rope.pop();
rope_end = rope[(rope.length - 1)];
rope_end.b = this;
};
};
};
};
if ( > 0){
--;
};
if ((((
== 0)) && ((state == SWINGING)))){
rope_end = null;
rope = new Array();
anchor = null;
state = JUMPING;
= true;
};
g.rope_holder.graphics.clear();
g.rope_holder.graphics.lineStyle(2, 1976903, );
if ( < 1){
= ( + ROPE_ALPHA_FADE);
};
if (rope.length > 0){
i = 0;
while (i < (rope.length - 1)) {
g.rope_holder.graphics.moveTo(rope[i].a.x, rope[i].a.y);
g.rope_holder.graphics.lineTo(rope[i].b.x, rope[i].b.y);
i++;
};
g.rope_holder.graphics.moveTo(rope[(rope.length - 1)].a.x, rope[(rope.length - 1)].a.y);
g.rope_holder.graphics.lineTo((
.x + mc.x), (
.y + mc.y));
} else {
if (((((!((anchor == null))) && (anchor.active))) && (!((anchor.rope == null))))){
g.rope_holder.graphics.moveTo((
.x + mc.x), (
.y + mc.y));
g.rope_holder.graphics.lineTo(anchor.mc.x, anchor.mc.y);
};
};
}
public function
():void{
if (!active){
return;
};
if (){
++;
if ((((health.value > 0)) && ((
>= OUCH_DELAY)))){
= false;
= true;
} else {
if (
>= OUCH_DEATH_DELAY){
= false;
= true;
};
};
};
if (){
if (health.value <= 0){
();
} else {
++;
mc.visible = !(mc.visible);
if ( >= HURT_DELAY){
= false;
mc.visible = true;
};
};
};
}
public function sideOf(_arg1:Number):int{
_arg1 = (_arg1 + 180);
if ((((_arg1 < 22.5)) || ((_arg1 >= 337.5)))){
return (RIGHT);
};
if ((((_arg1 >= 22.5)) && ((_arg1 < 67.5)))){
return (RIGHT);
};
if ((((_arg1 >= 67.5)) && ((_arg1 < 112.5)))){
return (RIGHT);
};
if ((((_arg1 >= 112.5)) && ((_arg1 < 157.5)))){
return (LEFT);
};
if ((((_arg1 >= 157.5)) && ((_arg1 < 202.5)))){
return (LEFT);
};
if ((((_arg1 >= 202.5)) && ((_arg1 < 247.5)))){
return (LEFT);
};
if ((((_arg1 >= 247.5)) && ((_arg1 < 292.5)))){
return (RIGHT);
};
if ((((_arg1 >= 292.5)) && ((_arg1 < 337.5)))){
return (RIGHT);
};
return (0);
}
public function hit():void{
if ((((((() || ())) || (!(active)))) || (g.god_mode))){
return;
};
NitromeGame.sound_manager.playSound("electric");
NitromeGame.bonus.dodger.value = 0;
= true;
g.mouse_pressed = false;
= 0;
= 0;
if (state == STEALTH){
state = RUNNING;
};
health.value--;
NitromeGame.timeline.health_panel.gotoAndStop(("_" + health.value));
}
public function main():void{
var _local1:int;
var _local2:int;
var _local3:MovieClip;
collisions = 0;
if (platform != null){
collisions = (collisions | Rect.DOWN);
};
if ((((((((state == RUNNING)) || ((state == JUMPING)))) || ((state == SWINGING)))) || ((state == STEALTH)))){
if (state == JUMPING){
if (py <= y){
= true;
};
if (
){
findFloor();
};
};
if (state == RUNNING){
();
};
();
();
();
if (!active){
return;
};
updateAnimState(mc);
updateAnimState(
);
updateMC();
();
if (((!()) && (!(g.completed)))){
();
};
if (state != SWINGING){
if (
> DAMPING_X){
= (
- DAMPING_STEP);
};
(GRAVITY_X,
);
} else {
(GRAVITY_X,
);
};
if (platform == null){
if (){
--;
if ((y + 20) > (
.y +
.height)){
if ((((
.stacked & DOWN)) && (((
.y +
.height) < map_rect.height)))){
_local1 = ((
.x * SCALE) >> 0);
_local2 = ((
.y * SCALE) >> 0);
= g.block_map[(_local2 + 1)][_local1].b;
} else {
= null;
= 0;
};
};
if ( > (WALLSLIDE_DELAY - 2)){
verletY(GRAVITY_Y, FORCED_WALLSLIDE_DAMPING_Y);
} else {
verletY(GRAVITY_Y, WALLSLIDE_DAMPING_Y);
};
} else {
verletY(GRAVITY_Y, DAMPING_Y);
};
};
();
updateCollisionRect();
if ((((state == RUNNING)) && ())){
active = false;
_local3 = new LevelCompleteMC();
_local3.x = mc.x;
_local3.y = mc.y;
g.player_holder.addChild(_local3);
();
};
};
}
public function verletY(_arg1:Number, _arg2:Number):void{
temp_y = y;
y = (y + ((_arg2 * (y - py)) + _arg1));
py = temp_y;
}
public function (_arg1:Number, _arg2:Number):void{
temp_x = x;
x = (x + ((_arg2 * (x - px)) + _arg1));
px = temp_x;
}
public function findFloor():void{
map_x = (((x - (width >> 1)) * SCALE) >> 0);
map_y = (((y - (height >> 1)) * SCALE) >> 0);
if (map_y >= (g.scroller.height - 1)){
map_y = (g.scroller.height - 2);
};
[0] = g.block_map[map_y][map_x];
[1] = g.block_map[map_y][(map_x + 1)];
[2] = g.block_map[(map_y + 1)][map_x];
[3] = g.block_map[(map_y + 1)][(map_x + 1)];
i = 0;
while (i < .length) {
if (((((isNaN([i])) && (!(([i] == null))))) && ([i].block))){
block = [i].b;
if ((block.stacked & Rect.UP)){
} else {
if ((((block.x > ((-1 + x) + (width >> 1)))) || ((((block.x + scale) - 1) < (x - (width >> 1)))))){
} else {
if (((((y + (height >> 1)) < block.y)) || (((y + (height >> 1)) > ((block.y + FLOOR_DEPTH) + (y - py)))))){
} else {
platform = block;
y = (block.y - (height >> 1));
updateCollisionRect();
state = RUNNING;
= DAMPING_X;
= false;
= false;
= false;
return;
};
};
};
};
i++;
};
}
public function updateCollisionRect():void{
collision_rect.x = (x - (width >> 1));
collision_rect.y = (y - (height >> 1));
collision_rect.width = width;
collision_rect.height = height;
}
public function ():void{
if (platform != null){
if ((((((((platform.x + platform.width) - 1) < (x - (width >> 1)))) || ((platform.x > ((-1 + x) + (width >> 1)))))) || (((platform.force_field) && (!(platform.active)))))){
platform = null;
findFloor();
if (platform == null){
state = JUMPING;
= true;
py = y;
};
};
};
}
public function ():void{
var _local1:Number;
= Math.min(0, );
= Math.min(0, );
= Math.max(((-(g.scroller.width) * scale) + g.width), );
= Math.max(((-(g.scroller.height) * scale) + g.height), );
_local1 = 0.2;
= g.canvas.x;
= g.canvas.y;
g.canvas.x = (g.canvas.x + Math.round((( - g.canvas.x) * _local1)));
g.canvas.y = (g.canvas.y + Math.round((( - g.canvas.y) * _local1)));
if (((((Key.isDown(Keyboard.LEFT)) || (Key.isDown(65)))) || (((Key.isDown(Keyboard.RIGHT)) || (Key.isDown(68)))))){
= ( + (g.canvas.x - ));
};
g.back.buildings_1.x = (( * 0.05) >> 0);
g.back.buildings_2.x = (( * 0.1) >> 0);
if (g.back.buildings_1.x > 0){
g.back.buildings_1.x = (g.back.buildings_1.x - 550);
};
if (g.back.buildings_1.x < -550){
g.back.buildings_1.x = (g.back.buildings_1.x + 550);
};
if (g.back.buildings_2.x > 0){
g.back.buildings_2.x = (g.back.buildings_2.x - 550);
};
if (g.back.buildings_2.x < -550){
g.back.buildings_2.x = (g.back.buildings_2.x + 550);
};
}
}
}//package com.nitrome.engine_specific
Section 35
//RayCast (com.nitrome.engine_specific.RayCast)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
public class RayCast {
public static const LEFT:int = 8;
public static const UP:int = 1;
public static const DOWN:int = 4;
public static const RIGHT:int = 2;
public static var found:Boolean;
public static var tx:Number;
public static var ty:Number;
public static var px:Number;
public static var py:Number;
public static var DX:Number;
public static var DY:Number;
public static var
:Number;
public static var next_y:Number;
public static var corn:Array;
public static var next_x:Number;
public static var report:RayCastReport;
public static var vx:Number;
public static var vy:Number;
public static var dir_x:int;
public static var dir_y:int;
public static var dot:Number;
public static var line_rect:Rect;
public static var map_x:int;
public static var map_y:int;
public static var g:Game;
public static var i:int;
public static var j:int;
public static var num_corners_inside:int;
public static function init(_arg1:Game):void{
g = _arg1;
corn = new Array(4);
i = 0;
while (i < 4) {
corn[i] = new Dot();
i++;
};
line_rect = new Rect();
}
public static function cast(_arg1:Line, _arg2:Array):RayCastReport{
map_x = ((_arg1.a.x * g.SCALE) >> 0);
map_y = ((_arg1.a.y * g.SCALE) >> 0);
if (((((isNaN(_arg2[map_y][map_x])) && (!((_arg2[map_y][map_x] == null))))) && (_arg2[map_y][map_x].block))){
return (new RayCastReport(_arg2[map_y][map_x].b, map_x, map_y, _arg1.a.x, _arg1.a.y, _arg2[map_y][map_x].b.sideOf(_arg1.a.x, _arg1.a.y)));
};
if (_arg1.dx != 0){
DX = (1 / _arg1.dx);
} else {
DX = 0;
};
if (_arg1.dy != 0){
DY = (1 / _arg1.dy);
} else {
DY = 0;
};
dir_x = ((_arg1.dx < 0)) ? -1 : 1;
dir_y = ((_arg1.dy < 0)) ? -1 : 1;
px = (_arg1.a.x - (map_x * g.scale));
py = (_arg1.a.y - (map_y * g.scale));
tx = ((_arg1.dx)<0) ? 0 : g.scale;
ty = ((_arg1.dy)<0) ? 0 : g.scale;
= 0;
i = 0;
while (i < 100) {
next_x = Math.abs(((px - tx) * DX));
next_y = Math.abs(((py - ty) * DY));
if ((((next_x < next_y)) || ((next_y == 0)))){
map_x = (map_x + dir_x);
= (
+ next_x);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (null);
};
px = (px + (_arg1.dx * next_x));
py = (py + (_arg1.dy * next_x));
px = (px - (dir_x * g.scale));
if (((((isNaN(_arg2[map_y][map_x])) && (!((_arg2[map_y][map_x] == null))))) && (_arg2[map_y][map_x].block))){
return (new RayCastReport(_arg2[map_y][map_x].b, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py), _arg2[map_y][map_x].b.sideOf(((map_x * g.scale) + px), ((map_y * g.scale) + py))));
};
} else {
map_y = (map_y + dir_y);
= (
+ next_y);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (null);
};
px = (px + (_arg1.dx * next_y));
py = (py + (_arg1.dy * next_y));
py = (py - (dir_y * g.scale));
if (((((isNaN(_arg2[map_y][map_x])) && (!((_arg2[map_y][map_x] == null))))) && (_arg2[map_y][map_x].block))){
return (new RayCastReport(_arg2[map_y][map_x].b, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py), _arg2[map_y][map_x].b.sideOf(((map_x * g.scale) + px), ((map_y * g.scale) + py))));
};
};
i++;
};
return (null);
}
public static function playerCast(_arg1:Line, _arg2:Array, _arg3:Player):RayCastReport{
found = false;
map_x = ((_arg1.a.x * g.SCALE) >> 0);
map_y = ((_arg1.a.y * g.SCALE) >> 0);
if (g.blocks_in_play[map_y][map_x] == g.IN_PLAY){
return (new RayCastReport(null, map_x, map_y, _arg1.a.x, _arg1.a.y, _arg2[map_y][map_x].b.sideOf(_arg1.a.x, _arg1.a.y)));
};
if (_arg1.dx != 0){
DX = (1 / _arg1.dx);
} else {
DX = 0;
};
if (_arg1.dy != 0){
DY = (1 / _arg1.dy);
} else {
DY = 0;
};
dir_x = ((_arg1.dx < 0)) ? -1 : 1;
dir_y = ((_arg1.dy < 0)) ? -1 : 1;
px = (_arg1.a.x - (map_x * g.scale));
py = (_arg1.a.y - (map_y * g.scale));
tx = ((_arg1.dx)<0) ? 0 : g.scale;
ty = ((_arg1.dy)<0) ? 0 : g.scale;
= 0;
i = 0;
while (i < 100) {
next_x = Math.abs(((px - tx) * DX));
next_y = Math.abs(((py - ty) * DY));
if ((((next_x < next_y)) || ((next_y == 0)))){
map_x = (map_x + dir_x);
= (
+ next_x);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (new RayCastReport(null, map_x, map_y, _arg1.b.x, _arg1.b.y, 0, found));
};
px = (px + (_arg1.dx * next_x));
py = (py + (_arg1.dy * next_x));
px = (px - (dir_x * g.scale));
if (((((((((!(found)) && ((map_x >= (_arg3.map_x - 1))))) && ((map_x <= (_arg3.map_x + 1))))) && ((map_y >= (_arg3.map_y - 1))))) && ((map_y <= (_arg3.map_y + 1))))){
line_rect.x = Math.min(_arg1.a.x, ((map_x * g.scale) + px));
line_rect.y = Math.min(_arg1.a.y, ((map_y * g.scale) + py));
line_rect.width = Math.abs((_arg1.a.x - ((map_x * g.scale) + px)));
line_rect.height = Math.abs((_arg1.a.y - ((map_y * g.scale) + py)));
if (line_rect.intersects(_arg3.collision_rect)){
if ((((((((_arg1.a.x >= _arg3.collision_rect.x)) && ((_arg1.a.x < (_arg3.collision_rect.x + _arg3.collision_rect.width))))) && ((_arg1.b.x >= _arg3.collision_rect.x)))) && ((_arg1.b.x < (_arg3.collision_rect.x + _arg3.collision_rect.width))))){
found = true;
} else {
if ((((((((_arg1.a.y >= _arg3.collision_rect.y)) && ((_arg1.a.y < (_arg3.collision_rect.y + _arg3.collision_rect.height))))) && ((_arg1.b.y >= _arg3.collision_rect.y)))) && ((_arg1.b.y < (_arg3.collision_rect.y + _arg3.collision_rect.height))))){
found = true;
} else {
corn = _arg3.collision_rect.(corn);
num_corners_inside = 0;
j = 0;
while (j < corn.length) {
vx = (corn[j].x - _arg1.a.x);
vy = (corn[j].y - _arg1.a.y);
dot = ((vx * _arg1.rx) + (vy * _arg1.ry));
if (dot < 0){
num_corners_inside++;
};
j++;
};
if ((((num_corners_inside == 0)) || ((num_corners_inside == 4)))){
} else {
found = true;
};
};
};
};
};
if (g.blocks_in_play[map_y][map_x] == g.IN_PLAY){
return (new RayCastReport(null, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py), null, found));
};
} else {
map_y = (map_y + dir_y);
= (
+ next_y);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (new RayCastReport(null, map_x, map_y, _arg1.b.x, _arg1.b.y, 0, found));
};
px = (px + (_arg1.dx * next_y));
py = (py + (_arg1.dy * next_y));
py = (py - (dir_y * g.scale));
if (((((((((!(found)) && ((map_x >= (_arg3.map_x - 1))))) && ((map_x <= (_arg3.map_x + 1))))) && ((map_y >= (_arg3.map_y - 1))))) && ((map_y <= (_arg3.map_y + 1))))){
line_rect.x = Math.min(_arg1.a.x, ((map_x * g.scale) + px));
line_rect.y = Math.min(_arg1.a.y, ((map_y * g.scale) + py));
line_rect.width = Math.abs((_arg1.a.x - ((map_x * g.scale) + px)));
line_rect.height = Math.abs((_arg1.a.y - ((map_y * g.scale) + py)));
if (line_rect.intersects(_arg3.collision_rect)){
if ((((((((_arg1.a.x >= _arg3.collision_rect.x)) && ((_arg1.a.x < (_arg3.collision_rect.x + _arg3.collision_rect.width))))) && ((_arg1.b.x >= _arg3.collision_rect.x)))) && ((_arg1.b.x < (_arg3.collision_rect.x + _arg3.collision_rect.width))))){
found = true;
} else {
if ((((((((_arg1.a.y >= _arg3.collision_rect.y)) && ((_arg1.a.y < (_arg3.collision_rect.y + _arg3.collision_rect.height))))) && ((_arg1.b.y >= _arg3.collision_rect.y)))) && ((_arg1.b.y < (_arg3.collision_rect.y + _arg3.collision_rect.height))))){
found = true;
} else {
corn = _arg3.collision_rect.(corn);
num_corners_inside = 0;
j = 0;
while (j < corn.length) {
vx = (corn[j].x - _arg1.a.x);
vy = (corn[j].y - _arg1.a.y);
dot = ((vx * _arg1.rx) + (vy * _arg1.ry));
if (dot < 0){
num_corners_inside++;
};
j++;
};
if ((((num_corners_inside == 0)) || ((num_corners_inside == 4)))){
} else {
found = true;
};
};
};
};
};
if (g.blocks_in_play[map_y][map_x] == g.IN_PLAY){
return (new RayCastReport(null, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py), null, found));
};
};
i++;
};
return (null);
}
public static function ropeCast(_arg1:Line, _arg2:Array):RayCastReport{
found = false;
map_x = ((_arg1.a.x * g.SCALE) >> 0);
map_y = ((_arg1.a.y * g.SCALE) >> 0);
if (((((isNaN(_arg2[map_y][map_x])) && (!((_arg2[map_y][map_x] == null))))) && (_arg2[map_y][map_x].block))){
g.debug.drawRect((map_x * g.scale), (map_y * g.scale), g.scale, g.scale);
found = true;
report = new RayCastReport(_arg2[map_y][map_x].b, map_x, map_y, _arg1.a.x, _arg1.a.y, _arg2[map_y][map_x].b.sideOf(_arg1.a.x, _arg1.a.y));
};
if (_arg1.dx != 0){
DX = (1 / _arg1.dx);
} else {
DX = 0;
};
if (_arg1.dy != 0){
DY = (1 / _arg1.dy);
} else {
DY = 0;
};
dir_x = ((_arg1.dx < 0)) ? -1 : 1;
dir_y = ((_arg1.dy < 0)) ? -1 : 1;
px = (_arg1.a.x - (map_x * g.scale));
py = (_arg1.a.y - (map_y * g.scale));
tx = ((_arg1.dx)<0) ? 0 : g.scale;
ty = ((_arg1.dy)<0) ? 0 : g.scale;
= 0;
i = 0;
while (i < 100) {
next_x = Math.abs(((px - tx) * DX));
next_y = Math.abs(((py - ty) * DY));
if (next_x < next_y){
map_x = (map_x + dir_x);
= (
+ next_x);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (null);
};
px = (px + (_arg1.dx * next_x));
py = (py + (_arg1.dy * next_x));
px = (px - (dir_x * g.scale));
if (((((((!(found)) && (isNaN(_arg2[map_y][map_x])))) && (!((_arg2[map_y][map_x] == null))))) && (_arg2[map_y][map_x].block))){
report = new RayCastReport(_arg2[map_y][map_x].b, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py), _arg2[map_y][map_x].b.sideOf(((map_x * g.scale) + px), ((map_y * g.scale) + py)));
found = true;
} else {
if (found){
report.
= ((map_x * g.scale) + px);
report. = ((map_y * g.scale) + py);
report.exit_side = report.block.sideOf(report.
, report.);
return (report);
};
};
} else {
map_y = (map_y + dir_y);
= (
+ next_y);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (null);
};
px = (px + (_arg1.dx * next_y));
py = (py + (_arg1.dy * next_y));
py = (py - (dir_y * g.scale));
if (((((((!(found)) && (isNaN(_arg2[map_y][map_x])))) && (!((_arg2[map_y][map_x] == null))))) && (_arg2[map_y][map_x].block))){
report = new RayCastReport(_arg2[map_y][map_x].b, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py), _arg2[map_y][map_x].b.sideOf(((map_x * g.scale) + px), ((map_y * g.scale) + py)));
found = true;
} else {
if (found){
report.
= ((map_x * g.scale) + px);
report. = ((map_y * g.scale) + py);
report.exit_side = report.block.sideOf(report.
, report.);
return (report);
};
};
};
i++;
};
return (null);
}
public static function initCast(_arg1:Line, _arg2:Array):RayCastReport{
map_x = ((_arg1.a.x * g.SCALE) >> 0);
map_y = ((_arg1.a.y * g.SCALE) >> 0);
if (TileMaker.isBlock(_arg2[map_y][map_x])){
return (new RayCastReport(null, map_x, map_y, _arg1.a.x, _arg1.a.y));
};
if (_arg1.dx != 0){
DX = (1 / _arg1.dx);
} else {
DX = 0;
};
if (_arg1.dy != 0){
DY = (1 / _arg1.dy);
} else {
DY = 0;
};
dir_x = ((_arg1.dx < 0)) ? -1 : 1;
dir_y = ((_arg1.dy < 0)) ? -1 : 1;
px = (_arg1.a.x - (map_x * g.scale));
py = (_arg1.a.y - (map_y * g.scale));
tx = ((_arg1.dx)<0) ? 0 : g.scale;
ty = ((_arg1.dy)<0) ? 0 : g.scale;
= 0;
i = 0;
while (i < 1000) {
next_x = Math.abs(((px - tx) * DX));
next_y = Math.abs(((py - ty) * DY));
if ((((next_x < next_y)) || ((next_y == 0)))){
map_x = (map_x + dir_x);
= (
+ next_x);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (new RayCastReport(null, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py)));
};
px = (px + (_arg1.dx * next_x));
py = (py + (_arg1.dy * next_x));
px = (px - (dir_x * g.scale));
if (TileMaker.isBlock(_arg2[map_y][map_x])){
return (new RayCastReport(null, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py)));
};
} else {
map_y = (map_y + dir_y);
= (
+ next_y);
if ((((((((((
> _arg1.len)) || ((map_x < 0)))) || ((map_y < 0)))) || ((map_x >= _arg2[0].length)))) || ((map_y >= _arg2.length)))){
return (new RayCastReport(null, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py)));
};
px = (px + (_arg1.dx * next_y));
py = (py + (_arg1.dy * next_y));
py = (py - (dir_y * g.scale));
if (TileMaker.isBlock(_arg2[map_y][map_x])){
return (new RayCastReport(null, map_x, map_y, ((map_x * g.scale) + px), ((map_y * g.scale) + py)));
};
};
i++;
};
return (null);
}
}
}//package com.nitrome.engine_specific
Section 36
//RayCastReport (com.nitrome.engine_specific.RayCastReport)
package com.nitrome.engine_specific {
public class RayCastReport {
public var found:Boolean;
public var block:Block;
public var access_side:int;
public var
:Number;
public var :Number;
public var map_x:int;
public var map_y:int;
public var ax:Number;
public var ay:Number;
public var exit_side:int;
public function RayCastReport(_arg1=null, _arg2=0, _arg3=0, _arg4=0, _arg5=0, _arg6=0, _arg7=false){
this.block = _arg1;
this.map_x = _arg2;
this.map_y = _arg3;
this.ax = _arg4;
this.ay = _arg5;
this.access_side = _arg6;
this.found = _arg7;
}
}
}//package com.nitrome.engine_specific
Section 37
//Rope (com.nitrome.engine_specific.Rope)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
public class Rope extends Spring {
public var unwrap_y:Number;
public var unwrap_x:Number;
public var block:Block;
public var from:int;// = 0
public static const DOWN_LEFT:int = 4;
public static const UP_RIGHT:int = 2;
public static const UP_LEFT:int = 1;
public static const DOWN_RIGHT:int = 8;
public function Rope(_arg1:Dot, _arg2:Dot){
from = 0;
super(_arg1, _arg2);
}
}
}//package com.nitrome.engine_specific
Section 38
//RopeAnchor (com.nitrome.engine_specific.RopeAnchor)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class RopeAnchor extends Star {
public const SPEED:Number = 32;
public var locked:Boolean;
public var :Boolean;
public var rope:Rope;
public function RopeAnchor(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Sprite, _arg6:Game){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
locked = false;
= true;
= true;
rope = new Rope(this, _arg6.player);
}
public function convertToStar():void{
var _local1:Star;
_local1 = g.player.addStar(x, y, dx, dy);
mc.parent.removeChild(mc);
active = false;
g.player.anchor = null;
if (locked){
_local1.stick();
};
}
override public function pin():void{
x = (px = ix);
y = (px = iy);
}
override public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
override protected function anchor(_arg1:Block):void{
var _local2:Number;
var _local3:Number;
var _local4:Rect;
var _local5:*;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
_local2 = (x - px);
_local3 = (y - py);
dx = (dy = 0);
_local4 = new Rect(0, 0, 0, 0);
_local4.x = Math.min(x, px);
_local4.y = Math.min(y, py);
_local4.width = Math.abs((x - px));
_local4.height = Math.abs((y - py));
_local5 = _local4.intersection(_arg1);
_local6 = 0;
_local7 = 0;
if (_local2 != 0){
_local6 = (Math.min(Math.abs(_local2), _local5.width) * ((_local2 > 0)) ? 1 : -1);
};
if (_local3 != 0){
_local7 = (Math.min(Math.abs(_local3), _local5.height) * ((_local3 > 0)) ? 1 : -1);
};
x = (x - _local6);
y = (y - _local7);
_local8 = _arg1.sideOf(x, y);
if ((_arg1.stacked & _local8)){
if ((((_local8 == Rect.UP)) || ((_local8 == Rect.DOWN)))){
if (x < (_arg1.x + (_arg1.width * 0.5))){
x = (_arg1.x - 1);
_local8 = Rect.LEFT;
if ((_arg1.stacked & Rect.LEFT)){
if (y < (_arg1.y + (_arg1.height * 0.5))){
y = (_arg1.y - 1);
_local8 = Rect.UP;
} else {
y = (_arg1.y + _arg1.height);
_local8 = Rect.DOWN;
};
};
} else {
x = (_arg1.x + _arg1.width);
_local8 = Rect.RIGHT;
if ((_arg1.stacked & Rect.RIGHT)){
if (y < (_arg1.y + (_arg1.height * 0.5))){
y = (_arg1.y - 1);
_local8 = Rect.UP;
} else {
y = (_arg1.y + _arg1.height);
_local8 = Rect.DOWN;
};
};
};
} else {
if ((((_local8 == Rect.RIGHT)) || ((_local8 == Rect.LEFT)))){
if (y < (_arg1.y + (_arg1.height * 0.5))){
y = (_arg1.y - 1);
_local8 = Rect.UP;
if ((_arg1.stacked & Rect.UP)){
if (x < (_arg1.x + (_arg1.width * 0.5))){
x = (_arg1.x - 1);
_local8 = Rect.LEFT;
} else {
x = (_arg1.x + _arg1.width);
_local8 = Rect.RIGHT;
};
};
} else {
y = (_arg1.y + _arg1.height);
_local8 = Rect.DOWN;
if ((_arg1.stacked & Rect.DOWN)){
if (x < (_arg1.x + (_arg1.width * 0.5))){
x = (_arg1.x - 1);
_local8 = Rect.LEFT;
} else {
x = (_arg1.x + _arg1.width);
_local8 = Rect.RIGHT;
};
};
};
};
};
} else {
if (_local8 == Rect.LEFT){
x = (_arg1.x - 1);
} else {
if (_local8 == Rect.UP){
y = (_arg1.y - 1);
};
};
};
pinTo(x, y);
rope.updateLine();
if (!_arg1.attachable){
kill();
g.player.hit();
return;
};
if (_arg1.force_field){
kill();
return;
};
if (((g.mouse_pressed) && ((RayCast.cast(rope, g.block_map) == null)))){
locked = true;
g.player.createRope();
} else {
kill();
return;
};
_local9 = (mc as LiveStar).star.currentFrame;
mc.parent.removeChild(mc);
mc = new DeadStar();
(mc as DeadStar).init(_local9);
g.dead_star_holder.addChild(mc);
updateMC();
}
override public function main():void{
if (((active) && (!(locked)))){
move();
if (!g.scroller.contains(x, y)){
kill();
return;
};
encounterCollision();
if (!active){
return;
};
blockCollision();
updateMC();
rope.updateLine();
if (((((!(locked)) && ((rope.len > 0)))) && (!((RayCast.cast(rope, g.block_map) == null))))){
convertToStar();
return;
};
};
}
override public function kill():void{
(mc as DeadStar).kill();
active = false;
g.player.anchor = null;
}
public function pinTo(_arg1:Number, _arg2:Number):void{
this.x = (ix = (px = (temp_x = _arg1)));
this.y = (iy = (py = (temp_y = _arg2)));
locked = true;
}
}
}//package com.nitrome.engine_specific
Section 39
//SecurityField (com.nitrome.engine_specific.SecurityField)
package com.nitrome.engine_specific {
import flash.display.*;
public class SecurityField extends EncounterBlock {
public const ACTIVE:int = 2;
public const INACTIVE:int = 1;
public var state:int;
public function SecurityField(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2);
if (_arg2.alert_state == _arg2.INACTIVE){
state = INACTIVE;
(_arg1 as MovieClip).gotoAndStop("inactive");
} else {
if (_arg2.alert_state == _arg2.ACTIVE){
state = ACTIVE;
(_arg1 as MovieClip).gotoAndStop("active");
};
};
}
override public function alert():void{
state = ACTIVE;
(mc as MovieClip).gotoAndStop("active");
}
override public function standdown():void{
state = INACTIVE;
(mc as MovieClip).gotoAndStop("inactive");
}
override public function unpause():void{
if (g.alert_state == g.INACTIVE){
(mc as MovieClip).gotoAndStop("inactive");
} else {
if (g.alert_state == g.ACTIVE){
(mc as MovieClip).gotoAndStop("active");
};
};
}
}
}//package com.nitrome.engine_specific
Section 40
//SkipStoryButton (com.nitrome.engine_specific.SkipStoryButton)
package com.nitrome.engine_specific {
import flash.display.*;
import flash.events.*;
import com.nitrome.game.*;
public class SkipStoryButton extends Sprite {
var active:Boolean;// = true
public function SkipStoryButton(){
active = true;
super();
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
public function clearListeners():void{
active = false;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(MouseEvent.CLICK, onClick);
}
public function onEnterFrame(_arg1:Event):void{
if (((Key.key_pressed) && (active))){
clearListeners();
NitromeGame.transition.doTween("game");
};
}
public function onClick(_arg1:MouseEvent):void{
if (active){
clearListeners();
NitromeGame.transition.doTween("game");
};
}
}
}//package com.nitrome.engine_specific
Section 41
//Sniper (com.nitrome.engine_specific.Sniper)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Sniper extends Encounter {
public var :SniperSight;
public var collision_rect:Rect;
public function Sniper(_arg1:Sprite, _arg2:Game){
var _local3:Boolean;
var _local4:int;
super(_arg1, _arg2, false);
collision_rect = new Rect((_arg1.x + 5), (_arg1.y + 10), 46, 46);
map_x = (init_x = ((_arg1.x * _arg2.SCALE) >> 0));
map_y = (init_x = ((_arg1.y * _arg2.SCALE) >> 0));
_local3 = false;
_local4 = 0;
while (_local4 < _arg2.encounters.length) {
if ((((((_arg2.encounters[_local4].map_x == init_x)) && ((_arg2.encounters[_local4].map_y == init_y)))) && (!((_arg2.encounters[_local4] == this))))){
if ((_arg2.encounters[_local4] is SniperSight)){
= _arg2.encounters[_local4];
_local3 = true;
break;
};
};
_local4++;
};
if (!_local3){
();
};
reward = new HiddenInt(70);
}
override public function remove():void{
if (active){
active = false;
g.scroller.map_array_layers[layer][init_y][init_x] = tile_id;
};
}
public function ():void{
var _local1:MovieClip;
_local1 = new SightMC();
_local1.blendMode = BlendMode.SCREEN;
_local1.gotoAndStop(1);
_local1.x = (collision_rect.x + (collision_rect.width * 0.5));
_local1.y = (collision_rect.y + (collision_rect.height * 0.5));
g.light_holder.addChild(_local1);
= new SniperSight(_local1, g);
.map_x = init_x;
.map_y = init_y;
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
public function kill(_arg1:Number):void{
var _local2:MovieClip;
if (!active){
return;
};
active = false;
NitromeGame.bonus.buddha.value = 0;
_local2 = new BangSmallMC();
_local2.x = (collision_rect.x + (collision_rect.width * 0.5));
_local2.y = (collision_rect.y + (collision_rect.height * 0.5));
.kill();
g.explosion_holder.addChild(_local2);
g.scroller.map_array_layers[layer][map_y][map_x] = 0;
g.addDebris(_local2.x, _local2.y, ((_arg1 > 0)) ? 10 : -10, "BorgDebris1", "BorgDebris2", "BorgDebris3");
}
override public function resolveWeaponCollision(_arg1:Star):void{
if (!spawned){
g.addScore(reward.value);
} else {
g.addScore((reward.value / 10));
};
NitromeGame.sound_manager.playSound("smithdie");
kill((_arg1.x - _arg1.px));
}
}
}//package com.nitrome.engine_specific
Section 42
//SniperSight (com.nitrome.engine_specific.SniperSight)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class SniperSight extends Encounter {
private var fade:Boolean;
public var :Boolean;
public var player:Player;
public var
:int;
public var :Line;
public static const SIGHT_STEP:int = 5;
public static const SPEED:int = 7;
public function SniperSight(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2, true);
has_main = true;
= false;
if (_arg2.player != null){
= new Line(new Dot(_arg1.x, _arg1.y), _arg2.player);
};
}
override public function intersects(_arg1:Rect):Boolean{
return (_arg1.intersectsCircle(mc.x, mc.y, 20));
}
public function main():void{
if (fade){
if (mc.alpha > 0){
mc.alpha = (mc.alpha - 0.2);
} else {
active = false;
return;
};
return;
};
if (! ){
= 0;
(mc as MovieClip).gotoAndStop(1);
};
if ( != null){
move();
} else {
if (g.player != null){
= new Line(new Dot(mc.x, mc.y), g.player);
};
};
= false;
}
override public function resolvePlayerCollision(_arg1:Player):void{
var _local2:MovieClip;
if (_arg1.state == Player.STEALTH){
return;
};
if (
< (SIGHT_STEP * 4)){
++;
= true;
if (
< SIGHT_STEP){
(mc as MovieClip).gotoAndStop(2);
} else {
if (
== SIGHT_STEP){
(mc as MovieClip).gotoAndStop(3);
} else {
if (
== (SIGHT_STEP * 2)){
(mc as MovieClip).gotoAndStop(4);
} else {
if (
== (SIGHT_STEP * 3)){
(mc as MovieClip).gotoAndStop(5);
};
};
};
};
} else {
_arg1.hit();
= 0;
(mc as MovieClip).gotoAndStop(1);
_local2 = new BangBigMC();
_local2.x = mc.x;
_local2.y = mc.y;
g.explosion_holder.addChild(_local2);
};
}
public function move():void{
.a.x = mc.x;
.a.y = mc.y;
if (((!((g.player.state == Player.STEALTH))) || (!(Util.onScreen(mc.x, mc.y, g, 10))))){
.updateLine();
};
if (.len > 10){
mc.x = (mc.x + (.dx * SPEED));
mc.y = (mc.y + (.dy * SPEED));
};
}
public function kill():void{
if (((fade) || (!(active)))){
return;
};
fade = true;
}
}
}//package com.nitrome.engine_specific
Section 43
//SpawnBlock (com.nitrome.engine_specific.SpawnBlock)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class SpawnBlock extends EncounterBlock {
public var state:int;
public var backing:Sprite;
public var :Clip;
public var :int;
public var spawn_id:int;
public static const SPAWN_TOTAL:int = 6;
public static const ACTIVE:int = 2;
public static const INACTIVE:int = 1;
public function SpawnBlock(_arg1:Sprite, _arg2:Game){
super(_arg1, _arg2);
spawn = true;
state = _arg2.alert_state;
= SPAWN_TOTAL;
if (state == ACTIVE){
(_arg1 as MovieClip).gotoAndStop("active");
has_main = true;
} else {
if (state == INACTIVE){
(_arg1 as MovieClip).gotoAndStop("inactive");
};
};
}
override public function remove():void{
if (active){
active = false;
g.scroller.map_array_layers[layer][map_y][map_x] = tile_id;
if (backing.parent != null){
backing.parent.removeChild(backing);
};
};
}
public function main():void{
if (((( > 0)) && (((( == null)) || (((!(( == null))) && (!(( as Encounter).active)))))))){
g.scroller.changeLayer(Scroller.ENCOUNTER_LAYER);
g.scroller.map_array[map_y][map_x] = spawn_id;
g.scroller.tile_maker.mapElement(map_x, map_y);
= g.encounters[(g.encounters.length - 1)];
( as Encounter).spawned = true;
--;
};
}
override public function alert():void{
(mc as MovieClip).gotoAndPlay("activating");
has_main = true;
= SPAWN_TOTAL;
}
override public function standdown():void{
(mc as MovieClip).gotoAndPlay("deactivating");
has_main = false;
= null;
}
}
}//package com.nitrome.engine_specific
Section 44
//Spider (com.nitrome.engine_specific.Spider)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Spider extends Encounter {
public var state:int;
public var best_node:Node;
public var :Sprite;
public var dir:int;
public var r:Number;
public var nodes:Array;
public var best_h:int;
public var collision_rect:Rect;
public var angle:Number;
public static const TURNING:int = 2;
public static const UP_ID:int = 369;
public static const SPEED:Number = 8;
public static const DOWN:int = 4;
public static const TURN_SPEED:Number = 6;
public static const RIGHT_ID:int = 360;
public static const DOWN_ID:int = 335;
public static const LEFT_ID:int = 370;
public static const MOVING:int = 1;
public static const UP:int = 1;
public static const RIGHT:int = 2;
public static const LEFT:int = 8;
public function Spider(_arg1:int, _arg2:MovieClip, _arg3:Game){
super(_arg2, _arg3, true);
has_main = true;
has_collision = true;
this.dir = _arg1;
map_x = ((x * _arg3.SCALE) >> 0);
map_y = ((y * _arg3.SCALE) >> 0);
nodes = new Array();
nodes[0] = new Node();
nodes[1] = new Node();
nodes[2] = new Node();
nodes[3] = new Node();
if ((((_arg3.alert_state == _arg3.INACTIVE)) || ((_arg3.player == null)))){
selectPatrolPath();
} else {
selectSeekPath();
};
state = MOVING;
if (this.dir == DOWN){
_arg2.rotation = (angle = 90);
} else {
if (this.dir == RIGHT){
_arg2.rotation = (angle = 0);
} else {
if (this.dir == UP){
_arg2.rotation = (angle = -90);
} else {
if (this.dir == LEFT){
_arg2.rotation = (angle = 180);
};
};
};
};
collision_rect = new Rect((x - 16), (y - 16), 32, 32);
= new SpiderBallMC();
.rotation = -(_arg2.rotation);
_arg2.addChildAt(, 0);
reward = new HiddenInt(10);
}
override public function contains(_arg1:Number, _arg2:Number):Boolean{
return (collision_rect.contains(_arg1, _arg2));
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
override public function intersects(_arg1:Rect):Boolean{
return (collision_rect.intersects(_arg1));
}
public function main():void{
if (!g.scroller.contains(x, y)){
remove();
return;
};
if (state == MOVING){
move();
if ((((dir == UP)) || ((dir == DOWN)))){
if (((y - 32) * g.SCALE) == map_y){
if (g.alert_state == g.ACTIVE){
selectSeekPath();
} else {
if (g.alert_state == g.INACTIVE){
selectPatrolPath();
};
};
};
} else {
if ((((dir == LEFT)) || ((dir == RIGHT)))){
if (((x - 32) * g.SCALE) == map_x){
if (g.alert_state == g.ACTIVE){
selectSeekPath();
} else {
if (g.alert_state == g.INACTIVE){
selectPatrolPath();
};
};
};
};
};
} else {
if (state == TURNING){
if (Math.abs((angle - mc.rotation)) <= TURN_SPEED){
mc.rotation = angle;
state = MOVING;
} else {
r = mc.rotation;
r = (r + ((Math.abs((angle - r)))>180) ? ((r)<angle) ? 360 : -(360) : 0);
r = (r + (((angle - r) > 0)) ? TURN_SPEED : -(TURN_SPEED));
mc.rotation = r;
.rotation = -(mc.rotation);
};
};
};
updateMC();
updateCollisionRect();
}
public function selectPatrolPath():void{
if ((((dir == UP)) || ((dir == DOWN)))){
if (dir == UP){
if ((((map_y == 0)) || (!((((g.block_map[(map_y - 1)][map_x] == 0)) || ((g.block_map[(map_y - 1)][map_x] == null))))))){
dir = DOWN;
tile_id = DOWN_ID;
angle = 90;
state = TURNING;
mc.rotation = (mc.rotation + 1);
};
} else {
if (dir == DOWN){
if ((((map_y == (g.scroller.height - 1))) || (!((((g.block_map[(map_y + 1)][map_x] == 0)) || ((g.block_map[(map_y + 1)][map_x] == null))))))){
dir = UP;
tile_id = UP_ID;
angle = -90;
state = TURNING;
};
};
};
} else {
if ((((dir == RIGHT)) || ((dir == LEFT)))){
if (dir == LEFT){
if ((((map_x == 0)) || (!((((g.block_map[map_y][(map_x - 1)] == 0)) || ((g.block_map[map_y][(map_x - 1)] == null))))))){
dir = RIGHT;
tile_id = RIGHT_ID;
angle = 0;
state = TURNING;
mc.rotation = (mc.rotation + 1);
};
} else {
if (dir == RIGHT){
if ((((map_x == (g.scroller.width - 1))) || (!((((g.block_map[map_y][(map_x + 1)] == 0)) || ((g.block_map[map_y][(map_x + 1)] == null))))))){
dir = LEFT;
tile_id = LEFT_ID;
angle = 180;
state = TURNING;
};
};
};
};
};
}
override public function resolvePlayerCollision(_arg1:Player):void{
_arg1.hit();
kill();
}
public function selectSeekPath():void{
var _local1:int;
best_h = int.MAX_VALUE;
nodes[3].x = map_x;
nodes[3].y = (map_y - 1);
nodes[3].walkable = (((map_y > 0)) && ((((g.block_map[nodes[3].y][nodes[3].x] == 0)) || ((g.block_map[nodes[3].y][nodes[3].x] == null)))));
nodes[3].setH(g.player.map_x, g.player.map_y);
nodes[0].x = (map_x + 1);
nodes[0].y = map_y;
nodes[0].walkable = (((map_x < (g.scroller.width - 1))) && ((((g.block_map[nodes[0].y][nodes[0].x] == 0)) || ((g.block_map[nodes[0].y][nodes[0].x] == null)))));
nodes[0].setH(g.player.map_x, g.player.map_y);
nodes[1].x = map_x;
nodes[1].y = (map_y + 1);
nodes[1].walkable = (((map_y < (g.scroller.height - 1))) && ((((g.block_map[nodes[1].y][nodes[1].x] == 0)) || ((g.block_map[nodes[1].y][nodes[1].x] == null)))));
nodes[1].setH(g.player.map_x, g.player.map_y);
nodes[2].x = (map_x - 1);
nodes[2].y = map_y;
nodes[2].walkable = (((map_x > 0)) && ((((g.block_map[nodes[2].y][nodes[2].x] == 0)) || ((g.block_map[nodes[2].y][nodes[2].x] == null)))));
nodes[2].setH(g.player.map_x, g.player.map_y);
_local1 = 0;
while (_local1 < nodes.length) {
if (((nodes[_local1].walkable) && ((nodes[_local1].h < best_h)))){
best_h = nodes[_local1].h;
best_node = nodes[_local1];
};
_local1++;
};
if (best_node.y < map_y){
if (dir != UP){
dir = UP;
tile_id = UP_ID;
angle = -90;
state = TURNING;
};
} else {
if (best_node.x > map_x){
if (dir != RIGHT){
dir = RIGHT;
tile_id = RIGHT_ID;
angle = 0;
state = TURNING;
};
} else {
if (best_node.y > map_y){
if (dir != DOWN){
dir = DOWN;
tile_id = DOWN_ID;
angle = 90;
state = TURNING;
};
} else {
if (best_node.x < map_x){
if (dir != LEFT){
dir = LEFT;
tile_id = LEFT_ID;
angle = 180;
state = TURNING;
};
};
};
};
};
}
public function kill():void{
var _local1:MovieClip;
if (!active){
return;
};
active = false;
NitromeGame.bonus.buddha.value = 0;
_local1 = new BangSmallMC();
_local1.x = mc.x;
_local1.y = mc.y;
g.explosion_holder.addChild(_local1);
}
override public function resolveWeaponCollision(_arg1:Star):void{
if (!spawned){
g.addScore(reward.value);
} else {
g.addScore((reward.value / 10));
};
kill();
}
public function updateCollisionRect():void{
collision_rect.x = (x - 16);
collision_rect.y = (y - 16);
}
public function move():void{
if (dir == UP){
y = (y - SPEED);
} else {
if (dir == RIGHT){
x = (x + SPEED);
} else {
if (dir == LEFT){
x = (x - SPEED);
} else {
if (dir == DOWN){
y = (y + SPEED);
};
};
};
};
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
}
}
}//package com.nitrome.engine_specific
Section 45
//Spot (com.nitrome.engine_specific.Spot)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Spot extends Encounter {
public var state:int;
private var beam:SpotBeam;
public static const WARM_UP_STEP:Number = 0.2;
public static const INACTIVE:int = 1;
public static const ACTIVE:int = 2;
public function Spot(_arg1:Sprite, _arg2:Game){
var _local3:Sprite;
super(_arg1, _arg2, false);
_arg1.blendMode = BlendMode.LIGHTEN;
has_main = true;
_local3 = new SpotBeamMC();
_local3.blendMode = BlendMode.LIGHTEN;
_local3.x = (_arg1 as MovieClip).spot.x;
_local3.y = (_arg1 as MovieClip).spot.y;
_arg2.light_holder.addChild(_local3);
beam = new SpotBeam(_local3, _arg2);
state = _arg2.alert_state;
if (state == ACTIVE){
_arg1.alpha = 0;
};
}
override public function remove():void{
if (active){
active = false;
g.scroller.map_array_layers[layer][map_y][map_x] = tile_id;
beam.fade = true;
beam.has_main = true;
};
}
override public function intersects(_arg1:Rect):Boolean{
return (_arg1.intersectsCircle((mc.x + (mc as MovieClip).spot.x), (mc.y + (mc as MovieClip).spot.y), 30));
}
public function main():void{
if ((((state == INACTIVE)) && ((mc.alpha < 1)))){
mc.alpha = (mc.alpha + WARM_UP_STEP);
} else {
if ((((state == ACTIVE)) && ((mc.alpha > 0)))){
mc.alpha = (mc.alpha - WARM_UP_STEP);
};
};
beam.mc.x = (mc.x + (mc as MovieClip).spot.x);
beam.mc.y = (mc.y + (mc as MovieClip).spot.y);
}
override public function resolvePlayerCollision(_arg1:Player):void{
if ((((mc.alpha < 1)) || ((_arg1.state == Player.STEALTH)))){
return;
};
g.alert();
}
override public function alert():void{
state = ACTIVE;
}
override public function standdown():void{
state = INACTIVE;
}
}
}//package com.nitrome.engine_specific
Section 46
//SpotBeam (com.nitrome.engine_specific.SpotBeam)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class SpotBeam extends Encounter {
public var fade:Boolean;// = false
public var state:int;
public static const WARM_UP_STEP:Number = 0.2;
public static const INACTIVE:int = 1;
public static const ACTIVE:int = 2;
public function SpotBeam(_arg1:Sprite, _arg2:Game){
fade = false;
super(_arg1, _arg2, true);
has_collision = false;
free = true;
has_main = true;
_arg1.alpha = 0;
state = _arg2.alert_state;
if (state == ACTIVE){
_arg1.alpha = 0;
};
}
public function main():void{
if (!fade){
if (state == INACTIVE){
if (mc.alpha < 1){
mc.alpha = (mc.alpha + WARM_UP_STEP);
} else {
has_main = false;
};
} else {
if (state == ACTIVE){
if (mc.alpha > 0){
mc.alpha = (mc.alpha - WARM_UP_STEP);
} else {
has_main = false;
};
};
};
} else {
if (mc.alpha > 0){
mc.alpha = (mc.alpha - 0.2);
} else {
active = false;
};
};
}
override public function alert():void{
state = ACTIVE;
has_main = true;
}
override public function standdown():void{
state = INACTIVE;
has_main = true;
}
}
}//package com.nitrome.engine_specific
Section 47
//Star (com.nitrome.engine_specific.Star)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class Star extends Dot {
public var active:Boolean;
public var px:Number;
public var :Array;
public var py:Number;
public var dx:Number;
public var mc:Sprite;
public var dy:Number;
public var speed:Number;// = 32
public var temp_x:Number;
public var temp_y:Number;
public var map_y:int;
public var map_x:int;
public var dead:Boolean;
public var g:Game;
public var i:int;
public var j:int;
public var :Boolean;// = false
public static const SPEED:Number = 32;
public function Star(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Sprite, _arg6:Game){
speed = 32;
= false;
super(_arg1, _arg2);
this.mc = _arg5;
this.g = _arg6;
this.dx = _arg3;
this.dy = _arg4;
px = (ix = _arg1);
py = (iy = _arg2);
= new Array();
.push(new Dot(_arg1, _arg2));
.push(new Dot(_arg1, _arg2));
.push(new Dot(_arg1, _arg2));
active = true;
dead = false;
}
public function stick():void{
var _local1:int;
active = false;
_local1 = (mc as LiveStar).star.currentFrame;
mc.parent.removeChild(mc);
mc = new DeadStar();
(mc as DeadStar).init(_local1);
g.dead_star_holder.addChild(mc);
updateMC();
}
protected function blockCollision():void{
var _local1:int;
_local1 = 0;
while (_local1 < .length) {
map_x = (([_local1].x * g.SCALE) >> 0);
map_y = (([_local1].y * g.SCALE) >> 0);
if (((((isNaN(g.block_map[map_y][map_x])) && (!((g.block_map[map_y][map_x] == null))))) && (g.block_map[map_y][map_x].block))){
x = [_local1].x;
y = [_local1].y;
anchor(g.block_map[map_y][map_x].b);
if (){
NitromeGame.sound_manager.playSound("star_hit");
};
return;
};
_local1++;
};
map_x = ((x * g.SCALE) >> 0);
map_y = ((y * g.SCALE) >> 0);
if (((((isNaN(g.block_map[map_y][map_x])) && (!((g.block_map[map_y][map_x] == null))))) && (g.block_map[map_y][map_x].block))){
anchor(g.block_map[map_y][map_x].b);
if (){
NitromeGame.sound_manager.playSound("star_hit");
};
};
}
public function erase():void{
mc.parent.removeChild(mc);
active = false;
dead = true;
}
public function updateMC():void{
mc.x = (x >> 0);
mc.y = (y >> 0);
}
protected function anchor(_arg1:Block):void{
var _local2:Number;
var _local3:Number;
var _local4:Rect;
var _local5:*;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:int;
_local2 = (x - px);
_local3 = (y - py);
_local4 = new Rect(0, 0, 0, 0);
_local4.x = Math.min(x, px);
_local4.y = Math.min(y, py);
_local4.width = Math.abs((x - px));
_local4.height = Math.abs((y - py));
_local5 = _local4.intersection(_arg1);
_local6 = 0;
_local7 = 0;
if (_local2 != 0){
_local6 = (Math.min(Math.abs(_local2), _local5.width) * ((_local2 > 0)) ? 1 : -1);
};
if (_local3 != 0){
_local7 = (Math.min(Math.abs(_local3), _local5.height) * ((_local3 > 0)) ? 1 : -1);
};
x = (x - _local6);
y = (y - _local7);
_local8 = _arg1.sideOf(x, y);
if ((_arg1.stacked & _local8)){
if ((((_local8 == Rect.UP)) || ((_local8 == Rect.DOWN)))){
if (x < (_arg1.x + (_arg1.width * 0.5))){
x = (_arg1.x - 1);
_local8 = Rect.LEFT;
} else {
x = (_arg1.x + _arg1.width);
_local8 = Rect.RIGHT;
};
} else {
if ((((_local8 == Rect.RIGHT)) || ((_local8 == Rect.LEFT)))){
if (y < (_arg1.y + (_arg1.height * 0.5))){
y = (_arg1.y - 1);
_local8 = Rect.UP;
} else {
y = (_arg1.y + _arg1.height);
_local8 = Rect.DOWN;
};
};
};
} else {
if (_local8 == Rect.LEFT){
x = (_arg1.x - 1);
} else {
if (_local8 == Rect.UP){
y = (_arg1.y - 1);
};
};
};
active = false;
_local9 = (mc as LiveStar).star.currentFrame;
mc.parent.removeChild(mc);
mc = new DeadStar();
(mc as DeadStar).init(_local9);
g.dead_star_holder.addChild(mc);
updateMC();
if (_arg1.force_field){
kill();
};
}
public function main():void{
if (active){
move();
if (!g.scroller.contains(x, y)){
erase();
};
if (active){
encounterCollision();
blockCollision();
updateMC();
};
};
}
protected function encounterCollision():void{
j = 0;
while (j < .length) {
i = 0;
while (i < g.encounters.length) {
if (!g.encounters[i].has_collision){
} else {
if (g.encounters[i].contains([j].x, [j].y)){
x = [j].x;
y = [j].y;
g.encounters[i].resolveWeaponCollision(this);
kill();
return;
};
};
i++;
};
j++;
};
i = 0;
while (i < g.encounters.length) {
if (!g.encounters[i].has_collision){
} else {
if (g.encounters[i].contains(x, y)){
g.encounters[i].resolveWeaponCollision(this);
kill();
return;
};
};
i++;
};
}
protected function move():void{
var _local1:int;
px = x;
py = y;
_local1 = 0;
while (_local1 < .length) {
[_local1].x = (x + (((dx * SPEED) * 0.25) * (_local1 + 1)));
[_local1].y = (y + (((dy * SPEED) * 0.25) * (_local1 + 1)));
_local1++;
};
x = (x + (dx * SPEED));
y = (y + (dy * SPEED));
}
public function kill():void{
(mc as DeadStar).kill();
active = false;
dead = true;
}
}
}//package com.nitrome.engine_specific
Section 48
//TileMaker (com.nitrome.engine_specific.TileMaker)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
import flash.utils.*;
public class TileMaker {
private var i:int;
public var g:Game;
public var :Array;
public var s:Scroller;
public var :Boolean;
private static const DOWN:int = 4;
private static const RIGHT:int = 2;
private static const LEFT:int = 8;
private static const EMPTY:int = 1;
private static const IN_PLAY:int = 2;
private static const UP:int = 1;
public function TileMaker(_arg1:Game, _arg2:Scroller){
this.g = _arg1;
this.s = _arg2;
= new Array("", "InfoMC", "BlockMC1", "BlockMC2", "BlockMC3", "BlockMC4", "BlockMC5", "BlockMC6", "BlockMC7", "BlockMC8", "BlockMC9", "BlockMC10", "BlockMC11", "BlockMC12", "BlockMC13", "BlockMC14", "BlockMC15", "BlockMC16", "BlockMC17", "BlockMC18", "BlockMC19", "BlockMC20", "BlockMC21", "BlockMC22", "BlockMC23", "BlockMC24", "BlockMC25", "BlockMC26", "BlockMC27", "BlockMC28", "BlockMC29", "BlockMC30", "BlockMC31", "BlockMC32", "BlockMC33", "BlockMC34", "BlockMC35", "BlockMC36", "BlockMC37", "BlockMC38", "BlockMC39", "BlockMC40", "BlockMC41", "BlockMC42", "BlockMC43", "BlockMC44", "BlockMC45", "BlockMC46", "BlockMC47", "BlockMC48", "BlockMC49", "BlockMC50", "BlockMC51", "BlockMC52", "BlockMC53", "BlockMC54", "BlockMC55", "BlockMC56", "BlockMC57", "BlockMC58", "BlockMC59", "BlockMC60", "BlockMC61", "BlockMC62", "BlockMC63", "BlockMC64", "BlockMC65", "BlockMC66", "BlockMC67", "BlockMC68", "BlockMC69", "BlockMC70", "BlockMC71", "BlockMC72", "BlockMC73", "BlockMC74", "BlockMC75", "BlockMC76", "BlockMC77", "BlockMC78", "BlockMC79", "BlockMC80", "BlockMC81", "BlockMC82", "BlockMC83", "BlockMC84", "BlockMC85", "BlockMC86", "BlockMC87", "BlockMC88", "BlockMC89", "BlockMC90", "BlockMC91", "BlockMC92", "BlockMC93", "BlockMC94", "BlockMC95", "BlockMC96", "BlockMC97", "BlockMC98", "BlockMC99", "BlockMC100", "BlockMC101", "BlockMC102", "BlockMC103", "BlockMC104", "BlockMC105", "", "", "", "", "", "", "", "", "", "", "BlockMC106", "BlockMC107", "BlockMC108", "BlockMC109", "BlockMC110", "BlockMC111", "BlockMC112", "BlockMC113", "BlockMC114", "BackMC1", "BackMC2", "BackMC3", "BackMC4", "BackMC5", "BackMC6", "BackMC7", "BackMC8", "BackMC9", "BackMC10", "BackMC11", "BackMC12", "BackMC13", "BackMC14", "BackMC15", "BackMC16", "BackMC17", "BackMC18", "BackMC19", "BackMC20", "BackMC21", "BackMC22", "BackMC23", "BackMC24", "BackMC25", "BackMC26", "BackMC27", "BackMC28", "BackMC29", "BackMC30", "BackMC31", "BackMC32", "BackMC33", "BackMC34", "BackMC35", "BackMC36", "BackMC37", "BackMC38", "BackMC39", "BackMC40", "BackMC41", "BackMC42", "BackMC43", "BackMC44", "BackMC45", "BackMC46", "BackMC47", "BackMC48", "BackMC49", "BackMC50", "BackMC51", "BackMC52", "BackMC53", "BackMC54", "BackMC55", "BackMC56", "BackMC57", "BackMC58", "BackMC59", "BackMC60", "BackMC61", "BackMC62", "BackMC63", "BackMC64", "BackMC65", "BackMC66", "BackMC67", "BackMC68", "BackMC69", "BackMC70", "BackMC71", "BackMC72", "BackMC73", "BackMC74", "BackMC75", "BackMC76", "BackMC77", "BackMC78", "BackMC79", "BackMC80", "BackMC81", "BackMC82", "BackMC83", "SignMC1", "SignMC2", "SignMC3", "SignMC4", "SignMC5", "SignMC6", "SignMC7", "SignMC8", "SignMC9", "SignMC10", "SignMC11", "SignMC12", "SignMC13", "SignMC14", "SignMC15", "SignMC16", "SignMC17", "SignMC18", "SignMC19", "SignMC20", "SignMC21", "SignMC22", "SignMC23", "SignMC24", "SignMC25", "SignMC26", "SignMC27", "SignMC28", "SignMC29", "SignMC30", "SignMC31", "SignMC32", "SignMC33", "SignMC34", "SignMC35", "SignMC36", "SignMC37", "SignMC38", "SignMC39", "SignMC40", "SignMC41", "SignMC42", "SignMC43", "SignMC44", "SignMC45", "SignMC46", "SignMC47", "SignMC48", "SignMC49", "SignMC50", "SignMC51", "SignMC52", "SignMC53", "SignMC54", "SignMC55", "SignMC56", "SignMC57", "SignMC58", "SignMC59", "SignMC60", "SignMC61", "SignMC62", "SignMC63", "SignMC64", "SignMC65", "SignMC66", "SignMC67", "SignMC68", "SignMC69", "SignMC70", "SignMC71", "SignMC72", "SignMC73", "SignMC74", "SignMC75", "SignMC76", "SignMC77", "SignMC78", "SignMC79", "SignMC80", "SignMC81", "SignMC82", "SignMC83", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "SignMC83", "SignMC84", "SignMC85", "SignMC86", "SignMC87", "SignMC88", "SignMC89", "SignMC90", "SignMC91", "SignMC92", "ScannerMC", "DoorMC1", "DoorMC2", "GunBlockMC1", "GunBlockMC2", "GunBlockMC3", "GunBlockMC4", "LaserBlockMC1", "LaserBlockMC2", "LaserBlockMC3", "LaserBlockMC4", "BeamMC1", "BeamMC2", "BeamMC3", "BeamMC4", "SpiderMC", "ElectricBlockMC1", "ElectricBlockMC2", "ElectricBlockMC3", "ElectricBlockMC4", "ElectricBlockMC5", "ElectricBlockMC6", "ElectricBlockMC7", "ElectricBlockMC8", "ElectricBlockMC9", "ElectricBlockMC10", "ScannerMC1", "ScannerMC2", "ScannerMC3", "ScannerMC4", "ScannerMC5", "ScannerMC6", "ScannerMC7", "ScannerMC8", "ForceFieldMC1", "ForceFieldMC2", "BeamMC1", "BeamMC2", "BeamMC3", "BeamMC4", "SpiderMC", "DoorMC3", "DoorMC4", "SpawnMC1", "SpawnMC2", "FlyingGunMC", "FlyingGunMC", "FlyingGunMC", "FlyingGunMC", "SpiderMC", "SpiderMC", "SniperMC", "SpotMC1", "SpotMC2", "SpotMC3", "CoinMC", "HealthMC", "GunManMC", "GunManMC", "BladeManMC", "BladeManMC", "BossMC", "BossMC", "ArrowMC1", "ArrowMC2", "ArrowMC3", "ArrowMC4", "BlockMC115", "BlockMC116", "BlockMC117", "FinishMC", "ScannerMC5", "ScannerMC6", "ScannerMC7", "ScannerMC8");
i = 0;
while (i < .length) {
if ([i] != ""){
[i] = (getDefinitionByName([i]) as Class);
};
i++;
};
}
public function mapElement(_arg1:int, _arg2:int):Clip{
var _local3:int;
var _local4:*;
var _local5:Sprite;
_local3 = (_arg1 + (_arg2 * s.width));
= true;
if (s.map_array[_arg2][_arg1] >= 1){
_local5 = new ([s.map_array[_arg2][_arg1]]);
};
if (((((((!((_local5 == null))) && (!((((s.map_array[_arg2][_arg1] == 363)) || ((s.map_array[_arg2][_arg1] == 364))))))) && (!((((s.map_array[_arg2][_arg1] >= 372)) && ((s.map_array[_arg2][_arg1] <= 374))))))) && (!((((s.map_array[_arg2][_arg1] >= 381)) && ((s.map_array[_arg2][_arg1] <= 382))))))){
_local5.x = (_arg1 * s.scale);
_local5.y = (_arg2 * s.scale);
s.tiles.addChild(_local5);
};
if (s.map_array[_arg2][_arg1] == 1){
i = 0;
while (i < s.signage.length) {
if ((((s.signage[i].n == _local3)) && ((s.signage[i].layer == s.current_layer)))){
_local4 = new Info(s.signage[i].text, _local5, g);
break;
};
i++;
};
} else {
if ((((((((((s.map_array[_arg2][_arg1] > 1)) && ((s.map_array[_arg2][_arg1] <= 117)))) || ((((s.map_array[_arg2][_arg1] >= 327)) && ((s.map_array[_arg2][_arg1] <= 330)))))) || ((((s.map_array[_arg2][_arg1] >= 336)) && ((s.map_array[_arg2][_arg1] <= 345)))))) || ((((s.map_array[_arg2][_arg1] >= 387)) && ((s.map_array[_arg2][_arg1] <= 389)))))){
if ((((s.map_array[_arg2][_arg1] >= 336)) && ((s.map_array[_arg2][_arg1] <= 345)))){
_local4 = ("electric", _local5, _arg1, _arg2);
} else {
_local4 = ("static", _local5, _arg1, _arg2);
};
} else {
if ((((((s.map_array[_arg2][_arg1] >= 320)) && ((s.map_array[_arg2][_arg1] <= 382)))) || ((s.map_array[_arg2][_arg1] >= 390)))){
if ((((((((s.map_array[_arg2][_arg1] == 321)) || ((s.map_array[_arg2][_arg1] == 322)))) || ((s.map_array[_arg2][_arg1] == 361)))) || ((s.map_array[_arg2][_arg1] == 362)))){
_local4 = ("field_door", _local5, _arg1, _arg2);
} else {
if ((((s.map_array[_arg2][_arg1] >= 323)) && ((s.map_array[_arg2][_arg1] <= 326)))){
_local4 = ("gun", _local5, _arg1, _arg2);
if (s.map_array[_arg2][_arg1] == 323){
_local4.setDirection(UP);
} else {
if (s.map_array[_arg2][_arg1] == 324){
_local4.setDirection(RIGHT);
} else {
if (s.map_array[_arg2][_arg1] == 325){
_local4.setDirection(DOWN);
} else {
if (s.map_array[_arg2][_arg1] == 326){
_local4.setDirection(LEFT);
};
};
};
};
} else {
if ((((((s.map_array[_arg2][_arg1] >= 331)) && ((s.map_array[_arg2][_arg1] <= 334)))) || ((((s.map_array[_arg2][_arg1] >= 356)) && ((s.map_array[_arg2][_arg1] <= 359)))))){
((_local5 as MovieClip).beam);
if (s.map_array[_arg2][_arg1] <= 332){
_local4 = new Laser(false, new Rect(_local5.x, (_local5.y + 15), g.scale, (g.scale - 30)), (_local5 as MovieClip), g);
} else {
if ((((s.map_array[_arg2][_arg1] >= 356)) && ((s.map_array[_arg2][_arg1] <= 357)))){
_local4 = new Laser(true, new Rect(_local5.x, (_local5.y + 15), g.scale, (g.scale - 30)), (_local5 as MovieClip), g);
} else {
if ((((s.map_array[_arg2][_arg1] >= 333)) && ((s.map_array[_arg2][_arg1] <= 334)))){
_local4 = new Laser(false, new Rect((_local5.x + 15), _local5.y, (g.scale - 30), g.scale), (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] >= 358){
_local4 = new Laser(true, new Rect((_local5.x + 15), _local5.y, (g.scale - 30), g.scale), (_local5 as MovieClip), g);
};
};
};
};
} else {
if ((((((((s.map_array[_arg2][_arg1] == 335)) || ((s.map_array[_arg2][_arg1] == 360)))) || ((s.map_array[_arg2][_arg1] == 369)))) || ((s.map_array[_arg2][_arg1] == 370)))){
_local5.x = (_local5.x + 32);
_local5.y = (_local5.y + 32);
if (s.map_array[_arg2][_arg1] == 335){
_local4 = new Spider(Spider.DOWN, (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] == 360){
_local4 = new Spider(Spider.RIGHT, (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] == 369){
_local4 = new Spider(Spider.UP, (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] == 370){
_local4 = new Spider(Spider.LEFT, (_local5 as MovieClip), g);
};
};
};
};
} else {
if ((((((s.map_array[_arg2][_arg1] >= 346)) && ((s.map_array[_arg2][_arg1] <= 353)))) || ((((s.map_array[_arg2][_arg1] >= 391)) && ((s.map_array[_arg2][_arg1] <= 394)))))){
if (s.map_array[_arg2][_arg1] == 346){
_local4 = new TripWire(TripWire.FIXED, UP, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 347){
_local4 = new TripWire(TripWire.FIXED, RIGHT, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 348){
_local4 = new TripWire(TripWire.FIXED, DOWN, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 349){
_local4 = new TripWire(TripWire.FIXED, LEFT, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 350){
_local4 = new TripWire(TripWire.TURNING, UP, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 351){
_local4 = new TripWire(TripWire.TURNING, RIGHT, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 352){
_local4 = new TripWire(TripWire.TURNING, DOWN, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 353){
_local4 = new TripWire(TripWire.TURNING, LEFT, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 391){
_local4 = new TripWire(TripWire.TURNING, UP, _local5, g);
_local4.other_way = true;
_local4.getCurrentAngle();
} else {
if (s.map_array[_arg2][_arg1] == 392){
_local4 = new TripWire(TripWire.TURNING, RIGHT, _local5, g);
_local4.other_way = true;
_local4.getCurrentAngle();
} else {
if (s.map_array[_arg2][_arg1] == 393){
_local4 = new TripWire(TripWire.TURNING, DOWN, _local5, g);
_local4.other_way = true;
_local4.getCurrentAngle();
} else {
if (s.map_array[_arg2][_arg1] == 394){
_local4 = new TripWire(TripWire.TURNING, LEFT, _local5, g);
_local4.other_way = true;
_local4.getCurrentAngle();
};
};
};
};
};
};
};
};
};
};
};
};
} else {
if ((((s.map_array[_arg2][_arg1] == 354)) || ((s.map_array[_arg2][_arg1] == 355)))){
_local4 = new ForceField((_local5 as MovieClip), g);
_local4.b = new Block((_arg1 * g.scale), (_arg2 * g.scale), g.scale, g.scale);
if ((((((_arg2 > 0)) && (((isForceField(s.map_array[(_arg2 - 1)][_arg1])) || (isForceField(s.map_array[(_arg2 - 1)][_arg1])))))) || ((_arg2 == 0)))){
_local4.b.stack(UP);
};
if ((((((_arg1 < (s.width - 1))) && (((isForceField(s.map_array[_arg2][(_arg1 + 1)])) || (isForceField(s.map_array[_arg2][(_arg1 + 1)])))))) || ((_arg1 == (s.width - 1))))){
_local4.b.stack(RIGHT);
};
if ((((((_arg2 < (s.height - 1))) && (((isForceField(s.map_array[(_arg2 + 1)][_arg1])) || (isBlock(s.map_array[(_arg2 + 1)][_arg1])))))) || ((_arg2 == (s.height - 1))))){
_local4.b.stack(DOWN);
};
if ((((((_arg1 > 0)) && (((isForceField(s.map_array[_arg2][(_arg1 - 1)])) || (isBlock(s.map_array[_arg2][(_arg1 - 1)])))))) || ((_arg1 == 0)))){
_local4.b.stack(LEFT);
};
_local4.b.force_field = true;
if (g.alert_state == g.ACTIVE){
_local4.b.active = true;
} else {
if (g.alert_state == g.INACTIVE){
_local4.b.active = false;
};
};
((_local5 as MovieClip).field);
} else {
if ((((s.map_array[_arg2][_arg1] == 363)) || ((s.map_array[_arg2][_arg1] == 364)))){
_local5.x = (_arg1 * s.scale);
_local5.y = (_arg2 * s.scale);
g.spawn_holder.addChild(_local5);
_local4 = ("spawn", _local5, _arg1, _arg2);
if (s.map_array[_arg2][_arg1] == 363){
_local4.backing = new SpawnBackMC1();
} else {
if (s.map_array[_arg2][_arg1] == 364){
_local4.backing = new SpawnBackMC2();
};
};
_local4.backing.x = _local5.x;
_local4.backing.y = _local5.y;
g.background_holder.addChild(_local4.backing);
i = 0;
while (i < g.spawnage.length) {
if ((((g.spawnage[i].x == _arg1)) && ((g.spawnage[i].y == _arg2)))){
_local4.spawn_id = g.spawnage[i].id;
break;
};
i++;
};
} else {
if ((((s.map_array[_arg2][_arg1] >= 365)) && ((s.map_array[_arg2][_arg1] <= 368)))){
_local5.x = (_local5.x + 32);
_local5.y = (_local5.y + 32);
if (s.map_array[_arg2][_arg1] == 365){
_local4 = new FlyingGun(FlyingGun.DOWN, (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] == 366){
_local4 = new FlyingGun(FlyingGun.RIGHT, (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] == 367){
_local4 = new FlyingGun(FlyingGun.UP, (_local5 as MovieClip), g);
} else {
if (s.map_array[_arg2][_arg1] == 368){
_local4 = new FlyingGun(FlyingGun.LEFT, (_local5 as MovieClip), g);
};
};
};
};
} else {
if (s.map_array[_arg2][_arg1] == 371){
_local4 = new Sniper(_local5, g);
} else {
if ((((s.map_array[_arg2][_arg1] >= 372)) && ((s.map_array[_arg2][_arg1] <= 374)))){
_local5.x = (_arg1 * s.scale);
_local5.y = (_arg2 * s.scale);
g.light_holder.addChild(_local5);
_local5.x = (_local5.x + 32);
_local5.y = (_local5.y + 32);
((_local5 as MovieClip));
_local4 = new Spot(_local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 375){
_local4 = new Coin(_local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 376){
_local4 = new Health(_local5, g);
} else {
if ((((s.map_array[_arg2][_arg1] == 377)) || ((s.map_array[_arg2][_arg1] == 378)))){
_local5.x = (_local5.x + 32);
_local5.y = (_local5.y + 43);
if (s.map_array[_arg2][_arg1] == 377){
_local4 = new GunMan(LEFT, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 378){
_local4 = new GunMan(RIGHT, _local5, g);
};
};
} else {
if ((((s.map_array[_arg2][_arg1] == 379)) || ((s.map_array[_arg2][_arg1] == 380)))){
_local5.x = (_local5.x + 32);
_local5.y = (_local5.y + 43);
if (s.map_array[_arg2][_arg1] == 379){
_local4 = new BladeMan(LEFT, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 380){
_local4 = new BladeMan(RIGHT, _local5, g);
};
};
} else {
if ((((s.map_array[_arg2][_arg1] == 381)) || ((s.map_array[_arg2][_arg1] == 382)))){
_local5.x = (_arg1 * s.scale);
_local5.y = (_arg2 * s.scale);
_local5.x = (_local5.x + 33);
_local5.y = (_local5.y + 20);
g.monster_holder.addChild(_local5);
if (s.map_array[_arg2][_arg1] == 381){
_local4 = new Boss(Boss.FIRST, _local5, g);
} else {
if (s.map_array[_arg2][_arg1] == 382){
_local4 = new Boss(Boss.SECOND, _local5, g);
};
};
} else {
if (s.map_array[_arg2][_arg1] == 390){
_local4 = new Finish(_local5, g);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
= !(_local4.free);
} else {
if (s.map_array[_arg2][_arg1] != 0){
_local4 = new Clip(_local5, g);
};
};
};
};
if (_local4 != null){
_local4.map_x = (_local4.init_x = _arg1);
_local4.map_y = (_local4.init_y = _arg2);
_local4.tile_id = s.map_array[_arg2][_arg1];
_local4.layer = s.current_layer;
if (){
s.map_array[_arg2][_arg1] = _local4;
return (_local4);
};
s.map_array[_arg2][_arg1] = 0;
};
return (null);
}
public function
(_arg1:MovieClip){
_arg1.gotoAndPlay(((g.frame_count % _arg1.totalFrames) + 1));
}
public function (_arg1:String, _arg2:Sprite, _arg3:Number, _arg4:Number){
var _local5:*;
var _local6:MovieClip;
if (g.blocks_in_play[_arg4][_arg3] != IN_PLAY){
_local5 = new Clip(_arg2, g);
_local5.block = true;
return (_local5);
};
if (_arg1 == "static"){
_local5 = new BlockClip(_arg2, g);
} else {
if (_arg1 == "gun"){
_local5 = new GunBlock((_arg2 as MovieClip), g);
} else {
if (_arg1 == "electric"){
_local5 = new ElectricBlock(_arg2, g);
} else {
if (_arg1 == "field_door"){
_local5 = new SecurityField(_arg2, g);
} else {
if (_arg1 == "spawn"){
_local5 = new SpawnBlock(_arg2, g);
};
};
};
};
};
_local5.b = new Block((_arg3 * g.scale), (_arg4 * g.scale), g.scale, g.scale);
if ((((((_arg4 > 0)) && (isBlock(s.map_array[(_arg4 - 1)][_arg3])))) || ((_arg4 == 0)))){
_local5.b.stack(UP);
};
if ((((((_arg3 < (s.width - 1))) && (isBlock(s.map_array[_arg4][(_arg3 + 1)])))) || ((_arg3 == (s.width - 1))))){
_local5.b.stack(RIGHT);
};
if ((((((_arg4 < (s.height - 1))) && (isBlock(s.map_array[(_arg4 + 1)][_arg3])))) || ((_arg4 == (s.height - 1))))){
_local5.b.stack(DOWN);
};
if ((((((_arg3 > 0)) && (isBlock(s.map_array[_arg4][(_arg3 - 1)])))) || ((_arg3 == 0)))){
_local5.b.stack(LEFT);
};
if (_arg1 == "electric"){
_local5.b.attachable = false;
if (!(_local5.b.stacked & UP)){
_local6 = new ElectricStraightMC();
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (!(_local5.b.stacked & RIGHT)){
_local6 = new ElectricStraightMC();
_local6.x = (g.scale - 1);
_local6.rotation = 90;
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (!(_local5.b.stacked & DOWN)){
_local6 = new ElectricStraightMC();
_local6.y = (g.scale - 1);
_local6.x = (g.scale - 1);
_local6.rotation = 180;
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (!(_local5.b.stacked & LEFT)){
_local6 = new ElectricStraightMC();
_local6.y = (g.scale - 1);
_local6.rotation = -90;
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (((!((_local5.b.stacked & UP))) && (!((_local5.b.stacked & LEFT))))){
_local6 = new ElectricCornerMC();
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (((!((_local5.b.stacked & UP))) && (!((_local5.b.stacked & RIGHT))))){
_local6 = new ElectricCornerMC();
_local6.x = (g.scale - 1);
_local6.rotation = 90;
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (((!((_local5.b.stacked & DOWN))) && (!((_local5.b.stacked & RIGHT))))){
_local6 = new ElectricCornerMC();
_local6.x = (g.scale - 1);
_local6.y = (g.scale - 1);
_local6.rotation = 180;
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
if (((!((_local5.b.stacked & DOWN))) && (!((_local5.b.stacked & LEFT))))){
_local6 = new ElectricCornerMC();
_local6.y = (g.scale - 1);
_local6.rotation = -90;
_local6.gotoAndPlay((((Math.random() * _local6.totalFrames) >> 0) + 1));
_arg2.addChild(_local6);
};
};
return (_local5);
}
public function (_arg1:int):Sprite{
return (new Sprite());
}
public static function isBlock(_arg1):Boolean{
return (((((((isNaN(_arg1)) && (_arg1.block))) && (!(_arg1.force_field)))) || (((isFinite(_arg1)) && ((((((((((((((_arg1 >= 2)) && ((_arg1 <= 117)))) || ((((_arg1 >= 321)) && ((_arg1 <= 326)))))) || ((((_arg1 >= 327)) && ((_arg1 <= 330)))))) || ((((_arg1 >= 336)) && ((_arg1 <= 345)))))) || ((((_arg1 >= 361)) && ((_arg1 <= 364)))))) || ((((_arg1 >= 387)) && ((_arg1 <= 389))))))))));
}
public static function isSpawn(_arg1):Boolean{
return (((((isNaN(_arg1)) && (_arg1.spawn))) || (((isFinite(_arg1)) && ((((_arg1 == 363)) || ((_arg1 == 364))))))));
}
public static function isScanner(_arg1:int):Boolean{
return ((((_arg1 >= 346)) && ((_arg1 <= 353))));
}
public static function isForceField(_arg1):Boolean{
return (((((isNaN(_arg1)) && (_arg1.force_field))) || (((isFinite(_arg1)) && ((_arg1 == 354))))));
}
}
}//package com.nitrome.engine_specific
Section 49
//Trail (com.nitrome.engine_specific.Trail)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
public class Trail {
public var :Number;
public var length:int;
public var dots:Array;
public function Trail(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Number){
var _local5:int;
super();
dots = new Array();
this.length = _arg3;
this. = _arg4;
_local5 = 0;
while (_local5 < _arg3) {
dots.push(new Dot(_arg1, _arg2));
_local5++;
};
}
public function move(_arg1:Number, _arg2:Number):void{
dots[(dots.length - 1)].x = _arg1;
dots[(dots.length - 1)].y = _arg2;
}
public function (_arg1:Number, _arg2:Number):void{
var _local3:int;
_local3 = 0;
while (_local3 < dots.length) {
dots[_local3].x = _arg1;
dots[_local3].y = _arg2;
_local3++;
};
}
public function main():void{
var _local1:int;
_local1 = (length - 2);
while (_local1 > -1) {
dots[_local1].x = (dots[_local1].x - ((dots[_local1].x - dots[(_local1 + 1)].x) * ));
dots[_local1].y = (dots[_local1].y - ((dots[_local1].y - dots[(_local1 + 1)].y) * ));
_local1--;
};
}
}
}//package com.nitrome.engine_specific
Section 50
//TripWire (com.nitrome.engine_specific.TripWire)
package com.nitrome.engine_specific {
import com.nitrome.engine.*;
import flash.display.*;
public class TripWire extends Encounter {
public var wobble:int;
public var scan:Line;
public var dir:int;
public var
:int;
public var cast:RayCastReport;
public var other_way:Boolean;// = false
public var type:int;
public var strength:Number;
public var :int;
public var :int;
public var :int;
public var collision_rect:Rect;
private var i:int;
public var angle:int;// = 0
public static const TURNING:int = 2;
public static const LEFT:int = 8;
public static const DOWN:int = 4;
private static const COLS:Array = [0xFA0092, 0xF900FA, 0xED00FA];
public static const FIXED:int = 1;
public static const WOBBLE_STEP:int = 6;
public static const UP:int = 1;
public static const RIGHT:int = 2;
public static const WARM_UP_STEP:Number = 0.02;
private static const ALPHA:Array = [0.45, 0.25, 0.15];
public static var TURN_SPEED:int = 1;
public function TripWire(_arg1:int, _arg2:int, _arg3:Sprite, _arg4:Game){
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Dot;
var _local10:Number;
var _local11:int;
var _local12:int;
angle = 0;
other_way = false;
super(_arg3, _arg4, false);
this.type = _arg1;
this.dir = _arg2;
strength = 0;
map_x = ((x * _arg4.SCALE) >> 0);
map_y = ((y * _arg4.SCALE) >> 0);
has_main = true;
free = true;
if (_arg1 == TURNING){
collision_rect = new Rect();
_local5 = (_arg4.scroller.width * _arg4.scale);
_local6 = (_arg4.scroller.height * _arg4.scale);
_local7 = 0;
_local8 = 0;
if (_arg2 == UP){
_local9 = new Dot((32 + (_arg4.scale * map_x)), (-1 + (map_y * _arg4.scale)));
scan = new Line(_local9, new Dot(_local9.x, (_local9.y - ((_arg4.scroller.width * _arg4.scroller.height) * _arg4.scale))));
= 180;
= 360;
} else {
if (_arg2 == RIGHT){
_local9 = new Dot((_arg4.scale * (map_x + 1)), (32 + (map_y * _arg4.scale)));
scan = new Line(_local9, new Dot((_local9.x + ((_arg4.scroller.width * _arg4.scroller.height) * _arg4.scale)), _local9.y));
= 270;
= 450;
} else {
if (_arg2 == DOWN){
_local9 = new Dot((32 + (_arg4.scale * map_x)), ((map_y + 1) * _arg4.scale));
scan = new Line(_local9, new Dot(_local9.x, (_local9.y + ((_arg4.scroller.width * _arg4.scroller.height) * _arg4.scale))));
= 0;
= 180;
} else {
if (_arg2 == LEFT){
_local9 = new Dot((-1 + (_arg4.scale * map_x)), (32 + (map_y * _arg4.scale)));
scan = new Line(_local9, new Dot((_local9.x - ((_arg4.scroller.width * _arg4.scroller.height) * _arg4.scale)), _local9.y));
= 90;
= 270;
};
};
};
};
_local10 = -(scan.len);
i = 0;
while (i < 178) {
angle = (( + i) % 360);
rotate();
cast = RayCast.initCast(scan, _arg4.block_map);
if (cast != null){
if (cast.ax < _local5){
_local5 = cast.ax;
};
if (cast.ay < _local6){
_local6 = cast.ay;
};
if (cast.ax > _local7){
_local7 = cast.ax;
};
if (cast.ay > _local8){
_local8 = cast.ay;
};
if (RayCast.
> _local10){
_local10 = RayCast.
;
};
};
i++;
};
collision_rect.x = _local5;
collision_rect.y = _local6;
collision_rect.width = (_local7 - _local5);
collision_rect.height = (_local8 - _local6);
scan.len = _local10;
getCurrentAngle();
} else {
if (_arg1 == FIXED){
if (_arg2 == UP){
_local11 = map_x;
_local12 = (map_y - 1);
while (_local12 > 0) {
if (_arg4.blocks_in_play[_local12][_local11] == _arg4.IN_PLAY){
break;
};
_local12--;
};
collision_rect = new Rect((30 + (_arg4.scale * _local11)), ((_local12 + 1) * _arg4.scale), 4, (((map_y - 1) - _local12) * _arg4.scale));
scan = new Line(new Dot((32 + (_arg4.scale * map_x)), (map_y * _arg4.scale)), new Dot((32 + (_arg4.scale * map_x)), ((_local12 + 1) * _arg4.scale)));
} else {
if (_arg2 == RIGHT){
_local12 = map_y;
_local11 = (map_x + 1);
while (_local11 < _arg4.scroller.width) {
if (_arg4.blocks_in_play[_local12][_local11] == _arg4.IN_PLAY){
break;
};
_local11++;
};
collision_rect = new Rect((_arg4.scale * (map_x + 1)), (30 + (_local12 * _arg4.scale)), (((_local11 - 1) - map_x) * _arg4.scale), 4);
scan = new Line(new Dot((_arg4.scale * (map_x + 1)), (32 + (map_y * _arg4.scale))), new Dot((_arg4.scale * _local11), (32 + (map_y * _arg4.scale))));
} else {
if (_arg2 == DOWN){
_local11 = map_x;
_local12 = (map_y + 1);
while (_local12 < _arg4.scroller.height) {
if (_arg4.blocks_in_play[_local12][_local11] == _arg4.IN_PLAY){
break;
};
_local12++;
};
collision_rect = new Rect((30 + (_arg4.scale * _local11)), ((map_y + 1) * _arg4.scale), 4, (((_local12 - 1) - map_y) * _arg4.scale));
scan = new Line(new Dot((32 + (_arg4.scale * map_x)), ((map_y + 1) * _arg4.scale)), new Dot((32 + (_arg4.scale * _local11)), (_local12 * _arg4.scale)));
} else {
if (_arg2 == LEFT){
_local12 = map_y;
_local11 = (map_x - 1);
while (_local11 > 0) {
if (_arg4.blocks_in_play[_local12][_local11] == _arg4.IN_PLAY){
break;
};
_local11--;
};
collision_rect = new Rect((_arg4.scale * (_local11 + 1)), (30 + (_local12 * _arg4.scale)), (((map_x - 1) - _local11) * _arg4.scale), 4);
scan = new Line(new Dot((_arg4.scale * map_x), (32 + (map_y * _arg4.scale))), new Dot((_arg4.scale * (_local11 + 1)), (32 + (map_y * _arg4.scale))));
};
};
};
};
};
};
_arg4.(this);
}
public function updateMC():void{
wobble = ((wobble + WOBBLE_STEP) % 360);
if (type == FIXED){
i = 1;
while (i < 4) {
g.scan_holder.graphics.lineStyle((i * 3), COLS[(i - 1)], (strength * (ALPHA[(i - 1)] + Math.abs((Trig.sin[wobble] * 0.25)))));
g.scan_holder.graphics.moveTo(scan.a.x, scan.a.y);
g.scan_holder.graphics.lineTo(scan.b.x, scan.b.y);
i++;
};
} else {
if (type == TURNING){
(mc as MovieClip).scanner.rotation = (angle + 180);
i = 1;
while (i < 4) {
g.scan_holder.graphics.lineStyle((i * 3), COLS[(i - 1)], (strength * (ALPHA[(i - 1)] + Math.abs((Trig.sin[wobble] * 0.25)))));
g.scan_holder.graphics.moveTo(scan.a.x, scan.a.y);
g.scan_holder.graphics.lineTo(cast.ax, cast.ay);
i++;
};
};
};
}
override public function intersects(_arg1:Rect):Boolean{
if (type == TURNING){
cast = RayCast.playerCast(scan, g.block_map, g.player);
if (g.player.state == Player.STEALTH){
return (false);
};
if (cast != null){
return (cast.found);
};
} else {
if (g.player.state == Player.STEALTH){
return (false);
};
return (collision_rect.intersects(_arg1));
};
return (false);
}
public function main():void{
if (type == TURNING){
if ( > 0){
if (angle >=
){
angle =
;
= -(TURN_SPEED);
};
} else {
if (angle <= ){
angle = ;
= TURN_SPEED;
};
};
angle = (angle + );
rotate();
};
if ((((strength < 1)) && ((g.alert_state == g.INACTIVE)))){
strength = (strength + WARM_UP_STEP);
} else {
if ((((strength > 0)) && ((g.alert_state == g.ACTIVE)))){
strength = (strength - WARM_UP_STEP);
};
};
updateMC();
}
override public function resolvePlayerCollision(_arg1:Player):void{
if (strength >= 1){
g.alert();
};
}
public function getCurrentAngle():void{
angle = (g.frame_count % 360);
if (other_way){
angle = ((angle + 180) % 360);
};
if (angle > 180){
= -(TURN_SPEED);
angle = (angle % 180);
angle = (
- angle);
} else {
= TURN_SPEED;
angle = (angle + );
};
}
public function rotate():void{
scan.dx = Trig.cos[(angle % 360)];
scan.dy = Trig.sin[(angle % 360)];
scan.vx = (scan.dx * scan.len);
scan.vy = (scan.dy * scan.len);
scan.b.x = (scan.a.x + scan.vx);
scan.b.y = (scan.a.y + scan.vy);
scan.rx = -(scan.dy);
scan.ry = scan.dx;
scan.lx = scan.dy;
scan.ly = -(scan.dx);
}
}
}//package com.nitrome.engine_specific
Section 51
//ArmorLink (com.nitrome.game.ArmorLink)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class ArmorLink extends SimpleButton {
public function ArmorLink(){
this.addEventListener(MouseEvent.CLICK, click);
}
public function click(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.armorgames.com/"), "_blank");
}
}
}//package com.nitrome.game
Section 52
//ArmorLogoLink (com.nitrome.game.ArmorLogoLink)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class ArmorLogoLink extends SimpleButton {
public function ArmorLogoLink(){
this.addEventListener(MouseEvent.CLICK, click);
}
public function click(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.armorgames.com/"), "_blank");
}
}
}//package com.nitrome.game
Section 53
//BackButton (com.nitrome.game.BackButton)
package com.nitrome.game {
import flash.events.*;
public class BackButton extends SimpleButton {
public function BackButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("title_screen");
}
}
}//package com.nitrome.game
Section 54
//ContinueEndButton (com.nitrome.game.ContinueEndButton)
package com.nitrome.game {
import flash.events.*;
public class ContinueEndButton extends SimpleButton {
public function ContinueEndButton(){
addFrameScript(0, frame1);
}
function doStuff():void{
NitromeGame.timeline.game.clearListeners();
NitromeGame.timeline.popup_holder.key_pressed = true;
NitromeGame.transition.doTween("congrats");
NitromeGame.sound_manager.crossFade(SoundManager.MENU);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
if (!NitromeGame.timeline.popup_holder.key_pressed){
doStuff();
};
}
}
}//package com.nitrome.game
Section 55
//ContinueGameButton (com.nitrome.game.ContinueGameButton)
package com.nitrome.game {
import flash.events.*;
public class ContinueGameButton extends SimpleButton {
public function ContinueGameButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.pauseGame();
}
}
}//package com.nitrome.game
Section 56
//ContinueGameHelpButton (com.nitrome.game.ContinueGameHelpButton)
package com.nitrome.game {
import flash.events.*;
public class ContinueGameHelpButton extends SimpleButton {
public function ContinueGameHelpButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.pauseGame();
}
}
}//package com.nitrome.game
Section 57
//CreditsButton (com.nitrome.game.CreditsButton)
package com.nitrome.game {
import flash.events.*;
public class CreditsButton extends SimpleButton {
public function CreditsButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("credits");
}
}
}//package com.nitrome.game
Section 58
//FxToggle (com.nitrome.game.FxToggle)
package com.nitrome.game {
import flash.events.*;
public class FxToggle extends SimpleButton {
public function FxToggle(){
addFrameScript(0, frame1, 9, frame10, 19, frame20, 29, frame30);
if (!NitromeGame.sfx){
gotoAndStop("_off_up");
} else {
gotoAndStop("_on_up");
};
addEventListener(MouseEvent.CLICK, onClick);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
override protected function updateGraphic():void{
if (over){
if (NitromeGame.sound_manager.sfx){
gotoAndStop("_on_over");
} else {
if (!NitromeGame.sound_manager.sfx){
gotoAndStop("_off_over");
};
};
} else {
if (NitromeGame.sound_manager.sfx){
gotoAndStop("_on_up");
} else {
if (!NitromeGame.sound_manager.sfx){
gotoAndStop("_off_up");
};
};
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.sound_manager.toggleSfx();
updateGraphic();
}
}
}//package com.nitrome.game
Section 59
//GameHelpButton (com.nitrome.game.GameHelpButton)
package com.nitrome.game {
import flash.events.*;
public class GameHelpButton extends SimpleButton {
public function GameHelpButton(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.pauseGame(true);
}
}
}//package com.nitrome.game
Section 60
//HelpArrowButtonLeft (com.nitrome.game.HelpArrowButtonLeft)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class HelpArrowButtonLeft extends SimpleButton {
public function HelpArrowButtonLeft(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
(parent as MovieClip).gotoAndStop((((parent as MovieClip).currentFrame == 1)) ? (parent as MovieClip).totalFrames : ((parent as MovieClip).currentFrame - 1));
}
}
}//package com.nitrome.game
Section 61
//HelpArrowButtonRight (com.nitrome.game.HelpArrowButtonRight)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class HelpArrowButtonRight extends SimpleButton {
public function HelpArrowButtonRight(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
(parent as MovieClip).gotoAndStop((((parent as MovieClip).currentFrame == (parent as MovieClip).totalFrames)) ? 1 : ((parent as MovieClip).currentFrame + 1));
}
}
}//package com.nitrome.game
Section 62
//HelpButton (com.nitrome.game.HelpButton)
package com.nitrome.game {
import flash.events.*;
public class HelpButton extends SimpleButton {
public function HelpButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("help");
}
}
}//package com.nitrome.game
Section 63
//Key (com.nitrome.game.Key)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class Key {
public static const NUMBER_0:uint = 48;
public static const NUMBER_1:uint = 49;
public static const NUMBER_2:uint = 50;
public static const NUMBER_3:uint = 51;
public static const NUMBER_4:uint = 52;
public static const NUMBER_5:uint = 53;
public static const NUMBER_6:uint = 54;
public static const NUMBER_7:uint = 55;
public static const NUMBER_9:uint = 57;
public static const D:uint = 68;
public static const E:uint = 69;
public static const F:uint = 70;
public static const G:uint = 71;
public static const A:uint = 65;
public static const NUMBER_8:uint = 56;
public static const C:uint = 67;
public static const K:uint = 75;
public static const L:uint = 76;
public static const M:uint = 77;
public static const N:uint = 78;
public static const H:uint = 72;
public static const I:uint = 73;
public static const B:uint = 66;
public static const R:uint = 82;
public static const S:uint = 83;
public static const U:uint = 85;
public static const O:uint = 79;
public static const P:uint = 80;
public static const Q:uint = 81;
public static const J:uint = 74;
public static const Z:uint = 90;
public static const T:uint = 84;
public static const V:uint = 86;
public static const W:uint = 87;
public static const X:uint = 88;
public static const Y:uint = 89;
public static var stage:Stage;
private static var keysDown:Array = new Array();
public static var key_pressed:Boolean = false;
private static var initialized:Boolean = false;
public static function init(_arg1:Stage){
if (!initialized){
stage = _arg1;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
stage.addEventListener(Event.DEACTIVATE, clearKeys);
initialized = true;
};
}
private static function clearKeys(_arg1:Event):void{
keysDown = new Array();
key_pressed = false;
}
public static function forceClearKeys():void{
keysDown = new Array();
key_pressed = false;
}
private static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
key_pressed = true;
}
private static function keyReleased(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = false;
key_pressed = false;
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
throw (new Error("Key class has yet been initialized."));
};
return (Boolean(keysDown[_arg1]));
}
}
}//package com.nitrome.game
Section 64
//LevelChooserButton (com.nitrome.game.LevelChooserButton)
package com.nitrome.game {
import flash.events.*;
import flash.text.*;
public class LevelChooserButton extends SimpleButton {
private var active:Boolean;
private var id:int;
public var level_num:TextField;
public var :String;
public static const up_col:int = 4485631;
public static const over_col:int = 0xFD006E;
public function LevelChooserButton(){
id = int(name.slice(6));
if (NitromeGame.getLevelUnlocked(id)){
active = true;
useHandCursor = true;
} else {
active = false;
useHandCursor = false;
};
updateGraphic();
}
override protected function updateGraphic():void{
var _local1:String;
if (active){
if (over){
level_num.textColor = over_col;
} else {
level_num.textColor = up_col;
};
_local1 = String(id);
if (id < 10){
_local1 = ("0" + _local1);
};
level_num.text = _local1;
} else {
level_num.text = "??";
};
}
override public function onClick(_arg1:MouseEvent):void{
if (active){
NitromeGame.selected_level = id;
Score.value = 0;
if (id == 1){
NitromeGame.timeline.tt.doTween("story");
} else {
NitromeGame.timeline.tt.doTween("game");
};
};
updateGraphic();
}
}
}//package com.nitrome.game
Section 65
//LevelSelectButton (com.nitrome.game.LevelSelectButton)
package com.nitrome.game {
import flash.events.*;
public class LevelSelectButton extends SimpleButton {
public function LevelSelectButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.clearListeners();
NitromeGame.transition.doTween("choose_level");
NitromeGame.sound_manager.playMusic(SoundManager.MENU, false);
}
}
}//package com.nitrome.game
Section 66
//MiniclipLogo (com.nitrome.game.MiniclipLogo)
package com.nitrome.game {
import flash.events.*;
import flash.net.*;
public class MiniclipLogo extends SimpleButton {
public function MiniclipLogo(){
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
override public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.miniclip.com"), "_blank");
}
}
}//package com.nitrome.game
Section 67
//MsgPanel (com.nitrome.game.MsgPanel)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class MsgPanel extends MovieClip {
public var count:int;
public var msg:TextField;
public var state:int;
public var step:Number;
public static const FADE_DELAY:int = 25;
public static const FADE_IN:int = 2;
public static const HIDDEN:int = 8;
public static const FADE_OUT:int = 4;
public static const VISIBLE:int = 1;
public static const VISIBLE_DELAY:int = 50;
public function MsgPanel(){
visible = false;
alpha = 0;
state = HIDDEN;
count = 0;
step = (1 / FADE_DELAY);
}
public function onEnterFrame(_arg1:Event):void{
if (state == FADE_IN){
alpha = (alpha + step);
if (alpha >= 1){
state = VISIBLE;
};
} else {
if (state == VISIBLE){
count++;
if (count >= VISIBLE_DELAY){
state = FADE_OUT;
};
} else {
if (state == FADE_OUT){
alpha = (alpha - step);
if (alpha <= 0){
state = HIDDEN;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
visible = false;
};
};
};
};
}
public function setMsg(_arg1:String):void{
msg.text = _arg1;
state = FADE_IN;
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
count = 0;
visible = true;
}
}
}//package com.nitrome.game
Section 68
//MusicToggle (com.nitrome.game.MusicToggle)
package com.nitrome.game {
import flash.events.*;
public class MusicToggle extends SimpleButton {
public function MusicToggle(){
addFrameScript(0, frame1, 9, frame10, 19, frame20, 29, frame30);
if (!NitromeGame.music){
gotoAndStop("_off_up");
} else {
gotoAndStop("_on_up");
};
addEventListener(MouseEvent.CLICK, onClick);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
override protected function updateGraphic():void{
if (over){
if (NitromeGame.sound_manager.music){
gotoAndStop("_on_over");
} else {
if (!NitromeGame.sound_manager.music){
gotoAndStop("_off_over");
};
};
} else {
if (NitromeGame.sound_manager.music){
gotoAndStop("_on_up");
} else {
if (!NitromeGame.sound_manager.music){
gotoAndStop("_off_up");
};
};
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.sound_manager.toggleMusic();
updateGraphic();
}
}
}//package com.nitrome.game
Section 69
//NextLevelButton (com.nitrome.game.NextLevelButton)
package com.nitrome.game {
import flash.events.*;
public class NextLevelButton extends SimpleButton {
public function NextLevelButton(){
addFrameScript(0, frame1);
}
function doStuff():void{
NitromeGame.timeline.game.clearListeners();
NitromeGame.selected_level++;
NitromeGame.timeline.popup_holder.hidePopUp();
if (NitromeGame.selected_level == 11){
NitromeGame.timeline.game.clearAll();
NitromeGame.timeline.game = null;
NitromeGame.timeline.gotoAndStop("vignette");
} else {
NitromeGame.transition.doTween("game_reset");
};
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
if (!NitromeGame.timeline.popup_holder.key_pressed){
doStuff();
};
}
}
}//package com.nitrome.game
Section 70
//NitromeButton (com.nitrome.game.NitromeButton)
package com.nitrome.game {
import flash.events.*;
import flash.net.*;
public class NitromeButton extends SimpleButton {
public function NitromeButton(){
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
override public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.nitrome.com"), "_blank");
}
}
}//package com.nitrome.game
Section 71
//PauseButton (com.nitrome.game.PauseButton)
package com.nitrome.game {
import flash.events.*;
public class PauseButton extends SimpleButton {
public function PauseButton(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.pauseGame();
}
}
}//package com.nitrome.game
Section 72
//PlayButton (com.nitrome.game.PlayButton)
package com.nitrome.game {
import flash.events.*;
public class PlayButton extends SimpleButton {
public function PlayButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("choose_level");
}
}
}//package com.nitrome.game
Section 73
//PlayGameButton (com.nitrome.game.PlayGameButton)
package com.nitrome.game {
import flash.events.*;
public class PlayGameButton extends SimpleButton {
public function PlayGameButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
Score.value = 0;
if (NitromeGame.selected_level == 1){
NitromeGame.timeline.tt.doTween("story");
} else {
NitromeGame.timeline.tt.doTween("game");
};
}
}
}//package com.nitrome.game
Section 74
//PopUpHolder (com.nitrome.game.PopUpHolder)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class PopUpHolder extends MovieClip {
public var popup_clip:MovieClip;
private var :Boolean;
public var key_pressed:Boolean;
private var :String;
public function PopUpHolder(){
addFrameScript(0, frame1, 1, frame2, 9, frame10);
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
}
function frame10(){
stop();
}
function frame1(){
popup_clip.gotoAndStop("wait");
stop();
}
function frame2(){
popup_clip.gotoAndStop();
}
public function hidePopUp():void{
gotoAndPlay("out");
}
public function onEnterFrame(_arg1:Event):void{
if ((((((((currentFrame == NitromeGame.POPUP_HOLDER_FRAME)) && (Key.isDown(Keyboard.SPACE)))) && (!(key_pressed)))) && (!()))){
key_pressed = true;
if ( == "level_complete"){
popup_clip.next_level_button.doStuff();
} else {
if ( == "game_over"){
popup_clip.continue_end_button.doStuff();
} else {
if ( == "final_level_complete"){
popup_clip.try_again_button.doStuff();
};
};
};
= true;
};
if ((((currentFrame == NitromeGame.POPUP_HOLDER_FRAME)) && (!(Key.isDown(Keyboard.SPACE))))){
key_pressed = false;
};
}
public function launchPopUp(_arg1:String):void{
= _arg1;
key_pressed = false;
= false;
gotoAndPlay(2);
}
}
}//package com.nitrome.game
Section 75
//Preloader (com.nitrome.game.Preloader)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Preloader extends MovieClip {
public var loadedTF:TextField;
private var :uint;// = 0
private var
:uint;// = 1
private var :TextField;
public function Preloader(){
= 0;
= 1;
super();
= 0;
= loadedTF;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(_arg1:Event):void{
var _local2:TextField;
if (stage.loaderInfo.bytesLoaded < stage.loaderInfo.bytesTotal){
_local2 = loadedTF;
_local2.text = (("loading... " + int(((100 * stage.loaderInfo.bytesLoaded) / stage.loaderInfo.bytesTotal))) + "%");
} else {
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
(parent as MovieClip).gotoAndStop("armorgames");
};
}
}
}//package com.nitrome.game
Section 76
//QuitGameButton (com.nitrome.game.QuitGameButton)
package com.nitrome.game {
import flash.events.*;
public class QuitGameButton extends SimpleButton {
public function QuitGameButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.clearListeners();
NitromeGame.transition.doTween("choose_level");
NitromeGame.sound_manager.playMusic(SoundManager.MENU, false);
}
}
}//package com.nitrome.game
Section 77
//Score (com.nitrome.game.Score)
package com.nitrome.game {
public class Score {
private static var r:int;
private static var _value:int;
private static var hash:String;
public static function init():void{
r = (int((Math.random() * 2000000)) - 1000000);
_value = r;
hash = _value.toString(16);
}
public static function verify():Boolean{
return ((_value.toString(16) == hash));
}
public static function get value():int{
return ((_value - r));
}
public static function set value(_arg1:int):void{
var _local2:Boolean;
_local2 = verify();
r = (int((Math.random() * 2000000)) - 1000000);
_value = (r + _arg1);
if (_local2){
hash = _value.toString(16);
};
}
}
}//package com.nitrome.game
Section 78
//ScoreTicker (com.nitrome.game.ScoreTicker)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class ScoreTicker extends MovieClip {
private var :int;
private var :String;
private var :int;
private var :int;
private var :int;
public var score_text:TextField;
private var :int;
private var :int;
private function ():void{
score_text.text = String();
}
private function (_arg1:Event):void{
= ( + );
if ( >= ){
= ;
();
removeEventListener(Event.ENTER_FRAME, );
();
} else {
();
};
}
private function ():void{
if ( != null){
parent[].startCount( , );
};
}
public function startCount(_arg1:int, _arg2:int):void{
= _arg1;
this. = _arg2;
= 0;
addEventListener(Event.ENTER_FRAME, , false, 0, true);
}
public function setOnFinish(_arg1:String, _arg2:int, _arg3:int):void{
= _arg1;
= _arg2;
= _arg3;
}
}
}//package com.nitrome.game
Section 79
//SimpleButton (com.nitrome.game.SimpleButton)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class SimpleButton extends MovieClip {
public var i:int;
protected var over:Boolean;// = false
public function SimpleButton(){
over = false;
super();
mouseChildren = false;
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER,
, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT,
, false, 0, true);
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
protected function
(_arg1:MouseEvent):void{
over = true;
updateGraphic();
}
protected function
(_arg1:MouseEvent):void{
over = false;
updateGraphic();
}
protected function updateGraphic():void{
if (over){
gotoAndStop("_over");
} else {
gotoAndStop("_up");
};
}
public function onClick(_arg1:MouseEvent):void{
}
}
}//package com.nitrome.game
Section 80
//SoundManager (com.nitrome.game.SoundManager)
package com.nitrome.game {
import flash.display.*;
import flash.media.*;
public class SoundManager extends SoundManagerSuper {
protected const GAME_VOLUME:Number = 1;
protected const MENU_VOLUME:Number = 1;
public var coins:MovieClip;
public var star_hit:MovieClip;
public var jump:MovieClip;
public var cough:MovieClip;
public var wom:MovieClip;
public var smithhit:MovieClip;
public var tang:MovieClip;
public var bang1:MovieClip;
public var shot:MovieClip;
public var bang2:MovieClip;
public var bang3:MovieClip;
public var chop:MovieClip;
public var bang4:MovieClip;
public var oishii:MovieClip;
public var electric:MovieClip;
public var alert:MovieClip;
public var smithdie:MovieClip;
public var aiiee:MovieClip;
public var sword1:MovieClip;
public var sword2:MovieClip;
public var yatta:MovieClip;
public static const GAME:int = 1;
public static const MENU:int = 0;
public function SoundManager(){
NitromeGame.sound_manager = this;
music_sounds.push(new MenuMusic());
music_sounds.push(new GameMusic());
transforms.push(new SoundTransform(MENU_VOLUME, 0));
transforms.push(new SoundTransform(GAME_VOLUME, 0));
channels.push(new SoundChannel());
channels.push(new SoundChannel());
volumes.push(MENU_VOLUME);
volumes.push(GAME_VOLUME);
= uint.MAX_VALUE;
}
}
}//package com.nitrome.game
Section 81
//SoundManagerSuper (com.nitrome.game.SoundManagerSuper)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class SoundManagerSuper extends MovieClip {
protected const CROSS_FADE_SPEED:Number = 0.05;
protected var :Array;
public var :int;
protected var :Boolean;// = true
public var :Boolean;// = false
protected var transforms:Array;
protected var volumes:Array;
protected var music_sounds:Array;
protected var
:int;
protected var :Boolean;// = true
protected var channels:Array;
public static const NO_MUSIC:int = -1;
public function SoundManagerSuper(){
var _local1:int;
var _local2:MovieClip;
= new Array();
music_sounds = new Array();
channels = new Array();
transforms = new Array();
volumes = new Array();
= true;
= true;
= false;
super();
= NitromeGame.music;
= NitromeGame.sfx;
_local1 = 0;
while (_local1 < numChildren) {
_local2 = (getChildAt(_local1) as MovieClip);
if (_local2 != null){
[_local2.name] = _local2;
};
_local1++;
};
}
private function (_arg1:Event):void{
if (transforms[].volume > 0){
transforms[].volume = (transforms[].volume - CROSS_FADE_SPEED);
channels[].soundTransform = transforms[];
};
if (transforms[].volume <= 0){
= false;
channels[].stop();
= NO_MUSIC;
_arg1.target.removeEventListener(Event.ENTER_FRAME, );
};
}
public function crossFade(_arg1:int):void{
if ( != _arg1){
= ;
= _arg1;
};
if (((!()) || ())){
return;
};
transforms[_arg1].volume = 0;
channels[_arg1] = music_sounds[_arg1].play(0, int.MAX_VALUE, transforms[_arg1]);
= true;
addEventListener(Event.ENTER_FRAME, );
}
public function set sfx(_arg1:Boolean):void{
= _arg1;
}
public function get music():Boolean{
return ();
}
public function toggleMusic():void{
if (){
();
} else {
();
};
}
public function playSound(_arg1:String):void{
if (){
if ([_arg1] != null){
[_arg1].gotoAndPlay(2);
};
};
}
public function ():void{
var _local1:uint;
_local1 = 0;
while (_local1 < channels.length) {
if (channels[_local1] != null){
channels[_local1].stop();
};
_local1++;
};
}
public function
():void{
NitromeGame.music = ( = true);
if ( != NO_MUSIC){
playMusic(, true);
};
}
private function (_arg1:Event):void{
if (transforms[].volume < volumes[]){
transforms[].volume = (transforms[].volume + CROSS_FADE_SPEED);
channels[].soundTransform = transforms[];
};
if (transforms[].volume >= volumes[]){
= false;
_arg1.target.removeEventListener(Event.ENTER_FRAME, );
};
}
private function (_arg1:Event):void{
if (transforms[
].volume > 0){
transforms[
].volume = (transforms[
].volume - CROSS_FADE_SPEED);
channels[
].soundTransform = transforms[
];
};
if (transforms[].volume < volumes[]){
transforms[].volume = (transforms[].volume + CROSS_FADE_SPEED);
channels[].soundTransform = transforms[];
};
if ((((transforms[].volume >= volumes[])) && ((transforms[
].volume <= 0)))){
channels[
].stop();
= false;
_arg1.target.removeEventListener(Event.ENTER_FRAME, );
};
}
public function playMusic(_arg1:uint, _arg2:Boolean=false):void{
var _local3:uint;
if (((_arg2) && (( == NO_MUSIC)))){
return;
};
if (((!(( == _arg1))) || (_arg2))){
if (){
_local3 = 0;
while (_local3 < music_sounds.length) {
if (_local3 == _arg1){
} else {
if (channels[_local3] != null){
channels[_local3].stop();
};
};
_local3++;
};
transforms[_arg1].volume = volumes[_arg1];
channels[_arg1] = music_sounds[_arg1].play(0, int.MAX_VALUE, transforms[_arg1]);
};
= _arg1;
};
}
public function stopMusicFadeOut():void{
if (((!()) || ())){
return;
};
transforms[].volume = volumes[];
= true;
addEventListener(Event.ENTER_FRAME, );
}
public function set music(_arg1:Boolean):void{
= _arg1;
}
public function toggleSfx():void{
= !();
NitromeGame.sfx = !(NitromeGame.sfx);
}
public function ():void{
NitromeGame.sfx = ( = false);
}
public function ():void{
var _local1:uint;
_local1 = 0;
while (_local1 < channels.length) {
if (channels[_local1] != null){
channels[_local1].stop();
};
_local1++;
};
NitromeGame.music = ( = false);
}
public function get sfx():Boolean{
return ();
}
public function playMusicFadeIn(_arg1:int):void{
if ( == _arg1){
return;
};
= _arg1;
if (((!()) || ())){
return;
};
transforms[_arg1].volume = 0;
= true;
channels[_arg1] = music_sounds[_arg1].play(0, int.MAX_VALUE, transforms[_arg1]);
addEventListener(Event.ENTER_FRAME, );
}
public function ():void{
NitromeGame.sfx = ( = true);
}
}
}//package com.nitrome.game
Section 82
//SubmitScoreButton (com.nitrome.game.SubmitScoreButton)
package com.nitrome.game {
import flash.events.*;
public class SubmitScoreButton extends SimpleButton {
public function SubmitScoreButton(){
addFrameScript(0, frame1);
if (Score.value > NitromeGame.getLastSavedScore()){
visible = true;
} else {
visible = false;
};
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.timeline.game.clearListeners();
NitromeGame.setLastSavedScore(Score.value);
NitromeGame.timeline.popup_holder.hidePopUp();
NitromeGame.transition.doTween("submit_score");
NitromeGame.sound_manager.playMusic(SoundManager.MENU, false);
}
}
}//package com.nitrome.game
Section 83
//Transition (com.nitrome.game.Transition)
package com.nitrome.game {
import com.nitrome.engine.*;
import flash.display.*;
import flash.events.*;
public class Transition extends MovieClip {
public var :Shape;
public var
:Bitmap;
public var :Bitmap;
public var count:int;
public var :Line;
public var :String;
public var :BitmapData;
public var :Shape;
public var state:int;
public var tweening:Boolean;
public var :Shape;
public var step:Number;
public static const SLIDE:int = 4;
public static const FADE:int = 2;
public static const SLASH:int = 1;
public static const TWEEN_DELAY:int = 15;
public function Transition(){
= new BitmapData(550, 400, true, 0xFFFFFF);
= new Bitmap();
= new Bitmap();
= new Shape();
= new Shape();
= new Shape();
.visible = false;
.visible = false;
.mask = ;
.mask = ;
= new Line(new Dot(275, 0), new Dot(275, 400));
addChild(
);
addChild();
addChild();
addChild();
addChild();
count = 0;
tweening = false;
= "";
}
public function doTween(_arg1:String, _arg2:int=0):void{
if (!tweening){
(_arg1);
} else {
= _arg1;
};
}
private function onEnterFrame(_arg1:Event):void{
if (state == SLASH){
state = FADE;
} else {
if (state == FADE){
state = SLIDE;
} else {
if (state == SLIDE){
.graphics.clear();
count++;
if (.b.x < .a.x){
.x = (
.x + (.dx * step));
.y = (
.y + (.dy * step));
.x = (.x - (.dx * step));
.y = (.y - (.dy * step));
} else {
.x = (
.x - (.dx * step));
.y = (
.y - (.dy * step));
.x = (.x + (.dx * step));
.y = (.y + (.dy * step));
};
if (count >= TWEEN_DELAY){
.visible = false;
.visible = false;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
tweening = false;
if ( != ""){
();
= "";
};
};
};
};
};
}
public function (_arg1:String):void{
var _local2:Number;
tweening = true;
_local2 = (-250 + (Math.random() * 500));
.a.x = (275 + _local2);
.b.x = (275 - _local2);
.graphics.clear();
.graphics.lineStyle(5, 0, 0.05);
.graphics.moveTo((.a.x - 275), -200);
.graphics.lineTo((.b.x - 275), 200);
.graphics.lineStyle(2, 0, 0.05);
.graphics.moveTo((.a.x - 275), -200);
.graphics.lineTo((.b.x - 275), 200);
.draw(NitromeGame.timeline);
.graphics.clear();
.updateLine();
step = (.len / TWEEN_DELAY);
.graphics.clear();
.graphics.clear();
.graphics.beginFill(0xFFFFFF);
.graphics.beginFill(0xFFFFFF);
.graphics.moveTo(0, 0);
.graphics.lineTo(.a.x, 0);
.graphics.lineTo(.b.x, 400);
.graphics.lineTo(0, 400);
.graphics.lineTo(0, 0);
.graphics.moveTo(.a.x, 0);
.graphics.lineTo(550, 0);
.graphics.lineTo(550, 400);
.graphics.lineTo(.b.x, 400);
.graphics.lineTo(.a.x, 0);
.graphics.endFill();
.graphics.endFill();
.x = (.x = (
.x = (.x = -275)));
.y = (.y = (
.y = (.y = -200)));
.visible = true;
.visible = true;
(parent as MovieClip).gotoAndStop(_arg1);
count = 0;
state = SLASH;
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
}
}
}//package com.nitrome.game
Section 84
//TryAgainButton (com.nitrome.game.TryAgainButton)
package com.nitrome.game {
import flash.events.*;
public class TryAgainButton extends SimpleButton {
public function TryAgainButton(){
addFrameScript(0, frame1);
}
function doStuff():void{
NitromeGame.timeline.game.clearListeners();
Score.value = 0;
NitromeGame.level_score = 0;
NitromeGame.timeline.popup_holder.hidePopUp();
NitromeGame.transition.doTween("game_reset");
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
if (!NitromeGame.timeline.popup_holder.key_pressed){
doStuff();
};
}
}
}//package com.nitrome.game
Section 85
//ViewScoresButton (com.nitrome.game.ViewScoresButton)
package com.nitrome.game {
import flash.events.*;
public class ViewScoresButton extends SimpleButton {
public function ViewScoresButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("view_scores");
}
}
}//package com.nitrome.game
Section 86
//ArrowButton (com.nitrome.highscore.ArrowButton)
package com.nitrome.highscore {
import flash.events.*;
import com.nitrome.game.*;
public class ArrowButton extends SimpleButton {
var :HighScoreBoard;
public function ArrowButton(){
= (parent as HighScoreBoard);
visible = false;
}
public function hide():void{
visible = false;
}
override public function onClick(_arg1:MouseEvent):void{
if (name == "_prev_arrow"){
.shiftScoresPrev();
} else {
if (name == "_next_arrow"){
.shiftScoresNext();
};
};
}
public function show():void{
visible = true;
}
}
}//package com.nitrome.highscore
Section 87
//ClearButton (com.nitrome.highscore.ClearButton)
package com.nitrome.highscore {
import flash.events.*;
import com.nitrome.game.*;
public class ClearButton extends SimpleButton {
private var :ScoreSubmitPanel;
public function ClearButton(){
= (parent as ScoreSubmitPanel);
}
override public function onClick(_arg1:MouseEvent):void{
.clearName();
}
}
}//package com.nitrome.highscore
Section 88
//HighScoreBoard (com.nitrome.highscore.HighScoreBoard)
package com.nitrome.highscore {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class HighScoreBoard extends MovieClip {
public const MAX_DIGITS:int = 8;
private const MAX_RANK:int = 100;
public const NUM_LINES:int = 10;
public var _score_line_7:ScoreLine;
private var :Array;
private var :Boolean;
private var
:Boolean;// = false
public var loading_text:MovieClip;
public var _next_arrow:NextArrow;
private var :URLRequest;
private var :URLVariables;
public var _score_line_10:ScoreLine;
private var :ArrowButton;
public var _prev_arrow:PrevArrow;
private var
:int;
public var _score_line_1:ScoreLine;
public var _score_line_2:ScoreLine;
public var _score_line_3:ScoreLine;
public var _score_line_4:ScoreLine;
public var _score_line_5:ScoreLine;
public var _score_line_6:ScoreLine;
public var _score_line_8:ScoreLine;
public var _score_line_9:ScoreLine;
private var :URLLoader;
private var :ArrowButton;
public function HighScoreBoard(){
var _local1:int;
= false;
super();
= new Array(NUM_LINES);
if (NitromeGame.isAtURL(NitromeGame.NITROME)){
_local1 = 0;
while (_local1 < .length) {
[_local1] = (getChildByName(("_score_line_" + (_local1 + 1))) as HighScoreLine);
_local1++;
};
= (getChildByName("_prev_arrow") as ArrowButton);
= (getChildByName("_next_arrow") as ArrowButton);
= false;
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
addEventListener(Event.ENTER_FRAME, , false, 0, true);
} else {
gotoAndStop("hide");
};
}
public function (_arg1:int):void{
= _arg1;
= new URLLoader();
= new URLVariables();
= new URLRequest(NitromeGame.RETRIEVE_URL);
.method = URLRequestMethod.POST;
.data = ;
.dataFormat = URLLoaderDataFormat.VARIABLES;
.addEventListener(Event.COMPLETE, );
.addEventListener(IOErrorEvent.IO_ERROR, );
.min_rank = String(_arg1);
.game_name = NitromeGame.game_id;
.time_based = (NitromeGame.time_based) ? "1" : "0";
.load();
}
private function (_arg1:Event):void{
var _local2:String;
_local2 = _arg1.target.data.result;
(_local2);
= true;
}
private function init(_arg1:Event):void{
(1);
_arg1.target.removeEventListener(Event.ADDED_TO_STAGE, init);
}
public function shiftScoresPrev():void{
var _local1:int;
_local1 = (
- 10);
if (_local1 < 1){
_local1 = 1;
};
(_local1);
}
public function set zero_fill(_arg1:Boolean):void{
= _arg1;
}
private function (_arg1:Event):void{
if ((( ) && ((loading_text.alpha > 0)))){
loading_text.alpha = (loading_text.alpha - 0.1);
} else {
if ((( ) && ((loading_text.alpha <= 0)))){
_arg1.target.removeEventListener(Event.ENTER_FRAME, );
};
};
}
private function (_arg1:IOErrorEvent):void{
trace(("Retrieve scores failed: " + _arg1.text));
}
public function get zero_fill():Boolean{
return (
);
}
public function (_arg1:Array):void{
var _local2:int;
var _local3:String;
var _local4:String;
if (_arg1.length > 0){
_local2 = 0;
while (_local2 <= 9) {
_local3 = String(_arg1[_local2].user_name);
_local4 = String(_arg1[_local2].score);
if ((((_local3 == "")) || ((_local3 == null)))){
[_local2].hide();
.hide();
} else {
[_local2].displayData((
+ _local2), _local3, _local4);
};
_local2++;
};
} else {
trace("no leaderboard data");
};
}
public function (_arg1:String):void{
var _local2:int;
var _local3:Object;
if (_arg1 != "0"){
_local2 = 0;
while (_local2 < .length) {
_local3 = NitromeGame.getHighScoreLine(_arg1, (_local2 + 1));
if (_local3 == null){
[_local2].hide();
} else {
[_local2].displayData((
+ _local2), _local3.username, _local3.score);
};
_local2++;
};
if (NitromeGame.displayNextButton(_arg1)){
.show();
} else {
.hide();
};
if (NitromeGame.displayPreviousButton(_arg1)){
.show();
} else {
.hide();
};
};
}
public function shiftScoresNext():void{
var _local1:int;
_local1 = (
+ 10);
(_local1);
}
}
}//package com.nitrome.highscore
Section 89
//HighScoreLine (com.nitrome.highscore.HighScoreLine)
package com.nitrome.highscore {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class HighScoreLine extends Sprite {
private const FADE_SPEED:Number = 0.3;
private var
:int;
private var :TextField;
private var :TextField;
public var _score_text:TextField;
private var :Boolean;
private var score_text:TextField;
private var :int;
public var _rank_text:TextField;
public var _name_text:TextField;
private var :HighScoreBoard;
public function HighScoreLine(){
visible = false;
= false;
score_text = (getChildByName("_score_text") as TextField);
= (getChildByName("_name_text") as TextField);
= (getChildByName("_rank_text") as TextField);
= (parent as HighScoreBoard);
}
public function hide():void{
trace((name + " hide"));
visible = false;
= true;
}
private function (_arg1:Event):void{
if ( >=
){
alpha = (alpha + FADE_SPEED);
if (alpha >= 1){
_arg1.target.removeEventListener(Event.ENTER_FRAME, );
};
};
++;
}
public function displayData(_arg1:int, _arg2:String, _arg3:String):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
trace((name + " displayData:"));
.text = String((_arg1 + "."));
.text = _arg2.toUpperCase();
trace(((((_arg1 + ",") + _arg2) + ",") + _arg3));
if (.zero_fill){
_local4 = .MAX_DIGITS;
_local5 = _arg3.length;
_local6 = (_local4 - _local5);
_local7 = 1;
while (_local7 <= _local6) {
_arg3 = ("0" + _arg3);
_local7++;
};
score_text.text = _arg3;
} else {
score_text.text = _arg3;
};
alpha = 0;
visible = true;
= (((_arg1 - 1) % .NUM_LINES) * int((1 / FADE_SPEED)));
= 0;
addEventListener(Event.ENTER_FRAME, );
}
}
}//package com.nitrome.highscore
Section 90
//LetterButton (com.nitrome.highscore.LetterButton)
package com.nitrome.highscore {
import flash.events.*;
import com.nitrome.game.*;
import flash.text.*;
public class LetterButton extends SimpleButton {
private var :TextField;
public var _letter:TextField;
private var :String;
private var :ScoreSubmitPanel;
public static const up_col:int = 4485631;
public static const over_col:int = 0xFD006E;
public function LetterButton(){
= (parent as ScoreSubmitPanel);
= name;
= (getChildByName("_letter") as TextField);
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(_arg1:Event):void{
.text = ;
_arg1.target.removeEventListener(Event.ADDED_TO_STAGE, init);
}
override protected function updateGraphic():void{
if (over){
.textColor = over_col;
} else {
.textColor = up_col;
};
}
override public function onClick(_arg1:MouseEvent):void{
.addLetter( );
}
}
}//package com.nitrome.highscore
Section 91
//ScoreSubmitPanel (com.nitrome.highscore.ScoreSubmitPanel)
package com.nitrome.highscore {
import flash.display.*;
import flash.events.*;
import com.nitrome.game.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
public class ScoreSubmitPanel extends MovieClip {
private const MAX_LENGTH:Number = 10;
private var :URLLoader;
public var C:LetterButton;
public var D:LetterButton;
public var E:LetterButton;
public var F:LetterButton;
public var H:LetterButton;
public var I:LetterButton;
public var J:LetterButton;
public var L:LetterButton;
public var P:LetterButton;
public var K:LetterButton;
public var W:LetterButton;
public var X:LetterButton;
public var R:LetterButton;
public var T:LetterButton;
public var U:LetterButton;
public var V:LetterButton;
public var G:LetterButton;
public var Y:LetterButton;
private var :TextField;
public var S:LetterButton;
public var A:LetterButton;
public var N:LetterButton;
public var O:LetterButton;
public var _score_text:TextField;
public var Z:LetterButton;
public var M:LetterButton;
public var Q:LetterButton;
public var B:LetterButton;
private var score_text:TextField;
private var loading_clip:MovieClip;
public var _name_text:TextField;
private var :Boolean;
private var
:SubmitButton;
public var _submit_button:SubmitButton;
public var loading_black:MovieClip;
public var _clear_button:ClearButton;
private var
:URLRequest;
private var
:URLVariables;
public function ScoreSubmitPanel(){
if (NitromeGame.isAtURL(NitromeGame.NITROME)){
= (getChildByName("_submit_button") as SubmitButton);
= (getChildByName("_name_text") as TextField);
score_text = (getChildByName("_score_text") as TextField);
= false;
addEventListener(Event.ADDED_TO_STAGE, init);
} else {
gotoAndStop("hide");
};
}
public function addLetter(_arg1:String):void{
var _local2:String;
var _local3:String;
_local2 = .text;
if (_local2.length < MAX_LENGTH){
_arg1 = _arg1.toUpperCase();
_local3 = (_local2 + _arg1);
.text = _local3;
.enable();
};
}
private function (_arg1:IOErrorEvent):void{
trace(("Submit score failed: " + _arg1.text));
trace();
loading_black.gotoAndPlay(2);
}
public function clearName():void{
.disable();
.text = "";
}
private function keyPressed(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _arg1.charCode;
if ((((((_local2 >= 65)) && ((_local2 <= 90)))) || ((((_local2 >= 97)) && ((_local2 <= 122)))))){
addLetter(String.fromCharCode(_local2));
};
if ((((_arg1.keyCode == Keyboard.BACKSPACE)) || ((_arg1.keyCode == Keyboard.DELETE)))){
clearName();
};
}
private function (_arg1:Event):void{
trace("Score submitted");
loading_black.gotoAndPlay(2);
}
private function init(_arg1:Event):void{
score_text.text = ("YOUR SCORE IS " + Score.value);
trace(score_text.text);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.target.removeEventListener(Event.ADDED_TO_STAGE, init);
}
public function submitScore():void{
var _local1:String;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_local1 = .text;
if (_local1 != ""){
= new URLLoader();
= new URLVariables();
= new URLRequest(NitromeGame.SUBMIT_URL);
.method = URLRequestMethod.POST;
.data =
;
.addEventListener(Event.COMPLETE, );
.addEventListener(IOErrorEvent.IO_ERROR, );
.data_string = NitromeGame.getScoreData(Score.value, _local1);
.time_based = "0";
.data =
;
.load(
);
} else {
loading_black.gotoAndPlay(2);
};
}
}
}//package com.nitrome.highscore
Section 92
//SubmitButton (com.nitrome.highscore.SubmitButton)
package com.nitrome.highscore {
import flash.events.*;
import com.nitrome.game.*;
public class SubmitButton extends SimpleButton {
private var :Boolean;// = false
private var :Boolean;// = true
private var :ScoreSubmitPanel;
public function SubmitButton(){
= false;
= true;
super();
gotoAndStop("_up");
= (parent as ScoreSubmitPanel);
}
public function enable():void{
= false;
useHandCursor = true;
buttonMode = true;
updateGraphic();
}
override protected function updateGraphic():void{
if (((!(over)) || ())){
gotoAndStop("_up");
} else {
gotoAndStop("_over");
};
}
public function disable():void{
= true;
useHandCursor = false;
buttonMode = false;
updateGraphic();
}
override public function onClick(_arg1:MouseEvent):void{
if (){
gotoAndStop("_up");
} else {
if (!){
.submitScore();
= true;
};
};
}
}
}//package com.nitrome.highscore
Section 93
//Lock (com.nitrome.util.Lock)
package com.nitrome.util {
import flash.display.*;
import flash.net.*;
public class Lock extends MovieClip {
public function Lock(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
public static function urlLock(_arg1:Stage):void{
var _local2:String;
if (NitromeGame.isAtURL(NitromeGame.ARMOR) == true){
} else {
_arg1.addChild(new (Lock));
_local2 = ("http://www.nitrome.com/games/" + NitromeGame.game_id);
navigateToURL(new URLRequest(_local2), "_blank");
};
}
}
}//package com.nitrome.util
Section 94
//MD5 (com.nitrome.util.MD5)
package com.nitrome.util {
public class MD5 {
private var :int;// = 8
private var :String;// = ""
public function MD5(_arg1:String=null, _arg2:int=0){
= "";
= 8;
super();
if (_arg1 != null){
this. = _arg1;
};
if (((((!((_arg2 == 0))) && ((_arg2 == 8)))) || ((_arg2 == 16)))){
this. = _arg2;
};
}
private function (_arg1:Array):String{
var _local2:String;
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
_local3 = new String("");
_local4 = 0;
while (_local4 < (_arg1.length * 4)) {
_local5 = (((((_arg1[(_local4 >> 2)] >> (8 * (_local4 % 4))) & 0xFF) << 16) | (((_arg1[((_local4 + 1) >> 2)] >> (8 * ((_local4 + 1) % 4))) & 0xFF) << 8)) | ((_arg1[((_local4 + 2) >> 2)] >> (8 * ((_local4 + 2) % 4))) & 0xFF));
_local6 = 0;
while (_local6 < 4) {
if (((_local4 * 8) + (_local6 * 6)) > (_arg1.length * 32)){
_local3 = (_local3 + );
} else {
_local3 = (_local3 + _local2.charAt(((_local5 >> (6 * (3 - _local6))) & 63)));
};
_local6++;
};
_local4 = (_local4 + 3);
};
return (_local3);
}
private function (_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):int{
return ((
(((_arg2, _arg1), (_arg4, _arg6)), _arg5), _arg3));
}
private function (_arg1:Array):String{
var _local2:String;
var _local3:int;
var _local4:int;
_local2 = new String("");
_local3 = ((1 << ) - 1);
_local4 = 0;
while (_local4 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local4 >> 5)] >>> (_local4 % 32)) & _local3)));
_local4 = (_local4 + );
};
return (_local2);
}
private function (_arg1:String, _arg2:String):Array{
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:int;
var _local7:Array;
_local3 = new Array((_arg1));
if (_local3.length > 16){
_local3 = (_local3, (_arg1.length * ));
};
_local4 = new Array(16);
_local5 = new Array(16);
_local6 = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
_local7 = new Array((_local4.concat((_arg2)), (0x0200 + (_arg2.length * ))));
return ((_local5.concat(_local7), (0x0200 + 128)));
}
private function (_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return ((((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private function (_arg1:String, _arg2:String):String{
return (((_arg1, _arg2)));
}
public function hash(_arg1:String):String{
return ( (_arg1));
}
private function (_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private function (_arg1:String):String{
return ((((_arg1), (_arg1.length * ))));
}
private function
(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
private function (_arg1:Array, _arg2:int):Array{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
_local3 = 1732584193;
_local4 = -271733879;
_local5 = -1732584194;
_local6 = 271733878;
_local7 = 0;
while (_local7 < _arg1.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734);
_local3 =
(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558);
_local6 =
(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463);
_local5 =
(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562);
_local4 =
(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556);
_local3 =
(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060);
_local6 =
(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353);
_local5 =
(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632);
_local4 =
(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640);
_local3 =
(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174);
_local6 =
(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222);
_local5 =
(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979);
_local4 =
(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189);
_local3 =
(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487);
_local6 =
(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835);
_local5 =
(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520);
_local4 =
(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649);
_local3 = (_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070);
_local6 = (_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379);
_local5 = (_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259);
_local4 = (_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551);
_local3 = (_local3, _local8);
_local4 = (_local4, _local9);
_local5 = (_local5, _local10);
_local6 = (_local6, _local11);
_local7 = (_local7 + 16);
};
return (new Array(_local3, _local4, _local5, _local6));
}
private function (_arg1:String):String{
return ((((_arg1), (_arg1.length * ))));
}
private function
(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return ((((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7));
}
private function (_arg1:String, _arg2:String):String{
return (((_arg1, _arg2)));
}
private function (_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
_local2 = new Array();
_local3 = ((1 << ) - 1);
_local4 = 0;
while (_local4 < (_arg1.length * )) {
_local2[(_local4 >> 5)] = (_local2[(_local4 >> 5)] | ((_arg1.charCodeAt((_local4 / )) & _local3) << (_local4 % 32)));
_local4 = (_local4 + );
};
return (_local2);
}
private function (_arg1:Array):String{
var _local2:String;
var _local3:String;
var _local4:int;
_local2 = "0123456789abcdef";
_local3 = new String("");
_local4 = 0;
while (_local4 < (_arg1.length * 4)) {
_local3 = (_local3 + (_local2.charAt(((_arg1[(_local4 >> 2)] >> (((_local4 % 4) * 8) + 4)) & 15)) + _local2.charAt(((_arg1[(_local4 >> 2)] >> ((_local4 % 4) * 8)) & 15))));
_local4++;
};
return (_local3);
}
private function (_arg1:Number, _arg2:Number):Number{
var _local3:int;
var _local4:int;
_local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
_local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
private function (_arg1:String):String{
return ((((_arg1), (_arg1.length * ))));
}
private function (_arg1:String, _arg2:String):String{
return (((_arg1, _arg2)));
}
private function (_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return ((((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
}
}//package com.nitrome.util
Section 95
//ag_intro_mc_533 (finalninja_fla.ag_intro_mc_533)
package finalninja_fla {
import flash.display.*;
public dynamic class ag_intro_mc_533 extends MovieClip {
public var armor_button:SimpleButton;
public function ag_intro_mc_533(){
addFrameScript(0, frame1, 217, );
}
function (){
(parent as MovieClip).gotoAndStop("nitrome");
stop();
}
function frame1(){
play();
}
}
}//package finalninja_fla
Section 96
//aiiee_515 (finalninja_fla.aiiee_515)
package finalninja_fla {
import flash.display.*;
public dynamic class aiiee_515 extends MovieClip {
public function aiiee_515(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 97
//alert_499 (finalninja_fla.alert_499)
package finalninja_fla {
import flash.display.*;
public dynamic class alert_499 extends MovieClip {
public function alert_499(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 98
//alert_panel_566 (finalninja_fla.alert_panel_566)
package finalninja_fla {
import flash.display.*;
import flash.text.*;
public dynamic class alert_panel_566 extends MovieClip {
public var alert_time:TextField;
}
}//package finalninja_fla
Section 99
//bang1_500 (finalninja_fla.bang1_500)
package finalninja_fla {
import flash.display.*;
public dynamic class bang1_500 extends MovieClip {
public function bang1_500(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 100
//bang2_501 (finalninja_fla.bang2_501)
package finalninja_fla {
import flash.display.*;
public dynamic class bang2_501 extends MovieClip {
public function bang2_501(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 101
//bang3_502 (finalninja_fla.bang3_502)
package finalninja_fla {
import flash.display.*;
public dynamic class bang3_502 extends MovieClip {
public function bang3_502(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 102
//bang4_503 (finalninja_fla.bang4_503)
package finalninja_fla {
import flash.display.*;
public dynamic class bang4_503 extends MovieClip {
public function bang4_503(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 103
//bangs1_440 (finalninja_fla.bangs1_440)
package finalninja_fla {
import flash.display.*;
public dynamic class bangs1_440 extends MovieClip {
public function bangs1_440(){
addFrameScript(0, frame1);
}
function frame1(){
NitromeGame.sound_manager.playSound(("bang" + (1 + ((Math.random() * 3) >> 0))));
}
}
}//package finalninja_fla
Section 104
//bangs2_441 (finalninja_fla.bangs2_441)
package finalninja_fla {
import flash.display.*;
public dynamic class bangs2_441 extends MovieClip {
public function bangs2_441(){
addFrameScript(17,
);
}
function
(){
NitromeGame.sound_manager.playSound(("bang" + (1 + ((Math.random() * 3) >> 0))));
}
}
}//package finalninja_fla
Section 105
//bangs3_442 (finalninja_fla.bangs3_442)
package finalninja_fla {
import flash.display.*;
public dynamic class bangs3_442 extends MovieClip {
public function bangs3_442(){
addFrameScript(45, frame46);
}
function frame46(){
NitromeGame.sound_manager.playSound(("bang" + (1 + ((Math.random() * 3) >> 0))));
}
}
}//package finalninja_fla
Section 106
//bettergunfire_367 (finalninja_fla.bettergunfire_367)
package finalninja_fla {
import flash.display.*;
public dynamic class bettergunfire_367 extends MovieClip {
public function bettergunfire_367(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package finalninja_fla
Section 107
//boss_panel1_571 (finalninja_fla.boss_panel1_571)
package finalninja_fla {
import flash.display.*;
public dynamic class boss_panel1_571 extends MovieClip {
public function boss_panel1_571(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 108
//boss_panel2_574 (finalninja_fla.boss_panel2_574)
package finalninja_fla {
import flash.display.*;
public dynamic class boss_panel2_574 extends MovieClip {
public function boss_panel2_574(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 109
//bossrunaway_603 (finalninja_fla.bossrunaway_603)
package finalninja_fla {
import flash.display.*;
public dynamic class bossrunaway_603 extends MovieClip {
public function bossrunaway_603(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package finalninja_fla
Section 110
//chop_504 (finalninja_fla.chop_504)
package finalninja_fla {
import flash.display.*;
public dynamic class chop_504 extends MovieClip {
public function chop_504(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 111
//coins_517 (finalninja_fla.coins_517)
package finalninja_fla {
import flash.display.*;
public dynamic class coins_517 extends MovieClip {
public function coins_517(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 112
//cough_511 (finalninja_fla.cough_511)
package finalninja_fla {
import flash.display.*;
public dynamic class cough_511 extends MovieClip {
public function cough_511(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 113
//electric_518 (finalninja_fla.electric_518)
package finalninja_fla {
import flash.display.*;
public dynamic class electric_518 extends MovieClip {
public function electric_518(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 114
//endinganim_553 (finalninja_fla.endinganim_553)
package finalninja_fla {
import flash.display.*;
public dynamic class endinganim_553 extends MovieClip {
public function endinganim_553(){
addFrameScript(765, );
}
function (){
stop();
}
}
}//package finalninja_fla
Section 115
//endtextstuff_561 (finalninja_fla.endtextstuff_561)
package finalninja_fla {
import flash.display.*;
import com.nitrome.game.*;
import flash.text.*;
public dynamic class endtextstuff_561 extends MovieClip {
public var score_text:TextField;
public function endtextstuff_561(){
addFrameScript(0, frame1);
}
function frame1(){
score_text.text = ("your score is " + Score.value);
}
}
}//package finalninja_fla
Section 116
//enemy_health_panel_569 (finalninja_fla.enemy_health_panel_569)
package finalninja_fla {
import flash.display.*;
public dynamic class enemy_health_panel_569 extends MovieClip {
public var bar:MovieClip;
}
}//package finalninja_fla
Section 117
//fallnin_58 (finalninja_fla.fallnin_58)
package finalninja_fla {
import flash.display.*;
public dynamic class fallnin_58 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 118
//fincrouch_18 (finalninja_fla.fincrouch_18)
package finalninja_fla {
import flash.display.*;
public dynamic class fincrouch_18 extends MovieClip {
public var body:MovieClip;
}
}//package finalninja_fla
Section 119
//finjump_21 (finalninja_fla.finjump_21)
package finalninja_fla {
import flash.display.*;
public dynamic class finjump_21 extends MovieClip {
public var body:MovieClip;
}
}//package finalninja_fla
Section 120
//game_music_holder_520 (finalninja_fla.game_music_holder_520)
package finalninja_fla {
import flash.display.*;
public dynamic class game_music_holder_520 extends MovieClip {
public function game_music_holder_520(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package finalninja_fla
Section 121
//health_panel_564 (finalninja_fla.health_panel_564)
package finalninja_fla {
import flash.display.*;
public dynamic class health_panel_564 extends MovieClip {
public function health_panel_564(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 122
//help_movie_479 (finalninja_fla.help_movie_479)
package finalninja_fla {
import flash.display.*;
public dynamic class help_movie_479 extends MovieClip {
public function help_movie_479(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 123
//help5_493 (finalninja_fla.help5_493)
package finalninja_fla {
import flash.display.*;
public dynamic class help5_493 extends MovieClip {
public var man:MovieClip;
}
}//package finalninja_fla
Section 124
//jump_512 (finalninja_fla.jump_512)
package finalninja_fla {
import flash.display.*;
public dynamic class jump_512 extends MovieClip {
public function jump_512(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 125
//jumpnin_22 (finalninja_fla.jumpnin_22)
package finalninja_fla {
import flash.display.*;
public dynamic class jumpnin_22 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 126
//jumpnin_help_482 (finalninja_fla.jumpnin_help_482)
package finalninja_fla {
import flash.display.*;
public dynamic class jumpnin_help_482 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 127
//loading_black_531 (finalninja_fla.loading_black_531)
package finalninja_fla {
import flash.display.*;
public dynamic class loading_black_531 extends MovieClip {
public var loading_text:MovieClip;
public function loading_black_531(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
NitromeGame.timeline.gotoAndStop("view_scores");
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 128
//loading_screen_577 (finalninja_fla.loading_screen_577)
package finalninja_fla {
import flash.display.*;
import com.nitrome.game.*;
public dynamic class loading_screen_577 extends MovieClip {
public var tt:Transition;
public function loading_screen_577(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
this.tt.doTween("clear");
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 129
//MainTimeline (finalninja_fla.MainTimeline)
package finalninja_fla {
import flash.display.*;
import com.nitrome.engine_specific.*;
import flash.events.*;
import flash.geom.*;
import com.nitrome.game.*;
import com.nitrome.util.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var score_panel:MovieClip;
public var shaker:MovieClip;
public var level_1:LevelChooserButton;
public var level_2:LevelChooserButton;
public var level_3:LevelChooserButton;
public var level_6:LevelChooserButton;
public var level_7:LevelChooserButton;
public var level_9:LevelChooserButton;
public var level_8:LevelChooserButton;
public var level_4:LevelChooserButton;
public var level_5:LevelChooserButton;
public var health_panel:MovieClip;
public var :ContextMenu;
public var loading_clip:MovieClip;
public var skip_story_button:SkipStoryButton;
public var tt:Transition;
public var sound_manager:SoundManager;
public var text_panel:MovieClip;
public var popup_holder:PopUpHolder;
public var music_toggle:MusicToggle;
public var info:TextField;
public var level_10:LevelChooserButton;
public var level_11:LevelChooserButton;
public var level_13:LevelChooserButton;
public var level_14:LevelChooserButton;
public var level_15:LevelChooserButton;
public var level_17:LevelChooserButton;
public var level_12:LevelChooserButton;
public var level_16:LevelChooserButton;
public var level_18:LevelChooserButton;
public var level_19:LevelChooserButton;
public var level_20:LevelChooserButton;
public var back:Back;
public var pause_game_button:PauseButton;
public var alert_panel:MovieClip;
public var fx_toggle:FxToggle;
public var boss_panel2:MovieClip;
public var msg_panel:MsgPanel;
public var boss_panel1:MovieClip;
public var enemy_health_panel:MovieClip;
public var scroll_border:MovieClip;
public var game:Game;
public function MainTimeline(){
addFrameScript(2, , 10, frame11, 20, frame21, 30, , 40, , 50, , 60, frame61, 70, , 80, , 90, , 100,
, 111, , 120, );
}
function frame11(){
stop();
NitromeGame.transition = tt;
Key.init(stage);
Score.init();
NitromeGame.init(this, "finalninja", "jitsu_", 20);
= new ContextMenu();
.hideBuiltInItems();
this.contextMenu = ;
sound_manager = new SoundManager();
sound_manager.x = -50;
sound_manager.y = -50;
addChild(sound_manager);
}
function (){
stop();
}
function frame21(){
stop();
}
function (){
stage.quality = StageQuality.LOW;
Lock.urlLock(stage);
stop();
}
function (){
stop();
}
function (){
stop();
}
function frame61(){
stop();
}
function (){
stop();
}
function (){
stop();
}
function (){
stage.quality = StageQuality.LOW;
game = new Game(shaker.canvas, shaker, back);
stop();
}
function
(){
game.clearAll();
game = null;
loading_clip.gotoAndStop("loading");
gotoAndStop("game");
}
function (){
stop();
}
function (){
stop();
}
}
}//package finalninja_fla
Section 130
//menu_music_holder_521 (finalninja_fla.menu_music_holder_521)
package finalninja_fla {
import flash.display.*;
public dynamic class menu_music_holder_521 extends MovieClip {
public function menu_music_holder_521(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package finalninja_fla
Section 131
//ninrun_57 (finalninja_fla.ninrun_57)
package finalninja_fla {
import flash.display.*;
public dynamic class ninrun_57 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 132
//ninrun_help_481 (finalninja_fla.ninrun_help_481)
package finalninja_fla {
import flash.display.*;
public dynamic class ninrun_help_481 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 133
//ninswing_60 (finalninja_fla.ninswing_60)
package finalninja_fla {
import flash.display.*;
public dynamic class ninswing_60 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 134
//ninswing_help_489 (finalninja_fla.ninswing_help_489)
package finalninja_fla {
import flash.display.*;
public dynamic class ninswing_help_489 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 135
//nitrome_intro_537 (finalninja_fla.nitrome_intro_537)
package finalninja_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class nitrome_intro_537 extends MovieClip {
public var _t:MovieClip;
public var lines:MovieClip;
public var _r:MovieClip;
public var :Array;
public var :Array;
public var _e:MovieClip;
public var _m:MovieClip;
public var _n:MovieClip;
public var _i:MovieClip;
public var _o:MovieClip;
public function nitrome_intro_537(){
addFrameScript(0, frame1, 153, );
}
function (){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
NitromeGame.transition.doTween("pre_title_screen");
stop();
}
function frame1(){
= [172, 199, 208, 234, 261, 287, 329];
= new Array();
[0] = "_n";
[1] = "_i";
[2] = "_t";
[3] = "_r";
[4] = "_o";
[5] = "_m";
[6] = "_e";
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
}
public function onEnterFrame(_arg1:Event):void{
var _local2:int;
lines.graphics.clear();
lines.graphics.lineStyle(2, 0);
_local2 = 0;
while (_local2 < .length) {
if (this[[_local2]] != null){
lines.graphics.moveTo(([_local2] + (this[[_local2]].width * 0.5)), -200);
lines.graphics.lineTo(((275 + this[[_local2]].x) + (this[[_local2]].width * 0.5)), ((200 + this[[_local2]].y) + (this[[_local2]].height * 0.5)));
};
_local2++;
};
}
}
}//package finalninja_fla
Section 136
//oishii_513 (finalninja_fla.oishii_513)
package finalninja_fla {
import flash.display.*;
public dynamic class oishii_513 extends MovieClip {
public function oishii_513(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 137
//popup_clip_476 (finalninja_fla.popup_clip_476)
package finalninja_fla {
import flash.display.*;
import com.nitrome.game.*;
public dynamic class popup_clip_476 extends MovieClip {
public var try_again_button:TryAgainButton;
public var ticker_score:ScoreTicker;
public var next_level_button:NextLevelButton;
public var continue_end_button:ContinueEndButton;
public function popup_clip_476(){
addFrameScript(0, frame1, 1, frame2, 15, , 29, frame30, 45, frame46, 60, frame61);
}
function (){
ticker_score.startCount(Score.value, 1000);
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame30(){
stop();
}
function frame46(){
stop();
}
function frame61(){
stop();
}
}
}//package finalninja_fla
Section 138
//preloader_assets_3 (finalninja_fla.preloader_assets_3)
package finalninja_fla {
import flash.display.*;
public dynamic class preloader_assets_3 extends MovieClip {
public function preloader_assets_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 139
//score_counter_clip_478 (finalninja_fla.score_counter_clip_478)
package finalninja_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import com.nitrome.game.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class score_counter_clip_478 extends MovieClip {
public var ticker_cream:ScoreTicker;
public var ticker_level:ScoreTicker;
public var ticker_score:ScoreTicker;
public var ticker_buddha:ScoreTicker;
public var ticker_dodger:ScoreTicker;
public var ticker_stealth:ScoreTicker;
public function score_counter_clip_478(){
addFrameScript(19, frame20);
}
function frame20(){
ticker_stealth.setOnFinish("ticker_dodger", (NitromeGame.bonus.dodger.value) ? 1000 : 0, 200);
ticker_dodger.setOnFinish("ticker_buddha", (NitromeGame.bonus.buddha.value) ? 10000 : 0, 2000);
ticker_buddha.setOnFinish("ticker_cream", ((NitromeGame.bonus.cash_count.value == 0)) ? 1000 : 0, 200);
ticker_cream.setOnFinish("ticker_level", NitromeGame.level_score, 500);
ticker_level.setOnFinish("ticker_score", Score.value, 1000);
ticker_stealth.startCount((NitromeGame.bonus.stealth.value) ? 1000 : 0, 200);
stop();
}
}
}//package finalninja_fla
Section 140
//score_panel_565 (finalninja_fla.score_panel_565)
package finalninja_fla {
import flash.display.*;
import flash.text.*;
public dynamic class score_panel_565 extends MovieClip {
public var score:TextField;
}
}//package finalninja_fla
Section 141
//shaker_562 (finalninja_fla.shaker_562)
package finalninja_fla {
import flash.display.*;
public dynamic class shaker_562 extends MovieClip {
public var canvas:holder;
}
}//package finalninja_fla
Section 142
//shot_505 (finalninja_fla.shot_505)
package finalninja_fla {
import flash.display.*;
public dynamic class shot_505 extends MovieClip {
public function shot_505(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 143
//smithdie_519 (finalninja_fla.smithdie_519)
package finalninja_fla {
import flash.display.*;
public dynamic class smithdie_519 extends MovieClip {
public function smithdie_519(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 144
//smithhit_514 (finalninja_fla.smithhit_514)
package finalninja_fla {
import flash.display.*;
public dynamic class smithhit_514 extends MovieClip {
public function smithhit_514(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 145
//star_hit_506 (finalninja_fla.star_hit_506)
package finalninja_fla {
import flash.display.*;
public dynamic class star_hit_506 extends MovieClip {
public function star_hit_506(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 146
//stealthnin_56 (finalninja_fla.stealthnin_56)
package finalninja_fla {
import flash.display.*;
public dynamic class stealthnin_56 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 147
//story_anim_579 (finalninja_fla.story_anim_579)
package finalninja_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import com.nitrome.game.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class story_anim_579 extends MovieClip {
public function story_anim_579(){
addFrameScript(0, frame1, 74, , 1374, );
}
function (){
NitromeGame.sound_manager.playMusicFadeIn(SoundManager.GAME);
}
function frame1(){
NitromeGame.sound_manager.stopMusicFadeOut();
}
function (){
NitromeGame.timeline.skip_story_button.clearListeners();
NitromeGame.transition.doTween("game");
stop();
}
}
}//package finalninja_fla
Section 148
//swdefend_29 (finalninja_fla.swdefend_29)
package finalninja_fla {
import flash.display.*;
public dynamic class swdefend_29 extends MovieClip {
public function swdefend_29(){
addFrameScript(0, frame1);
}
function frame1(){
NitromeGame.sound_manager.playSound("tang");
}
}
}//package finalninja_fla
Section 149
//swjumpfin_31 (finalninja_fla.swjumpfin_31)
package finalninja_fla {
import flash.display.*;
public dynamic class swjumpfin_31 extends MovieClip {
public function swjumpfin_31(){
addFrameScript(6, , 21, );
}
function (){
NitromeGame.sound_manager.playSound("sword1");
}
function (){
NitromeGame.sound_manager.playSound("chop");
}
}
}//package finalninja_fla
Section 150
//sword1_507 (finalninja_fla.sword1_507)
package finalninja_fla {
import flash.display.*;
public dynamic class sword1_507 extends MovieClip {
public function sword1_507(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 151
//sword2_508 (finalninja_fla.sword2_508)
package finalninja_fla {
import flash.display.*;
public dynamic class sword2_508 extends MovieClip {
public function sword2_508(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 152
//swstandinattack_30 (finalninja_fla.swstandinattack_30)
package finalninja_fla {
import flash.display.*;
public dynamic class swstandinattack_30 extends MovieClip {
public function swstandinattack_30(){
addFrameScript(0, frame1, 4, );
}
function frame1(){
NitromeGame.sound_manager.playSound("sword2");
}
function (){
NitromeGame.sound_manager.playSound("chop");
}
}
}//package finalninja_fla
Section 153
//swwaitdef_33 (finalninja_fla.swwaitdef_33)
package finalninja_fla {
import flash.display.*;
public dynamic class swwaitdef_33 extends MovieClip {
public function swwaitdef_33(){
addFrameScript(7,
);
}
function
(){
stop();
}
}
}//package finalninja_fla
Section 154
//tang_509 (finalninja_fla.tang_509)
package finalninja_fla {
import flash.display.*;
public dynamic class tang_509 extends MovieClip {
public function tang_509(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 155
//text_panel_567 (finalninja_fla.text_panel_567)
package finalninja_fla {
import flash.display.*;
public dynamic class text_panel_567 extends MovieClip {
public var panel:MovieClip;
public function text_panel_567(){
addFrameScript(0, frame1, 14,
);
}
function
(){
stop();
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 156
//text_panel_panel_568 (finalninja_fla.text_panel_panel_568)
package finalninja_fla {
import flash.display.*;
import flash.text.*;
public dynamic class text_panel_panel_568 extends MovieClip {
public var message_text:TextField;
}
}//package finalninja_fla
Section 157
//title_anim_547 (finalninja_fla.title_anim_547)
package finalninja_fla {
import flash.display.*;
import com.nitrome.game.*;
public dynamic class title_anim_547 extends MovieClip {
public function title_anim_547(){
addFrameScript(72, );
}
function (){
NitromeGame.sound_manager.playMusicFadeIn(SoundManager.MENU);
NitromeGame.timeline.gotoAndStop("title_screen");
stop();
}
}
}//package finalninja_fla
Section 158
//vignette_601 (finalninja_fla.vignette_601)
package finalninja_fla {
import flash.display.*;
import com.nitrome.engine_specific.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class vignette_601 extends MovieClip {
public var back:Back;
public function vignette_601(){
addFrameScript(207, );
}
function (){
NitromeGame.timeline.skip_story_button.clearListeners();
NitromeGame.transition.doTween("game");
stop();
}
}
}//package finalninja_fla
Section 159
//waitinnin_61 (finalninja_fla.waitinnin_61)
package finalninja_fla {
import flash.display.*;
public dynamic class waitinnin_61 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 160
//waitnin_19 (finalninja_fla.waitnin_19)
package finalninja_fla {
import flash.display.*;
public dynamic class waitnin_19 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 161
//waitnin_help_484 (finalninja_fla.waitnin_help_484)
package finalninja_fla {
import flash.display.*;
public dynamic class waitnin_help_484 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 162
//waitnin_redy_help_485 (finalninja_fla.waitnin_redy_help_485)
package finalninja_fla {
import flash.display.*;
public dynamic class waitnin_redy_help_485 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 163
//waitnin_redy_throw_486 (finalninja_fla.waitnin_redy_throw_486)
package finalninja_fla {
import flash.display.*;
public dynamic class waitnin_redy_throw_486 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 164
//wallnin_59 (finalninja_fla.wallnin_59)
package finalninja_fla {
import flash.display.*;
public dynamic class wallnin_59 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 165
//wallnin_help_492 (finalninja_fla.wallnin_help_492)
package finalninja_fla {
import flash.display.*;
public dynamic class wallnin_help_492 extends MovieClip {
public var right_eye:MovieClip;
public var left_eye:MovieClip;
}
}//package finalninja_fla
Section 166
//wom_510 (finalninja_fla.wom_510)
package finalninja_fla {
import flash.display.*;
public dynamic class wom_510 extends MovieClip {
public function wom_510(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 167
//yatta_516 (finalninja_fla.yatta_516)
package finalninja_fla {
import flash.display.*;
public dynamic class yatta_516 extends MovieClip {
public function yatta_516(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package finalninja_fla
Section 168
//mcAnimation_5 (MiniclipAS3Intro_fla.mcAnimation_5)
package MiniclipAS3Intro_fla {
import flash.display.*;
public dynamic class mcAnimation_5 extends MovieClip {
public function mcAnimation_5(){
addFrameScript(120, );
}
function (){
stop();
(parent as MiniclipIntro).mcBackground.play();
}
}
}//package MiniclipAS3Intro_fla
Section 169
//mcBackground_3 (MiniclipAS3Intro_fla.mcBackground_3)
package MiniclipAS3Intro_fla {
import flash.display.*;
public dynamic class mcBackground_3 extends MovieClip {
public var miniclipLink:SimpleButton;
public function mcBackground_3(){
addFrameScript(0, frame1, 11, );
}
function (){
stop();
(parent as MiniclipIntro).finished();
}
function frame1(){
stop();
}
}
}//package MiniclipAS3Intro_fla
Section 170
//ArrowMC1 (ArrowMC1)
package {
import flash.display.*;
public dynamic class ArrowMC1 extends Sprite {
}
}//package
Section 171
//ArrowMC2 (ArrowMC2)
package {
import flash.display.*;
public dynamic class ArrowMC2 extends Sprite {
}
}//package
Section 172
//ArrowMC3 (ArrowMC3)
package {
import flash.display.*;
public dynamic class ArrowMC3 extends Sprite {
}
}//package
Section 173
//ArrowMC4 (ArrowMC4)
package {
import flash.display.*;
public dynamic class ArrowMC4 extends Sprite {
}
}//package
Section 174
//BackMC1 (BackMC1)
package {
import flash.display.*;
public dynamic class BackMC1 extends Sprite {
}
}//package
Section 175
//BackMC10 (BackMC10)
package {
import flash.display.*;
public dynamic class BackMC10 extends Sprite {
}
}//package
Section 176
//BackMC11 (BackMC11)
package {
import flash.display.*;
public dynamic class BackMC11 extends Sprite {
}
}//package
Section 177
//BackMC12 (BackMC12)
package {
import flash.display.*;
public dynamic class BackMC12 extends Sprite {
}
}//package
Section 178
//BackMC13 (BackMC13)
package {
import flash.display.*;
public dynamic class BackMC13 extends Sprite {
}
}//package
Section 179
//BackMC14 (BackMC14)
package {
import flash.display.*;
public dynamic class BackMC14 extends Sprite {
}
}//package
Section 180
//BackMC15 (BackMC15)
package {
import flash.display.*;
public dynamic class BackMC15 extends Sprite {
}
}//package
Section 181
//BackMC16 (BackMC16)
package {
import flash.display.*;
public dynamic class BackMC16 extends Sprite {
}
}//package
Section 182
//BackMC17 (BackMC17)
package {
import flash.display.*;
public dynamic class BackMC17 extends Sprite {
}
}//package
Section 183
//BackMC18 (BackMC18)
package {
import flash.display.*;
public dynamic class BackMC18 extends Sprite {
}
}//package
Section 184
//BackMC19 (BackMC19)
package {
import flash.display.*;
public dynamic class BackMC19 extends Sprite {
}
}//package
Section 185
//BackMC2 (BackMC2)
package {
import flash.display.*;
public dynamic class BackMC2 extends Sprite {
}
}//package
Section 186
//BackMC20 (BackMC20)
package {
import flash.display.*;
public dynamic class BackMC20 extends Sprite {
}
}//package
Section 187
//BackMC21 (BackMC21)
package {
import flash.display.*;
public dynamic class BackMC21 extends Sprite {
}
}//package
Section 188
//BackMC22 (BackMC22)
package {
import flash.display.*;
public dynamic class BackMC22 extends Sprite {
}
}//package
Section 189
//BackMC23 (BackMC23)
package {
import flash.display.*;
public dynamic class BackMC23 extends Sprite {
}
}//package
Section 190
//BackMC24 (BackMC24)
package {
import flash.display.*;
public dynamic class BackMC24 extends Sprite {
}
}//package
Section 191
//BackMC25 (BackMC25)
package {
import flash.display.*;
public dynamic class BackMC25 extends Sprite {
}
}//package
Section 192
//BackMC26 (BackMC26)
package {
import flash.display.*;
public dynamic class BackMC26 extends Sprite {
}
}//package
Section 193
//BackMC27 (BackMC27)
package {
import flash.display.*;
public dynamic class BackMC27 extends Sprite {
}
}//package
Section 194
//BackMC28 (BackMC28)
package {
import flash.display.*;
public dynamic class BackMC28 extends Sprite {
}
}//package
Section 195
//BackMC29 (BackMC29)
package {
import flash.display.*;
public dynamic class BackMC29 extends Sprite {
}
}//package
Section 196
//BackMC3 (BackMC3)
package {
import flash.display.*;
public dynamic class BackMC3 extends Sprite {
}
}//package
Section 197
//BackMC30 (BackMC30)
package {
import flash.display.*;
public dynamic class BackMC30 extends Sprite {
}
}//package
Section 198
//BackMC31 (BackMC31)
package {
import flash.display.*;
public dynamic class BackMC31 extends Sprite {
}
}//package
Section 199
//BackMC32 (BackMC32)
package {
import flash.display.*;
public dynamic class BackMC32 extends Sprite {
}
}//package
Section 200
//BackMC33 (BackMC33)
package {
import flash.display.*;
public dynamic class BackMC33 extends Sprite {
}
}//package
Section 201
//BackMC34 (BackMC34)
package {
import flash.display.*;
public dynamic class BackMC34 extends Sprite {
}
}//package
Section 202
//BackMC35 (BackMC35)
package {
import flash.display.*;
public dynamic class BackMC35 extends Sprite {
}
}//package
Section 203
//BackMC36 (BackMC36)
package {
import flash.display.*;
public dynamic class BackMC36 extends Sprite {
}
}//package
Section 204
//BackMC37 (BackMC37)
package {
import flash.display.*;
public dynamic class BackMC37 extends Sprite {
}
}//package
Section 205
//BackMC38 (BackMC38)
package {
import flash.display.*;
public dynamic class BackMC38 extends Sprite {
}
}//package
Section 206
//BackMC39 (BackMC39)
package {
import flash.display.*;
public dynamic class BackMC39 extends Sprite {
}
}//package
Section 207
//BackMC4 (BackMC4)
package {
import flash.display.*;
public dynamic class BackMC4 extends Sprite {
}
}//package
Section 208
//BackMC40 (BackMC40)
package {
import flash.display.*;
public dynamic class BackMC40 extends Sprite {
}
}//package
Section 209
//BackMC41 (BackMC41)
package {
import flash.display.*;
public dynamic class BackMC41 extends Sprite {
}
}//package
Section 210
//BackMC42 (BackMC42)
package {
import flash.display.*;
public dynamic class BackMC42 extends Sprite {
}
}//package
Section 211
//BackMC43 (BackMC43)
package {
import flash.display.*;
public dynamic class BackMC43 extends Sprite {
}
}//package
Section 212
//BackMC44 (BackMC44)
package {
import flash.display.*;
public dynamic class BackMC44 extends Sprite {
}
}//package
Section 213
//BackMC45 (BackMC45)
package {
import flash.display.*;
public dynamic class BackMC45 extends Sprite {
}
}//package
Section 214
//BackMC46 (BackMC46)
package {
import flash.display.*;
public dynamic class BackMC46 extends Sprite {
}
}//package
Section 215
//BackMC47 (BackMC47)
package {
import flash.display.*;
public dynamic class BackMC47 extends Sprite {
}
}//package
Section 216
//BackMC48 (BackMC48)
package {
import flash.display.*;
public dynamic class BackMC48 extends Sprite {
}
}//package
Section 217
//BackMC49 (BackMC49)
package {
import flash.display.*;
public dynamic class BackMC49 extends Sprite {
}
}//package
Section 218
//BackMC5 (BackMC5)
package {
import flash.display.*;
public dynamic class BackMC5 extends Sprite {
}
}//package
Section 219
//BackMC50 (BackMC50)
package {
import flash.display.*;
public dynamic class BackMC50 extends Sprite {
}
}//package
Section 220
//BackMC51 (BackMC51)
package {
import flash.display.*;
public dynamic class BackMC51 extends Sprite {
}
}//package
Section 221
//BackMC52 (BackMC52)
package {
import flash.display.*;
public dynamic class BackMC52 extends Sprite {
}
}//package
Section 222
//BackMC53 (BackMC53)
package {
import flash.display.*;
public dynamic class BackMC53 extends Sprite {
}
}//package
Section 223
//BackMC54 (BackMC54)
package {
import flash.display.*;
public dynamic class BackMC54 extends Sprite {
}
}//package
Section 224
//BackMC55 (BackMC55)
package {
import flash.display.*;
public dynamic class BackMC55 extends Sprite {
}
}//package
Section 225
//BackMC56 (BackMC56)
package {
import flash.display.*;
public dynamic class BackMC56 extends Sprite {
}
}//package
Section 226
//BackMC57 (BackMC57)
package {
import flash.display.*;
public dynamic class BackMC57 extends Sprite {
}
}//package
Section 227
//BackMC58 (BackMC58)
package {
import flash.display.*;
public dynamic class BackMC58 extends Sprite {
}
}//package
Section 228
//BackMC59 (BackMC59)
package {
import flash.display.*;
public dynamic class BackMC59 extends Sprite {
}
}//package
Section 229
//BackMC6 (BackMC6)
package {
import flash.display.*;
public dynamic class BackMC6 extends Sprite {
}
}//package
Section 230
//BackMC60 (BackMC60)
package {
import flash.display.*;
public dynamic class BackMC60 extends Sprite {
}
}//package
Section 231
//BackMC61 (BackMC61)
package {
import flash.display.*;
public dynamic class BackMC61 extends Sprite {
}
}//package
Section 232
//BackMC62 (BackMC62)
package {
import flash.display.*;
public dynamic class BackMC62 extends Sprite {
}
}//package
Section 233
//BackMC63 (BackMC63)
package {
import flash.display.*;
public dynamic class BackMC63 extends Sprite {
}
}//package
Section 234
//BackMC64 (BackMC64)
package {
import flash.display.*;
public dynamic class BackMC64 extends Sprite {
}
}//package
Section 235
//BackMC65 (BackMC65)
package {
import flash.display.*;
public dynamic class BackMC65 extends Sprite {
}
}//package
Section 236
//BackMC66 (BackMC66)
package {
import flash.display.*;
public dynamic class BackMC66 extends Sprite {
}
}//package
Section 237
//BackMC67 (BackMC67)
package {
import flash.display.*;
public dynamic class BackMC67 extends Sprite {
}
}//package
Section 238
//BackMC68 (BackMC68)
package {
import flash.display.*;
public dynamic class BackMC68 extends Sprite {
}
}//package
Section 239
//BackMC69 (BackMC69)
package {
import flash.display.*;
public dynamic class BackMC69 extends Sprite {
}
}//package
Section 240
//BackMC7 (BackMC7)
package {
import flash.display.*;
public dynamic class BackMC7 extends Sprite {
}
}//package
Section 241
//BackMC70 (BackMC70)
package {
import flash.display.*;
public dynamic class BackMC70 extends Sprite {
}
}//package
Section 242
//BackMC71 (BackMC71)
package {
import flash.display.*;
public dynamic class BackMC71 extends Sprite {
}
}//package
Section 243
//BackMC72 (BackMC72)
package {
import flash.display.*;
public dynamic class BackMC72 extends Sprite {
}
}//package
Section 244
//BackMC73 (BackMC73)
package {
import flash.display.*;
public dynamic class BackMC73 extends Sprite {
}
}//package
Section 245
//BackMC74 (BackMC74)
package {
import flash.display.*;
public dynamic class BackMC74 extends Sprite {
}
}//package
Section 246
//BackMC75 (BackMC75)
package {
import flash.display.*;
public dynamic class BackMC75 extends Sprite {
}
}//package
Section 247
//BackMC76 (BackMC76)
package {
import flash.display.*;
public dynamic class BackMC76 extends Sprite {
}
}//package
Section 248
//BackMC77 (BackMC77)
package {
import flash.display.*;
public dynamic class BackMC77 extends Sprite {
}
}//package
Section 249
//BackMC78 (BackMC78)
package {
import flash.display.*;
public dynamic class BackMC78 extends Sprite {
}
}//package
Section 250
//BackMC79 (BackMC79)
package {
import flash.display.*;
public dynamic class BackMC79 extends Sprite {
}
}//package
Section 251
//BackMC8 (BackMC8)
package {
import flash.display.*;
public dynamic class BackMC8 extends Sprite {
}
}//package
Section 252
//BackMC80 (BackMC80)
package {
import flash.display.*;
public dynamic class BackMC80 extends Sprite {
}
}//package
Section 253
//BackMC81 (BackMC81)
package {
import flash.display.*;
public dynamic class BackMC81 extends Sprite {
}
}//package
Section 254
//BackMC82 (BackMC82)
package {
import flash.display.*;
public dynamic class BackMC82 extends Sprite {
}
}//package
Section 255
//BackMC83 (BackMC83)
package {
import flash.display.*;
public dynamic class BackMC83 extends Sprite {
}
}//package
Section 256
//BackMC9 (BackMC9)
package {
import flash.display.*;
public dynamic class BackMC9 extends Sprite {
}
}//package
Section 257
//BangBigMC (BangBigMC)
package {
import flash.display.*;
public dynamic class BangBigMC extends MovieClip {
public function BangBigMC(){
addFrameScript(0, frame1, 23, frame24);
}
function frame1(){
NitromeGame.sound_manager.playSound(("bang" + (1 + ((Math.random() * 3) >> 0))));
}
function frame24(){
parent.removeChild(this);
stop();
}
}
}//package
Section 258
//BangMegaMC (BangMegaMC)
package {
import flash.display.*;
public dynamic class BangMegaMC extends MovieClip {
public function BangMegaMC(){
addFrameScript(0, frame1, 23, frame24);
}
function frame1(){
NitromeGame.sound_manager.playSound("bang4");
}
function frame24(){
parent.removeChild(this);
stop();
}
}
}//package
Section 259
//BangSmallMC (BangSmallMC)
package {
import flash.display.*;
public dynamic class BangSmallMC extends MovieClip {
public function BangSmallMC(){
addFrameScript(0, frame1, 23, frame24);
}
function frame1(){
NitromeGame.sound_manager.playSound(("bang" + (1 + ((Math.random() * 3) >> 0))));
}
function frame24(){
parent.removeChild(this);
stop();
}
}
}//package
Section 260
//BeamMC1 (BeamMC1)
package {
import flash.display.*;
public dynamic class BeamMC1 extends MovieClip {
public var beam:MovieClip;
}
}//package
Section 261
//BeamMC2 (BeamMC2)
package {
import flash.display.*;
public dynamic class BeamMC2 extends MovieClip {
public var beam:MovieClip;
}
}//package
Section 262
//BeamMC3 (BeamMC3)
package {
import flash.display.*;
public dynamic class BeamMC3 extends MovieClip {
public var beam:MovieClip;
}
}//package
Section 263
//BeamMC4 (BeamMC4)
package {
import flash.display.*;
public dynamic class BeamMC4 extends MovieClip {
public var beam:MovieClip;
}
}//package
Section 264
//BigShieldMC (BigShieldMC)
package {
import flash.display.*;
public dynamic class BigShieldMC extends Sprite {
}
}//package
Section 265
//BladeManMC (BladeManMC)
package {
import flash.display.*;
public dynamic class BladeManMC extends MovieClip {
public function BladeManMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 266
//BlockMC1 (BlockMC1)
package {
import flash.display.*;
public dynamic class BlockMC1 extends Sprite {
}
}//package
Section 267
//BlockMC10 (BlockMC10)
package {
import flash.display.*;
public dynamic class BlockMC10 extends Sprite {
}
}//package
Section 268
//BlockMC100 (BlockMC100)
package {
import flash.display.*;
public dynamic class BlockMC100 extends Sprite {
}
}//package
Section 269
//BlockMC101 (BlockMC101)
package {
import flash.display.*;
public dynamic class BlockMC101 extends Sprite {
}
}//package
Section 270
//BlockMC102 (BlockMC102)
package {
import flash.display.*;
public dynamic class BlockMC102 extends Sprite {
}
}//package
Section 271
//BlockMC103 (BlockMC103)
package {
import flash.display.*;
public dynamic class BlockMC103 extends Sprite {
}
}//package
Section 272
//BlockMC104 (BlockMC104)
package {
import flash.display.*;
public dynamic class BlockMC104 extends Sprite {
}
}//package
Section 273
//BlockMC105 (BlockMC105)
package {
import flash.display.*;
public dynamic class BlockMC105 extends Sprite {
}
}//package
Section 274
//BlockMC106 (BlockMC106)
package {
import flash.display.*;
public dynamic class BlockMC106 extends Sprite {
}
}//package
Section 275
//BlockMC107 (BlockMC107)
package {
import flash.display.*;
public dynamic class BlockMC107 extends Sprite {
}
}//package
Section 276
//BlockMC108 (BlockMC108)
package {
import flash.display.*;
public dynamic class BlockMC108 extends Sprite {
}
}//package
Section 277
//BlockMC109 (BlockMC109)
package {
import flash.display.*;
public dynamic class BlockMC109 extends Sprite {
}
}//package
Section 278
//BlockMC11 (BlockMC11)
package {
import flash.display.*;
public dynamic class BlockMC11 extends Sprite {
}
}//package
Section 279
//BlockMC110 (BlockMC110)
package {
import flash.display.*;
public dynamic class BlockMC110 extends Sprite {
}
}//package
Section 280
//BlockMC111 (BlockMC111)
package {
import flash.display.*;
public dynamic class BlockMC111 extends Sprite {
}
}//package
Section 281
//BlockMC112 (BlockMC112)
package {
import flash.display.*;
public dynamic class BlockMC112 extends Sprite {
}
}//package
Section 282
//BlockMC113 (BlockMC113)
package {
import flash.display.*;
public dynamic class BlockMC113 extends Sprite {
}
}//package
Section 283
//BlockMC114 (BlockMC114)
package {
import flash.display.*;
public dynamic class BlockMC114 extends Sprite {
}
}//package
Section 284
//BlockMC115 (BlockMC115)
package {
import flash.display.*;
public dynamic class BlockMC115 extends Sprite {
}
}//package
Section 285
//BlockMC116 (BlockMC116)
package {
import flash.display.*;
public dynamic class BlockMC116 extends Sprite {
}
}//package
Section 286
//BlockMC117 (BlockMC117)
package {
import flash.display.*;
public dynamic class BlockMC117 extends Sprite {
}
}//package
Section 287
//BlockMC12 (BlockMC12)
package {
import flash.display.*;
public dynamic class BlockMC12 extends Sprite {
}
}//package
Section 288
//BlockMC13 (BlockMC13)
package {
import flash.display.*;
public dynamic class BlockMC13 extends Sprite {
}
}//package
Section 289
//BlockMC14 (BlockMC14)
package {
import flash.display.*;
public dynamic class BlockMC14 extends Sprite {
}
}//package
Section 290
//BlockMC15 (BlockMC15)
package {
import flash.display.*;
public dynamic class BlockMC15 extends Sprite {
}
}//package
Section 291
//BlockMC16 (BlockMC16)
package {
import flash.display.*;
public dynamic class BlockMC16 extends Sprite {
}
}//package
Section 292
//BlockMC17 (BlockMC17)
package {
import flash.display.*;
public dynamic class BlockMC17 extends Sprite {
}
}//package
Section 293
//BlockMC18 (BlockMC18)
package {
import flash.display.*;
public dynamic class BlockMC18 extends Sprite {
}
}//package
Section 294
//BlockMC19 (BlockMC19)
package {
import flash.display.*;
public dynamic class BlockMC19 extends Sprite {
}
}//package
Section 295
//BlockMC2 (BlockMC2)
package {
import flash.display.*;
public dynamic class BlockMC2 extends Sprite {
}
}//package
Section 296
//BlockMC20 (BlockMC20)
package {
import flash.display.*;
public dynamic class BlockMC20 extends Sprite {
}
}//package
Section 297
//BlockMC21 (BlockMC21)
package {
import flash.display.*;
public dynamic class BlockMC21 extends Sprite {
}
}//package
Section 298
//BlockMC22 (BlockMC22)
package {
import flash.display.*;
public dynamic class BlockMC22 extends Sprite {
}
}//package
Section 299
//BlockMC23 (BlockMC23)
package {
import flash.display.*;
public dynamic class BlockMC23 extends Sprite {
}
}//package
Section 300
//BlockMC24 (BlockMC24)
package {
import flash.display.*;
public dynamic class BlockMC24 extends Sprite {
}
}//package
Section 301
//BlockMC25 (BlockMC25)
package {
import flash.display.*;
public dynamic class BlockMC25 extends Sprite {
}
}//package
Section 302
//BlockMC26 (BlockMC26)
package {
import flash.display.*;
public dynamic class BlockMC26 extends Sprite {
}
}//package
Section 303
//BlockMC27 (BlockMC27)
package {
import flash.display.*;
public dynamic class BlockMC27 extends Sprite {
}
}//package
Section 304
//BlockMC28 (BlockMC28)
package {
import flash.display.*;
public dynamic class BlockMC28 extends Sprite {
}
}//package
Section 305
//BlockMC29 (BlockMC29)
package {
import flash.display.*;
public dynamic class BlockMC29 extends Sprite {
}
}//package
Section 306
//BlockMC3 (BlockMC3)
package {
import flash.display.*;
public dynamic class BlockMC3 extends Sprite {
}
}//package
Section 307
//BlockMC30 (BlockMC30)
package {
import flash.display.*;
public dynamic class BlockMC30 extends Sprite {
}
}//package
Section 308
//BlockMC31 (BlockMC31)
package {
import flash.display.*;
public dynamic class BlockMC31 extends Sprite {
}
}//package
Section 309
//BlockMC32 (BlockMC32)
package {
import flash.display.*;
public dynamic class BlockMC32 extends Sprite {
}
}//package
Section 310
//BlockMC33 (BlockMC33)
package {
import flash.display.*;
public dynamic class BlockMC33 extends Sprite {
}
}//package
Section 311
//BlockMC34 (BlockMC34)
package {
import flash.display.*;
public dynamic class BlockMC34 extends Sprite {
}
}//package
Section 312
//BlockMC35 (BlockMC35)
package {
import flash.display.*;
public dynamic class BlockMC35 extends Sprite {
}
}//package
Section 313
//BlockMC36 (BlockMC36)
package {
import flash.display.*;
public dynamic class BlockMC36 extends Sprite {
}
}//package
Section 314
//BlockMC37 (BlockMC37)
package {
import flash.display.*;
public dynamic class BlockMC37 extends Sprite {
}
}//package
Section 315
//BlockMC38 (BlockMC38)
package {
import flash.display.*;
public dynamic class BlockMC38 extends Sprite {
}
}//package
Section 316
//BlockMC39 (BlockMC39)
package {
import flash.display.*;
public dynamic class BlockMC39 extends Sprite {
}
}//package
Section 317
//BlockMC4 (BlockMC4)
package {
import flash.display.*;
public dynamic class BlockMC4 extends Sprite {
}
}//package
Section 318
//BlockMC40 (BlockMC40)
package {
import flash.display.*;
public dynamic class BlockMC40 extends Sprite {
}
}//package
Section 319
//BlockMC41 (BlockMC41)
package {
import flash.display.*;
public dynamic class BlockMC41 extends Sprite {
}
}//package
Section 320
//BlockMC42 (BlockMC42)
package {
import flash.display.*;
public dynamic class BlockMC42 extends Sprite {
}
}//package
Section 321
//BlockMC43 (BlockMC43)
package {
import flash.display.*;
public dynamic class BlockMC43 extends Sprite {
}
}//package
Section 322
//BlockMC44 (BlockMC44)
package {
import flash.display.*;
public dynamic class BlockMC44 extends Sprite {
}
}//package
Section 323
//BlockMC45 (BlockMC45)
package {
import flash.display.*;
public dynamic class BlockMC45 extends Sprite {
}
}//package
Section 324
//BlockMC46 (BlockMC46)
package {
import flash.display.*;
public dynamic class BlockMC46 extends Sprite {
}
}//package
Section 325
//BlockMC47 (BlockMC47)
package {
import flash.display.*;
public dynamic class BlockMC47 extends Sprite {
}
}//package
Section 326
//BlockMC48 (BlockMC48)
package {
import flash.display.*;
public dynamic class BlockMC48 extends Sprite {
}
}//package
Section 327
//BlockMC49 (BlockMC49)
package {
import flash.display.*;
public dynamic class BlockMC49 extends Sprite {
}
}//package
Section 328
//BlockMC5 (BlockMC5)
package {
import flash.display.*;
public dynamic class BlockMC5 extends Sprite {
}
}//package
Section 329
//BlockMC50 (BlockMC50)
package {
import flash.display.*;
public dynamic class BlockMC50 extends Sprite {
}
}//package
Section 330
//BlockMC51 (BlockMC51)
package {
import flash.display.*;
public dynamic class BlockMC51 extends Sprite {
}
}//package
Section 331
//BlockMC52 (BlockMC52)
package {
import flash.display.*;
public dynamic class BlockMC52 extends Sprite {
}
}//package
Section 332
//BlockMC53 (BlockMC53)
package {
import flash.display.*;
public dynamic class BlockMC53 extends Sprite {
}
}//package
Section 333
//BlockMC54 (BlockMC54)
package {
import flash.display.*;
public dynamic class BlockMC54 extends Sprite {
}
}//package
Section 334
//BlockMC55 (BlockMC55)
package {
import flash.display.*;
public dynamic class BlockMC55 extends Sprite {
}
}//package
Section 335
//BlockMC56 (BlockMC56)
package {
import flash.display.*;
public dynamic class BlockMC56 extends Sprite {
}
}//package
Section 336
//BlockMC57 (BlockMC57)
package {
import flash.display.*;
public dynamic class BlockMC57 extends Sprite {
}
}//package
Section 337
//BlockMC58 (BlockMC58)
package {
import flash.display.*;
public dynamic class BlockMC58 extends Sprite {
}
}//package
Section 338
//BlockMC59 (BlockMC59)
package {
import flash.display.*;
public dynamic class BlockMC59 extends Sprite {
}
}//package
Section 339
//BlockMC6 (BlockMC6)
package {
import flash.display.*;
public dynamic class BlockMC6 extends Sprite {
}
}//package
Section 340
//BlockMC60 (BlockMC60)
package {
import flash.display.*;
public dynamic class BlockMC60 extends Sprite {
}
}//package
Section 341
//BlockMC61 (BlockMC61)
package {
import flash.display.*;
public dynamic class BlockMC61 extends Sprite {
}
}//package
Section 342
//BlockMC62 (BlockMC62)
package {
import flash.display.*;
public dynamic class BlockMC62 extends Sprite {
}
}//package
Section 343
//BlockMC63 (BlockMC63)
package {
import flash.display.*;
public dynamic class BlockMC63 extends Sprite {
}
}//package
Section 344
//BlockMC64 (BlockMC64)
package {
import flash.display.*;
public dynamic class BlockMC64 extends Sprite {
}
}//package
Section 345
//BlockMC65 (BlockMC65)
package {
import flash.display.*;
public dynamic class BlockMC65 extends Sprite {
}
}//package
Section 346
//BlockMC66 (BlockMC66)
package {
import flash.display.*;
public dynamic class BlockMC66 extends Sprite {
}
}//package
Section 347
//BlockMC67 (BlockMC67)
package {
import flash.display.*;
public dynamic class BlockMC67 extends Sprite {
}
}//package
Section 348
//BlockMC68 (BlockMC68)
package {
import flash.display.*;
public dynamic class BlockMC68 extends Sprite {
}
}//package
Section 349
//BlockMC69 (BlockMC69)
package {
import flash.display.*;
public dynamic class BlockMC69 extends Sprite {
}
}//package
Section 350
//BlockMC7 (BlockMC7)
package {
import flash.display.*;
public dynamic class BlockMC7 extends Sprite {
}
}//package
Section 351
//BlockMC70 (BlockMC70)
package {
import flash.display.*;
public dynamic class BlockMC70 extends Sprite {
}
}//package
Section 352
//BlockMC71 (BlockMC71)
package {
import flash.display.*;
public dynamic class BlockMC71 extends Sprite {
}
}//package
Section 353
//BlockMC72 (BlockMC72)
package {
import flash.display.*;
public dynamic class BlockMC72 extends Sprite {
}
}//package
Section 354
//BlockMC73 (BlockMC73)
package {
import flash.display.*;
public dynamic class BlockMC73 extends Sprite {
}
}//package
Section 355
//BlockMC74 (BlockMC74)
package {
import flash.display.*;
public dynamic class BlockMC74 extends Sprite {
}
}//package
Section 356
//BlockMC75 (BlockMC75)
package {
import flash.display.*;
public dynamic class BlockMC75 extends Sprite {
}
}//package
Section 357
//BlockMC76 (BlockMC76)
package {
import flash.display.*;
public dynamic class BlockMC76 extends Sprite {
}
}//package
Section 358
//BlockMC77 (BlockMC77)
package {
import flash.display.*;
public dynamic class BlockMC77 extends Sprite {
}
}//package
Section 359
//BlockMC78 (BlockMC78)
package {
import flash.display.*;
public dynamic class BlockMC78 extends Sprite {
}
}//package
Section 360
//BlockMC79 (BlockMC79)
package {
import flash.display.*;
public dynamic class BlockMC79 extends Sprite {
}
}//package
Section 361
//BlockMC8 (BlockMC8)
package {
import flash.display.*;
public dynamic class BlockMC8 extends Sprite {
}
}//package
Section 362
//BlockMC80 (BlockMC80)
package {
import flash.display.*;
public dynamic class BlockMC80 extends Sprite {
}
}//package
Section 363
//BlockMC81 (BlockMC81)
package {
import flash.display.*;
public dynamic class BlockMC81 extends Sprite {
}
}//package
Section 364
//BlockMC82 (BlockMC82)
package {
import flash.display.*;
public dynamic class BlockMC82 extends Sprite {
}
}//package
Section 365
//BlockMC83 (BlockMC83)
package {
import flash.display.*;
public dynamic class BlockMC83 extends Sprite {
}
}//package
Section 366
//BlockMC84 (BlockMC84)
package {
import flash.display.*;
public dynamic class BlockMC84 extends Sprite {
}
}//package
Section 367
//BlockMC85 (BlockMC85)
package {
import flash.display.*;
public dynamic class BlockMC85 extends Sprite {
}
}//package
Section 368
//BlockMC86 (BlockMC86)
package {
import flash.display.*;
public dynamic class BlockMC86 extends Sprite {
}
}//package
Section 369
//BlockMC87 (BlockMC87)
package {
import flash.display.*;
public dynamic class BlockMC87 extends Sprite {
}
}//package
Section 370
//BlockMC88 (BlockMC88)
package {
import flash.display.*;
public dynamic class BlockMC88 extends Sprite {
}
}//package
Section 371
//BlockMC89 (BlockMC89)
package {
import flash.display.*;
public dynamic class BlockMC89 extends Sprite {
}
}//package
Section 372
//BlockMC9 (BlockMC9)
package {
import flash.display.*;
public dynamic class BlockMC9 extends Sprite {
}
}//package
Section 373
//BlockMC90 (BlockMC90)
package {
import flash.display.*;
public dynamic class BlockMC90 extends Sprite {
}
}//package
Section 374
//BlockMC91 (BlockMC91)
package {
import flash.display.*;
public dynamic class BlockMC91 extends Sprite {
}
}//package
Section 375
//BlockMC92 (BlockMC92)
package {
import flash.display.*;
public dynamic class BlockMC92 extends Sprite {
}
}//package
Section 376
//BlockMC93 (BlockMC93)
package {
import flash.display.*;
public dynamic class BlockMC93 extends Sprite {
}
}//package
Section 377
//BlockMC94 (BlockMC94)
package {
import flash.display.*;
public dynamic class BlockMC94 extends Sprite {
}
}//package
Section 378
//BlockMC95 (BlockMC95)
package {
import flash.display.*;
public dynamic class BlockMC95 extends Sprite {
}
}//package
Section 379
//BlockMC96 (BlockMC96)
package {
import flash.display.*;
public dynamic class BlockMC96 extends Sprite {
}
}//package
Section 380
//BlockMC97 (BlockMC97)
package {
import flash.display.*;
public dynamic class BlockMC97 extends Sprite {
}
}//package
Section 381
//BlockMC98 (BlockMC98)
package {
import flash.display.*;
public dynamic class BlockMC98 extends MovieClip {
}
}//package
Section 382
//BlockMC99 (BlockMC99)
package {
import flash.display.*;
public dynamic class BlockMC99 extends Sprite {
}
}//package
Section 383
//BorgDebris1 (BorgDebris1)
package {
import com.nitrome.engine.*;
public dynamic class BorgDebris1 extends Debris {
}
}//package
Section 384
//BorgDebris2 (BorgDebris2)
package {
import com.nitrome.engine.*;
public dynamic class BorgDebris2 extends Debris {
}
}//package
Section 385
//BorgDebris3 (BorgDebris3)
package {
import com.nitrome.engine.*;
public dynamic class BorgDebris3 extends Debris {
}
}//package
Section 386
//BossBackMC (BossBackMC)
package {
import flash.display.*;
public dynamic class BossBackMC extends Sprite {
}
}//package
Section 387
//BossDebris1 (BossDebris1)
package {
import com.nitrome.engine.*;
public dynamic class BossDebris1 extends Debris {
}
}//package
Section 388
//BossDebris2 (BossDebris2)
package {
import com.nitrome.engine.*;
public dynamic class BossDebris2 extends Debris {
}
}//package
Section 389
//BossDebris3 (BossDebris3)
package {
import com.nitrome.engine.*;
public dynamic class BossDebris3 extends Debris {
}
}//package
Section 390
//BossDebris4 (BossDebris4)
package {
import com.nitrome.engine.*;
public dynamic class BossDebris4 extends Debris {
}
}//package
Section 391
//BossDebris5 (BossDebris5)
package {
import com.nitrome.engine.*;
public dynamic class BossDebris5 extends Debris {
}
}//package
Section 392
//BossDebris6 (BossDebris6)
package {
import com.nitrome.engine.*;
public dynamic class BossDebris6 extends Debris {
}
}//package
Section 393
//BossMC (BossMC)
package {
import flash.display.*;
public dynamic class BossMC extends MovieClip {
public function BossMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 394
//BulletHitMC (BulletHitMC)
package {
import flash.display.*;
public dynamic class BulletHitMC extends MovieClip {
public function BulletHitMC(){
addFrameScript(7,
);
}
function
(){
parent.removeChild(this);
stop();
}
}
}//package
Section 395
//BulletMC (BulletMC)
package {
import flash.display.*;
public dynamic class BulletMC extends MovieClip {
public function BulletMC(){
addFrameScript(14,
);
}
function
(){
gotoAndPlay(1);
}
}
}//package
Section 396
//CarMC1 (CarMC1)
package {
import flash.display.*;
public dynamic class CarMC1 extends Sprite {
}
}//package
Section 397
//CarMC2 (CarMC2)
package {
import flash.display.*;
public dynamic class CarMC2 extends Sprite {
}
}//package
Section 398
//ChainsawMC (ChainsawMC)
package {
import flash.display.*;
public dynamic class ChainsawMC extends MovieClip {
}
}//package
Section 399
//ClearButton (ClearButton)
package {
import com.nitrome.highscore.*;
public dynamic class ClearButton extends ClearButton {
public function ClearButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 400
//CoinFadeMC (CoinFadeMC)
package {
import flash.display.*;
public dynamic class CoinFadeMC extends MovieClip {
public function CoinFadeMC(){
addFrameScript(20, frame21);
}
function frame21(){
parent.removeChild(this);
stop();
}
}
}//package
Section 401
//CoinMC (CoinMC)
package {
import flash.display.*;
public dynamic class CoinMC extends Sprite {
}
}//package
Section 402
//DoorMC1 (DoorMC1)
package {
import flash.display.*;
public dynamic class DoorMC1 extends MovieClip {
public function DoorMC1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 403
//DoorMC2 (DoorMC2)
package {
import flash.display.*;
public dynamic class DoorMC2 extends MovieClip {
public function DoorMC2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 404
//DoorMC3 (DoorMC3)
package {
import flash.display.*;
public dynamic class DoorMC3 extends MovieClip {
public function DoorMC3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 405
//DoorMC4 (DoorMC4)
package {
import flash.display.*;
public dynamic class DoorMC4 extends MovieClip {
public function DoorMC4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 406
//ElectricBlockMC1 (ElectricBlockMC1)
package {
import flash.display.*;
public dynamic class ElectricBlockMC1 extends Sprite {
}
}//package
Section 407
//ElectricBlockMC10 (ElectricBlockMC10)
package {
import flash.display.*;
public dynamic class ElectricBlockMC10 extends Sprite {
}
}//package
Section 408
//ElectricBlockMC2 (ElectricBlockMC2)
package {
import flash.display.*;
public dynamic class ElectricBlockMC2 extends Sprite {
}
}//package
Section 409
//ElectricBlockMC3 (ElectricBlockMC3)
package {
import flash.display.*;
public dynamic class ElectricBlockMC3 extends Sprite {
}
}//package
Section 410
//ElectricBlockMC4 (ElectricBlockMC4)
package {
import flash.display.*;
public dynamic class ElectricBlockMC4 extends Sprite {
}
}//package
Section 411
//ElectricBlockMC5 (ElectricBlockMC5)
package {
import flash.display.*;
public dynamic class ElectricBlockMC5 extends Sprite {
}
}//package
Section 412
//ElectricBlockMC6 (ElectricBlockMC6)
package {
import flash.display.*;
public dynamic class ElectricBlockMC6 extends Sprite {
}
}//package
Section 413
//ElectricBlockMC7 (ElectricBlockMC7)
package {
import flash.display.*;
public dynamic class ElectricBlockMC7 extends Sprite {
}
}//package
Section 414
//ElectricBlockMC8 (ElectricBlockMC8)
package {
import flash.display.*;
public dynamic class ElectricBlockMC8 extends Sprite {
}
}//package
Section 415
//ElectricBlockMC9 (ElectricBlockMC9)
package {
import flash.display.*;
public dynamic class ElectricBlockMC9 extends Sprite {
}
}//package
Section 416
//ElectricCornerMC (ElectricCornerMC)
package {
import flash.display.*;
public dynamic class ElectricCornerMC extends MovieClip {
}
}//package
Section 417
//ElectricStraightMC (ElectricStraightMC)
package {
import flash.display.*;
public dynamic class ElectricStraightMC extends MovieClip {
}
}//package
Section 418
//EyeGlowMC (EyeGlowMC)
package {
import flash.display.*;
public dynamic class EyeGlowMC extends Sprite {
}
}//package
Section 419
//FinishFadeMC (FinishFadeMC)
package {
import flash.display.*;
public dynamic class FinishFadeMC extends MovieClip {
public function FinishFadeMC(){
addFrameScript(20, frame21);
}
function frame21(){
parent.removeChild(this);
stop();
}
}
}//package
Section 420
//FinishMC (FinishMC)
package {
import flash.display.*;
public dynamic class FinishMC extends MovieClip {
}
}//package
Section 421
//FlamesLeftMC (FlamesLeftMC)
package {
import flash.display.*;
public dynamic class FlamesLeftMC extends MovieClip {
}
}//package
Section 422
//FlamesRightMC (FlamesRightMC)
package {
import flash.display.*;
public dynamic class FlamesRightMC extends MovieClip {
}
}//package
Section 423
//FlyingGunDebris1 (FlyingGunDebris1)
package {
import com.nitrome.engine.*;
public dynamic class FlyingGunDebris1 extends Debris {
}
}//package
Section 424
//FlyingGunDebris2 (FlyingGunDebris2)
package {
import com.nitrome.engine.*;
public dynamic class FlyingGunDebris2 extends Debris {
}
}//package
Section 425
//FlyingGunDebris3 (FlyingGunDebris3)
package {
import com.nitrome.engine.*;
public dynamic class FlyingGunDebris3 extends Debris {
}
}//package
Section 426
//FlyingGunMC (FlyingGunMC)
package {
import flash.display.*;
public dynamic class FlyingGunMC extends MovieClip {
}
}//package
Section 427
//ForceFieldMC1 (ForceFieldMC1)
package {
import flash.display.*;
public dynamic class ForceFieldMC1 extends MovieClip {
public var field:MovieClip;
public function ForceFieldMC1(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 428
//ForceFieldMC2 (ForceFieldMC2)
package {
import flash.display.*;
public dynamic class ForceFieldMC2 extends MovieClip {
public var field:MovieClip;
public function ForceFieldMC2(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 429
//Game (Game)
package {
import com.nitrome.engine.*;
import flash.display.*;
import com.nitrome.engine_specific.*;
import flash.events.*;
import flash.geom.*;
import com.nitrome.game.*;
import flash.net.*;
import flash.utils.*;
public class Game {
public const ACTIVE:int = 2;
public const IN_PLAY:int = 2;
public const height:int = 400;
public const SCALE:Number = 0.015625;
public const EMPTY:int = 1;
public const DANGER_COL:int = 0xFD006E;
public const ALERT_COL_SPEED:Number = 3;
public const scale:int = 64;
public const INACTIVE:int = 1;
public const ONE80DIVIDEDBYPI:Number = 57.2957795130823;
public const ALERT_DELAY:int = 250;
public const width:int = 550;
public const ALERT_COL_LIMIT:Number = 100;
public const SAFE_COL:int = 4485631;
public const GAME:int = 1;
public var explosion_holder:Sprite;
public var effect_holder:Sprite;
public var game_paused:Boolean;
public var :ColorTransform;
public var :String;
public var shaker:Sprite;
public var
:Array;
public var star_holder:Sprite;
public var scroller:Scroller;
public var completed:Boolean;
public var debug:Graphics;
public var blocks_in_play:Array;
public var tile_holder:Sprite;
public var canvas:Sprite;
private var i:int;
private var j:int;
public var :int;
public var :Sprite;
public var
:Array;
public var god_mode:Boolean;
public var mouse_pressed:Boolean;
public var :Sprite;
public var state:int;
public var shake_count:int;
public var rope_holder:Shape;
public var encounters:Array;
public var spawnage:Array;
public var block_map:Array;
public var
:Number;
public var monster_holder:Sprite;
public var scan_holder:Sprite;
public var frame_count:int;
public var
:Graphics;
public var player_holder:Sprite;
public var start_x:int;
public var background_holder:Sprite;
public var dead_star_holder:Sprite;
public var player:Player;
public var start_y:int;
public var alert_state:int;
public var :Array;
public var :Sprite;
public var light_holder:Sprite;
public var back:Back;
public var spawn_holder:Sprite;
public function Game(_arg1:Sprite, _arg2:Sprite, _arg3:Back){
= new Array(0, 4, -4, 3, -3, 2, -2, 1, -1);
super();
this.canvas = _arg1;
this.shaker = _arg2;
this.back = _arg3;
RayCast.init(this);
_arg1.addEventListener(Event.ENTER_FRAME, , false, 0, true);
}
private function ():void{
var _local1:int;
var _local2:int;
scroller.changeLayer(Scroller.ENCOUNTER_LAYER);
_local1 = 0;
while (_local1 < scroller.height) {
_local2 = 0;
while (_local2 < scroller.width) {
if (TileMaker.isSpawn(block_map[_local1][_local2])){
spawnage.push({x:_local2, y:_local1, id:scroller.map_array[_local1][_local2]});
scroller.map_array[_local1][_local2] = 0;
};
_local2++;
};
_local1++;
};
}
public function pauseGame(_arg1:Boolean=false):void{
var _local2:int;
if (!player.active){
return;
};
if (!game_paused){
Util.stopClips(canvas);
game_paused = true;
if (_arg1){
NitromeGame.timeline.popup_holder.launchPopUp("game_help");
} else {
NitromeGame.timeline.popup_holder.launchPopUp("game_paused");
};
} else {
Util.startClips(canvas);
_local2 = 0;
while (_local2 < encounters.length) {
encounters[_local2].unpause();
_local2++;
};
NitromeGame.timeline.popup_holder.hidePopUp();
game_paused = false;
};
}
private function ():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:String;
_local1 = new PlayerMC();
_local2 = new PlayerMC();
player_holder.addChild(_local1);
player = new Player(_local1, _local2, ((scale >> 1) + (start_x * scale)), ((-(Player.height) >> 1) + ((start_y + 1) * scale)), this);
if ((((NitromeGame.selected_level == 10)) || ((NitromeGame.selected_level == 20)))){
if (NitromeGame.selected_level == 10){
NitromeGame.timeline.boss_panel1.gotoAndPlay(2);
} else {
if (NitromeGame.selected_level == 20){
NitromeGame.timeline.boss_panel2.gotoAndPlay(2);
};
};
} else {
_local3 = ((NitromeGame.selected_level < 10)) ? "0" : "";
_local3 = (_local3 + NitromeGame.selected_level);
NitromeGame.timeline.msg_panel.setMsg(((_local3 + ": ") + ));
};
}
public function clearAll():void{
canvas.transform.colorTransform = new ColorTransform();
clearListeners();
while (canvas.numChildren > 0) {
canvas.removeChildAt(0);
};
}
public function init():void{
var _local1:Shape;
var _local2:Shape;
background_holder = new Sprite();
= new Sprite();
tile_holder = new Sprite();
monster_holder = new Sprite();
star_holder = new Sprite();
dead_star_holder = new Sprite();
rope_holder = new Shape();
player_holder = new Sprite();
= new Sprite();
explosion_holder = new Sprite();
effect_holder = new Sprite();
= new Sprite();
spawn_holder = new Sprite();
light_holder = new Sprite();
scan_holder = new Sprite();
_local1 = new Shape();
_local2 = new Shape();
debug = _local1.graphics;
= _local2.graphics;
debug.lineStyle(2, 0xFF00);
.lineStyle(1, 0xFF0000);
canvas.addChild(background_holder);
canvas.addChild(dead_star_holder);
canvas.addChild(scan_holder);
canvas.addChild(tile_holder);
canvas.addChild( );
canvas.addChild(monster_holder);
canvas.addChild(spawn_holder);
canvas.addChild(rope_holder);
canvas.addChild(star_holder);
canvas.addChild(player_holder);
canvas.addChild(effect_holder);
canvas.addChild();
canvas.addChild();
canvas.addChild(explosion_holder);
canvas.addChild(light_holder);
canvas.addChild(_local1);
canvas.addChild(_local2);
encounters = new Array();
= new Array();
= new Array();
spawnage = new Array();
frame_count = 0;
NitromeGame.level_score = 0;
state = GAME;
game_paused = false;
god_mode = false;
alert_state = INACTIVE;
= new ColorTransform();
= ALERT_COL_SPEED;
completed = false;
NitromeGame.bonus.buddha = new HiddenInt(1);
NitromeGame.bonus.stealth = new HiddenInt(1);
NitromeGame.bonus.dodger = new HiddenInt(1);
NitromeGame.bonus.cash_count = new HiddenInt();
NitromeGame.timeline.health_panel.gotoAndStop("_3");
NitromeGame.timeline.alert_panel.alpha = 0;
NitromeGame.timeline.score_panel.score.text = ();
if ((((NitromeGame.selected_level == 10)) || ((NitromeGame.selected_level == 20)))){
NitromeGame.timeline.enemy_health_panel.visible = true;
} else {
NitromeGame.timeline.enemy_health_panel.visible = false;
};
();
}
public function (_arg1:Encounter):void{
i = 0;
while (i < encounters.length) {
if (encounters[i] == _arg1){
encounters.splice(i, 1);
break;
};
i++;
};
}
private function (_arg1:MouseEvent):void{
mouse_pressed = false;
}
public function textMessage(_arg1:String):void{
NitromeGame.timeline.text_panel.panel.message_text.text = _arg1;
NitromeGame.timeline.text_panel.gotoAndPlay("popup_stay");
}
public function createBullet(_arg1:Number, _arg2:Number, _arg3:int):void{
var _local4:MovieClip;
var _local5:Bullet;
_local4 = new BulletMC();
_local4.x = _arg1;
_local4.y = _arg2;
.addChild(_local4);
_local5 = new Bullet(Trig.cos[_arg3], Trig.sin[_arg3], _local4, this);
}
private function (_arg1:KeyboardEvent):void{
if (Key.isDown(Key.P)){
if (state == GAME){
pauseGame();
};
};
if (Key.isDown(Key.H)){
if (state == GAME){
pauseGame(true);
};
};
}
public function ():void{
var _local1:int;
var _local2:String;
if (alert_state == ACTIVE){
.blueOffset = (.blueOffset -
);
.greenOffset = (.greenOffset -
);
if (
> 0){
if (.blueOffset <= -(ALERT_COL_LIMIT)){
= -(ALERT_COL_SPEED);
};
} else {
if (.blueOffset >= 0){
= ALERT_COL_SPEED;
};
};
canvas.transform.colorTransform = ;
if (NitromeGame.timeline.alert_panel.alpha < 1){
NitromeGame.timeline.alert_panel.alpha = (NitromeGame.timeline.alert_panel.alpha + 0.04);
} else {
--;
_local1 = (( * 0.04) >> 0);
_local2 = ("" + ((_local1 < 10)) ? ("0" + _local1) : _local1);
NitromeGame.timeline.alert_panel.alert_time.text = _local2;
if ( <= 0){
standdown();
};
};
} else {
if (alert_state == INACTIVE){
if (.blueOffset < 0){
.blueOffset = (.blueOffset + ALERT_COL_SPEED);
.greenOffset = (.greenOffset + ALERT_COL_SPEED);
canvas.transform.colorTransform = ;
};
if (NitromeGame.timeline.alert_panel.alpha > 0){
NitromeGame.timeline.alert_panel.alpha = (NitromeGame.timeline.alert_panel.alpha - 0.04);
};
};
};
}
public function (_arg1):void{
.push(_arg1);
}
public function ():String{
var _local1:String;
_local1 = Score.value.toString();
while (_local1.length < 7) {
_local1 = ("0" + _local1);
};
return (_local1);
}
private function ():void{
i = 0;
while (i < encounters.length) {
if (encounters[i].skip){
} else {
if (((encounters[i].has_collision) && (encounters[i].intersects(player.collision_rect)))){
encounters[i].resolvePlayerCollision(player);
};
if (encounters[i].has_main){
encounters[i].main();
};
if (!encounters[i].active){
Util.stopClips(encounters[i].mc);
encounters[i].mc.parent.removeChild(encounters[i].mc);
encounters.splice(i, 1);
i--;
};
};
i++;
};
}
private function ():void{
var _local1:URLLoader;
_local1 = new URLLoader();
_local1.addEventListener(Event.COMPLETE,
, false, 0, true);
_local1.load(new URLRequest(
()));
}
public function (_arg1:XML):void{
var _local2:Array;
var _local3:XML;
var _local4:XML;
var _local5:Array;
var _local6:Array;
var _local7:int;
var _local8:int;
var _local9:String;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
_local2 = new Array();
_local3 = _arg1.level[0];
scroller = new Scroller(this, canvas, tile_holder, scale, parseInt(_local3.@width), parseInt(_local3.@height), width, height);
start_x = parseInt(_local3.@start_x);
start_y = parseInt(_local3.@start_y);
for each (_local4 in _arg1.tiles) {
_local5 = _local4.@values.split(",");
i = 0;
while (i < _local5.length) {
_local5[i] = parseInt(_local5[i]);
i++;
};
_local6 = new Array();
_local7 = 0;
while (_local7 < scroller.height) {
_local6.push(new Array());
_local8 = 0;
while (_local8 < scroller.width) {
_local6[_local7].push(_local5[(_local8 + (_local7 * scroller.width))]);
_local8++;
};
_local7++;
};
if (scroller.layers == 4){
scroller.addTileLayer();
} else {
if (scroller.layers == 0){
scroller.addTileLayer(background_holder);
};
};
scroller.addLayer(_local6);
};
for each (_local4 in _arg1.sign) {
_local9 = _local4.@text;
_local10 = parseInt(_local4.@n);
_local11 = parseInt(_local4.@layer);
_local12 = parseInt(_local4.@width);
_local13 = parseInt(_local4.@height);
_local2.push({text:_local9, n:_local10, layer:_local11, width:_local12, height:_local13});
};
scroller.setSignage(_local2);
= _arg1.msg[0].@text;
block_map = scroller.map_array_layers[Scroller.BLOCK_LAYER];
();
();
();
();
scroller.rezBeginning(start_x, start_y);
frame_count = 1;
();
();
NitromeGame.timeline.loading_clip.gotoAndPlay("fade_out");
NitromeGame.sound_manager.playMusic(SoundManager.GAME);
}
private function
(_arg1:Event):void{
var _local2:XML;
_local2 = new XML(_arg1.target.data);
(_local2);
}
public function reset():void{
game_paused = true;
clearAll();
init();
}
private function ():void{
i = 0;
while (i <
.length) {
if (!
[i].skip){
if (!scroller.intersects(
[i].collision_rect)){
[i].skip = true;
};
} else {
if (
[i].skip){
if (scroller.intersects(
[i].collision_rect)){
[i].skip = false;
if (
[i].type == TripWire.TURNING){
[i].getCurrentAngle();
};
};
};
};
i++;
};
}
private function (_arg1:Array, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Array{
var _local6:Array;
_local6 = new Array();
if (blocks_in_play[_arg3][_arg2] == EMPTY){
return (_local6);
};
blocks_in_play[_arg3][_arg2] = EMPTY;
if ((((((_arg3 > 0)) && (!(TileMaker.isBlock(_arg1[(_arg3 - 1)][_arg2]))))) && (!((blocks_in_play[(_arg3 - 1)][_arg2] == EMPTY))))){
_local6.push(new Dot(_arg2, (_arg3 - 1)));
} else {
if ((((_arg3 > 0)) && (TileMaker.isBlock(_arg1[(_arg3 - 1)][_arg2])))){
blocks_in_play[(_arg3 - 1)][_arg2] = IN_PLAY;
};
};
if ((((((_arg2 < (_arg4 - 1))) && (!(TileMaker.isBlock(_arg1[_arg3][(_arg2 + 1)]))))) && (!((blocks_in_play[_arg3][(_arg2 + 1)] == EMPTY))))){
_local6.push(new Dot((_arg2 + 1), _arg3));
} else {
if ((((_arg2 < (_arg4 - 1))) && (TileMaker.isBlock(_arg1[_arg3][(_arg2 + 1)])))){
blocks_in_play[_arg3][(_arg2 + 1)] = IN_PLAY;
};
};
if ((((((_arg3 < (_arg5 - 1))) && (!(TileMaker.isBlock(_arg1[(_arg3 + 1)][_arg2]))))) && (!((blocks_in_play[(_arg3 + 1)][_arg2] == EMPTY))))){
_local6.push(new Dot(_arg2, (_arg3 + 1)));
} else {
if ((((_arg3 < (_arg5 - 1))) && (TileMaker.isBlock(_arg1[(_arg3 + 1)][_arg2])))){
blocks_in_play[(_arg3 + 1)][_arg2] = IN_PLAY;
};
};
if ((((((_arg2 > 0)) && (!(TileMaker.isBlock(_arg1[_arg3][(_arg2 - 1)]))))) && (!((blocks_in_play[_arg3][(_arg2 - 1)] == EMPTY))))){
_local6.push(new Dot((_arg2 - 1), _arg3));
} else {
if ((((_arg2 > 0)) && (TileMaker.isBlock(_arg1[_arg3][(_arg2 - 1)])))){
blocks_in_play[_arg3][(_arg2 - 1)] = IN_PLAY;
};
};
if ((((((_arg2 < (_arg4 - 1))) && ((_arg3 > 0)))) && (TileMaker.isBlock(_arg1[(_arg3 - 1)][(_arg2 + 1)])))){
blocks_in_play[(_arg3 - 1)][(_arg2 + 1)] = IN_PLAY;
};
if ((((((_arg2 < (_arg4 - 1))) && ((_arg3 < (_arg5 - 1))))) && (TileMaker.isBlock(_arg1[(_arg3 + 1)][(_arg2 + 1)])))){
blocks_in_play[(_arg3 + 1)][(_arg2 + 1)] = IN_PLAY;
};
if ((((((_arg2 > 0)) && ((_arg3 < (_arg5 - 1))))) && (TileMaker.isBlock(_arg1[(_arg3 + 1)][(_arg2 - 1)])))){
blocks_in_play[(_arg3 + 1)][(_arg2 - 1)] = IN_PLAY;
};
if ((((((_arg2 > 0)) && ((_arg3 > 0)))) && (TileMaker.isBlock(_arg1[(_arg3 - 1)][(_arg2 - 1)])))){
blocks_in_play[(_arg3 - 1)][(_arg2 - 1)] = IN_PLAY;
};
return (_local6);
}
private function ():void{
if (shake_count > 0){
shaker.y = [shake_count];
if (++shake_count >= .length){
shaker.y = 0;
shake_count = 0;
};
};
}
private function ():void{
var _local1:int;
var _local2:int;
scroller.changeLayer(Scroller.ENCOUNTER_LAYER);
_local1 = 0;
while (_local1 < scroller.height) {
_local2 = 0;
while (_local2 < scroller.width) {
if (TileMaker.isScanner(scroller.map_array[_local1][_local2])){
scroller.tile_maker.mapElement(_local2, _local1);
};
_local2++;
};
_local1++;
};
}
public function addScore(_arg1:int):void{
NitromeGame.level_score = (NitromeGame.level_score + _arg1);
Score.value = (Score.value + _arg1);
NitromeGame.timeline.score_panel.score.text = ();
}
public function addDebris(_arg1:Number, _arg2:Number, _arg3:Number, ... _args):void{
var _local5:int;
var _local6:Debris;
_local5 = 0;
while (_local5 < _args.length) {
_local6 = new ((getDefinitionByName(_args[_local5]) as Class));
new ((getDefinitionByName(_args[_local5]) as Class)).x = (new ((getDefinitionByName(_args[_local5]) as Class))._x = (_local6.px = _arg1));
_local6.y = (_local6._y = (_local6.py = _arg2));
_local6.addVelocity(((-5 + (Math.random() * 10)) + _arg3), ((-5 + (Math.random() * 5)) - 10));
.addChild(_local6);
.push(_local6);
_local5++;
};
}
public function hideTextMessage():void{
NitromeGame.timeline.text_panel.gotoAndPlay("hide");
}
public function (_arg1:Event):void{
if (!NitromeGame.timeline.tt.tweening){
canvas.removeEventListener(Event.ENTER_FRAME, );
init();
};
}
public function standdown():void{
if (alert_state == INACTIVE){
return;
};
alert_state = INACTIVE;
j = 0;
while (j < encounters.length) {
encounters[j].standdown();
j++;
};
NitromeGame.timeline.alert_panel.alert_time.text = "SAFE";
NitromeGame.timeline.alert_panel.alert_time.textColor = SAFE_COL;
}
public function (_arg1:Encounter):void{
encounters.push(_arg1);
}
public function alert():void{
if (alert_state == ACTIVE){
return;
};
NitromeGame.sound_manager.playSound("alert");
NitromeGame.bonus.stealth.value = 0;
NitromeGame.timeline.alert_panel.alert_time.text = "DANGER";
NitromeGame.timeline.alert_panel.alert_time.textColor = DANGER_COL;
alert_state = ACTIVE;
j = 0;
while (j < encounters.length) {
encounters[j].alert();
j++;
};
if (player.rope.length > 0){
if (RayCast.cast(player.rope_end, block_map) != null){
mouse_pressed = false;
};
};
= new ColorTransform(1, 1, 1, 1, 0, 0, 0);
= ALERT_DELAY;
}
public function ():void{
canvas.addEventListener(Event.ENTER_FRAME, main, false, 0, true);
Key.stage.addEventListener(MouseEvent.MOUSE_DOWN, );
Key.stage.addEventListener(MouseEvent.MOUSE_UP, );
Key.stage.addEventListener(KeyboardEvent.KEY_DOWN, );
}
public function clearListeners():void{
canvas.removeEventListener(Event.ENTER_FRAME, main);
Key.stage.removeEventListener(MouseEvent.MOUSE_DOWN, );
Key.stage.removeEventListener(MouseEvent.MOUSE_UP, );
Key.stage.removeEventListener(KeyboardEvent.KEY_DOWN, );
Key.forceClearKeys();
}
private function ():void{
var _local1:Array;
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:int;
var _local6:Array;
var _local7:Array;
blocks_in_play = new Array();
_local1 = block_map;
_local2 = 0;
while (_local2 < scroller.height) {
blocks_in_play[_local2] = new Array();
_local5 = 0;
while (_local5 < scroller.width) {
blocks_in_play[_local2].push(0);
_local5++;
};
_local2++;
};
_local3 = (_local1, start_x, start_y, scroller.width, scroller.height);
_local4 = 0;
while (_local4 < (scroller.width * scroller.height)) {
_local6 = new Array();
i = 0;
while (i < _local3.length) {
_local7 = (_local1, _local3[i].x, _local3[i].y, scroller.width, scroller.height);
if (_local7.length > 0){
_local6 = _local6.concat(_local7);
};
i++;
};
_local3 = _local6;
if (_local3.length == 0){
break;
};
_local4++;
};
}
private function ():void{
i = 0;
while (i <
.length) {
[i].main();
if (((!(
[i].active)) || (!(Util.onScreen(
[i].x,
[i].y, this, 50))))){
[i].parent.removeChild(
[i]);
.splice(i, 1);
i--;
};
i++;
};
}
private function
():String{
var _local1:String;
var _local2:String;
var _local3:String;
var _local4:String;
_local1 = ("" + NitromeGame.selected_level);
if (NitromeGame.selected_level < 10){
_local1 = ("0" + NitromeGame.selected_level);
};
_local2 = "http://armorgames.com/misc/nitrome/finalninja/levels/";
_local3 = ".xml";
_local4 = (_local2 + NitromeGame.getLevelName(NitromeGame.selected_level, _local3));
return (_local4);
}
public function main(_arg1:Event):void{
debug.clear();
debug.lineStyle(2, 0xFF00);
if (!game_paused){
if (player.active){
player.main();
};
scan_holder.graphics.clear();
();
();
();
();
();
frame_count++;
};
}
private function
():void{
var _local1:int;
var _local2:int;
scroller.changeLayer(Scroller.ENCOUNTER_LAYER);
_local1 = 0;
while (_local1 < scroller.height) {
_local2 = 0;
while (_local2 < scroller.width) {
if (scroller.map_array[_local1][_local2] == 375){
NitromeGame.bonus.cash_count.value++;
};
_local2++;
};
_local1++;
};
}
public function gameOver():void{
NitromeGame.timeline.popup_holder.launchPopUp("game_over");
}
public function levelComplete():void{
if (completed){
return;
};
completed = true;
player.running = false;
if (NitromeGame.bonus.buddha.value){
addScore(10000);
};
if (NitromeGame.bonus.dodger.value){
addScore(1000);
};
if (NitromeGame.bonus.stealth.value){
addScore(1000);
};
if (NitromeGame.bonus.cash_count.value == 0){
addScore(1000);
};
if (NitromeGame.selected_level >= NitromeGame.total_levels){
NitromeGame.timeline.popup_holder.launchPopUp("final_level_complete");
} else {
NitromeGame.timeline.popup_holder.launchPopUp("level_complete");
NitromeGame.setLevelUnlocked((NitromeGame.selected_level + 1));
};
}
private function (_arg1:MouseEvent):void{
mouse_pressed = true;
}
}
}//package
Section 430
//GameMusic (GameMusic)
package {
import flash.media.*;
public dynamic class GameMusic extends Sound {
}
}//package
Section 431
//GunBlockMC1 (GunBlockMC1)
package {
import flash.display.*;
public dynamic class GunBlockMC1 extends MovieClip {
public var gun:MovieClip;
}
}//package
Section 432
//GunBlockMC2 (GunBlockMC2)
package {
import flash.display.*;
public dynamic class GunBlockMC2 extends MovieClip {
public var gun:MovieClip;
}
}//package
Section 433
//GunBlockMC3 (GunBlockMC3)
package {
import flash.display.*;
public dynamic class GunBlockMC3 extends MovieClip {
public var gun:MovieClip;
}
}//package
Section 434
//GunBlockMC4 (GunBlockMC4)
package {
import flash.display.*;
public dynamic class GunBlockMC4 extends MovieClip {
public var gun:MovieClip;
}
}//package
Section 435
//GunManMC (GunManMC)
package {
import flash.display.*;
public dynamic class GunManMC extends MovieClip {
public var man:MovieClip;
public function GunManMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 436
//GunMC (GunMC)
package {
import flash.display.*;
public dynamic class GunMC extends MovieClip {
public function GunMC(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package
Section 437
//HealthFadeMC (HealthFadeMC)
package {
import flash.display.*;
public dynamic class HealthFadeMC extends MovieClip {
public function HealthFadeMC(){
addFrameScript(20, frame21);
}
function frame21(){
parent.removeChild(this);
stop();
}
}
}//package
Section 438
//HealthMC (HealthMC)
package {
import flash.display.*;
public dynamic class HealthMC extends Sprite {
}
}//package
Section 439
//HighScoreBoard (HighScoreBoard)
package {
import com.nitrome.highscore.*;
public dynamic class HighScoreBoard extends HighScoreBoard {
public function HighScoreBoard(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 440
//HitSparkMC (HitSparkMC)
package {
import flash.display.*;
public dynamic class HitSparkMC extends MovieClip {
public function HitSparkMC(){
addFrameScript(0, frame1, 8,
);
}
function frame1(){
NitromeGame.sound_manager.playSound("star_hit");
}
function
(){
parent.removeChild(this);
stop();
}
}
}//package
Section 441
//holder (holder)
package {
import flash.display.*;
public dynamic class holder extends Sprite {
}
}//package
Section 442
//InfoMC (InfoMC)
package {
import flash.display.*;
public dynamic class InfoMC extends Sprite {
}
}//package
Section 443
//JumpMC (JumpMC)
package {
import flash.display.*;
public dynamic class JumpMC extends MovieClip {
public function JumpMC(){
addFrameScript(11, );
}
function (){
parent.removeChild(this);
stop();
}
}
}//package
Section 444
//LaserBlockMC1 (LaserBlockMC1)
package {
import flash.display.*;
public dynamic class LaserBlockMC1 extends Sprite {
}
}//package
Section 445
//LaserBlockMC2 (LaserBlockMC2)
package {
import flash.display.*;
public dynamic class LaserBlockMC2 extends Sprite {
}
}//package
Section 446
//LaserBlockMC3 (LaserBlockMC3)
package {
import flash.display.*;
public dynamic class LaserBlockMC3 extends Sprite {
}
}//package
Section 447
//LaserBlockMC4 (LaserBlockMC4)
package {
import flash.display.*;
public dynamic class LaserBlockMC4 extends Sprite {
}
}//package
Section 448
//LeftArmMC (LeftArmMC)
package {
import flash.display.*;
public dynamic class LeftArmMC extends MovieClip {
public function LeftArmMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 449
//LetterButton (LetterButton)
package {
import com.nitrome.highscore.*;
public dynamic class LetterButton extends LetterButton {
public function LetterButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 450
//LevelCompleteMC (LevelCompleteMC)
package {
import flash.display.*;
public dynamic class LevelCompleteMC extends MovieClip {
public function LevelCompleteMC(){
addFrameScript(25, );
}
function (){
stop();
}
}
}//package
Section 451
//MenuMusic (MenuMusic)
package {
import flash.media.*;
public dynamic class MenuMusic extends Sound {
}
}//package
Section 452
//MiniclipIntro (MiniclipIntro)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
public class MiniclipIntro extends MovieClip {
public var mcBackground:MovieClip;
public var mcAnimation:MovieClip;
public function MiniclipIntro(){
var _local1:Boolean;
super();
addFrameScript(10, frame11);
_local1 = ((parent) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")));
if (_local1){
gotoAndStop("livePreview");
} else {
gotoAndStop("activeContent");
};
}
public function finished():void{
var _local1:Event;
_local1 = new Event(Event.COMPLETE);
dispatchEvent(_local1);
}
public function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.miniclip.com/"), "_blank");
}
function frame11(){
mcAnimation.x = ((stage.stageWidth / 2) - x);
mcAnimation.y = ((stage.stageHeight / 2) - y);
mcBackground.scaleX = (stage.stageWidth / 550);
mcBackground.scaleY = (stage.stageHeight / 400);
mcBackground.x = -(x);
mcBackground.y = -(y);
mcAnimation.mouseEnabled = false;
mcBackground.miniclipLink.addEventListener(MouseEvent.CLICK, );
}
}
}//package
Section 453
//NextArrow (NextArrow)
package {
import com.nitrome.highscore.*;
public dynamic class NextArrow extends ArrowButton {
public function NextArrow(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 454
//NitromeButton (NitromeButton)
package {
import com.nitrome.game.*;
public dynamic class NitromeButton extends NitromeButton {
}
}//package
Section 455
//NitromeGame (NitromeGame)
package {
import com.nitrome.engine.*;
import flash.display.*;
import com.nitrome.game.*;
import com.nitrome.util.*;
import flash.net.*;
public class NitromeGame {
public static const NITROME:uint = 0;
private static const DOMAINS:Array = new Array(".nitrome.com/", ".miniclip.com/", ".candystand.com/", ".armorgames.com/");
public static const CANDYSTAND:uint = 2;
public static const ARMOR:uint = 3;
private static const CANDYSTAND_URL:Array = new Array("http://www.candystand.com/", "http://candystand.com/");
private static const NITROME_URL:Array = new Array("http://www.nitrome.com/", "http://www.nitrome.co.uk/", "http://www.nitrome.net/", "http://www.nitromegames.com/", "http://www.nitromegames.co.uk/", "http://www.nitrome-games.com/", "http://www.nitrome-games.co.uk/", "http://www.nitromeimages.com/");
public static const MINICLIP:uint = 1;
public static const SUBMIT_URL:String = "http://www.nitrome.com/php/submit_score.php";
private static const ARMOR_URL:Array = new Array("http://www.armorgames.com/", "http://armorgames.com/");
public static const RETRIEVE_URL:String = "http://www.nitrome.com/php/retrieve_scores.php";
public static const POPUP_HOLDER_FRAME:int = 10;
private static const MINICLIP_URL:Array = new Array("http://www.miniclip.com/", "http://miniclip.com/");
private static var _level_id:String;
private static var _leading_zero:Boolean = true;
private static var ar_1:Array = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "/", ":", ".", "_", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-");
private static var ar_2:Array = new Array("_", "7", "c", "2", "l", "r", "a", "h", "i", ".", "g", "m", "v", "1", "b", "q", "3", "z", "w", "o", "u", "t", "s", "0", "d", "f", "8", "n", "5", "k", ":", "j", "p", "/", "4", "6", "e", "9", "y", "x", "-");
public static var bonus:Object = new Object();
private static var _total_levels:int;
private static var adj:Number = 1.75;
private static var _url:String;
public static var global:Object = new Object();
public static var timeline:MovieClip;
private static var _game_id:String;
private static var ff:Array = new Array();
private static var ar_key:String = "ctdngevfaqki8_lb:psoj90ux127hm/4w5y3rz.6-";
private static var _level_score:HiddenInt;
public static var transition:Transition;
private static var _time_based:Boolean = false;
public static var sound_manager:SoundManager;
private static var _selected_level:HiddenInt;
public static function setLastSavedScore(_arg1:int, _arg2:int=1):void{
var _local3:String;
var _local4:SharedObject;
_local3 = (("so_" + game_id) + String(_arg2));
_local4 = SharedObject.getLocal(_local3);
_local4.data.last_saved_score = _arg1;
_local4.flush();
_local4.close();
}
public static function lockAllLevels(_arg1:int=1):void{
var _local2:String;
var _local3:SharedObject;
var _local4:Array;
var _local5:int;
_local2 = (("so_" + game_id) + _arg1);
_local3 = SharedObject.getLocal(_local2);
_local4 = new Array(total_levels);
_local5 = 0;
while (_local5 < _local4.length) {
_local4[_local5] = 0;
_local5++;
};
_local4[0] = 1;
_local3.data.levels_unlocked = _local4;
_local3.flush();
_local3.close();
}
public static function get time_based():Boolean{
return (_time_based);
}
public static function get game_id():String{
return (_game_id);
}
public static function set leading_zero(_arg1:Boolean):void{
_leading_zero = _arg1;
}
public static function set sfx(_arg1:Boolean):void{
var _local2:String;
var _local3:SharedObject;
_local2 = ("so_" + game_id);
_local3 = SharedObject.getLocal(_local2);
_local3.data.sfxon = _arg1;
_local3.flush();
_local3.close();
}
public static function unlockAllLevels(_arg1:int=1):void{
var _local2:String;
var _local3:SharedObject;
var _local4:Array;
var _local5:int;
_local2 = (("so_" + game_id) + _arg1);
_local3 = SharedObject.getLocal(_local2);
_local4 = new Array(total_levels);
_local5 = 0;
while (_local5 < _local4.length) {
_local4[_local5] = 1;
_local5++;
};
_local3.data.levels_unlocked = _local4;
_local3.flush();
_local3.close();
}
private static function decryptString(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:Number;
var _local5:int;
var _local6:*;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:String;
adj = 1.75;
ff = convertKey(_arg1);
_local3 = "";
_local4 = 0;
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2.substr(_local5, 1);
_local8 = 0;
while (_local8 < ar_2.length) {
if (ar_2[_local8] == _local6){
_local7 = _local8;
break;
};
_local8++;
};
adj = applyFudgeFactor();
_local9 = (_local4 + adj);
_local10 = (_local7 - Math.round(_local9));
_local10 = checkRange(_local10);
_local4 = (_local9 + _local7);
_local11 = ar_1[_local10];
_local3 = (_local3 + _local11);
_local5++;
};
return (_local3);
}
public static function init(_arg1:MovieClip, _arg2:String, _arg3:String, _arg4:Number):void{
timeline = _arg1;
_url = _arg1.loaderInfo.url;
_level_id = _arg3;
_total_levels = _arg4;
_game_id = _arg2.toLowerCase();
_selected_level = new HiddenInt(1);
_level_score = new HiddenInt();
}
public static function displayNextButton(_arg1:String):Boolean{
var _local2:Array;
var _local3:String;
_local2 = _arg1.split("|");
_local3 = _local2[10];
if (_local3 == "1"){
return (true);
};
if (_local3 == "0"){
return (false);
};
return (false);
}
public static function get level_score():int{
return (_level_score.value);
}
public static function get sfx():Boolean{
var _local1:String;
var _local2:SharedObject;
var _local3:Boolean;
var _local4:*;
_local1 = ("so_" + game_id);
_local2 = SharedObject.getLocal(_local1);
_local3 = false;
for each (_local4 in _local2.data) {
_local3 = true;
break;
};
if (_local3){
if (_local2.data.sfxon != undefined){
return (_local2.data.sfxon);
};
return (true);
//unresolved jump
};
return (true);
}
public static function getTotalScore(_arg1:int=1):int{
var _local2:String;
var _local3:SharedObject;
var _local4:Boolean;
var _local5:*;
var _local6:int;
var _local7:int;
_local2 = (("so_" + game_id) + String(_arg1));
_local3 = SharedObject.getLocal(_local2);
_local4 = false;
for each (_local5 in _local3.data) {
_local4 = true;
break;
};
if (!_local4){
return (0);
};
if (_local3.data.level_scores == undefined){
return (0);
};
_local6 = 0;
_local7 = 0;
while (_local7 < _local3.data.level_scores.length) {
if (((!((_local3.data.level_scores[_local7] == undefined))) && (!(isNaN(_local3.data.level_scores[_local7]))))){
_local6 = (_local6 + _local3.data.level_scores[_local7]);
};
_local7++;
};
return (_local6);
}
private static function convertKey(_arg1:String):Array{
var _local2:Array;
var _local3:int;
var _local4:int;
var _local5:String;
var _local6:int;
var _local7:int;
_local2 = new Array();
_local2.push(_arg1.length);
_local3 = 0;
_local4 = 0;
while (_local4 < _arg1.length) {
_local5 = _arg1.substr(_local4, 1);
_local7 = 0;
while (_local7 < ar_1.length) {
if (ar_1[_local7] == _local5){
_local6 = _local7;
break;
};
_local7++;
};
_local2.push(_local6);
_local3 = (_local3 + _local6);
_local4++;
};
_local2.push(_local3);
return (_local2);
}
public static function getScoreData(_arg1:int, _arg2:String):String{
var _local3:String;
var _local4:String;
_local3 = ((((String(_arg1) + "_") + game_id) + "_") + _arg2.toLowerCase());
trace(("encrypting: " + _local3));
_local4 = encryptString(ar_key, _local3);
trace(("encrypted: " + _local4));
trace(("decrypted: " + decryptString(ar_key, _local4)));
return (_local4);
}
public static function getSwfPath():String{
var _local1:String;
var _local2:int;
_local1 = url;
_local2 = _local1.length;
while (_local2 >= 0) {
if (_local1.charAt(_local2) == "/"){
_local1 = _local1.slice(0, (_local2 + 1));
break;
};
_local2--;
};
return (_local1);
}
public static function get music():Boolean{
var _local1:String;
var _local2:SharedObject;
var _local3:Boolean;
var _local4:*;
_local1 = ("so_" + game_id);
_local2 = SharedObject.getLocal(_local1);
_local3 = false;
for each (_local4 in _local2.data) {
_local3 = true;
break;
};
if (_local3){
if (_local2.data.musicon != undefined){
return (_local2.data.musicon);
};
return (true);
//unresolved jump
};
return (true);
}
public static function set level_score(_arg1:int):void{
_level_score.value = _arg1;
}
public static function get level_id():String{
return (_level_id);
}
public static function set time_based(_arg1:Boolean):void{
_time_based = _arg1;
}
public static function get total_levels():int{
return (_total_levels);
}
public static function isAtURL(... _args):Boolean{
var _local2:Boolean;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:String;
var _local7:String;
_local2 = false;
if (_args.length == 0){
_args.push(NITROME);
};
_local3 = 0;
while (_local3 < _args.length) {
if (_args[_local3] == NITROME){
_local4 = NITROME_URL;
} else {
if (_args[_local3] == MINICLIP){
_local4 = MINICLIP_URL;
} else {
if (_args[_local3] == CANDYSTAND){
_local4 = CANDYSTAND_URL;
} else {
if (_args[_local3] == ARMOR){
_local4 = ARMOR_URL;
};
};
};
};
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (url.substr(0, _local6.length) == _local6){
_local2 = true;
break;
};
_local5++;
};
_local5 = 1;
while (_local5 <= 30) {
_local7 = DOMAINS[_args[_local3]];
if (url.substr(_local5, _local7.length) == _local7){
_local2 = true;
};
_local5++;
};
_local3++;
};
return (_local2);
}
private static function encryptString(_arg1:String, _arg2:String):String{
var _local3:String;
var _local4:Number;
var _local5:int;
var _local6:String;
var _local7:int;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:String;
adj = 1.75;
ff = convertKey(_arg1);
_local3 = "";
_local4 = 0;
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2.substr(_local5, 1);
_local8 = 0;
while (_local8 < ar_1.length) {
if (ar_1[_local8] == _local6){
_local7 = _local8;
break;
};
_local8++;
};
adj = applyFudgeFactor();
_local9 = (_local4 + adj);
_local10 = (Math.round(_local9) + _local7);
_local10 = checkRange(_local10);
_local4 = (_local9 + _local10);
_local11 = ar_2[_local10];
_local3 = (_local3 + _local11);
_local5++;
};
return (_local3);
}
private static function checkRange(_arg1:int):int{
var _local2:int;
_arg1 = Math.round(_arg1);
_local2 = ar_1.length;
while (_arg1 >= _local2) {
_arg1 = (_arg1 - _local2);
};
while (_arg1 < 0) {
_arg1 = (_arg1 + _local2);
};
return (_arg1);
}
public static function setLevelUnlocked(_arg1:int, _arg2:int=1):void{
var _local3:String;
var _local4:SharedObject;
var _local5:Boolean;
var _local6:*;
var _local7:Array;
var _local8:int;
_local3 = (("so_" + game_id) + _arg2);
_local4 = SharedObject.getLocal(_local3);
_local5 = false;
for each (_local6 in _local4.data) {
_local5 = true;
break;
};
_local7 = new Array(total_levels);
if (!_local5){
_local8 = 0;
while (_local8 < _local7.length) {
_local7[_local8] = 0;
_local8++;
};
_local7[0] = 1;
} else {
if (_local4.data.levels_unlocked == undefined){
_local8 = 0;
while (_local8 < _local7.length) {
_local7[_local8] = 0;
_local8++;
};
_local7[0] = 1;
} else {
_local7 = _local4.data.levels_unlocked;
};
};
_local7[(_arg1 - 1)] = 1;
_local4.data.levels_unlocked = _local7;
_local4.flush();
_local4.close();
}
public static function set selected_level(_arg1:int):void{
_selected_level.value = _arg1;
}
public static function get leading_zero():Boolean{
return (_leading_zero);
}
public static function getLevelScore(_arg1:int, _arg2:int=1):int{
var _local3:String;
var _local4:SharedObject;
var _local5:Boolean;
var _local6:*;
_local3 = (("so_" + game_id) + String(_arg2));
_local4 = SharedObject.getLocal(_local3);
_local5 = false;
for each (_local6 in _local4.data) {
_local5 = true;
break;
};
if (!_local5){
return (0);
};
if (_local4.data.level_scores == undefined){
return (0);
};
if (_local4.data.level_scores[_arg1] == undefined){
return (0);
};
return (_local4.data.level_scores[_arg1]);
}
public static function getLevelUnlocked(_arg1:int, _arg2:int=1):Boolean{
var _local3:String;
var _local4:SharedObject;
var _local5:Boolean;
var _local6:*;
var _local7:Array;
var _local8:int;
_local3 = (("so_" + game_id) + _arg2);
_local4 = SharedObject.getLocal(_local3);
_local5 = false;
for each (_local6 in _local4.data) {
_local5 = true;
break;
};
_local7 = new Array(total_levels);
if (!_local5){
_local8 = 0;
while (_local8 < _local7.length) {
_local7[_local8] = 0;
_local8++;
};
_local7[0] = 1;
_local4.data.levels_unlocked = _local7;
_local4.flush();
_local4.close();
if (_arg1 == 1){
return (true);
};
return (false);
} else {
if (_local4.data.levels_unlocked == undefined){
_local8 = 0;
while (_local8 < _local7.length) {
_local7[_local8] = 0;
_local8++;
};
_local7[0] = 1;
_local4.data.levels_unlocked = _local7;
_local4.flush();
_local4.close();
if (_arg1 == 1){
return (true);
};
return (false);
} else {
if (_local4.data.levels_unlocked[(_arg1 - 1)] == 1){
return (true);
};
if (_local4.data.levels_unlocked[(_arg1 - 1)] == 0){
return (false);
};
};
};
return (false);
}
public static function displayPreviousButton(_arg1:String):Boolean{
var _local2:Array;
var _local3:String;
_local2 = _arg1.split("|");
_local3 = _local2[11];
if (_local3 == "1"){
return (true);
};
if (_local3 == "0"){
return (false);
};
return (false);
}
public static function set music(_arg1:Boolean):void{
var _local2:String;
var _local3:SharedObject;
_local2 = ("so_" + game_id);
_local3 = SharedObject.getLocal(_local2);
_local3.data.musicon = _arg1;
_local3.flush();
_local3.close();
}
public static function get selected_level():int{
return (_selected_level.value);
}
public static function setLevelScore(_arg1:int, _arg2:int, _arg3:int=1):void{
var _local4:String;
var _local5:SharedObject;
var _local6:Boolean;
var _local7:*;
_local4 = (("so_" + game_id) + _arg3);
_local5 = SharedObject.getLocal(_local4);
_local6 = false;
for each (_local7 in _local5.data) {
_local6 = true;
break;
};
if (!_local6){
_local5.data.level_scores = new Array();
_local5.data.level_scores[_arg2] = _arg1;
} else {
if (_local5.data.level_scores == undefined){
_local5.data.level_scores = new Array();
_local5.data.level_scores[_arg2] = _arg1;
} else {
_local5.data.level_scores[_arg2] = _arg1;
};
};
_local5.flush();
_local5.close();
}
private static function applyFudgeFactor():Number{
var _local1:Number;
_local1 = Number(ff.shift());
_local1 = (_local1 + adj);
ff.push(_local1);
return (_local1);
}
public static function getHighScoreLine(_arg1:String, _arg2:int):Object{
var _local3:Array;
var _local4:String;
var _local5:Array;
var _local6:Object;
_local3 = _arg1.split("|");
_local4 = _local3[(_arg2 - 1)];
if ((((((((_local4 == "0")) || ((_local4 == "1")))) || ((_local4 == null)))) || ((_local4 == "")))){
return (null);
};
_local5 = _local4.split("_");
if ((((_local5[1] == "n")) || ((_local5[2] == "n")))){
return (null);
};
_local6 = new Object();
_local6.username = _local5[2];
_local6.score = _local5[1];
_local6.rank = _local5[0];
return (_local6);
}
public static function get url():String{
return (_url);
}
public static function getLastSavedScore(_arg1:int=1):int{
var _local2:String;
var _local3:SharedObject;
var _local4:Boolean;
var _local5:*;
_local2 = (("so_" + game_id) + String(_arg1));
_local3 = SharedObject.getLocal(_local2);
_local4 = false;
for each (_local5 in _local3.data) {
_local4 = true;
break;
};
if (!_local4){
return (0);
};
if (_local3.data.last_saved_score == undefined){
return (0);
};
return (_local3.data.last_saved_score);
}
public static function getLevelName(_arg1:Number, _arg2:String=".xml"):String{
var _local3:MD5;
var _local4:String;
var _local5:String;
_local3 = new MD5();
_local4 = "";
if (leading_zero){
if (_arg1 < 10){
_local4 = "0";
};
};
_local5 = _local3.hash(String(((level_id + _local4) + _arg1)));
return ((_local5 + _arg2));
}
}
}//package
Section 456
//PlayerMC (PlayerMC)
package {
import flash.display.*;
public dynamic class PlayerMC extends MovieClip {
public var body:MovieClip;
public function PlayerMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 457
//PrevArrow (PrevArrow)
package {
import com.nitrome.highscore.*;
public dynamic class PrevArrow extends ArrowButton {
public function PrevArrow(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 458
//RightArmMC (RightArmMC)
package {
import flash.display.*;
public dynamic class RightArmMC extends MovieClip {
public function RightArmMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 459
//ScannerMC (ScannerMC)
package {
import flash.display.*;
public dynamic class ScannerMC extends MovieClip {
public var body:MovieClip;
}
}//package
Section 460
//ScannerMC1 (ScannerMC1)
package {
import flash.display.*;
public dynamic class ScannerMC1 extends MovieClip {
}
}//package
Section 461
//ScannerMC2 (ScannerMC2)
package {
import flash.display.*;
public dynamic class ScannerMC2 extends MovieClip {
}
}//package
Section 462
//ScannerMC3 (ScannerMC3)
package {
import flash.display.*;
public dynamic class ScannerMC3 extends MovieClip {
}
}//package
Section 463
//ScannerMC4 (ScannerMC4)
package {
import flash.display.*;
public dynamic class ScannerMC4 extends MovieClip {
}
}//package
Section 464
//ScannerMC5 (ScannerMC5)
package {
import flash.display.*;
public dynamic class ScannerMC5 extends MovieClip {
public var scanner:MovieClip;
}
}//package
Section 465
//ScannerMC6 (ScannerMC6)
package {
import flash.display.*;
public dynamic class ScannerMC6 extends MovieClip {
public var scanner:MovieClip;
}
}//package
Section 466
//ScannerMC7 (ScannerMC7)
package {
import flash.display.*;
public dynamic class ScannerMC7 extends MovieClip {
public var scanner:MovieClip;
}
}//package
Section 467
//ScannerMC8 (ScannerMC8)
package {
import flash.display.*;
public dynamic class ScannerMC8 extends MovieClip {
public var scanner:MovieClip;
}
}//package
Section 468
//ScoreLine (ScoreLine)
package {
import com.nitrome.highscore.*;
public dynamic class ScoreLine extends HighScoreLine {
}
}//package
Section 469
//ScoreSubmitPanel (ScoreSubmitPanel)
package {
import com.nitrome.highscore.*;
public dynamic class ScoreSubmitPanel extends ScoreSubmitPanel {
public function ScoreSubmitPanel(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 470
//SightMC (SightMC)
package {
import flash.display.*;
public dynamic class SightMC extends MovieClip {
public function SightMC(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 471
//SignMC1 (SignMC1)
package {
import flash.display.*;
public dynamic class SignMC1 extends Sprite {
}
}//package
Section 472
//SignMC10 (SignMC10)
package {
import flash.display.*;
public dynamic class SignMC10 extends Sprite {
}
}//package
Section 473
//SignMC11 (SignMC11)
package {
import flash.display.*;
public dynamic class SignMC11 extends Sprite {
}
}//package
Section 474
//SignMC12 (SignMC12)
package {
import flash.display.*;
public dynamic class SignMC12 extends Sprite {
}
}//package
Section 475
//SignMC13 (SignMC13)
package {
import flash.display.*;
public dynamic class SignMC13 extends Sprite {
}
}//package
Section 476
//SignMC14 (SignMC14)
package {
import flash.display.*;
public dynamic class SignMC14 extends Sprite {
}
}//package
Section 477
//SignMC15 (SignMC15)
package {
import flash.display.*;
public dynamic class SignMC15 extends Sprite {
}
}//package
Section 478
//SignMC16 (SignMC16)
package {
import flash.display.*;
public dynamic class SignMC16 extends Sprite {
}
}//package
Section 479
//SignMC17 (SignMC17)
package {
import flash.display.*;
public dynamic class SignMC17 extends Sprite {
}
}//package
Section 480
//SignMC18 (SignMC18)
package {
import flash.display.*;
public dynamic class SignMC18 extends Sprite {
}
}//package
Section 481
//SignMC19 (SignMC19)
package {
import flash.display.*;
public dynamic class SignMC19 extends Sprite {
}
}//package
Section 482
//SignMC2 (SignMC2)
package {
import flash.display.*;
public dynamic class SignMC2 extends Sprite {
}
}//package
Section 483
//SignMC20 (SignMC20)
package {
import flash.display.*;
public dynamic class SignMC20 extends Sprite {
}
}//package
Section 484
//SignMC21 (SignMC21)
package {
import flash.display.*;
public dynamic class SignMC21 extends Sprite {
}
}//package
Section 485
//SignMC22 (SignMC22)
package {
import flash.display.*;
public dynamic class SignMC22 extends Sprite {
}
}//package
Section 486
//SignMC23 (SignMC23)
package {
import flash.display.*;
public dynamic class SignMC23 extends Sprite {
}
}//package
Section 487
//SignMC24 (SignMC24)
package {
import flash.display.*;
public dynamic class SignMC24 extends Sprite {
}
}//package
Section 488
//SignMC25 (SignMC25)
package {
import flash.display.*;
public dynamic class SignMC25 extends Sprite {
}
}//package
Section 489
//SignMC26 (SignMC26)
package {
import flash.display.*;
public dynamic class SignMC26 extends Sprite {
}
}//package
Section 490
//SignMC27 (SignMC27)
package {
import flash.display.*;
public dynamic class SignMC27 extends Sprite {
}
}//package
Section 491
//SignMC28 (SignMC28)
package {
import flash.display.*;
public dynamic class SignMC28 extends Sprite {
}
}//package
Section 492
//SignMC29 (SignMC29)
package {
import flash.display.*;
public dynamic class SignMC29 extends Sprite {
}
}//package
Section 493
//SignMC3 (SignMC3)
package {
import flash.display.*;
public dynamic class SignMC3 extends Sprite {
}
}//package
Section 494
//SignMC30 (SignMC30)
package {
import flash.display.*;
public dynamic class SignMC30 extends Sprite {
}
}//package
Section 495
//SignMC31 (SignMC31)
package {
import flash.display.*;
public dynamic class SignMC31 extends Sprite {
}
}//package
Section 496
//SignMC32 (SignMC32)
package {
import flash.display.*;
public dynamic class SignMC32 extends Sprite {
}
}//package
Section 497
//SignMC33 (SignMC33)
package {
import flash.display.*;
public dynamic class SignMC33 extends Sprite {
}
}//package
Section 498
//SignMC34 (SignMC34)
package {
import flash.display.*;
public dynamic class SignMC34 extends Sprite {
}
}//package
Section 499
//SignMC35 (SignMC35)
package {
import flash.display.*;
public dynamic class SignMC35 extends Sprite {
}
}//package
Section 500
//SignMC36 (SignMC36)
package {
import flash.display.*;
public dynamic class SignMC36 extends Sprite {
}
}//package
Section 501
//SignMC37 (SignMC37)
package {
import flash.display.*;
public dynamic class SignMC37 extends Sprite {
}
}//package
Section 502
//SignMC38 (SignMC38)
package {
import flash.display.*;
public dynamic class SignMC38 extends Sprite {
}
}//package
Section 503
//SignMC39 (SignMC39)
package {
import flash.display.*;
public dynamic class SignMC39 extends Sprite {
}
}//package
Section 504
//SignMC4 (SignMC4)
package {
import flash.display.*;
public dynamic class SignMC4 extends Sprite {
}
}//package
Section 505
//SignMC40 (SignMC40)
package {
import flash.display.*;
public dynamic class SignMC40 extends Sprite {
}
}//package
Section 506
//SignMC41 (SignMC41)
package {
import flash.display.*;
public dynamic class SignMC41 extends Sprite {
}
}//package
Section 507
//SignMC42 (SignMC42)
package {
import flash.display.*;
public dynamic class SignMC42 extends Sprite {
}
}//package
Section 508
//SignMC43 (SignMC43)
package {
import flash.display.*;
public dynamic class SignMC43 extends Sprite {
}
}//package
Section 509
//SignMC44 (SignMC44)
package {
import flash.display.*;
public dynamic class SignMC44 extends Sprite {
}
}//package
Section 510
//SignMC45 (SignMC45)
package {
import flash.display.*;
public dynamic class SignMC45 extends Sprite {
}
}//package
Section 511
//SignMC46 (SignMC46)
package {
import flash.display.*;
public dynamic class SignMC46 extends Sprite {
}
}//package
Section 512
//SignMC47 (SignMC47)
package {
import flash.display.*;
public dynamic class SignMC47 extends Sprite {
}
}//package
Section 513
//SignMC48 (SignMC48)
package {
import flash.display.*;
public dynamic class SignMC48 extends Sprite {
}
}//package
Section 514
//SignMC49 (SignMC49)
package {
import flash.display.*;
public dynamic class SignMC49 extends Sprite {
}
}//package
Section 515
//SignMC5 (SignMC5)
package {
import flash.display.*;
public dynamic class SignMC5 extends Sprite {
}
}//package
Section 516
//SignMC50 (SignMC50)
package {
import flash.display.*;
public dynamic class SignMC50 extends Sprite {
}
}//package
Section 517
//SignMC51 (SignMC51)
package {
import flash.display.*;
public dynamic class SignMC51 extends Sprite {
}
}//package
Section 518
//SignMC52 (SignMC52)
package {
import flash.display.*;
public dynamic class SignMC52 extends Sprite {
}
}//package
Section 519
//SignMC53 (SignMC53)
package {
import flash.display.*;
public dynamic class SignMC53 extends Sprite {
}
}//package
Section 520
//SignMC54 (SignMC54)
package {
import flash.display.*;
public dynamic class SignMC54 extends Sprite {
}
}//package
Section 521
//SignMC55 (SignMC55)
package {
import flash.display.*;
public dynamic class SignMC55 extends Sprite {
}
}//package
Section 522
//SignMC56 (SignMC56)
package {
import flash.display.*;
public dynamic class SignMC56 extends Sprite {
}
}//package
Section 523
//SignMC57 (SignMC57)
package {
import flash.display.*;
public dynamic class SignMC57 extends Sprite {
}
}//package
Section 524
//SignMC58 (SignMC58)
package {
import flash.display.*;
public dynamic class SignMC58 extends Sprite {
}
}//package
Section 525
//SignMC59 (SignMC59)
package {
import flash.display.*;
public dynamic class SignMC59 extends Sprite {
}
}//package
Section 526
//SignMC6 (SignMC6)
package {
import flash.display.*;
public dynamic class SignMC6 extends Sprite {
}
}//package
Section 527
//SignMC60 (SignMC60)
package {
import flash.display.*;
public dynamic class SignMC60 extends Sprite {
}
}//package
Section 528
//SignMC61 (SignMC61)
package {
import flash.display.*;
public dynamic class SignMC61 extends Sprite {
}
}//package
Section 529
//SignMC62 (SignMC62)
package {
import flash.display.*;
public dynamic class SignMC62 extends Sprite {
}
}//package
Section 530
//SignMC63 (SignMC63)
package {
import flash.display.*;
public dynamic class SignMC63 extends Sprite {
}
}//package
Section 531
//SignMC64 (SignMC64)
package {
import flash.display.*;
public dynamic class SignMC64 extends Sprite {
}
}//package
Section 532
//SignMC65 (SignMC65)
package {
import flash.display.*;
public dynamic class SignMC65 extends Sprite {
}
}//package
Section 533
//SignMC66 (SignMC66)
package {
import flash.display.*;
public dynamic class SignMC66 extends Sprite {
}
}//package
Section 534
//SignMC67 (SignMC67)
package {
import flash.display.*;
public dynamic class SignMC67 extends Sprite {
}
}//package
Section 535
//SignMC68 (SignMC68)
package {
import flash.display.*;
public dynamic class SignMC68 extends Sprite {
}
}//package
Section 536
//SignMC69 (SignMC69)
package {
import flash.display.*;
public dynamic class SignMC69 extends Sprite {
}
}//package
Section 537
//SignMC7 (SignMC7)
package {
import flash.display.*;
public dynamic class SignMC7 extends Sprite {
}
}//package
Section 538
//SignMC70 (SignMC70)
package {
import flash.display.*;
public dynamic class SignMC70 extends Sprite {
}
}//package
Section 539
//SignMC71 (SignMC71)
package {
import flash.display.*;
public dynamic class SignMC71 extends Sprite {
}
}//package
Section 540
//SignMC72 (SignMC72)
package {
import flash.display.*;
public dynamic class SignMC72 extends Sprite {
}
}//package
Section 541
//SignMC73 (SignMC73)
package {
import flash.display.*;
public dynamic class SignMC73 extends Sprite {
}
}//package
Section 542
//SignMC74 (SignMC74)
package {
import flash.display.*;
public dynamic class SignMC74 extends Sprite {
}
}//package
Section 543
//SignMC75 (SignMC75)
package {
import flash.display.*;
public dynamic class SignMC75 extends Sprite {
}
}//package
Section 544
//SignMC76 (SignMC76)
package {
import flash.display.*;
public dynamic class SignMC76 extends Sprite {
}
}//package
Section 545
//SignMC77 (SignMC77)
package {
import flash.display.*;
public dynamic class SignMC77 extends Sprite {
}
}//package
Section 546
//SignMC78 (SignMC78)
package {
import flash.display.*;
public dynamic class SignMC78 extends Sprite {
}
}//package
Section 547
//SignMC79 (SignMC79)
package {
import flash.display.*;
public dynamic class SignMC79 extends Sprite {
}
}//package
Section 548
//SignMC8 (SignMC8)
package {
import flash.display.*;
public dynamic class SignMC8 extends Sprite {
}
}//package
Section 549
//SignMC80 (SignMC80)
package {
import flash.display.*;
public dynamic class SignMC80 extends Sprite {
}
}//package
Section 550
//SignMC81 (SignMC81)
package {
import flash.display.*;
public dynamic class SignMC81 extends Sprite {
}
}//package
Section 551
//SignMC82 (SignMC82)
package {
import flash.display.*;
public dynamic class SignMC82 extends Sprite {
}
}//package
Section 552
//SignMC83 (SignMC83)
package {
import flash.display.*;
public dynamic class SignMC83 extends Sprite {
}
}//package
Section 553
//SignMC84 (SignMC84)
package {
import flash.display.*;
public dynamic class SignMC84 extends Sprite {
}
}//package
Section 554
//SignMC85 (SignMC85)
package {
import flash.display.*;
public dynamic class SignMC85 extends Sprite {
}
}//package
Section 555
//SignMC86 (SignMC86)
package {
import flash.display.*;
public dynamic class SignMC86 extends Sprite {
}
}//package
Section 556
//SignMC87 (SignMC87)
package {
import flash.display.*;
public dynamic class SignMC87 extends Sprite {
}
}//package
Section 557
//SignMC88 (SignMC88)
package {
import flash.display.*;
public dynamic class SignMC88 extends Sprite {
}
}//package
Section 558
//SignMC89 (SignMC89)
package {
import flash.display.*;
public dynamic class SignMC89 extends Sprite {
}
}//package
Section 559
//SignMC9 (SignMC9)
package {
import flash.display.*;
public dynamic class SignMC9 extends Sprite {
}
}//package
Section 560
//SignMC90 (SignMC90)
package {
import flash.display.*;
public dynamic class SignMC90 extends Sprite {
}
}//package
Section 561
//SignMC91 (SignMC91)
package {
import flash.display.*;
public dynamic class SignMC91 extends Sprite {
}
}//package
Section 562
//SignMC92 (SignMC92)
package {
import flash.display.*;
public dynamic class SignMC92 extends Sprite {
}
}//package
Section 563
//SmallGunDebris (SmallGunDebris)
package {
import com.nitrome.engine.*;
public dynamic class SmallGunDebris extends Debris {
}
}//package
Section 564
//SmallShieldMC (SmallShieldMC)
package {
import flash.display.*;
public dynamic class SmallShieldMC extends Sprite {
}
}//package
Section 565
//SniperMC (SniperMC)
package {
import flash.display.*;
public dynamic class SniperMC extends MovieClip {
}
}//package
Section 566
//SpawnBackMC1 (SpawnBackMC1)
package {
import flash.display.*;
public dynamic class SpawnBackMC1 extends Sprite {
}
}//package
Section 567
//SpawnBackMC2 (SpawnBackMC2)
package {
import flash.display.*;
public dynamic class SpawnBackMC2 extends Sprite {
}
}//package
Section 568
//SpawnMC1 (SpawnMC1)
package {
import flash.display.*;
public dynamic class SpawnMC1 extends MovieClip {
public function SpawnMC1(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 569
//SpawnMC2 (SpawnMC2)
package {
import flash.display.*;
public dynamic class SpawnMC2 extends MovieClip {
public function SpawnMC2(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 570
//SpiderBallMC (SpiderBallMC)
package {
import flash.display.*;
public dynamic class SpiderBallMC extends Sprite {
}
}//package
Section 571
//SpiderMC (SpiderMC)
package {
import flash.display.*;
public dynamic class SpiderMC extends MovieClip {
}
}//package
Section 572
//SpotBeamMC (SpotBeamMC)
package {
import flash.display.*;
public dynamic class SpotBeamMC extends Sprite {
}
}//package
Section 573
//SpotMC1 (SpotMC1)
package {
import flash.display.*;
public dynamic class SpotMC1 extends MovieClip {
public var spot:MovieClip;
}
}//package
Section 574
//SpotMC2 (SpotMC2)
package {
import flash.display.*;
public dynamic class SpotMC2 extends MovieClip {
public var spot:MovieClip;
}
}//package
Section 575
//SpotMC3 (SpotMC3)
package {
import flash.display.*;
public dynamic class SpotMC3 extends MovieClip {
public var spot:MovieClip;
}
}//package
Section 576
//StealthOutlineMC (StealthOutlineMC)
package {
import flash.display.*;
public dynamic class StealthOutlineMC extends Sprite {
}
}//package
Section 577
//SubmitButton (SubmitButton)
package {
import com.nitrome.highscore.*;
public dynamic class SubmitButton extends SubmitButton {
public function SubmitButton(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 578
//SwordDebris (SwordDebris)
package {
import com.nitrome.engine.*;
public dynamic class SwordDebris extends Debris {
}
}//package
Section 579
//WallSlideLeftMC (WallSlideLeftMC)
package {
import flash.display.*;
public dynamic class WallSlideLeftMC extends MovieClip {
}
}//package
Section 580
//WallSlideRightMC (WallSlideRightMC)
package {
import flash.display.*;
public dynamic class WallSlideRightMC extends MovieClip {
}
}//package