Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
public class b2CircleDef extends b2ShapeDef {
public var localPosition:b2Vec2;
public var radius:Number;
public function b2CircleDef(){
localPosition = new b2Vec2(0, 0);
super();
type = b2Shape.e_circleShape;
radius = 1;
}
}
}//package Box2D.Collision.Shapes
Section 2
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Common.*;
public class b2CircleShape extends b2Shape {
public var m_radius:Number;
public var m_localPosition:b2Vec2;
public function b2CircleShape(_arg1:b2ShapeDef){
var _local2:b2CircleDef;
m_localPosition = new b2Vec2();
super(_arg1);
_local2 = (_arg1 as b2CircleDef);
m_type = e_circleShape;
m_localPosition.SetV(_local2.localPosition);
m_radius = _local2.radius;
}
override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
_local3 = _arg1.R;
_local4 = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y)));
_local5 = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y)));
_local4 = (_arg2.x - _local4);
_local5 = (_arg2.y - _local5);
return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius)));
}
public function ():b2Vec2{
return (m_localPosition);
}
override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local6 = _arg1.R;
_local7 = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y)));
_local8 = (_arg1.position.x + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y)));
_local9 = (_arg4.p1.x - _local7);
_local10 = (_arg4.p1.y - _local8);
_local11 = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius));
if (_local11 < 0){
return (false);
};
_local12 = (_arg4.p2.x - _arg4.p1.x);
_local13 = (_arg4.p2.y - _arg4.p1.y);
_local14 = ((_local9 * _local12) + (_local10 * _local13));
_local15 = ((_local12 * _local12) + (_local13 * _local13));
_local16 = ((_local14 * _local14) - (_local15 * _local11));
if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){
return (false);
};
_local17 = -((_local14 + Math.sqrt(_local16)));
if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){
_local17 = (_local17 / _local15);
_arg2[0] = _local17;
_arg3.x = (_local9 + (_local17 * _local12));
_arg3.y = (_local10 + (_local17 * _local13));
_arg3.Normalize();
return (true);
};
return (false);
}
override public function ComputeMass(_arg1:b2MassData):void{
_arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius);
_arg1.center.SetV(m_localPosition);
_arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y))));
}
override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local4 = _arg2.R;
_local5 = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y)));
_local6 = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y)));
_local4 = _arg3.R;
_local7 = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y)));
_local8 = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y)));
_arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius));
_arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius));
}
public function ():Number{
return (m_radius);
}
override public function UpdateSweepRadius(_arg1:b2Vec2):void{
var _local2:Number;
var _local3:Number;
_local2 = (m_localPosition.x - _arg1.x);
_local3 = (m_localPosition.y - _arg1.y);
_local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop);
}
override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
_local3 = _arg2.R;
_local4 = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y)));
_local5 = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y)));
_arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius));
_arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius));
}
}
}//package Box2D.Collision.Shapes
Section 3
//b2FilterData (Box2D.Collision.Shapes.b2FilterData)
package Box2D.Collision.Shapes {
public class b2FilterData {
public var maskBits:uint;// = 0xFFFF
public var groupIndex:int;// = 0
public var categoryBits:uint;// = 1
public function b2FilterData(){
categoryBits = 1;
maskBits = 0xFFFF;
groupIndex = 0;
super();
}
public function Copy():b2FilterData{
var _local1:b2FilterData;
_local1 = new b2FilterData();
_local1.categoryBits = categoryBits;
_local1.maskBits = maskBits;
_local1.groupIndex = groupIndex;
return (_local1);
}
}
}//package Box2D.Collision.Shapes
Section 4
//b2MassData (Box2D.Collision.Shapes.b2MassData)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
public class b2MassData {
public var mass:Number;// = 0
public var center:b2Vec2;
public var I:Number;// = 0
public function b2MassData(){
mass = 0;
center = new b2Vec2(0, 0);
I = 0;
super();
}
}
}//package Box2D.Collision.Shapes
Section 5
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PolygonDef extends b2ShapeDef {
public var vertexCount:int;
public var vertices:Array;
private static var s_mat:b2Mat22 = new b2Mat22();
public function b2PolygonDef(){
var _local1:int;
vertices = new Array(b2Settings.b2_maxPolygonVertices);
super();
type = b2Shape.e_polygonShape;
vertexCount = 0;
_local1 = 0;
while (_local1 < b2Settings.b2_maxPolygonVertices) {
vertices[_local1] = new b2Vec2();
_local1++;
};
}
public function
(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{
var _local5:b2Vec2;
var _local6:b2Mat22;
var _local7:int;
vertexCount = 4;
vertices[0].Set(-(_arg1), -(_arg2));
vertices[1].Set(_arg1, -(_arg2));
vertices[2].Set(_arg1, _arg2);
vertices[3].Set(-(_arg1), _arg2);
if (_arg3){
_local5 = _arg3;
_local6 = s_mat;
_local6.Set(_arg4);
_local7 = 0;
while (_local7 < vertexCount) {
_arg3 = vertices[_local7];
_arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y)));
_arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y)));
_arg3.x = _arg1;
_local7++;
};
};
}
public function SetAsBox(_arg1:Number, _arg2:Number):void{
vertexCount = 4;
vertices[0].Set(-(_arg1), -(_arg2));
vertices[1].Set(_arg1, -(_arg2));
vertices[2].Set(_arg1, _arg2);
vertices[3].Set(-(_arg1), _arg2);
}
}
}//package Box2D.Collision.Shapes
Section 6
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PolygonShape extends b2Shape {
public var
:Array;
public var :Array;
private var
:b2Vec2;
public var :b2OBB;
public var :Array;
public var :b2Vec2;
public var :int;
private static var s_computeMat:b2Mat22 = new b2Mat22();
private static var s_sweptAABB1:b2AABB = new b2AABB();
private static var s_sweptAABB2:b2AABB = new b2AABB();
public function b2PolygonShape(_arg1:b2ShapeDef){
var _local2:b2PolygonDef;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
= new b2Vec2();
= new b2OBB();
= new Array(b2Settings.b2_maxPolygonVertices);
= new Array(b2Settings.b2_maxPolygonVertices);
= new Array(b2Settings.b2_maxPolygonVertices);
super(_arg1);
m_type = e_polygonShape;
_local2 = (_arg1 as b2PolygonDef);
= _local2.vertexCount;
_local4 = _local3;
_local5 = _local3;
_local3 = 0;
while (_local3 < ) {
[_local3] = _local2.vertices[_local3].Copy();
_local3++;
};
_local3 = 0;
while (_local3 < ) {
_local4 = _local3;
_local5 = (((_local3 + 1) < )) ? (_local3 + 1) : 0;
_local6 = (
[_local5].x -
[_local4].x);
_local7 = (
[_local5].y -
[_local4].y);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8));
_local3++;
};
= ComputeCentroid(_local2.vertices, _local2.vertexCount);
ComputeOBB(,
, );
_local3 = 0;
while (_local3 < ) {
_local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : ( - 1);
_local5 = _local3;
_local9 = [_local4].x;
_local10 = [_local4].y;
_local11 = [_local5].x;
_local12 = [_local5].y;
_local13 = (
[_local3].x - .x);
_local14 = (
[_local3].y - .y);
_local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop);
_local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop);
_local17 = (1 / ((_local9 * _local12) - (_local10 * _local11)));
[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + .x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + .y));
_local3++;
};
}
override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
var _local3:b2Vec2;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:Number;
_local4 = _arg1.R;
_local5 = (_arg2.x - _arg1.position.x);
_local6 = (_arg2.y - _arg1.position.y);
_local7 = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y));
_local8 = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y));
_local9 = 0;
while (_local9 < ) {
_local3 =
[_local9];
_local5 = (_local7 - _local3.x);
_local6 = (_local8 - _local3.y);
_local3 = [_local9];
_local10 = ((_local3.x * _local5) + (_local3.y * _local6));
if (_local10 > 0){
return (false);
};
_local9++;
};
return (true);
}
public function GetCoreVertices():Array{
return ();
}
override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:b2Mat22;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:int;
var _local20:Number;
var _local21:Number;
_local6 = 0;
_local7 = _arg5;
_local8 = (_arg4.p1.x - _arg1.position.x);
_local9 = (_arg4.p1.y - _arg1.position.y);
_local10 = _arg1.R;
_local12 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y));
_local13 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y));
_local8 = (_arg4.p2.x - _arg1.position.x);
_local9 = (_arg4.p2.y - _arg1.position.y);
_local10 = _arg1.R;
_local14 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y));
_local15 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y));
_local16 = (_local14 - _local12);
_local17 = (_local15 - _local13);
_local18 = -1;
_local19 = 0;
while (_local19 < ) {
_local11 =
[_local19];
_local8 = (_local11.x - _local12);
_local9 = (_local11.y - _local13);
_local11 = [_local19];
_local20 = ((_local11.x * _local8) + (_local11.y * _local9));
_local21 = ((_local11.x * _local16) + (_local11.y * _local17));
if ((((_local21 < 0)) && ((_local20 < (_local6 * _local21))))){
_local6 = (_local20 / _local21);
_local18 = _local19;
} else {
if ((((_local21 > 0)) && ((_local20 < (_local7 * _local21))))){
_local7 = (_local20 / _local21);
};
};
if (_local7 < _local6){
return (false);
};
_local19++;
};
if (_local18 >= 0){
_arg2[0] = _local6;
_local10 = _arg1.R;
_local11 = [_local18];
_arg3.x = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_arg3.y = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
return (true);
};
return (false);
}
public function ():b2Vec2{
return ();
}
override public function ComputeMass(_arg1:b2MassData):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:int;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = 0;
_local8 = (1 / 3);
_local9 = 0;
while (_local9 < ) {
_local10 =
[_local9];
_local11 = (((_local9 + 1) < )) ?
[int((_local9 + 1))] :
[0];
_local12 = (_local10.x - _local6);
_local13 = (_local10.y - _local7);
_local14 = (_local11.x - _local6);
_local15 = (_local11.y - _local7);
_local16 = ((_local12 * _local15) - (_local13 * _local14));
_local17 = (0.5 * _local16);
_local4 = (_local4 + _local17);
_local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x)));
_local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y)));
_local18 = _local6;
_local19 = _local7;
_local20 = _local12;
_local21 = _local13;
_local22 = _local14;
_local23 = _local15;
_local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18));
_local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19));
_local5 = (_local5 + (_local16 * (_local24 + _local25)));
_local9++;
};
_arg1.mass = (m_density * _local4);
_local2 = (_local2 * (1 / _local4));
_local3 = (_local3 * (1 / _local4));
_arg1.center.Set(_local2, _local3);
_arg1.I = (m_density * _local5);
}
public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:b2Vec2;
var _local5:b2Mat22;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:Number;
_local5 = _arg1.R;
_local6 = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y));
_local7 = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y));
_local8 = 0;
_local4 = [0];
_local9 = ((_local4.x * _local6) + (_local4.y * _local7));
_local10 = 1;
while (_local10 < ) {
_local4 = [_local10];
_local11 = ((_local4.x * _local6) + (_local4.y * _local7));
if (_local11 > _local9){
_local8 = _local10;
_local9 = _local11;
};
_local10++;
};
_local5 = _arg1.R;
_local4 = [_local8];
.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y)));
.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y)));
return (
);
}
public function GetVertexCount():int{
return ();
}
override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
var _local4:b2AABB;
var _local5:b2AABB;
_local4 = s_sweptAABB1;
_local5 = s_sweptAABB2;
ComputeAABB(_local4, _arg2);
ComputeAABB(_local5, _arg3);
_arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y);
_arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y);
}
public function GetVertices():Array{
return (
);
}
public function ():Array{
return ();
}
public function GetOBB():b2OBB{
return ();
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1, [0]));
}
public function (_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1, ));
}
override public function UpdateSweepRadius(_arg1:b2Vec2):void{
var _local2:b2Vec2;
var _local3:int;
var _local4:Number;
var _local5:Number;
m_sweepRadius = 0;
_local3 = 0;
while (_local3 < ) {
_local2 = [_local3];
_local4 = (_local2.x - _arg1.x);
_local5 = (_local2.y - _arg1.y);
_local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
if (_local4 > m_sweepRadius){
m_sweepRadius = _local4;
};
_local3++;
};
}
override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:b2Mat22;
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local5 = s_computeMat;
_local3 = _arg2.R;
_local4 = .R.col1;
_local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local4 = .R.col2;
_local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local5.Abs();
_local6 = _local5;
_local4 = .extents;
_local7 = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y));
_local8 = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y));
_local3 = _arg2.R;
_local4 = .center;
_local9 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)));
_local10 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)));
_arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8));
_arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8));
}
public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{
var _local3:b2Vec2;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:int;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local3 = new b2Vec2();
_local4 = 0;
_local5 = 0;
_local6 = 0;
_local7 = (1 / 3);
_local8 = 0;
while (_local8 < _arg2) {
_local9 = _arg1[_local8];
_local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0];
_local11 = (_local9.x - _local5);
_local12 = (_local9.y - _local6);
_local13 = (_local10.x - _local5);
_local14 = (_local10.y - _local6);
_local15 = ((_local11 * _local14) - (_local12 * _local13));
_local16 = (0.5 * _local15);
_local4 = (_local4 + _local16);
_local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x)));
_local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y)));
_local8++;
};
_local3.x = (_local3.x * (1 / _local4));
_local3.y = (_local3.y * (1 / _local4));
return (_local3);
}
public static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{
var _local4:int;
var _local5:Array;
var _local6:Number;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:b2Mat22;
_local5 = new Array((b2Settings.b2_maxPolygonVertices + 1));
_local4 = 0;
while (_local4 < _arg3) {
_local5[_local4] = _arg2[_local4];
_local4++;
};
_local5[_arg3] = _local5[0];
_local6 = Number.MAX_VALUE;
_local4 = 1;
while (_local4 <= _arg3) {
_local7 = _local5[int((_local4 - 1))];
_local8 = (_local5[_local4].x - _local7.x);
_local9 = (_local5[_local4].y - _local7.y);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local8 = (_local8 / _local10);
_local9 = (_local9 / _local10);
_local11 = -(_local9);
_local12 = _local8;
_local13 = Number.MAX_VALUE;
_local14 = Number.MAX_VALUE;
_local15 = -(Number.MAX_VALUE);
_local16 = -(Number.MAX_VALUE);
_local17 = 0;
while (_local17 < _arg3) {
_local19 = (_local5[_local17].x - _local7.x);
_local20 = (_local5[_local17].y - _local7.y);
_local21 = ((_local8 * _local19) + (_local9 * _local20));
_local22 = ((_local11 * _local19) + (_local12 * _local20));
if (_local21 < _local13){
_local13 = _local21;
};
if (_local22 < _local14){
_local14 = _local22;
};
if (_local21 > _local15){
_local15 = _local21;
};
if (_local22 > _local16){
_local16 = _local22;
};
_local17++;
};
_local18 = ((_local15 - _local13) * (_local16 - _local14));
if (_local18 < (0.95 * _local6)){
_local6 = _local18;
_arg1.R.col1.x = _local8;
_arg1.R.col1.y = _local9;
_arg1.R.col2.x = _local11;
_arg1.R.col2.y = _local12;
_local23 = (0.5 * (_local13 + _local15));
_local24 = (0.5 * (_local14 + _local16));
_local25 = _arg1.R;
_arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24)));
_arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24)));
_arg1.extents.x = (0.5 * (_local15 - _local13));
_arg1.extents.y = (0.5 * (_local16 - _local14));
};
_local4++;
};
}
}
}//package Box2D.Collision.Shapes
Section 7
//b2Shape (Box2D.Collision.Shapes.b2Shape)
package Box2D.Collision.Shapes {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class b2Shape {
public var m_type:int;
public var m_sweepRadius:Number;
public var m_density:Number;
public var :b2FilterData;
public var m_friction:Number;
public var m_next:b2Shape;
public var m_restitution:Number;
public var m_userData;
public var :Boolean;
public var
:uint;
public var m_body:b2Body;
public static const e_polygonShape:int = 1;
public static const e_unknownShape:int = -1;
public static const e_circleShape:int = 0;
public static const e_shapeTypeCount:int = 2;
private static var s_resetAABB:b2AABB = new b2AABB();
private static var s_syncAABB:b2AABB = new b2AABB();
private static var s_proxyAABB:b2AABB = new b2AABB();
public function b2Shape(_arg1:b2ShapeDef){
m_userData = _arg1.userData;
m_friction = _arg1.friction;
m_restitution = _arg1.restitution;
m_density = _arg1.density;
m_body = null;
m_sweepRadius = 0;
m_next = null;
= b2Pair.b2_nullProxy;
= _arg1. .Copy();
= _arg1.
;
}
public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
return (false);
}
public function
():Number{
return (m_sweepRadius);
}
public function GetNext():b2Shape{
return (m_next);
}
public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{
}
public function GetType():int{
return (m_type);
}
public function ():Number{
return (m_restitution);
}
public function ():Number{
return (m_friction);
}
public function GetFilterData():b2FilterData{
return (.Copy());
}
public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{
return (false);
}
public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{
var _local3:b2AABB;
var _local4:Boolean;
if (
== b2Pair.b2_nullProxy){
return;
};
_arg1.DestroyProxy(
);
_local3 = s_resetAABB;
ComputeAABB(_local3, _arg2);
_local4 = _arg1.InRange(_local3);
if (_local4){
= _arg1.CreateProxy(_local3, this);
} else {
= b2Pair.b2_nullProxy;
};
}
public function (_arg1:b2FilterData):void{
= _arg1.Copy();
}
public function GetUserData(){
return (m_userData);
}
public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{
var _local4:b2AABB;
if (
== b2Pair.b2_nullProxy){
return (false);
};
_local4 = s_syncAABB;
ComputeSweptAABB(_local4, _arg2, _arg3);
if (_arg1.InRange(_local4)){
_arg1.MoveProxy(
, _local4);
return (true);
};
return (false);
}
public function ComputeMass(_arg1:b2MassData):void{
}
public function
():Boolean{
return ();
}
public function DestroyProxy(_arg1:b2BroadPhase):void{
if (
!= b2Pair.b2_nullProxy){
_arg1.DestroyProxy(
);
= b2Pair.b2_nullProxy;
};
}
public function UpdateSweepRadius(_arg1:b2Vec2):void{
}
public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{
}
public function GetBody():b2Body{
return (m_body);
}
public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{
var _local3:b2AABB;
var _local4:Boolean;
_local3 = s_proxyAABB;
ComputeAABB(_local3, _arg2);
_local4 = _arg1.InRange(_local3);
if (_local4){
= _arg1.CreateProxy(_local3, this);
} else {
= b2Pair.b2_nullProxy;
};
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public static function Destroy(_arg1:b2Shape, _arg2):void{
}
public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{
switch (_arg1.type){
case e_circleShape:
return (new b2CircleShape(_arg1));
case e_polygonShape:
return (new b2PolygonShape(_arg1));
default:
return (null);
};
}
}
}//package Box2D.Collision.Shapes
Section 8
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef)
package Box2D.Collision.Shapes {
public class b2ShapeDef {
public var
:Boolean;// = false
public var density:Number;// = 0
public var type:int;// = -1
public var restitution:Number;// = 0
public var userData;// = null
public var :b2FilterData;
public var friction:Number;// = 0.2
public function b2ShapeDef(){
type = b2Shape.e_unknownShape;
userData = null;
friction = 0.2;
restitution = 0;
density = 0;
= false;
= new b2FilterData();
super();
}
}
}//package Box2D.Collision.Shapes
Section 9
//b2AABB (Box2D.Collision.b2AABB)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2AABB {
public var upperBound:b2Vec2;
public var lowerBound:b2Vec2;
public function b2AABB(){
lowerBound = new b2Vec2();
upperBound = new b2Vec2();
super();
}
public function IsValid():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:Boolean;
_local1 = (upperBound.x - lowerBound.x);
_local2 = (upperBound.y - lowerBound.y);
_local3 = (((_local1 >= 0)) && ((_local2 >= 0)));
_local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid()));
return (_local3);
}
}
}//package Box2D.Collision
Section 10
//b2Bound (Box2D.Collision.b2Bound)
package Box2D.Collision {
public class b2Bound {
public var proxyId:uint;
public var stabbingCount:uint;
public var value:uint;
public function Swap(_arg1:b2Bound):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
_local2 = value;
_local3 = proxyId;
_local4 = stabbingCount;
value = _arg1.value;
proxyId = _arg1.proxyId;
stabbingCount = _arg1.stabbingCount;
_arg1.value = _local2;
_arg1.proxyId = _local3;
_arg1.stabbingCount = _local4;
}
public function IsLower():Boolean{
return (((value & 1) == 0));
}
public function IsUpper():Boolean{
return (((value & 1) == 1));
}
}
}//package Box2D.Collision
Section 11
//b2BoundValues (Box2D.Collision.b2BoundValues)
package Box2D.Collision {
public class b2BoundValues {
public var lowerValues:Array;
public var upperValues:Array;
public function b2BoundValues(){
lowerValues = [0, 0];
upperValues = [0, 0];
super();
}
}
}//package Box2D.Collision
Section 12
//b2BroadPhase (Box2D.Collision.b2BroadPhase)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2BroadPhase {
public var m_quantizationFactor:b2Vec2;
public var m_worldAABB:b2AABB;
public var m_bounds:Array;
public var :uint;
public var m_proxyCount:int;
public var m_proxyPool:Array;
public var
:int;
public var m_pairManager:b2PairManager;
public var :uint;
public var :Array;
public static const b2_nullEdge:uint = b2Settings.USHRT_MAX;
public static const b2_invalid:uint = b2Settings.USHRT_MAX;
public static var s_validate:Boolean = false;
public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:b2Proxy;
var _local7:int;
m_pairManager = new b2PairManager();
m_proxyPool = new Array(b2Settings.b2_maxPairs);
m_bounds = new Array((2 * b2Settings.b2_maxProxies));
= new Array(b2Settings.b2_maxProxies);
m_quantizationFactor = new b2Vec2();
super();
m_pairManager.Initialize(this, _arg2);
m_worldAABB = _arg1;
m_proxyCount = 0;
_local3 = 0;
while (_local3 < b2Settings.b2_maxProxies) {
[_local3] = 0;
_local3++;
};
m_bounds = new Array(2);
_local3 = 0;
while (_local3 < 2) {
m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies));
_local7 = 0;
while (_local7 < (2 * b2Settings.b2_maxProxies)) {
m_bounds[_local3][_local7] = new b2Bound();
_local7++;
};
_local3++;
};
_local4 = (_arg1.upperBound.x - _arg1.lowerBound.x);
_local5 = (_arg1.upperBound.y - _arg1.lowerBound.y);
m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4);
m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5);
_local3 = 0;
while (_local3 < (b2Settings.b2_maxProxies - 1)) {
_local6 = new b2Proxy();
m_proxyPool[_local3] = _local6;
_local6.SetNext((_local3 + 1));
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
_local3++;
};
_local6 = new b2Proxy();
m_proxyPool[int((b2Settings.b2_maxProxies - 1))] = _local6;
_local6.SetNext(b2Pair.b2_nullProxy);
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
= 0;
= 1;
= 0;
}
public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{
var _local4:Array;
var _local5:Array;
var _local6:uint;
var _local7:uint;
var _local8:Array;
var _local9:Array;
var _local10:int;
var _local11:int;
var _local12:b2Proxy;
_local4 = new Array();
_local5 = new Array();
(_local4, _local5, _arg1);
_local8 = [_local6];
_local9 = [_local7];
(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0);
(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1);
_local10 = 0;
_local11 = 0;
while ((((_local11 <
)) && ((_local10 < _arg3)))) {
_local12 = m_proxyPool[[_local11]];
_arg2[_local11] = _local12.userData;
_local11++;
_local10++;
};
= 0;
();
return (_local10);
}
public function Commit():void{
m_pairManager.Commit();
}
public function (_arg1:int):b2Proxy{
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){
return (null);
};
return (_local2);
}
private function ():void{
var _local1:uint;
if ( == b2Settings.USHRT_MAX){
_local1 = 0;
while (_local1 < b2Settings.b2_maxProxies) {
(m_proxyPool[_local1] as b2Proxy).timeStamp = 0;
_local1++;
};
= 1;
} else {
++;
};
}
private function (_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{
var _local8:uint;
var _local9:uint;
var _local10:b2Bound;
var _local11:uint;
var _local12:int;
var _local13:int;
var _local14:b2Proxy;
_local8 = BinarySearch(_arg5, _arg6, _arg3);
_local9 = BinarySearch(_arg5, _arg6, _arg4);
_local11 = _local8;
while (_local11 < _local9) {
_local10 = _arg5[_local11];
if (_local10.IsLower()){
(_local10.proxyId);
};
_local11++;
};
if (_local8 > 0){
_local12 = (_local8 - 1);
_local10 = _arg5[_local12];
_local13 = _local10.stabbingCount;
while (_local13) {
_local10 = _arg5[_local12];
if (_local10.IsLower()){
_local14 = m_proxyPool[_local10.proxyId];
if (_local8 <= _local14.upperBounds[_arg7]){
(_local10.proxyId);
_local13--;
};
};
_local12--;
};
};
_arg1[0] = _local8;
_arg2[0] = _local9;
}
private function (_arg1:b2Proxy, _arg2:b2Proxy):Boolean{
var _local3:int;
var _local4:Array;
var _local5:b2Bound;
var _local6:b2Bound;
_local3 = 0;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
_local5 = _local4[_arg1.lowerBounds[_local3]];
_local6 = _local4[_arg2.upperBounds[_local3]];
if (_local5.value > _local6.value){
return (false);
};
_local5 = _local4[_arg1.upperBounds[_local3]];
_local6 = _local4[_arg2.lowerBounds[_local3]];
if (_local5.value < _local6.value){
return (false);
};
_local3++;
};
return (true);
}
private function (_arg1:Array, _arg2:Array, _arg3:b2AABB):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = _arg3.lowerBound.x;
_local5 = _arg3.lowerBound.y;
_local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x);
_local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y);
_local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x);
_local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y);
_local6 = _arg3.upperBound.x;
_local7 = _arg3.upperBound.y;
_local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x);
_local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y);
_local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x);
_local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y);
_arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1));
_arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1);
_arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1));
_arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1);
}
public function CreateProxy(_arg1:b2AABB, _arg2):uint{
var _local3:uint;
var _local4:b2Proxy;
var _local5:uint;
var _local6:uint;
var _local7:Array;
var _local8:Array;
var _local9:int;
var _local10:int;
var _local11:Array;
var _local12:uint;
var _local13:uint;
var _local14:Array;
var _local15:Array;
var _local16:Array;
var _local17:int;
var _local18:int;
var _local19:b2Bound;
var _local20:b2Bound;
var _local21:b2Bound;
var _local22:int;
var _local23:b2Proxy;
_local5 = ;
_local4 = m_proxyPool[_local5];
= _local4.GetNext();
_local4.overlapCount = 0;
_local4.userData = _arg2;
_local6 = (2 * m_proxyCount);
_local7 = new Array();
_local8 = new Array();
(_local7, _local8, _arg1);
_local9 = 0;
while (_local9 < 2) {
_local11 = m_bounds[_local9];
_local14 = [_local12];
_local15 = [_local13];
(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9);
_local12 = _local14[0];
_local13 = _local15[0];
_local16 = new Array();
_local18 = (_local6 - _local13);
_local17 = 0;
while (_local17 < _local18) {
_local16[_local17] = new b2Bound();
_local19 = _local16[_local17];
_local20 = _local11[int((_local13 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local18 = _local16.length;
_local22 = (_local13 + 2);
_local17 = 0;
while (_local17 < _local18) {
_local20 = _local16[_local17];
_local19 = _local11[int((_local22 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local16 = new Array();
_local18 = (_local13 - _local12);
_local17 = 0;
while (_local17 < _local18) {
_local16[_local17] = new b2Bound();
_local19 = _local16[_local17];
_local20 = _local11[int((_local12 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local18 = _local16.length;
_local22 = (_local12 + 1);
_local17 = 0;
while (_local17 < _local18) {
_local20 = _local16[_local17];
_local19 = _local11[int((_local22 + _local17))];
_local19.value = _local20.value;
_local19.proxyId = _local20.proxyId;
_local19.stabbingCount = _local20.stabbingCount;
_local17++;
};
_local13++;
_local19 = _local11[_local12];
_local20 = _local11[_local13];
_local19.value = _local7[_local9];
_local19.proxyId = _local5;
_local20.value = _local8[_local9];
_local20.proxyId = _local5;
_local21 = _local11[int((_local12 - 1))];
_local19.stabbingCount = ((_local12 == 0)) ? 0 : _local21.stabbingCount;
_local21 = _local11[int((_local13 - 1))];
_local20.stabbingCount = _local21.stabbingCount;
_local3 = _local12;
while (_local3 < _local13) {
_local21 = _local11[_local3];
_local21.stabbingCount++;
_local3++;
};
_local3 = _local12;
while (_local3 < (_local6 + 2)) {
_local19 = _local11[_local3];
_local23 = m_proxyPool[_local19.proxyId];
if (_local19.IsLower()){
_local23.lowerBounds[_local9] = _local3;
} else {
_local23.upperBounds[_local9] = _local3;
};
_local3++;
};
_local9++;
};
m_proxyCount++;
_local10 = 0;
while (_local10 <
) {
m_pairManager.AddBufferedPair(_local5, [_local10]);
_local10++;
};
m_pairManager.Commit();
= 0;
();
return (_local5);
}
public function DestroyProxy(_arg1:uint):void{
var _local2:b2Bound;
var _local3:b2Bound;
var _local4:b2Proxy;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:Array;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:Array;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:uint;
var _local18:int;
var _local19:b2Proxy;
_local4 = m_proxyPool[_arg1];
_local5 = (2 * m_proxyCount);
_local6 = 0;
while (_local6 < 2) {
_local8 = m_bounds[_local6];
_local9 = _local4.lowerBounds[_local6];
_local10 = _local4.upperBounds[_local6];
_local2 = _local8[_local9];
_local11 = _local2.value;
_local3 = _local8[_local10];
_local12 = _local3.value;
_local13 = new Array();
_local15 = ((_local10 - _local9) - 1);
_local14 = 0;
while (_local14 < _local15) {
_local13[_local14] = new b2Bound();
_local2 = _local13[_local14];
_local3 = _local8[int(((_local9 + 1) + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = _local13.length;
_local16 = _local9;
_local14 = 0;
while (_local14 < _local15) {
_local3 = _local13[_local14];
_local2 = _local8[int((_local16 + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local13 = new Array();
_local15 = ((_local5 - _local10) - 1);
_local14 = 0;
while (_local14 < _local15) {
_local13[_local14] = new b2Bound();
_local2 = _local13[_local14];
_local3 = _local8[int(((_local10 + 1) + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = _local13.length;
_local16 = (_local10 - 1);
_local14 = 0;
while (_local14 < _local15) {
_local3 = _local13[_local14];
_local2 = _local8[int((_local16 + _local14))];
_local2.value = _local3.value;
_local2.proxyId = _local3.proxyId;
_local2.stabbingCount = _local3.stabbingCount;
_local14++;
};
_local15 = (_local5 - 2);
_local17 = _local9;
while (_local17 < _local15) {
_local2 = _local8[_local17];
_local19 = m_proxyPool[_local2.proxyId];
if (_local2.IsLower()){
_local19.lowerBounds[_local6] = _local17;
} else {
_local19.upperBounds[_local6] = _local17;
};
_local17++;
};
_local15 = (_local10 - 1);
_local18 = _local9;
while (_local18 < _local15) {
_local2 = _local8[_local18];
_local2.stabbingCount--;
_local18++;
};
([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6);
_local6++;
};
_local7 = 0;
while (_local7 <
) {
m_pairManager.RemoveBufferedPair(_arg1, [_local7]);
_local7++;
};
m_pairManager.Commit();
= 0;
();
_local4.userData = null;
_local4.overlapCount = b2_invalid;
_local4.lowerBounds[0] = b2_invalid;
_local4.lowerBounds[1] = b2_invalid;
_local4.upperBounds[0] = b2_invalid;
_local4.upperBounds[1] = b2_invalid;
_local4.SetNext( );
= _arg1;
m_proxyCount--;
}
public function (_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{
var _local3:int;
var _local4:Array;
var _local5:b2Bound;
_local3 = 0;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
_local5 = _local4[_arg2.upperBounds[_local3]];
if (_arg1.lowerValues[_local3] > _local5.value){
return (false);
};
_local5 = _local4[_arg2.lowerBounds[_local3]];
if (_arg1.upperValues[_local3] < _local5.value){
return (false);
};
_local3++;
};
return (true);
}
public function Validate():void{
var _local1:b2Pair;
var _local2:b2Proxy;
var _local3:b2Proxy;
var _local4:Boolean;
var _local5:int;
var _local6:b2Bound;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:b2Bound;
_local5 = 0;
while (_local5 < 2) {
_local6 = m_bounds[_local5];
_local7 = (2 * m_proxyCount);
_local8 = 0;
_local9 = 0;
while (_local9 < _local7) {
_local10 = _local6[_local9];
if (_local10.IsLower() == true){
_local8++;
} else {
_local8--;
};
_local9++;
};
_local5++;
};
}
private function (_arg1:uint):void{
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if (_local2.timeStamp < ){
_local2.timeStamp = ;
_local2.overlapCount = 1;
} else {
_local2.overlapCount = 2;
[
] = _arg1;
++;
};
}
public function InRange(_arg1:b2AABB):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = _arg1.lowerBound.x;
_local3 = _arg1.lowerBound.y;
_local2 = (_local2 - m_worldAABB.upperBound.x);
_local3 = (_local3 - m_worldAABB.upperBound.y);
_local4 = m_worldAABB.lowerBound.x;
_local5 = m_worldAABB.lowerBound.y;
_local4 = (_local4 - _arg1.upperBound.x);
_local5 = (_local5 - _arg1.upperBound.y);
_local2 = b2Math.b2Max(_local2, _local4);
_local3 = b2Math.b2Max(_local3, _local5);
return ((b2Math.b2Max(_local2, _local3) < 0));
}
public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{
var _local3:Array;
var _local4:int;
var _local5:uint;
var _local6:uint;
var _local7:b2Bound;
var _local8:b2Bound;
var _local9:b2Bound;
var _local10:uint;
var _local11:b2Proxy;
var _local12:uint;
var _local13:b2Proxy;
var _local14:b2BoundValues;
var _local15:b2BoundValues;
var _local16:Array;
var _local17:uint;
var _local18:uint;
var _local19:uint;
var _local20:uint;
var _local21:int;
var _local22:int;
var _local23:uint;
var _local24:b2Proxy;
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){
return;
};
if (_arg2.IsValid() == false){
return;
};
_local12 = (2 * m_proxyCount);
_local13 = m_proxyPool[_arg1];
_local14 = new b2BoundValues();
(_local14.lowerValues, _local14.upperValues, _arg2);
_local15 = new b2BoundValues();
_local5 = 0;
while (_local5 < 2) {
_local7 = m_bounds[_local5][_local13.lowerBounds[_local5]];
_local15.lowerValues[_local5] = _local7.value;
_local7 = m_bounds[_local5][_local13.upperBounds[_local5]];
_local15.upperValues[_local5] = _local7.value;
_local5++;
};
_local5 = 0;
while (_local5 < 2) {
_local16 = m_bounds[_local5];
_local17 = _local13.lowerBounds[_local5];
_local18 = _local13.upperBounds[_local5];
_local19 = _local14.lowerValues[_local5];
_local20 = _local14.upperValues[_local5];
_local7 = _local16[_local17];
_local21 = (_local19 - _local7.value);
_local7.value = _local19;
_local7 = _local16[_local18];
_local22 = (_local20 - _local7.value);
_local7.value = _local20;
if (_local21 < 0){
_local6 = _local17;
while ((((_local6 > 0)) && ((_local19 < (_local16[int((_local6 - 1))] as b2Bound).value)))) {
_local7 = _local16[_local6];
_local8 = _local16[int((_local6 - 1))];
_local23 = _local8.proxyId;
_local24 = m_proxyPool[_local8.proxyId];
_local8.stabbingCount++;
if (_local8.IsUpper() == true){
if ((_local14, _local24)){
m_pairManager.AddBufferedPair(_arg1, _local23);
};
_local3 = _local24.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount++;
} else {
_local3 = _local24.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount--;
};
_local3 = _local13.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.Swap(_local8);
_local6--;
};
};
if (_local22 > 0){
_local6 = _local18;
while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local20)))) {
_local7 = _local16[_local6];
_local9 = _local16[int((_local6 + 1))];
_local10 = _local9.proxyId;
_local11 = m_proxyPool[_local10];
_local9.stabbingCount++;
if (_local9.IsLower() == true){
if ((_local14, _local11)){
m_pairManager.AddBufferedPair(_arg1, _local10);
};
_local3 = _local11.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount++;
} else {
_local3 = _local11.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount--;
};
_local3 = _local13.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.Swap(_local9);
_local6++;
};
};
if (_local21 > 0){
_local6 = _local17;
while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local19)))) {
_local7 = _local16[_local6];
_local9 = _local16[int((_local6 + 1))];
_local10 = _local9.proxyId;
_local11 = m_proxyPool[_local10];
_local9.stabbingCount--;
if (_local9.IsUpper()){
if ((_local15, _local11)){
m_pairManager.RemoveBufferedPair(_arg1, _local10);
};
_local3 = _local11.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount--;
} else {
_local3 = _local11.lowerBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.stabbingCount++;
};
_local3 = _local13.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.Swap(_local9);
_local6++;
};
};
if (_local22 < 0){
_local6 = _local18;
while ((((_local6 > 0)) && ((_local20 < (_local16[int((_local6 - 1))] as b2Bound).value)))) {
_local7 = _local16[_local6];
_local8 = _local16[int((_local6 - 1))];
_local23 = _local8.proxyId;
_local24 = m_proxyPool[_local23];
_local8.stabbingCount--;
if (_local8.IsLower() == true){
if ((_local15, _local24)){
m_pairManager.RemoveBufferedPair(_arg1, _local23);
};
_local3 = _local24.lowerBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount--;
} else {
_local3 = _local24.upperBounds;
_local4 = _local3[_local5];
_local4++;
_local3[_local5] = _local4;
_local7.stabbingCount++;
};
_local3 = _local13.upperBounds;
_local4 = _local3[_local5];
_local4--;
_local3[_local5] = _local4;
_local7.Swap(_local8);
_local6--;
};
};
_local5++;
};
}
public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:b2Bound;
_local4 = 0;
_local5 = (_arg2 - 1);
while (_local4 <= _local5) {
_local6 = ((_local4 + _local5) / 2);
_local7 = _arg1[_local6];
if (_local7.value > _arg3){
_local5 = (_local6 - 1);
} else {
if (_local7.value < _arg3){
_local4 = (_local6 + 1);
} else {
return (uint(_local6));
};
};
};
return (uint(_local4));
}
}
}//package Box2D.Collision
Section 13
//b2BufferedPair (Box2D.Collision.b2BufferedPair)
package Box2D.Collision {
public class b2BufferedPair {
public var proxyId1:uint;
public var proxyId2:uint;
}
}//package Box2D.Collision
Section 14
//b2Collision (Box2D.Collision.b2Collision)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2Collision {
public static const b2_nullFeature:uint = 0xFF;
private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2();
public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{
var _local6:int;
var _local7:Array;
var _local8:Array;
var _local9:int;
var _local10:Array;
var _local11:b2Mat22;
var _local12:b2Vec2;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:int;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_local6 = _arg1.;
_local7 = _arg1.
;
_local8 = _arg1.;
_local9 = _arg4.;
_local10 = _arg4.
;
_local11 = _arg2.R;
_local12 = _local8[_arg3];
_local13 = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y));
_local14 = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y));
_local11 = _arg5.R;
_local15 = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14));
_local16 = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14));
_local17 = 0;
_local18 = Number.MAX_VALUE;
_local19 = 0;
while (_local19 < _local9) {
_local12 = _local10[_local19];
_local25 = ((_local12.x * _local15) + (_local12.y * _local16));
if (_local25 < _local18){
_local18 = _local25;
_local17 = _local19;
};
_local19++;
};
_local12 = _local7[_arg3];
_local11 = _arg2.R;
_local20 = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)));
_local21 = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)));
_local12 = _local10[_local17];
_local11 = _arg5.R;
_local22 = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)));
_local23 = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)));
_local22 = (_local22 - _local20);
_local23 = (_local23 - _local21);
_local24 = ((_local22 * _local13) + (_local23 * _local14));
return (_local24);
}
public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = _arg2.lowerBound;
_local4 = _arg1.upperBound;
_local5 = (_local3.x - _local4.x);
_local6 = (_local3.y - _local4.y);
_local3 = _arg1.lowerBound;
_local4 = _arg2.upperBound;
_local7 = (_local3.x - _local4.x);
_local8 = (_local3.y - _local4.y);
if ((((_local5 > 0)) || ((_local6 > 0)))){
return (false);
};
if ((((_local7 > 0)) || ((_local8 > 0)))){
return (false);
};
return (true);
}
public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{
var _local7:int;
var _local8:Array;
var _local9:int;
var _local10:Array;
var _local11:Array;
var _local12:b2Mat22;
var _local13:b2Vec2;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local19:int;
var _local20:ClipVertex;
var _local21:int;
var _local22:int;
var _local23:Number;
_local7 = _arg2.;
_local8 = _arg2.;
_local9 = _arg5.;
_local10 = _arg5.
;
_local11 = _arg5.;
_local12 = _arg3.R;
_local13 = _local8[_arg4];
_local14 = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y));
_local15 = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y));
_local12 = _arg6.R;
_local16 = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15));
_local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15));
_local14 = _local16;
_local17 = 0;
_local18 = Number.MAX_VALUE;
_local19 = 0;
while (_local19 < _local9) {
_local13 = _local11[_local19];
_local23 = ((_local14 * _local13.x) + (_local15 * _local13.y));
if (_local23 < _local18){
_local18 = _local23;
_local17 = _local19;
};
_local19++;
};
_local21 = _local17;
_local22 = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0;
_local20 = _arg1[0];
_local13 = _local10[_local21];
_local12 = _arg6.R;
_local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)));
_local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)));
_local20.id..referenceEdge = _arg4;
_local20.id..incidentEdge = _local21;
_local20.id..incidentVertex = 0;
_local20 = _arg1[1];
_local13 = _local10[_local22];
_local12 = _arg6.R;
_local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)));
_local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)));
_local20.id..referenceEdge = _arg4;
_local20.id..incidentEdge = _local22;
_local20.id..incidentVertex = 1;
}
public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{
var _local6:ClipVertex;
var _local7:int;
var _local8:Array;
var _local9:Number;
var _local10:int;
var _local11:Array;
var _local12:Number;
var _local13:b2PolygonShape;
var _local14:b2PolygonShape;
var _local15:b2XForm;
var _local16:b2XForm;
var _local17:int;
var _local18:uint;
var _local19:Number;
var _local20:Number;
var _local21:Array;
var _local22:int;
var _local23:Array;
var _local24:b2Vec2;
var _local25:b2Vec2;
var _local26:b2Vec2;
var _local27:b2Vec2;
var _local28:b2Vec2;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Array;
var _local33:Array;
var _local34:int;
var _local35:int;
var _local36:int;
var _local37:b2Vec2;
var _local38:Number;
var _local39:b2ManifoldPoint;
_arg1.pointCount = 0;
_local7 = 0;
_local8 = [_local7];
_local9 = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5);
_local7 = _local8[0];
if (_local9 > 0){
return;
};
_local10 = 0;
_local11 = [_local10];
_local12 = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3);
_local10 = _local11[0];
if (_local12 > 0){
return;
};
_local15 = new b2XForm();
_local16 = new b2XForm();
_local19 = 0.98;
_local20 = 0.001;
if (_local12 > ((_local19 * _local9) + _local20)){
_local13 = _arg4;
_local14 = _arg2;
_local15.Set(_arg5);
_local16.Set(_arg3);
_local17 = _local10;
_local18 = 1;
} else {
_local13 = _arg2;
_local14 = _arg4;
_local15.Set(_arg3);
_local16.Set(_arg5);
_local17 = _local7;
_local18 = 0;
};
_local21 = [new ClipVertex(), new ClipVertex()];
FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16);
_local22 = _local13.;
_local23 = _local13.
;
_local24 = _local23[_local17];
_local25 = _local24.Copy();
if ((_local17 + 1) < _local22){
_local24 = _local23[int((_local17 + 1))];
_local37 = _local24.Copy();
} else {
_local24 = _local23[0];
_local37 = _local24.Copy();
};
_local26 = b2Math.SubtractVV(_local37, _local25);
_local27 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25));
_local27.Normalize();
_local28 = b2Math.b2CrossVF(_local27, 1);
_local25 = b2Math.b2MulX(_local15, _local25);
_local37 = b2Math.b2MulX(_local15, _local37);
_local29 = b2Math.b2Dot(_local28, _local25);
_local30 = -(b2Math.b2Dot(_local27, _local25));
_local31 = b2Math.b2Dot(_local27, _local37);
_local32 = [new ClipVertex(), new ClipVertex()];
_local33 = [new ClipVertex(), new ClipVertex()];
_local34 = ClipSegmentToLine(_local32, _local21, _local27.Negative(), _local30);
if (_local34 < 2){
return;
};
_local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31);
if (_local34 < 2){
return;
};
_arg1.normal = (_local18) ? _local28.Negative() : _local28.Copy();
_local35 = 0;
_local36 = 0;
while (_local36 < b2Settings.b2_maxManifoldPoints) {
_local6 = _local33[_local36];
_local38 = (b2Math.b2Dot(_local28, _local6.v) - _local29);
if (_local38 <= 0){
_local39 = _arg1.points[_local35];
_local39.separation = _local38;
_local39.localPoint1 = b2Math.b2MulXT(_arg3, _local6.v);
_local39.localPoint2 = b2Math.b2MulXT(_arg5, _local6.v);
_local39.id.key = _local6.id._key;
_local39.id..flip = _local18;
_local35++;
};
_local36++;
};
_arg1.pointCount = _local35;
}
public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{
var _local6:int;
var _local7:Array;
var _local8:b2Vec2;
var _local9:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:int;
var _local15:Number;
var _local16:int;
var _local17:Number;
var _local18:int;
var _local19:Number;
var _local20:int;
var _local21:Number;
var _local22:int;
var _local23:Number;
var _local24:int;
var _local25:Number;
_local6 = _arg2.;
_local7 = _arg2.;
_local9 = _arg5.R;
_local8 = _arg4.;
_local10 = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)));
_local11 = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)));
_local9 = _arg3.R;
_local8 = _arg2.;
_local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))));
_local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))));
_local12 = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y));
_local13 = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y));
_local14 = 0;
_local15 = -(Number.MAX_VALUE);
_local16 = 0;
while (_local16 < _local6) {
_local8 = _local7[_local16];
_local25 = ((_local8.x * _local12) + (_local8.y * _local13));
if (_local25 > _local15){
_local15 = _local25;
_local14 = _local16;
};
_local16++;
};
_local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5);
if (_local17 > 0){
return (_local17);
};
_local18 = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1);
_local19 = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5);
if (_local19 > 0){
return (_local19);
};
_local20 = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0;
_local21 = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5);
if (_local21 > 0){
return (_local21);
};
if ((((_local19 > _local17)) && ((_local19 > _local21)))){
_local24 = -1;
_local22 = _local18;
_local23 = _local19;
} else {
if (_local21 > _local17){
_local24 = 1;
_local22 = _local20;
_local23 = _local21;
} else {
_arg1[0] = _local14;
return (_local17);
};
};
while (true) {
if (_local24 == -1){
_local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1);
} else {
_local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0;
};
_local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5);
if (_local17 > 0){
return (_local17);
};
if (_local17 > _local23){
_local22 = _local14;
_local23 = _local17;
} else {
break;
};
};
_arg1[0] = _local22;
return (_local23);
}
public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{
var _local5:ClipVertex;
var _local6:int;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:b2Vec2;
var _local13:ClipVertex;
_local6 = 0;
_local5 = _arg2[0];
_local7 = _local5.v;
_local5 = _arg2[1];
_local8 = _local5.v;
_local9 = (b2Math.b2Dot(_arg3, _local7) - _arg4);
_local10 = (b2Math.b2Dot(_arg3, _local8) - _arg4);
if (_local9 <= 0){
var _temp1 = _local6;
_local6 = (_local6 + 1);
var _local14 = _temp1;
_arg1[_local14] = _arg2[0];
};
if (_local10 <= 0){
var _temp2 = _local6;
_local6 = (_local6 + 1);
_local14 = _temp2;
_arg1[_local14] = _arg2[1];
};
if ((_local9 * _local10) < 0){
_local11 = (_local9 / (_local9 - _local10));
_local5 = _arg1[_local6];
_local12 = _local5.v;
_local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x)));
_local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y)));
_local5 = _arg1[_local6];
if (_local9 > 0){
_local13 = _arg2[0];
_local5.id = _local13.id;
} else {
_local13 = _arg2[1];
_local5.id = _local13.id;
};
_local6++;
};
return (_local6);
}
public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{
var _local6:b2Mat22;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:b2ManifoldPoint;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
_arg1.pointCount = 0;
_local6 = _arg3.R;
_local7 = _arg2.m_localPosition;
_local8 = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)));
_local9 = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)));
_local6 = _arg5.R;
_local7 = _arg4.m_localPosition;
_local10 = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)));
_local11 = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)));
_local12 = (_local10 - _local8);
_local13 = (_local11 - _local9);
_local14 = ((_local12 * _local12) + (_local13 * _local13));
_local15 = _arg2.m_radius;
_local16 = _arg4.m_radius;
_local17 = (_local15 + _local16);
if (_local14 > (_local17 * _local17)){
return;
};
if (_local14 < Number.MIN_VALUE){
_local18 = -(_local17);
_arg1.normal.Set(0, 1);
} else {
_local24 = Math.sqrt(_local14);
_local18 = (_local24 - _local17);
_local25 = (1 / _local24);
_arg1.normal.x = (_local25 * _local12);
_arg1.normal.y = (_local25 * _local13);
};
_arg1.pointCount = 1;
_local19 = _arg1.points[0];
_local19.id.key = 0;
_local19.separation = _local18;
_local8 = (_local8 + (_local15 * _arg1.normal.x));
_local9 = (_local9 + (_local15 * _arg1.normal.y));
_local10 = (_local10 - (_local16 * _arg1.normal.x));
_local11 = (_local11 - (_local16 * _arg1.normal.y));
_local20 = (0.5 * (_local8 + _local10));
_local21 = (0.5 * (_local9 + _local11));
_local22 = (_local20 - _arg3.position.x);
_local23 = (_local21 - _arg3.position.y);
_local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y));
_local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y));
_local22 = (_local20 - _arg5.position.x);
_local23 = (_local21 - _arg5.position.y);
_local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y));
_local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y));
}
public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{
var _local6:b2ManifoldPoint;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:b2Vec2;
var _local12:b2Mat22;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:Number;
var _local20:Number;
var _local21:int;
var _local22:Array;
var _local23:Array;
var _local24:int;
var _local25:int;
var _local26:int;
var _local27:b2Vec2;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
_arg1.pointCount = 0;
_local12 = _arg5.R;
_local11 = _arg4.m_localPosition;
_local13 = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)));
_local14 = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)));
_local7 = (_local13 - _arg3.position.x);
_local8 = (_local14 - _arg3.position.y);
_local12 = _arg3.R;
_local15 = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local16 = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local18 = 0;
_local19 = -(Number.MAX_VALUE);
_local20 = _arg4.m_radius;
_local21 = _arg2.;
_local22 = _arg2.
;
_local23 = _arg2.;
_local24 = 0;
while (_local24 < _local21) {
_local11 = _local22[_local24];
_local7 = (_local15 - _local11.x);
_local8 = (_local16 - _local11.y);
_local11 = _local23[_local24];
_local34 = ((_local11.x * _local7) + (_local11.y * _local8));
if (_local34 > _local20){
return;
};
if (_local34 > _local19){
_local19 = _local34;
_local18 = _local24;
};
_local24++;
};
if (_local19 < Number.MIN_VALUE){
_arg1.pointCount = 1;
_local11 = _local23[_local18];
_local12 = _arg3.R;
_arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y));
_arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y));
_local6 = _arg1.points[0];
_local6.id..incidentEdge = _local18;
_local6.id..incidentVertex = b2_nullFeature;
_local6.id..referenceEdge = 0;
_local6.id..flip = 0;
_local9 = (_local13 - (_local20 * _arg1.normal.x));
_local10 = (_local14 - (_local20 * _arg1.normal.y));
_local7 = (_local9 - _arg3.position.x);
_local8 = (_local10 - _arg3.position.y);
_local12 = _arg3.R;
_local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local7 = (_local9 - _arg5.position.x);
_local8 = (_local10 - _arg5.position.y);
_local12 = _arg5.R;
_local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local6.separation = (_local19 - _local20);
return;
};
_local25 = _local18;
_local26 = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0;
_local11 = _local22[_local25];
_local27 = _local22[_local26];
_local28 = (_local27.x - _local11.x);
_local29 = (_local27.y - _local11.y);
_local30 = Math.sqrt(((_local28 * _local28) + (_local29 * _local29)));
_local28 = (_local28 / _local30);
_local29 = (_local29 / _local30);
_local7 = (_local15 - _local11.x);
_local8 = (_local16 - _local11.y);
_local31 = ((_local7 * _local28) + (_local8 * _local29));
_local6 = _arg1.points[0];
if (_local31 <= 0){
_local32 = _local11.x;
_local33 = _local11.y;
_local6.id..incidentEdge = b2_nullFeature;
_local6.id..incidentVertex = _local25;
} else {
if (_local31 >= _local30){
_local32 = _local27.x;
_local33 = _local27.y;
_local6.id..incidentEdge = b2_nullFeature;
_local6.id..incidentVertex = _local26;
} else {
_local32 = ((_local28 * _local31) + _local11.x);
_local33 = ((_local29 * _local31) + _local11.y);
_local6.id..incidentEdge = _local18;
_local6.id..incidentVertex = 0;
};
};
_local7 = (_local15 - _local32);
_local8 = (_local16 - _local33);
_local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local7 = (_local7 / _local17);
_local8 = (_local8 / _local17);
if (_local17 > _local20){
return;
};
_arg1.pointCount = 1;
_local12 = _arg3.R;
_arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8));
_arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8));
_local9 = (_local13 - (_local20 * _arg1.normal.x));
_local10 = (_local14 - (_local20 * _arg1.normal.y));
_local7 = (_local9 - _arg3.position.x);
_local8 = (_local10 - _arg3.position.y);
_local12 = _arg3.R;
_local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local7 = (_local9 - _arg5.position.x);
_local8 = (_local10 - _arg5.position.y);
_local12 = _arg5.R;
_local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y));
_local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y));
_local6.separation = (_local17 - _local20);
_local6.id..referenceEdge = 0;
_local6.id..flip = 0;
}
}
}//package Box2D.Collision
Section 15
//b2ContactID (Box2D.Collision.b2ContactID)
package Box2D.Collision {
public class b2ContactID {
public var _key:uint;
public var :Features;
public function b2ContactID(){
= new Features();
super();
.
= this;
}
public function Set(_arg1:b2ContactID):void{
key = _arg1._key;
}
public function Copy():b2ContactID{
var _local1:b2ContactID;
_local1 = new b2ContactID();
_local1.key = key;
return (_local1);
}
public function get key():uint{
return (_key);
}
public function set key(_arg1:uint):void{
_key = _arg1;
. = (_key & 0xFF);
.
= (((_key & 0xFF00) >> 8) & 0xFF);
.
= (((_key & 0xFF0000) >> 16) & 0xFF);
.
= (((_key & 4278190080) >> 24) & 0xFF);
}
}
}//package Box2D.Collision
Section 16
//b2ContactPoint (Box2D.Collision.b2ContactPoint)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
public class b2ContactPoint {
public var separation:Number;
public var normal:b2Vec2;
public var position:b2Vec2;
public var restitution:Number;
public var shape1:b2Shape;
public var shape2:b2Shape;
public var id:b2ContactID;
public var friction:Number;
public var velocity:b2Vec2;
public function b2ContactPoint(){
position = new b2Vec2();
velocity = new b2Vec2();
normal = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Collision
Section 17
//b2Distance (Box2D.Collision.b2Distance)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2Distance {
private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()];
private static var gPoint:b2Point = new b2Point();
public static var g_GJK_Iterations:int = 0;
public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{
var _local4:Number;
var _local5:int;
var _local6:b2Vec2;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local4 = (100 * Number.MIN_VALUE);
_local5 = 0;
while (_local5 < _arg3) {
_local6 = _arg2[_local5];
_local7 = Math.abs((_arg1.x - _local6.x));
_local8 = Math.abs((_arg1.y - _local6.y));
_local9 = Math.max(Math.abs(_arg1.x), Math.abs(_local6.x));
_local10 = Math.max(Math.abs(_arg1.y), Math.abs(_local6.y));
if ((((_local7 < (_local4 * (_local9 + 1)))) && ((_local8 < (_local4 * (_local10 + 1)))))){
return (true);
};
_local5++;
};
return (false);
}
public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{
var _local7:b2Vec2;
var _local8:Array;
var _local9:Array;
var _local10:Array;
var _local11:int;
var _local12:Number;
var _local13:int;
var _local14:int;
var _local15:Number;
var _local16:Number;
var _local17:b2Vec2;
var _local18:b2Vec2;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:int;
_local8 = s_p1s;
_local9 = s_p2s;
_local10 = s_points;
_local11 = 0;
_arg1.SetV(_arg3.GetFirstVertex(_arg4));
_arg2.SetV(_arg5.GetFirstVertex(_arg6));
_local12 = 0;
_local13 = 20;
_local14 = 0;
while (_local14 < _local13) {
_local15 = (_arg2.x - _arg1.x);
_local16 = (_arg2.y - _arg1.y);
_local17 = _arg3.Support(_arg4, _local15, _local16);
_local18 = _arg5.Support(_arg6, -(_local15), -(_local16));
_local12 = ((_local15 * _local15) + (_local16 * _local16));
_local19 = (_local18.x - _local17.x);
_local20 = (_local18.y - _local17.y);
_local21 = ((_local15 * _local19) + (_local16 * _local20));
if ((_local12 - ((_local15 * _local19) + (_local16 * _local20))) <= (0.01 * _local12)){
if (_local11 == 0){
_arg1.SetV(_local17);
_arg2.SetV(_local18);
};
g_GJK_Iterations = _local14;
return (Math.sqrt(_local12));
};
switch (_local11){
case 0:
_local7 = _local8[0];
_local7.SetV(_local17);
_local7 = _local9[0];
_local7.SetV(_local18);
_local7 = _local10[0];
_local7.x = _local19;
_local7.y = _local20;
_arg1.SetV(_local8[0]);
_arg2.SetV(_local9[0]);
_local11++;
break;
case 1:
_local7 = _local8[1];
_local7.SetV(_local17);
_local7 = _local9[1];
_local7.SetV(_local18);
_local7 = _local10[1];
_local7.x = _local19;
_local7.y = _local20;
_local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10);
break;
case 2:
_local7 = _local8[2];
_local7.SetV(_local17);
_local7 = _local9[2];
_local7.SetV(_local18);
_local7 = _local10[2];
_local7.x = _local19;
_local7.y = _local20;
_local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10);
break;
};
if (_local11 == 3){
g_GJK_Iterations = _local14;
return (0);
};
_local22 = -(Number.MAX_VALUE);
_local23 = 0;
while (_local23 < _local11) {
_local7 = _local10[_local23];
_local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y)));
_local23++;
};
if ((((_local11 == 3)) || ((_local12 <= ((100 * Number.MIN_VALUE) * _local22))))){
g_GJK_Iterations = _local14;
_local15 = (_arg2.x - _arg1.x);
_local16 = (_arg2.y - _arg1.y);
_local12 = ((_local15 * _local15) + (_local16 * _local16));
return (Math.sqrt(_local12));
};
_local14++;
};
g_GJK_Iterations = _local13;
return (Math.sqrt(_local12));
}
public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local7 = _arg4.R;
_local8 = _arg3.m_localPosition;
_local9 = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local10 = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local7 = _arg6.R;
_local8 = _arg5.m_localPosition;
_local11 = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local12 = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local13 = (_local11 - _local9);
_local14 = (_local12 - _local10);
_local15 = ((_local13 * _local13) + (_local14 * _local14));
_local16 = (_arg3.m_radius - b2Settings.b2_toiSlop);
_local17 = (_arg5.m_radius - b2Settings.b2_toiSlop);
_local18 = (_local16 + _local17);
if (_local15 > (_local18 * _local18)){
_local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
_local20 = (_local19 - _local18);
_arg1.x = (_local9 + (_local16 * _local13));
_arg1.y = (_local10 + (_local16 * _local14));
_arg2.x = (_local11 - (_local17 * _local13));
_arg2.y = (_local12 - (_local17 * _local14));
return (_local20);
};
if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){
_local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local13 = (_local13 / _local19);
_local14 = (_local14 / _local19);
_arg1.x = (_local9 + (_local16 * _local13));
_arg1.y = (_local10 + (_local16 * _local14));
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
return (0);
};
_arg1.x = _local9;
_arg1.y = _local10;
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
return (0);
}
public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:b2Vec2;
var _local13:b2Vec2;
var _local14:b2Vec2;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local39:Number;
var _local40:Number;
var _local41:Number;
_local6 = _arg5[0];
_local7 = _arg5[1];
_local8 = _arg5[2];
_local9 = _arg3[0];
_local10 = _arg3[1];
_local11 = _arg3[2];
_local12 = _arg4[0];
_local13 = _arg4[1];
_local14 = _arg4[2];
_local15 = _local6.x;
_local16 = _local6.y;
_local17 = _local7.x;
_local18 = _local7.y;
_local19 = _local8.x;
_local20 = _local8.y;
_local21 = (_local17 - _local15);
_local22 = (_local18 - _local16);
_local23 = (_local19 - _local15);
_local24 = (_local20 - _local16);
_local25 = (_local19 - _local17);
_local26 = (_local20 - _local18);
_local27 = -(((_local15 * _local21) + (_local16 * _local22)));
_local28 = ((_local17 * _local21) + (_local18 * _local22));
_local29 = -(((_local15 * _local23) + (_local16 * _local24)));
_local30 = ((_local19 * _local23) + (_local20 * _local24));
_local31 = -(((_local17 * _local25) + (_local18 * _local26)));
_local32 = ((_local19 * _local25) + (_local20 * _local26));
if ((((_local30 <= 0)) && ((_local32 <= 0)))){
_arg1.SetV(_local11);
_arg2.SetV(_local14);
_local9.SetV(_local11);
_local12.SetV(_local14);
_local6.SetV(_local8);
return (1);
};
_local33 = ((_local21 * _local24) - (_local22 * _local23));
_local34 = (_local33 * ((_local15 * _local18) - (_local16 * _local17)));
_local36 = (_local33 * ((_local17 * _local20) - (_local18 * _local19)));
if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){
_local35 = (_local31 / (_local31 + _local32));
_arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x)));
_arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y)));
_arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x)));
_arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y)));
_local9.SetV(_local11);
_local12.SetV(_local14);
_local6.SetV(_local8);
return (2);
};
_local37 = (_local33 * ((_local19 * _local16) - (_local20 * _local15)));
if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){
_local35 = (_local29 / (_local29 + _local30));
_arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x)));
_arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y)));
_arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x)));
_arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y)));
_local10.SetV(_local11);
_local13.SetV(_local14);
_local7.SetV(_local8);
return (2);
};
_local38 = ((_local36 + _local37) + _local34);
_local38 = (1 / _local38);
_local39 = (_local36 * _local38);
_local40 = (_local37 * _local38);
_local41 = ((1 - _local39) - _local40);
_arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x));
_arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y));
_arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x));
_arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y));
return (3);
}
public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{
var _local7:b2Mat22;
var _local8:b2Vec2;
var _local9:b2Point;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local9 = gPoint;
_local8 = _arg5.m_localPosition;
_local7 = _arg6.R;
_local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)));
_local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)));
_local10 = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity);
_local11 = (_arg5.m_radius - b2Settings.b2_toiSlop);
if (_local10 > _local11){
_local10 = (_local10 - _local11);
_local12 = (_arg2.x - _arg1.x);
_local13 = (_arg2.y - _arg1.y);
_local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13)));
_local12 = (_local12 / _local14);
_local13 = (_local13 / _local14);
_arg2.x = (_arg2.x - (_local11 * _local12));
_arg2.y = (_arg2.y - (_local11 * _local13));
} else {
_local10 = 0;
_arg2.x = _arg1.x;
_arg2.y = _arg1.y;
};
return (_local10);
}
public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{
var _local7:int;
var _local8:int;
_local7 = _arg3.m_type;
_local8 = _arg5.m_type;
if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){
return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6));
};
if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){
return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6));
};
if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){
return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4));
};
if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){
return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6));
};
return (0);
}
public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local6 = _arg5[0];
_local7 = _arg5[1];
_local8 = _arg3[0];
_local9 = _arg3[1];
_local10 = _arg4[0];
_local11 = _arg4[1];
_local12 = -(_local7.x);
_local13 = -(_local7.y);
_local14 = (_local6.x - _local7.x);
_local15 = (_local6.y - _local7.y);
_local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15)));
_local14 = (_local14 / _local16);
_local15 = (_local15 / _local16);
_local17 = ((_local12 * _local14) + (_local13 * _local15));
if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){
_arg1.SetV(_local9);
_arg2.SetV(_local11);
_local8.SetV(_local9);
_local10.SetV(_local11);
_local6.SetV(_local7);
return (1);
};
_local17 = (_local17 / _local16);
_arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x)));
_arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y)));
_arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x)));
_arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y)));
return (2);
}
}
}//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2Manifold {
public var points:Array;
public var pointCount:int;// = 0
public var normal:b2Vec2;
public function b2Manifold(){
var _local1:int;
pointCount = 0;
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ManifoldPoint();
_local1++;
};
normal = new b2Vec2();
}
public function Set(_arg1:b2Manifold):void{
var _local2:int;
pointCount = _arg1.pointCount;
_local2 = 0;
while (_local2 < b2Settings.b2_maxManifoldPoints) {
(points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]);
_local2++;
};
normal.SetV(_arg1.normal);
}
public function Reset():void{
var _local1:int;
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
(points[_local1] as b2ManifoldPoint).Reset();
_local1++;
};
normal.SetZero();
pointCount = 0;
}
}
}//package Box2D.Collision
Section 19
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2ManifoldPoint {
public var separation:Number;
public var localPoint2:b2Vec2;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var localPoint1:b2Vec2;
public var id:b2ContactID;
public function b2ManifoldPoint(){
localPoint1 = new b2Vec2();
localPoint2 = new b2Vec2();
id = new b2ContactID();
super();
}
public function Set(_arg1:b2ManifoldPoint):void{
localPoint1.SetV(_arg1.localPoint1);
localPoint2.SetV(_arg1.localPoint2);
separation = _arg1.separation;
normalImpulse = _arg1.normalImpulse;
tangentImpulse = _arg1.tangentImpulse;
id.key = _arg1.id.key;
}
public function Reset():void{
localPoint1.SetZero();
localPoint2.SetZero();
separation = 0;
normalImpulse = 0;
tangentImpulse = 0;
id.key = 0;
}
}
}//package Box2D.Collision
Section 20
//b2OBB (Box2D.Collision.b2OBB)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2OBB {
public var R:b2Mat22;
public var center:b2Vec2;
public var extents:b2Vec2;
public function b2OBB(){
R = new b2Mat22();
center = new b2Vec2();
extents = new b2Vec2();
super();
}
}
}//package Box2D.Collision
Section 21
//b2Pair (Box2D.Collision.b2Pair)
package Box2D.Collision {
import Box2D.Common.*;
public class b2Pair {
public var userData;// = null
public var proxyId1:uint;
public var proxyId2:uint;
public var status:uint;
public var next:uint;
public static var e_pairFinal:uint = 4;
public static var b2_tableMask:int = (b2_tableCapacity - 1);
public static var e_pairRemoved:uint = 2;
public static var b2_nullPair:uint = b2Settings.USHRT_MAX;
public static var e_pairBuffered:uint = 1;
public static var b2_nullProxy:uint = b2Settings.USHRT_MAX;
public static var b2_tableCapacity:int = b2Settings.b2_maxPairs;
public function b2Pair(){
userData = null;
super();
}
public function SetBuffered():void{
status = (status | e_pairBuffered);
}
public function IsBuffered():Boolean{
return (((status & e_pairBuffered) == e_pairBuffered));
}
public function IsFinal():Boolean{
return (((status & e_pairFinal) == e_pairFinal));
}
public function ClearRemoved():void{
status = (status & ~(e_pairRemoved));
}
public function SetFinal():void{
status = (status | e_pairFinal);
}
public function IsRemoved():Boolean{
return (((status & e_pairRemoved) == e_pairRemoved));
}
public function ClearBuffered():void{
status = (status & ~(e_pairBuffered));
}
public function SetRemoved():void{
status = (status | e_pairRemoved);
}
}
}//package Box2D.Collision
Section 22
//b2PairCallback (Box2D.Collision.b2PairCallback)
package Box2D.Collision {
public class b2PairCallback {
public function PairRemoved(_arg1, _arg2, _arg3):void{
}
public function PairAdded(_arg1, _arg2){
return (null);
}
}
}//package Box2D.Collision
Section 23
//b2PairManager (Box2D.Collision.b2PairManager)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Common.*;
public class b2PairManager {
public var m_pairCount:int;
public var :Array;
public var :b2PairCallback;
public var m_pairs:Array;
public var :int;
public var m_hashTable:Array;
public var m_broadPhase:b2BroadPhase;
public var :uint;
public function b2PairManager(){
var _local1:uint;
super();
m_hashTable = new Array(b2Pair.b2_tableCapacity);
_local1 = 0;
while (_local1 < b2Pair.b2_tableCapacity) {
m_hashTable[_local1] = b2Pair.b2_nullPair;
_local1++;
};
m_pairs = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairs[_local1] = new b2Pair();
_local1++;
};
= new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
[_local1] = new b2BufferedPair();
_local1++;
};
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy;
m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy;
m_pairs[_local1].userData = null;
m_pairs[_local1].status = 0;
m_pairs[_local1].next = (_local1 + 1);
_local1++;
};
m_pairs[int((b2Settings.b2_maxPairs - 1))].next = b2Pair.b2_nullPair;
m_pairCount = 0;
= 0;
}
private function (_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{
var _local4:b2Pair;
var _local5:uint;
_local5 = m_hashTable[_arg3];
_local4 = m_pairs[_local5];
while (((!((_local5 == b2Pair.b2_nullPair))) && ((Equals(_local4, _arg1, _arg2) == false)))) {
_local5 = _local4.next;
_local4 = m_pairs[_local5];
};
if (_local5 == b2Pair.b2_nullPair){
return (null);
};
return (_local4);
}
private function (_arg1:uint, _arg2:uint):b2Pair{
var _local3:uint;
var _local4:uint;
if (_arg1 > _arg2){
_local4 = _arg1;
_arg1 = _arg2;
_arg2 = _local4;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
return ((_arg1, _arg2, _local3));
}
private function ():void{
}
public function Commit():void{
var _local1:b2BufferedPair;
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:b2Pair;
var _local6:b2Proxy;
var _local7:b2Proxy;
_local3 = 0;
_local4 = m_broadPhase.m_proxyPool;
_local2 = 0;
while (_local2 < ) {
_local1 = [_local2];
_local5 = (_local1.proxyId1, _local1.proxyId2);
_local5.ClearBuffered();
_local6 = _local4[_local5.proxyId1];
_local7 = _local4[_local5.proxyId2];
if (_local5.IsRemoved()){
if (_local5.IsFinal() == true){
.PairRemoved(_local6.userData, _local7.userData, _local5.userData);
};
_local1 = [_local3];
_local1.proxyId1 = _local5.proxyId1;
_local1.proxyId2 = _local5.proxyId2;
_local3++;
} else {
if (_local5.IsFinal() == false){
_local5.userData = .PairAdded(_local6.userData, _local7.userData);
_local5.SetFinal();
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local3) {
_local1 = [_local2];
(_local1.proxyId1, _local1.proxyId2);
_local2++;
};
= 0;
if (b2BroadPhase.s_validate){
();
};
}
public function RemoveBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair;
_local4 = (_arg1, _arg2);
if (_local4 == null){
return;
};
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = [];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
++;
};
_local4.SetRemoved();
if (b2BroadPhase.s_validate){
();
};
}
private function
(_arg1:uint, _arg2:uint){
var _local3:b2Pair;
var _local4:uint;
var _local5:uint;
var _local6:b2Pair;
var _local7:uint;
var _local8:uint;
var _local9:*;
if (_arg1 > _arg2){
_local7 = _arg1;
_arg1 = _arg2;
_arg2 = _local7;
};
_local4 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local5 = m_hashTable[_local4];
_local6 = null;
while (_local5 != b2Pair.b2_nullPair) {
if (Equals(m_pairs[_local5], _arg1, _arg2)){
_local8 = _local5;
_local3 = m_pairs[_local5];
if (_local6){
_local6.next = _local3.next;
} else {
m_hashTable[_local4] = _local3.next;
};
_local3 = m_pairs[_local8];
_local9 = _local3.userData;
_local3.next = ;
_local3.proxyId1 = b2Pair.b2_nullProxy;
_local3.proxyId2 = b2Pair.b2_nullProxy;
_local3.userData = null;
_local3.status = 0;
= _local8;
m_pairCount--;
return (_local9);
} else {
_local6 = m_pairs[_local5];
_local5 = _local6.next;
};
};
return (null);
}
public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{
m_broadPhase = _arg1;
= _arg2;
}
public function AddBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair;
_local4 = (_arg1, _arg2);
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = [];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
++;
};
_local4.ClearRemoved();
if (b2BroadPhase.s_validate){
();
};
}
private function (_arg1:uint, _arg2:uint):b2Pair{
var _local3:uint;
var _local4:b2Pair;
var _local5:uint;
var _local6:uint;
if (_arg1 > _arg2){
_local6 = _arg1;
_arg1 = _arg2;
_arg2 = _local6;
};
_local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
_local4 = (_arg1, _arg2, _local3);
if (_local4 != null){
return (_local4);
};
_local5 = ;
_local4 = m_pairs[_local5];
= _local4.next;
_local4.proxyId1 = _arg1;
_local4.proxyId2 = _arg2;
_local4.status = 0;
_local4.userData = null;
_local4.next = m_hashTable[_local3];
m_hashTable[_local3] = _local5;
m_pairCount++;
return (_local4);
}
private function ():void{
}
public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2))));
}
public static function Hash(_arg1:uint, _arg2:uint):uint{
var _local3:uint;
_local3 = (((_arg2 << 16) & 4294901760) | _arg1);
_local3 = (~(_local3) + ((_local3 << 15) & 4294934528));
_local3 = (_local3 ^ ((_local3 >> 12) & 1048575));
_local3 = (_local3 + ((_local3 << 2) & 4294967292));
_local3 = (_local3 ^ ((_local3 >> 4) & 268435455));
_local3 = (_local3 * 2057);
_local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF));
return (_local3);
}
public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{
return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3))));
}
}
}//package Box2D.Collision
Section 24
//b2Point (Box2D.Collision.b2Point)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2Point {
public var p:b2Vec2;
public function b2Point(){
p = new b2Vec2();
super();
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return (p);
}
public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{
return (p);
}
}
}//package Box2D.Collision
Section 25
//b2Proxy (Box2D.Collision.b2Proxy)
package Box2D.Collision {
public class b2Proxy {
public var overlapCount:uint;
public var lowerBounds:Array;
public var upperBounds:Array;
public var userData;// = null
public var timeStamp:uint;
public function b2Proxy(){
lowerBounds = [uint(0), uint(0)];
upperBounds = [uint(0), uint(0)];
userData = null;
super();
}
public function GetNext():uint{
return (lowerBounds[0]);
}
public function IsValid():Boolean{
return (!((overlapCount == b2BroadPhase.b2_invalid)));
}
public function SetNext(_arg1:uint):void{
lowerBounds[0] = (_arg1 & 0xFFFF);
}
}
}//package Box2D.Collision
Section 26
//b2Segment (Box2D.Collision.b2Segment)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class b2Segment {
public var p1:b2Vec2;
public var p2:b2Vec2;
public function b2Segment(){
p1 = new b2Vec2();
p2 = new b2Vec2();
super();
}
public function TestSegment(_arg1:Array, _arg2:b2Vec2, _arg3:b2Segment, _arg4:Number):Boolean{
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
_local5 = _arg3.p1;
_local6 = (_arg3.p2.x - _local5.x);
_local7 = (_arg3.p2.y - _local5.y);
_local8 = (p2.x - p1.x);
_local9 = (p2.y - p1.y);
_local10 = _local9;
_local11 = -(_local8);
_local12 = (100 * Number.MIN_VALUE);
_local13 = -(((_local6 * _local10) + (_local7 * _local11)));
if (_local13 > _local12){
_local14 = (_local5.x - p1.x);
_local15 = (_local5.y - p1.y);
_local16 = ((_local14 * _local10) + (_local15 * _local11));
if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){
_local17 = ((-(_local7) * _local15) + (_local7 * _local14));
if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){
_local16 = (_local16 / _local13);
_local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
_local10 = (_local10 / _local18);
_local11 = (_local11 / _local18);
_arg1[0] = _local16;
_arg2.Set(_local10, _local11);
return (true);
};
};
};
return (false);
}
}
}//package Box2D.Collision
Section 27
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact)
package Box2D.Collision {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2TimeOfImpact {
public static var s_xf1:b2XForm = new b2XForm();
public static var s_xf2:b2XForm = new b2XForm();
public static var s_p1:b2Vec2 = new b2Vec2();
public static var s_p2:b2Vec2 = new b2Vec2();
public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:b2Vec2;
var _local18:b2Vec2;
var _local19:int;
var _local20:int;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:b2XForm;
var _local27:b2XForm;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
_local7 = _arg1.m_sweepRadius;
_local8 = _arg3.m_sweepRadius;
_local9 = _arg2.t0;
_local10 = (_arg2.c.x - _arg2.c0.x);
_local11 = (_arg2.c.y - _arg2.c0.y);
_local12 = (_arg4.c.x - _arg4.c0.x);
_local13 = (_arg4.c.y - _arg4.c0.y);
_local14 = (_arg2.a - _arg2.a0);
_local15 = (_arg4.a - _arg4.a0);
_local16 = 0;
_local17 = s_p1;
_local18 = s_p2;
_local19 = 20;
_local20 = 0;
_local21 = 0;
_local22 = 0;
_local23 = 0;
_local24 = 0;
while (true) {
_local25 = (((1 - _local16) * _local9) + _local16);
_local26 = s_xf1;
_local27 = s_xf2;
_arg2.GetXForm(_local26, _local25);
_arg4.GetXForm(_local27, _local25);
_local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27);
if (_local20 == 0){
if (_local23 > (2 * b2Settings.b2_toiSlop)){
_local24 = (1.5 * b2Settings.b2_toiSlop);
} else {
_local5 = (0.05 * b2Settings.b2_toiSlop);
_local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop));
_local24 = ((_local5 > _local6)) ? _local5 : _local6;
};
};
if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){
break;
};
_local21 = (_local18.x - _local17.x);
_local22 = (_local18.y - _local17.y);
_local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22)));
_local21 = (_local21 / _local28);
_local22 = (_local22 / _local28);
_local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8));
if (_local29 == 0){
_local16 = 1;
break;
};
_local30 = ((_local23 - _local24) / _local29);
_local31 = (_local16 + _local30);
if ((((_local31 < 0)) || ((1 < _local31)))){
_local16 = 1;
break;
};
if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){
break;
};
_local16 = _local31;
_local20++;
};
return (_local16);
}
}
}//package Box2D.Collision
Section 28
//ClipVertex (Box2D.Collision.ClipVertex)
package Box2D.Collision {
import Box2D.Common.Math.*;
public class ClipVertex {
public var v:b2Vec2;
public var id:b2ContactID;
public function ClipVertex(){
v = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Collision
Section 29
//Features (Box2D.Collision.Features)
package Box2D.Collision {
public class Features {
public var :int;
public var
:int;
public var
:int;
public var
:int;
public var
:b2ContactID;
public function get referenceEdge():int{
return ( );
}
public function set incidentVertex(_arg1:int):void{
= _arg1;
._key = ((
._key & 4278255615) | ((
<< 16) & 0xFF0000));
}
public function get flip():int{
return (
);
}
public function get incidentEdge():int{
return (
);
}
public function set referenceEdge(_arg1:int):void{
= _arg1;
._key = ((
._key & 4294967040) | ( & 0xFF));
}
public function set flip(_arg1:int):void{
= _arg1;
._key = ((
._key & 0xFFFFFF) | ((
<< 24) & 4278190080));
}
public function get incidentVertex():int{
return (
);
}
public function set incidentEdge(_arg1:int):void{
= _arg1;
._key = ((
._key & 4294902015) | ((
<< 8) & 0xFF00));
}
}
}//package Box2D.Collision
Section 30
//b2Mat22 (Box2D.Common.Math.b2Mat22)
package Box2D.Common.Math {
public class b2Mat22 {
public var col1:b2Vec2;
public var col2:b2Vec2;
public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){
var _local4:Number;
var _local5:Number;
col1 = new b2Vec2();
col2 = new b2Vec2();
super();
if (((!((_arg2 == null))) && (!((_arg3 == null))))){
col1.SetV(_arg2);
col2.SetV(_arg3);
} else {
_local4 = Math.cos(_arg1);
_local5 = Math.sin(_arg1);
col1.x = _local4;
col2.x = -(_local5);
col1.y = _local5;
col2.y = _local4;
};
}
public function SetIdentity():void{
col1.x = 1;
col2.x = 0;
col1.y = 0;
col2.y = 1;
}
public function Set(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
col1.x = _local2;
col2.x = -(_local3);
col1.y = _local3;
col2.y = _local2;
}
public function (_arg1:b2Vec2, _arg2:b2Vec2):void{
col1.SetV(_arg1);
col2.SetV(_arg2);
}
public function SetZero():void{
col1.x = 0;
col2.x = 0;
col1.y = 0;
col2.y = 0;
}
public function SetM(_arg1:b2Mat22):void{
col1.SetV(_arg1.col1);
col2.SetV(_arg1.col2);
}
public function AddM(_arg1:b2Mat22):void{
col1.x = (col1.x + _arg1.col1.x);
col1.y = (col1.y + _arg1.col1.y);
col2.x = (col2.x + _arg1.col2.x);
col2.y = (col2.y + _arg1.col2.y);
}
public function Abs():void{
col1.Abs();
col2.Abs();
}
public function Copy():b2Mat22{
return (new b2Mat22(0, col1, col2));
}
public function Invert(_arg1:b2Mat22):b2Mat22{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = col1.x;
_local3 = col2.x;
_local4 = col1.y;
_local5 = col2.y;
_local6 = ((_local2 * _local5) - (_local3 * _local4));
_local6 = (1 / _local6);
_arg1.col1.x = (_local6 * _local5);
_arg1.col2.x = (-(_local6) * _local3);
_arg1.col1.y = (-(_local6) * _local4);
_arg1.col2.y = (_local6 * _local2);
return (_arg1);
}
public function GetAngle():Number{
return (Math.atan2(col1.y, col1.x));
}
public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local4 = col1.x;
_local5 = col2.x;
_local6 = col1.y;
_local7 = col2.y;
_local8 = ((_local4 * _local7) - (_local5 * _local6));
_local8 = (1 / _local8);
_arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3)));
_arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2)));
return (_arg1);
}
}
}//package Box2D.Common.Math
Section 31
//b2Math (Box2D.Common.Math.b2Math)
package Box2D.Common.Math {
public class b2Math {
public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1));
public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity);
public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0);
public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x));
return (_local3);
}
public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y));
return (_local3);
}
public static function b2IsValid(_arg1:Number):Boolean{
return (isFinite(_arg1));
}
public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = b2MulMV(_arg1.R, _arg2);
_local3.x = (_local3.x + _arg1.position.x);
_local3.y = (_local3.y + _arg1.position.y);
return (_local3);
}
public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number;
var _local4:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
return (((_local3 * _local3) + (_local4 * _local4)));
}
public static function b2Swap(_arg1:Array, _arg2:Array):void{
var _local3:*;
_local3 = _arg1[0];
_arg1[0] = _arg2[0];
_arg2[0] = _local3;
}
public static function b2AbsM(_arg1:b2Mat22):b2Mat22{
var _local2:b2Mat22;
_local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2));
return (_local2);
}
public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y));
return (_local3);
}
public static function b2MulXT(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
var _local4:Number;
_local3 = SubtractVV(_arg2, _arg1.position);
_local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y));
_local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y));
_local3.x = _local4;
return (_local3);
}
public static function b2Abs(_arg1:Number):Number{
return (((_arg1 > 0)) ? _arg1 : -(_arg1));
}
public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (b2Max(_arg2, b2Min(_arg1, _arg3)));
}
public static function b2AbsV(_arg1:b2Vec2):b2Vec2{
var _local2:b2Vec2;
_local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y));
return (_local2);
}
public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y));
return (_local3);
}
public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x)));
}
public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x));
return (_local3);
}
public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22;
_local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2));
return (_local3);
}
public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number;
var _local4:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2Mat22;
_local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1));
_local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2));
_local5 = new b2Mat22(0, _local3, _local4);
return (_local5);
}
public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2IsPowerOfTwo(_arg1:uint):Boolean{
var _local2:Boolean;
_local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0)));
return (_local2);
}
public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{
return (b2MaxV(_arg2, b2MinV(_arg1, _arg3)));
}
public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = Math.random();
_local3 = (((_arg2 - _arg1) * _local3) + _arg1);
return (_local3);
}
public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2));
return (_local3);
}
public static function b2Min(_arg1:Number, _arg2:Number):Number{
return (((_arg1 < _arg2)) ? _arg1 : _arg2);
}
public static function b2Random():Number{
return (((Math.random() * 2) - 1));
}
public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22;
_local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2));
return (_local3);
}
public static function b2NextPowerOfTwo(_arg1:uint):uint{
_arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647));
_arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823));
_arg1 = (_arg1 | ((_arg1 >> 4) & 268435455));
_arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF));
_arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF));
return ((_arg1 + 1));
}
public static function b2Max(_arg1:Number, _arg2:Number):Number{
return (((_arg1 > _arg2)) ? _arg1 : _arg2);
}
public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2;
_local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y)));
return (_local3);
}
}
}//package Box2D.Common.Math
Section 32
//b2Sweep (Box2D.Common.Math.b2Sweep)
package Box2D.Common.Math {
public class b2Sweep {
public var localCenter:b2Vec2;
public var c:b2Vec2;
public var a:Number;
public var c0:b2Vec2;
public var a0:Number;
public var t0:Number;
public function b2Sweep(){
localCenter = new b2Vec2();
c0 = new b2Vec2();
c = new b2Vec2();
super();
}
public function Advance(_arg1:Number):void{
var _local2:Number;
if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){
_local2 = ((_arg1 - t0) / (1 - t0));
c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x));
c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y));
a0 = (((1 - _local2) * a0) + (_local2 * a));
t0 = _arg1;
};
}
public function GetXForm(_arg1:b2XForm, _arg2:Number):void{
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
if ((1 - t0) > Number.MIN_VALUE){
_local4 = ((_arg2 - t0) / (1 - t0));
_arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x));
_arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y));
_local5 = (((1 - _local4) * a0) + (_local4 * a));
_arg1.R.Set(_local5);
} else {
_arg1.position.SetV(c);
_arg1.R.Set(a);
};
_local3 = _arg1.R;
_arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y)));
_arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y)));
}
}
}//package Box2D.Common.Math
Section 33
//b2Vec2 (Box2D.Common.Math.b2Vec2)
package Box2D.Common.Math {
public class b2Vec2 {
public var x:Number;
public var y:Number;
public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{
x = _arg1;
y = _arg2;
}
public function Set(_arg1:Number=0, _arg2:Number=0):void{
x = _arg1;
y = _arg2;
}
public function Multiply(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
}
public function Length():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function LengthSquared():Number{
return (((x * x) + (y * y)));
}
public function SetZero():void{
x = 0;
y = 0;
}
public function Add(_arg1:b2Vec2):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function (_arg1:b2Vec2):void{
x = ((x > _arg1.x)) ? x : _arg1.x;
y = ((y > _arg1.y)) ? y : _arg1.y;
}
public function SetV(_arg1:b2Vec2):void{
x = _arg1.x;
y = _arg1.y;
}
public function Negative():b2Vec2{
return (new b2Vec2(-(x), -(y)));
}
public function (_arg1:Number):void{
var _local2:Number;
_local2 = x;
x = (_arg1 * y);
y = (-(_arg1) * _local2);
}
public function Abs():void{
if (x < 0){
x = -(x);
};
if (y < 0){
y = -(y);
};
}
public function Copy():b2Vec2{
return (new b2Vec2(x, y));
}
public function (_arg1:b2Mat22):void{
var _local2:Number;
_local2 = b2Math.b2Dot(this, _arg1.col1);
y = b2Math.b2Dot(this, _arg1.col2);
x = _local2;
}
public function IsValid():Boolean{
return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y))));
}
public function
(_arg1:b2Vec2):void{
x = ((x < _arg1.x)) ? x : _arg1.x;
y = ((y < _arg1.y)) ? y : _arg1.y;
}
public function (_arg1:b2Mat22):void{
var _local2:Number;
_local2 = x;
x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y));
y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y));
}
public function Normalize():Number{
var _local1:Number;
var _local2:Number;
_local1 = Math.sqrt(((x * x) + (y * y)));
if (_local1 < Number.MIN_VALUE){
return (0);
};
_local2 = (1 / _local1);
x = (x * _local2);
y = (y * _local2);
return (_local1);
}
public function Subtract(_arg1:b2Vec2):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function (_arg1:Number):void{
var _local2:Number;
_local2 = x;
x = (-(_arg1) * y);
y = (_arg1 * _local2);
}
public static function Make(_arg1:Number, _arg2:Number):b2Vec2{
return (new b2Vec2(_arg1, _arg2));
}
}
}//package Box2D.Common.Math
Section 34
//b2XForm (Box2D.Common.Math.b2XForm)
package Box2D.Common.Math {
public class b2XForm {
public var R:b2Mat22;
public var position:b2Vec2;
public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{
position = new b2Vec2();
R = new b2Mat22();
super();
if (_arg1){
position.SetV(_arg1);
R.SetM(_arg2);
};
}
public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{
position.SetV(_arg1);
R.SetM(_arg2);
}
public function Set(_arg1:b2XForm):void{
position.SetV(_arg1.position);
R.SetM(_arg1.R);
}
public function SetIdentity():void{
position.SetZero();
R.SetIdentity();
}
}
}//package Box2D.Common.Math
Section 35
//b2Color (Box2D.Common.b2Color)
package Box2D.Common {
import Box2D.Common.Math.*;
public class b2Color {
private var :uint;// = 0
private var :uint;// = 0
private var :uint;// = 0
public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){
= 0;
= 0;
= 0;
super();
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
= uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function get color():uint{
return ((( | ( << 8)) | ( << 16)));
}
public function set r(_arg1:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set b(_arg1:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set g(_arg1:Number):void{
= uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
}
}//package Box2D.Common
Section 36
//b2Settings (Box2D.Common.b2Settings)
package Box2D.Common {
import Box2D.Common.Math.*;
public class b2Settings {
public static const b2_angularSleepTolerance:Number = 0.0111111111111111;
public static const b2_linearSleepTolerance:Number = 0.01;
public static const b2_angularSlop:Number = 0.0349065850398866;
public static const b2_linearSlop:Number = 0.005;
public static const b2_pi:Number = 3.14159265358979;
public static const b2_maxProxies:int = 0x0800;
public static const b2_maxAngularVelocitySquared:Number = 62500;
public static const b2_maxPolygonVertices:int = 8;
public static const b2_velocityThreshold:Number = 1;
public static const b2_contactBaumgarte:Number = 0.2;
public static const b2_maxPairs:int = 16384;
public static const b2_maxTOIContactsPerIsland:int = 32;
public static const b2_timeToSleep:Number = 0.5;
public static const b2_maxManifoldPoints:int = 2;
public static const b2_maxAngularVelocity:Number = 250;
public static const b2_maxAngularCorrection:Number = 0.139626340159546;
public static const USHRT_MAX:int = 0xFFFF;
public static const b2_maxLinearVelocity:Number = 200;
public static const b2_maxLinearCorrection:Number = 0.2;
public static const b2_toiSlop:Number = 0.04;
public static const b2_maxLinearVelocitySquared:Number = 40000;
public static function b2Assert(_arg1:Boolean):void{
var _local2:b2Vec2;
if (!_arg1){
_local2.x++;
};
}
}
}//package Box2D.Common
Section 37
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class b2CircleContact extends b2Contact {
private var :Array;
private var :b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){
var _local3:b2ManifoldPoint;
= [new b2Manifold()];
= new b2Manifold();
super(_arg1, _arg2);
m_manifold = [0];
m_manifold.pointCount = 0;
_local3 = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function GetManifolds():Array{
return ();
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2ManifoldPoint;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactPoint;
var _local8:b2ManifoldPoint;
_local5 = m_shape1.m_body;
_local6 = m_shape2.m_body;
.Set(m_manifold);
b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf);
_local7 = s_evalCP;
_local7.shape1 = m_shape1;
_local7.shape2 = m_shape2;
_local7.friction = m_friction;
_local7.restitution = m_restitution;
if (m_manifold.pointCount > 0){
m_manifoldCount = 1;
_local8 = m_manifold.points[0];
if ( .pointCount == 0){
_local8.normalImpulse = 0;
_local8.tangentImpulse = 0;
if (_arg1){
_local7.position = _local5.GetWorldPoint(_local8.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local8.separation;
_local7.id.key = _local8.id._key;
_arg1.Add(_local7);
};
} else {
_local4 = .points[0];
_local8.normalImpulse = _local4.normalImpulse;
_local8.tangentImpulse = _local4.tangentImpulse;
if (_arg1){
_local7.position = _local5.GetWorldPoint(_local8.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local8.separation;
_local7.id.key = _local8.id._key;
_arg1.Persist(_local7);
};
};
} else {
m_manifoldCount = 0;
if (((( .pointCount > 0)) && (_arg1))){
_local4 = .points[0];
_local7.position = _local5.GetWorldPoint(_local4.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV( .normal);
_local7.separation = _local4.separation;
_local7.id.key = _local4.id._key;
_arg1.Remove(_local7);
};
};
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2CircleContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 38
//b2Contact (Box2D.Dynamics.Contacts.b2Contact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2Contact {
public var m_shape1:b2Shape;
public var m_shape2:b2Shape;
public var m_prev:b2Contact;
public var m_toi:Number;
public var m_next:b2Contact;
public var m_friction:Number;
public var m_manifoldCount:int;
public var m_node1:b2ContactEdge;
public var m_node2:b2ContactEdge;
public var m_restitution:Number;
public var m_flags:uint;
public static var e_toiFlag:uint = 8;
public static var e_nonSolidFlag:uint = 1;
public static var e_slowFlag:uint = 2;
public static var e_islandFlag:uint = 4;
public static var s_registers:Array;
public static var s_initialized:Boolean = false;
public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){
m_node1 = new b2ContactEdge();
m_node2 = new b2ContactEdge();
super();
m_flags = 0;
if (((!(_arg1)) || (!(_arg2)))){
m_shape1 = null;
m_shape2 = null;
return;
};
if (((_arg1.
()) || (_arg2.
()))){
m_flags = (m_flags | e_nonSolidFlag);
};
m_shape1 = _arg1;
m_shape2 = _arg2;
m_manifoldCount = 0;
m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction));
m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution);
m_prev = null;
m_next = null;
m_node1.contact = null;
m_node1.prev = null;
m_node1.next = null;
m_node1.other = null;
m_node2.contact = null;
m_node2.prev = null;
m_node2.next = null;
m_node2.other = null;
}
public function GetShape1():b2Shape{
return (m_shape1);
}
public function ():Boolean{
return (((m_flags & e_nonSolidFlag) == 0));
}
public function GetNext():b2Contact{
return (m_next);
}
public function GetManifolds():Array{
return (null);
}
public function GetShape2():b2Shape{
return (m_shape2);
}
public function
():int{
return (m_manifoldCount);
}
public function Update(_arg1:b2ContactListener):void{
var _local2:int;
var _local3:int;
var _local4:b2Body;
var _local5:b2Body;
_local2 = m_manifoldCount;
Evaluate(_arg1);
_local3 = m_manifoldCount;
_local4 = m_shape1.m_body;
_local5 = m_shape2.m_body;
if ((((_local3 == 0)) && ((_local2 > 0)))){
_local4.WakeUp();
_local5.WakeUp();
};
if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){
m_flags = (m_flags & ~(e_slowFlag));
} else {
m_flags = (m_flags | e_slowFlag);
};
}
public function Evaluate(_arg1:b2ContactListener):void{
}
public static function InitializeRegisters():void{
var _local1:int;
var _local2:int;
s_registers = new Array(b2Shape.e_shapeTypeCount);
_local1 = 0;
while (_local1 < b2Shape.e_shapeTypeCount) {
s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount);
_local2 = 0;
while (_local2 < b2Shape.e_shapeTypeCount) {
s_registers[_local1][_local2] = new b2ContactRegister();
_local2++;
};
_local1++;
};
AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape);
AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape);
AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape);
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
var _local3:int;
var _local4:int;
var _local5:b2ContactRegister;
var _local6:Function;
if (_arg1.m_manifoldCount > 0){
_arg1.m_shape1.m_body.WakeUp();
_arg1.m_shape2.m_body.WakeUp();
};
_local3 = _arg1.m_shape1.m_type;
_local4 = _arg1.m_shape2.m_type;
_local5 = s_registers[_local3][_local4];
_local6 = _local5.destroyFcn;
_local6(_arg1, _arg2);
}
public static function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{
s_registers[_arg3][_arg4].createFcn = _arg1;
s_registers[_arg3][_arg4].destroyFcn = _arg2;
s_registers[_arg3][_arg4].primary = true;
if (_arg3 != _arg4){
s_registers[_arg4][_arg3].createFcn = _arg1;
s_registers[_arg4][_arg3].destroyFcn = _arg2;
s_registers[_arg4][_arg3].primary = false;
};
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
var _local4:int;
var _local5:int;
var _local6:b2ContactRegister;
var _local7:Function;
var _local8:b2Contact;
var _local9:int;
var _local10:b2Manifold;
if (s_initialized == false){
InitializeRegisters();
s_initialized = true;
};
_local4 = _arg1.m_type;
_local5 = _arg2.m_type;
_local6 = s_registers[_local4][_local5];
_local7 = _local6.createFcn;
if (_local7 != null){
if (_local6.primary){
return (_local7(_arg1, _arg2, _arg3));
};
_local8 = _local7(_arg2, _arg1, _arg3);
_local9 = 0;
while (_local9 < _local8.m_manifoldCount) {
_local10 = _local8.GetManifolds()[_local9];
_local8.GetManifolds()[_local9].normal = _local10.normal.Negative();
_local9++;
};
return (_local8);
//unresolved jump
};
return (null);
}
}
}//package Box2D.Dynamics.Contacts
Section 39
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2ContactConstraint {
public var points:Array;
public var restitution:Number;
public var body1:b2Body;
public var manifold:b2Manifold;
public var normal:b2Vec2;
public var body2:b2Body;
public var friction:Number;
public var pointCount:int;
public function b2ContactConstraint(){
var _local1:int;
normal = new b2Vec2();
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
_local1 = 0;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactConstraintPoint();
_local1++;
};
}
}
}//package Box2D.Dynamics.Contacts
Section 40
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
public class b2ContactConstraintPoint {
public var r2:b2Vec2;
public var separation:Number;
public var positionImpulse:Number;
public var normalImpulse:Number;
public var equalizedMass:Number;
public var tangentMass:Number;
public var tangentImpulse:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var normalMass:Number;
public var velocityBias:Number;
public var r1:b2Vec2;
public function b2ContactConstraintPoint(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
r1 = new b2Vec2();
r2 = new b2Vec2();
super();
}
}
}//package Box2D.Dynamics.Contacts
Section 41
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
public class b2ContactEdge {
public var next:b2ContactEdge;
public var other:b2Body;
public var contact:b2Contact;
public var prev:b2ContactEdge;
}
}//package Box2D.Dynamics.Contacts
Section 42
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister)
package Box2D.Dynamics.Contacts {
public class b2ContactRegister {
public var primary:Boolean;
public var createFcn:Function;
public var destroyFcn:Function;
}
}//package Box2D.Dynamics.Contacts
Section 43
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
public class b2ContactResult {
public var normal:b2Vec2;
public var position:b2Vec2;
public var shape1:b2Shape;
public var shape2:b2Shape;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var id:b2ContactID;
public function b2ContactResult(){
position = new b2Vec2();
normal = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Box2D.Dynamics.Contacts
Section 44
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2ContactSolver {
public var
:int;
public var m_constraints:Array;
public var m_allocator;
public var :b2TimeStep;
public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){
var _local5:b2Contact;
var _local6:int;
var _local7:b2Vec2;
var _local8:b2Mat22;
var _local9:int;
var _local10:b2Body;
var _local11:b2Body;
var _local12:int;
var _local13:Array;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:int;
var _local23:b2Manifold;
var _local24:Number;
var _local25:Number;
var _local26:b2ContactConstraint;
var _local27:uint;
var _local28:b2ManifoldPoint;
var _local29:b2ContactConstraintPoint;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
var _local39:Number;
var _local40:Number;
var _local41:Number;
var _local42:Number;
var _local43:Number;
var _local44:Number;
var _local45:Number;
var _local46:Number;
var _local47:Number;
= new b2TimeStep();
m_constraints = new Array();
super();
.dt = _arg1.dt;
.inv_dt = _arg1.inv_dt;
.maxIterations = _arg1.maxIterations;
m_allocator = _arg4;
= 0;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
= (
+ _local5.m_manifoldCount);
_local6++;
};
_local6 = 0;
while (_local6 <
) {
m_constraints[_local6] = new b2ContactConstraint();
_local6++;
};
_local9 = 0;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
_local10 = _local5.m_shape1.m_body;
_local11 = _local5.m_shape2.m_body;
_local12 = _local5.m_manifoldCount;
_local13 = _local5.GetManifolds();
_local14 = _local5.m_friction;
_local15 = _local5.m_restitution;
_local16 = _local10.m_linearVelocity.x;
_local17 = _local10.m_linearVelocity.y;
_local18 = _local11.m_linearVelocity.x;
_local19 = _local11.m_linearVelocity.y;
_local20 = _local10.m_angularVelocity;
_local21 = _local11.m_angularVelocity;
_local22 = 0;
while (_local22 < _local12) {
_local23 = _local13[_local22];
_local24 = _local23.normal.x;
_local25 = _local23.normal.y;
_local26 = m_constraints[_local9];
_local26.body1 = _local10;
_local26.body2 = _local11;
_local26.manifold = _local23;
_local26.normal.x = _local24;
_local26.normal.y = _local25;
_local26.pointCount = _local23.pointCount;
_local26.friction = _local14;
_local26.restitution = _local15;
_local27 = 0;
while (_local27 < _local26.pointCount) {
_local28 = _local23.points[_local27];
_local29 = _local26.points[_local27];
_local29.normalImpulse = _local28.normalImpulse;
_local29.tangentImpulse = _local28.tangentImpulse;
_local29.separation = _local28.separation;
_local29.positionImpulse = 0;
_local29.localAnchor1.SetV(_local28.localPoint1);
_local29.localAnchor2.SetV(_local28.localPoint2);
_local8 = _local10.m_xf.R;
_local32 = (_local28.localPoint1.x - _local10.m_sweep.localCenter.x);
_local33 = (_local28.localPoint1.y - _local10.m_sweep.localCenter.y);
_local30 = ((_local8.col1.x * _local32) + (_local8.col2.x * _local33));
_local33 = ((_local8.col1.y * _local32) + (_local8.col2.y * _local33));
_local32 = _local30;
_local29.r1.Set(_local32, _local33);
_local8 = _local11.m_xf.R;
_local34 = (_local28.localPoint2.x - _local11.m_sweep.localCenter.x);
_local35 = (_local28.localPoint2.y - _local11.m_sweep.localCenter.y);
_local30 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35));
_local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35));
_local34 = _local30;
_local29.r2.Set(_local34, _local35);
_local36 = ((_local32 * _local32) + (_local33 * _local33));
_local37 = ((_local34 * _local34) + (_local35 * _local35));
_local38 = ((_local32 * _local24) + (_local33 * _local25));
_local39 = ((_local34 * _local24) + (_local35 * _local25));
_local40 = (_local10.m_invMass + _local11.m_invMass);
_local40 = (_local40 + ((_local10.m_invI * (_local36 - (_local38 * _local38))) + (_local11.m_invI * (_local37 - (_local39 * _local39)))));
_local29.normalMass = (1 / _local40);
_local41 = ((_local10.m_mass * _local10.m_invMass) + (_local11.m_mass * _local11.m_invMass));
_local41 = (_local41 + (((_local10.m_mass * _local10.m_invI) * (_local36 - (_local38 * _local38))) + ((_local11.m_mass * _local11.m_invI) * (_local37 - (_local39 * _local39)))));
_local29.equalizedMass = (1 / _local41);
_local42 = _local25;
_local43 = -(_local24);
_local44 = ((_local32 * _local42) + (_local33 * _local43));
_local45 = ((_local34 * _local42) + (_local35 * _local43));
_local46 = (_local10.m_invMass + _local11.m_invMass);
_local46 = (_local46 + ((_local10.m_invI * (_local36 - (_local44 * _local44))) + (_local11.m_invI * (_local37 - (_local45 * _local45)))));
_local29.tangentMass = (1 / _local46);
_local29.velocityBias = 0;
if (_local29.separation > 0){
_local29.velocityBias = (-60 * _local29.separation);
};
_local30 = (((_local18 + (-(_local21) * _local35)) - _local16) - (-(_local20) * _local33));
_local31 = (((_local19 + (_local21 * _local34)) - _local17) - (_local20 * _local32));
_local47 = ((_local26.normal.x * _local30) + (_local26.normal.y * _local31));
if (_local47 < -(b2Settings.b2_velocityThreshold)){
_local29.velocityBias = (_local29.velocityBias + (-(_local26.restitution) * _local47));
};
_local27++;
};
_local9++;
_local22++;
};
_local6++;
};
}
public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2Mat22;
var _local5:int;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:int;
var _local19:int;
var _local20:b2ContactConstraintPoint;
var _local21:Number;
var _local22:Number;
var _local23:b2ContactConstraintPoint;
_local5 = 0;
while (_local5 <
) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_invMass;
_local10 = _local7.m_invI;
_local11 = _local8.m_invMass;
_local12 = _local8.m_invI;
_local13 = _local6.normal.x;
_local14 = _local6.normal.y;
_local15 = _local14;
_local16 = -(_local13);
if (_arg1.warmStarting){
_local19 = _local6.pointCount;
_local18 = 0;
while (_local18 < _local19) {
_local20 = _local6.points[_local18];
_local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio);
_local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio);
_local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15));
_local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16));
_local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.r1.x * _local22) - (_local20.r1.y * _local21))));
_local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21));
_local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22));
_local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.r2.x * _local22) - (_local20.r2.y * _local21))));
_local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21));
_local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22));
_local18++;
};
} else {
_local19 = _local6.pointCount;
_local18 = 0;
while (_local18 < _local19) {
_local23 = _local6.points[_local18];
_local23.normalImpulse = 0;
_local23.tangentImpulse = 0;
_local18++;
};
};
_local5++;
};
}
public function SolvePositionConstraints(_arg1:Number):Boolean{
var _local2:Number;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:int;
var _local6:b2ContactConstraint;
var _local7:b2Body;
var _local8:b2Body;
var _local9:b2Vec2;
var _local10:Number;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:int;
var _local20:int;
var _local21:b2ContactConstraintPoint;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:Number;
var _local38:Number;
_local2 = 0;
_local5 = 0;
while (_local5 <
) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_sweep.c;
_local10 = _local7.m_sweep.a;
_local11 = _local8.m_sweep.c;
_local12 = _local8.m_sweep.a;
_local13 = (_local7.m_mass * _local7.m_invMass);
_local14 = (_local7.m_mass * _local7.m_invI);
_local15 = (_local8.m_mass * _local8.m_invMass);
_local16 = (_local8.m_mass * _local8.m_invI);
_local17 = _local6.normal.x;
_local18 = _local6.normal.y;
_local19 = _local6.pointCount;
_local20 = 0;
while (_local20 < _local19) {
_local21 = _local6.points[_local20];
_local3 = _local7.m_xf.R;
_local4 = _local7.m_sweep.localCenter;
_local22 = (_local21.localAnchor1.x - _local4.x);
_local23 = (_local21.localAnchor1.y - _local4.y);
_local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23));
_local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23));
_local22 = _local26;
_local3 = _local8.m_xf.R;
_local4 = _local8.m_sweep.localCenter;
_local24 = (_local21.localAnchor2.x - _local4.x);
_local25 = (_local21.localAnchor2.y - _local4.y);
_local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25));
_local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25));
_local24 = _local26;
_local27 = (_local9.x + _local22);
_local28 = (_local9.y + _local23);
_local29 = (_local11.x + _local24);
_local30 = (_local11.y + _local25);
_local31 = (_local29 - _local27);
_local32 = (_local30 - _local28);
_local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation);
_local2 = b2Math.b2Min(_local2, _local33);
_local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0));
_local35 = (-(_local21.equalizedMass) * _local34);
_local36 = _local21.positionImpulse;
_local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0);
_local35 = (_local21.positionImpulse - _local36);
_local37 = (_local35 * _local17);
_local38 = (_local35 * _local18);
_local9.x = (_local9.x - (_local13 * _local37));
_local9.y = (_local9.y - (_local13 * _local38));
_local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37))));
_local7.m_sweep.a = _local10;
_local7.SynchronizeTransform();
_local11.x = (_local11.x + (_local15 * _local37));
_local11.y = (_local11.y + (_local15 * _local38));
_local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37))));
_local8.m_sweep.a = _local12;
_local8.SynchronizeTransform();
_local20++;
};
_local5++;
};
return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop)));
}
public function SolveVelocityConstraints():void{
var _local1:int;
var _local2:b2ContactConstraintPoint;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:b2Mat22;
var _local18:b2Vec2;
var _local19:int;
var _local20:b2ContactConstraint;
var _local21:b2Body;
var _local22:b2Body;
var _local23:Number;
var _local24:Number;
var _local25:b2Vec2;
var _local26:b2Vec2;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local35:Number;
var _local36:Number;
var _local37:int;
var _local38:Number;
_local19 = 0;
while (_local19 <
) {
_local20 = m_constraints[_local19];
_local21 = _local20.body1;
_local22 = _local20.body2;
_local23 = _local21.m_angularVelocity;
_local24 = _local22.m_angularVelocity;
_local25 = _local21.m_linearVelocity;
_local26 = _local22.m_linearVelocity;
_local27 = _local21.m_invMass;
_local28 = _local21.m_invI;
_local29 = _local22.m_invMass;
_local30 = _local22.m_invI;
_local31 = _local20.normal.x;
_local32 = _local20.normal.y;
_local33 = _local32;
_local34 = -(_local31);
_local35 = _local20.friction;
_local37 = _local20.pointCount;
_local1 = 0;
while (_local1 < _local37) {
_local2 = _local20.points[_local1];
_local7 = (((_local26.x + (-(_local24) * _local2.r2.y)) - _local25.x) - (-(_local23) * _local2.r1.y));
_local8 = (((_local26.y + (_local24 * _local2.r2.x)) - _local25.y) - (_local23 * _local2.r1.x));
_local9 = ((_local7 * _local31) + (_local8 * _local32));
_local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias));
_local10 = ((_local7 * _local33) + (_local8 * _local34));
_local12 = (_local2.tangentMass * -(_local10));
_local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0);
_local11 = (_local13 - _local2.normalImpulse);
_local38 = (_local35 * _local2.normalImpulse);
_local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local38), _local38);
_local12 = (_local14 - _local2.tangentImpulse);
_local15 = ((_local11 * _local31) + (_local12 * _local33));
_local16 = ((_local11 * _local32) + (_local12 * _local34));
_local25.x = (_local25.x - (_local27 * _local15));
_local25.y = (_local25.y - (_local27 * _local16));
_local23 = (_local23 - (_local28 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15))));
_local26.x = (_local26.x + (_local29 * _local15));
_local26.y = (_local26.y + (_local29 * _local16));
_local24 = (_local24 + (_local30 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15))));
_local2.normalImpulse = _local13;
_local2.tangentImpulse = _local14;
_local1++;
};
_local21.m_angularVelocity = _local23;
_local22.m_angularVelocity = _local24;
_local19++;
};
}
public function FinalizeVelocityConstraints():void{
var _local1:int;
var _local2:b2ContactConstraint;
var _local3:b2Manifold;
var _local4:int;
var _local5:b2ManifoldPoint;
var _local6:b2ContactConstraintPoint;
_local1 = 0;
while (_local1 <
) {
_local2 = m_constraints[_local1];
_local3 = _local2.manifold;
_local4 = 0;
while (_local4 < _local2.pointCount) {
_local5 = _local3.points[_local4];
_local6 = _local2.points[_local4];
_local5.normalImpulse = _local6.normalImpulse;
_local5.tangentImpulse = _local6.tangentImpulse;
_local4++;
};
_local1++;
};
}
}
}//package Box2D.Dynamics.Contacts
Section 45
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact)
package Box2D.Dynamics.Contacts {
import Box2D.Dynamics.*;
public class b2NullContact extends b2Contact {
override public function GetManifolds():Array{
return (null);
}
override public function Evaluate(_arg1:b2ContactListener):void{
}
}
}//package Box2D.Dynamics.Contacts
Section 46
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PolyAndCircleContact extends b2Contact {
private var :Array;
private var :b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){
var _local3:b2ManifoldPoint;
= [new b2Manifold()];
= new b2Manifold();
super(_arg1, _arg2);
m_manifold = [0];
b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape));
b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape));
m_manifold.pointCount = 0;
_local3 = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function GetManifolds():Array{
return ();
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:int;
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2ManifoldPoint;
var _local6:b2Body;
var _local7:b2Body;
var _local8:Array;
var _local9:b2ContactPoint;
var _local10:b2ManifoldPoint;
var _local11:Boolean;
var _local12:uint;
var _local13:int;
_local6 = m_shape1.m_body;
_local7 = m_shape2.m_body;
.Set(m_manifold);
b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf);
_local8 = [false, false];
_local9 = s_evalCP;
_local9.shape1 = m_shape1;
_local9.shape2 = m_shape2;
_local9.friction = m_friction;
_local9.restitution = m_restitution;
if (m_manifold.pointCount > 0){
_local2 = 0;
while (_local2 < m_manifold.pointCount) {
_local10 = m_manifold.points[_local2];
_local10.normalImpulse = 0;
_local10.tangentImpulse = 0;
_local11 = false;
_local12 = _local10.id._key;
_local13 = 0;
while (_local13 < .pointCount) {
if (_local8[_local13] == true){
} else {
_local5 = .points[_local13];
if (_local5.id._key == _local12){
_local8[_local13] = true;
_local10.normalImpulse = _local5.normalImpulse;
_local10.tangentImpulse = _local5.tangentImpulse;
_local11 = true;
if (_arg1 != null){
_local9.position = _local6.GetWorldPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m_manifold.normal);
_local9.separation = _local10.separation;
_local9.id.key = _local12;
_arg1.Persist(_local9);
};
break;
};
};
_local13++;
};
if ((((_local11 == false)) && (!((_arg1 == null))))){
_local9.position = _local6.GetWorldPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV(m_manifold.normal);
_local9.separation = _local10.separation;
_local9.id.key = _local12;
_arg1.Add(_local9);
};
_local2++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
if (_arg1 == null){
return;
};
_local2 = 0;
while (_local2 < .pointCount) {
if (_local8[_local2]){
} else {
_local5 = .points[_local2];
_local9.position = _local6.GetWorldPoint(_local5.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local5.localPoint1);
_local4 = _local7.GetLinearVelocityFromLocalPoint(_local5.localPoint2);
_local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y));
_local9.normal.SetV( .normal);
_local9.separation = _local5.separation;
_local9.id.key = _local5.id._key;
_arg1.Remove(_local9);
};
_local2++;
};
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyAndCircleContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 47
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact)
package Box2D.Dynamics.Contacts {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class b2PolygonContact extends b2Contact {
private var :Array;
private var :b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{
= new b2Manifold();
= [new b2Manifold()];
super(_arg1, _arg2);
m_manifold = [0];
m_manifold.pointCount = 0;
}
override public function GetManifolds():Array{
return ();
}
override public function Evaluate(_arg1:b2ContactListener):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2ManifoldPoint;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactPoint;
var _local8:int;
var _local9:Array;
var _local10:b2ManifoldPoint;
var _local11:Boolean;
var _local12:uint;
var _local13:int;
_local5 = m_shape1.m_body;
_local6 = m_shape2.m_body;
.Set(m_manifold);
b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf);
_local9 = [false, false];
_local7 = s_evalCP;
_local7.shape1 = m_shape1;
_local7.shape2 = m_shape2;
_local7.friction = m_friction;
_local7.restitution = m_restitution;
if (m_manifold.pointCount > 0){
_local8 = 0;
while (_local8 < m_manifold.pointCount) {
_local10 = m_manifold.points[_local8];
_local10.normalImpulse = 0;
_local10.tangentImpulse = 0;
_local11 = false;
_local12 = _local10.id._key;
_local13 = 0;
while (_local13 < .pointCount) {
if (_local9[_local13] == true){
} else {
_local4 = .points[_local13];
if (_local4.id._key == _local12){
_local9[_local13] = true;
_local10.normalImpulse = _local4.normalImpulse;
_local10.tangentImpulse = _local4.tangentImpulse;
_local11 = true;
if (_arg1 != null){
_local7.position = _local5.GetWorldPoint(_local10.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local10.separation;
_local7.id.key = _local12;
_arg1.Persist(_local7);
};
break;
};
};
_local13++;
};
if ((((_local11 == false)) && (!((_arg1 == null))))){
_local7.position = _local5.GetWorldPoint(_local10.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV(m_manifold.normal);
_local7.separation = _local10.separation;
_local7.id.key = _local12;
_arg1.Add(_local7);
};
_local8++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
if (_arg1 == null){
return;
};
_local8 = 0;
while (_local8 < .pointCount) {
if (_local9[_local8]){
} else {
_local4 = .points[_local8];
_local7.position = _local5.GetWorldPoint(_local4.localPoint1);
_local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1);
_local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2);
_local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y));
_local7.normal.SetV( .normal);
_local7.separation = _local4.separation;
_local7.id.key = _local4.id._key;
_arg1.Remove(_local7);
};
_local8++;
};
}
public static function Destroy(_arg1:b2Contact, _arg2):void{
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolygonContact(_arg1, _arg2));
}
}
}//package Box2D.Dynamics.Contacts
Section 48
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2DistanceJoint extends b2Joint {
public var m_mass:Number;
public var :b2Vec2;
public var m_impulse:Number;
public var :Number;
public var :Number;
public var m_localAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var :Number;
public var m_gamma:Number;
public var :Number;
public function b2DistanceJoint(_arg1:b2DistanceJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Vec2();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
= _arg1.length;
= _arg1.frequencyHz;
= _arg1.dampingRatio;
m_impulse = 0;
m_gamma = 0;
= 0;
m_inv_dt = 0;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2;
_local1 = new b2Vec2();
_local1.SetV();
_local1.Multiply((m_inv_dt * m_impulse));
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Mat22;
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
if ( > 0){
return (true);
};
_local2 = m_body1;
_local3 = m_body2;
_local1 = _local2.m_xf.R;
_local4 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local5 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5));
_local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5));
_local4 = _local6;
_local1 = _local3.m_xf.R;
_local7 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local8 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local6 = ((_local1.col1.x * _local7) + (_local1.col2.x * _local8));
_local8 = ((_local1.col1.y * _local7) + (_local1.col2.y * _local8));
_local7 = _local6;
_local9 = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4);
_local10 = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5);
_local11 = Math.sqrt(((_local9 * _local9) + (_local10 * _local10)));
_local9 = (_local9 / _local11);
_local10 = (_local10 / _local11);
_local12 = (_local11 - );
_local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local13 = (-(m_mass) * _local12);
.Set(_local9, _local10);
_local14 = (_local13 * .x);
_local15 = (_local13 * .y);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x - (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y - (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a - (_local2.m_invI * ((_local4 * _local15) - (_local5 * _local14))));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local14));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local15));
_local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local7 * _local15) - (_local8 * _local14))));
_local2.SynchronizeTransform();
_local3.SynchronizeTransform();
return ((b2Math.b2Abs(_local12) < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Mat22;
var _local3:Number;
var _local4:b2Body;
var _local5:b2Body;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
m_inv_dt = _arg1.inv_dt;
_local4 = m_body1;
_local5 = m_body2;
_local2 = _local4.m_xf.R;
_local6 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y);
_local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7));
_local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7));
_local6 = _local3;
_local2 = _local5.m_xf.R;
_local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y);
_local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9));
_local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9));
_local8 = _local3;
.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6);
.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7);
_local10 = Math.sqrt(((.x * .x) + (.y * .y)));
if (_local10 > b2Settings.b2_linearSlop){
.Multiply((1 / _local10));
} else {
.SetZero();
};
_local11 = ((_local6 * .y) - (_local7 * .x));
_local12 = ((_local8 * .y) - (_local9 * .x));
_local13 = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12));
m_mass = (1 / _local13);
if ( > 0){
_local14 = (_local10 - );
_local15 = ((2 * Math.PI) * );
_local16 = (((2 * m_mass) * ) * _local15);
_local17 = ((m_mass * _local15) * _local15);
m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17))));
= (((_local14 * _arg1.dt) * _local17) * m_gamma);
m_mass = (1 / (_local13 + m_gamma));
};
if (_arg1.warmStarting){
m_impulse = (m_impulse * _arg1.dtRatio);
_local18 = (m_impulse * .x);
_local19 = (m_impulse * .y);
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19));
_local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18))));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19));
_local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18))));
} else {
m_impulse = 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Mat22;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
_local3 = m_body1;
_local4 = m_body2;
_local2 = _local3.m_xf.R;
_local5 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local6 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6));
_local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6));
_local5 = _local7;
_local2 = _local4.m_xf.R;
_local8 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9));
_local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9));
_local8 = _local7;
_local10 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6));
_local11 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5));
_local12 = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9));
_local13 = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8));
_local14 = ((.x * (_local12 - _local10)) + (.y * (_local13 - _local11)));
_local15 = (-(m_mass) * ((_local14 + ) + (m_gamma * m_impulse)));
m_impulse = (m_impulse + _local15);
_local16 = (_local15 * .x);
_local17 = (_local15 * .y);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16))));
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17));
_local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
}
}
}//package Box2D.Dynamics.Joints
Section 49
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2DistanceJointDef extends b2JointDef {
public var length:Number;
public var dampingRatio:Number;
public var frequencyHz:Number;
public var localAnchor2:b2Vec2;
public var localAnchor1:b2Vec2;
public function b2DistanceJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_distanceJoint;
length = 1;
frequencyHz = 0;
dampingRatio = 0;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{
var _local5:Number;
var _local6:Number;
body1 = _arg1;
body2 = _arg2;
localAnchor1.SetV(body1.GetLocalPoint(_arg3));
localAnchor2.SetV(body2.GetLocalPoint(_arg4));
_local5 = (_arg4.x - _arg3.x);
_local6 = (_arg4.y - _arg3.y);
length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
frequencyHz = 0;
dampingRatio = 0;
}
}
}//package Box2D.Dynamics.Joints
Section 50
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2GearJoint extends b2Joint {
public var m_force:Number;
public var m_mass:Number;
public var
:b2PrismaticJoint;
public var :b2PrismaticJoint;
public var :b2Body;
public var :b2Body;
public var m_constant:Number;
public var :b2RevoluteJoint;
public var :b2RevoluteJoint;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_ratio:Number;
public var :b2Jacobian;
public function b2GearJoint(_arg1:b2GearJointDef){
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Jacobian();
super(_arg1);
_local2 = _arg1. .m_type;
_local3 = _arg1.
.m_type;
= null;
= null;
= null;
= null;
= _arg1. .m_body1;
m_body1 = _arg1. .m_body2;
if (_local2 == b2Joint.e_revoluteJoint){
= (_arg1. as b2RevoluteJoint);
m_groundAnchor1.SetV(.m_localAnchor1);
m_localAnchor1.SetV(.m_localAnchor2);
_local4 = .GetJointAngle();
} else {
= (_arg1. as b2PrismaticJoint);
m_groundAnchor1.SetV(
.m_localAnchor1);
m_localAnchor1.SetV(
.m_localAnchor2);
_local4 =
.GetJointTranslation();
};
= _arg1.
.m_body1;
m_body2 = _arg1.
.m_body2;
if (_local3 == b2Joint.e_revoluteJoint){
= (_arg1.
as b2RevoluteJoint);
m_groundAnchor2.SetV(.m_localAnchor1);
m_localAnchor2.SetV(.m_localAnchor2);
_local5 = .GetJointAngle();
} else {
= (_arg1.
as b2PrismaticJoint);
m_groundAnchor2.SetV(.m_localAnchor1);
m_localAnchor2.SetV(.m_localAnchor2);
_local5 = .GetJointTranslation();
};
m_ratio = _arg1.ratio;
m_constant = (_local4 + (m_ratio * _local5));
m_force = 0;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2;
_local1 = new b2Vec2((m_force * .linear2.x), (m_force * .linear2.y));
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = 0;
_local2 = m_body1;
_local3 = m_body2;
if (){
_local4 = .GetJointAngle();
} else {
_local4 =
.GetJointTranslation();
};
if (){
_local5 = .GetJointAngle();
} else {
_local5 = .GetJointTranslation();
};
_local6 = (m_constant - (_local4 + (m_ratio * _local5)));
_local7 = (-(m_mass) * _local6);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + ((_local2.m_invMass * _local7) * .linear1.x));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * .linear1.y));
_local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * .angular1));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * .linear2.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * .linear2.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * .angular2));
_local2.SynchronizeTransform();
_local3.SynchronizeTransform();
return ((_local1 < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Body;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:b2Mat22;
var _local11:b2Vec2;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local2 = ;
_local3 = ;
_local4 = m_body1;
_local5 = m_body2;
_local14 = 0;
.SetZero();
if (){
.angular1 = -1;
_local14 = (_local14 + _local4.m_invI);
} else {
_local10 = _local2.m_xf.R;
_local11 =
.m_localXAxis1;
_local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
_local10 = _local4.m_xf.R;
_local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y);
_local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9));
_local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9));
_local8 = _local13;
_local12 = ((_local8 * _local7) - (_local9 * _local6));
.linear1.Set(-(_local6), -(_local7));
.angular1 = -(_local12);
_local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12)));
};
if (){
.angular2 = -(m_ratio);
_local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI));
} else {
_local10 = _local3.m_xf.R;
_local11 = .m_localXAxis1;
_local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y));
_local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y));
_local10 = _local5.m_xf.R;
_local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y);
_local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9));
_local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9));
_local8 = _local13;
_local12 = ((_local8 * _local7) - (_local9 * _local6));
.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7));
.angular2 = (-(m_ratio) * _local12);
_local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12))));
};
m_mass = (1 / _local14);
if (_arg1.warmStarting){
_local15 = (_arg1.dt * m_force);
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * .linear1.x));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * .linear1.y));
_local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * .angular1));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * .linear2.x));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * .linear2.y));
_local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * .angular2));
} else {
m_force = 0;
};
}
override public function GetReactionTorque():Number{
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local1 = m_body2.m_xf.R;
_local2 = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x);
_local3 = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y);
_local4 = ((_local1.col1.x * _local2) + (_local1.col2.x * _local3));
_local3 = ((_local1.col1.y * _local2) + (_local1.col2.y * _local3));
_local2 = _local4;
_local4 = ((m_force * .angular2) - ((_local2 * (m_force * .linear2.y)) - (_local3 * (m_force * .linear2.x))));
return (_local4);
}
public function GetRatio():Number{
return (m_ratio);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = .Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local5 = ((-(_arg1.inv_dt) * m_mass) * _local4);
m_force = (m_force + _local5);
_local6 = (_arg1.dt * _local5);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local6) * .linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * .linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * .angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * .linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * .linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * .angular2));
}
}
}//package Box2D.Dynamics.Joints
Section 51
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef)
package Box2D.Dynamics.Joints {
public class b2GearJointDef extends b2JointDef {
public var
:b2Joint;
public var :b2Joint;
public var ratio:Number;
public function b2GearJointDef(){
type = b2Joint.e_gearJoint;
= null;
= null;
ratio = 1;
}
}
}//package Box2D.Dynamics.Joints
Section 52
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
public class b2Jacobian {
public var linear1:b2Vec2;
public var linear2:b2Vec2;
public var angular2:Number;
public var angular1:Number;
public function b2Jacobian(){
linear1 = new b2Vec2();
linear2 = new b2Vec2();
super();
}
public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{
linear1.SetV(_arg1);
angular1 = _arg2;
linear2.SetV(_arg3);
angular2 = _arg4;
}
public function SetZero():void{
linear1.SetZero();
angular1 = 0;
linear2.SetZero();
angular2 = 0;
}
public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{
return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4)));
}
}
}//package Box2D.Dynamics.Joints
Section 53
//b2Joint (Box2D.Dynamics.Joints.b2Joint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2Joint {
public var m_islandFlag:Boolean;
public var m_body1:b2Body;
public var m_prev:b2Joint;
public var m_next:b2Joint;
public var m_type:int;
public var m_collideConnected:Boolean;
public var m_node1:b2JointEdge;
public var m_node2:b2JointEdge;
public var m_inv_dt:Number;
public var m_userData;
public var m_body2:b2Body;
public static const e_unknownJoint:int = 0;
public static const e_inactiveLimit:int = 0;
public static const e_atUpperLimit:int = 2;
public static const e_atLowerLimit:int = 1;
public static const e_gearJoint:int = 6;
public static const e_revoluteJoint:int = 1;
public static const e_equalLimits:int = 3;
public static const e_distanceJoint:int = 3;
public static const e_pulleyJoint:int = 4;
public static const e_prismaticJoint:int = 2;
public static const e_mouseJoint:int = 5;
public function b2Joint(_arg1:b2JointDef){
m_node1 = new b2JointEdge();
m_node2 = new b2JointEdge();
super();
m_type = _arg1.type;
m_prev = null;
m_next = null;
m_body1 = _arg1.body1;
m_body2 = _arg1.body2;
m_collideConnected = _arg1.collideConnected;
m_islandFlag = false;
m_userData = _arg1.userData;
}
public function GetAnchor1():b2Vec2{
return (null);
}
public function GetAnchor2():b2Vec2{
return (null);
}
public function InitVelocityConstraints(_arg1:b2TimeStep):void{
}
public function GetType():int{
return (m_type);
}
public function ():b2Body{
return (m_body2);
}
public function GetNext():b2Joint{
return (m_next);
}
public function GetReactionTorque():Number{
return (0);
}
public function GetUserData(){
return (m_userData);
}
public function GetReactionForce():b2Vec2{
return (null);
}
public function SolvePositionConstraints():Boolean{
return (false);
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function ():b2Body{
return (m_body1);
}
public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
}
public function InitPositionConstraints():void{
}
public static function Destroy(_arg1:b2Joint, _arg2):void{
}
public static function Create(_arg1:b2JointDef, _arg2):b2Joint{
var _local3:b2Joint;
_local3 = null;
switch (_arg1.type){
case e_distanceJoint:
_local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef));
break;
case e_mouseJoint:
_local3 = new b2MouseJoint((_arg1 as b2MouseJointDef));
break;
case e_prismaticJoint:
_local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef));
break;
case e_revoluteJoint:
_local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef));
break;
case e_pulleyJoint:
_local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef));
break;
case e_gearJoint:
_local3 = new b2GearJoint((_arg1 as b2GearJointDef));
break;
default:
break;
};
return (_local3);
}
}
}//package Box2D.Dynamics.Joints
Section 54
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
public class b2JointDef {
public var collideConnected:Boolean;
public var body1:b2Body;
public var body2:b2Body;
public var userData;
public var type:int;
public function b2JointDef(){
type = b2Joint.e_unknownJoint;
userData = null;
body1 = null;
body2 = null;
collideConnected = false;
}
}
}//package Box2D.Dynamics.Joints
Section 55
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge)
package Box2D.Dynamics.Joints {
import Box2D.Dynamics.*;
public class b2JointEdge {
public var joint:b2Joint;
public var other:b2Body;
public var next:b2JointEdge;
public var prev:b2JointEdge;
}
}//package Box2D.Dynamics.Joints
Section 56
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2MouseJoint extends b2Joint {
public var
:Number;
public var m_mass:b2Mat22;
public var :b2Vec2;
public var m_impulse:b2Vec2;
public var :b2Vec2;
private var :b2Mat22;
private var :b2Mat22;
private var K:b2Mat22;
public var m_gamma:Number;
public var
:b2Vec2;
public var :Number;
public function b2MouseJoint(_arg1:b2MouseJointDef){
var _local2:Number;
var _local3:Number;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
K = new b2Mat22();
= new b2Mat22();
= new b2Mat22();
= new b2Vec2();
= new b2Vec2();
m_impulse = new b2Vec2();
m_mass = new b2Mat22();
= new b2Vec2();
super(_arg1);
.SetV(_arg1.target);
_local2 = (.x - m_body2.m_xf.position.x);
_local3 = (.y - m_body2.m_xf.position.y);
_local4 = m_body2.m_xf.R;
.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y));
.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y));
= _arg1. ;
m_impulse.SetZero();
_local5 = m_body2.m_mass;
_local6 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz);
_local7 = (((2 * _local5) * _arg1.dampingRatio) * _local6);
_local8 = ((_arg1. * _local5) * (_local6 * _local6));
m_gamma = (1 / (_local7 + _local8));
= (_local8 / (_local7 + _local8));
}
override public function GetAnchor1():b2Vec2{
return ();
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint());
}
override public function GetReactionForce():b2Vec2{
return (m_impulse);
}
override public function SolvePositionConstraints():Boolean{
return (true);
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local2 = m_body2;
_local3 = _local2.m_xf.R;
_local4 = (.x - _local2.m_sweep.localCenter.x);
_local5 = (.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5));
_local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5));
_local4 = _local6;
_local7 = _local2.m_invMass;
_local8 = _local2.m_invI;
.col1.x = _local7;
.col2.x = 0;
.col1.y = 0;
.col2.y = _local7;
.col1.x = ((_local8 * _local5) * _local5);
.col2.x = ((-(_local8) * _local4) * _local5);
.col1.y = ((-(_local8) * _local4) * _local5);
.col2.y = ((_local8 * _local4) * _local4);
K.SetM();
K.AddM();
K.col1.x = (K.col1.x + m_gamma);
K.col2.y = (K.col2.y + m_gamma);
K.Invert(m_mass);
.x = ((_local2.m_sweep.c.x + _local4) - .x);
.y = ((_local2.m_sweep.c.y + _local5) - .y);
_local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98);
_local9 = (_arg1.dt * m_impulse.x);
_local10 = (_arg1.dt * m_impulse.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local7 * _local9));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local7 * _local10));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local8 * ((_local4 * _local10) - (_local5 * _local9))));
}
override public function GetReactionTorque():Number{
return (0);
}
public function (_arg1:b2Vec2):void{
if (m_body2.IsSleeping()){
m_body2.WakeUp();
};
= _arg1;
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
_local2 = m_body2;
_local3 = _local2.m_xf.R;
_local6 = (.x - _local2.m_sweep.localCenter.x);
_local7 = (.y - _local2.m_sweep.localCenter.y);
_local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7));
_local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7));
_local6 = _local4;
_local8 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7));
_local9 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6));
_local3 = m_mass;
_local4 = ((_local8 + ((
* _arg1.inv_dt) *
.x)) + ((m_gamma * _arg1.dt) * m_impulse.x));
_local5 = ((_local9 + ((
* _arg1.inv_dt) *
.y)) + ((m_gamma * _arg1.dt) * m_impulse.y));
_local10 = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)));
_local11 = (-(_arg1.inv_dt) * ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)));
_local12 = m_impulse.x;
_local13 = m_impulse.y;
m_impulse.x = (m_impulse.x + _local10);
m_impulse.y = (m_impulse.y + _local11);
_local14 = m_impulse.Length();
if (_local14 > ){
m_impulse.Multiply(( / _local14));
};
_local10 = (m_impulse.x - _local12);
_local11 = (m_impulse.y - _local13);
_local15 = (_arg1.dt * _local10);
_local16 = (_arg1.dt * _local11);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local15));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local16));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15))));
}
}
}//package Box2D.Dynamics.Joints
Section 57
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
public class b2MouseJointDef extends b2JointDef {
public var frequencyHz:Number;
public var dampingRatio:Number;
public var :Number;
public var target:b2Vec2;
public var :Number;
public function b2MouseJointDef(){
target = new b2Vec2();
super();
type = b2Joint.e_mouseJoint;
= 0;
frequencyHz = 5;
dampingRatio = 0.7;
= (1 / 60);
}
}
}//package Box2D.Dynamics.Joints
Section 58
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PrismaticJoint extends b2Joint {
public var m_limitForce:Number;
public var :Number;
public var :Number;
public var m_localXAxis1:b2Vec2;
public var m_torque:Number;
public var m_enableLimit:Boolean;
public var m_motorForce:Number;
public var m_force:Number;
public var :b2Vec2;
public var m_motorMass:Number;
public var :Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var :Number;
public var m_limitState:int;
public var :Number;
public var :Number;
public var :b2Jacobian;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var :b2Jacobian;
public var m_enableMotor:Boolean;
public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_localXAxis1 = new b2Vec2();
= new b2Vec2();
= new b2Jacobian();
= new b2Jacobian();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_localXAxis1.SetV(_arg1. );
.x = -(m_localXAxis1.y);
.y = m_localXAxis1.x;
= _arg1.referenceAngle;
.SetZero();
= 0;
m_force = 0;
= 0;
m_torque = 0;
.SetZero();
m_motorMass = 0;
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
= _arg1. ;
= _arg1. ;
= _arg1. ;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
public function EnableMotor(_arg1:Boolean):void{
m_enableMotor = _arg1;
}
public function GetUpperLimit():Number{
return ();
}
public function GetLowerLimit():Number{
return ();
}
public function GetJointTranslation():Number{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:b2Vec2;
var _local9:Number;
_local1 = m_body1;
_local2 = m_body2;
_local4 = _local1.GetWorldPoint(m_localAnchor1);
_local5 = _local2.GetWorldPoint(m_localAnchor2);
_local6 = (_local5.x - _local4.x);
_local7 = (_local5.y - _local4.y);
_local8 = _local1.GetWorldVector(m_localXAxis1);
_local9 = ((_local8.x * _local6) + (_local8.y * _local7));
return (_local9);
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body1.m_xf.R;
_local2 = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y)));
_local3 = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y)));
_local4 = (m_force * ((_local1.col1.x * .x) + (_local1.col2.x * .y)));
_local5 = (m_force * ((_local1.col1.y * .x) + (_local1.col2.y * .y)));
return (new b2Vec2(((m_limitForce * _local2) + (m_force * _local4)), ((m_limitForce * _local3) + (m_force * _local5))));
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:b2Mat22;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
_local3 = m_body1;
_local4 = m_body2;
_local5 = _local3.m_invMass;
_local6 = _local4.m_invMass;
_local7 = _local3.m_invI;
_local8 = _local4.m_invI;
_local9 = _local3.m_xf.R;
_local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12));
_local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12));
_local11 = _local10;
_local9 = _local4.m_xf.R;
_local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14));
_local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14));
_local13 = _local10;
_local15 = (_local3.m_sweep.c.x + _local11);
_local16 = (_local3.m_sweep.c.y + _local12);
_local17 = (_local4.m_sweep.c.x + _local13);
_local18 = (_local4.m_sweep.c.y + _local14);
_local19 = (_local17 - _local15);
_local20 = (_local18 - _local16);
_local9 = _local3.m_xf.R;
_local21 = ((_local9.col1.x * .x) + (_local9.col2.x * .y));
_local22 = ((_local9.col1.y * .x) + (_local9.col2.y * .y));
_local23 = ((_local21 * _local19) + (_local22 * _local20));
_local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local24 = (-() * _local23);
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) * .linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) * .linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) * .angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) * .linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) * .linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) * .angular2));
_local25 = b2Math.b2Abs(_local23);
_local26 = ((_local4.m_sweep.a - _local3.m_sweep.a) - );
_local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local27 = (-() * _local26);
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local27));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local27));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
_local28 = b2Math.b2Abs(_local26);
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local9 = _local3.m_xf.R;
_local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12));
_local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12));
_local11 = _local10;
_local9 = _local4.m_xf.R;
_local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14));
_local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14));
_local13 = _local10;
_local15 = (_local3.m_sweep.c.x + _local11);
_local16 = (_local3.m_sweep.c.y + _local12);
_local17 = (_local4.m_sweep.c.x + _local13);
_local18 = (_local4.m_sweep.c.y + _local14);
_local19 = (_local17 - _local15);
_local20 = (_local18 - _local16);
_local9 = _local3.m_xf.R;
_local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y));
_local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y));
_local31 = ((_local29 * _local19) + (_local30 * _local20));
_local32 = 0;
if (m_limitState == e_equalLimits){
_local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local32 = (-(m_motorMass) * _local1);
_local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26));
} else {
if (m_limitState == e_atLowerLimit){
_local1 = (_local31 - );
_local25 = b2Math.b2Max(_local25, -(_local1));
_local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local32 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0);
_local32 = (m_limitPositionImpulse - _local2);
} else {
if (m_limitState == e_atUpperLimit){
_local1 = (_local31 - );
_local25 = b2Math.b2Max(_local25, _local1);
_local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection);
_local32 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0);
_local32 = (m_limitPositionImpulse - _local2);
};
};
};
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) * .linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * .linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * .angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * .linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * .linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * .angular2));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
};
return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= b2Settings.b2_angularSlop))));
}
public function GetJointSpeed():Number{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:b2Vec2;
var _local16:b2Vec2;
var _local17:b2Vec2;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_xf.R;
_local4 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local5 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5));
_local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5));
_local4 = _local6;
_local3 = _local2.m_xf.R;
_local7 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local8 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8));
_local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8));
_local7 = _local6;
_local9 = (_local1.m_sweep.c.x + _local4);
_local10 = (_local1.m_sweep.c.y + _local5);
_local11 = (_local2.m_sweep.c.x + _local7);
_local12 = (_local2.m_sweep.c.y + _local8);
_local13 = (_local11 - _local9);
_local14 = (_local12 - _local10);
_local15 = _local1.GetWorldVector(m_localXAxis1);
_local16 = _local1.m_linearVelocity;
_local17 = _local2.m_linearVelocity;
_local18 = _local1.m_angularVelocity;
_local19 = _local2.m_angularVelocity;
_local20 = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4)))));
return (_local20);
}
public function SetMotorSpeed(_arg1:Number):void{
m_motorSpeed = _arg1;
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
_local10 = _local2.m_invMass;
_local11 = _local3.m_invMass;
_local12 = _local2.m_invI;
_local13 = _local3.m_invI;
_local4 = _local2.m_xf.R;
_local14 = ((_local4.col1.x * .x) + (_local4.col2.x * .y));
_local15 = ((_local4.col1.y * .x) + (_local4.col2.y * .y));
_local16 = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x);
_local17 = ((_local3.m_sweep.c.y + _local9) - _local2.m_sweep.c.y);
.linear1.x = -(_local14);
.linear1.y = -(_local15);
.linear2.x = _local14;
.linear2.y = _local15;
.angular1 = -(((_local16 * _local15) - (_local17 * _local14)));
.angular2 = ((_local8 * _local15) - (_local9 * _local14));
= (((_local10 + ((_local12 * .angular1) * .angular1)) + _local11) + ((_local13 * .angular2) * .angular2));
= (1 / );
= (_local12 + _local13);
if ( > Number.MIN_VALUE){
= (1 / );
};
if (((m_enableLimit) || (m_enableMotor))){
_local4 = _local2.m_xf.R;
_local18 = ((_local4.col1.x * m_localXAxis1.x) + (_local4.col2.x * m_localXAxis1.y));
_local19 = ((_local4.col1.y * m_localXAxis1.x) + (_local4.col2.y * m_localXAxis1.y));
.linear1.x = -(_local18);
.linear1.y = -(_local19);
.linear2.x = _local18;
.linear2.y = _local19;
.angular1 = -(((_local16 * _local19) - (_local17 * _local18)));
.angular2 = ((_local8 * _local19) - (_local9 * _local18));
m_motorMass = (((_local10 + ((_local12 * .angular1) * .angular1)) + _local11) + ((_local13 * .angular2) * .angular2));
m_motorMass = (1 / m_motorMass);
if (m_enableLimit){
_local20 = (_local16 - _local6);
_local21 = (_local17 - _local7);
_local22 = ((_local18 * _local20) + (_local19 * _local21));
if (b2Math.b2Abs(( - )) < (2 * b2Settings.b2_linearSlop)){
m_limitState = e_equalLimits;
} else {
if (_local22 <= ){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local22 >= ){
if (m_limitState != e_atUpperLimit){
m_limitForce = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitForce = 0;
};
};
};
};
};
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit == false){
m_limitForce = 0;
};
if (_arg1.warmStarting){
_local23 = (_arg1.dt * ((m_force * .linear1.x) + ((m_motorForce + m_limitForce) * .linear1.x)));
_local24 = (_arg1.dt * ((m_force * .linear1.y) + ((m_motorForce + m_limitForce) * .linear1.y)));
_local25 = (_arg1.dt * ((m_force * .linear2.x) + ((m_motorForce + m_limitForce) * .linear2.x)));
_local26 = (_arg1.dt * ((m_force * .linear2.y) + ((m_motorForce + m_limitForce) * .linear2.y)));
_local27 = (_arg1.dt * (((m_force * .angular1) - m_torque) + ((m_motorForce + m_limitForce) * .angular1)));
_local28 = (_arg1.dt * (((m_force * .angular2) + m_torque) + ((m_motorForce + m_limitForce) * .angular2)));
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28));
} else {
m_force = 0;
m_torque = 0;
m_limitForce = 0;
m_motorForce = 0;
};
m_limitPositionImpulse = 0;
}
public function ():Number{
return (m_motorForce);
}
public function (_arg1:Number):void{
= _arg1;
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
override public function GetReactionTorque():Number{
return (m_torque);
}
public function IsLimitEnabled():Boolean{
return (m_enableLimit);
}
public function IsMotorEnabled():Boolean{
return (m_enableMotor);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_invMass;
_local5 = _local3.m_invMass;
_local6 = _local2.m_invI;
_local7 = _local3.m_invI;
_local9 = .Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local10 = ((-(_arg1.inv_dt) * ) * _local9);
m_force = (m_force + _local10);
_local11 = (_arg1.dt * _local10);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * .linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * .linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * .angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * .linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * .linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * .angular2));
_local12 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local13 = ((-(_arg1.inv_dt) * ) * _local12);
m_torque = (m_torque + _local13);
_local14 = (_arg1.dt * _local13);
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local14));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local14));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local15 = (.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed);
_local16 = ((-(_arg1.inv_dt) * m_motorMass) * _local15);
_local17 = m_motorForce;
m_motorForce = b2Math.b2Clamp((m_motorForce + _local16), -(), );
_local16 = (m_motorForce - _local17);
_local11 = (_arg1.dt * _local16);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * .linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * .linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * .angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * .linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * .linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * .angular2));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local18 = .Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local19 = ((-(_arg1.inv_dt) * m_motorMass) * _local18);
if (m_limitState == e_equalLimits){
m_limitForce = (m_limitForce + _local19);
} else {
if (m_limitState == e_atLowerLimit){
_local8 = m_limitForce;
m_limitForce = b2Math.b2Max((m_limitForce + _local19), 0);
_local19 = (m_limitForce - _local8);
} else {
if (m_limitState == e_atUpperLimit){
_local8 = m_limitForce;
m_limitForce = b2Math.b2Min((m_limitForce + _local19), 0);
_local19 = (m_limitForce - _local8);
};
};
};
_local11 = (_arg1.dt * _local19);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * .linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * .linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * .angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * .linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * .linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * .angular2));
};
}
}
}//package Box2D.Dynamics.Joints
Section 59
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2PrismaticJointDef extends b2JointDef {
public var :b2Vec2;
public var referenceAngle:Number;
public var :Number;
public var motorSpeed:Number;
public var :Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public var :Number;
public function b2PrismaticJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
= new b2Vec2();
super();
type = b2Joint.e_prismaticJoint;
.Set(1, 0);
referenceAngle = 0;
enableLimit = false;
= 0;
= 0;
enableMotor = false;
= 0;
motorSpeed = 0;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1 = body1.GetLocalPoint(_arg3);
localAnchor2 = body2.GetLocalPoint(_arg3);
= body1.GetLocalVector(_arg4);
referenceAngle = (body2.GetAngle() - body1.GetAngle());
}
}
}//package Box2D.Dynamics.Joints
Section 60
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PulleyJoint extends b2Joint {
public var :b2Body;
public var :Number;
public var :Number;
public var :Number;
public var :int;
public var :int;
public var :Number;
public var m_force:Number;
public var
:Number;
public var m_constant:Number;
public var :int;
public var m_ratio:Number;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var :Number;
public var :Number;
public var :Number;
public var :Number;
public var :b2Vec2;
public var :b2Vec2;
public var :Number;
public static const b2_minPulleyLength:Number = 2;
public function b2PulleyJoint(_arg1:b2PulleyJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Vec2();
= new b2Vec2();
super(_arg1);
= m_body1.m_world.;
m_groundAnchor1.x = (_arg1.
.x - .m_xf.position.x);
m_groundAnchor1.y = (_arg1.
.y - .m_xf.position.y);
m_groundAnchor2.x = (_arg1.
.x - .m_xf.position.x);
m_groundAnchor2.y = (_arg1.
.y - .m_xf.position.y);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_ratio = _arg1.ratio;
m_constant = (_arg1. + (m_ratio * _arg1. ));
= b2Math.b2Min(_arg1.
, (m_constant - (m_ratio * b2_minPulleyLength)));
= b2Math.b2Min(_arg1. , ((m_constant - b2_minPulleyLength) / m_ratio));
m_force = 0;
= 0;
= 0;
}
public function GetGroundAnchor2():b2Vec2{
var _local1:b2Vec2;
_local1 = .m_xf.position.Copy();
_local1.Add(m_groundAnchor2);
return (_local1);
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
override public function GetReactionForce():b2Vec2{
var _local1:b2Vec2;
_local1 = .Copy();
_local1.Multiply(m_force);
return (_local1);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
_local1 = m_body1;
_local2 = m_body2;
_local4 = (.m_xf.position.x + m_groundAnchor1.x);
_local5 = (.m_xf.position.y + m_groundAnchor1.y);
_local6 = (.m_xf.position.x + m_groundAnchor2.x);
_local7 = (.m_xf.position.y + m_groundAnchor2.y);
_local23 = 0;
if ( == e_atUpperLimit){
_local3 = _local1.m_xf.R;
_local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9));
_local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9));
_local8 = _local22;
_local3 = _local2.m_xf.R;
_local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11));
_local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11));
_local10 = _local22;
_local12 = (_local1.m_sweep.c.x + _local8);
_local13 = (_local1.m_sweep.c.y + _local9);
_local14 = (_local2.m_sweep.c.x + _local10);
_local15 = (_local2.m_sweep.c.y + _local11);
.Set((_local12 - _local4), (_local13 - _local5));
.Set((_local14 - _local6), (_local15 - _local7));
_local16 = .Length();
_local17 = .Length();
if (_local16 > b2Settings.b2_linearSlop){
.Multiply((1 / _local16));
} else {
.SetZero();
};
if (_local17 > b2Settings.b2_linearSlop){
.Multiply((1 / _local17));
} else {
.SetZero();
};
_local18 = ((m_constant - _local16) - (m_ratio * _local17));
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-() * _local18);
_local20 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local20);
_local12 = (-(_local19) * .x);
_local13 = (-(_local19) * .y);
_local14 = ((-(m_ratio) * _local19) * .x);
_local15 = ((-(m_ratio) * _local19) * .y);
_local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12));
_local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13));
_local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local1.SynchronizeTransform();
_local2.SynchronizeTransform();
};
if ( == e_atUpperLimit){
_local3 = _local1.m_xf.R;
_local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x);
_local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9));
_local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9));
_local8 = _local22;
_local12 = (_local1.m_sweep.c.x + _local8);
_local13 = (_local1.m_sweep.c.y + _local9);
.Set((_local12 - _local4), (_local13 - _local5));
_local16 = .Length();
if (_local16 > b2Settings.b2_linearSlop){
.x = (.x * (1 / _local16));
.y = (.y * (1 / _local16));
} else {
.SetZero();
};
_local18 = ( - _local16);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-() * _local18);
_local21 =
;
= b2Math.b2Max(0, (
+ _local19));
_local19 = (
- _local21);
_local12 = (-(_local19) * .x);
_local13 = (-(_local19) * .y);
_local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12));
_local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13));
_local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local1.SynchronizeTransform();
};
if ( == e_atUpperLimit){
_local3 = _local2.m_xf.R;
_local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y);
_local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11));
_local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11));
_local10 = _local22;
_local14 = (_local2.m_sweep.c.x + _local10);
_local15 = (_local2.m_sweep.c.y + _local11);
.Set((_local14 - _local6), (_local15 - _local7));
_local17 = .Length();
if (_local17 > b2Settings.b2_linearSlop){
.x = (.x * (1 / _local17));
.y = (.y * (1 / _local17));
} else {
.SetZero();
};
_local18 = ( - _local17);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-() * _local18);
_local21 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local21);
_local14 = (-(_local19) * .x);
_local15 = (-(_local19) * .y);
_local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15));
_local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local2.SynchronizeTransform();
};
return ((_local23 < b2Settings.b2_linearSlop));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6));
_local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6));
_local5 = _local7;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local7;
_local10 = (_local2.m_sweep.c.x + _local5);
_local11 = (_local2.m_sweep.c.y + _local6);
_local12 = (_local3.m_sweep.c.x + _local8);
_local13 = (_local3.m_sweep.c.y + _local9);
_local14 = (.m_xf.position.x + m_groundAnchor1.x);
_local15 = (.m_xf.position.y + m_groundAnchor1.y);
_local16 = (.m_xf.position.x + m_groundAnchor2.x);
_local17 = (.m_xf.position.y + m_groundAnchor2.y);
.Set((_local10 - _local14), (_local11 - _local15));
.Set((_local12 - _local16), (_local13 - _local17));
_local18 = .Length();
_local19 = .Length();
if (_local18 > b2Settings.b2_linearSlop){
.Multiply((1 / _local18));
} else {
.SetZero();
};
if (_local19 > b2Settings.b2_linearSlop){
.Multiply((1 / _local19));
} else {
.SetZero();
};
_local20 = ((m_constant - _local18) - (m_ratio * _local19));
if (_local20 > 0){
= e_inactiveLimit;
m_force = 0;
} else {
= e_atUpperLimit;
= 0;
};
if (_local18 < ){
= e_inactiveLimit;
= 0;
} else {
= e_atUpperLimit;
= 0;
};
if (_local19 < ){
= e_inactiveLimit;
= 0;
} else {
= e_atUpperLimit;
= 0;
};
_local21 = ((_local5 * .y) - (_local6 * .x));
_local22 = ((_local8 * .y) - (_local9 * .x));
= (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21));
= (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22));
= ( + ((m_ratio * m_ratio) * ));
= (1 / );
= (1 / );
= (1 / );
if (_arg1.warmStarting){
_local23 = ((_arg1.dt * (-(m_force) - )) * .x);
_local24 = ((_arg1.dt * (-(m_force) - )) * .y);
_local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - )) * .x);
_local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - )) * .y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25))));
} else {
m_force = 0;
= 0;
= 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
public function GetRatio():Number{
return (m_ratio);
}
public function ():Number{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body2.GetWorldPoint(m_localAnchor2);
_local2 = (.m_xf.position.x + m_groundAnchor2.x);
_local3 = (.m_xf.position.y + m_groundAnchor2.y);
_local4 = (_local1.x - _local2);
_local5 = (_local1.y - _local3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6));
_local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6));
_local5 = _local7;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local7;
if ( == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = (-(((.x * _local10) + (.y * _local11))) - (m_ratio * ((.x * _local12) + (.y * _local13))));
_local19 = ((-(_arg1.inv_dt) * ) * _local18);
_local20 = m_force;
m_force = b2Math.b2Max(0, (m_force + _local19));
_local19 = (m_force - _local20);
_local14 = ((-(_arg1.dt) * _local19) * .x);
_local15 = ((-(_arg1.dt) * _local19) * .y);
_local16 = (((-(_arg1.dt) * m_ratio) * _local19) * .x);
_local17 = (((-(_arg1.dt) * m_ratio) * _local19) * .y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
};
if ( == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local18 = -(((.x * _local10) + (.y * _local11)));
_local19 = ((-(_arg1.inv_dt) * ) * _local18);
_local20 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local20);
_local14 = ((-(_arg1.dt) * _local19) * .x);
_local15 = ((-(_arg1.dt) * _local19) * .y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14))));
};
if ( == e_atUpperLimit){
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = -(((.x * _local12) + (.y * _local13)));
_local19 = ((-(_arg1.inv_dt) * ) * _local18);
_local20 = ;
= b2Math.b2Max(0, ( + _local19));
_local19 = ( - _local20);
_local16 = ((-(_arg1.dt) * _local19) * .x);
_local17 = ((-(_arg1.dt) * _local19) * .y);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16))));
};
}
public function ():Number{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body1.GetWorldPoint(m_localAnchor1);
_local2 = (.m_xf.position.x + m_groundAnchor1.x);
_local3 = (.m_xf.position.y + m_groundAnchor1.y);
_local4 = (_local1.x - _local2);
_local5 = (_local1.y - _local3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
public function GetGroundAnchor1():b2Vec2{
var _local1:b2Vec2;
_local1 = .m_xf.position.Copy();
_local1.Add(m_groundAnchor1);
return (_local1);
}
}
}//package Box2D.Dynamics.Joints
Section 61
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2PulleyJointDef extends b2JointDef {
public var :Number;
public var :Number;
public var :Number;
public var
:Number;
public var ratio:Number;
public var
:b2Vec2;
public var
:b2Vec2;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public function b2PulleyJointDef(){
= new b2Vec2();
= new b2Vec2();
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_pulleyJoint;
.Set(-1, 1);
.Set(1, 1);
localAnchor1.Set(-1, 0);
localAnchor2.Set(1, 0);
= 0;
= 0;
= 0;
= 0;
ratio = 1;
collideConnected = true;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
body1 = _arg1;
body2 = _arg2;
.SetV(_arg3);
.SetV(_arg4);
localAnchor1 = body1.GetLocalPoint(_arg5);
localAnchor2 = body2.GetLocalPoint(_arg6);
_local8 = (_arg5.x - _arg3.x);
_local9 = (_arg5.y - _arg3.y);
= Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local10 = (_arg6.x - _arg4.x);
_local11 = (_arg6.y - _arg4.y);
= Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
ratio = _arg7;
_local12 = ( + (ratio * ));
= (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength));
= ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio);
}
}
}//package Box2D.Dynamics.Joints
Section 62
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2RevoluteJoint extends b2Joint {
public var m_limitForce:Number;
public var m_motorForce:Number;
public var :b2Mat22;
public var m_enableLimit:Boolean;
public var m_limitState:int;
public var m_motorMass:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
private var :b2Mat22;
private var :b2Mat22;
private var :b2Mat22;
private var K:b2Mat22;
public var :b2Vec2;
public var m_motorSpeed:Number;
public var m_enableMotor:Boolean;
public var m_limitPositionImpulse:Number;
public var
:Number;
public var :Number;
public var
:Number;
public var :Number;
public static var tImpulse:b2Vec2 = new b2Vec2();
public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){
K = new b2Mat22();
= new b2Mat22();
= new b2Mat22();
= new b2Mat22();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
= new b2Vec2();
= new b2Mat22();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
= _arg1.referenceAngle;
.Set(0, 0);
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
= _arg1.lowerAngle;
= _arg1.upperAngle;
= _arg1.maxMotorTorque;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function GetAnchor1():b2Vec2{
return (m_body1.GetWorldPoint(m_localAnchor1));
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor2));
}
public function EnableMotor(_arg1:Boolean):void{
m_enableMotor = _arg1;
}
public function GetUpperLimit():Number{
return ();
}
public function GetLowerLimit():Number{
return (
);
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
return ();
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:b2Mat22;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local3 = m_body1;
_local4 = m_body2;
_local5 = 0;
_local6 = _local3.m_xf.R;
_local7 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x);
_local8 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y);
_local9 = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8));
_local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8));
_local7 = _local9;
_local6 = _local4.m_xf.R;
_local10 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x);
_local11 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y);
_local9 = ((_local6.col1.x * _local10) + (_local6.col2.x * _local11));
_local11 = ((_local6.col1.y * _local10) + (_local6.col2.y * _local11));
_local10 = _local9;
_local12 = (_local3.m_sweep.c.x + _local7);
_local13 = (_local3.m_sweep.c.y + _local8);
_local14 = (_local4.m_sweep.c.x + _local10);
_local15 = (_local4.m_sweep.c.y + _local11);
_local16 = (_local14 - _local12);
_local17 = (_local15 - _local13);
_local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17)));
_local18 = _local3.m_invMass;
_local19 = _local4.m_invMass;
_local20 = _local3.m_invI;
_local21 = _local4.m_invI;
.col1.x = (_local18 + _local19);
.col2.x = 0;
.col1.y = 0;
.col2.y = (_local18 + _local19);
.col1.x = ((_local20 * _local8) * _local8);
.col2.x = ((-(_local20) * _local7) * _local8);
.col1.y = ((-(_local20) * _local7) * _local8);
.col2.y = ((_local20 * _local7) * _local7);
.col1.x = ((_local21 * _local11) * _local11);
.col2.x = ((-(_local21) * _local10) * _local11);
.col1.y = ((-(_local21) * _local10) * _local11);
.col2.y = ((_local21 * _local10) * _local10);
K.SetM();
K.AddM();
K.AddM();
K.Solve(tImpulse, -(_local16), -(_local17));
_local22 = tImpulse.x;
_local23 = tImpulse.y;
_local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local22));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local23));
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local7 * _local23) - (_local8 * _local22))));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local22));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local23));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local10 * _local23) - (_local11 * _local22))));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
_local24 = 0;
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local25 = ((_local4.m_sweep.a - _local3.m_sweep.a) - );
_local26 = 0;
if (m_limitState == e_equalLimits){
_local2 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local26 = (-(m_motorMass) * _local2);
_local24 = b2Math.b2Abs(_local2);
} else {
if (m_limitState == e_atLowerLimit){
_local2 = (_local25 -
);
_local24 = b2Math.b2Max(0, -(_local2));
_local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0);
_local26 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local26), 0);
_local26 = (m_limitPositionImpulse - _local1);
} else {
if (m_limitState == e_atUpperLimit){
_local2 = (_local25 - );
_local24 = b2Math.b2Max(0, _local2);
_local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection);
_local26 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local26), 0);
_local26 = (m_limitPositionImpulse - _local1);
};
};
};
_local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local26));
_local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local26));
_local3.SynchronizeTransform();
_local4.SynchronizeTransform();
};
return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local24 <= b2Settings.b2_angularSlop))));
}
public function GetJointSpeed():Number{
return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity));
}
public function SetMotorSpeed(_arg1:Number):void{
m_motorSpeed = _arg1;
}
public function (_arg1:Number):void{
= _arg1;
}
public function GetJointAngle():Number{
return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - ));
}
override public function InitVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
_local10 = _local2.m_invMass;
_local11 = _local3.m_invMass;
_local12 = _local2.m_invI;
_local13 = _local3.m_invI;
.col1.x = (_local10 + _local11);
.col2.x = 0;
.col1.y = 0;
.col2.y = (_local10 + _local11);
.col1.x = ((_local12 * _local7) * _local7);
.col2.x = ((-(_local12) * _local6) * _local7);
.col1.y = ((-(_local12) * _local6) * _local7);
.col2.y = ((_local12 * _local6) * _local6);
.col1.x = ((_local13 * _local9) * _local9);
.col2.x = ((-(_local13) * _local8) * _local9);
.col1.y = ((-(_local13) * _local8) * _local9);
.col2.y = ((_local13 * _local8) * _local8);
K.SetM();
K.AddM();
K.AddM();
K.Invert();
m_motorMass = (1 / (_local12 + _local13));
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit){
_local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - );
if (b2Math.b2Abs(( -
)) < (2 * b2Settings.b2_angularSlop)){
m_limitState = e_equalLimits;
} else {
if (_local14 <=
){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local14 >= ){
if (m_limitState != e_atUpperLimit){
m_limitForce = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitForce = 0;
};
};
};
} else {
m_limitForce = 0;
};
if (_arg1.warmStarting){
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * .x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * .y));
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * .y) - (_local7 * .x)) + m_motorForce) + m_limitForce)));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * .x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * .y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * .y) - (_local9 * .x)) + m_motorForce) + m_limitForce)));
} else {
.SetZero();
m_motorForce = 0;
m_limitForce = 0;
};
m_limitPositionImpulse = 0;
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
public function ():Number{
return (m_motorForce);
}
override public function GetReactionTorque():Number{
return (m_limitForce);
}
public function IsLimitEnabled():Boolean{
return (m_enableLimit);
}
public function IsMotorEnabled():Boolean{
return (m_enableMotor);
}
override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Mat22;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
_local2 = m_body1;
_local3 = m_body2;
_local4 = _local2.m_xf.R;
_local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7));
_local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7));
_local6 = _local5;
_local4 = _local3.m_xf.R;
_local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x);
_local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y);
_local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9));
_local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9));
_local8 = _local5;
_local11 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7));
_local12 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6));
_local13 = (-(_arg1.inv_dt) * ((.col1.x * _local11) + (.col2.x * _local12)));
_local14 = (-(_arg1.inv_dt) * ((.col1.y * _local11) + (.col2.y * _local12)));
.x = (.x + _local13);
.y = (.y + _local14);
_local15 = (_arg1.dt * _local13);
_local16 = (_arg1.dt * _local14);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local15));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local16));
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local16) - (_local9 * _local15))));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local17 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed);
_local18 = ((-(_arg1.inv_dt) * m_motorMass) * _local17);
_local19 = m_motorForce;
m_motorForce = b2Math.b2Clamp((m_motorForce + _local18), -(
),
);
_local18 = (m_motorForce - _local19);
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local18));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local18));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local20 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local21 = ((-(_arg1.inv_dt) * m_motorMass) * _local20);
if (m_limitState == e_equalLimits){
m_limitForce = (m_limitForce + _local21);
} else {
if (m_limitState == e_atLowerLimit){
_local10 = m_limitForce;
m_limitForce = b2Math.b2Max((m_limitForce + _local21), 0);
_local21 = (m_limitForce - _local10);
} else {
if (m_limitState == e_atUpperLimit){
_local10 = m_limitForce;
m_limitForce = b2Math.b2Min((m_limitForce + _local21), 0);
_local21 = (m_limitForce - _local10);
};
};
};
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local21));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local21));
};
}
}
}//package Box2D.Dynamics.Joints
Section 63
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef)
package Box2D.Dynamics.Joints {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
public class b2RevoluteJointDef extends b2JointDef {
public var referenceAngle:Number;
public var upperAngle:Number;
public var lowerAngle:Number;
public var motorSpeed:Number;
public var maxMotorTorque:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public function b2RevoluteJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_revoluteJoint;
localAnchor1.Set(0, 0);
localAnchor2.Set(0, 0);
referenceAngle = 0;
lowerAngle = 0;
upperAngle = 0;
maxMotorTorque = 0;
motorSpeed = 0;
enableLimit = false;
enableMotor = false;
}
public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{
body1 = _arg1;
body2 = _arg2;
localAnchor1 = body1.GetLocalPoint(_arg3);
localAnchor2 = body2.GetLocalPoint(_arg3);
referenceAngle = (body2.GetAngle() - body1.GetAngle());
}
}
}//package Box2D.Dynamics.Joints
Section 64
//b2Body (Box2D.Dynamics.b2Body)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Dynamics.Contacts.*;
public class b2Body {
public var m_next:b2Body;
public var m_contactList:b2ContactEdge;
public var m_angularVelocity:Number;
public var m_shapeList:b2Shape;
public var m_force:b2Vec2;
public var m_mass:Number;
public var m_sweep:b2Sweep;
public var m_xf:b2XForm;
public var m_torque:Number;
public var m_userData;
public var m_flags:uint;
public var m_world:b2World;
public var m_prev:b2Body;
public var m_invMass:Number;
public var m_type:int;
public var m_linearDamping:Number;
public var m_angularDamping:Number;
public var m_invI:Number;
public var m_linearVelocity:b2Vec2;
public var m_sleepTime:Number;
public var m_shapeCount:int;
public var m_jointList:b2JointEdge;
public var :Number;
public static var e_fixedRotationFlag:uint = 64;
public static var e_frozenFlag:uint = 2;
public static var e_maxTypes:uint = 3;
public static var e_sleepFlag:uint = 8;
private static var s_massData:b2MassData = new b2MassData();
public static var e_bulletFlag:uint = 32;
public static var e_staticType:uint = 1;
public static var e_islandFlag:uint = 4;
public static var e_allowSleepFlag:uint = 16;
private static var s_xf1:b2XForm = new b2XForm();
public static var e_dynamicType:uint = 2;
public function b2Body(_arg1:b2BodyDef, _arg2:b2World){
var _local3:b2Mat22;
var _local4:b2Vec2;
m_xf = new b2XForm();
m_sweep = new b2Sweep();
m_linearVelocity = new b2Vec2();
m_force = new b2Vec2();
super();
m_flags = 0;
if (_arg1.isBullet){
m_flags = (m_flags | e_bulletFlag);
};
if (_arg1.){
m_flags = (m_flags | e_fixedRotationFlag);
};
if (_arg1.){
m_flags = (m_flags | e_allowSleepFlag);
};
if (_arg1.){
m_flags = (m_flags | e_sleepFlag);
};
m_world = _arg2;
m_xf.position.SetV(_arg1.position);
m_xf.R.Set(_arg1.angle);
m_sweep.localCenter.SetV(_arg1. .center);
m_sweep.t0 = 1;
m_sweep.a0 = (m_sweep.a = _arg1.angle);
_local3 = m_xf.R;
_local4 = m_sweep.localCenter;
m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
m_jointList = null;
m_contactList = null;
m_prev = null;
m_next = null;
m_linearDamping = _arg1.;
m_angularDamping = _arg1.;
m_force.Set(0, 0);
m_torque = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_sleepTime = 0;
m_invMass = 0;
= 0;
m_invI = 0;
m_mass = _arg1. .mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
= _arg1. .I;
};
if ( > 0){
m_invI = (1 / );
};
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
m_userData = _arg1.userData;
m_shapeList = null;
m_shapeCount = 0;
}
public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{
return (new b2Vec2((m_linearVelocity.x - (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.y + (m_angularVelocity * (_arg1.x - m_sweep.c.x)))));
}
public function SetLinearVelocity(_arg1:b2Vec2):void{
m_linearVelocity.SetV(_arg1);
}
public function WakeUp():void{
m_flags = (m_flags & ~(e_sleepFlag));
m_sleepTime = 0;
}
public function
():b2Vec2{
return (m_sweep.localCenter);
}
public function ApplyTorque(_arg1:Number):void{
if (IsSleeping()){
WakeUp();
};
m_torque = (m_torque + _arg1);
}
public function IsFrozen():Boolean{
return (((m_flags & e_frozenFlag) == e_frozenFlag));
}
public function ():Boolean{
return ((m_type == e_dynamicType));
}
public function GetLinearVelocity():b2Vec2{
return (m_linearVelocity);
}
public function SynchronizeTransform():void{
var _local1:b2Mat22;
var _local2:b2Vec2;
m_xf.R.Set(m_sweep.a);
_local1 = m_xf.R;
_local2 = m_sweep.localCenter;
m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y)));
m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y)));
}
public function GetInertia():Number{
return ();
}
public function IsSleeping():Boolean{
return (((m_flags & e_sleepFlag) == e_sleepFlag));
}
public function SetMassFromShapes():void{
var _local1:b2Shape;
var _local2:Number;
var _local3:Number;
var _local4:b2MassData;
var _local5:b2Mat22;
var _local6:b2Vec2;
var _local7:int;
if (m_world.m_lock == true){
return;
};
m_mass = 0;
m_invMass = 0;
= 0;
m_invI = 0;
_local2 = 0;
_local3 = 0;
_local4 = s_massData;
_local1 = m_shapeList;
while (_local1) {
_local1.ComputeMass(_local4);
m_mass = (m_mass + _local4.mass);
_local2 = (_local2 + (_local4.mass * _local4.center.x));
_local3 = (_local3 + (_local4.mass * _local4.center.y));
= ( + _local4.I);
_local1 = _local1.m_next;
};
if (m_mass > 0){
m_invMass = (1 / m_mass);
_local2 = (_local2 * m_invMass);
_local3 = (_local3 * m_invMass);
};
if (((( > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){
= ( - (m_mass * ((_local2 * _local2) + (_local3 * _local3))));
m_invI = (1 / );
} else {
= 0;
m_invI = 0;
};
m_sweep.localCenter.Set(_local2, _local3);
_local5 = m_xf.R;
_local6 = m_sweep.localCenter;
m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y));
m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
_local1 = m_shapeList;
while (_local1) {
_local1.UpdateSweepRadius(m_sweep.localCenter);
_local1 = _local1.m_next;
};
_local7 = m_type;
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
if (_local7 != m_type){
_local1 = m_shapeList;
while (_local1) {
_local1.RefilterProxy(m_world.m_broadPhase, m_xf);
_local1 = _local1.m_next;
};
};
}
public function ():void{
m_flags = (m_flags | e_sleepFlag);
m_sleepTime = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_force.SetZero();
m_torque = 0;
}
public function GetJointList():b2JointEdge{
return (m_jointList);
}
public function SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{
var _local3:b2Shape;
var _local4:b2Mat22;
var _local5:b2Vec2;
var _local6:Boolean;
var _local7:Boolean;
if (m_world.m_lock == true){
return (true);
};
if (IsFrozen()){
return (false);
};
m_xf.R.Set(_arg2);
m_xf.position.SetV(_arg1);
_local4 = m_xf.R;
_local5 = m_sweep.localCenter;
m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y));
m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
m_sweep.a0 = (m_sweep.a = _arg2);
_local6 = false;
_local3 = m_shapeList;
while (_local3) {
_local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf);
if (_local7 == false){
_local6 = true;
break;
};
_local3 = _local3.m_next;
};
if (_local6 == true){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
_local3 = m_shapeList;
while (_local3) {
_local3.DestroyProxy(m_world.m_broadPhase);
_local3 = _local3.m_next;
};
return (false);
};
m_world.m_broadPhase.Commit();
return (true);
}
public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulXT(m_xf, _arg1));
}
public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{
if (IsSleeping()){
WakeUp();
};
m_force.x = (m_force.x + _arg1.x);
m_force.y = (m_force.y + _arg1.y);
m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x)));
}
public function SynchronizeShapes():Boolean{
var _local1:b2XForm;
var _local2:b2Mat22;
var _local3:b2Vec2;
var _local4:b2Shape;
var _local5:Boolean;
_local1 = s_xf1;
_local1.R.Set(m_sweep.a0);
_local2 = _local1.R;
_local3 = m_sweep.localCenter;
_local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y)));
_local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y)));
_local5 = true;
_local4 = m_shapeList;
while (_local4) {
_local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf);
if (_local5 == false){
break;
};
_local4 = _local4.m_next;
};
if (_local5 == false){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
_local4 = m_shapeList;
while (_local4) {
_local4.DestroyProxy(m_world.m_broadPhase);
_local4 = _local4.m_next;
};
return (false);
};
return (true);
}
public function GetAngle():Number{
return (m_sweep.a);
}
public function GetXForm():b2XForm{
return (m_xf);
}
public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{
if (IsSleeping()){
WakeUp();
};
m_linearVelocity.x = (m_linearVelocity.x + (m_invMass * _arg1.x));
m_linearVelocity.y = (m_linearVelocity.y + (m_invMass * _arg1.y));
m_angularVelocity = (m_angularVelocity + (m_invI * (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))));
}
public function GetNext():b2Body{
return (m_next);
}
public function GetMass():Number{
return (m_mass);
}
public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{
var _local2:b2Mat22;
var _local3:b2Vec2;
_local2 = m_xf.R;
_local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y)));
_local3.x = (_local3.x + m_xf.position.x);
_local3.y = (_local3.y + m_xf.position.y);
return (new b2Vec2((m_linearVelocity.x - (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.y + (m_angularVelocity * (_local3.x - m_sweep.c.x)))));
}
public function GetAngularVelocity():Number{
return (m_angularVelocity);
}
public function SetAngularVelocity(_arg1:Number):void{
m_angularVelocity = _arg1;
}
public function SetMass(_arg1:b2MassData):void{
var _local2:b2Shape;
var _local3:b2Mat22;
var _local4:b2Vec2;
var _local5:int;
if (m_world.m_lock == true){
return;
};
m_invMass = 0;
= 0;
m_invI = 0;
m_mass = _arg1.mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
= _arg1.I;
};
if ( > 0){
m_invI = (1 / );
};
m_sweep.localCenter.SetV(_arg1.center);
_local3 = m_xf.R;
_local4 = m_sweep.localCenter;
m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
m_sweep.c.x = (m_sweep.c.x + m_xf.position.x);
m_sweep.c.y = (m_sweep.c.y + m_xf.position.y);
m_sweep.c0.SetV(m_sweep.c);
_local2 = m_shapeList;
while (_local2) {
_local2.UpdateSweepRadius(m_sweep.localCenter);
_local2 = _local2.m_next;
};
_local5 = m_type;
if ((((m_invMass == 0)) && ((m_invI == 0)))){
m_type = e_staticType;
} else {
m_type = e_dynamicType;
};
if (_local5 != m_type){
_local2 = m_shapeList;
while (_local2) {
_local2.RefilterProxy(m_world.m_broadPhase, m_xf);
_local2 = _local2.m_next;
};
};
}
public function IsStatic():Boolean{
return ((m_type == e_staticType));
}
public function GetWorldVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulMV(m_xf.R, _arg1));
}
public function GetShapeList():b2Shape{
return (m_shapeList);
}
public function Advance(_arg1:Number):void{
m_sweep.Advance(_arg1);
m_sweep.c.SetV(m_sweep.c0);
m_sweep.a = m_sweep.a0;
SynchronizeTransform();
}
public function (_arg1:Boolean):void{
if (_arg1){
m_flags = (m_flags | e_bulletFlag);
} else {
m_flags = (m_flags & ~(e_bulletFlag));
};
}
public function CreateShape(_arg1:b2ShapeDef):b2Shape{
var _local2:b2Shape;
if (m_world.m_lock == true){
return (null);
};
_local2 = b2Shape.Create(_arg1, m_world.m_blockAllocator);
_local2.m_next = m_shapeList;
m_shapeList = _local2;
m_shapeCount++;
_local2.m_body = this;
_local2.CreateProxy(m_world.m_broadPhase, m_xf);
_local2.UpdateSweepRadius(m_sweep.localCenter);
return (_local2);
}
public function IsConnected(_arg1:b2Body):Boolean{
var _local2:b2JointEdge;
_local2 = m_jointList;
while (_local2) {
if (_local2.other == _arg1){
return ((_local2.joint.m_collideConnected == false));
};
_local2 = _local2.next;
};
return (false);
}
public function (_arg1:b2Shape):void{
var _local2:b2Shape;
var _local3:b2Shape;
var _local4:Boolean;
if (m_world.m_lock == true){
return;
};
_arg1.DestroyProxy(m_world.m_broadPhase);
_local2 = m_shapeList;
_local3 = null;
_local4 = false;
while (_local2 != null) {
if (_local2 == _arg1){
if (_local3){
_local3.m_next = _arg1.m_next;
} else {
m_shapeList = _arg1.m_next;
};
_local4 = true;
break;
};
_local3 = _local2;
_local2 = _local2.m_next;
};
_arg1.m_body = null;
_arg1.m_next = null;
m_shapeCount--;
b2Shape.Destroy(_arg1, m_world.m_blockAllocator);
}
public function GetUserData(){
return (m_userData);
}
public function IsBullet():Boolean{
return (((m_flags & e_bulletFlag) == e_bulletFlag));
}
public function GetWorldCenter():b2Vec2{
return (m_sweep.c);
}
public function (_arg1:Boolean):void{
if (_arg1){
m_flags = (m_flags | e_allowSleepFlag);
} else {
m_flags = (m_flags & ~(e_allowSleepFlag));
WakeUp();
};
}
public function SetUserData(_arg1):void{
m_userData = _arg1;
}
public function GetLocalVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulTMV(m_xf.R, _arg1));
}
public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{
var _local2:b2Mat22;
var _local3:b2Vec2;
_local2 = m_xf.R;
_local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y)));
_local3.x = (_local3.x + m_xf.position.x);
_local3.y = (_local3.y + m_xf.position.y);
return (_local3);
}
public function ():b2World{
return (m_world);
}
public function GetPosition():b2Vec2{
return (m_xf.position);
}
}
}//package Box2D.Dynamics
Section 65
//b2BodyDef (Box2D.Dynamics.b2BodyDef)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
public class b2BodyDef {
public var :Boolean;
public var position:b2Vec2;
public var isBullet:Boolean;
public var :Boolean;
public var userData;
public var :Number;
public var :Boolean;
public var angle:Number;
public var :Number;
public var :b2MassData;
public function b2BodyDef(){
= new b2MassData();
position = new b2Vec2();
super();
.center.SetZero();
.mass = 0;
.I = 0;
userData = null;
position.Set(0, 0);
angle = 0;
= 0;
= 0;
= true;
= false;
= false;
isBullet = false;
}
}
}//package Box2D.Dynamics
Section 66
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener)
package Box2D.Dynamics {
public class b2BoundaryListener {
public function Violation(_arg1:b2Body):void{
}
}
}//package Box2D.Dynamics
Section 67
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
public class b2ContactFilter {
public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter);
;
public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{
var _local3:b2FilterData;
var _local4:b2FilterData;
var _local5:Boolean;
_local3 = _arg1.GetFilterData();
_local4 = _arg2.GetFilterData();
if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){
return ((_local3.groupIndex > 0));
};
_local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0))));
return (_local5);
}
}
}//package Box2D.Dynamics
Section 68
//b2ContactListener (Box2D.Dynamics.b2ContactListener)
package Box2D.Dynamics {
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class b2ContactListener {
public function Add(_arg1:b2ContactPoint):void{
}
public function Remove(_arg1:b2ContactPoint):void{
}
public function Persist(_arg1:b2ContactPoint):void{
}
public function Result(_arg1:b2ContactResult):void{
}
}
}//package Box2D.Dynamics
Section 69
//b2ContactManager (Box2D.Dynamics.b2ContactManager)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
public class b2ContactManager extends b2PairCallback {
public var m_world:b2World;
public var
:Boolean;
public var :b2NullContact;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2ContactManager(){
= new b2NullContact();
super();
m_world = null;
= false;
}
override public function PairAdded(_arg1, _arg2){
var _local3:b2Shape;
var _local4:b2Shape;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2Contact;
_local3 = (_arg1 as b2Shape);
_local4 = (_arg2 as b2Shape);
_local5 = _local3.m_body;
_local6 = _local4.m_body;
if (((_local5.IsStatic()) && (_local6.IsStatic()))){
return ();
};
if (_local3.m_body == _local4.m_body){
return ();
};
if (_local6.IsConnected(_local5)){
return ();
};
if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){
return ();
};
_local7 = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator);
if (_local7 == null){
return ();
};
_local3 = _local7.m_shape1;
_local4 = _local7.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
_local7.m_prev = null;
_local7.m_next = m_world.m_contactList;
if (m_world.m_contactList != null){
m_world.m_contactList.m_prev = _local7;
};
m_world.m_contactList = _local7;
_local7.m_node1.contact = _local7;
_local7.m_node1.other = _local6;
_local7.m_node1.prev = null;
_local7.m_node1.next = _local5.m_contactList;
if (_local5.m_contactList != null){
_local5.m_contactList.prev = _local7.m_node1;
};
_local5.m_contactList = _local7.m_node1;
_local7.m_node2.contact = _local7;
_local7.m_node2.other = _local5;
_local7.m_node2.prev = null;
_local7.m_node2.next = _local6.m_contactList;
if (_local6.m_contactList != null){
_local6.m_contactList.prev = _local7.m_node2;
};
_local6.m_contactList = _local7.m_node2;
m_world.m_contactCount++;
return (_local7);
}
override public function PairRemoved(_arg1, _arg2, _arg3):void{
var _local4:b2Contact;
if (_arg3 == null){
return;
};
_local4 = (_arg3 as b2Contact);
if (_local4 == ){
return;
};
Destroy(_local4);
}
public function Destroy(_arg1:b2Contact):void{
var _local2:b2Shape;
var _local3:b2Shape;
var _local4:int;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2Body;
var _local8:b2Body;
var _local9:Array;
var _local10:b2ContactPoint;
var _local11:int;
var _local12:b2Manifold;
var _local13:int;
var _local14:b2ManifoldPoint;
var _local15:b2Vec2;
var _local16:b2Vec2;
_local2 = _arg1.m_shape1;
_local3 = _arg1.m_shape2;
_local4 = _arg1.m_manifoldCount;
if ((((_local4 > 0)) && (m_world.m_contactListener))){
_local7 = _local2.m_body;
_local8 = _local3.m_body;
_local9 = _arg1.GetManifolds();
_local10 = s_evalCP;
_local10.shape1 = _arg1.m_shape1;
_local10.shape2 = _arg1.m_shape1;
_local10.friction = _arg1.m_friction;
_local10.restitution = _arg1.m_restitution;
_local11 = 0;
while (_local11 < _local4) {
_local12 = _local9[_local11];
_local10.normal.SetV(_local12.normal);
_local13 = 0;
while (_local13 < _local12.pointCount) {
_local14 = _local12.points[_local13];
_local10.position = _local7.GetWorldPoint(_local14.localPoint1);
_local15 = _local7.GetLinearVelocityFromLocalPoint(_local14.localPoint1);
_local16 = _local8.GetLinearVelocityFromLocalPoint(_local14.localPoint2);
_local10.velocity.Set((_local16.x - _local15.x), (_local16.y - _local15.y));
_local10.separation = _local14.separation;
_local10.id.key = _local14.id._key;
m_world.m_contactListener.Remove(_local10);
_local13++;
};
_local11++;
};
};
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_world.m_contactList){
m_world.m_contactList = _arg1.m_next;
};
_local5 = _local2.m_body;
_local6 = _local3.m_body;
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local5.m_contactList){
_local5.m_contactList = _arg1.m_node1.next;
};
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local6.m_contactList){
_local6.m_contactList = _arg1.m_node2.next;
};
b2Contact.Destroy(_arg1, m_world.m_blockAllocator);
m_world.m_contactCount--;
}
public function Collide():void{
var _local1:b2Contact;
var _local2:b2Body;
var _local3:b2Body;
_local1 = m_world.m_contactList;
while (_local1) {
_local2 = _local1.m_shape1.m_body;
_local3 = _local1.m_shape2.m_body;
if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){
} else {
_local1.Update(m_world.m_contactListener);
};
_local1 = _local1.m_next;
};
}
}
}//package Box2D.Dynamics
Section 70
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import flash.display.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2DebugDraw {
public var :Number;// = 1
public var :Number;// = 1
public var :Number;// = 1
public var :Number;// = 1
public var :uint;
public var m_sprite:Sprite;
public var :Number;// = 1
public static var e_coreShapeBit:uint = 4;
public static var e_shapeBit:uint = 1;
public static var e_centerOfMassBit:uint = 64;
public static var e_aabbBit:uint = 8;
public static var e_obbBit:uint = 16;
public static var e_pairBit:uint = 32;
public static var e_jointBit:uint = 2;
public function b2DebugDraw(){
= 1;
= 1;
= 1;
= 1;
= 1;
super();
= 0;
}
public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
var _local4:int;
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.moveTo((_arg1[0].x * ), (_arg1[0].y * ));
m_sprite.graphics.beginFill(_arg3.color, );
_local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * ), (_arg1[_local4].y * ));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * ), (_arg1[0].y * ));
m_sprite.graphics.endFill();
}
public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.drawCircle((_arg1.x * ), (_arg1.y * ), (_arg2 * ));
}
public function DrawXForm(_arg1:b2XForm):void{
m_sprite.graphics.lineStyle(, 0xFF0000, );
m_sprite.graphics.moveTo((_arg1.position.x * ), (_arg1.position.y * ));
m_sprite.graphics.lineTo(((_arg1.position.x + ( * _arg1.R.col1.x)) * ), ((_arg1.position.y + ( * _arg1.R.col1.y)) * ));
m_sprite.graphics.lineStyle(, 0xFF00, );
m_sprite.graphics.moveTo((_arg1.position.x * ), (_arg1.position.y * ));
m_sprite.graphics.lineTo(((_arg1.position.x + ( * _arg1.R.col2.x)) * ), ((_arg1.position.y + ( * _arg1.R.col2.y)) * ));
}
public function
(_arg1:uint):void{
= ( & ~(_arg1));
}
public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{
m_sprite.graphics.lineStyle(, _arg4.color, );
m_sprite.graphics.moveTo(0, 0);
m_sprite.graphics.beginFill(_arg4.color, );
m_sprite.graphics.drawCircle((_arg1.x * ), (_arg1.y * ), (_arg2 * ));
m_sprite.graphics.endFill();
m_sprite.graphics.moveTo((_arg1.x * ), (_arg1.y * ));
m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * ), ((_arg1.y + (_arg3.y * _arg2)) * ));
}
public function (_arg1:uint):void{
= _arg1;
}
public function (_arg1:uint):void{
= ( | _arg1);
}
public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.moveTo((_arg1.x * ), (_arg1.y * ));
m_sprite.graphics.lineTo((_arg2.x * ), (_arg2.y * ));
}
public function GetFlags():uint{
return ();
}
public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
var _local4:int;
m_sprite.graphics.lineStyle(, _arg3.color, );
m_sprite.graphics.moveTo((_arg1[0].x * ), (_arg1[0].y * ));
_local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * ), (_arg1[_local4].y * ));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * ), (_arg1[0].y * ));
}
}
}//package Box2D.Dynamics
Section 71
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener)
package Box2D.Dynamics {
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Joints.*;
public class b2DestructionListener {
public function SayGoodbyeJoint(_arg1:b2Joint):void{
}
public function SayGoodbyeShape(_arg1:b2Shape):void{
}
}
}//package Box2D.Dynamics
Section 72
//b2Island (Box2D.Dynamics.b2Island)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2Island {
public var :Array;
public var :b2ContactListener;
public var m_positionIterationCount:int;
public var
:int;
public var m_bodies:Array;
public var
:int;
public var m_contactCount:int;
public var m_contacts:Array;
public var m_contactCapacity:int;
public var m_jointCount:int;
public var m_allocator;
public var m_bodyCount:int;
private static var s_reportCR:b2ContactResult = new b2ContactResult();
public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){
var _local6:int;
super();
= _arg1;
m_contactCapacity = _arg2;
= _arg3;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_allocator = _arg4;
= _arg5;
m_bodies = new Array(_arg1);
_local6 = 0;
while (_local6 < _arg1) {
m_bodies[_local6] = null;
_local6++;
};
m_contacts = new Array(_arg2);
_local6 = 0;
while (_local6 < _arg2) {
m_contacts[_local6] = null;
_local6++;
};
= new Array(_arg3);
_local6 = 0;
while (_local6 < _arg3) {
[_local6] = null;
_local6++;
};
m_positionIterationCount = 0;
}
public function AddBody(_arg1:b2Body):void{
var _local2 = m_bodyCount++;
m_bodies[_local2] = _arg1;
}
public function AddJoint(_arg1:b2Joint):void{
var _local2 = m_jointCount++;
[_local2] = _arg1;
}
public function (_arg1:Array):void{
var _local2:b2Mat22;
var _local3:b2Vec2;
var _local4:int;
var _local5:b2Contact;
var _local6:b2ContactConstraint;
var _local7:b2ContactResult;
var _local8:b2Body;
var _local9:int;
var _local10:Array;
var _local11:int;
var _local12:b2Manifold;
var _local13:int;
var _local14:b2ManifoldPoint;
var _local15:b2ContactConstraintPoint;
if ( == null){
return;
};
_local4 = 0;
while (_local4 < m_contactCount) {
_local5 = m_contacts[_local4];
_local6 = _arg1[_local4];
_local7 = s_reportCR;
_local7.shape1 = _local5.m_shape1;
_local7.shape2 = _local5.m_shape2;
_local8 = _local7.shape1.m_body;
_local9 = _local5.m_manifoldCount;
_local10 = _local5.GetManifolds();
_local11 = 0;
while (_local11 < _local9) {
_local12 = _local10[_local11];
_local7.normal.SetV(_local12.normal);
_local13 = 0;
while (_local13 < _local12.pointCount) {
_local14 = _local12.points[_local13];
_local15 = _local6.points[_local13];
_local7.position = _local8.GetWorldPoint(_local14.localPoint1);
_local7.normalImpulse = _local15.normalImpulse;
_local7.tangentImpulse = _local15.tangentImpulse;
_local7.id.key = _local14.id.key;
.Result(_local7);
_local13++;
};
_local11++;
};
_local4++;
};
}
public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{
var _local5:int;
var _local6:b2Body;
var _local7:b2Joint;
var _local8:b2ContactSolver;
var _local9:int;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.IsStatic()){
} else {
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * (_arg2.x + (_local6.m_invMass * _local6.m_force.x))));
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * (_arg2.y + (_local6.m_invMass * _local6.m_force.y))));
_local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque));
_local6.m_force.SetZero();
_local6.m_torque = 0;
_local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1));
_local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1));
if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){
_local6.m_linearVelocity.Normalize();
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity);
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity);
};
if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){
if (_local6.m_angularVelocity < 0){
_local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity);
} else {
_local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity;
};
};
};
_local5++;
};
_local8 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator);
_local8.InitVelocityConstraints(_arg1);
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = [_local5];
_local7.InitVelocityConstraints(_arg1);
_local5++;
};
_local5 = 0;
while (_local5 < _arg1.maxIterations) {
_local8.SolveVelocityConstraints();
_local9 = 0;
while (_local9 < m_jointCount) {
_local7 = [_local9];
_local7.SolveVelocityConstraints(_arg1);
_local9++;
};
_local5++;
};
_local8.FinalizeVelocityConstraints();
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.IsStatic()){
} else {
_local6.m_sweep.c0.SetV(_local6.m_sweep.c);
_local6.m_sweep.a0 = _local6.m_sweep.a;
_local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x));
_local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y));
_local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity));
_local6.SynchronizeTransform();
};
_local5++;
};
if (_arg3){
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = [_local5];
_local7.InitPositionConstraints();
_local5++;
};
m_positionIterationCount = 0;
while (m_positionIterationCount < _arg1.maxIterations) {
_local10 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte);
_local11 = true;
_local5 = 0;
while (_local5 < m_jointCount) {
_local7 = [_local5];
_local12 = _local7.SolvePositionConstraints();
_local11 = ((_local11) && (_local12));
_local5++;
};
if (((_local10) && (_local11))){
break;
};
m_positionIterationCount++;
};
};
(_local8.m_constraints);
if (_arg4){
_local13 = Number.MAX_VALUE;
_local14 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance);
_local15 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance);
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
if (_local6.m_invMass == 0){
} else {
if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){
_local6.m_sleepTime = 0;
_local13 = 0;
};
if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local15)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local14)))){
_local6.m_sleepTime = 0;
_local13 = 0;
} else {
_local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt);
_local13 = b2Math.b2Min(_local13, _local6.m_sleepTime);
};
};
_local5++;
};
if (_local13 >= b2Settings.b2_timeToSleep){
_local5 = 0;
while (_local5 < m_bodyCount) {
_local6 = m_bodies[_local5];
m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag);
_local6.m_linearVelocity.SetZero();
_local6.m_angularVelocity = 0;
_local5++;
};
};
};
}
public function AddContact(_arg1:b2Contact):void{
var _local2 = m_contactCount++;
m_contacts[_local2] = _arg1;
}
public function Clear():void{
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
}
public function SolveTOI(_arg1:b2TimeStep):void{
var _local2:int;
var _local3:b2ContactSolver;
var _local4:Number;
var _local5:b2Body;
var _local6:Boolean;
_local3 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator);
_local2 = 0;
while (_local2 < _arg1.maxIterations) {
_local3.SolveVelocityConstraints();
_local2++;
};
_local2 = 0;
while (_local2 < m_bodyCount) {
_local5 = m_bodies[_local2];
if (_local5.IsStatic()){
} else {
_local5.m_sweep.c0.SetV(_local5.m_sweep.c);
_local5.m_sweep.a0 = _local5.m_sweep.a;
_local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_arg1.dt * _local5.m_linearVelocity.x));
_local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_arg1.dt * _local5.m_linearVelocity.y));
_local5.m_sweep.a = (_local5.m_sweep.a + (_arg1.dt * _local5.m_angularVelocity));
_local5.SynchronizeTransform();
};
_local2++;
};
_local4 = 0.75;
_local2 = 0;
while (_local2 < _arg1.maxIterations) {
_local6 = _local3.SolvePositionConstraints(_local4);
if (_local6){
break;
};
_local2++;
};
(_local3.m_constraints);
}
}
}//package Box2D.Dynamics
Section 73
//b2TimeStep (Box2D.Dynamics.b2TimeStep)
package Box2D.Dynamics {
public class b2TimeStep {
public var warmStarting:Boolean;
public var positionCorrection:Boolean;
public var dt:Number;
public var maxIterations:int;
public var dtRatio:Number;
public var inv_dt:Number;
}
}//package Box2D.Dynamics
Section 74
//b2World (Box2D.Dynamics.b2World)
package Box2D.Dynamics {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Common.*;
import Box2D.Dynamics.Contacts.*;
public class b2World {
public var
:Number;
public var :b2BoundaryListener;
public var m_contactList:b2Contact;
public var m_blockAllocator;
public var m_contactListener:b2ContactListener;
public var
:Boolean;
public var m_broadPhase:b2BroadPhase;
public var
:b2DestructionListener;
public var m_jointCount:int;
public var m_bodyCount:int;
public var m_lock:Boolean;
public var m_positionIterationCount:int;
public var :b2Body;
public var m_contactCount:int;
public var :b2DebugDraw;
public var m_contactFilter:b2ContactFilter;
public var :b2Body;
public var ;
public var m_jointList:b2Joint;
public var :b2Vec2;
public var :b2ContactManager;
private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8);
public static var m_continuousPhysics:Boolean;
public static var m_warmStarting:Boolean;
private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6);
public static var m_positionCorrection:Boolean;
private static var s_xf:b2XForm = new b2XForm();
public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){
var _local4:b2BodyDef;
= new b2ContactManager();
super();
= null;
= null;
m_contactFilter = b2ContactFilter.b2_defaultFilter;
m_contactListener = null;
= null;
= null;
m_contactList = null;
m_jointList = null;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_positionCorrection = true;
m_warmStarting = true;
m_continuousPhysics = true;
= _arg3;
= _arg2;
m_lock = false;
= 0;
.m_world = this;
m_broadPhase = new b2BroadPhase(_arg1, );
_local4 = new b2BodyDef();
= CreateBody(_local4);
}
public function (_arg1:b2Joint):void{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2XForm;
var _local5:b2XForm;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Color;
var _local11:b2PulleyJoint;
var _local12:b2Vec2;
var _local13:b2Vec2;
_local2 = _arg1.m_body1;
_local3 = _arg1.m_body2;
_local4 = _local2.m_xf;
_local5 = _local3.m_xf;
_local6 = _local4.position;
_local7 = _local5.position;
_local8 = _arg1.GetAnchor1();
_local9 = _arg1.GetAnchor2();
_local10 = s_jointColor;
switch (_arg1.m_type){
case b2Joint.e_distanceJoint:
.DrawSegment(_local8, _local9, _local10);
break;
case b2Joint.e_pulleyJoint:
_local11 = (_arg1 as b2PulleyJoint);
_local12 = _local11.GetGroundAnchor1();
_local13 = _local11.GetGroundAnchor2();
.DrawSegment(_local12, _local8, _local10);
.DrawSegment(_local13, _local9, _local10);
.DrawSegment(_local12, _local13, _local10);
break;
case b2Joint.e_mouseJoint:
.DrawSegment(_local8, _local9, _local10);
break;
default:
if (_local2 != ){
.DrawSegment(_local6, _local8, _local10);
};
.DrawSegment(_local8, _local9, _local10);
if (_local3 != ){
.DrawSegment(_local7, _local9, _local10);
};
};
}
public function (_arg1:b2Shape):void{
_arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf);
}
public function
(_arg1:b2DebugDraw):void{
= _arg1;
}
public function
(_arg1:Boolean):void{
m_continuousPhysics = _arg1;
}
public function
():int{
return (m_broadPhase.m_proxyCount);
}
public function
():void{
var _local1:uint;
var _local2:int;
var _local3:b2Body;
var _local4:b2Shape;
var _local5:b2Joint;
var _local6:b2BroadPhase;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Color;
var _local11:b2XForm;
var _local12:b2AABB;
var _local13:b2AABB;
var _local14:Array;
var _local15:Boolean;
var _local16:uint;
var _local17:b2Pair;
var _local18:b2Proxy;
var _local19:b2Proxy;
var _local20:b2Vec2;
var _local21:b2Vec2;
var _local22:b2Proxy;
var _local23:b2PolygonShape;
var _local24:b2OBB;
var _local25:b2Vec2;
var _local26:b2Mat22;
var _local27:b2Vec2;
var _local28:Number;
if ( == null){
return;
};
.m_sprite.graphics.clear();
_local1 = .GetFlags();
_local7 = new b2Vec2();
_local8 = new b2Vec2();
_local9 = new b2Vec2();
_local10 = new b2Color(0, 0, 0);
_local12 = new b2AABB();
_local13 = new b2AABB();
_local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()];
if ((_local1 & b2DebugDraw.e_shapeBit)){
_local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit);
_local3 = ;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local3.IsStatic()){
(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15);
} else {
if (_local3.IsSleeping()){
(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15);
} else {
(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15);
};
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_jointBit)){
_local5 = m_jointList;
while (_local5) {
(_local5);
_local5 = _local5.m_next;
};
};
if ((_local1 & b2DebugDraw.e_pairBit)){
_local6 = m_broadPhase;
_local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y));
_local10.Set(0.9, 0.9, 0.3);
_local2 = 0;
while (_local2 < b2Pair.b2_tableCapacity) {
_local16 = _local6.m_pairManager.m_hashTable[_local2];
while (_local16 != b2Pair.b2_nullPair) {
_local17 = _local6.m_pairManager.m_pairs[_local16];
_local18 = _local6.m_proxyPool[_local17.proxyId1];
_local19 = _local6.m_proxyPool[_local17.proxyId2];
_local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value));
_local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value));
_local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value));
_local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.upperBounds[1]].value));
_local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.lowerBounds[0]].value));
_local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.lowerBounds[1]].value));
_local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.upperBounds[0]].value));
_local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.upperBounds[1]].value));
_local8.x = (0.5 * (_local12.lowerBound.x + _local12.upperBound.x));
_local8.y = (0.5 * (_local12.lowerBound.y + _local12.upperBound.y));
_local9.x = (0.5 * (_local13.lowerBound.x + _local13.upperBound.x));
_local9.y = (0.5 * (_local13.lowerBound.y + _local13.upperBound.y));
.DrawSegment(_local8, _local9, _local10);
_local16 = _local17.next;
};
_local2++;
};
};
if ((_local1 & b2DebugDraw.e_aabbBit)){
_local6 = m_broadPhase;
_local20 = _local6.m_worldAABB.lowerBound;
_local21 = _local6.m_worldAABB.upperBound;
_local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y));
_local10.Set(0.9, 0.3, 0.9);
_local2 = 0;
while (_local2 < b2Settings.b2_maxProxies) {
_local22 = _local6.m_proxyPool[_local2];
if (_local22.IsValid() == false){
} else {
_local12.lowerBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.lowerBounds[0]].value));
_local12.lowerBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.lowerBounds[1]].value));
_local12.upperBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.upperBounds[0]].value));
_local12.upperBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.upperBounds[1]].value));
_local14[0].Set(_local12.lowerBound.x, _local12.lowerBound.y);
_local14[1].Set(_local12.upperBound.x, _local12.lowerBound.y);
_local14[2].Set(_local12.upperBound.x, _local12.upperBound.y);
_local14[3].Set(_local12.lowerBound.x, _local12.upperBound.y);
.DrawPolygon(_local14, 4, _local10);
};
_local2++;
};
_local14[0].Set(_local20.x, _local20.y);
_local14[1].Set(_local21.x, _local20.y);
_local14[2].Set(_local21.x, _local21.y);
_local14[3].Set(_local20.x, _local21.y);
.DrawPolygon(_local14, 4, new b2Color(0.3, 0.9, 0.9));
};
if ((_local1 & b2DebugDraw.e_obbBit)){
_local10.Set(0.5, 0.3, 0.5);
_local3 = ;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local4.m_type != b2Shape.e_polygonShape){
} else {
_local23 = (_local4 as b2PolygonShape);
_local24 = _local23.GetOBB();
_local25 = _local24.extents;
_local14[0].Set(-(_local25.x), -(_local25.y));
_local14[1].Set(_local25.x, -(_local25.y));
_local14[2].Set(_local25.x, _local25.y);
_local14[3].Set(-(_local25.x), _local25.y);
_local2 = 0;
while (_local2 < 4) {
_local26 = _local24.R;
_local27 = _local14[_local2];
_local28 = (_local24.center.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y)));
_local14[_local2].y = (_local24.center.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y)));
_local14[_local2].x = _local28;
_local26 = _local11.R;
_local28 = (_local11.position.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y)));
_local14[_local2].y = (_local11.position.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y)));
_local14[_local2].x = _local28;
_local2++;
};
.DrawPolygon(_local14, 4, _local10);
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_centerOfMassBit)){
_local3 = ;
while (_local3) {
_local11 = s_xf;
_local11.R = _local3.m_xf.R;
_local11.position = _local3.GetWorldCenter();
.DrawXForm(_local11);
_local3 = _local3.m_next;
};
};
}
public function DestroyBody(_arg1:b2Body):void{
var _local2:b2JointEdge;
var _local3:b2Shape;
var _local4:b2JointEdge;
var _local5:b2Shape;
if (m_lock == true){
return;
};
_local2 = _arg1.m_jointList;
while (_local2) {
_local4 = _local2;
_local2 = _local2.next;
if (
){
.SayGoodbyeJoint(_local4.joint);
};
DestroyJoint(_local4.joint);
};
_local3 = _arg1.m_shapeList;
while (_local3) {
_local5 = _local3;
_local3 = _local3.m_next;
if (
){
.SayGoodbyeShape(_local5);
};
_local5.DestroyProxy(m_broadPhase);
b2Shape.Destroy(_local5, m_blockAllocator);
};
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == ){
= _arg1.m_next;
};
m_bodyCount--;
}
public function
(_arg1:b2ContactFilter):void{
m_contactFilter = _arg1;
}
public function GetGroundBody():b2Body{
return ();
}
public function
(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{
var _local5:b2Color;
var _local6:b2CircleShape;
var _local7:b2Vec2;
var _local8:Number;
var _local9:b2Vec2;
var _local10:int;
var _local11:b2PolygonShape;
var _local12:int;
var _local13:Array;
var _local14:Array;
var _local15:Array;
_local5 = s_coreColor;
switch (_arg1.m_type){
case b2Shape.e_circleShape:
_local6 = (_arg1 as b2CircleShape);
_local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition);
_local8 = _local6.m_radius;
_local9 = _arg2.R.col1;
.DrawSolidCircle(_local7, _local8, _local9, _arg3);
if (_arg4){
.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5);
};
break;
case b2Shape.e_polygonShape:
_local11 = (_arg1 as b2PolygonShape);
_local12 = _local11.GetVertexCount();
_local13 = _local11.GetVertices();
_local14 = new Array(b2Settings.b2_maxPolygonVertices);
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]);
_local10++;
};
.DrawSolidPolygon(_local14, _local12, _arg3);
if (_arg4){
_local15 = _local11.GetCoreVertices();
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]);
_local10++;
};
.DrawPolygon(_local14, _local12, _local5);
};
break;
};
}
public function
():int{
return (m_contactCount);
}
public function Solve(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Island;
var _local4:b2Contact;
var _local5:b2Joint;
var _local6:int;
var _local7:Array;
var _local8:b2Body;
var _local9:int;
var _local10:int;
var _local11:b2Body;
var _local12:b2ContactEdge;
var _local13:b2JointEdge;
var _local14:Boolean;
m_positionIterationCount = 0;
_local3 = new b2Island(m_bodyCount, m_contactCount, m_jointCount, , m_contactListener);
_local2 = ;
while (_local2) {
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
_local2 = _local2.m_next;
};
_local4 = m_contactList;
while (_local4) {
_local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag));
_local4 = _local4.m_next;
};
_local5 = m_jointList;
while (_local5) {
_local5.m_islandFlag = false;
_local5 = _local5.m_next;
};
_local6 = m_bodyCount;
_local7 = new Array(_local6);
_local8 = ;
while (_local8) {
if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){
} else {
if (_local8.IsStatic()){
} else {
_local3.Clear();
_local9 = 0;
var _temp1 = _local9;
_local9 = (_local9 + 1);
var _local15 = _temp1;
_local7[_local15] = _local8;
_local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag);
while (_local9 > 0) {
--_local9;
_local2 = _local7[_local9];
_local3.AddBody(_local2);
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag));
if (_local2.IsStatic()){
} else {
_local12 = _local2.m_contactList;
while (_local12) {
if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){
} else {
if (_local12.contact.m_manifoldCount == 0){
} else {
_local3.AddContact(_local12.contact);
_local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag);
_local11 = _local12.other;
if ((_local11.m_flags & b2Body.e_islandFlag)){
} else {
var _temp2 = _local9;
_local9 = (_local9 + 1);
var _local16 = _temp2;
_local7[_local16] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
};
};
};
_local12 = _local12.next;
};
_local13 = _local2.m_jointList;
while (_local13) {
if (_local13.joint.m_islandFlag == true){
} else {
_local3.AddJoint(_local13.joint);
_local13.joint.m_islandFlag = true;
_local11 = _local13.other;
if ((_local11.m_flags & b2Body.e_islandFlag)){
} else {
var _temp3 = _local9;
_local9 = (_local9 + 1);
_local16 = _temp3;
_local7[_local16] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
};
};
_local13 = _local13.next;
};
};
};
_local3.Solve(_arg1, , m_positionCorrection,
);
if (_local3.m_positionIterationCount > m_positionIterationCount){
m_positionIterationCount = _local3.m_positionIterationCount;
};
_local10 = 0;
while (_local10 < _local3.m_bodyCount) {
_local2 = _local3.m_bodies[_local10];
if (_local2.IsStatic()){
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
};
_local10++;
};
};
};
_local8 = _local8.m_next;
};
_local2 = ;
while (_local2) {
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local14 = _local2.SynchronizeShapes();
if ((((_local14 == false)) && (!(( == null))))){
.Violation(_local2);
};
};
};
_local2 = _local2.m_next;
};
m_broadPhase.Commit();
}
public function (_arg1:b2AABB, _arg2:Array, _arg3:int):int{
var _local4:Array;
var _local5:int;
var _local6:int;
_local4 = new Array(_arg3);
_local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3);
_local6 = 0;
while (_local6 < _local5) {
_arg2[_local6] = _local4[_local6];
_local6++;
};
return (_local5);
}
public function
(_arg1:b2Vec2):void{
= _arg1;
}
public function SolveTOI(_arg1:b2TimeStep):void{
var _local2:b2Body;
var _local3:b2Shape;
var _local4:b2Shape;
var _local5:b2Body;
var _local6:b2Body;
var _local7:b2ContactEdge;
var _local8:b2Island;
var _local9:int;
var _local10:Array;
var _local11:b2Contact;
var _local12:b2Contact;
var _local13:Number;
var _local14:b2Body;
var _local15:int;
var _local16:b2TimeStep;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:b2Body;
var _local21:Boolean;
_local8 = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, , m_contactListener);
_local9 = m_bodyCount;
_local10 = new Array(_local9);
_local2 = ;
while (_local2) {
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
_local2.m_sweep.t0 = 0;
_local2 = _local2.m_next;
};
_local11 = m_contactList;
while (_local11) {
_local11.m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag)));
_local11 = _local11.m_next;
};
while (true) {
_local12 = null;
_local13 = 1;
_local11 = m_contactList;
for (;_local11;(_local11 = _local11.m_next)) {
if ((_local11.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){
} else {
_local18 = 1;
if ((_local11.m_flags & b2Contact.e_toiFlag)){
_local18 = _local11.m_toi;
} else {
_local3 = _local11.m_shape1;
_local4 = _local11.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){
continue;
};
_local19 = _local5.m_sweep.t0;
if (_local5.m_sweep.t0 < _local6.m_sweep.t0){
_local19 = _local6.m_sweep.t0;
_local5.m_sweep.Advance(_local19);
} else {
if (_local6.m_sweep.t0 < _local5.m_sweep.t0){
_local19 = _local5.m_sweep.t0;
_local6.m_sweep.Advance(_local19);
};
};
_local18 = b2TimeOfImpact.TimeOfImpact(_local11.m_shape1, _local5.m_sweep, _local11.m_shape2, _local6.m_sweep);
if ((((_local18 > 0)) && ((_local18 < 1)))){
_local18 = (((1 - _local18) * _local19) + _local18);
if (_local18 > 1){
_local18 = 1;
};
};
_local11.m_toi = _local18;
_local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag);
};
if ((((Number.MIN_VALUE < _local18)) && ((_local18 < _local13)))){
_local12 = _local11;
_local13 = _local18;
};
};
};
if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){
break;
};
_local3 = _local12.m_shape1;
_local4 = _local12.m_shape2;
_local5 = _local3.m_body;
_local6 = _local4.m_body;
_local5.Advance(_local13);
_local6.Advance(_local13);
_local12.Update(m_contactListener);
_local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag));
if (_local12.m_manifoldCount == 0){
} else {
_local14 = _local5;
if (_local14.IsStatic()){
_local14 = _local6;
};
_local8.Clear();
_local15 = 0;
var _temp1 = _local15;
_local15 = (_local15 + 1);
var _local22 = _temp1;
_local10[_local22] = _local14;
_local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag);
while (_local15 > 0) {
--_local15;
_local2 = _local10[_local15];
_local8.AddBody(_local2);
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag));
if (_local2.IsStatic()){
} else {
_local7 = _local2.m_contactList;
while (_local7) {
if (_local8.m_contactCount == _local8.m_contactCapacity){
} else {
if ((_local7.contact.m_flags & ((b2Contact.e_islandFlag | b2Contact.e_slowFlag) | b2Contact.e_nonSolidFlag))){
} else {
if (_local7.contact.m_manifoldCount == 0){
} else {
_local8.AddContact(_local7.contact);
_local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag);
_local20 = _local7.other;
if ((_local20.m_flags & b2Body.e_islandFlag)){
} else {
if (_local20.IsStatic() == false){
_local20.Advance(_local13);
_local20.WakeUp();
};
var _temp2 = _local15;
_local15 = (_local15 + 1);
var _local23 = _temp2;
_local10[_local23] = _local20;
_local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag);
};
};
};
};
_local7 = _local7.next;
};
};
};
_local16 = new b2TimeStep();
_local16.dt = ((1 - _local13) * _arg1.dt);
_local16.inv_dt = (1 / _local16.dt);
_local16.maxIterations = _arg1.maxIterations;
_local8.SolveTOI(_local16);
_local17 = 0;
while (_local17 < _local8.m_bodyCount) {
_local2 = _local8.m_bodies[_local17];
_local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag));
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local21 = _local2.SynchronizeShapes();
if ((((_local21 == false)) && (!(( == null))))){
.Violation(_local2);
};
_local7 = _local2.m_contactList;
while (_local7) {
_local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag));
_local7 = _local7.next;
};
};
};
_local17++;
};
_local17 = 0;
while (_local17 < _local8.m_contactCount) {
_local11 = _local8.m_contacts[_local17];
_local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag)));
_local17++;
};
m_broadPhase.Commit();
};
};
}
public function GetJointList():b2Joint{
return (m_jointList);
}
public function Validate():void{
m_broadPhase.Validate();
}
public function ():int{
return (m_broadPhase.m_pairManager.m_pairCount);
}
public function ():b2Body{
return ();
}
public function (_arg1:Boolean):void{
m_warmStarting = _arg1;
}
public function (_arg1:Boolean):void{
m_positionCorrection = _arg1;
}
public function CreateJoint(_arg1:b2JointDef):b2Joint{
var _local2:b2Joint;
var _local3:b2Body;
var _local4:b2Shape;
_local2 = b2Joint.Create(_arg1, m_blockAllocator);
_local2.m_prev = null;
_local2.m_next = m_jointList;
if (m_jointList){
m_jointList.m_prev = _local2;
};
m_jointList = _local2;
m_jointCount++;
_local2.m_node1.joint = _local2;
_local2.m_node1.other = _local2.m_body2;
_local2.m_node1.prev = null;
_local2.m_node1.next = _local2.m_body1.m_jointList;
if (_local2.m_body1.m_jointList){
_local2.m_body1.m_jointList.prev = _local2.m_node1;
};
_local2.m_body1.m_jointList = _local2.m_node1;
_local2.m_node2.joint = _local2;
_local2.m_node2.other = _local2.m_body1;
_local2.m_node2.prev = null;
_local2.m_node2.next = _local2.m_body2.m_jointList;
if (_local2.m_body2.m_jointList){
_local2.m_body2.m_jointList.prev = _local2.m_node2;
};
_local2.m_body2.m_jointList = _local2.m_node2;
if (_arg1.collideConnected == false){
_local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2;
_local4 = _local3.m_shapeList;
while (_local4) {
_local4.RefilterProxy(m_broadPhase, _local3.m_xf);
_local4 = _local4.m_next;
};
};
return (_local2);
}
public function DestroyJoint(_arg1:b2Joint):void{
var _local2:Boolean;
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Body;
var _local6:b2Shape;
_local2 = _arg1.m_collideConnected;
if (_arg1.m_prev){
_arg1.m_prev.m_next = _arg1.m_next;
};
if (_arg1.m_next){
_arg1.m_next.m_prev = _arg1.m_prev;
};
if (_arg1 == m_jointList){
m_jointList = _arg1.m_next;
};
_local3 = _arg1.m_body1;
_local4 = _arg1.m_body2;
_local3.WakeUp();
_local4.WakeUp();
if (_arg1.m_node1.prev){
_arg1.m_node1.prev.next = _arg1.m_node1.next;
};
if (_arg1.m_node1.next){
_arg1.m_node1.next.prev = _arg1.m_node1.prev;
};
if (_arg1.m_node1 == _local3.m_jointList){
_local3.m_jointList = _arg1.m_node1.next;
};
_arg1.m_node1.prev = null;
_arg1.m_node1.next = null;
if (_arg1.m_node2.prev){
_arg1.m_node2.prev.next = _arg1.m_node2.next;
};
if (_arg1.m_node2.next){
_arg1.m_node2.next.prev = _arg1.m_node2.prev;
};
if (_arg1.m_node2 == _local4.m_jointList){
_local4.m_jointList = _arg1.m_node2.next;
};
_arg1.m_node2.prev = null;
_arg1.m_node2.next = null;
b2Joint.Destroy(_arg1, m_blockAllocator);
m_jointCount--;
if (_local2 == false){
_local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4;
_local6 = _local5.m_shapeList;
while (_local6) {
_local6.RefilterProxy(m_broadPhase, _local5.m_xf);
_local6 = _local6.m_next;
};
};
}
public function SetContactListener(_arg1:b2ContactListener):void{
m_contactListener = _arg1;
}
public function CreateBody(_arg1:b2BodyDef):b2Body{
var _local2:b2Body;
if (m_lock == true){
return (null);
};
_local2 = new b2Body(_arg1, this);
_local2.m_prev = null;
_local2.m_next = ;
if (){
.m_prev = _local2;
};
= _local2;
m_bodyCount++;
return (_local2);
}
public function (_arg1:b2BoundaryListener):void{
= _arg1;
}
public function (_arg1:b2DestructionListener):void{
= _arg1;
}
public function Step(_arg1:Number, _arg2:int):void{
var _local3:b2TimeStep;
m_lock = true;
_local3 = new b2TimeStep();
_local3.dt = _arg1;
_local3.maxIterations = _arg2;
if (_arg1 > 0){
_local3.inv_dt = (1 / _arg1);
} else {
_local3.inv_dt = 0;
};
_local3.dtRatio = (
* _arg1);
_local3.positionCorrection = m_positionCorrection;
_local3.warmStarting = m_warmStarting;
.Collide();
if (_local3.dt > 0){
Solve(_local3);
};
if (((m_continuousPhysics) && ((_local3.dt > 0)))){
SolveTOI(_local3);
};
();
= _local3.inv_dt;
m_lock = false;
}
public function ():int{
return (m_bodyCount);
}
public function ():int{
return (m_jointCount);
}
}
}//package Box2D.Dynamics
Section 75
//ArmorButton (com.nitrome.game.ArmorButton)
package com.nitrome.game {
import flash.events.*;
import flash.net.*;
public class ArmorButton extends SimpleButton {
public function ArmorButton(){
addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}
override public function onClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.armorgames.com/"), "_blank");
}
}
}//package com.nitrome.game
Section 76
//BackToTitleButton (com.nitrome.game.BackToTitleButton)
package com.nitrome.game {
import flash.events.*;
import flash.utils.*;
public class BackToTitleButton extends SimpleButton {
public var __id7_:NumbskullFont;
public var __setPropDict:Dictionary;
public function BackToTitleButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id7_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id7_.align = "center";
__id7_.align_vert = "top";
__id7_.color = 2574473;
__id7_.id = "None";
__id7_.line_spacing = 18;
__id7_.text = "back";
__id7_.tracking = 0;
try {
__id7_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 1)) && ((int(__setPropDict[__id7_]) <= 10))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 11)) && ((int(__setPropDict[__id7_]) <= 20))))))){
__setPropDict[__id7_] = currentFrame;
();
};
}
function (){
try {
__id7_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id7_.align = "center";
__id7_.align_vert = "top";
__id7_.color = 11977954;
__id7_.id = "None";
__id7_.line_spacing = 18;
__id7_.text = "back";
__id7_.tracking = 0;
try {
__id7_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("title_screen");
}
}
}//package com.nitrome.game
Section 77
//CongratulationsSubmitScoreButton (com.nitrome.game.CongratulationsSubmitScoreButton)
package com.nitrome.game {
import flash.utils.*;
public dynamic class CongratulationsSubmitScoreButton extends SubmitScoreButton {
public var __setPropDict:Dictionary;
public var __id8_:NumbskullFont;
public function CongratulationsSubmitScoreButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function (){
try {
__id8_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id8_.align = "center";
__id8_.align_vert = "top";
__id8_.color = 2574473;
__id8_.id = "None";
__id8_.line_spacing = 18;
__id8_.text = "submit score";
__id8_.tracking = 0;
try {
__id8_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function (){
try {
__id8_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id8_.align = "center";
__id8_.align_vert = "top";
__id8_.color = 11977954;
__id8_.id = "None";
__id8_.line_spacing = 18;
__id8_.text = "submit score";
__id8_.tracking = 0;
try {
__id8_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 1)) && ((int(__setPropDict[__id8_]) <= 10))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 11)) && ((int(__setPropDict[__id8_]) <= 20))))))){
__setPropDict[__id8_] = currentFrame;
();
};
}
}
}//package com.nitrome.game
Section 78
//ContinueGameButton (com.nitrome.game.ContinueGameButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
public class ContinueGameButton extends SimpleButton {
override public function onClick(_arg1:MouseEvent):void{
if (Controller.popup){
Controller.popup.close();
};
}
}
}//package com.nitrome.game
Section 79
//ContinueGameButton1 (com.nitrome.game.ContinueGameButton1)
package com.nitrome.game {
import flash.utils.*;
public dynamic class ContinueGameButton1 extends ContinueGameButton {
public var __setPropDict:Dictionary;
public var __id16_:NumbskullFont;
public function ContinueGameButton1(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function frame10(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function (){
try {
__id16_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id16_.align = "center";
__id16_.align_vert = "top";
__id16_.color = 11977954;
__id16_.id = "None";
__id16_.line_spacing = 18;
__id16_.text = "resume";
__id16_.tracking = 0;
try {
__id16_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame20(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 1)) && ((int(__setPropDict[__id16_]) <= 10))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id16_] == undefined)) || (!((((int(__setPropDict[__id16_]) >= 11)) && ((int(__setPropDict[__id16_]) <= 20))))))){
__setPropDict[__id16_] = currentFrame;
();
};
}
function (){
try {
__id16_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id16_.align = "center";
__id16_.align_vert = "top";
__id16_.color = 2574473;
__id16_.id = "None";
__id16_.line_spacing = 18;
__id16_.text = "resume";
__id16_.tracking = 0;
try {
__id16_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.nitrome.game
Section 80
//ContinueGameButton2 (com.nitrome.game.ContinueGameButton2)
package com.nitrome.game {
import flash.utils.*;
public dynamic class ContinueGameButton2 extends ContinueGameButton {
public var __setPropDict:Dictionary;
public var __id0_:NumbskullFont;
public function ContinueGameButton2(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function (){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.align = "center";
__id0_.align_vert = "top";
__id0_.color = 11977954;
__id0_.id = "None";
__id0_.line_spacing = 18;
__id0_.text = "No";
__id0_.tracking = 0;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame6(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 1)) && ((int(__setPropDict[__id0_]) <= 10))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function (){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.align = "center";
__id0_.align_vert = "top";
__id0_.color = 2574473;
__id0_.id = "None";
__id0_.line_spacing = 18;
__id0_.text = "No";
__id0_.tracking = 0;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame11(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id0_] == undefined)) || (!((((int(__setPropDict[__id0_]) >= 11)) && ((int(__setPropDict[__id0_]) <= 20))))))){
__setPropDict[__id0_] = currentFrame;
();
};
}
}
}//package com.nitrome.game
Section 81
//CreditsButton (com.nitrome.game.CreditsButton)
package com.nitrome.game {
import flash.events.*;
import flash.utils.*;
public class CreditsButton extends SimpleButton {
public var __setPropDict:Dictionary;
public var __id11_:NumbskullFont;
public function CreditsButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function (){
try {
__id11_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id11_.align = "center";
__id11_.align_vert = "top";
__id11_.color = 2574473;
__id11_.id = "None";
__id11_.line_spacing = 18;
__id11_.text = "Credits";
__id11_.tracking = 0;
try {
__id11_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 1)) && ((int(__setPropDict[__id11_]) <= 10))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 11)) && ((int(__setPropDict[__id11_]) <= 20))))))){
__setPropDict[__id11_] = currentFrame;
();
};
}
function
(){
try {
__id11_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id11_.align = "center";
__id11_.align_vert = "top";
__id11_.color = 11977954;
__id11_.id = "None";
__id11_.line_spacing = 18;
__id11_.text = "Credits";
__id11_.tracking = 0;
try {
__id11_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("credits");
}
}
}//package com.nitrome.game
Section 82
//EdgeScrollingButton (com.nitrome.game.EdgeScrollingButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
public class EdgeScrollingButton extends SimpleButton {
public function EdgeScrollingButton(){
if (NitromeGame.edgeScrolling){
gotoAndStop("_on_up");
} else {
gotoAndStop("_off_up");
};
}
override protected function updateGraphic():void{
if (over){
if (Controller.edgeScrolling){
gotoAndStop("_on_over");
} else {
gotoAndStop("_off_over");
};
} else {
if (Controller.edgeScrolling){
gotoAndStop("_on_up");
} else {
gotoAndStop("_off_up");
};
};
}
override public function onClick(_arg1:MouseEvent):void{
Controller.edgeScrolling = !(Controller.edgeScrolling);
NitromeGame.edgeScrolling = Controller.edgeScrolling;
updateGraphic();
}
}
}//package com.nitrome.game
Section 83
//EndGameButton (com.nitrome.game.EndGameButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
import flash.utils.*;
public class EndGameButton extends SimpleButton {
public var __id17_:NumbskullFont;
public var __setPropDict:Dictionary;
public function EndGameButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id17_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id17_.align = "center";
__id17_.align_vert = "top";
__id17_.color = 11977954;
__id17_.id = "None";
__id17_.line_spacing = 18;
__id17_.text = "end game";
__id17_.tracking = 0;
try {
__id17_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 1)) && ((int(__setPropDict[__id17_]) <= 10))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id17_] == undefined)) || (!((((int(__setPropDict[__id17_]) >= 11)) && ((int(__setPropDict[__id17_]) <= 20))))))){
__setPropDict[__id17_] = currentFrame;
();
};
}
function (){
try {
__id17_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id17_.align = "center";
__id17_.align_vert = "top";
__id17_.color = 2574473;
__id17_.id = "None";
__id17_.line_spacing = 18;
__id17_.text = "end game";
__id17_.tracking = 0;
try {
__id17_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
override public function onClick(_arg1:MouseEvent):void{
var e = _arg1;
if (Controller.popup){
Controller.popup.close();
};
NitromeGame.transition.doTween(function (){
Controller.endGame();
NitromeGame.timeline.gotoAndStop("title_screen");
});
}
}
}//package com.nitrome.game
Section 84
//ExitToLevelSelectButton (com.nitrome.game.ExitToLevelSelectButton)
package com.nitrome.game {
import flash.display.*;
public dynamic class ExitToLevelSelectButton extends MovieClip {
}
}//package com.nitrome.game
Section 85
//FxToggle (com.nitrome.game.FxToggle)
package com.nitrome.game {
import flash.events.*;
public class FxToggle extends SimpleButton {
public function FxToggle(){
if (!NitromeGame.sfx){
gotoAndStop("_off_up");
} else {
gotoAndStop("_on_up");
};
}
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 86
//HelpButton (com.nitrome.game.HelpButton)
package com.nitrome.game {
import flash.events.*;
import flash.utils.*;
public class HelpButton extends SimpleButton {
public var __setPropDict:Dictionary;
public var __id9_:NumbskullFont;
public function HelpButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function (){
try {
__id9_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id9_.align = "center";
__id9_.align_vert = "top";
__id9_.color = 12043747;
__id9_.id = "None";
__id9_.line_spacing = 18;
__id9_.text = "Help";
__id9_.tracking = 0;
try {
__id9_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 1)) && ((int(__setPropDict[__id9_]) <= 10))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function (){
try {
__id9_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id9_.align = "center";
__id9_.align_vert = "top";
__id9_.color = 2574473;
__id9_.id = "None";
__id9_.line_spacing = 18;
__id9_.text = "Help";
__id9_.tracking = 0;
try {
__id9_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame15(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 11)) && ((int(__setPropDict[__id9_]) <= 20))))))){
__setPropDict[__id9_] = currentFrame;
();
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("help");
}
}
}//package com.nitrome.game
Section 87
//HintOverlay (com.nitrome.game.HintOverlay)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.display.*;
public class HintOverlay extends MovieClip {
private var type:String;
public function destroy():void{
if (parent){
parent.removeChild(this);
};
}
public function create(_arg1:String):void{
x = 275;
y = 200;
alpha = 0;
visible = false;
gotoAndStop((type = _arg1));
Controller.root.addChild(this);
}
public function advance():void{
if (((Controller.level) && (Controller.level.showHint))){
if (alpha < 1){
visible = true;
alpha = (alpha + 0.2);
if (alpha >= 1){
alpha = 1;
};
};
} else {
if (alpha > 0){
alpha = (alpha - 0.2);
if (alpha <= 0){
alpha = 0;
visible = false;
};
};
};
}
public function getType():String{
return (type);
}
}
}//package com.nitrome.game
Section 88
//IngamePopup (com.nitrome.game.IngamePopup)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.display.*;
import flash.events.*;
import com.nitrome.util.*;
public class IngamePopup extends MovieClip {
public var popupType:String;
public var
:Number;// = 0
public var :Number;// = 0
public var :Boolean;// = false
public var inner:MovieClip;
public var :Number;// = 0
public var :Boolean;// = true
public var :Number;// = 10
public var :Number;// = 0
public function IngamePopup(){
= true;
= 0;
= 0;
= 0;
= 0;
= 10;
= false;
super();
addFrameScript(0, frame1, 11, frame12, 12, frame13, 15, frame16);
addEventListener(Event.ADDED, );
x = 275;
y = 200;
}
public function destroy():void{
();
removeEventListener(Event.ADDED, );
}
public function ():void{
var _local1:Number;
var _local2:DisplayObject;
if (((!()) || (!(isOpen)))){
return;
};
_local1 = 0;
while (_local1 < MovieClip(inner).numChildren) {
_local2 = inner.getChildAt(_local1);
if ((((_local2 is SimpleButton)) && ((_local2.name.substr(0, 7) == "default")))){
(_local2 as SimpleButton).onClick(null);
return;
};
_local1++;
};
}
function frame12(){
= true;
= false;
stop();
}
function frame16(){
();
}
function frame1(){
stop();
}
public function (_arg1:Event):void{
if ((((_arg1.target.parent == this)) && ((_arg1.target is MovieClip)))){
(_arg1.target as MovieClip).gotoAndStop(popupType);
};
}
private function ():void{
if (parent){
parent.removeChild(this);
};
gotoAndStop(1);
}
public function open(_arg1:String):void{
popupType = _arg1;
gotoAndPlay(2);
if (!parent){
Controller.root.popupHolder.addChild(this);
};
= Controller.level.getScore();
= Score.value;
= ( = 0);
= true;
= 10;
}
function frame13(){
= false;
}
public function advance():void{
if (!inner){
return;
};
if (((Key.isReady()) && (Key.isDown(32)))){
();
};
if (! ){
if (((inner.levelScore) && (( < )))){
= ( + 153);
if ( > ){
= ;
};
inner.levelScore.text = .toString();
} else {
if ( > 0){
--;
} else {
if (((inner.totalScore) && (( <
)))){
= ( + 357);
if ( >
){
=
;
};
inner.totalScore.text = .toString();
};
};
};
};
}
public function snapToFrame(_arg1:String):void{
inner.gotoAndStop(_arg1);
}
public function get isOpen():Boolean{
return (!((currentFrame == 1)));
}
public function close():void{
play();
stage.focus = null;
}
}
}//package com.nitrome.game
Section 89
//IngameSubmitScoreButton (com.nitrome.game.IngameSubmitScoreButton)
package com.nitrome.game {
import flash.utils.*;
public dynamic class IngameSubmitScoreButton extends SubmitScoreButton {
public var __id22_:NumbskullFont;
public var __setPropDict:Dictionary;
public function IngameSubmitScoreButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 1)) && ((int(__setPropDict[__id22_]) <= 10))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function (){
try {
__id22_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id22_.align = "center";
__id22_.align_vert = "top";
__id22_.color = 2574473;
__id22_.id = "None";
__id22_.line_spacing = 18;
__id22_.text = "submit score";
__id22_.tracking = 0;
try {
__id22_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame15(){
if ((((__setPropDict[__id22_] == undefined)) || (!((((int(__setPropDict[__id22_]) >= 11)) && ((int(__setPropDict[__id22_]) <= 20))))))){
__setPropDict[__id22_] = currentFrame;
();
};
}
function (){
try {
__id22_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id22_.align = "center";
__id22_.align_vert = "top";
__id22_.color = 11977954;
__id22_.id = "None";
__id22_.line_spacing = 18;
__id22_.text = "submit score";
__id22_.tracking = 0;
try {
__id22_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.nitrome.game
Section 90
//LevelStartButton (com.nitrome.game.LevelStartButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
import flash.net.*;
import com.nitrome.util.*;
public class LevelStartButton extends SimpleButton {
private var
:Boolean;
private var :Boolean;// = false
public var numberField:NumbskullFont;
private var :Number;
private var :Boolean;// = false
public function LevelStartButton(){
= false;
= false;
super();
();
}
public function init(_arg1:SharedObject):void{
= Number(name.substr(6));
if ( > Controller.lastLevelAvailable.value){
= false;
} else {
if (((((((((( == 1)) || (( == 9)))) || (( == 17)))) || (( == 25)))) || (( == 33)))){
= true;
} else {
if (_arg1.data.levels_unlocked){
= Boolean(_arg1.data.levels_unlocked[( - 1)]);
};
};
};
if (!
){
if (((_arg1.data.timed_unlock_active) && ((_arg1.data.timed_unlock_level == )))){
= true;
};
} else {
if (TimedUnlock.getLevelJustUnlocked() == ){
= true;
};
};
useHandCursor = (buttonMode =
);
this.addEventListener(Event.ENTER_FRAME, enterFrame);
}
public function addedToStage(_arg1:Event):void{
updateGraphic();
}
public function enterFrame(_arg1:Event):void{
updateGraphic();
this.removeEventListener(Event.ENTER_FRAME, enterFrame);
}
function (){
try {
numberField["componentInspectorSetting"] = true;
} catch(e:Error) {
};
numberField.align = "center";
numberField.align_vert = "top";
numberField.color = 11977954;
numberField.id = "None";
numberField.line_spacing = 18;
numberField.text = "1";
numberField.tracking = 0;
try {
numberField["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
override protected function updateGraphic():void{
if (
){
if ( ){
gotoAndStop("justUnlocked");
} else {
gotoAndStop("normal");
};
} else {
if ( ){
gotoAndStop("lockedWillUnlock");
} else {
gotoAndStop("locked");
};
};
if (numberField){
numberField.text = String( );
numberField.visible = ((
) || ( ));
numberField.color = (((
) && (over))) ? 2574473 : 11977954;
};
}
override public function onClick(_arg1:MouseEvent):void{
var e = _arg1;
if (
){
NitromeGame.transition.doTween(function (){
NitromeGame.timeline.gotoAndStop("game");
Controller.selectedLevel = ;
Score.value = 0;
});
};
}
}
}//package com.nitrome.game
Section 91
//LoadIndicator (com.nitrome.game.LoadIndicator)
package com.nitrome.game {
import flash.display.*;
public class LoadIndicator extends MovieClip {
public function LoadIndicator(_arg1:Number=0, _arg2:Number=0){
addFrameScript(6, frame7, 11, frame12);
x = _arg1;
y = _arg2;
}
public function destroy():void{
stop();
if (parent){
parent.removeChild(this);
};
}
function frame12(){
destroy();
}
public function finishedLoading():void{
gotoAndPlay("outAnimation");
}
function frame7(){
gotoAndPlay("loop");
}
}
}//package com.nitrome.game
Section 92
//MusicToggle (com.nitrome.game.MusicToggle)
package com.nitrome.game {
import flash.events.*;
public class MusicToggle extends SimpleButton {
public function MusicToggle(){
if (!NitromeGame.music){
gotoAndStop("_off_up");
} else {
gotoAndStop("_on_up");
};
}
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 93
//NextLevelButton (com.nitrome.game.NextLevelButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
public class NextLevelButton extends SimpleButton {
override public function onClick(_arg1:MouseEvent):void{
var e = _arg1;
if (Controller.popup){
Controller.popup.close();
};
NitromeGame.transition.doTween(function (){
if (Controller.atEndOfGame()){
Controller.endGame();
NitromeGame.timeline.gotoAndStop("congrats");
} else {
Controller.nextLevel();
};
});
}
}
}//package com.nitrome.game
Section 94
//NextLevelButton1 (com.nitrome.game.NextLevelButton1)
package com.nitrome.game {
import flash.utils.*;
public dynamic class NextLevelButton1 extends NextLevelButton {
public var __setPropDict:Dictionary;
public var __id19_:NumbskullFont;
public function NextLevelButton1(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id19_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id19_.align = "center";
__id19_.align_vert = "top";
__id19_.color = 11977954;
__id19_.id = "None";
__id19_.line_spacing = 18;
__id19_.text = "continue";
__id19_.tracking = 0;
try {
__id19_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function
(){
try {
__id19_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id19_.align = "center";
__id19_.align_vert = "top";
__id19_.color = 2574473;
__id19_.id = "None";
__id19_.line_spacing = 18;
__id19_.text = "continue";
__id19_.tracking = 0;
try {
__id19_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame15(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 1)) && ((int(__setPropDict[__id19_]) <= 10))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id19_] == undefined)) || (!((((int(__setPropDict[__id19_]) >= 11)) && ((int(__setPropDict[__id19_]) <= 20))))))){
__setPropDict[__id19_] = currentFrame;
();
};
}
}
}//package com.nitrome.game
Section 95
//NextLevelButton2 (com.nitrome.game.NextLevelButton2)
package com.nitrome.game {
import flash.utils.*;
public dynamic class NextLevelButton2 extends NextLevelButton {
public var __id20_:NumbskullFont;
public var __setPropDict:Dictionary;
public function NextLevelButton2(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.align = "center";
__id20_.align_vert = "top";
__id20_.color = 11977954;
__id20_.id = "None";
__id20_.line_spacing = 18;
__id20_.text = "next clan";
__id20_.tracking = 0;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 1)) && ((int(__setPropDict[__id20_]) <= 10))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id20_] == undefined)) || (!((((int(__setPropDict[__id20_]) >= 11)) && ((int(__setPropDict[__id20_]) <= 20))))))){
__setPropDict[__id20_] = currentFrame;
();
};
}
function (){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.align = "center";
__id20_.align_vert = "top";
__id20_.color = 2574473;
__id20_.id = "None";
__id20_.line_spacing = 18;
__id20_.text = "next clan";
__id20_.tracking = 0;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.nitrome.game
Section 96
//NitromeLink (com.nitrome.game.NitromeLink)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class NitromeLink extends SimpleButton {
public function NitromeLink(){
this.addEventListener(MouseEvent.CLICK,
);
}
public function
(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.nitrome.com/"), "_blank");
}
}
}//package com.nitrome.game
Section 97
//PauseButton (com.nitrome.game.PauseButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
public class PauseButton extends SimpleButton {
override public function onClick(_arg1:MouseEvent):void{
Controller.popup.open("paused");
}
}
}//package com.nitrome.game
Section 98
//PlayButton (com.nitrome.game.PlayButton)
package com.nitrome.game {
import flash.events.*;
import flash.utils.*;
public class PlayButton extends SimpleButton {
public var __id6_:NumbskullFont;
public var __setPropDict:Dictionary;
public function PlayButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function
(){
try {
__id6_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id6_.align = "center";
__id6_.align_vert = "top";
__id6_.color = 12043747;
__id6_.id = "None";
__id6_.line_spacing = 18;
__id6_.text = "Play";
__id6_.tracking = 0;
try {
__id6_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 1)) && ((int(__setPropDict[__id6_]) <= 10))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 11)) && ((int(__setPropDict[__id6_]) <= 20))))))){
__setPropDict[__id6_] = currentFrame;
();
};
}
function
(){
try {
__id6_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id6_.align = "center";
__id6_.align_vert = "top";
__id6_.color = 2574473;
__id6_.id = "None";
__id6_.line_spacing = 18;
__id6_.text = "Play";
__id6_.tracking = 0;
try {
__id6_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("level_select");
}
}
}//package com.nitrome.game
Section 99
//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 progress:TextField;
public var __id2_:NumbskullFont;
public function Preloader(){
addEventListener(Event.ENTER_FRAME, enterFrame);
();
}
public function finishedLoading(){
if (hasEventListener(Event.COMPLETE)){
removeEventListener(Event.ENTER_FRAME, enterFrame);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function enterFrame(_arg1:Event):void{
var _local2:Number;
var _local3:TextField;
if (stage.loaderInfo.bytesLoaded < stage.loaderInfo.bytesTotal){
_local2 = Math.floor(((100 * stage.loaderInfo.bytesLoaded) / stage.loaderInfo.bytesTotal));
_local3 = (getChildByName("progress") as TextField);
_local3.text = (_local2.toString() + "%");
} else {
(root as MovieClip).stop();
finishedLoading();
};
}
function
(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.align = "center";
__id2_.align_vert = "top";
__id2_.color = 12043747;
__id2_.id = "None";
__id2_.line_spacing = 18;
__id2_.text = "Loading";
__id2_.tracking = 0;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.nitrome.game
Section 100
//ResetButton (com.nitrome.game.ResetButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
public class ResetButton extends SimpleButton {
override public function onClick(_arg1:MouseEvent):void{
var e = _arg1;
if (Controller.isPaused()){
return;
};
if (Level.EDITOR_ENABLED){
NitromeGame.transition.doTween(function (){
if (Controller.level. ){
Controller.level. .(1);
Controller.level. .(0);
};
});
} else {
if (Controller.level.canOfferTimedUnlock()){
Controller.popup.open("restartStuck");
} else {
Controller.popup.open("restart");
};
};
}
}
}//package com.nitrome.game
Section 101
//RestartLevelButton (com.nitrome.game.RestartLevelButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
import com.nitrome.util.*;
public class RestartLevelButton extends SimpleButton {
override public function onClick(_arg1:MouseEvent):void{
var e = _arg1;
if (Controller.popup){
Controller.popup.close();
};
NitromeGame.transition.doTween(function (){
TimedUnlock.recordDeath(Controller.loadedLevelNumber);
Controller.restartLevel();
Score.value = 0;
});
}
}
}//package com.nitrome.game
Section 102
//RestartLevelButton1 (com.nitrome.game.RestartLevelButton1)
package com.nitrome.game {
import flash.utils.*;
public dynamic class RestartLevelButton1 extends RestartLevelButton {
public var __id21_:NumbskullFont;
public var __setPropDict:Dictionary;
public function RestartLevelButton1(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function (){
try {
__id21_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id21_.align = "center";
__id21_.align_vert = "top";
__id21_.color = 11977954;
__id21_.id = "None";
__id21_.line_spacing = 18;
__id21_.text = "restart level";
__id21_.tracking = 0;
try {
__id21_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
__id21_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id21_.align = "center";
__id21_.align_vert = "top";
__id21_.color = 2574473;
__id21_.id = "None";
__id21_.line_spacing = 18;
__id21_.text = "restart level";
__id21_.tracking = 0;
try {
__id21_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame4(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 1)) && ((int(__setPropDict[__id21_]) <= 10))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id21_] == undefined)) || (!((((int(__setPropDict[__id21_]) >= 11)) && ((int(__setPropDict[__id21_]) <= 20))))))){
__setPropDict[__id21_] = currentFrame;
();
};
}
}
}//package com.nitrome.game
Section 103
//RestartLevelButton2 (com.nitrome.game.RestartLevelButton2)
package com.nitrome.game {
import flash.utils.*;
public dynamic class RestartLevelButton2 extends RestartLevelButton {
public var __setPropDict:Dictionary;
public var __id1_:NumbskullFont;
public function RestartLevelButton2(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function (){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.align = "center";
__id1_.align_vert = "top";
__id1_.color = 2574473;
__id1_.id = "None";
__id1_.line_spacing = 18;
__id1_.text = "yes";
__id1_.tracking = 0;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 1)) && ((int(__setPropDict[__id1_]) <= 10))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id1_] == undefined)) || (!((((int(__setPropDict[__id1_]) >= 11)) && ((int(__setPropDict[__id1_]) <= 20))))))){
__setPropDict[__id1_] = currentFrame;
();
};
}
function (){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.align = "center";
__id1_.align_vert = "top";
__id1_.color = 11977954;
__id1_.id = "None";
__id1_.line_spacing = 18;
__id1_.text = "yes";
__id1_.tracking = 0;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.nitrome.game
Section 104
//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 105
//ScoresButton (com.nitrome.game.ScoresButton)
package com.nitrome.game {
import flash.events.*;
import flash.utils.*;
public class ScoresButton extends SimpleButton {
public var __id10_:NumbskullFont;
public var __setPropDict:Dictionary;
public function ScoresButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function
(){
try {
__id10_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id10_.align = "center";
__id10_.align_vert = "top";
__id10_.color = 12043747;
__id10_.id = "None";
__id10_.line_spacing = 18;
__id10_.text = "Scores";
__id10_.tracking = 0;
try {
__id10_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame14(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function
(){
try {
__id10_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id10_.align = "center";
__id10_.align_vert = "top";
__id10_.color = 2574473;
__id10_.id = "None";
__id10_.line_spacing = 18;
__id10_.text = "Scores";
__id10_.tracking = 0;
try {
__id10_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame5(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 11)) && ((int(__setPropDict[__id10_]) <= 20))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame10(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 1)) && ((int(__setPropDict[__id10_]) <= 10))))))){
__setPropDict[__id10_] = currentFrame;
();
};
}
override public function onClick(_arg1:MouseEvent):void{
NitromeGame.transition.doTween("view_scores");
}
}
}//package com.nitrome.game
Section 106
//SimpleButton (com.nitrome.game.SimpleButton)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class SimpleButton extends MovieClip {
protected var over:Boolean;// = false
public function SimpleButton(){
over = false;
super();
mouseChildren = false;
buttonMode = true;
this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
this.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
stop();
}
protected function onMouseOver(_arg1:MouseEvent):void{
over = true;
updateGraphic();
}
protected function onMouseOut(_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 107
//SoundManager (com.nitrome.game.SoundManager)
package com.nitrome.game {
import flash.display.*;
import flash.media.*;
public class SoundManager extends SoundManagerSuper {
protected const MENU_VOLUME:Number = 1;
protected const GAME_VOLUME:Number = 0.5;
public var ice3:MovieClip;
public var bouncyImpact:MovieClip;
public var vikingAtEnd:MovieClip;
public var fatwoman:MovieClip;
public var wolfratDying:MovieClip;
public var iceSmash:MovieClip;
public var ice4:MovieClip;
public var ropeBreak:MovieClip;
public var nitrome:MovieClip;
public var blocked:MovieClip;
public var splash:MovieClip;
public var grab:MovieClip;
public var noslice:MovieClip;
public var death:MovieClip;
public var runeDeath:MovieClip;
public var ice3b:MovieClip;
public var bombExplode:MovieClip;
public var deepthud:MovieClip;
public var iceTooLarge:MovieClip;
public var pinBlock:MovieClip;
public static const GAME:uint = 1;
public static const MENU:uint = 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 108
//SoundManagerSuper (com.nitrome.game.SoundManagerSuper)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
public class SoundManagerSuper extends Sprite {
protected const CROSS_FADE_SPEED:Number = 0.05;
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;
protected var :Array;
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++;
};
}
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);
};
};
}
private function
(_arg1:Event):void{
if (transforms[].volume > 0){
transforms[].volume = (transforms[].volume - CROSS_FADE_SPEED);
channels[].soundTransform = transforms[];
};
if (transforms[].volume < 1){
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 ():void{
NitromeGame.music = ( = true);
playMusic(, true);
}
public function set music(_arg1:Boolean):void{
= _arg1;
}
public function playMusic(_arg1:uint, _arg2:Boolean=false):void{
var _local3:uint;
if (((!(( == _arg1))) || (_arg2))){
if (_arg1 < music_sounds.length){
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 ():void{
NitromeGame.sfx = ( = false);
}
public function toggleSfx():void{
= !();
NitromeGame.sfx = !(NitromeGame.sfx);
}
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 ():void{
NitromeGame.sfx = ( = true);
}
public function (_arg1:int):void{
if (((((!()) || (( == _arg1)))) || ())){
return;
};
transforms[_arg1].volume = 0;
channels[_arg1] = music_sounds[_arg1].play(0, int.MAX_VALUE, transforms[_arg1]);
= ;
= _arg1;
= true;
addEventListener(Event.ENTER_FRAME,
);
}
}
}//package com.nitrome.game
Section 109
//StuckButton (com.nitrome.game.StuckButton)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class StuckButton extends SimpleButton {
public var __id18_:NumbskullFont;
public var __setPropDict:Dictionary;
public function StuckButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function (){
try {
__id18_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id18_.align = "center";
__id18_.align_vert = "top";
__id18_.color = 2574473;
__id18_.id = "None";
__id18_.line_spacing = 18;
__id18_.text = "i'm stuck!";
__id18_.tracking = 0;
try {
__id18_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame5(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 1)) && ((int(__setPropDict[__id18_]) <= 10))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
function (){
try {
__id18_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id18_.align = "center";
__id18_.align_vert = "top";
__id18_.color = 11977954;
__id18_.id = "None";
__id18_.line_spacing = 18;
__id18_.text = "i'm stuck!";
__id18_.tracking = 0;
try {
__id18_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame11(){
if ((((__setPropDict[__id18_] == undefined)) || (!((((int(__setPropDict[__id18_]) >= 11)) && ((int(__setPropDict[__id18_]) <= 20))))))){
__setPropDict[__id18_] = currentFrame;
();
};
}
override public function onClick(_arg1:MouseEvent):void{
MovieClip(parent).timedUnlock.play();
}
}
}//package com.nitrome.game
Section 110
//SubmitScoreButton (com.nitrome.game.SubmitScoreButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.events.*;
public class SubmitScoreButton extends SimpleButton {
public function SubmitScoreButton(){
if (Score.value == 0){
visible = false;
};
}
override public function onClick(_arg1:MouseEvent):void{
var e = _arg1;
NitromeGame.transition.doTween(function (){
if (Controller.content){
Controller.endGame();
};
if (Controller.popup){
Controller.popup.close();
};
NitromeGame.timeline.gotoAndStop("submit_score");
});
}
}
}//package com.nitrome.game
Section 111
//TemplateFont (com.nitrome.game.TemplateFont)
package com.nitrome.game {
public class TemplateFont extends TextComponent {
public function TemplateFont(){
_tracking = 0;
_line_spacing = 18;
_id = "None";
}
override public function get id():String{
return (_id);
}
override public function set id(_arg1:String){
_id = _arg1;
}
override public function set tracking(_arg1:int){
_tracking = _arg1;
}
override protected function getClassNameFromChar(_arg1:String):String{
if (_arg1 == "Space"){
return ("SPACE");
};
if (_arg1 == "."){
return ("STOP");
};
if (_arg1 == "?"){
return ("QUESTION");
};
if (_arg1 == ","){
return ("COMMA");
};
if (_arg1 == "!"){
return ("EXCLAMATION");
};
if (_arg1 == "\\"){
return ("BACKSLASH");
};
if (_arg1 == "/"){
return ("FORWARDSLASH");
};
if (_arg1 == "="){
return ("EQUALS");
};
if (_arg1 == "+"){
return ("PLUS");
};
if (_arg1 == "("){
return ("LEFTBRACKET");
};
if (_arg1 == ")"){
return ("RIGHTBRACKET");
};
if (_arg1 == "-"){
return ("HYPHEN");
};
if (_arg1 == "\""){
return ("QUOTES");
};
if (_arg1 == ":"){
return ("COLON");
};
if (_arg1 == "�"){
return ("POUND");
};
if (_arg1 == "_"){
return ("UNDERSCORE");
};
if (_arg1 == "@"){
return ("AT");
};
if (_arg1 == "'"){
return ("APOSTROPHE");
};
if ((((((_arg1 == "\n")) || ((_arg1 == "\r")))) || ((_arg1 == "|")))){
return ("NEWLINE");
};
return (_arg1);
}
override public function get tracking():int{
return (_tracking);
}
override public function set line_spacing(_arg1:int){
_line_spacing = _arg1;
}
override public function get line_spacing():int{
return (_line_spacing);
}
}
}//package com.nitrome.game
Section 112
//TextComponent (com.nitrome.game.TextComponent)
package com.nitrome.game {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class TextComponent extends Sprite {
protected var
:String;// = "center"
protected var :Array;
protected var :String;// = "enter text"
protected var _tracking:int;// = 0
protected var :ColorTransform;// = null
private var :Number;// = 0
protected var :Array;
protected var _id:String;// = "None"
private var :Number;// = 0
protected var :String;// = "center"
private var :Sprite;
protected var :Sprite;
protected var _line_spacing:int;// = 18
protected var :uint;// = 0xFFFFFF
public function TextComponent(){
= "enter text";
_tracking = 0;
= "center";
= "center";
_line_spacing = 18;
_id = "None";
= 0xFFFFFF;
= null;
= 0;
= 0;
super();
init();
();
draw();
}
public function get align():String{
return (
);
}
private function init():void{
= new Array();
= new Array();
= width;
= height;
scaleX = 1;
scaleY = 1;
removeChildAt(0);
}
public function set align(_arg1:String){
= _arg1;
draw();
}
private function ():void{
= new Sprite();
addChild();
}
public function get align_vert():String{
return ();
}
public function get text():String{
return ();
}
public function set id(_arg1:String){
_id = _arg1;
draw();
}
protected function draw():void{
var line:*;
var i:int;
var isLivePreview:Boolean;
var c:*;
var class_name:String;
var class_id:Class;
var temp:Sprite;
var j:int;
var x_tracking:*;
.graphics.clear();
if ( != null){
this.removeChild();
};
= new Sprite();
= new Array();
line = 0;
.push(.addChild(new Sprite()));
= new Array();
.push(new Array());
i = 0;
while (i < .length) {
= .toUpperCase();
c = .charAt(i);
class_name = getClassNameFromChar(c);
if (class_name == "NEWLINE"){
line = (line + 1);
.push(new Array());
.push(.addChild(new Sprite()));
[line].y = (line_spacing * line);
} else {
if (class_name != ""){
try {
class_id = (getDefinitionByName(((("Text_" + _id) + "_") + class_name)) as Class);
} catch(e:ReferenceError) {
try {
class_id = (getDefinitionByName((("Text_" + _id) + "_SPACE")) as Class);
} catch(e:ReferenceError) {
trace(("TextComponent error: could not find font " + _id));
break;
};
};
if (Class != null){
temp = (new (class_id) as Sprite);
[line].push([line].addChild(temp));
};
};
};
i = (i + 1);
};
i = 0;
while (i < .length) {
j = 1;
while (j < [i].length) {
x_tracking = _tracking;
if ([i][(j - 1)].kerning != null){
x_tracking = (x_tracking + [i][(j - 1)].kerning._x);
} else {
x_tracking = (x_tracking + [i][(j - 1)].width);
};
[i][j].x = ([i][(j - 1)].x + x_tracking);
j = (j + 1);
};
if (
== "center"){
[i].x = ([i].x + int((( * 0.5) - ([i].width * 0.5))));
} else {
if (
== "right"){
[i].x = ([i].x + int(( - [i].width)));
};
};
i = (i + 1);
};
if ( == "bottom"){
.y = (.y + int(( - .height)));
} else {
if ( == "center"){
.y = (.y + int((( * 0.5) - (.height * 0.5))));
};
};
if ( != null){
.transform.colorTransform = ;
};
.cacheAsBitmap = true;
this.addChild();
this.cacheAsBitmap = true;
isLivePreview = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")));
if (((isLivePreview) && (( == "")))){
.graphics.clear();
.graphics.lineStyle(1, 0);
.graphics.beginFill(0xFFFFFF, 0.5);
.graphics.drawRoundRect(0, 0, , , 10, 10);
.graphics.endFill();
};
}
public function get id():String{
return (_id);
}
public function set align_vert(_arg1:String){
= _arg1;
draw();
}
public function get color():uint{
return ();
}
public function set text(_arg1:String){
= _arg1;
draw();
}
public function set tracking(_arg1:int){
_tracking = _arg1;
draw();
}
public function
(_arg1:Number, _arg2:Number):void{
= _arg1;
= _arg2;
draw();
}
protected function getClassNameFromChar(_arg1:String):String{
if (_arg1 == "Space"){
return ("SPACE");
};
if (_arg1 == "."){
return ("STOP");
};
if (_arg1 == "?"){
return ("QUESTION");
};
if (_arg1 == ","){
return ("COMMA");
};
if (_arg1 == "!"){
return ("EXCLAMATION");
};
if (_arg1 == "\\"){
return ("BACKSLASH");
};
if (_arg1 == "/"){
return ("FORWARDSLASH");
};
if (_arg1 == "="){
return ("EQUALS");
};
if (_arg1 == "+"){
return ("PLUS");
};
if (_arg1 == "("){
return ("LEFTBRACKET");
};
if (_arg1 == ")"){
return ("RIGHTBRACKET");
};
if (_arg1 == "-"){
return ("HYPHEN");
};
if (_arg1 == "\""){
return ("QUOTES");
};
if (_arg1 == ":"){
return ("COLON");
};
if (_arg1 == "�"){
return ("POUND");
};
if (_arg1 == "_"){
return ("UNDERSCORE");
};
if (_arg1 == "@"){
return ("AT");
};
if (_arg1 == "'"){
return ("APOSTROPHE");
};
if ((((((_arg1 == "\n")) || ((_arg1 == "\r")))) || ((_arg1 == "|")))){
return ("NEWLINE");
};
return (_arg1);
}
public function get tracking():int{
return (_tracking);
}
public function set color(_arg1:uint):void{
= _arg1;
if (_arg1 == 0xFFFFFF){
= null;
} else {
= new ColorTransform((((_arg1 >> 16) % 0x0100) / 0xFF), (((_arg1 >> 8) % 0x0100) / 0xFF), ((_arg1 % 0x0100) / 0xFF));
};
draw();
}
public function set line_spacing(_arg1:int){
_line_spacing = _arg1;
draw();
}
public function get line_spacing():int{
return (_line_spacing);
}
}
}//package com.nitrome.game
Section 113
//TimedUnlockCancelButton (com.nitrome.game.TimedUnlockCancelButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.display.*;
import flash.events.*;
public class TimedUnlockCancelButton extends SimpleButton {
override public function onClick(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:MovieClip;
_local2 = MovieClip(parent);
_local3 = MovieClip(_local2.parent);
_local3.play();
if ((this is TimedUnlockDoneButton)){
if (Controller.popup.popupType == "failedStuck"){
Controller.popup.snapToFrame("failed");
};
if (Controller.popup.popupType == "restartStuck"){
Controller.popup.snapToFrame("restart");
};
};
}
}
}//package com.nitrome.game
Section 114
//TimedUnlockDoneButton (com.nitrome.game.TimedUnlockDoneButton)
package com.nitrome.game {
import flash.utils.*;
public dynamic class TimedUnlockDoneButton extends TimedUnlockCancelButton {
public var __id5_:NumbskullFont;
public var __setPropDict:Dictionary;
public function TimedUnlockDoneButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function
(){
try {
__id5_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id5_.align = "center";
__id5_.align_vert = "top";
__id5_.color = 2574473;
__id5_.id = "None";
__id5_.line_spacing = 18;
__id5_.text = "ok";
__id5_.tracking = 0;
try {
__id5_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
__id5_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id5_.align = "center";
__id5_.align_vert = "top";
__id5_.color = 11977954;
__id5_.id = "None";
__id5_.line_spacing = 18;
__id5_.text = "ok";
__id5_.tracking = 0;
try {
__id5_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame3(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 1)) && ((int(__setPropDict[__id5_]) <= 10))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 11)) && ((int(__setPropDict[__id5_]) <= 20))))))){
__setPropDict[__id5_] = currentFrame;
();
};
}
}
}//package com.nitrome.game
Section 115
//TimedUnlockNoButton (com.nitrome.game.TimedUnlockNoButton)
package com.nitrome.game {
import flash.utils.*;
public dynamic class TimedUnlockNoButton extends TimedUnlockCancelButton {
public var __setPropDict:Dictionary;
public var __id4_:NumbskullFont;
public function TimedUnlockNoButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_.align = "center";
__id4_.align_vert = "top";
__id4_.color = 11977954;
__id4_.id = "None";
__id4_.line_spacing = 18;
__id4_.text = "no thanks";
__id4_.tracking = 0;
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function (){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_.align = "center";
__id4_.align_vert = "top";
__id4_.color = 2574473;
__id4_.id = "None";
__id4_.line_spacing = 18;
__id4_.text = "no thanks";
__id4_.tracking = 0;
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 1)) && ((int(__setPropDict[__id4_]) <= 10))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 11)) && ((int(__setPropDict[__id4_]) <= 20))))))){
__setPropDict[__id4_] = currentFrame;
();
};
}
}
}//package com.nitrome.game
Section 116
//TimedUnlockOKButton (com.nitrome.game.TimedUnlockOKButton)
package com.nitrome.game {
import com.nitrome.icebreaker.*;
import flash.display.*;
import flash.events.*;
import com.nitrome.util.*;
import flash.utils.*;
public class TimedUnlockOKButton extends SimpleButton {
public var __setPropDict:Dictionary;
public var __id3_:NumbskullFont;
public function TimedUnlockOKButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.align = "center";
__id3_.align_vert = "top";
__id3_.color = 2574473;
__id3_.id = "None";
__id3_.line_spacing = 18;
__id3_.text = "yes please";
__id3_.tracking = 0;
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 1)) && ((int(__setPropDict[__id3_]) <= 10))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 11)) && ((int(__setPropDict[__id3_]) <= 20))))))){
__setPropDict[__id3_] = currentFrame;
();
};
}
override public function onClick(_arg1:MouseEvent):void{
TimedUnlock.startTimer((Controller.loadedLevelNumber + 1));
MovieClip(parent).gotoAndStop("done");
}
function (){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.align = "center";
__id3_.align_vert = "top";
__id3_.color = 11977954;
__id3_.id = "None";
__id3_.line_spacing = 18;
__id3_.text = "yes please";
__id3_.tracking = 0;
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package com.nitrome.game
Section 117
//TimedUnlockPopup (com.nitrome.game.TimedUnlockPopup)
package com.nitrome.game {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class TimedUnlockPopup extends MovieClip {
public var inner:MovieClip;
public function TimedUnlockPopup(){
addFrameScript(0, frame1, 1, frame2, 11, frame12);
addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
}
public function init(_arg1:Event):void{
var _local2:Date;
var _local3:Date;
_local2 = new Date();
_local3 = new Date();
_local3.time = (_local3.time + (((1000 * 60) * 60) * 24));
TextField(inner.timeAndDate).text = dateAndTimeString(_local3);
}
function frame12(){
stop();
}
private function (_arg1:Number):String{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.length < 2){
_local2 = ("0" + _local2);
};
return (_local2);
}
function frame1(){
visible = false;
stop();
}
private function ordinal(_arg1:Number):String{
_arg1 = (_arg1 % 100);
if (((((_arg1 % 10) == 1)) && (!((_arg1 == 11))))){
return ((_arg1 + "st"));
};
if (((((_arg1 % 10) == 2)) && (!((_arg1 == 12))))){
return ((_arg1 + "nd"));
};
if (((((_arg1 % 10) == 3)) && (!((_arg1 == 13))))){
return ((_arg1 + "rd"));
};
return ((_arg1 + "th"));
}
public function dateAndTimeString(_arg1:Date):String{
var _local2:Array;
var _local3:String;
var _local4:Number;
var _local5:String;
var _local6:String;
_local2 = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
_local3 = ((_arg1.hours)>=12) ? "pm" : "am";
_local4 = (_arg1.hours % 12);
if (_local4 == 0){
_local4 = 12;
};
_local5 = ((((_local4 + ":") + (_arg1.minutes)) + " ") + _local3);
_local6 = ((_local2[_arg1.day] + " ") + ordinal(_arg1.date));
return (((_local5 + " on ") + _local6));
}
function frame2(){
visible = true;
}
}
}//package com.nitrome.game
Section 118
//TimedUnlockStatus (com.nitrome.game.TimedUnlockStatus)
package com.nitrome.game {
import flash.display.*;
import flash.text.*;
import com.nitrome.util.*;
public class TimedUnlockStatus extends Sprite {
public var line1:TextField;
public var line2:TextField;
public var line3:TextField;
public function TimedUnlockStatus(){
visible = false;
if (TimedUnlock.isActive()){
line1.text = (("Level " + TimedUnlock.getLevelWaiting()) + " will be");
line2.text = "unlocked on";
line3.text = dateAndTimeString(TimedUnlock.getUnlockTime());
visible = true;
} else {
if (TimedUnlock.getLevelJustUnlocked()){
line1.text = ("Level " + TimedUnlock.getLevelJustUnlocked());
line2.text = "is now unlocked!";
line3.text = "";
visible = true;
};
};
}
private function (_arg1:Number):String{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.length < 2){
_local2 = ("0" + _local2);
};
return (_local2);
}
public function dateAndTimeString(_arg1:Date):String{
var _local2:Array;
var _local3:String;
var _local4:Number;
var _local5:String;
_local2 = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
_local3 = ((_arg1.hours)>=12) ? "pm" : "am";
_local4 = (_arg1.hours % 12);
if (_local4 == 0){
_local4 = 12;
};
_local5 = (((_local4 + ":") + (_arg1.minutes)) + _local3);
return (((_local2[_arg1.day] + " at ") + _local5));
}
private function ordinal(_arg1:Number):String{
_arg1 = (_arg1 % 100);
if (((((_arg1 % 10) == 1)) && (!((_arg1 == 11))))){
return ((_arg1 + "st"));
};
if (((((_arg1 % 10) == 2)) && (!((_arg1 == 12))))){
return ((_arg1 + "nd"));
};
if (((((_arg1 % 10) == 3)) && (!((_arg1 == 13))))){
return ((_arg1 + "rd"));
};
return ((_arg1 + "th"));
}
}
}//package com.nitrome.game
Section 119
//Transition (com.nitrome.game.Transition)
package com.nitrome.game {
import flash.display.*;
public class Transition extends MovieClip {
private var
:Function;// = null
public function Transition(){
= null;
super();
addFrameScript(0, frame1, 12, frame13);
NitromeGame.transition = this;
stop();
mouseEnabled = false;
mouseChildren = false;
}
function frame1(){
();
}
function frame13(){
();
}
protected function
():void{
if (
!= null){
gotoAndPlay(1);
} else {
stop();
this.visible = false;
};
}
public function doTween(_arg1:Object):void{
var target = _arg1;
play();
if ((target is Function)){
= (target as Function);
} else {
= function (){
NitromeGame.timeline.gotoAndStop(target);
};
};
this.visible = true;
if (NitromeGame.sound_manager){
NitromeGame.sound_manager.playSound("deepthud");
};
}
protected function
():void{
if (
!= null){
();
= null;
};
}
}
}//package com.nitrome.game
Section 120
//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 121
//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 122
//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;// = false
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();
if (((root) && (((((((((root as MovieClip).currentLabel == "game")) || (((root as MovieClip).currentLabel == "congrats")))) || (((root as MovieClip).currentLabel == "help")))) || (((root as MovieClip).currentLabel == "credits")))))){
return;
};
if (!NitromeGame.isAtURL(NitromeGame.NITROME_URL)){
gotoAndStop("off");
return;
};
stop();
= new Array(NUM_LINES);
if (NitromeGame.isAtURL(NitromeGame.NITROME_URL)){
};
_local1 = 0;
while (_local1 < .length) {
[_local1] = (getChildByName(("_score_line_" + (_local1 + 1))) as HighScoreLine);
_local1++;
};
= (getChildByName("_prev_arrow") as ArrowButton);
= (getChildByName("_next_arrow") as ArrowButton);
addEventListener(Event.ADDED_TO_STAGE, init);
}
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);
}
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: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 123
//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
:TextField;
private var :int;
public var _rank_text:TextField;
public var _name_text:TextField;
private var :HighScoreBoard;
public function HighScoreLine(){
visible = false;
= false;
= (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++;
};
.text = _arg3;
} else {
.text = _arg3;
};
alpha = 0;
visible = true;
= (((_arg1 - 1) % .NUM_LINES) * int((1 / FADE_SPEED)));
= 0;
addEventListener(Event.ENTER_FRAME, );
}
}
}//package com.nitrome.highscore
Section 124
//LetterButton (com.nitrome.highscore.LetterButton)
package com.nitrome.highscore {
import flash.events.*;
import com.nitrome.game.*;
public class LetterButton extends SimpleButton {
private var
:TextComponent;
public var _letter:NumbskullFont;
private var :String;
private var :ScoreSubmitPanel;
public function LetterButton(){
= (parent as ScoreSubmitPanel);
= name;
= (getChildByName("_letter") as TextComponent);
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(_arg1:Event):void{
.text = ;
_arg1.target.removeEventListener(Event.ADDED_TO_STAGE, init);
}
override protected function onMouseOut(_arg1:MouseEvent):void{
super.onMouseOut(_arg1);
.color = 11977954;
}
override public function onClick(_arg1:MouseEvent):void{
.addLetter();
}
override protected function onMouseOver(_arg1:MouseEvent):void{
super.onMouseOver(_arg1);
.color = 2574473;
}
}
}//package com.nitrome.highscore
Section 125
//ScoreSubmitPanel (com.nitrome.highscore.ScoreSubmitPanel)
package com.nitrome.highscore {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import com.nitrome.game.*;
import flash.ui.*;
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 A: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;
public var Z:LetterButton;
public var S:LetterButton;
public var N:LetterButton;
public var O:LetterButton;
private var :TextComponent;
public var Q:LetterButton;
public var M:LetterButton;
public var _score_text:NumbskullFont;
private var :MovieClip;
public var B:LetterButton;
public var P:LetterButton;
private var
:TextComponent;
public var _name_text:NumbskullFont;
private var :SubmitButton;
public var _submit_button:SubmitButton;
public var _clear_button:ClearButton;
private var :URLRequest;
private var :URLVariables;
public function ScoreSubmitPanel(){
if (!NitromeGame.isAtURL(NitromeGame.NITROME_URL)){
gotoAndStop("off");
return;
};
stop();
= (getChildByName("_submit_button") as SubmitButton);
= (getChildByName("_name_text") as TextComponent);
= (getChildByName("_score_text") as TextComponent);
addEventListener(Event.ENTER_FRAME, init);
}
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();
NitromeGame.timeline.gotoAndStop("view_scores");
}
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");
NitromeGame.timeline.gotoAndStop("view_scores");
}
private function init(_arg1:Event):void{
.text = ("YOUR SCORE IS " + Score.value);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.target.removeEventListener(Event.ENTER_FRAME, 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 {
NitromeGame.timeline.gotoAndStop("view_scores");
};
}
}
}//package com.nitrome.highscore
Section 126
//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 127
//ActiveObject (com.nitrome.icebreaker.ActiveObject)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import flash.display.*;
public class ActiveObject extends MovieClip {
public var globalPosition:b2Vec2;
public function destroy():void{
deactivate();
if (parent){
parent.removeChild(this);
};
}
public function create():void{
}
public function updatePosition():void{
x = (globalPosition.x * 32);
y = (globalPosition.y * 32);
}
public function activate():void{
}
public function getBoundingBox():b2AABB{
return (null);
}
public function deactivate():void{
}
public function advance():void{
}
public function getPosition():b2Vec2{
return (globalPosition);
}
public function setPosition(_arg1:b2Vec2):void{
globalPosition = _arg1.Copy();
x = (globalPosition.x * 32);
y = (globalPosition.y * 32);
}
}
}//package com.nitrome.icebreaker
Section 128
//Background (com.nitrome.icebreaker.Background)
package com.nitrome.icebreaker {
import flash.display.*;
import flash.events.*;
public class Background extends MovieClip {
public var
:Number;// = 0
public var autoLevel:Number;// = -200
public var cloudsDeltaX:Number;// = 0
public var foreMountains:MovieClip;
public var backMountains:MovieClip;
public var clouds:MovieClip;
public function Background(){
cloudsDeltaX = 0;
= 0;
autoLevel = -200;
super();
addEventListener(Event.ENTER_FRAME, enterFrame, false, 0, true);
updateType();
}
public function enterFrame(_arg1:Event):void{
if (((Controller.root) && ((Controller.root.currentLabel == "game")))){
return;
};
= (
+ 10);
scrollTo(
, autoLevel);
}
public function scrollTo(_arg1:Number, _arg2:Number):void{
var wrap:Function;
var dx = _arg1;
var dy = _arg2;
wrap = function (_arg1:Number, _arg2:Number):Number{
_arg1 = Math.floor(_arg1);
if (_arg1 > 0){
return (((_arg1 % _arg2) - _arg2));
};
return ((_arg1 % _arg2));
};
clouds.x = wrap((cloudsDeltaX - (dx * 0.05)), 573);
backMountains.x = wrap((-(dx) * 0.1), 1100);
foreMountains.x = wrap((-(dx) * 0.2), 1100);
clouds.y = Math.floor((-(dy) * 0.05));
backMountains.y = Math.floor((-(dy) * 0.1));
foreMountains.y = Math.floor((-(dy) * 0.2));
}
public function updateType():void{
var _local1:Number;
_local1 = Controller.backgroundType();
gotoAndStop(_local1);
clouds.gotoAndStop(_local1);
backMountains.gotoAndStop(_local1);
foreMountains.gotoAndStop(_local1);
}
}
}//package com.nitrome.icebreaker
Section 129
//Bird (com.nitrome.icebreaker.Bird)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class Bird extends ActiveObject {
public var solidShape:b2Shape;
public var solidBody:b2Body;
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - 0.5), (globalPosition.y - 0.5));
_local1.upperBound = new b2Vec2((globalPosition.x + 0.5), (globalPosition.y + 0.5));
return (_local1);
}
override public function deactivate():void{
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
override public function advance():void{
globalPosition = solidBody.GetPosition().Copy();
updatePosition();
solidBody.ApplyForce(new b2Vec2(0, -20), solidBody.GetWorldCenter());
if (Math.abs(solidBody.GetLinearVelocity().x) > 0.5){
scaleX = ((solidBody.GetLinearVelocity().x)>=0) ? -1 : 1;
};
}
override public function setPosition(_arg1:b2Vec2):void{
super.setPosition(_arg1);
if (solidBody){
solidBody.SetXForm(_arg1, 0);
};
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2CircleDef;
if (solidBody){
return;
};
_local1 = new b2BodyDef();
if (globalPosition){
_local1.position.Set(globalPosition.x, globalPosition.y);
};
_local1.userData = {activeObject:this, bird:this};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2CircleDef();
_local2.radius = 0.5;
_local2.density = 1;
_local2.friction = 0.8;
solidBody.CreateShape(_local2);
solidBody.SetMassFromShapes();
}
override public function create():void{
Controller.activeLayer.addChild(this);
gotoAndPlay((1 + int((Math.random() * totalFrames))));
}
}
}//package com.nitrome.icebreaker
Section 130
//Block (com.nitrome.icebreaker.Block)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import flash.display.*;
import flash.geom.*;
import com.nitrome.util.*;
import flash.filters.*;
public class Block {
public const EPSILON:Number = 1E-6;
public var :Number;// = 1
public var drawDeltaX:Number;
public var drawDeltaY:Number;
public var
:Number;// = 10
public var
:Number;// = 0
public var texture:BitmapData;
public var :Boolean;// = false
public var rotationalVelocity:Number;
public var position:b2Vec2;
public var :Number;// = 8156823
public var :Number;// = 3551551
public var :Number;
public var sprite:Sprite;
public var
:Boolean;// = false
public var editorLocked:Boolean;// = false
public var velocity:b2Vec2;
public var vertexList:Array;
public var
:Number;// = 0.4
public var originalLine:Array;
public var solidBody:b2Body;
public var bitmapData:BitmapData;
public var :Array;
public var rotation:Number;
public static var rockTexture:BitmapData;
public function Block(){
= 1;
= 8156823;
= 0.4;
= 3551551;
= false;
= 10;
= false;
= 0;
editorLocked = false;
super();
if (!rockTexture){
rockTexture = new RockTexture(0x0100, 0x0100);
};
texture = rockTexture;
solidBody = null;
= [];
vertexList = [];
originalLine = [];
}
public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Array{
return (null);
}
public function advance():void{
var _local1:b2AABB;
var _local2:Boolean;
_local1 = getBoundingBox();
_local2 = (((_local1.lowerBound.y < Controller.level.sea.yPosition)) && ((_local1.upperBound.y > Controller.level.sea.yPosition)));
if (((!((_local2 == ))) && ((Math.abs(solidBody.GetLinearVelocity().y) > 1.5)))){
= _local2;
if (
> 15){
Controller.level.splash(((_local1.lowerBound.x + _local1.upperBound.x) * 16));
= 0;
};
} else {
++;
};
}
public function localToGlobal(_arg1:b2Vec2):b2Vec2{
if (!solidBody){
return (new b2Vec2((_arg1.x * 32), (_arg1.y * 32)));
};
return (solidBody.GetWorldPoint(_arg1));
}
public function globalToLocal(_arg1:b2Vec2):b2Vec2{
var _local2:b2XForm;
if (solidBody){
return (solidBody.GetLocalPoint(_arg1));
};
_local2 = new b2XForm();
_local2.Initialize(position, new b2Mat22(rotation));
return (b2Math.b2MulX(_local2, _arg1));
}
public function getLocalBoundingBox():b2AABB{
var _local1:b2AABB;
var _local2:Number;
var _local3:b2Vec2;
if (vertexList.length < 1){
return (null);
};
_local1 = new b2AABB();
_local2 = 0;
while (_local2 < vertexList.length) {
_local3 = vertexList[_local2];
if (_local2 == 0){
_local1.lowerBound.Set(_local3.x, _local3.y);
_local1.upperBound.Set(_local3.x, _local3.y);
} else {
if (_local3.x < _local1.lowerBound.x){
_local1.lowerBound.x = _local3.x;
};
if (_local3.x > _local1.upperBound.x){
_local1.upperBound.x = _local3.x;
};
if (_local3.y < _local1.lowerBound.y){
_local1.lowerBound.y = _local3.y;
};
if (_local3.y > _local1.upperBound.y){
_local1.upperBound.y = _local3.y;
};
};
_local2++;
};
return (_local1);
}
public function getBoundingBoxCenter():b2Vec2{
var _local1:b2AABB;
_local1 = getBoundingBox();
if (!_local1){
return (null);
};
return (new b2Vec2(((_local1.lowerBound.x + _local1.upperBound.x) / 2), ((_local1.lowerBound.y + _local1.upperBound.y) / 2)));
}
public function prerenderBitmap():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Sprite;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (vertexList.length < 3){
bitmapData = null;
return;
};
_local1 = Infinity;
_local2 = -(Infinity);
_local3 = 0;
while (_local3 < vertexList.length) {
if (vertexList[_local3].x < _local1){
_local1 = vertexList[_local3].x;
};
if (vertexList[_local3].x > _local2){
_local2 = vertexList[_local3].x;
};
_local3++;
};
_local1 = (_local1 * 32);
_local2 = (_local2 * 32);
_local4 = new Sprite();
_local4.graphics.clear();
if (texture){
_local4.graphics.beginBitmapFill(texture);
} else {
_local4.graphics.beginFill(1193046, 0.5);
};
_local4.graphics.moveTo((vertexList[0].x * 32), (vertexList[0].y * 32));
_local3 = 1;
while (_local3 < vertexList.length) {
_local4.graphics.lineTo((vertexList[_local3].x * 32), (vertexList[_local3].y * 32));
_local3++;
};
_local4.graphics.endFill();
_local5 = (
) ?
: 0;
drawDeltaX = (_local4.getBounds(_local4).left - _local5);
drawDeltaY = (_local4.getBounds(_local4).top - _local5);
_local6 = Math.ceil((_local4.width + (_local5 * 2)));
_local7 = Math.ceil((_local4.height + (_local5 * 2)));
if (_local6 < 1){
_local6 = 1;
};
if (_local7 < 1){
_local7 = 1;
};
bitmapData = new BitmapData(_local6, _local7, true, 0);
bitmapData.draw(_local4, new Matrix(1, 0, 0, 1, -(drawDeltaX), -(drawDeltaY)));
if (
> 0){
bitmapData.applyFilter(bitmapData, new Rectangle(0, 0, bitmapData.width, bitmapData.height), new Point(), new GlowFilter( ,
, 30, 30, 3, 1, true, false));
};
bitmapData.applyFilter(bitmapData, new Rectangle(0, 0, bitmapData.width, bitmapData.height), new Point(), new GlowFilter( , 1, 2, 2, 10, 1, true));
if (
){
bitmapData.applyFilter(bitmapData, new Rectangle(0, 0, bitmapData.width, bitmapData.height), new Point(), new GlowFilter( , 1, (
* 2), (
* 2), 1, 1));
};
sprite = new Sprite();
sprite.addChild(new Bitmap(bitmapData, "auto", true));
updateBitmap();
if (
){
Controller.glowyBlockLayer.addChild(sprite);
} else {
Controller.blockLayer.addChild(sprite);
};
}
public function testPoint(_arg1:b2Vec2):Boolean{
return ( (globalToLocal(_arg1)));
}
public function destroyContained(_arg1:Boolean=false, _arg2:Finish=null):void{
var _local3:Number;
var _local4:FrozenCharacter;
var _local5:LinkConstraint;
var _local6:ActiveObject;
_local3 = 0;
while (_local3 < Controller.level.characterList.length) {
_local4 = (Controller.level.characterList[_local3] as FrozenCharacter);
if (!_local4){
} else {
if (_local4.insideBlock != this){
} else {
if (_arg1){
_local4.atFinish = true;
_local4.finish = _arg2;
_local4.gotoAndPlay(("standing" + Controller.charType()));
_local4.parent.setChildIndex(_local4, (_local4.parent.numChildren - 1));
_arg2.charactersOnBoard.push(_local4);
} else {
_local4.destroy();
Global.removeFromList(_local4, Controller.level.characterList);
Controller.level.failed();
};
};
};
_local3++;
};
_local3 = 0;
while (_local3 < Controller.level.constraintList.length) {
_local5 = (Controller.level.constraintList[_local3] as LinkConstraint);
if (!_local5){
} else {
if (((!((_local5.attached1 == this))) && (!((_local5.attached2 == this))))){
} else {
_local5.deactivate();
if (_local5.attached1 == this){
_local5.attached1 = "roaming";
};
if (_local5.attached2 == this){
_local5.attached2 = "roaming";
};
_local5.activate();
};
};
_local3++;
};
_local3 = 0;
while (_local3 < Controller.level.activeObjectList.length) {
_local6 = Controller.level.activeObjectList[_local3];
if ((_local6 is HelpSign)){
if ((_local6 as HelpSign).attachedBlock != this){
} else {
(_local6 as HelpSign).destroy();
};
};
_local3++;
};
}
public function addVertex(_arg1:b2Vec2, _arg2:Boolean=true):void{
vertexList.push(_arg1.Copy());
originalLine.push(_arg2);
}
protected function ():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = 0;
_local2 = 0;
_local3 = 0;
while (_local3 < vertexList.length) {
_local1 = (_local1 + vertexList[_local3].x);
_local2 = (_local2 + vertexList[_local3].y);
_local3++;
};
return (new b2Vec2((_local1 / vertexList.length), (_local2 / vertexList.length)));
}
public function insertVertex(_arg1:Number, _arg2:b2Vec2, _arg3:Boolean=true):void{
vertexList.splice(_arg1, 0, _arg2);
originalLine.splice(_arg1, 0, _arg3);
}
public function unsolidify():void{
();
if (solidBody){
position = solidBody.GetPosition();
rotation = solidBody.GetAngle();
velocity = solidBody.GetLinearVelocity();
rotationalVelocity = solidBody.GetAngularVelocity();
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
= [];
}
protected function (_arg1:b2Vec2):Boolean{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local2 = false;
_local3 = 0;
while (_local3 < vertexList.length) {
_local4 = (vertexList[_local3].x - _arg1.x);
_local5 = (vertexList[_local3].y - _arg1.y);
_local6 = (vertexList[((_local3 + 1) % vertexList.length)].x - _arg1.x);
_local7 = (vertexList[((_local3 + 1) % vertexList.length)].y - _arg1.y);
if ((((_local4 <= 0)) && ((_local6 <= 0)))){
} else {
if ((((_local4 > 0)) && ((_local6 > 0)))){
} else {
if ((((_local5 > 0)) && ((_local7 > 0)))){
} else {
_local8 = (-(_local4) / (_local6 - _local4));
_local9 = (_local5 + ((_local7 - _local5) * _local8));
if (_local9 > 0){
} else {
_local2 = !(_local2);
};
};
};
};
_local3++;
};
return (_local2);
}
public function
():void{
if (((sprite) && (sprite.parent))){
sprite.parent.removeChild(sprite);
};
if (bitmapData){
bitmapData.dispose();
};
bitmapData = null;
sprite = null;
}
protected function createBody():void{
var _local1:b2BodyDef;
_local1 = new b2BodyDef();
_local1.userData = {block:this};
if ((this is BouncyBlock)){
_local1.isBullet = true;
};
solidBody = Controller.level.world.CreateBody(_local1);
}
public function removeVertex(_arg1:Number):void{
vertexList.splice(_arg1, 1);
originalLine.splice(_arg1, 1);
}
public function bodyIsTouching(_arg1:b2Body):Boolean{
return (Level.bodyIsTouchingBody(_arg1, solidBody));
}
public function updateBitmap():void{
var _local1:Matrix;
if (((sprite) && (solidBody))){
_local1 = new Matrix();
_local1.translate(drawDeltaX, drawDeltaY);
_local1.rotate(solidBody.GetAngle());
_local1.translate((solidBody.GetPosition().x * 32), (solidBody.GetPosition().y * 32));
sprite.transform.matrix = _local1;
};
}
public function deactivateContained():void{
var _local1:Number;
var _local2:Constraint;
var _local3:ActiveObject;
_local1 = 0;
while (_local1 < Controller.level.constraintList.length) {
_local2 = Controller.level.constraintList[_local1];
if ((_local2 is PinConstraint)){
if ((_local2 as PinConstraint).attachedBlock == this){
_local2.deactivate();
};
} else {
if ((_local2 is LinkConstraint)){
if (((((_local2 as LinkConstraint).attached1 == this)) || (((_local2 as LinkConstraint).attached2 == this)))){
_local2.deactivate();
};
} else {
if ((_local2 is TurningPinsConstraint)){
if ((_local2 as TurningPinsConstraint).attachedBlock == this){
_local2.deactivate();
};
};
};
};
_local1++;
};
_local1 = 0;
while (_local1 < Controller.level.activeObjectList.length) {
_local3 = Controller.level.activeObjectList[_local1];
if ((_local2 is HelpSign)){
if ((_local2 as HelpSign).attachedBlock == this){
_local2.deactivate();
};
};
_local1++;
};
}
public function localToPixel(_arg1:b2Vec2):b2Vec2{
var _local2:b2Vec2;
if (!solidBody){
return (new b2Vec2((_arg1.x * 32), (_arg1.y * 32)));
};
_local2 = solidBody.GetWorldPoint(new b2Vec2(_arg1.x, _arg1.y));
_local2.x = (_local2.x * 32);
_local2.y = (_local2.y * 32);
return (_local2);
}
protected function makePoly(_arg1:Array):b2PolygonShape{
var _local2:b2PolygonDef;
_local2 = new b2PolygonDef();
_local2.vertexCount = _arg1.length;
_local2.vertices = _arg1.slice();
_local2.density = 1;
_local2.restitution = 0.2;
return ((solidBody.CreateShape(_local2) as b2PolygonShape));
}
public function getBoundingBox():b2AABB{
var _local1:b2AABB;
var _local2:Number;
var _local3:b2Vec2;
if (vertexList.length < 1){
return (null);
};
_local1 = new b2AABB();
_local2 = 0;
while (_local2 < vertexList.length) {
_local3 = localToGlobal(vertexList[_local2]);
if (_local2 == 0){
_local1.lowerBound.Set(_local3.x, _local3.y);
_local1.upperBound.Set(_local3.x, _local3.y);
} else {
if (_local3.x < _local1.lowerBound.x){
_local1.lowerBound.x = _local3.x;
};
if (_local3.x > _local1.upperBound.x){
_local1.upperBound.x = _local3.x;
};
if (_local3.y < _local1.lowerBound.y){
_local1.lowerBound.y = _local3.y;
};
if (_local3.y > _local1.upperBound.y){
_local1.upperBound.y = _local3.y;
};
};
_local2++;
};
return (_local1);
}
public function getMass():Number{
return (solidBody.GetMass());
}
public function
(_arg1:b2Vec2):b2Vec2{
if (!solidBody){
return (new b2Vec2((_arg1.x / 32), (_arg1.y / 32)));
};
return (solidBody.GetLocalPoint(new b2Vec2((_arg1.x / 32), (_arg1.y / 32))));
}
public function solidify():void{
var _local1:Array;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:Boolean;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
createBody();
= [];
_local1 = vertexList.slice();
while (_local1.length > 3) {
_local2 = 0;
_local3 = -1;
_local4 = 0;
while (_local4 < _local1.length) {
_local5 = _local1[_local4];
_local6 = _local1[((_local4 + 1) % _local1.length)];
_local7 = _local1[((_local4 + 2) % _local1.length)];
_local8 = false;
_local9 = 0;
while (_local9 < _local1.length) {
if ((((((_local1[_local9] == _local5)) || ((_local1[_local9] == _local6)))) || ((_local1[_local9] == _local7)))){
} else {
if (Geometry.pointInsideTriangle(_local5, _local6, _local7, _local1[_local9])){
_local8 = true;
break;
};
};
_local9++;
};
if (_local8){
} else {
_local10 = Math.atan2((_local6.y - _local5.y), (_local6.x - _local5.x));
_local11 = Math.atan2((_local7.y - _local6.y), (_local7.x - _local6.x));
_local12 = (_local11 - _local10);
_local12 = (_local12 % (Math.PI * 2));
if (_local12 < -(Math.PI)){
_local12 = (_local12 + (Math.PI * 2));
};
if (_local12 > Math.PI){
_local12 = (_local12 - (Math.PI * 2));
};
if (_local12 > _local2){
_local2 = _local12;
_local3 = _local4;
};
};
_local4++;
};
if (_local3 == -1){
break;
};
_local5 = _local1[_local3];
_local6 = _local1[((_local3 + 1) % _local1.length)];
_local7 = _local1[((_local3 + 2) % _local1.length)];
.push(makePoly([_local5, _local6, _local7]));
_local1.splice(((_local3 + 1) % _local1.length), 1);
};
.push(makePoly(_local1));
solidBody.SetMassFromShapes();
if (position){
solidBody.SetXForm(position, rotation);
};
if (velocity){
solidBody.SetLinearVelocity(velocity);
solidBody.SetAngularVelocity(rotationalVelocity);
};
prerenderBitmap();
}
public function testPointLocal(_arg1:b2Vec2):Boolean{
return ( (_arg1));
}
}
}//package com.nitrome.icebreaker
Section 131
//Bomb (com.nitrome.icebreaker.Bomb)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import com.nitrome.util.*;
public class Bomb extends ActiveObject {
public const BOMB_BLAST_RADIUS:Number = 2;
public const BOMB_VERTEX_ANGLE:Number = 0.4;
public const SLICE_RADIUS:Number = 0.42;
public var
:Boolean;// = false
public var exploded:Boolean;// = false
public var solidShape:b2Shape;
public var solidBody:b2Body;
public function Bomb(){
= false;
exploded = false;
super();
addFrameScript(4, frame5, 28, );
}
public function deleteBody(_arg1:Boolean=false):void{
if (solidBody){
Controller.level.removeLinksTo(this, solidBody, false, false, _arg1, _arg1);
};
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
public function
():void{
var _local1:b2AABB;
var _local2:Number;
var _local3:Block;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:FrozenCharacter;
var _local8:PinConstraint;
var _local9:Character;
var _local10:Number;
var _local11:Number;
deleteBody(true);
exploded = true;
rotation = 0;
gotoAndPlay("explode");
Controller.level.screenShakeIntensity = 8;
if (parent){
parent.setChildIndex(this, (parent.numChildren - 1));
};
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - BOMB_BLAST_RADIUS), (globalPosition.y - BOMB_BLAST_RADIUS));
_local1.upperBound = new b2Vec2((globalPosition.x + BOMB_BLAST_RADIUS), (globalPosition.y + BOMB_BLAST_RADIUS));
Controller.level.deactivateConstraints();
_local2 = (Controller.level.blockList.length - 1);
while (_local2 >= 0) {
_local3 = Controller.level.blockList[_local2];
if (b2Collision.b2TestOverlap(_local3.getBoundingBox(), _local1)){
_local3.deactivateContained();
_local4 =
(_local3);
if (_local4 != null){
Controller.level.blockList.splice(_local2, 1);
Controller.level.blockList = Controller.level.blockList.concat(_local4);
_local5 = 0;
while (_local5 < Controller.level.characterList.length) {
_local7 = (Controller.level.characterList[_local5] as FrozenCharacter);
if (!_local7){
} else {
if (_local7.insideBlock == _local3){
_local7.setPosition(_local7.getPosition());
};
};
_local5++;
};
_local6 = 0;
while (_local6 < Controller.level.constraintList.length) {
_local8 = (Controller.level.constraintList[_local6] as PinConstraint);
if (!_local8){
} else {
if (_local8.attachedBlock == _local3){
_local8.reattachToAnyOf(_local4.concat(null));
};
};
_local6++;
};
};
};
_local2--;
};
Controller.level.activateAll();
_local2 = 0;
while (_local2 < Controller.level.characterList.length) {
_local9 = Controller.level.characterList[_local2];
_local10 = Geometry.squareDistancePointToPoint(_local9.getPosition(), globalPosition);
_local11 = (BOMB_BLAST_RADIUS + 0.4);
if (_local10 < (_local11 * _local11)){
_local9.killedNormal = true;
};
_local2++;
};
_local2 = (Controller.level.constraintList.length - 1);
while (_local2 >= 0) {
_local8 = (Controller.level.constraintList[_local2] as PinConstraint);
if (!_local8){
} else {
_local10 = Geometry.squareDistancePointToPoint(_local8.globalPosition, globalPosition);
if (_local10 < (BOMB_BLAST_RADIUS * BOMB_BLAST_RADIUS)){
_local8.deactivate();
_local8.destroy();
Global.removeFromList(_local8, Controller.level.constraintList);
};
};
_local2--;
};
NitromeGame.sound_manager.playSound("bombExplode");
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - 0.5), (globalPosition.y - 0.5));
_local1.upperBound = new b2Vec2((globalPosition.x + 0.5), (globalPosition.y + 0.5));
return (_local1);
}
public function contactMade(_arg1:b2ContactPoint, _arg2:b2Shape):void{
var _local3:Number;
_local3 = b2Math.b2Dot(_arg1.velocity, _arg1.normal);
_local3 = Math.abs(_local3);
if ((((_local3 >= 6)) && (!(exploded)))){
= true;
};
}
public function
(_arg1:Block):Array{
var _local2:Number;
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:Number;
var _local8:Boolean;
var _local9:Array;
var _local10:Array;
var _local11:Number;
var _local12:Number;
var _local13:b2Vec2;
var _local14:b2Vec2;
var _local15:b2Vec2;
var _local16:Array;
var _local17:b2Vec2;
var _local18:ShapeCircleIntersection;
var _local19:b2Vec2;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:PotentialNewBlock;
var _local25:*;
var _local26:*;
var _local27:*;
var _local28:*;
var _local29:*;
var _local30:*;
var _local31:*;
var _local32:*;
var _local33:*;
var _local34:*;
var _local35:Block;
var _local36:Number;
var _local37:b2Vec2;
_local3 = [];
_local4 = [];
_local2 = 0;
while (_local2 < _arg1.vertexList.length) {
_local3.push(_arg1.localToGlobal(_arg1.vertexList[_local2]));
_local11 = (_local3[_local2].x - globalPosition.x);
_local12 = (_local3[_local2].y - globalPosition.y);
_local4.push((((_local11 * _local11) + (_local12 * _local12)) > (BOMB_BLAST_RADIUS * BOMB_BLAST_RADIUS)));
_local2++;
};
_local5 = [];
_local2 = 0;
while (_local2 < _local3.length) {
_local13 = _local3[_local2];
_local14 = _local3[((_local2 + 1) % _local3.length)];
if ((((_local13.x < (globalPosition.x - BOMB_BLAST_RADIUS))) && ((_local14.x < (globalPosition.x - BOMB_BLAST_RADIUS))))){
} else {
if ((((_local13.x > (globalPosition.x + BOMB_BLAST_RADIUS))) && ((_local14.x > (globalPosition.x + BOMB_BLAST_RADIUS))))){
} else {
if ((((_local13.y < (globalPosition.y - BOMB_BLAST_RADIUS))) && ((_local14.y < (globalPosition.y - BOMB_BLAST_RADIUS))))){
} else {
if ((((_local13.y > (globalPosition.y + BOMB_BLAST_RADIUS))) && ((_local14.y > (globalPosition.y + BOMB_BLAST_RADIUS))))){
} else {
_local15 = new b2Vec2((_local14.x - _local13.x), (_local14.y - _local13.y));
_local16 = Geometry.segmentIntersectsCircle(globalPosition, BOMB_BLAST_RADIUS, _local13, _local14);
if (!_local16){
} else {
while (_local16.length > 0) {
_local17 = _local16.shift();
_local18 = new ShapeCircleIntersection();
_local18.location = _local17;
_local18.vertex = _local2;
_local18.angleRads = Math.atan2((_local17.y - globalPosition.y), (_local17.x - globalPosition.x));
_local19 = new b2Vec2((_local17.x - globalPosition.x), (_local17.y - globalPosition.y));
_local18.direction = (b2Math.b2Dot(_local19, _local15) > 0);
_local5.push(_local18);
};
};
};
};
};
};
_local2++;
};
if (_local5.length == 0){
return (null);
};
_local6 = _local5.slice();
_local7 = 0;
while (_local6.length > 0) {
_local20 = _local6[0].angleRads;
_local21 = 0;
_local2 = 1;
while (_local2 < _local6.length) {
if (_local6[_local2].angleRads < _local20){
_local20 = _local6[_local2].angleRads;
_local21 = _local2;
};
_local2++;
};
_local6[_local21].angleIndex = _local7;
_local6.splice(_local21, 1);
_local7++;
};
_local8 = false;
_local9 = [];
while (!(_local8)) {
_local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2]){
_local22 = _local2;
break;
};
_local2++;
};
_local23 = _local22;
_local24 = new PotentialNewBlock();
_local24.path = [];
do {
_local25 = -1;
_local26 = -(Infinity);
_local2 = 0;
while (_local2 < _local5.length) {
if ((((_local5[_local2].vertex == _local23)) && (!(_local5[_local2].direction)))){
if (_local5[_local2].angleRads > _local26){
_local25 = _local2;
_local26 = _local5[_local2].angleRads;
};
};
_local2++;
};
if (_local25 == -1){
_local4[_local23] = false;
++_local23;
if (_local23 >= _arg1.vertexList.length){
_local23 = 0;
};
_local24.path.push(_arg1.vertexList[_local23]);
} else {
_local27 = _local5[_local25];
_local28 = (_local27.angleIndex - 1);
if (_local28 < 0){
_local28 = (_local5.length - 1);
};
_local2 = 0;
while (_local2 < _local5.length) {
if (_local5[_local2].angleIndex == _local28){
_local29 = _local2;
break;
};
_local2++;
};
_local30 = _local5[_local29];
_local4[_local23] = false;
_local23 = ((_local30.vertex + 1) % _local3.length);
_local24.path.push(_arg1.globalToLocal(_local27.location));
_local31 = _local27.angleRads;
_local32 = _local30.angleRads;
if (_local31 < _local32){
_local32 = (_local32 - (2 * Math.PI));
};
_local33 = (_local31 - BOMB_VERTEX_ANGLE);
while (_local33 >= _local32) {
_local34 = new b2Vec2();
_local34.x = (globalPosition.x + (Trig.getCosRadians(_local33) * BOMB_BLAST_RADIUS));
_local34.y = (globalPosition.y + (Trig.getSinRadians(_local33) * BOMB_BLAST_RADIUS));
_local24.path.push(_arg1.globalToLocal(_local34));
_local33 = (_local33 - BOMB_VERTEX_ANGLE);
};
_local24.path.push(_arg1.globalToLocal(_local30.location));
_local24.path.push(_arg1.vertexList[_local23]);
};
} while (_local23 != _local22);
_local9.push(_local24);
_local8 = true;
_local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2]){
_local8 = false;
};
_local2++;
};
};
_local10 = [];
_local2 = 0;
while (_local2 < _local9.length) {
if (_local24.path.length < 3){
} else {
_local35 = new (_arg1["constructor"]);
_local36 = 0;
while (_local36 < _local9[_local2].path.length) {
_local35.addVertex(_local9[_local2].path[_local36], true);
_local36++;
};
_local35.position = _arg1.solidBody.GetPosition();
_local35.rotation = _arg1.solidBody.GetAngle();
_local37 = _local9[_local2].approximateCentroid();
_local35.velocity = _arg1.solidBody.GetLinearVelocityFromLocalPoint(_local37);
_local35.rotationalVelocity = _arg1.solidBody.GetAngularVelocity();
_local35.solidify();
if (_local35.getMass() < 0.1){
_local35.unsolidify();
} else {
_local10.push(_local35);
};
};
_local2++;
};
_arg1.unsolidify();
return (_local10);
}
function frame5(){
gotoAndPlay("normal");
}
override public function deactivate():void{
super.deactivate();
deleteBody();
}
function (){
stop();
if (parent){
parent.removeChild(this);
};
}
override public function advance():void{
if (solidBody){
globalPosition = solidBody.GetPosition().Copy();
updatePosition();
rotation = ((solidBody.GetAngle() * 180) / Math.PI);
solidBody.ApplyForce(new b2Vec2(0, 10), solidBody.GetWorldCenter());
};
}
public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Boolean{
var _local3:Number;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = (SLICE_RADIUS * SLICE_RADIUS);
_local4 = Geometry.nearestPointOnLine(_arg1, _arg2, globalPosition);
if (Geometry.squareDistancePointToPoint(_local4, globalPosition) > _local3){
return (false);
};
if (Geometry.squareDistancePointToPoint(_arg1, globalPosition) <= _local3){
return (false);
};
if (Geometry.squareDistancePointToPoint(_arg2, globalPosition) <= _local3){
return (false);
};
_local5 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local6 = b2Math.b2Dot(_local5, _arg1);
_local7 = b2Math.b2Dot(_local5, _arg2);
_local8 = b2Math.b2Dot(_local5, _local4);
if (_local8 < _local6){
return (false);
};
if (_local8 > _local7){
return (false);
};
();
return (true);
}
override public function setPosition(_arg1:b2Vec2):void{
super.setPosition(_arg1);
if (solidBody){
solidBody.SetXForm(_arg1, 0);
};
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2CircleDef;
if (solidBody){
return;
};
if (exploded){
return;
};
_local1 = new b2BodyDef();
if (globalPosition){
_local1.position.Set(globalPosition.x, globalPosition.y);
};
_local1.userData = {activeObject:this, bomb:this, contactMade:contactMade};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2CircleDef();
_local2.radius = 0.5;
_local2.density = 1;
_local2.friction = 0.8;
_local2.restitution = 0.5;
solidBody.CreateShape(_local2);
solidBody.SetMassFromShapes();
}
override public function create():void{
Controller.activeLayer.addChild(this);
gotoAndPlay("normal");
exploded = false;
}
}
}//package com.nitrome.icebreaker
import Box2D.Common.Math.*;
class ShapeCircleIntersection {
public var vertex:Number;
public var direction:Boolean;
public var angleRads:Number;
public var location:b2Vec2;
public var angleIndex:Number;
private function ShapeCircleIntersection(){
}
}
class PotentialNewBlock {
public var path:Array;
private function PotentialNewBlock(){
}
public function approximateCentroid():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
while (_local4 < path.length) {
_local5 = path[_local4].x;
_local6 = path[_local4].y;
_local7 = path[((_local4 + 1) % path.length)].x;
_local8 = path[((_local4 + 1) % path.length)].y;
_local9 = ((_local5 * _local8) - (_local7 * _local6));
_local1 = (_local1 + _local9);
_local2 = (_local2 + ((_local5 + _local7) * _local9));
_local3 = (_local3 + ((_local6 + _local8) * _local9));
_local4++;
};
_local1 = (_local1 * 0.5);
_local1 = Math.abs(_local1);
_local2 = (_local2 / (6 * _local1));
_local3 = (_local3 / (6 * _local1));
return (new b2Vec2(_local2, _local3));
}
}
Section 132
//BouncyBlock (com.nitrome.icebreaker.BouncyBlock)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import flash.display.*;
public class BouncyBlock extends Block {
public static var bouncyBlockTexture:BitmapData;
public function BouncyBlock(){
if (!bouncyBlockTexture){
bouncyBlockTexture = new BouncyBlockTexture(125, 125);
};
texture = bouncyBlockTexture;
= 2439492;
= 2439492;
}
override protected function createBody():void{
var _local1:b2BodyDef;
_local1 = new b2BodyDef();
_local1.userData = {block:this, bouncyBlock:this, contactMade:contactMade};
solidBody = Controller.level.world.CreateBody(_local1);
}
public function contactMade(_arg1:b2ContactPoint, _arg2:b2Shape):void{
var _local3:b2Body;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:Number;
if (_arg2.GetBody().IsStatic()){
return;
};
_local3 = _arg2.GetBody();
if (((_local3.GetUserData()) && (_local3.GetUserData().bouncyBlock))){
return;
};
_local4 = _arg1.normal;
if (_arg2 == _arg1.shape1){
_local4 = _local4.Negative();
} else {
_local4 = _local4.Copy();
};
_local5 = b2Math.b2CrossVF(_local4, 1);
_local6 = _local5.Copy();
_local6.Multiply(b2Math.b2Dot(_local5, _local3.GetLinearVelocityFromWorldPoint(_arg1.position)));
_local4.Normalize();
_local4.Multiply((200 * _local3.GetMass()));
_local3.SetLinearVelocity(_local6);
_local3.SetAngularVelocity(0);
_local3.ApplyForce(_local4, _arg1.position);
_local7 = _local3.GetLinearVelocityFromWorldPoint(_arg1.position).LengthSquared();
if ((((Controller.frameNumber > 5)) && ((_local7 > (1 * 1))))){
NitromeGame.sound_manager.playSound("bouncyImpact");
};
}
}
}//package com.nitrome.icebreaker
Section 133
//BuoyantBlock (com.nitrome.icebreaker.BuoyantBlock)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import flash.display.*;
public class BuoyantBlock extends IceBlock {
public static var buoyantBlockTexture:BitmapData;
public function BuoyantBlock(){
if (!buoyantBlockTexture){
buoyantBlockTexture = new BuoyantBlockTexture(125, 125);
};
texture = buoyantBlockTexture;
= 9349601;
}
override public function advance():void{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Number;
var _local6:Number;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:Number;
var _local11:Number;
var _local12:b2Shape;
var _local13:b2Vec2;
var _local14:b2Vec2;
var _local15:b2Vec2;
var _local16:Number;
var _local17:Number;
super.advance();
if (solidBody.IsSleeping()){
return;
};
_local1 = new b2Vec2(0, -1);
_local2 = -(Controller.level.sea.yPosition);
_local3 = 20;
_local4 = new b2Vec2(0, 0);
_local5 = 2;
_local6 = 1;
_local7 = new b2Vec2(0, 1);
_local8 = new b2Vec2();
_local9 = new b2Vec2();
_local10 = 0;
_local11 = 0;
_local12 = solidBody.GetShapeList();
while (_local12) {
_local15 = new b2Vec2();
_local16 = ComputeSubmergedArea((_local12 as b2PolygonShape), _local1, _local2, solidBody.GetXForm(), _local15);
_local10 = (_local10 + _local16);
_local8.x = (_local8.x + (_local16 * _local15.x));
_local8.y = (_local8.y + (_local16 * _local15.y));
_local17 = 1;
_local11 = (_local11 + (_local16 * _local17));
_local9.x = (_local9.x + ((_local16 * _local15.x) * _local17));
_local9.y = (_local9.y + ((_local16 * _local15.y) * _local17));
_local12 = _local12.GetNext();
};
_local8.x = (_local8.x / _local10);
_local8.y = (_local8.y / _local10);
_local9.x = (_local9.x / _local11);
_local9.y = (_local9.y / _local11);
if (_local10 < Number.MIN_VALUE){
return;
};
_local13 = _local7.Negative();
_local13.Multiply((_local3 * _local10));
solidBody.ApplyForce(_local13, _local9);
_local14 = solidBody.GetLinearVelocityFromWorldPoint(_local8);
_local14.Subtract(_local4);
_local14.Multiply((-(_local5) * _local10));
solidBody.ApplyForce(_local14, _local8);
solidBody.ApplyTorque(((((-(solidBody.GetInertia()) / solidBody.GetMass()) * _local10) * solidBody.GetAngularVelocity()) * _local6));
}
override public function prerenderBitmap():void{
super.prerenderBitmap();
sprite.alpha = 0.6;
}
public static function ComputeSubmergedArea(_arg1:b2PolygonShape, _arg2:b2Vec2, _arg3:Number, _arg4:b2XForm, _arg5:b2Vec2):Number{
var _local6:b2Vec2;
var _local7:Number;
var _local8:Array;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:b2Vec2;
var _local13:Boolean;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:Number;
var _local18:Number;
var _local19:b2Vec2;
var _local20:b2Vec2;
var _local21:Number;
var _local22:b2Vec2;
var _local23:b2Vec2;
var _local24:Number;
var _local25:Boolean;
var _local26:b2MassData;
var _local27:Number;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local32:Number;
_local6 = b2Math.b2MulTMV(_arg4.R, _arg2);
_local7 = (_arg3 - b2Math.b2Dot(_arg2, _arg4.position));
_local8 = [];
_local9 = 0;
_local10 = -1;
_local11 = -1;
_local12 = null;
_local13 = false;
_local14 = 0;
while (_local14 < _arg1.) {
_local12 = _arg1.
[_local14];
_local8[_local14] = (((_local6.x * _local12.x) + (_local6.y * _local12.y)) - _local7);
_local25 = (_local8[_local14] < -(Number.MIN_VALUE));
if (_local14 > 0){
if (_local25){
if (!_local13){
_local10 = (_local14 - 1);
_local9++;
};
} else {
if (_local13){
_local11 = (_local14 - 1);
_local9++;
};
};
};
_local13 = _local25;
_local14++;
};
switch (_local9){
case 0:
if (_local13){
_local26 = new b2MassData();
_arg1.ComputeMass(_local26);
_arg5.SetV(b2Math.b2MulX(_arg4, _local26.center));
return ((_local26.mass / _arg1.m_density));
};
return (0);
case 1:
if (_local10 == -1){
_local10 = (_arg1. - 1);
} else {
_local11 = (_arg1. - 1);
};
break;
};
_local15 = ((_local10 + 1) % _arg1.);
_local16 = ((_local11 + 1) % _arg1.);
_local17 = ((0 - _local8[_local10]) / (_local8[_local15] - _local8[_local10]));
_local18 = ((0 - _local8[_local11]) / (_local8[_local16] - _local8[_local11]));
_local19 = new b2Vec2(((_arg1.
[_local10].x * (1 - _local17)) + (_arg1.
[_local15].x * _local17)), ((_arg1.
[_local10].y * (1 - _local17)) + (_arg1.
[_local15].y * _local17)));
_local20 = new b2Vec2(((_arg1.
[_local11].x * (1 - _local18)) + (_arg1.
[_local16].x * _local18)), ((_arg1.
[_local11].y * (1 - _local18)) + (_arg1.
[_local16].y * _local18)));
_local21 = 0;
_arg5.Set(0, 0);
_local22 = _arg1.
[_local15];
_local24 = (1 / 3);
_local14 = _local15;
while (_local14 != _local16) {
_local14 = ((_local14 + 1) % _arg1.);
if (_local14 == _local16){
_local23 = _local20;
} else {
_local23 = _arg1.
[_local14];
};
_local27 = (_local22.x - _local19.x);
_local28 = (_local22.y - _local19.y);
_local29 = (_local23.x - _local19.x);
_local30 = (_local23.y - _local19.y);
_local31 = ((_local27 * _local30) - (_local28 * _local29));
_local32 = (0.5 * _local31);
_local21 = (_local21 + _local32);
_arg5.x = (_arg5.x + ((_local32 * _local24) * ((_local19.x + _local22.x) + _local23.x)));
_arg5.y = (_arg5.y + ((_local32 * _local24) * ((_local19.y + _local22.y) + _local23.y)));
_local22 = _local23;
};
_arg5.x = (_arg5.x / _local21);
_arg5.y = (_arg5.y / _local21);
_arg5.SetV(b2Math.b2MulX(_arg4, _arg5));
return (_local21);
}
}
}//package com.nitrome.icebreaker
Section 134
//CameraStartIndicator (com.nitrome.icebreaker.CameraStartIndicator)
package com.nitrome.icebreaker {
import flash.display.*;
public dynamic class CameraStartIndicator extends MovieClip {
}
}//package com.nitrome.icebreaker
Section 135
//Captain (com.nitrome.icebreaker.Captain)
package com.nitrome.icebreaker {
import flash.display.*;
public class Captain extends MovieClip {
public function Captain(){
addFrameScript(18, frame19, 27, , 40, frame41, 59, frame60, 78, frame79, 87, , 100, , 119, , 138, , 147, , 160,
, 179,
, 198, , 207, , 220, , 239, , 258, , 267, , 280, , 299, );
}
function frame79(){
gotoAndPlay("standing2");
}
function (){
gotoAndPlay("standing5");
}
function (){
gotoAndPlay("walking2");
}
function
(){
gotoAndPlay("standing3");
}
public function at(_arg1:String):Boolean{
return ((currentLabel == (_arg1 + Controller.charType())));
}
function (){
gotoAndPlay("walking4");
}
function
(){
gotoAndPlay("victory3");
}
function (){
gotoAndPlay("standing4");
}
function frame19(){
gotoAndPlay("standing1");
}
function (){
gotoAndPlay("standing4");
}
function (){
gotoAndPlay("standing2");
}
function (){
gotoAndPlay("walking1");
}
function (){
gotoAndPlay("victory4");
}
function (){
gotoAndPlay("victory2");
}
function frame41(){
gotoAndPlay("standing1");
}
function (){
gotoAndPlay("standing5");
}
function (){
gotoAndPlay("standing3");
}
function (){
gotoAndPlay("victory5");
}
function (){
gotoAndPlay("walking3");
}
function frame60(){
gotoAndPlay("victory1");
}
function (){
gotoAndPlay("walking5");
}
}
}//package com.nitrome.icebreaker
Section 136
//Character (com.nitrome.icebreaker.Character)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import flash.display.*;
import com.nitrome.util.*;
public class Character extends MovieClip {
public var :Number;// = 0
public var velocityY:Number;// = -10
public var finishIdealX:Number;
public var :Boolean;// = false
public var :Number;// = -9
public var :Boolean;// = true
public var
:Boolean;// = false
public var finish:Finish;// = null
public var atFinish:Boolean;// = false
public var
:Boolean;// = true
public var :Number;// = 0
public var completedTime:Number;// = 0
public var killedNormal:Boolean;// = false
public static const WALK_MAXSPEED:Number = 4;
public static const WALK_ACCEL:Number = 0.2;
public function Character(){
atFinish = false;
finish = null;
= -9;
= true;
= 0;
= false;
completedTime = 0;
= 0;
= false;
= true;
killedNormal = false;
velocityY = -10;
super();
}
public function destroy():void{
if (parent){
parent.removeChild(this);
};
}
public function create():void{
Controller.characterLayer.addChild(this);
}
public function victory():void{
if (!
){
gotoAndPlay(((("victory" + Controller.charType())) + int((Math.random() * 18))));
};
= true;
}
public function deathNormal():void{
rotation = 0;
gotoAndPlay(("normalDeath" + Controller.charType()));
NitromeGame.sound_manager.playSound("death");
}
public function advance():void{
var _local1:b2Vec2;
var _local2:Boolean;
var _local3:Boolean;
_local1 = getPosition();
_local2 = (_local1.y < Controller.level.sea.yPosition);
if (
!= _local2){
= _local2;
Controller.level.splash((_local1.x * 32));
};
_local3 = false;
if (_local1.x < ((Controller.level.leftEdge - 100) / 32)){
_local3 = true;
};
if (_local1.x > ((Controller.level.rightEdge + 100) / 32)){
_local3 = true;
};
if (_local1.y < ((Controller.level.topEdge - 100) / 32)){
_local3 = true;
};
if (_local1.y > (Controller.level.sea.yPosition + (100 / 32))){
_local3 = true;
};
if (_local3){
++;
} else {
= 0;
};
if (killedNormal){
if (y < (((Controller.level.sea.yPosition * 32) + Level.SEA_MAX_HEIGHT) + 100)){
if (currentLabel != ("normalDeath" + Controller.charType())){
deathNormal();
};
velocityY = (velocityY + 1);
y = (y + velocityY);
rotation = (rotation + 4);
} else {
destroy();
Global.removeFromList(this, Controller.level.characterList);
Controller.level.failed();
};
return;
};
if (!atFinish){
completedTime = 0;
return;
};
if (!){
NitromeGame.sound_manager.playSound("vikingAtEnd");
= true;
};
completedTime++;
rotation = (rotation * 0.5);
if (){
++;
y = (y + );
if (y > (((finish.getPosition().y * 32) - 32) - 12)){
y = (((finish.getPosition().y * 32) - 32) - 12);
= false;
};
} else {
if (x != finishIdealX){
= ( + Global.deceleratingSweep(x, finishIdealX, , WALK_ACCEL, WALK_ACCEL));
if (x < finishIdealX){
x = (x + );
if (x >= finishIdealX){
x = finishIdealX;
= 0;
if (!
){
gotoAndPlay(("standing" + Controller.charType()));
};
};
} else {
x = (x + );
if (x <= finishIdealX){
x = finishIdealX;
= 0;
if (!
){
gotoAndPlay(("standing" + Controller.charType()));
};
};
};
if ( != 0){
scaleX = (()>0) ? 1 : -1;
if ((((currentLabel == ("standing" + Controller.charType()))) && (!(
)))){
gotoAndPlay(("walking" + Controller.charType()));
};
};
};
};
}
public function getPosition():b2Vec2{
return (null);
}
public function isDead():Boolean{
return (( > 30));
}
public function setPosition(_arg1:b2Vec2):void{
}
public function (_arg1:String):Number{
var _local2:Number;
_local2 = 0;
while (_local2 < currentLabels.length) {
if (currentLabels[_local2].name == _arg1){
return (currentLabels[_local2].frame);
};
_local2++;
};
return (0);
}
public function isSafe():Boolean{
return ((completedTime > 30));
}
}
}//package com.nitrome.icebreaker
Section 137
//Constraint (com.nitrome.icebreaker.Constraint)
package com.nitrome.icebreaker {
import flash.display.*;
public class Constraint extends MovieClip {
public function destroy():void{
deactivate();
if (parent){
parent.removeChild(this);
};
}
public function create():void{
}
public function activate():void{
}
public function deactivate():void{
}
public function advance():void{
}
public function (_arg1:Block):Boolean{
return (false);
}
}
}//package com.nitrome.icebreaker
Section 138
//ContactListener (com.nitrome.icebreaker.ContactListener)
package com.nitrome.icebreaker {
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class ContactListener extends b2ContactListener {
override public function Add(_arg1:b2ContactPoint):void{
if (((_arg1.shape1.m_body.m_userData) && (_arg1.shape1.m_body.m_userData.contactMade))){
_arg1.shape1.m_body.m_userData.contactMade(_arg1, _arg1.shape2);
};
if (((_arg1.shape2.m_body.m_userData) && (_arg1.shape2.m_body.m_userData.contactMade))){
_arg1.shape2.m_body.m_userData.contactMade(_arg1, _arg1.shape1);
};
}
}
}//package com.nitrome.icebreaker
Section 139
//Controller (com.nitrome.icebreaker.Controller)
package com.nitrome.icebreaker {
import flash.display.*;
import flash.events.*;
import com.nitrome.util.*;
import com.nitrome.game.*;
public class Controller {
public static const CLAN_HUNTER:String = "4";
public static const BACKGROUND_STORMY:Number = 5;
public static const SKIP_MENUS:Boolean = false;
public static const CLAN_RED:String = "1";
public static const BACKGROUND_NIGHT:Number = 4;
public static const DEBUG:Boolean = false;
public static const CLAN_ELDER:String = "3";
public static const BACKGROUND_REDCLAN:Number = 1;
public static const CLAN_RAVEN:String = "5";
public static const BACKGROUND_ORIGINAL:Number = 2;
public static const ENCRYPTED_LEVELS:Boolean = true;
public static const BACKGROUND_PINK:Number = 3;
public static const CLAN_FIRST:String = "2";
public static var stage:Stage;
public static var protectionLayer:Sprite;
public static var level:Level = null;
public static var frameNumber:Number = 0;
public static var loadedLevelNumber:Number = -1;
public static var selectedLevel:Number = 1;
public static var splashLayer:Sprite;
public static var popup:IngamePopup;
public static var background:Background;
public static var characterLayer:Sprite;
public static var levelData:Object = null;
public static var cutLayer:Sprite;
public static var edgeScrolling:Boolean = true;
public static var seaLayer:Sprite;
public static var blockLayer:Sprite;
public static var loadedXML:XML = null;
public static var loadIndicator:LoadIndicator = null;
public static var lastLevelAvailable:HiddenInt = new HiddenInt(8);
public static var railLayer:Sprite;
public static var fragmentLayer:Sprite;
public static var root:MovieClip;
public static var particleLayer:Sprite;
public static var constraintLayer:Sprite;
public static var glowyBlockLayer:Sprite;
public static var gloveLayer:Sprite;
public static var content:Sprite;
public static var activeLayer:Sprite;
public static var finishLayer:Sprite;
public static function endLevel():void{
if (!level){
return;
};
level.destroy();
level = null;
background.updateType();
}
public static function startGame(_arg1:Sprite):void{
if (content){
return;
};
stage = _arg1.stage;
root = MovieClip(_arg1.root);
root.stop();
content = _arg1;
content.addChild((railLayer = new Sprite()));
content.addChild((particleLayer = new Sprite()));
content.addChild((fragmentLayer = new Sprite()));
content.addChild((blockLayer = new Sprite()));
content.addChild((glowyBlockLayer = new Sprite()));
content.addChild((characterLayer = new Sprite()));
content.addChild((constraintLayer = new Sprite()));
content.addChild((activeLayer = new Sprite()));
content.addChild((gloveLayer = new Sprite()));
content.addChild((finishLayer = new Sprite()));
content.addChild((protectionLayer = new Sprite()));
content.addChild((splashLayer = new Sprite()));
content.addChild((seaLayer = new Sprite()));
content.addChild((cutLayer = new Sprite()));
background = root.background;
popup = new IngamePopup();
stage.quality = StageQuality.LOW;
root.tabChildren = false;
Key.initialize(stage);
CustomCursor.setup(root);
Trig.setup();
stage.addEventListener(Event.ENTER_FRAME, enterFrame);
edgeScrolling = NitromeGame.edgeScrolling;
}
public static function takeLimitsXML(_arg1:XML):void{
var _local2:MD5;
var _local3:Number;
var _local4:String;
var _local5:String;
_local2 = new MD5();
_local3 = 1;
while (_local3 <= 40) {
_local4 = (("IcebreakerTheGathering--Nobodies--LIMIT-To-Level-" + _local3.toString()) + "-Inclusive!");
_local5 = _local2.hash(_local4);
if (_local5 == _arg1.@e){
lastLevelAvailable.value = _local3;
return;
};
_local3++;
};
}
public static function isPaused():Boolean{
if (popup){
if (popup.isOpen){
if (popup.popupType == "paused"){
return (true);
};
if (popup.popupType == "restart"){
return (true);
};
if (popup.popupType == "restartStuck"){
return (true);
};
if (popup.popupType == "failed"){
return (true);
};
if (popup.popupType == "failedStuck"){
return (true);
};
};
};
return (false);
}
public static function backgroundType():Number{
if (level){
if (loadedLevelNumber <= 8){
return (BACKGROUND_PINK);
};
if (loadedLevelNumber <= 16){
return (BACKGROUND_ORIGINAL);
};
if (loadedLevelNumber <= 24){
return (BACKGROUND_STORMY);
};
if (loadedLevelNumber <= 32){
return (BACKGROUND_REDCLAN);
};
if (loadedLevelNumber <= 40){
return (BACKGROUND_NIGHT);
};
};
return (BACKGROUND_PINK);
}
public static function atEndOfClan():Boolean{
return (((loadedLevelNumber % 8) == 0));
}
public static function charType():String{
if (loadedLevelNumber <= 8){
return (CLAN_ELDER);
};
if (loadedLevelNumber <= 16){
return (CLAN_FIRST);
};
if (loadedLevelNumber <= 24){
return (CLAN_RAVEN);
};
if (loadedLevelNumber <= 32){
return (CLAN_RED);
};
return (CLAN_HUNTER);
}
public static function restartLevel():void{
endLevel();
startLevel(loadedLevelNumber);
}
public static function atEndOfGame():Boolean{
return ((((((((((((loadedLevelNumber == 40)) && (NitromeGame.getLevelCompleted(8)))) && (NitromeGame.getLevelCompleted(16)))) && (NitromeGame.getLevelCompleted(24)))) && (NitromeGame.getLevelCompleted(32)))) && (NitromeGame.getLevelCompleted(40))));
}
public static function onLoadComplete():void{
level = new Level();
level.create(loadedXML);
NitromeGame.transition.play();
loadIndicator.finishedLoading();
background.updateType();
TimedUnlock.clearJustUnlocked();
}
public static function uniqueString():String{
var _local1:Date;
var _local2:Array;
var _local3:Number;
var _local4:Number;
_local1 = new Date();
_local2 = [_local1.fullYear, (_local1.month + 1), _local1.date, _local1.hours, _local1.minutes, _local1.seconds, _local1.milliseconds];
_local3 = 1;
while (_local3 <= 5) {
_local4 = Math.floor((Math.random() * 10000));
_local2.push(_local4);
_local3++;
};
return (_local2.join("-"));
}
public static function setupLevelData():void{
levelData = {};
levelData["95bd48adbe1431baf9ced9538b06cd52.xml"] = <level el="-393" er="400" et="-500" sy="0" cx="0" cy="-250" ht="introbomb"><b t="i" v="83,-333,57,-289,39,-298,42,-279,30,-271,16,-288,-14,-293,-45,-286,-76,-278,-56,-294,-88,-287,-107,-281,-134,-276,-169,-270,-151,-282,-187,-286,-211,-299,-227,-325,-210,-325,-216,-346,-214,-386,-203,-366,-194,-393,-167,-412,-144,-411,-131,-405,-125,-389,-132,-373,-136,-393,-160,-391,-170,-372,-165,-351,-147,-339,-92,-335,-106,-352,-74,-344,-50,-333,-11,-332,-5,-332,2,-351,46,-350"/><b t="n" v="-159,-189,-112,-214,-58,-217,2,-195,34,-194,81,-203,119,-228,135,-262,126,-296,114,-304,105,-303,92,-291,69,-277,35,-267,25,-270,43,-280,40,-298,57,-288,83,-334,45,-351,1,-351,-5,-333,-14,-345,-27,-343,-29,-359,-21,-369,30,-381,44,-393,69,-395,82,-392,97,-396,121,-398,151,-395,178,-387,129,-380,115,-370,134,-354,164,-356,195,-348,162,-338,155,-326,169,-302,188,-298,206,-289,188,-282,176,-269,171,-244,185,-215,158,-215,147,-198,147,-183,133,-184,97,-166,51,-155,-3,-155,-54,-172,-87,-177,-123,-161,-145,-135,-154,-92,-144,-42,-79,80,-145,82,-186,-18,-198,-69,-190,-138"/><b t="n" v="257,-123,268,-153,296,-196,325,-218,327,-238,385,-252,348,-210,333,-212,303,-164,294,-119,295,-69,297,-8,291,35,278,65,204,65,242,6,246,-40"/><b t="n" v="-421,17,-417,-51,-368,-63,-336,-61,-311,-27,-302,45,-295,79,-421,81"/><p pos="-135,60"/><p pos="231,54"/><p pos="269,55"/><p pos="158,-346"/><p pos="119,-386"/><p pos="337,-223"/><p pos="-109,59"/><p pos="-405,66"/><p pos="-317,64"/><p pos="-406,-38"/><c t="f1" pos="18,-316"/><ao pos="45,7" t="f"/><ao pos="-51,-365" t="bomb"/><ao pos="-353,-61" t="hs"/></level>
;
levelData["04174c17003db7ff7da8e2e685199a35.xml"] = <level el="-137" er="927" et="-500" sy="0" cx="220" cy="-275" ht=""><b t="w" v="0,-208,96,-208,96,-304,128,-304,128,-208,224,-208,224,-176,128,-176,128,-80,96,-80,96,-176,0,-176"/><b t="w" v="144,-240,208,-304,144,-368,160,-384,224,-320,288,-384,304,-368,240,-304,304,-240,288,-224,224,-288,160,-224"/><b t="w" v="288,-320,400,-320,496,-320,495,-292,492,-270,480,-256,416,-256,404,-270,400,-288,288,-288"/><b t="n" v="416,-256,480,-256,485,-230,480,-192,464,-174,433,-174,416,-192,412,-230"/><b t="i" v="-48,-530,61,-519,64,-351,57,-297,40,-286,16,-288,6,-316,-25,-381,-41,-470"/><b t="w" v="416,-400,624,-400,624,-384,416,-384"/><b t="n" v="496,-384,512,-384,512,-368,496,-368"/><p pos="112,-192"/><p pos="224,-304"/><p pos="368,-304"/><p pos="448,-192"/><p pos="448,-240"/><p pos="-14,-508"/><p pos="15,-510"/><p pos="514,-393"/><p pos="504,-376"/><c t="s1" pos="448,-416"/><ao pos="743,-4" t="f"/></level>
;
levelData["310745612e11b237f1b2c18d6afb9d31.xml"] = <level el="-400" er="566" et="-500" sy="0" cx="0" cy="-250" ht=""><b t="n" v="-173,-230,-175,-260,-178,-272,-161,-279,-159,-330,-153,-316,-90,-306,-70,-326,-68,-274,-79,-254,-59,-226,-44,-211,-22,-205,-2,-206,24,-213,21,-203,24,-190,141,-191,140,-206,136,-218,254,-225,251,-215,209,-190,162,-185,42,-183,-8,-170,-75,-168,-97,-168,-127,-169,-143,-175,-151,-195,-197,-192"/><b t="n" v="-214,-180,-197,-193,-152,-193,-147,-169,-140,-121,-105,87,-239,93,-224,-110,-218,-153"/><p pos="9,-199"/><p pos="-196,-165"/><p pos="-176,-149"/><c t="s1" pos="159,-232"/><ao pos="330,2" t="f"/><ao pos="-135,-328" t="bomb"/><ao pos="-113,-349" t="bomb"/><ao pos="-94,-324" t="bomb"/></level>
;
levelData["1d6c6a0987b4d819384ce3ee1835d089.xml"] = <level el="-412" er="651" et="-1055" sy="-2.5" cx="301" cy="-738" ht=""><b t="n" v="-48,-256,-35,-290,-15,-318,13,-339,48,-352,79,-356,112,-352,144,-340,176,-320,195,-293,208,-256,212,-226,208,-192,195,-157,176,-128,145,-108,112,-96,79,-92,48,-96,13,-108,-16,-128,-36,-159,-48,-192,-52,-226"/><b t="n" v="-418,-670,-384,-567,-69,-341,-50,-321,-42,-293,-57,-249,-58,-199,-12,-9,-435,-8"/> <b t="n" v="-114,-552,-110,-566,-64,-587,5,-615,40,-631,50,-629,62,-551,66,-521,70,-408,85,-404,103,-407,106,-524,112,-556,174,-640,184,-646,253,-677,261,-673,239,-622,224,-555,218,-547,188,-516,190,-481,219,-453,229,-449,379,-451,656,-486,688,-459,759,-387,758,-264,627,-242,544,-250,535,-255,442,-305,313,-347,171,-364,127,-360,83,-366,29,-358,21,-361,-19,-389,-48,-434"/><b t="n" v="190,-766,203,-775,222,-778,350,-802,368,-805,434,-817,443,-811,440,-790,437,-784,400,-774,391,-756,415,-708,417,-693,404,-688,301,-693,230,-688,212,-702,193,-692"/><b t="n" v="240,-1071,390,-1068,404,-1057,394,-1009,390,-995,328,-920,314,-917,266,-910,255,-913,236,-935,233,-948,216,-1045"/><b t="n" v="600,-990,621,-1029,682,-1097,673,-807,658,-775,626,-797,610,-838,576,-861,505,-867,436,-853,420,-862,414,-877,419,-884"/><p pos="-342,-80"/><p pos="-159,-77"/><p pos="-30,-433"/><p pos="211,-421"/><p pos="21,-591"/><p pos="139,-528"/><p pos="-384,-22"/><p pos="-25,-24"/><p pos="280,-731"/><p pos="273,-1052"/><p pos="350,-1055"/><p pos="656,-827"/><p pos="660,-1017"/><p pos="685,-425"/><p pos="726,-393"/><p pos="727,-322"/><l p1="410,-754" p2="324,-738"/><l p1="301,-1019" p2="304,-874"/><l p1="213,-766" p2="210,-683"/><l p1="572,-992" p2="623,-1011"/><tp pos="80,-224" sp="2"/><c t="s1" pos="572,-992"/><ao pos="339,-54" t="f"/><ao pos="210,-683" t="bomb"/><ao pos="410,-754" t="bomb"/><ao pos="304,-874" t="bomb"/></level>
;
levelData["c1f8172779e9109215390099c8175253.xml"] = <level el="-288" er="573" et="-641" sy="7.1875" cx="-13" cy="-441" ht=""><b t="n" v="-110,-345,-124,-363,-209,-420,-224,-432,-266,-504,-270,-516,-272,-528,-222,-466,-208,-453,-48,-352,-43,-335,-54,-330,-69,-320,-80,-304,-96,-304"/><b t="n" v="16,-352,174,-455,197,-476,240,-528,240,-516,230,-490,203,-445,192,-432,149,-402,82,-360,70,-339,64,-304,48,-304,36,-319,24,-329,12,-335"/><b t="w" v="-24,-277,16,-329,5,-264,64,-239,57,-224,-29,-227,-89,-288,-83,-303"/><b t="n" v="64,-224,70,-206,68,-176,56,-169,45,-159,36,-144,16,-144,-17,-152,-52,-168,-80,-192,-89,-205,-96,-224"/><b t="n" v="-107,-478,-104,-492,-99,-499,-85,-498,-77,-489,-76,-478,-85,-468,-96,-468"/><b t="n" v="-93,-410,-101,-419,-104,-432,-95,-442,-80,-441,-72,-433,-71,-420,-82,-412"/><b t="n" v="-84,-667,-20,-667,124,-653,38,-632,-13,-616,-49,-610,-100,-622,-175,-658"/><b t="n" v="-73,-439,-77,-447,-74,-462,-63,-466,-50,-465,-46,-450,-48,-441,-60,-436"/><b t="n" v="-30,-497,-33,-488,-46,-476,-59,-481,-65,-492,-62,-502,-52,-511,-41,-508"/><b t="n" v="-25,-425,-32,-435,-32,-446,-20,-454,-11,-452,0,-440,-3,-429,-14,-421"/><b t="n" v="-32,-398,-37,-388,-46,-380,-60,-385,-66,-394,-62,-407,-52,-415,-40,-410"/><b t="n" v="-70,-553,-56,-548,-51,-538,-55,-525,-65,-518,-79,-522,-84,-534,-81,-546"/><b t="n" v="-4,-551,-2,-536,-11,-526,-22,-524,-33,-532,-33,-546,-25,-555,-14,-555"/><b t="n" v="-14,-386,-10,-396,-1,-404,12,-401,18,-390,14,-376,3,-373,-9,-377"/><b t="n" v="18,-445,27,-451,38,-448,48,-440,44,-427,31,-419,21,-422,16,-434"/><b t="n" v="32,-532,41,-537,54,-534,60,-521,53,-512,41,-505,34,-511,28,-523"/><b t="n" v="-126,-511,-137,-517,-144,-525,-138,-539,-128,-547,-115,-541,-112,-528,-117,-517"/><b t="n" v="16,-64,176,-64,182,-51,182,-16,168,-11,158,0,148,15,128,16,97,7,68,-4,36,-25,23,-47"/><b t="w" v="29,-143,88,-117,128,-169,117,-104,176,-79,169,-64,83,-67,23,-128"/><b t="n" v="134,-224,145,-242,167,-256,200,-263,224,-256,241,-232,247,-161,224,-144,201,-137,160,-145,152,-157,140,-167,126,-174,126,-209"/><b t="w" v="141,17,200,43,240,-9,229,56,288,81,281,96,195,93,135,32"/><b t="n" v="128,96,288,96,292,107,288,128,256,144,224,150,187,152,160,144,144,128,135,114"/><b t="n" v="240,-66,252,-82,272,-96,317,-103,336,-96,349,-74,346,-11,336,16,303,22,286,21,269,15,260,-2,247,-13,233,-18,234,-47"/><b t="n" v="-158,-490,-146,-494,-135,-492,-130,-478,-137,-467,-146,-463,-158,-468,-162,-478"/><p pos="-80,-336"/><p pos="48,-336"/><p pos="-16,-256"/><p pos="48,-192"/><p pos="-64,-208"/><p pos="-135,-654"/><p pos="56,-652"/><p pos="-210,-439"/><p pos="183,-441"/><p pos="96,-96"/><p pos="48,-48"/><p pos="160,-32"/><p pos="208,-240"/><p pos="208,-160"/><p pos="208,64"/><p pos="160,112"/><p pos="320,-80"/><p pos="320,0"/><p pos="-47,-653"/><p pos="64,-48"/><p pos="176,112"/><p pos="176,128"/><p pos="160,128"/><p pos="266,124"/><l p1="-125,-529" p2="-92,-483"/><l p1="-91,-483" p2="-86,-428"/><l p1="-91,-483" p2="-68,-537"/><l p1="-125,-529" p2="-68,-537"/><l p1="-67,-537" p2="-56,-625"/><l p1="-16,-541" p2="-34,-628"/><l p1="-91,-484" p2="-46,-495"/><l p1="-46,-495" p2="-61,-452"/><l p1="-16,-540" p2="43,-523"/><l p1="-16,-540" p2="-47,-495"/><l p1="-61,-451" p2="-50,-398"/><l p1="-16,-540" p2="1,-487"/><l p1="-47,-495" p2="1,-487"/><l p1="1,-487" p2="-16,-441"/><l p1="-17,-439" p2="3,-389"/><l p1="-16,-440" p2="32,-436"/><l p1="43,-523" p2="1,-487"/><l p1="1,-487" p2="32,-436"/><l p1="-67,-537" p2="-16,-540"/><l p1="-61,-451" p2="-16,-442"/><l p1="-146,-479" p2="-125,-529"/><c t="s1" pos="1,-487"/><ao pos="405,237" t="f"/></level>
;
levelData["0d5d0136fb3963f74d7a2543340dad04.xml"] = <level el="-400" er="563" et="-663" sy="0" cx="-22" cy="-463" ht=""><b t="n" v="-273,-393,-253,-404,-233,-403,-206,-391,-187,-385,-147,-371,-103,-367,-67,-366,-17,-379,11,-376,56,-379,103,-368,142,-376,170,-396,193,-411,213,-409,222,-391,221,-368,219,-341,208,-320,191,-307,164,-306,137,-321,112,-324,88,-332,76,-349,64,-352,52,-330,45,-321,23,-312,-12,-308,-45,-310,-77,-305,-106,-316,-114,-331,-128,-352,-134,-336,-144,-320,-171,-314,-217,-313,-252,-311,-272,-320,-283,-342,-284,-372"/><b t="n" v="-48,-688,-28,-696,-5,-694,16,-688,23,-674,27,-659,25,-641,16,-624,2,-620,-9,-623,-23,-628,-32,-635,-39,-644,-52,-649,-59,-656,-55,-675"/><b t="w" v="-69,-164,126,-165,127,-133,-53,-132"/><b t="w" v="192,-192,192,-176,80,-176,80,-192"/><b t="n" v="80,-128,90,-130,104,-129,116,-127,119,-112,113,-93,97,-90,83,-99,78,-111"/><p pos="184,-332"/><p pos="-255,-339"/><p pos="-244,-369"/><p pos="194,-379"/><p pos="-31,-674"/><p pos="2,-678"/><p pos="32,-148"/><p pos="182,-185"/><p pos="89,-113"/><p pos="103,-114"/><p pos="150,-347"/><p pos="-210,-345"/><l p1="-16,-640" p2="96,-512"/><l p1="-16,-640" p2="32,-576"/><c t="s1" pos="177,-208"/><ao pos="32,-576" t="bomb"/><ao pos="96,-512" t="bomb"/><ao pos="363,-1" t="f"/></level>
;
levelData["32ee64e1cdea5fce808c97751faf348f.xml"] = <level el="-400" er="1026" et="-699" sy="10.46875" cx="198" cy="-499" ht=""><b t="n" v="128,-737,159,-734,78,-560,56,-551,64,-529,18,-418,153,-350,156,-339,140,-298,526,-142,548,-146,624,-107,633,-83,624,-68,602,-61,518,-95,512,-121,369,-180,363,-195,350,-188,313,-203,286,-195,248,-196,118,-247,40,-80,22,-65,4,-62,-140,-125,-149,-141,-141,-170"/><b t="i" v="252,-603,270,-598,442,-612,455,-609,460,-561,455,-541,465,-528,517,-191,512,-177,523,-169,527,-142,213,-267,210,-287,229,-440,244,-453,232,-465,242,-585"/><b t="i" v="242,97,270,89,305,96,316,141,319,160,311,194,300,204,256,205,244,201,234,168,237,108"/><b t="i" v="88,297,110,270,125,265,152,297,153,305,162,406,62,395"/><b t="n" v="244,213,256,205,300,205,312,211,315,236,312,286,328,408,224,408,235,265"/><p pos="253,-227"/><p pos="119,-688"/><p pos="243,390"/><p pos="302,389"/><p pos="532,-122"/><p pos="143,390"/><p pos="92,388"/><p pos="608,-86"/><c t="f1" pos="268,133"/><c t="f1" pos="283,173"/><ao pos="271,-615" t="bomb"/><ao pos="177,-317" t="bomb"/><ao pos="723,350" t="f"/></level>
;
levelData["5e472f385a14e01f839c49703d01baa1.xml"] = <level el="-350" er="446" et="-469" sy="4.5" cx="24" cy="-269" ht=""><b t="n" v="-195,-274,-179,-289,-156,-298,-114,-292,-69,-276,-39,-264,-9,-250,19,-234,46,-219,60,-219,76,-227,92,-223,100,-211,92,-196,74,-190,47,-189,18,-213,-13,-232,-45,-246,-72,-254,-96,-256,-88,-239,-91,-219,-103,-198,-112,-192,-123,-212,-130,-217,-134,-227,-126,-237,-132,-247,-149,-252,-164,-241,-167,-231,-158,-220,-162,-212,-168,-207,-176,-192,-186,-205,-192,-224,-216,-245,-224,-259,-208,-256"/><b t="i" v="-122,-212,-112,-192,-115,-179,-129,-170,-153,-167,-169,-177,-176,-192,-169,-208,-161,-213,-158,-221,-167,-231,-164,-242,-149,-253,-132,-248,-125,-236,-134,-227,-129,-216"/><b t="n" v="288,-144,304,-144,301,-121,304,-96,315,-92,368,-96,368,-80,357,-75,296,-76,288,-80,285,-93,285,-126"/><b t="w" v="176,-208,212,-212,240,-208,244,-182,256,-176,352,-176,360,-168,360,-152,352,-144,240,-144,226,-128,199,-112,175,-99,161,-102,140,-110,130,-121,124,-129,128,-137,134,-129,146,-123,154,-155,158,-190"/><b t="n" v="288,-272,313,-276,331,-265,350,-266,354,-254,348,-238,292,-225,284,-239,283,-260"/><b t="n" v="-67,-497,-3,-497,7,-477,-8,-444,-37,-428,-60,-438,-86,-483"/><p pos="-16,-240"/><p pos="192,-192"/><p pos="297,-135"/><p pos="355,-88"/><p pos="304,-247"/><p pos="332,-247"/><p pos="73,-206"/><p pos="-55,-484"/><p pos="-20,-483"/><l p1="330,-120" p2="332,-87"/><l p1="-97,-372" p2="-39,-447"/><c t="f1" pos="-144,-191"/><ao pos="96,144" t="f"/><ao pos="-97,-372" t="bomb"/><ao pos="330,-120" t="b"/></level>
;
levelData["e128a6a91099f59c5722f4e265b57c07.xml"] = <level el="-747" er="699" et="-680" sy="4.1875" cx="0" cy="-250" ht=""><b t="n" v="-39,-196,-37,-177,-36,-135,-1,-113,17,-114,39,-122,49,-158,51,-185,54,-213,55,-235,56,-306,64,-321,79,-324,91,-310,92,-294,95,-290,98,-300,108,-304,121,-295,127,-275,125,-259,134,-260,143,-242,142,-203,145,-188,140,-173,142,-109,136,-86,127,-69,71,-8,69,10,91,276,-85,278,-66,-34,-84,-73,-90,-103,-84,-137,-86,-159,-82,-176,-92,-209,-82,-220,-62,-219,-48,-209"/><b t="i" v="-665,-387,-639,-393,-661,-416,-662,-433,-646,-476,-636,-485,-612,-486,-256,-388,-231,-380,-208,-370,-194,-353,-191,-331,-196,-312,-223,-300,-248,-298,-185,-261,-140,-227,-122,-201,-110,-183,-108,-165,-115,-145,-131,-128,-141,-83,-147,-82,-160,-114,-166,-111,-167,-83,-172,-83,-188,-101,-179,-84,-173,-32,-148,36,-120,241,-868,254,-841,-325,-710,-371"/><b t="w" v="-59,-546,326,-542,324,-528,330,-528,335,-514,334,-489,321,-482,-29,-481,-39,-488,-63,-487,-59,-511,-51,-513,-64,-518,-59,-531"/><b t="n" v="104,-482,162,-481,165,-471,167,-448,157,-425,130,-417,108,-420,103,-424,96,-447,99,-470"/><b t="i" v="316,-319,328,-332,346,-336,381,-329,396,-318,406,-302,402,-268,387,-242,367,-224,381,-38,379,-13,365,6,357,59,351,56,338,17,328,21,318,41,313,42,305,34,298,49,293,85,304,196,177,194,193,50,206,7,297,-216,301,-229,308,-297"/><b t="i" v="587,-259,702,-381,713,161,640,160,634,40,627,28,616,71,609,77,598,19,589,49,584,51,573,18,551,11,539,-15,538,-38,584,-145,573,-150,565,-160,562,-203,574,-236"/><p pos="-199,225"/><p pos="-506,234"/><p pos="-616,248"/><p pos="-410,224"/><p pos="-783,246"/><p pos="115,-450"/><p pos="147,-450"/><p pos="213,131"/><p pos="259,146"/><p pos="645,132"/><p pos="674,133"/><rp path="(-3,-107)>(-3,299)" loop="n"/><c t="s1" pos="130,-558"/><ao pos="457,143" t="f"/></level>
;
levelData["692d46ddf030a9a50f768de261eb9d48.xml"] = <level el="-96" er="606" et="-450" sy="-1.46875" cx="179" cy="-250" ht=""><b t="n" v="187,-478,174,-437,161,-407,151,-366,142,-357,134,-356,124,-360,112,-369,96,-380,77,-389,47,-394,13,-388,-11,-376,-29,-359,-41,-344,-50,-326,-55,-300,-56,-273,-51,-248,-39,-224,-21,-205,4,-191,32,-185,62,-185,86,-191,104,-201,117,-213,136,-238,144,-245,153,-248,155,-242,157,-154,149,-78,146,39,-112,39,-112,-308,-105,-486"/><b t="n" v="160,-320,240,-320,256,-400,272,-400,272,-320,320,-320,352,-304,352,-288,272,-288,256,-208,240,-208,240,-288,192,-288,160,-304"/><b t="n" v="262,-192,278,-179,278,-173,269,-154,263,-149,246,-147,237,-166,236,-174,241,-189,246,-194"/><b t="i" v="32,-320,32,-384,64,-384,64,-320,80,-304,144,-304,144,-272,80,-272,64,-256,64,-192,32,-192,32,-256,16,-272,-48,-272,-48,-304,16,-304"/><p pos="256,-304"/><p pos="-87,-468"/><p pos="-78,21"/><p pos="121,19"/><p pos="152,-466"/><l p1="256,-256" p2="256,-176"/><tp pos="48,-288" sp="-2"/><c t="s1" pos="288,-336"/><c t="s1" pos="224,-336"/><ao pos="395,-27" t="f"/></level>
;
levelData["a371879c3ebf4fc25a3d4351da9ee261.xml"] = <level el="-426" er="749" et="-594" sy="0" cx="-103" cy="-394" ht=""><b t="i" v="-372,-425,45,-428,171,-426,421,-431,430,-419,424,-398,411,-391,-282,-390,-350,-386,-375,-394,-380,-415"/><b t="i" v="-282,-623,-218,-623,43,-620,23,-597,-55,-582,-81,-573,-95,-550,-110,-534,-123,-535,-136,-546,-167,-575,-186,-579,-207,-577,-219,-569,-232,-556,-246,-547,-258,-555,-272,-573,-293,-589,-315,-602"/><b t="n" v="-36,-340,-16,-377,5,-337,37,-246,38,-218,13,-227,11,-248,-3,-259,3,-204,3,-182,-2,-182,-2,56,-29,56,-29,-181,-35,-181,-34,-206,-29,-258,-43,-247,-45,-228,-71,-216,-70,-248"/><b t="i" v="45,-622,109,-622,148,-606,121,-589,110,-579,96,-566,77,-554,65,-556,52,-565,22,-597"/><b t="i" v="751,-567,819,-445,818,-101,784,73,654,66,683,-5,688,-53,675,-81,662,-92,659,-107,670,-129,693,-165,716,-225,726,-299,738,-370"/><p pos="404,-414"/><p pos="-286,-405"/><p pos="-236,-604"/><p pos="-270,-603"/><p pos="-350,-407"/><p pos="337,-414"/><p pos="92,-603"/><p pos="56,-610"/><p pos="789,-196"/><p pos="790,-123"/><p pos="782,-394"/><rp path="(-16,-302)>(-16,8)" loop="n"/><l p1="-251,-579" p2="-248,-482"/><l p1="73,-572" p2="74,-518"/><c t="s1" pos="-248,-482"/><c t="s1" pos="74,-518"/><ao pos="533,7" t="f"/></level>
;
levelData["b420c32a5d40c2d682d3fc9de986270c.xml"] = <level el="-400" er="426" et="-498" sy="0" cx="78" cy="-266" ht=""><b t="n" v="-175,-262,-179,-291,-146,-292,27,-284,33,-265,33,-239,32,-213,18,-169,-16,-163,-93,-192,-114,-195,-126,-209,-144,-235"/><b t="n" v="34,-276,46,-297,133,-297,191,-283,213,-269,218,-251,193,-215,139,-195,57,-190,39,-206,32,-264"/><b t="i" v="266,-144,276,-195,302,-234,310,-246,323,-276,330,-284,390,-285,445,-242,423,64,271,64,301,-1,303,-22,289,-61"/><b t="i" v="-221,-529,-157,-529,-134,-496,-120,-463,-100,-363,-103,-347,-171,-339,-223,-346,-221,-465"/><b t="i" v="147,-576,201,-588,227,-507,236,-497,217,-453,185,-390,161,-354,146,-345,148,-398,140,-438,128,-500"/><p pos="191,-272"/><p pos="-145,-272"/><p pos="304,51"/><p pos="398,48"/><p pos="-157,-516"/><p pos="-205,-513"/><p pos="195,-513"/><p pos="173,-511"/><l p1="10,-247" p2="56,-219"/><l p1="-2,-219" p2="57,-237"/><c t="s1" pos="74,-310"/><c t="f1" pos="349,-255"/><c t="f1" pos="-172,-443"/><c t="f1" pos="181,-460"/><ao pos="42,0" t="f"/></level>
;
levelData["7d3a45ff6683606c837ec862f7bc39dd.xml"] = <level el="-280" er="674" et="-598" sy="1.25" cx="192" cy="-323" ht=""><b t="i" v="179,-186,199,-187,222,-165,229,-160,284,-158,342,-162,350,-166,375,-187,393,-186,394,-178,383,-158,376,-151,344,-129,336,-110,330,-109,320,-126,295,-127,288,-116,282,-116,276,-124,260,-124,254,-108,249,-104,244,-107,240,-126,235,-130,203,-141,195,-147,178,-179"/><b t="i" v="506,-367,538,-367,561,-359,587,-353,643,-358,656,-359,697,-357,696,-258,656,-267,646,-245,642,-241,638,-244,628,-269,620,-270,613,-228,608,-223,603,-229,588,-280,538,-294,531,-298,509,-323,506,-332,503,-362"/><b t="i" v="-300,-504,-246,-503,-178,-511,-166,-512,-126,-521,-116,-523,-81,-521,-70,-516,-68,-509,-94,-480,-117,-441,-148,-377,-155,-369,-179,-347,-247,-306,-256,-302,-300,-303"/><p pos="685,-337"/><p pos="683,-286"/><p pos="-291,-489"/><p pos="-289,-315"/><rp path="(288,-144)>(368,-208)>(400,-288)>(400,-400)>(352,-480)>(256,-528)>(128,-528)>(48,-480)>(0,-384)>(0,-272)>(64,-192)>(160,-144)" loop="y"/><c t="s1" pos="526,-382"/><c t="f1" pos="-120,-486"/><ao pos="192,48" t="f"/></level>
;
levelData["a6fbe2b6a3c8a0b69d9f3e2a66f36219.xml"] = <level el="-763" er="400" et="-900" sy="5.15625" cx="0" cy="-250" ht=""><b t="n" v="-148,-344,-37,-343,-24,-334,-24,-297,-31,-273,-56,-232,-64,-226,-81,-225,-81,-209,-67,-192,-81,-170,-80,-159,-62,-146,-79,-130,-78,-118,-63,-100,-79,-85,-77,-70,-64,-55,-80,-37,-80,-21,-67,-7,-81,9,-83,504,-58,868,-151,877,-108,506,-107,-225,-128,-226,-135,-233,-150,-269,-155,-293,-157,-332"/><b t="n" v="-148,-206,-114,-201,-108,-191,-109,246,-404,242,-368,33,-324,-82,-313,-142,-226,-377,-217,-389,-199,-399,-187,-399,-176,-390,-170,-369,-177,-304,-156,-219"/><b t="n" v="-52,-194,-54,-218,-34,-211,-25,-220,3,-348,10,-367,48,-399,75,-412,91,-409,101,-359,118,-349,134,-356,165,-404,173,-483,184,-494,190,-491,198,-477,199,-466,199,-404,195,-393,152,-328,137,-321,122,-320,75,-338,55,-349,40,-348,31,-334,23,-294,14,-209,16,-192,36,-179,17,-161,10,-146,9,-123,-9,-133,-23,-132,-46,-122,-48,-147,-55,-156,-75,-167,-58,-183"/><b t="n" v="2,40,11,48,217,249,-80,247,-80,42,-73,32,-48,22,-37,23"/><b t="i" v="-20,-929,383,-954,316,-863,310,-852,300,-814,289,-778,285,-763,271,-735,260,-729,251,-735,239,-757,227,-840,214,-851,202,-851,173,-836,163,-823,148,-732,135,-640,122,-558,112,-534,95,-517,82,-518,64,-543,56,-580,54,-644,49,-725,44,-852,38,-862"/><p pos="-357,227"/><p pos="-162,230"/><p pos="121,231"/><p pos="-60,232"/><p pos="253,-916"/><p pos="93,-912"/><p pos="-22,-172"/><c t="f1" pos="96,-683"/><ao pos="-538,171" t="f"/></level>
;
levelData["198ee39abc1a42fc9e3d36b493d10de5.xml"] = <level el="-400" er="400" et="-673" sy="0" cx="0" cy="-250" ht=""><b t="n" v="-172,-296,-155,-305,-133,-306,-115,-295,-108,-286,-95,-288,-82,-299,-84,-282,-90,-272,-101,-265,-101,-253,-87,-238,-103,-237,-91,-225,-103,-222,-92,-208,-191,-208,-183,-223,-196,-225,-186,-237,-198,-236,-187,-255,-185,-264,-201,-272,-208,-288,-208,-301,-196,-289,-183,-287"/><b t="i" v="290,-141,282,-136,261,-131,253,-103,247,-97,240,-99,234,-107,225,-132,205,-131,172,-137,152,-149,144,-155,108,-162,97,-162,79,-156,68,-134,61,-132,53,-138,44,-160,30,-165,19,-165,3,-147,-4,-147,-11,-152,-20,-166,-27,-168,-74,-162,-82,-156,-117,-146,-167,-136,-181,-105,-188,-103,-194,-110,-201,-134,-211,-135,-222,-109,-229,-97,-236,-97,-242,-103,-250,-137,-266,-139,-275,-144,-275,-161,-266,-171,-220,-200,-207,-206,201,-207,215,-205,229,-201,282,-170,288,-164,292,-153"/><b t="n" v="-186,-365,160,-365,165,-358,165,-349,156,-338,141,-333,131,-332,93,-335,57,-329,17,-331,-31,-337,-44,-335,-88,-329,-107,-331,-131,-335,-165,-329,-175,-329,-189,-340,-191,-359"/><b t="n" v="-186,-424,-11,-424,1,-416,3,-407,-9,-391,-21,-387,-60,-390,-84,-386,-129,-390,-179,-387,-189,-395,-192,-416"/><b t="n" v="17,-424,151,-421,158,-413,155,-391,140,-383,121,-384,104,-388,84,-384,72,-386,60,-390,30,-387,19,-390,13,-412"/><b t="n" v="-256,-734,169,-750,208,-708,201,-663,190,-649,182,-643,133,-639,77,-645,45,-638,13,-639,-10,-639,-62,-630,-83,-631,-132,-637,-146,-639,-215,-633,-232,-637,-244,-658"/><b t="n" v="-97,-512,143,-512,147,-502,148,-485,137,-475,114,-472,94,-474,62,-478,36,-484,-1,-477,-18,-475,-55,-470,-76,-472,-93,-480,-104,-492,-106,-504"/><b t="n" v="-178,-568,-168,-570,-28,-564,-24,-550,-28,-540,-47,-536,-57,-538,-91,-539,-129,-533,-163,-528,-171,-532,-181,-556"/><b t="n" v="165,-592,171,-581,171,-562,169,-553,153,-547,128,-551,106,-553,62,-546,44,-556,39,-575,43,-583"/><p pos="220,-173"/><p pos="-204,-175"/><p pos="-188,-174"/><p pos="205,-173"/><p pos="138,-726"/><p pos="-155,-722"/><rp path="(-145,-264)>(143,-264)" loop="n"/><l p1="81,-558" p2="79,-347"/><l p1="-173,-649" p2="-174,-349"/><l p1="-153,-544" p2="-152,-407"/><l p1="-15,-497" p2="-13,-407"/><l p1="24,-646" p2="28,-410"/><l p1="131,-489" p2="131,-413"/><l p1="-44,-643" p2="-45,-551"/><l p1="-69,-648" p2="-66,-492"/><l p1="-120,-650" p2="-120,-551"/><l p1="4,-652" p2="5,-496"/><l p1="156,-651" p2="157,-578"/><l p1="100,-646" p2="100,-568"/><c t="s1" pos="57,-528"/><c t="s1" pos="-112,-442"/><c t="s1" pos="-100,-584"/><c t="s1" pos="121,-605"/><c t="s1" pos="61,-439"/><ao pos="9,14" t="f"/></level>
;
levelData["e24d8607d4be3724f770134b50163b23.xml"] = <level el="-586" er="878" et="-575" sy="0" cx="58" cy="-375" ht=""><b t="i" v="-71,-516,-57,-524,-28,-525,-14,-512,-6,-487,-1,-464,-3,-457,-80,-454,-81,-463,-78,-480"/><b t="i" v="171,-507,183,-515,219,-516,235,-507,246,-477,245,-468,235,-443,171,-443,157,-475,157,-485"/><b t="i" v="-216,-627,365,-617,309,-560,151,-526,-120,-532,-246,-588"/><b t="i" v="-597,-507,-559,-441,-548,-414,-528,-405,-486,-408,-442,-406,-410,-409,-227,-409,-219,-396,-219,-385,-242,-375,-306,-366,-363,-354,-377,-355,-440,-370,-529,-372,-542,-361,-553,-338,-564,-290,-560,-154,-543,55,-653,48,-659,-236"/><b t="n" v="660,-385,665,-387,789,-383,823,-387,854,-409,945,-441,981,-388,892,-343,978,54,798,64,848,-71,848,-246,833,-336,775,-353,705,-359,679,-365,669,-370"/><b t="n" v="629,-300,651,-293,677,-272,705,-270,736,-276,757,-289,784,-300,781,-275,770,-245,735,-221,673,-221,646,-242,633,-266"/><b t="n" v="22,-449,121,-449,133,-440,139,-419,139,-395,136,-381,84,-371,35,-373,18,-376,5,-396,3,-427,11,-444"/><p pos="292,-590"/><p pos="-172,-598"/><p pos="-604,-383"/><p pos="-594,-328"/><p pos="922,-379"/><p pos="955,-414"/><rp path="(703,-248)>(-381,-247)" loop="n"/><l p1="-47,-563" p2="-45,-509"/><l p1="43,-411" p2="44,-561"/><l p1="204,-557" p2="202,-499"/><l p1="96,-560" p2="95,-412"/><c t="f1" pos="-41,-483"/><c t="f1" pos="203,-470"/><ao pos="422,12" t="f"/></level>
;
levelData["fa3416b96abc725ef6eec4c942c15bec.xml"] = <level el="-624" er="810" et="-828" sy="0" cx="-226" cy="-552" ht="bouncy"><b t="u" v="-221,-215,-208,-215,-192,-210,19,-208,32,-211,47,-209,57,-200,55,-186,59,-176,53,-166,23,-167,12,-163,-1,-163,-12,-166,-27,-162,-46,-164,-53,-156,-62,-156,-71,-151,-80,-153,-83,-160,-95,-160,-105,-161,-121,-170,-131,-169,-142,-168,-154,-174,-184,-172,-199,-170,-213,-164,-224,-164,-232,-172,-232,-181,-237,-189,-234,-205"/><b t="i" v="35,-162,60,-162,70,-134,68,-107,63,-93,76,-55,101,48,65,76,-52,72,-49,-20,-40,-39,-32,-45,1,-57,8,-63,22,-90,18,-107,20,-120,25,-134"/><b t="n" v="-146,-860,-56,-851,45,-848,42,-780,25,-694,3,-676,-18,-634,-41,-618,-64,-618,-103,-644,-127,-673,-156,-700,-193,-841"/><b t="i" v="-86,-552,-56,-561,-22,-552,-13,-518,-22,-488,-55,-477,-86,-488,-98,-523"/><b t="n" v="767,-671,797,-706,821,-710,842,85,693,46,693,-26,703,-57,711,-182,742,-505,741,-534,754,-619"/><b t="n" v="-624,-850,-598,-806,-591,-750,-568,-725,-536,-701,-449,-585,-229,-338,-229,-323,-241,-301,-254,-262,-257,-206,-262,-197,-288,-173,-319,-163,-336,-151,-378,-75,-406,69,-641,69,-657,-243,-589,-249,-529,-253,-485,-253,-468,-259,-451,-279,-448,-295,-450,-334,-468,-349,-495,-354,-536,-355,-664,-357,-682,-704"/><b t="i" v="-456,-657,-419,-670,-385,-655,-376,-624,-392,-586,-424,-577,-452,-591,-464,-621"/><b t="i" v="-195,-166,-188,-172,-178,-167,-168,-153,-107,-32,-93,71,-191,90,-277,73,-239,-45,-210,-139"/><p pos="-27,57"/><p pos="45,57"/><p pos="-144,-841"/><p pos="-25,-841"/><p pos="823,-88"/><p pos="810,-699"/><p pos="-642,-230"/><p pos="-652,-567"/><p pos="-140,59"/><p pos="-227,71"/><p pos="-138,-192"/><p pos="-431,55"/><p pos="-612,56"/><p pos="-645,-375"/><l p1="-58,-549" p2="-58,-633"/><l p1="-441,-645" p2="-530,-662"/><c t="f1" pos="-55,-517"/><c t="f1" pos="-427,-620"/><ao pos="550,11" t="f"/><ao pos="-501,-252" t="hs"/></level>
;
levelData["87f4a67df5246872b99ef73506aee0c5.xml"] = <level el="-400" er="880" et="-493" sy="0" cx="0" cy="-250" ht=""><b t="u" v="242,-464,241,-421,225,-408,25,-415,5,-406,-14,-407,-26,-414,-350,-421,-353,-428,-355,-462,-352,-469,-300,-471,-32,-467,-17,-475,4,-474,23,-468,233,-467"/><b t="i" v="255,-516,334,-515,342,-456,337,-393,334,-369,318,-325,307,-293,287,-287,276,-292,260,-317,253,-335,248,-342,213,-352,101,-358,84,-363,76,-378,76,-395,84,-407,160,-405,224,-402,249,-410,251,-476"/><b t="i" v="48,-139,55,-138,82,-134,96,-120,101,-97,108,-14,130,91,29,88"/><b t="i" v="-412,-502,-372,-521,-360,-475,-368,-428,-363,-414,-300,-410,-285,-408,-280,-393,-280,-367,-292,-355,-318,-347,-347,-351,-415,-320,-414,-356"/><b t="i" v="833,-578,888,-582,889,91,821,84"/><p pos="-2,-442"/><p pos="106,-385"/><p pos="320,-506"/><p pos="269,-505"/><p pos="57,66"/><p pos="104,67"/><p pos="-405,-466"/><p pos="-408,-378"/><p pos="862,-544"/><p pos="855,66"/><p pos="69,-25"/><c t="f1" pos="293,-418"/><ao pos="676,3" t="f"/></level>
;
levelData["d0c06a09e98c6cfcf2fb02087c8afe72.xml"] = <level el="-358" er="592" et="-532" sy="2.375" cx="40" cy="-250" ht=""><b t="i" v="-48,-240,0,-240,24,-240,27,-221,32,-242,109,-237,114,-231,118,-235,176,-240,202,-175,160,-96,-16,-96,-49,-174"/><b t="n" v="-393,-559,342,-558,346,-529,339,-506,329,-500,276,-477,-287,-280,-321,-255,-340,-221,-383,58,-404,-255"/><b t="n" v="390,-554,432,-557,620,-559,628,-488,628,-398,610,-365,579,-372,568,-399,561,-424,541,-464,431,-486,396,-498,389,-510,391,-533"/><b t="n" v="-16,-96,160,-96,202,-175,215,-175,172,-83,136,-64,72,-56,21,-67"/><p pos="-72,-548"/><p pos="323,-543"/><p pos="602,-540"/><p pos="609,-396"/><p pos="-374,-287"/><p pos="-378,-545"/><p pos="33,-83"/><p pos="101,-84"/><p pos="407,-540"/><p pos="-379,-130"/><l p1="-13,-291" p2="-14,-231"/><l p1="-14,-231" p2="16,-288"/><l p1="175,-209" p2="185,-257"/><l p1="127,-208" p2="123,-263"/><l p1="149,-229" p2="146,-283"/><l p1="101,-154" p2="51,-272"/><l p1="72,-310" p2="101,-154"/><l p1="84,-255" p2="101,-154"/><l p1="-14,-231" p2="-37,-290"/><l p1="101,-154" p2="99,-289"/><c t="f1" pos="-10,-200"/><c t="f1" pos="73,-147"/><c t="f1" pos="151,-208"/><ao pos="-13,-291" t="b"/><ao pos="16,-288" t="b"/><ao pos="123,-263" t="b"/><ao pos="185,-257" t="b"/><ao pos="146,-283" t="b"/><ao pos="372,74" t="f"/><ao pos="51,-272" t="b"/><ao pos="84,-255" t="b"/><ao pos="72,-310" t="b"/><ao pos="-37,-290" t="b"/><ao pos="99,-289" t="b"/></level>
;
levelData["364b22563150a4e638e341590c4f4bfb.xml"] = <level el="-450" er="191" et="-360" sy="2.6875" cx="-108" cy="-151" ht=""><b t="i" v="-32,-240,-5,-243,56,-246,92,-246,124,-243,120,-226,102,-217,47,-209,44,-198,51,-178,56,-181,111,-183,113,-168,98,-159,54,-155,49,-142,57,-123,113,-121,123,-107,115,-92,48,-90,21,-89,-7,-92,-32,-96,-38,-113,-40,-166,-41,-217"/><p pos="-16,-112"/><p pos="32,-112"/><p pos="32,-176"/><c t="s1" pos="71,-196"/><ao pos="-225,86" t="f"/></level>
;
levelData["47e875c2e639b8aadb7af593ded489b2.xml"] = <level el="-442" er="400" et="-500" sy="2.4375" cx="-25" cy="-255" ht=""><b t="n" v="3,-258,7,-251,17,-199,27,-196,41,-195,48,-204,47,-254,49,-262,59,-273,68,-275,72,-267,78,-198,76,-187,65,-181,-138,-174,-141,-145,-149,-140,-179,-141,-182,-149,-182,-196,-179,-210,-170,-214,-148,-216,-105,-218,-92,-218,-24,-208,-18,-211,-6,-254"/><b t="n" v="-36,-527,92,-529,93,-503,76,-475,70,-442,64,-432,40,-427,23,-425,0,-432,-9,-443,-13,-476,-28,-497"/><b t="i" v="-366,-117,-365,-147,-357,-172,-352,-179,-320,-181,-306,-169,-300,-148,-304,-117,-299,-109,-290,-99,-103,-42,-95,-34,-102,-13,-115,-5,-246,-4,-292,-8,-383,-3,-394,-5,-399,-14,-380,-63"/><b t="n" v="-206,-124,-199,-129,-144,-128,-137,-121,-133,-108,-140,-88,-138,-72,-144,-64,-176,-64,-196,-77,-208,-96"/><b t="n" v="96,-91,103,-95,133,-85,162,-63,200,-48,216,-37,224,-32,224,-16,217,-13,196,-16,164,-15,148,-12,130,-13,122,-15,99,-26,96,-32,95,-50,101,-71"/><b t="u" v="-112,-176,-64,-176,-48,-160,-48,-112,-112,-112"/><p pos="-92,-151"/><p pos="-71,-151"/><p pos="-32,-192"/><p pos="5,-513"/><p pos="44,-516"/><p pos="-156,-112"/><p pos="-187,-112"/><p pos="-240,-48"/><p pos="120,-64"/><p pos="192,-32"/><l p1="16,-448" p2="16,-368"/><l p1="48,-448" p2="48,-304"/><c t="s1" pos="16,-368"/><ao pos="48,-304" t="bomb"/><ao pos="59,76" t="f"/></level>
;
levelData["c13adfd39ac8dbacd6ad1e74e06fc77f.xml"] = <level el="-161" er="693" et="-488" sy="0" cx="359" cy="-183" ht=""><b t="i" v="-96,-304,32,-304,48,-288,48,-160,32,-144,-96,-144,-112,-160,-112,-288"/><b t="i" v="424,-312,440,-328,584,-328,600,-312,600,-168,584,-152,440,-152,424,-168"/><p pos="-96,-256"/><p pos="-96,-224"/><p pos="-96,-192"/><p pos="32,-256"/><p pos="32,-224"/><p pos="32,-192"/><p pos="480,-320"/><p pos="512,-320"/><p pos="544,-320"/><p pos="432,-272"/><p pos="432,-240"/><p pos="432,-208"/><p pos="480,-160"/><p pos="544,-160"/><p pos="512,-160"/><p pos="592,-208"/><p pos="592,-240"/><p pos="592,-272"/><c t="f1" pos="-32,-224"/><c t="f1" pos="512,-240"/><ao pos="266,5" t="f"/></level>
;
levelData["1f0e6cda8af3e86d940ec57a05348aa8.xml"] = <level el="-284" er="643" et="-434" sy="0.125" cx="-9" cy="-234" ht="forcerunes"><b t="d" v="-144,-112,-21,-139,15,-184,37,-208,78,-230,113,-234,141,-235,169,-231,201,-223,232,-205,279,-169,301,-149,313,-129,295,-134,261,-129,236,-106,206,-43,199,27,211,73,-163,86,-157,-24,-156,-36,-145,-26,-95,-21,-83,-23,-72,-28,-65,-38,-63,-56,-71,-67,-86,-79,-115,-78,-136,-72,-155,-64,-150,-97"/><b t="i" v="-124,-189,-98,-190,-89,-186,-86,-158,-80,-140,-78,-126,-107,-119,-129,-126,-131,-156,-132,-180"/><b t="d" v="-210,-461,-146,-461,409,-465,386,-400,353,-338,341,-326,310,-334,252,-369,164,-393,-146,-397,-210,-397"/><b t="f" v="-336,-464,-210,-461,-210,-399,-203,-385,-200,-367,-219,-358,-246,-353,-224,-344,-208,-329,-223,-311,-248,-296,-223,-288,-209,-276,-219,-261,-246,-241,-220,-234,-206,-228,-208,-210,-234,-185,-198,-191,-181,-189,-180,-172,-198,-140,-164,-155,-147,-157,-144,-142,-144,-111,-151,-95,-156,-53,-164,86,-338,89"/><b t="i" v="-44,-320,-36,-295,-62,-290,-68,-310"/><b t="n" v="683,82,608,85,595,-25,580,-61,551,-74,519,-86,507,-118,496,-179,495,-310,482,-407,464,-465,490,-522,673,-532"/><p pos="302,-443"/><p pos="-190,-449"/><p pos="-319,76"/><p pos="-320,-448"/><p pos="538,-516"/><p pos="654,-515"/><p pos="616,63"/><p pos="668,63"/><p pos="658,-241"/><p pos="-146,69"/><p pos="190,65"/><p pos="1,64"/><p pos="100,67"/><p pos="-311,-205"/><p pos="-198,70"/><p pos="-228,-449"/><l p1="-112,-182" p2="-130,-201"/><l p1="-55,-346" p2="-53,-312"/><l p1="-56,-296" p2="-48,-273"/><l p1="-112,-182" p2="-99,-206"/><c t="s1" pos="-48,-273"/><c t="f1" pos="-109,-158"/><ao pos="406,10" t="f"/><ao pos="-130,-201" t="b"/><ao pos="-55,-346" t="b"/><ao pos="-99,-206" t="b"/><ao pos="-107,-21" t="hs"/></level>
;
levelData["16c93ffeefaa9afc70fb445e9623d568.xml"] = <level el="-451" er="510" et="-518" sy="3.125" cx="-147" cy="-232" ht=""><b t="n" v="-325,123,-318,25,-320,6,-335,-37,-331,-40,-319,-41,-316,-47,-313,-58,-306,-60,-64,-42,101,-12,112,-1,110,6,98,15,84,17,74,27,83,42,85,121"/><b t="u" v="-373,-196,-310,-59,-312,-56,-314,-45,-321,-39,-331,-39,-336,-35,-343,-28,-351,-25,-361,-26,-368,-30,-371,-40,-369,-50,-375,-57,-380,-64,-387,-63,-396,-67,-400,-75,-395,-87,-402,-90,-407,-97,-404,-109,-407,-117,-403,-125,-402,-137,-397,-142,-395,-156,-388,-166,-390,-178,-385,-188,-380,-197"/><b t="i" v="-345,-398,-284,-398,-279,-391,-271,-396,-164,-399,-156,-392,-150,-399,-131,-399,-111,-398,-65,-397,-59,-386,-56,-362,-69,-347,-149,-346,-157,-352,-163,-346,-268,-345,-274,-351,-283,-344,-320,-345,-335,-355,-350,-390"/><b t="i" v="-206,-109,-179,-112,-162,-110,-161,-103,-160,-66,-168,-52,-222,-55,-226,-63,-226,-105,-223,-111"/><b t="n" v="-438,-541,-3,-542,-9,-505,-16,-491,-58,-453,-69,-448,-132,-451,-149,-451,-190,-442,-205,-440,-279,-454,-360,-446,-385,-452,-402,-461,-441,-497"/><b t="n" v="-475,-292,-455,-336,-424,-304,-405,-262,-391,-251,-381,-232,-373,-195,-381,-196,-389,-177,-388,-166,-393,-158,-400,-170,-417,-180,-456,-186,-479,-224"/><p pos="-312,112"/><p pos="4,110"/><p pos="-429,-506"/><p pos="-303,-532"/><p pos="-337,-71"/><p pos="-372,-135"/><p pos="-90,-534"/><p pos="-207,-532"/><p pos="-463,-282"/><p pos="-466,-238"/><l p1="-332,-468" p2="-332,-387"/><l p1="-297,-462" p2="-297,-387"/><l p1="-82,-455" p2="-82,-389"/><l p1="-101,-456" p2="-101,-387"/><l p1="-192,-458" p2="-192,-385"/><l p1="-228,-458" p2="-228,-385"/><c t="f1" pos="-131,-369"/><c t="f1" pos="-194,-82"/><ao pos="257,108" t="f"/></level>
;
levelData["0235e703bbffa2bbebb85d5c503fbc44.xml"] = <level el="-352" er="225" et="-471" sy="2.25" cx="-67" cy="-271" ht="chain"><b t="n" v="-264,-343,-200,-343,-142,-257,-145,-249,-154,-248,-243,-262,-375,-256,-393,-252,-394,-346,-367,-349"/><b t="n" v="48,-347,64,-348,107,-349,121,-353,134,-359,143,-363,154,-362,164,-358,177,-354,191,-352,254,-351,250,-246,108,-247,-16,-244,75,-294,24,-327,36,-339"/><b t="i" v="-199,-344,-231,-343,-241,-349,-246,-365,-230,-376,87,-374,93,-368,89,-354,81,-348,45,-349,22,-326,73,-294,-18,-243,106,-248,115,-242,112,-225,104,-216,-240,-212,-252,-227,-258,-261,-239,-262,-144,-246,-139,-252"/><p pos="-374,-274"/><p pos="-377,-333"/><p pos="239,-335"/><p pos="238,-259"/><ml p1="-234,-311" p2="83,-312"/><c t="s1" pos="-69,-391"/><ao pos="-40,70" t="f"/><ao pos="147,-361" t="hs"/></level>
;
levelData["be03291768796d602a7375fe11492e97.xml"] = <level el="-400" er="400" et="-627" sy="0" ht=""><b t="i" v="174,-322,263,-325,273,-319,277,-267,270,-208,261,-198,189,-199,181,-205,167,-256,169,-311"/><b t="i" v="31,-200,128,-197,133,-190,125,-105,119,-98,34,-100,30,-116,23,-184"/><b t="i" v="188,-129,235,-129,240,-118,232,-25,171,-24,171,-78,179,-112"/><b t="i" v="47,-100,113,-98,116,-89,110,-23,46,-23,43,-89"/><b t="i" v="46,-321,62,-324,130,-323,133,-312,123,-253,122,-207,115,-198,51,-198,46,-208,49,-256,39,-307"/><b t="i" v="81,-386,205,-392,211,-383,223,-333,221,-324,179,-322,156,-327,85,-322,78,-332,80,-352,77,-372"/><b t="i" v="36,-464,47,-467,94,-464,176,-475,233,-468,238,-452,237,-405,230,-394,44,-384,40,-393,35,-453"/><b t="i" v="136,-192,149,-199,271,-200,280,-192,275,-140,251,-129,147,-129,132,-139,131,-153"/><ml p1="77,-179" p2="83,-235"/><ml p1="210,-272" p2="205,-102"/><ml p1="69,-215" p2="229,-218"/><ml p1="197,-76" p2="91,-78"/><ml p1="104,-358" p2="104,-420"/><ml p1="200,-298" p2="200,-333"/><ml p1="112,-160" p2="146,-163"/><c t="f1" pos="85,-287"/><c t="f1" pos="149,-356"/><ao pos="138,11" t="f"/></level>
;
levelData["df3dd746ddd099a4b4ab504d9c8118ca.xml"] = <level el="-263" er="287" et="-728" sy="7.09375" cx="12" cy="-528" ht=""><b t="d" v="-83,-383,127,-385,140,-382,144,-372,137,-343,121,-333,-88,-332,-96,-341,-92,-376"/><b t="i" v="-45,-762,145,-783,143,-697,133,-530,117,-627,106,-552,98,-637,85,-650,82,-708,78,-669,75,-652,63,-625,43,-650,36,-673,27,-655,8,-608,2,-594,-9,-611,-19,-669,-24,-688,-33,-652,-45,-621,-56,-608,-65,-634,-71,-661,-109,-698,-134,-764"/><b t="d" v="9,-265,36,-258,48,-249,48,-56,38,-38,9,-49,0,-65,0,-246"/><b t="n" v="-293,-748,-136,-772,-118,-721,-111,-685,-108,-639,-115,-610,-119,-580,-98,-538,-100,-425,-107,-368,-108,-304,-106,-279,-96,80,-102,88,-169,127,-177,139,-167,299,-299,299"/><b t="n" v="144,-784,320,-774,306,100,264,97,212,120,170,116,151,97,145,92,144,-284,157,-356,155,-393,144,-416"/><p pos="-77,-753"/><p pos="77,-745"/><p pos="-284,289"/><p pos="-279,-738"/><p pos="-154,-745"/><p pos="163,-751"/><p pos="301,-751"/><p pos="298,83"/><p pos="301,-375"/><p pos="-281,-352"/><p pos="-186,287"/><l p1="-67,-672" p2="-33,-588"/><l p1="62,-650" p2="41,-588"/><l p1="5,-638" p2="41,-588"/><tp pos="27,-358" sp="2"/><tp pos="24,-152" sp="2"/><c t="s1" pos="-33,-588"/><c t="s1" pos="41,-588"/><ao pos="25,231" t="f"/></level>
;
levelData["866311c4835e3291751aeb6764c75e22.xml"] = <level el="-400" er="529" et="-644" sy="0" cx="0" cy="-250" ht="grabberbuoyant"><b t="n" v="-6,-213,16,-224,41,-213,48,-192,38,-170,13,-160,-8,-173,-16,-192"/><b t="n" v="119,-211,144,-224,165,-211,176,-193,164,-170,144,-160,122,-171,112,-192"/><b t="j" v="-32,-240,0,-240,0,-208,-32,-208"/><b t="j" v="32,-240,64,-240,64,-208,32,-208"/><b t="j" v="96,-240,128,-240,128,-208,96,-208"/><b t="j" v="160,-240,192,-240,192,-208,160,-208"/><b t="j" v="160,-176,192,-176,192,-144,160,-144"/><b t="j" v="96,-176,128,-176,128,-144,96,-144"/><b t="j" v="32,-176,64,-176,64,-144,32,-144"/><b t="j" v="-32,-176,0,-176,0,-144,-32,-144"/><b t="b" v="2,-50,17,-56,40,-57,66,-50,70,-37,71,2,66,14,49,22,15,19,2,14,-8,-4,-7,-35"/><b t="i" v="68,-225,91,-224,112,-204,111,-181,90,-161,68,-160,48,-179,48,-203"/><b t="n" v="-169,-689,-48,-685,-82,-608,-89,-604,-138,-601,-150,-607,-167,-654"/><b t="i" v="-414,-626,-351,-467,-228,-215,-182,-104,-175,-94,-46,70,-436,67,-429,-59,-356,-59,-327,-61,-300,-70,-288,-82,-283,-94,-282,-107,-291,-124,-309,-136,-342,-144,-383,-157,-412,-172,-428,-195"/><b t="b" v="-139,-498,-116,-502,-81,-495,-75,-486,-72,-463,-77,-441,-81,-431,-111,-424,-144,-431,-151,-438,-152,-462,-145,-492"/><p pos="-352,62"/><p pos="-65,60"/><p pos="-142,-670"/><p pos="-70,-675"/><l p1="-16,-224" p2="48,-224"/><l p1="112,-224" p2="176,-224"/><l p1="176,-160" p2="176,-224"/><l p1="48,-160" p2="112,-160"/><l p1="-16,-160" p2="48,-160"/><l p1="-16,-224" p2="-16,-160"/><l p1="48,-224" p2="112,-224"/><l p1="112,-160" p2="176,-160"/><l p1="-115,-626" p2="-115,-491"/><tp pos="16,-192" sp="4"/><tp pos="144,-192" sp="4"/><c t="f1" pos="33,-22"/><c t="f1" pos="80,-190"/><c t="f1" pos="-112,-458"/><ao pos="356,8" t="f"/><ao pos="-344,-58" t="hs"/></level>
;
levelData["a1a4678bf139514003d6dd0e3ac05e43.xml"] = <level el="-197" er="552" et="-621" sy="-0.15625" cx="51" cy="-265" ht="doubleconnect"><b t="n" v="20,-349,37,-353,54,-365,65,-355,58,-329,36,-320,34,-260,39,-191,36,-168,39,-135,34,-127,16,-127,17,-325"/><b t="n" v="-16,-480,0,-484,16,-480,17,-452,18,-400,15,-359,-3,-352,-16,-361,-19,-379,-15,-405,-19,-452"/><b t="n" v="93,-197,113,-197,124,-218,135,-197,155,-196,158,-188,158,-142,155,-132,91,-132,88,-140,89,-186"/><b t="j" v="15,-194,15,-129,-17,-130,-17,-193,-10,-210,-16,-218,-16,-233,-10,-243,10,-243,15,-234,15,-219,8,-210"/><b t="i" v="126,-131,160,-131,334,-129,343,-130,400,-160,415,-165,424,-163,431,-150,427,-137,422,-124,415,-66,409,-63,393,-92,382,-90,344,-79,197,-89,143,-95,127,-103,71,-91,54,-89,48,-52,43,-48,14,-86,3,-85,-5,-56,-10,-56,-22,-80,-33,-79,-46,-84,-50,-100,-43,-120,-35,-127,39,-129,61,-128"/><b t="w" v="272,-352,271,-328,104,-332,104,-352"/><b t="n" v="-40,-271,-41,-316,-60,-331,-58,-352,-49,-356,-24,-346,-18,-330,-18,-130,-35,-128,-42,-209"/><b t="n" v="222,-329,241,-328,247,-307,248,-271,246,-168,236,-161,226,-165,216,-197,224,-286"/><b t="n" v="9,-679,37,-684,38,-606,32,-593,12,-594,9,-613"/><b t="n" v="-215,-52,-181,-57,-169,-64,-160,-74,-149,-78,-138,-76,-124,-48,-112,-31,-98,-2,-85,68,-225,68"/><p pos="-30,-301"/><p pos="-29,-165"/><p pos="23,-301"/><p pos="26,-169"/><p pos="258,-341"/><p pos="235,-177"/><p pos="235,-288"/><p pos="19,-666"/><p pos="21,-637"/><p pos="-209,-36"/><p pos="-211,56"/><p pos="-108,56"/><ml p1="25,-317" p2="231,-317"/><ml p1="25,-318" p2="24,-607"/><tp pos="0,-464" sp="-4"/><c t="s1" pos="136,-366"/><c t="f1" pos="228,-110"/><ao pos="242,-2" t="f"/><ao pos="-149,-73" t="hs"/></level>
;
levelData["a6c0a4d1b1cd89c30703455e0862390d.xml"] = <level el="-396" er="400" et="-465" sy="0" cx="-121" cy="-265" ht=""><b t="d" v="-424,-490,446,-494,443,-471,384,-394,319,-344,282,-336,271,-336,263,-340,245,-367,235,-370,226,-369,155,-336,133,-309,125,-306,119,-313,67,-440,62,-442,55,-438,-5,-352,-14,-347,-23,-346,-61,-376,-90,-385,-111,-387,-200,-389,-210,-389,-220,-385,-242,-380,-250,-370,-260,-369,-309,-394,-422,-461"/><b t="d" v="-421,-353,-398,-330,-384,-297,-380,-278,-368,-153,-325,-67,-317,-64,-310,-66,-215,-139,-198,-143,-39,-94,-27,-93,-13,-97,12,-112,31,-110,36,-102,37,-92,45,66,-429,65"/><b t="d" v="348,1,354,-114,391,-127,421,-147,418,78,330,82"/><b t="n" v="-336,-224,-272,-224,-273,-212,-285,-205,-326,-204,-338,-213"/><b t="j" v="-93,-341,-84,-350,-62,-355,-50,-352,-41,-325,-46,-313,-81,-309,-91,-315"/><b t="j" v="-208,-368,-192,-384,-176,-368,-176,-320,-192,-304,-208,-320"/><p pos="414,-108"/><p pos="406,66"/><p pos="371,68"/><p pos="19,60"/><p pos="-420,58"/><p pos="-416,-180"/><p pos="-409,-470"/><p pos="22,-488"/><p pos="422,-469"/><p pos="-329,-216"/><p pos="-282,-216"/><l p1="-13,-378" p2="-61,-341"/><tp pos="-192,-345" sp="-4"/><c t="s1" pos="-304,-240"/><c t="s1" pos="-303,-266"/><c t="s1" pos="-302,-292"/><ao pos="203,6" t="f"/></level>
;
levelData["81e70c2dd46e2fdd7abc103f67d895b2.xml"] = <level el="-400" er="854" et="-500" sy="0" cx="-32" cy="-253" ht=""><b t="i" v="464,-368,544,-368,544,-349,522,-352,519,-160,512,-144,496,-144,489,-160,486,-352,464,-349"/><b t="i" v="-128,-368,-48,-368,-48,-349,-70,-352,-73,-160,-80,-144,-96,-144,-103,-160,-106,-352,-128,-349"/><b t="d" v="-11,-415,15,-415,32,-410,43,-401,48,-387,48,-360,42,-354,6,-353,-6,-357,-14,-367,-16,-380,-16,-411"/><b t="d" v="383,-414,397,-416,426,-415,431,-410,432,-380,429,-366,421,-357,410,-353,374,-354,368,-360,368,-388,372,-403"/><p pos="-88,-167"/><p pos="32,-368"/><p pos="0,-400"/><p pos="504,-164"/><p pos="384,-368"/><p pos="416,-400"/><c t="s1" pos="-87,-383"/><c t="s1" pos="505,-382"/><ao pos="199,4" t="f"/></level>
;
levelData["1797ab8add894ab96351b53599802490.xml"] = <level el="-527" er="400" et="-807" sy="0" cx="-125" cy="-300" ht=""><b t="i" v="-47,-336,13,-335,9,-250,0,-212,-16,-192,-29,-198,-38,-236"/><b t="n" v="-50,-159,-42,-174,-3,-176,14,-164,10,-136,-2,-120,-25,-112,-38,-119,-48,-133"/><b t="j" v="-53,-422,-47,-515,-21,-527,9,-516,25,-441,24,-401,26,-390,16,-350,-48,-350,-56,-377,-55,-400"/><b t="i" v="-418,-481,-354,-480,-354,-459,-367,-380,-385,-336,-399,-328,-410,-339,-419,-420"/><b t="i" v="-174,-683,-113,-681,-120,-577,-123,-564,-134,-536,-138,-530,-145,-533,-152,-541,-169,-590,-169,-600"/><b t="n" v="-168,-513,-141,-521,-118,-512,-108,-489,-113,-464,-139,-454,-169,-464,-174,-490"/><b t="n" v="-175,-752,-161,-763,-141,-765,-120,-759,-109,-744,-106,-721,-111,-688,-175,-688,-182,-708,-182,-733"/><b t="n" v="-417,-549,-400,-556,-375,-556,-353,-549,-348,-526,-353,-485,-417,-485,-424,-522"/><p pos="-16,-304"/><p pos="-17,-405"/><p pos="-16,-320"/><p pos="-390,-471"/><p pos="-390,-456"/><p pos="-143,-754"/><p pos="-388,-539"/><p pos="-142,-671"/><p pos="-142,-652"/><ml p1="-41,-358" p2="3,-156"/><ml p1="7,-359" p2="-41,-156"/><ml p1="-20,-140" p2="-20,-368"/><ml p1="-141,-493" p2="-143,-723"/><c t="f1" pos="-16,-265"/><c t="f1" pos="-142,-581"/><ao pos="-86,3" t="f"/></level>
;
levelData["a5c9f2e7a7f7588b0676bcb792c78fc0.xml"] = <level el="-35" er="959" et="-624" sy="3.3125" cx="240" cy="-318" ht="pinnable"><b t="p" v="137,-400,171,-401,177,-320,172,-251,175,-176,172,-64,130,-65,127,-78,128,-159,133,-235,133,-300,135,-370"/><b t="i" v="125,-66,176,-65,193,-7,214,44,224,49,248,59,259,69,266,81,291,183,53,183,78,94,96,47,105,28,114,-34"/><b t="i" v="96,-646,221,-649,221,-585,209,-516,198,-462,175,-400,128,-401,125,-463,117,-558,100,-606"/><b t="i" v="242,-646,306,-646,304,-599,301,-588,279,-512,271,-503,264,-506,254,-550,250,-591"/><b t="i" v="318,-648,382,-648,372,-616,370,-568,353,-525,348,-521,339,-530,323,-600"/><b t="i" v="-18,-644,46,-644,34,-610,17,-577,3,-559,-4,-562,-11,-588,-11,-614"/><p pos="79,159"/><p pos="220,161"/><p pos="105,-635"/><p pos="190,-638"/><p pos="263,-635"/><p pos="287,-638"/><p pos="-8,-635"/><p pos="25,-634"/><p pos="333,-639"/><p pos="360,-636"/><c t="f1" pos="162,-477"/><ao pos="596,117" t="f"/><ao pos="234,58" t="hs"/></level>
;
levelData["4d7413afd34244837cc7323d544b4519.xml"] = <level el="-400" er="557" et="-753" sy="0" cx="20" cy="-384" ht="squarewomen"><b t="p" v="127,-287,126,-260,119,-255,-84,-256,-94,-260,-96,-286,-85,-290,117,-289"/><b t="d" v="-160,-336,-152,-341,-91,-345,-82,-340,-94,-320,-104,-288,-106,-259,-152,-229,-159,-228,-164,-232,-170,-246,-173,-270,-169,-307"/><b t="d" v="85,-172,109,-192,180,-168,168,-146,144,-122,114,-108,81,-100,11,-95,-34,-102,-63,-110,-80,-121,-85,-131,-59,-184,-39,-168,-18,-159,9,-153,34,-153,60,-160"/><b t="n" v="117,-208,187,-189,188,-182,180,-168,109,-190"/><b t="d" v="122,-321,216,-316,216,-285,132,-293,128,-308"/><b t="n" v="-92,-788,-11,-782,-13,-715,-17,-478,-12,-445,-7,-409,-11,-386,-24,-382,-47,-373,-66,-360,-80,-384"/><b t="n" v="66,-777,130,-778,132,-351,113,-338,98,-358,78,-375,52,-386,54,-408,70,-485"/><b t="n" v="132,-294,217,-285,209,-238,203,-228,191,-236,185,-263"/><b t="d" v="0,-631,51,-633,51,-579,1,-579"/><p pos="-123,-320"/><p pos="-60,-137"/><p pos="-133,-264"/><p pos="163,-162"/><p pos="169,-182"/><p pos="123,-196"/><p pos="144,-305"/><p pos="206,-300"/><p pos="-53,-419"/><p pos="92,-417"/><p pos="113,-766"/><p pos="-72,-774"/><p pos="197,-246"/><p pos="176,-278"/><tp pos="16,-272" sp="2"/><c t="s1" pos="28,-498"/><c t="s1" pos="25,-715"/><ao pos="341,-2" t="f"/><ao pos="25,-450" t="fwls"/><ao pos="26,-544" t="fwls"/><ao pos="27,-667" t="fwls"/><ao pos="-119,-339" t="hs"/></level>
;
levelData["5332c1a9e86e2ce2e230916c6b0d9be8.xml"] = <level el="-285" er="947" et="-595" sy="0.3125" cx="-10" cy="-377" ht=""><b t="p" v="96,-320,102,-314,125,-268,128,-256,129,-238,127,-192,130,-137,128,-128,120,-134,98,-182,96,-192,94,-203,93,-286,93,-313"/><b t="n" v="208,-176,217,-178,246,-175,287,-177,317,-175,332,-178,346,-179,352,-176,348,-167,311,-147,304,-144,290,-143,260,-140,219,-144,166,-142,160,-144,166,-151"/><b t="i" v="-187,-481,-175,-493,-157,-495,-141,-492,-131,-481,-128,-465,-133,-448,-144,-436,-159,-432,-177,-436,-190,-450,-192,-467"/><b t="n" v="-80,-304,28,-307,37,-306,60,-295,64,-288,58,-283,25,-273,16,-272,-112,-272,-125,-281,-128,-288,-123,-293,-90,-302"/><b t="n" v="-299,-431,-239,-411,-193,-394,-166,-378,-130,-361,-124,-356,-125,-341,-131,-324,-135,-301,-134,-274,-129,-260,-131,-254,-140,-246,-157,-237,-308,-204,-311,-426"/><b t="n" v="-199,-617,-135,-617,-92,-612,-104,-588,-150,-548,-174,-556,-196,-573,-217,-606"/><b t="p" v="813,-216,816,-192,813,-168,808,-148,795,-130,783,-119,766,-108,752,-101,736,-98,720,-96,697,-99,673,-107,654,-122,642,-135,634,-150,626,-167,624,-192,627,-214,638,-231,644,-232,800,-232,807,-230"/><b t="i" v="740,-400,751,-412,768,-416,782,-413,793,-403,800,-384,795,-370,785,-357,768,-352,752,-356,741,-369,736,-384"/><b t="n" v="721,-620,835,-623,822,-581,795,-528,768,-510,755,-511,740,-533,705,-608"/><p pos="-299,-411"/><p pos="-185,-609"/><p pos="-143,-607"/><p pos="-300,-224"/><p pos="740,-608"/><p pos="803,-611"/><l p1="-157,-478" p2="-154,-565"/><l p1="768,-528" p2="768,-400"/><tp pos="-32,-288" sp="-4"/><tp pos="256,-160" sp="-4"/><tp pos="112,-224" sp="-4"/><tp pos="720,-192" sp="4"/><c t="f1" pos="-160,-457"/><c t="f1" pos="768,-380"/><ao pos="479,15" t="f"/></level>
;
levelData["be43c46e14aa185f3db344949039c4f0.xml"] = <level el="-399" er="611" et="-578" sy="0" cx="89" cy="-308" ht=""><b t="n" v="-10,-376,-12,-363,0,-352,-10,-345,-8,-331,-23,-331,-32,-320,-41,-330,-54,-328,-55,-343,-64,-352,-54,-360,-56,-374,-41,-372,-30,-384,-22,-374"/><b t="n" v="73,-373,96,-384,106,-372,119,-374,128,-352,117,-344,120,-331,96,-320,87,-331,72,-330,64,-352,76,-360"/><b t="n" v="72,-263,96,-272,119,-264,128,-240,120,-218,99,-208,71,-216,64,-240"/><b t="n" v="200,-376,224,-384,247,-376,256,-352,249,-330,225,-320,202,-329,192,-352"/><b t="n" v="200,-264,224,-272,248,-266,256,-240,248,-217,224,-208,200,-217,192,-240"/><b t="n" v="-184,-263,-160,-272,-139,-265,-128,-240,-136,-219,-160,-208,-184,-218,-192,-240"/><b t="n" v="-279,-340,-251,-348,-232,-342,-222,-315,-207,-268,-254,-283,-280,-293,-286,-315"/><b t="i" v="80,-418,95,-413,85,-425,102,-419,103,-430,134,-432,256,-432,290,-430,323,-413,308,-382,298,-368,285,-342,272,-366,263,-324,255,-353,247,-376,226,-383,215,-382,198,-385,194,-394,185,-385,173,-386,201,-375,193,-351,204,-330,196,-315,189,-320,179,-302,163,-334,147,-288,137,-315,120,-333,116,-344,127,-353,121,-370,131,-375,163,-387,141,-385,134,-392,131,-385,96,-383,81,-384,94,-396,79,-399,92,-404"/><b t="i" v="-120,-216,-96,-232,-58,-260,-32,-272,-5,-265,0,-240,-12,-215,-40,-197,-68,-175,-96,-160,-120,-169,-128,-192"/><p pos="-265,-327"/><p pos="-244,-305"/><p pos="276,-416"/><p pos="298,-390"/><l p1="117,-240" p2="203,-240"/><tp pos="-32,-352" sp="-4"/><tp pos="96,-352" sp="-4"/><tp pos="-32,-240" sp="4"/><tp pos="96,-240" sp="4"/><tp pos="224,-352" sp="-4"/><tp pos="224,-240" sp="4"/><tp pos="-160,-240" sp="4"/><tp pos="-96,-192" sp="4"/><c t="f1" pos="171,-407"/><ao pos="440,6" t="f"/></level>
;
levelData["997e824a41ff91cb6a29b346a156cde2.xml"] = <level el="-227" er="1177" et="-568" sy="2.9375" cx="75" cy="-347" ht=""><b t="p" v="-157,-412,107,-411,110,-403,103,-384,88,-367,31,-358,-26,-372,-48,-372,-70,-365,-89,-363,-101,-363,-152,-368,-163,-377,-168,-396,-166,-406"/><b t="p" v="108,-198,364,-198,368,-193,370,-180,366,-161,353,-156,326,-155,291,-161,263,-155,206,-158,182,-162,141,-152,109,-159,102,-172,102,-183"/><b t="p" v="653,-229,660,-223,660,-206,654,-193,631,-186,543,-190,470,-178,444,-179,420,-189,413,-199,417,-223,426,-230"/><b t="p" v="670,-415,834,-414,838,-407,837,-388,833,-380,776,-370,758,-372,738,-377,705,-372,675,-377,663,-389,663,-408"/><b t="i" v="836,-648,901,-571,872,-556,863,-534,851,-511,830,-492,813,-483,776,-491,762,-494,754,-491,742,-461,735,-458,727,-462,712,-496,695,-499,623,-493,578,-494,533,-506,517,-470,508,-466,502,-471,483,-515,402,-503,382,-500,328,-506,311,-500,291,-467,285,-462,278,-465,268,-511,262,-520,245,-526,228,-523,210,-490,204,-487,199,-490,181,-534,162,-540,35,-524,17,-525,-60,-533,-76,-529,-96,-517,-104,-519,-121,-532,-181,-521,-196,-521,-245,-526,-246,-600"/><p pos="781,-592"/><p pos="360,-610"/><p pos="-85,-591"/><p pos="627,-608"/><l p1="90,-550" p2="90,-400"/><l p1="-144,-548" p2="-144,-398"/><l p1="129,-550" p2="128,-182"/><l p1="352,-523" p2="351,-182"/><l p1="441,-522" p2="441,-213"/><l p1="640,-506" p2="640,-213"/><l p1="818,-508" p2="818,-399"/><l p1="683,-508" p2="683,-403"/><c t="s1" pos="-58,-428"/><c t="s1" pos="-16,-428"/><c t="s1" pos="747,-429"/><ao pos="991,107" t="f"/></level>
;
levelData["174fb36e10b7e2bdd3218641ef159497.xml"] = <level el="-198" er="713" et="-886" sy="-3.53125" cx="142" cy="-619" ht=""><b t="p" v="-39,-322,-32,-303,33,-305,136,-307,239,-306,311,-303,315,-324,307,-341,322,-341,329,-321,326,-277,319,-267,128,-263,-35,-267,-51,-276,-53,-293,-54,-327,-49,-343,-34,-343"/><b t="d" v="-36,-339,43,-340,101,-337,197,-340,250,-337,311,-338,316,-325,311,-303,217,-307,137,-306,48,-304,-33,-304,-39,-322"/><b t="i" v="188,-558,207,-565,229,-566,244,-563,253,-547,254,-527,249,-507,237,-495,213,-497,192,-500,183,-511,184,-538"/><b t="i" v="196,-651,208,-654,232,-654,241,-648,251,-634,254,-615,248,-601,232,-589,207,-587,197,-591,186,-604,186,-639"/><b t="i" v="189,-742,205,-750,238,-745,254,-730,254,-698,251,-683,238,-679,209,-678,193,-680,182,-692,183,-721"/><b t="i" v="13,-741,29,-747,57,-746,67,-740,78,-725,79,-699,67,-684,48,-676,15,-685,4,-698,5,-726"/><b t="i" v="28,-662,58,-661,67,-655,73,-633,74,-613,68,-603,51,-598,25,-597,10,-608,6,-626,7,-637,16,-656"/><b t="i" v="8,-562,21,-569,46,-570,61,-568,72,-551,74,-525,65,-506,53,-499,40,-500,24,-501,8,-513,3,-540"/><b t="i" v="187,-911,251,-911,257,-899,257,-862,251,-847,232,-841,204,-841,187,-847,181,-862,181,-894"/><b t="i" v="1,-915,65,-915,72,-900,70,-873,65,-851,47,-844,8,-848,-4,-864,-6,-897"/><p pos="52,-902"/><p pos="11,-903"/><p pos="137,-325"/><p pos="200,-900"/><p pos="241,-901"/><p pos="405,-920"/><p pos="473,-911"/><l p1="39,-861" p2="42,-790"/><l p1="41,-729" p2="42,-790"/><l p1="216,-644" p2="221,-693"/><l p1="218,-549" p2="219,-599"/><l p1="39,-651" p2="43,-687"/><l p1="35,-555" p2="39,-606"/><l p1="217,-786" p2="217,-736"/><l p1="214,-857" p2="217,-786"/><l p1="216,-715" p2="130,-707"/><l p1="53,-709" p2="130,-707"/><l p1="128,-623" p2="206,-619"/><l p1="49,-624" p2="128,-623"/><l p1="130,-707" p2="128,-623"/><c t="s1" pos="217,-786"/><c t="s1" pos="42,-790"/><c t="s1" pos="130,-707"/><c t="s1" pos="128,-623"/><ao pos="536,-106" t="f"/></level>
;
levelData["43f0045771804e597cdf23aeb2700682.xml"] = <level el="-400" er="798" et="-512" sy="0.3125" cx="-125" cy="-312" ht=""><b t="p" v="-263,-478,-263,-478,-216,-479,-214,-472,-216,-305,-219,-297,-263,-296,-265,-305,-266,-468"/><b t="i" v="-415,-389,-351,-395,-342,-393,-310,-369,-293,-322,-263,-296,-202,-297,-198,-291,-198,-282,-203,-268,-227,-256,-268,-252,-285,-250,-347,-229,-373,-222,-434,-198"/><b t="p" v="604,-475,643,-477,650,-472,652,-350,650,-342,603,-343,601,-352,601,-468"/><b t="i" v="550,-220,595,-219,608,-201,612,-180,613,-165,604,-151,595,-146,572,-103,570,-80,608,120,467,110,531,-125,531,-146,520,-155,516,-177,517,-201,533,-215"/><b t="i" v="602,-343,666,-343,855,-365,867,-306,856,-230,816,-270,761,-289,685,-286,631,-295,610,-304,595,-313,592,-327"/><b t="n" v="331,-115,338,-120,358,-123,365,-109,372,-73,375,-67,410,110,283,103,301,-47,308,-73"/><p pos="-411,-362"/><p pos="-410,-247"/><p pos="586,69"/><p pos="487,60"/><p pos="824,-339"/><p pos="825,-278"/><p pos="371,45"/><p pos="303,58"/><c t="s1" pos="570,-233"/><c t="f1" pos="-350,-346"/><ao pos="73,15" t="f"/></level>
;
levelData["2f0b80c680fbe76068382c6a03134e64.xml"] = <level el="-400" er="482" et="-562" sy="2.4375" cx="-63" cy="-362" ht=""><b t="i" v="-128,-304,192,-304,208,-288,208,-224,192,-208,-128,-208,-144,-224,-144,-235,-76,-236,-44,-268,144,-267,144,-272,-48,-272,-80,-240,-144,-240,-144,-288"/><b t="n" v="-246,-591,-232,-576,-250,-557,-271,-538,-290,-529,-308,-533,-338,-551,-368,-574,-359,-592"/><p pos="-112,-272"/><p pos="176,-272"/><p pos="-265,-573"/><p pos="-335,-574"/><l p1="-288,-416" p2="-288,-544"/><c t="s1" pos="-288,-416"/><ao pos="320,80" t="f"/></level>
;
}
public static function endGame():void{
if (!content){
return;
};
endLevel();
popup.destroy();
popup = null;
Key.terminate(stage);
stage.removeEventListener(Event.ENTER_FRAME, enterFrame);
content.removeChild(cutLayer);
cutLayer = null;
content.removeChild(seaLayer);
seaLayer = null;
content.removeChild(splashLayer);
splashLayer = null;
content.removeChild(protectionLayer);
protectionLayer = null;
content.removeChild(finishLayer);
finishLayer = null;
content.removeChild(gloveLayer);
gloveLayer = null;
content.removeChild(activeLayer);
activeLayer = null;
content.removeChild(constraintLayer);
constraintLayer = null;
content.removeChild(characterLayer);
characterLayer = null;
content.removeChild(glowyBlockLayer);
glowyBlockLayer = null;
content.removeChild(blockLayer);
blockLayer = null;
content.removeChild(fragmentLayer);
fragmentLayer = null;
content.removeChild(particleLayer);
particleLayer = null;
content.removeChild(railLayer);
railLayer = null;
content = null;
root = null;
stage = null;
}
public static function startLevel(_arg1:Number):void{
var _local2:String;
var _local3:XML;
if (level){
endLevel();
};
if (_arg1 > lastLevelAvailable.value){
_arg1 = lastLevelAvailable.value;
};
if (_arg1 == loadedLevelNumber){
level = new Level();
level.create(loadedXML);
return;
};
loadIndicator = new LoadIndicator(stage.stageWidth, stage.stageHeight);
root.addChild(loadIndicator);
NitromeGame.transition.stop();
_local2 = NitromeGame.getLevelName(_arg1);
if (!levelData){
setupLevelData();
};
_local3 = new XML(levelData[_local2]);
loadedLevelNumber = _arg1;
loadedXML = _local3;
Controller.onLoadComplete();
}
public static function nextLevel():void{
endLevel();
startLevel((loadedLevelNumber + 1));
}
public static function enterFrame(_arg1:Event):void{
if (((!(content)) || (!(level)))){
return;
};
frameNumber++;
level.advance();
popup.advance();
}
}
}//package com.nitrome.icebreaker
Section 140
//DeathBlock (com.nitrome.icebreaker.DeathBlock)
package com.nitrome.icebreaker {
import flash.display.*;
public class DeathBlock extends Block {
public static var deathBlockTexture:BitmapData;
public function DeathBlock(){
if (!deathBlockTexture){
deathBlockTexture = new DeathBlockTexture(125, 125);
};
texture = deathBlockTexture;
= true;
= 10154239;
= 10;
= 10154239;
= 0.2;
= 3687558;
}
}
}//package com.nitrome.icebreaker
Section 141
//EditorDrawableObjects (com.nitrome.icebreaker.EditorDrawableObjects)
package com.nitrome.icebreaker {
import flash.display.*;
public dynamic class EditorDrawableObjects extends MovieClip {
}
}//package com.nitrome.icebreaker
Section 142
//EditorPanel (com.nitrome.icebreaker.EditorPanel)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import com.nitrome.util.*;
import flash.external.*;
public class EditorPanel extends Sprite {
public var :Boolean;// = false
public var :Array;
public var :Boolean;// = false
public var :Sprite;
public var txtMoves:TextField;
public var :b2Vec2;// = null
public var :Array;
public var
:Sprite;
public var :Sprite;
public var :Number;// = -1
public var :XML;// = null
public var :Sprite;// = null
public var :Boolean;// = false
public var xmlData:TextField;
public var loadFile:SimpleButton;
public var :Boolean;// = false
public var :Boolean;// = false
public var saveFile:SimpleButton;
public var
:Boolean;// = false
private var :Sprite;
public var :Number;// = 0
public var :Boolean;// = false
public var selectedMode:Number;// = 0
public var ;// = null
public function EditorPanel(){
var _local1:Array;
var _local2:Number;
var _local3:MovieClip;
var _local4:TextField;
selectedMode = 0;
= 0;
= null;
= false;
= false;
= null;
= -1;
= false;
= null;
= false;
= false;
= false;
= false;
= null;
super();
if (!Controller.DEBUG){
return;
};
x = (Controller.stage.stageWidth / 2);
y = (Controller.stage.stageHeight / 2);
Controller.content.addChild(( = new Sprite()));
Controller.content.addChild(( = new Sprite()));
Controller.root.addChild(this);
visible = false;
_local1 = ["Test Run", "Edit", "Draw"];
= [];
_local2 = 0;
while (_local2 < _local1.length) {
_local4 = new TextField();
_local4.text = _local1[_local2];
_local4.textColor = 0xFFFFFF;
_local4.setTextFormat(new TextFormat("_sans", null, null, (_local2 == 0)));
_local4.x = -135;
_local4.y = ((_local2 * 20) - 25);
if (_local2 > 0){
_local4.y = (_local4.y + 5);
};
_local4.height = 20;
_local4.selectable = false;
addChild(_local4);
.push(_local4);
_local2++;
};
= new Sprite();
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect(-5, 0, 110, 20);
addChild(
);
_local2 = 1;
= [];
do {
_local3 = new EditorDrawableObjects();
addChild(_local3);
_local3.x = ((((_local2 - 1) % 9) * 32) - 140);
_local3.y = ((int(((_local2 - 1) / 9)) * 32) - 165);
_local3.gotoAndStop(_local2);
.push(_local3);
_local2++;
} while (_local2 <= _local3.totalFrames);
= new Sprite();
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect(0, 0, 32, 32);
addChild();
(0);
(0);
if (selectedMode == 0){
= Controller.level.reduceToXML();
.visible = false;
};
();
= new CameraStartIndicator();
.visible = false;
Controller.content.addChild();
.x = (Controller.level.cameraStart.x * 32);
.y = (Controller.level.cameraStart.y * 32);
stage.addEventListener(KeyboardEvent.KEY_DOWN,
);
stage.addEventListener(KeyboardEvent.KEY_UP, );
}
public function isGameFrozen():Boolean{
return (!((selectedMode == 0)));
}
public function mouseMove(_arg1:MouseEvent):void{
var _local2:b2Vec2;
var _local3:Block;
var _local4:b2AABB;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:RailPinConstraint;
var _local8:b2Vec2;
if (){
Controller.level.leftEdge = Controller.content.mouseX;
();
Controller.level.map.resize();
return;
};
if (){
Controller.level.rightEdge = Controller.content.mouseX;
();
Controller.level.map.resize();
return;
};
if (){
Controller.level.topEdge = Controller.content.mouseY;
();
Controller.level.map.resize();
return;
};
if (){
Controller.level.cameraStart.x = (Controller.content.mouseX / 32);
Controller.level.cameraStart.y = (Controller.content.mouseY / 32);
if (Controller.level.cameraStart.x < ((Controller.level.leftEdge + 275) / 32)){
Controller.level.cameraStart.x = ((Controller.level.leftEdge + 275) / 32);
};
if (Controller.level.cameraStart.x > ((Controller.level.rightEdge - 275) / 32)){
Controller.level.cameraStart.x = ((Controller.level.rightEdge - 275) / 32);
};
if (Controller.level.cameraStart.y < ((Controller.level.topEdge + 200) / 32)){
Controller.level.cameraStart.y = ((Controller.level.topEdge + 200) / 32);
};
if (Controller.level.cameraStart.y > (Controller.level.sea.yPosition - ((200 - Level.SEA_MAX_HEIGHT) / 32))){
Controller.level.cameraStart.y = (Controller.level.sea.yPosition - ((200 - Level.SEA_MAX_HEIGHT) / 32));
};
.x = (Controller.level.cameraStart.x * 32);
.y = (Controller.level.cameraStart.y * 32);
return;
};
_local2 = new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32));
if (Key.isDown(Key.S)){
_local2.x = (Math.round((_local2.x * 2)) / 2);
_local2.y = (Math.round((_local2.y * 2)) / 2);
};
if (){
if (( is Sea)){
Controller.level.sea.yPosition = (Controller.level.sea.yPosition + (_local2.y - .y));
();
Controller.level.map.resize();
} else {
if (( is Block)){
_local3 = ( as Block);
if ( == -1){
_local3.unsolidify();
_local4 = _local3.getLocalBoundingBox();
if (Key.isDown(Key.S)){
_local5 = new b2Vec2();
_local5.x = ((_local3.position.x + _local2.x) - .x);
_local5.y = ((_local3.position.y + _local2.y) - .y);
= _local2.Copy();
_local5.x = (_local5.x + _local4.lowerBound.x);
_local5.y = (_local5.y + _local4.lowerBound.y);
_local5.x = ((Math.round((_local5.x * 2)) / 2) - _local4.lowerBound.x);
_local5.y = ((Math.round((_local5.y * 2)) / 2) - _local4.lowerBound.y);
_local3.position.x = _local5.x;
_local3.position.y = _local5.y;
} else {
_local3.position.x = (_local3.position.x + (_local2.x - .x));
_local3.position.y = (_local3.position.y + (_local2.y - .y));
= _local2.Copy();
};
_local3.solidify();
();
return;
} else {
_local6 = _local3.globalToLocal(_local2);
_local3.unsolidify();
_local3.vertexList[].x = _local6.x;
_local3.vertexList[].y = _local6.y;
_local3.solidify();
();
};
} else {
if (( is PinConstraint)){
if (( is RailPinConstraint)){
_local7 = ( as RailPinConstraint);
if ( == 0){
_local7.setPosition(_local2);
};
if ( >= 0){
_local7.rail[] = _local2.Copy();
};
Controller.level.updateRails();
} else {
( as PinConstraint).setPosition(_local2);
};
();
} else {
if (( is TurningPinsConstraint)){
( as TurningPinsConstraint).setPosition(_local2);
();
} else {
if (( is Character)){
( as Character).setPosition(_local2);
();
} else {
if (( is ActiveObject)){
_local8 = ( as ActiveObject).getPosition().Copy();
( as ActiveObject).getPosition().Copy().x = (_local8.x + (_local2.x - .x));
_local8.y = (_local8.y + (_local2.y - .y));
if (Key.isDown(Key.S)){
_local8.x = (Math.round((_local8.x * 2)) / 2);
_local8.y = (Math.round((_local8.y * 2)) / 2);
};
( as ActiveObject).setPosition(_local8);
();
} else {
if (( is LinkConstraint)){
if ( == 0){
( as LinkConstraint).setPosition1(_local2);
} else {
( as LinkConstraint).setPosition2(_local2);
};
();
};
};
};
};
};
};
};
= _local2;
};
}
public function ():void{
.graphics.clear();
.graphics.lineStyle(4, 0xFF0000);
.graphics.moveTo(Controller.level.leftEdge, (Controller.level.sea.yPosition * 32));
.graphics.lineTo(Controller.level.leftEdge, Controller.level.topEdge);
.graphics.lineStyle(4, 0xFFFFFF);
.graphics.lineTo(Controller.level.rightEdge, Controller.level.topEdge);
.graphics.lineStyle(4, 0xE000);
.graphics.lineTo(Controller.level.rightEdge, (Controller.level.sea.yPosition * 32));
}
public function
():void{
var ref:FileReference;
ref = new FileReference();
ref.addEventListener(Event.SELECT, function (_arg1:Event):void{
var file:FileReference;
var loader:URLLoader;
var callback:Function;
var e = _arg1;
file = (e.target as FileReference);
loader = new URLLoader();
callback = function (_arg1:Event){
var _local2:XML;
var _local3:b2Vec2;
_local2 = new XML(_arg1.target.data);
Controller.level.destroy(true);
Controller.level.create(_local2);
xmlData.text = Controller.level.reduceToXML();
(0);
= Controller.level.reduceToXML();
();
if (Controller.level.blockList[0]){
_local3 = Controller.level.blockList[0].getBoundingBoxCenter();
Controller.level.cameraFocusX = (_local3.x * 32);
Controller.level.cameraFocusY = (_local3.y * 32);
};
};
loader.addEventListener(Event.COMPLETE, callback);
loader.load(new URLRequest(("levels/" + file.name)));
});
ref.browse([new FileFilter("XML files (*.xml)", "*.xml"), new FileFilter("All files (*.*)", "*.*")]);
}
public function mouseUp(_arg1:MouseEvent):void{
= false;
= false;
= false;
= false;
= false;
}
public function ():void{
var xml:XML;
var ok:Boolean;
saveFile.alpha = 1;
try {
xml = () ? : Controller.level.reduceToXML();
ok = ExternalInterface.call("saveFileWithoutName", xml.toXMLString(), false);
if (ok){
} else {
if (ExternalInterface.call("communicationOK") != "ok"){
saveFile.alpha = 0.5;
};
};
} catch(e:Error) {
saveFile.alpha = 0.5;
};
}
public function ():void{
var _local1:Number;
var _local2:b2Vec2;
var _local3:b2AABB;
var _local4:Block;
var _local5:RailPinConstraint;
.graphics.clear();
if (( is Block)){
_local4 = ( as Block);
_local1 = 0;
while (_local1 < _local4.vertexList.length) {
_local2 = _local4.localToPixel(_local4.vertexList[_local1]);
.graphics.beginFill((_local4.editorLocked) ? 8405056 : 0xFF0000);
.graphics.drawRect((_local2.x - 2), (_local2.y - 2), 4, 4);
.graphics.endFill();
_local1++;
};
} else {
if (( is PinConstraint)){
_local2 = ( as PinConstraint).globalPosition.Copy();
_local2.x = (_local2.x * 32);
_local2.y = (_local2.y * 32);
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect((_local2.x - 10), (_local2.y - 10), 20, 20);
if (((( is RailPinConstraint)) && (Key.isDown(Key.R)))){
_local5 = ( as RailPinConstraint);
.graphics.moveTo(_local2.x, _local2.y);
_local1 = 1;
while (_local1 < _local5.rail.length) {
.graphics.lineTo((_local5.rail[_local1].x * 32), (_local5.rail[_local1].y * 32));
_local1++;
};
_local1 = 0;
while (_local1 < _local5.rail.length) {
.graphics.drawRect(((_local5.rail[_local1].x * 32) - 5), ((_local5.rail[_local1].y * 32) - 5), 10, 10);
_local1++;
};
};
} else {
if (( is TurningPinsConstraint)){
_local2 = ( as TurningPinsConstraint).globalPosition.Copy();
_local2.x = (_local2.x * 32);
_local2.y = (_local2.y * 32);
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect((_local2.x - 15), (_local2.y - 15), 30, 30);
} else {
if (( is Character)){
_local2 = ( as Character).getPosition().Copy();
_local2.x = (_local2.x * 32);
_local2.y = (_local2.y * 32);
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect((_local2.x - 15), (_local2.y - 15), 30, 30);
} else {
if (( is ActiveObject)){
_local3 = ( as ActiveObject).getBoundingBox();
_local3.lowerBound.x = (_local3.lowerBound.x * 32);
_local3.lowerBound.y = (_local3.lowerBound.y * 32);
_local3.upperBound.x = (_local3.upperBound.x * 32);
_local3.upperBound.y = (_local3.upperBound.y * 32);
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect((_local3.lowerBound.x - 5), (_local3.lowerBound.y - 5), ((_local3.upperBound.x - _local3.lowerBound.x) + 10), ((_local3.upperBound.y - _local3.lowerBound.y) + 10));
} else {
if (( is Weight)){
_local2 = ( as Weight).getPosition().Copy();
_local2.x = (_local2.x * 32);
_local2.y = (_local2.y * 32);
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect((_local2.x - 133), (_local2.y - 37), 266, 74);
} else {
if (( is LinkConstraint)){
if ( == 0){
_local2 = ( as LinkConstraint).globalPosition1.Copy();
} else {
_local2 = ( as LinkConstraint).globalPosition2.Copy();
};
_local2.x = (_local2.x * 32);
_local2.y = (_local2.y * 32);
.graphics.lineStyle(2, 0xFF0000);
.graphics.drawRect((_local2.x - 10), (_local2.y - 10), 20, 20);
};
};
};
};
};
};
};
}
public function (_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Key.R){
();
} else {
if (_arg1.keyCode == Key.DELETE){
[1].textColor = 0xFFFFFF;
[2].textColor = 0xFFFFFF;
};
};
}
public function (_arg1:Number):void{
.x = [_arg1].x;
.y = [_arg1].y;
= _arg1;
}
public function
(_arg1:KeyboardEvent):void{
var _local2:RailPinConstraint;
if (_arg1.keyCode == Key.SPACE){
visible = !(visible);
if (visible){
if (){
xmlData.text = .toXMLString();
} else {
xmlData.text = Controller.level.reduceToXML().toXMLString();
};
};
} else {
if (_arg1.keyCode == Key.T){
(0);
} else {
if (_arg1.keyCode == Key.E){
(1);
} else {
if (_arg1.keyCode == Key.D){
(2);
} else {
if (_arg1.keyCode == Key.DELETE){
if (( is Block)){
( as Block).unsolidify();
Global.removeFromList(, Controller.level.blockList);
} else {
if (( is Constraint)){
( as Constraint).destroy();
Global.removeFromList(, Controller.level.constraintList);
} else {
if (( is Character)){
( as Character).destroy();
Global.removeFromList(, Controller.level.characterList);
} else {
if (( is ActiveObject)){
( as ActiveObject).destroy();
Global.removeFromList(, Controller.level.activeObjectList);
};
};
};
};
= null;
();
[1].textColor = 0xE06000;
[2].textColor = 0xE06000;
} else {
if (_arg1.keyCode == Key.L){
if (( is Block)){
( as Block).editorLocked = !(( as Block).editorLocked);
();
} else {
if (( is RailPinConstraint)){
_local2 = ( as RailPinConstraint);
_local2.looping = !(_local2.looping);
Controller.level.updateRails();
();
};
};
} else {
if (_arg1.keyCode == Key.R){
();
};
};
};
};
};
};
};
}
public function ():void{
var _local1:Number;
_local1 = 0;
while (_local1 < Controller.level.constraintList.length) {
if ((Controller.level.constraintList[_local1] is PinConstraint)){
Controller.level.constraintList[_local1].setPosition(Controller.level.constraintList[_local1].globalPosition.Copy());
};
_local1++;
};
_local1 = 0;
while (_local1 < Controller.level.characterList.length) {
if (!(Controller.level.characterList[_local1] is FrozenCharacter)){
} else {
Controller.level.characterList[_local1].setPosition(Controller.level.characterList[_local1].getPosition());
};
_local1++;
};
}
public function (_arg1:Number):void{
if ((((((_arg1 == 0)) && (!((selectedMode == 0))))) && (!()))){
();
Controller.level.activateAll();
= Controller.level.reduceToXML();
.visible = false;
} else {
if (((((!((_arg1 == 0))) && ((selectedMode == 0)))) && ())){
Controller.level.deactivateAll();
if (!Key.isDown(Key.DELETE)){
Controller.level.destroy(true);
Controller.level.create();
Controller.level.deactivateAll();
};
= null;
.visible = true;
};
};
.x = [_arg1].x;
.y = [_arg1].y;
selectedMode = _arg1;
if (selectedMode != 1){
= null;
();
};
if (){
.visible = !((selectedMode == 0));
.x = (Controller.level.cameraStart.x * 32);
.y = (Controller.level.cameraStart.y * 32);
};
if ((((selectedMode == 0)) && (Controller.level.cameraStart))){
Controller.level.cameraFocusX = (Controller.level.cameraStart.x * 32);
Controller.level.cameraFocusY = (Controller.level.cameraStart.y * 32);
};
if (_arg1 == 0){
Controller.frameNumber = 0;
};
}
public function destroy():void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN,
);
stage.removeEventListener(KeyboardEvent.KEY_UP, );
if (parent){
parent.removeChild(this);
};
}
public function mouseDown(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:b2Vec2;
var _local4:Block;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:RailPinConstraint;
var _local9:Boolean;
var _local10:Number;
var _local11:Number;
var _local12:Boolean;
var _local13:Number;
var _local14:Number;
var _local15:b2Vec2;
var _local16:b2Vec2;
var _local17:b2Vec2;
var _local18:Number;
var _local19:PinConstraint;
var _local20:TurningPinsConstraint;
var _local21:LinkConstraint;
var _local22:Character;
var _local23:ActiveObject;
var _local24:String;
var _local25:Block;
var _local26:PinConstraint;
var _local27:LinkConstraint;
var _local28:TurningPinsConstraint;
var _local29:Character;
var _local30:ActiveObject;
if (((visible) && (hitTestPoint(_arg1.stageX, _arg1.stageY)))){
_local2 = 0;
while (_local2 < .length) {
if ([_local2].hitTestPoint(stage.mouseX, stage.mouseY)){
(_local2);
return;
};
_local2++;
};
_local2 = 0;
while (_local2 < .length) {
if ([_local2].hitTestPoint(stage.mouseX, stage.mouseY)){
(_local2);
(2);
visible = false;
return;
};
_local2++;
};
if (loadFile.hitTestPoint(stage.mouseX, stage.mouseY)){
();
return;
};
if (saveFile.hitTestPoint(stage.mouseX, stage.mouseY)){
();
return;
};
return;
};
_local3 = new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32));
= _local3.Copy();
if (selectedMode == 1){
if (Math.abs((Controller.content.mouseX - Controller.level.leftEdge)) < 5){
= true;
return;
};
if (Math.abs((Controller.content.mouseX - Controller.level.rightEdge)) < 5){
= true;
return;
};
if (Math.abs((Controller.content.mouseY - Controller.level.topEdge)) < 5){
= true;
return;
};
if (Geometry.squareDistancePointToPoint(_local3, Controller.level.cameraStart) < (0.4 * 0.4)){
= true;
return;
};
if (( is Block)){
_local4 = ( as Block);
_local2 = 0;
while (_local2 < _local4.vertexList.length) {
_local5 = _local4.localToGlobal(_local4.vertexList[_local2]);
if (Geometry.squareDistancePointToPoint(_local3, _local5) < ((10 / 32) * (10 / 32))){
if (((Key.isDown(Key.CONTROL)) && ((_local4.vertexList.length > 3)))){
_local4.unsolidify();
_local4.removeVertex(_local2);
_local4.solidify();
();
return;
};
= _local2;
= true;
();
return;
};
_local2++;
};
if (Key.isDown(Key.CONTROL)){
_local2 = 0;
while (_local2 < _local4.vertexList.length) {
_local5 = _local4.localToGlobal(_local4.vertexList[_local2]);
_local6 = _local4.localToGlobal(_local4.vertexList[((_local2 + 1) % _local4.vertexList.length)]);
if (Geometry.squareDistancePointToSegment(_local5, _local6, _local3) < ((10 / 32) * (10 / 32))){
_local7 = Geometry.nearestPointOnSegment(_local5, _local6, _local3);
_local7 = _local4.globalToLocal(_local7);
_local4.unsolidify();
_local4.insertVertex((_local2 + 1), _local7, true);
_local4.solidify();
= (_local2 + 1);
= true;
();
return;
};
_local2++;
};
};
};
if (((( is RailPinConstraint)) && (Key.isDown(Key.R)))){
_local8 = ( as RailPinConstraint);
if (Key.isDown(Key.CONTROL)){
_local9 = false;
_local2 = 1;
while (_local2 < _local8.rail.length) {
if (Geometry.squareDistancePointToPoint(_local8.rail[_local2], _local3) < (0.5 * 0.5)){
_local8.rail.splice(_local2, 1);
_local9 = true;
break;
};
_local2++;
};
if (!_local9){
_local10 = 0;
_local11 = Geometry.squareDistancePointToPoint(_local8.rail[0], _local3);
_local2 = 1;
while (_local2 < _local8.rail.length) {
_local14 = Geometry.squareDistancePointToPoint(_local8.rail[_local2], _local3);
if (_local14 < _local11){
_local11 = _local14;
_local10 = _local2;
};
_local2++;
};
_local12 = true;
if (_local10 > 0){
_local15 = _local8.rail[(_local10 - 1)];
_local16 = _local8.rail[Math.min((_local10 + 1), (_local8.rail.length - 1))];
_local17 = new b2Vec2((_local16.x - _local15.x), (_local16.y - _local15.y));
_local18 = (b2Math.b2Dot(_local17, _local3) - b2Math.b2Dot(_local17, _local8.rail[_local10]));
if (_local18 < 0){
_local12 = false;
};
};
_local13 = (_local10 + (_local12) ? 1 : 0);
_local8.rail.splice(_local13, 0, _local3.Copy());
= _local13;
= true;
};
} else {
= -1;
_local2 = 0;
while (_local2 < _local8.rail.length) {
if (Geometry.squareDistancePointToPoint(_local8.rail[_local2], _local3) < (0.5 * 0.5)){
= _local2;
= true;
break;
};
_local2++;
};
};
Controller.level.updateRails();
();
return;
};
_local2 = 0;
while (_local2 < Controller.level.constraintList.length) {
_local19 = (Controller.level.constraintList[_local2] as PinConstraint);
if (!_local19){
} else {
if (Geometry.squareDistancePointToPoint(_local19.globalPosition, _local3) < (0.5 * 0.5)){
= _local19;
= 0;
= true;
();
return;
};
};
_local2++;
};
_local2 = 0;
while (_local2 < Controller.level.constraintList.length) {
_local20 = (Controller.level.constraintList[_local2] as TurningPinsConstraint);
if (!_local20){
} else {
if (Geometry.squareDistancePointToPoint(_local20.globalPosition, _local3) < (0.5 * 0.5)){
= _local20;
= true;
();
return;
};
};
_local2++;
};
_local2 = 0;
while (_local2 < Controller.level.constraintList.length) {
_local21 = (Controller.level.constraintList[_local2] as LinkConstraint);
if (!_local21){
} else {
if (Geometry.squareDistancePointToPoint(_local21.globalPosition1, _local3) < (0.5 * 0.5)){
= _local21;
= 0;
= true;
();
return;
};
if (Geometry.squareDistancePointToPoint(_local21.globalPosition2, _local3) < (0.5 * 0.5)){
= _local21;
= 1;
= true;
();
return;
};
};
_local2++;
};
_local2 = 0;
while (_local2 < Controller.level.characterList.length) {
_local22 = Controller.level.characterList[_local2];
if (Geometry.squareDistancePointToPoint(_local22.getPosition(), _local3) < (0.8 * 0.8)){
= _local22;
= true;
();
return;
};
_local2++;
};
_local2 = 0;
while (_local2 < Controller.level.activeObjectList.length) {
_local23 = Controller.level.activeObjectList[_local2];
if (_local23.hitTestPoint(stage.mouseX, stage.mouseY, true)){
= _local23;
= true;
();
return;
};
_local2++;
};
if (( is Block)){
if (((!(_local4.editorLocked)) && (_local4.testPoint(_local3)))){
= -1;
= true;
();
return;
};
};
= Controller.level.searchForBlock(_local3);
if (((!()) && ((_local3.y > Controller.level.sea.yPosition)))){
= Controller.level.sea;
= true;
};
();
} else {
if (selectedMode == 2){
_local24 = [].currentLabel;
if (_local24.substr(0, 6) == "block_"){
switch (_local24){
case "block_bouncyBlock":
_local25 = new BouncyBlock();
break;
case "block_buoyantBlock":
_local25 = new BuoyantBlock();
break;
case "block_iceBlock":
_local25 = new IceBlock();
break;
case "block_pinnableBlock":
_local25 = new PinnableBlock();
break;
case "block_woodBlock":
_local25 = new WoodBlock();
break;
case "block_deathBlock":
_local25 = new DeathBlock();
break;
case "block_forceBlock":
_local25 = new ForceBlock();
break;
case "block_joinBlock":
_local25 = new JoinBlock();
break;
default:
_local25 = new Block();
};
_local25.addVertex(new b2Vec2((_local3.x - 1), (_local3.y - 1)));
_local25.addVertex(new b2Vec2((_local3.x + 1), (_local3.y - 1)));
_local25.addVertex(new b2Vec2((_local3.x + 1), (_local3.y + 1)));
_local25.addVertex(new b2Vec2((_local3.x - 1), (_local3.y + 1)));
_local25.solidify();
Controller.level.blockList.push(_local25);
= _local25;
} else {
if ((((_local24 == "pin")) || ((_local24 == "railPin")))){
if (_local24 == "railPin"){
_local26 = new RailPinConstraint();
} else {
_local26 = new PinConstraint();
};
_local26.create();
_local26.setPosition(_local3);
if ((_local26 is RailPinConstraint)){
(_local26 as RailPinConstraint).rail[0] = _local3.Copy();
};
Controller.level.constraintList.push(_local26);
} else {
if ((((_local24 == "link")) || ((_local24 == "metalLink")))){
if (_local24 == "metalLink"){
_local27 = new MetalLinkConstraint();
} else {
_local27 = new LinkConstraint();
};
_local27.create();
_local27.setPosition1(new b2Vec2((_local3.x - 0.5), _local3.y));
_local27.setPosition2(new b2Vec2((_local3.x + 0.5), _local3.y));
Controller.level.constraintList.push(_local27);
} else {
if (_local24.substr(0, 11) == "turningPins"){
_local28 = new TurningPinsConstraint();
switch (_local24){
case "turningPins_left":
_local28.spinSpeed = -4;
break;
case "turningPins_leftSlow":
_local28.spinSpeed = -2;
break;
case "turningPins_rightSlow":
_local28.spinSpeed = 2;
break;
case "turningPins_right":
_local28.spinSpeed = 4;
break;
};
_local28.create();
_local28.setPosition(_local3);
Controller.level.constraintList.push(_local28);
} else {
if (_local24.substr(0, 5) == "char_"){
switch (_local24){
case "char_frozenGuy":
_local29 = new FrozenGuy1();
break;
case "char_standingGuy":
_local29 = new StandingGuy1();
break;
};
_local29.create();
_local29.setPosition(_local3);
Controller.level.characterList.push(_local29);
} else {
if (_local24.substr(0, 7) == "object_"){
switch (_local24){
case "object_finish":
_local30 = new Finish();
break;
case "object_weight":
_local30 = new Weight();
break;
case "object_bird":
_local30 = new Bird();
break;
case "object_protectedArea32":
_local30 = new ProtectedArea32();
break;
case "object_protectedArea64":
_local30 = new ProtectedArea64();
break;
case "object_protectedArea128":
_local30 = new ProtectedArea128();
break;
case "object_wolfrat":
_local30 = new Wolfrat();
break;
case "object_fatWomanRound":
_local30 = new FatWomanRound();
break;
case "object_fatWomanLargeSquare":
_local30 = new FatWomanLargeSquare();
break;
case "object_fatWomanSmallSquare":
_local30 = new FatWomanSmallSquare();
break;
case "object_sign":
_local30 = new HelpSign();
break;
case "object_bomb":
_local30 = new Bomb();
break;
};
_local30.create();
_local30.setPosition(_local3);
Controller.level.activeObjectList.push(_local30);
};
};
};
};
};
};
(1);
();
};
};
}
}
}//package com.nitrome.icebreaker
Section 143
//FatWoman (com.nitrome.icebreaker.FatWoman)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class FatWoman extends ActiveObject {
public var solidShape:b2Shape;
public var solidBody:b2Body;
public static const RADIUS:Number = 1.12;
public static const SLICE_RADIUS:Number = 0.9;
override public function updatePosition():void{
super.updatePosition();
if (solidBody){
rotation = ((solidBody.GetAngle() * 180) / Math.PI);
};
}
public function deleteBody():void{
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - RADIUS), (globalPosition.y - RADIUS));
_local1.upperBound = new b2Vec2((globalPosition.x + RADIUS), (globalPosition.y + RADIUS));
return (_local1);
}
override public function deactivate():void{
deleteBody();
}
protected function pop():void{
gotoAndPlay("sliced");
deleteBody();
NitromeGame.sound_manager.playSound("fatwoman");
}
override public function advance():void{
super.advance();
if (solidBody){
globalPosition.x = solidBody.GetPosition().x;
globalPosition.y = solidBody.GetPosition().y;
};
updatePosition();
}
public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Boolean{
return (false);
}
override public function setPosition(_arg1:b2Vec2):void{
super.setPosition(_arg1);
if (solidBody){
solidBody.SetXForm(_arg1, 0);
};
}
override public function activate():void{
}
override public function create():void{
super.create();
Controller.activeLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
Section 144
//FatWomanLargeSquare (com.nitrome.icebreaker.FatWomanLargeSquare)
package com.nitrome.icebreaker {
public dynamic class FatWomanLargeSquare extends FatWomanSquare {
public function FatWomanLargeSquare(){
addFrameScript(14, frame15, 37, frame38);
}
function frame15(){
gotoAndPlay("idle");
}
function frame38(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package com.nitrome.icebreaker
Section 145
//FatWomanRound (com.nitrome.icebreaker.FatWomanRound)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import com.nitrome.util.*;
public class FatWomanRound extends FatWoman {
public function FatWomanRound(){
addFrameScript(14, frame15, 37, frame38);
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2CircleDef;
if (solidBody){
return;
};
_local1 = new b2BodyDef();
if (globalPosition){
_local1.position.Set(globalPosition.x, globalPosition.y);
};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2CircleDef();
_local2.radius = RADIUS;
_local2.density = 1;
_local2.friction = 0.5;
solidBody.CreateShape(_local2);
solidBody.SetMassFromShapes();
}
function frame15(){
gotoAndPlay("idle");
}
function frame38(){
stop();
if (parent){
parent.removeChild(this);
};
}
override public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Boolean{
var _local3:Number;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = (SLICE_RADIUS * SLICE_RADIUS);
_local4 = Geometry.nearestPointOnLine(_arg1, _arg2, globalPosition);
if (Geometry.squareDistancePointToPoint(_local4, globalPosition) > _local3){
return (false);
};
if (Geometry.squareDistancePointToPoint(_arg1, globalPosition) <= _local3){
return (false);
};
if (Geometry.squareDistancePointToPoint(_arg2, globalPosition) <= _local3){
return (false);
};
_local5 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local6 = b2Math.b2Dot(_local5, _arg1);
_local7 = b2Math.b2Dot(_local5, _arg2);
_local8 = b2Math.b2Dot(_local5, _local4);
if (_local8 < _local6){
return (false);
};
if (_local8 > _local7){
return (false);
};
pop();
return (true);
}
}
}//package com.nitrome.icebreaker
Section 146
//FatWomanSmallSquare (com.nitrome.icebreaker.FatWomanSmallSquare)
package com.nitrome.icebreaker {
public dynamic class FatWomanSmallSquare extends FatWomanSquare {
public function FatWomanSmallSquare(){
addFrameScript(14, frame15, 37, frame38);
}
function frame15(){
gotoAndPlay("idle");
}
function frame38(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package com.nitrome.icebreaker
Section 147
//FatWomanSquare (com.nitrome.icebreaker.FatWomanSquare)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import com.nitrome.util.*;
public class FatWomanSquare extends FatWoman {
public var :Number;
public function FatWomanSquare(){
if ((this is FatWomanLargeSquare)){
= 1;
} else {
= 0.5;
};
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2PolygonDef;
if (solidBody){
return;
};
_local1 = new b2BodyDef();
if (globalPosition){
_local1.position.Set(globalPosition.x, globalPosition.y);
};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2PolygonDef();
_local2.SetAsBox(, );
_local2.density = 1;
_local2.friction = 0.5;
solidBody.CreateShape(_local2);
solidBody.SetMassFromShapes();
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - ), (globalPosition.y - ));
_local1.upperBound = new b2Vec2((globalPosition.x + ), (globalPosition.y + ));
return (_local1);
}
override public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Boolean{
var _local3:Array;
var _local4:Array;
var _local5:Number;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:Number;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:b2Vec2;
if (!solidBody){
return (false);
};
_local3 = [new b2Vec2(-(), -()), new b2Vec2(, -()), new b2Vec2(, ), new b2Vec2(-(), )];
_local4 = [];
_local5 = 0;
while (_local5 < 4) {
_local4.push(solidBody.GetWorldPoint(_local3[_local5]));
_local5++;
};
_local6 = null;
_local7 = null;
_local5 = 0;
while (_local5 < 4) {
_local9 = _local4[_local5];
_local10 = _local4[((_local5 + 1) % 4)];
_local11 = Geometry.segmentIntersection(_arg1, _arg2, _local9, _local10);
if (_local11){
if (!_local6){
_local6 = _local11;
} else {
if (!_local7){
_local7 = _local11;
};
};
};
_local5++;
};
if (!_local6){
return (false);
};
if (!_local7){
return (false);
};
_local8 = Geometry.squareDistancePointToPoint(_local6, _local7);
if (_local8 > 1){
pop();
return (true);
};
return (false);
}
}
}//package com.nitrome.icebreaker
Section 148
//Finish (com.nitrome.icebreaker.Finish)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import flash.display.*;
import com.nitrome.util.*;
public class Finish extends ActiveObject {
public var :Number;// = 0
public var :Number;
public var
:Number;
public var charactersOnBoard:Array;
public var solidShape:b2PolygonShape;
public var :Captain;
public var :Boolean;// = false
public var :Number;// = 0
public var solidBody:b2Body;
public var :Number;
public static const CAPTAIN_ACCEL:Number = 0.2;
public static const CAPTAIN_MAXSPEED:Number = 4;
public function Finish(){
= 0;
= 0;
= false;
super();
= new Captain();
.y = -32;
addChildAt(, 0);
charactersOnBoard = [];
}
public function ():Number{
return (((globalPosition.x * 32) + 128));
}
public function victory():void{
if (!){
.gotoAndPlay(("victory" + Controller.charType()));
};
= true;
}
public function ():Number{
return (((globalPosition.x * 32) - 128));
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - 4), (globalPosition.y - 1));
_local1.upperBound = new b2Vec2((globalPosition.x + 4), (globalPosition.y + 1));
return (_local1);
}
override public function deactivate():void{
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
override public function advance():void{
();
();
}
protected function ():void{
var _local1:Number;
var _local2:Number;
_local1 = 50;
if (((charactersOnBoard.length + 1) * _local1) > 200){
_local1 = Math.floor((200 / (charactersOnBoard.length + 1)));
};
= (x - ((charactersOnBoard.length * _local1) / 2));
_local2 = 0;
while (_local2 < charactersOnBoard.length) {
charactersOnBoard[_local2].finishIdealX = ( + ((_local2 + 1) * _local1));
if (!isNaN( )){
if (Math.abs((charactersOnBoard[_local2].finishIdealX - )) < 20){
if ((charactersOnBoard[_local2].finishIdealX - x) > 50){
charactersOnBoard[_local2].finishIdealX = (charactersOnBoard[_local2].finishIdealX - 30);
} else {
if ((charactersOnBoard[_local2].finishIdealX - x) < -50){
charactersOnBoard[_local2].finishIdealX = (charactersOnBoard[_local2].finishIdealX + 30);
} else {
if (charactersOnBoard[_local2].finishIdealX > ){
charactersOnBoard[_local2].finishIdealX = (charactersOnBoard[_local2].finishIdealX + 30);
} else {
charactersOnBoard[_local2].finishIdealX = (charactersOnBoard[_local2].finishIdealX - 30);
};
};
};
};
};
_local2++;
};
}
protected function
():void{
var _local1:Array;
var _local2:Number;
var _local3:Number;
var _local4:IceBlock;
var _local5:Number;
var _local6:TargetBlock;
var _local7:Wolfrat;
var _local8:MovieClip;
_local1 = [];
_local2 = 0;
while (_local2 < Controller.level.blockList.length) {
_local4 = (Controller.level.blockList[_local2] as IceBlock);
if (!_local4){
} else {
if (!_local4.solidBody){
} else {
if (Controller.level.isTouchingFinish(_local4.solidBody) != this){
if (_local4.touchFinish == this){
_local4.touchFinishTime = 0;
};
} else {
_local4.touchFinish = this;
_local4.touchFinishTime++;
if (_local4.solidBody.GetLinearVelocity().LengthSquared() > 0.1){
if (_local4.touchFinish == this){
_local4.touchFinishTime = 0;
};
} else {
if (_local4.touchFinishTime < 10){
} else {
_local5 = (_local4.solidBody.GetWorldCenter().x * 32);
if (_local5 < ()){
} else {
if (_local5 > ()){
} else {
_local6 = new TargetBlock();
_local6.rightHandSide = (_local5 > x);
_local6.iceX = _local5;
_local6.x = (_local6.rightHandSide) ? (_local5 - 30) : (_local5 + 30);
_local6.dx = Math.abs((_local6.x -
));
_local6.block = _local4;
_local6.smashable = (_local4.getMass() < 4);
_local6.containsCharacter = _local4.anyFrozenInside();
_local1.push(_local6);
};
};
};
};
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < Controller.level.activeObjectList.length) {
_local7 = (Controller.level.activeObjectList[_local2] as Wolfrat);
if (!_local7){
} else {
if (!_local7.solidBody){
} else {
if (!Level.bodyIsTouchingBody(_local7.solidBody, solidBody)){
if (_local7.touchFinish == this){
_local7.touchFinishTime = 0;
};
} else {
_local7.touchFinish = this;
_local7.touchFinishTime++;
if (_local7.touchFinishTime < 10){
} else {
_local6 = new TargetBlock();
_local6.rightHandSide = (_local7.x > x);
_local6.iceX = _local7.x;
_local6.x = (_local6.rightHandSide) ? (_local6.iceX - 30) : (_local6.iceX + 30);
_local6.dx = Math.abs((_local6.x -
));
_local6.object = _local7;
_local1.push(_local6);
};
};
};
};
_local2++;
};
if (_local1.length < 1){
++;
if ( > 30){
_local3 = ;
} else {
_local3 =
;
};
= NaN;
} else {
= 0;
_local1.sortOn(["smashable", "containsCharacter", "dx"], [Array.DESCENDING, Array.DESCENDING, Array.NUMERIC]);
_local3 = _local1[0].x;
= _local1[0].iceX;
};
= ( + Global.deceleratingSweep(
, _local3, , CAPTAIN_ACCEL, CAPTAIN_ACCEL));
if (
< _local3){
= (
+ );
if (
> _local3){
= _local3;
= 0;
};
} else {
= (
+ );
if (
< _local3){
= _local3;
= 0;
};
};
if (
> ()){
= ();
};
if (
< ()){
= ();
};
.x = (
- x);
if ((((_local1.length > 0)) && ((Math.abs((
- _local1[0].x)) < 3)))){
if (.at("smashFrame")){
if (_local1[0].block){
if (_local1[0].smashable){
_local1[0].block.smashAndFree(this);
};
} else {
if (((_local1[0].object) && ((_local1[0].object is Wolfrat)))){
(_local1[0].object as Wolfrat).smash();
NitromeGame.sound_manager.playSound("wolfratDying");
};
};
Controller.level.updateCounters();
} else {
if (.at("impactFrame")){
_local8 = (addChildAt(new HammerImpact(), 0) as MovieClip);
_local8.x = (_local1[0].iceX - x);
_local8.y = -48;
if (_local1[0].block){
if (_local1[0].smashable){
NitromeGame.sound_manager.playSound("iceSmash");
} else {
NitromeGame.sound_manager.playSound("iceTooLarge");
};
};
} else {
if (((.at("standing")) || (.at("walking")))){
.gotoAndPlay(("smashing" + Controller.charType()));
};
};
};
.scaleX = (_local1[0].rightHandSide) ? 1 : -1;
} else {
if ( == 0){
if (){
if (!.at("victory")){
.gotoAndPlay(("victory" + Controller.charType()));
};
} else {
if (!.at("standing")){
.gotoAndPlay(("standing" + Controller.charType()));
};
};
} else {
if (!.at("walking")){
.gotoAndPlay(("walking" + Controller.charType()));
};
.scaleX = (()>0) ? 1 : -1;
};
};
}
override public function setPosition(_arg1:b2Vec2):void{
super.setPosition(_arg1);
= x;
if (solidBody){
solidBody.SetXForm(_arg1, 0);
};
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2PolygonDef;
var _local3:b2PolygonDef;
var _local4:b2PolygonDef;
if (((solidShape) || (solidBody))){
return;
};
_local1 = new b2BodyDef();
if (globalPosition){
_local1.position.Set(globalPosition.x, globalPosition.y);
};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2PolygonDef();
_local2.vertexCount = 4;
_local2.vertices[0] = new b2Vec2(-4, -1);
_local2.vertices[1] = new b2Vec2(4, -1);
_local2.vertices[2] = new b2Vec2(3, 0);
_local2.vertices[3] = new b2Vec2(-3, 0);
_local2.friction = 0.7;
solidShape = (solidBody.CreateShape(_local2) as b2PolygonShape);
_local3 = new b2PolygonDef();
_local3.vertexCount = 6;
_local3.vertices[0] = new b2Vec2(-4, -1);
_local3.vertices[1] = new b2Vec2(-5, -2.2);
_local3.vertices[2] = new b2Vec2(-4.4, -3);
_local3.vertices[3] = new b2Vec2(-3.6, -3.2);
_local3.vertices[4] = new b2Vec2(-3.3, -2.8);
_local3.vertices[5] = new b2Vec2(-3.3, -1);
_local3.friction = 0.7;
solidBody.CreateShape(_local3);
_local4 = new b2PolygonDef();
_local4.vertexCount = 7;
_local4.vertices[0] = new b2Vec2(4, -1);
_local4.vertices[1] = new b2Vec2(3.5, -1);
_local4.vertices[2] = new b2Vec2(3.3, -1.9);
_local4.vertices[3] = new b2Vec2(3.5, -2.3);
_local4.vertices[4] = new b2Vec2(3.8, -2.7);
_local4.vertices[5] = new b2Vec2(4.2, -2.7);
_local4.vertices[6] = new b2Vec2(4.5, -2.3);
_local4.friction = 0.7;
solidBody.CreateShape(_local4);
}
override public function create():void{
Controller.finishLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
class TargetBlock {
public var rightHandSide:Boolean;
public var containsCharacter:Boolean;
public var block:IceBlock;
public var dx:Number;
public var smashable:Boolean;
public var x:Number;
public var iceX:Number;
public var object:ActiveObject;
private function TargetBlock(){
}
}
Section 149
//ForceBlock (com.nitrome.icebreaker.ForceBlock)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import flash.display.*;
import flash.geom.*;
public class ForceBlock extends IceBlock {
public var
:Array;
public static var forceBlockTexture:BitmapData;
public function ForceBlock(){
= [];
super();
if (!forceBlockTexture){
forceBlockTexture = new ForceBlockTexture(125, 125);
};
texture = forceBlockTexture;
}
override public function advance():void{
var _local1:b2Vec2;
var _local2:Number;
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:MovieClip;
var _local11:Number;
var _local12:ForceParticle;
super.advance();
if (((solidBody) && (!(solidBody.IsFrozen())))){
_local1 = new b2Vec2();
_local2 = 0;
while (_local2 < vertexList.length) {
if (originalLine[_local2]){
} else {
_local3 = solidBody.GetWorldPoint(vertexList[_local2]);
_local4 = solidBody.GetWorldPoint(vertexList[((_local2 + 1) % vertexList.length)]);
_local5 = new b2Vec2((_local4.y - _local3.y), (_local3.x - _local4.x));
_local5.Multiply(-20);
_local6 = new b2Vec2(((_local3.x + _local4.x) / 2), ((_local3.y + _local4.y) / 2));
solidBody.ApplyForce(_local5, _local6);
_local7 = (_local5.Length() / 50);
_local8 = (Math.floor(((Controller.frameNumber + 1) * _local7)) - Math.floor((Controller.frameNumber * _local7)));
_local9 = 0;
while (_local9 < _local8) {
_local10 = new ForceBlockForceMC();
_local11 = Math.random();
Controller.particleLayer.addChildAt(_local10, 0);
_local10.x = (((_local11 * _local3.x) + ((1 - _local11) * _local4.x)) * 32);
_local10.y = (((_local11 * _local3.y) + ((1 - _local11) * _local4.y)) * 32);
_local12 = new ForceParticle();
_local12.mc = _local10;
_local12.vx = (-(_local5.x) / 20);
_local12.vy = (-(_local5.y) / 20);
.push(_local12);
_local9++;
};
};
_local2++;
};
_local2 = (
.length - 1);
while (_local2 >= 0) {
if (
[_local2].mc.parent){
[_local2].mc.x = (
[_local2].mc.x +
[_local2].vx);
[_local2].mc.y = (
[_local2].mc.y +
[_local2].vy);
} else {
.splice(_local2, 1);
};
_local2--;
};
};
}
override public function prerenderBitmap():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Sprite;
var _local5:Rectangle;
if (vertexList.length < 3){
bitmapData = null;
return;
};
_local1 = Infinity;
_local2 = -(Infinity);
_local3 = 0;
while (_local3 < vertexList.length) {
if (vertexList[_local3].x < _local1){
_local1 = vertexList[_local3].x;
};
if (vertexList[_local3].x > _local2){
_local2 = vertexList[_local3].x;
};
_local3++;
};
_local1 = (_local1 * 32);
_local2 = (_local2 * 32);
_local4 = new Sprite();
_local4.graphics.clear();
if (texture){
_local4.graphics.beginBitmapFill(texture);
} else {
_local4.graphics.beginFill(1193046, 0.5);
};
_local4.graphics.moveTo((vertexList[0].x * 32), (vertexList[0].y * 32));
_local3 = 1;
while (_local3 <= vertexList.length) {
_local4.graphics.lineStyle(1, 6253241, (originalLine[(_local3 - 1)]) ? 1 : 0.4);
_local4.graphics.lineTo((vertexList[(_local3 % vertexList.length)].x * 32), (vertexList[(_local3 % vertexList.length)].y * 32));
_local3++;
};
_local4.graphics.endFill();
_local5 = _local4.getBounds(_local4);
_local5.inflate(1, 1);
drawDeltaX = Math.floor(_local5.left);
drawDeltaY = Math.floor(_local5.top);
bitmapData = new BitmapData(Math.ceil(_local5.width), Math.ceil(_local5.height), true, 0);
bitmapData.draw(_local4, new Matrix(1, 0, 0, 1, -(drawDeltaX), -(drawDeltaY)));
sprite = new Sprite();
sprite.addChild(new Bitmap(bitmapData, "auto", true));
updateBitmap();
Controller.blockLayer.addChild(sprite);
}
}
}//package com.nitrome.icebreaker
import flash.display.*;
class ForceParticle {
public var vx:Number;
public var vy:Number;
public var mc:MovieClip;
private function ForceParticle(){
}
}
Section 150
//FrozenCharacter (com.nitrome.icebreaker.FrozenCharacter)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
public class FrozenCharacter extends Character {
public var globalPosition:b2Vec2;
public var :Number;
public var localPosition:b2Vec2;
public var insideBlock:IceBlock;
public function FrozenCharacter(){
();
gotoAndStop(("frozen" + Controller.charType()));
}
override public function advance():void{
super.advance();
if (killedNormal){
return;
};
if (!atFinish){
updatePosition();
--;
if ( < 1){
if (Math.random() >= 0.5){
gotoAndPlay(("frozenBlink" + Controller.charType()));
} else {
gotoAndPlay(("frozenShine" + Controller.charType()));
};
();
};
} else {
globalPosition.x = (x / 32);
globalPosition.y = (y / 32);
};
}
public function ():void{
= (30 + Math.floor((Math.random() * 200)));
}
override public function getPosition():b2Vec2{
return (globalPosition);
}
protected function updatePosition():void{
if (((((insideBlock) && (insideBlock.solidBody))) && (localPosition))){
globalPosition = insideBlock.solidBody.GetWorldPoint(localPosition);
rotation = ((insideBlock.solidBody.GetAngle() * 180) / Math.PI);
};
x = (globalPosition.x * 32);
y = (globalPosition.y * 32);
}
override public function setPosition(_arg1:b2Vec2):void{
var _local2:Number;
var _local3:IceBlock;
_local2 = 0;
while (_local2 < Controller.level.blockList.length) {
_local3 = (Controller.level.blockList[_local2] as IceBlock);
if (!_local3){
} else {
if (!_local3.solidBody){
} else {
if (_local3.testPoint(_arg1)){
insideBlock = _local3;
localPosition = _local3.solidBody.GetLocalPoint(_arg1);
break;
};
};
};
_local2++;
};
globalPosition = _arg1.Copy();
updatePosition();
}
}
}//package com.nitrome.icebreaker
Section 151
//FrozenGuy1 (com.nitrome.icebreaker.FrozenGuy1)
package com.nitrome.icebreaker {
public dynamic class FrozenGuy1 extends FrozenCharacter {
public function FrozenGuy1(){
addFrameScript(0, frame1, 14, frame15, 40, frame41, 65, frame66, 78, frame79, 97,
, 104,
, 108,
, 122,
, 148,
, 173, , 186, , 205,
, 212,
, 216,
, 230,
, 0x0100,
, 281, , 294, , 313, frame314, 320, , 324, , 338, frame339, 364,
, 389,
, 402, , 421, , 428, , 432, , 446,
, 472,
, 497,
, 510, , 529, , 536,
);
}
function (){
gotoAndPlay("standing3");
}
function (){
gotoAndPlay("standing2");
}
function (){
gotoAndPlay("walking3");
}
function frame15(){
gotoAndStop("frozen1");
}
function (){
gotoAndPlay("walking2");
}
function frame1(){
stop();
}
function (){
gotoAndPlay("walking5");
}
function frame41(){
gotoAndStop("frozen1");
}
function (){
gotoAndPlay("walking4");
}
function (){
gotoAndPlay("victory5");
}
function
(){
stop();
}
function (){
gotoAndPlay("victory4");
}
function frame66(){
gotoAndPlay("standing1");
}
function (){
stop();
}
function frame314(){
gotoAndPlay("victory3");
}
function (){
stop();
}
function frame79(){
gotoAndPlay("walking1");
}
function (){
stop();
}
function (){
stop();
}
function
(){
gotoAndStop("frozen5");
}
function
(){
gotoAndPlay("victory2");
}
function
(){
stop();
}
function
(){
stop();
}
function
(){
gotoAndPlay("victory1");
}
function frame339(){
gotoAndStop("frozen4");
}
function
(){
stop();
}
function
(){
stop();
}
function
(){
gotoAndStop("frozen3");
}
function
(){
gotoAndStop("frozen5");
}
function
(){
gotoAndStop("frozen2");
}
function
(){
gotoAndStop("frozen4");
}
function
(){
gotoAndPlay("standing5");
}
function
(){
gotoAndStop("frozen3");
}
function
(){
gotoAndStop("frozen2");
}
function
(){
gotoAndPlay("standing4");
}
}
}//package com.nitrome.icebreaker
Section 152
//GloveLinkConstraint (com.nitrome.icebreaker.GloveLinkConstraint)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import com.nitrome.util.*;
public class GloveLinkConstraint extends LinkConstraint {
override public function create():void{
sprite1 = null;
sprite2 = new GloveLinkEnd();
spriteJoin = new GloveLinkMid();
Controller.gloveLayer.addChild(spriteJoin);
Controller.gloveLayer.addChild(sprite2);
hideGrabbingCreatures = false;
}
override public function updateSprites():void{
super.updateSprites();
if (((sprite2) && (spriteJoin))){
sprite2.rotation = (spriteJoin.rotation + 180);
};
}
override public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Array{
var _local3:b2Vec2;
updatePositions();
_local3 = Geometry.segmentIntersection(globalPosition1, globalPosition2, _arg1, _arg2);
if (!_local3){
return (null);
};
destroy();
Global.removeFromList(this, Controller.level.constraintList);
return ([]);
}
}
}//package com.nitrome.icebreaker
Section 153
//HelpSign (com.nitrome.icebreaker.HelpSign)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
public class HelpSign extends ActiveObject {
public var attachedBlock:Block;
public var localPosition:b2Vec2;
override public function updatePosition():void{
super.updatePosition();
rotation = (((attachedBlock) && (attachedBlock.solidBody))) ? ((attachedBlock.solidBody.GetAngle() * 180) / Math.PI) : 0;
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - 0.75), (globalPosition.y - 1.5));
_local1.upperBound = new b2Vec2((globalPosition.x + 0.75), globalPosition.y);
return (_local1);
}
override public function deactivate():void{
super.deactivate();
attachedBlock = null;
Controller.level.showHint = false;
}
override public function advance():void{
super.advance();
if (((attachedBlock) && (attachedBlock.solidBody))){
globalPosition = attachedBlock.solidBody.GetWorldPoint(localPosition);
updatePosition();
};
Controller.level.showHint = hitTestPoint(Controller.root.mouseX, Controller.root.mouseY);
}
override public function activate():void{
super.activate();
attachedBlock = Controller.level.searchForBlock(globalPosition);
if (!attachedBlock){
return;
};
localPosition = attachedBlock.solidBody.GetLocalPoint(globalPosition);
}
override public function create():void{
super.create();
Controller.activeLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
Section 154
//IceBlock (com.nitrome.icebreaker.IceBlock)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import flash.display.*;
import com.nitrome.util.*;
public class IceBlock extends Block {
public var touchFinishTime:Number;// = 0
public var touchFinish:Finish;// = null
public static var iceTexture:BitmapData;
public function IceBlock(){
touchFinishTime = 0;
touchFinish = null;
super();
if (!iceTexture){
iceTexture = new IceTexture(125, 125);
};
texture = iceTexture;
= 0.7;
= 0xFFFFFF;
= 1.4;
= 3102341;
}
override public function advance():void{
var _local1:b2AABB;
var _local2:Number;
var _local3:Number;
super.advance();
if ((this is BuoyantBlock)){
return;
};
_local1 = getBoundingBox();
if (((((solidBody) && (_local1))) && ((_local1.upperBound.y > Controller.level.sea.yPosition)))){
_local2 = ((_local1.upperBound.y - Controller.level.sea.yPosition) / (_local1.upperBound.y - _local1.lowerBound.y));
if (_local2 > 1){
_local2 = 1;
};
_local3 = (1 - (0.15 * _local2));
solidBody.SetLinearVelocity(new b2Vec2((solidBody.m_linearVelocity.x * _local3), (solidBody.m_linearVelocity.y * _local3)));
solidBody.SetAngularVelocity((solidBody.m_angularVelocity * _local3));
if (_local1.lowerBound.y > ((Controller.level.sea.yPosition + (Level.SEA_MAX_HEIGHT / 32)) + 2)){
destroyContained();
unsolidify();
Global.removeFromList(this, Controller.level.blockList);
};
};
}
override public function prerenderBitmap():void{
super.prerenderBitmap();
sprite.alpha = 0.7;
}
public function smashAndFree(_arg1:Finish):void{
var _local2:Number;
var _local3:Number;
var _local4:IceFragment;
destroyContained(true, _arg1);
_local2 = int((getMass() * 3));
if (_local2 > 10){
_local2 = 10;
};
_local3 = 0;
while (_local3 < _local2) {
_local4 = new IceFragment(this);
_local4.create();
Controller.level.fragmentList.push(_local4);
_local3++;
};
unsolidify();
Global.removeFromList(this, Controller.level.blockList);
}
override protected function makePoly(_arg1:Array):b2PolygonShape{
var _local2:b2PolygonDef;
_local2 = new b2PolygonDef();
_local2.vertexCount = _arg1.length;
_local2.vertices = _arg1.slice();
_local2.density = 1;
_local2.friction = 0.2;
return ((solidBody.CreateShape(_local2) as b2PolygonShape));
}
public function anyFrozenInside():Boolean{
var _local1:Number;
var _local2:FrozenCharacter;
_local1 = 0;
while (_local1 < Controller.level.characterList.length) {
_local2 = (Controller.level.characterList[_local1] as FrozenCharacter);
if (!_local2){
} else {
if (_local2.insideBlock == this){
return (true);
};
};
_local1++;
};
return (false);
}
override public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Array{
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:Number;
var _local6:Array;
var _local7:Number;
var _local8:Array;
var _local9:Boolean;
var _local10:Array;
var _local11:b2Vec2;
var _local12:b2Vec2;
var _local13:b2Vec2;
var _local14:ShapeLineIntersection;
var _local15:Number;
var _local16:Number;
var _local17:PotentialBlock;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:Array;
var _local22:Block;
var _local23:Number;
var _local24:b2Vec2;
var _local25:b2Vec2;
var _local26:Number;
_local3 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local3.Normalize();
_local4 = new b2Vec2(_local3.y, -(_local3.x));
_local5 = b2Math.b2Dot(_arg1, _local4);
_local6 = [];
_local7 = 0;
while (_local7 < vertexList.length) {
_local11 = localToGlobal(vertexList[_local7]);
_local12 = localToGlobal(vertexList[((_local7 + 1) % vertexList.length)]);
_local13 = Geometry.segmentIntersection(_local11, _local12, _arg1, _arg2);
if (!_local13){
} else {
_local14 = new ShapeLineIntersection();
_local14.location = _local13;
_local14.vertex = _local7;
_local14.locationAlongLine = b2Math.b2Dot(_local3, _local13);
_local14.shapePathDirection = (b2Math.b2Dot(_local4, _local12) >= _local5);
_local6.push(_local14);
};
_local7++;
};
if (_local6.length == 0){
return (null);
};
_local6.sortOn("locationAlongLine", Array.NUMERIC);
_local8 = [];
_local7 = 0;
while (_local7 < vertexList.length) {
_local8[_local7] = false;
_local7++;
};
_local9 = false;
_local10 = [];
while (!(_local9)) {
_local7 = 0;
while (_local7 < vertexList.length) {
if (!_local8[_local7]){
_local15 = _local7;
break;
};
_local7++;
};
_local16 = _local15;
_local17 = new PotentialBlock();
_local17.path = [];
_local17.originalLines = [];
do {
_local18 = -1;
_local7 = 0;
while (_local7 < _local6.length) {
if (_local6[_local7].vertex == _local16){
_local18 = _local7;
};
_local7++;
};
if (_local18 == -1){
_local8[_local16] = true;
++_local16;
if (_local16 >= vertexList.length){
_local16 = 0;
};
_local17.path.push(vertexList[_local16]);
_local17.originalLines.push(originalLine[_local16]);
} else {
_local14 = _local6[_local18];
_local19 = (_local18 + (_local14.shapePathDirection) ? 1 : -1);
_local20 = _local6[_local19];
if (((_local20) && (!((_local20.shapePathDirection == _local14.shapePathDirection))))){
_local8[_local16] = true;
_local17.originalLines.push(false);
_local17.originalLines.push(originalLine[_local20.vertex]);
_local17.originalLines.push(originalLine[((_local20.vertex + 1) % vertexList.length)]);
_local16 = ((_local20.vertex + 1) % vertexList.length);
_local17.path.push(globalToLocal(_local14.location));
_local17.path.push(globalToLocal(_local20.location));
_local17.path.push(vertexList[_local16]);
} else {
_local8[_local16] = true;
_local16 = ((_local16 + 1) % vertexList.length);
_local17.path.push(vertexList[_local16]);
_local17.originalLines.push(originalLine[_local16]);
};
};
} while (_local16 != _local15);
_local10.push(_local17);
_local9 = true;
_local7 = 0;
while (_local7 < vertexList.length) {
if (!_local8[_local7]){
_local9 = false;
};
_local7++;
};
};
if (_local10.length > 1){
_local21 = [];
_local7 = 0;
while (_local7 < _local10.length) {
if (_local17.path.length < 3){
} else {
_local22 = new (this["constructor"]);
_local23 = 0;
while (_local23 < _local10[_local7].path.length) {
_local22.addVertex(_local10[_local7].path[_local23], _local10[_local7].originalLines[_local23]);
_local23++;
};
_local22.position = solidBody.GetPosition();
_local22.rotation = solidBody.GetAngle();
_local24 = _local10[_local7].approximateCentroid();
_local22.velocity = solidBody.GetLinearVelocityFromLocalPoint(_local24);
_local22.rotationalVelocity = solidBody.GetAngularVelocity();
_local22.solidify();
if (_local22.getMass() < 0.1){
_local22.unsolidify();
} else {
_local21.push(_local22);
_local25 = b2Math.b2CrossVF(b2Math.SubtractVV(_arg2, _arg1), 1);
_local25.Normalize();
if (b2Math.b2Dot(_local25, b2Math.SubtractVV(_local24, _arg1)) < 0){
_local25.Multiply(-1);
};
_local26 = ((0.4 * _local22.solidBody.GetMass()) * Math.abs(_local25.y));
_local25.Multiply(_local26);
_local22.solidBody.ApplyImpulse(_local25, _local22.solidBody.GetWorldCenter());
};
};
_local7++;
};
if (_local21.length > 1){
unsolidify();
return (_local21);
};
if (_local21[0]){
_local21[0].unsolidify();
};
return (null);
};
return (null);
}
}
}//package com.nitrome.icebreaker
import Box2D.Common.Math.*;
class ShapeLineIntersection {
public var vertex:Number;
public var location:b2Vec2;
public var shapePathDirection:Boolean;
public var locationAlongLine:Number;
private function ShapeLineIntersection(){
}
}
class PotentialBlock {
public var path:Array;
public var originalLines:Array;
private function PotentialBlock(){
}
public function approximateCentroid():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
while (_local4 < path.length) {
_local5 = path[_local4].x;
_local6 = path[_local4].y;
_local7 = path[((_local4 + 1) % path.length)].x;
_local8 = path[((_local4 + 1) % path.length)].y;
_local9 = ((_local5 * _local8) - (_local7 * _local6));
_local1 = (_local1 + _local9);
_local2 = (_local2 + ((_local5 + _local7) * _local9));
_local3 = (_local3 + ((_local6 + _local8) * _local9));
_local4++;
};
_local1 = (_local1 * 0.5);
_local1 = Math.abs(_local1);
_local2 = (_local2 / (6 * _local1));
_local3 = (_local3 / (6 * _local1));
return (new b2Vec2(_local2, _local3));
}
}
Section 155
//IceFragment (com.nitrome.icebreaker.IceFragment)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import flash.display.*;
import com.nitrome.util.*;
public class IceFragment extends MovieClip {
public var globalPosition:b2Vec2;
public var
:Number;
public var velocity:b2Vec2;
public function IceFragment(_arg1:IceBlock){
var _local2:b2AABB;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
super();
_local2 = _arg1.getBoundingBox();
_local3 = ((_local2.upperBound.x + _local2.lowerBound.x) * 0.5);
_local4 = ((_local2.upperBound.y + _local2.lowerBound.y) * 0.5);
_local5 = (_local2.upperBound.x - _local2.lowerBound.x);
_local6 = (_local2.upperBound.y - _local2.lowerBound.y);
globalPosition = new b2Vec2();
_local7 = 0;
while (_local7 < 10) {
globalPosition.x = (_local2.lowerBound.x + (Math.random() * _local5));
globalPosition.y = (_local2.lowerBound.y + (Math.random() * _local6));
if (_arg1.testPoint(globalPosition)){
break;
};
_local7++;
};
velocity = new b2Vec2();
velocity.x = ((globalPosition.x - _local3) * 0.06);
velocity.y = (((globalPosition.y - _local4) * 0.06) - 0.3);
= ((Math.random() - 0.5) * 20);
_local8 = 0;
if ((_arg1 is ForceBlock)){
_local8 = 5;
};
if ((_arg1 is BuoyantBlock)){
_local8 = 10;
};
gotoAndStop(((1 + int((Math.random() * 5))) + _local8));
alpha = 0.7;
globalPosition.Subtract(velocity);
advance();
}
public function destroy():void{
if (parent){
parent.removeChild(this);
};
Global.removeFromList(this, Controller.level.fragmentList);
}
public function create():void{
Controller.fragmentLayer.addChild(this);
}
public function advance():void{
velocity.y = (velocity.y + 0.03);
globalPosition.Add(velocity);
x = int((globalPosition.x * 32));
y = int((globalPosition.y * 32));
rotation = (rotation +
);
if (globalPosition.y > (Controller.level.sea.yPosition + 4)){
destroy();
};
}
}
}//package com.nitrome.icebreaker
Section 156
//JoinBlock (com.nitrome.icebreaker.JoinBlock)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import flash.display.*;
import com.nitrome.util.*;
import flash.ui.*;
public class JoinBlock extends Block {
public var :b2Vec2;
public var
:GloveReachingOut;
public var :b2Vec2;
public static var joinBlockTexture:BitmapData;
public function JoinBlock(){
if (!joinBlockTexture){
joinBlockTexture = new JoinBlockTexture(125, 125);
};
texture = joinBlockTexture;
= 9680577;
= 6126468;
= true;
= 5559807;
= 10;
}
public function startDragging(_arg1:b2Vec2):void{
if (!solidBody){
return;
};
if (!
){
= new GloveReachingOut();
.stop();
};
Controller.cutLayer.graphics.clear();
Controller.cutLayer.alpha = 1;
Controller.cutLayer.visible = true;
Controller.cutLayer.addChild(
);
.x = (_arg1.x * 32);
.y = (_arg1.y * 32);
= solidBody.GetLocalPoint(_arg1);
adjustDragging(_arg1);
Mouse.hide();
}
public function adjustDragging(_arg1:b2Vec2):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (!solidBody){
return;
};
_local2 = (solidBody.GetWorldPoint().x * 32);
_local3 = (solidBody.GetWorldPoint().y * 32);
_local4 = ((_arg1.x * 32) - _local2);
_local5 = ((_arg1.y * 32) - _local3);
_local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
_local7 = (((Math.atan2(_local5, _local4) * 180) / Math.PI) + 90);
if (_local6 < 15){
_local6 = 15;
};
if (_local6 > 380){
_local6 = 380;
};
.x = _local2;
.y = _local3;
.glove.y = (-(_local6) + 15);
.rotation = _local7;
}
public function stopDragging(_arg1:b2Vec2):void{
var _local2:b2Vec2;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Number;
var _local10:ProtectedArea;
var _local11:Number;
var _local12:Number;
var _local13:MetalLinkConstraint;
var _local14:*;
var _local15:b2Vec2;
var _local16:GloveLinkConstraint;
var _local17:Character;
var _local18:ActiveObject;
var _local19:Block;
if (!solidBody){
return;
};
_local2 = solidBody.GetWorldPoint();
_local3 = (_arg1.x - _local2.x);
_local4 = (_arg1.y - _local2.y);
_local5 = (380 / 32);
if (((_local3 * _local3) + (_local4 * _local4)) > (_local5 * _local5)){
_local9 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local3 = (_local3 * (_local5 / _local9));
_local4 = (_local4 * (_local5 / _local9));
_arg1 = new b2Vec2((_local2.x + _local3), (_local2.y + _local4));
};
if (
.parent){
.parent.removeChild(
);
};
_local7 = false;
_local8 = false;
_local6 = 0;
while (_local6 < Controller.level.activeObjectList.length) {
_local10 = (Controller.level.activeObjectList[_local6] as ProtectedArea);
if (!_local10){
} else {
_local11 = Geometry.squareDistancePointToAABB(_arg1, _local10.getBoundingBox());
_local12 = (5 / 32);
if (_local11 < (_local12 * _local12)){
_local7 = true;
break;
};
};
_local6++;
};
_local6 = 0;
while (_local6 < Controller.level.constraintList.length) {
_local13 = (Controller.level.constraintList[_local6] as MetalLinkConstraint);
if (!_local13){
} else {
if (Geometry.segmentIntersection(_local2, _arg1, _local13.globalPosition1, _local13.globalPosition2)){
_local8 = true;
break;
};
};
_local6++;
};
if (((!(_local7)) && (!(_local8)))){
_local14 = null;
_local15 = null;
_local16 = null;
_local6 = 0;
while (_local6 < Controller.level.characterList.length) {
_local17 = Controller.level.characterList[_local6];
if ((_local17 is StandingCharacter)){
if (_local17.atFinish){
} else {
if (Geometry.squareDistancePointToPoint(_local17.getPosition(), _arg1) < (0.5 * 0.5)){
_local14 = _local17;
_local15 = _local17.getPosition().Copy();
break;
};
};
};
_local6++;
};
if (!_local14){
_local6 = 0;
while (_local6 < Controller.level.activeObjectList.length) {
_local18 = Controller.level.activeObjectList[_local6];
if ((((((_local18 is Bird)) || ((_local18 is Wolfrat)))) || ((_local18 is Bomb)))){
if ((((_local18 is Wolfrat)) && (!((_local18 as Wolfrat).alive)))){
} else {
if (Geometry.squareDistancePointToPoint(_local18.getPosition(), _arg1) < (0.4 * 0.4)){
_local14 = _local18;
_local15 = _local18.getPosition().Copy();
break;
};
};
};
_local6++;
};
if (!_local14){
_local6 = 0;
while (_local6 < Controller.level.blockList.length) {
_local19 = Controller.level.blockList[_local6];
if (_local19 == this){
} else {
if ((_local19 is DeathBlock)){
} else {
if (_local19.testPoint(_arg1)){
_local14 = _local19;
_local15 = _arg1;
break;
};
};
};
_local6++;
};
};
};
if (_local14){
_local16 = new GloveLinkConstraint();
_local16.attached1 = this;
_local16.globalPosition1 = solidBody.GetWorldPoint();
_local16.attached2 = _local14;
_local16.globalPosition2 = _local15;
_local16.create();
_local16.activate();
Controller.level.constraintList.push(_local16);
NitromeGame.sound_manager.playSound("grab");
};
} else {
if (_local8){
NitromeGame.sound_manager.playSound("blocked");
} else {
NitromeGame.sound_manager.playSound("noslice");
};
};
Mouse.show();
}
}
}//package com.nitrome.icebreaker
Section 157
//Level (com.nitrome.icebreaker.Level)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import Box2D.Dynamics.Contacts.*;
import com.nitrome.util.*;
import com.nitrome.game.*;
public class Level {
public var cameraFocusX:Number;// = 0
public var cameraFocusY:Number;// = 0
public var fragmentList:Array;
public var railCanvas:BitmapData;// = null
public var world:b2World;
public var constraintList:Array;
public var :Number;// = 0
public var :Number;// = 0
public var :Number;
public var activeObjectList:Array;
public var showHint:Boolean;// = false
public var topEdge:Number;
public var
:Boolean;// = false
public var cameraStart:b2Vec2;
public var :Number;// = 0
public var :Sprite;// = null
public var :HintOverlay;
public var blockList:Array;
public var sea:Sea;
public var
:Number;// = 0
public var :Boolean;// = false
public var :b2Vec2;// = null
public var map:MiniMap;
public var :Number;// = 0
public var screenShakeIntensity:Number;// = 0
public var railBitmap:Bitmap;// = null
public var leftEdge:Number;
public var characterList:Array;
public var :EditorPanel;
public var :Boolean;// = false
public var :JoinBlock;// = null
public var rightEdge:Number;
public var :Number;// = 0
public static const SEA_MAX_HEIGHT:Number = 50;
public static const EDITOR_ENABLED:Boolean = false;
public function Level(){
= false;
= null;
= null;
= false;
= null;
= 0;
= 0;
cameraFocusX = 0;
cameraFocusY = 0;
= 0;
= 0;
= 0;
= 0;
= false;
screenShakeIntensity = 0;
showHint = false;
railCanvas = null;
railBitmap = null;
super();
}
public function isTouchingFinish(_arg1:b2Body):Finish{
var _local2:b2ContactEdge;
var _local3:Number;
var _local4:Finish;
if (!_arg1){
return (null);
};
_local2 = _arg1.m_contactList;
while (_local2) {
if (((_local2.contact) && ((_local2.contact.m_manifoldCount > 0)))){
_local3 = 0;
while (_local3 < Controller.level.activeObjectList.length) {
_local4 = (Controller.level.activeObjectList[_local3] as Finish);
if (((_local4) && ((_local4.solidBody == _local2.other)))){
if (_local2.contact.GetShape1().GetBody() == _local4.solidBody){
//unresolved if
} else {
if (_local2.contact.GetShape2().GetBody() == _local4.solidBody){
//unresolved if
} else {
return (_local4);
};
};
};
_local3++;
};
};
_local2 = _local2.next;
};
return (null);
}
public function advance():void{
var _local1:Number;
var _local2:Number;
if ( ){
};
if (((((!( )) || (!( .isGameFrozen())))) && (!(Controller.isPaused())))){
_local2 = 2;
_local1 = 0;
while (_local1 < _local2) {
world.Step(((1 / 25) / _local2), (10 / _local2));
_local1++;
};
_local1 = 0;
while (_local1 < blockList.length) {
blockList[_local1].advance();
_local1++;
};
_local1 = 0;
while (_local1 < characterList.length) {
characterList[_local1].advance();
_local1++;
};
_local1 = 0;
while (_local1 < blockList.length) {
blockList[_local1].updateBitmap();
_local1++;
};
_local1 = 0;
while (_local1 < constraintList.length) {
constraintList[_local1].advance();
_local1++;
};
_local1 = 0;
while (_local1 < activeObjectList.length) {
activeObjectList[_local1].advance();
_local1++;
};
_local1 = (fragmentList.length - 1);
while (_local1 >= 0) {
fragmentList[_local1].advance();
_local1--;
};
};
();
();
sea.advance();
map.advance();
if (){
.advance();
};
if (!
){
();
};
if (){
.adjustDragging(new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32)));
} else {
if (((!()) && (!()))){
Controller.cutLayer.alpha = Global.slide(Controller.cutLayer.alpha, 0, 0.1);
};
};
if (screenShakeIntensity > 0){
screenShakeIntensity--;
};
}
public function create(_arg1:XML):void{
var _local2:Number;
var _local3:b2AABB;
var _local4:Number;
var _local5:Array;
var _local6:XML;
var _local7:Block;
var _local8:PinConstraint;
var _local9:RailPinConstraint;
var _local10:LinkConstraint;
var _local11:MetalLinkConstraint;
var _local12:TurningPinsConstraint;
var _local13:Character;
var _local14:ActiveObject;
_local2 = 0;
leftEdge = -400;
rightEdge = 400;
topEdge = -500;
if (_arg1.hasOwnProperty("@el")){
leftEdge = Number(_arg1.@el);
};
if (_arg1.hasOwnProperty("@er")){
rightEdge = Number(_arg1.@er);
};
if (_arg1.hasOwnProperty("@et")){
topEdge = Number(_arg1.@et);
};
if (_arg1.hasOwnProperty("@sy")){
_local2 = Number(_arg1.@sy);
};
sea = new Sea();
sea.create(_local2);
cameraStart = new b2Vec2();
cameraStart.x = ((leftEdge + rightEdge) / 64);
cameraStart.y = (((topEdge / 32) + _local2) / 2);
if (_arg1.hasOwnProperty("@cx")){
cameraStart.x = (Number(_arg1.@cx) / 32);
};
if (_arg1.hasOwnProperty("@cy")){
cameraStart.y = (Number(_arg1.@cy) / 32);
};
cameraFocusX = (cameraStart.x * 32);
cameraFocusY = (cameraStart.y * 32);
_local3 = new b2AABB();
_local3.upperBound.Set(((rightEdge + 550) / 32), (_local2 + (550 / 32)));
_local3.lowerBound.Set(((leftEdge - 550) / 32), ((topEdge - 550) / 32));
world = new b2World(_local3, new b2Vec2(0, 5), true);
world.SetContactListener(new ContactListener());
blockList = [];
characterList = [];
constraintList = [];
activeObjectList = [];
for each (_local6 in _arg1.b) {
if (_local6.@t == "b"){
_local7 = new BuoyantBlock();
} else {
if (_local6.@t == "i"){
_local7 = new IceBlock();
} else {
if (_local6.@t == "w"){
_local7 = new WoodBlock();
} else {
if (_local6.@t == "d"){
_local7 = new DeathBlock();
} else {
if (_local6.@t == "f"){
_local7 = new ForceBlock();
} else {
if (_local6.@t == "j"){
_local7 = new JoinBlock();
} else {
if (_local6.@t == "p"){
_local7 = new PinnableBlock();
} else {
if (_local6.@t == "u"){
_local7 = new BouncyBlock();
} else {
_local7 = new Block();
};
};
};
};
};
};
};
};
_local5 = _local6.@v.split(",");
_local4 = 0;
while (_local4 < _local5.length) {
_local7.addVertex(new b2Vec2((_local5[_local4] / 32), (_local5[(_local4 + 1)] / 32)));
_local4 = (_local4 + 2);
};
_local7.solidify();
_local7.editorLocked = true;
blockList.push(_local7);
};
for each (_local6 in _arg1.p) {
_local8 = new PinConstraint();
_local5 = _local6.@pos.split(",");
_local8.create();
_local8.setPosition(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
constraintList.push(_local8);
};
for each (_local6 in _arg1.rp) {
_local9 = new RailPinConstraint();
_local9.create();
_local9.takeRailPathString(_local6.@path);
_local9.looping = (_local6.@loop == "y");
constraintList.push(_local9);
};
updateRails();
for each (_local6 in _arg1.l) {
_local10 = new LinkConstraint();
_local10.create();
_local5 = _local6.@p1.split(",");
_local10.setPosition1(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
_local5 = _local6.@p2.split(",");
_local10.setPosition2(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
constraintList.push(_local10);
};
for each (_local6 in _arg1.ml) {
_local11 = new MetalLinkConstraint();
_local11.create();
_local5 = _local6.@p1.split(",");
_local11.setPosition1(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
_local5 = _local6.@p2.split(",");
_local11.setPosition2(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
constraintList.push(_local11);
};
for each (_local6 in _arg1.tp) {
_local12 = new TurningPinsConstraint();
_local12.spinSpeed = Number(_local6.@sp);
_local5 = _local6.@pos.split(",");
_local12.create();
_local12.setPosition(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
constraintList.push(_local12);
};
for each (_local6 in _arg1.c) {
if (_local6.@t == "f1"){
_local13 = new FrozenGuy1();
} else {
if (_local6.@t == "s1"){
_local13 = new StandingGuy1();
} else {
continue;
};
};
_local5 = _local6.@pos.split(",");
_local13.create();
_local13.setPosition(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
characterList.push(_local13);
};
= characterList.length;
for each (_local6 in _arg1.ao) {
if (_local6.@t == "f"){
_local14 = new Finish();
} else {
if (_local6.@t == "w"){
_local14 = new Weight();
} else {
if (_local6.@t == "b"){
_local14 = new Bird();
} else {
if (_local6.@t == "pa32"){
_local14 = new ProtectedArea32();
} else {
if (_local6.@t == "pa64"){
_local14 = new ProtectedArea64();
} else {
if (_local6.@t == "pa28"){
_local14 = new ProtectedArea128();
} else {
if (_local6.@t == "wr"){
_local14 = new Wolfrat();
} else {
if (_local6.@t == "fwr"){
_local14 = new FatWomanRound();
} else {
if (_local6.@t == "fwls"){
_local14 = new FatWomanLargeSquare();
} else {
if (_local6.@t == "fwss"){
_local14 = new FatWomanSmallSquare();
} else {
if (_local6.@t == "hs"){
_local14 = new HelpSign();
} else {
if (_local6.@t == "bomb"){
_local14 = new Bomb();
} else {
continue;
};
};
};
};
};
};
};
};
};
};
};
};
_local5 = _local6.@pos.split(",");
_local14.create();
_local14.setPosition(new b2Vec2((_local5[0] / 32), (_local5[1] / 32)));
activeObjectList.push(_local14);
};
= 30;
activateAll();
map = new MiniMap();
map.create();
= new HintOverlay();
.create(_arg1.@ht);
if (((EDITOR_ENABLED) && (!( )))){
= new EditorPanel();
};
fragmentList = [];
= 0;
updateCounters();
Controller.background.updateType();
Controller.stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
Controller.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
Controller.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
Controller.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
}
public function destroy(_arg1:Boolean=false):void{
var _local2:Number;
deactivateAll();
_local2 = 0;
while (_local2 < constraintList.length) {
constraintList[_local2].destroy();
_local2++;
};
_local2 = 0;
while (_local2 < blockList.length) {
blockList[_local2].unsolidify();
_local2++;
};
_local2 = 0;
while (_local2 < characterList.length) {
characterList[_local2].destroy();
_local2++;
};
_local2 = 0;
while (_local2 < activeObjectList.length) {
activeObjectList[_local2].destroy();
_local2++;
};
_local2 = (fragmentList.length - 1);
while (_local2 >= 0) {
fragmentList[_local2].destroy();
_local2--;
};
blockList = [];
characterList = [];
constraintList = [];
activeObjectList = [];
fragmentList = [];
sea.destroy();
map.destroy();
if ((() && (.parent))){
.parent.removeChild();
};
if (){
.destroy();
= null;
};
if ((( ) && (!(_arg1)))){
.destroy();
= null;
};
if (((railBitmap) && (railBitmap.parent))){
railBitmap.parent.removeChild(railBitmap);
};
railBitmap = null;
railCanvas = null;
CustomCursor.setCursor(null);
Controller.stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
Controller.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
Controller.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp);
Controller.stage.removeEventListener(Event.MOUSE_LEAVE, mouseLeave);
}
protected function
():void{
var _local1:Boolean;
var _local2:Boolean;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
if (Controller.isPaused()){
return;
};
_local1 = ((!( )) || (( .selectedMode == 0)));
_local2 = ((Key.isDown(Key.LEFT)) || (((_local1) && (Key.isDown(Key.A)))));
_local3 = ((Key.isDown(Key.RIGHT)) || (((_local1) && (Key.isDown(Key.D)))));
_local4 = ((Key.isDown(Key.UP)) || (((_local1) && (Key.isDown(Key.W)))));
_local5 = ((Key.isDown(Key.DOWN)) || (((_local1) && (Key.isDown(Key.S)))));
if (){
if (((((Controller.edgeScrolling) && ((Controller.stage.mouseX < 50)))) || (_local2))){
= -10;
} else {
if (((((Controller.edgeScrolling) && ((Controller.stage.mouseX > 500)))) || (_local3))){
= 10;
} else {
= 0;
};
};
if (((((Controller.edgeScrolling) && ((Controller.stage.mouseY < 50)))) || (_local4))){
= -10;
} else {
if (((((Controller.edgeScrolling) && ((Controller.stage.mouseY > 350)))) || (_local5))){
= 10;
} else {
= 0;
};
};
} else {
= 0;
= 0;
};
= Global.slide(, , 1);
= Global.slide(,
, 1);
cameraFocusX = (cameraFocusX + );
cameraFocusY = (cameraFocusY + );
if (((!( )) || (!( .isGameFrozen())))){
if (cameraFocusY > (((sea.yPosition * 32) - 200) + SEA_MAX_HEIGHT)){
cameraFocusY = (((sea.yPosition * 32) - 200) + SEA_MAX_HEIGHT);
if (
> 0){
= 0;
};
};
if (cameraFocusX < (leftEdge + 275)){
cameraFocusX = (leftEdge + 275);
if ( < 0){
= 0;
};
};
if (cameraFocusX > (rightEdge - 275)){
cameraFocusX = (rightEdge - 275);
if ( > 0){
= 0;
};
};
if (cameraFocusY < (topEdge + 200)){
cameraFocusY = (topEdge + 200);
if (
< 0){
= 0;
};
};
};
Controller.content.x = (275 - cameraFocusX);
Controller.content.y = ((200 - cameraFocusY) + (screenShakeIntensity * ((Controller.frameNumber % 2)) ? 1 : -1));
Controller.background.cloudsDeltaX = (Controller.background.cloudsDeltaX + 0.333);
Controller.background.scrollTo((cameraFocusX - (leftEdge + 275)), (cameraFocusY - (((sea.yPosition * 32) - 200) + SEA_MAX_HEIGHT)));
}
public function getScore():Number{
if ( < 10){
return ([1000, 800, 700, 600, 500, 450, 400, 350, 300, 250][]);
};
return (Math.max((200 - ( * 10)), 0));
}
public function mouseMove(_arg1:MouseEvent):void{
var _local2:b2Vec2;
var _local3:Boolean;
var _local4:Number;
var _local5:MetalLinkConstraint;
if ( ){
.mouseMove(_arg1);
};
if (){
_local2 = new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32));
_local3 = true;
_local4 = 0;
while (_local4 < activeObjectList.length) {
if (!(activeObjectList[_local4] is ProtectedArea)){
} else {
if ((activeObjectList[_local4] as ProtectedArea).sliceTouches(, _local2)){
_local3 = false;
break;
};
};
_local4++;
};
_local4 = 0;
while (_local4 < constraintList.length) {
_local5 = (constraintList[_local4] as MetalLinkConstraint);
if (!_local5){
} else {
if (Geometry.segmentIntersection(_local5.globalPosition1, _local5.globalPosition2, , _local2)){
_local3 = false;
break;
};
};
_local4++;
};
Controller.cutLayer.graphics.clear();
if (_local3){
Controller.cutLayer.graphics.lineStyle(2, 0xFFFFFF);
} else {
Controller.cutLayer.graphics.lineStyle(2, 0xFF0000);
};
Controller.cutLayer.graphics.moveTo((.x * 32), (.y * 32));
Controller.cutLayer.graphics.lineTo(Controller.content.mouseX, Controller.content.mouseY);
};
= true;
}
public function mouseLeave(_arg1:Event):void{
= false;
}
public function mouseUp(_arg1:MouseEvent):void{
var _local2:b2Vec2;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Number;
var _local6:MetalLinkConstraint;
_local2 = new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32));
if ( ){
.mouseUp(_arg1);
};
if (){
= false;
if (_local2.x < (leftEdge / 32)){
_local2 = Geometry.lineIntersection(, _local2, new b2Vec2((leftEdge / 32), 0), new b2Vec2((leftEdge / 32), 100));
};
if (_local2.x > (rightEdge / 32)){
_local2 = Geometry.lineIntersection(, _local2, new b2Vec2((rightEdge / 32), 0), new b2Vec2((rightEdge / 32), 100));
};
if (_local2.y < (topEdge / 32)){
_local2 = Geometry.lineIntersection(, _local2, new b2Vec2(0, (topEdge / 32)), new b2Vec2(100, (topEdge / 32)));
};
if (_local2.y > (sea.yPosition + (SEA_MAX_HEIGHT / 32))){
_local2 = Geometry.lineIntersection(, _local2, new b2Vec2(0, (sea.yPosition + (SEA_MAX_HEIGHT / 32))), new b2Vec2(100, (sea.yPosition + (SEA_MAX_HEIGHT / 32))));
};
_local3 = slice(, _local2);
if (!_local3){
Controller.cutLayer.graphics.clear();
Controller.cutLayer.graphics.lineStyle(2, 0xFF0000);
Controller.cutLayer.graphics.moveTo((.x * 32), (.y * 32));
Controller.cutLayer.graphics.lineTo((_local2.x * 32), (_local2.y * 32));
};
};
if (){
_local4 = true;
_local5 = 0;
for (;_local5 < constraintList.length;_local5++) {
_local6 = (constraintList[_local5] as MetalLinkConstraint);
if (!_local6){
continue;
};
};
.stopDragging(new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32)));
= null;
};
}
public function deactivateConstraints():void{
var _local1:Number;
_local1 = 0;
while (_local1 < constraintList.length) {
constraintList[_local1].deactivate();
_local1++;
};
}
public function slice(_arg1:b2Vec2, _arg2:b2Vec2):Boolean{
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Number;
var _local10:b2AABB;
var _local11:MetalLinkConstraint;
var _local12:FrozenCharacter;
var _local13:Number;
var _local14:Number;
var _local15:Block;
var _local16:Array;
var _local17:FrozenCharacter;
var _local18:PinConstraint;
var _local19:LinkConstraint;
var _local20:Array;
var _local21:ActiveObject;
var _local22:FatWoman;
var _local23:Bomb;
_local3 = blockList.slice();
_local4 = constraintList.slice();
_local5 = activeObjectList.slice();
_local6 = false;
_local7 = false;
_local8 = false;
if ((( ) && ( .isGameFrozen()))){
return (false);
};
_local9 = 0;
while (_local9 < activeObjectList.length) {
if (!(activeObjectList[_local9] is ProtectedArea)){
} else {
if ((activeObjectList[_local9] as ProtectedArea).sliceTouches(_arg1, _arg2)){
return (false);
};
};
_local9++;
};
_local9 = 0;
while (_local9 < constraintList.length) {
_local11 = (constraintList[_local9] as MetalLinkConstraint);
if (!_local11){
} else {
if (Geometry.segmentIntersection(_local11.globalPosition1, _local11.globalPosition2, _arg1, _arg2)){
NitromeGame.sound_manager.playSound("blocked");
return (false);
};
};
_local9++;
};
_local9 = 0;
while (_local9 < characterList.length) {
_local12 = (characterList[_local9] as FrozenCharacter);
if (!_local12){
} else {
_local13 = Geometry.squareDistancePointToSegment(_arg1, _arg2, _local12.getPosition());
_local14 = (16 / 32);
if (_local13 < (_local14 * _local14)){
Global.removeFromList(_local12.insideBlock, _local3);
};
};
_local9++;
};
_local10 = new b2AABB();
_local10.lowerBound = new b2Vec2(Math.min(_arg1.x, _arg2.x), Math.min(_arg1.y, _arg2.y));
_local10.upperBound = new b2Vec2(Math.max(_arg1.x, _arg2.x), Math.max(_arg1.y, _arg2.y));
while (_local3.length > 0) {
_local15 = _local3.shift();
if (!(_local15 is IceBlock)){
} else {
if (!b2Collision.b2TestOverlap(_local15.getBoundingBox(), _local10)){
} else {
_local15.deactivateContained();
_local16 = _local15.divide(_arg1, _arg2);
if (!_local16){
} else {
_local6 = true;
_local7 = true;
Global.removeFromList(_local15, blockList);
blockList = blockList.concat(_local16);
_local9 = 0;
while (_local9 < characterList.length) {
_local17 = (characterList[_local9] as FrozenCharacter);
if (!_local17){
} else {
if (_local17.insideBlock != _local15){
} else {
_local17.setPosition(_local17.getPosition());
};
};
_local9++;
};
_local9 = 0;
while (_local9 < constraintList.length) {
_local18 = (constraintList[_local9] as PinConstraint);
if (!_local18){
} else {
if (_local18.attachedBlock != _local15){
} else {
_local18.reattachToAnyOf(_local16);
};
};
_local9++;
};
};
};
};
};
activateAll();
while (_local4.length > 0) {
_local19 = (_local4.shift() as LinkConstraint);
if (!_local19){
} else {
_local20 = _local19.divide(_arg1, _arg2);
if (!_local20){
} else {
_local6 = true;
_local8 = true;
Global.removeFromList(_local19, constraintList);
constraintList = constraintList.concat(_local20);
};
};
};
while (_local5.length > 0) {
_local21 = _local5.shift();
if ((_local21 is FatWoman)){
_local22 = (_local21 as FatWoman);
if (_local22.divide(_arg1, _arg2)){
_local6 = true;
Global.removeFromList(_local22, activeObjectList);
};
} else {
if ((_local21 is Bomb)){
_local23 = (_local21 as Bomb);
if (((!(_local23.exploded)) && (_local23.divide(_arg1, _arg2)))){
_local6 = true;
};
};
};
};
if (_local6){
++;
updateCounters();
};
if (_local7){
if (Math.random() > 0.5){
NitromeGame.sound_manager.playSound("ice3");
} else {
NitromeGame.sound_manager.playSound("ice4");
};
};
if (_local8){
NitromeGame.sound_manager.playSound("ropeBreak");
};
if (!_local6){
NitromeGame.sound_manager.playSound("noslice");
};
return (_local6);
}
public function activateAll():void{
var _local1:Number;
_local1 = 0;
while (_local1 < activeObjectList.length) {
activeObjectList[_local1].activate();
_local1++;
};
_local1 = 0;
while (_local1 < constraintList.length) {
constraintList[_local1].activate();
_local1++;
};
}
public function deactivateAll():void{
var _local1:Number;
_local1 = 0;
while (_local1 < constraintList.length) {
constraintList[_local1].deactivate();
_local1++;
};
_local1 = 0;
while (_local1 < activeObjectList.length) {
activeObjectList[_local1].deactivate();
_local1++;
};
}
public function searchForBlock(_arg1:b2Vec2):Block{
var _local2:Number;
if (!_arg1){
return (null);
};
_local2 = 0;
while (_local2 < blockList.length) {
if (blockList[_local2].testPoint(_arg1)){
return (blockList[_local2]);
};
_local2++;
};
return (null);
}
public function ():void{
var _local1:Number;
_local1 = 0;
while (_local1 < constraintList.length) {
constraintList[_local1].activate();
_local1++;
};
}
public function failed():void{
if (!
){
if (!EDITOR_ENABLED){
TimedUnlock.recordDeath(Controller.loadedLevelNumber);
if (canOfferTimedUnlock()){
Controller.popup.open("failedStuck");
} else {
Controller.popup.open("failed");
};
};
= true;
};
}
public function ():void{
if (!
){
Score.value = (Score.value + getScore());
if (!EDITOR_ENABLED){
if (((Controller.atEndOfClan()) && (!(Controller.atEndOfGame())))){
if (Controller.loadedLevelNumber < Controller.lastLevelAvailable.value){
Controller.popup.open("clanComplete2");
} else {
Controller.popup.open("clanComplete");
};
} else {
Controller.popup.open("complete");
NitromeGame.setLevelUnlocked((Controller.loadedLevelNumber + 1));
};
NitromeGame.setLevelCompleted(Controller.loadedLevelNumber);
};
= true;
};
}
public function updateRails():void{
var _local1:Number;
if (railCanvas){
railCanvas.fillRect(new Rectangle(0, 0, railCanvas.width, railCanvas.height), 0);
};
_local1 = 0;
while (_local1 < constraintList.length) {
if (!(constraintList[_local1] is RailPinConstraint)){
} else {
(constraintList[_local1] as RailPinConstraint).render();
};
_local1++;
};
}
public function reduceToXML():XML{
var _local1:XML;
var _local2:XML;
var _local3:Array;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:String;
var _local7:Number;
var _local8:Number;
var _local9:String;
var _local10:String;
_local1 = new XML((((((((((((((("<level el=\"" + ??esc_xattr
) + "\" er=\"") + ??esc_xattr
) + "\" et=\"") + ??esc_xattr
) + "\" sy=\"") + ??esc_xattr
) + "\" cx=\"") + ??esc_xattr
) + "\" cy=\"") + ??esc_xattr
) + "\" ht=\"") + ??esc_xattr
) + "\"/>"));
_local7 = 0;
while (_local7 < blockList.length) {
if (blockList[_local7].vertexList.length < 3){
} else {
_local2 = <b/>
;
if ((blockList[_local7] is BuoyantBlock)){
_local2.@t = "b";
} else {
if ((blockList[_local7] is JoinBlock)){
_local2.@t = "j";
} else {
if ((blockList[_local7] is ForceBlock)){
_local2.@t = "f";
} else {
if ((blockList[_local7] is IceBlock)){
_local2.@t = "i";
} else {
if ((blockList[_local7] is WoodBlock)){
_local2.@t = "w";
} else {
if ((blockList[_local7] is DeathBlock)){
_local2.@t = "d";
} else {
if ((blockList[_local7] is PinnableBlock)){
_local2.@t = "p";
} else {
if ((blockList[_local7] is BouncyBlock)){
_local2.@t = "u";
} else {
_local2.@t = "n";
};
};
};
};
};
};
};
};
_local3 = [];
_local8 = 0;
while (_local8 < blockList[_local7].vertexList.length) {
_local4 = blockList[_local7].localToPixel(blockList[_local7].vertexList[_local8]);
_local3.push(Math.round(_local4.x));
_local3.push(Math.round(_local4.y));
_local8++;
};
_local2.@v = _local3.join(",");
_local1.appendChild(_local2);
};
_local7++;
};
_local7 = 0;
while (_local7 < constraintList.length) {
if ((constraintList[_local7] is RailPinConstraint)){
_local9 = (constraintList[_local7] as RailPinConstraint).getRailPathString();
_local10 = ((constraintList[_local7] as RailPinConstraint).looping) ? "y" : "n";
_local2 = new XML((((("<rp path=\"" + ??esc_xattr
) + "\" loop=\"") + ??esc_xattr
) + "\"/>"));
_local1.appendChild(_local2);
} else {
if ((constraintList[_local7] is PinConstraint)){
_local4 = constraintList[_local7].globalPosition;
_local2 = new XML((("<p pos=\"" + ??esc_xattr
) + "\"/>"));
_local1.appendChild(_local2);
} else {
if ((constraintList[_local7] is LinkConstraint)){
_local4 = constraintList[_local7].globalPosition1;
_local5 = constraintList[_local7].globalPosition2;
if ((constraintList[_local7] is MetalLinkConstraint)){
_local2 = new XML((((("<ml p1=\"" + ??esc_xattr
) + "\" p2=\"") + ??esc_xattr
) + "\"/>"));
} else {
_local2 = new XML((((("<l p1=\"" + ??esc_xattr
) + "\" p2=\"") + ??esc_xattr
) + "\"/>"));
};
_local1.appendChild(_local2);
} else {
if ((constraintList[_local7] is TurningPinsConstraint)){
_local4 = constraintList[_local7].globalPosition;
_local2 = new XML((("<tp pos=\"" + ??esc_xattr
) + "\"/>"));
_local2.@sp = (constraintList[_local7] as TurningPinsConstraint).spinSpeed;
_local1.appendChild(_local2);
};
};
};
};
_local7++;
};
_local7 = 0;
while (_local7 < characterList.length) {
_local4 = characterList[_local7].getPosition();
if ((characterList[_local7] is FrozenGuy1)){
_local6 = "f1";
};
if ((characterList[_local7] is StandingGuy1)){
_local6 = "s1";
};
_local2 = new XML((((("<c t=\"" + ??esc_xattr
) + "\" pos=\"") + ??esc_xattr
) + "\"/>"));
_local1.appendChild(_local2);
_local7++;
};
_local7 = 0;
for (;_local7 < activeObjectList.length;_local7++) {
_local4 = activeObjectList[_local7].getPosition();
_local2 = new XML((("<ao pos=\"" + ??esc_xattr
) + "\"/>"));
if ((activeObjectList[_local7] is Finish)){
_local2.@t = "f";
} else {
if ((activeObjectList[_local7] is Weight)){
_local2.@t = "w";
} else {
if ((activeObjectList[_local7] is Bird)){
_local2.@t = "b";
} else {
if ((activeObjectList[_local7] is ProtectedArea32)){
_local2.@t = "pa32";
} else {
if ((activeObjectList[_local7] is ProtectedArea64)){
_local2.@t = "pa64";
} else {
if ((activeObjectList[_local7] is ProtectedArea128)){
_local2.@t = "pa28";
} else {
if ((activeObjectList[_local7] is Wolfrat)){
_local2.@t = "wr";
} else {
if ((activeObjectList[_local7] is FatWomanRound)){
_local2.@t = "fwr";
} else {
if ((activeObjectList[_local7] is FatWomanLargeSquare)){
_local2.@t = "fwls";
} else {
if ((activeObjectList[_local7] is FatWomanSmallSquare)){
_local2.@t = "fwss";
} else {
if ((activeObjectList[_local7] is HelpSign)){
_local2.@t = "hs";
} else {
if ((activeObjectList[_local7] is Bomb)){
_local2.@t = "bomb";
} else {
continue;
};
};
};
};
};
};
};
};
};
};
};
};
_local1.appendChild(_local2);
};
return (_local1);
}
public function ():void{
var _local1:Number;
var _local2:Boolean;
var _local3:Boolean;
var _local4:Number;
var _local5:Character;
if (characterList.length < 1){
return;
};
_local1 = 0;
_local2 = false;
_local3 = true;
_local4 = 0;
while (_local4 < characterList.length) {
_local5 = characterList[_local4];
if (_local5.isSafe()){
_local1++;
if (_local5.completedTime < 90){
_local3 = false;
};
};
if (_local5.isDead()){
_local2 = true;
};
_local4++;
};
if (_local2){
failed();
} else {
if (_local1 >= ){
if (_local3){
();
};
_local4 = 0;
while (_local4 < characterList.length) {
characterList[_local4].victory();
_local4++;
};
_local4 = 0;
while (_local4 < activeObjectList.length) {
if ((activeObjectList[_local4] is Finish)){
(activeObjectList[_local4] as Finish).victory();
};
_local4++;
};
};
};
}
public function updateCounters():void{
var _local1:Number;
var _local2:Number;
_local1 = 0;
_local2 = 0;
while (_local2 < characterList.length) {
if (characterList[_local2].atFinish){
_local1++;
};
_local2++;
};
Controller.root.moveCounter.text = ((.toString() + "/") + );
if ( >= ( - 2)){
Controller.root.moveCounter.color = 16728128;
} else {
Controller.root.moveCounter.color = 0xFFFFFF;
};
Controller.root.characterCounter.text = ((_local1.toString() + "/") + .toString());
}
public function removeLinksTo(_arg1, _arg2:b2Body, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean, _arg6:Boolean):void{
var _local7:Number;
var _local8:LinkConstraint;
var _local9:Boolean;
var _local10:Boolean;
if (!_arg2){
return;
};
_local7 = (Controller.level.constraintList.length - 1);
while (_local7 >= 0) {
_local8 = (Controller.level.constraintList[_local7] as LinkConstraint);
if (!_local8){
} else {
_local9 = ((_local8 is GloveLinkConstraint)) ? _arg5 : _arg3;
_local10 = ((_local8 is GloveLinkConstraint)) ? _arg6 : _arg4;
if (((_local8.active) && ((_local8.attached1 == _arg1)))){
_local8.deactivate();
if (_local10){
_local8.destroy();
Global.removeFromList(_local8, Controller.level.constraintList);
} else {
if (_local9){
} else {
_local8.storeVelocity1();
_local8.attached1 = "roaming";
_local8.activate();
};
};
} else {
if (((_local8.active) && ((_local8.attached2 == _arg1)))){
_local8.deactivate();
if (_local10){
_local8.destroy();
Global.removeFromList(_local8, Controller.level.constraintList);
} else {
if (_local9){
} else {
_local8.storeVelocity2();
_local8.attached2 = "roaming";
_local8.activate();
};
};
};
};
};
_local7--;
};
}
public function canOfferTimedUnlock():Boolean{
if (!TimedUnlock.couldStartTimer(Controller.loadedLevelNumber)){
return (false);
};
if ((Controller.loadedLevelNumber % 8) == 0){
return (false);
};
return (true);
}
public function mouseDown(_arg1:MouseEvent):void{
var _local2:b2Vec2;
var _local3:Number;
var _local4:JoinBlock;
var _local5:PinnableBlock;
if ( ){
.mouseDown(_arg1);
};
if ( >= ){
return;
};
if (((((!( )) || (!( .isGameFrozen())))) && (!(Controller.isPaused())))){
if (Controller.content.mouseX < leftEdge){
return;
};
if (Controller.content.mouseX > rightEdge){
return;
};
if (Controller.content.mouseY < topEdge){
return;
};
if (Controller.content.mouseY > ((sea.yPosition * 32) + SEA_MAX_HEIGHT)){
return;
};
_local2 = new b2Vec2((Controller.content.mouseX / 32), (Controller.content.mouseY / 32));
= null;
_local3 = 0;
while (_local3 < blockList.length) {
if ((blockList[_local3] is JoinBlock)){
_local4 = (blockList[_local3] as JoinBlock);
if (_local4.testPoint(_local2)){
= _local4;
break;
};
} else {
if ((blockList[_local3] is PinnableBlock)){
_local5 = (blockList[_local3] as PinnableBlock);
if (_local5.takeMouseDown(_local2)){
return;
};
};
};
_local3++;
};
if (){
.startDragging(_local2);
} else {
= true;
= _local2;
Controller.cutLayer.graphics.clear();
Controller.cutLayer.alpha = 1;
};
};
}
protected function ():void{
var _local1:Number;
if (){
CustomCursor.setCursor(null);
} else {
if (Controller.isPaused()){
CustomCursor.setCursor(null);
} else {
if (((( == 0)) && ((
== 0)))){
if (){
CustomCursor.setCursor(Sprite);
} else {
CustomCursor.setCursor(null);
};
} else {
if ( < 0){
_local1 = 180;
if (
< 0){
_local1 = 225;
};
if (
> 0){
_local1 = 135;
};
} else {
if ( > 0){
_local1 = 0;
if (
< 0){
_local1 = 315;
};
if (
> 0){
_local1 = 45;
};
} else {
if (
< 0){
_local1 = 270;
};
if (
> 0){
_local1 = 90;
};
};
};
CustomCursor.setCursor(ArrowCursor, _local1);
};
};
};
}
public function createRailBitmap():void{
var _local1:Number;
var _local2:Number;
if (railBitmap){
return;
};
_local1 = (rightEdge - leftEdge);
_local2 = (((sea.yPosition * 32) + SEA_MAX_HEIGHT) - topEdge);
railCanvas = new BitmapData(_local1, _local2, true, 0);
railBitmap = new Bitmap(railCanvas);
railBitmap.x = leftEdge;
railBitmap.y = topEdge;
Controller.railLayer.addChild(railBitmap);
}
public function splash(_arg1:Number):void{
var _local2:Splash;
_local2 = new Splash();
_local2.x = _arg1;
_local2.y = (sea.yPosition * 32);
_local2.gotoAndPlay(1);
Controller.splashLayer.addChild(_local2);
NitromeGame.sound_manager.playSound("splash");
}
public static function bodyIsTouchingBody(_arg1:b2Body, _arg2:b2Body):Boolean{
var _local3:b2ContactEdge;
if (((!(_arg1)) || (!(_arg2)))){
return (false);
};
_local3 = _arg1.m_contactList;
while (_local3) {
if (((_local3.contact) && ((_local3.contact.m_manifoldCount > 0)))){
if (_local3.other == _arg2){
return (true);
};
};
_local3 = _local3.next;
};
return (false);
}
public static function bodyIsTouchingShape(_arg1:b2Body, _arg2:b2Shape):Boolean{
var _local3:b2ContactEdge;
if (((!(_arg1)) || (!(_arg2)))){
return (false);
};
_local3 = _arg1.m_contactList;
while (_local3) {
if (((_local3.contact) && ((_local3.contact.m_manifoldCount > 0)))){
if (_local3.other == _arg2.GetBody()){
if (_local3.contact.GetShape1().GetBody() == _arg2.GetBody()){
if (_local3.contact.GetShape1() == _arg2){
return (true);
};
};
if (_local3.contact.GetShape2().GetBody() == _arg2.GetBody()){
if (_local3.contact.GetShape2() == _arg2){
return (true);
};
};
};
};
_local3 = _local3.next;
};
return (false);
}
}
}//package com.nitrome.icebreaker
Section 158
//LinkConstraint (com.nitrome.icebreaker.LinkConstraint)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
import flash.display.*;
import com.nitrome.util.*;
public class LinkConstraint extends Constraint {
public var :b2Vec2;
public var active:Boolean;// = false
public var attached1;
public var attached2;
public var :b2Vec2;
public var
:b2Body;
public var :b2Body;
public var :b2Vec2;
public var sprite1:Sprite;
public var sprite2:Sprite;
public var :b2DistanceJoint;
public var spriteJoin:MovieClip;
public var globalPosition1:b2Vec2;
public var globalPosition2:b2Vec2;
public var hideGrabbingCreatures:Boolean;// = true
public var :b2Vec2;
public function LinkConstraint(){
active = false;
hideGrabbingCreatures = true;
super();
}
public function ():void{
if (((sprite1) && (sprite1.parent))){
sprite1.parent.removeChild(sprite1);
};
if (((sprite2) && (sprite2.parent))){
sprite2.parent.removeChild(sprite2);
};
if (((spriteJoin) && (spriteJoin.parent))){
spriteJoin.parent.removeChild(spriteJoin);
};
}
public function storeVelocity1():void{
var _local1:b2Body;
_local1 = (attached1);
if (_local1){
= _local1.GetLinearVelocityFromLocalPoint();
};
}
public function storeVelocity2():void{
var _local1:b2Body;
_local1 = (attached2);
if (_local1){
= _local1.GetLinearVelocityFromLocalPoint( );
};
}
public function updateSprites():void{
var _local1:Number;
var _local2:Number;
if (((!(globalPosition1)) || (!(globalPosition2)))){
return;
};
if (sprite1){
sprite1.x = (globalPosition1.x * 32);
sprite1.y = (globalPosition1.y * 32);
};
if (sprite2){
sprite2.x = (globalPosition2.x * 32);
sprite2.y = (globalPosition2.y * 32);
};
if (spriteJoin){
spriteJoin.x = (globalPosition1.x * 32);
spriteJoin.y = (globalPosition1.y * 32);
_local1 = ((globalPosition2.x - globalPosition1.x) * 32);
_local2 = ((globalPosition2.y - globalPosition1.y) * 32);
spriteJoin.rotation = (270 + ((Math.atan2(_local2, _local1) * 180) / Math.PI));
spriteJoin.ropeMask.scaleY = (Math.sqrt(((_local1 * _local1) + (_local2 * _local2))) / 100);
};
}
public function (_arg1):b2Body{
if ((_arg1 is b2Body)){
return (_arg1);
};
if ((_arg1 is Block)){
return ((_arg1 as Block).solidBody);
};
if ((_arg1 is Bird)){
return ((_arg1 as Bird).solidBody);
};
if ((_arg1 is Wolfrat)){
return ((_arg1 as Wolfrat).solidBody);
};
if ((_arg1 is StandingCharacter)){
return ((_arg1 as StandingCharacter).solidBody);
};
if ((_arg1 is Bomb)){
return ((_arg1 as Bomb).solidBody);
};
return (null);
}
override public function deactivate():void{
deleteBody();
if (((sprite1) && (!(sprite1.parent)))){
Controller.constraintLayer.addChild(sprite1);
};
if (((sprite2) && (!(sprite2.parent)))){
Controller.constraintLayer.addChild(sprite2);
};
if (((spriteJoin) && (!(spriteJoin.parent)))){
Controller.constraintLayer.addChild(spriteJoin);
};
active = false;
}
override public function advance():void{
super.advance();
updatePositions();
updateSprites();
}
public function updatePositions():void{
var _local1:b2Body;
var _local2:b2Body;
_local1 = (attached1);
_local2 = (attached2);
if (((!(_local1)) || (!(_local2)))){
return;
};
globalPosition1 = _local1.GetWorldPoint();
globalPosition2 = _local2.GetWorldPoint( );
}
public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Array{
var _local3:b2Vec2;
var _local4:b2Body;
var _local5:b2Body;
var _local6:Number;
var _local7:b2Vec2;
var _local8:LinkConstraint;
var _local9:LinkConstraint;
updatePositions();
_local3 = Geometry.segmentIntersection(globalPosition1, globalPosition2, _arg1, _arg2);
if (!_local3){
return (null);
};
if (Geometry.squareDistancePointToPoint(_local3, globalPosition1) < (0.25 * 0.25)){
return (null);
};
if (Geometry.squareDistancePointToPoint(_local3, globalPosition2) < (0.25 * 0.25)){
return (null);
};
_local4 = (attached1);
_local5 = (attached2);
= _local4.GetLinearVelocityFromLocalPoint();
= _local5.GetLinearVelocityFromLocalPoint( );
_local6 = Geometry.between(globalPosition1, globalPosition2, _local3);
_local7 = Geometry.lerpVec2(, , _local6);
_local8 = new LinkConstraint();
_local8.attached1 = attached1;
_local8.attached2 = "roaming";
_local8.setPosition1(globalPosition1);
_local8.setPosition2(_local3);
_local8. = ;
_local8. = _local7;
_local9 = new LinkConstraint();
_local9.attached1 = "roaming";
_local9.attached2 = attached2;
_local9.setPosition1(_local3);
_local9.setPosition2(globalPosition2);
_local9. = _local7;
_local9. = ;
_local8.create();
_local8.activate();
_local9.create();
_local9.activate();
deleteBody(!((_local8.attached1 == )), !((_local9.attached2 ==
)));
();
return ([_local8, _local9]);
}
public function setPosition1(_arg1:b2Vec2):void{
globalPosition1 = _arg1.Copy();
updateSprites();
}
public function deleteBody(_arg1:Boolean=true, _arg2:Boolean=true):void{
if (){
Controller.level.world.DestroyJoint();
= null;
};
if (){
= .GetLinearVelocity();
if (_arg1){
Controller.level.world.DestroyBody();
};
= null;
attached1 = "roaming";
};
if (
){
=
.GetLinearVelocity();
if (_arg2){
Controller.level.world.DestroyBody(
);
};
= null;
attached2 = "roaming";
};
}
public function setPosition2(_arg1:b2Vec2):void{
globalPosition2 = _arg1.Copy();
updateSprites();
}
override public function activate():void{
var _local1:Block;
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2MassData;
var _local5:ActiveObject;
var _local6:StandingCharacter;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:b2DistanceJointDef;
if (active){
return;
};
active = true;
if (((((!(attached1)) || ((((attached1 is Block)) && (!((attached1 as Block).solidBody)))))) || ((attached1 == "roaming")))){
if (attached1 != "roaming"){
_local7 = 0;
while (_local7 < Controller.level.activeObjectList.length) {
_local5 = Controller.level.activeObjectList[_local7];
if (((((!((_local5 is Bird))) && (!((_local5 is Wolfrat))))) && (!((_local5 is Bomb))))){
} else {
if ((((_local5 is Wolfrat)) && (!((_local5 as Wolfrat).alive)))){
} else {
if (Geometry.squareDistancePointToPoint(_local5.getPosition(), globalPosition1) > (0.25 * 0.25)){
} else {
attached1 = _local5;
globalPosition1 = _local5.getPosition();
//unresolved jump
};
};
};
_local7++;
};
_local7 = 0;
while (_local7 < Controller.level.characterList.length) {
_local6 = (Controller.level.characterList[_local7] as StandingCharacter);
if (((!(_local6)) || (_local6.atFinish))){
} else {
if (Geometry.squareDistancePointToPoint(_local6.getPosition(), globalPosition1) > (0.25 * 0.25)){
} else {
attached1 = _local6;
globalPosition1 = _local6.getPosition();
//unresolved jump
};
};
_local7++;
};
if ((attached1 is Block)){
attached1 = null;
};
_local1 = Controller.level.searchForBlock(globalPosition1);
if (_local1){
attached1 = _local1;
};
};
if (((!(attached1)) || ((attached1 == "roaming")))){
= Controller.level.world.CreateBody(new b2BodyDef());
.SetXForm(globalPosition1, 0);
if (){
.SetLinearVelocity();
= null;
};
_local4 = new b2MassData();
_local4.mass = 0.01;
.SetMass(_local4);
attached1 = ;
};
};
_local2 = (attached1);
= _local2.GetLocalPoint(globalPosition1);
if (((((!(attached2)) || ((((attached2 is Block)) && (!((attached2 as Block).solidBody)))))) || ((attached2 == "roaming")))){
if (attached2 != "roaming"){
_local7 = 0;
while (_local7 < Controller.level.activeObjectList.length) {
_local5 = Controller.level.activeObjectList[_local7];
if (((((!((_local5 is Bird))) && (!((_local5 is Wolfrat))))) && (!((_local5 is Bomb))))){
} else {
if ((((_local5 is Wolfrat)) && (!((_local5 as Wolfrat).alive)))){
} else {
if (Geometry.squareDistancePointToPoint(_local5.getPosition(), globalPosition2) > (0.25 * 0.25)){
} else {
attached2 = _local5;
globalPosition2 = _local5.getPosition();
//unresolved jump
};
};
};
_local7++;
};
_local7 = 0;
while (_local7 < Controller.level.characterList.length) {
_local6 = (Controller.level.characterList[_local7] as StandingCharacter);
if (((!(_local6)) || (_local6.atFinish))){
} else {
if (Geometry.squareDistancePointToPoint(_local6.getPosition(), globalPosition2) > (0.25 * 0.25)){
} else {
attached2 = _local6;
globalPosition2 = _local6.getPosition();
//unresolved jump
};
};
_local7++;
};
if ((attached2 is Block)){
attached2 = null;
};
_local1 = Controller.level.searchForBlock(globalPosition2);
if (_local1){
attached2 = _local1;
};
};
if (((!(attached2)) || ((attached2 == "roaming")))){
= Controller.level.world.CreateBody(new b2BodyDef());
.SetXForm(globalPosition2, 0);
if (){
.SetLinearVelocity();
= null;
};
_local4 = new b2MassData();
_local4.mass = 0.01;
.SetMass(_local4);
attached2 =
;
};
};
_local3 = (attached2);
= _local3.GetLocalPoint(globalPosition2);
_local8 = (globalPosition2.x - globalPosition1.x);
_local9 = (globalPosition2.y - globalPosition1.y);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local11 = new b2DistanceJointDef();
_local11.body1 = _local2;
_local11.body2 = _local3;
_local11.localAnchor1 = ;
_local11.localAnchor2 = ;
_local11.length = _local10;
_local11.collideConnected = true;
= (Controller.level.world.CreateJoint(_local11) as b2DistanceJoint);
if (hideGrabbingCreatures){
if (((((sprite1) && (sprite1.parent))) && (!((attached1 is Block))))){
sprite1.parent.removeChild(sprite1);
};
if (((((sprite2) && (sprite2.parent))) && (!((attached2 is Block))))){
sprite2.parent.removeChild(sprite2);
};
};
updatePositions();
updateSprites();
}
override public function destroy():void{
super.destroy();
();
}
override public function create():void{
sprite1 = new LinkEnd();
sprite2 = new LinkEnd();
spriteJoin = new LinkMid();
Controller.constraintLayer.addChild(spriteJoin);
Controller.constraintLayer.addChild(sprite1);
Controller.constraintLayer.addChild(sprite2);
}
}
}//package com.nitrome.icebreaker
Section 159
//LinkEnd (com.nitrome.icebreaker.LinkEnd)
package com.nitrome.icebreaker {
import flash.display.*;
public dynamic class LinkEnd extends MovieClip {
}
}//package com.nitrome.icebreaker
Section 160
//LinkMid (com.nitrome.icebreaker.LinkMid)
package com.nitrome.icebreaker {
import flash.display.*;
public dynamic class LinkMid extends MovieClip {
public var ropeMask:MovieClip;
}
}//package com.nitrome.icebreaker
Section 161
//LinkMidMetal (com.nitrome.icebreaker.LinkMidMetal)
package com.nitrome.icebreaker {
import flash.display.*;
public dynamic class LinkMidMetal extends MovieClip {
public var ropeMask:MovieClip;
}
}//package com.nitrome.icebreaker
Section 162
//MetalLinkConstraint (com.nitrome.icebreaker.MetalLinkConstraint)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
public class MetalLinkConstraint extends LinkConstraint {
override public function create():void{
sprite1 = new LinkEnd();
sprite2 = new LinkEnd();
spriteJoin = new LinkMidMetal();
Controller.constraintLayer.addChild(spriteJoin);
Controller.constraintLayer.addChild(sprite1);
Controller.constraintLayer.addChild(sprite2);
}
override public function divide(_arg1:b2Vec2, _arg2:b2Vec2):Array{
return (null);
}
}
}//package com.nitrome.icebreaker
Section 163
//MiniMap (com.nitrome.icebreaker.MiniMap)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import flash.display.*;
public class MiniMap extends Sprite {
public var br:MovieClip;
public var b:MovieClip;
public var leftEdge:Number;
public var t:MovieClip;
public var bl:MovieClip;
public var l:MovieClip;
public var tl:MovieClip;
public var r:MovieClip;
public var tr:MovieClip;
public var :Number;
public var :Sprite;
public var topEdge:Number;
public var :Sprite;
public var rightEdge:Number;
public function destroy():void{
if (parent){
parent.removeChild(this);
};
}
public function create():void{
var _local1:Number;
var _local2:b2AABB;
= new Sprite();
addChild();
= new Sprite();
addChild();
.mask = ;
resize();
x = 12;
y = 12;
Controller.root.mapHolder.addChild(this);
}
public function advance():void{
var _local1:Number;
var _local2:b2Vec2;
var _local3:Block;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:ActiveObject;
var _local8:Character;
var _local9:LinkConstraint;
if (!){
return;
};
.graphics.clear();
.graphics.beginFill(0, 0.2);
.graphics.drawRect(0, 0, ((rightEdge - leftEdge) * 4), (( - topEdge) * 4));
.graphics.endFill();
.graphics.lineStyle(1, 0xFFFFFF, 0.1);
.graphics.beginFill(0xFFFFFF, 0.05);
.graphics.drawRect((((Controller.level.cameraFocusX / 8) - (leftEdge * 4)) - (275 / 8)), (((Controller.level.cameraFocusY / 8) - (topEdge * 4)) - (200 / 8)), (550 / 8), (400 / 8));
.graphics.endFill();
.graphics.lineStyle();
_local1 = 0;
while (_local1 < Controller.level.blockList.length) {
_local3 = Controller.level.blockList[_local1];
.graphics.beginFill(0, 0.5);
_local4 = 0;
while (_local4 < (_local3.vertexList.length + 1)) {
_local2 = _local3.localToGlobal(_local3.vertexList[(_local4 % _local3.vertexList.length)]);
_local5 = ((_local2.x - leftEdge) * 4);
_local6 = ((_local2.y - topEdge) * 4);
if (_local4 == 0){
.graphics.moveTo(_local5, _local6);
} else {
.graphics.lineTo(_local5, _local6);
};
_local4++;
};
.graphics.endFill();
_local1++;
};
_local1 = 0;
while (_local1 < Controller.level.activeObjectList.length) {
_local7 = Controller.level.activeObjectList[_local1];
if ((_local7 is Finish)){
_local2 = _local7.getPosition();
.graphics.beginFill(0x603000, 0.5);
.graphics.drawRect((((_local2.x - leftEdge) - 4) * 4), (((_local2.y - topEdge) - 1) * 4), 32, 8);
.graphics.endFill();
} else {
if ((_local7 is FatWomanSmallSquare)){
_local2 = _local7.getPosition();
.graphics.beginFill(0, 0.5);
.graphics.drawCircle(((_local2.x - leftEdge) * 4), ((_local2.y - topEdge) * 4), (FatWoman.RADIUS * 2));
.graphics.endFill();
} else {
if ((_local7 is FatWoman)){
_local2 = _local7.getPosition();
.graphics.beginFill(0, 0.5);
.graphics.drawCircle(((_local2.x - leftEdge) * 4), ((_local2.y - topEdge) * 4), (FatWoman.RADIUS * 4));
.graphics.endFill();
} else {
if ((_local7 is Weight)){
_local2 = _local7.getPosition();
.graphics.beginFill(0, 0.5);
.graphics.drawCircle(((_local2.x - leftEdge) * 4), ((_local2.y - topEdge) * 4), (Weight.RADIUS * 4));
.graphics.endFill();
} else {
if ((((_local7 is Bird)) || ((_local7 is Wolfrat)))){
_local2 = _local7.getPosition();
.graphics.beginFill(0, 0.5);
.graphics.drawCircle(((_local2.x - leftEdge) * 4), ((_local2.y - topEdge) * 4), (Weight.RADIUS * 2));
.graphics.endFill();
};
};
};
};
};
_local1++;
};
_local1 = 0;
while (_local1 < Controller.level.characterList.length) {
_local8 = Controller.level.characterList[_local1];
_local2 = _local8.getPosition();
if (_local8.atFinish){
.graphics.beginFill(0xFF00);
} else {
.graphics.beginFill(0xFFFF00);
};
.graphics.drawRect((int(((_local2.x - leftEdge) * 4)) - 1), (int(((_local2.y - topEdge) * 4)) - 1), 3, 3);
.graphics.endFill();
_local1++;
};
_local1 = 0;
while (_local1 < Controller.level.constraintList.length) {
_local9 = (Controller.level.constraintList[_local1] as LinkConstraint);
if (!_local9){
} else {
.graphics.lineStyle(1, 0, 0.5);
.graphics.moveTo(((_local9.globalPosition1.x - leftEdge) * 4), ((_local9.globalPosition1.y - topEdge) * 4));
.graphics.lineTo(((_local9.globalPosition2.x - leftEdge) * 4), ((_local9.globalPosition2.y - topEdge) * 4));
};
_local1++;
};
}
public function resize():void{
var _local1:Number;
var _local2:Number;
leftEdge = (Controller.level.leftEdge / 32);
rightEdge = (Controller.level.rightEdge / 32);
topEdge = (Controller.level.topEdge / 32);
= Controller.level.sea.yPosition;
_local1 = int(((rightEdge - leftEdge) * 4));
_local2 = int((( - topEdge) * 4));
t.scaleX = (b.scaleX = _local1);
l.scaleY = (r.scaleY = _local2);
b.y = (bl.y = (br.y = (_local2 + 5)));
r.x = (tr.x = (br.x = (_local1 + 5)));
.graphics.clear();
.graphics.beginFill(0);
.graphics.drawRect(0, 0, _local1, _local2);
.graphics.endFill();
advance();
}
}
}//package com.nitrome.icebreaker
Section 164
//PinConstraint (com.nitrome.icebreaker.PinConstraint)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class PinConstraint extends Constraint {
public var active:Boolean;// = false
public var pinJoint:b2RevoluteJoint;
public var globalPosition:b2Vec2;
public var attachedBlock:Block;// = null
public var pinBody:b2Body;
public var :b2Vec2;
public function PinConstraint(){
attachedBlock = null;
active = false;
super();
}
override public function deactivate():void{
if (pinJoint){
Controller.level.world.DestroyJoint(pinJoint);
};
if (pinBody){
Controller.level.world.DestroyBody(pinBody);
};
pinBody = null;
pinJoint = null;
active = false;
}
public function (_arg1:Block=null):void{
var _local2:b2BodyDef;
var _local3:b2RevoluteJointDef;
if (((pinJoint) || (active))){
return;
};
active = true;
_local2 = new b2BodyDef();
_local2.position.Set(globalPosition.x, globalPosition.y);
pinBody = Controller.level.world.CreateBody(_local2);
if (_arg1){
attachedBlock = _arg1;
} else {
attachedBlock = Controller.level.searchForBlock(globalPosition);
if (((!(attachedBlock)) || (!(attachedBlock.solidBody)))){
return;
};
= attachedBlock.solidBody.GetLocalPoint(globalPosition);
};
if (((!(attachedBlock)) || (!(attachedBlock.solidBody)))){
return;
};
_local3 = new b2RevoluteJointDef();
_local3.body1 = pinBody;
_local3.body2 = attachedBlock.solidBody;
_local3.localAnchor2 = ;
if ((this is RailPinConstraint)){
_local3.upperAngle = 0;
_local3.lowerAngle = 0;
_local3.enableLimit = true;
};
pinJoint = (Controller.level.world.CreateJoint(_local3) as b2RevoluteJoint);
}
public function setPosition(_arg1:b2Vec2):void{
globalPosition = _arg1.Copy();
x = (globalPosition.x * 32);
y = (globalPosition.y * 32);
if (pinBody){
pinBody.SetXForm(_arg1, 0);
};
}
public function reattachToAnyOf(_arg1:Array){
var _local2:Number;
var _local3:Block;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
if (!_local3){
} else {
if ((((_local2 == (_arg1.length - 1))) || (_local3.testPointLocal()))){
(_local3);
return;
};
};
_local2++;
};
}
override public function activate():void{
(attachedBlock);
}
override public function create():void{
Controller.constraintLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
Section 165
//PinnableBlock (com.nitrome.icebreaker.PinnableBlock)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import flash.display.*;
public class PinnableBlock extends Block {
public var :Array;
public static var pinnableBlockTexture:BitmapData;
public function PinnableBlock(){
= [];
super();
if (!pinnableBlockTexture){
pinnableBlockTexture = new PinnableBlockTexture(125, 125);
};
texture = pinnableBlockTexture;
= 3424838;
= 0;
}
public function takeMouseDown(_arg1:b2Vec2):Boolean{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:PinnableBlockPin;
var _local6:PinnableBlockPin;
_local2 = 0;
while (_local2 < .length) {
_local3 = (_arg1.x - [_local2].joint.GetAnchor1().x);
_local4 = (_arg1.y - [_local2].joint.GetAnchor2().y);
if (((_local3 * _local3) + (_local4 * _local4)) < (0.5 * 0.5)){
_local5 = .splice(_local2, 1)[0];
_local5.remove();
NitromeGame.sound_manager.playSound("pinBlock");
return (true);
};
_local2++;
};
if (testPoint(_arg1)){
_local6 = new PinnableBlockPin();
_local6.create(this, _arg1);
.push(_local6);
NitromeGame.sound_manager.playSound("pinBlock");
return (true);
};
return (false);
}
override public function unsolidify():void{
var _local1:Number;
super.unsolidify();
_local1 = 0;
while (_local1 < .length) {
[_local1].destroy();
_local1++;
};
}
}
}//package com.nitrome.icebreaker
Section 166
//PinnableBlockPin (com.nitrome.icebreaker.PinnableBlockPin)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Dynamics.Joints.*;
import flash.display.*;
public class PinnableBlockPin extends MovieClip {
public var joint:b2RevoluteJoint;
public var
:Boolean;
public function PinnableBlockPin(){
addFrameScript(7, frame8, 15, frame16);
}
public function destroy():void{
if (parent){
parent.removeChild(this);
};
}
public function create(_arg1:Block, _arg2:b2Vec2):void{
var _local3:b2RevoluteJointDef;
_local3 = new b2RevoluteJointDef();
_local3.body1 = _arg1.solidBody;
_local3.localAnchor1 = _arg1.solidBody.GetLocalPoint(_arg2);
_local3.body2 = Controller.level.world.GetGroundBody();
_local3.localAnchor2 = _arg2;
joint = (Controller.level.world.CreateJoint(_local3) as b2RevoluteJoint);
x = (_arg2.x * 32);
y = (_arg2.y * 32);
Controller.constraintLayer.addChild(this);
= true;
}
function frame16(){
destroy();
}
function frame8(){
if (
){
stop();
};
}
public function remove():void{
play();
= false;
Controller.level.world.DestroyJoint(joint);
joint = null;
}
}
}//package com.nitrome.icebreaker
Section 167
//ProtectedArea (com.nitrome.icebreaker.ProtectedArea)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import com.nitrome.util.*;
public class ProtectedArea extends ActiveObject {
public var :Number;// = 128
public function ProtectedArea(){
= 128;
super();
}
public function sliceTouches(_arg1:b2Vec2, _arg2:b2Vec2):Boolean{
return (Geometry.segmentTouchesRectangle(getBoundingBox(), _arg1, _arg2));
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - ( / 64)), (globalPosition.y - ( / 64)));
_local1.upperBound = new b2Vec2((globalPosition.x + ( / 64)), (globalPosition.y + ( / 64)));
return (_local1);
}
override public function create():void{
Controller.protectionLayer.addChild(this);
if ((this is ProtectedArea32)){
= 32;
};
if ((this is ProtectedArea64)){
= 64;
};
if ((this is ProtectedArea128)){
= 128;
};
}
}
}//package com.nitrome.icebreaker
Section 168
//ProtectedArea128 (com.nitrome.icebreaker.ProtectedArea128)
package com.nitrome.icebreaker {
public dynamic class ProtectedArea128 extends ProtectedArea {
}
}//package com.nitrome.icebreaker
Section 169
//ProtectedArea32 (com.nitrome.icebreaker.ProtectedArea32)
package com.nitrome.icebreaker {
public dynamic class ProtectedArea32 extends ProtectedArea {
}
}//package com.nitrome.icebreaker
Section 170
//ProtectedArea64 (com.nitrome.icebreaker.ProtectedArea64)
package com.nitrome.icebreaker {
public dynamic class ProtectedArea64 extends ProtectedArea {
}
}//package com.nitrome.icebreaker
Section 171
//RailPinConstraint (com.nitrome.icebreaker.RailPinConstraint)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import flash.display.*;
import flash.geom.*;
public class RailPinConstraint extends PinConstraint {
public var :Number;// = 0
public var :Number;// = 0
public var railContent:MovieClip;
public var :Array;
public var rail:Array;
public var :Array;
public var looping:Boolean;// = false
public var :Boolean;// = true
public static const RAIL_PIN_SPEED:Number = 0.08;
public function RailPinConstraint(){
rail = [];
= 0;
looping = false;
= true;
= 0;
super();
}
override public function activate():void{
super.activate();
();
render();
}
override public function create():void{
super.create();
}
public function takeRailPathString(_arg1:String):void{
var _local2:Array;
var _local3:Number;
var _local4:String;
var _local5:Array;
rail = [];
_local2 = _arg1.split(">");
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
_local4 = _local4.split("(").join("");
_local4 = _local4.split(")").join("");
_local5 = _local4.split(",");
rail[_local3] = new b2Vec2((_local5[0] / 32), (_local5[1] / 32));
_local3++;
};
setPosition(rail[0]);
}
protected function ():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
= [];
= [];
= 0;
_local1 = 0;
while (_local1 < (rail.length - 1)) {
_local2 = (rail[(_local1 + 1)].x - rail[_local1].x);
_local3 = (rail[(_local1 + 1)].y - rail[_local1].y);
[_local1] = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
[_local1] = new b2Vec2((_local2 / [_local1]), (_local3 / [_local1]));
= ( + [_local1]);
_local1++;
};
if (looping){
_local1 = .length;
_local2 = (rail[0].x - rail[(rail.length - 1)].x);
_local3 = (rail[0].y - rail[(rail.length - 1)].y);
[_local1] = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
[_local1] = new b2Vec2((_local2 / [_local1]), (_local3 / [_local1]));
= ( + [_local1]);
};
}
override public function advance():void{
var _local1:Number;
var _local2:Number;
var _local3:b2Vec2;
var _local4:b2Vec2;
super.advance();
if (!pinBody){
return;
};
if (looping){
= ( + RAIL_PIN_SPEED);
= ( % );
} else {
if (){
= ( + RAIL_PIN_SPEED);
if ( >= ){
= ;
= false;
};
} else {
= ( - RAIL_PIN_SPEED);
if ( <= 0){
= 0;
= true;
};
};
};
_local1 = ;
_local2 = 0;
for (;_local2 < .length;_local2++) {
if (_local1 > [_local2]){
if (_local2 < (.length - 1)){
_local1 = (_local1 - [_local2]);
continue;
} else {
_local1 = [_local2];
};
};
_local3 = rail[_local2].Copy();
_local3.x = (_local3.x + ([_local2].x * _local1));
_local3.y = (_local3.y + ([_local2].y * _local1));
_local4 = new b2Vec2((_local3.x - pinBody.GetPosition().x), (_local3.y - pinBody.GetPosition().y));
_local4.Multiply(25);
pinBody.SetLinearVelocity(_local4);
setPosition(_local3);
break;
};
}
public function render():void{
var _local1:BitmapData;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Matrix;
if (!Controller.level.railBitmap){
Controller.level.createRailBitmap();
};
_local1 = new RailPinRail(0, 0);
_local2 = rail.length;
if (!looping){
_local2--;
};
_local3 = 0;
while (_local3 < _local2) {
_local4 = (rail[_local3].x * 32);
_local5 = (rail[_local3].y * 32);
_local6 = (rail[((_local3 + 1) % rail.length)].x * 32);
_local7 = (rail[((_local3 + 1) % rail.length)].y * 32);
_local8 = (_local6 - _local4);
_local9 = (_local7 - _local5);
_local10 = new Matrix();
_local10.translate(-3, 0);
_local10.scale(1, (Math.sqrt(((_local8 * _local8) + (_local9 * _local9))) / 20));
_local10.rotate((Math.atan2(_local9, _local8) - (Math.PI / 2)));
_local10.translate((_local4 - Controller.level.railBitmap.x), (_local5 - Controller.level.railBitmap.y));
Controller.level.railCanvas.draw(_local1, _local10, null, BlendMode.LIGHTEN);
_local3++;
};
_local1 = new RailPinRailJoint(0, 0);
_local3 = 0;
while (_local3 < rail.length) {
_local10 = new Matrix();
new Matrix().tx = (_local10.tx + (((rail[_local3].x * 32) - 3) - Controller.level.railBitmap.x));
_local10.ty = (_local10.ty + (((rail[_local3].y * 32) - 3) - Controller.level.railBitmap.y));
Controller.level.railCanvas.draw(_local1, _local10, null, BlendMode.LIGHTEN);
_local3++;
};
if (((!(looping)) && ((rail.length > 1)))){
_local1 = new RailPinRailEnd(0, 0);
_local4 = (rail[0].x * 32);
_local5 = (rail[0].y * 32);
_local6 = (rail[1].x * 32);
_local7 = (rail[1].y * 32);
_local8 = (_local6 - _local4);
_local9 = (_local7 - _local5);
_local10 = new Matrix();
_local10.translate(-6, -9);
_local10.rotate((Math.atan2(_local9, _local8) - (Math.PI / 2)));
_local10.translate((_local4 - Controller.level.railBitmap.x), (_local5 - Controller.level.railBitmap.y));
Controller.level.railCanvas.draw(_local1, _local10);
_local3 = (rail.length - 1);
_local4 = (rail[(_local3 - 1)].x * 32);
_local5 = (rail[(_local3 - 1)].y * 32);
_local6 = (rail[_local3].x * 32);
_local7 = (rail[_local3].y * 32);
_local8 = (_local6 - _local4);
_local9 = (_local7 - _local5);
_local10 = new Matrix();
_local10.translate(-6, -9);
_local10.rotate((Math.atan2(_local9, _local8) + (Math.PI / 2)));
_local10.translate((_local6 - Controller.level.railBitmap.x), (_local7 - Controller.level.railBitmap.y));
Controller.level.railCanvas.draw(_local1, _local10);
};
}
public function getRailPathString():String{
var _local1:Array;
var _local2:Number;
var _local3:String;
_local1 = [];
_local2 = 0;
while (_local2 < rail.length) {
_local3 = "(";
_local3 = (_local3 + (String(int((rail[_local2].x * 32))) + ","));
_local3 = (_local3 + (String(int((rail[_local2].y * 32))) + ")"));
_local1.push(_local3);
_local2++;
};
return (_local1.join(">"));
}
}
}//package com.nitrome.icebreaker
Section 172
//Sea (com.nitrome.icebreaker.Sea)
package com.nitrome.icebreaker {
import flash.display.*;
import com.nitrome.util.*;
public class Sea extends MovieClip {
public var wave10:MovieClip;
public var
:Number;// = 0
public var wave4:MovieClip;
public var wave6:MovieClip;
public var wave1:MovieClip;
public var wave5:MovieClip;
public var wave8:MovieClip;
public var wave3:MovieClip;
public var wave7:MovieClip;
public var wave2:MovieClip;
public var :Array;
public var :Number;// = 0
public var wave9:MovieClip;
public var yPosition:Number;
public var wave11:MovieClip;
public var wave12:MovieClip;
public var wave13:MovieClip;
public function Sea(){
= 0;
= 0;
super();
(true);
(false);
}
public function
(_arg1:Boolean):void{
var _local2:Number;
var _local3:Number;
if (!){
= Global.createList(30, 0);
};
_local2 = 0;
while (_local2 < 30) {
if (((_arg1) && (((_local2 % 2) == 1)))){
} else {
if (((!(_arg1)) && (((_local2 % 2) == 0)))){
} else {
_local3 = Math.random();
if (_local3 >= 0.9){
[_local2] = 0;
} else {
if (_local3 >= 0.6){
[_local2] = 1;
} else {
[_local2] = 2;
};
};
};
};
_local2++;
};
}
public function destroy():void{
if (parent){
parent.removeChild(this);
};
}
public function create(_arg1:Number):void{
yPosition = _arg1;
Controller.seaLayer.addChild(this);
}
public function advance():void{
var _local1:Number;
var _local2:Number;
var _local3:MovieClip;
var _local4:Number;
if (Controller.isPaused()){
return;
};
_local1 = 275;
if (Controller.level){
_local1 = Controller.level.cameraFocusX;
};
= (
+ 2);
x = (((Math.floor(((_local1 -
) / 47)) * 47) - 275) +
);
if (Controller.level){
y = (yPosition * 32);
};
++;
if (( % 24) == 12){
(false);
};
if (( % 24) == 0){
(true);
};
_local2 = 1;
while (_local2 <= 13) {
_local3 = (getChildByName(("wave" + _local2)) as MovieClip);
if (!_local3){
} else {
_local4 = Math.floor((((_local1 -
) + (_local2 * 47)) / 47));
_local4 = (_local4 % .length);
if (_local4 < 0){
_local4 = (_local4 + .length);
};
if ((_local4 % 2) == 0){
_local3.gotoAndStop(((1 + ( % 24)) + ([_local4] * 24)));
} else {
_local3.gotoAndStop(((1 + (( - 12) % 24)) + ([_local4] * 24)));
};
};
_local2++;
};
}
}
}//package com.nitrome.icebreaker
Section 173
//Splash (com.nitrome.icebreaker.Splash)
package com.nitrome.icebreaker {
import flash.display.*;
public dynamic class Splash extends MovieClip {
public function Splash(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package com.nitrome.icebreaker
Section 174
//StandingCharacter (com.nitrome.icebreaker.StandingCharacter)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
import com.nitrome.util.*;
public class StandingCharacter extends Character {
public var :Boolean;// = false
private var :Number;// = 0
public var solidShape:b2Shape;
public var solidBody:b2Body;
public function StandingCharacter(){
= 0;
= false;
super();
}
public function deleteBody(_arg1:Boolean=false):void{
if (solidBody){
Controller.level.removeLinksTo(this, solidBody, false, false, _arg1, _arg1);
};
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
protected function updatePosition():void{
if (solidBody){
x = (solidBody.GetPosition().x * 32);
y = (solidBody.GetPosition().y * 32);
rotation = ((solidBody.GetAngle() * 180) / Math.PI);
};
}
override public function deathNormal():void{
deleteBody();
super.deathNormal();
}
override public function advance():void{
var _local1:Finish;
var _local2:Number;
if (){
();
return;
};
super.advance();
if (killedNormal){
return;
};
if (!atFinish){
updatePosition();
_local1 = Controller.level.isTouchingFinish(solidBody);
if (((_local1) && ((Math.abs((solidBody.GetPosition().x - _local1.getPosition().x)) < 4)))){
++;
if ( > 10){
atFinish = true;
deleteBody(true);
finish = _local1;
finish.charactersOnBoard.push(this);
Controller.level.updateCounters();
};
} else {
= 0;
};
if (((solidBody) && ((solidBody.GetPosition().y > Controller.level.sea.yPosition)))){
_local2 = 0.85;
solidBody.SetLinearVelocity(new b2Vec2((solidBody.m_linearVelocity.x * _local2), (solidBody.m_linearVelocity.y * _local2)));
solidBody.SetAngularVelocity((solidBody.m_angularVelocity * _local2));
if (solidBody.GetPosition().y > (Controller.level.sea.yPosition + 2)){
destroy();
Global.removeFromList(this, Controller.level.characterList);
Controller.level.failed();
};
};
};
}
override public function getPosition():b2Vec2{
if (solidBody){
return (solidBody.GetPosition().Copy());
};
return (new b2Vec2((x / 32), (y / 32)));
}
public function contactMade(_arg1:b2ContactPoint, _arg2:b2Shape):void{
if (!_arg2.m_body.m_userData){
return;
};
if ((_arg2.m_body.m_userData.block is DeathBlock)){
= true;
};
if (_arg2.m_body.m_userData.wolfrat){
killedNormal = true;
};
if (_arg2.m_body.m_userData.bird){
killedNormal = true;
};
}
override public function setPosition(_arg1:b2Vec2):void{
solidBody.SetXForm(_arg1, solidBody.GetAngle());
updatePosition();
}
public function ():void{
Global.removeFromList(this, Controller.level.characterList);
deleteBody();
rotation = 0;
gotoAndPlay(("runeDeath" + Controller.charType()));
NitromeGame.sound_manager.playSound("runeDeath");
}
override public function destroy():void{
deleteBody();
super.destroy();
}
override public function create():void{
var _local1:b2BodyDef;
var _local2:b2PolygonDef;
super.create();
if (((solidBody) || (solidShape))){
return;
};
_local1 = new b2BodyDef();
_local1.userData = {standingCharacter:this, contactMade:contactMade};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2PolygonDef();
_local2.vertexCount = 4;
_local2.vertices[0] = new b2Vec2((-10 / 32), (-9 / 32));
_local2.vertices[1] = new b2Vec2((10 / 32), (-9 / 32));
_local2.vertices[2] = new b2Vec2((15 / 32), (15 / 32));
_local2.vertices[3] = new b2Vec2((-15 / 32), (15 / 32));
_local2.density = 1;
solidShape = (solidBody.CreateShape(_local2) as b2PolygonShape);
solidBody.SetMassFromShapes();
gotoAndPlay(("standing" + Controller.charType()));
}
}
}//package com.nitrome.icebreaker
Section 175
//StandingGuy1 (com.nitrome.icebreaker.StandingGuy1)
package com.nitrome.icebreaker {
public dynamic class StandingGuy1 extends StandingCharacter {
public function StandingGuy1(){
addFrameScript(24, , 37, frame38, 62, frame63, 69, frame70, 91, , 116, , 129, , 154, , 161, , 183, , 208,
, 221, , 246, , 253, , 275, , 300, , 313, frame314, 338, frame339, 345,
, 367, , 392, , 405, , 430, , 437, , 459, );
}
function (){
gotoAndPlay("standing5");
}
function (){
stop();
if (parent){
parent.removeChild(this);
};
Controller.level.failed();
}
function frame70(){
stop();
}
function (){
gotoAndPlay("victory2");
}
function frame314(){
gotoAndPlay("walking4");
}
function (){
stop();
}
function (){
stop();
}
function (){
gotoAndPlay("victory3");
}
function (){
stop();
if (parent){
parent.removeChild(this);
};
Controller.level.failed();
}
function
(){
gotoAndPlay("standing3");
}
function frame339(){
stop();
if (parent){
parent.removeChild(this);
};
Controller.level.failed();
}
function (){
gotoAndPlay("standing1");
}
function (){
gotoAndPlay("victory5");
}
function (){
gotoAndPlay("walking3");
}
function
(){
stop();
}
function frame38(){
gotoAndPlay("walking1");
}
function (){
stop();
if (parent){
parent.removeChild(this);
};
Controller.level.failed();
}
function (){
gotoAndPlay("standing2");
}
function (){
gotoAndPlay("walking5");
}
function (){
gotoAndPlay("victory4");
}
function (){
gotoAndPlay("victory1");
}
function (){
gotoAndPlay("walking2");
}
function (){
stop();
}
function (){
gotoAndPlay("standing4");
}
function frame63(){
stop();
if (parent){
parent.removeChild(this);
};
Controller.level.failed();
}
}
}//package com.nitrome.icebreaker
Section 176
//TurningPinsConstraint (com.nitrome.icebreaker.TurningPinsConstraint)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class TurningPinsConstraint extends Constraint {
public var active:Boolean;// = false
public var pinJoint:b2RevoluteJoint;
public var globalPosition:b2Vec2;
public var spinSpeed:Number;// = 5
public var attachedBlock:Block;
public var :Number;// = 0
public var angle:Number;// = 0
public var pinBody:b2Body;
public function TurningPinsConstraint(){
active = false;
angle = 0;
= 0;
spinSpeed = 5;
super();
}
override public function deactivate():void{
if (pinJoint){
Controller.level.world.DestroyJoint(pinJoint);
};
if (pinBody){
Controller.level.world.DestroyBody(pinBody);
};
pinBody = null;
pinJoint = null;
attachedBlock = null;
active = false;
}
override public function advance():void{
super.advance();
if (attachedBlock){
rotation = ((attachedBlock.solidBody.GetAngle() * 180) / Math.PI);
attachedBlock.solidBody.WakeUp();
};
}
public function setPosition(_arg1:b2Vec2):void{
globalPosition = _arg1.Copy();
x = (globalPosition.x * 32);
y = (globalPosition.y * 32);
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2RevoluteJointDef;
if (((pinJoint) || (active))){
return;
};
active = true;
attachedBlock = Controller.level.searchForBlock(globalPosition);
if (!attachedBlock){
return;
};
_local1 = new b2BodyDef();
_local1.position.Set(globalPosition.x, globalPosition.y);
pinBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2RevoluteJointDef();
_local2.body1 = pinBody;
_local2.body2 = attachedBlock.solidBody;
_local2.localAnchor2 = attachedBlock.solidBody.GetLocalPoint(globalPosition);
_local2.enableMotor = true;
_local2.motorSpeed = (spinSpeed * 0.3);
_local2.maxMotorTorque = 500;
pinJoint = (Controller.level.world.CreateJoint(_local2) as b2RevoluteJoint);
}
override public function create():void{
Controller.constraintLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
Section 177
//Weight (com.nitrome.icebreaker.Weight)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class Weight extends ActiveObject {
public var solidShape:b2Shape;
public var solidBody:b2Body;
public static const RADIUS:Number = 1.12;
override public function updatePosition():void{
super.updatePosition();
rotation = ((solidBody.GetAngle() * 180) / Math.PI);
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - 1.12), (globalPosition.y - 1.12));
_local1.upperBound = new b2Vec2((globalPosition.x + 1.12), (globalPosition.y + 1.12));
return (_local1);
}
override public function deactivate():void{
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
override public function advance():void{
globalPosition = solidBody.GetPosition().Copy();
updatePosition();
}
override public function setPosition(_arg1:b2Vec2):void{
super.setPosition(_arg1);
if (solidBody){
solidBody.SetXForm(_arg1, 0);
};
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2CircleDef;
if (solidBody){
return;
};
_local1 = new b2BodyDef();
if (globalPosition){
_local1.position.Set(globalPosition.x, globalPosition.y);
};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2CircleDef();
_local2.radius = RADIUS;
_local2.density = 10;
_local2.friction = 0.5;
solidBody.CreateShape(_local2);
solidBody.SetMassFromShapes();
}
override public function create():void{
Controller.activeLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
Section 178
//Wolfrat (com.nitrome.icebreaker.Wolfrat)
package com.nitrome.icebreaker {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
import Box2D.Dynamics.*;
public class Wolfrat extends ActiveObject {
public var velocityY:Number;// = -10
public var touchFinishTime:Number;// = 0
public var touchFinish:Finish;// = null
public var solidShape:b2Shape;
public var alive:Boolean;// = true
public var solidBody:b2Body;
public function Wolfrat(){
alive = true;
velocityY = -10;
touchFinishTime = 0;
touchFinish = null;
super();
addFrameScript(12, frame13, 13, frame14);
}
public function smash():void{
alive = false;
deleteBody(true);
gotoAndStop("dead");
}
public function deleteBody(_arg1:Boolean=false):void{
if (solidBody){
Controller.level.removeLinksTo(this, solidBody, false, false, _arg1, _arg1);
};
if (solidBody){
Controller.level.world.DestroyBody(solidBody);
};
solidBody = null;
solidShape = null;
}
function frame14(){
stop();
}
override public function getBoundingBox():b2AABB{
var _local1:b2AABB;
_local1 = new b2AABB();
_local1.lowerBound = new b2Vec2((globalPosition.x - 0.5), (globalPosition.y - 0.5));
_local1.upperBound = new b2Vec2((globalPosition.x + 0.5), (globalPosition.y + 0.5));
return (_local1);
}
function frame13(){
gotoAndPlay("standing");
}
override public function deactivate():void{
super.deactivate();
deleteBody();
}
override public function advance():void{
super.advance();
if (alive){
globalPosition.x = solidBody.GetPosition().x;
globalPosition.y = solidBody.GetPosition().y;
rotation = ((solidBody.GetAngle() * 180) / Math.PI);
updatePosition();
} else {
if (y < (((Controller.level.sea.yPosition * 32) + Level.SEA_MAX_HEIGHT) + 100)){
velocityY++;
y = (y + velocityY);
rotation = (rotation + 4);
};
};
}
public function bodyIsTouching(_arg1:b2Body):Boolean{
return (Level.bodyIsTouchingBody(_arg1, solidBody));
}
override public function activate():void{
var _local1:b2BodyDef;
var _local2:b2PolygonDef;
super.activate();
if (((solidBody) || (solidShape))){
return;
};
if (!alive){
return;
};
_local1 = new b2BodyDef();
_local1.position = new b2Vec2(globalPosition.x, globalPosition.y);
_local1.userData = {activeObject:this, wolfrat:this};
solidBody = Controller.level.world.CreateBody(_local1);
_local2 = new b2PolygonDef();
_local2.vertexCount = 4;
_local2.vertices[0] = new b2Vec2((-10 / 32), (-14 / 32));
_local2.vertices[1] = new b2Vec2((10 / 32), (-14 / 32));
_local2.vertices[2] = new b2Vec2((14 / 32), (14 / 32));
_local2.vertices[3] = new b2Vec2((-14 / 32), (14 / 32));
_local2.density = 1;
solidShape = (solidBody.CreateShape(_local2) as b2PolygonShape);
solidBody.SetMassFromShapes();
alive = true;
}
override public function create():void{
super.create();
Controller.activeLayer.addChild(this);
}
}
}//package com.nitrome.icebreaker
Section 179
//WoodBlock (com.nitrome.icebreaker.WoodBlock)
package com.nitrome.icebreaker {
import Box2D.Collision.Shapes.*;
import flash.display.*;
public class WoodBlock extends Block {
public static var woodTexture:BitmapData;
public function WoodBlock(){
if (!woodTexture){
woodTexture = new WoodTexture(0x0100, 0x0100);
};
texture = woodTexture;
= 3549999;
= 8083526;
}
override protected function makePoly(_arg1:Array):b2PolygonShape{
var _local2:b2PolygonDef;
_local2 = new b2PolygonDef();
_local2.vertexCount = _arg1.length;
_local2.vertices = _arg1.slice();
_local2.density = 0.1;
_local2.restitution = 0.2;
return ((solidBody.CreateShape(_local2) as b2PolygonShape));
}
}
}//package com.nitrome.icebreaker
Section 180
//CustomCursor (com.nitrome.util.CustomCursor)
package com.nitrome.util {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
public class CustomCursor {
public static var cursor:Sprite;
protected static var cursorClass:Class;
protected static var parent:DisplayObjectContainer;
protected static function mouseLeave(_arg1:Event):void{
if (cursor){
cursor.visible = false;
};
}
protected static function addedToStage(_arg1:Event):void{
parent.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
parent.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
parent.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
}
protected static function mouseMove(_arg1:MouseEvent):void{
if (cursor){
cursor.x = (parent.mouseX << 0);
cursor.y = (parent.mouseY << 0);
if (!cursor.visible){
cursor.visible = true;
};
_arg1.updateAfterEvent();
};
}
public static function setCursor(_arg1:Class, _arg2:Number=0){
if (_arg1 == cursorClass){
if (((cursor) && (!((cursor.rotation == _arg2))))){
cursor.rotation = _arg2;
};
return;
};
if (cursor){
parent.removeChild(cursor);
cursor = null;
};
if (_arg1){
Mouse.hide();
} else {
Mouse.show();
};
cursorClass = _arg1;
if (_arg1 == null){
return;
};
cursor = new cursorClass();
cursor.x = (parent.mouseX << 0);
cursor.y = (parent.mouseY << 0);
cursor.rotation = _arg2;
cursor.mouseEnabled = false;
cursor.mouseChildren = false;
parent.addChild(cursor);
}
public static function setup(_arg1:DisplayObjectContainer):void{
parent = _arg1;
if (parent.stage){
parent.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
parent.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
} else {
parent.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
};
}
}
}//package com.nitrome.util
Section 181
//Geometry (com.nitrome.util.Geometry)
package com.nitrome.util {
import Box2D.Common.Math.*;
import Box2D.Collision.Shapes.*;
import Box2D.Collision.*;
public class Geometry {
public static function nearestPointOnSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_local4 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local4.Normalize();
_local5 = new b2Vec2(_local4.y, -(_local4.x));
_local6 = b2Math.b2Dot(_local4, _arg1);
_local7 = b2Math.b2Dot(_local4, _arg2);
_local8 = b2Math.b2Dot(_local4, _arg3);
_local9 = b2Math.b2Dot(_local5, _arg1);
if (_local8 < _local6){
_local8 = _local6;
};
if (_local8 > _local7){
_local8 = _local7;
};
_local10 = ((_local8 * _local4.x) + (_local9 * _local5.x));
_local11 = ((_local8 * _local4.y) + (_local9 * _local5.y));
return (new b2Vec2(_local10, _local11));
}
public static function nearestPointOnLine(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local4 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local4.Normalize();
_local5 = new b2Vec2(_local4.y, -(_local4.x));
_local6 = b2Math.b2Dot(_local4, _arg3);
_local7 = b2Math.b2Dot(_local5, _arg1);
_local8 = ((_local6 * _local4.x) + (_local7 * _local5.x));
_local9 = ((_local6 * _local4.y) + (_local7 * _local5.y));
return (new b2Vec2(_local8, _local9));
}
public static function pointInsideConvexPolygon(_arg1:b2Vec2, _arg2:Array):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:Number;
_local3 = 0;
_local4 = 0;
while (_local4 < _arg2.length) {
_local5 = _arg2[_local4];
_local6 = _arg2[((_local4 + 1) % _arg2.length)];
_local7 = new b2Vec2((_local6.x - _local5.x), (_local6.y - _local5.y));
_local8 = new b2Vec2((_arg1.x - _local5.x), (_arg1.y - _local5.y));
_local9 = b2Math.b2CrossVV(_local7, _local8);
_local9 = Global.sign(_local9);
if (_local3 == 0){
_local3 = _local9;
} else {
if (_local3 != _local9){
return (false);
};
};
_local4++;
};
return (true);
}
public static function between(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):Number{
var _local4:b2Vec2;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local4.Normalize();
_local5 = b2Math.b2Dot(_arg1, _local4);
_local6 = b2Math.b2Dot(_arg2, _local4);
_local7 = b2Math.b2Dot(_arg3, _local4);
if (_local5 == _local6){
return (0);
};
return (((_local7 - _local5) / (_local6 - _local5)));
}
public static function anyPointExceptTriangleInsideTriangle(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Array):Boolean{
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:b2Vec2;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:b2Vec2;
_local5 = new b2Vec2((_arg2.y - _arg1.y), (_arg1.x - _arg2.x));
_local6 = new b2Vec2((_arg3.y - _arg2.y), (_arg2.x - _arg3.x));
_local7 = new b2Vec2((_arg1.y - _arg3.y), (_arg3.x - _arg1.x));
_local8 = b2Math.b2Dot(_local5, _arg2);
_local9 = b2Math.b2Dot(_local6, _arg3);
_local10 = b2Math.b2Dot(_local7, _arg1);
_local11 = 0;
while (_local11 < _arg4.length) {
_local12 = _arg4[_local11];
if (((_local12.x * _local5.x) + (_local12.y * _local5.y)) > _local8){
} else {
if (((_local12.x * _local6.x) + (_local12.y * _local6.y)) > _local9){
} else {
if (((_local12.x * _local7.x) + (_local12.y * _local7.y)) > _local10){
} else {
if (_local12 == _arg1){
} else {
if (_local12 == _arg2){
} else {
if (_local12 == _arg3){
} else {
return (true);
};
};
};
};
};
};
_local11++;
};
return (false);
}
public static function setupPolygon(_arg1:b2PolygonDef, _arg2:Number, _arg3:Number, _arg4:b2Vec2=null, _arg5:Number=0):b2PolygonDef{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (!_arg1){
_arg1 = new b2PolygonDef();
};
_arg1.vertexCount = _arg2;
_local7 = (360 / _arg2);
if (_arg4){
_local6 = 0;
while (_local6 < _arg2) {
_local8 = (_local6 * _local7);
_arg1.vertices[_local6] = new b2Vec2(((Trig.getCos((_local8 + _arg5)) * _arg3) + _arg4.x), ((Trig.getSin((_local8 + _arg5)) * _arg3) + _arg4.y));
_local6++;
};
} else {
_local6 = 0;
while (_local6 < _arg2) {
_local8 = (_local6 * _local7);
_arg1.vertices[_local6] = new b2Vec2((Trig.getCos((_local8 + _arg5)) * _arg3), (Trig.getSin((_local8 + _arg5)) * _arg3));
_local6++;
};
};
return (_arg1);
}
public static function lerpVec2(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Number):b2Vec2{
return (new b2Vec2((_arg1.x + ((_arg2.x - _arg1.x) * _arg3)), (_arg1.y + ((_arg2.y - _arg1.y) * _arg3))));
}
public static function isLeft(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):Number{
return ((((_arg2.x - _arg1.x) * (_arg3.y - _arg1.y)) - ((_arg3.x - _arg1.x) * (_arg2.y - _arg1.y))));
}
public static function pointInsideTriangle(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:b2Vec2):Boolean{
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = new b2Vec2((_arg2.y - _arg1.y), -((_arg2.x - _arg1.x)));
_local7 = b2Math.b2Dot(_local5, _arg1);
_local8 = b2Math.b2Dot(_local5, _arg3);
_local9 = b2Math.b2Dot(_local5, _arg4);
if (((_local9 - _local7) * (_local8 - _local7)) < 0){
return (false);
};
_local5 = new b2Vec2((_arg3.y - _arg2.y), -((_arg3.x - _arg2.x)));
_local7 = b2Math.b2Dot(_local5, _arg2);
_local8 = b2Math.b2Dot(_local5, _arg1);
_local9 = b2Math.b2Dot(_local5, _arg4);
if (((_local9 - _local7) * (_local8 - _local7)) < 0){
return (false);
};
_local5 = new b2Vec2((_arg1.y - _arg3.y), -((_arg1.x - _arg3.x)));
_local7 = b2Math.b2Dot(_local5, _arg3);
_local8 = b2Math.b2Dot(_local5, _arg2);
_local9 = b2Math.b2Dot(_local5, _arg4);
if (((_local9 - _local7) * (_local8 - _local7)) < 0){
return (false);
};
return (true);
}
public static function segmentTouchesRectangle(_arg1:b2AABB, _arg2:b2Vec2, _arg3:b2Vec2):Boolean{
var _local4:b2Vec2;
var _local5:Number;
var _local6:Array;
var _local7:Number;
var _local8:Number;
var _local9:Number;
if ((((_arg2.x < _arg1.lowerBound.x)) && ((_arg3.x < _arg1.lowerBound.x)))){
return (false);
};
if ((((_arg2.x > _arg1.upperBound.x)) && ((_arg3.x > _arg1.upperBound.x)))){
return (false);
};
if ((((_arg2.y < _arg1.lowerBound.y)) && ((_arg3.y < _arg1.lowerBound.y)))){
return (false);
};
if ((((_arg2.y > _arg1.upperBound.y)) && ((_arg3.y > _arg1.upperBound.y)))){
return (false);
};
_local4 = new b2Vec2((_arg3.y - _arg2.y), (_arg2.x - _arg3.x));
_local5 = b2Math.b2Dot(_local4, _arg2);
_local6 = [new b2Vec2(_arg1.lowerBound.x, _arg1.lowerBound.y), new b2Vec2(_arg1.upperBound.x, _arg1.lowerBound.y), new b2Vec2(_arg1.upperBound.x, _arg1.upperBound.y), new b2Vec2(_arg1.lowerBound.x, _arg1.upperBound.y)];
_local7 = 0;
_local8 = 0;
while (_local8 < 4) {
_local9 = b2Math.b2Dot(_local4, _local6[_local8]);
if (_local9 > _local5){
_local7++;
};
_local8++;
};
return ((((_local7 > 0)) && ((_local7 < 4))));
}
public static function squareDistancePointToPoint(_arg1:b2Vec2, _arg2:b2Vec2):Number{
var _local3:Number;
var _local4:Number;
_local3 = (_arg2.x - _arg1.x);
_local4 = (_arg2.y - _arg1.y);
return (((_local3 * _local3) + (_local4 * _local4)));
}
public static function squareDistancePointToAABB(_arg1:b2Vec2, _arg2:b2AABB):Number{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local3 = _arg1.x;
if (_local3 < _arg2.lowerBound.x){
_local3 = _arg2.lowerBound.x;
};
if (_local3 > _arg2.upperBound.x){
_local3 = _arg2.upperBound.x;
};
_local4 = _arg1.y;
if (_local4 < _arg2.lowerBound.y){
_local4 = _arg2.lowerBound.y;
};
if (_local4 > _arg2.upperBound.y){
_local4 = _arg2.upperBound.y;
};
_local5 = (_arg1.x - _local3);
_local6 = (_arg1.y - _local4);
return (((_local5 * _local5) + (_local6 * _local6)));
}
public static function squareDistancePointToSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):Number{
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
_local4 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local4.Normalize();
_local5 = new b2Vec2(_local4.y, -(_local4.x));
_local6 = b2Math.b2Dot(_local4, _arg1);
_local7 = b2Math.b2Dot(_local4, _arg2);
_local8 = b2Math.b2Dot(_local4, _arg3);
_local9 = b2Math.b2Dot(_local5, _arg1);
if (_local8 < _local6){
_local8 = _local6;
};
if (_local8 > _local7){
_local8 = _local7;
};
_local10 = ((_local8 * _local4.x) + (_local9 * _local5.x));
_local11 = ((_local8 * _local4.y) + (_local9 * _local5.y));
_local12 = (_local10 - _arg3.x);
_local13 = (_local11 - _arg3.y);
return (((_local12 * _local12) + (_local13 * _local13)));
}
public static function segmentIntersection(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:b2Vec2):b2Vec2{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local7 = ((_arg1.x < _arg2.x)) ? _arg1.x : _arg2.x;
_local8 = ((_arg1.x > _arg2.x)) ? _arg1.x : _arg2.x;
_local9 = ((_arg3.x < _arg4.x)) ? _arg3.x : _arg4.x;
_local10 = ((_arg3.x > _arg4.x)) ? _arg3.x : _arg4.x;
if (_local8 < _local9){
return (null);
};
if (_local7 > _local10){
return (null);
};
_local11 = ((_arg1.y < _arg2.y)) ? _arg1.y : _arg2.y;
_local12 = ((_arg1.y > _arg2.y)) ? _arg1.y : _arg2.y;
_local13 = ((_arg3.y < _arg4.y)) ? _arg3.y : _arg4.y;
_local14 = ((_arg3.y > _arg4.y)) ? _arg3.y : _arg4.y;
if (_local12 < _local13){
return (null);
};
if (_local11 > _local14){
return (null);
};
_local5 = isLeft(_arg1, _arg2, _arg3);
_local6 = isLeft(_arg1, _arg2, _arg4);
if ((_local5 * _local6) >= 0){
return (null);
};
_local5 = isLeft(_arg3, _arg4, _arg1);
_local6 = isLeft(_arg3, _arg4, _arg2);
if ((_local5 * _local6) >= 0){
return (null);
};
return (lineIntersection(_arg1, _arg2, _arg3, _arg4));
}
public static function lineIntersection(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:b2Vec2):b2Vec2{
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
_local5 = new b2Vec2((_arg2.x - _arg1.x), (_arg2.y - _arg1.y));
_local6 = new b2Vec2((_arg4.x - _arg3.x), (_arg4.y - _arg3.y));
_local7 = (_arg3.x - _arg1.x);
_local8 = (_arg3.y - _arg1.y);
_local9 = ((_local7 * _local6.y) - (_local8 * _local6.x));
_local10 = ((_local5.x * _local6.y) - (_local5.y * _local6.x));
_local11 = (_local9 / _local10);
_local12 = (_arg1.x + (_local5.x * _local11));
_local13 = (_arg1.y + (_local5.y * _local11));
return (new b2Vec2(_local12, _local13));
}
public static function segmentIntersectsCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Vec2):Array{
var _local5:b2Vec2;
var _local6:Number;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Array;
var _local14:b2Vec2;
_local5 = new b2Vec2((_arg4.x - _arg3.x), (_arg4.y - _arg3.y));
_local6 = _local5.Length();
_local5.Multiply((1 / _local6));
_local7 = new b2Vec2(_local5.y, -(_local5.x));
_local8 = new b2Vec2();
_local8.x = (b2Math.b2Dot(_arg1, _local5) - b2Math.b2Dot(_arg3, _local5));
if (_local8.x < -(_arg2)){
return (null);
};
if (_local8.x > (_local6 + _arg2)){
return (null);
};
_local8.y = (b2Math.b2Dot(_arg1, _local7) - b2Math.b2Dot(_arg3, _local7));
if (_local8.y < -(_arg2)){
return (null);
};
if (_local8.y > _arg2){
return (null);
};
_local9 = _local8.x;
if (_local9 < 0){
_local9 = 0;
};
if (_local9 > _local6){
_local9 = _local6;
};
_local10 = (_local9 - _local8.x);
_local11 = _local8.y;
if (((_local10 * _local10) + (_local11 * _local11)) > (_arg2 * _arg2)){
return (null);
};
_local12 = _local8.x;
_local10 = Math.sqrt(((_arg2 * _arg2) - (_local11 * _local11)));
_local13 = [];
if (((((_local12 - _local10) > 0)) && (((_local12 - _local10) < _local6)))){
_local14 = new b2Vec2();
_local14.x = (_arg3.x + ((_local12 - _local10) * _local5.x));
_local14.y = (_arg3.y + ((_local12 - _local10) * _local5.y));
_local13.push(_local14);
};
if (((((_local12 + _local10) > 0)) && (((_local12 + _local10) < _local6)))){
_local14 = new b2Vec2();
_local14.x = (_arg3.x + ((_local12 + _local10) * _local5.x));
_local14.y = (_arg3.y + ((_local12 + _local10) * _local5.y));
_local13.push(_local14);
};
return (_local13);
}
}
}//package com.nitrome.util
Section 182
//Global (com.nitrome.util.Global)
package com.nitrome.util {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public class Global {
public static function safeMinimum(_arg1:Array):Number{
var _local2:Number;
var _local3:*;
_local2 = NaN;
for (_local3 in _arg1) {
if (((isNaN(_local2)) || ((_arg1[_local3] < _local2)))){
_local2 = _arg1[_local3];
};
};
return (_local2);
}
public static function isNumeric(_arg1:String):Boolean{
return ((_arg1 == String(Number(_arg1))));
}
public static function childrenList(_arg1, _arg2:String):Array{
var _local3:Array;
var _local4:*;
_local3 = [];
for (_local4 in _arg1) {
_local3.push(_arg1[_local4][_arg2]);
};
return (_local3);
}
public static function whiteOut(_arg1:Number):ColorTransform{
var _local2:Number;
var _local3:Number;
if (_arg1 > 0.5){
_local2 = ((_arg1 - 0.5) * 2);
_local3 = (0xFF - (_local2 * 0xFF));
return (new ColorTransform(_local2, _local2, _local2, 1, _local3, _local3, _local3, 0));
};
return (new ColorTransform(0, 0, 0, (_arg1 * 2), 0xFF, 0xFF, 0xFF, 0));
}
public static function createGrid(_arg1:Number, _arg2:Number, _arg3=null):Array{
var _local4:Array;
var _local5:Array;
var _local6:Number;
_local4 = [];
_local5 = [];
_local6 = 0;
while (_local6 < _arg2) {
_local5.push(_arg3);
_local6++;
};
_local6 = 0;
while (_local6 < _arg1) {
_local4.push(_local5.slice());
_local6++;
};
return (_local4);
}
public static function trim(_arg1:String):String{
var _local2:Number;
var _local3:Number;
_local2 = 0;
_local3 = (_arg1.length - 1);
while ((((((((_arg1.charAt(_local2) == " ")) || ((_arg1.charAt(_local2) == "\t")))) || ((_arg1.charAt(_local2) == "\n")))) || ((_arg1.charAt(_local2) == "\r")))) {
_local2++;
};
while ((((((((_arg1.charAt(_local3) == " ")) || ((_arg1.charAt(_local3) == "\t")))) || ((_arg1.charAt(_local3) == "\n")))) || ((_arg1.charAt(_local3) == "\r")))) {
_local3--;
};
return (_arg1.substring(_local2, (_local3 + 1)));
}
public static function negativeModulo(_arg1:Number, _arg2:Number):Number{
if (_arg1 >= 0){
return (((_arg1 % _arg2) - _arg2));
};
return ((_arg1 % _arg2));
}
public static function removeFromList(_arg1, _arg2:Array):void{
var _local3:Number;
_local3 = (_arg2.length - 1);
while (_local3 >= 0) {
if (_arg2[_local3] == _arg1){
_arg2.splice(_local3, 1);
};
_local3--;
};
}
public static function removeOnceFromList(_arg1, _arg2:Array):void{
var _local3:Number;
_local3 = (_arg2.length - 1);
while (_local3 >= 0) {
if (_arg2[_local3] == _arg1){
_arg2.splice(_local3, 1);
return;
};
_local3--;
};
}
public static function enforcePlaces(_arg1:Number, _arg2:Number):String{
var _local3:String;
var _local4:String;
if (_arg1 < 0){
return (("-" + enforcePlaces(-(_arg1), _arg2)));
};
_local3 = String(Math.floor(_arg1));
_local4 = String(Math.floor(((_arg1 % 1) * Math.pow(10, _arg2))));
while (_local4.length < _arg2) {
_local4 = ("0" + _local4);
};
return (((_local3 + ".") + _local4));
}
public static function blackOut(_arg1:Number):ColorTransform{
var _local2:Number;
if (_arg1 > 0.5){
_local2 = ((_arg1 - 0.5) * 2);
return (new ColorTransform(_local2, _local2, _local2, 1, 0, 0, 0, 0));
};
return (new ColorTransform(0, 0, 0, (_arg1 * 2), 0, 0, 0, 0));
}
public static function copyArrayDeep(_arg1:Array):Array{
var _local2:Array;
var _local3:Number;
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
if ((_arg1[_local3] is Array)){
_local2.push(copyArrayDeep(_arg1[_local3]));
} else {
_local2.push(_arg1[_local3]);
};
_local3++;
};
return (_local2);
}
public static function slide(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg1 < _arg2){
_arg1 = (_arg1 + _arg3);
if (_arg1 > _arg2){
_arg1 = _arg2;
};
return (_arg1);
//unresolved jump
};
_arg1 = (_arg1 - _arg3);
if (_arg1 < _arg2){
_arg1 = _arg2;
};
return (_arg1);
}
public static function createList(_arg1:Number, _arg2=null):Array{
var _local3:Array;
var _local4:Number;
_local3 = [];
_local4 = 0;
while (_local4 < _arg1) {
_local3.push(_arg2);
_local4++;
};
return (_local3);
}
public static function deceleratingSweep(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Number{
var _local6:Number;
var _local7:Number;
_local6 = ((_arg3)>0) ? -(_arg5) : _arg5;
_local7 = ((_arg3 * _arg3) / (2 * -(_local6)));
_local7 = (_local7 + _arg1);
if (_arg1 < _arg2){
if (_local7 > _arg2){
return (-(_arg5));
};
return (_arg4);
//unresolved jump
};
if (_local7 < _arg2){
return (_arg5);
};
return (-(_arg4));
}
public static function positiveModulo(_arg1:Number, _arg2:Number):Number{
if (_arg1 >= 0){
return ((_arg1 % _arg2));
};
return (((_arg1 % _arg2) + _arg2));
}
public static function textToBitmap(_arg1:BitmapData, _arg2:String, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0xFFFFFF, _arg6:Boolean=false, _arg7:TextFormat=null):void{
var _local8:TextField;
_local8 = new TextField();
_local8.autoSize = TextFieldAutoSize.LEFT;
if (_arg7){
_local8.defaultTextFormat = _arg7;
} else {
_local8.defaultTextFormat = new TextFormat("_sans", 10);
};
_local8.textColor = _arg5;
_local8.text = _arg2;
if (_arg6){
_arg1.draw(_local8, new Matrix(1, 0, 0, 1, (_arg3 - int((_local8.width / 2))), (_arg4 - int((_local8.height / 2)))));
} else {
_arg1.draw(_local8, new Matrix(1, 0, 0, 1, _arg3, _arg4));
};
}
public static function ordinal(_arg1:Number):String{
if (((((_arg1 % 100) > 10)) && (((_arg1 % 100) < 15)))){
return ((_arg1.toString() + "th"));
};
if ((_arg1 % 10) == 1){
return ((_arg1.toString() + "st"));
};
if ((_arg1 % 10) == 2){
return ((_arg1.toString() + "nd"));
};
if ((_arg1 % 10) == 3){
return ((_arg1.toString() + "rd"));
};
return ((_arg1.toString() + "th"));
}
public static function safeMaximum(_arg1:Array):Number{
var _local2:Number;
var _local3:*;
_local2 = NaN;
for (_local3 in _arg1) {
if (((isNaN(_local2)) || ((_arg1[_local3] > _local2)))){
_local2 = _arg1[_local3];
};
};
return (_local2);
}
public static function repeatString(_arg1:String, _arg2:Number):String{
var _local3:String;
var _local4:Number;
if (_arg2 < 1){
return ("");
};
_local3 = _arg1;
_local4 = 1;
while (_local4 < _arg2) {
_local3 = (_local3 + _arg1);
_local4++;
};
return (_local3);
}
public static function findInList(_arg1, _arg2:Array):Number{
var _local3:Number;
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg2[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public static function sign(_arg1:Number):Number{
if (_arg1 > 0){
return (1);
};
if (_arg1 < 0){
return (-1);
};
return (0);
}
public static function copyColorTransform(_arg1:ColorTransform):ColorTransform{
return (new ColorTransform(_arg1.redMultiplier, _arg1.greenMultiplier, _arg1.blueMultiplier, _arg1.alphaMultiplier, _arg1.redOffset, _arg1.greenOffset, _arg1.blueOffset, _arg1.alphaOffset));
}
}
}//package com.nitrome.util
Section 183
//HiddenInt (com.nitrome.util.HiddenInt)
package com.nitrome.util {
public class HiddenInt {
private var _value:int;
private var r:int;
public function HiddenInt(_arg1:int=0){
r = (Math.floor((Math.random() * 2000000)) - 1000000);
_value = (r + _arg1);
}
public function get value():int{
return ((_value - r));
}
public function set value(_arg1:int):void{
r = (Math.floor((Math.random() * 2000000)) - 1000000);
_value = (r + _arg1);
}
}
}//package com.nitrome.util
Section 184
//Key (com.nitrome.util.Key)
package com.nitrome.util {
import flash.display.*;
import flash.events.*;
public class Key {
public static const LEFT:uint = 37;
public static const NUMPAD_DECIMAL:uint = 110;
public static const A:uint = 65;
public static const B:uint = 66;
public static const C:uint = 67;
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 H:uint = 72;
public static const I:uint = 73;
public static const J:uint = 74;
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 O:uint = 79;
public static const MINUS:uint = 189;
public static const Q:uint = 81;
public static const PAGE_DOWN:uint = 34;
public static const S:uint = 83;
public static const T:uint = 84;
public static const U:uint = 85;
public static const V:uint = 86;
public static const P:uint = 80;
public static const X:uint = 88;
public static const R:uint = 82;
public static const ALTERNATE:uint = 18;
public static const QUOTE:uint = 222;
public static const W:uint = 87;
public static const BACKSPACE:uint = 8;
public static const Y:uint = 89;
public static const SHIFT:uint = 16;
public static const PAGE_UP:uint = 33;
public static const Z:uint = 90;
public static const ESCAPE:uint = 27;
public static const NUMPAD_ADD:uint = 107;
public static const SEMICOLON:uint = 186;
public static const UP:uint = 38;
public static const DOWN:uint = 40;
public static const F1:uint = 112;
public static const F3:uint = 114;
public static const F5:uint = 116;
public static const F6:uint = 117;
public static const F7:uint = 118;
public static const F8:uint = 119;
public static const F2:uint = 113;
public static const F4:uint = 115;
public static const ENTER:uint = 13;
public static const INSERT:uint = 45;
public static const END:uint = 35;
public static const COMMA:uint = 188;
public static const NUMBER_3:uint = 51;
public static const NUMBER_5:uint = 53;
public static const NUMBER_6:uint = 54;
public static const NUMBER_0:uint = 48;
public static const F9:uint = 120;
public static const NUMBER_4:uint = 52;
public static const NUMBER_7:uint = 55;
public static const NUMBER_8:uint = 56;
public static const NUMBER_2:uint = 50;
public static const LEFTBRACKET:uint = 219;
public static const NUMBER_9:uint = 57;
public static const NUMBER_1:uint = 49;
public static const BACKSLASH:uint = 220;
public static const NUMPAD_MULTIPLY:uint = 106;
public static const HOME:uint = 36;
public static const F10:uint = 121;
public static const F11:uint = 122;
public static const F12:uint = 123;
public static const F13:uint = 124;
public static const F14:uint = 125;
public static const SPACE:uint = 32;
public static const F15:uint = 126;
public static const RIGHTBRACKET:uint = 221;
public static const EQUAL:uint = 187;
public static const COMMAND:uint = 15;
public static const CONTROL:uint = 17;
public static const NUMPAD_ENTER:uint = 108;
public static const NUMPAD:uint = 21;
public static const TAB:uint = 9;
public static const SLASH:uint = 191;
public static const DELETE:uint = 46;
public static const NUMPAD_DIVIDE:uint = 111;
public static const NUMPAD_1:uint = 97;
public static const NUMPAD_2:uint = 98;
public static const NUMPAD_3:uint = 99;
public static const NUMPAD_4:uint = 100;
public static const NUMPAD_5:uint = 101;
public static const NUMPAD_6:uint = 102;
public static const NUMPAD_7:uint = 103;
public static const NUMPAD_8:uint = 104;
public static const NUMPAD_9:uint = 105;
public static const PERIOD:uint = 190;
public static const CAPS_LOCK:uint = 20;
public static const NUMPAD_0:uint = 96;
public static const BACKQUOTE:uint = 192;
public static const NUMPAD_SUBTRACT:uint = 109;
public static const RIGHT:uint = 39;
protected static var keysDown:Object = new Object();
protected static var initialized:Boolean = false;
public static function terminate(_arg1:Stage):void{
if (initialized){
_arg1.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.removeEventListener(Event.DEACTIVATE, clearKeys);
initialized = false;
keysDown = new Object();
};
}
public static function isReady():Boolean{
return (initialized);
}
public static function keyReleased(_arg1:KeyboardEvent):void{
if ((_arg1.keyCode in keysDown)){
delete keysDown[_arg1.keyCode];
};
}
public static function keyPressed(_arg1:KeyboardEvent):void{
keysDown[_arg1.keyCode] = true;
}
public static function isDown(_arg1:uint):Boolean{
if (!initialized){
trace("ERROR: Key class has not been initialized.");
};
return (Boolean((_arg1 in keysDown)));
}
public static function initialize(_arg1:Stage):void{
if (!initialized){
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
_arg1.addEventListener(Event.DEACTIVATE, clearKeys);
initialized = true;
};
}
public static function clearKeys(_arg1:Event):void{
keysDown = new Object();
}
}
}//package com.nitrome.util
Section 185
//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_URL) == 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 186
//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 187
//TimedUnlock (com.nitrome.util.TimedUnlock)
package com.nitrome.util {
import flash.net.*;
public class TimedUnlock {
public static const DEATHS_REQUIRED:Number = 3;
private static var _justUnlocked:Array = [];
public static function recordDeath(_arg1:Number, _arg2:int=1):void{
var _local3:SharedObject;
_local3 = NitromeGame.getSharedObject(_arg2);
if (!_local3.data.deaths_each_level){
_local3.data.deaths_each_level = [];
};
if (_local3.data.deaths_each_level[_arg1]){
var _local4 = _local3.data.deaths_each_level;
var _local5 = _arg1;
var _local6 = (_local4[_local5] + 1);
_local4[_local5] = _local6;
} else {
_local3.data.deaths_each_level[_arg1] = 1;
};
_local3.flush();
_local3.close();
}
public static function couldStartTimer(_arg1:Number, _arg2:int=1):Boolean{
var _local3:SharedObject;
var _local4:Boolean;
if (_arg1 == NitromeGame.total_levels){
return (false);
};
_local3 = NitromeGame.getSharedObject(_arg2);
_local4 = false;
if (_local3.data.deaths_each_level){
if (_local3.data.deaths_each_level[_arg1] >= DEATHS_REQUIRED){
_local4 = true;
};
};
if (_local3.data.levels_unlocked){
if (_local3.data.levels_unlocked[_arg1]){
_local4 = false;
};
};
if (((_local3.data.timed_unlock_active) && ((_local3.data.timed_unlock_level == (_arg1 + 1))))){
_local4 = false;
};
_local3.close();
return (_local4);
}
public static function getUnlockTime(_arg1:int=1):Date{
var _local2:Date;
_local2 = getStartTime();
if (_local2){
return (new Date((_local2.time + (((1000 * 60) * 60) * 24))));
};
return (null);
}
public static function check(_arg1:int=1):void{
var _local2:SharedObject;
var _local3:Date;
var _local4:Date;
var _local5:Number;
var _local6:Number;
_local2 = NitromeGame.getSharedObject(_arg1);
if (_local2.data.timed_unlock_active){
_local3 = new Date();
_local4 = _local2.data.timed_unlock_start;
_local5 = (_local3.time - _local4.time);
if (_local5 > (((1000 * 60) * 60) * 24)){
_local6 = _local2.data.timed_unlock_level;
if (!_local2.data.levels_unlocked){
_local2.data.levels_unlocked = [];
};
_local2.data.levels_unlocked[(_local6 - 1)] = 1;
_local2.data.timed_unlock_start = null;
_local2.data.timed_unlock_level = null;
_local2.data.timed_unlock_active = false;
_justUnlocked[_arg1] = _local6;
_local2.flush();
};
};
_local2.close();
}
public static function startTimer(_arg1:Number, _arg2:int=1):void{
var _local3:SharedObject;
_local3 = NitromeGame.getSharedObject(_arg2);
_local3.data.timed_unlock_start = new Date();
_local3.data.timed_unlock_level = _arg1;
_local3.data.timed_unlock_active = true;
_local3.flush();
_local3.close();
}
public static function cancelTimer(_arg1:int=1):void{
var _local2:SharedObject;
_local2 = NitromeGame.getSharedObject(_arg1);
_local2.data.timed_unlock_start = null;
_local2.data.timed_unlock_level = null;
_local2.data.timed_unlock_active = false;
_local2.flush();
_local2.close();
}
public static function isActive(_arg1:int=1):Boolean{
var _local2:SharedObject;
var _local3:Boolean;
_local2 = NitromeGame.getSharedObject(_arg1);
_local3 = Boolean(_local2.data.timed_unlock_active);
if (((_local3) && (_local2.data.levels_unlocked))){
if (_local2.data.levels_unlocked[(_local2.data.timed_unlock_level - 1)]){
_local3 = false;
};
};
_local2.close();
return (_local3);
}
public static function clearJustUnlocked(_arg1:int=1):void{
_justUnlocked[_arg1] = 0;
}
public static function getStartTime(_arg1:int=1):Date{
var _local2:Date;
var _local3:SharedObject;
_local2 = null;
_local3 = NitromeGame.getSharedObject(_arg1);
if (_local3.data.timed_unlock_active){
_local2 = _local3.data.timed_unlock_start;
};
_local3.close();
return (_local2);
}
public static function getLevelJustUnlocked(_arg1:int=1):Number{
var _local2:Number;
_local2 = _justUnlocked[_arg1];
if (isNaN(_local2)){
_local2 = 0;
};
return (_local2);
}
public static function getLevelWaiting(_arg1:int=1):Number{
var _local2:Number;
var _local3:SharedObject;
_local2 = 0;
_local3 = NitromeGame.getSharedObject(_arg1);
if (_local3.data.timed_unlock_active){
_local2 = Number(_local3.data.timed_unlock_level);
if (isNaN(_local2)){
_local2 = 0;
};
};
_local3.close();
return (_local2);
}
}
}//package com.nitrome.util
Section 188
//Trig (com.nitrome.util.Trig)
package com.nitrome.util {
public class Trig {
protected static var hasSetup:Boolean = false;
public static var cos:Array;
public static var sin:Array;
public static function getCos(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
return (cos[(_arg1 << 0)]);
}
public static function getSin(_arg1:Number):Number{
_arg1 = (_arg1 % 360);
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
return (sin[(_arg1 << 0)]);
}
public static function getCosRadians(_arg1:Number):Number{
return (getCos(((_arg1 * 180) / Math.PI)));
}
public static function setup():void{
var _local1:int;
if (hasSetup){
return;
};
sin = [];
cos = [];
_local1 = 0;
while (_local1 <= 360) {
sin[_local1] = Math.sin(((_local1 * Math.PI) / 180));
cos[_local1] = Math.cos(((_local1 * Math.PI) / 180));
_local1++;
};
}
public static function getSinRadians(_arg1:Number):Number{
return (getSin(((_arg1 * 180) / Math.PI)));
}
}
}//package com.nitrome.util
Section 189
//ag_intro_mc_128 (Icebreaker_fla.ag_intro_mc_128)
package Icebreaker_fla {
import flash.display.*;
public dynamic class ag_intro_mc_128 extends MovieClip {
public function ag_intro_mc_128(){
addFrameScript(0, frame1, 217, );
}
function (){
(parent as MovieClip).gotoAndStop("nitrome");
}
function frame1(){
gotoAndPlay(2);
}
}
}//package Icebreaker_fla
Section 190
//blocked_87 (Icebreaker_fla.blocked_87)
package Icebreaker_fla {
import flash.display.*;
public dynamic class blocked_87 extends MovieClip {
public function blocked_87(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 191
//bombExplode_86 (Icebreaker_fla.bombExplode_86)
package Icebreaker_fla {
import flash.display.*;
public dynamic class bombExplode_86 extends MovieClip {
public function bombExplode_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 192
//bouncyImpact_88 (Icebreaker_fla.bouncyImpact_88)
package Icebreaker_fla {
import flash.display.*;
public dynamic class bouncyImpact_88 extends MovieClip {
public function bouncyImpact_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 193
//congratulationsclip_143 (Icebreaker_fla.congratulationsclip_143)
package Icebreaker_fla {
import com.nitrome.icebreaker.*;
import flash.display.*;
import com.nitrome.game.*;
public dynamic class congratulationsclip_143 extends MovieClip {
public var __id28_:NumbskullFont;
public var bg:Background;
public var scoreField:NumbskullFont;
public function congratulationsclip_143(){
addFrameScript(0, frame1);
();
();
}
function (){
try {
__id28_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id28_.align = "center";
__id28_.align_vert = "center";
__id28_.color = 11977954;
__id28_.id = "None";
__id28_.line_spacing = 18;
__id28_.text = "Congratulations!";
__id28_.tracking = 0;
try {
__id28_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
scoreField["componentInspectorSetting"] = true;
} catch(e:Error) {
};
scoreField.align = "center";
scoreField.align_vert = "center";
scoreField.color = 15068151;
scoreField.id = "None";
scoreField.line_spacing = 18;
scoreField.text = "your final score is 0!";
scoreField.tracking = 0;
try {
scoreField["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
scoreField.text = ("Your final score is " + Score.value.toString());
bg.autoLevel = 0;
}
}
}//package Icebreaker_fla
Section 194
//death_80 (Icebreaker_fla.death_80)
package Icebreaker_fla {
import flash.display.*;
public dynamic class death_80 extends MovieClip {
public function death_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 195
//deepthud_73 (Icebreaker_fla.deepthud_73)
package Icebreaker_fla {
import flash.display.*;
public dynamic class deepthud_73 extends MovieClip {
public function deepthud_73(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 196
//fatwoman_78 (Icebreaker_fla.fatwoman_78)
package Icebreaker_fla {
import flash.display.*;
public dynamic class fatwoman_78 extends MovieClip {
public function fatwoman_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 197
//grab_85 (Icebreaker_fla.grab_85)
package Icebreaker_fla {
import flash.display.*;
public dynamic class grab_85 extends MovieClip {
public function grab_85(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 198
//ice3_71 (Icebreaker_fla.ice3_71)
package Icebreaker_fla {
import flash.display.*;
public dynamic class ice3_71 extends MovieClip {
public function ice3_71(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 199
//ice3b_84 (Icebreaker_fla.ice3b_84)
package Icebreaker_fla {
import flash.display.*;
public dynamic class ice3b_84 extends MovieClip {
public function ice3b_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 200
//ice4_72 (Icebreaker_fla.ice4_72)
package Icebreaker_fla {
import flash.display.*;
public dynamic class ice4_72 extends MovieClip {
public function ice4_72(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 201
//iceSmash_75 (Icebreaker_fla.iceSmash_75)
package Icebreaker_fla {
import flash.display.*;
public dynamic class iceSmash_75 extends MovieClip {
public function iceSmash_75(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 202
//iceTooLarge_76 (Icebreaker_fla.iceTooLarge_76)
package Icebreaker_fla {
import flash.display.*;
public dynamic class iceTooLarge_76 extends MovieClip {
public function iceTooLarge_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 203
//instances_2 (Icebreaker_fla.instances_2)
package Icebreaker_fla {
import flash.display.*;
public dynamic class instances_2 extends MovieClip {
public function instances_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 204
//MainTimeline (Icebreaker_fla.MainTimeline)
package Icebreaker_fla {
import com.nitrome.icebreaker.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import com.nitrome.util.*;
import com.nitrome.game.*;
import flash.utils.*;
public dynamic class MainTimeline extends MovieClip {
public var mapHolder:MovieClip;
public var __setPropDict:Dictionary;
public var preloader:Preloader;
public var content:MovieClip;
public var characterCounter:NumbskullFont;
public var clanTitle1:TextField;
public var clanTitle2:TextField;
public var button10:LevelStartButton;
public var button11:LevelStartButton;
public var button12:LevelStartButton;
public var button13:LevelStartButton;
public var button14:LevelStartButton;
public var button15:LevelStartButton;
public var button16:LevelStartButton;
public var button18:LevelStartButton;
public var clanTitle5:TextField;
public var clanTitle3:TextField;
public var clanTitle4:TextField;
public var button17:LevelStartButton;
public var button19:LevelStartButton;
public var moveCounter:NumbskullFont;
public var button21:LevelStartButton;
public var button23:LevelStartButton;
public var button25:LevelStartButton;
public var button26:LevelStartButton;
public var button27:LevelStartButton;
public var button24:LevelStartButton;
public var button29:LevelStartButton;
public var button22:LevelStartButton;
public var pauseGame:PauseButton;
public var button31:LevelStartButton;
public var button33:LevelStartButton;
public var button34:LevelStartButton;
public var button35:LevelStartButton;
public var button36:LevelStartButton;
public var button38:LevelStartButton;
public var button28:LevelStartButton;
public var button30:LevelStartButton;
public var button32:LevelStartButton;
public var button37:LevelStartButton;
public var button20:LevelStartButton;
public var background:Background;
public var button39:LevelStartButton;
public var button40:LevelStartButton;
public var button1:LevelStartButton;
public var button4:LevelStartButton;
public var button5:LevelStartButton;
public var button6:LevelStartButton;
public var button7:LevelStartButton;
public var button9:LevelStartButton;
public var button3:LevelStartButton;
public var button8:LevelStartButton;
public var button2:LevelStartButton;
public var __id23_:NumbskullFont;
public var popupHolder:MovieClip;
public var __id24_:NumbskullFont;
public var __id25_:NumbskullFont;
public var __id26_:NumbskullFont;
public var __id27_:NumbskullFont;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(1, frame2, 5, frame6, 10, frame11, 20, frame21, 30, frame31, 40, frame41, 70, frame71, 80, , 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50);
}
function (){
try {
__id24_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id24_.align = "center";
__id24_.align_vert = "top";
__id24_.color = 11977954;
__id24_.id = "None";
__id24_.line_spacing = 19;
__id24_.text = "markus heinel|mat annal";
__id24_.tracking = 0;
try {
__id24_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function ():void{
var _local1:SharedObject;
var _local2:Number;
var _local3:LevelStartButton;
_local1 = NitromeGame.getSharedObject();
_local2 = 1;
while (_local2 <= 40) {
_local3 = (getChildByName(("button" + _local2.toString())) as LevelStartButton);
_local3.init(_local1);
_local2++;
};
_local1.close();
}
function frame6(){
stop();
Controller.takeLimitsXML(new XML("<e e=\"e303b79f51a89722768b7c1a75d0eba4\" />"));
if (Controller.SKIP_MENUS){
(root as MovieClip).gotoAndStop("game");
} else {
(root as MovieClip).gotoAndStop("armor");
};
}
function frame11(){
stop();
}
function frame21(){
stop();
}
function frame2(){
preloader.addEventListener(Event.COMPLETE, function (_arg1:Event){
NitromeGame.init((root as MovieClip), "icebreakergathering", "yetmorenobodies", 40);
stage.showDefaultContextMenu = false;
(root as MovieClip).gotoAndStop("load_limits");
});
stop();
}
function (){
try {
moveCounter["componentInspectorSetting"] = true;
} catch(e:Error) {
};
moveCounter.align = "left";
moveCounter.align_vert = "center";
moveCounter.color = 0xFFFFFF;
moveCounter.id = "None";
moveCounter.line_spacing = 18;
moveCounter.text = "0/0";
moveCounter.tracking = 0;
try {
moveCounter["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame31(){
Lock.urlLock(stage);
NitromeGame.sound_manager.playMusic(SoundManager.MENU);
}
function frame42(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame43(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame44(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame45(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame46(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame47(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame41(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if (Controller.lastLevelAvailable.value < 9){
(clanTitle2, "LOCKED UNTIL 21st December");
};
if (Controller.lastLevelAvailable.value < 17){
(clanTitle3, "LOCKED UNTIL 28th December");
};
if (Controller.lastLevelAvailable.value < 25){
(clanTitle4, "LOCKED UNTIL 4th Janaury");
};
if (Controller.lastLevelAvailable.value < 33){
(clanTitle5, "LOCKED UNTIL 11th January");
};
();
}
function
(){
try {
__id25_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id25_.align = "center";
__id25_.align_vert = "top";
__id25_.color = 11977954;
__id25_.id = "None";
__id25_.line_spacing = 18;
__id25_.text = "chris burt-brown";
__id25_.tracking = 0;
try {
__id25_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame48(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame49(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame51(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame52(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame53(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame54(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame55(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame56(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame57(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame61(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame63(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame66(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame67(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame68(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame58(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame70(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame73(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame77(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame71(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
Controller.startGame(content);
Controller.startLevel(Controller.selectedLevel);
NitromeGame.sound_manager.playMusic(SoundManager.GAME);
}
function frame74(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame76(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame50(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 41)) && ((int(__setPropDict[__id23_]) <= 50))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function frame62(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame75(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame72(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame80(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function (){
NitromeGame.sound_manager.playMusic(SoundManager.MENU);
}
function frame79(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function (){
try {
characterCounter["componentInspectorSetting"] = true;
} catch(e:Error) {
};
characterCounter.align = "right";
characterCounter.align_vert = "center";
characterCounter.color = 0xFFFFFF;
characterCounter.id = "None";
characterCounter.line_spacing = 18;
characterCounter.text = "0/1";
characterCounter.tracking = 0;
try {
characterCounter["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame69(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function (){
try {
__id23_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id23_.align = "center";
__id23_.align_vert = "center";
__id23_.color = 11977954;
__id23_.id = "None";
__id23_.line_spacing = 18;
__id23_.text = "select a level";
__id23_.tracking = 0;
try {
__id23_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame64(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame78(){
if ((((__setPropDict[characterCounter] == undefined)) || (!((((int(__setPropDict[characterCounter]) >= 71)) && ((int(__setPropDict[characterCounter]) <= 80))))))){
__setPropDict[characterCounter] = currentFrame;
();
};
if ((((__setPropDict[moveCounter] == undefined)) || (!((((int(__setPropDict[moveCounter]) >= 71)) && ((int(__setPropDict[moveCounter]) <= 80))))))){
__setPropDict[moveCounter] = currentFrame;
();
};
}
function frame59(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function (){
try {
__id26_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id26_.align = "center";
__id26_.align_vert = "top";
__id26_.color = 11977954;
__id26_.id = "None";
__id26_.line_spacing = 18;
__id26_.text = "lee nicklen";
__id26_.tracking = 0;
try {
__id26_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
__id23_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id23_.align = "center";
__id23_.align_vert = "center";
__id23_.color = 11977954;
__id23_.id = "None";
__id23_.line_spacing = 18;
__id23_.text = "instructions";
__id23_.tracking = 0;
try {
__id23_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame65(){
if ((((__setPropDict[__id26_] == undefined)) || (!((((int(__setPropDict[__id26_]) >= 61)) && ((int(__setPropDict[__id26_]) <= 70))))))){
__setPropDict[__id26_] = currentFrame;
();
};
if ((((__setPropDict[__id27_] == undefined)) || (!((((int(__setPropDict[__id27_]) >= 61)) && ((int(__setPropDict[__id27_]) <= 70))))))){
__setPropDict[__id27_] = currentFrame;
();
};
if ((((__setPropDict[__id25_] == undefined)) || (!((((int(__setPropDict[__id25_]) >= 61)) && ((int(__setPropDict[__id25_]) <= 70))))))){
__setPropDict[__id25_] = currentFrame;
();
};
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 61)) && ((int(__setPropDict[__id23_]) <= 70))))))){
__setPropDict[__id23_] = currentFrame;
();
};
if ((((__setPropDict[__id24_] == undefined)) || (!((((int(__setPropDict[__id24_]) >= 61)) && ((int(__setPropDict[__id24_]) <= 70))))))){
__setPropDict[__id24_] = currentFrame;
();
};
}
function frame60(){
if ((((__setPropDict[__id23_] == undefined)) || (!((((int(__setPropDict[__id23_]) >= 51)) && ((int(__setPropDict[__id23_]) <= 60))))))){
__setPropDict[__id23_] = currentFrame;
();
};
}
function (){
try {
__id23_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id23_.align = "center";
__id23_.align_vert = "center";
__id23_.color = 11977954;
__id23_.id = "None";
__id23_.line_spacing = 18;
__id23_.text = "credits";
__id23_.tracking = 0;
try {
__id23_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function (_arg1:TextField, _arg2:String):void{
_arg1.textColor = 0x808080;
_arg1.text = _arg2;
}
function (){
try {
__id27_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id27_.align = "center";
__id27_.align_vert = "top";
__id27_.color = 11977954;
__id27_.id = "None";
__id27_.line_spacing = 19;
__id27_.text = "mat annal|chris burt-brown";
__id27_.tracking = 0;
try {
__id27_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package Icebreaker_fla
Section 205
//nitrome_70 (Icebreaker_fla.nitrome_70)
package Icebreaker_fla {
import flash.display.*;
public dynamic class nitrome_70 extends MovieClip {
public function nitrome_70(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 206
//nitromeintro_132 (Icebreaker_fla.nitromeintro_132)
package Icebreaker_fla {
import flash.display.*;
public dynamic class nitromeintro_132 extends MovieClip {
public function nitromeintro_132(){
addFrameScript(39, frame40, 55, frame56, 90, , 141, );
}
function (){
NitromeGame.sound_manager.playSound("nitrome");
}
function frame40(){
NitromeGame.sound_manager.playSound("ice3b");
}
function frame56(){
NitromeGame.sound_manager.playSound("iceSmash");
}
function (){
stop();
NitromeGame.transition.doTween("title_screen");
}
}
}//package Icebreaker_fla
Section 207
//noslice_77 (Icebreaker_fla.noslice_77)
package Icebreaker_fla {
import flash.display.*;
public dynamic class noslice_77 extends MovieClip {
public function noslice_77(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 208
//pinBlock_89 (Icebreaker_fla.pinBlock_89)
package Icebreaker_fla {
import flash.display.*;
public dynamic class pinBlock_89 extends MovieClip {
public function pinBlock_89(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 209
//popupcontent_123 (Icebreaker_fla.popupcontent_123)
package Icebreaker_fla {
import flash.display.*;
import flash.text.*;
import com.nitrome.game.*;
import flash.utils.*;
public dynamic class popupcontent_123 extends MovieClip {
public var default_restart:RestartLevelButton1;
public var default_next2:NextLevelButton2;
public var default_next:NextLevelButton1;
public var __setPropDict:Dictionary;
public var title1a:NumbskullFont;
public var title1b:NumbskullFont;
public var title1:NumbskullFont;
public var title2:NumbskullFont;
public var timedUnlock:TimedUnlockPopup;
public var levelScore:TextField;
public var default_restart_1:RestartLevelButton2;
public var default_restart_2:RestartLevelButton2;
public var totalScore:TextField;
public var default_resume:ContinueGameButton1;
public function popupcontent_123(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(20, frame21, 21, , 22, , 23, , 24, , 25, , 26, , 27, , 28, , 29,
, 30, frame31, 31,
, 32, , 33, , 34, , 35, , 36, , 37, frame38, 38, , 39, frame40, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78, 78, frame79, 79, frame80);
}
function (){
try {
title1a["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title1a.align = "center";
title1a.align_vert = "center";
title1a.color = 9085911;
title1a.id = "None";
title1a.line_spacing = 18;
title1a.text = "Restart Level?";
title1a.tracking = 0;
try {
title1a["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
try {
title1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title1.align = "center";
title1.align_vert = "center";
title1.color = 9085911;
title1.id = "None";
title1.line_spacing = 18;
title1.text = "Pause";
title1.tracking = 0;
try {
title1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function frame21(){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function
(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function
(){
if ((((__setPropDict[title1b] == undefined)) || (!((((int(__setPropDict[title1b]) >= 21)) && ((int(__setPropDict[title1b]) <= 30))))))){
__setPropDict[title1b] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame38(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame31(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame41(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame43(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame44(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame45(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame46(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame40(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 31)) && ((int(__setPropDict[title2]) <= 40))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame47(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame48(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame49(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame42(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[title1a] == undefined)) || (!((((int(__setPropDict[title1a]) >= 11)) && ((int(__setPropDict[title1a]) <= 20))))))){
__setPropDict[title1a] = currentFrame;
();
};
}
function frame51(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame52(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame53(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame54(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame55(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame56(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame50(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame58(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame59(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame57(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function
(){
try {
title2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title2.align = "center";
title2.align_vert = "center";
title2.color = 9085911;
title2.id = "None";
title2.line_spacing = 18;
title2.text = "level complete";
title2.tracking = 0;
try {
title2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame61(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame62(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame63(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame66(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame60(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 41)) && ((int(__setPropDict[title2]) <= 60))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame68(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame65(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame67(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame69(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
try {
title2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title2.align = "center";
title2.align_vert = "center";
title2.color = 9085911;
title2.id = "None";
title2.line_spacing = 18;
title2.text = "clan complete!";
title2.tracking = 0;
try {
title2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame73(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame75(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame64(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame71(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame76(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame77(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame70(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame72(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame74(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function (){
try {
title1b["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title1b.align = "center";
title1b.align_vert = "center";
title1b.color = 9085911;
title1b.id = "None";
title1b.line_spacing = 18;
title1b.text = "Restart Level?";
title1b.tracking = 0;
try {
title1b["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame79(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame80(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function frame78(){
if ((((__setPropDict[title2] == undefined)) || (!((((int(__setPropDict[title2]) >= 61)) && ((int(__setPropDict[title2]) <= 80))))))){
__setPropDict[title2] = currentFrame;
();
};
}
function
(){
try {
title2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title2.align = "center";
title2.align_vert = "center";
title2.color = 9085911;
title2.id = "None";
title2.line_spacing = 18;
title2.text = "level failed";
title2.tracking = 0;
try {
title2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package Icebreaker_fla
Section 210
//ropeBreak_79 (Icebreaker_fla.ropeBreak_79)
package Icebreaker_fla {
import flash.display.*;
public dynamic class ropeBreak_79 extends MovieClip {
public function ropeBreak_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 211
//runeDeath_83 (Icebreaker_fla.runeDeath_83)
package Icebreaker_fla {
import flash.display.*;
public dynamic class runeDeath_83 extends MovieClip {
public function runeDeath_83(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 212
//splash_74 (Icebreaker_fla.splash_74)
package Icebreaker_fla {
import flash.display.*;
public dynamic class splash_74 extends MovieClip {
public function splash_74(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 213
//timedunlockcontent_6 (Icebreaker_fla.timedunlockcontent_6)
package Icebreaker_fla {
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public dynamic class timedunlockcontent_6 extends MovieClip {
public var __setPropDict:Dictionary;
public var timeAndDate:TextField;
public var title1:NumbskullFont;
public function timedunlockcontent_6(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 10, frame11, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
title1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
title1.align = "center";
title1.align_vert = "center";
title1.color = 9085911;
title1.id = "None";
title1.line_spacing = 18;
title1.text = "HOw about this?";
title1.tracking = 0;
try {
title1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
stop();
}
function frame4(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[title1] == undefined)) || (!((((int(__setPropDict[title1]) >= 1)) && ((int(__setPropDict[title1]) <= 10))))))){
__setPropDict[title1] = currentFrame;
();
};
}
function frame11(){
stop();
}
}
}//package Icebreaker_fla
Section 214
//vikingAtEnd_81 (Icebreaker_fla.vikingAtEnd_81)
package Icebreaker_fla {
import flash.display.*;
public dynamic class vikingAtEnd_81 extends MovieClip {
public function vikingAtEnd_81(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 215
//wolfratDying_82 (Icebreaker_fla.wolfratDying_82)
package Icebreaker_fla {
import flash.display.*;
public dynamic class wolfratDying_82 extends MovieClip {
public function wolfratDying_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Icebreaker_fla
Section 216
//ArrowCursor (ArrowCursor)
package {
import flash.display.*;
public dynamic class ArrowCursor extends MovieClip {
}
}//package
Section 217
//BouncyBlockTexture (BouncyBlockTexture)
package {
import flash.display.*;
public dynamic class BouncyBlockTexture extends BitmapData {
public function BouncyBlockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 218
//BuoyantBlockTexture (BuoyantBlockTexture)
package {
import flash.display.*;
public dynamic class BuoyantBlockTexture extends BitmapData {
public function BuoyantBlockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 219
//ClearButton (ClearButton)
package {
import com.nitrome.highscore.*;
import flash.utils.*;
public dynamic class ClearButton extends ClearButton {
public var __setPropDict:Dictionary;
public var __id13_:NumbskullFont;
public function ClearButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function
(){
try {
__id13_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id13_.align = "center";
__id13_.align_vert = "top";
__id13_.color = 11977954;
__id13_.id = "None";
__id13_.line_spacing = 18;
__id13_.text = "clear";
__id13_.tracking = 0;
try {
__id13_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame5(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 1)) && ((int(__setPropDict[__id13_]) <= 10))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 11)) && ((int(__setPropDict[__id13_]) <= 20))))))){
__setPropDict[__id13_] = currentFrame;
();
};
}
function (){
try {
__id13_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id13_.align = "center";
__id13_.align_vert = "top";
__id13_.color = 2574473;
__id13_.id = "None";
__id13_.line_spacing = 18;
__id13_.text = "clear";
__id13_.tracking = 0;
try {
__id13_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 220
//DeathBlockTexture (DeathBlockTexture)
package {
import flash.display.*;
public dynamic class DeathBlockTexture extends BitmapData {
public function DeathBlockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 221
//ForceBlockForceMC (ForceBlockForceMC)
package {
import flash.display.*;
public dynamic class ForceBlockForceMC extends MovieClip {
public function ForceBlockForceMC(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package
Section 222
//ForceBlockTexture (ForceBlockTexture)
package {
import flash.display.*;
public dynamic class ForceBlockTexture extends BitmapData {
public function ForceBlockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 223
//GameMusic (GameMusic)
package {
import flash.media.*;
public dynamic class GameMusic extends Sound {
}
}//package
Section 224
//GloveLinkEnd (GloveLinkEnd)
package {
import flash.display.*;
public dynamic class GloveLinkEnd extends MovieClip {
public function GloveLinkEnd(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package
Section 225
//GloveLinkMid (GloveLinkMid)
package {
import flash.display.*;
public dynamic class GloveLinkMid extends MovieClip {
public var ropeMask:MovieClip;
}
}//package
Section 226
//GloveReachingOut (GloveReachingOut)
package {
import flash.display.*;
public dynamic class GloveReachingOut extends MovieClip {
public var glove:MovieClip;
}
}//package
Section 227
//HammerImpact (HammerImpact)
package {
import flash.display.*;
public dynamic class HammerImpact extends MovieClip {
public function HammerImpact(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package
Section 228
//HighScoreBoard (HighScoreBoard)
package {
import com.nitrome.highscore.*;
public dynamic class HighScoreBoard extends HighScoreBoard {
}
}//package
Section 229
//IceTexture (IceTexture)
package {
import flash.display.*;
public dynamic class IceTexture extends BitmapData {
public function IceTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 230
//JoinBlockTexture (JoinBlockTexture)
package {
import flash.display.*;
public dynamic class JoinBlockTexture extends BitmapData {
public function JoinBlockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 231
//LetterButton (LetterButton)
package {
import com.nitrome.highscore.*;
public dynamic class LetterButton extends LetterButton {
public function LetterButton(){
addFrameScript(0, frame1);
();
}
function frame1(){
stop();
}
function
(){
try {
_letter["componentInspectorSetting"] = true;
} catch(e:Error) {
};
_letter.align = "center";
_letter.align_vert = "center";
_letter.color = 11977954;
_letter.id = "None";
_letter.line_spacing = 18;
_letter.text = "a";
_letter.tracking = 0;
try {
_letter["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 232
//MenuMusic (MenuMusic)
package {
import flash.media.*;
public dynamic class MenuMusic extends Sound {
}
}//package
Section 233
//NextArrow (NextArrow)
package {
import com.nitrome.highscore.*;
import flash.utils.*;
public dynamic class NextArrow extends ArrowButton {
public var __setPropDict:Dictionary;
public var __id14_:NumbskullFont;
public function NextArrow(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function (){
try {
__id14_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id14_.align = "center";
__id14_.align_vert = "top";
__id14_.color = 2574473;
__id14_.id = "None";
__id14_.line_spacing = 18;
__id14_.text = "next";
__id14_.tracking = 0;
try {
__id14_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 1)) && ((int(__setPropDict[__id14_]) <= 10))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id14_] == undefined)) || (!((((int(__setPropDict[__id14_]) >= 11)) && ((int(__setPropDict[__id14_]) <= 20))))))){
__setPropDict[__id14_] = currentFrame;
();
};
}
function (){
try {
__id14_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id14_.align = "center";
__id14_.align_vert = "top";
__id14_.color = 11977954;
__id14_.id = "None";
__id14_.line_spacing = 18;
__id14_.text = "next";
__id14_.tracking = 0;
try {
__id14_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 234
//NitromeGame (NitromeGame)
package {
import flash.display.*;
import flash.net.*;
import com.nitrome.util.*;
import com.nitrome.game.*;
public class NitromeGame {
public static const ATRATIVA_URL:Array = ["http://atrativa.com.br/", "http://*.atrativa.com.br/"];
public static const NITROME_URL:Array = ["http://www.nitrome.com/", "http://nitrome.com", "http://cdn.nitrome.com/"];
public static const CANDYSTAND_URL:Array = ["http://www.candystand.com/", "http://candystand.com/"];
public static const SUBMIT_URL:String = "http://www.nitrome.com/php/submit_score.php";
public static const ARMOR_URL:Array = ["http://www.armorgames.com/", "http://armorgames.com/", "http://*.armorgames.com/"];
public static const MINICLIP_URL:Array = ["http://www.miniclip.com/", "http://miniclip.com/"];
public static const RETRIEVE_URL:String = "http://www.nitrome.com/php/retrieve_scores.php";
private static var _level_id:String;
private static var _leading_zero:Boolean = false;
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", "-");
private static var adj:Number = 1.75;
private static var _total_levels:int;
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-";
public static var transition:Transition;
private static var _time_based:Boolean = false;
public static var sound_manager:SoundManager;
private static var _selected_level:int = 1;
public static function getSharedObject(_arg1:int=1):SharedObject{
var _local2:String;
_local2 = (("so_" + _game_id) + _arg1);
return (SharedObject.getLocal(_local2));
}
public static function setLastSavedScore(_arg1:int, _arg2:int=1):void{
var _local3:SharedObject;
_local3 = getSharedObject(_arg2);
_local3.data.last_saved_score = _arg1;
_local3.flush();
_local3.close();
}
public static function lockAllLevels(_arg1:int=1):void{
var _local2:SharedObject;
_local2 = getSharedObject(_arg1);
_local2.data.levels_unlocked = [1];
_local2.flush();
_local2.close();
}
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:SharedObject;
var _local3:Array;
var _local4:int;
_local2 = getSharedObject(_arg1);
_local3 = [];
_local4 = 0;
while (_local4 < total_levels) {
_local3[_local4] = 1;
_local4++;
};
_local2.data.levels_unlocked = _local3;
_local2.flush();
_local2.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();
TimedUnlock.check(1);
}
public static function set time_based(_arg1:Boolean):void{
_time_based = _arg1;
}
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);
}
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 getLevelCompleted(_arg1:int, _arg2:int=1):Boolean{
var _local3:SharedObject;
var _local4:Boolean;
_local3 = getSharedObject(_arg2);
_local4 = false;
if (_local3.data.levels_completed){
_local4 = Boolean(_local3.data.levels_completed[(_arg1 - 1)]);
};
_local3.close();
return (_local4);
}
public static function get music():Boolean{
var _local1:String;
var _local2:SharedObject;
var _local3:Boolean;
_local1 = ("so_" + game_id);
_local2 = SharedObject.getLocal(_local1);
_local3 = true;
if (_local2.data.musicon != undefined){
_local3 = _local2.data.musicon;
};
_local2.close();
return (_local3);
}
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);
}
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 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 level_id():String{
return (_level_id);
}
public static function setLevelCompleted(_arg1:int, _arg2:int=1):void{
var _local3:SharedObject;
_local3 = getSharedObject(_arg2);
if (!_local3.data.levels_completed){
_local3.data.levels_completed = [];
};
_local3.data.levels_completed[(_arg1 - 1)] = 1;
_local3.flush();
_local3.close();
}
public static function get sfx():Boolean{
var _local1:String;
var _local2:SharedObject;
var _local3:Boolean;
_local1 = ("so_" + game_id);
_local2 = SharedObject.getLocal(_local1);
_local3 = true;
if (_local2.data.sfxon != undefined){
_local3 = _local2.data.sfxon;
};
_local2.close();
return (_local3);
}
public static function get edgeScrolling():Boolean{
var _local1:String;
var _local2:SharedObject;
var _local3:Boolean;
_local1 = ("so_" + _game_id);
_local2 = SharedObject.getLocal(_local1);
_local3 = true;
if (_local2.data.edgescrollon != undefined){
_local3 = _local2.data.edgescrollon;
};
_local2.close();
return (_local3);
}
public static function set edgeScrolling(_arg1:Boolean):void{
var _local2:String;
var _local3:SharedObject;
_local2 = ("so_" + _game_id);
_local3 = SharedObject.getLocal(_local2);
_local3.data.edgescrollon = _arg1;
_local3.flush();
_local3.close();
}
public static function setLevelUnlocked(_arg1:int, _arg2:int=1):void{
var _local3:SharedObject;
_local3 = getSharedObject(_arg2);
if (!_local3.data.levels_unlocked){
_local3.data.levels_unlocked = [1];
};
_local3.data.levels_unlocked[(_arg1 - 1)] = 1;
_local3.flush();
_local3.close();
}
public static function get total_levels():int{
return (_total_levels);
}
public static function isAtURL(... _args):Boolean{
var _local2:int;
var _local3:Array;
var _local4:int;
var _local5:String;
if (_args.length == 0){
_args.push(NITROME_URL);
};
_local2 = 0;
while (_local2 < _args.length) {
_local3 = _args[_local2];
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = _local3[_local4];
if (compareURLTo(_local5)){
return (true);
};
_local4++;
};
_local2++;
};
return (false);
}
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);
}
public static function set selected_level(_arg1:int):void{
_selected_level = _arg1;
}
public static function get leading_zero():Boolean{
return (_leading_zero);
}
public static function getTotalScore(_arg1:int=1):int{
var _local2:SharedObject;
var _local3:Number;
var _local4:int;
var _local5:Number;
_local2 = getSharedObject(_arg1);
_local3 = 0;
if (_local2.data.level_scores){
_local4 = 1;
while (_local4 < _total_levels) {
_local5 = 0;
if (_local2.data.level_scores[_local4]){
_local5 = Number(_local2.data.level_scores[_local4]);
if (isNaN(_local5)){
_local5 = 0;
};
};
_local3 = (_local3 + _local5);
_local4++;
};
};
_local2.close();
return (_local3);
}
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 time_based():Boolean{
return (_time_based);
}
public static function getLevelScore(_arg1:int, _arg2:int=1):int{
var _local3:SharedObject;
var _local4:Number;
_local3 = getSharedObject(_arg2);
_local4 = 0;
if (_local3.data.level_scores){
if (_local3.data.level_scores[_arg1]){
_local4 = Number(_local3.data.level_scores[_arg1]);
if (isNaN(_local4)){
_local4 = 0;
};
};
};
_local3.close();
return (_local4);
}
private static function compareURLTo(_arg1:String):Boolean{
var _local2:String;
var _local3:String;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:Number;
var _local8:String;
var _local9:String;
_local2 = "http://";
if (url.substr(0, _local2.length) != _local2){
return (false);
};
_local3 = url.substr(_local2.length);
_arg1 = _arg1.substr(_local2.length);
while (_local3.charAt(0) == "/") {
_local3 = _local3.substr(1);
};
while (_arg1.charAt(0) == "/") {
_arg1 = _arg1.substr(1);
};
_local4 = _local3.split("/");
_local5 = _arg1.split("/");
_local6 = 0;
while (_local6 < _local5.length) {
if (_local5[_local6].length < 1){
} else {
_local7 = _local5[_local6].indexOf("*");
if (_local7 != -1){
_local8 = _local5[_local6].substr(0, _local7);
_local9 = _local5[_local6].substr((_local7 + 1));
if (_local4[_local6].substr(0, _local8.length) != _local8){
return (false);
};
if (_local4[_local6].substr(-(_local9.length)) != _local9){
return (false);
};
} else {
if (_local5[_local6] != _local4[_local6]){
return (false);
};
};
};
_local6++;
};
return (true);
}
public static function getLevelUnlocked(_arg1:int, _arg2:int=1):Boolean{
var _local3:SharedObject;
var _local4:Boolean;
if (_arg1 == 1){
return (true);
};
_local3 = getSharedObject(_arg2);
_local4 = false;
if (_local3.data.levels_unlocked){
_local4 = Boolean(_local3.data.levels_unlocked[(_arg1 - 1)]);
};
_local3.close();
return (_local4);
}
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 setLevelLocked(_arg1:int, _arg2:int=1):void{
var _local3:SharedObject;
_local3 = getSharedObject(_arg2);
if (_local3.data.levels_unlocked){
_local3.data.levels_unlocked[(_arg1 - 1)] = 0;
};
_local3.flush();
_local3.close();
}
public static function get selected_level():int{
return (_selected_level);
}
public static function setLevelScore(_arg1:int, _arg2:int, _arg3:int=1):void{
var _local4:SharedObject;
_local4 = getSharedObject(_arg3);
if (!_local4.data.level_scores){
_local4.data.level_scores = [];
};
_local4.data.level_scores[_arg2] = _arg1;
_local4.flush();
_local4.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:SharedObject;
var _local3:Number;
_local2 = getSharedObject(_arg1);
_local3 = Number(_local2.data.last_saved_score);
if (isNaN(_local3)){
_local3 = 0;
};
_local2.close();
return (_local3);
}
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 235
//NumbskullFont (NumbskullFont)
package {
import com.nitrome.game.*;
public dynamic class NumbskullFont extends TemplateFont {
}
}//package
Section 236
//PinnableBlockTexture (PinnableBlockTexture)
package {
import flash.display.*;
public dynamic class PinnableBlockTexture extends BitmapData {
public function PinnableBlockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 237
//PrevArrow (PrevArrow)
package {
import com.nitrome.highscore.*;
import flash.utils.*;
public dynamic class PrevArrow extends ArrowButton {
public var __setPropDict:Dictionary;
public var __id15_:NumbskullFont;
public function PrevArrow(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function (){
try {
__id15_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id15_.align = "center";
__id15_.align_vert = "top";
__id15_.color = 2574473;
__id15_.id = "None";
__id15_.line_spacing = 18;
__id15_.text = "prev";
__id15_.tracking = 0;
try {
__id15_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame3(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function (){
try {
__id15_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id15_.align = "center";
__id15_.align_vert = "top";
__id15_.color = 11977954;
__id15_.id = "None";
__id15_.line_spacing = 18;
__id15_.text = "prev";
__id15_.tracking = 0;
try {
__id15_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame4(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 1)) && ((int(__setPropDict[__id15_]) <= 10))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id15_] == undefined)) || (!((((int(__setPropDict[__id15_]) >= 11)) && ((int(__setPropDict[__id15_]) <= 20))))))){
__setPropDict[__id15_] = currentFrame;
();
};
}
}
}//package
Section 238
//RailPinRail (RailPinRail)
package {
import flash.display.*;
public dynamic class RailPinRail extends BitmapData {
public function RailPinRail(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 239
//RailPinRailEnd (RailPinRailEnd)
package {
import flash.display.*;
public dynamic class RailPinRailEnd extends BitmapData {
public function RailPinRailEnd(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 240
//RailPinRailJoint (RailPinRailJoint)
package {
import flash.display.*;
public dynamic class RailPinRailJoint extends BitmapData {
public function RailPinRailJoint(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 241
//RockTexture (RockTexture)
package {
import flash.display.*;
public dynamic class RockTexture extends BitmapData {
public function RockTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 242
//ScoreLine (ScoreLine)
package {
import com.nitrome.highscore.*;
public dynamic class ScoreLine extends HighScoreLine {
}
}//package
Section 243
//ScoreSubmitPanel (ScoreSubmitPanel)
package {
import com.nitrome.highscore.*;
import flash.utils.*;
public dynamic class ScoreSubmitPanel extends ScoreSubmitPanel {
public var __setPropDict:Dictionary;
public function ScoreSubmitPanel(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function
(){
try {
_score_text["componentInspectorSetting"] = true;
} catch(e:Error) {
};
_score_text.align = "center";
_score_text.align_vert = "center";
_score_text.color = 11977954;
_score_text.id = "None";
_score_text.line_spacing = 18;
_score_text.text = "your score is ";
_score_text.tracking = 0;
try {
_score_text["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
_name_text["componentInspectorSetting"] = true;
} catch(e:Error) {
};
_name_text.align = "center";
_name_text.align_vert = "center";
_name_text.color = 11977954;
_name_text.id = "None";
_name_text.line_spacing = 18;
_name_text.text = "";
_name_text.tracking = 0;
try {
_name_text["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
stop();
}
function frame5(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
function frame10(){
if ((((__setPropDict[_score_text] == undefined)) || (!((((int(__setPropDict[_score_text]) >= 1)) && ((int(__setPropDict[_score_text]) <= 10))))))){
__setPropDict[_score_text] = currentFrame;
();
};
if ((((__setPropDict[_name_text] == undefined)) || (!((((int(__setPropDict[_name_text]) >= 1)) && ((int(__setPropDict[_name_text]) <= 10))))))){
__setPropDict[_name_text] = currentFrame;
();
};
}
}
}//package
Section 244
//SubmitButton (SubmitButton)
package {
import com.nitrome.highscore.*;
import flash.utils.*;
public dynamic class SubmitButton extends SubmitButton {
public var __setPropDict:Dictionary;
public var __id12_:NumbskullFont;
public function SubmitButton(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function (){
try {
__id12_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id12_.align = "center";
__id12_.align_vert = "top";
__id12_.color = 11977954;
__id12_.id = "None";
__id12_.line_spacing = 18;
__id12_.text = "submit";
__id12_.tracking = 0;
try {
__id12_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function (){
try {
__id12_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id12_.align = "center";
__id12_.align_vert = "top";
__id12_.color = 2574473;
__id12_.id = "None";
__id12_.line_spacing = 18;
__id12_.text = "submit";
__id12_.tracking = 0;
try {
__id12_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame10(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame14(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame12(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame18(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame3(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame15(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame16(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame17(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame19(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame6(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame13(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame4(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame9(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame1(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame2(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame5(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame7(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame20(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame11(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 11)) && ((int(__setPropDict[__id12_]) <= 20))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
function frame8(){
if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 1)) && ((int(__setPropDict[__id12_]) <= 10))))))){
__setPropDict[__id12_] = currentFrame;
();
};
}
}
}//package
Section 245
//Text_None_0 (Text_None_0)
package {
import flash.display.*;
public dynamic class Text_None_0 extends Sprite {
}
}//package
Section 246
//Text_None_1 (Text_None_1)
package {
import flash.display.*;
public dynamic class Text_None_1 extends Sprite {
}
}//package
Section 247
//Text_None_2 (Text_None_2)
package {
import flash.display.*;
public dynamic class Text_None_2 extends Sprite {
}
}//package
Section 248
//Text_None_3 (Text_None_3)
package {
import flash.display.*;
public dynamic class Text_None_3 extends Sprite {
}
}//package
Section 249
//Text_None_4 (Text_None_4)
package {
import flash.display.*;
public dynamic class Text_None_4 extends Sprite {
}
}//package
Section 250
//Text_None_5 (Text_None_5)
package {
import flash.display.*;
public dynamic class Text_None_5 extends Sprite {
}
}//package
Section 251
//Text_None_6 (Text_None_6)
package {
import flash.display.*;
public dynamic class Text_None_6 extends Sprite {
}
}//package
Section 252
//Text_None_7 (Text_None_7)
package {
import flash.display.*;
public dynamic class Text_None_7 extends Sprite {
}
}//package
Section 253
//Text_None_8 (Text_None_8)
package {
import flash.display.*;
public dynamic class Text_None_8 extends Sprite {
}
}//package
Section 254
//Text_None_9 (Text_None_9)
package {
import flash.display.*;
public dynamic class Text_None_9 extends Sprite {
}
}//package
Section 255
//Text_None_A (Text_None_A)
package {
import flash.display.*;
public dynamic class Text_None_A extends Sprite {
}
}//package
Section 256
//Text_None_APOSTROPHE (Text_None_APOSTROPHE)
package {
import flash.display.*;
public dynamic class Text_None_APOSTROPHE extends Sprite {
}
}//package
Section 257
//Text_None_B (Text_None_B)
package {
import flash.display.*;
public dynamic class Text_None_B extends Sprite {
}
}//package
Section 258
//Text_None_C (Text_None_C)
package {
import flash.display.*;
public dynamic class Text_None_C extends Sprite {
}
}//package
Section 259
//Text_None_COLON (Text_None_COLON)
package {
import flash.display.*;
public dynamic class Text_None_COLON extends Sprite {
}
}//package
Section 260
//Text_None_COMMA (Text_None_COMMA)
package {
import flash.display.*;
public dynamic class Text_None_COMMA extends Sprite {
}
}//package
Section 261
//Text_None_D (Text_None_D)
package {
import flash.display.*;
public dynamic class Text_None_D extends Sprite {
}
}//package
Section 262
//Text_None_E (Text_None_E)
package {
import flash.display.*;
public dynamic class Text_None_E extends Sprite {
}
}//package
Section 263
//Text_None_EXCLAMATION (Text_None_EXCLAMATION)
package {
import flash.display.*;
public dynamic class Text_None_EXCLAMATION extends Sprite {
}
}//package
Section 264
//Text_None_F (Text_None_F)
package {
import flash.display.*;
public dynamic class Text_None_F extends Sprite {
}
}//package
Section 265
//Text_None_FORWARDSLASH (Text_None_FORWARDSLASH)
package {
import flash.display.*;
public dynamic class Text_None_FORWARDSLASH extends Sprite {
}
}//package
Section 266
//Text_None_G (Text_None_G)
package {
import flash.display.*;
public dynamic class Text_None_G extends Sprite {
}
}//package
Section 267
//Text_None_H (Text_None_H)
package {
import flash.display.*;
public dynamic class Text_None_H extends Sprite {
}
}//package
Section 268
//Text_None_HYPHEN (Text_None_HYPHEN)
package {
import flash.display.*;
public dynamic class Text_None_HYPHEN extends Sprite {
}
}//package
Section 269
//Text_None_I (Text_None_I)
package {
import flash.display.*;
public dynamic class Text_None_I extends Sprite {
}
}//package
Section 270
//Text_None_J (Text_None_J)
package {
import flash.display.*;
public dynamic class Text_None_J extends Sprite {
}
}//package
Section 271
//Text_None_K (Text_None_K)
package {
import flash.display.*;
public dynamic class Text_None_K extends Sprite {
}
}//package
Section 272
//Text_None_L (Text_None_L)
package {
import flash.display.*;
public dynamic class Text_None_L extends Sprite {
}
}//package
Section 273
//Text_None_M (Text_None_M)
package {
import flash.display.*;
public dynamic class Text_None_M extends Sprite {
}
}//package
Section 274
//Text_None_N (Text_None_N)
package {
import flash.display.*;
public dynamic class Text_None_N extends Sprite {
}
}//package
Section 275
//Text_None_O (Text_None_O)
package {
import flash.display.*;
public dynamic class Text_None_O extends Sprite {
}
}//package
Section 276
//Text_None_P (Text_None_P)
package {
import flash.display.*;
public dynamic class Text_None_P extends Sprite {
}
}//package
Section 277
//Text_None_Q (Text_None_Q)
package {
import flash.display.*;
public dynamic class Text_None_Q extends Sprite {
}
}//package
Section 278
//Text_None_QUESTION (Text_None_QUESTION)
package {
import flash.display.*;
public dynamic class Text_None_QUESTION extends Sprite {
}
}//package
Section 279
//Text_None_R (Text_None_R)
package {
import flash.display.*;
public dynamic class Text_None_R extends Sprite {
}
}//package
Section 280
//Text_None_S (Text_None_S)
package {
import flash.display.*;
public dynamic class Text_None_S extends Sprite {
}
}//package
Section 281
//Text_None_SPACE (Text_None_SPACE)
package {
import flash.display.*;
public dynamic class Text_None_SPACE extends MovieClip {
}
}//package
Section 282
//Text_None_STOP (Text_None_STOP)
package {
import flash.display.*;
public dynamic class Text_None_STOP extends Sprite {
}
}//package
Section 283
//Text_None_T (Text_None_T)
package {
import flash.display.*;
public dynamic class Text_None_T extends Sprite {
}
}//package
Section 284
//Text_None_U (Text_None_U)
package {
import flash.display.*;
public dynamic class Text_None_U extends Sprite {
}
}//package
Section 285
//Text_None_V (Text_None_V)
package {
import flash.display.*;
public dynamic class Text_None_V extends Sprite {
}
}//package
Section 286
//Text_None_W (Text_None_W)
package {
import flash.display.*;
public dynamic class Text_None_W extends Sprite {
}
}//package
Section 287
//Text_None_X (Text_None_X)
package {
import flash.display.*;
public dynamic class Text_None_X extends Sprite {
}
}//package
Section 288
//Text_None_Y (Text_None_Y)
package {
import flash.display.*;
public dynamic class Text_None_Y extends Sprite {
}
}//package
Section 289
//Text_None_Z (Text_None_Z)
package {
import flash.display.*;
public dynamic class Text_None_Z extends Sprite {
}
}//package
Section 290
//WoodTexture (WoodTexture)
package {
import flash.display.*;
public dynamic class WoodTexture extends BitmapData {
public function WoodTexture(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package