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 GetLocalPosition():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 GetRadius():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 SetAsOrientedBox(_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 m_vertices:Array;
public var m_normals:Array;
private var s_supportVec:b2Vec2;
public var m_obb:b2OBB;
public var m_coreVertices:Array;
public var m_centroid:b2Vec2;
public var m_vertexCount: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;
s_supportVec = new b2Vec2();
m_obb = new b2OBB();
m_vertices = new Array(b2Settings.b2_maxPolygonVertices);
m_normals = new Array(b2Settings.b2_maxPolygonVertices);
m_coreVertices = new Array(b2Settings.b2_maxPolygonVertices);
super(_arg1);
m_type = e_polygonShape;
_local2 = (_arg1 as b2PolygonDef);
m_vertexCount = _local2.vertexCount;
_local4 = _local3;
_local5 = _local3;
_local3 = 0;
while (_local3 < m_vertexCount) {
m_vertices[_local3] = _local2.vertices[_local3].Copy();
_local3++;
};
_local3 = 0;
while (_local3 < m_vertexCount) {
_local4 = _local3;
_local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0;
_local6 = (m_vertices[_local5].x - m_vertices[_local4].x);
_local7 = (m_vertices[_local5].y - m_vertices[_local4].y);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
m_normals[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8));
_local3++;
};
m_centroid = ComputeCentroid(_local2.vertices, _local2.vertexCount);
ComputeOBB(m_obb, m_vertices, m_vertexCount);
_local3 = 0;
while (_local3 < m_vertexCount) {
_local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (m_vertexCount - 1);
_local5 = _local3;
_local9 = m_normals[_local4].x;
_local10 = m_normals[_local4].y;
_local11 = m_normals[_local5].x;
_local12 = m_normals[_local5].y;
_local13 = (m_vertices[_local3].x - m_centroid.x);
_local14 = (m_vertices[_local3].y - m_centroid.y);
_local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop);
_local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop);
_local17 = (1 / ((_local9 * _local12) - (_local10 * _local11)));
m_coreVertices[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + m_centroid.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + m_centroid.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 < m_vertexCount) {
_local3 = m_vertices[_local9];
_local5 = (_local7 - _local3.x);
_local6 = (_local8 - _local3.y);
_local3 = m_normals[_local9];
_local10 = ((_local3.x * _local5) + (_local3.y * _local6));
if (_local10 > 0){
return (false);
};
_local9++;
};
return (true);
}
public function GetCoreVertices():Array{
return (m_coreVertices);
}
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 < m_vertexCount) {
_local11 = m_vertices[_local19];
_local8 = (_local11.x - _local12);
_local9 = (_local11.y - _local13);
_local11 = m_normals[_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 = m_normals[_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 GetCentroid():b2Vec2{
return (m_centroid);
}
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 < m_vertexCount) {
_local10 = m_vertices[_local9];
_local11 = (((_local9 + 1) < m_vertexCount)) ? m_vertices[int((_local9 + 1))] : m_vertices[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 = m_coreVertices[0];
_local9 = ((_local4.x * _local6) + (_local4.y * _local7));
_local10 = 1;
while (_local10 < m_vertexCount) {
_local4 = m_coreVertices[_local10];
_local11 = ((_local4.x * _local6) + (_local4.y * _local7));
if (_local11 > _local9){
_local8 = _local10;
_local9 = _local11;
};
_local10++;
};
_local5 = _arg1.R;
_local4 = m_coreVertices[_local8];
s_supportVec.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y)));
s_supportVec.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y)));
return (s_supportVec);
}
public function GetVertexCount():int{
return (m_vertexCount);
}
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 (m_vertices);
}
public function GetNormals():Array{
return (m_normals);
}
public function GetOBB():b2OBB{
return (m_obb);
}
public function GetFirstVertex(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1, m_coreVertices[0]));
}
public function Centroid(_arg1:b2XForm):b2Vec2{
return (b2Math.b2MulX(_arg1, m_centroid));
}
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 < m_vertexCount) {
_local2 = m_coreVertices[_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 = m_obb.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 = m_obb.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 = m_obb.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 = m_obb.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 m_filter:b2FilterData;
public var m_friction:Number;
public var m_next:b2Shape;
public var m_restitution:Number;
public var m_userData;
public var m_isSensor:Boolean;
public var m_proxyId: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;
m_proxyId = b2Pair.b2_nullProxy;
m_filter = _arg1.filter.Copy();
m_isSensor = _arg1.isSensor;
}
public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{
return (false);
}
public function GetSweepRadius():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 GetRestitution():Number{
return (m_restitution);
}
public function GetFriction():Number{
return (m_friction);
}
public function GetFilterData():b2FilterData{
return (m_filter.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 (m_proxyId == b2Pair.b2_nullProxy){
return;
};
_arg1.DestroyProxy(m_proxyId);
_local3 = s_resetAABB;
ComputeAABB(_local3, _arg2);
_local4 = _arg1.InRange(_local3);
if (_local4){
m_proxyId = _arg1.CreateProxy(_local3, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
}
public function SetFilterData(_arg1:b2FilterData):void{
m_filter = _arg1.Copy();
}
public function GetUserData(){
return (m_userData);
}
public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{
var _local4:b2AABB;
if (m_proxyId == b2Pair.b2_nullProxy){
return (false);
};
_local4 = s_syncAABB;
ComputeSweptAABB(_local4, _arg2, _arg3);
if (_arg1.InRange(_local4)){
_arg1.MoveProxy(m_proxyId, _local4);
return (true);
};
return (false);
}
public function ComputeMass(_arg1:b2MassData):void{
}
public function IsSensor():Boolean{
return (m_isSensor);
}
public function DestroyProxy(_arg1:b2BroadPhase):void{
if (m_proxyId != b2Pair.b2_nullProxy){
_arg1.DestroyProxy(m_proxyId);
m_proxyId = 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){
m_proxyId = _arg1.CreateProxy(_local3, this);
} else {
m_proxyId = 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 isSensor:Boolean;// = false
public var density:Number;// = 0
public var type:int;// = -1
public var restitution:Number;// = 0
public var userData;// = null
public var filter:b2FilterData;
public var friction:Number;// = 0.2
public function b2ShapeDef(){
type = b2Shape.e_unknownShape;
userData = null;
friction = 0.2;
restitution = 0;
density = 0;
isSensor = false;
filter = 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 m_freeProxy:uint;
public var m_proxyCount:int;
public var m_proxyPool:Array;
public var m_queryResultCount:int;
public var m_pairManager:b2PairManager;
public var m_timeStamp:uint;
public var m_queryResults: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));
m_queryResults = 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) {
m_queryResults[_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;
m_freeProxy = 0;
m_timeStamp = 1;
m_queryResultCount = 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();
ComputeBounds(_local4, _local5, _arg1);
_local8 = [_local6];
_local9 = [_local7];
Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0);
Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1);
_local10 = 0;
_local11 = 0;
while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) {
_local12 = m_proxyPool[m_queryResults[_local11]];
_arg2[_local11] = _local12.userData;
_local11++;
_local10++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local10);
}
public function Commit():void{
m_pairManager.Commit();
}
public function GetProxy(_arg1:int):b2Proxy{
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){
return (null);
};
return (_local2);
}
private function IncrementTimeStamp():void{
var _local1:uint;
if (m_timeStamp == b2Settings.USHRT_MAX){
_local1 = 0;
while (_local1 < b2Settings.b2_maxProxies) {
(m_proxyPool[_local1] as b2Proxy).timeStamp = 0;
_local1++;
};
m_timeStamp = 1;
} else {
m_timeStamp++;
};
}
private function Query(_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()){
IncrementOverlapCount(_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]){
IncrementOverlapCount(_local10.proxyId);
_local13--;
};
};
_local12--;
};
};
_arg1[0] = _local8;
_arg2[0] = _local9;
}
private function TestOverlapValidate(_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 ComputeBounds(_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 = m_freeProxy;
_local4 = m_proxyPool[_local5];
m_freeProxy = _local4.GetNext();
_local4.overlapCount = 0;
_local4.userData = _arg2;
_local6 = (2 * m_proxyCount);
_local7 = new Array();
_local8 = new Array();
ComputeBounds(_local7, _local8, _arg1);
_local9 = 0;
while (_local9 < 2) {
_local11 = m_bounds[_local9];
_local14 = [_local12];
_local15 = [_local13];
Query(_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_queryResultCount) {
m_pairManager.AddBufferedPair(_local5, m_queryResults[_local10]);
_local10++;
};
m_pairManager.Commit();
m_queryResultCount = 0;
IncrementTimeStamp();
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++;
};
Query([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6);
_local6++;
};
_local7 = 0;
while (_local7 < m_queryResultCount) {
m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local7]);
_local7++;
};
m_pairManager.Commit();
m_queryResultCount = 0;
IncrementTimeStamp();
_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(m_freeProxy);
m_freeProxy = _arg1;
m_proxyCount--;
}
public function TestOverlap(_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 IncrementOverlapCount(_arg1:uint):void{
var _local2:b2Proxy;
_local2 = m_proxyPool[_arg1];
if (_local2.timeStamp < m_timeStamp){
_local2.timeStamp = m_timeStamp;
_local2.overlapCount = 1;
} else {
_local2.overlapCount = 2;
m_queryResults[m_queryResultCount] = _arg1;
m_queryResultCount++;
};
}
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();
ComputeBounds(_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 (TestOverlap(_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 (TestOverlap(_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 (TestOverlap(_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 (TestOverlap(_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.m_vertexCount;
_local7 = _arg1.m_vertices;
_local8 = _arg1.m_normals;
_local9 = _arg4.m_vertexCount;
_local10 = _arg4.m_vertices;
_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.m_vertexCount;
_local8 = _arg2.m_normals;
_local9 = _arg5.m_vertexCount;
_local10 = _arg5.m_vertices;
_local11 = _arg5.m_normals;
_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.features.referenceEdge = _arg4;
_local20.id.features.incidentEdge = _local21;
_local20.id.features.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.features.referenceEdge = _arg4;
_local20.id.features.incidentEdge = _local22;
_local20.id.features.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.m_vertexCount;
_local23 = _local13.m_vertices;
_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.features.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.m_vertexCount;
_local7 = _arg2.m_normals;
_local9 = _arg5.R;
_local8 = _arg4.m_centroid;
_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.m_centroid;
_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.m_vertexCount;
_local22 = _arg2.m_vertices;
_local23 = _arg2.m_normals;
_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.features.incidentEdge = _local18;
_local6.id.features.incidentVertex = b2_nullFeature;
_local6.id.features.referenceEdge = 0;
_local6.id.features.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.features.incidentEdge = b2_nullFeature;
_local6.id.features.incidentVertex = _local25;
} else {
if (_local31 >= _local30){
_local32 = _local27.x;
_local33 = _local27.y;
_local6.id.features.incidentEdge = b2_nullFeature;
_local6.id.features.incidentVertex = _local26;
} else {
_local32 = ((_local28 * _local31) + _local11.x);
_local33 = ((_local29 * _local31) + _local11.y);
_local6.id.features.incidentEdge = _local18;
_local6.id.features.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.features.referenceEdge = 0;
_local6.id.features.flip = 0;
}
}
}//package Box2D.Collision
Section 15
//b2ContactID (Box2D.Collision.b2ContactID)
package Box2D.Collision {
public class b2ContactID {
public var _key:uint;
public var features:Features;
public function b2ContactID(){
features = new Features();
super();
features._m_id = 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;
features._referenceEdge = (_key & 0xFF);
features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF);
features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF);
features._flip = (((_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 m_pairBuffer:Array;
public var m_callback:b2PairCallback;
public var m_pairs:Array;
public var m_pairBufferCount:int;
public var m_hashTable:Array;
public var m_broadPhase:b2BroadPhase;
public var m_freePair: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++;
};
m_pairBuffer = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_pairBuffer[_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;
m_pairBufferCount = 0;
}
private function FindHash(_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 Find(_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 (FindHash(_arg1, _arg2, _local3));
}
private function ValidateBuffer():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 < m_pairBufferCount) {
_local1 = m_pairBuffer[_local2];
_local5 = Find(_local1.proxyId1, _local1.proxyId2);
_local5.ClearBuffered();
_local6 = _local4[_local5.proxyId1];
_local7 = _local4[_local5.proxyId2];
if (_local5.IsRemoved()){
if (_local5.IsFinal() == true){
m_callback.PairRemoved(_local6.userData, _local7.userData, _local5.userData);
};
_local1 = m_pairBuffer[_local3];
_local1.proxyId1 = _local5.proxyId1;
_local1.proxyId2 = _local5.proxyId2;
_local3++;
} else {
if (_local5.IsFinal() == false){
_local5.userData = m_callback.PairAdded(_local6.userData, _local7.userData);
_local5.SetFinal();
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _local3) {
_local1 = m_pairBuffer[_local2];
RemovePair(_local1.proxyId1, _local1.proxyId2);
_local2++;
};
m_pairBufferCount = 0;
if (b2BroadPhase.s_validate){
ValidateTable();
};
}
public function RemoveBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair;
_local4 = Find(_arg1, _arg2);
if (_local4 == null){
return;
};
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = m_pairBuffer[m_pairBufferCount];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
m_pairBufferCount++;
};
_local4.SetRemoved();
if (b2BroadPhase.s_validate){
ValidateBuffer();
};
}
private function RemovePair(_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 = m_freePair;
_local3.proxyId1 = b2Pair.b2_nullProxy;
_local3.proxyId2 = b2Pair.b2_nullProxy;
_local3.userData = null;
_local3.status = 0;
m_freePair = _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;
m_callback = _arg2;
}
public function AddBufferedPair(_arg1:int, _arg2:int):void{
var _local3:b2BufferedPair;
var _local4:b2Pair;
_local4 = AddPair(_arg1, _arg2);
if (_local4.IsBuffered() == false){
_local4.SetBuffered();
_local3 = m_pairBuffer[m_pairBufferCount];
_local3.proxyId1 = _local4.proxyId1;
_local3.proxyId2 = _local4.proxyId2;
m_pairBufferCount++;
};
_local4.ClearRemoved();
if (b2BroadPhase.s_validate){
ValidateBuffer();
};
}
private function AddPair(_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 = FindHash(_arg1, _arg2, _local3);
if (_local4 != null){
return (_local4);
};
_local5 = m_freePair;
_local4 = m_pairs[_local5];
m_freePair = _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 ValidateTable():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 _referenceEdge:int;
public var _incidentEdge:int;
public var _flip:int;
public var _incidentVertex:int;
public var _m_id:b2ContactID;
public function get referenceEdge():int{
return (_referenceEdge);
}
public function set incidentVertex(_arg1:int):void{
_incidentVertex = _arg1;
_m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000));
}
public function get flip():int{
return (_flip);
}
public function get incidentEdge():int{
return (_incidentEdge);
}
public function set referenceEdge(_arg1:int):void{
_referenceEdge = _arg1;
_m_id._key = ((_m_id._key & 4294967040) | (_referenceEdge & 0xFF));
}
public function set flip(_arg1:int):void{
_flip = _arg1;
_m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080));
}
public function get incidentVertex():int{
return (_incidentVertex);
}
public function set incidentEdge(_arg1:int):void{
_incidentEdge = _arg1;
_m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 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 SetVV(_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 MaxV(_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 CrossVF(_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 MulTM(_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 MinV(_arg1:b2Vec2):void{
x = ((x < _arg1.x)) ? x : _arg1.x;
y = ((y < _arg1.y)) ? y : _arg1.y;
}
public function MulM(_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 CrossFV(_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 _g:uint;// = 0
private var _b:uint;// = 0
private var _r:uint;// = 0
public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){
_r = 0;
_g = 0;
_b = 0;
super();
_r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
_g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
_b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{
_r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
_g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1)));
_b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1)));
}
public function get color():uint{
return (((_r | (_g << 8)) | (_b << 16)));
}
public function set r(_arg1:Number):void{
_r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set b(_arg1:Number):void{
_b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1)));
}
public function set g(_arg1:Number):void{
_g = 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 = 0x0200;
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 = 4096;
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.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
public class b2CircleContact extends b2Contact {
private var m_manifolds:Array;
private var m0:b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){
var _local3:b2ManifoldPoint;
m_manifolds = [new b2Manifold()];
m0 = new b2Manifold();
super(_arg1, _arg2);
m_manifold = m_manifolds[0];
m_manifold.pointCount = 0;
_local3 = m_manifold.points[0];
_local3.normalImpulse = 0;
_local3.tangentImpulse = 0;
}
override public function GetManifolds():Array{
return (m_manifolds);
}
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;
m0.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 (m0.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 = m0.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 ((((m0.pointCount > 0)) && (_arg1))){
_local4 = m0.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(m0.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.*;
import Box2D.Collision.Shapes.*;
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.IsSensor()) || (_arg2.IsSensor()))){
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 IsSolid():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 GetManifoldCount():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.*;
import Box2D.Collision.Shapes.*;
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 m_constraintCount:int;
public var m_constraints:Array;
public var m_allocator;
public var m_step: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;
m_step = new b2TimeStep();
m_constraints = new Array();
super();
m_step.dt = _arg1.dt;
m_step.inv_dt = _arg1.inv_dt;
m_step.maxIterations = _arg1.maxIterations;
m_allocator = _arg4;
m_constraintCount = 0;
_local6 = 0;
while (_local6 < _arg3) {
_local5 = _arg2[_local6];
m_constraintCount = (m_constraintCount + _local5.m_manifoldCount);
_local6++;
};
_local6 = 0;
while (_local6 < m_constraintCount) {
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 < m_constraintCount) {
_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 < m_constraintCount) {
_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 < m_constraintCount) {
_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 < m_constraintCount) {
_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.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Common.*;
public class b2PolyAndCircleContact extends b2Contact {
private var m_manifolds:Array;
private var m0:b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){
var _local3:b2ManifoldPoint;
m_manifolds = [new b2Manifold()];
m0 = new b2Manifold();
super(_arg1, _arg2);
m_manifold = m_manifolds[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 (m_manifolds);
}
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;
m0.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 < m0.pointCount) {
if (_local8[_local13] == true){
} else {
_local5 = m0.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 < m0.pointCount) {
if (_local8[_local2]){
} else {
_local5 = m0.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(m0.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.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
public class b2PolygonContact extends b2Contact {
private var m_manifolds:Array;
private var m0:b2Manifold;
public var m_manifold:b2Manifold;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{
m0 = new b2Manifold();
m_manifolds = [new b2Manifold()];
super(_arg1, _arg2);
m_manifold = m_manifolds[0];
m_manifold.pointCount = 0;
}
override public function GetManifolds():Array{
return (m_manifolds);
}
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;
m0.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 < m0.pointCount) {
if (_local9[_local13] == true){
} else {
_local4 = m0.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 < m0.pointCount) {
if (_local9[_local8]){
} else {
_local4 = m0.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(m0.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 m_u:b2Vec2;
public var m_impulse:Number;
public var m_dampingRatio:Number;
public var m_frequencyHz:Number;
public var m_localAnchor2:b2Vec2;
public var m_localAnchor1:b2Vec2;
public var m_bias:Number;
public var m_gamma:Number;
public var m_length:Number;
public function b2DistanceJoint(_arg1:b2DistanceJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_u = new b2Vec2();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_length = _arg1.length;
m_frequencyHz = _arg1.frequencyHz;
m_dampingRatio = _arg1.dampingRatio;
m_impulse = 0;
m_gamma = 0;
m_bias = 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(m_u);
_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 (m_frequencyHz > 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 - m_length);
_local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local13 = (-(m_mass) * _local12);
m_u.Set(_local9, _local10);
_local14 = (_local13 * m_u.x);
_local15 = (_local13 * m_u.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;
m_u.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6);
m_u.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7);
_local10 = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y)));
if (_local10 > b2Settings.b2_linearSlop){
m_u.Multiply((1 / _local10));
} else {
m_u.SetZero();
};
_local11 = ((_local6 * m_u.y) - (_local7 * m_u.x));
_local12 = ((_local8 * m_u.y) - (_local9 * m_u.x));
_local13 = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12));
m_mass = (1 / _local13);
if (m_frequencyHz > 0){
_local14 = (_local10 - m_length);
_local15 = ((2 * Math.PI) * m_frequencyHz);
_local16 = (((2 * m_mass) * m_dampingRatio) * _local15);
_local17 = ((m_mass * _local15) * _local15);
m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17))));
m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma);
m_mass = (1 / (_local13 + m_gamma));
};
if (_arg1.warmStarting){
m_impulse = (m_impulse * _arg1.dtRatio);
_local18 = (m_impulse * m_u.x);
_local19 = (m_impulse * m_u.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 = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11)));
_local15 = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse)));
m_impulse = (m_impulse + _local15);
_local16 = (_local15 * m_u.x);
_local17 = (_local15 * m_u.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 m_prismatic1:b2PrismaticJoint;
public var m_prismatic2:b2PrismaticJoint;
public var m_ground1:b2Body;
public var m_ground2:b2Body;
public var m_constant:Number;
public var m_revolute1:b2RevoluteJoint;
public var m_revolute2: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 m_J: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();
m_J = new b2Jacobian();
super(_arg1);
_local2 = _arg1.joint1.m_type;
_local3 = _arg1.joint2.m_type;
m_revolute1 = null;
m_prismatic1 = null;
m_revolute2 = null;
m_prismatic2 = null;
m_ground1 = _arg1.joint1.m_body1;
m_body1 = _arg1.joint1.m_body2;
if (_local2 == b2Joint.e_revoluteJoint){
m_revolute1 = (_arg1.joint1 as b2RevoluteJoint);
m_groundAnchor1.SetV(m_revolute1.m_localAnchor1);
m_localAnchor1.SetV(m_revolute1.m_localAnchor2);
_local4 = m_revolute1.GetJointAngle();
} else {
m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint);
m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1);
m_localAnchor1.SetV(m_prismatic1.m_localAnchor2);
_local4 = m_prismatic1.GetJointTranslation();
};
m_ground2 = _arg1.joint2.m_body1;
m_body2 = _arg1.joint2.m_body2;
if (_local3 == b2Joint.e_revoluteJoint){
m_revolute2 = (_arg1.joint2 as b2RevoluteJoint);
m_groundAnchor2.SetV(m_revolute2.m_localAnchor1);
m_localAnchor2.SetV(m_revolute2.m_localAnchor2);
_local5 = m_revolute2.GetJointAngle();
} else {
m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint);
m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1);
m_localAnchor2.SetV(m_prismatic2.m_localAnchor2);
_local5 = m_prismatic2.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 * m_J.linear2.x), (m_force * m_J.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 (m_revolute1){
_local4 = m_revolute1.GetJointAngle();
} else {
_local4 = m_prismatic1.GetJointTranslation();
};
if (m_revolute2){
_local5 = m_revolute2.GetJointAngle();
} else {
_local5 = m_prismatic2.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) * m_J.linear1.x));
_local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * m_J.linear1.y));
_local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * m_J.angular1));
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * m_J.linear2.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * m_J.linear2.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * m_J.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 = m_ground1;
_local3 = m_ground2;
_local4 = m_body1;
_local5 = m_body2;
_local14 = 0;
m_J.SetZero();
if (m_revolute1){
m_J.angular1 = -1;
_local14 = (_local14 + _local4.m_invI);
} else {
_local10 = _local2.m_xf.R;
_local11 = m_prismatic1.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));
m_J.linear1.Set(-(_local6), -(_local7));
m_J.angular1 = -(_local12);
_local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12)));
};
if (m_revolute2){
m_J.angular2 = -(m_ratio);
_local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI));
} else {
_local10 = _local3.m_xf.R;
_local11 = m_prismatic2.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));
m_J.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7));
m_J.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) * m_J.linear1.x));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * m_J.linear1.y));
_local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * m_J.angular1));
_local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * m_J.linear2.x));
_local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * m_J.linear2.y));
_local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * m_J.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 * m_J.angular2) - ((_local2 * (m_force * m_J.linear2.y)) - (_local3 * (m_force * m_J.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 = m_J.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) * m_J.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * m_J.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * m_J.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * m_J.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * m_J.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * m_J.angular2));
}
}
}//package Box2D.Dynamics.Joints
Section 51
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef)
package Box2D.Dynamics.Joints {
public class b2GearJointDef extends b2JointDef {
public var joint2:b2Joint;
public var joint1:b2Joint;
public var ratio:Number;
public function b2GearJointDef(){
type = b2Joint.e_gearJoint;
joint1 = null;
joint2 = 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 GetBody2():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 GetBody1():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 m_beta:Number;
public var m_mass:b2Mat22;
public var m_target:b2Vec2;
public var m_impulse:b2Vec2;
public var m_localAnchor:b2Vec2;
private var K1:b2Mat22;
private var K2:b2Mat22;
private var K:b2Mat22;
public var m_gamma:Number;
public var m_C:b2Vec2;
public var m_maxForce: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();
K1 = new b2Mat22();
K2 = new b2Mat22();
m_localAnchor = new b2Vec2();
m_target = new b2Vec2();
m_impulse = new b2Vec2();
m_mass = new b2Mat22();
m_C = new b2Vec2();
super(_arg1);
m_target.SetV(_arg1.target);
_local2 = (m_target.x - m_body2.m_xf.position.x);
_local3 = (m_target.y - m_body2.m_xf.position.y);
_local4 = m_body2.m_xf.R;
m_localAnchor.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y));
m_localAnchor.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y));
m_maxForce = _arg1.maxForce;
m_impulse.SetZero();
_local5 = m_body2.m_mass;
_local6 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz);
_local7 = (((2 * _local5) * _arg1.dampingRatio) * _local6);
_local8 = ((_arg1.timeStep * _local5) * (_local6 * _local6));
m_gamma = (1 / (_local7 + _local8));
m_beta = (_local8 / (_local7 + _local8));
}
override public function GetAnchor1():b2Vec2{
return (m_target);
}
override public function GetAnchor2():b2Vec2{
return (m_body2.GetWorldPoint(m_localAnchor));
}
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 = (m_localAnchor.x - _local2.m_sweep.localCenter.x);
_local5 = (m_localAnchor.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;
K1.col1.x = _local7;
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = _local7;
K2.col1.x = ((_local8 * _local5) * _local5);
K2.col2.x = ((-(_local8) * _local4) * _local5);
K2.col1.y = ((-(_local8) * _local4) * _local5);
K2.col2.y = ((_local8 * _local4) * _local4);
K.SetM(K1);
K.AddM(K2);
K.col1.x = (K.col1.x + m_gamma);
K.col2.y = (K.col2.y + m_gamma);
K.Invert(m_mass);
m_C.x = ((_local2.m_sweep.c.x + _local4) - m_target.x);
m_C.y = ((_local2.m_sweep.c.y + _local5) - m_target.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 SetTarget(_arg1:b2Vec2):void{
if (m_body2.IsSleeping()){
m_body2.WakeUp();
};
m_target = _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 = (m_localAnchor.x - _local2.m_sweep.localCenter.x);
_local7 = (m_localAnchor.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 + ((m_beta * _arg1.inv_dt) * m_C.x)) + ((m_gamma * _arg1.dt) * m_impulse.x));
_local5 = ((_local9 + ((m_beta * _arg1.inv_dt) * m_C.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_maxForce){
m_impulse.Multiply((m_maxForce / _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 maxForce:Number;
public var target:b2Vec2;
public var timeStep:Number;
public function b2MouseJointDef(){
target = new b2Vec2();
super();
type = b2Joint.e_mouseJoint;
maxForce = 0;
frequencyHz = 5;
dampingRatio = 0.7;
timeStep = (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 m_refAngle:Number;
public var m_lowerTranslation: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 m_localYAxis1:b2Vec2;
public var m_motorMass:Number;
public var m_maxMotorForce:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_angularMass:Number;
public var m_limitState:int;
public var m_linearMass:Number;
public var m_upperTranslation:Number;
public var m_motorJacobian:b2Jacobian;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var m_linearJacobian: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();
m_localYAxis1 = new b2Vec2();
m_linearJacobian = new b2Jacobian();
m_motorJacobian = new b2Jacobian();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_localXAxis1.SetV(_arg1.localAxis1);
m_localYAxis1.x = -(m_localXAxis1.y);
m_localYAxis1.y = m_localXAxis1.x;
m_refAngle = _arg1.referenceAngle;
m_linearJacobian.SetZero();
m_linearMass = 0;
m_force = 0;
m_angularMass = 0;
m_torque = 0;
m_motorJacobian.SetZero();
m_motorMass = 0;
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
m_lowerTranslation = _arg1.lowerTranslation;
m_upperTranslation = _arg1.upperTranslation;
m_maxMotorForce = _arg1.maxMotorForce;
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 (m_upperTranslation);
}
public function GetLowerLimit():Number{
return (m_lowerTranslation);
}
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{
m_lowerTranslation = _arg1;
m_upperTranslation = _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 * m_localYAxis1.x) + (_local1.col2.x * m_localYAxis1.y)));
_local5 = (m_force * ((_local1.col1.y * m_localYAxis1.x) + (_local1.col2.y * m_localYAxis1.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 * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y));
_local22 = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y));
_local23 = ((_local21 * _local19) + (_local22 * _local20));
_local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local24 = (-(m_linearMass) * _local23);
_local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) * m_linearJacobian.linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) * m_linearJacobian.linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) * m_linearJacobian.angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) * m_linearJacobian.linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) * m_linearJacobian.linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) * m_linearJacobian.angular2));
_local25 = b2Math.b2Abs(_local23);
_local26 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_refAngle);
_local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local27 = (-(m_angularMass) * _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 - m_lowerTranslation);
_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 - m_upperTranslation);
_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) * m_motorJacobian.linear1.x));
_local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * m_motorJacobian.linear1.y));
_local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * m_motorJacobian.angular1));
_local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * m_motorJacobian.linear2.x));
_local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * m_motorJacobian.linear2.y));
_local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * m_motorJacobian.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 * m_localYAxis1.x) + (_local4.col2.x * m_localYAxis1.y));
_local15 = ((_local4.col1.y * m_localYAxis1.x) + (_local4.col2.y * m_localYAxis1.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);
m_linearJacobian.linear1.x = -(_local14);
m_linearJacobian.linear1.y = -(_local15);
m_linearJacobian.linear2.x = _local14;
m_linearJacobian.linear2.y = _local15;
m_linearJacobian.angular1 = -(((_local16 * _local15) - (_local17 * _local14)));
m_linearJacobian.angular2 = ((_local8 * _local15) - (_local9 * _local14));
m_linearMass = (((_local10 + ((_local12 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local11) + ((_local13 * m_linearJacobian.angular2) * m_linearJacobian.angular2));
m_linearMass = (1 / m_linearMass);
m_angularMass = (_local12 + _local13);
if (m_angularMass > Number.MIN_VALUE){
m_angularMass = (1 / m_angularMass);
};
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));
m_motorJacobian.linear1.x = -(_local18);
m_motorJacobian.linear1.y = -(_local19);
m_motorJacobian.linear2.x = _local18;
m_motorJacobian.linear2.y = _local19;
m_motorJacobian.angular1 = -(((_local16 * _local19) - (_local17 * _local18)));
m_motorJacobian.angular2 = ((_local8 * _local19) - (_local9 * _local18));
m_motorMass = (((_local10 + ((_local12 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local11) + ((_local13 * m_motorJacobian.angular2) * m_motorJacobian.angular2));
m_motorMass = (1 / m_motorMass);
if (m_enableLimit){
_local20 = (_local16 - _local6);
_local21 = (_local17 - _local7);
_local22 = ((_local18 * _local20) + (_local19 * _local21));
if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){
m_limitState = e_equalLimits;
} else {
if (_local22 <= m_lowerTranslation){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local22 >= m_upperTranslation){
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 * m_linearJacobian.linear1.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.x)));
_local24 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.y)));
_local25 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.x)));
_local26 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.y)));
_local27 = (_arg1.dt * (((m_force * m_linearJacobian.angular1) - m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular1)));
_local28 = (_arg1.dt * (((m_force * m_linearJacobian.angular2) + m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.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 GetMotorForce():Number{
return (m_motorForce);
}
public function SetMaxMotorForce(_arg1:Number):void{
m_maxMotorForce = _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 = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local10 = ((-(_arg1.inv_dt) * m_linearMass) * _local9);
m_force = (m_force + _local10);
_local11 = (_arg1.dt * _local10);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_linearJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_linearJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_linearJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_linearJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_linearJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_linearJacobian.angular2));
_local12 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local13 = ((-(_arg1.inv_dt) * m_angularMass) * _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 = (m_motorJacobian.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), -(m_maxMotorForce), m_maxMotorForce);
_local16 = (m_motorForce - _local17);
_local11 = (_arg1.dt * _local16);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local18 = m_motorJacobian.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) * m_motorJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.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 localAxis1:b2Vec2;
public var referenceAngle:Number;
public var maxMotorForce:Number;
public var motorSpeed:Number;
public var upperTranslation:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public var lowerTranslation:Number;
public function b2PrismaticJointDef(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
localAxis1 = new b2Vec2();
super();
type = b2Joint.e_prismaticJoint;
localAxis1.Set(1, 0);
referenceAngle = 0;
enableLimit = false;
lowerTranslation = 0;
upperTranslation = 0;
enableMotor = false;
maxMotorForce = 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);
localAxis1 = 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 m_ground:b2Body;
public var m_maxLength2:Number;
public var m_limitForce1:Number;
public var m_maxLength1:Number;
public var m_limitState1:int;
public var m_limitState2:int;
public var m_limitPositionImpulse2:Number;
public var m_force:Number;
public var m_limitPositionImpulse1:Number;
public var m_constant:Number;
public var m_state: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 m_positionImpulse:Number;
public var m_limitMass2:Number;
public var m_limitMass1:Number;
public var m_pulleyMass:Number;
public var m_u1:b2Vec2;
public var m_u2:b2Vec2;
public var m_limitForce2: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();
m_u1 = new b2Vec2();
m_u2 = new b2Vec2();
super(_arg1);
m_ground = m_body1.m_world.m_groundBody;
m_groundAnchor1.x = (_arg1.groundAnchor1.x - m_ground.m_xf.position.x);
m_groundAnchor1.y = (_arg1.groundAnchor1.y - m_ground.m_xf.position.y);
m_groundAnchor2.x = (_arg1.groundAnchor2.x - m_ground.m_xf.position.x);
m_groundAnchor2.y = (_arg1.groundAnchor2.y - m_ground.m_xf.position.y);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_ratio = _arg1.ratio;
m_constant = (_arg1.length1 + (m_ratio * _arg1.length2));
m_maxLength1 = b2Math.b2Min(_arg1.maxLength1, (m_constant - (m_ratio * b2_minPulleyLength)));
m_maxLength2 = b2Math.b2Min(_arg1.maxLength2, ((m_constant - b2_minPulleyLength) / m_ratio));
m_force = 0;
m_limitForce1 = 0;
m_limitForce2 = 0;
}
public function GetGroundAnchor2():b2Vec2{
var _local1:b2Vec2;
_local1 = m_ground.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 = m_u2.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_ground.m_xf.position.x + m_groundAnchor1.x);
_local5 = (m_ground.m_xf.position.y + m_groundAnchor1.y);
_local6 = (m_ground.m_xf.position.x + m_groundAnchor2.x);
_local7 = (m_ground.m_xf.position.y + m_groundAnchor2.y);
_local23 = 0;
if (m_state == 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);
m_u1.Set((_local12 - _local4), (_local13 - _local5));
m_u2.Set((_local14 - _local6), (_local15 - _local7));
_local16 = m_u1.Length();
_local17 = m_u2.Length();
if (_local16 > b2Settings.b2_linearSlop){
m_u1.Multiply((1 / _local16));
} else {
m_u1.SetZero();
};
if (_local17 > b2Settings.b2_linearSlop){
m_u2.Multiply((1 / _local17));
} else {
m_u2.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 = (-(m_pulleyMass) * _local18);
_local20 = m_positionImpulse;
m_positionImpulse = b2Math.b2Max(0, (m_positionImpulse + _local19));
_local19 = (m_positionImpulse - _local20);
_local12 = (-(_local19) * m_u1.x);
_local13 = (-(_local19) * m_u1.y);
_local14 = ((-(m_ratio) * _local19) * m_u2.x);
_local15 = ((-(m_ratio) * _local19) * m_u2.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 (m_limitState1 == 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);
m_u1.Set((_local12 - _local4), (_local13 - _local5));
_local16 = m_u1.Length();
if (_local16 > b2Settings.b2_linearSlop){
m_u1.x = (m_u1.x * (1 / _local16));
m_u1.y = (m_u1.y * (1 / _local16));
} else {
m_u1.SetZero();
};
_local18 = (m_maxLength1 - _local16);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_limitMass1) * _local18);
_local21 = m_limitPositionImpulse1;
m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19));
_local19 = (m_limitPositionImpulse1 - _local21);
_local12 = (-(_local19) * m_u1.x);
_local13 = (-(_local19) * m_u1.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 (m_limitState2 == 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);
m_u2.Set((_local14 - _local6), (_local15 - _local7));
_local17 = m_u2.Length();
if (_local17 > b2Settings.b2_linearSlop){
m_u2.x = (m_u2.x * (1 / _local17));
m_u2.y = (m_u2.y * (1 / _local17));
} else {
m_u2.SetZero();
};
_local18 = (m_maxLength2 - _local17);
_local23 = b2Math.b2Max(_local23, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_limitMass2) * _local18);
_local21 = m_limitPositionImpulse2;
m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19));
_local19 = (m_limitPositionImpulse2 - _local21);
_local14 = (-(_local19) * m_u2.x);
_local15 = (-(_local19) * m_u2.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_ground.m_xf.position.x + m_groundAnchor1.x);
_local15 = (m_ground.m_xf.position.y + m_groundAnchor1.y);
_local16 = (m_ground.m_xf.position.x + m_groundAnchor2.x);
_local17 = (m_ground.m_xf.position.y + m_groundAnchor2.y);
m_u1.Set((_local10 - _local14), (_local11 - _local15));
m_u2.Set((_local12 - _local16), (_local13 - _local17));
_local18 = m_u1.Length();
_local19 = m_u2.Length();
if (_local18 > b2Settings.b2_linearSlop){
m_u1.Multiply((1 / _local18));
} else {
m_u1.SetZero();
};
if (_local19 > b2Settings.b2_linearSlop){
m_u2.Multiply((1 / _local19));
} else {
m_u2.SetZero();
};
_local20 = ((m_constant - _local18) - (m_ratio * _local19));
if (_local20 > 0){
m_state = e_inactiveLimit;
m_force = 0;
} else {
m_state = e_atUpperLimit;
m_positionImpulse = 0;
};
if (_local18 < m_maxLength1){
m_limitState1 = e_inactiveLimit;
m_limitForce1 = 0;
} else {
m_limitState1 = e_atUpperLimit;
m_limitPositionImpulse1 = 0;
};
if (_local19 < m_maxLength2){
m_limitState2 = e_inactiveLimit;
m_limitForce2 = 0;
} else {
m_limitState2 = e_atUpperLimit;
m_limitPositionImpulse2 = 0;
};
_local21 = ((_local5 * m_u1.y) - (_local6 * m_u1.x));
_local22 = ((_local8 * m_u2.y) - (_local9 * m_u2.x));
m_limitMass1 = (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21));
m_limitMass2 = (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22));
m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2));
m_limitMass1 = (1 / m_limitMass1);
m_limitMass2 = (1 / m_limitMass2);
m_pulleyMass = (1 / m_pulleyMass);
if (_arg1.warmStarting){
_local23 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.x);
_local24 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.y);
_local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.x);
_local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.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;
m_limitForce1 = 0;
m_limitForce2 = 0;
};
}
override public function GetReactionTorque():Number{
return (0);
}
public function GetRatio():Number{
return (m_ratio);
}
public function GetLength2():Number{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body2.GetWorldPoint(m_localAnchor2);
_local2 = (m_ground.m_xf.position.x + m_groundAnchor2.x);
_local3 = (m_ground.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 (m_state == 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 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13))));
_local19 = ((-(_arg1.inv_dt) * m_pulleyMass) * _local18);
_local20 = m_force;
m_force = b2Math.b2Max(0, (m_force + _local19));
_local19 = (m_force - _local20);
_local14 = ((-(_arg1.dt) * _local19) * m_u1.x);
_local15 = ((-(_arg1.dt) * _local19) * m_u1.y);
_local16 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.x);
_local17 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.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 (m_limitState1 == e_atUpperLimit){
_local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local18 = -(((m_u1.x * _local10) + (m_u1.y * _local11)));
_local19 = ((-(_arg1.inv_dt) * m_limitMass1) * _local18);
_local20 = m_limitForce1;
m_limitForce1 = b2Math.b2Max(0, (m_limitForce1 + _local19));
_local19 = (m_limitForce1 - _local20);
_local14 = ((-(_arg1.dt) * _local19) * m_u1.x);
_local15 = ((-(_arg1.dt) * _local19) * m_u1.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 (m_limitState2 == e_atUpperLimit){
_local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9));
_local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8));
_local18 = -(((m_u2.x * _local12) + (m_u2.y * _local13)));
_local19 = ((-(_arg1.inv_dt) * m_limitMass2) * _local18);
_local20 = m_limitForce2;
m_limitForce2 = b2Math.b2Max(0, (m_limitForce2 + _local19));
_local19 = (m_limitForce2 - _local20);
_local16 = ((-(_arg1.dt) * _local19) * m_u2.x);
_local17 = ((-(_arg1.dt) * _local19) * m_u2.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 GetLength1():Number{
var _local1:b2Vec2;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = m_body1.GetWorldPoint(m_localAnchor1);
_local2 = (m_ground.m_xf.position.x + m_groundAnchor1.x);
_local3 = (m_ground.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_ground.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 maxLength2:Number;
public var length1:Number;
public var length2:Number;
public var maxLength1:Number;
public var ratio:Number;
public var groundAnchor1:b2Vec2;
public var groundAnchor2:b2Vec2;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public function b2PulleyJointDef(){
groundAnchor1 = new b2Vec2();
groundAnchor2 = new b2Vec2();
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
type = b2Joint.e_pulleyJoint;
groundAnchor1.Set(-1, 1);
groundAnchor2.Set(1, 1);
localAnchor1.Set(-1, 0);
localAnchor2.Set(1, 0);
length1 = 0;
maxLength1 = 0;
length2 = 0;
maxLength2 = 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;
groundAnchor1.SetV(_arg3);
groundAnchor2.SetV(_arg4);
localAnchor1 = body1.GetLocalPoint(_arg5);
localAnchor2 = body2.GetLocalPoint(_arg6);
_local8 = (_arg5.x - _arg3.x);
_local9 = (_arg5.y - _arg3.y);
length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local10 = (_arg6.x - _arg4.x);
_local11 = (_arg6.y - _arg4.y);
length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
ratio = _arg7;
_local12 = (length1 + (ratio * length2));
maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength));
maxLength2 = ((_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 m_pivotMass: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 K1:b2Mat22;
private var K2:b2Mat22;
private var K3:b2Mat22;
private var K:b2Mat22;
public var m_pivotForce:b2Vec2;
public var m_motorSpeed:Number;
public var m_enableMotor:Boolean;
public var m_limitPositionImpulse:Number;
public var m_maxMotorTorque:Number;
public var m_referenceAngle:Number;
public var m_lowerAngle:Number;
public var m_upperAngle:Number;
public static var tImpulse:b2Vec2 = new b2Vec2();
public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){
K = new b2Mat22();
K1 = new b2Mat22();
K2 = new b2Mat22();
K3 = new b2Mat22();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_pivotForce = new b2Vec2();
m_pivotMass = new b2Mat22();
super(_arg1);
m_localAnchor1.SetV(_arg1.localAnchor1);
m_localAnchor2.SetV(_arg1.localAnchor2);
m_referenceAngle = _arg1.referenceAngle;
m_pivotForce.Set(0, 0);
m_motorForce = 0;
m_limitForce = 0;
m_limitPositionImpulse = 0;
m_lowerAngle = _arg1.lowerAngle;
m_upperAngle = _arg1.upperAngle;
m_maxMotorTorque = _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 (m_upperAngle);
}
public function GetLowerLimit():Number{
return (m_lowerAngle);
}
public function SetLimits(_arg1:Number, _arg2:Number):void{
m_lowerAngle = _arg1;
m_upperAngle = _arg2;
}
public function GetMotorSpeed():Number{
return (m_motorSpeed);
}
override public function GetReactionForce():b2Vec2{
return (m_pivotForce);
}
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;
K1.col1.x = (_local18 + _local19);
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = (_local18 + _local19);
K2.col1.x = ((_local20 * _local8) * _local8);
K2.col2.x = ((-(_local20) * _local7) * _local8);
K2.col1.y = ((-(_local20) * _local7) * _local8);
K2.col2.y = ((_local20 * _local7) * _local7);
K3.col1.x = ((_local21 * _local11) * _local11);
K3.col2.x = ((-(_local21) * _local10) * _local11);
K3.col1.y = ((-(_local21) * _local10) * _local11);
K3.col2.y = ((_local21 * _local10) * _local10);
K.SetM(K1);
K.AddM(K2);
K.AddM(K3);
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) - m_referenceAngle);
_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 - m_lowerAngle);
_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 - m_upperAngle);
_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 SetMaxMotorTorque(_arg1:Number):void{
m_maxMotorTorque = _arg1;
}
public function GetJointAngle():Number{
return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle));
}
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;
K1.col1.x = (_local10 + _local11);
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = (_local10 + _local11);
K2.col1.x = ((_local12 * _local7) * _local7);
K2.col2.x = ((-(_local12) * _local6) * _local7);
K2.col1.y = ((-(_local12) * _local6) * _local7);
K2.col2.y = ((_local12 * _local6) * _local6);
K3.col1.x = ((_local13 * _local9) * _local9);
K3.col2.x = ((-(_local13) * _local8) * _local9);
K3.col1.y = ((-(_local13) * _local8) * _local9);
K3.col2.y = ((_local13 * _local8) * _local8);
K.SetM(K1);
K.AddM(K2);
K.AddM(K3);
K.Invert(m_pivotMass);
m_motorMass = (1 / (_local12 + _local13));
if (m_enableMotor == false){
m_motorForce = 0;
};
if (m_enableLimit){
_local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - m_referenceAngle);
if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){
m_limitState = e_equalLimits;
} else {
if (_local14 <= m_lowerAngle){
if (m_limitState != e_atLowerLimit){
m_limitForce = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local14 >= m_upperAngle){
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) * m_pivotForce.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * m_pivotForce.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * m_pivotForce.y) - (_local7 * m_pivotForce.x)) + m_motorForce) + m_limitForce)));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * m_pivotForce.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * m_pivotForce.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * m_pivotForce.y) - (_local9 * m_pivotForce.x)) + m_motorForce) + m_limitForce)));
} else {
m_pivotForce.SetZero();
m_motorForce = 0;
m_limitForce = 0;
};
m_limitPositionImpulse = 0;
}
public function EnableLimit(_arg1:Boolean):void{
m_enableLimit = _arg1;
}
public function GetMotorTorque():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) * ((m_pivotMass.col1.x * _local11) + (m_pivotMass.col2.x * _local12)));
_local14 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.y * _local11) + (m_pivotMass.col2.y * _local12)));
m_pivotForce.x = (m_pivotForce.x + _local13);
m_pivotForce.y = (m_pivotForce.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), -(m_maxMotorTorque), m_maxMotorTorque);
_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.Dynamics.Contacts.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Joints.*;
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 m_I: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.fixedRotation){
m_flags = (m_flags | e_fixedRotationFlag);
};
if (_arg1.allowSleep){
m_flags = (m_flags | e_allowSleepFlag);
};
if (_arg1.isSleeping){
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.massData.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.linearDamping;
m_angularDamping = _arg1.angularDamping;
m_force.Set(0, 0);
m_torque = 0;
m_linearVelocity.SetZero();
m_angularVelocity = 0;
m_sleepTime = 0;
m_invMass = 0;
m_I = 0;
m_invI = 0;
m_mass = _arg1.massData.mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
m_I = _arg1.massData.I;
};
if (m_I > 0){
m_invI = (1 / m_I);
};
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.x - (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 GetLocalCenter():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 IsDynamic():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 (m_I);
}
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;
m_I = 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));
m_I = (m_I + _local4.I);
_local1 = _local1.m_next;
};
if (m_mass > 0){
m_invMass = (1 / m_mass);
_local2 = (_local2 * m_invMass);
_local3 = (_local3 * m_invMass);
};
if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){
m_I = (m_I - (m_mass * ((_local2 * _local2) + (_local3 * _local3))));
m_invI = (1 / m_I);
} else {
m_I = 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 PutToSleep():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.x - (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;
m_I = 0;
m_invI = 0;
m_mass = _arg1.mass;
if (m_mass > 0){
m_invMass = (1 / m_mass);
};
if ((m_flags & b2Body.e_fixedRotationFlag) == 0){
m_I = _arg1.I;
};
if (m_I > 0){
m_invI = (1 / m_I);
};
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 SetBullet(_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 DestroyShape(_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 AllowSleeping(_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 GetWorld():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 isSleeping:Boolean;
public var position:b2Vec2;
public var isBullet:Boolean;
public var allowSleep:Boolean;
public var userData;
public var angularDamping:Number;
public var fixedRotation:Boolean;
public var angle:Number;
public var linearDamping:Number;
public var massData:b2MassData;
public function b2BodyDef(){
massData = new b2MassData();
position = new b2Vec2();
super();
massData.center.SetZero();
massData.mass = 0;
massData.I = 0;
userData = null;
position.Set(0, 0);
angle = 0;
linearDamping = 0;
angularDamping = 0;
allowSleep = true;
isSleeping = false;
fixedRotation = 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.*;
import Box2D.Dynamics.Contacts.*;
import Box2D.Collision.Shapes.*;
public class b2ContactManager extends b2PairCallback {
public var m_world:b2World;
public var m_destroyImmediate:Boolean;
public var m_nullContact:b2NullContact;
private static const s_evalCP:b2ContactPoint = new b2ContactPoint();
public function b2ContactManager(){
m_nullContact = new b2NullContact();
super();
m_world = null;
m_destroyImmediate = 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 (m_nullContact);
};
if (_local3.m_body == _local4.m_body){
return (m_nullContact);
};
if (_local6.IsConnected(_local5)){
return (m_nullContact);
};
if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){
return (m_nullContact);
};
_local7 = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator);
if (_local7 == null){
return (m_nullContact);
};
_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 == m_nullContact){
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 flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.*;
public class b2DebugDraw {
public var m_xformScale:Number;// = 1
public var m_fillAlpha:Number;// = 1
public var m_alpha:Number;// = 1
public var m_lineThickness:Number;// = 1
public var m_drawFlags:uint;
public var m_sprite:Sprite;
public var m_drawScale: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(){
m_drawScale = 1;
m_lineThickness = 1;
m_alpha = 1;
m_fillAlpha = 1;
m_xformScale = 1;
super();
m_drawFlags = 0;
}
public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
var _local4:int;
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
m_sprite.graphics.beginFill(_arg3.color, m_fillAlpha);
_local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
m_sprite.graphics.endFill();
}
public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale));
}
public function DrawXForm(_arg1:b2XForm):void{
m_sprite.graphics.lineStyle(m_lineThickness, 0xFF0000, m_alpha);
m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale));
m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col1.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col1.y)) * m_drawScale));
m_sprite.graphics.lineStyle(m_lineThickness, 0xFF00, m_alpha);
m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale));
m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col2.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col2.y)) * m_drawScale));
}
public function ClearFlags(_arg1:uint):void{
m_drawFlags = (m_drawFlags & ~(_arg1));
}
public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg4.color, m_alpha);
m_sprite.graphics.moveTo(0, 0);
m_sprite.graphics.beginFill(_arg4.color, m_fillAlpha);
m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale));
m_sprite.graphics.endFill();
m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale));
m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * m_drawScale), ((_arg1.y + (_arg3.y * _arg2)) * m_drawScale));
}
public function SetFlags(_arg1:uint):void{
m_drawFlags = _arg1;
}
public function AppendFlags(_arg1:uint):void{
m_drawFlags = (m_drawFlags | _arg1);
}
public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale));
m_sprite.graphics.lineTo((_arg2.x * m_drawScale), (_arg2.y * m_drawScale));
}
public function GetFlags():uint{
return (m_drawFlags);
}
public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{
var _local4:int;
m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha);
m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
_local4 = 1;
while (_local4 < _arg2) {
m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale));
_local4++;
};
m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale));
}
}
}//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.Contacts.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Common.*;
public class b2Island {
public var m_joints:Array;
public var m_listener:b2ContactListener;
public var m_positionIterationCount:int;
public var m_bodyCapacity:int;
public var m_bodies:Array;
public var m_jointCapacity: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();
m_bodyCapacity = _arg1;
m_contactCapacity = _arg2;
m_jointCapacity = _arg3;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_allocator = _arg4;
m_listener = _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++;
};
m_joints = new Array(_arg3);
_local6 = 0;
while (_local6 < _arg3) {
m_joints[_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++;
m_joints[_local2] = _arg1;
}
public function Report(_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 (m_listener == 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;
m_listener.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 = m_joints[_local5];
_local7.InitVelocityConstraints(_arg1);
_local5++;
};
_local5 = 0;
while (_local5 < _arg1.maxIterations) {
_local8.SolveVelocityConstraints();
_local9 = 0;
while (_local9 < m_jointCount) {
_local7 = m_joints[_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 = m_joints[_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 = m_joints[_local5];
_local12 = _local7.SolvePositionConstraints();
_local11 = ((_local11) && (_local12));
_local5++;
};
if (((_local10) && (_local11))){
break;
};
m_positionIterationCount++;
};
};
Report(_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++;
};
Report(_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.*;
import Box2D.Dynamics.Contacts.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.Joints.*;
import Box2D.Common.*;
public class b2World {
public var m_inv_dt0:Number;
public var m_boundaryListener:b2BoundaryListener;
public var m_contactList:b2Contact;
public var m_blockAllocator;
public var m_contactListener:b2ContactListener;
public var m_allowSleep:Boolean;
public var m_broadPhase:b2BroadPhase;
public var m_destructionListener:b2DestructionListener;
public var m_jointCount:int;
public var m_bodyCount:int;
public var m_lock:Boolean;
public var m_positionIterationCount:int;
public var m_groundBody:b2Body;
public var m_contactCount:int;
public var m_debugDraw:b2DebugDraw;
public var m_contactFilter:b2ContactFilter;
public var m_bodyList:b2Body;
public var m_stackAllocator;
public var m_jointList:b2Joint;
public var m_gravity:b2Vec2;
public var m_contactManager: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;
m_contactManager = new b2ContactManager();
super();
m_destructionListener = null;
m_boundaryListener = null;
m_contactFilter = b2ContactFilter.b2_defaultFilter;
m_contactListener = null;
m_debugDraw = null;
m_bodyList = 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;
m_allowSleep = _arg3;
m_gravity = _arg2;
m_lock = false;
m_inv_dt0 = 0;
m_contactManager.m_world = this;
m_broadPhase = new b2BroadPhase(_arg1, m_contactManager);
_local4 = new b2BodyDef();
m_groundBody = CreateBody(_local4);
}
public function DrawJoint(_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:
m_debugDraw.DrawSegment(_local8, _local9, _local10);
break;
case b2Joint.e_pulleyJoint:
_local11 = (_arg1 as b2PulleyJoint);
_local12 = _local11.GetGroundAnchor1();
_local13 = _local11.GetGroundAnchor2();
m_debugDraw.DrawSegment(_local12, _local8, _local10);
m_debugDraw.DrawSegment(_local13, _local9, _local10);
m_debugDraw.DrawSegment(_local12, _local13, _local10);
break;
case b2Joint.e_mouseJoint:
m_debugDraw.DrawSegment(_local8, _local9, _local10);
break;
default:
if (_local2 != m_groundBody){
m_debugDraw.DrawSegment(_local6, _local8, _local10);
};
m_debugDraw.DrawSegment(_local8, _local9, _local10);
if (_local3 != m_groundBody){
m_debugDraw.DrawSegment(_local7, _local9, _local10);
};
};
}
public function Refilter(_arg1:b2Shape):void{
_arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf);
}
public function SetDebugDraw(_arg1:b2DebugDraw):void{
m_debugDraw = _arg1;
}
public function SetContinuousPhysics(_arg1:Boolean):void{
m_continuousPhysics = _arg1;
}
public function GetProxyCount():int{
return (m_broadPhase.m_proxyCount);
}
public function DrawDebugData():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 (m_debugDraw == null){
return;
};
m_debugDraw.m_sprite.graphics.clear();
_local1 = m_debugDraw.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 = m_bodyList;
while (_local3) {
_local11 = _local3.m_xf;
_local4 = _local3.GetShapeList();
while (_local4) {
if (_local3.IsStatic()){
DrawShape(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15);
} else {
if (_local3.IsSleeping()){
DrawShape(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15);
} else {
DrawShape(_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) {
DrawJoint(_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));
m_debugDraw.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);
m_debugDraw.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);
m_debugDraw.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 = m_bodyList;
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++;
};
m_debugDraw.DrawPolygon(_local14, 4, _local10);
};
_local4 = _local4.m_next;
};
_local3 = _local3.m_next;
};
};
if ((_local1 & b2DebugDraw.e_centerOfMassBit)){
_local3 = m_bodyList;
while (_local3) {
_local11 = s_xf;
_local11.R = _local3.m_xf.R;
_local11.position = _local3.GetWorldCenter();
m_debugDraw.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 (m_destructionListener){
m_destructionListener.SayGoodbyeJoint(_local4.joint);
};
DestroyJoint(_local4.joint);
};
_local3 = _arg1.m_shapeList;
while (_local3) {
_local5 = _local3;
_local3 = _local3.m_next;
if (m_destructionListener){
m_destructionListener.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 == m_bodyList){
m_bodyList = _arg1.m_next;
};
m_bodyCount--;
}
public function SetContactFilter(_arg1:b2ContactFilter):void{
m_contactFilter = _arg1;
}
public function GetGroundBody():b2Body{
return (m_groundBody);
}
public function DrawShape(_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;
m_debugDraw.DrawSolidCircle(_local7, _local8, _local9, _arg3);
if (_arg4){
m_debugDraw.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++;
};
m_debugDraw.DrawSolidPolygon(_local14, _local12, _arg3);
if (_arg4){
_local15 = _local11.GetCoreVertices();
_local10 = 0;
while (_local10 < _local12) {
_local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]);
_local10++;
};
m_debugDraw.DrawPolygon(_local14, _local12, _local5);
};
break;
};
}
public function GetContactCount():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_stackAllocator, m_contactListener);
_local2 = m_bodyList;
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 = m_bodyList;
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_gravity, m_positionCorrection, m_allowSleep);
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 = m_bodyList;
while (_local2) {
if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){
} else {
if (_local2.IsStatic()){
} else {
_local14 = _local2.SynchronizeShapes();
if ((((_local14 == false)) && (!((m_boundaryListener == null))))){
m_boundaryListener.Violation(_local2);
};
};
};
_local2 = _local2.m_next;
};
m_broadPhase.Commit();
}
public function Query(_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 SetGravity(_arg1:b2Vec2):void{
m_gravity = _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_stackAllocator, m_contactListener);
_local9 = m_bodyCount;
_local10 = new Array(_local9);
_local2 = m_bodyList;
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)) && (!((m_boundaryListener == null))))){
m_boundaryListener.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 GetPairCount():int{
return (m_broadPhase.m_pairManager.m_pairCount);
}
public function GetBodyList():b2Body{
return (m_bodyList);
}
public function SetWarmStarting(_arg1:Boolean):void{
m_warmStarting = _arg1;
}
public function SetPositionCorrection(_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 = m_bodyList;
if (m_bodyList){
m_bodyList.m_prev = _local2;
};
m_bodyList = _local2;
m_bodyCount++;
return (_local2);
}
public function SetBoundaryListener(_arg1:b2BoundaryListener):void{
m_boundaryListener = _arg1;
}
public function SetDestructionListener(_arg1:b2DestructionListener):void{
m_destructionListener = _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 = (m_inv_dt0 * _arg1);
_local3.positionCorrection = m_positionCorrection;
_local3.warmStarting = m_warmStarting;
m_contactManager.Collide();
if (_local3.dt > 0){
Solve(_local3);
};
if (((m_continuousPhysics) && ((_local3.dt > 0)))){
SolveTOI(_local3);
};
DrawDebugData();
m_inv_dt0 = _local3.inv_dt;
m_lock = false;
}
public function GetBodyCount():int{
return (m_bodyCount);
}
public function GetJointCount():int{
return (m_jointCount);
}
}
}//package Box2D.Dynamics
Section 75
//Pnt (com.actionsnippet.geom.Pnt)
package com.actionsnippet.geom {
public class Pnt {
public var x:Number;
public var y:Number;
public function Pnt(_arg1:Number, _arg2:Number){
this.x = _arg1;
this.y = _arg2;
}
}
}//package com.actionsnippet.geom
Section 76
//Triangulate (com.actionsnippet.geom.Triangulate)
package com.actionsnippet.geom {
public class Triangulate {
private const EPSILON:Number = 1E-10;
private function snip(_arg1:Array, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Array):Boolean{
var _local7:int;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local8 = _arg1[_arg6[_arg2]].x;
_local9 = _arg1[_arg6[_arg2]].y;
_local10 = _arg1[_arg6[_arg3]].x;
_local11 = _arg1[_arg6[_arg3]].y;
_local12 = _arg1[_arg6[_arg4]].x;
_local13 = _arg1[_arg6[_arg4]].y;
if (EPSILON > (((_local10 - _local8) * (_local13 - _local9)) - ((_local11 - _local9) * (_local12 - _local8)))){
return (false);
};
_local7 = 0;
while (_local7 < _arg5) {
if ((((((_local7 == _arg2)) || ((_local7 == _arg3)))) || ((_local7 == _arg4)))){
} else {
_local14 = _arg1[_arg6[_local7]].x;
_local15 = _arg1[_arg6[_local7]].y;
if (insideTriangle(_local8, _local9, _local10, _local11, _local12, _local13, _local14, _local15)){
return (false);
};
};
_local7++;
};
return (true);
}
public function process(_arg1:Array):Array{
var _local2:Array;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
_local2 = [];
_local3 = _arg1.length;
if (_local3 < 3){
return (null);
};
_local4 = [];
if (0 < area(_arg1)){
_local5 = 0;
while (_local5 < _local3) {
_local4[_local5] = _local5;
_local5++;
};
} else {
_local5 = 0;
while (_local5 < _local3) {
_local4[_local5] = ((_local3 - 1) - _local5);
_local5++;
};
};
_local6 = _local3;
_local7 = (2 * _local6);
_local8 = 0;
_local5 = (_local6 - 1);
while (_local6 > 2) {
var _temp1 = _local7;
_local7 = (_local7 - 1);
if (0 >= _temp1){
return (null);
};
_local9 = _local5;
if (_local6 <= _local9){
_local9 = 0;
};
_local5 = (_local9 + 1);
if (_local6 <= _local5){
_local5 = 0;
};
_local10 = (_local5 + 1);
if (_local6 <= _local10){
_local10 = 0;
};
if (snip(_arg1, _local9, _local5, _local10, _local6, _local4)){
_local11 = _local4[_local9];
_local12 = _local4[_local5];
_local13 = _local4[_local10];
_local2.push(_arg1[_local11]);
_local2.push(_arg1[_local12]);
_local2.push(_arg1[_local13]);
_local8++;
_local14 = _local5;
_local15 = (_local5 + 1);
while (_local15 < _local6) {
_local4[_local14] = _local4[_local15];
_local14++;
_local15++;
};
_local6--;
_local7 = (2 * _local6);
};
};
return (_local2);
}
public function insideTriangle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{
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;
_local9 = (_arg5 - _arg3);
_local10 = (_arg6 - _arg4);
_local11 = (_arg1 - _arg5);
_local12 = (_arg2 - _arg6);
_local13 = (_arg3 - _arg1);
_local14 = (_arg4 - _arg2);
_local15 = (_arg7 - _arg1);
_local16 = (_arg8 - _arg2);
_local17 = (_arg7 - _arg3);
_local18 = (_arg8 - _arg4);
_local19 = (_arg7 - _arg5);
_local20 = (_arg8 - _arg6);
_local23 = ((_local9 * _local18) - (_local10 * _local17));
_local21 = ((_local13 * _local16) - (_local14 * _local15));
_local22 = ((_local11 * _local20) - (_local12 * _local19));
return ((((((_local23 >= 0)) && ((_local22 >= 0)))) && ((_local21 >= 0))));
}
public function area(_arg1:Array):Number{
var _local2:int;
var _local3:Number;
var _local4:int;
var _local5:int;
_local2 = _arg1.length;
_local3 = 0;
_local4 = (_local2 - 1);
_local5 = 0;
while (_local5 < _local2) {
_local3 = (_local3 + ((_arg1[_local4].x * _arg1[_local5].y) - (_arg1[_local5].x * _arg1[_local4].y)));
var _temp1 = _local5;
_local5 = (_local5 + 1);
_local4 = _temp1;
};
return ((_local3 * 0.5));
}
}
}//package com.actionsnippet.geom
Section 77
//BoxObject (com.actionsnippet.qbox.objects.BoxObject)
package com.actionsnippet.qbox.objects {
import flash.events.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class BoxObject extends QuickObject {
public function BoxObject(_arg1:QuickBox2D, _arg2:Object){
super(_arg1, _arg2);
}
override protected function defaultParams(_arg1:Object):void{
}
override protected function build():void{
var p:Object;
var boxDef:b2PolygonDef;
var hw:Number;
var hh:Number;
var t:Number;
p = params;
if ((p.skin is DisplayObject)){
bodyDef.userData = p.skin;
t = p.skin.rotation;
p.skin.rotation = 0;
if (!p.width){
p.width = (p.skin.width / 30);
};
if (!p.height){
p.height = (p.skin.height / 30);
};
p.skin.rotation = t;
};
if (!p.width){
p.width = 1;
};
if (!p.height){
p.height = 1;
};
boxDef = new b2PolygonDef();
shapeDef = boxDef;
hw = (p.width / 2);
hh = (p.height / 2);
boxDef.SetAsBox(hw, hh);
boxDef.density = p.density;
boxDef.friction = p.friction;
boxDef.restitution = p.restitution;
boxDef.filter.maskBits = p.maskBits;
boxDef.filter.categoryBits = p.categoryBits;
boxDef.filter.groupIndex = p.groupIndex;
if ((p.skin is Class)){
bodyDef.userData = new p.skin();
} else {
if ((p.skin is DisplayObject)){
} else {
if (p.skin != "none"){
bodyDef.userData = new Sprite();
var _local2 = bodyDef.userData.graphics;
with (_local2) {
lineStyle(p.lineThickness, p.lineColor, p.lineAlpha);
beginFill(p.fillColor, p.fillAlpha);
hw = (hw * 30);
hh = (hh * 30);
drawRect(-(hw), -(hh), (p.width * 30), (p.height * 30));
};
};
};
};
body = w.CreateBody(bodyDef);
shape = body.CreateShape(boxDef);
}
}
}//package com.actionsnippet.qbox.objects
Section 78
//CircleObject (com.actionsnippet.qbox.objects.CircleObject)
package com.actionsnippet.qbox.objects {
import flash.events.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class CircleObject extends QuickObject {
public function CircleObject(_arg1:QuickBox2D, _arg2:Object){
super(_arg1, _arg2);
}
override protected function defaultParams(_arg1:Object):void{
}
override protected function build():void{
var p:Object;
var circDef:b2CircleDef;
p = params;
circDef = new b2CircleDef();
shapeDef = circDef;
if ((p.skin is DisplayObject)){
bodyDef.userData = p.skin;
if (!p.radius){
p.radius = (p.skin.width / 60);
};
};
if (!p.radius){
p.radius = 0.5;
};
circDef.radius = p.radius;
circDef.density = p.density;
circDef.friction = p.friction;
circDef.restitution = p.restitution;
circDef.filter.maskBits = p.maskBits;
circDef.filter.categoryBits = p.categoryBits;
circDef.filter.groupIndex = p.groupIndex;
if ((p.skin is Class)){
bodyDef.userData = new p.skin();
} else {
if ((p.skin is DisplayObject)){
} else {
if (p.skin != "none"){
bodyDef.userData = new Sprite();
var _local2 = bodyDef.userData.graphics;
with (_local2) {
lineStyle(p.lineThickness, p.lineColor, p.lineAlpha);
beginFill(p.fillColor, p.fillAlpha);
drawCircle(0, 0, (p.radius * 30));
};
};
};
};
body = w.CreateBody(bodyDef);
shape = body.CreateShape(circDef);
}
}
}//package com.actionsnippet.qbox.objects
Section 79
//GroupObject (com.actionsnippet.qbox.objects.GroupObject)
package com.actionsnippet.qbox.objects {
import flash.events.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class GroupObject extends QuickObject {
public function GroupObject(_arg1:QuickBox2D, _arg2:Object){
super(_arg1, _arg2);
}
override protected function defaultParams(_arg1:Object):void{
_arg1.objects = [];
}
override protected function build():void{
var _local1:Object;
var _local2:int;
var _local3:QuickObject;
var _local4:*;
var _local5:int;
var _local6:b2PolygonDef;
var _local7:Number;
var _local8:int;
var _local9:DisplayObject;
_local1 = params;
body = qbox.w.CreateBody(bodyDef);
if ((_local1.skin is Class)){
bodyDef.userData = new _local1.skin();
bodyDef.userData.width = (_local1.width * 30);
bodyDef.userData.height = (_local1.height * 30);
} else {
if ((_local1.skin is DisplayObject)){
bodyDef.userData = _local1.skin;
} else {
if (_local1.skin != "none"){
bodyDef.userData = new Sprite();
};
};
};
body.m_userData = bodyDef.userData;
_local2 = 0;
while (_local2 < _local1.objects.length) {
_local3 = _local1.objects[_local2];
_local4 = _local3.shapeDef;
if ((_local4 is b2ShapeDef)){
if ((_local4 is b2CircleDef)){
_local4.localPosition.Set(_local3.x, _local3.y);
} else {
if ((_local4 is b2PolygonDef)){
_local4.SetAsOrientedBox((_local3.params.width / 2), (_local3.params.height / 2), new b2Vec2(_local3.x, _local3.y), _local3.angle);
};
};
body.CreateShape(_local4);
} else {
if ((_local4 is Array)){
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
_local7 = (_local3.params.verts[_local5].length / 2);
_local8 = 0;
while (_local8 < _local7) {
_local6.vertices[_local8].Add(new b2Vec2(_local3.x, _local3.y));
_local8++;
};
body.CreateShape(_local6);
_local5++;
};
};
};
if ((((_local3.userData is DisplayObject)) && (!(_local1.skin)))){
_local9 = _local3.userData;
_local9.x = (_local3.x * 30);
_local9.y = (_local3.y * 30);
_local9.rotation = ((_local3.angle / Math.PI) * 180);
_local3.fullDestroy();
body.m_userData.addChild(_local9);
} else {
_local3.fullDestroy();
};
_local2++;
};
body.SetMassFromShapes();
}
}
}//package com.actionsnippet.qbox.objects
Section 80
//JointObject (com.actionsnippet.qbox.objects.JointObject)
package com.actionsnippet.qbox.objects {
import flash.events.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class JointObject extends QuickObject {
private var jointDef:b2JointDef;
public function JointObject(_arg1:QuickBox2D, _arg2:Object){
super(_arg1, _arg2);
}
private function buildDistanceJoint(_arg1:Object):void{
var _local2:b2Vec2;
var _local3:b2DistanceJointDef;
if (((!(_arg1.x1)) && (!(_arg1.y1)))){
_local2 = _arg1.a.GetWorldCenter();
_arg1.x1 = _local2.x;
_arg1.y1 = _local2.y;
};
if (((!(_arg1.x2)) && (!(_arg1.y2)))){
_local2 = _arg1.b.GetWorldCenter();
_arg1.x2 = _local2.x;
_arg1.y2 = _local2.y;
};
if (_arg1.vecA == null){
_arg1.vecA = new b2Vec2(_arg1.x1, _arg1.y1);
};
if (_arg1.vecB == null){
_arg1.vecB = new b2Vec2(_arg1.x2, _arg1.y2);
};
jointDef = new b2DistanceJointDef();
_local3 = b2DistanceJointDef(jointDef);
_local3.Initialize(_arg1.a, _arg1.b, _arg1.vecA, _arg1.vecB);
_local3.frequencyHz = _arg1.frequencyHz;
_local3.dampingRatio = _arg1.dampingRatio;
if (_arg1.length){
_local3.length = _arg1.length;
};
}
override public function get userData(){
return (jointDef.userData);
}
override protected function defaultParams(_arg1:Object):void{
_arg1.a = null;
_arg1.b = null;
_arg1.frequencyHz = 0;
_arg1.dampingRatio = 0;
_arg1.length = null;
_arg1.collideConnected = true;
_arg1.referenceAngle = 0;
_arg1.enableLimit = false;
_arg1.upperAngle = 0;
_arg1.lowerAngle = 0;
_arg1.enableMotor = false;
_arg1.motorSpeed = 0;
_arg1.maxMotorTorque = 0;
_arg1.lowerTranslation = 0;
_arg1.upperTrasnlation = 0;
_arg1.maxMotorForce = 0;
_arg1.ratio = 1;
}
override public function set userData(_arg1){
jointDef.userData = _arg1;
}
private function buildGearJoint(_arg1:Object):void{
var _local2:b2GearJointDef;
jointDef = new b2GearJointDef();
_local2 = b2GearJointDef(jointDef);
_local2.userData = null;
_local2.body1 = _arg1.a;
_local2.body2 = _arg1.b;
_local2.joint1 = _arg1.joint1;
_local2.joint2 = _arg1.joint2;
_local2.ratio = _arg1.ratio;
}
private function buildPrismaticJoint(_arg1:Object):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2PrismaticJointDef;
_local2 = new b2Vec2(0, 1);
_local3 = _arg1.a.GetWorldCenter();
if (_arg1.anchor){
_local3 = _arg1.anchor;
} else {
if (((!(_arg1.x1)) && (!(_arg1.y1)))){
_arg1.x1 = _local3.x;
_arg1.y1 = _local3.y;
} else {
_local3.x = _arg1.x1;
_local3.y = _arg1.y1;
};
};
if (_arg1.axis){
_local2 = _arg1.axis;
} else {
if (((!(_arg1.x2)) && (!(_arg1.y2)))){
_arg1.x1 = _local2.x;
_arg1.y1 = _local2.y;
} else {
_local2.x = _arg1.x1;
_local2.y = _arg1.y1;
};
};
jointDef = new b2PrismaticJointDef();
jointDef.userData = null;
_local4 = b2PrismaticJointDef(jointDef);
_local4.Initialize(_arg1.a, _arg1.b, _local3, _local2);
_local4.referenceAngle = _arg1.referenceAngle;
_local4.enableLimit = _arg1.enableLimit;
_local4.upperTranslation = _arg1.upperTranslation;
_local4.lowerTranslation = _arg1.lowerTranslation;
_local4.enableMotor = _arg1.enableMotor;
_local4.motorSpeed = _arg1.motorSpeed;
_local4.maxMotorForce = _arg1.maxMotorForce;
}
override protected function build():void{
var _local1:Object;
_local1 = params;
if ((((_local1.a == null)) || ((_local1.b == null)))){
throw (new Error("your jointDef must have b2Body instances for its a and b properties"));
};
if ((((_local1.type == null)) || ((_local1.type == "distance")))){
buildDistanceJoint(_local1);
} else {
if (_local1.type == "revolute"){
buildRevoluteJoint(_local1);
} else {
if (_local1.type == "prismatic"){
buildPrismaticJoint(_local1);
} else {
if (_local1.type == "pulley"){
buildPullyJoint(_local1);
} else {
if (_local1.type == "gear"){
buildGearJoint(_local1);
};
};
};
};
};
if (_local1.skin){
userData = new _local1.skin();
if (!(userData is MovieClip)){
throw (new Error("Sorry, joint skins must be dynamic. If you're using a Sprite, just use a MovieClip instead."));
};
userData.startWidth = userData.width;
userData.startHeight = userData.height;
userData.p = params;
} else {
if (_local1.skin == "none"){
userData = params;
} else {
userData = params;
};
};
jointDef.collideConnected = _local1.collideConnected;
joint = w.CreateJoint(jointDef);
}
private function buildPullyJoint(_arg1:Object):void{
var _local2:b2Vec2;
var _local3:b2Vec2;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:b2PulleyJointDef;
if (_arg1.anchor1){
_local4 = _arg1.anchor1;
} else {
_local4 = _arg1.a.GetWorldCenter();
};
if (_arg1.anchor2){
_local5 = _arg1.anchor2;
} else {
_local5 = _arg1.b.GetWorldCenter();
};
if (_arg1.groundAnchor1){
_local2 = _arg1.groundAnchor1;
} else {
_local2 = new b2Vec2(_local4.x, 0);
};
if (_arg1.groundAnchor2){
_local3 = _arg1.groundAnchor2;
} else {
_local3 = new b2Vec2(_local5.x, 0);
};
jointDef = new b2PulleyJointDef();
jointDef.userData = null;
_local6 = b2PulleyJointDef(jointDef);
_local6.Initialize(_arg1.a, _arg1.b, _local2, _local3, _local4, _local5, _arg1.ratio);
if (_arg1.maxLength1){
_local6.maxLength1 = _arg1.maxLength1;
};
if (_arg1.maxLength2){
_local6.maxLength2 = _arg1.maxLength2;
};
if (_arg1.length1){
_local6.length1 = _arg1.length1;
};
if (_arg1.length2){
_local6.length2 = _arg1.length2;
};
}
private function buildRevoluteJoint(_arg1:Object):void{
var _local2:b2Vec2;
var _local3:b2RevoluteJointDef;
_local2 = _arg1.a.GetWorldCenter();
if (((!(_arg1.x1)) && (!(_arg1.y1)))){
_arg1.x1 = _local2.x;
_arg1.y1 = _local2.y;
} else {
_local2.x = _arg1.x1;
_local2.y = _arg1.y1;
};
if (_arg1.vecA == null){
_arg1.vecA = _local2;
};
if (_arg1.anchor){
_arg1.vecA = _arg1.anchor;
};
jointDef = new b2RevoluteJointDef();
jointDef.userData = null;
_local3 = b2RevoluteJointDef(jointDef);
_local3.Initialize(_arg1.a, _arg1.b, _arg1.vecA);
_local3.referenceAngle = _arg1.referenceAngle;
_local3.enableLimit = _arg1.enableLimit;
_local3.upperAngle = _arg1.upperAngle;
_local3.lowerAngle = _arg1.lowerAngle;
_local3.enableMotor = _arg1.enableMotor;
_local3.motorSpeed = _arg1.motorSpeed;
_local3.maxMotorTorque = _arg1.maxMotorTorque;
}
}
}//package com.actionsnippet.qbox.objects
Section 81
//PolyObject (com.actionsnippet.qbox.objects.PolyObject)
package com.actionsnippet.qbox.objects {
import flash.events.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
import com.actionsnippet.geom.*;
public class PolyObject extends QuickObject {
public static var tri:Triangulate = new Triangulate();
public function PolyObject(_arg1:QuickBox2D, _arg2:Object){
super(_arg1, _arg2);
}
override protected function defaultParams(_arg1:Object):void{
_arg1.verts = [[-0.5, -1, 1, -1, 1, 1, -1, 1]];
_arg1.wireframe = true;
}
override protected function build():void{
var p:Object;
var i:int;
var inc:int;
var leng:int;
var autoSkin:Boolean;
var j:int;
var poly:Array;
var pnts:Array;
var p1:Pnt;
var p2:Pnt;
var p3:Pnt;
var polyDef:b2PolygonDef;
p = params;
if (p.points){
poly = p.points;
pnts = [];
inc = 0;
leng = (poly.length - 2);
i = 0;
while (i < leng) {
pnts[inc] = new Pnt(poly[i], poly[(i + 1)]);
inc = (inc + 1);
i = (i + 2);
};
poly = PolyObject.tri.process(pnts);
inc = 0;
p.verts = [];
leng = poly.length;
i = 0;
while (i < leng) {
p1 = poly[i];
p2 = poly[(i + 1)];
p3 = poly[(i + 2)];
p.verts[inc] = [p1.x, p1.y, p2.x, p2.y, p3.x, p3.y];
inc = (inc + 1);
i = (i + 3);
};
pnts = p.points;
};
autoSkin = false;
if ((p.skin is Class)){
bodyDef.userData = new p.skin();
} else {
if ((p.skin is DisplayObject)){
bodyDef.userData = p.skin;
} else {
if (p.skin != "none"){
bodyDef.userData = new Sprite();
autoSkin = true;
if (p.points){
var _local2 = bodyDef.userData.graphics;
with (_local2) {
lineStyle(p.lineThickness, p.lineColor, p.lineAlpha);
beginFill(p.fillColor, p.fillAlpha);
moveTo((pnts[0] * 30), (pnts[1] * 30));
i = 2;
while (i < (pnts.length - 2)) {
lineTo((pnts[i] * 30), (pnts[(i + 1)] * 30));
i = (i + 2);
};
endFill();
};
};
};
};
};
body = w.CreateBody(bodyDef);
shapeDef = [];
j = 0;
while (j < p.verts.length) {
polyDef = new b2PolygonDef();
shapeDef.push(polyDef);
polyDef.vertexCount = int((p.verts[j].length / 2));
if ((p.verts[j][i] is b2Vec2)){
polyDef.vertices = p.verts[j];
} else {
inc = 0;
i = 0;
while (i < p.verts[j].length) {
polyDef.vertices[inc].Set(p.verts[j][i], p.verts[j][(i + 1)]);
inc = (inc + 1);
i = (i + 2);
};
};
polyDef.density = p.density;
polyDef.friction = p.friction;
polyDef.restitution = p.restitution;
polyDef.filter.maskBits = p.maskBits;
polyDef.filter.categoryBits = p.categoryBits;
polyDef.filter.groupIndex = p.groupIndex;
if (((autoSkin) && (p.wireframe))){
_local2 = bodyDef.userData.graphics;
with (_local2) {
lineStyle(p.lineThickness, p.lineColor, p.lineAlpha);
beginFill(p.fillColor, p.fillAlpha);
};
i = 0;
while (i < polyDef.vertexCount) {
_local2 = bodyDef.userData.graphics;
with (_local2) {
if (i == 0){
moveTo((polyDef.vertices[i].x * 30), (polyDef.vertices[i].y * 30));
} else {
lineTo((polyDef.vertices[i].x * 30), (polyDef.vertices[i].y * 30));
};
};
i = (i + 1);
};
bodyDef.userData.graphics.endFill();
};
shape = body.CreateShape(polyDef);
j = (j + 1);
};
}
}
}//package com.actionsnippet.qbox.objects
Section 82
//QuickBox2D (com.actionsnippet.qbox.QuickBox2D)
package com.actionsnippet.qbox {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
import com.actionsnippet.qbox.objects.*;
public class QuickBox2D extends EventDispatcher {
private var _mouseJoint:b2MouseJoint;
private var _currTime:Number;
public var worldAABB:b2AABB;
private var _gravity:b2Vec2;
private var render:Event;
private var _mouseY:Number;
private var timeStepCallbacks:Array;
private var _elapsedTime:Number;
private var _mouseX:Number;
private var _defaults:Object;
public var iterations:int;// = 20
public var main:MovieClip;
private var _renderJoints:Boolean;// = true
private var _quickObjects:Dictionary;
public var timeStep:Number;// = 0.0166666666666667
private var step:Event;
var dragging:Boolean;// = false
var debug:Boolean;
private var _simpleRender:Boolean;// = true
private var _mousePVec:b2Vec2;
var destroyable:Array;
private var _accumulator:Number;// = 0
public var frim:Boolean;
private var contactListener:b2ContactListener;
private var _customMouse:Boolean;// = false
public var totalTimeSteps:int;// = 0
public var w:b2World;
private var _prevTime:Number;// = 0
public static var REVOLUTE:String = "revolute";
public static var PRISMATIC:String = "prismatic";
public static var GEAR:String = "gear";
public static var STEP:String = "step";
public static var DISTANCE:String = "distance";
public static var PULLEY:String = "pulley";
public function QuickBox2D(_arg1:MovieClip, _arg2:Object=null){
iterations = 20;
timeStep = (1 / 60);
_simpleRender = true;
_renderJoints = true;
_defaults = new Object();
_customMouse = false;
_mousePVec = new b2Vec2();
_quickObjects = new Dictionary(true);
destroyable = [];
render = new Event("render");
dragging = false;
_prevTime = 0;
_accumulator = 0;
totalTimeSteps = 0;
step = new Event("step");
timeStepCallbacks = [];
super();
this.main = _arg1;
init(_arg2);
}
public function mouseDrag():void{
var _local1:QuickObject;
dragging = true;
for each (_local1 in _quickObjects) {
_local1.handCursor();
};
main.stage.addEventListener(MouseEvent.MOUSE_DOWN, createMouse);
main.stage.addEventListener(MouseEvent.MOUSE_UP, destroyMouse);
main.stage.addEventListener(Event.MOUSE_LEAVE, destroyMouse);
}
public function stop():void{
main.removeEventListener(Event.ENTER_FRAME, onRender);
}
public function updateMouse():void{
var _local1:b2Vec2;
if (_mouseJoint){
_local1 = new b2Vec2((_mouseX / 30), (_mouseY / 30));
_mouseJoint.SetTarget(_local1);
};
}
private function init(_arg1:Object=null):void{
var _local2:Object;
var _local3:String;
var _local4:Sprite;
var _local5:b2DebugDraw;
var _local6:Sprite;
_local2 = {gravityX:0, gravityY:20, iterations:iterations, timeStep:timeStep, bounds:[-100, -100, 100, 100], debug:false, simpleRender:_simpleRender, renderJoints:true, frim:true, customMouse:false};
if (_arg1 == null){
_arg1 = new Object();
};
for (_local3 in _local2) {
if (_arg1[_local3] == null){
_arg1[_local3] = _local2[_local3];
};
};
_customMouse = _arg1.customMouse;
frim = _arg1.frim;
_simpleRender = _arg1.simpleRender;
_renderJoints = _arg1.renderJoints;
iterations = _arg1.iterations;
timeStep = _arg1.timeStep;
debug = _arg1.debug;
_local4 = new Sprite();
main.addChild(_local4);
if (debug){
_local4.graphics.beginFill(0x333333);
_local4.graphics.drawRect(0, 0, main.stage.stageWidth, main.stage.stageHeight);
};
worldAABB = new b2AABB();
worldAABB.lowerBound.Set(_arg1.bounds[0], _arg1.bounds[1]);
worldAABB.upperBound.Set(_arg1.bounds[2], _arg1.bounds[3]);
_gravity = new b2Vec2(_arg1.gravityX, _arg1.gravityY);
w = new b2World(worldAABB, _gravity, true);
if (debug){
_local5 = new b2DebugDraw();
_local6 = new Sprite();
main.addChild(_local6);
_local5.m_sprite = _local6;
_local5.m_drawScale = 30;
_local5.m_fillAlpha = 0.5;
_local5.m_alpha = 0.5;
_local5.m_lineThickness = 1;
_local5.m_drawFlags = (b2DebugDraw.e_shapeBit | b2DebugDraw.e_jointBit);
w.SetDebugDraw(_local5);
};
}
public function addContactListener():QuickContacts{
contactListener = new QuickContacts();
w.SetContactListener(contactListener);
return (QuickContacts(contactListener));
}
public function setDefault(_arg1:Object=null):void{
_defaults = _arg1;
}
private function GetBodyAtMouse(_arg1:Boolean=false):b2Body{
var _local2:Number;
var _local3:Number;
var _local4:b2AABB;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:b2Body;
var _local9:int;
var _local10:b2Shape;
var _local11:Boolean;
_local2 = (_mouseX / 30);
_local3 = (_mouseY / 30);
_mousePVec.Set(_local2, _local3);
_local4 = new b2AABB();
_local4.lowerBound.Set((_local2 - 0.001), (_local3 - 0.001));
_local4.upperBound.Set((_local2 + 0.001), (_local3 + 0.001));
_local5 = 10;
_local6 = new Array();
_local7 = w.Query(_local4, _local6, _local5);
_local8 = null;
_local9 = 0;
while (_local9 < _local7) {
if ((((_local6[_local9].GetBody().IsStatic() == false)) || (_arg1))){
_local10 = (_local6[_local9] as b2Shape);
_local11 = (_local6[_local9] as b2Shape).TestPoint(_local10.GetBody().GetXForm(), _mousePVec);
if (_local11){
_local8 = _local10.GetBody();
break;
};
};
_local9++;
};
return (_local8);
}
public function set gravity(_arg1:b2Vec2):void{
_gravity = _arg1;
w.SetGravity(_gravity);
}
private function onTraceMouse(_arg1:Event):void{
trace("Mouse: ", (main.mouseX / 30).toFixed(2), (main.mouseY / 30).toFixed(2));
}
private function onDown(_arg1:MouseEvent):void{
main.addEventListener(Event.ENTER_FRAME, onTraceMouse);
}
public function addJoint(_arg1:Object):QuickObject{
return (create("joint", _arg1));
}
public function createStageWalls(_arg1:Object=null):void{
var _local2:Object;
var _local3:String;
var _local4:Number;
var _local5:Number;
_local2 = _arg1;
if (_local2 == null){
_local2 = new Object();
};
for (_local3 in _defaults) {
if (_local2[_local3] == null){
_local2[_local3] = _defaults[_local3];
};
};
_local4 = (main.stage.stageWidth / 30);
_local5 = (main.stage.stageHeight / 30);
if ((((_local2.bottom == true)) || ((_local2.bottom == null)))){
addBox({x:(_local4 / 2), y:_local5, width:(_local4 - 1), height:1, density:0, lineThickness:_local2.lineThickness, lineColor:_local2.lineColor, lineAlpha:_local2.lineAlpha, fillColor:_local2.fillColor, fillAlpha:_local2.fillAllpha});
};
if ((((_local2.top == true)) || ((_local2.top == null)))){
addBox({x:(_local4 / 2), y:0, width:(_local4 - 1), height:1, density:0, lineThickness:_local2.lineThickness, lineColor:_local2.lineColor, lineAlpha:_local2.lineAlpha, fillColor:_local2.fillColor, fillAlpha:_local2.fillAllpha});
};
if ((((_local2.left == true)) || ((_local2.left == null)))){
addBox({x:0, y:(_local5 / 2), width:1, height:_local5, density:0, lineThickness:_local2.lineThickness, lineColor:_local2.lineColor, lineAlpha:_local2.lineAlpha, fillColor:_local2.fillColor, fillAlpha:_local2.fillAllpha});
};
if ((((_local2.right == true)) || ((_local2.right == null)))){
addBox({x:_local4, y:(_local5 / 2), width:1, height:_local5, density:0, lineThickness:_local2.lineThickness, lineColor:_local2.lineColor, lineAlpha:_local2.lineAlpha, fillColor:_local2.fillColor, fillAlpha:_local2.fillAllpha});
};
}
public function create(_arg1:String, _arg2:Object):QuickObject{
var _local3:QuickObject;
if (_arg1 == "box"){
_local3 = new BoxObject(this, _arg2);
_quickObjects[_local3.body] = _local3;
} else {
if (_arg1 == "circle"){
_local3 = new CircleObject(this, _arg2);
_quickObjects[_local3.body] = _local3;
} else {
if (_arg1 == "poly"){
_local3 = new PolyObject(this, _arg2);
_quickObjects[_local3.body] = _local3;
} else {
if (_arg1 == "joint"){
_local3 = new JointObject(this, _arg2);
_quickObjects[_local3.joint] = _local3;
} else {
if (_arg1 == "group"){
_local3 = new GroupObject(this, _arg2);
_quickObjects[_local3.body] = _local3;
} else {
throw (new Error((("QuickBox2D: Sorry, there is no QuickObject subclass for " + _arg1) + " types.")));
};
};
};
};
};
return (_local3);
}
function defaultParams(_arg1:Object):void{
var _local2:String;
if (_arg1 == null){
_arg1 = new Object();
};
for (_local2 in _defaults) {
if (_arg1[_local2] == null){
_arg1[_local2] = _defaults[_local2];
};
};
}
public function addPoly(_arg1:Object):QuickObject{
return (create("poly", _arg1));
}
public function setMouse(_arg1:Number, _arg2:Number):void{
_mouseX = _arg1;
_mouseY = _arg2;
}
private function destroyMouse(_arg1):void{
if (_mouseJoint){
w.DestroyJoint(_mouseJoint);
_mouseJoint = null;
};
}
public function get gravity():b2Vec2{
return (_gravity);
}
public function grid(_arg1:int=30, _arg2:uint=0xFFFF00, _arg3:Number=1):void{
var _local4:Sprite;
var _local5:int;
_local4 = new Sprite();
main.addChild(_local4);
_local4.graphics.lineStyle(0, _arg2, _arg3);
_local5 = 0;
while (_local5 < main.stage.stageWidth) {
_local4.graphics.moveTo(_local5, 0);
_local4.graphics.lineTo(_local5, main.stage.stageHeight);
_local5 = (_local5 + _arg1);
};
_local5 = 0;
while (_local5 < main.stage.stageHeight) {
_local4.graphics.moveTo(0, _local5);
_local4.graphics.lineTo(main.stage.stageWidth, _local5);
_local5 = (_local5 + _arg1);
};
}
public function addCircle(_arg1:Object):QuickObject{
return (create("circle", _arg1));
}
private function onUp(_arg1:MouseEvent):void{
main.removeEventListener(Event.ENTER_FRAME, onTraceMouse);
}
protected function onRender(_arg1:Event):void{
var _local2:int;
var _local3:int;
var _local4:TimeStepCallback;
if (frim == true){
_currTime = getTimer();
_elapsedTime = ((_currTime - _prevTime) * 0.001);
_prevTime = _currTime;
if (_elapsedTime > 0.25){
_elapsedTime = 0.25;
};
_accumulator = (_accumulator + _elapsedTime);
while (_accumulator >= timeStep) {
w.Step(timeStep, iterations);
dispatchEvent(step);
_accumulator = (_accumulator - timeStep);
totalTimeSteps++;
_local3 = timeStepCallbacks.length;
_local2 = 0;
while (_local2 < _local3) {
_local4 = timeStepCallbacks[_local2];
if (_local4.time == totalTimeSteps){
_local4.callback.apply(null, _local4.args);
};
_local2++;
};
};
} else {
w.Step(timeStep, iterations);
dispatchEvent(step);
totalTimeSteps++;
_local2 = 0;
while (_local2 < _local3) {
_local4 = timeStepCallbacks[_local2];
if (_local4.time == totalTimeSteps){
_local4.callback.apply(null, _local4.args);
};
_local2++;
};
};
_local3 = destroyable.length;
_local2 = 0;
while (_local2 < _local3) {
destroyable[_local2].fullDestroy();
_local2++;
};
destroyable = [];
if (!_customMouse){
setMouse(main.mouseX, main.mouseY);
};
updateMouse();
if (_simpleRender){
updateBodies();
};
dispatchEvent(render);
}
public function createMouse(_arg1:MouseEvent):void{
var _local2:b2Body;
var _local3:b2MouseJointDef;
_local2 = GetBodyAtMouse();
if (_quickObjects[_local2]){
if (((_local2) && ((_quickObjects[_local2].params.draggable == true)))){
_local3 = new b2MouseJointDef();
_local3.body1 = w.GetGroundBody();
_local3.body2 = _local2;
_local3.target.Set((_mouseX / 30), (_mouseY / 30));
_local3.maxForce = 3000;
_local3.timeStep = timeStep;
_mouseJoint = (w.CreateJoint(_local3) as b2MouseJoint);
};
} else {
if (_local2){
_local3 = new b2MouseJointDef();
_local3.body1 = w.GetGroundBody();
_local3.body2 = _local2;
_local3.target.Set((_mouseX / 30), (_mouseY / 30));
_local3.maxForce = 3000;
_local3.timeStep = timeStep;
_mouseJoint = (w.CreateJoint(_local3) as b2MouseJoint);
};
};
}
public function addGroup(_arg1:Object):QuickObject{
return (create("group", _arg1));
}
public function traceMouse():void{
main.stage.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
main.stage.addEventListener(MouseEvent.MOUSE_UP, onUp);
}
public function start():void{
_prevTime = getTimer();
main.addEventListener(Event.ENTER_FRAME, onRender);
}
public function addBox(_arg1:Object):QuickObject{
return (create("box", _arg1));
}
public function updateBodies():void{
var _local1:b2Body;
var _local2:b2Joint;
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2XForm;
var _local6:b2XForm;
var _local7:b2Vec2;
var _local8:b2Vec2;
var _local9:b2Vec2;
var _local10:b2Vec2;
var _local11:*;
var _local12:b2PulleyJoint;
var _local13:b2Vec2;
var _local14:b2Vec2;
_local1 = w.m_bodyList;
while (_local1) {
if ((_local1.m_userData is Sprite)){
_local1.m_userData.x = (_local1.GetPosition().x * 30);
_local1.m_userData.y = (_local1.GetPosition().y * 30);
_local1.m_userData.rotation = (_local1.GetAngle() * (180 / Math.PI));
};
_local1 = _local1.m_next;
};
if (_renderJoints){
main.graphics.clear();
_local2 = w.m_jointList;
while (_local2) {
_local3 = _local2.m_body1;
_local4 = _local2.m_body2;
_local5 = _local3.m_xf;
_local6 = _local4.m_xf;
_local7 = _local5.position;
_local8 = _local6.position;
_local9 = _local2.GetAnchor1();
_local10 = _local2.GetAnchor2();
_local11 = _local2.GetUserData();
if (!(_local2 is b2MouseJoint)){
if (_local11.skin != "none"){
if ((_local2 is b2PulleyJoint)){
main.graphics.lineStyle(_local11.lineThickness, _local11.lineColor, _local11.lineAlpha);
_local12 = (_local2 as b2PulleyJoint);
_local13 = _local12.GetGroundAnchor1();
_local14 = _local12.GetGroundAnchor2();
main.graphics.moveTo((_local13.x * 30), (_local13.y * 30));
main.graphics.lineTo((_local9.x * 30), (_local9.y * 30));
main.graphics.moveTo((_local14.x * 30), (_local14.y * 30));
main.graphics.lineTo((_local10.x * 30), (_local10.y * 30));
main.graphics.moveTo((_local13.x * 30), (_local13.y * 30));
main.graphics.lineTo((_local14.x * 30), (_local14.y * 30));
} else {
if ((_local2 is b2DistanceJoint)){
if ((_local11 is MovieClip)){
_local11.x = (_local9.x * 30);
_local11.y = (_local9.y * 30);
_local11.scaleX = (((_local10.x * 30) - _local11.x) / _local11.startWidth);
_local11.scaleY = (((_local10.y * 30) - _local11.y) / _local11.startHeight);
} else {
main.graphics.lineStyle(_local11.lineThickness, _local11.lineColor, _local11.lineAlpha);
main.graphics.moveTo((_local9.x * 30), (_local9.y * 30));
main.graphics.lineTo((_local10.x * 30), (_local10.y * 30));
};
} else {
main.graphics.lineStyle(_local11.lineThickness, _local11.lineColor, _local11.lineAlpha);
if (_local3 != w.m_groundBody){
main.graphics.moveTo((_local7.x * 30), (_local7.y * 30));
main.graphics.lineTo((_local9.x * 30), (_local9.y * 30));
};
main.graphics.moveTo((_local9.x * 30), (_local9.y * 30));
main.graphics.lineTo((_local10.x * 30), (_local10.y * 30));
if (_local4 != w.m_groundBody){
main.graphics.moveTo((_local8.x * 30), (_local8.y * 30));
main.graphics.lineTo((_local10.x * 30), (_local10.y * 30));
};
};
};
};
};
_local2 = _local2.m_next;
};
};
}
public function destroy():void{
main.stage.removeEventListener(MouseEvent.MOUSE_DOWN, createMouse);
main.stage.removeEventListener(MouseEvent.MOUSE_UP, destroyMouse);
main.removeEventListener(Event.ENTER_FRAME, onRender);
main.stage.removeEventListener(MouseEvent.MOUSE_DOWN, onDown);
main.stage.removeEventListener(MouseEvent.MOUSE_UP, onUp);
}
public function addTimeStepSequence(... _args):void{
var _local2:int;
var _local3:Function;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:String;
_local5 = 0;
_local6 = 0;
while (_local6 < _args.length) {
_local5 = 0;
_local4 = [];
for (_local7 in _args[_local6]) {
if (_local7 == "time"){
_local2 = _args[_local6][_local7];
_local5++;
} else {
if (_local7 == "callback"){
_local3 = _args[_local6][_local7];
_local5++;
} else {
if (_local7 == "args"){
_local4 = _args[_local6][_local7];
_local5++;
};
};
};
if ((((_local5 == 3)) || ((((_args[_local6].args == undefined)) && ((_local5 == 2)))))){
timeStepCallbacks.push(new TimeStepCallback(_local2, _local3, _local4));
};
};
_local6++;
};
}
}
}//package com.actionsnippet.qbox
class TimeStepCallback {
public var args:Array;
public var callback:Function;
public var time:int;
private function TimeStepCallback(_arg1:int, _arg2:Function, _arg3:Array){
time = _arg1;
callback = _arg2;
args = _arg3;
}
}
Section 83
//QuickContacts (com.actionsnippet.qbox.QuickContacts)
package com.actionsnippet.qbox {
import flash.events.*;
import Box2D.Collision.*;
import Box2D.Dynamics.Contacts.*;
import Box2D.Dynamics.*;
public class QuickContacts extends b2ContactListener implements IEventDispatcher {
private var contactRemove:Event;
private var contactPersist:Event;
public var currentPoint:b2ContactPoint;
private var contactResult:Event;
private var contactAdd:Event;
public var dispatcher:EventDispatcher;
public var currentResult:b2ContactResult;
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const PERSIST:String = "persist";
public static const RESULT:String = "result";
public function QuickContacts(){
contactAdd = new Event("add");
contactRemove = new Event("remove");
contactPersist = new Event("persist");
contactResult = new Event("result");
super();
dispatcher = new EventDispatcher(this);
}
public function dispatchEvent(_arg1:Event):Boolean{
return (dispatcher.dispatchEvent(_arg1));
}
public function hasEventListener(_arg1:String):Boolean{
return (dispatcher.hasEventListener(_arg1));
}
public function willTrigger(_arg1:String):Boolean{
return (dispatcher.willTrigger(_arg1));
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
dispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4);
}
override public function Add(_arg1:b2ContactPoint):void{
currentPoint = _arg1;
dispatcher.dispatchEvent(contactAdd);
}
override public function Remove(_arg1:b2ContactPoint):void{
currentPoint = _arg1;
dispatcher.dispatchEvent(contactRemove);
}
public function isCurrentContact(_arg1:QuickObject, _arg2:QuickObject):Boolean{
var _local3:b2Body;
var _local4:b2Body;
var _local5:b2Body;
var _local6:b2Body;
_local3 = currentPoint.shape1.GetBody();
_local4 = currentPoint.shape2.GetBody();
_local5 = _arg1.body;
_local6 = _arg2.body;
if (_local3 == _local5){
if (_local4 == _local6){
return (true);
};
} else {
if (_local3 == _local6){
if (_local4 == _local5){
return (true);
};
};
};
return (false);
}
override public function Persist(_arg1:b2ContactPoint):void{
currentPoint = _arg1;
dispatcher.dispatchEvent(contactPersist);
}
public function inCurrentContact(_arg1:QuickObject):Boolean{
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2Body;
_local2 = currentPoint.shape1.GetBody();
_local3 = currentPoint.shape2.GetBody();
_local4 = _arg1.body;
if (_local4 == _local2){
return (true);
};
if (_local4 == _local3){
return (true);
};
return (false);
}
override public function Result(_arg1:b2ContactResult):void{
currentResult = _arg1;
dispatcher.dispatchEvent(contactResult);
}
}
}//package com.actionsnippet.qbox
Section 84
//QuickObject (com.actionsnippet.qbox.QuickObject)
package com.actionsnippet.qbox {
import flash.events.*;
import flash.display.*;
import Box2D.Common.Math.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Dynamics.*;
import Box2D.Dynamics.Joints.*;
public class QuickObject {
private var loc:b2Vec2;
public var bodyDef:b2BodyDef;
protected var qbox:QuickBox2D;
public var joint:b2Joint;
public var params:Object;
protected var defaults:Object;
public var shape:b2Shape;
public var body:b2Body;
public var shapeDef;
protected var w:b2World;
protected var type:String;
public function QuickObject(_arg1:QuickBox2D, _arg2:Object=null){
init(_arg1, _arg2);
}
final private function init(_arg1:QuickBox2D, _arg2:Object=null):void{
var _local3:b2MassData;
this.qbox = _arg1;
this.params = _arg2;
defineDefaults();
setDefaults();
if (_arg2.vecA == null){
setupBodyDef(_arg2);
};
this.w = _arg1.w;
build();
if (!_arg1.debug){
if ((userData is DisplayObject)){
userData.x = (_arg2.x * 30);
userData.y = (_arg2.y * 30);
userData.rotation = ((_arg2.angle / Math.PI) * 180);
_arg1.main.addChild(userData);
};
};
if (body != null){
if (_arg2.mass != null){
body.SetMassFromShapes();
_local3 = new b2MassData();
_local3.mass = _arg2.mass;
_local3.center = body.GetLocalCenter();
_local3.I = body.m_I;
body.SetMass(_local3);
} else {
body.SetMassFromShapes();
};
};
}
public function get angle():Number{
return (body.GetAngle());
}
public function get userData(){
return (body.m_userData);
}
private function setDefaults():void{
var _local1:String;
if (params == null){
params = new Object();
};
for (_local1 in defaults) {
if (params[_local1] == null){
params[_local1] = defaults[_local1];
};
};
}
final public function destroy():void{
qbox.destroyable.push(this);
}
private function setupBodyDef(_arg1:Object):void{
bodyDef = new b2BodyDef();
if (!(_arg1.skin is DisplayObject)){
bodyDef.position.x = _arg1.x;
bodyDef.position.y = _arg1.y;
bodyDef.angle = _arg1.angle;
} else {
bodyDef.position.x = (_arg1.skin.x / 30);
bodyDef.position.y = (_arg1.skin.y / 30);
bodyDef.angle = ((_arg1.skin.rotation * Math.PI) / 180);
};
loc = new b2Vec2(_arg1.x, _arg1.y);
bodyDef.linearDamping = _arg1.linearDamping;
bodyDef.angularDamping = _arg1.angularDamping;
bodyDef.fixedRotation = _arg1.fixedRotation;
bodyDef.isBullet = _arg1.isBullet;
bodyDef.isSleeping = _arg1.isSleeping;
bodyDef.allowSleep = _arg1.allowSleep;
}
function handCursor():void{
if (!qbox.debug){
if ((userData is DisplayObject)){
if ((((params.draggable == true)) && (!((params.density == 0))))){
userData.buttonMode = true;
};
};
};
}
public function set angle(_arg1:Number):void{
loc = body.GetPosition();
body.SetXForm(loc, _arg1);
}
protected function defaultParams(_arg1:Object):void{
}
public function set userData(_arg1){
body.m_userData = _arg1;
}
private function defineDefaults():void{
defaults = {x:3, y:3, linearDamping:0, angularDamping:0, isBullet:false, fixedRotation:false, allowSleep:true, isSleeping:false, density:1, friction:0.5, restitution:0.2, angle:0, maskBits:0xFFFF, categoryBits:1, groupIndex:0, draggable:true, lineColor:0, lineAlpha:1, lineThickness:0, fillColor:0xCCCCCC, fillAlpha:1};
defaultParams(defaults);
qbox.defaultParams(params);
}
public function set x(_arg1:Number):void{
loc = body.GetPosition();
loc.x = _arg1;
body.SetXForm(loc, body.GetAngle());
}
final public function fullDestroy():void{
if (shape){
body.DestroyShape(shape);
w.DestroyBody(body);
};
if (joint){
w.DestroyJoint((joint as b2Joint));
};
if ((userData is DisplayObject)){
if (userData.parent){
userData.parent.removeChild(userData);
};
};
}
public function set y(_arg1:Number):void{
loc = body.GetPosition();
loc.y = _arg1;
body.SetXForm(loc, body.GetAngle());
}
protected function build():void{
trace("You must override the build() method of QuickObject");
}
public function get x():Number{
return (body.GetPosition().x);
}
public function get y():Number{
return (body.GetPosition().y);
}
public function setLoc(_arg1:Number, _arg2:Number):void{
loc.x = _arg1;
loc.y = _arg2;
body.SetXForm(loc, body.GetAngle());
}
}
}//package com.actionsnippet.qbox
Section 85
//AwardsService (com.spilgames.api.AwardsService)
package com.spilgames.api {
public class AwardsService {
public static function submitAward(_arg1:String, _arg2:Function=null):int{
return (SpilGamesServices.getInstance().send("Awards", "submitAward", _arg2, {tag:_arg1, userName:User.getUserName(), userHash:User.getUserHash()}));
}
}
}//package com.spilgames.api
Section 86
//SpilGamesServices (com.spilgames.api.SpilGamesServices)
package com.spilgames.api {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class SpilGamesServices extends MovieClip {
private var DEFAULT_CONNECTION_LOCATION:String;// = "http://www8.agame.com/games/flash/services/ServicesConnection.swf"
private var _loader:Loader;
private var _connecting:Boolean;// = false
private var _servicesConnection;// = null
private var _connected:Boolean;// = false
public static const INVALID_ID:int = -1;
private static var _instance:SpilGamesServices = null;
public function SpilGamesServices(_arg1:Private=null){
DEFAULT_CONNECTION_LOCATION = "http://www8.agame.com/games/flash/services/ServicesConnection.swf";
_servicesConnection = null;
_connecting = false;
_connected = false;
super();
if (!_arg1){
throw (new Error("Cannot instantiate this class, use SpilGamesServices.getInstance"));
};
}
public function get version():String{
return ("1.0");
}
private function handleRemovedFromStage(_arg1:Event):void{
trace("WARNING: please do not remove SpilGamesServices from the stage");
}
private function handleIOError(_arg1:IOErrorEvent):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connecting = false;
if (hasEventListener(_arg1.type)){
dispatchEvent(_arg1);
};
}
public function allowDomain(_arg1:String):void{
Security.allowDomain("*");
Security.allowInsecureDomain("*");
}
public function getItemID():int{
if (_servicesConnection != null){
return (_servicesConnection.getItemID());
};
return (INVALID_ID);
}
public function bringToFront(_arg1:Event=null):void{
var e = _arg1;
if (parent){
try {
parent.setChildIndex(this, (parent.numChildren - 1));
} catch(e:Error) {
removeEventListener(Event.ENTER_FRAME, bringToFront);
};
};
}
private function handleLoadComplete(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_servicesConnection = LoaderInfo(_arg1.target).content;
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
addChild(_servicesConnection);
}
public function send(_arg1:String, _arg2:String, _arg3:Function, _arg4:Object=null):int{
if (isReady()){
return (_servicesConnection.send(_arg1, _arg2, _arg3, _arg4));
};
return (INVALID_ID);
}
public function getSiteID():int{
if (_servicesConnection != null){
return (_servicesConnection.getSiteID());
};
return (INVALID_ID);
}
public function isReady():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isReady())));
}
public function isDomainAllowed():Boolean{
return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid())));
}
public function getChannelID():int{
if (_servicesConnection != null){
return (_servicesConnection.getChannelID());
};
return (INVALID_ID);
}
private function handleServicesReady(_arg1:Event):void{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_connected = true;
_connecting = false;
dispatchEvent(new Event("servicesReady"));
}
private function handleServiceError(_arg1:Event):void{
var _local2:String;
if (hasEventListener("serviceError")){
_local2 = "";
if ((_arg1 is ErrorEvent)){
_local2 = ErrorEvent(_arg1).text;
} else {
_local2 = _arg1.toString();
};
dispatchEvent(new ErrorEvent("serviceError", false, false, _local2));
};
}
public function disconnect():void{
if (_servicesConnection){
_servicesConnection.removeEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.removeEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.removeEventListener("serviceError", handleServiceError);
if (_connected){
_servicesConnection.disconnect();
};
removeChild(_servicesConnection);
};
_servicesConnection = null;
if (_loader){
try {
_loader.close();
} catch(e:Error) {
} finally {
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError);
};
_loader = null;
};
removeEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (parent){
parent.removeChild(this);
};
_connected = (_connecting = false);
}
private function handleServicesFailed(_arg1:ErrorEvent):void{
_servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady);
_servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed);
_servicesConnection.addEventListener("serviceError", handleServiceError);
_connecting = false;
if (hasEventListener("servicesFailed")){
dispatchEvent(new ErrorEvent("servicesFailed", false, false, _arg1.text));
};
}
public function get connecting():Boolean{
return (_connecting);
}
public function get connection(){
return (_servicesConnection);
}
public function connect(_arg1:DisplayObjectContainer):void{
var _local2:URLRequest;
var _local3:String;
var _local4:URLVariables;
var _local5:Date;
if (((!(_connecting)) && (!(_connected)))){
if (!_arg1.stage){
throw (new Error("The given clip must be present in the display list (added to stage)"));
};
_connecting = true;
_arg1.stage.addChild(this);
addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage);
if (((root.loaderInfo.parameters["servicesLoc"]) && ((root.loaderInfo.parameters["servicesLoc"].length > 0)))){
_local3 = root.loaderInfo.parameters["servicesLoc"];
_local2 = new URLRequest(_local3);
} else {
_local3 = DEFAULT_CONNECTION_LOCATION;
_local4 = new URLVariables();
_local5 = new Date();
_local4.nocache = (((_local5.month + 1) * 31) + _local5.day);
_local2 = new URLRequest(_local3);
_local2.data = _local4;
};
allowDomain(_local3);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
_loader.load(_local2);
};
}
public static function getInstance():SpilGamesServices{
if (!_instance){
_instance = new SpilGamesServices(new Private());
};
return (_instance);
}
}
}//package com.spilgames.api
class Private {
private function Private(){
}
}
Section 87
//User (com.spilgames.api.User)
package com.spilgames.api {
import flash.display.*;
public class User {
public static function getUserName():String{
var _local1:*;
_local1 = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.getUserName());
};
return ("");
}
public static function isGuest():Boolean{
var _local1:*;
var _local2:DisplayObject;
var _local3:Object;
_local1 = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.isGuest());
};
_local2 = SpilGamesServices.getInstance().root;
if (_local2.loaderInfo != null){
_local3 = _local2.loaderInfo.parameters;
return (((((((!(_local3.username)) || ((_local3.username == "")))) || (!(_local3.hash)))) || ((_local3.hash == ""))));
};
return (false);
}
public static function getUserHash():String{
var _local1:*;
_local1 = SpilGamesServices.getInstance().connection;
if (_local1 != null){
return (_local1.getUserHash());
};
return ("");
}
}
}//package com.spilgames.api
Section 88
//CPopUp_266 (crazycraft_fla.CPopUp_266)
package crazycraft_fla {
import flash.display.*;
public dynamic class CPopUp_266 extends MovieClip {
public var okBtn:SimpleButton;
}
}//package crazycraft_fla
Section 89
//CPreloader_1 (crazycraft_fla.CPreloader_1)
package crazycraft_fla {
import flash.display.*;
import flash.text.*;
public dynamic class CPreloader_1 extends MovieClip {
public var loaded:TextField;
public var bar:MovieClip;
}
}//package crazycraft_fla
Section 90
//CTrack002_lowrise_BITMAP_92 (crazycraft_fla.CTrack002_lowrise_BITMAP_92)
package crazycraft_fla {
import flash.display.*;
import script.tracks.*;
public dynamic class CTrack002_lowrise_BITMAP_92 extends MovieClip {
public var bg:CLevelBG02;
}
}//package crazycraft_fla
Section 91
//CTreeMC_303 (crazycraft_fla.CTreeMC_303)
package crazycraft_fla {
import flash.display.*;
public dynamic class CTreeMC_303 extends MovieClip {
public var trunk:MovieClip;
public var rot:MovieClip;
}
}//package crazycraft_fla
Section 92
//CTrunk_305 (crazycraft_fla.CTrunk_305)
package crazycraft_fla {
import flash.display.*;
public dynamic class CTrunk_305 extends MovieClip {
public function CTrunk_305(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
stop();
}
function frame60(){
stop();
}
}
}//package crazycraft_fla
Section 93
//flag_icon_340 (crazycraft_fla.flag_icon_340)
package crazycraft_fla {
import flash.display.*;
public dynamic class flag_icon_340 extends MovieClip {
public function flag_icon_340(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package crazycraft_fla
Section 94
//l_br_338 (crazycraft_fla.l_br_338)
package crazycraft_fla {
import flash.display.*;
import flash.text.*;
public dynamic class l_br_338 extends MovieClip {
public var text:TextField;
public var flag:MovieClip;
}
}//package crazycraft_fla
Section 95
//mcdec1_121 (crazycraft_fla.mcdec1_121)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec1_121 extends MovieClip {
public var a:LocalizedTextField;
public function mcdec1_121(){
__setProp_a_mcdec1_Layer1_1();
}
function __setProp_a_mcdec1_Layer1_1(){
try {
a["componentInspectorSetting"] = true;
} catch(e:Error) {
};
a.text = "{txt_lvldesc1}";
a.textColor = 0xFF00;
a.textSize = 12;
a.bold = false;
a.disableWordwrap = false;
a.embedFonts = true;
a.font = "Times New Roman";
a.hAlign = "center";
a.multiline = true;
a.vAlign = "top";
a.antiAliasType = "advanced";
a.glowBlur = 3;
a.glowColor = 0;
a.useGlowFilter = false;
a.glowQuality = 1;
a.glowStrength = 5;
a.gridFitType = "pixel";
a.italic = false;
a.selectable = false;
a.underline = false;
try {
a["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 96
//mcdec10_130 (crazycraft_fla.mcdec10_130)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec10_130 extends MovieClip {
public var __id40_:LocalizedTextField;
public function mcdec10_130(){
__setProp___id40__mcdec10_Layer1_1();
}
function __setProp___id40__mcdec10_Layer1_1(){
try {
__id40_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id40_.text = "{txt_lvldesc10}";
__id40_.textColor = 0xFF00;
__id40_.textSize = 12;
__id40_.bold = false;
__id40_.disableWordwrap = false;
__id40_.embedFonts = true;
__id40_.font = "Times New Roman";
__id40_.hAlign = "center";
__id40_.multiline = true;
__id40_.vAlign = "top";
__id40_.antiAliasType = "advanced";
__id40_.glowBlur = 3;
__id40_.glowColor = 0;
__id40_.useGlowFilter = false;
__id40_.glowQuality = 1;
__id40_.glowStrength = 5;
__id40_.gridFitType = "pixel";
__id40_.italic = false;
__id40_.selectable = false;
__id40_.underline = false;
try {
__id40_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 97
//mcdec11_131 (crazycraft_fla.mcdec11_131)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec11_131 extends MovieClip {
public var __id41_:LocalizedTextField;
public function mcdec11_131(){
__setProp___id41__mcdec11_Layer1_1();
}
function __setProp___id41__mcdec11_Layer1_1(){
try {
__id41_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id41_.text = "{txt_lvldesc11}";
__id41_.textColor = 0xFF00;
__id41_.textSize = 12;
__id41_.bold = false;
__id41_.disableWordwrap = false;
__id41_.embedFonts = true;
__id41_.font = "Times New Roman";
__id41_.hAlign = "center";
__id41_.multiline = true;
__id41_.vAlign = "top";
__id41_.antiAliasType = "advanced";
__id41_.glowBlur = 3;
__id41_.glowColor = 0;
__id41_.useGlowFilter = false;
__id41_.glowQuality = 1;
__id41_.glowStrength = 5;
__id41_.gridFitType = "pixel";
__id41_.italic = false;
__id41_.selectable = false;
__id41_.underline = false;
try {
__id41_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 98
//mcdec12_132 (crazycraft_fla.mcdec12_132)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec12_132 extends MovieClip {
public var __id42_:LocalizedTextField;
public function mcdec12_132(){
__setProp___id42__mcdec12_Layer1_1();
}
function __setProp___id42__mcdec12_Layer1_1(){
try {
__id42_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id42_.text = "{txt_lvldesc12}";
__id42_.textColor = 0xFF00;
__id42_.textSize = 12;
__id42_.bold = false;
__id42_.disableWordwrap = false;
__id42_.embedFonts = true;
__id42_.font = "Times New Roman";
__id42_.hAlign = "center";
__id42_.multiline = true;
__id42_.vAlign = "top";
__id42_.antiAliasType = "advanced";
__id42_.glowBlur = 3;
__id42_.glowColor = 0;
__id42_.useGlowFilter = false;
__id42_.glowQuality = 1;
__id42_.glowStrength = 5;
__id42_.gridFitType = "pixel";
__id42_.italic = false;
__id42_.selectable = false;
__id42_.underline = false;
try {
__id42_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 99
//mcdec13_133 (crazycraft_fla.mcdec13_133)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec13_133 extends MovieClip {
public var __id43_:LocalizedTextField;
public function mcdec13_133(){
__setProp___id43__mcdec13_Layer1_1();
}
function __setProp___id43__mcdec13_Layer1_1(){
try {
__id43_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id43_.text = "{txt_lvldesc13}";
__id43_.textColor = 0xFF00;
__id43_.textSize = 12;
__id43_.bold = false;
__id43_.disableWordwrap = false;
__id43_.embedFonts = true;
__id43_.font = "Times New Roman";
__id43_.hAlign = "center";
__id43_.multiline = true;
__id43_.vAlign = "top";
__id43_.antiAliasType = "advanced";
__id43_.glowBlur = 3;
__id43_.glowColor = 0;
__id43_.useGlowFilter = false;
__id43_.glowQuality = 1;
__id43_.glowStrength = 5;
__id43_.gridFitType = "pixel";
__id43_.italic = false;
__id43_.selectable = false;
__id43_.underline = false;
try {
__id43_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 100
//mcdec14_134 (crazycraft_fla.mcdec14_134)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec14_134 extends MovieClip {
public var __id44_:LocalizedTextField;
public function mcdec14_134(){
__setProp___id44__mcdec14_Layer1_1();
}
function __setProp___id44__mcdec14_Layer1_1(){
try {
__id44_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id44_.text = "{txt_lvldesc14}";
__id44_.textColor = 0xFF00;
__id44_.textSize = 12;
__id44_.bold = false;
__id44_.disableWordwrap = false;
__id44_.embedFonts = true;
__id44_.font = "Times New Roman";
__id44_.hAlign = "center";
__id44_.multiline = true;
__id44_.vAlign = "top";
__id44_.antiAliasType = "advanced";
__id44_.glowBlur = 3;
__id44_.glowColor = 0;
__id44_.useGlowFilter = false;
__id44_.glowQuality = 1;
__id44_.glowStrength = 5;
__id44_.gridFitType = "pixel";
__id44_.italic = false;
__id44_.selectable = false;
__id44_.underline = false;
try {
__id44_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 101
//mcdec15_135 (crazycraft_fla.mcdec15_135)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec15_135 extends MovieClip {
public var __id45_:LocalizedTextField;
public function mcdec15_135(){
__setProp___id45__mcdec15_Layer1_1();
}
function __setProp___id45__mcdec15_Layer1_1(){
try {
__id45_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id45_.text = "{txt_lvldesc15}";
__id45_.textColor = 0xFF00;
__id45_.textSize = 12;
__id45_.bold = false;
__id45_.disableWordwrap = false;
__id45_.embedFonts = true;
__id45_.font = "Times New Roman";
__id45_.hAlign = "center";
__id45_.multiline = true;
__id45_.vAlign = "top";
__id45_.antiAliasType = "advanced";
__id45_.glowBlur = 3;
__id45_.glowColor = 0;
__id45_.useGlowFilter = false;
__id45_.glowQuality = 1;
__id45_.glowStrength = 5;
__id45_.gridFitType = "pixel";
__id45_.italic = false;
__id45_.selectable = false;
__id45_.underline = false;
try {
__id45_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 102
//mcdec16_136 (crazycraft_fla.mcdec16_136)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec16_136 extends MovieClip {
public var __id46_:LocalizedTextField;
public function mcdec16_136(){
__setProp___id46__mcdec16_Layer1_1();
}
function __setProp___id46__mcdec16_Layer1_1(){
try {
__id46_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id46_.text = "{txt_lvldesc16}";
__id46_.textColor = 0xFF00;
__id46_.textSize = 12;
__id46_.bold = false;
__id46_.disableWordwrap = false;
__id46_.embedFonts = true;
__id46_.font = "Times New Roman";
__id46_.hAlign = "center";
__id46_.multiline = true;
__id46_.vAlign = "top";
__id46_.antiAliasType = "advanced";
__id46_.glowBlur = 3;
__id46_.glowColor = 0;
__id46_.useGlowFilter = false;
__id46_.glowQuality = 1;
__id46_.glowStrength = 5;
__id46_.gridFitType = "pixel";
__id46_.italic = false;
__id46_.selectable = false;
__id46_.underline = false;
try {
__id46_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 103
//mcdec17_137 (crazycraft_fla.mcdec17_137)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec17_137 extends MovieClip {
public var __id47_:LocalizedTextField;
public function mcdec17_137(){
__setProp___id47__mcdec17_Layer1_1();
}
function __setProp___id47__mcdec17_Layer1_1(){
try {
__id47_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id47_.text = "{txt_lvldesc17}";
__id47_.textColor = 0xFF00;
__id47_.textSize = 12;
__id47_.bold = false;
__id47_.disableWordwrap = false;
__id47_.embedFonts = true;
__id47_.font = "Times New Roman";
__id47_.hAlign = "center";
__id47_.multiline = true;
__id47_.vAlign = "top";
__id47_.antiAliasType = "advanced";
__id47_.glowBlur = 3;
__id47_.glowColor = 0;
__id47_.useGlowFilter = false;
__id47_.glowQuality = 1;
__id47_.glowStrength = 5;
__id47_.gridFitType = "pixel";
__id47_.italic = false;
__id47_.selectable = false;
__id47_.underline = false;
try {
__id47_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 104
//mcdec18_138 (crazycraft_fla.mcdec18_138)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec18_138 extends MovieClip {
public var __id48_:LocalizedTextField;
public function mcdec18_138(){
__setProp___id48__mcdec18_Layer1_1();
}
function __setProp___id48__mcdec18_Layer1_1(){
try {
__id48_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id48_.text = "{txt_lvldesc18}";
__id48_.textColor = 0xFF00;
__id48_.textSize = 12;
__id48_.bold = false;
__id48_.disableWordwrap = false;
__id48_.embedFonts = true;
__id48_.font = "Times New Roman";
__id48_.hAlign = "center";
__id48_.multiline = true;
__id48_.vAlign = "top";
__id48_.antiAliasType = "advanced";
__id48_.glowBlur = 3;
__id48_.glowColor = 0;
__id48_.useGlowFilter = false;
__id48_.glowQuality = 1;
__id48_.glowStrength = 5;
__id48_.gridFitType = "pixel";
__id48_.italic = false;
__id48_.selectable = false;
__id48_.underline = false;
try {
__id48_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 105
//mcdec19_139 (crazycraft_fla.mcdec19_139)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec19_139 extends MovieClip {
public var __id49_:LocalizedTextField;
public function mcdec19_139(){
__setProp___id49__mcdec19_Layer1_1();
}
function __setProp___id49__mcdec19_Layer1_1(){
try {
__id49_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id49_.text = "{txt_lvldesc19}";
__id49_.textColor = 0xFF00;
__id49_.textSize = 12;
__id49_.bold = false;
__id49_.disableWordwrap = false;
__id49_.embedFonts = true;
__id49_.font = "Times New Roman";
__id49_.hAlign = "center";
__id49_.multiline = true;
__id49_.vAlign = "top";
__id49_.antiAliasType = "advanced";
__id49_.glowBlur = 3;
__id49_.glowColor = 0;
__id49_.useGlowFilter = false;
__id49_.glowQuality = 1;
__id49_.glowStrength = 5;
__id49_.gridFitType = "pixel";
__id49_.italic = false;
__id49_.selectable = false;
__id49_.underline = false;
try {
__id49_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 106
//mcdec2_122 (crazycraft_fla.mcdec2_122)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec2_122 extends MovieClip {
public var __id32_:LocalizedTextField;
public function mcdec2_122(){
__setProp___id32__mcdec2_Layer1_1();
}
function __setProp___id32__mcdec2_Layer1_1(){
try {
__id32_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id32_.text = "{txt_lvldesc2}";
__id32_.textColor = 0xFF00;
__id32_.textSize = 12;
__id32_.bold = false;
__id32_.disableWordwrap = false;
__id32_.embedFonts = true;
__id32_.font = "Times New Roman";
__id32_.hAlign = "center";
__id32_.multiline = true;
__id32_.vAlign = "top";
__id32_.antiAliasType = "advanced";
__id32_.glowBlur = 3;
__id32_.glowColor = 0;
__id32_.useGlowFilter = false;
__id32_.glowQuality = 1;
__id32_.glowStrength = 5;
__id32_.gridFitType = "pixel";
__id32_.italic = false;
__id32_.selectable = false;
__id32_.underline = false;
try {
__id32_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 107
//mcdec20_140 (crazycraft_fla.mcdec20_140)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec20_140 extends MovieClip {
public var __id50_:LocalizedTextField;
public function mcdec20_140(){
__setProp___id50__mcdec20_Layer1_1();
}
function __setProp___id50__mcdec20_Layer1_1(){
try {
__id50_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id50_.text = "{txt_lvldesc20}";
__id50_.textColor = 0xFF00;
__id50_.textSize = 12;
__id50_.bold = false;
__id50_.disableWordwrap = false;
__id50_.embedFonts = true;
__id50_.font = "Times New Roman";
__id50_.hAlign = "center";
__id50_.multiline = true;
__id50_.vAlign = "top";
__id50_.antiAliasType = "advanced";
__id50_.glowBlur = 3;
__id50_.glowColor = 0;
__id50_.useGlowFilter = false;
__id50_.glowQuality = 1;
__id50_.glowStrength = 5;
__id50_.gridFitType = "pixel";
__id50_.italic = false;
__id50_.selectable = false;
__id50_.underline = false;
try {
__id50_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 108
//mcdec21_141 (crazycraft_fla.mcdec21_141)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec21_141 extends MovieClip {
public var __id51_:LocalizedTextField;
public function mcdec21_141(){
__setProp___id51__mcdec21_Layer1_1();
}
function __setProp___id51__mcdec21_Layer1_1(){
try {
__id51_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id51_.text = "{txt_lvldesc21}";
__id51_.textColor = 0xFF00;
__id51_.textSize = 12;
__id51_.bold = false;
__id51_.disableWordwrap = false;
__id51_.embedFonts = true;
__id51_.font = "Times New Roman";
__id51_.hAlign = "center";
__id51_.multiline = true;
__id51_.vAlign = "top";
__id51_.antiAliasType = "advanced";
__id51_.glowBlur = 3;
__id51_.glowColor = 0;
__id51_.useGlowFilter = false;
__id51_.glowQuality = 1;
__id51_.glowStrength = 5;
__id51_.gridFitType = "pixel";
__id51_.italic = false;
__id51_.selectable = false;
__id51_.underline = false;
try {
__id51_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 109
//mcdec22_142 (crazycraft_fla.mcdec22_142)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec22_142 extends MovieClip {
public var __id52_:LocalizedTextField;
public function mcdec22_142(){
__setProp___id52__mcdec22_Layer1_1();
}
function __setProp___id52__mcdec22_Layer1_1(){
try {
__id52_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id52_.text = "{txt_lvldesc22}";
__id52_.textColor = 0xFF00;
__id52_.textSize = 12;
__id52_.bold = false;
__id52_.disableWordwrap = false;
__id52_.embedFonts = true;
__id52_.font = "Times New Roman";
__id52_.hAlign = "center";
__id52_.multiline = true;
__id52_.vAlign = "top";
__id52_.antiAliasType = "advanced";
__id52_.glowBlur = 3;
__id52_.glowColor = 0;
__id52_.useGlowFilter = false;
__id52_.glowQuality = 1;
__id52_.glowStrength = 5;
__id52_.gridFitType = "pixel";
__id52_.italic = false;
__id52_.selectable = false;
__id52_.underline = false;
try {
__id52_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 110
//mcdec23_143 (crazycraft_fla.mcdec23_143)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec23_143 extends MovieClip {
public var __id53_:LocalizedTextField;
public function mcdec23_143(){
__setProp___id53__mcdec23_Layer1_1();
}
function __setProp___id53__mcdec23_Layer1_1(){
try {
__id53_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id53_.text = "{txt_lvldesc23}";
__id53_.textColor = 0xFF00;
__id53_.textSize = 12;
__id53_.bold = false;
__id53_.disableWordwrap = false;
__id53_.embedFonts = true;
__id53_.font = "Times New Roman";
__id53_.hAlign = "center";
__id53_.multiline = true;
__id53_.vAlign = "top";
__id53_.antiAliasType = "advanced";
__id53_.glowBlur = 3;
__id53_.glowColor = 0;
__id53_.useGlowFilter = false;
__id53_.glowQuality = 1;
__id53_.glowStrength = 5;
__id53_.gridFitType = "pixel";
__id53_.italic = false;
__id53_.selectable = false;
__id53_.underline = false;
try {
__id53_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 111
//mcdec24_144 (crazycraft_fla.mcdec24_144)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec24_144 extends MovieClip {
public var __id54_:LocalizedTextField;
public function mcdec24_144(){
__setProp___id54__mcdec24_Layer1_1();
}
function __setProp___id54__mcdec24_Layer1_1(){
try {
__id54_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id54_.text = "{txt_lvldesc24}";
__id54_.textColor = 0xFF00;
__id54_.textSize = 12;
__id54_.bold = false;
__id54_.disableWordwrap = false;
__id54_.embedFonts = true;
__id54_.font = "Times New Roman";
__id54_.hAlign = "center";
__id54_.multiline = true;
__id54_.vAlign = "top";
__id54_.antiAliasType = "advanced";
__id54_.glowBlur = 3;
__id54_.glowColor = 0;
__id54_.useGlowFilter = false;
__id54_.glowQuality = 1;
__id54_.glowStrength = 5;
__id54_.gridFitType = "pixel";
__id54_.italic = false;
__id54_.selectable = false;
__id54_.underline = false;
try {
__id54_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 112
//mcdec25_145 (crazycraft_fla.mcdec25_145)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec25_145 extends MovieClip {
public var __id55_:LocalizedTextField;
public function mcdec25_145(){
__setProp___id55__mcdec25_Layer1_1();
}
function __setProp___id55__mcdec25_Layer1_1(){
try {
__id55_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id55_.text = "{txt_lvldesc25}";
__id55_.textColor = 0xFF00;
__id55_.textSize = 12;
__id55_.bold = false;
__id55_.disableWordwrap = false;
__id55_.embedFonts = true;
__id55_.font = "Times New Roman";
__id55_.hAlign = "center";
__id55_.multiline = true;
__id55_.vAlign = "top";
__id55_.antiAliasType = "advanced";
__id55_.glowBlur = 3;
__id55_.glowColor = 0;
__id55_.useGlowFilter = false;
__id55_.glowQuality = 1;
__id55_.glowStrength = 5;
__id55_.gridFitType = "pixel";
__id55_.italic = false;
__id55_.selectable = false;
__id55_.underline = false;
try {
__id55_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 113
//mcdec3_123 (crazycraft_fla.mcdec3_123)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec3_123 extends MovieClip {
public var __id33_:LocalizedTextField;
public function mcdec3_123(){
__setProp___id33__mcdec3_Layer1_1();
}
function __setProp___id33__mcdec3_Layer1_1(){
try {
__id33_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id33_.text = "{txt_lvldesc3}";
__id33_.textColor = 0xFF00;
__id33_.textSize = 12;
__id33_.bold = false;
__id33_.disableWordwrap = false;
__id33_.embedFonts = true;
__id33_.font = "Times New Roman";
__id33_.hAlign = "center";
__id33_.multiline = true;
__id33_.vAlign = "top";
__id33_.antiAliasType = "advanced";
__id33_.glowBlur = 3;
__id33_.glowColor = 0;
__id33_.useGlowFilter = false;
__id33_.glowQuality = 1;
__id33_.glowStrength = 5;
__id33_.gridFitType = "pixel";
__id33_.italic = false;
__id33_.selectable = false;
__id33_.underline = false;
try {
__id33_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 114
//mcdec4_124 (crazycraft_fla.mcdec4_124)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec4_124 extends MovieClip {
public var __id34_:LocalizedTextField;
public function mcdec4_124(){
__setProp___id34__mcdec4_Layer1_1();
}
function __setProp___id34__mcdec4_Layer1_1(){
try {
__id34_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id34_.text = "{txt_lvldesc4}";
__id34_.textColor = 0xFF00;
__id34_.textSize = 12;
__id34_.bold = false;
__id34_.disableWordwrap = false;
__id34_.embedFonts = true;
__id34_.font = "Times New Roman";
__id34_.hAlign = "center";
__id34_.multiline = true;
__id34_.vAlign = "top";
__id34_.antiAliasType = "advanced";
__id34_.glowBlur = 3;
__id34_.glowColor = 0;
__id34_.useGlowFilter = false;
__id34_.glowQuality = 1;
__id34_.glowStrength = 5;
__id34_.gridFitType = "pixel";
__id34_.italic = false;
__id34_.selectable = false;
__id34_.underline = false;
try {
__id34_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 115
//mcdec5_125 (crazycraft_fla.mcdec5_125)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec5_125 extends MovieClip {
public var __id35_:LocalizedTextField;
public function mcdec5_125(){
__setProp___id35__mcdec5_Layer1_1();
}
function __setProp___id35__mcdec5_Layer1_1(){
try {
__id35_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id35_.text = "{txt_lvldesc5}";
__id35_.textColor = 0xFF00;
__id35_.textSize = 12;
__id35_.bold = false;
__id35_.disableWordwrap = false;
__id35_.embedFonts = true;
__id35_.font = "Times New Roman";
__id35_.hAlign = "center";
__id35_.multiline = true;
__id35_.vAlign = "top";
__id35_.antiAliasType = "advanced";
__id35_.glowBlur = 3;
__id35_.glowColor = 0;
__id35_.useGlowFilter = false;
__id35_.glowQuality = 1;
__id35_.glowStrength = 5;
__id35_.gridFitType = "pixel";
__id35_.italic = false;
__id35_.selectable = false;
__id35_.underline = false;
try {
__id35_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 116
//mcdec6_126 (crazycraft_fla.mcdec6_126)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec6_126 extends MovieClip {
public var __id36_:LocalizedTextField;
public function mcdec6_126(){
__setProp___id36__mcdec6_Layer1_1();
}
function __setProp___id36__mcdec6_Layer1_1(){
try {
__id36_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id36_.text = "{txt_lvldesc6}";
__id36_.textColor = 0xFF00;
__id36_.textSize = 12;
__id36_.bold = false;
__id36_.disableWordwrap = false;
__id36_.embedFonts = true;
__id36_.font = "Times New Roman";
__id36_.hAlign = "center";
__id36_.multiline = true;
__id36_.vAlign = "top";
__id36_.antiAliasType = "advanced";
__id36_.glowBlur = 3;
__id36_.glowColor = 0;
__id36_.useGlowFilter = false;
__id36_.glowQuality = 1;
__id36_.glowStrength = 5;
__id36_.gridFitType = "pixel";
__id36_.italic = false;
__id36_.selectable = false;
__id36_.underline = false;
try {
__id36_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 117
//mcdec7_127 (crazycraft_fla.mcdec7_127)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec7_127 extends MovieClip {
public var __id37_:LocalizedTextField;
public function mcdec7_127(){
__setProp___id37__mcdec7_Layer1_1();
}
function __setProp___id37__mcdec7_Layer1_1(){
try {
__id37_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id37_.text = "{txt_lvldesc7}";
__id37_.textColor = 0xFF00;
__id37_.textSize = 12;
__id37_.bold = false;
__id37_.disableWordwrap = false;
__id37_.embedFonts = true;
__id37_.font = "Times New Roman";
__id37_.hAlign = "center";
__id37_.multiline = true;
__id37_.vAlign = "top";
__id37_.antiAliasType = "advanced";
__id37_.glowBlur = 3;
__id37_.glowColor = 0;
__id37_.useGlowFilter = false;
__id37_.glowQuality = 1;
__id37_.glowStrength = 5;
__id37_.gridFitType = "pixel";
__id37_.italic = false;
__id37_.selectable = false;
__id37_.underline = false;
try {
__id37_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 118
//mcdec8_128 (crazycraft_fla.mcdec8_128)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec8_128 extends MovieClip {
public var __id38_:LocalizedTextField;
public function mcdec8_128(){
__setProp___id38__mcdec8_Layer1_1();
}
function __setProp___id38__mcdec8_Layer1_1(){
try {
__id38_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id38_.text = "{txt_lvldesc8}";
__id38_.textColor = 0xFF00;
__id38_.textSize = 12;
__id38_.bold = false;
__id38_.disableWordwrap = false;
__id38_.embedFonts = true;
__id38_.font = "Times New Roman";
__id38_.hAlign = "center";
__id38_.multiline = true;
__id38_.vAlign = "top";
__id38_.antiAliasType = "advanced";
__id38_.glowBlur = 3;
__id38_.glowColor = 0;
__id38_.useGlowFilter = false;
__id38_.glowQuality = 1;
__id38_.glowStrength = 5;
__id38_.gridFitType = "pixel";
__id38_.italic = false;
__id38_.selectable = false;
__id38_.underline = false;
try {
__id38_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 119
//mcdec9_129 (crazycraft_fla.mcdec9_129)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class mcdec9_129 extends MovieClip {
public var __id39_:LocalizedTextField;
public function mcdec9_129(){
__setProp___id39__mcdec9_Layer1_1();
}
function __setProp___id39__mcdec9_Layer1_1(){
try {
__id39_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id39_.text = "{txt_lvldesc9}";
__id39_.textColor = 0xFF00;
__id39_.textSize = 12;
__id39_.bold = false;
__id39_.disableWordwrap = false;
__id39_.embedFonts = true;
__id39_.font = "Times New Roman";
__id39_.hAlign = "center";
__id39_.multiline = true;
__id39_.vAlign = "top";
__id39_.antiAliasType = "advanced";
__id39_.glowBlur = 3;
__id39_.glowColor = 0;
__id39_.useGlowFilter = false;
__id39_.glowQuality = 1;
__id39_.glowStrength = 5;
__id39_.gridFitType = "pixel";
__id39_.italic = false;
__id39_.selectable = false;
__id39_.underline = false;
try {
__id39_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 120
//Symbol1_85 (crazycraft_fla.Symbol1_85)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol1_85 extends MovieClip {
public var __id61_:LocalizedTextField;
public var __id62_:LocalizedTextField;
public function Symbol1_85(){
__setProp___id62__Symbol1_Layer1_1();
__setProp___id61__Symbol1_Layer1_1();
}
function __setProp___id61__Symbol1_Layer1_1(){
try {
__id61_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id61_.text = "{txt_head3}";
__id61_.textColor = 1662108;
__id61_.textSize = 12;
__id61_.bold = true;
__id61_.disableWordwrap = false;
__id61_.embedFonts = true;
__id61_.font = "Times New Roman";
__id61_.hAlign = "center";
__id61_.multiline = false;
__id61_.vAlign = "top";
__id61_.antiAliasType = "advanced";
__id61_.glowBlur = 3;
__id61_.glowColor = 0;
__id61_.useGlowFilter = false;
__id61_.glowQuality = 1;
__id61_.glowStrength = 5;
__id61_.gridFitType = "pixel";
__id61_.italic = false;
__id61_.selectable = false;
__id61_.underline = false;
try {
__id61_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id62__Symbol1_Layer1_1(){
try {
__id62_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id62_.text = "{txt_tut3}";
__id62_.textColor = 1662108;
__id62_.textSize = 12;
__id62_.bold = false;
__id62_.disableWordwrap = false;
__id62_.embedFonts = true;
__id62_.font = "Times New Roman";
__id62_.hAlign = "left";
__id62_.multiline = true;
__id62_.vAlign = "top";
__id62_.antiAliasType = "advanced";
__id62_.glowBlur = 3;
__id62_.glowColor = 0;
__id62_.useGlowFilter = false;
__id62_.glowQuality = 1;
__id62_.glowStrength = 5;
__id62_.gridFitType = "pixel";
__id62_.italic = false;
__id62_.selectable = false;
__id62_.underline = false;
try {
__id62_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 121
//Symbol10_100 (crazycraft_fla.Symbol10_100)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol10_100 extends MovieClip {
public var __id86_:LocalizedTextField;
public var __id87_:LocalizedTextField;
public function Symbol10_100(){
__setProp___id86__Symbol10_Layer1_1();
__setProp___id87__Symbol10_Layer1_1();
}
function __setProp___id87__Symbol10_Layer1_1(){
try {
__id87_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id87_.text = "{txt_tut13}";
__id87_.textColor = 1662108;
__id87_.textSize = 12;
__id87_.bold = false;
__id87_.disableWordwrap = false;
__id87_.embedFonts = true;
__id87_.font = "Times New Roman";
__id87_.hAlign = "left";
__id87_.multiline = true;
__id87_.vAlign = "top";
__id87_.antiAliasType = "advanced";
__id87_.glowBlur = 3;
__id87_.glowColor = 0;
__id87_.useGlowFilter = false;
__id87_.glowQuality = 1;
__id87_.glowStrength = 5;
__id87_.gridFitType = "pixel";
__id87_.italic = false;
__id87_.selectable = false;
__id87_.underline = false;
try {
__id87_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id86__Symbol10_Layer1_1(){
try {
__id86_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id86_.text = "{txt_head11}";
__id86_.textColor = 1662108;
__id86_.textSize = 12;
__id86_.bold = true;
__id86_.disableWordwrap = false;
__id86_.embedFonts = true;
__id86_.font = "Times New Roman";
__id86_.hAlign = "center";
__id86_.multiline = false;
__id86_.vAlign = "top";
__id86_.antiAliasType = "advanced";
__id86_.glowBlur = 3;
__id86_.glowColor = 0;
__id86_.useGlowFilter = false;
__id86_.glowQuality = 1;
__id86_.glowStrength = 5;
__id86_.gridFitType = "pixel";
__id86_.italic = false;
__id86_.selectable = false;
__id86_.underline = false;
try {
__id86_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 122
//Symbol11_101 (crazycraft_fla.Symbol11_101)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol11_101 extends MovieClip {
public var __id88_:LocalizedTextField;
public var __id89_:LocalizedTextField;
public function Symbol11_101(){
__setProp___id89__Symbol11_Layer1_1();
__setProp___id88__Symbol11_Layer1_1();
}
function __setProp___id89__Symbol11_Layer1_1(){
try {
__id89_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id89_.text = "{txt_tut14}";
__id89_.textColor = 1662108;
__id89_.textSize = 12;
__id89_.bold = false;
__id89_.disableWordwrap = false;
__id89_.embedFonts = true;
__id89_.font = "Times New Roman";
__id89_.hAlign = "left";
__id89_.multiline = true;
__id89_.vAlign = "top";
__id89_.antiAliasType = "advanced";
__id89_.glowBlur = 3;
__id89_.glowColor = 0;
__id89_.useGlowFilter = false;
__id89_.glowQuality = 1;
__id89_.glowStrength = 5;
__id89_.gridFitType = "pixel";
__id89_.italic = false;
__id89_.selectable = false;
__id89_.underline = false;
try {
__id89_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id88__Symbol11_Layer1_1(){
try {
__id88_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id88_.text = "{txt_head12}";
__id88_.textColor = 1662108;
__id88_.textSize = 12;
__id88_.bold = true;
__id88_.disableWordwrap = false;
__id88_.embedFonts = true;
__id88_.font = "Times New Roman";
__id88_.hAlign = "center";
__id88_.multiline = false;
__id88_.vAlign = "top";
__id88_.antiAliasType = "advanced";
__id88_.glowBlur = 3;
__id88_.glowColor = 0;
__id88_.useGlowFilter = false;
__id88_.glowQuality = 1;
__id88_.glowStrength = 5;
__id88_.gridFitType = "pixel";
__id88_.italic = false;
__id88_.selectable = false;
__id88_.underline = false;
try {
__id88_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 123
//Symbol12_102 (crazycraft_fla.Symbol12_102)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol12_102 extends MovieClip {
public var __id90_:LocalizedTextField;
public function Symbol12_102(){
__setProp___id90__Symbol12_Layer1_1();
}
function __setProp___id90__Symbol12_Layer1_1(){
try {
__id90_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id90_.text = "{txt_tut15}";
__id90_.textColor = 1662108;
__id90_.textSize = 12;
__id90_.bold = false;
__id90_.disableWordwrap = false;
__id90_.embedFonts = true;
__id90_.font = "Times New Roman";
__id90_.hAlign = "left";
__id90_.multiline = true;
__id90_.vAlign = "top";
__id90_.antiAliasType = "advanced";
__id90_.glowBlur = 3;
__id90_.glowColor = 0;
__id90_.useGlowFilter = false;
__id90_.glowQuality = 1;
__id90_.glowStrength = 5;
__id90_.gridFitType = "pixel";
__id90_.italic = false;
__id90_.selectable = false;
__id90_.underline = false;
try {
__id90_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 124
//Symbol13_103 (crazycraft_fla.Symbol13_103)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol13_103 extends MovieClip {
public var __id91_:LocalizedTextField;
public function Symbol13_103(){
__setProp___id91__Symbol13_Layer1_1();
}
function __setProp___id91__Symbol13_Layer1_1(){
try {
__id91_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id91_.text = "{txt_tut16}";
__id91_.textColor = 1662108;
__id91_.textSize = 12;
__id91_.bold = false;
__id91_.disableWordwrap = false;
__id91_.embedFonts = true;
__id91_.font = "Times New Roman";
__id91_.hAlign = "left";
__id91_.multiline = true;
__id91_.vAlign = "top";
__id91_.antiAliasType = "advanced";
__id91_.glowBlur = 3;
__id91_.glowColor = 0;
__id91_.useGlowFilter = false;
__id91_.glowQuality = 1;
__id91_.glowStrength = 5;
__id91_.gridFitType = "pixel";
__id91_.italic = false;
__id91_.selectable = false;
__id91_.underline = false;
try {
__id91_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 125
//Symbol2_87 (crazycraft_fla.Symbol2_87)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol2_87 extends MovieClip {
public var __id63_:LocalizedTextField;
public var __id64_:LocalizedTextField;
public function Symbol2_87(){
__setProp___id64__Symbol2_Layer1_1();
__setProp___id63__Symbol2_Layer1_1();
}
function __setProp___id64__Symbol2_Layer1_1(){
try {
__id64_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id64_.text = "{txt_tut5}";
__id64_.textColor = 1662108;
__id64_.textSize = 12;
__id64_.bold = true;
__id64_.disableWordwrap = false;
__id64_.embedFonts = true;
__id64_.font = "Times New Roman";
__id64_.hAlign = "left";
__id64_.multiline = true;
__id64_.vAlign = "top";
__id64_.antiAliasType = "advanced";
__id64_.glowBlur = 3;
__id64_.glowColor = 0;
__id64_.useGlowFilter = false;
__id64_.glowQuality = 1;
__id64_.glowStrength = 5;
__id64_.gridFitType = "pixel";
__id64_.italic = false;
__id64_.selectable = false;
__id64_.underline = false;
try {
__id64_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id63__Symbol2_Layer1_1(){
try {
__id63_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id63_.text = "{txt_tut4}";
__id63_.textColor = 1662108;
__id63_.textSize = 12;
__id63_.bold = false;
__id63_.disableWordwrap = false;
__id63_.embedFonts = true;
__id63_.font = "Times New Roman";
__id63_.hAlign = "left";
__id63_.multiline = true;
__id63_.vAlign = "top";
__id63_.antiAliasType = "advanced";
__id63_.glowBlur = 3;
__id63_.glowColor = 0;
__id63_.useGlowFilter = false;
__id63_.glowQuality = 1;
__id63_.glowStrength = 5;
__id63_.gridFitType = "pixel";
__id63_.italic = false;
__id63_.selectable = false;
__id63_.underline = false;
try {
__id63_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 126
//Symbol3_88 (crazycraft_fla.Symbol3_88)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol3_88 extends MovieClip {
public var __id65_:LocalizedTextField;
public var __id66_:LocalizedTextField;
public function Symbol3_88(){
__setProp___id66__Symbol3_Layer1_1();
__setProp___id65__Symbol3_Layer1_1();
}
function __setProp___id66__Symbol3_Layer1_1(){
try {
__id66_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id66_.text = "{txt_tut6}";
__id66_.textColor = 1662108;
__id66_.textSize = 12;
__id66_.bold = false;
__id66_.disableWordwrap = false;
__id66_.embedFonts = true;
__id66_.font = "Times New Roman";
__id66_.hAlign = "left";
__id66_.multiline = true;
__id66_.vAlign = "top";
__id66_.antiAliasType = "advanced";
__id66_.glowBlur = 3;
__id66_.glowColor = 0;
__id66_.useGlowFilter = false;
__id66_.glowQuality = 1;
__id66_.glowStrength = 5;
__id66_.gridFitType = "pixel";
__id66_.italic = false;
__id66_.selectable = false;
__id66_.underline = false;
try {
__id66_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id65__Symbol3_Layer1_1(){
try {
__id65_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id65_.text = "{txt_head4}";
__id65_.textColor = 1662108;
__id65_.textSize = 12;
__id65_.bold = true;
__id65_.disableWordwrap = false;
__id65_.embedFonts = true;
__id65_.font = "Times New Roman";
__id65_.hAlign = "center";
__id65_.multiline = false;
__id65_.vAlign = "top";
__id65_.antiAliasType = "advanced";
__id65_.glowBlur = 3;
__id65_.glowColor = 0;
__id65_.useGlowFilter = false;
__id65_.glowQuality = 1;
__id65_.glowStrength = 5;
__id65_.gridFitType = "pixel";
__id65_.italic = false;
__id65_.selectable = false;
__id65_.underline = false;
try {
__id65_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 127
//Symbol4_91 (crazycraft_fla.Symbol4_91)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol4_91 extends MovieClip {
public var __id67_:LocalizedTextField;
public function Symbol4_91(){
__setProp___id67__Symbol4_Layer1_1();
}
function __setProp___id67__Symbol4_Layer1_1(){
try {
__id67_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id67_.text = "{txt_tut7}";
__id67_.textColor = 1662108;
__id67_.textSize = 12;
__id67_.bold = false;
__id67_.disableWordwrap = false;
__id67_.embedFonts = true;
__id67_.font = "Times New Roman";
__id67_.hAlign = "left";
__id67_.multiline = true;
__id67_.vAlign = "top";
__id67_.antiAliasType = "advanced";
__id67_.glowBlur = 3;
__id67_.glowColor = 0;
__id67_.useGlowFilter = false;
__id67_.glowQuality = 1;
__id67_.glowStrength = 5;
__id67_.gridFitType = "pixel";
__id67_.italic = false;
__id67_.selectable = false;
__id67_.underline = false;
try {
__id67_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 128
//Symbol5_94 (crazycraft_fla.Symbol5_94)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol5_94 extends MovieClip {
public var __id68_:LocalizedTextField;
public var __id69_:LocalizedTextField;
public var __id70_:LocalizedTextField;
public var __id71_:LocalizedTextField;
public function Symbol5_94(){
__setProp___id70__Symbol5_Layer1_1();
__setProp___id71__Symbol5_Layer1_1();
__setProp___id68__Symbol5_Layer1_1();
__setProp___id69__Symbol5_Layer1_1();
}
function __setProp___id68__Symbol5_Layer1_1(){
try {
__id68_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id68_.text = "{txt_head7}";
__id68_.textColor = 1662108;
__id68_.textSize = 12;
__id68_.bold = true;
__id68_.disableWordwrap = false;
__id68_.embedFonts = true;
__id68_.font = "Times New Roman";
__id68_.hAlign = "center";
__id68_.multiline = false;
__id68_.vAlign = "top";
__id68_.antiAliasType = "advanced";
__id68_.glowBlur = 3;
__id68_.glowColor = 0;
__id68_.useGlowFilter = false;
__id68_.glowQuality = 1;
__id68_.glowStrength = 5;
__id68_.gridFitType = "pixel";
__id68_.italic = false;
__id68_.selectable = false;
__id68_.underline = false;
try {
__id68_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id71__Symbol5_Layer1_1(){
try {
__id71_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id71_.text = "{txt_head6}";
__id71_.textColor = 1662108;
__id71_.textSize = 12;
__id71_.bold = true;
__id71_.disableWordwrap = false;
__id71_.embedFonts = true;
__id71_.font = "Times New Roman";
__id71_.hAlign = "center";
__id71_.multiline = false;
__id71_.vAlign = "top";
__id71_.antiAliasType = "advanced";
__id71_.glowBlur = 3;
__id71_.glowColor = 0;
__id71_.useGlowFilter = false;
__id71_.glowQuality = 1;
__id71_.glowStrength = 5;
__id71_.gridFitType = "pixel";
__id71_.italic = false;
__id71_.selectable = false;
__id71_.underline = false;
try {
__id71_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id69__Symbol5_Layer1_1(){
try {
__id69_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id69_.text = "{txt_tut8}";
__id69_.textColor = 1662108;
__id69_.textSize = 12;
__id69_.bold = false;
__id69_.disableWordwrap = false;
__id69_.embedFonts = true;
__id69_.font = "Times New Roman";
__id69_.hAlign = "left";
__id69_.multiline = true;
__id69_.vAlign = "top";
__id69_.antiAliasType = "advanced";
__id69_.glowBlur = 3;
__id69_.glowColor = 0;
__id69_.useGlowFilter = false;
__id69_.glowQuality = 1;
__id69_.glowStrength = 5;
__id69_.gridFitType = "pixel";
__id69_.italic = false;
__id69_.selectable = false;
__id69_.underline = false;
try {
__id69_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id70__Symbol5_Layer1_1(){
try {
__id70_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id70_.text = "{txt_head5}";
__id70_.textColor = 1662108;
__id70_.textSize = 12;
__id70_.bold = true;
__id70_.disableWordwrap = false;
__id70_.embedFonts = true;
__id70_.font = "Times New Roman";
__id70_.hAlign = "center";
__id70_.multiline = true;
__id70_.vAlign = "top";
__id70_.antiAliasType = "advanced";
__id70_.glowBlur = 3;
__id70_.glowColor = 0;
__id70_.useGlowFilter = false;
__id70_.glowQuality = 1;
__id70_.glowStrength = 5;
__id70_.gridFitType = "pixel";
__id70_.italic = false;
__id70_.selectable = false;
__id70_.underline = false;
try {
__id70_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 129
//Symbol6_95 (crazycraft_fla.Symbol6_95)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol6_95 extends MovieClip {
public var __id72_:LocalizedTextField;
public var __id74_:LocalizedTextField;
public var __id75_:LocalizedTextField;
public var __id73_:LocalizedTextField;
public function Symbol6_95(){
__setProp___id73__Symbol6_Layer1_1();
__setProp___id75__Symbol6_Layer1_1();
__setProp___id74__Symbol6_Layer1_1();
__setProp___id72__Symbol6_Layer1_1();
}
function __setProp___id72__Symbol6_Layer1_1(){
try {
__id72_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id72_.text = "{txt_head8}";
__id72_.textColor = 1662108;
__id72_.textSize = 12;
__id72_.bold = true;
__id72_.disableWordwrap = false;
__id72_.embedFonts = true;
__id72_.font = "Times New Roman";
__id72_.hAlign = "center";
__id72_.multiline = false;
__id72_.vAlign = "top";
__id72_.antiAliasType = "advanced";
__id72_.glowBlur = 3;
__id72_.glowColor = 0;
__id72_.useGlowFilter = false;
__id72_.glowQuality = 1;
__id72_.glowStrength = 5;
__id72_.gridFitType = "pixel";
__id72_.italic = false;
__id72_.selectable = false;
__id72_.underline = false;
try {
__id72_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id75__Symbol6_Layer1_1(){
try {
__id75_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id75_.text = "{txt_head6}";
__id75_.textColor = 1662108;
__id75_.textSize = 12;
__id75_.bold = true;
__id75_.disableWordwrap = false;
__id75_.embedFonts = true;
__id75_.font = "Times New Roman";
__id75_.hAlign = "center";
__id75_.multiline = false;
__id75_.vAlign = "top";
__id75_.antiAliasType = "advanced";
__id75_.glowBlur = 3;
__id75_.glowColor = 0;
__id75_.useGlowFilter = false;
__id75_.glowQuality = 1;
__id75_.glowStrength = 5;
__id75_.gridFitType = "pixel";
__id75_.italic = false;
__id75_.selectable = false;
__id75_.underline = false;
try {
__id75_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id74__Symbol6_Layer1_1(){
try {
__id74_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id74_.text = "{txt_head5}";
__id74_.textColor = 1662108;
__id74_.textSize = 12;
__id74_.bold = true;
__id74_.disableWordwrap = false;
__id74_.embedFonts = true;
__id74_.font = "Times New Roman";
__id74_.hAlign = "center";
__id74_.multiline = true;
__id74_.vAlign = "top";
__id74_.antiAliasType = "advanced";
__id74_.glowBlur = 3;
__id74_.glowColor = 0;
__id74_.useGlowFilter = false;
__id74_.glowQuality = 1;
__id74_.glowStrength = 5;
__id74_.gridFitType = "pixel";
__id74_.italic = false;
__id74_.selectable = false;
__id74_.underline = false;
try {
__id74_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id73__Symbol6_Layer1_1(){
try {
__id73_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id73_.text = "{txt_tut9}";
__id73_.textColor = 1662108;
__id73_.textSize = 12;
__id73_.bold = false;
__id73_.disableWordwrap = false;
__id73_.embedFonts = true;
__id73_.font = "Times New Roman";
__id73_.hAlign = "left";
__id73_.multiline = true;
__id73_.vAlign = "top";
__id73_.antiAliasType = "advanced";
__id73_.glowBlur = 3;
__id73_.glowColor = 0;
__id73_.useGlowFilter = false;
__id73_.glowQuality = 1;
__id73_.glowStrength = 5;
__id73_.gridFitType = "pixel";
__id73_.italic = false;
__id73_.selectable = false;
__id73_.underline = false;
try {
__id73_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 130
//Symbol7_96 (crazycraft_fla.Symbol7_96)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol7_96 extends MovieClip {
public var __id76_:LocalizedTextField;
public var __id77_:LocalizedTextField;
public var __id78_:LocalizedTextField;
public var __id79_:LocalizedTextField;
public function Symbol7_96(){
__setProp___id76__Symbol7_Layer1_1();
__setProp___id77__Symbol7_Layer1_1();
__setProp___id78__Symbol7_Layer1_1();
__setProp___id79__Symbol7_Layer1_1();
}
function __setProp___id76__Symbol7_Layer1_1(){
try {
__id76_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id76_.text = "{txt_head5}";
__id76_.textColor = 1662108;
__id76_.textSize = 12;
__id76_.bold = true;
__id76_.disableWordwrap = false;
__id76_.embedFonts = true;
__id76_.font = "Times New Roman";
__id76_.hAlign = "center";
__id76_.multiline = true;
__id76_.vAlign = "top";
__id76_.antiAliasType = "advanced";
__id76_.glowBlur = 3;
__id76_.glowColor = 0;
__id76_.useGlowFilter = false;
__id76_.glowQuality = 1;
__id76_.glowStrength = 5;
__id76_.gridFitType = "pixel";
__id76_.italic = false;
__id76_.selectable = false;
__id76_.underline = false;
try {
__id76_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id79__Symbol7_Layer1_1(){
try {
__id79_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id79_.text = "{txt_tut10}";
__id79_.textColor = 1662108;
__id79_.textSize = 12;
__id79_.bold = false;
__id79_.disableWordwrap = false;
__id79_.embedFonts = true;
__id79_.font = "Times New Roman";
__id79_.hAlign = "left";
__id79_.multiline = true;
__id79_.vAlign = "top";
__id79_.antiAliasType = "advanced";
__id79_.glowBlur = 3;
__id79_.glowColor = 0;
__id79_.useGlowFilter = false;
__id79_.glowQuality = 1;
__id79_.glowStrength = 5;
__id79_.gridFitType = "pixel";
__id79_.italic = false;
__id79_.selectable = false;
__id79_.underline = false;
try {
__id79_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id78__Symbol7_Layer1_1(){
try {
__id78_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id78_.text = "{txt_head9}";
__id78_.textColor = 1662108;
__id78_.textSize = 12;
__id78_.bold = true;
__id78_.disableWordwrap = false;
__id78_.embedFonts = true;
__id78_.font = "Times New Roman";
__id78_.hAlign = "center";
__id78_.multiline = false;
__id78_.vAlign = "top";
__id78_.antiAliasType = "advanced";
__id78_.glowBlur = 3;
__id78_.glowColor = 0;
__id78_.useGlowFilter = false;
__id78_.glowQuality = 1;
__id78_.glowStrength = 5;
__id78_.gridFitType = "pixel";
__id78_.italic = false;
__id78_.selectable = false;
__id78_.underline = false;
try {
__id78_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id77__Symbol7_Layer1_1(){
try {
__id77_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id77_.text = "{txt_head6}";
__id77_.textColor = 1662108;
__id77_.textSize = 12;
__id77_.bold = true;
__id77_.disableWordwrap = false;
__id77_.embedFonts = true;
__id77_.font = "Times New Roman";
__id77_.hAlign = "center";
__id77_.multiline = false;
__id77_.vAlign = "top";
__id77_.antiAliasType = "advanced";
__id77_.glowBlur = 3;
__id77_.glowColor = 0;
__id77_.useGlowFilter = false;
__id77_.glowQuality = 1;
__id77_.glowStrength = 5;
__id77_.gridFitType = "pixel";
__id77_.italic = false;
__id77_.selectable = false;
__id77_.underline = false;
try {
__id77_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 131
//Symbol8_97 (crazycraft_fla.Symbol8_97)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol8_97 extends MovieClip {
public var __id80_:LocalizedTextField;
public var __id81_:LocalizedTextField;
public var __id82_:LocalizedTextField;
public var __id83_:LocalizedTextField;
public function Symbol8_97(){
__setProp___id82__Symbol8_Layer1_1();
__setProp___id81__Symbol8_Layer1_1();
__setProp___id80__Symbol8_Layer1_1();
__setProp___id83__Symbol8_Layer1_1();
}
function __setProp___id80__Symbol8_Layer1_1(){
try {
__id80_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id80_.text = "{txt_head9}";
__id80_.textColor = 1662108;
__id80_.textSize = 12;
__id80_.bold = true;
__id80_.disableWordwrap = false;
__id80_.embedFonts = true;
__id80_.font = "Times New Roman";
__id80_.hAlign = "center";
__id80_.multiline = false;
__id80_.vAlign = "top";
__id80_.antiAliasType = "advanced";
__id80_.glowBlur = 3;
__id80_.glowColor = 0;
__id80_.useGlowFilter = false;
__id80_.glowQuality = 1;
__id80_.glowStrength = 5;
__id80_.gridFitType = "pixel";
__id80_.italic = false;
__id80_.selectable = false;
__id80_.underline = false;
try {
__id80_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id83__Symbol8_Layer1_1(){
try {
__id83_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id83_.text = "{txt_head6}";
__id83_.textColor = 1662108;
__id83_.textSize = 12;
__id83_.bold = true;
__id83_.disableWordwrap = false;
__id83_.embedFonts = true;
__id83_.font = "Times New Roman";
__id83_.hAlign = "center";
__id83_.multiline = false;
__id83_.vAlign = "top";
__id83_.antiAliasType = "advanced";
__id83_.glowBlur = 3;
__id83_.glowColor = 0;
__id83_.useGlowFilter = false;
__id83_.glowQuality = 1;
__id83_.glowStrength = 5;
__id83_.gridFitType = "pixel";
__id83_.italic = false;
__id83_.selectable = false;
__id83_.underline = false;
try {
__id83_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id82__Symbol8_Layer1_1(){
try {
__id82_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id82_.text = "{txt_head5}";
__id82_.textColor = 1662108;
__id82_.textSize = 12;
__id82_.bold = true;
__id82_.disableWordwrap = false;
__id82_.embedFonts = true;
__id82_.font = "Times New Roman";
__id82_.hAlign = "center";
__id82_.multiline = true;
__id82_.vAlign = "top";
__id82_.antiAliasType = "advanced";
__id82_.glowBlur = 3;
__id82_.glowColor = 0;
__id82_.useGlowFilter = false;
__id82_.glowQuality = 1;
__id82_.glowStrength = 5;
__id82_.gridFitType = "pixel";
__id82_.italic = false;
__id82_.selectable = false;
__id82_.underline = false;
try {
__id82_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id81__Symbol8_Layer1_1(){
try {
__id81_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id81_.text = "{txt_tut11}";
__id81_.textColor = 1662108;
__id81_.textSize = 12;
__id81_.bold = false;
__id81_.disableWordwrap = false;
__id81_.embedFonts = true;
__id81_.font = "Times New Roman";
__id81_.hAlign = "left";
__id81_.multiline = true;
__id81_.vAlign = "top";
__id81_.antiAliasType = "advanced";
__id81_.glowBlur = 3;
__id81_.glowColor = 0;
__id81_.useGlowFilter = false;
__id81_.glowQuality = 1;
__id81_.glowStrength = 5;
__id81_.gridFitType = "pixel";
__id81_.italic = false;
__id81_.selectable = false;
__id81_.underline = false;
try {
__id81_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 132
//Symbol9_98 (crazycraft_fla.Symbol9_98)
package crazycraft_fla {
import flash.display.*;
import spill.localisation.*;
public dynamic class Symbol9_98 extends MovieClip {
public var __id84_:LocalizedTextField;
public var __id85_:LocalizedTextField;
public function Symbol9_98(){
__setProp___id84__Symbol9_Layer1_1();
__setProp___id85__Symbol9_Layer1_1();
}
function __setProp___id84__Symbol9_Layer1_1(){
try {
__id84_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id84_.text = "{txt_head10}";
__id84_.textColor = 1662108;
__id84_.textSize = 12;
__id84_.bold = true;
__id84_.disableWordwrap = false;
__id84_.embedFonts = true;
__id84_.font = "Times New Roman";
__id84_.hAlign = "center";
__id84_.multiline = false;
__id84_.vAlign = "top";
__id84_.antiAliasType = "advanced";
__id84_.glowBlur = 3;
__id84_.glowColor = 0;
__id84_.useGlowFilter = false;
__id84_.glowQuality = 1;
__id84_.glowStrength = 5;
__id84_.gridFitType = "pixel";
__id84_.italic = false;
__id84_.selectable = false;
__id84_.underline = false;
try {
__id84_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id85__Symbol9_Layer1_1(){
try {
__id85_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id85_.text = "{txt_tut12}";
__id85_.textColor = 1662108;
__id85_.textSize = 12;
__id85_.bold = false;
__id85_.disableWordwrap = false;
__id85_.embedFonts = true;
__id85_.font = "Times New Roman";
__id85_.hAlign = "left";
__id85_.multiline = true;
__id85_.vAlign = "top";
__id85_.antiAliasType = "advanced";
__id85_.glowBlur = 3;
__id85_.glowColor = 0;
__id85_.useGlowFilter = false;
__id85_.glowQuality = 1;
__id85_.glowStrength = 5;
__id85_.gridFitType = "pixel";
__id85_.italic = false;
__id85_.selectable = false;
__id85_.underline = false;
try {
__id85_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package crazycraft_fla
Section 133
//IFoe (script.battle.IFoe)
package script.battle {
public interface IFoe extends ITarget {
function set mustBeDestoyedFirst(_arg1:Object):void;
function get canFire():Boolean;
function get mustBeDestoyedFirst():Object;
function set canFire(_arg1:Boolean):void;
}
}//package script.battle
Section 134
//ITarget (script.battle.ITarget)
package script.battle {
public interface ITarget {
}
}//package script.battle
Section 135
//CBtnGrowFX (script.components.CBtnGrowFX)
package script.components {
import flash.events.*;
import flash.display.*;
public class CBtnGrowFX extends MovieClip {
private var scale:Number;
public function CBtnGrowFX():void{
scale = scaleX;
scaleX = scale;
scaleY = scale;
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, onMuseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, onMuseDown, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, onMuseUp, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, onMuseOut, false, 0, true);
}
private function onMuseOut(_arg1:MouseEvent):void{
scaleX = scale;
scaleY = scale;
}
private function onMuseUp(_arg1:MouseEvent):void{
scaleX = (scale * 1.1);
scaleY = (scale * 1.1);
}
private function onMuseDown(_arg1:MouseEvent):void{
scaleX = (scale * 1.05);
scaleY = (scale * 1.05);
}
private function onMuseOver(_arg1:MouseEvent):void{
scaleX = (scale * 1.1);
scaleY = (scale * 1.1);
}
}
}//package script.components
Section 136
//CButtonArrow (script.components.CButtonArrow)
package script.components {
public class CButtonArrow extends CBtnGrowFX {
}
}//package script.components
Section 137
//CLevelIcon (script.components.CLevelIcon)
package script.components {
import flash.display.*;
import flash.text.*;
public class CLevelIcon extends CBtnGrowFX {
public var lvl:TextField;
private var _available:Boolean;
private var _level:uint;
public var sign:MovieClip;
public function CLevelIcon():void{
available = false;
lvl.mouseEnabled = false;
sign.mouseEnabled = false;
}
public function set level(_arg1:uint):void{
_level = _arg1;
if (_level > 9){
lvl.text = String(_level);
} else {
lvl.text = ("0" + String(_level));
};
}
public function get level():uint{
return (_level);
}
public function set available(_arg1:Boolean):void{
_available = _arg1;
if (_available){
sign.gotoAndStop(2);
} else {
sign.gotoAndStop(1);
};
}
public function get available():Boolean{
return (_available);
}
}
}//package script.components
Section 138
//CPartGroup (script.components.CPartGroup)
package script.components {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import script.windows.*;
public class CPartGroup extends MovieClip {
private var gs:CGameSession;
public var activeGroupIndex:int;
public var downBtn:CButtonArrow;
public var groupIcon:MovieClip;
private var _selectedGroup:uint;
private var _availableGroups:Array;
public var upBtn:CButtonArrow;
public static const BODY:uint = 2;
public static const MAX_GROUP:uint = 7;
public static const PUZZLE:uint = 7;
public static const TIRE:uint = 3;
public static const JOINT:uint = 6;
public static const VEHICLE:uint = 1;
public static const WEAPON:uint = 4;
public static const CORE:uint = 5;
public function CPartGroup():void{
gs = CGameSession.getInstance();
super();
upBtn.addEventListener(MouseEvent.CLICK, onUpBtnClick, false, 0, true);
downBtn.addEventListener(MouseEvent.CLICK, onDownBtnClick, false, 0, true);
}
public function set availableGroups(_arg1:Array):void{
_availableGroups = _arg1;
activeGroupIndex = 0;
groupIcon.gotoAndStop(_arg1[activeGroupIndex]);
selectedGroup = _arg1[activeGroupIndex];
}
public function set selectedGroup(_arg1:uint):void{
_selectedGroup = _arg1;
gs.activeGroup = _arg1;
}
private function onUpBtnClick(_arg1:MouseEvent):void{
activeGroupIndex--;
if (activeGroupIndex < 0){
activeGroupIndex = (availableGroups.length - 1);
};
selectedGroup = availableGroups[activeGroupIndex];
groupIcon.gotoAndStop(selectedGroup);
CPartSelectorWindow(parent).update2();
}
public function get selectedGroup():uint{
return (_selectedGroup);
}
private function onDownBtnClick(_arg1:MouseEvent):void{
activeGroupIndex++;
if (activeGroupIndex > (availableGroups.length - 1)){
activeGroupIndex = 0;
};
selectedGroup = availableGroups[activeGroupIndex];
groupIcon.gotoAndStop(selectedGroup);
CPartSelectorWindow(parent).update2();
}
public function get availableGroups():Array{
return (_availableGroups);
}
}
}//package script.components
Section 139
//CPartSlot (script.components.CPartSlot)
package script.components {
import script.parts.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
public class CPartSlot extends MovieClip {
public var usedSign:MovieClip;
private var _isUsed:Boolean;
private var ORIHEIGHT:Number;
private var ORIWIDTH:Number;
public var partContainer:MovieClip;
public var isActive:Boolean;// = false
private var _part:IPhysics;
public function CPartSlot():void{
isActive = false;
super();
this.buttonMode = true;
ORIWIDTH = width;
ORIHEIGHT = height;
usedSign.visible = false;
mouseChildren = false;
gotoAndStop(1);
addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
}
private function onMouseOver(_arg1:MouseEvent):void{
gotoAndStop(2);
}
public function get part():IPhysics{
return (_part);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
if (_isUsed){
usedSign.visible = true;
} else {
usedSign.visible = false;
};
}
private function onMouseOut(_arg1:MouseEvent):void{
gotoAndStop(1);
}
public function register(_arg1:IPhysics):void{
if (partContainer.numChildren > 0){
partContainer.removeChildAt(0);
};
part = _arg1;
partContainer.addChild(MovieClip(part));
if (IPart(part).isUsed){
isUsed = true;
} else {
isUsed = false;
};
}
public function set part(_arg1:IPhysics):void{
var _local2:Number;
_part = _arg1;
if (MovieClip(part).width > ORIWIDTH){
_local2 = (ORIWIDTH / MovieClip(part).width);
MovieClip(part).scaleX = (MovieClip(part).scaleX * _local2);
MovieClip(part).scaleY = (MovieClip(part).scaleY * _local2);
if (MovieClip(part).height > ORIHEIGHT){
_local2 = (ORIHEIGHT / MovieClip(part).height);
MovieClip(part).scaleX = (MovieClip(part).scaleX * _local2);
MovieClip(part).scaleY = (MovieClip(part).scaleY * _local2);
};
} else {
if (MovieClip(part).height > ORIHEIGHT){
_local2 = (ORIHEIGHT / MovieClip(part).height);
MovieClip(part).scaleX = (MovieClip(part).scaleX * _local2);
MovieClip(part).scaleY = (MovieClip(part).scaleY * _local2);
};
};
}
}
}//package script.components
Section 140
//CTextButton (script.components.CTextButton)
package script.components {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class CTextButton extends MovieClip {
private var scale:Number;
public var cap:TextField;
public function CTextButton(_arg1:String="CWButton", _arg2:uint=0):void{
scale = scaleX;
addEventListener(MouseEvent.MOUSE_OVER, onMuseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, onMuseDown, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, onMuseUp, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, onMuseOut, false, 0, true);
}
public function destroy():void{
removeEventListener(MouseEvent.MOUSE_OVER, onMuseOver);
removeEventListener(MouseEvent.MOUSE_DOWN, onMuseDown);
removeEventListener(MouseEvent.MOUSE_UP, onMuseUp);
removeEventListener(MouseEvent.MOUSE_OUT, onMuseOut);
}
private function onMuseOut(_arg1:MouseEvent):void{
scaleX = scale;
scaleY = scale;
}
private function onMuseUp(_arg1:MouseEvent):void{
scaleX = (scale * 1.1);
scaleY = (scale * 1.1);
}
private function onMuseDown(_arg1:MouseEvent):void{
scaleX = (scale * 1.05);
scaleY = (scale * 1.05);
}
private function onMuseOver(_arg1:MouseEvent):void{
scaleX = (scale * 1.1);
scaleY = (scale * 1.1);
}
}
}//package script.components
Section 141
//CToggle (script.components.CToggle)
package script.components {
import flash.events.*;
import flash.display.*;
import script.engine.*;
public class CToggle extends MovieClip {
private const OFF:Boolean = false;
private const ON:Boolean = true;
private var gs:CGameSession;
public var offBtn:MovieClip;
private var ss:CSoundManager;
private var _state:Boolean;
public var onBtn:MovieClip;
public function CToggle():void{
gs = CGameSession.getInstance();
ss = CSoundManager.getInstance();
super();
state = gs.isSoundOn;
onBtn.buttonMode = true;
offBtn.buttonMode = true;
onBtn.addEventListener(MouseEvent.MOUSE_OVER, onOnBtnOver, false, 0, true);
onBtn.addEventListener(MouseEvent.MOUSE_OUT, onOnBtnOut, false, 0, true);
onBtn.addEventListener(MouseEvent.CLICK, onOnBtnClick, false, 0, true);
offBtn.addEventListener(MouseEvent.MOUSE_OVER, onOffBtnOver, false, 0, true);
offBtn.addEventListener(MouseEvent.MOUSE_OUT, onOffBtnOut, false, 0, true);
offBtn.addEventListener(MouseEvent.CLICK, onOffBtnClick, false, 0, true);
}
private function onOnBtnOut(_arg1:MouseEvent):void{
onBtn.gotoAndStop(1);
state = state;
}
public function set state(_arg1:Boolean):void{
_state = _arg1;
if (_state == ON){
onBtn.gotoAndStop(3);
offBtn.gotoAndStop(1);
} else {
onBtn.gotoAndStop(1);
offBtn.gotoAndStop(3);
};
}
private function onOffBtnOver(_arg1:MouseEvent):void{
offBtn.gotoAndStop(2);
}
private function onOnBtnOver(_arg1:MouseEvent):void{
onBtn.gotoAndStop(2);
}
public function get state():Boolean{
return (_state);
}
private function onOffBtnOut(_arg1:MouseEvent):void{
offBtn.gotoAndStop(1);
state = state;
}
private function onOffBtnClick(_arg1:MouseEvent):void{
state = OFF;
ss.bgmVol = 0;
gs.isSoundOn = false;
}
private function onOnBtnClick(_arg1:MouseEvent):void{
state = ON;
ss.bgmVol = 1;
gs.isSoundOn = true;
}
}
}//package script.components
Section 142
//CToggleGraphics (script.components.CToggleGraphics)
package script.components {
import flash.events.*;
import flash.display.*;
import script.engine.*;
public class CToggleGraphics extends MovieClip {
private const LOW:int = 0;
private const MEDIUM:int = 1;
private const HIGH:int = 2;
private var gs:CGameSession;
public var highBtn:MovieClip;
public var lowBtn:MovieClip;
private var ss:CSoundManager;
private var _state:int;
public var mediumBtn:MovieClip;
public function CToggleGraphics():void{
gs = CGameSession.getInstance();
ss = CSoundManager.getInstance();
super();
state = gs.graphicsLevel;
lowBtn.buttonMode = true;
mediumBtn.buttonMode = true;
highBtn.buttonMode = true;
lowBtn.addEventListener(MouseEvent.MOUSE_OVER, onLowBtnOver, false, 0, true);
lowBtn.addEventListener(MouseEvent.MOUSE_OUT, onLowBtnOut, false, 0, true);
lowBtn.addEventListener(MouseEvent.CLICK, onLowBtnClick, false, 0, true);
mediumBtn.addEventListener(MouseEvent.MOUSE_OVER, onMediumBtnOver, false, 0, true);
mediumBtn.addEventListener(MouseEvent.MOUSE_OUT, onMediumBtnOut, false, 0, true);
mediumBtn.addEventListener(MouseEvent.CLICK, onMediumBtnClick, false, 0, true);
highBtn.addEventListener(MouseEvent.MOUSE_OVER, onHighBtnOver, false, 0, true);
highBtn.addEventListener(MouseEvent.MOUSE_OUT, onHighBtnOut, false, 0, true);
highBtn.addEventListener(MouseEvent.CLICK, onHighBtnClick, false, 0, true);
}
public function set state(_arg1:int):void{
_state = _arg1;
if (_state == LOW){
lowBtn.gotoAndStop(3);
mediumBtn.gotoAndStop(1);
highBtn.gotoAndStop(1);
} else {
if (_state == MEDIUM){
lowBtn.gotoAndStop(1);
mediumBtn.gotoAndStop(3);
highBtn.gotoAndStop(1);
} else {
lowBtn.gotoAndStop(1);
mediumBtn.gotoAndStop(1);
highBtn.gotoAndStop(3);
};
};
}
private function onMediumBtnOver(_arg1:MouseEvent):void{
mediumBtn.gotoAndStop(2);
}
public function get state():int{
return (_state);
}
private function onMediumBtnOut(_arg1:MouseEvent):void{
mediumBtn.gotoAndStop(1);
state = state;
}
private function onLowBtnClick(_arg1:MouseEvent):void{
state = LOW;
stage.quality = StageQuality.LOW;
gs.graphicsLevel = state;
}
private function onLowBtnOver(_arg1:MouseEvent):void{
lowBtn.gotoAndStop(2);
}
private function onLowBtnOut(_arg1:MouseEvent):void{
lowBtn.gotoAndStop(1);
state = state;
}
private function onHighBtnClick(_arg1:MouseEvent):void{
state = HIGH;
stage.quality = StageQuality.BEST;
gs.graphicsLevel = state;
}
private function onHighBtnOut(_arg1:MouseEvent):void{
highBtn.gotoAndStop(1);
state = state;
}
private function onMediumBtnClick(_arg1:MouseEvent):void{
state = MEDIUM;
stage.quality = StageQuality.MEDIUM;
gs.graphicsLevel = state;
}
private function onHighBtnOver(_arg1:MouseEvent):void{
highBtn.gotoAndStop(2);
}
}
}//package script.components
Section 143
//CPhysicsWorld (script.engine.physics.CPhysicsWorld)
package script.engine.physics {
import script.parts.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import com.actionsnippet.qbox.objects.*;
import flash.geom.*;
public class CPhysicsWorld {
private var gs:CGameSession;
public var layer:MovieClip;
public var world:QuickBox2D;
public var contacts:QuickContacts;
public function CPhysicsWorld(_arg1:MovieClip, _arg2:Boolean=false):void{
gs = CGameSession.getInstance();
super();
layer = _arg1;
world = new QuickBox2D(layer, {frim:false, renderJoints:false, bounds:[-100, -100, 200, 100], debug:_arg2});
if (_arg2){
world.grid();
world.addContactListener();
};
}
public function addBody(_arg1:Array):void{
var _local2:uint;
var _local3:*;
var _local4:Point;
var _local5:uint;
var _local6:Point;
var _local7:MovieClip;
var _local8:QuickObject;
var _local9:Point;
var _local10:Point;
_local2 = 0;
while (_local2 < _arg1.length) {
if (!(_arg1[_local2] is ICore)){
_arg1[_local2].pw = world;
};
if ((_arg1[_local2] is ITrackComponent)){
if ((_arg1[_local2] is IGoal)){
gs.goalComponent = _arg1[_local2].body;
};
if ((_arg1[_local2] is IObstacle)){
} else {
_arg1[_local2].body.userData.visible = false;
gs.trackComponents.push(_arg1[_local2].body);
};
};
_local3 = _arg1[_local2].body.userData;
_local5 = 0;
while (_local5 < _local3.numChildren) {
if ((_local3.getChildAt(_local5) is ICore)){
gs.currentCorePartBody = _local3.body;
break;
};
_local5++;
};
_local2++;
};
_local2 = 0;
while (_local2 < _arg1.length) {
_local4 = new Point((_arg1[_local2].body.x * 30), (_arg1[_local2].body.y * 30));
if ((_arg1[_local2] is ITirePart)){
_local5 = 0;
while (_local5 < _arg1.length) {
if (!(_arg1[_local5] is ITirePart)){
_local6 = new Point((_arg1[_local5].body.x * 30), (_arg1[_local5].body.y * 30));
_local7 = new _arg1[_local5].constructor();
_local7.x = _local6.x;
_local7.y = _local6.y;
if (_local7.hitTestPoint(_local4.x, _local4.y, false)){
_local8 = world.addJoint({type:"revolute", a:_arg1[_local5].body.body, b:_arg1[_local2].body.body, x1:_arg1[_local2].body.x, y1:_arg1[_local2].body.y, x2:_arg1[_local2].body.x, y2:_arg1[_local2].body.y, collideConnected:false});
};
};
_local5++;
};
};
if ((_arg1[_local2] is IJoint)){
_local9 = new Point(((_arg1[_local2].body.x * 30) + _arg1[_local2].a.x), ((_arg1[_local2].body.y * 30) + _arg1[_local2].a.y));
_local10 = new Point(((_arg1[_local2].body.x * 30) + _arg1[_local2].b.x), ((_arg1[_local2].body.y * 30) + _arg1[_local2].b.y));
if ((_arg1[_local2] is IJointRev)){
_local5 = 0;
while (_local5 < _arg1.length) {
if (!(_arg1[_local5] is ITirePart)){
_local6 = new Point((_arg1[_local5].body.x * 30), (_arg1[_local5].body.y * 30));
_local7 = new _arg1[_local5].constructor();
_local7.x = _local6.x;
_local7.y = _local6.y;
if (_local7.hitTestPoint(_local9.x, _local9.y, false)){
_local8 = world.addJoint({type:"revolute", a:_arg1[_local5].body.body, b:_arg1[_local2].body.body, x1:(_arg1[_local2].body.x + (_arg1[_local2].a.x / 30)), y1:(_arg1[_local2].body.y + (_arg1[_local2].a.y / 30)), x2:(_arg1[_local2].body.x + (_arg1[_local2].a.x / 30)), y2:(_arg1[_local2].body.y + (_arg1[_local2].a.y / 30)), collideConnected:false});
};
if (_local7.hitTestPoint(_local10.x, _local10.y, false)){
_local8 = world.addJoint({type:"revolute", a:_arg1[_local5].body.body, b:_arg1[_local2].body.body, x1:(_arg1[_local2].body.x + (_arg1[_local2].b.x / 30)), y1:(_arg1[_local2].body.y + (_arg1[_local2].b.y / 30)), x2:(_arg1[_local2].body.x + (_arg1[_local2].b.x / 30)), y2:(_arg1[_local2].body.y + (_arg1[_local2].b.y / 30)), collideConnected:false});
};
};
_local5++;
};
} else {
if ((_arg1[_local2] is IJointFix)){
_local5 = 0;
while (_local5 < _arg1.length) {
if (!(_arg1[_local5] is ITirePart)){
_local6 = new Point((_arg1[_local5].body.x * 30), (_arg1[_local5].body.y * 30));
_local7 = new _arg1[_local5].constructor();
_local7.x = _local6.x;
_local7.y = _local6.y;
if (_local7.hitTestPoint(_local9.x, _local9.y, false)){
_local8 = world.addJoint({type:"revolute", maxMotorForce:100, a:_arg1[_local5].body.body, b:_arg1[_local2].body.body, x1:(_arg1[_local2].body.x + (_arg1[_local2].a.x / 30)), y1:(_arg1[_local2].body.y + (_arg1[_local2].a.y / 30)), x2:(_arg1[_local2].body.x + (_arg1[_local2].a.x / 30)), y2:(_arg1[_local2].body.y + (_arg1[_local2].a.y / 30)), enableLimit:true, collideConnected:false});
};
if (_local7.hitTestPoint(_local10.x, _local10.y, false)){
_local8 = world.addJoint({type:"revolute", maxMotorForce:100, a:_arg1[_local5].body.body, b:_arg1[_local2].body.body, x1:(_arg1[_local2].body.x + (_arg1[_local2].b.x / 30)), y1:(_arg1[_local2].body.y + (_arg1[_local2].b.y / 30)), x2:(_arg1[_local2].body.x + (_arg1[_local2].b.x / 30)), y2:(_arg1[_local2].body.y + (_arg1[_local2].b.y / 30)), enableLimit:true, collideConnected:false});
};
};
_local5++;
};
};
};
};
if ((_arg1[_local2] is ICore)){
};
_local2++;
};
}
public function start():void{
world.start();
}
public function vibrate(_arg1:QuickObject, _arg2:Number):void{
var _local3:b2Vec2;
_local3 = new b2Vec2(((Math.random() - 0.5) * _arg2), ((Math.random() - 0.5) * _arg2));
_arg1.body.ApplyImpulse(_local3, _arg1.body.GetWorldCenter());
}
public function stop():void{
world.stop();
}
}
}//package script.engine.physics
Section 144
//IPhysics (script.engine.physics.IPhysics)
package script.engine.physics {
import flash.display.*;
public interface IPhysics {
function cloneMC():IPhysics;
function clone(_arg1:MovieClip=null):Array;
}
}//package script.engine.physics
Section 145
//CEventOrganizer (script.engine.CEventOrganizer)
package script.engine {
import flash.events.*;
public class CEventOrganizer extends EventDispatcher {
private static var instance:CEventOrganizer = new (CEventOrganizer);
;
public function CEventOrganizer():void{
if (instance){
throw (new Error("It is a Singleton and can only be accessed through Singleton.getInstance()"));
};
}
public static function getInstance():CEventOrganizer{
return (instance);
}
}
}//package script.engine
Section 146
//CGameSession (script.engine.CGameSession)
package script.engine {
import script.parts.*;
import flash.events.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.tracks.*;
import script.battle.*;
import flash.net.*;
public class CGameSession extends EventDispatcher {
public const MAX_LEVEL:uint = 25;
public const FIRING_RANGE:int = 800;
public var targets:Array;
public var currentLevel:uint;
public var lastLevel:uint;// = 25
public var isLoseAndRetry:Boolean;
public var stageRoot:Stage;
public var activeGroup:uint;
public var vehicleParts:Array;
public var tiresConnectedToCore:Array;
public var currentCorePartMC:MovieClip;
public var currentCorePartBody:QuickObject;
public var destroyables:Array;
public var isNewGame:Boolean;
public var goalComponent:QuickObject;
public var bullets:Array;
public var foes:Array;
public var currentCore:ICore;
public var graphicsLevel:int;// = 1
public var trackComponents:Array;
public var isSoundOn:Boolean;// = true
public var lastCrafted:Object;
public var isPuzzleMode:Boolean;// = true
public var levelData:CLevelData;
public var isCoreDeployed:Boolean;
public var canDeploy:Boolean;
public var vehicleSkins:Array;
private var _isTargetDetected:Boolean;
public var isLose:Boolean;
public var currentTrack:ITrack;
public var LEVEL:uint;
public var isWin:Boolean;
public var craftedVehicle:Object;
private static var instance:CGameSession = new (CGameSession);
;
public function CGameSession():void{
isPuzzleMode = true;
lastLevel = 25;
isSoundOn = true;
graphicsLevel = 1;
super();
if (instance){
throw (new Error("It is a Singleton and can only be accessed through Singleton.getInstance()"));
};
}
public function updateGameData():void{
var _local1:SharedObject;
if (currentLevel > lastLevel){
_local1 = SharedObject.getLocal("crazycraftbywilly");
_local1.data.nm = "crazycraftbywilly";
_local1.data.lastLevel = currentLevel;
};
}
public function initLevel():void{
if (currentTrack){
currentTrack = null;
};
currentTrack = (new levelData.levels[currentLevel].track() as ITrack);
craftedVehicle = new Object();
canDeploy = false;
isCoreDeployed = false;
currentCore = null;
currentCorePartBody = null;
currentCorePartMC = null;
tiresConnectedToCore = new Array();
bullets = new Array();
destroyables = new Array();
targets = new Array();
foes = new Array();
isTargetDetected = false;
trackComponents = new Array();
foes = new Array();
goalComponent = null;
isWin = false;
isLose = false;
}
public function loadGameData():void{
var _local1:SharedObject;
_local1 = SharedObject.getLocal("crazycraftbywilly");
if (_local1.data.nm == "crazycraftbywilly"){
lastLevel = _local1.data.lastLevel;
} else {
lastLevel = 1;
};
}
public function set isTargetDetected(_arg1:Boolean):void{
_isTargetDetected = _arg1;
if (_isTargetDetected){
dispatchEvent(new Event("fire"));
} else {
dispatchEvent(new Event("cease fire"));
};
}
public function get isTargetDetected():Boolean{
return (_isTargetDetected);
}
public static function getInstance():CGameSession{
return (instance);
}
}
}//package script.engine
Section 147
//CLevel (script.engine.CLevel)
package script.engine {
public class CLevel {
public var track:Object;
public var isLocked:Boolean;
public var availableBodyParts:Array;
public var availableTireParts:Array;
public var levelDescription:String;
public var availableWeaponParts:Array;
public var availableJointParts:Array;
public var completionBonus:uint;
public var levelName:String;
public var availableVehicles:Array;
public var availableCoreParts:Array;
public var availablePuzzleParts:Array;
public var availableGroups:Array;
}
}//package script.engine
Section 148
//CLevelData (script.engine.CLevelData)
package script.engine {
import script.parts.*;
import script.tracks.*;
import script.components.*;
public class CLevelData {
public var levels:Array;
public function CLevelData():void{
levels = new Array();
super();
levels[1] = new CLevel();
levels[1].levelName = "Level 1";
levels[1].levelDescription = "journey begin";
levels[1].track = CTrack001;
levels[1].availableGroups = new Array(CPartGroup.PUZZLE);
levels[1].availablePuzzleParts = new Array(CRectanglePart, CTireSPart, CTireSPart, CCore01);
levels[2] = new CLevel();
levels[2].levelName = "Level 2";
levels[2].levelDescription = "turtle or tiger";
levels[2].track = CTrack002;
levels[2].availableGroups = new Array(CPartGroup.PUZZLE);
levels[2].availablePuzzleParts = new Array(CRectanglePart, CRectangleWidePart, CTireSPart, CTireSPart, CTireSPart, CCore01);
levels[3] = new CLevel();
levels[3].levelName = "Level 3";
levels[3].levelDescription = "big rock in the way";
levels[3].track = CTrack003;
levels[3].availableGroups = new Array(CPartGroup.PUZZLE);
levels[3].availablePuzzleParts = new Array(CRectangleWidePart, CCore01, CTireSPart, CTireSPart, CTireBPart, CTireBPart);
levels[4] = new CLevel();
levels[4].levelName = "Level 4";
levels[4].levelDescription = "hill";
levels[4].track = CTrack004;
levels[4].availableGroups = new Array(CPartGroup.PUZZLE);
levels[4].availablePuzzleParts = new Array(CRectanglePart, CCore01, CCore02, CTireMPart, CTireMPart);
levels[5] = new CLevel();
levels[5].levelName = "Level 5";
levels[5].levelDescription = "bridge builder";
levels[5].track = CTrack005;
levels[5].availableGroups = new Array(CPartGroup.PUZZLE);
levels[5].availablePuzzleParts = new Array(CRectangleWidePart, CRectanglePart, CRectangleWidePart, CCore01, CTireSPart, CTireSPart);
levels[6] = new CLevel();
levels[6].levelName = "Level 6";
levels[6].levelDescription = "break through";
levels[6].track = CTrack006;
levels[6].availableGroups = new Array(CPartGroup.PUZZLE);
levels[6].availablePuzzleParts = new Array(CHexagonPart, CVulcan, CFixJointV, CCore01, CTireSPart, CTireSPart);
levels[7] = new CLevel();
levels[7].levelName = "Level 7";
levels[7].levelDescription = "need a rope?";
levels[7].track = CTrack007;
levels[7].availableGroups = new Array(CPartGroup.PUZZLE);
levels[7].availablePuzzleParts = new Array(CRectangleWidePart, CRectanglePart, CRectangleWidePart, CSquarePart, CSquarePart, CFixJointV, CFixJointV, CFixJointV, CCore01, CTireMPart, CTireMPart);
levels[8] = new CLevel();
levels[8].levelName = "Level 8";
levels[8].levelDescription = "speed-wise";
levels[8].track = CTrack008;
levels[8].availableGroups = new Array(CPartGroup.PUZZLE);
levels[8].availablePuzzleParts = new Array(CRectangleWidePart, CHexagonPart, CCore01, CCore02, CTireMPart, CTireMPart, CTireSPart, CTireSPart);
levels[9] = new CLevel();
levels[9].levelName = "Level 9";
levels[9].levelDescription = "up the mountain";
levels[9].track = CTrack009;
levels[9].availableGroups = new Array(CPartGroup.PUZZLE);
levels[9].availablePuzzleParts = new Array(CRectangleWidePart, CRectangleWidePart, CHexagonPart, CFixJointH, CCore03, CTireBPart, CTireBPart);
levels[10] = new CLevel();
levels[10].levelName = "Level 10";
levels[10].levelDescription = "gravity madness";
levels[10].track = CTrack010;
levels[10].availableGroups = new Array(CPartGroup.PUZZLE);
levels[10].availablePuzzleParts = new Array(CRectangleWidePart, CRectanglePart, CHexagonPart, CCore01, CCore02, CCore03, CTireBPart, CTireBPart);
levels[11] = new CLevel();
levels[11].levelName = "Level 11";
levels[11].levelDescription = "stonehenge is missing";
levels[11].track = CTrack011;
levels[11].availableGroups = new Array(CPartGroup.PUZZLE);
levels[11].availablePuzzleParts = new Array(CRectangleTallPart, CRectangleWidePart, CRectangleTallPart, CHexagonPart, CCore01, CCore02, CCore03, CTireTPart, CTireTPart);
levels[12] = new CLevel();
levels[12].levelName = "Level 12";
levels[12].levelDescription = "colloseum";
levels[12].track = CTrack012;
levels[12].availableGroups = new Array(CPartGroup.PUZZLE);
levels[12].availablePuzzleParts = new Array(CHexagonPart, CCore01, CCore02, CCore03, CTireBPart, CTireBPart, CTireBPart);
levels[13] = new CLevel();
levels[13].levelName = "Level 13";
levels[13].levelDescription = "pit walker";
levels[13].track = CTrack013;
levels[13].availableGroups = new Array(CPartGroup.PUZZLE);
levels[13].availablePuzzleParts = new Array(CHexagonPart, CRectangleWidePart, CCore01, CTireSPart, CTireBPart, CTireTPart);
levels[14] = new CLevel();
levels[14].levelName = "Level 14";
levels[14].levelDescription = "pit jumper";
levels[14].track = CTrack014;
levels[14].availableGroups = new Array(CPartGroup.PUZZLE);
levels[14].availablePuzzleParts = new Array(CHexagonPart, CCore01, CCore02, CCore03, CTireSPart, CTireSPart, CTireBPart, CTireBPart);
levels[15] = new CLevel();
levels[15].levelName = "Level 15";
levels[15].levelDescription = "pit crawler";
levels[15].track = CTrack015;
levels[15].availableGroups = new Array(CPartGroup.PUZZLE);
levels[15].availablePuzzleParts = new Array(CHexagonPart, CCore01, CCore02, CCore03, CTireTPart, CTireSPart, CTireBPart);
levels[16] = new CLevel();
levels[16].levelName = "Level 16";
levels[16].levelDescription = "vertical limit";
levels[16].track = CTrack016;
levels[16].availableGroups = new Array(CPartGroup.PUZZLE);
levels[16].availablePuzzleParts = new Array(CHexagonPart, CRectanglePart, CFixJointH, CFixJointH, CFixJointV, CFixJointV, CCore01, CCore02, CCore03, CTireSPart, CTireSPart, CTireMPart, CTireMPart, CTireBPart, CTireBPart);
levels[17] = new CLevel();
levels[17].levelName = "Level 17";
levels[17].levelDescription = "enemy teritory";
levels[17].track = CTrack017;
levels[17].availableGroups = new Array(CPartGroup.PUZZLE);
levels[17].availablePuzzleParts = new Array(CRectangleTallPart, CRectanglePart, CRectangleWidePart, CTireSPart, CTireSPart, CTireSPart, CCore01, CFixJointH, CFixJointV, CFixJointH, CFixJointV, CVulcan, CVulcan);
levels[18] = new CLevel();
levels[18].levelName = "Level 18";
levels[18].levelDescription = "enemy sighted";
levels[18].track = CTrack018;
levels[18].availableGroups = new Array(CPartGroup.PUZZLE);
levels[18].availablePuzzleParts = new Array(CHexagonPart, CRectanglePart, CVulcan, CFixJointH, CFixJointV, CCore01, CCore02, CTireSPart, CTireSPart);
levels[19] = new CLevel();
levels[19].levelName = "Level 19";
levels[19].levelDescription = "how long can you go?";
levels[19].track = CTrack019;
levels[19].availableGroups = new Array(CPartGroup.PUZZLE);
levels[19].availablePuzzleParts = new Array(CSquarePart, CRectanglePart, CRectangleTallPart, CRectangleWidePart, CVulcan, CFixJointH, CFixJointV, CFixJointH, CFixJointV, CCore01, CCore02, CTireTPart, CTireSPart, CTireSPart);
levels[20] = new CLevel();
levels[20].levelName = "Level 20";
levels[20].levelDescription = "bigfoot great escape";
levels[20].track = CTrack020;
levels[20].availableGroups = new Array(CPartGroup.PUZZLE);
levels[20].availablePuzzleParts = new Array(CHexagonPart, CRectanglePart, CVulcan, CFixJointV, CCore01, CCore02, CTireSPart, CTireSPart, CTireBPart, CTireBPart);
levels[21] = new CLevel();
levels[21].levelName = "Level 21";
levels[21].levelDescription = "annoying bird";
levels[21].track = CTrack021;
levels[21].availableGroups = new Array(CPartGroup.PUZZLE);
levels[21].availablePuzzleParts = new Array(CHexagonPart, CSquarePart, CVulcan, CCore01, CFixJointV, CFixJointV, CTireMPart, CTireMPart);
levels[22] = new CLevel();
levels[22].levelName = "Level 22";
levels[22].levelDescription = "two smoking barrels";
levels[22].track = CTrack022;
levels[22].availableGroups = new Array(CPartGroup.PUZZLE);
levels[22].availablePuzzleParts = new Array(CRectangleWidePart, CRectangleWidePart, CHexagonPart, CCanon, CFixJointH, CFixJointH, CFixJointV, CFixJointV, CCore01, CCore02, CTireSPart, CTireSPart, CTireSPart, CTireSPart, CTireBPart, CTireBPart);
levels[23] = new CLevel();
levels[23].levelName = "Level 23";
levels[23].levelDescription = "heavy rain";
levels[23].track = CTrack023;
levels[23].availableGroups = new Array(CPartGroup.PUZZLE);
levels[23].availablePuzzleParts = new Array(CSquarePart, CSquarePart, CSquarePart, CSquarePart, CFixJointV, CFixJointV, CFixJointV, CFixJointV, CFixJointV, CFixJointV, CFixJointV, CFixJointV, CCore01, CTireSPart, CTireSPart, CTireSPart, CTireSPart);
levels[24] = new CLevel();
levels[24].levelName = "Level 24";
levels[24].levelDescription = "fortress";
levels[24].track = CTrack024;
levels[24].availableGroups = new Array(CPartGroup.PUZZLE);
levels[24].availablePuzzleParts = new Array(CRectangleWidePart, CRectangleWidePart, CRectanglePart, CCanon, CFixJointH, CFixJointH, CFixJointV, CFixJointV, CCore01, CCore02, CTireMPart, CTireMPart);
levels[25] = new CLevel();
levels[25].levelName = "Level 25";
levels[25].levelDescription = "death valley";
levels[25].track = CTrack025;
levels[25].availableGroups = new Array(CPartGroup.PUZZLE);
levels[25].availablePuzzleParts = new Array(CRectangleWidePart, CRectangleWidePart, CRectangleWidePart, CRectangleWidePart, CRectanglePart, CVulcan, CVulcan, CCanon, CFixJointH, CFixJointV, CFixJointH, CFixJointV, CFixJointH, CFixJointV, CFixJointH, CFixJointV, CCore01, CCore02, CTireSPart, CTireSPart, CTireMPart, CTireMPart);
}
}
}//package script.engine
Section 149
//CScreenManager (script.engine.CScreenManager)
package script.engine {
import flash.events.*;
import flash.display.*;
import script.screen.*;
public class CScreenManager extends MovieClip {
public var activeScreen:IScreen;
private var ss:CSoundManager;
private var eo:CEventOrganizer;
public static const CONTINUE_SCREEN:String = "continue screen";
public static const MENU_SCREEN:String = "menu screen";
public static const END_SCREEN:String = "end screen";
public static const CREDITS_SCREEN:String = "credits screen";
public static const PLAY_SCREEN:String = "play screen";
public static const HOW_SCREEN:String = "how screen";
public static const INTRO_SCREEN:String = "intro screen";
public function CScreenManager():void{
eo = CEventOrganizer.getInstance();
ss = CSoundManager.getInstance();
activeScreen = new CMenuScreen();
super();
eo.addEventListener(INTRO_SCREEN, changeToIntroScreen, false, 0, true);
eo.addEventListener(MENU_SCREEN, changeToMenuScreen, false, 0, true);
eo.addEventListener(PLAY_SCREEN, changeToPlayScreen, false, 0, true);
eo.addEventListener(CREDITS_SCREEN, changeToCreditsScreen, false, 0, true);
eo.addEventListener(CONTINUE_SCREEN, changeToContinueScreen, false, 0, true);
eo.addEventListener(END_SCREEN, changeToEndScreen, false, 0, true);
eo.addEventListener(HOW_SCREEN, changeToHowScreen, false, 0, true);
}
private function changeToCreditsScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CCreditsScreen();
eo.dispatchEvent(new Event("change screen"));
}
private function changeToEndScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CEndScreen();
eo.dispatchEvent(new Event("change screen"));
}
private function changeToContinueScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CContinueScreen();
eo.dispatchEvent(new Event("change screen"));
}
private function changeToMenuScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CMenuScreen();
eo.dispatchEvent(new Event("change screen"));
}
private function changeToPlayScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CPlayScreen();
eo.dispatchEvent(new Event("change screen"));
}
private function changeToIntroScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CIntroScreen();
eo.dispatchEvent(new Event("change screen"));
}
private function changeToHowScreen(_arg1:Event):void{
activeScreen = null;
activeScreen = new CHowToPlayScreen();
eo.dispatchEvent(new Event("change screen"));
}
}
}//package script.engine
Section 150
//CSoundManager (script.engine.CSoundManager)
package script.engine {
import flash.media.*;
public class CSoundManager {
private var sbgmMenuScreen:CSMenu;
public var sfx:SoundChannel;
public var bgm:SoundChannel;
private var _bgmVol:Number;
private var sbgmPlayScreen:CSGameplay;
private var gs:CGameSession;
private var _sfxVol:Number;
private var bgmPlayed:String;
public static const bgmMenuScreen:String = "bgmMenuScreen";
public static const bgmPlayScreen:String = "bgmPlayScreen";
private static var instance:CSoundManager = new (CSoundManager);
;
public function CSoundManager():void{
gs = CGameSession.getInstance();
sfx = new SoundChannel();
bgm = new SoundChannel();
sbgmMenuScreen = new CSMenu();
sbgmPlayScreen = new CSGameplay();
super();
if (instance){
throw (new Error("It is a Singleton and can only be accessed through Singleton.getInstance()"));
};
}
public function playSound(_arg1:String):void{
bgmPlayed = _arg1;
if (_arg1 == bgmMenuScreen){
bgm = sbgmMenuScreen.play(1, 1000);
};
if (_arg1 == bgmPlayScreen){
bgm = sbgmPlayScreen.play(1, 1000);
};
if (gs.isSoundOn){
bgmVol = 1;
} else {
bgmVol = 0;
};
}
public function changeBgmTo(_arg1:String):void{
if (_arg1 != bgmPlayed){
bgm.stop();
playSound(_arg1);
if (gs.isSoundOn){
bgmVol = 1;
} else {
bgmVol = 0;
};
};
}
public function get sfxVol():Number{
return (_sfxVol);
}
public function set bgmVol(_arg1:Number):void{
_bgmVol = _arg1;
bgm.soundTransform = new SoundTransform(_arg1);
}
public function set sfxVol(_arg1:Number):void{
_sfxVol = _arg1;
sfx.soundTransform = new SoundTransform(_arg1);
}
public function get bgmVol():Number{
return (_bgmVol);
}
public function stopSound(_arg1:String):void{
if (_arg1 == bgmMenuScreen){
bgm = sbgmMenuScreen.stop();
};
if (_arg1 == bgmPlayScreen){
bgm = sbgmPlayScreen.stop();
};
}
public static function getInstance():CSoundManager{
return (instance);
}
}
}//package script.engine
Section 151
//IScreen (script.engine.IScreen)
package script.engine {
public interface IScreen {
function destroy():void;
}
}//package script.engine
Section 152
//CColFX1 (script.fx.CColFX1)
package script.fx {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
public class CColFX1 extends MovieClip {
private var tt:Timer;
public var fx:MovieClip;
public function CColFX1():void{
var _local1:uint;
tt = new Timer(20, 1);
super();
_local1 = uint((Math.random() * 2));
if (_local1 == 0){
fx.scaleX = -1;
};
tt.addEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy, false, 0, true);
tt.start();
}
private function autoDestroy(_arg1:TimerEvent):void{
tt.removeEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy);
parent.removeChild(this);
}
}
}//package script.fx
Section 153
//CColFX2 (script.fx.CColFX2)
package script.fx {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
public class CColFX2 extends MovieClip {
private var tt:Timer;
public var fx:MovieClip;
public function CColFX2():void{
var _local1:uint;
tt = new Timer(50);
super();
_local1 = (Math.random() * 0.5);
fx.scaleX = (fx.scaleX + _local1);
fx.scaleY = fx.scaleX;
fx.rotation = (Math.random() * 360);
tt.addEventListener(TimerEvent.TIMER, autoDestroy, false, 0, true);
tt.start();
}
private function autoDestroy(_arg1:TimerEvent):void{
alpha = (alpha - 0.1);
if (alpha < 0){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, autoDestroy);
parent.removeChild(this);
};
}
}
}//package script.fx
Section 154
//CFireFX1 (script.fx.CFireFX1)
package script.fx {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
public class CFireFX1 extends MovieClip {
private var tt:Timer;
private var dy:uint;// = 4
private var dx:uint;// = 4
public var fx:MovieClip;
public function CFireFX1():void{
var _local1:uint;
dx = 4;
dy = 4;
tt = new Timer(20, 1);
super();
fx.x = ((-(dx) / 2) + (Math.random() * dx));
fx.y = ((-(dy) / 2) + (Math.random() * dy));
_local1 = uint((Math.random() * 2));
if (_local1 == 0){
fx.scaleY = -1;
};
tt.addEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy, false, 0, true);
tt.start();
}
private function autoDestroy(_arg1:TimerEvent):void{
tt.removeEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy);
parent.removeChild(this);
}
}
}//package script.fx
Section 155
//CFireFX2 (script.fx.CFireFX2)
package script.fx {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
public class CFireFX2 extends MovieClip {
private var tt:Timer;
public var fx:MovieClip;
public function CFireFX2():void{
var _local1:uint;
tt = new Timer(50);
super();
_local1 = uint((Math.random() * 2));
if (_local1 == 0){
fx.scaleY = -1;
};
tt.addEventListener(TimerEvent.TIMER, autoDestroy, false, 0, true);
tt.start();
}
private function autoDestroy(_arg1:TimerEvent):void{
alpha = (alpha - 0.1);
if (alpha < 0){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, autoDestroy);
parent.removeChild(this);
};
}
}
}//package script.fx
Section 156
//CShredDust (script.fx.CShredDust)
package script.fx {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
public class CShredDust extends MovieClip {
private var tt:Timer;
public function CShredDust():void{
var _local1:uint;
tt = new Timer(1);
super();
_local1 = uint((Math.random() * 2));
rotation = (Math.random() * 360);
tt.addEventListener(TimerEvent.TIMER, autoDestroy, false, 0, true);
tt.start();
}
private function autoDestroy(_arg1:TimerEvent):void{
alpha = (alpha - 0.1);
if (alpha < 0){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, autoDestroy);
parent.removeChild(this);
};
}
}
}//package script.fx
Section 157
//CBullet1 (script.parts.CBullet1)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CBullet1 extends MovieClip implements IPhysics, IBullet {
private var gs:CGameSession;
private var _isDamageByCollision:Boolean;// = true
private var _isDamageByBlast:Boolean;// = false
public var bb:MovieClip;
private var _destroyTimer:Timer;
private var _colFx:Object;
private var _pw:QuickBox2D;
public var body:QuickObject;
private var _firedBy:IWeapon;
private var vt:Timer;
private var _blastDamage:uint;// = 50
public function CBullet1():void{
gs = CGameSession.getInstance();
vt = new Timer(20, 1);
_colFx = CColFX1;
_blastDamage = 50;
_isDamageByBlast = false;
_isDamageByCollision = true;
_destroyTimer = new Timer(2000, 1);
super();
visible = false;
vt.addEventListener(TimerEvent.TIMER_COMPLETE, showTime);
vt.start();
mouseChildren = false;
_destroyTimer.addEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy, false, 0, true);
_destroyTimer.start();
}
public function destroy():void{
_destroyTimer.stop();
_destroyTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({groupIndex:-1, isBullet:true, skin:this});
bb.visible = false;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CBullet1;
_local2 = new CBullet1();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function autoDestroy(_arg1:TimerEvent):void{
var _local2:uint;
destroy();
_local2 = 0;
while (_local2 < gs.bullets.length) {
if (gs.bullets[_local2].body == body){
gs.bullets.splice(_local2, 1);
break;
};
_local2++;
};
_pw.w.DestroyBody(this.body.body);
if (this){
parent.removeChild(this);
};
}
private function showTime(_arg1:TimerEvent):void{
vt.removeEventListener(TimerEvent.TIMER_COMPLETE, showTime);
visible = true;
}
public function get destroyTimer():Timer{
return (_destroyTimer);
}
public function get isDamageByBlast():Boolean{
return (_isDamageByBlast);
}
public function get colFx():Object{
return (_colFx);
}
public function get isDamageByCollision():Boolean{
return (_isDamageByCollision);
}
public function cloneMC():IPhysics{
return (new CBullet1());
}
public function set firedBy(_arg1:IWeapon):void{
_firedBy = _arg1;
}
public function get blastDamage():uint{
return (_blastDamage);
}
public function get firedBy():IWeapon{
return (_firedBy);
}
}
}//package script.parts
Section 158
//CBullet2 (script.parts.CBullet2)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CBullet2 extends MovieClip implements IPhysics, IBullet {
public const durability:Number = 25;
public const description:String = "this is box part";
public const price:Number = 10;
private var gs:CGameSession;
private var _isDamageByCollision:Boolean;// = false
private var _isDamageByBlast:Boolean;// = true
public var bb:MovieClip;
private var _destroyTimer:Timer;
private var _colFx:Object;
private var _pw:QuickBox2D;
public var body:QuickObject;
private var _firedBy:IWeapon;
private var vt:Timer;
private var _blastDamage:uint;// = 400
public function CBullet2():void{
gs = CGameSession.getInstance();
vt = new Timer(20, 1);
_colFx = CColFX2;
_blastDamage = 400;
_isDamageByBlast = true;
_isDamageByCollision = false;
_destroyTimer = new Timer(5000, 1);
super();
visible = false;
vt.addEventListener(TimerEvent.TIMER_COMPLETE, showTime);
vt.start();
mouseChildren = false;
_destroyTimer.addEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy, false, 0, true);
_destroyTimer.start();
}
public function destroy():void{
_destroyTimer.stop();
_destroyTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, autoDestroy);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addCircle({groupIndex:-1, isBullet:true, density:2, skin:this});
bb.visible = false;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CBullet2;
_local2 = new CBullet2();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function autoDestroy(_arg1:TimerEvent):void{
var _local2:uint;
destroy();
_local2 = 0;
while (_local2 < gs.bullets.length) {
if (gs.bullets[_local2].body == body){
gs.bullets.splice(_local2, 1);
break;
};
_local2++;
};
_pw.w.DestroyBody(this.body.body);
if (this){
parent.removeChild(this);
};
}
private function showTime(_arg1:TimerEvent):void{
vt.removeEventListener(TimerEvent.TIMER_COMPLETE, showTime);
visible = true;
}
public function get destroyTimer():Timer{
return (_destroyTimer);
}
public function get isDamageByBlast():Boolean{
return (_isDamageByBlast);
}
public function get colFx():Object{
return (_colFx);
}
public function get isDamageByCollision():Boolean{
return (_isDamageByCollision);
}
public function cloneMC():IPhysics{
return (new CBullet2());
}
public function set firedBy(_arg1:IWeapon):void{
_firedBy = _arg1;
}
public function get blastDamage():uint{
return (_blastDamage);
}
public function get firedBy():IWeapon{
return (_firedBy);
}
}
}//package script.parts
Section 159
//CCanon (script.parts.CCanon)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CCanon extends MovieClip implements IPart, ICanon, IDestroyable, IPhysics {
public const durability:Number = 25;
public const price:Number = 100;
public const description:String = "this is box part";
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 2000
private var _bulletGenerationAngle:Number;
private var _isDestroyed:Boolean;
var b:QuickObject;
private var _maxHP:uint;// = 2000
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
public var wbody:MovieClip;
private var _pw:QuickBox2D;
private var _fireFx:Object;
var wb;
private var _bulletFx:Object;
private var gs:CGameSession;
private var _impulsePower:uint;// = 5
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _isVehiclePart:Boolean;
private var _drawBackImpulse:uint;// = 25
public function CCanon():void{
gs = CGameSession.getInstance();
tt = new Timer(500);
_isLock = true;
_reloadTime = new Timer(500);
_isReadyToFire = true;
_bullet = CBullet2;
_bulletFx = CBulletFX2;
_impulsePower = 5;
_drawBackImpulse = 25;
_fireFx = CFireFX2;
_maxHP = 2000;
_curHP = 2000;
_damageFx = CDamageFX1;
_damageFxMask = CVulcanMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:*;
var _local3:Number;
_pw = _arg1;
_local2 = ((wbody.parent.x + wbody.parent.parent.x) / 30);
_local3 = ((wbody.parent.y + wbody.parent.parent.y) / 30);
wb = _pw.addBox({skin:wbody});
b = _pw.addBox({skin:barrel});
body = _pw.addGroup({objects:[wb, b], x:_local2, y:_local3});
_isLock = false;
gs.destroyables.push(this);
gs.addEventListener("fire", firing, false, 0, true);
gs.addEventListener("cease fire", ceaseFiring, false, 0, true);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Object;
var _local7:b2Vec2;
var _local8:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local5 = new b2Vec2(-(_local4.x), -(_local4.y));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local6 = new _fireFx();
_local6.x = (_local2.x * 30);
_local6.y = (_local2.y * 30);
_local6.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local6));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local7 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local7);
_local5.x = (_local5.x * drawBackImpulse);
_local5.y = (_local5.y * drawBackImpulse);
_local8 = body.body.GetWorldCenter();
body.body.ApplyImpulse(_local5, _local8);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function ceaseFire():void{
gs.removeEventListener("fire", firing);
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
public function get damageFx():Object{
return (_damageFx);
}
private function onFire(_arg1:TimerEvent):void{
if (((((((gs.isTargetDetected) && (!(gs.isLose)))) && (!(gs.isWin)))) && (isVehiclePart))){
fire();
};
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
return ((body.body.GetAngle() + ((barrel.rotation / 180) * Math.PI)));
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CCanon;
_local2 = new CCanon();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
private function firing(_arg1:Event):void{
if (!tt.hasEventListener(TimerEvent.TIMER)){
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
};
tt.start();
}
public function get maxHP():uint{
return (_maxHP);
}
private function ceaseFiring(_arg1:Event):void{
if (tt){
tt.stop();
};
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CCanon());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
wbody.addChild(msk);
dmgFx.mask = msk;
wbody.addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:b2Vec2;
if (!_isLock){
_local1 = Math.sqrt((((bgen.x * bgen.x) + (bgen.y * bgen.y)) / 900));
_local2 = (_local1 * Math.cos(bulletGenerationAngle));
_local3 = (_local1 * Math.sin(bulletGenerationAngle));
_local4 = new b2Vec2(((body.userData.x / 30) + _local2), ((body.userData.y / 30) + _local3));
return (_local4);
};
return (null);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
wb.userData.visible = false;
b.userData.visible = false;
if (tt){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt = null;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
}
}//package script.parts
Section 160
//CCanon1 (script.parts.CCanon1)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CCanon1 extends MovieClip implements IPart, ICanon, IDestroyable, IPhysics {
public const durability:Number = 25;
public const price:Number = 100;
public const description:String = "this is box part";
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 1000
private var _bulletGenerationAngle:Number;
private var _isDestroyed:Boolean;
var b:QuickObject;
private var _maxHP:uint;// = 1000
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
public var wbody:MovieClip;
private var _pw:QuickBox2D;
private var _fireFx:Object;
var wb;
private var _bulletFx:Object;
private var gs:CGameSession;
private var _impulsePower:uint;// = 5
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _isVehiclePart:Boolean;
private var _drawBackImpulse:uint;// = 25
public function CCanon1():void{
gs = CGameSession.getInstance();
tt = new Timer(500);
_isLock = true;
_reloadTime = new Timer(500);
_isReadyToFire = true;
_bullet = CBullet2;
_bulletFx = CBulletFX2;
_impulsePower = 5;
_drawBackImpulse = 25;
_fireFx = CFireFX2;
_maxHP = 1000;
_curHP = 1000;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:*;
var _local3:Number;
_pw = _arg1;
_local2 = ((wbody.parent.x + wbody.parent.parent.x) / 30);
_local3 = ((wbody.parent.y + wbody.parent.parent.y) / 30);
wb = _pw.addBox({skin:wbody});
b = _pw.addBox({skin:barrel});
body = _pw.addGroup({objects:[wb, b], x:_local2, y:_local3});
_isLock = false;
gs.destroyables.push(this);
gs.addEventListener("fire", firing, false, 0, true);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Object;
var _local7:b2Vec2;
var _local8:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local5 = new b2Vec2(-(_local4.x), -(_local4.y));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local6 = new _fireFx();
_local6.x = (_local2.x * 30);
_local6.y = (_local2.y * 30);
_local6.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local6));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local7 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local7);
_local5.x = (_local5.x * drawBackImpulse);
_local5.y = (_local5.y * drawBackImpulse);
_local8 = body.body.GetWorldCenter();
body.body.ApplyImpulse(_local5, _local8);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function ceaseFire():void{
gs.removeEventListener("fire", firing);
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
public function get damageFx():Object{
return (_damageFx);
}
private function onFire(_arg1:TimerEvent):void{
if (((((((gs.isTargetDetected) && (!(gs.isLose)))) && (!(gs.isWin)))) && (isVehiclePart))){
fire();
};
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
return ((body.body.GetAngle() + ((barrel.rotation / 180) * Math.PI)));
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CCanon1;
_local2 = new CCanon1();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
private function firing(_arg1:Event):void{
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
tt.start();
}
public function get maxHP():uint{
return (_maxHP);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CCanon1());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
wbody.addChild(msk);
dmgFx.mask = msk;
wbody.addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:b2Vec2;
if (!_isLock){
_local1 = Math.sqrt((((bgen.x * bgen.x) + (bgen.y * bgen.y)) / 900));
_local2 = (_local1 * Math.cos(bulletGenerationAngle));
_local3 = (_local1 * Math.sin(bulletGenerationAngle));
_local4 = new b2Vec2(((body.userData.x / 30) + _local2), ((body.userData.y / 30) + _local3));
return (_local4);
};
return (null);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
wb.userData.visible = false;
b.userData.visible = false;
if (tt){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt = null;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
}
}//package script.parts
Section 161
//CCanon2 (script.parts.CCanon2)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CCanon2 extends MovieClip implements IPart, ICanon, IDestroyable, IPhysics {
public const durability:Number = 25;
public const price:Number = 100;
public const description:String = "this is box part";
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 1000
private var _bulletGenerationAngle:Number;
private var _isDestroyed:Boolean;
var b:QuickObject;
private var _maxHP:uint;// = 1000
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
public var wbody:MovieClip;
private var _pw:QuickBox2D;
private var _fireFx:Object;
var wb;
private var _bulletFx:Object;
private var gs:CGameSession;
private var _impulsePower:uint;// = 15
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _isVehiclePart:Boolean;
private var _drawBackImpulse:uint;// = 25
public function CCanon2():void{
gs = CGameSession.getInstance();
tt = new Timer(500);
_isLock = true;
_reloadTime = new Timer(250);
_isReadyToFire = true;
_bullet = CBullet2;
_bulletFx = CBulletFX2;
_impulsePower = 15;
_drawBackImpulse = 25;
_fireFx = CFireFX2;
_maxHP = 1000;
_curHP = 1000;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:*;
var _local3:Number;
_pw = _arg1;
_local2 = ((wbody.parent.x + wbody.parent.parent.x) / 30);
_local3 = ((wbody.parent.y + wbody.parent.parent.y) / 30);
wb = _pw.addBox({skin:wbody});
b = _pw.addBox({skin:barrel});
body = _pw.addGroup({objects:[wb, b], x:_local2, y:_local3});
_isLock = false;
gs.destroyables.push(this);
gs.addEventListener("fire", firing, false, 0, true);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:b2Vec2;
var _local6:Object;
var _local7:b2Vec2;
var _local8:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local5 = new b2Vec2(-(_local4.x), -(_local4.y));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local6 = new _fireFx();
_local6.x = (_local2.x * 30);
_local6.y = (_local2.y * 30);
_local6.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local6));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local7 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local7);
_local5.x = (_local5.x * drawBackImpulse);
_local5.y = (_local5.y * drawBackImpulse);
_local8 = body.body.GetWorldCenter();
body.body.ApplyImpulse(_local5, _local8);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function ceaseFire():void{
gs.removeEventListener("fire", firing);
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
public function get damageFx():Object{
return (_damageFx);
}
private function onFire(_arg1:TimerEvent):void{
if (((((((gs.isTargetDetected) && (!(gs.isLose)))) && (!(gs.isWin)))) && (isVehiclePart))){
fire();
};
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
trace(((barrel.rotation / 180) * Math.PI));
return ((body.body.GetAngle() + ((barrel.rotation / 180) * Math.PI)));
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CCanon2;
_local2 = new CCanon2();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
private function firing(_arg1:Event):void{
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
tt.start();
}
public function get maxHP():uint{
return (_maxHP);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CCanon2());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
wbody.addChild(msk);
dmgFx.mask = msk;
wbody.addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:b2Vec2;
if (!_isLock){
_local1 = Math.sqrt((((bgen.x * bgen.x) + (bgen.y * bgen.y)) / 900));
_local2 = (_local1 * Math.cos(bulletGenerationAngle));
_local3 = (_local1 * Math.sin(bulletGenerationAngle));
_local4 = new b2Vec2(((body.userData.x / 30) + _local2), ((body.userData.y / 30) + _local3));
return (_local4);
};
return (null);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
wb.userData.visible = false;
b.userData.visible = false;
if (tt){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt = null;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
}
}//package script.parts
Section 162
//CCore01 (script.parts.CCore01)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CCore01 extends MovieClip implements IPart, IOverlapingPart, ICore, IPhysics {
public const durability:Number = 25;
public const description:String = "this is core part";
public const price:Number = 50;
private var _power:uint;// = 10
private var _isUsed:Boolean;
private var _pw:QuickBox2D;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CCore01():void{
_power = 10;
super();
mouseChildren = false;
}
public function get power():uint{
return (_power);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CCore01;
_local2 = new CCore01();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CCore01());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addCircle({skin:this});
}
}
}//package script.parts
Section 163
//CCore02 (script.parts.CCore02)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CCore02 extends MovieClip implements IPart, IOverlapingPart, ICore, IPhysics {
public const durability:Number = 25;
public const description:String = "this is core part";
public const price:Number = 50;
private var _power:uint;// = 25
private var _isUsed:Boolean;
private var _pw:QuickBox2D;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CCore02():void{
_power = 25;
super();
mouseChildren = false;
}
public function get power():uint{
return (_power);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CCore02;
_local2 = new CCore02();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CCore02());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addCircle({skin:this});
}
}
}//package script.parts
Section 164
//CCore03 (script.parts.CCore03)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CCore03 extends MovieClip implements IPart, IOverlapingPart, ICore, IPhysics {
public const durability:Number = 25;
public const description:String = "this is core part";
public const price:Number = 50;
private var _power:uint;// = 75
private var _isUsed:Boolean;
private var _pw:QuickBox2D;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CCore03():void{
_power = 75;
super();
mouseChildren = false;
}
public function get power():uint{
return (_power);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CCore03;
_local2 = new CCore03();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CCore03());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addCircle({skin:this});
}
}
}//package script.parts
Section 165
//CFixJointH (script.parts.CFixJointH)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CFixJointH extends MovieClip implements IPart, IOverlapingPart, IJointFix, IDestroyable, IPhysics {
public const durability:Number = 25;
public const description:String = "this is box part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
public var b:MovieClip;
private var _curHP:uint;// = 80
private var _maxHP:uint;// = 80
public var a:MovieClip;
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CFixJointH():void{
gs = CGameSession.getInstance();
_maxHP = 80;
_curHP = 80;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 2) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CFixJointH;
_local2 = new CFixJointH();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CFixJointH());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addBox({skin:this});
} else {
body = _pw.addBox({skin:this});
};
gs.destroyables.push(this);
}
public function updateDamageState():void{
}
}
}//package script.parts
Section 166
//CFixJointV (script.parts.CFixJointV)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CFixJointV extends MovieClip implements IPart, IOverlapingPart, IJointFix, IDestroyable, IPhysics {
public const durability:Number = 25;
public const description:String = "this is box part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
public var b:MovieClip;
private var _curHP:uint;// = 80
private var _maxHP:uint;// = 80
public var a:MovieClip;
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CFixJointV():void{
gs = CGameSession.getInstance();
_maxHP = 80;
_curHP = 80;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 3) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CFixJointV;
_local2 = new CFixJointV();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CFixJointV());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addBox({skin:this});
} else {
body = _pw.addBox({skin:this});
};
gs.destroyables.push(this);
}
public function updateDamageState():void{
}
}
}//package script.parts
Section 167
//CHexagonPart (script.parts.CHexagonPart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import flash.geom.*;
public class CHexagonPart extends MovieClip implements IPart, ICoreContainer, IDestroyable, IPhysics {
public const durability:Number = 50;
public const description:String = "this is CHexagonPart";
public const price:Number = 20;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
public var c:MovieClip;
public var f:MovieClip;
public var b:MovieClip;
public var d:MovieClip;
private var _maxHP:uint;// = 2000
public var a:MovieClip;
private var _curHP:uint;// = 2000
private var dmgFx:MovieClip;
public var e:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CHexagonPart():void{
gs = CGameSession.getInstance();
_maxHP = 2000;
_curHP = 2000;
_damageFx = CDamageFX1;
_damageFxMask = CHexagonPartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CHexagonPart;
_local2 = new CHexagonPart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CHexagonPart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Point;
var _local7:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
_local6 = new Point((e.x / 30), (e.y / 30));
_local7 = new Point((f.x / 30), (f.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:8, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y, _local6.x, _local6.y, _local7.x, _local7.y]], skin:this});
gs.destroyables.push(this);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 168
//CRectanglePart (script.parts.CRectanglePart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
public class CRectanglePart extends MovieClip implements IPart, ICoreContainer, IDestroyable, IPhysics {
public const durability:Number = 50;
public const description:String = "this is CRectanglePart";
public const price:Number = 20;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 1500
private var _maxHP:uint;// = 1500
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CRectanglePart():void{
gs = CGameSession.getInstance();
_maxHP = 1500;
_curHP = 1500;
_damageFx = CDamageFX1;
_damageFxMask = CRectanglePartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 14) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CRectanglePart;
_local2 = new CRectanglePart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CRectanglePart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:8, skin:this});
gs.destroyables.push(this);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 169
//CRectangleTallPart (script.parts.CRectangleTallPart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
public class CRectangleTallPart extends MovieClip implements IPart, ICoreContainer, IDestroyable, IPhysics {
public const durability:Number = 50;
public const description:String = "this is CRectangleTallPart";
public const price:Number = 20;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 2500
private var _maxHP:uint;// = 2500
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CRectangleTallPart():void{
gs = CGameSession.getInstance();
_maxHP = 2500;
_curHP = 2500;
_damageFx = CDamageFX1;
_damageFxMask = CRectangleTallPartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CRectangleTallPart;
_local2 = new CRectangleTallPart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CRectangleTallPart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:8, skin:this});
gs.destroyables.push(this);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 170
//CRectangleWidePart (script.parts.CRectangleWidePart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
public class CRectangleWidePart extends MovieClip implements IPart, ICoreContainer, IDestroyable, IPhysics {
public const durability:Number = 50;
public const description:String = "this is CRectangleWidePart";
public const price:Number = 20;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 2500
private var _maxHP:uint;// = 2500
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CRectangleWidePart():void{
gs = CGameSession.getInstance();
_maxHP = 2500;
_curHP = 2500;
_damageFx = CDamageFX1;
_damageFxMask = CRectangleWidePartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CRectangleWidePart;
_local2 = new CRectangleWidePart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CRectangleWidePart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:8, skin:this});
gs.destroyables.push(this);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 171
//CRevJointH (script.parts.CRevJointH)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CRevJointH extends MovieClip implements IPart, IOverlapingPart, IJointRev, IDestroyable, IPhysics {
public const durability:Number = 25;
public const description:String = "this is box part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
public var b:MovieClip;
private var _curHP:uint;// = 80
private var _maxHP:uint;// = 80
public var a:MovieClip;
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CRevJointH():void{
gs = CGameSession.getInstance();
_maxHP = 80;
_curHP = 80;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 2) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CRevJointH;
_local2 = new CRevJointH();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CRevJointH());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addBox({skin:this});
} else {
body = _pw.addBox({skin:this});
};
gs.destroyables.push(this);
}
public function updateDamageState():void{
}
}
}//package script.parts
Section 172
//CRevJointV (script.parts.CRevJointV)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CRevJointV extends MovieClip implements IPart, IOverlapingPart, IJointRev, IDestroyable, IPhysics {
public const durability:Number = 25;
public const description:String = "this is box part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
public var b:MovieClip;
private var _curHP:uint;// = 80
private var _maxHP:uint;// = 80
public var a:MovieClip;
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CRevJointV():void{
gs = CGameSession.getInstance();
_maxHP = 80;
_curHP = 80;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 2) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CRevJointV;
_local2 = new CRevJointV();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CRevJointV());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addBox({skin:this});
} else {
body = _pw.addBox({skin:this});
};
gs.destroyables.push(this);
}
public function updateDamageState():void{
}
}
}//package script.parts
Section 173
//CShred1 (script.parts.CShred1)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.fx.*;
import flash.geom.*;
public class CShred1 extends MovieClip implements IShred, IPhysics {
private var ac:uint;// = 0
private var _dustFx:Object;
public var c:MovieClip;
public var b:MovieClip;
public var a:MovieClip;
private var _vanishTime:Timer;
private var _pw:QuickBox2D;
public var body:QuickObject;
private var _isScatter:Boolean;// = true
public var pb:MovieClip;
public function CShred1():void{
var _local1:MovieClip;
_dustFx = CShredDust;
_isScatter = true;
_vanishTime = new Timer(50);
ac = 0;
super();
visible = false;
_local1 = new CShreds();
_local1.gotoAndStop((uint((Math.random() * _local1.totalFrames)) + 1));
addChild(_local1);
this.rotation = (Math.random() * 360);
this.scaleX = (1 + (Math.random() * 0.5));
this.scaleY = this.scaleX;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get dustFx():Object{
return (_dustFx);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:b2Vec2;
var _local6:Number;
var _local7:b2Vec2;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:15, groupIndex:-1, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y]], skin:this});
_local5 = new b2Vec2((0.5 - Math.random()), (0.5 - Math.random()));
_local6 = (25 + (Math.random() * 50));
_local5.x = (_local5.x * _local6);
_local5.y = (_local5.y * _local6);
_local7 = this.body.body.GetWorldCenter();
this.body.body.ApplyImpulse(_local5, _local7);
visible = true;
pb.visible = false;
_vanishTime.addEventListener(TimerEvent.TIMER, autoDestroy, false, 0, true);
_vanishTime.start();
}
public function get isScatter():Boolean{
return (_isScatter);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CShred1;
_local2 = new CShred1();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isScatter(_arg1:Boolean):void{
_isScatter = _arg1;
}
public function autoDestroy(_arg1:TimerEvent):void{
var _local2:MovieClip;
ac++;
if (_dustFx){
if ((ac % 3) == 0){
_local2 = new _dustFx();
_local2.x = this.x;
_local2.y = this.y;
_local2.alpha = this.alpha;
parent.addChild(_local2);
};
};
if (ac > 40){
alpha = (alpha - 0.1);
if (alpha < 0){
_vanishTime.stop();
_vanishTime.removeEventListener(TimerEvent.TIMER, autoDestroy);
_pw.w.DestroyBody(this.body.body);
parent.removeChild(this);
};
};
}
public function cloneMC():IPhysics{
return (new CShred1());
}
public function get vanishTime():Timer{
return (_vanishTime);
}
}
}//package script.parts
Section 174
//CSquarePart (script.parts.CSquarePart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
public class CSquarePart extends MovieClip implements IPart, ICoreContainer, IDestroyable, IPhysics {
public const durability:Number = 50;
public const description:String = "this is CSquarePart";
public const price:Number = 20;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 1000
private var _maxHP:uint;// = 1000
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CSquarePart():void{
gs = CGameSession.getInstance();
_maxHP = 1000;
_curHP = 1000;
_damageFx = CDamageFX1;
_damageFxMask = CSquarePartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 8) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CSquarePart;
_local2 = new CSquarePart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CSquarePart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:8, skin:this});
gs.destroyables.push(this);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 175
//CTireBPart (script.parts.CTireBPart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CTireBPart extends MovieClip implements IPart, IDestroyable, ITirePart, IOverlapingPart, IPhysics {
public const durability:Number = 25;
public const description:String = "this is tire part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 1500
private var _maxHP:uint;// = 1500
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CTireBPart():void{
gs = CGameSession.getInstance();
_maxHP = 1500;
_curHP = 1500;
_damageFx = CDamageFX1;
_damageFxMask = CTireBPartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addCircle({friction:0.9, skin:this});
} else {
body = _pw.addCircle({friction:1, skin:this});
};
gs.destroyables.push(this);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTireBPart;
_local2 = new CTireBPart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CTireBPart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 176
//CTireMPart (script.parts.CTireMPart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CTireMPart extends MovieClip implements IPart, IDestroyable, ITirePart, IOverlapingPart, IPhysics {
public const durability:Number = 25;
public const description:String = "this is tire part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 1250
private var _maxHP:uint;// = 1250
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CTireMPart():void{
gs = CGameSession.getInstance();
_maxHP = 1250;
_curHP = 1250;
_damageFx = CDamageFX1;
_damageFxMask = CTireMPartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 8) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addCircle({skin:this});
} else {
body = _pw.addCircle({skin:this});
};
gs.destroyables.push(this);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTireMPart;
_local2 = new CTireMPart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CTireMPart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 177
//CTireSPart (script.parts.CTireSPart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CTireSPart extends MovieClip implements IPart, ITirePart, IOverlapingPart, IPhysics, IDestroyable {
public const durability:Number = 25;
public const description:String = "this is tire part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 1000
private var _maxHP:uint;// = 1000
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CTireSPart():void{
gs = CGameSession.getInstance();
_maxHP = 1000;
_curHP = 1000;
_damageFx = CDamageFX1;
_damageFxMask = CTireSPartMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 6) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addCircle({density:5, skin:this});
} else {
body = _pw.addCircle({density:5, skin:this});
};
gs.destroyables.push(this);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTireSPart;
_local2 = new CTireSPart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CTireSPart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.parts
Section 178
//CTireTPart (script.parts.CTireTPart)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.tracks.components.*;
public class CTireTPart extends MovieClip implements IPart, IDestroyable, ITirePart, IOverlapingPart, IPhysics {
public const durability:Number = 25;
public const description:String = "this is tire part";
public const price:Number = 10;
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isDestroyed:Boolean;
private var _curHP:uint;// = 500
private var _maxHP:uint;// = 500
private var dmgFx:MovieClip;
private var _pw:QuickBox2D;
private var msk:DisplayObject;
public var body:QuickObject;
private var _isVehiclePart:Boolean;
public function CTireTPart(){
gs = CGameSession.getInstance();
_maxHP = 500;
_curHP = 500;
_damageFx = CDamageFX1;
_damageFxMask = CTireTPartMask;
super();
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 3) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
if (isVehiclePart){
body = _pw.addCircle({skin:this});
} else {
body = _pw.addCircle({skin:this});
};
gs.destroyables.push(this);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTireTPart;
_local2 = new CTireTPart();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CTireTPart());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function CTirePart():void{
updateDamageState();
mouseChildren = false;
this.doubleClickEnabled = true;
}
}
}//package script.parts
Section 179
//CVehicle01 (script.parts.CVehicle01)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CVehicle01 extends MovieClip implements IPart, IVehicle, IPhysics {
public const durability:Number = 50;
public const description:String = "this is basic vehicle";
public const price:Number = 40;
private var _isUsed:Boolean;
public var c:CHexagonPart;
private var _pw:QuickBox2D;
public var body:Array;
private var _isVehiclePart:Boolean;
public function CVehicle01():void{
body = new Array();
super();
mouseChildren = false;
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is IPart)){
_local4 = MovieClip(new (MovieClip(getChildAt(_local3)).constructor));
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CVehicle01());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
}
}
}//package script.parts
Section 180
//CVehicle02 (script.parts.CVehicle02)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CVehicle02 extends MovieClip implements IPart, IVehicle, IPhysics {
public const durability:Number = 50;
public const description:String = "this is basic vehicle 2";
public const price:Number = 60;
private var _isUsed:Boolean;
public var c:CHexagonPart;
private var _pw:QuickBox2D;
public var body:Array;
private var _isVehiclePart:Boolean;
public function CVehicle02():void{
body = new Array();
super();
mouseChildren = false;
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is IPart)){
_local4 = MovieClip(new (MovieClip(getChildAt(_local3)).constructor));
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CVehicle02());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
}
}
}//package script.parts
Section 181
//CVehicle03 (script.parts.CVehicle03)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CVehicle03 extends MovieClip implements IPart, IVehicle, IPhysics {
public const durability:Number = 50;
public const description:String = "this is basic vehicle 2";
public const price:Number = 60;
private var _isUsed:Boolean;
private var _pw:QuickBox2D;
public var body:Array;
private var _isVehiclePart:Boolean;
public function CVehicle03():void{
body = new Array();
super();
mouseChildren = false;
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is IPart)){
_local4 = MovieClip(new (MovieClip(getChildAt(_local3)).constructor));
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CVehicle03());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
}
}
}//package script.parts
Section 182
//CVehicle04 (script.parts.CVehicle04)
package script.parts {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CVehicle04 extends MovieClip implements IPart, IVehicle, IPhysics {
public const durability:Number = 50;
public const description:String = "this is basic vehicle 2";
public const price:Number = 60;
private var _isUsed:Boolean;
public var c:CHexagonPart;
private var _pw:QuickBox2D;
public var body:Array;
private var _isVehiclePart:Boolean;
public function CVehicle04():void{
body = new Array();
super();
mouseChildren = false;
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is IPart)){
_local4 = MovieClip(new (MovieClip(getChildAt(_local3)).constructor));
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get pw():QuickBox2D{
return (_pw);
}
public function cloneMC():IPhysics{
return (new CVehicle04());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
}
}
}//package script.parts
Section 183
//CVehicleLayer (script.parts.CVehicleLayer)
package script.parts {
import flash.display.*;
import script.engine.*;
public class CVehicleLayer extends MovieClip {
private var gs:CGameSession;
public var tireLayer:MovieClip;
public var bodyLayer:MovieClip;
public var jointLayer:MovieClip;
public function CVehicleLayer(){
gs = CGameSession.getInstance();
super();
}
public function generateVehicleSkins():void{
var _local1:IPart;
var _local2:*;
var _local3:*;
var _local4:uint;
var _local5:uint;
var _local6:MovieClip;
var _local7:MovieClip;
var _local8:MovieClip;
_local2 = 0;
while (_local2 < numChildren) {
if ((getChildAt(_local2) is IPart)){
_local6 = MovieClip(getChildAt(_local2));
if (_local6.numChildren > 1){
_local3 = 0;
while (_local3 < _local6.numChildren) {
if ((_local6.getChildAt(_local3) is ICore)){
_local1 = IPart(_local6);
break;
};
_local3++;
};
};
};
_local2++;
};
gs.vehicleSkins = new Array();
gs.vehicleSkins[0] = _local1;
_local5 = 0;
_local2 = 0;
while (_local2 < gs.vehicleSkins.length) {
gs.vehicleSkins[_local2].isVehiclePart = true;
_local3 = 0;
for (;_local3 < numChildren;_local3++) {
if ((((getChildAt(_local3) is IPart)) && (!(IPart(getChildAt(_local3)).isVehiclePart)))){
_local7 = MovieClip(gs.vehicleSkins[_local2]);
_local8 = MovieClip(getChildAt(_local3));
if ((_local8 is ITirePart)){
if (((!((_local7 == null))) && (_local7.hitTestPoint(_local8.x, _local8.y, true)))){
_local5++;
gs.vehicleSkins[_local5] = _local8;
_local8.isVehiclePart = true;
};
} else {
if (!(_local7 is ITirePart)){
if (((!((_local7 == null))) && (_local8.hitTestObject(_local7)))){
_local5++;
gs.vehicleSkins[_local5] = _local8;
_local8.isVehiclePart = true;
continue;
};
};
};
};
};
_local2++;
};
}
}
}//package script.parts
Section 184
//CVulcan (script.parts.CVulcan)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CVulcan extends MovieClip implements IPart, IVulcan, IDestroyable, IPhysics {
public const durability:Number = 25;
public const price:Number = 100;
public const description:String = "this is vulcan weapon";
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 1500
private var _bulletGenerationAngle:Number;
private var _isDestroyed:Boolean;
var b:QuickObject;
private var _maxHP:uint;// = 1500
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
public var wbody:MovieClip;
private var _pw:QuickBox2D;
private var _maxDiffAngle:Number;// = 20
private var _fireFx:Object;
var wb;
private var _bulletFx:Object;
private var gs:CGameSession;
private var _impulsePower:uint;// = 40
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _isVehiclePart:Boolean;
private var _drawBackImpulse:uint;// = 25
public function CVulcan():void{
gs = CGameSession.getInstance();
tt = new Timer(10);
_isLock = true;
_reloadTime = new Timer(100);
_isReadyToFire = true;
_bullet = CBullet1;
_bulletFx = CBulletFX1;
_impulsePower = 40;
_maxDiffAngle = 20;
_drawBackImpulse = 25;
_fireFx = CFireFX1;
_maxHP = 1500;
_curHP = 1500;
_damageFx = CDamageFX1;
_damageFxMask = CVulcanMask;
super();
updateDamageState();
mouseChildren = false;
doubleClickEnabled = true;
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:*;
var _local3:Number;
_pw = _arg1;
_local2 = ((wbody.parent.x + wbody.parent.parent.x) / 30);
_local3 = ((wbody.parent.y + wbody.parent.parent.y) / 30);
wb = _pw.addBox({skin:wbody});
b = _pw.addBox({skin:barrel});
body = _pw.addGroup({objects:[wb, b], x:_local2, y:_local3});
_isLock = false;
gs.destroyables.push(this);
gs.addEventListener("fire", firing, false, 0, true);
gs.addEventListener("cease fire", ceaseFiring, false, 0, true);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Object;
var _local6:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local5 = new _fireFx();
_local5.x = (_local2.x * 30);
_local5.y = (_local2.y * 30);
_local5.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local5));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local6 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local6);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function ceaseFire():void{
gs.removeEventListener("fire", firing);
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
public function get damageFx():Object{
return (_damageFx);
}
private function onFire(_arg1:TimerEvent):void{
if (((((((gs.isTargetDetected) && (!(gs.isLose)))) && (!(gs.isWin)))) && (isVehiclePart))){
fire();
};
}
public function get maxDiffAngle():Number{
return (_maxDiffAngle);
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
var _local1:Number;
_local1 = (body.body.GetAngle() - ((((_maxDiffAngle / 2) - (Math.random() * _maxDiffAngle)) / 180) * Math.PI));
return (_local1);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CVulcan;
_local2 = new CVulcan();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
private function firing(_arg1:Event):void{
if (!tt.hasEventListener(TimerEvent.TIMER)){
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
};
tt.start();
}
public function get maxHP():uint{
return (_maxHP);
}
private function ceaseFiring(_arg1:Event):void{
if (tt){
tt.stop();
};
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CVulcan());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
wbody.addChild(msk);
dmgFx.mask = msk;
wbody.addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:b2Vec2;
if (!_isLock){
_local1 = ((bgen.x / 30) * Math.cos(bulletGenerationAngle));
_local2 = ((bgen.x / 30) * Math.sin(bulletGenerationAngle));
_local3 = new b2Vec2(((body.userData.x / 30) + _local1), ((body.userData.y / 30) + _local2));
return (_local3);
};
return (null);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
wb.userData.visible = false;
b.userData.visible = false;
if (tt){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt = null;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
}
}//package script.parts
Section 185
//CVulcan1 (script.parts.CVulcan1)
package script.parts {
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import script.tracks.components.*;
import Box2D.Dynamics.*;
import script.fx.*;
public class CVulcan1 extends MovieClip implements IPart, IVulcan, IDestroyable, IPhysics {
public const durability:Number = 25;
public const price:Number = 100;
public const description:String = "this is vulcan weapon";
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 1000
private var _bulletGenerationAngle:Number;
private var _isDestroyed:Boolean;
var b:QuickObject;
private var _maxHP:uint;// = 1000
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
public var wbody:MovieClip;
private var _pw:QuickBox2D;
private var _maxDiffAngle:Number;// = 20
private var _fireFx:Object;
var wb;
private var _bulletFx:Object;
private var gs:CGameSession;
private var _impulsePower:uint;// = 40
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isUsed:Boolean;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _isVehiclePart:Boolean;
private var _drawBackImpulse:uint;// = 25
public function CVulcan1():void{
gs = CGameSession.getInstance();
tt = new Timer(500);
_isLock = true;
_reloadTime = new Timer(100);
_isReadyToFire = true;
_bullet = CBullet1;
_bulletFx = CBulletFX1;
_impulsePower = 40;
_maxDiffAngle = 20;
_drawBackImpulse = 25;
_fireFx = CFireFX1;
_maxHP = 1000;
_curHP = 1000;
_damageFx = CDamageFX1;
_damageFxMask = CVulcan1Mask;
super();
updateDamageState();
mouseChildren = false;
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get isUsed():Boolean{
return (_isUsed);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set isUsed(_arg1:Boolean):void{
_isUsed = _arg1;
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:*;
var _local3:Number;
_pw = _arg1;
_local2 = ((wbody.parent.x + wbody.parent.parent.x) / 30);
_local3 = ((wbody.parent.y + wbody.parent.parent.y) / 30);
wb = _pw.addBox({skin:wbody});
b = _pw.addBox({skin:barrel});
body = _pw.addGroup({objects:[wb, b], x:_local2, y:_local3});
_isLock = false;
gs.destroyables.push(this);
gs.addEventListener("fire", firing, false, 0, true);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Object;
var _local6:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local5 = new _fireFx();
_local5.x = (_local2.x * 30);
_local5.y = (_local2.y * 30);
_local5.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local5));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local6 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local6);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function ceaseFire():void{
gs.removeEventListener("fire", firing);
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
public function get damageFx():Object{
return (_damageFx);
}
private function onFire(_arg1:TimerEvent):void{
if (((((((gs.isTargetDetected) && (!(gs.isLose)))) && (!(gs.isWin)))) && (isVehiclePart))){
fire();
};
}
public function get maxDiffAngle():Number{
return (_maxDiffAngle);
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
var _local1:Number;
_local1 = (body.body.GetAngle() - ((((_maxDiffAngle / 2) - (Math.random() * _maxDiffAngle)) / 180) * Math.PI));
return (_local1);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CVulcan1;
_local2 = new CVulcan1();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function set isVehiclePart(_arg1:Boolean):void{
_isVehiclePart = _arg1;
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
private function firing(_arg1:Event):void{
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
tt.start();
}
public function get maxHP():uint{
return (_maxHP);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CVulcan1());
}
public function get isVehiclePart():Boolean{
return (_isVehiclePart);
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
wbody.addChild(msk);
dmgFx.mask = msk;
wbody.addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:b2Vec2;
if (!_isLock){
_local1 = ((bgen.x / 30) * Math.cos(bulletGenerationAngle));
_local2 = ((bgen.x / 30) * Math.sin(bulletGenerationAngle));
_local3 = new b2Vec2(((body.userData.x / 30) + _local1), ((body.userData.y / 30) + _local2));
return (_local3);
};
return (null);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
wb.userData.visible = false;
b.userData.visible = false;
if (tt){
tt.stop();
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt = null;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 12) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
_local2.scaleX = 0.5;
_local2.scaleY = _local2.scaleX;
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
}
}//package script.parts
Section 186
//IBullet (script.parts.IBullet)
package script.parts {
import flash.utils.*;
import flash.events.*;
public interface IBullet {
function get isDamageByCollision():Boolean;
function get firedBy():IWeapon;
function get isDamageByBlast():Boolean;
function set firedBy(_arg1:IWeapon):void;
function autoDestroy(_arg1:TimerEvent):void;
function get blastDamage():uint;
function get colFx():Object;
function get destroyTimer():Timer;
}
}//package script.parts
Section 187
//ICanon (script.parts.ICanon)
package script.parts {
public interface ICanon extends IWeapon {
function get drawBackImpulse():uint;
}
}//package script.parts
Section 188
//ICore (script.parts.ICore)
package script.parts {
public interface ICore {
function get power():uint;
}
}//package script.parts
Section 189
//ICoreContainer (script.parts.ICoreContainer)
package script.parts {
public interface ICoreContainer {
}
}//package script.parts
Section 190
//IJoint (script.parts.IJoint)
package script.parts {
public interface IJoint {
}
}//package script.parts
Section 191
//IJointFix (script.parts.IJointFix)
package script.parts {
public interface IJointFix extends IJoint {
}
}//package script.parts
Section 192
//IJointRev (script.parts.IJointRev)
package script.parts {
public interface IJointRev extends IJoint {
}
}//package script.parts
Section 193
//IOverlapingPart (script.parts.IOverlapingPart)
package script.parts {
public interface IOverlapingPart {
}
}//package script.parts
Section 194
//IPart (script.parts.IPart)
package script.parts {
public interface IPart {
function get isVehiclePart():Boolean;
function get isUsed():Boolean;
function set isVehiclePart(_arg1:Boolean):void;
function set isUsed(_arg1:Boolean):void;
}
}//package script.parts
Section 195
//IShred (script.parts.IShred)
package script.parts {
import flash.utils.*;
import flash.events.*;
import com.actionsnippet.qbox.*;
public interface IShred {
function get vanishTime():Timer;
function autoDestroy(_arg1:TimerEvent):void;
function get isScatter():Boolean;
function set pw(_arg1:QuickBox2D):void;
function set isScatter(_arg1:Boolean):void;
function get dustFx():Object;
function get pw():QuickBox2D;
}
}//package script.parts
Section 196
//ITirePart (script.parts.ITirePart)
package script.parts {
public interface ITirePart {
}
}//package script.parts
Section 197
//IWeapon (script.parts.IWeapon)
package script.parts {
import flash.utils.*;
import Box2D.Common.Math.*;
public interface IWeapon {
function get bullet():Object;
function get reloadTime():Timer;
function get fireFx():Object;
function get isReadyToFire():Boolean;
function ceaseFire():void;
function get impulsePower():uint;
function set isReadyToFire(_arg1:Boolean):void;
function get isLock():Boolean;
function get bulletGenerationPoint():b2Vec2;
function get bulletGenerationAngle():Number;
function get bulletFx():Object;
function fire():void;
}
}//package script.parts
Section 198
//IVehicle (script.parts.IVehicle)
package script.parts {
public interface IVehicle {
}
}//package script.parts
Section 199
//IVulcan (script.parts.IVulcan)
package script.parts {
public interface IVulcan extends IWeapon {
function get maxDiffAngle():Number;
}
}//package script.parts
Section 200
//CContinueScreen (script.screen.CContinueScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import script.components.*;
public class CContinueScreen extends MovieClip implements IScreen {
public var b10:CLevelIcon;
public var b12:CLevelIcon;
public var b14:CLevelIcon;
public var b16:CLevelIcon;
public var b17:CLevelIcon;
public var b18:CLevelIcon;
public var b13:CLevelIcon;
public var b15:CLevelIcon;
public var b1:CLevelIcon;
public var b5:CLevelIcon;
public var b3:CLevelIcon;
public var b7:CLevelIcon;
public var b8:CLevelIcon;
public var b25:CLevelIcon;
public var b21:CLevelIcon;
public var b22:CLevelIcon;
public var b24:CLevelIcon;
public var b6:CLevelIcon;
public var b4:CLevelIcon;
public var b19:CLevelIcon;
public var b20:CLevelIcon;
public var b23:CLevelIcon;
public var b11:CLevelIcon;
public var b9:CLevelIcon;
public var b2:CLevelIcon;
private var eo:CEventOrganizer;
private var gs:CGameSession;
public var mcdec1:MovieClip;
public var mcdec2:MovieClip;
public var mcdec4:MovieClip;
public var mcdec5:MovieClip;
public var mcdec7:MovieClip;
public var mcdec9:MovieClip;
public var mcdec3:MovieClip;
public var mcdec8:MovieClip;
public var mcdec6:MovieClip;
private var levelButtons:Array;
public var mcdec11:MovieClip;
public var mcdec12:MovieClip;
public var mcdec13:MovieClip;
public var mcdec14:MovieClip;
public var mcdec15:MovieClip;
public var mcdec16:MovieClip;
public var mcdec17:MovieClip;
public var mcdec18:MovieClip;
public var mcdec19:MovieClip;
public var mcdec21:MovieClip;
public var mcdec22:MovieClip;
public var mcdec23:MovieClip;
public var mcdec24:MovieClip;
public var mcdec25:MovieClip;
public var mcdec20:MovieClip;
public var mcdec10:MovieClip;
public var backBtn:SimpleButton;
public function CContinueScreen():void{
eo = CEventOrganizer.getInstance();
gs = CGameSession.getInstance();
super();
init();
backBtn.useHandCursor = true;
backBtn.addEventListener(MouseEvent.CLICK, backBtnClick, false, 0, true);
}
public function destroy():void{
var _local1:uint;
_local1 = 0;
while (_local1 < gs.lastLevel) {
levelButtons[_local1].available = true;
levelButtons[_local1].removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
levelButtons[_local1].removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
levelButtons[_local1].removeEventListener(MouseEvent.CLICK, onMouseClick);
_local1++;
};
}
private function backBtnClick(_arg1:MouseEvent):void{
backBtn.removeEventListener(MouseEvent.CLICK, backBtnClick);
eo.dispatchEvent(new Event(CScreenManager.MENU_SCREEN));
}
private function addLevelButtons():void{
var _local1:uint;
levelButtons = new Array();
levelButtons[0] = b1;
levelButtons[1] = b2;
levelButtons[2] = b3;
levelButtons[3] = b4;
levelButtons[4] = b5;
levelButtons[5] = b6;
levelButtons[6] = b7;
levelButtons[7] = b8;
levelButtons[8] = b9;
levelButtons[9] = b10;
levelButtons[10] = b11;
levelButtons[11] = b12;
levelButtons[12] = b13;
levelButtons[13] = b14;
levelButtons[14] = b15;
levelButtons[15] = b16;
levelButtons[16] = b17;
levelButtons[17] = b18;
levelButtons[18] = b19;
levelButtons[19] = b20;
levelButtons[20] = b21;
levelButtons[21] = b22;
levelButtons[22] = b23;
levelButtons[23] = b24;
levelButtons[24] = b25;
_local1 = 0;
while (_local1 < levelButtons.length) {
levelButtons[_local1].level = (_local1 + 1);
_local1++;
};
}
private function updateLevelButtons():void{
var _local1:uint;
gs.levelData = new CLevelData();
_local1 = 0;
while (_local1 < gs.lastLevel) {
levelButtons[_local1].available = true;
levelButtons[_local1].addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
levelButtons[_local1].addEventListener(MouseEvent.MOUSE_OUT, onMouseOut, false, 0, true);
levelButtons[_local1].addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);
_local1++;
};
}
private function init():void{
var _local1:int;
addLevelButtons();
updateLevelButtons();
_local1 = 1;
while (_local1 <= 25) {
this[("mcdec" + _local1)].visible = false;
_local1++;
};
}
private function onMouseClick(_arg1:MouseEvent):void{
gs.currentLevel = _arg1.target.level;
destroy();
eo.dispatchEvent(new Event(CScreenManager.PLAY_SCREEN));
}
private function onMouseOut(_arg1:MouseEvent):void{
var _local2:int;
_local2 = 1;
while (_local2 <= 25) {
this[("mcdec" + _local2)].visible = false;
_local2++;
};
}
private function onMouseOver(_arg1:MouseEvent):void{
var _local2:int;
_local2 = 1;
while (_local2 <= 25) {
this[("mcdec" + _local2)].visible = false;
_local2++;
};
this[("mcdec" + _arg1.target.level)].visible = true;
}
}
}//package script.screen
Section 201
//CCreditsScreen (script.screen.CCreditsScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import spill.localisation.*;
public class CCreditsScreen extends MovieClip implements IScreen {
public var backBtn:SimpleButton;
public var __id28_:LocalizedTextField;
public var __id29_:LocalizedTextField;
public var __id24_:LocalizedTextField;
public var __id25_:LocalizedTextField;
private var eo:CEventOrganizer;
public var __id30_:LocalizedTextField;
public var __id26_:LocalizedTextField;
public var __id27_:LocalizedTextField;
public var __id31_:LocalizedTextField;
public function CCreditsScreen():void{
eo = CEventOrganizer.getInstance();
super();
backBtn.useHandCursor = true;
backBtn.addEventListener(MouseEvent.CLICK, backBtnClick);
__setProp___id27__CCreditsScreen_Layer6_1();
__setProp___id25__CCreditsScreen_Layer6_1();
__setProp___id31__CCreditsScreen_Layer6_1();
__setProp___id28__CCreditsScreen_Layer6_1();
__setProp___id30__CCreditsScreen_Layer6_1();
__setProp___id29__CCreditsScreen_Layer6_1();
__setProp___id26__CCreditsScreen_Layer6_1();
__setProp___id24__CCreditsScreen_Layer6_1();
}
public function destroy():void{
}
function __setProp___id24__CCreditsScreen_Layer6_1(){
try {
__id24_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id24_.text = "{txt_programmer}";
__id24_.textColor = 0xFFFFFF;
__id24_.textSize = 12;
__id24_.bold = true;
__id24_.disableWordwrap = false;
__id24_.embedFonts = true;
__id24_.font = "Times New Roman";
__id24_.hAlign = "center";
__id24_.multiline = false;
__id24_.vAlign = "top";
__id24_.antiAliasType = "advanced";
__id24_.glowBlur = 3;
__id24_.glowColor = 0;
__id24_.useGlowFilter = false;
__id24_.glowQuality = 1;
__id24_.glowStrength = 5;
__id24_.gridFitType = "pixel";
__id24_.italic = false;
__id24_.selectable = false;
__id24_.underline = false;
try {
__id24_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id25__CCreditsScreen_Layer6_1(){
try {
__id25_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id25_.text = "{txt_credits}";
__id25_.textColor = 0x6600;
__id25_.textSize = 24;
__id25_.bold = true;
__id25_.disableWordwrap = false;
__id25_.embedFonts = true;
__id25_.font = "Arial";
__id25_.hAlign = "center";
__id25_.multiline = false;
__id25_.vAlign = "top";
__id25_.antiAliasType = "advanced";
__id25_.glowBlur = 3;
__id25_.glowColor = 0;
__id25_.useGlowFilter = false;
__id25_.glowQuality = 1;
__id25_.glowStrength = 5;
__id25_.gridFitType = "pixel";
__id25_.italic = false;
__id25_.selectable = false;
__id25_.underline = false;
try {
__id25_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id30__CCreditsScreen_Layer6_1(){
try {
__id30_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id30_.text = "{txt_sounds}";
__id30_.textColor = 0xFFFFFF;
__id30_.textSize = 12;
__id30_.bold = true;
__id30_.disableWordwrap = false;
__id30_.embedFonts = true;
__id30_.font = "Times New Roman";
__id30_.hAlign = "center";
__id30_.multiline = false;
__id30_.vAlign = "top";
__id30_.antiAliasType = "advanced";
__id30_.glowBlur = 3;
__id30_.glowColor = 0;
__id30_.useGlowFilter = false;
__id30_.glowQuality = 1;
__id30_.glowStrength = 5;
__id30_.gridFitType = "pixel";
__id30_.italic = false;
__id30_.selectable = false;
__id30_.underline = false;
try {
__id30_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id27__CCreditsScreen_Layer6_1(){
try {
__id27_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id27_.text = "{txt_leadartist}";
__id27_.textColor = 0xFFFFFF;
__id27_.textSize = 12;
__id27_.bold = true;
__id27_.disableWordwrap = false;
__id27_.embedFonts = true;
__id27_.font = "Times New Roman";
__id27_.hAlign = "center";
__id27_.multiline = false;
__id27_.vAlign = "top";
__id27_.antiAliasType = "advanced";
__id27_.glowBlur = 3;
__id27_.glowColor = 0;
__id27_.useGlowFilter = false;
__id27_.glowQuality = 1;
__id27_.glowStrength = 5;
__id27_.gridFitType = "pixel";
__id27_.italic = false;
__id27_.selectable = false;
__id27_.underline = false;
try {
__id27_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function backBtnClick(_arg1:MouseEvent):void{
backBtn.removeEventListener(MouseEvent.CLICK, backBtnClick);
eo.dispatchEvent(new Event(CScreenManager.MENU_SCREEN));
}
function __setProp___id31__CCreditsScreen_Layer6_1(){
try {
__id31_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id31_.text = "{txt_gametester}";
__id31_.textColor = 0xFFFFFF;
__id31_.textSize = 12;
__id31_.bold = true;
__id31_.disableWordwrap = false;
__id31_.embedFonts = true;
__id31_.font = "Times New Roman";
__id31_.hAlign = "center";
__id31_.multiline = false;
__id31_.vAlign = "top";
__id31_.antiAliasType = "advanced";
__id31_.glowBlur = 3;
__id31_.glowColor = 0;
__id31_.useGlowFilter = false;
__id31_.glowQuality = 1;
__id31_.glowStrength = 5;
__id31_.gridFitType = "pixel";
__id31_.italic = false;
__id31_.selectable = false;
__id31_.underline = false;
try {
__id31_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id26__CCreditsScreen_Layer6_1(){
try {
__id26_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id26_.text = "{txt_gamedesign}";
__id26_.textColor = 0xFFFFFF;
__id26_.textSize = 12;
__id26_.bold = true;
__id26_.disableWordwrap = false;
__id26_.embedFonts = true;
__id26_.font = "Times New Roman";
__id26_.hAlign = "center";
__id26_.multiline = false;
__id26_.vAlign = "top";
__id26_.antiAliasType = "advanced";
__id26_.glowBlur = 3;
__id26_.glowColor = 0;
__id26_.useGlowFilter = false;
__id26_.glowQuality = 1;
__id26_.glowStrength = 5;
__id26_.gridFitType = "pixel";
__id26_.italic = false;
__id26_.selectable = false;
__id26_.underline = false;
try {
__id26_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id28__CCreditsScreen_Layer6_1(){
try {
__id28_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id28_.text = "{txt_components}";
__id28_.textColor = 0xFFFFFF;
__id28_.textSize = 12;
__id28_.bold = true;
__id28_.disableWordwrap = false;
__id28_.embedFonts = true;
__id28_.font = "Times New Roman";
__id28_.hAlign = "center";
__id28_.multiline = false;
__id28_.vAlign = "top";
__id28_.antiAliasType = "advanced";
__id28_.glowBlur = 3;
__id28_.glowColor = 0;
__id28_.useGlowFilter = false;
__id28_.glowQuality = 1;
__id28_.glowStrength = 5;
__id28_.gridFitType = "pixel";
__id28_.italic = false;
__id28_.selectable = false;
__id28_.underline = false;
try {
__id28_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id29__CCreditsScreen_Layer6_1(){
try {
__id29_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id29_.text = "{txt_artist}";
__id29_.textColor = 0xFFFFFF;
__id29_.textSize = 12;
__id29_.bold = true;
__id29_.disableWordwrap = false;
__id29_.embedFonts = true;
__id29_.font = "Times New Roman";
__id29_.hAlign = "center";
__id29_.multiline = false;
__id29_.vAlign = "top";
__id29_.antiAliasType = "advanced";
__id29_.glowBlur = 3;
__id29_.glowColor = 0;
__id29_.useGlowFilter = false;
__id29_.glowQuality = 1;
__id29_.glowStrength = 5;
__id29_.gridFitType = "pixel";
__id29_.italic = false;
__id29_.selectable = false;
__id29_.underline = false;
try {
__id29_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package script.screen
Section 202
//CEndScreen (script.screen.CEndScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import spill.localisation.*;
public class CEndScreen extends MovieClip implements IScreen {
public var backBtn:MovieClip;
public var __id22_:LocalizedTextField;
public var __id23_:LocalizedTextField;
private var eo:CEventOrganizer;
public function CEndScreen():void{
eo = CEventOrganizer.getInstance();
super();
backBtn.buttonMode = true;
backBtn.addEventListener(MouseEvent.CLICK, backBtnClick);
__setProp___id22__CEndScreen_bg_1();
__setProp___id23__CEndScreen_bg_1();
}
public function destroy():void{
}
function __setProp___id23__CEndScreen_bg_1(){
try {
__id23_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id23_.text = "{txt_credits}";
__id23_.textColor = 13886706;
__id23_.textSize = 12;
__id23_.bold = true;
__id23_.disableWordwrap = false;
__id23_.embedFonts = true;
__id23_.font = "Times New Roman";
__id23_.hAlign = "left";
__id23_.multiline = false;
__id23_.vAlign = "top";
__id23_.antiAliasType = "advanced";
__id23_.glowBlur = 3;
__id23_.glowColor = 0;
__id23_.useGlowFilter = false;
__id23_.glowQuality = 1;
__id23_.glowStrength = 5;
__id23_.gridFitType = "pixel";
__id23_.italic = false;
__id23_.selectable = false;
__id23_.underline = false;
try {
__id23_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function backBtnClick(_arg1:MouseEvent):void{
backBtn.removeEventListener(MouseEvent.CLICK, backBtnClick);
eo.dispatchEvent(new Event(CScreenManager.CREDITS_SCREEN));
}
function __setProp___id22__CEndScreen_bg_1(){
try {
__id22_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id22_.text = "{txt_theend}";
__id22_.textColor = 0x6600;
__id22_.textSize = 24;
__id22_.bold = true;
__id22_.disableWordwrap = false;
__id22_.embedFonts = true;
__id22_.font = "Times New Roman";
__id22_.hAlign = "center";
__id22_.multiline = false;
__id22_.vAlign = "top";
__id22_.antiAliasType = "advanced";
__id22_.glowBlur = 3;
__id22_.glowColor = 0;
__id22_.useGlowFilter = false;
__id22_.glowQuality = 1;
__id22_.glowStrength = 5;
__id22_.gridFitType = "pixel";
__id22_.italic = false;
__id22_.selectable = false;
__id22_.underline = false;
try {
__id22_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package script.screen
Section 203
//CHowToPlayScreen (script.screen.CHowToPlayScreen)
package script.screen {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import script.engine.*;
import spill.localisation.*;
public class CHowToPlayScreen extends MovieClip implements IScreen {
public var backBtn:SimpleButton;
private var gs:CGameSession;
public var __id56_:LocalizedTextField;
public var __id60_:LocalizedTextField;
public var __id57_:LocalizedTextField;
private var frm:int;// = 1
public var __id58_:LocalizedTextField;
public var __setPropDict:Dictionary;
public var nextBtn:SimpleButton;
public var wbody:MovieClip;
public var barrel:MovieClip;
public var doneBtn:SimpleButton;
private var eo:CEventOrganizer;
public var __id59_:LocalizedTextField;
public function CHowToPlayScreen():void{
__setPropDict = new Dictionary(true);
gs = CGameSession.getInstance();
eo = CEventOrganizer.getInstance();
frm = 1;
super();
addFrameScript(0, frame1, 1, frame2);
gotoAndStop(frm);
backBtn.useHandCursor = true;
nextBtn.useHandCursor = true;
doneBtn.useHandCursor = true;
backBtn.addEventListener(MouseEvent.CLICK, onBackClick, false, 0, true);
nextBtn.addEventListener(MouseEvent.CLICK, onNextClick, false, 0, true);
doneBtn.addEventListener(MouseEvent.CLICK, onDoneClick, false, 0, true);
__setProp___id58__CHowToPlayScreen_NAVIGATOR_1();
__setProp___id60__CHowToPlayScreen_NAVIGATOR_1();
__setProp___id59__CHowToPlayScreen_NAVIGATOR_1();
}
function __setProp___id56__CHowToPlayScreen_frames_1(){
try {
__id56_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id56_.text = "{txt_head1}";
__id56_.textColor = 1662108;
__id56_.textSize = 12;
__id56_.bold = true;
__id56_.disableWordwrap = false;
__id56_.embedFonts = true;
__id56_.font = "Times New Roman";
__id56_.hAlign = "center";
__id56_.multiline = false;
__id56_.vAlign = "top";
__id56_.antiAliasType = "advanced";
__id56_.glowBlur = 3;
__id56_.glowColor = 0;
__id56_.useGlowFilter = false;
__id56_.glowQuality = 1;
__id56_.glowStrength = 5;
__id56_.gridFitType = "pixel";
__id56_.italic = false;
__id56_.selectable = false;
__id56_.underline = false;
try {
__id56_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function destroy():void{
}
function __setProp___id56__CHowToPlayScreen_frames_2(){
try {
__id56_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id56_.text = "{txt_head2}";
__id56_.textColor = 1662108;
__id56_.textSize = 12;
__id56_.bold = true;
__id56_.disableWordwrap = false;
__id56_.embedFonts = true;
__id56_.font = "Times New Roman";
__id56_.hAlign = "center";
__id56_.multiline = false;
__id56_.vAlign = "top";
__id56_.antiAliasType = "advanced";
__id56_.glowBlur = 3;
__id56_.glowColor = 0;
__id56_.useGlowFilter = false;
__id56_.glowQuality = 1;
__id56_.glowStrength = 5;
__id56_.gridFitType = "pixel";
__id56_.italic = false;
__id56_.selectable = false;
__id56_.underline = false;
try {
__id56_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id59__CHowToPlayScreen_NAVIGATOR_1(){
try {
__id59_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id59_.text = "{btn_nexttut}";
__id59_.textColor = 0;
__id59_.textSize = 14;
__id59_.bold = false;
__id59_.disableWordwrap = false;
__id59_.embedFonts = true;
__id59_.font = "Times New Roman";
__id59_.hAlign = "center";
__id59_.multiline = false;
__id59_.vAlign = "top";
__id59_.antiAliasType = "advanced";
__id59_.glowBlur = 3;
__id59_.glowColor = 0;
__id59_.useGlowFilter = false;
__id59_.glowQuality = 1;
__id59_.glowStrength = 5;
__id59_.gridFitType = "pixel";
__id59_.italic = false;
__id59_.selectable = false;
__id59_.underline = false;
try {
__id59_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onNextClick(_arg1:MouseEvent):void{
if (frm < 15){
frm++;
gotoAndStop(frm);
};
}
function __setProp___id57__CHowToPlayScreen_frames_1(){
try {
__id57_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id57_.text = "{txt_tut1}";
__id57_.textColor = 1662108;
__id57_.textSize = 12;
__id57_.bold = false;
__id57_.disableWordwrap = false;
__id57_.embedFonts = true;
__id57_.font = "Times New Roman";
__id57_.hAlign = "left";
__id57_.multiline = true;
__id57_.vAlign = "top";
__id57_.antiAliasType = "advanced";
__id57_.glowBlur = 3;
__id57_.glowColor = 0;
__id57_.useGlowFilter = false;
__id57_.glowQuality = 1;
__id57_.glowStrength = 5;
__id57_.gridFitType = "pixel";
__id57_.italic = false;
__id57_.selectable = false;
__id57_.underline = false;
try {
__id57_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onDoneClick(_arg1:MouseEvent):void{
backBtn.removeEventListener(MouseEvent.CLICK, onBackClick);
nextBtn.removeEventListener(MouseEvent.CLICK, onNextClick);
doneBtn.removeEventListener(MouseEvent.CLICK, onDoneClick);
if (gs.isNewGame){
eo.dispatchEvent(new Event(CScreenManager.PLAY_SCREEN));
} else {
eo.dispatchEvent(new Event(CScreenManager.MENU_SCREEN));
};
}
function frame1(){
if ((((__setPropDict[__id56_] == undefined)) || (!((int(__setPropDict[__id56_]) == 1))))){
__setPropDict[__id56_] = currentFrame;
__setProp___id56__CHowToPlayScreen_frames_1();
};
if ((((__setPropDict[__id57_] == undefined)) || (!((int(__setPropDict[__id57_]) == 1))))){
__setPropDict[__id57_] = currentFrame;
__setProp___id57__CHowToPlayScreen_frames_1();
};
}
function __setProp___id57__CHowToPlayScreen_frames_2(){
try {
__id57_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id57_.text = "{txt_tut2}";
__id57_.textColor = 1662108;
__id57_.textSize = 12;
__id57_.bold = false;
__id57_.disableWordwrap = false;
__id57_.embedFonts = true;
__id57_.font = "Times New Roman";
__id57_.hAlign = "left";
__id57_.multiline = true;
__id57_.vAlign = "top";
__id57_.antiAliasType = "advanced";
__id57_.glowBlur = 3;
__id57_.glowColor = 0;
__id57_.useGlowFilter = false;
__id57_.glowQuality = 1;
__id57_.glowStrength = 5;
__id57_.gridFitType = "pixel";
__id57_.italic = false;
__id57_.selectable = false;
__id57_.underline = false;
try {
__id57_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame2(){
if ((((__setPropDict[__id56_] == undefined)) || (!((int(__setPropDict[__id56_]) == 2))))){
__setPropDict[__id56_] = currentFrame;
__setProp___id56__CHowToPlayScreen_frames_2();
};
if ((((__setPropDict[__id57_] == undefined)) || (!((int(__setPropDict[__id57_]) == 2))))){
__setPropDict[__id57_] = currentFrame;
__setProp___id57__CHowToPlayScreen_frames_2();
};
}
function __setProp___id60__CHowToPlayScreen_NAVIGATOR_1(){
try {
__id60_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id60_.text = "{btn_donetut}";
__id60_.textColor = 0;
__id60_.textSize = 14;
__id60_.bold = false;
__id60_.disableWordwrap = false;
__id60_.embedFonts = true;
__id60_.font = "Times New Roman";
__id60_.hAlign = "center";
__id60_.multiline = false;
__id60_.vAlign = "top";
__id60_.antiAliasType = "advanced";
__id60_.glowBlur = 3;
__id60_.glowColor = 0;
__id60_.useGlowFilter = false;
__id60_.glowQuality = 1;
__id60_.glowStrength = 5;
__id60_.gridFitType = "pixel";
__id60_.italic = false;
__id60_.selectable = false;
__id60_.underline = false;
try {
__id60_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onBackClick(_arg1:MouseEvent):void{
if (frm > 1){
frm--;
gotoAndStop(frm);
};
}
function __setProp___id58__CHowToPlayScreen_NAVIGATOR_1(){
try {
__id58_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id58_.text = "{btn_backtut}";
__id58_.textColor = 0;
__id58_.textSize = 14;
__id58_.bold = false;
__id58_.disableWordwrap = false;
__id58_.embedFonts = true;
__id58_.font = "Times New Roman";
__id58_.hAlign = "center";
__id58_.multiline = false;
__id58_.vAlign = "top";
__id58_.antiAliasType = "advanced";
__id58_.glowBlur = 3;
__id58_.glowColor = 0;
__id58_.useGlowFilter = false;
__id58_.glowQuality = 1;
__id58_.glowStrength = 5;
__id58_.gridFitType = "pixel";
__id58_.italic = false;
__id58_.selectable = false;
__id58_.underline = false;
try {
__id58_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package script.screen
Section 204
//CIntroScreen (script.screen.CIntroScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import flash.text.*;
public class CIntroScreen extends MovieClip implements IScreen {
public var loaded:TextField;
public var bar:MovieClip;
private var eo:CEventOrganizer;
public function CIntroScreen():void{
eo = CEventOrganizer.getInstance();
super();
addEventListener(MouseEvent.CLICK, skipIt);
}
public function destroy():void{
}
private function skipIt(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.CLICK, skipIt);
eo.dispatchEvent(new Event(CScreenManager.MENU_SCREEN));
}
private function frameHandler(_arg1:Event):void{
}
}
}//package script.screen
Section 205
//CLevelIntroScreen (script.screen.CLevelIntroScreen)
package script.screen {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import script.engine.*;
import flash.text.*;
public class CLevelIntroScreen extends MovieClip {
private var fadeOutTimer:Timer;
private var c:uint;// = 0
private var destroyTimer:Timer;
public var descText:TextField;
public var lvlText:TextField;
private var eo:CEventOrganizer;
public function CLevelIntroScreen(_arg1:String="level 0", _arg2:String="level description"):void{
eo = CEventOrganizer.getInstance();
fadeOutTimer = new Timer(1000, 1);
destroyTimer = new Timer(10);
c = 0;
super();
lvlText.text = _arg1;
descText.text = _arg2;
fadeOutTimer.addEventListener(TimerEvent.TIMER_COMPLETE, startfadeOut, false, 0, true);
fadeOutTimer.start();
}
private function fadeOut(_arg1:TimerEvent):void{
c++;
if (c > 50){
alpha = (alpha - 0.05);
};
if (alpha <= 0){
eo.dispatchEvent(new Event("play mode on"));
destroyTimer.stop();
destroyTimer.removeEventListener(TimerEvent.TIMER, fadeOut);
destroyTimer = null;
parent.removeChild(this);
};
}
private function startfadeOut(_arg1:TimerEvent):void{
fadeOutTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, startfadeOut);
destroyTimer.addEventListener(TimerEvent.TIMER, fadeOut, false, 0, true);
destroyTimer.start();
}
}
}//package script.screen
Section 206
//CMenuScreen (script.screen.CMenuScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import spill.localisation.*;
public class CMenuScreen extends MovieClip implements IScreen {
public var howBtn:SimpleButton;
private var gs:CGameSession;
private var ssc:CSettingScreenController;
public var __id6_:LocalizedTextField;
public var __id7_:LocalizedTextField;
public var __id10_:LocalizedTextField;
public var btn_moreGames:SimpleButton;
public var creditsBtn:SimpleButton;
public var __id11_:LocalizedTextField;
public var __id8_:LocalizedTextField;
public var __id9_:LocalizedTextField;
public var playBtn:SimpleButton;
public var setBtn:SimpleButton;
private var ss:CSoundManager;
public var conBtn:SimpleButton;
private var eo:CEventOrganizer;
public var logo2:logo_bg;
public function CMenuScreen():void{
gs = CGameSession.getInstance();
ss = CSoundManager.getInstance();
eo = CEventOrganizer.getInstance();
ssc = CSettingScreenController.getInstance();
super();
addFrameScript(0, frame1);
init();
playBtn.addEventListener(MouseEvent.CLICK, onPlayBtnClick, false, 0, true);
conBtn.addEventListener(MouseEvent.CLICK, onContinueBtnClick, false, 0, true);
setBtn.addEventListener(MouseEvent.CLICK, onSetBtnClick, false, 0, true);
howBtn.addEventListener(MouseEvent.CLICK, onHowBtnClick, false, 0, true);
creditsBtn.addEventListener(MouseEvent.CLICK, onCreditsBtnClick, false, 0, true);
ss.changeBgmTo(CSoundManager.bgmMenuScreen);
__setProp___id8__CMenuScreen_buttons_1();
__setProp___id9__CMenuScreen_buttons_1();
__setProp___id7__CMenuScreen_buttons_1();
__setProp___id6__CMenuScreen_Layer7_1();
__setProp___id11__CMenuScreen_buttons_1();
__setProp___id10__CMenuScreen_buttons_1();
}
private function cleaning():void{
playBtn.removeEventListener(MouseEvent.CLICK, onPlayBtnClick);
conBtn.removeEventListener(MouseEvent.CLICK, onContinueBtnClick);
setBtn.removeEventListener(MouseEvent.CLICK, onSetBtnClick);
creditsBtn.removeEventListener(MouseEvent.CLICK, onCreditsBtnClick);
}
public function destroy():void{
}
function __setProp___id9__CMenuScreen_buttons_1(){
try {
__id9_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id9_.text = "{btn_howtoplay}";
__id9_.textColor = 0xFFFFFF;
__id9_.textSize = 24;
__id9_.bold = true;
__id9_.disableWordwrap = false;
__id9_.embedFonts = true;
__id9_.font = "Times New Roman";
__id9_.hAlign = "center";
__id9_.multiline = false;
__id9_.vAlign = "top";
__id9_.antiAliasType = "advanced";
__id9_.glowBlur = 3;
__id9_.glowColor = 0;
__id9_.useGlowFilter = false;
__id9_.glowQuality = 1;
__id9_.glowStrength = 5;
__id9_.gridFitType = "pixel";
__id9_.italic = false;
__id9_.selectable = false;
__id9_.underline = false;
try {
__id9_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function init():void{
gs.loadGameData();
}
function __setProp___id11__CMenuScreen_buttons_1(){
try {
__id11_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id11_.text = "{btn_play}";
__id11_.textColor = 0xFFFFFF;
__id11_.textSize = 24;
__id11_.bold = true;
__id11_.disableWordwrap = false;
__id11_.embedFonts = true;
__id11_.font = "Times New Roman";
__id11_.hAlign = "center";
__id11_.multiline = false;
__id11_.vAlign = "top";
__id11_.antiAliasType = "advanced";
__id11_.glowBlur = 3;
__id11_.glowColor = 0;
__id11_.useGlowFilter = false;
__id11_.glowQuality = 1;
__id11_.glowStrength = 5;
__id11_.gridFitType = "pixel";
__id11_.italic = false;
__id11_.selectable = false;
__id11_.underline = false;
try {
__id11_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function handle_btnMoreGames(_arg1:MouseEvent):void{
this["root"].MoreGames();
}
function __setProp___id10__CMenuScreen_buttons_1(){
try {
__id10_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id10_.text = "{btn_credits}";
__id10_.textColor = 0xFFFFFF;
__id10_.textSize = 24;
__id10_.bold = true;
__id10_.disableWordwrap = false;
__id10_.embedFonts = true;
__id10_.font = "Times New Roman";
__id10_.hAlign = "center";
__id10_.multiline = false;
__id10_.vAlign = "top";
__id10_.antiAliasType = "advanced";
__id10_.glowBlur = 3;
__id10_.glowColor = 0;
__id10_.useGlowFilter = false;
__id10_.glowQuality = 1;
__id10_.glowStrength = 5;
__id10_.gridFitType = "pixel";
__id10_.italic = false;
__id10_.selectable = false;
__id10_.underline = false;
try {
__id10_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id6__CMenuScreen_Layer7_1(){
try {
__id6_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id6_.text = "{btn_moregamesat}";
__id6_.textColor = 0;
__id6_.textSize = 12;
__id6_.bold = false;
__id6_.disableWordwrap = false;
__id6_.embedFonts = true;
__id6_.font = "Times New Roman";
__id6_.hAlign = "center";
__id6_.multiline = false;
__id6_.vAlign = "top";
__id6_.antiAliasType = "advanced";
__id6_.glowBlur = 3;
__id6_.glowColor = 0;
__id6_.useGlowFilter = false;
__id6_.glowQuality = 1;
__id6_.glowStrength = 5;
__id6_.gridFitType = "pixel";
__id6_.italic = false;
__id6_.selectable = false;
__id6_.underline = false;
try {
__id6_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id8__CMenuScreen_buttons_1(){
try {
__id8_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id8_.text = "{btn_options}";
__id8_.textColor = 0xFFFFFF;
__id8_.textSize = 24;
__id8_.bold = true;
__id8_.disableWordwrap = false;
__id8_.embedFonts = true;
__id8_.font = "Times New Roman";
__id8_.hAlign = "center";
__id8_.multiline = false;
__id8_.vAlign = "top";
__id8_.antiAliasType = "advanced";
__id8_.glowBlur = 3;
__id8_.glowColor = 0;
__id8_.useGlowFilter = false;
__id8_.glowQuality = 1;
__id8_.glowStrength = 5;
__id8_.gridFitType = "pixel";
__id8_.italic = false;
__id8_.selectable = false;
__id8_.underline = false;
try {
__id8_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onPlayBtnClick(_arg1:MouseEvent):void{
gs.levelData = new CLevelData();
gs.currentLevel = 1;
gs.isNewGame = true;
cleaning();
eo.dispatchEvent(new Event(CScreenManager.HOW_SCREEN));
}
private function onContinueBtnClick(_arg1:MouseEvent):void{
cleaning();
eo.dispatchEvent(new Event(CScreenManager.CONTINUE_SCREEN));
}
function __setProp___id7__CMenuScreen_buttons_1(){
try {
__id7_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id7_.text = "{btn_continue}";
__id7_.textColor = 0xFFFFFF;
__id7_.textSize = 24;
__id7_.bold = true;
__id7_.disableWordwrap = false;
__id7_.embedFonts = true;
__id7_.font = "Times New Roman";
__id7_.hAlign = "center";
__id7_.multiline = false;
__id7_.vAlign = "top";
__id7_.antiAliasType = "advanced";
__id7_.glowBlur = 3;
__id7_.glowColor = 0;
__id7_.useGlowFilter = false;
__id7_.glowQuality = 1;
__id7_.glowStrength = 5;
__id7_.gridFitType = "pixel";
__id7_.italic = false;
__id7_.selectable = false;
__id7_.underline = false;
try {
__id7_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onCreditsBtnClick(_arg1:MouseEvent):void{
cleaning();
eo.dispatchEvent(new Event(CScreenManager.CREDITS_SCREEN));
}
function frame1(){
btn_moreGames.addEventListener(MouseEvent.CLICK, handle_btnMoreGames);
}
private function onHowBtnClick(_arg1:MouseEvent):void{
gs.isNewGame = false;
cleaning();
eo.dispatchEvent(new Event(CScreenManager.HOW_SCREEN));
}
private function onSetBtnClick(_arg1:MouseEvent):void{
ssc.showSettingScreen();
}
public function belugerin(_arg1:MouseEvent):void{
this["root"].Belugerin();
}
}
}//package script.screen
Section 207
//CPlayScreen (script.screen.CPlayScreen)
package script.screen {
import script.parts.*;
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import spill.localisation.*;
import script.tracks.components.*;
import script.tracks.*;
import script.battle.*;
import flash.geom.*;
import script.windows.*;
public class CPlayScreen extends MovieClip implements IScreen {
private const trackVhcDownLimit:Number = 330;
private const trackVhcRightLimit:Number = 650;
private const trackVhcUpLimit:Number = 150;
private const trackScrollPixelStep:uint = 15;
private const trackScrollTimeStep:uint = 10;
private const camSpeed:uint = 1;
private const trackVhcLeftLimit:Number = 150;
private var ssc:CSettingScreenController;
private var trackUpLimit:Number;// = 0
private var dx2;
private var dy2:Number;
public var sdBtn:SimpleButton;
public var goBtn:SimpleButton;
public var skipBtn:SimpleButton;
private var physics:CPhysicsWorld;
private var contacts:QuickContacts;
public var soBtn:SimpleButton;
var d;
public var vtmBtn:SimpleButton;
private var ss:CSoundManager;
private var xDatas:Array;
var l:int;
private var dd:Number;
public var __id1_:LocalizedTextField;
var v:Number;
private var isStuck:Boolean;
public var suBtn:SimpleButton;
private var dx:Number;
private var isDx2;
private var dy:Number;
public var optBtn:SimpleButton;
public var popup:MovieClip;
public var __id2_:LocalizedTextField;
private var trackAnimTimer:Timer;
private var eo:CEventOrganizer;
private var trackRightLimit:Number;
public var spBtn:SimpleButton;
var itd:Array;
private var fp:Point;
private var isDy2:Boolean;
private var canDeployColor:ColorTransform;
public var __id3_:LocalizedTextField;
private var stopPhysicsTimer:Timer;
private var rollTimer:Timer;
public var __id4_:LocalizedTextField;
private var trackLeftLimit:Number;// = 0
private var gs:CGameSession;
private var maxDatas:uint;// = 20
private var obj:Object;
private var stuckTimer:Timer;
private var trackDownLimit:Number;
public var giveUpBtn:SimpleButton;
private var ip:Point;
private var isScrollLeft:Boolean;
private var layers:Array;
public var slBtn:SimpleButton;
private var damageInfos:Array;
public var physicsLayer:CVehicleLayer;
private var sumX:Number;
private var tpc:uint;
private var idleTimeBeforeNextScroll:Timer;
public var assemblyWindow:CAssemblyWindow;
private var tps:uint;
private var cantDeployColor:ColorTransform;
public var srBtn:SimpleButton;
private var isScrollUp:Boolean;
private var isEnableTrackScrolling:Boolean;
private var isDraging:Boolean;
private var tempPartTrack:MovieClip;
private var mustBeDestroyedBullets:Array;
public var partWindow:CPartSelectorWindow;
private var isScrollRight:Boolean;
private var np:Point;
private var tsc:uint;
private var avgX:Number;
private var partDrag:IPhysics;
private var isScrollDown:Boolean;
public var asmBtn:SimpleButton;
private var dxTolerance:Number;// = 2
private var tempPart:MovieClip;
private var tts:uint;
public function CPlayScreen():void{
eo = CEventOrganizer.getInstance();
gs = CGameSession.getInstance();
ss = CSoundManager.getInstance();
ssc = CSettingScreenController.getInstance();
canDeployColor = new ColorTransform(1, 1, 1, 0.5, 0, 0, 0, 0);
cantDeployColor = new ColorTransform(1, 0.5, 0.5, 0.5, 0xFF, 0, 0, 0);
layers = new Array();
trackLeftLimit = 0;
trackUpLimit = 0;
trackAnimTimer = new Timer(trackScrollTimeStep);
idleTimeBeforeNextScroll = new Timer(500, 1);
rollTimer = new Timer(500, 1);
stuckTimer = new Timer(750);
stopPhysicsTimer = new Timer(4000, 1);
xDatas = new Array();
maxDatas = 20;
dxTolerance = 2;
itd = new Array();
mustBeDestroyedBullets = new Array();
damageInfos = new Array();
super();
gs.initLevel();
initLevel();
init();
ss.changeBgmTo(CSoundManager.bgmPlayScreen);
__setProp___id4__CPlayScreen_Layer18_1();
__setProp___id3__CPlayScreen_Layer18_1();
__setProp___id2__CPlayScreen_Layer18_1();
__setProp___id1__CPlayScreen_Layer18_1();
}
private function spBtnClick(_arg1:MouseEvent):void{
}
private function asmBtnClick(_arg1:MouseEvent):void{
assemblyMode();
}
private function onAdd(_arg1:Event):Boolean{
var _local2:uint;
var _local3:b2Vec2;
var _local4:Object;
var _local5:uint;
if (contacts.inCurrentContact(gs.goalComponent)){
_local2 = 0;
while (_local2 < gs.vehicleParts.length) {
if (contacts.inCurrentContact(gs.vehicleParts[_local2])){
gs.isWin = true;
stuckTimer.stop();
physics.world.main.removeEventListener(Event.ENTER_FRAME, physicsRender);
stopPhysicsTimer.delay = 10;
stopPhysicsTimer.start();
return (false);
};
_local2++;
};
};
_local2 = 0;
while (_local2 < gs.bullets.length) {
if (contacts.inCurrentContact(gs.bullets[_local2].body)){
gs.bullets[_local2].body.userData.visible = false;
_local3 = contacts.currentPoint.position;
_local4 = new gs.bullets[_local2].colFx();
_local4.x = (_local3.x * 30);
_local4.y = (_local3.y * 30);
physicsLayer.addChild(MovieClip(_local4));
mustBeDestroyedBullets.push(gs.bullets[_local2]);
_local5 = 0;
while (_local5 < gs.destroyables.length) {
if (contacts.inCurrentContact(gs.destroyables[_local5].body)){
if (gs.destroyables[_local5] != gs.bullets[_local2].firedBy){
damageInfos.push(new CDamageInfo(gs.destroyables[_local5], gs.bullets[_local2].blastDamage));
if (!(gs.bullets[_local2].firedBy is IFoe)){
resetStuckChecker();
};
};
break;
};
_local5++;
};
break;
};
_local2++;
};
return (true);
}
private function windowSetting():void{
layers[2].addChild(assemblyWindow);
layers[2].addChild(partWindow);
goBtn.visible = false;
optBtn.visible = false;
soBtn.visible = false;
asmBtn.visible = false;
vtmBtn.visible = false;
giveUpBtn.visible = false;
partWindow.visible = false;
assemblyWindow.visible = false;
assemblyWindow.craftingBG.addEventListener(MouseEvent.MOUSE_OVER, onAWOver, false, 0, true);
assemblyWindow.craftingBG.addEventListener(MouseEvent.MOUSE_OUT, onAWOut, false, 0, true);
assemblyWindow.craftingBG.addEventListener(MouseEvent.MOUSE_MOVE, onAWMove, false, 0, true);
assemblyWindow.craftingBG.addEventListener(MouseEvent.CLICK, onAWClick, false, 0, true);
assemblyWindow.addEventListener(MouseEvent.CLICK, onAW2Click, false, 0, true);
partWindow.addEventListener("can deploy", disablePartsMouse, false, 0, true);
}
private function initLevel():void{
partWindow.update2();
if (gs.isLoseAndRetry){
loadLastCrafted();
};
}
private function viewTrackMode():void{
partWindow.visible = false;
assemblyWindow.visible = false;
goBtn.visible = false;
optBtn.visible = false;
vtmBtn.visible = false;
asmBtn.visible = true;
soBtn.visible = false;
enableScrolling();
}
private function startOver():void{
var _local1:int;
var _local2:int;
var _local3:Array;
_local2 = assemblyWindow.numChildren;
_local3 = new Array();
_local1 = 0;
while (_local1 < _local2) {
if ((assemblyWindow.getChildAt(_local1) is IPhysics)){
_local3.push(assemblyWindow.getChildAt(_local1));
};
_local1++;
};
_local2 = _local3.length;
_local1 = 0;
while (_local1 < _local2) {
assemblyWindow.removeChild(_local3[_local1]);
_local1++;
};
gs.isCoreDeployed = false;
partWindow.startOver();
}
public function physicsThings():void{
physics = new CPhysicsWorld(physicsLayer);
drawTrack();
drawVehicle();
physics.start();
contacts = physics.world.addContactListener();
contacts.addEventListener(QuickContacts.ADD, onAdd, false, 0, true);
}
private function drawTrack():void{
var _local1:Array;
_local1 = IPhysics(gs.currentTrack).clone(physicsLayer);
physics.addBody(_local1);
}
private function optBtnClick(_arg1:MouseEvent):void{
ssc.showSettingScreen(true);
}
private function scrollTrack(_arg1:TimerEvent):void{
tsc++;
if (np.x > ip.x){
tempPartTrack.x = (tempPartTrack.x + dx);
} else {
tempPartTrack.x = (tempPartTrack.x - dx);
};
if (tempPartTrack.x > trackLeftLimit){
tempPartTrack.x = trackLeftLimit;
};
if (tempPartTrack.x < trackRightLimit){
tempPartTrack.x = trackRightLimit;
};
if (np.y > ip.y){
tempPartTrack.y = (tempPartTrack.y + dy);
} else {
tempPartTrack.y = (tempPartTrack.y - dy);
};
if (tempPartTrack.y > trackUpLimit){
tempPartTrack.y = trackUpLimit;
};
if (tempPartTrack.y < trackDownLimit){
tempPartTrack.y = trackDownLimit;
};
if (tsc == tts){
idleTimeBeforeNextScroll.start();
trackAnimTimer.stop();
};
if (tpc == tps){
trackAnimTimer.removeEventListener(TimerEvent.TIMER, scrollTrack);
assemblyMode();
};
}
function __setProp___id3__CPlayScreen_Layer18_1(){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.text = "{txt_scroll}";
__id3_.textColor = 9219623;
__id3_.textSize = 12;
__id3_.bold = false;
__id3_.disableWordwrap = false;
__id3_.embedFonts = true;
__id3_.font = "Arial";
__id3_.hAlign = "center";
__id3_.multiline = false;
__id3_.vAlign = "top";
__id3_.antiAliasType = "advanced";
__id3_.glowBlur = 3;
__id3_.glowColor = 0;
__id3_.useGlowFilter = false;
__id3_.glowQuality = 1;
__id3_.glowStrength = 5;
__id3_.gridFitType = "pixel";
__id3_.italic = false;
__id3_.selectable = false;
__id3_.underline = false;
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function loadLastCrafted():void{
var _local1:int;
var _local2:Object;
var _local3:int;
_local1 = 0;
while (_local1 < gs.lastCrafted.length) {
_local2 = new gs.lastCrafted[_local1].partClass();
assemblyWindow.addChild(MovieClip(_local2));
_local2.x = gs.lastCrafted[_local1].x;
_local2.y = gs.lastCrafted[_local1].y;
_local3 = 0;
while (_local3 < partWindow.parts.length) {
if (((!(partWindow.parts[_local3].isUsed)) && ((gs.lastCrafted[_local1].partClass == MovieClip(partWindow.parts[_local3]).constructor)))){
partWindow.parts[_local3].isUsed = true;
break;
};
_local3++;
};
_local1++;
};
partWindow.updateSlots25();
}
private function stuckChecker(_arg1:TimerEvent):void{
var _local2:uint;
xDatas.push(gs.currentCorePartBody.x);
if (xDatas.length == maxDatas){
sumX = 0;
_local2 = 0;
while (_local2 < xDatas.length) {
sumX = (sumX + xDatas[_local2]);
_local2++;
};
avgX = (sumX / maxDatas);
if (Math.abs((avgX - gs.currentCorePartBody.x)) < dxTolerance){
stuckTimer.stop();
stuckTimer.removeEventListener(TimerEvent.TIMER, stuckChecker);
isStuck = true;
};
xDatas.shift();
};
scanTargets();
}
private function disableMouseForAllPartDeployed():void{
var _local1:int;
_local1 = 0;
while (_local1 < assemblyWindow.numChildren) {
if ((assemblyWindow.getChildAt(_local1) is IPart)){
MovieClip(assemblyWindow.getChildAt(_local1)).mouseEnabled = false;
};
_local1++;
};
}
private function setFoesAI():void{
var _local1:int;
_local1 = 0;
while (_local1 < gs.foes.length) {
if (gs.foes[_local1].mustBeDestoyedFirst){
trace(gs.foes[_local1], gs.foes[_local1].mustBeDestoyedFirst, gs.foes[_local1].mustBeDestoyedFirst.body);
gs.foes[_local1].mustBeDestoyedFirst = gs.foes[_local1].mustBeDestoyedFirst.body.body;
};
_local1++;
};
}
private function playOn(_arg1:Event):void{
skipBtn.addEventListener(MouseEvent.CLICK, skipBtnClick, false, 0, true);
skipBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
skipBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
animateTrack();
goBtn.addEventListener(MouseEvent.CLICK, goBtnClick, false, 0, true);
goBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
goBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
optBtn.addEventListener(MouseEvent.CLICK, optBtnClick, false, 0, true);
optBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
optBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
asmBtn.addEventListener(MouseEvent.CLICK, asmBtnClick, false, 0, true);
asmBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
asmBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
vtmBtn.addEventListener(MouseEvent.CLICK, vtmBtnClick, false, 0, true);
vtmBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
vtmBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
soBtn.addEventListener(MouseEvent.CLICK, soBtnClick, false, 0, true);
soBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
soBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
giveUpBtn.addEventListener(MouseEvent.CLICK, giveUpClick, false, 0, true);
giveUpBtn.addEventListener(MouseEvent.ROLL_OVER, RollOver, false, 0, true);
giveUpBtn.addEventListener(MouseEvent.ROLL_OUT, RollOut, false, 0, true);
}
private function disablePartsMouse(_arg1:Event):void{
disableMouseForAllPartDeployed();
}
private function onPopUpOkBtn(_arg1:MouseEvent):void{
hidePopUp();
}
private function onAWClick(_arg1:MouseEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:MovieClip;
_local2 = 999;
_local3 = 0;
while (_local3 < assemblyWindow.numChildren) {
if ((assemblyWindow.getChildAt(_local3) is ITirePart)){
_local2 = _local3;
break;
};
_local3++;
};
_local4 = 999;
_local3 = 0;
while (_local3 < assemblyWindow.numChildren) {
if ((assemblyWindow.getChildAt(_local3) is IJoint)){
_local4 = _local3;
break;
};
_local3++;
};
if (((isDraging) && (gs.canDeploy))){
if ((((partDrag is ICore)) && (!(gs.isCoreDeployed)))){
if (tempPart){
tempPart.addChild(MovieClip(partDrag).cloneMC());
gs.isCoreDeployed = true;
MovieClip(partDrag).visible = false;
isDraging = false;
uniqueForPuzzleModeOnly(_arg1);
};
} else {
if ((partDrag is IVehicle)){
while (MovieClip(partDrag).numChildren > 0) {
_local5 = MovieClip(MovieClip(partDrag).getChildAt(0));
MovieClip(MovieClip(partDrag).getChildAt(0)).x = (_local5.x + _arg1.localX);
_local5.y = (_local5.y + _arg1.localY);
_local5.mouseEnabled = false;
if ((_local5 is ITirePart)){
assemblyWindow.addChild(_local5);
} else {
if ((_local5 is IJoint)){
if (_local2 == 999){
assemblyWindow.addChild(_local5);
} else {
assemblyWindow.addChildAt(_local5, _local2);
};
} else {
if (_local4 != 999){
assemblyWindow.addChildAt(_local5, _local4);
} else {
if (_local2 != 999){
assemblyWindow.addChildAt(_local5, _local2);
} else {
assemblyWindow.addChild(_local5);
};
};
};
};
};
isDraging = false;
uniqueForPuzzleModeOnly(_arg1);
} else {
MovieClip(partDrag).x = _arg1.localX;
MovieClip(partDrag).y = _arg1.localY;
MovieClip(partDrag).transform.colorTransform = canDeployColor;
MovieClip(partDrag).alpha = 1;
if ((partDrag is ITirePart)){
assemblyWindow.addChild(MovieClip(partDrag));
} else {
if ((partDrag is IJoint)){
if (_local2 == 999){
assemblyWindow.addChild(MovieClip(partDrag));
} else {
assemblyWindow.addChildAt(MovieClip(partDrag), _local2);
};
} else {
if (_local4 != 999){
assemblyWindow.addChildAt(MovieClip(partDrag), _local4);
} else {
if (_local2 != 999){
assemblyWindow.addChildAt(MovieClip(partDrag), _local2);
} else {
assemblyWindow.addChild(MovieClip(partDrag));
};
};
};
};
isDraging = false;
uniqueForPuzzleModeOnly(_arg1);
};
};
partWindow.nullifyActivePart();
enableMouseForAllPartDeployed();
};
}
private function assemblyMode():void{
tempPartTrack.x = fp.x;
tempPartTrack.y = fp.y;
partWindow.visible = true;
assemblyWindow.visible = true;
skipBtn.visible = false;
goBtn.visible = true;
optBtn.visible = true;
vtmBtn.visible = true;
asmBtn.visible = false;
soBtn.visible = true;
disableScrolling();
}
private function physicsRender(_arg1:Event):Boolean{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
var _local5:Point;
var _local6:Number;
var _local7:Boolean;
var _local8:uint;
var _local9:int;
if (((!(gs.currentCorePartBody)) || (isStuck))){
gs.isLose = true;
stuckTimer.stop();
physics.world.main.removeEventListener(Event.ENTER_FRAME, physicsRender);
stopPhysicsTimer.start();
return (false);
};
_local2 = 0;
while (_local2 < gs.vehicleSkins.length) {
if ((gs.vehicleSkins[_local2] is ITirePart)){
gs.vehicleParts[_local2].body.SetAngularVelocity(gs.currentCore.power);
};
_local2++;
};
if (mustBeDestroyedBullets.length > 0){
_local2 = 0;
while (_local2 < mustBeDestroyedBullets.length) {
_local8 = 0;
while (_local8 < mustBeDestroyedBullets.length) {
if (((!((_local2 == _local8))) && ((mustBeDestroyedBullets[_local2] == mustBeDestroyedBullets[_local8])))){
mustBeDestroyedBullets.splice(_local8, 1);
};
_local8++;
};
_local2++;
};
_local2 = 0;
while (_local2 < gs.bullets.length) {
_local8 = 0;
while (_local8 < mustBeDestroyedBullets.length) {
if (gs.bullets[_local2] == mustBeDestroyedBullets[_local8]){
gs.bullets[_local2].destroy();
physics.world.w.DestroyBody(gs.bullets[_local2].body.body);
gs.bullets[_local2].parent.removeChild(gs.bullets[_local2]);
gs.bullets.splice(_local2, 1);
mustBeDestroyedBullets.splice(_local8, 1);
break;
};
_local8++;
};
_local2++;
};
};
if (damageInfos.length > 0){
_local2 = 0;
while (_local2 < damageInfos.length) {
_local8 = 0;
while (_local8 < damageInfos.length) {
if (((!((_local2 == _local8))) && ((damageInfos[_local2] == damageInfos[_local8])))){
damageInfos.splice(_local8, 1);
};
_local8++;
};
_local2++;
};
_local2 = 0;
while (_local2 < gs.destroyables.length) {
_local8 = 0;
while (_local8 < damageInfos.length) {
if (gs.destroyables[_local2] == damageInfos[_local8].destroyable){
damageInfos[_local8].destroyable.curHP = (damageInfos[_local8].destroyable.curHP - damageInfos[_local8].damageTaken);
damageInfos[_local8].destroyable.updateDamageState();
if (damageInfos[_local8].destroyable.curHP == 0){
_local9 = 0;
while (_local9 < gs.targets.length) {
if (gs.destroyables[_local2] == gs.targets[_local9]){
gs.targets.splice(_local9, 1);
break;
};
_local9++;
};
gs.destroyables[_local2].destroy();
gs.destroyables.splice(_local2, 1);
};
damageInfos.splice(_local8, 1);
break;
};
_local8++;
};
_local2++;
};
};
_local3 = (gs.currentCorePartBody.body.GetLinearVelocity().x / 2);
if (_local3 > 0){
_local4 = true;
} else {
_local4 = false;
};
if (!isDx2){
isDx2 = true;
dx2 = (tempPartTrack.x - physicsLayer.x);
};
_local5 = new Point(gs.currentCorePartBody.userData.x, gs.currentCorePartBody.userData.y);
_local5 = physicsLayer.localToGlobal(_local5);
if ((((_local5.x > trackVhcLeftLimit)) && ((_local5.x < trackVhcRightLimit)))){
if (_local4){
tempPartTrack.x = (tempPartTrack.x - (_local3 + camSpeed));
} else {
tempPartTrack.x = (tempPartTrack.x - (_local3 - camSpeed));
};
} else {
tempPartTrack.x = (tempPartTrack.x - _local3);
};
if (tempPartTrack.x > trackLeftLimit){
tempPartTrack.x = trackLeftLimit;
};
if (tempPartTrack.x < trackRightLimit){
tempPartTrack.x = trackRightLimit;
};
physicsLayer.x = (tempPartTrack.x - dx2);
_local6 = (gs.currentCorePartBody.body.GetLinearVelocity().y / 2);
if (_local6 > 0){
_local7 = true;
} else {
_local7 = false;
};
if (!isDy2){
isDy2 = true;
dy2 = (tempPartTrack.y - physicsLayer.y);
};
if ((((_local5.y > trackVhcUpLimit)) && ((_local5.y < trackVhcDownLimit)))){
if (_local7){
tempPartTrack.y = (tempPartTrack.y - (_local6 + camSpeed));
} else {
tempPartTrack.y = (tempPartTrack.y - (_local6 - camSpeed));
};
} else {
tempPartTrack.y = (tempPartTrack.y - _local6);
};
if (tempPartTrack.y > trackUpLimit){
tempPartTrack.y = trackUpLimit;
};
if (tempPartTrack.y < trackDownLimit){
tempPartTrack.y = trackDownLimit;
};
physicsLayer.y = (tempPartTrack.y - dy2);
return (true);
}
private function slBtnOver(_arg1:MouseEvent):void{
isScrollLeft = true;
trackAnimTimer.start();
}
function __setProp___id1__CPlayScreen_Layer18_1(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.text = "{txt_scroll}";
__id1_.textColor = 9219623;
__id1_.textSize = 12;
__id1_.bold = false;
__id1_.disableWordwrap = false;
__id1_.embedFonts = true;
__id1_.font = "Arial";
__id1_.hAlign = "center";
__id1_.multiline = false;
__id1_.vAlign = "top";
__id1_.antiAliasType = "advanced";
__id1_.glowBlur = 3;
__id1_.glowColor = 0;
__id1_.useGlowFilter = false;
__id1_.glowQuality = 1;
__id1_.glowStrength = 5;
__id1_.gridFitType = "pixel";
__id1_.italic = false;
__id1_.selectable = false;
__id1_.underline = false;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function hidePopUp():void{
popup.visible = false;
}
private function onAWOver(_arg1:MouseEvent):void{
var _local2:MovieClip;
if (partWindow.activePart){
partDrag = IPhysics(partWindow.activePart.cloneMC());
_local2 = MovieClip(partDrag);
if (!isDraging){
_local2.mouseEnabled = false;
_local2.transform.colorTransform = canDeployColor;
_local2.x = _arg1.stageX;
_local2.y = _arg1.stageY;
addChild(_local2);
isDraging = true;
};
};
}
private function onAWOut(_arg1:MouseEvent):void{
if (isDraging){
removeChild(MovieClip(partDrag));
isDraging = false;
};
}
private function suBtnOver(_arg1:MouseEvent):void{
isScrollUp = true;
trackAnimTimer.start();
}
private function letsRoll(_arg1:TimerEvent):void{
rollTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, letsRoll);
stopPhysicsTimer.addEventListener(TimerEvent.TIMER_COMPLETE, stopPhysics, false, 0, true);
if (gs.currentCore){
trace("lets roll!");
physics.world.main.addEventListener(Event.ENTER_FRAME, physicsRender, false, 0, true);
stuckTimer.addEventListener(TimerEvent.TIMER, stuckChecker, false, 0, true);
stuckTimer.start();
} else {
trace("dead on arrival");
layers[3].addChild(new CResultScreen(gs.isWin));
};
}
private function animateTrack():void{
tps = (tempPartTrack.highlights.length - 1);
tpc = 0;
tsc = 0;
trackAnimTimer.addEventListener(TimerEvent.TIMER, scrollTrack, false, 0, true);
trackAnimTimer.start();
idleTimeBeforeNextScroll.addEventListener(TimerEvent.TIMER_COMPLETE, nextScroll, false, 0, true);
}
private function soBtnClick(_arg1:MouseEvent):void{
startOver();
}
private function onAW2Click(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:Object;
var _local4:int;
var _local5:Object;
var _local6:int;
var _local7:Object;
var _local8:int;
_local2 = (partWindow.activePart == null);
if (_local2){
_local3 = _arg1.target;
if ((_local3 is IPart)){
_local4 = 0;
while (_local4 < partWindow.parts.length) {
if (((partWindow.parts[_local4].isUsed) && ((MovieClip(_local3).constructor == MovieClip(partWindow.parts[_local4]).constructor)))){
if ((_local3 is ICoreContainer)){
_local5 = MovieClip(_local3);
_local6 = 0;
while (_local6 < _local5.numChildren) {
if ((_local5.getChildAt(_local6) is ICore)){
_local7 = _local5.getChildAt(_local6);
_local8 = 0;
while (_local8 < partWindow.parts.length) {
if (((partWindow.parts[_local8].isUsed) && ((MovieClip(_local7).constructor == MovieClip(partWindow.parts[_local8]).constructor)))){
partWindow.parts[_local8].isUsed = false;
gs.isCoreDeployed = false;
};
_local8++;
};
};
_local6++;
};
assemblyWindow.removeChild(MovieClip(_local3));
} else {
assemblyWindow.removeChild(MovieClip(_local3));
};
partWindow.parts[_local4].isUsed = false;
partWindow.updateSlots25();
partWindow.activePart = partWindow.parts[_local4];
gs.canDeploy = true;
disableMouseForAllPartDeployed();
};
_local4++;
};
};
};
}
private function init():void{
var _local1:uint;
_local1 = 0;
while (_local1 < 4) {
layers[_local1] = new Sprite();
this.addChild(layers[_local1]);
_local1++;
};
layers[1].addChild(physicsLayer);
layers[2].addChild(skipBtn);
layers[2].addChild(goBtn);
layers[2].addChild(optBtn);
layers[2].addChild(asmBtn);
layers[2].addChild(vtmBtn);
layers[2].addChild(suBtn);
layers[2].addChild(sdBtn);
layers[2].addChild(slBtn);
layers[2].addChild(srBtn);
layers[2].addChild(soBtn);
layers[2].addChild(spBtn);
layers[2].addChild(giveUpBtn);
layers[3].addChild(popup);
spBtn.visible = false;
initPopUp();
windowSetting();
disableScrolling();
trackInit();
layers[3].addChild(new CLevelIntroScreen(gs.levelData.levels[gs.currentLevel].levelName, gs.levelData.levels[gs.currentLevel].levelDescription));
eo.addEventListener("play mode on", playOn, false, 0, true);
}
private function trackInit():void{
tempPartTrack = (gs.currentTrack as MovieClip);
trackRightLimit = -((tempPartTrack.cam.width - this.width));
trackDownLimit = -((tempPartTrack.cam.height - this.height));
ip = new Point(tempPartTrack.highlightPoints[0].x, tempPartTrack.highlightPoints[0].y);
if (ip.x > trackLeftLimit){
ip.x = trackLeftLimit;
};
if (ip.x < trackRightLimit){
ip.x = trackRightLimit;
};
if (ip.y > trackUpLimit){
ip.y = trackUpLimit;
};
if (ip.y < trackDownLimit){
ip.y = trackDownLimit;
};
tempPartTrack.x = ip.x;
tempPartTrack.y = ip.y;
layers[0].addChild(tempPartTrack);
fp = new Point(tempPartTrack.highlightPoints[(tempPartTrack.highlightPoints.length - 1)].x, tempPartTrack.highlightPoints[(tempPartTrack.highlightPoints.length - 1)].y);
if (fp.x > trackLeftLimit){
fp.x = trackLeftLimit;
};
if (fp.x < trackRightLimit){
fp.x = trackRightLimit;
};
if (fp.y > trackUpLimit){
fp.y = trackUpLimit;
};
if (fp.y < trackDownLimit){
fp.y = trackDownLimit;
};
calculateScrolling(tempPartTrack);
}
private function vtmBtnClick(_arg1:MouseEvent):void{
viewTrackMode();
}
private function RollOver(_arg1:MouseEvent):void{
if (_arg1.currentTarget == skipBtn){
obj = this["root"].getChildByName("txSkip");
obj.visible = true;
} else {
if (_arg1.currentTarget == goBtn){
obj = this["root"].getChildByName("txGo");
obj.visible = true;
} else {
if (_arg1.currentTarget == optBtn){
obj = this["root"].getChildByName("txOption");
obj.visible = true;
} else {
if (_arg1.currentTarget == asmBtn){
obj = this["root"].getChildByName("txAsmbly");
obj.visible = true;
} else {
if (_arg1.currentTarget == vtmBtn){
obj = this["root"].getChildByName("txView");
obj.visible = true;
} else {
if (_arg1.currentTarget == soBtn){
obj = this["root"].getChildByName("txStart");
obj.visible = true;
} else {
if (_arg1.currentTarget == giveUpBtn){
obj = this["root"].getChildByName("txGiveup");
obj.visible = true;
};
};
};
};
};
};
};
}
private function generateVehicleParts():void{
var _local1:uint;
gs.vehicleParts = new Array();
_local1 = 0;
while (_local1 < gs.vehicleSkins.length) {
gs.vehicleParts[_local1] = gs.vehicleSkins[_local1].body;
_local1++;
};
}
private function skipBtnClick(_arg1:MouseEvent):void{
skipBtn.visible = false;
trackAnimTimer.removeEventListener(TimerEvent.TIMER, scrollTrack);
assemblyMode();
}
private function calculateScrolling(_arg1:Object):Boolean{
var _local2:uint;
_local2 = _arg1.highlightIndex;
if (_local2 == (_arg1.highlights.length - 1)){
return (false);
};
np = new Point(_arg1.highlightPoints[(_local2 + 1)].x, _arg1.highlightPoints[(_local2 + 1)].y);
if (np.x > trackLeftLimit){
np.x = trackLeftLimit;
};
if (np.x < trackRightLimit){
np.x = trackRightLimit;
};
if (np.y > trackUpLimit){
np.y = trackUpLimit;
};
if (np.y < trackDownLimit){
np.y = trackDownLimit;
};
dd = Math.sqrt(((Math.abs((np.x - ip.x)) * Math.abs((np.x - ip.x))) + (Math.abs((np.y - ip.y)) * Math.abs((np.y - ip.y)))));
tts = uint((dd / trackScrollPixelStep));
dx = (Math.abs((np.x - ip.x)) / tts);
dy = (Math.abs((np.y - ip.y)) / tts);
_arg1.highlightIndex++;
return (true);
}
private function drawVehicle():void{
var _local1:Array;
_local1 = assemblyWindow.clone(physicsLayer);
if (gs.isCoreDeployed){
physicsLayer.generateVehicleSkins();
};
physics.addBody(_local1);
if (gs.isCoreDeployed){
generateVehicleParts();
};
}
private function giveUpClick(_arg1:MouseEvent):void{
obj = this["root"].getChildByName("txGiveup");
obj.visible = false;
destroy();
gs.isLoseAndRetry = true;
eo.dispatchEvent(new Event(CScreenManager.PLAY_SCREEN));
}
private function RollOut(_arg1:MouseEvent):void{
if (_arg1.currentTarget == null){
return;
};
if (_arg1.currentTarget == skipBtn){
obj = this["root"].getChildByName("txSkip");
obj.visible = false;
} else {
if (_arg1.currentTarget == goBtn){
obj = this["root"].getChildByName("txGo");
obj.visible = false;
} else {
if (_arg1.currentTarget == optBtn){
obj = this["root"].getChildByName("txOption");
obj.visible = false;
} else {
if (_arg1.currentTarget == asmBtn){
obj = this["root"].getChildByName("txAsmbly");
obj.visible = false;
} else {
if (_arg1.currentTarget == vtmBtn){
obj = this["root"].getChildByName("txView");
obj.visible = false;
} else {
if (_arg1.currentTarget == soBtn){
obj = this["root"].getChildByName("txStart");
obj.visible = false;
} else {
if (_arg1.currentTarget == giveUpBtn){
obj = this["root"].getChildByName("txGiveup");
obj.visible = false;
};
};
};
};
};
};
};
}
function __setProp___id4__CPlayScreen_Layer18_1(){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_.text = "{txt_scroll}";
__id4_.textColor = 9219623;
__id4_.textSize = 12;
__id4_.bold = false;
__id4_.disableWordwrap = false;
__id4_.embedFonts = true;
__id4_.font = "Arial";
__id4_.hAlign = "center";
__id4_.multiline = false;
__id4_.vAlign = "top";
__id4_.antiAliasType = "advanced";
__id4_.glowBlur = 3;
__id4_.glowColor = 0;
__id4_.useGlowFilter = false;
__id4_.glowQuality = 1;
__id4_.glowStrength = 5;
__id4_.gridFitType = "pixel";
__id4_.italic = false;
__id4_.selectable = false;
__id4_.underline = false;
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id2__CPlayScreen_Layer18_1(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.text = "{txt_scroll}";
__id2_.textColor = 9219623;
__id2_.textSize = 12;
__id2_.bold = false;
__id2_.disableWordwrap = false;
__id2_.embedFonts = true;
__id2_.font = "Arial";
__id2_.hAlign = "center";
__id2_.multiline = false;
__id2_.vAlign = "top";
__id2_.antiAliasType = "advanced";
__id2_.glowBlur = 3;
__id2_.glowColor = 0;
__id2_.useGlowFilter = false;
__id2_.glowQuality = 1;
__id2_.glowStrength = 5;
__id2_.gridFitType = "pixel";
__id2_.italic = false;
__id2_.selectable = false;
__id2_.underline = false;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function enableMouseForAllPartDeployed():void{
var _local1:int;
_local1 = 0;
while (_local1 < assemblyWindow.numChildren) {
if ((assemblyWindow.getChildAt(_local1) is IPart)){
MovieClip(assemblyWindow.getChildAt(_local1)).mouseEnabled = true;
};
_local1++;
};
}
private function initPopUp():void{
popup.visible = false;
popup.okBtn.addEventListener(MouseEvent.CLICK, onPopUpOkBtn, false, 0, true);
}
private function nextScroll(_arg1:TimerEvent):void{
ip = np;
tpc++;
tsc = 0;
calculateScrolling(tempPartTrack);
trackAnimTimer.start();
}
private function resetStuckChecker():void{
xDatas = new Array();
}
private function uniqueForPuzzleModeOnly(_arg1:MouseEvent):void{
var _local2:uint;
if (gs.isPuzzleMode){
_local2 = 0;
while (_local2 < partWindow.parts.length) {
if (partWindow.parts[_local2] == partWindow.activePart){
partWindow.parts[_local2].isUsed = true;
break;
};
_local2++;
};
partWindow.updateSlots25();
partWindow.nullifyActivePart(_arg1);
} else {
onAWOver(_arg1);
};
}
private function sBtnOut(_arg1:MouseEvent):void{
isScrollLeft = false;
isScrollRight = false;
isScrollUp = false;
isScrollDown = false;
trackAnimTimer.stop();
}
private function goBtnClick(_arg1:MouseEvent):void{
if (gs.isCoreDeployed){
goBtn.visible = false;
optBtn.visible = false;
soBtn.visible = false;
vtmBtn.visible = false;
assemblyWindow.visible = false;
partWindow.visible = false;
giveUpBtn.visible = true;
saveLastCrafted();
physicsThings();
rollTimer.addEventListener(TimerEvent.TIMER_COMPLETE, letsRoll, false, 0, true);
rollTimer.start();
} else {
showPopUp();
};
}
private function enableScrolling():void{
suBtn.visible = true;
sdBtn.visible = true;
slBtn.visible = true;
srBtn.visible = true;
suBtn.addEventListener(MouseEvent.MOUSE_OVER, suBtnOver, false, 0, true);
sdBtn.addEventListener(MouseEvent.MOUSE_OVER, sdBtnOver, false, 0, true);
slBtn.addEventListener(MouseEvent.MOUSE_OVER, slBtnOver, false, 0, true);
srBtn.addEventListener(MouseEvent.MOUSE_OVER, srBtnOver, false, 0, true);
suBtn.addEventListener(MouseEvent.MOUSE_OUT, sBtnOut, false, 0, true);
sdBtn.addEventListener(MouseEvent.MOUSE_OUT, sBtnOut, false, 0, true);
slBtn.addEventListener(MouseEvent.MOUSE_OUT, sBtnOut, false, 0, true);
srBtn.addEventListener(MouseEvent.MOUSE_OUT, sBtnOut, false, 0, true);
trackAnimTimer.addEventListener(TimerEvent.TIMER, onScroll, false, 0, true);
}
private function onAWMove(_arg1:MouseEvent):Boolean{
var _local2:uint;
if (isDraging){
MovieClip(partDrag).x = _arg1.stageX;
MovieClip(partDrag).y = _arg1.stageY;
_local2 = 0;
while (_local2 < assemblyWindow.numChildren) {
if (!(partDrag is IOverlapingPart)){
if ((assemblyWindow.getChildAt(_local2) is IPart)){
tempPart = (assemblyWindow.getChildAt(_local2) as MovieClip);
if (tempPart.hitTestObject(MovieClip(partDrag))){
if (!(tempPart is IOverlapingPart)){
gs.canDeploy = false;
MovieClip(partDrag).transform.colorTransform = cantDeployColor;
return (false);
};
gs.canDeploy = true;
} else {
gs.canDeploy = true;
};
MovieClip(partDrag).transform.colorTransform = canDeployColor;
};
} else {
if ((((partDrag is ICore)) && (!(gs.isCoreDeployed)))){
tempPart = (assemblyWindow.getChildAt(_local2) as MovieClip);
MovieClip(partDrag).transform.colorTransform = cantDeployColor;
if ((tempPart is ICoreContainer)){
if (tempPart.hitTestObject(MovieClip(partDrag))){
MovieClip(partDrag).x = (tempPart.x + tempPart.parent.x);
MovieClip(partDrag).y = (tempPart.y + tempPart.parent.y);
MovieClip(partDrag).transform.colorTransform = canDeployColor;
gs.canDeploy = true;
return (false);
};
gs.canDeploy = false;
} else {
gs.canDeploy = false;
};
} else {
if ((((partDrag is ICore)) && (gs.isCoreDeployed))){
gs.canDeploy = false;
MovieClip(partDrag).transform.colorTransform = cantDeployColor;
} else {
tempPart = (assemblyWindow.getChildAt(_local2) as MovieClip);
if ((tempPart is ITirePart)){
if (tempPart.hitTestObject(MovieClip(partDrag))){
gs.canDeploy = false;
MovieClip(partDrag).transform.colorTransform = cantDeployColor;
return (false);
};
gs.canDeploy = true;
MovieClip(partDrag).transform.colorTransform = canDeployColor;
} else {
if ((tempPart is IJoint)){
if (tempPart.hitTestObject(MovieClip(partDrag))){
gs.canDeploy = false;
MovieClip(partDrag).transform.colorTransform = cantDeployColor;
return (false);
};
gs.canDeploy = true;
MovieClip(partDrag).transform.colorTransform = canDeployColor;
};
};
};
};
};
_local2++;
};
};
return (true);
}
private function showPopUp():void{
popup.visible = true;
}
private function scanTargets():Boolean{
var _local1:int;
l = gs.targets.length;
if (l == 0){
gs.isTargetDetected = false;
return (false);
};
v = (gs.currentCorePartBody.x * 30);
_local1 = 0;
while (_local1 < l) {
d = gs.targets[_local1].x;
if ((d - v) < gs.FIRING_RANGE){
itd[_local1] = true;
if ((gs.targets[_local1] is IFoe)){
if ((d - v) > 0){
gs.targets[_local1].canFire = true;
} else {
gs.targets[_local1].canFire = false;
};
};
} else {
itd[_local1] = false;
};
_local1++;
};
gs.isTargetDetected = false;
_local1 = 0;
while (_local1 < l) {
gs.isTargetDetected = ((gs.isTargetDetected) || (itd[_local1]));
_local1++;
};
return (true);
}
private function sdBtnOver(_arg1:MouseEvent):void{
isScrollDown = true;
trackAnimTimer.start();
}
private function onScroll(_arg1:TimerEvent):void{
if (isScrollLeft){
tempPartTrack.x = (tempPartTrack.x + trackScrollPixelStep);
if (tempPartTrack.x > trackLeftLimit){
tempPartTrack.x = trackLeftLimit;
};
};
if (isScrollRight){
tempPartTrack.x = (tempPartTrack.x - trackScrollPixelStep);
if (tempPartTrack.x < trackRightLimit){
tempPartTrack.x = trackRightLimit;
};
};
if (isScrollUp){
tempPartTrack.y = (tempPartTrack.y + trackScrollPixelStep);
if (tempPartTrack.y > trackUpLimit){
tempPartTrack.y = trackUpLimit;
};
};
if (isScrollDown){
tempPartTrack.y = (tempPartTrack.y - trackScrollPixelStep);
if (tempPartTrack.y < trackDownLimit){
tempPartTrack.y = trackDownLimit;
};
};
}
private function stopPhysics(_arg1:TimerEvent):void{
physics.stop();
stuckTimer.removeEventListener(TimerEvent.TIMER, stuckChecker);
layers[3].addChild(new CResultScreen(gs.isWin));
}
private function disableScrolling():void{
suBtn.visible = false;
sdBtn.visible = false;
slBtn.visible = false;
srBtn.visible = false;
if (suBtn.hasEventListener(MouseEvent.MOUSE_OVER)){
suBtn.removeEventListener(MouseEvent.MOUSE_OVER, suBtnOver);
sdBtn.removeEventListener(MouseEvent.MOUSE_OVER, sdBtnOver);
slBtn.removeEventListener(MouseEvent.MOUSE_OVER, slBtnOver);
srBtn.removeEventListener(MouseEvent.MOUSE_OVER, srBtnOver);
suBtn.removeEventListener(MouseEvent.MOUSE_OUT, sBtnOut);
sdBtn.removeEventListener(MouseEvent.MOUSE_OUT, sBtnOut);
slBtn.removeEventListener(MouseEvent.MOUSE_OUT, sBtnOut);
srBtn.removeEventListener(MouseEvent.MOUSE_OUT, sBtnOut);
trackAnimTimer.removeEventListener(TimerEvent.TIMER, onScroll);
};
}
private function saveLastCrafted():void{
var _local1:Array;
var _local2:int;
var _local3:Object;
_local1 = new Array();
_local2 = 0;
while (_local2 < assemblyWindow.numChildren) {
if ((assemblyWindow.getChildAt(_local2) is IPart)){
_local3 = new Object();
_local3.partClass = MovieClip(assemblyWindow.getChildAt(_local2)).constructor;
_local3.x = assemblyWindow.getChildAt(_local2).x;
_local3.y = assemblyWindow.getChildAt(_local2).y;
_local1.push(_local3);
};
_local2++;
};
gs.lastCrafted = _local1;
}
private function srBtnOver(_arg1:MouseEvent):void{
isScrollRight = true;
trackAnimTimer.start();
}
public function destroy():void{
if (eo.hasEventListener("play mode on")){
eo.removeEventListener("play mode on", playOn);
};
if (physics){
if (physics.world.main.hasEventListener(Event.ENTER_FRAME)){
physics.world.main.removeEventListener(Event.ENTER_FRAME, physicsRender);
};
};
if (suBtn.hasEventListener(MouseEvent.MOUSE_OVER)){
suBtn.removeEventListener(MouseEvent.MOUSE_OVER, suBtnOver);
sdBtn.removeEventListener(MouseEvent.MOUSE_OVER, sdBtnOver);
slBtn.removeEventListener(MouseEvent.MOUSE_OVER, slBtnOver);
srBtn.removeEventListener(MouseEvent.MOUSE_OVER, srBtnOver);
};
if (contacts){
if (contacts.hasEventListener(QuickContacts.ADD)){
contacts.removeEventListener(QuickContacts.ADD, onAdd);
};
};
if (trackAnimTimer.hasEventListener(TimerEvent.TIMER)){
trackAnimTimer.removeEventListener(TimerEvent.TIMER, scrollTrack);
idleTimeBeforeNextScroll.removeEventListener(TimerEvent.TIMER_COMPLETE, nextScroll);
};
if (stuckTimer.hasEventListener(TimerEvent.TIMER)){
stuckTimer.stop();
stuckTimer.removeEventListener(TimerEvent.TIMER, stuckChecker);
};
}
}
}//package script.screen
Section 208
//CResultScreen (script.screen.CResultScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
public class CResultScreen extends MovieClip {
public var replayBtn:SimpleButton;
public var obj:Object;
private var gs:CGameSession;
public var nextBtn:SimpleButton;
private var isWin:Boolean;
public var menuBtn:SimpleButton;
public var failNotice:MovieClip;
public var retryBtn:SimpleButton;
private var eo:CEventOrganizer;
public static const WIN:Boolean = true;
public static const LOSE:Boolean = false;
public function CResultScreen(_arg1:Boolean):void{
eo = CEventOrganizer.getInstance();
gs = CGameSession.getInstance();
super();
addFrameScript(0, frame1, 1, frame2);
this.isWin = _arg1;
if (_arg1){
gotoAndStop(2);
trace(("pusk" + gs.currentLevel));
} else {
gotoAndStop(1);
};
}
private function onNextClick(_arg1:MouseEvent):void{
this["root"].getChildByName("txReplay").visible = false;
this["root"].getChildByName("txNext").visible = false;
replayBtn.removeEventListener(MouseEvent.CLICK, onReplayClick);
nextBtn.removeEventListener(MouseEvent.CLICK, onNextClick);
if (gs.currentLevel != gs.MAX_LEVEL){
gs.currentLevel++;
gs.isLoseAndRetry = false;
gs.updateGameData();
eo.dispatchEvent(new Event(CScreenManager.PLAY_SCREEN));
} else {
eo.dispatchEvent(new Event(CScreenManager.END_SCREEN));
};
}
function frame1(){
this["root"].getChildByName("txMain").visible = true;
this["root"].getChildByName("txRetry").visible = true;
menuBtn.addEventListener(MouseEvent.CLICK, onMenuClick, false, 0, true);
retryBtn.addEventListener(MouseEvent.CLICK, onRetryClick, false, 0, true);
}
private function onMenuClick(_arg1:MouseEvent):void{
this["root"].getChildByName("txMain").visible = false;
this["root"].getChildByName("txRetry").visible = false;
menuBtn.removeEventListener(MouseEvent.CLICK, onMenuClick);
retryBtn.removeEventListener(MouseEvent.CLICK, onRetryClick);
IScreen(this.parent.parent).destroy();
eo.dispatchEvent(new Event(CScreenManager.MENU_SCREEN));
}
function frame2(){
if (gs.currentLevel == 1){
this["root"].ConnectSpil("award1");
} else {
if (gs.currentLevel == 12){
this["root"].ConnectSpil("award2");
};
};
if (gs.currentLevel == 25){
this["root"].ConnectSpil("award3");
};
this["root"].getChildByName("txReplay").visible = true;
this["root"].getChildByName("txNext").visible = true;
replayBtn.addEventListener(MouseEvent.CLICK, onReplayClick, false, 0, true);
nextBtn.addEventListener(MouseEvent.CLICK, onNextClick, false, 0, true);
}
private function onReplayClick(_arg1:MouseEvent):void{
this["root"].getChildByName("txReplay").visible = false;
this["root"].getChildByName("txNext").visible = false;
replayBtn.removeEventListener(MouseEvent.CLICK, onReplayClick);
nextBtn.removeEventListener(MouseEvent.CLICK, onNextClick);
gs.isLoseAndRetry = true;
eo.dispatchEvent(new Event(CScreenManager.PLAY_SCREEN));
}
private function onRetryClick(_arg1:MouseEvent):void{
this["root"].getChildByName("txMain").visible = false;
this["root"].getChildByName("txRetry").visible = false;
menuBtn.removeEventListener(MouseEvent.CLICK, onMenuClick);
retryBtn.removeEventListener(MouseEvent.CLICK, onRetryClick);
IScreen(this.parent.parent).destroy();
gs.isLoseAndRetry = true;
eo.dispatchEvent(new Event(CScreenManager.PLAY_SCREEN));
}
}
}//package script.screen
Section 209
//CSettingScreen (script.screen.CSettingScreen)
package script.screen {
import flash.events.*;
import flash.display.*;
import script.engine.*;
import spill.localisation.*;
import script.windows.*;
public class CSettingScreen extends MovieClip {
public var __id17_:LocalizedTextField;
public var __id18_:LocalizedTextField;
public var bg:MovieClip;
public var __id19_:LocalizedTextField;
private var ss:CSoundManager;
public var lowBtn:SimpleButton;
public var hintBtn:SimpleButton;
public var offBtn:SimpleButton;
public var menuBtn:SimpleButton;
public var modal:MovieClip;
public var hintDialog:CHintDialog;
private var eo:CEventOrganizer;
public var mcSoundSelected:MovieClip;
private var gs:CGameSession;
public var resumeBtn:SimpleButton;
public var loc1:LocalizedTextField;
public var loc3:LocalizedTextField;
public var medBtn:SimpleButton;
public var loc2:LocalizedTextField;
public var mcDisplaySelected:MovieClip;
public var highBtn:SimpleButton;
public var __id12_:LocalizedTextField;
public var __id13_:LocalizedTextField;
public var __id14_:LocalizedTextField;
public var __id15_:LocalizedTextField;
public var backBtn:SimpleButton;
public var onBtn:SimpleButton;
public var __id16_:LocalizedTextField;
public function CSettingScreen():void{
gs = CGameSession.getInstance();
eo = CEventOrganizer.getInstance();
ss = CSoundManager.getInstance();
super();
hintDialog.hide();
backBtn.addEventListener(MouseEvent.CLICK, backBtnClick, false, 0, true);
hintBtn.addEventListener(MouseEvent.CLICK, hintBtnClick, false, 0, true);
menuBtn.addEventListener(MouseEvent.CLICK, menuBtnClick, false, 0, true);
resumeBtn.addEventListener(MouseEvent.CLICK, backBtnClick, false, 0, true);
mcDisplaySelected.x = highBtn.x;
mcDisplaySelected.y = highBtn.y;
lowBtn.addEventListener(MouseEvent.CLICK, onLowBtnClick, false, 0, true);
medBtn.addEventListener(MouseEvent.CLICK, onMediumBtnClick, false, 0, true);
highBtn.addEventListener(MouseEvent.CLICK, onHighBtnClick, false, 0, true);
mcSoundSelected.x = onBtn.x;
mcSoundSelected.y = onBtn.y;
onBtn.addEventListener(MouseEvent.CLICK, onOnBtnClick, false, 0, true);
offBtn.addEventListener(MouseEvent.CLICK, onOffBtnClick, false, 0, true);
__setProp___id19__CSettingScreen_Layer7_1();
__setProp___id13__CSettingScreen_Layer7_1();
__setProp_loc1_CSettingScreen_Layer7_1();
__setProp___id18__CSettingScreen_Layer7_1();
__setProp___id16__CSettingScreen_Layer7_1();
__setProp___id17__CSettingScreen_Layer7_1();
__setProp___id14__CSettingScreen_Layer7_1();
__setProp___id12__CSettingScreen_Layer7_1();
__setProp_loc3_CSettingScreen_Layer7_1();
__setProp_loc2_CSettingScreen_Layer7_1();
__setProp___id15__CSettingScreen_Layer7_1();
}
function __setProp___id16__CSettingScreen_Layer7_1(){
try {
__id16_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id16_.text = "{txt_display}";
__id16_.textColor = 0xFF00;
__id16_.textSize = 12;
__id16_.bold = false;
__id16_.disableWordwrap = false;
__id16_.embedFonts = true;
__id16_.font = "Times New Roman";
__id16_.hAlign = "right";
__id16_.multiline = false;
__id16_.vAlign = "top";
__id16_.antiAliasType = "advanced";
__id16_.glowBlur = 3;
__id16_.glowColor = 0;
__id16_.useGlowFilter = false;
__id16_.glowQuality = 1;
__id16_.glowStrength = 5;
__id16_.gridFitType = "pixel";
__id16_.italic = false;
__id16_.selectable = false;
__id16_.underline = false;
try {
__id16_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_loc2_CSettingScreen_Layer7_1(){
try {
loc2["componentInspectorSetting"] = true;
} catch(e:Error) {
};
loc2.text = "{btn_backtomenu}";
loc2.textColor = 0xFF;
loc2.textSize = 12;
loc2.bold = false;
loc2.disableWordwrap = false;
loc2.embedFonts = true;
loc2.font = "Times New Roman";
loc2.hAlign = "center";
loc2.multiline = false;
loc2.vAlign = "top";
loc2.antiAliasType = "advanced";
loc2.glowBlur = 3;
loc2.glowColor = 0;
loc2.useGlowFilter = false;
loc2.glowQuality = 1;
loc2.glowStrength = 5;
loc2.gridFitType = "pixel";
loc2.italic = false;
loc2.selectable = false;
loc2.underline = false;
try {
loc2["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id18__CSettingScreen_Layer7_1(){
try {
__id18_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id18_.text = "{txt_medium}";
__id18_.textColor = 0xFF;
__id18_.textSize = 12;
__id18_.bold = false;
__id18_.disableWordwrap = false;
__id18_.embedFonts = true;
__id18_.font = "Times New Roman";
__id18_.hAlign = "center";
__id18_.multiline = false;
__id18_.vAlign = "top";
__id18_.antiAliasType = "advanced";
__id18_.glowBlur = 3;
__id18_.glowColor = 0;
__id18_.useGlowFilter = false;
__id18_.glowQuality = 1;
__id18_.glowStrength = 5;
__id18_.gridFitType = "pixel";
__id18_.italic = false;
__id18_.selectable = false;
__id18_.underline = false;
try {
__id18_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function playMoreBtnClick(_arg1:MouseEvent):void{
}
private function hintBtnClick(_arg1:MouseEvent):void{
hintDialog.show();
}
private function backBtnClick(_arg1:MouseEvent):void{
hide();
}
private function onLowBtnClick(_arg1:MouseEvent):void{
stage.quality = StageQuality.LOW;
mcDisplaySelected.x = lowBtn.x;
mcDisplaySelected.y = lowBtn.y;
}
function __setProp___id13__CSettingScreen_Layer7_1(){
try {
__id13_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id13_.text = "{txt_off}";
__id13_.textColor = 0xFF;
__id13_.textSize = 12;
__id13_.bold = false;
__id13_.disableWordwrap = false;
__id13_.embedFonts = true;
__id13_.font = "Times New Roman";
__id13_.hAlign = "center";
__id13_.multiline = false;
__id13_.vAlign = "top";
__id13_.antiAliasType = "advanced";
__id13_.glowBlur = 3;
__id13_.glowColor = 0;
__id13_.useGlowFilter = false;
__id13_.glowQuality = 1;
__id13_.glowStrength = 5;
__id13_.gridFitType = "pixel";
__id13_.italic = false;
__id13_.selectable = false;
__id13_.underline = false;
try {
__id13_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onOnBtnClick(_arg1:MouseEvent):void{
ss.bgmVol = 1;
gs.isSoundOn = true;
mcSoundSelected.x = onBtn.x;
mcSoundSelected.y = onBtn.y;
}
private function onMediumBtnClick(_arg1:MouseEvent):void{
stage.quality = StageQuality.MEDIUM;
mcDisplaySelected.x = medBtn.x;
mcDisplaySelected.y = medBtn.y;
}
function __setProp___id15__CSettingScreen_Layer7_1(){
try {
__id15_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id15_.text = "{txt_options}";
__id15_.textColor = 0xFF00;
__id15_.textSize = 12;
__id15_.bold = false;
__id15_.disableWordwrap = false;
__id15_.embedFonts = true;
__id15_.font = "Times New Roman";
__id15_.hAlign = "center";
__id15_.multiline = false;
__id15_.vAlign = "top";
__id15_.antiAliasType = "advanced";
__id15_.glowBlur = 3;
__id15_.glowColor = 0;
__id15_.useGlowFilter = false;
__id15_.glowQuality = 1;
__id15_.glowStrength = 5;
__id15_.gridFitType = "pixel";
__id15_.italic = false;
__id15_.selectable = false;
__id15_.underline = false;
try {
__id15_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function show(_arg1:Boolean=false):void{
if (_arg1){
bg.visible = false;
modal.visible = true;
hintBtn.visible = true;
menuBtn.visible = true;
resumeBtn.visible = true;
loc1.visible = true;
loc2.visible = true;
loc3.visible = true;
} else {
bg.visible = true;
modal.visible = false;
hintBtn.visible = false;
menuBtn.visible = false;
resumeBtn.visible = false;
loc1.visible = false;
loc2.visible = false;
loc3.visible = false;
};
this.visible = true;
}
private function menuBtnClick(_arg1:MouseEvent):void{
gs.isLoseAndRetry = false;
eo.dispatchEvent(new Event(CScreenManager.MENU_SCREEN));
hide();
}
function __setProp___id17__CSettingScreen_Layer7_1(){
try {
__id17_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id17_.text = "{txt_sound}";
__id17_.textColor = 0xFF00;
__id17_.textSize = 12;
__id17_.bold = false;
__id17_.disableWordwrap = false;
__id17_.embedFonts = true;
__id17_.font = "Times New Roman";
__id17_.hAlign = "right";
__id17_.multiline = false;
__id17_.vAlign = "top";
__id17_.antiAliasType = "advanced";
__id17_.glowBlur = 3;
__id17_.glowColor = 0;
__id17_.useGlowFilter = false;
__id17_.glowQuality = 1;
__id17_.glowStrength = 5;
__id17_.gridFitType = "pixel";
__id17_.italic = false;
__id17_.selectable = false;
__id17_.underline = false;
try {
__id17_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_loc1_CSettingScreen_Layer7_1(){
try {
loc1["componentInspectorSetting"] = true;
} catch(e:Error) {
};
loc1.text = "{btn_hint}";
loc1.textColor = 0xFF;
loc1.textSize = 12;
loc1.bold = false;
loc1.disableWordwrap = false;
loc1.embedFonts = true;
loc1.font = "Times New Roman";
loc1.hAlign = "center";
loc1.multiline = false;
loc1.vAlign = "top";
loc1.antiAliasType = "advanced";
loc1.glowBlur = 3;
loc1.glowColor = 0;
loc1.useGlowFilter = false;
loc1.glowQuality = 1;
loc1.glowStrength = 5;
loc1.gridFitType = "pixel";
loc1.italic = false;
loc1.selectable = false;
loc1.underline = false;
try {
loc1["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_loc3_CSettingScreen_Layer7_1(){
try {
loc3["componentInspectorSetting"] = true;
} catch(e:Error) {
};
loc3.text = "{txt_resume}";
loc3.textColor = 0xFF;
loc3.textSize = 12;
loc3.bold = false;
loc3.disableWordwrap = false;
loc3.embedFonts = true;
loc3.font = "Times New Roman";
loc3.hAlign = "center";
loc3.multiline = false;
loc3.vAlign = "top";
loc3.antiAliasType = "advanced";
loc3.glowBlur = 3;
loc3.glowColor = 0;
loc3.useGlowFilter = false;
loc3.glowQuality = 1;
loc3.glowStrength = 5;
loc3.gridFitType = "pixel";
loc3.italic = false;
loc3.selectable = false;
loc3.underline = false;
try {
loc3["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function hide():void{
this.visible = false;
}
function __setProp___id19__CSettingScreen_Layer7_1(){
try {
__id19_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id19_.text = "{txt_low}";
__id19_.textColor = 0xFF;
__id19_.textSize = 12;
__id19_.bold = false;
__id19_.disableWordwrap = false;
__id19_.embedFonts = true;
__id19_.font = "Times New Roman";
__id19_.hAlign = "center";
__id19_.multiline = false;
__id19_.vAlign = "top";
__id19_.antiAliasType = "advanced";
__id19_.glowBlur = 3;
__id19_.glowColor = 0;
__id19_.useGlowFilter = false;
__id19_.glowQuality = 1;
__id19_.glowStrength = 5;
__id19_.gridFitType = "pixel";
__id19_.italic = false;
__id19_.selectable = false;
__id19_.underline = false;
try {
__id19_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id12__CSettingScreen_Layer7_1(){
try {
__id12_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id12_.text = "{txt_on}";
__id12_.textColor = 0xFF;
__id12_.textSize = 12;
__id12_.bold = false;
__id12_.disableWordwrap = false;
__id12_.embedFonts = true;
__id12_.font = "Times New Roman";
__id12_.hAlign = "center";
__id12_.multiline = false;
__id12_.vAlign = "top";
__id12_.antiAliasType = "advanced";
__id12_.glowBlur = 3;
__id12_.glowColor = 0;
__id12_.useGlowFilter = false;
__id12_.glowQuality = 1;
__id12_.glowStrength = 5;
__id12_.gridFitType = "pixel";
__id12_.italic = false;
__id12_.selectable = false;
__id12_.underline = false;
try {
__id12_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
private function onOffBtnClick(_arg1:MouseEvent):void{
ss.bgmVol = 0;
gs.isSoundOn = false;
mcSoundSelected.x = offBtn.x;
mcSoundSelected.y = offBtn.y;
}
private function onHighBtnClick(_arg1:MouseEvent):void{
stage.quality = StageQuality.BEST;
mcDisplaySelected.x = highBtn.x;
mcDisplaySelected.y = highBtn.y;
}
function __setProp___id14__CSettingScreen_Layer7_1(){
try {
__id14_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id14_.text = "{txt_high}";
__id14_.textColor = 0xFF;
__id14_.textSize = 12;
__id14_.bold = false;
__id14_.disableWordwrap = false;
__id14_.embedFonts = true;
__id14_.font = "Times New Roman";
__id14_.hAlign = "center";
__id14_.multiline = false;
__id14_.vAlign = "top";
__id14_.antiAliasType = "advanced";
__id14_.glowBlur = 3;
__id14_.glowColor = 0;
__id14_.useGlowFilter = false;
__id14_.glowQuality = 1;
__id14_.glowStrength = 5;
__id14_.gridFitType = "pixel";
__id14_.italic = false;
__id14_.selectable = false;
__id14_.underline = false;
try {
__id14_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package script.screen
Section 210
//CSettingScreenController (script.screen.CSettingScreenController)
package script.screen {
public class CSettingScreenController {
public var ss:CSettingScreen;
private static var instance:CSettingScreenController = new (CSettingScreenController);
;
public function CSettingScreenController():void{
ss = new CSettingScreen();
super();
if (instance){
throw (new Error("this is singleton. use getInstance()!"));
};
}
public function showSettingScreen(_arg1:Boolean=false):void{
ss.show(_arg1);
}
public function hideSettingScreen():void{
ss.hide();
}
public static function getInstance():CSettingScreenController{
return (instance);
}
}
}//package script.screen
Section 211
//CBigRock (script.tracks.components.CBigRock)
package script.tracks.components {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import flash.geom.*;
public class CBigRock extends MovieClip implements ITrackComponent, IPhysics {
public var c:MovieClip;
public var f:MovieClip;
public var b:MovieClip;
public var d:MovieClip;
public var a:MovieClip;
public var g:MovieClip;
public var e:MovieClip;
private var _pw:QuickBox2D;
public var body:QuickObject;
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Point;
var _local7:Point;
var _local8:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
_local6 = new Point((e.x / 30), (e.y / 30));
_local7 = new Point((f.x / 30), (f.y / 30));
_local8 = new Point((g.x / 30), (g.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, friction:1, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y, _local6.x, _local6.y, _local7.x, _local7.y, _local8.x, _local8.y]], skin:this});
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CBigRock;
_local2 = new CBigRock();
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_local2.rotation = this.rotation;
_arg1.addChild(_local2);
return (new Array(_local2));
}
public function cloneMC():IPhysics{
return (new CBigRock());
}
}
}//package script.tracks.components
Section 212
//CBoulder (script.tracks.components.CBoulder)
package script.tracks.components {
import script.parts.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
public class CBoulder extends MovieClip implements ITrackComponent, IObstacle, IDestroyable, IPhysics {
private var _damageFx:Object;
public var coll:MovieClip;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _curHP:uint;// = 1000000
private var _isDestroyed:Boolean;
private var _maxHP:uint;// = 1000000
private var dmgFx:MovieClip;
public var skin:MovieClip;
private var msk:DisplayObject;
private var _pw:QuickBox2D;
public var body:QuickObject;
public function CBoulder():void{
gs = CGameSession.getInstance();
_maxHP = 1000000;
_curHP = 1000000;
_damageFx = CDamageFX1;
_damageFxMask = CConcreteMask;
super();
skin.gotoAndStop(1);
updateDamageState();
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addCircle({density:20, radius:(this.width / 75), skin:this});
gs.destroyables.push(this);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CBoulder;
_local2 = new CBoulder();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CBoulder());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.tracks.components
Section 213
//CConcrete (script.tracks.components.CConcrete)
package script.tracks.components {
import script.parts.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
import flash.geom.*;
public class CConcrete extends MovieClip implements ITrackComponent, IObstacle, ITarget, IDestroyable, IPhysics {
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _curHP:uint;// = 2500
private var _isDestroyed:Boolean;
public var c:MovieClip;
public var b:MovieClip;
public var d:MovieClip;
private var _maxHP:uint;// = 2500
public var a:MovieClip;
private var dmgFx:MovieClip;
private var msk:DisplayObject;
private var _pw:QuickBox2D;
public var body:QuickObject;
public function CConcrete():void{
gs = CGameSession.getInstance();
_maxHP = 2500;
_curHP = 2500;
_damageFx = CDamageFX1;
_damageFxMask = CConcreteMask;
super();
updateDamageState();
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y]], skin:this});
gs.destroyables.push(this);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CConcrete;
_local2 = new CConcrete();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CConcrete());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.tracks.components
Section 214
//CDamageInfo (script.tracks.components.CDamageInfo)
package script.tracks.components {
public class CDamageInfo {
public var destroyable:IDestroyable;
public var damageTaken:uint;
public function CDamageInfo(_arg1:IDestroyable=null, _arg2:uint=0):void{
destroyable = _arg1;
damageTaken = _arg2;
}
public function toString():void{
trace("apply ", damageTaken, " damage to ", destroyable);
}
}
}//package script.tracks.components
Section 215
//CGoal (script.tracks.components.CGoal)
package script.tracks.components {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CGoal extends MovieClip implements ITrackComponent, IGoal, IPhysics {
private var _pw:QuickBox2D;
public var body:QuickObject;
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:0, groupIndex:-1, skin:this});
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CGoal;
_local2 = new CGoal();
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_local2.rotation = this.rotation;
_arg1.addChild(_local2);
return (new Array(_local2));
}
public function cloneMC():IPhysics{
return (new CGoal());
}
}
}//package script.tracks.components
Section 216
//CHeli (script.tracks.components.CHeli)
package script.tracks.components {
import script.parts.*;
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
import script.fx.*;
import flash.geom.*;
public class CHeli extends MovieClip implements ITrackComponent, IObstacle, IFoe, IDestroyable, IVulcan, IPhysics {
private const dx:Number = 15;
private const dy:Number = 30;
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 1500
private var _isDestroyed:Boolean;
private var _bulletGenerationAngle:Number;
public var a:MovieClip;
public var b:MovieClip;
public var c:MovieClip;
public var d:MovieClip;
private var _maxHP:uint;// = 1500
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
private var _mustBeDestoyedFirst:Object;// = null
private var _pw:QuickBox2D;
private var _maxDiffAngle:Number;// = 20
private var vy:Number;
private var _fireFx:Object;
private var vx;
private var ft:Timer;
private var _bulletFx:Object;
private var _canFire:Boolean;
private var gs:CGameSession;
private var _impulsePower:uint;// = 80
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var ix;
private var iy;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _drawBackImpulse:uint;// = 25
public function CHeli():void{
gs = CGameSession.getInstance();
ft = new Timer(100);
tt = new Timer(100);
_maxHP = 1500;
_curHP = 1500;
_damageFx = CDamageFX1;
_damageFxMask = CHeliMask;
_isLock = true;
_reloadTime = new Timer(150);
_isReadyToFire = true;
_bullet = CBullet1;
_bulletFx = CBulletFX1;
_impulsePower = 80;
_maxDiffAngle = 20;
_drawBackImpulse = 25;
_fireFx = CFireFX1;
_mustBeDestoyedFirst = null;
super();
updateDamageState();
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
ix = x;
iy = y;
randomizeVX();
randomizeVY();
ft.addEventListener(TimerEvent.TIMER, fly, false, 0, true);
ft.start();
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y]], skin:this});
_isLock = false;
gs.destroyables.push(this);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get canFire():Boolean{
return (canFire);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
private function randomizeVY():void{
vy = (0.3 + (Math.random() * 0.7));
if (Math.random() > 0.5){
vy = (vy * -1);
};
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Object;
var _local6:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local5 = new _fireFx();
_local5.x = (_local2.x * 30);
_local5.y = (_local2.y * 30);
_local5.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local5));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local6 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local6);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set canFire(_arg1:Boolean):void{
_canFire = _arg1;
if (_canFire){
tt.start();
} else {
tt.stop();
};
}
private function randomizeVX():void{
vx = (0.1 + (Math.random() * 0.4));
if (Math.random() > 0.5){
vx = (vx * -1);
};
}
private function fly(_arg1:TimerEvent):void{
if (((!(gs.isWin)) && (!(gs.isLose)))){
x = (x + vx);
y = (y + vy);
if (isNextPointLeavingX()){
randomizeVX();
};
if (isNextPointLeavingY()){
randomizeVY();
};
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
private function isNextPointLeavingX():Boolean{
if (Math.abs((ix - (x + vx))) > dx){
return (true);
};
return (false);
}
private function isNextPointLeavingY():Boolean{
if (Math.abs((iy - (y + vy))) > dy){
return (true);
};
return (false);
}
public function get damageFx():Object{
return (_damageFx);
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function ceaseFire():void{
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
private function onFire(_arg1:TimerEvent):void{
if (((!(gs.isLose)) && (!(gs.isWin)))){
fire();
};
}
public function get maxDiffAngle():Number{
return (_maxDiffAngle);
}
public function get mustBeDestoyedFirst():Object{
return (_mustBeDestoyedFirst);
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
var _local1:Number;
_local1 = (((body.body.GetAngle() + Math.PI) - (((barrel.rotation - 90) * Math.PI) / 180)) - ((((_maxDiffAngle / 2) - (Math.random() * _maxDiffAngle)) / 180) * Math.PI));
return (_local1);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CHeli;
_local2 = new CHeli();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
public function get maxHP():uint{
return (_maxHP);
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CHeli());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function set mustBeDestoyedFirst(_arg1:Object):void{
_mustBeDestoyedFirst = _arg1;
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ft = null;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:b2Vec2;
if (!_isLock){
_local1 = Math.sqrt(((bgen.x * bgen.x) + (bgen.y * bgen.y)));
_local2 = Math.atan((bgen.y / bgen.x));
_local2 = (_local2 + (((rotation - 180) / 180) * Math.PI));
_local3 = (_local1 * Math.cos(_local2));
_local4 = (_local1 * Math.sin(_local2));
_local5 = new b2Vec2(((body.userData.x + _local3) / 30), ((body.userData.y + _local4) / 30));
return (_local5);
};
return (null);
}
}
}//package script.tracks.components
Section 217
//CHighlight (script.tracks.components.CHighlight)
package script.tracks.components {
import flash.display.*;
public class CHighlight extends MovieClip {
public function CHighlight():void{
visible = false;
}
}
}//package script.tracks.components
Section 218
//CTank (script.tracks.components.CTank)
package script.tracks.components {
import script.parts.*;
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
import script.fx.*;
import flash.geom.*;
public class CTank extends MovieClip implements ITrackComponent, IObstacle, IFoe, IDestroyable, ICanon, IPhysics {
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 5000
private var _isDestroyed:Boolean;
private var _bulletGenerationAngle:Number;
public var a:MovieClip;
public var b:MovieClip;
public var c:MovieClip;
public var e:MovieClip;
private var _mustBeDestoyedFirst:Object;// = null
public var d:MovieClip;
private var _maxHP:uint;// = 5000
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
private var _pw:QuickBox2D;
private var _fireFx:Object;
private var _bulletFx:Object;
private var _canFire:Boolean;
private var gs:CGameSession;
private var _impulsePower:uint;// = 5
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _drawBackImpulse:uint;// = 25
public function CTank():void{
gs = CGameSession.getInstance();
tt = new Timer(500);
_maxHP = 5000;
_curHP = 5000;
_damageFx = CDamageFX1;
_damageFxMask = CTankMask;
_isLock = true;
_reloadTime = new Timer(1500);
_isReadyToFire = true;
_bullet = CBullet2;
_bulletFx = CBulletFX2;
_impulsePower = 5;
_drawBackImpulse = 25;
_fireFx = CFireFX2;
_mustBeDestoyedFirst = null;
super();
updateDamageState();
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
_local6 = new Point((e.x / 30), (e.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y, _local6.x, _local6.y]], skin:this});
_isLock = false;
gs.destroyables.push(this);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get canFire():Boolean{
return (canFire);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Object;
var _local6:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local5 = new _fireFx();
_local5.x = (_local2.x * 30);
_local5.y = (_local2.y * 30);
_local5.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local5));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local6 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local6);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set canFire(_arg1:Boolean):void{
_canFire = _arg1;
if (_canFire){
tt.start();
} else {
tt.stop();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function ceaseFire():void{
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
private function onFire(_arg1:TimerEvent):void{
if (((!(gs.isLose)) && (!(gs.isWin)))){
if (mustBeDestoyedFirst){
if (!mustBeDestoyedFirst.body.body){
fire();
};
} else {
fire();
};
};
}
public function get mustBeDestoyedFirst():Object{
return (_mustBeDestoyedFirst);
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
return ((body.body.GetAngle() + ((barrel.rotation / 180) * Math.PI)));
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTank;
_local2 = new CTank();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CTank());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function set mustBeDestoyedFirst(_arg1:Object):void{
_mustBeDestoyedFirst = _arg1;
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:b2Vec2;
if (!_isLock){
_local1 = new b2Vec2(((body.userData.x + bgen.x) / 30), ((body.userData.y + bgen.y) / 30));
return (_local1);
};
return (null);
}
}
}//package script.tracks.components
Section 219
//CTrackComponent01 (script.tracks.components.CTrackComponent01)
package script.tracks.components {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CTrackComponent01 extends MovieClip implements ITrackComponent, IPhysics {
private var _pw:QuickBox2D;
public var body:QuickObject;
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:0, skin:this});
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTrackComponent01;
_local2 = new CTrackComponent01();
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_local2.rotation = this.rotation;
_arg1.addChild(_local2);
return (new Array(_local2));
}
public function cloneMC():IPhysics{
return (new CTrackComponent01());
}
}
}//package script.tracks.components
Section 220
//CTrackComponent02 (script.tracks.components.CTrackComponent02)
package script.tracks.components {
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
public class CTrackComponent02 extends MovieClip implements ITrackComponent, IPhysics {
private var _pw:QuickBox2D;
public var body:QuickObject;
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:0, skin:this});
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTrackComponent02;
_local2 = new CTrackComponent02();
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_local2.rotation = this.rotation;
_arg1.addChild(_local2);
return (new Array(_local2));
}
public function cloneMC():IPhysics{
return (new CTrackComponent02());
}
}
}//package script.tracks.components
Section 221
//CTree (script.tracks.components.CTree)
package script.tracks.components {
import script.parts.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
import flash.geom.*;
public class CTree extends MovieClip implements ITrackComponent, IObstacle, ITarget, IDestroyable, IPhysics {
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
public var treePh:MovieClip;
private var _curHP:uint;// = 1000
private var _isDestroyed:Boolean;
public var c:MovieClip;
public var b:MovieClip;
public var d:MovieClip;
private var _maxHP:uint;// = 1000
public var a:MovieClip;
private var _pw:QuickBox2D;
public var body:QuickObject;
public var tree:MovieClip;
public function CTree():void{
gs = CGameSession.getInstance();
_maxHP = 1000;
_curHP = 1000;
super();
mouseChildren = false;
treePh.visible = false;
tree.trunk.gotoAndStop("normal");
updateDamageState();
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
_pw.w.DestroyBody(this.body.body);
parent.swapChildrenAt(parent.getChildIndex(this), (parent.numChildren - 1));
tree.trunk.gotoAndPlay("fall");
_local1 = 0;
while (_local1 < this.numChildren) {
if ((getChildAt(_local1) is IShred)){
_local2 = MovieClip(IPhysics(getChildAt(_local1)).cloneMC());
_local2.x = (getChildAt(_local1).x + x);
_local2.y = (getChildAt(_local1).y + y);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
};
_local1++;
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y]], skin:this});
gs.destroyables.push(this);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTree;
_local2 = new CTree();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CTree());
}
public function updateDamageState():void{
}
}
}//package script.tracks.components
Section 222
//CTurretC (script.tracks.components.CTurretC)
package script.tracks.components {
import script.parts.*;
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
import script.fx.*;
import flash.geom.*;
public class CTurretC extends MovieClip implements ITrackComponent, IObstacle, IFoe, IDestroyable, ICanon, IPhysics {
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 2000
private var _isDestroyed:Boolean;
private var _bulletGenerationAngle:Number;
public var a:MovieClip;
public var b:MovieClip;
public var c:MovieClip;
public var e:MovieClip;
private var _mustBeDestoyedFirst:Object;// = null
public var d:MovieClip;
private var _maxHP:uint;// = 2000
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
private var _pw:QuickBox2D;
private var _fireFx:Object;
private var _bulletFx:Object;
private var _canFire:Boolean;
private var gs:CGameSession;
private var _impulsePower:uint;// = 5
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _drawBackImpulse:uint;// = 25
public function CTurretC():void{
gs = CGameSession.getInstance();
tt = new Timer(500);
_maxHP = 2000;
_curHP = 2000;
_damageFx = CDamageFX1;
_damageFxMask = CTurretMask;
_isLock = true;
_reloadTime = new Timer(500);
_isReadyToFire = true;
_bullet = CBullet2;
_bulletFx = CBulletFX2;
_impulsePower = 5;
_drawBackImpulse = 25;
_fireFx = CFireFX2;
_mustBeDestoyedFirst = null;
super();
updateDamageState();
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
_local6 = new Point((e.x / 30), (e.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y, _local6.x, _local6.y]], skin:this});
_isLock = false;
gs.destroyables.push(this);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get canFire():Boolean{
return (_canFire);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Object;
var _local6:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local5 = new _fireFx();
_local5.x = (_local2.x * 30);
_local5.y = (_local2.y * 30);
_local5.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local5));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local6 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local6);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set canFire(_arg1:Boolean):void{
_canFire = _arg1;
if (_canFire){
tt.start();
} else {
tt.stop();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function ceaseFire():void{
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
private function onFire(_arg1:TimerEvent):void{
if (((!(gs.isLose)) && (!(gs.isWin)))){
fire();
};
}
public function get mustBeDestoyedFirst():Object{
return (_mustBeDestoyedFirst);
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
return ((body.body.GetAngle() + ((barrel.rotation / 180) * Math.PI)));
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTurretC;
_local2 = new CTurretC();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CTurretC());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function set mustBeDestoyedFirst(_arg1:Object):void{
_mustBeDestoyedFirst = _arg1;
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:b2Vec2;
if (!_isLock){
_local1 = new b2Vec2(((body.userData.x + bgen.x) / 30), ((body.userData.y + bgen.y) / 30));
return (_local1);
};
return (null);
}
}
}//package script.tracks.components
Section 223
//CTurretV (script.tracks.components.CTurretV)
package script.tracks.components {
import script.parts.*;
import flash.utils.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import Box2D.Common.Math.*;
import script.engine.*;
import Box2D.Dynamics.*;
import script.battle.*;
import script.fx.*;
import flash.geom.*;
public class CTurretV extends MovieClip implements ITrackComponent, IObstacle, IDestroyable, IFoe, IVulcan, IPhysics {
private var _damageFx:Object;
private var _bullet:Object;
private var _curHP:uint;// = 2500
private var _isDestroyed:Boolean;
private var _bulletGenerationAngle:Number;
public var a:MovieClip;
public var b:MovieClip;
public var c:MovieClip;
public var e:MovieClip;
private var _mustBeDestoyedFirst:Object;// = null
public var d:MovieClip;
private var _maxHP:uint;// = 2500
private var dmgFx:MovieClip;
private var tt:Timer;
private var _isLock:Boolean;// = true
private var _pw:QuickBox2D;
private var _maxDiffAngle:Number;// = 20
private var _fireFx:Object;
private var _bulletFx:Object;
private var _canFire:Boolean;
private var gs:CGameSession;
private var _impulsePower:uint;// = 40
private var _bulletGenerationPoint:b2Vec2;
private var _damageFxMask:Object;
private var _isReadyToFire:Boolean;// = true
private var msk:DisplayObject;
public var body:QuickObject;
public var barrel:MovieClip;
private var _reloadTime:Timer;
public var bgen:MovieClip;
private var _drawBackImpulse:uint;// = 25
public function CTurretV():void{
gs = CGameSession.getInstance();
tt = new Timer(200);
_maxHP = 2500;
_curHP = 2500;
_damageFx = CDamageFX1;
_damageFxMask = CTurretMask;
_isLock = true;
_reloadTime = new Timer(500);
_isReadyToFire = true;
_bullet = CBullet1;
_bulletFx = CBulletFX1;
_impulsePower = 40;
_maxDiffAngle = 20;
_drawBackImpulse = 25;
_fireFx = CFireFX1;
_mustBeDestoyedFirst = null;
super();
updateDamageState();
tt.addEventListener(TimerEvent.TIMER, onFire, false, 0, true);
}
public function get reloadTime():Timer{
return (_reloadTime);
}
public function get pw():QuickBox2D{
return (_pw);
}
public function set pw(_arg1:QuickBox2D):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Point;
_pw = _arg1;
_local2 = new Point((a.x / 30), (a.y / 30));
_local3 = new Point((b.x / 30), (b.y / 30));
_local4 = new Point((c.x / 30), (c.y / 30));
_local5 = new Point((d.x / 30), (d.y / 30));
_local6 = new Point((e.x / 30), (e.y / 30));
body = _pw.addPoly({x:(this.x / 30), y:(this.y / 30), density:0, friction:0, verts:[[_local2.x, _local2.y, _local3.x, _local3.y, _local4.x, _local4.y, _local5.x, _local5.y, _local6.x, _local6.y]], skin:this});
_isLock = false;
gs.destroyables.push(this);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get canFire():Boolean{
return (canFire);
}
public function get drawBackImpulse():uint{
return (_drawBackImpulse);
}
public function fire():void{
var _local1:Object;
var _local2:b2Vec2;
var _local3:Number;
var _local4:b2Vec2;
var _local5:Object;
var _local6:b2Vec2;
if (((_isReadyToFire) && (!(_isLock)))){
_local1 = new _bullet();
_local1.firedBy = this;
_local2 = bulletGenerationPoint;
_local3 = bulletGenerationAngle;
_local1.x = (_local2.x * 30);
_local1.y = (_local2.y * 30);
_local1.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local1));
_local4 = new b2Vec2(Math.cos(_local3), Math.sin(_local3));
_local1.pw = pw;
gs.bullets.push(_local1);
_local1.body.userData.addChild(new bulletFx());
_local5 = new _fireFx();
_local5.x = (_local2.x * 30);
_local5.y = (_local2.y * 30);
_local5.rotation = ((_local3 * 180) / Math.PI);
parent.addChild(MovieClip(_local5));
_local4.x = (_local4.x * impulsePower);
_local4.y = (_local4.y * impulsePower);
_local6 = _local1.body.body.GetWorldCenter();
_local1.body.body.ApplyImpulse(_local4, _local6);
_isReadyToFire = false;
if (!_reloadTime.hasEventListener(TimerEvent.TIMER)){
_reloadTime.addEventListener(TimerEvent.TIMER, reloaded, false, 0, true);
};
_reloadTime.start();
};
}
public function set canFire(_arg1:Boolean):void{
_canFire = _arg1;
if (_canFire){
tt.start();
} else {
tt.stop();
};
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function set isReadyToFire(_arg1:Boolean):void{
_isReadyToFire = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function ceaseFire():void{
if (tt.hasEventListener(TimerEvent.TIMER)){
tt.removeEventListener(TimerEvent.TIMER, onFire);
tt.stop();
tt = null;
};
}
private function onFire(_arg1:TimerEvent):void{
if (((!(gs.isLose)) && (!(gs.isWin)))){
fire();
};
}
public function get maxDiffAngle():Number{
return (_maxDiffAngle);
}
public function get mustBeDestoyedFirst():Object{
return (_mustBeDestoyedFirst);
}
public function get bullet():Object{
return (_bullet);
}
public function get impulsePower():uint{
return (_impulsePower);
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function get bulletGenerationAngle():Number{
var _local1:Number;
_local1 = ((body.body.GetAngle() + ((barrel.rotation / 180) * Math.PI)) - ((((_maxDiffAngle / 2) - (Math.random() * _maxDiffAngle)) / 180) * Math.PI));
return (_local1);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CTurretV;
_local2 = new CTurretV();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function get isLock():Boolean{
return (_isLock);
}
public function get isReadyToFire():Boolean{
return (_isReadyToFire);
}
public function get bulletFx():Object{
return (_bulletFx);
}
public function get fireFx():Object{
return (_fireFx);
}
public function cloneMC():IPhysics{
return (new CTurretV());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
public function set mustBeDestoyedFirst(_arg1:Object):void{
_mustBeDestoyedFirst = _arg1;
}
private function reloaded(_arg1:TimerEvent):void{
_isReadyToFire = true;
_reloadTime.stop();
_reloadTime.removeEventListener(TimerEvent.TIMER, reloaded);
}
public function destroy():void{
var _local1:uint;
var _local2:MovieClip;
ceaseFire();
_local1 = 0;
while (_local1 < gs.vehicleSkins.numChildren) {
if (gs.vehicleParts[_local1] == body){
gs.vehicleSkins.Splice(_local1, 1);
gs.vehicleParts.Splice(_local1, 1);
break;
};
_local1++;
};
if (gs.currentCorePartBody == body){
gs.currentCorePartBody = null;
};
_pw.w.DestroyBody(this.body.body);
visible = false;
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
if (this){
parent.removeChild(this);
};
}
public function get bulletGenerationPoint():b2Vec2{
var _local1:b2Vec2;
if (!_isLock){
_local1 = new b2Vec2(((body.userData.x + bgen.x) / 30), ((body.userData.y + bgen.y) / 30));
return (_local1);
};
return (null);
}
}
}//package script.tracks.components
Section 224
//CWall (script.tracks.components.CWall)
package script.tracks.components {
import script.parts.*;
import script.engine.physics.*;
import flash.display.*;
import com.actionsnippet.qbox.*;
import script.engine.*;
import script.battle.*;
public class CWall extends MovieClip implements ITrackComponent, IObstacle, ITarget, IDestroyable, IPhysics {
private var _damageFx:Object;
private var gs:CGameSession;
private var _damageFxMask:Object;
private var _curHP:uint;// = 20000
private var _isDestroyed:Boolean;
private var _maxHP:uint;// = 20000
private var dmgFx:MovieClip;
private var msk:DisplayObject;
private var _pw:QuickBox2D;
public var body:QuickObject;
public function CWall():void{
gs = CGameSession.getInstance();
_maxHP = 20000;
_curHP = 20000;
_damageFx = CDamageFX1;
_damageFxMask = CWallMask;
super();
updateDamageState();
}
public function destroy():void{
var _local1:int;
var _local2:MovieClip;
if (body.body){
_local1 = 0;
while (_local1 < 20) {
_local2 = new CShred1();
_local2.x = (body.x * 30);
_local2.y = (body.y * 30);
parent.addChild(_local2);
IShred(_local2).pw = _pw;
_local1++;
};
_pw.w.DestroyBody(this.body.body);
body.body = null;
};
visible = false;
if (this){
parent.removeChild(this);
};
}
public function get pw():QuickBox2D{
return (_pw);
}
public function get isDestroyed():Boolean{
return (_isDestroyed);
}
public function set isDestroyed(_arg1:Boolean):void{
_isDestroyed = _arg1;
if (_isDestroyed){
};
}
public function get damageFxMask():Object{
return (_damageFxMask);
}
public function set pw(_arg1:QuickBox2D):void{
_pw = _arg1;
body = _pw.addBox({density:0, skin:this});
gs.destroyables.push(this);
}
public function get curHP():int{
return (_curHP);
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:CWall;
_local2 = new CWall();
if (_arg1){
_local2.x = (this.x + parent.x);
_local2.y = (this.y + parent.y);
_arg1.addChild(_local2);
};
return (new Array(_local2));
}
public function get maxHP():uint{
return (_maxHP);
}
public function set curHP(_arg1:int):void{
if (_arg1 < 0){
_arg1 = 0;
} else {
if (_arg1 > _maxHP){
_arg1 = _maxHP;
};
};
_curHP = _arg1;
}
public function get damageFx():Object{
return (_damageFx);
}
public function cloneMC():IPhysics{
return (new CWall());
}
public function updateDamageState():void{
var _local1:uint;
if (!dmgFx){
dmgFx = new _damageFx();
msk = (new _damageFxMask() as DisplayObject);
addChild(msk);
dmgFx.mask = msk;
addChild(dmgFx);
};
_local1 = dmgFx.totalFrames;
if (_curHP > 0){
dmgFx.gotoAndStop((uint((((_maxHP - _curHP) / _maxHP) * _local1)) + 1));
};
}
}
}//package script.tracks.components
Section 225
//IDestroyable (script.tracks.components.IDestroyable)
package script.tracks.components {
public interface IDestroyable {
function updateDamageState():void;
function get curHP():int;
function get maxHP():uint;
function get damageFxMask():Object;
function get isDestroyed():Boolean;
function set curHP(_arg1:int):void;
function get damageFx():Object;
function destroy():void;
function set isDestroyed(_arg1:Boolean):void;
}
}//package script.tracks.components
Section 226
//IGoal (script.tracks.components.IGoal)
package script.tracks.components {
public interface IGoal {
}
}//package script.tracks.components
Section 227
//IObstacle (script.tracks.components.IObstacle)
package script.tracks.components {
public interface IObstacle {
}
}//package script.tracks.components
Section 228
//ITrackComponent (script.tracks.components.ITrackComponent)
package script.tracks.components {
public interface ITrackComponent {
}
}//package script.tracks.components
Section 229
//CBuilding (script.tracks.CBuilding)
package script.tracks {
import flash.display.*;
public class CBuilding extends MovieClip {
public function CBuilding():void{
gotoAndStop(Math.round((Math.random() * totalFrames)));
if (Math.random() < 0.5){
scaleX = -1;
};
}
}
}//package script.tracks
Section 230
//CCameraBound (script.tracks.CCameraBound)
package script.tracks {
import flash.display.*;
public class CCameraBound extends MovieClip {
public function CCameraBound():void{
visible = false;
}
}
}//package script.tracks
Section 231
//CCloud (script.tracks.CCloud)
package script.tracks {
import flash.display.*;
public class CCloud extends MovieClip {
public function CCloud():void{
gotoAndStop(Math.round((Math.random() * totalFrames)));
if (Math.random() < 0.5){
scaleX = -1;
};
}
}
}//package script.tracks
Section 232
//CHouse (script.tracks.CHouse)
package script.tracks {
import flash.display.*;
public class CHouse extends MovieClip {
public function CHouse():void{
gotoAndStop(Math.round((Math.random() * totalFrames)));
if (Math.random() < 0.5){
scaleX = -1;
};
}
}
}//package script.tracks
Section 233
//CLevelBG01 (script.tracks.CLevelBG01)
package script.tracks {
import flash.display.*;
public class CLevelBG01 extends MovieClip {
private const ORIHEIGHT:uint = 100;
private const ORIWIDTH:uint = 100;
private const cloudRate:Number = 0.006;
private var bgwidth:Number;
private var bgheight:Number;
private var clouds:Array;
public function CLevelBG01():void{
clouds = new Array();
super();
bgwidth = width;
bgheight = height;
addCloud();
}
private function addCloud():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:uint;
_local1 = Math.round((width * cloudRate));
_local2 = (ORIWIDTH / width);
_local3 = (ORIHEIGHT / height);
_local4 = (width / _local1);
_local5 = 0;
while (_local5 < _local1) {
clouds[_local5] = new CCloud();
clouds[_local5].x = ((((_local4 * (_local5 + 0.5)) - (_local4 / 4)) + (Math.random() * (_local4 / 2))) * _local2);
clouds[_local5].y = (((bgheight / 5) - (Math.random() * (bgheight / 5))) * _local3);
clouds[_local5].scaleX = (clouds[_local5].scaleX * _local2);
clouds[_local5].scaleY = _local3;
addChild(clouds[_local5]);
_local5++;
};
}
}
}//package script.tracks
Section 234
//CLevelBG02 (script.tracks.CLevelBG02)
package script.tracks {
import flash.display.*;
public class CLevelBG02 extends MovieClip {
private const ORIHEIGHT:uint = 100;
private const ORIWIDTH:uint = 100;
private var houseRate:Number;// = 0.004
private var buildings:Array;
private var houses:Array;
private var trees:Array;
private var bgwidth:Number;
private var bgheight:Number;
private var treeRate:Number;// = 0.001
private var cloudRate:Number;// = 0.006
private var buildingRate:Number;// = 0.004
private var clouds:Array;
public function CLevelBG02():void{
cloudRate = 0.006;
clouds = new Array();
buildingRate = 0.004;
buildings = new Array();
houseRate = 0.004;
houses = new Array();
treeRate = 0.001;
trees = new Array();
super();
bgwidth = width;
bgheight = height;
addClouds();
addBuildings();
treeRate = 0.003;
addTrees();
addHouses();
treeRate = 0.002;
addTrees();
cacheAsBitmap = true;
}
private function addHouses():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:uint;
_local1 = Math.round((bgwidth * houseRate));
_local2 = (ORIWIDTH / bgwidth);
_local3 = (ORIHEIGHT / bgheight);
_local4 = (width / _local1);
_local5 = 0;
while (_local5 < _local1) {
houses[_local5] = new CHouse();
houses[_local5].x = ((((_local4 * (_local5 + 0.5)) - (_local4 / 4)) + (Math.random() * (_local4 / 2))) * _local2);
houses[_local5].y = (bgheight * _local3);
houses[_local5].scaleX = (houses[_local5].scaleX * _local2);
houses[_local5].scaleY = (houses[_local5].scaleY * _local3);
addChild(houses[_local5]);
_local5++;
};
}
private function addTrees():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:uint;
_local1 = Math.round((bgwidth * treeRate));
_local2 = (ORIWIDTH / bgwidth);
_local3 = (ORIHEIGHT / bgheight);
_local4 = (bgwidth / _local1);
_local5 = 0;
while (_local5 < _local1) {
trees[_local5] = new CTree();
trees[_local5].x = ((((_local4 * (_local5 + 0.5)) - (_local4 / 4)) + (Math.random() * (_local4 / 2))) * _local2);
trees[_local5].y = (bgheight * _local3);
trees[_local5].scaleX = (trees[_local5].scaleX * _local2);
trees[_local5].scaleY = (trees[_local5].scaleY * _local3);
addChild(trees[_local5]);
_local5++;
};
}
private function addBuildings():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:uint;
_local1 = Math.round((bgwidth * buildingRate));
_local2 = (ORIWIDTH / bgwidth);
_local3 = (ORIHEIGHT / bgheight);
_local4 = (bgwidth / _local1);
_local5 = 0;
while (_local5 < _local1) {
buildings[_local5] = new CBuilding();
buildings[_local5].x = ((((_local4 * _local5) - (_local4 / 3)) + (Math.random() * (_local4 / 1.5))) * _local2);
buildings[_local5].y = (bgheight * _local3);
buildings[_local5].scaleX = (buildings[_local5].scaleX * _local2);
buildings[_local5].scaleY = _local3;
addChild(buildings[_local5]);
_local5++;
};
}
private function addClouds():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:uint;
_local1 = Math.round((width * cloudRate));
_local2 = (ORIWIDTH / bgwidth);
_local3 = (ORIHEIGHT / bgheight);
_local4 = (bgwidth / _local1);
_local5 = 0;
while (_local5 < _local1) {
clouds[_local5] = new CCloud();
clouds[_local5].x = ((((_local4 * (_local5 + 0.5)) - (_local4 / 4)) + (Math.random() * (_local4 / 2))) * _local2);
clouds[_local5].y = (((bgheight / 5) - (Math.random() * (bgheight / 5))) * _local3);
clouds[_local5].scaleX = (clouds[_local5].scaleX * _local2);
clouds[_local5].scaleY = (clouds[_local5].scaleY * _local3);
addChild(clouds[_local5]);
_local5++;
};
}
}
}//package script.tracks
Section 235
//CTrack001 (script.tracks.CTrack001)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack001 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack001():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 236
//CTrack002 (script.tracks.CTrack002)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack002 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack002():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 237
//CTrack003 (script.tracks.CTrack003)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack003 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack003():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 238
//CTrack004 (script.tracks.CTrack004)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack004 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack004():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 239
//CTrack005 (script.tracks.CTrack005)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack005 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack005():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 240
//CTrack006 (script.tracks.CTrack006)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack006 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack006():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 241
//CTrack007 (script.tracks.CTrack007)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack007 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack007():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 242
//CTrack008 (script.tracks.CTrack008)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack008 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack008():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 243
//CTrack009 (script.tracks.CTrack009)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack009 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var b:CHighlight;
public var a:CHighlight;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack009():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 244
//CTrack010 (script.tracks.CTrack010)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack010 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack010():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 245
//CTrack011 (script.tracks.CTrack011)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack011 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack011():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 246
//CTrack012 (script.tracks.CTrack012)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack012 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var bg:CLevelBG02;
public var c:CHighlight;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack012():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 247
//CTrack013 (script.tracks.CTrack013)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack013 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack013():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 248
//CTrack014 (script.tracks.CTrack014)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack014 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack014():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 249
//CTrack015 (script.tracks.CTrack015)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack015 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack015():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 250
//CTrack016 (script.tracks.CTrack016)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.tracks.components.*;
import flash.geom.*;
public class CTrack016 extends MovieClip implements ITrack, IPhysics {
public var highlights:Array;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack016():void{
var _local1:uint;
var _local2:Point;
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 251
//CTrack017 (script.tracks.CTrack017)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack017 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var f:CHighlight;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var e:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack017():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
highlights[4] = e;
highlights[5] = f;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 252
//CTrack018 (script.tracks.CTrack018)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack018 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack018():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 253
//CTrack019 (script.tracks.CTrack019)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack019 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var c:CHighlight;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack019():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 254
//CTrack020 (script.tracks.CTrack020)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack020 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack020():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 255
//CTrack021 (script.tracks.CTrack021)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack021 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack021():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 256
//CTrack022 (script.tracks.CTrack022)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack022 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack022():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 257
//CTrack023 (script.tracks.CTrack023)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack023 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack023():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 258
//CTrack024 (script.tracks.CTrack024)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack024 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var b:CHighlight;
public var a:CHighlight;
public var rec:CTrackComponent01;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack024():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
super();
highlights[0] = a;
highlights[1] = b;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:uint;
var _local4:MovieClip;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 259
//CTrack025 (script.tracks.CTrack025)
package script.tracks {
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.tracks.components.*;
import script.battle.*;
import flash.geom.*;
public class CTrack025 extends MovieClip implements ITrack, IPhysics {
private var gs:CGameSession;
public var highlights:Array;
public var bg:MovieClip;
public var c:CHighlight;
private var mbdfmcs:Array;
public var b:CHighlight;
public var d:CHighlight;
public var a:CHighlight;
public var tank1:CTank;
public var rec:CTrackComponent01;
public var wall1:CWall;
public var e:CHighlight;
public var highlightPoints:Array;
public var cam:CCameraBound;
public var highlightIndex:uint;// = 0
public function CTrack025():void{
var _local1:uint;
var _local2:Point;
gs = CGameSession.getInstance();
highlights = new Array();
highlightPoints = new Array();
highlightIndex = 0;
mbdfmcs = new Array();
super();
init();
highlights[0] = a;
highlights[1] = b;
highlights[2] = c;
highlights[3] = d;
highlights[4] = e;
_local1 = 0;
while (_local1 < highlights.length) {
_local2 = new Point((-((cam.width - (cam.width - highlights[_local1].x))) + 400), (-((cam.height - (cam.height - highlights[_local1].y))) + 240));
highlightPoints[_local1] = _local2;
_local1++;
};
}
private function init():void{
tank1.mustBeDestoyedFirst = wall1;
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:Array;
var _local3:int;
var _local4:MovieClip;
var _local5:int;
_local2 = new Array();
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is ITrackComponent)){
_local4 = MovieClip(IPhysics(getChildAt(_local3)).cloneMC());
_local4.x = (getChildAt(_local3).x + getChildAt(_local3).parent.x);
_local4.y = (getChildAt(_local3).y + getChildAt(_local3).parent.y);
_local4.rotation = getChildAt(_local3).rotation;
_arg1.addChild(_local4);
_local2.push(_local4);
if ((getChildAt(_local3) is IObstacle)){
getChildAt(_local3).visible = false;
};
if ((_local4 is ITarget)){
gs.targets.push(_local4);
};
if ((_local4 is IFoe)){
if (IFoe(getChildAt(_local3)).mustBeDestoyedFirst){
IFoe(_local4).mustBeDestoyedFirst = IFoe(getChildAt(_local3)).mustBeDestoyedFirst;
};
gs.foes.push(_local4);
};
};
_local3++;
};
_local3 = 0;
while (_local3 < gs.foes.length) {
if (gs.foes[_local3].mustBeDestoyedFirst){
_local5 = 0;
while (_local5 < gs.targets.length) {
if (gs.foes[_local3].mustBeDestoyedFirst.constructor == gs.targets[_local5].constructor){
if (Math.abs((gs.foes[_local3].mustBeDestoyedFirst.x - gs.targets[_local5].x)) < 100){
gs.foes[_local3].mustBeDestoyedFirst = gs.targets[_local5];
break;
};
};
_local5++;
};
};
_local3++;
};
return (_local2);
}
public function cloneMC():IPhysics{
return (null);
}
}
}//package script.tracks
Section 260
//CTree (script.tracks.CTree)
package script.tracks {
import flash.display.*;
public class CTree extends MovieClip {
public function CTree():void{
if (Math.random() < 0.5){
scaleX = (scaleX * -1);
};
}
}
}//package script.tracks
Section 261
//ITrack (script.tracks.ITrack)
package script.tracks {
public interface ITrack {
}
}//package script.tracks
Section 262
//CPartDescriptionWindow (script.utils.CPartDescriptionWindow)
package script.utils {
import flash.display.*;
import flash.text.*;
public class CPartDescriptionWindow extends Sprite {
public var dur:TextField;
public var price:TextField;
public var desc:TextField;
public function CPartDescriptionWindow():void{
visible = false;
}
}
}//package script.utils
Section 263
//CAssemblyWindow (script.windows.CAssemblyWindow)
package script.windows {
import script.parts.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
public class CAssemblyWindow extends MovieClip implements IPhysics {
private var gs:CGameSession;
private var arr:Array;
public var craftingBG:MovieClip;
public var craftingLayer:CVehicleLayer;
public function CAssemblyWindow():void{
gs = CGameSession.getInstance();
arr = new Array();
super();
}
public function clone(_arg1:MovieClip=null):Array{
var _local2:MovieClip;
var _local3:uint;
var _local4:MovieClip;
var _local5:uint;
_local3 = 0;
while (_local3 < numChildren) {
if ((getChildAt(_local3) is IPart)){
if (!(getChildAt(_local3) is ICore)){
_local4 = MovieClip(getChildAt(_local3));
_local2 = MovieClip(new (_local4.constructor));
_local2.x = (_local4.x + _local4.parent.x);
_local2.y = (_local4.y + _local4.parent.y);
_local2.rotation = _local4.rotation;
if (_local4.numChildren > 1){
_local5 = 0;
while (_local5 < _local4.numChildren) {
if ((_local4.getChildAt(_local5) is ICore)){
gs.currentCore = (_local4.getChildAt(_local5) as ICore);
_local2.addChild(_local4.getChildAt(_local5));
gs.currentCorePartMC = _local4;
};
_local5++;
};
};
_arg1.addChild(_local2);
arr.push(_local2);
};
} else {
if ((getChildAt(_local3) is Array)){
trace((getChildAt(_local3) is Array));
};
};
_local3++;
};
return (arr);
}
public function cloneMC():IPhysics{
return (null);
}
public function generateVehicleSkins():void{
var _local1:IPart;
var _local2:*;
var _local3:*;
var _local4:uint;
var _local5:uint;
var _local6:MovieClip;
var _local7:MovieClip;
var _local8:MovieClip;
_local2 = 0;
while (_local2 < numChildren) {
if ((getChildAt(_local2) is IPart)){
_local6 = MovieClip(getChildAt(_local2));
if (_local6.numChildren > 1){
_local3 = 0;
while (_local3 < _local6.numChildren) {
if ((_local6.getChildAt(_local3) is ICore)){
_local1 = IPart(_local6);
break;
};
_local3++;
};
};
};
_local2++;
};
gs.vehicleSkins = new Array();
gs.vehicleSkins[0] = _local1;
_local5 = 0;
_local2 = 0;
while (_local2 < gs.vehicleSkins.length) {
gs.vehicleSkins[_local2].isVehiclePart = true;
_local3 = 0;
while (_local3 < numChildren) {
if ((((getChildAt(_local3) is IPart)) && (!(IPart(getChildAt(_local3)).isVehiclePart)))){
_local7 = MovieClip(gs.vehicleSkins[_local2]);
_local8 = MovieClip(getChildAt(_local3));
if (((!((_local7 == null))) && (_local8.hitTestObject(_local7)))){
_local5++;
gs.vehicleSkins[_local5] = _local8;
IPart(_local8).isVehiclePart = true;
};
};
_local3++;
};
_local2++;
};
trace(gs.vehicleSkins);
trace(gs.vehicleSkins.length);
}
private function onClick(_arg1:MouseEvent):void{
trace(this.mouseX, this.mouseY);
}
}
}//package script.windows
Section 264
//CHintDialog (script.windows.CHintDialog)
package script.windows {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import script.engine.*;
import spill.localisation.*;
public class CHintDialog extends MovieClip {
private var gs:CGameSession;
public var __id20_:LocalizedTextField;
public var __id21_:LocalizedTextField;
public var closeBtn:SimpleButton;
public var __setPropDict:Dictionary;
public function CHintDialog():void{
__setPropDict = new Dictionary(true);
gs = CGameSession.getInstance();
super();
addFrameScript(21, frame22, 12, frame13, 4, frame5, 22, frame23, 9, frame10, 8, frame9, 3, frame4, 19, frame20, 10, frame11, 7, frame8, 20, frame21, 17, frame18, 18, frame19, 2, frame3, 15, frame16, 1, frame2, 16, frame17, 0, frame1, 13, frame14, 23, frame24, 14, frame15, 6, frame7, 24, frame25, 11, frame12, 5, frame6);
this.gotoAndStop(gs.currentLevel);
closeBtn.useHandCursor = true;
closeBtn.addEventListener(MouseEvent.CLICK, onCloseClick, false, 0, true);
__setProp___id21__CHintDialog_text_1();
}
function __setProp___id21__CHintDialog_text_1(){
try {
__id21_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id21_.text = "{txt_hinttitle}";
__id21_.textColor = 1662108;
__id21_.textSize = 12;
__id21_.bold = false;
__id21_.disableWordwrap = false;
__id21_.embedFonts = true;
__id21_.font = "Times New Roman";
__id21_.hAlign = "center";
__id21_.multiline = false;
__id21_.vAlign = "top";
__id21_.antiAliasType = "advanced";
__id21_.glowBlur = 3;
__id21_.glowColor = 0;
__id21_.useGlowFilter = false;
__id21_.glowQuality = 1;
__id21_.glowStrength = 5;
__id21_.gridFitType = "pixel";
__id21_.italic = false;
__id21_.selectable = false;
__id21_.underline = false;
try {
__id21_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame21(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 21))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_21();
};
}
function frame10(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 10))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_10();
};
}
function frame14(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 14))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_14();
};
}
function frame12(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 12))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_12();
};
}
function frame18(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 18))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_18();
};
}
function frame3(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 3))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_3();
};
}
function frame15(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 15))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_15();
};
}
function frame16(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 16))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_16();
};
}
function frame20(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 20))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_20();
};
}
function frame22(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 22))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_22();
};
}
function frame25(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 25))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_25();
};
}
function frame13(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 13))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_13();
};
}
function frame23(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 23))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_23();
};
}
function frame4(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 4))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_4();
};
}
public function hide():void{
this.visible = false;
}
function frame1(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 1))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_1();
};
}
function __setProp___id20__CHintDialog_text_1(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint1}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_5(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint5}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_6(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint6}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_9(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint9}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame5(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 5))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_5();
};
}
function __setProp___id20__CHintDialog_text_3(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint3}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_10(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint10}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_8(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint8}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_2(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint2}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_11(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint11}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_4(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint4}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_15(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint15}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_17(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint17}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_19(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint19}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_16(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint16}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_7(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint7}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_18(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint18}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame19(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 19))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_19();
};
}
function __setProp___id20__CHintDialog_text_13(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint13}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_14(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint14}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function onCloseClick(_arg1:MouseEvent=null):void{
hide();
}
function __setProp___id20__CHintDialog_text_20(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint20}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_21(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint21}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_23(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint23}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_25(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint25}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_22(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint22}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id20__CHintDialog_text_24(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint24}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame7(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 7))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_7();
};
}
function frame24(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 24))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_24();
};
}
function __setProp___id20__CHintDialog_text_12(){
try {
__id20_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id20_.text = "{txt_hint12}";
__id20_.textColor = 1662108;
__id20_.textSize = 12;
__id20_.bold = false;
__id20_.disableWordwrap = false;
__id20_.embedFonts = true;
__id20_.font = "Times New Roman";
__id20_.hAlign = "left";
__id20_.multiline = true;
__id20_.vAlign = "top";
__id20_.antiAliasType = "advanced";
__id20_.glowBlur = 3;
__id20_.glowColor = 0;
__id20_.useGlowFilter = false;
__id20_.glowQuality = 1;
__id20_.glowStrength = 5;
__id20_.gridFitType = "pixel";
__id20_.italic = false;
__id20_.selectable = false;
__id20_.underline = false;
try {
__id20_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame8(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 8))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_8();
};
}
function frame9(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 9))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_9();
};
}
function frame11(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 11))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_11();
};
}
function frame17(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 17))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_17();
};
}
function frame2(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 2))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_2();
};
}
function frame6(){
if ((((__setPropDict[__id20_] == undefined)) || (!((int(__setPropDict[__id20_]) == 6))))){
__setPropDict[__id20_] = currentFrame;
__setProp___id20__CHintDialog_text_6();
};
}
public function show():void{
this.gotoAndStop(gs.currentLevel);
this.visible = true;
}
}
}//package script.windows
Section 265
//CPartSelectorWindow (script.windows.CPartSelectorWindow)
package script.windows {
import script.parts.*;
import flash.events.*;
import script.engine.physics.*;
import flash.display.*;
import script.engine.*;
import script.components.*;
public class CPartSelectorWindow extends MovieClip {
private const MAX_VISIBLE_SLOT:uint = 6;
private var gs:CGameSession;
public var activeSlotIndex:uint;// = 999
public var prevBtn:SimpleButton;
public var activePart:IPhysics;
public var slots:Array;
public var slots25:Array;
public var slotsBg:MovieClip;
public var nextBtn:SimpleButton;
public var visibleParts:Array;
private var lastPartIndex:uint;
private var partClasses:Array;
private var firstPartIndex:uint;
public var parts:Array;
public function CPartSelectorWindow():void{
gs = CGameSession.getInstance();
activeSlotIndex = 999;
super();
slotsBg.visible = false;
prevBtn.visible = false;
nextBtn.visible = false;
}
private function onSlotClick(_arg1:MouseEvent):void{
var _local2:uint;
_local2 = 0;
while (_local2 < slots.length) {
if (_arg1.target.part == slots[_local2].part){
activeSlotIndex = _local2;
activePart = IPhysics(slots[_local2].part);
gs.canDeploy = true;
this.dispatchEvent(new Event("can deploy"));
} else {
if (slots[_local2].part == _arg1.target){
trace("got you");
activeSlotIndex = _local2;
activePart = slots[_local2].part;
gs.canDeploy = true;
this.dispatchEvent(new Event("can deploy"));
};
};
_local2++;
};
_local2 = 0;
while (_local2 < slots.length) {
if (_local2 == activeSlotIndex){
slots[_local2].scaleX = 1.2;
slots[_local2].scaleY = slots[_local2].scaleX;
slots[_local2].isActive = true;
slots[_local2].gotoAndStop(3);
} else {
slots[_local2].isActive = false;
slots[_local2].scaleX = 1;
slots[_local2].scaleY = slots[_local2].scaleX;
};
_local2++;
};
}
private function onNextBtnClick(_arg1:MouseEvent):void{
var _local2:uint;
activeSlotIndex = 999;
gs.canDeploy = false;
_local2 = 0;
while (_local2 < slots.length) {
slots[_local2].scaleX = 1;
slots[_local2].scaleY = slots[_local2].scaleX;
slots[_local2].isActive = false;
slots[_local2].gotoAndStop(1);
_local2++;
};
firstPartIndex++;
if (firstPartIndex >= (parts.length - lastPartIndex)){
firstPartIndex = (parts.length - lastPartIndex);
};
_local2 = 0;
while (_local2 < slots.length) {
visibleParts[_local2] = parts[(firstPartIndex + _local2)];
slots[_local2].isUsed = false;
_local2++;
};
updateSlots();
}
public function updateSlots():void{
var _local1:Number;
var _local2:uint;
if (!slots){
_local1 = (slotsBg.width / (visibleParts.length + 1));
slots = new Array();
_local2 = 0;
while (_local2 < visibleParts.length) {
slots[_local2] = new CPartSlot();
slots[_local2].x = ((_local2 + 1) * _local1);
slots[_local2].y = (slotsBg.height / 2);
addChild(slots[_local2]);
_local2++;
};
};
_local2 = 0;
while (_local2 < visibleParts.length) {
if (slots[_local2].hasEventListener(MouseEvent.CLICK)){
slots[_local2].removeEventListener(MouseEvent.CLICK, onSlotClick);
};
slots[_local2].register(visibleParts[_local2]);
if (!slots[_local2].part.isUsed){
slots[_local2].isUsed = false;
slots[_local2].addEventListener(MouseEvent.CLICK, onSlotClick, false, 0, true);
} else {
slots[_local2].isUsed = true;
slots[_local2].scaleX = 1;
slots[_local2].scaleY = slots[_local2].scaleX;
};
_local2++;
};
if (parts.length > MAX_VISIBLE_SLOT){
if (firstPartIndex == 0){
prevBtn.visible = false;
nextBtn.visible = true;
} else {
if (firstPartIndex >= (parts.length - lastPartIndex)){
prevBtn.visible = true;
nextBtn.visible = false;
} else {
prevBtn.visible = true;
nextBtn.visible = true;
};
};
};
}
public function nullifyActivePart(_arg1:MouseEvent=null):void{
activePart = null;
gs.canDeploy = false;
}
public function updateSlots25():void{
var _local1:int;
_local1 = 0;
while (_local1 < parts.length) {
slots25[_local1].register(parts[_local1]);
if (slots25[_local1].hasEventListener(MouseEvent.CLICK)){
slots25[_local1].removeEventListener(MouseEvent.CLICK, onSlotClick2);
};
if (slots25[_local1].part.isUsed){
slots25[_local1].isUsed = true;
slots25[_local1].scaleX = 1;
slots25[_local1].scaleY = slots25[_local1].scaleX;
} else {
slots25[_local1].isUsed = false;
slots25[_local1].addEventListener(MouseEvent.CLICK, onSlotClick2, false, 0, true);
};
_local1++;
};
}
public function startOver():void{
update2();
}
private function onPrevBtnClick(_arg1:MouseEvent):Boolean{
var _local2:uint;
activeSlotIndex = 999;
gs.canDeploy = false;
_local2 = 0;
while (_local2 < slots.length) {
slots[_local2].scaleX = 1;
slots[_local2].scaleY = slots[_local2].scaleX;
slots[_local2].isActive = false;
slots[_local2].gotoAndStop(1);
_local2++;
};
if (firstPartIndex == 0){
return (false);
};
firstPartIndex--;
if (firstPartIndex < 0){
firstPartIndex = 0;
};
_local2 = 0;
while (_local2 < slots.length) {
visibleParts[_local2] = parts[(firstPartIndex + _local2)];
slots[_local2].isUsed = false;
_local2++;
};
updateSlots();
return (true);
}
private function onSlotClick2(_arg1:MouseEvent):void{
var _local2:uint;
_local2 = 0;
while (_local2 < slots25.length) {
if (_arg1.target.part == slots25[_local2].part){
activeSlotIndex = _local2;
activePart = IPhysics(slots25[_local2].part);
gs.canDeploy = true;
this.dispatchEvent(new Event("can deploy"));
} else {
if (slots25[_local2].part == _arg1.target){
trace("got you");
activeSlotIndex = _local2;
activePart = slots25[_local2].part;
gs.canDeploy = true;
this.dispatchEvent(new Event("can deploy"));
};
};
_local2++;
};
_local2 = 0;
while (_local2 < slots25.length) {
if (_local2 == activeSlotIndex){
slots25[_local2].scaleX = 1.2;
slots25[_local2].scaleY = slots25[_local2].scaleX;
slots25[_local2].isActive = true;
slots25[_local2].gotoAndStop(3);
} else {
slots25[_local2].isActive = false;
slots25[_local2].scaleX = 1;
slots25[_local2].scaleY = slots25[_local2].scaleX;
};
_local2++;
};
}
public function update2():Boolean{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:int;
if (gs.isPuzzleMode){
partClasses = gs.levelData.levels[gs.currentLevel].availablePuzzleParts;
parts = new Array();
_local4 = 0;
while (_local4 < partClasses.length) {
parts[_local4] = new (partClasses[_local4]);
_local4++;
};
};
if (slots25){
_local4 = 0;
while (_local4 < slots25.length) {
removeChild(slots25[_local4]);
_local4++;
};
};
slots25 = new Array();
_local1 = 432.75;
_local2 = 106;
_local3 = 7;
_local4 = 0;
while (_local4 < parts.length) {
slots25[_local4] = new CPartSlot();
slots25[_local4].x = (_local1 + ((_local4 % 5) * (slots25[_local4].width + _local3)));
slots25[_local4].y = (_local2 + (int((_local4 / 5)) * (slots25[_local4].height + _local3)));
addChild(slots25[_local4]);
_local4++;
};
updateSlots25();
return (true);
}
public function update():Boolean{
var _local1:int;
if (gs.isPuzzleMode){
partClasses = gs.levelData.levels[gs.currentLevel].availablePuzzleParts;
parts = new Array();
_local1 = 0;
while (_local1 < partClasses.length) {
parts[_local1] = new (partClasses[_local1]);
_local1++;
};
};
visibleParts = new Array();
if (parts.length <= MAX_VISIBLE_SLOT){
prevBtn.visible = false;
nextBtn.visible = false;
visibleParts = parts;
} else {
_local1 = 0;
while (_local1 < MAX_VISIBLE_SLOT) {
visibleParts[_local1] = parts[_local1];
_local1++;
};
firstPartIndex = 0;
lastPartIndex = MAX_VISIBLE_SLOT;
prevBtn.visible = true;
nextBtn.visible = true;
if (!prevBtn.hasEventListener(MouseEvent.CLICK)){
prevBtn.addEventListener(MouseEvent.CLICK, onPrevBtnClick, false, 0, true);
nextBtn.addEventListener(MouseEvent.CLICK, onNextBtnClick, false, 0, true);
};
};
updateSlots();
update2();
return (true);
}
}
}//package script.windows
Section 266
//CMain (script.CMain)
package script {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import script.screen.*;
import script.engine.*;
import spill.localisation.*;
import com.spilgames.api.*;
import flash.net.*;
public class CMain extends MovieClip {
private var gs:CGameSession;
public var walkthrough:Walkthrough;
private var ssc:CSettingScreenController;
private var objRef:Class;
private var scm:CScreenManager;
public var loadingSign:MovieClip;
public var percent:Number;
public var award:String;// = ""
public var xmlData:XML;
private var txtObj:Object;
private var screen:MovieClip;
public var totalSize:Number;
private var ss:CSoundManager;
public var downloadSize:Number;
private var eo:CEventOrganizer;
public var logo2:logo_bg;
public static const WIDTH:uint = 800;
public static const HEIGHT:uint = 600;
public static const FRAMERATE:uint = 60;
public static var stageRoot:Stage;
public function CMain():void{
eo = CEventOrganizer.getInstance();
ss = CSoundManager.getInstance();
gs = CGameSession.getInstance();
ssc = CSettingScreenController.getInstance();
screen = new MovieClip();
award = "";
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
trace("CMain");
trace(("stage " + stage));
}
function onServicesFailed(_arg1:ErrorEvent):void{
trace("SpilGamesServices connection failed due to", _arg1.text);
}
public function init():void{
trace("CMain.init");
addChild(screen);
scm = new CScreenManager();
screen.addChild(MovieClip(scm.activeScreen));
addChild(ssc.ss);
ssc.hideSettingScreen();
eo.addEventListener("change screen", changeScreen, false, 0, true);
setChildIndex(screen, 1);
walkthrough = new Walkthrough();
addChild(walkthrough);
walkthrough.x = 694.1;
walkthrough.y = 16;
walkthrough.addEventListener(MouseEvent.CLICK, handle_btnWalkthrough, false, 0, true);
objRef = (getDefinitionByName("TxtAssembly") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 147;
txtObj.y = 441.1;
txtObj.visible = false;
txtObj.name = "txAsmbly";
objRef = (getDefinitionByName("TxtViewtrack") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 112;
txtObj.y = 431;
txtObj.visible = false;
txtObj.name = "txView";
objRef = (getDefinitionByName("TxtStartover") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 167.1;
txtObj.y = 431;
txtObj.visible = false;
txtObj.name = "txStart";
objRef = (getDefinitionByName("TxtGo") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 367.1;
txtObj.y = 431;
txtObj.visible = false;
txtObj.name = "txGo";
objRef = (getDefinitionByName("TxtOption") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 420.6;
txtObj.y = 431;
txtObj.visible = false;
txtObj.name = "txOption";
objRef = (getDefinitionByName("TxtSkip") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 660;
txtObj.y = 455.5;
txtObj.visible = false;
txtObj.name = "txSkip";
objRef = (getDefinitionByName("TxtGiveup") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 660;
txtObj.y = 456;
txtObj.visible = false;
txtObj.name = "txGiveup";
objRef = (getDefinitionByName("TxtMain") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 350.6;
txtObj.y = 269.2;
txtObj.visible = false;
txtObj.name = "txMain";
txtObj.mouseEnabled = false;
objRef = (getDefinitionByName("TxtRetry") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 461;
txtObj.y = 269.2;
txtObj.visible = false;
txtObj.name = "txRetry";
txtObj.mouseEnabled = false;
objRef = (getDefinitionByName("TxtReplay") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 350.6;
txtObj.y = 269.2;
txtObj.visible = false;
txtObj.name = "txReplay";
txtObj.mouseEnabled = false;
objRef = (getDefinitionByName("TxtNext") as Class);
txtObj = new objRef();
addChild(DisplayObject(txtObj));
txtObj.x = 461;
txtObj.y = 269.2;
txtObj.visible = false;
txtObj.name = "txNext";
txtObj.mouseEnabled = false;
}
public function Loading(_arg1:Event){
totalSize = stage.loaderInfo.bytesTotal;
downloadSize = stage.loaderInfo.bytesLoaded;
percent = Math.floor(((downloadSize / totalSize) * 100));
loadingSign.bar.gotoAndStop(Math.round(((downloadSize / totalSize) * 100)));
loadingSign.loaded.text = (percent + "% LOADED");
if (percent == 100){
removeEventListener(Event.ENTER_FRAME, Loading);
gotoAndStop(2);
};
}
private function changeScreen(_arg1:Event):void{
if (screen.numChildren > 0){
screen.removeChild(screen.getChildAt(0));
};
screen.addChild(MovieClip(scm.activeScreen));
}
public function MoreGames():void{
navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank");
}
public function ConnectSpil(_arg1:String):void{
var _local2:SpilGamesServices;
award = _arg1;
_local2 = SpilGamesServices.getInstance();
_local2.addEventListener("servicesReady", onServicesReady);
_local2.addEventListener("servicesFailed", onServicesFailed);
_local2.connect(this);
trace(award);
}
function frame3(){
init();
}
function frame1(){
xmlData = <LocalisedText><textItem identifier=""><en_us></en_us><en_uk></en_uk><nl></nl><fr></fr><de></de><es></es><br></br><pt></pt><it></it><se></se><pl></pl><ru></ru><id></id><ar></ar><jp></jp><cn></cn></textItem><textItem identifier="Branding_More_Games_Sentence_Long"><en_us>Play more racing games at:</en_us><en_uk>Play more racing games at:</en_uk><nl>Speel meer racespellen op:</nl><fr>Joue à plus de jeux de course sur :</fr><de>Spiele mehr Rennspiele auf:</de><es>Juega a más juegos de carreras en:</es><br>Jogue mais jogos de corrida em:</br><pt>Joga mais jogos de corridas em:</pt><it>Gioca a più giochi di gare su:</it><se>Spela fler racingspel på:</se><pl>Zagraj w więcej gier-wyścigów na:</pl><ru>Сыграй в другие гонки на</ru><id>Mainkan game balapan lainnya di:</id><ar>Play more racing games at:</ar><jp>Play more racing games at:</jp><cn></cn></textItem><textItem identifier="Branding_More_Games_Sentence_Short"><en_us>More racing games at:</en_us><en_uk>More racing games at:</en_uk><nl>Meer racespellen op:</nl><fr>Plus de jeux de course sur :</fr><de>Mehr Rennspiele auf:</de><es>Más juegos de carreras en:</es><br>Mais jogos de corrida em:</br><pt>Mais jogos de corridas em:</pt><it>Più giochi di gare su:</it><se>Fler racingspel på:</se><pl>Więcej gier-wyścigów na:</pl><ru>Другие гонки на</ru><id>Game balapan lainnya di:</id><ar>More racing games at:</ar><jp>More racing games at:</jp><cn></cn></textItem><textItem identifier="Branding_More_Games_Sentence_Short"><en_us>More racing at:</en_us><en_uk>More racing at:</en_uk><nl>Meer racen op:</nl><fr>Plus de jeux de course sur :</fr><de>Mehr Rennen auf:</de><es>Más carreras en:</es><br>Mais corrida em:</br><pt>Mais corridas em:</pt><it>Più gare su:</it><se>Mer racing på:</se><pl>Więcej wyścigów na:</pl><ru>Другие гонки:</ru><id>Balapan lainnya di:</id><ar>More racing at:</ar><jp>More racing at:</jp><cn></cn></textItem><textItem identifier="award1"><en_us>Rookie Driver</en_us><en_uk>Rookie Driver</en_uk><nl>Rijleerling</nl><fr>Apprenti conducteur</fr><de>Fahrschüler</de><es>Conductor novato</es><br>Piloto Novato</br><pt>Piloto Novato</pt><it>Guidatore inesperto</it><se>Grön förare</se><pl>Kierowca-żółtodziób</pl><ru>Начинающий водитель</ru><id>Pengemudi Pemula</id><ar>Rookie Driver</ar><jp>Rookie Driver</jp><cn></cn></textItem><textItem identifier="award_desc_1"><en_us>First level complete.</en_us><en_uk>First level complete.</en_uk><nl>Eerste level voltooid.</nl><fr>Premier niveau réussi.</fr><de>Erster Level abgeschlossen.</de><es>Completa el primer nivel.</es><br>Primeira fase concluída.</br><pt>Primeiro nível acabado.</pt><it>Primo livello completo.</it><se>Klarade första nivån.</se><pl>Ukończono poziom 1.</pl><ru>Пройден первый уровень.</ru><id>Level pertama selesai.</id><ar>First level complete.</ar><jp>First level complete.</jp><cn></cn></textItem><textItem identifier="award2"><en_us>Talented Technician</en_us><en_uk>Talented Technician</en_uk><nl>Handige Harry</nl><fr>Technicien à talent</fr><de>Toller Techniker</de><es>Técnico con talento</es><br>Técnico de Talento</br><pt>Técnico Talentoso</pt><it>Tecnico capace</it><se>Teknisk talang</se><pl>Talent techniczny</pl><ru>Опытный механик</ru><id>Teknisi Berbakat</id><ar>Talented Technician</ar><jp>Talented Technician</jp><cn></cn></textItem><textItem identifier="award_desc_2"><en_us>10 levels complete.</en_us><en_uk>10 levels complete.</en_uk><nl>10 levels voltooid.</nl><fr>10 niveaux réussis.</fr><de>10 Level abgeschlossen.</de><es>Completa diez niveles.</es><br>10 fases concluídas.</br><pt>10 níveis acabados.</pt><it>10 livelli completi.</it><se>Klarade 10 nivåer.</se><pl>Ukończono 10 poziomów.</pl><ru>Пройдено 10 уровней.</ru><id>Level 10 selesai.</id><ar>10 levels complete.</ar><jp>10 levels complete.</jp><cn></cn></textItem><textItem identifier="award3"><en_us>Wheeler Dealer</en_us><en_uk>Wheeler Dealer</en_uk><nl>Topmonteur</nl><fr>Petit futé</fr><de>Tüftelkönig</de><es>Maestro de ruedas</es><br>Corredor Nato</br><pt>Negociante</pt><it>Traffichino</it><se>Kung på hjul</se><pl>Kombinator</pl><ru>Знаток техники</ru><id>Pedagang Lihai</id><ar>Wheeler Dealer</ar><jp>Wheeler Dealer</jp><cn></cn></textItem><textItem identifier="award_desc_3"><en_us>Game complete.</en_us><en_uk>Game complete.</en_uk><nl>Spel voltooid.</nl><fr>Jeu réussi.</fr><de>Spiel abgeschlossen.</de><es>Completa el juego.</es><br>Jogo concluído.</br><pt>Jogo acabado.</pt><it>Gioco completo.</it><se>Klarade spelet.</se><pl>Gra ukończona.</pl><ru>Игра пройдена</ru><id>Game selesai</id><ar>Game complete.</ar><jp>Game complete.</jp><cn></cn></textItem><textItem identifier="btn_play"><en_us>PLAY</en_us><en_uk>PLAY</en_uk><nl>SPELEN</nl><fr>JOUER</fr><de>SPIELEN</de><es>JUGAR</es><br>JOGAR</br><pt>JOGAR</pt><it>GIOCA</it><se>SPELA</se><pl>GRAJ</pl><ru>ИГРАТЬ</ru><id>MAIN</id><ar>PLAY</ar><jp>PLAY</jp><cn></cn></textItem><textItem identifier="btn_continue"><en_us>CONTINUE</en_us><en_uk>CONTINUE</en_uk><nl>DOORGAAN</nl><fr>CONTINUER</fr><de>WEITER</de><es>CONTINUAR</es><br>CONTINUAR</br><pt>CONTINUAR</pt><it>CONTINUA</it><se>FORTSÄTT</se><pl>KONTYNUUJ</pl><ru>ПРОДОЛЖИТЬ</ru><id>LANJUTKAN</id><ar>CONTINUE</ar><jp>CONTINUE</jp><cn></cn></textItem><textItem identifier="btn_options"><en_us>OPTIONS</en_us><en_uk>OPTIONS</en_uk><nl>OPTIES</nl><fr>OPTIONS</fr><de>OPTIONEN</de><es>OPCIONES</es><br>OPÇÕES</br><pt>OPÇÕES</pt><it>OPZIONI</it><se>ALTERNATIV</se><pl>OPCJE</pl><ru>НАСТРОЙКИ</ru><id>OPSI</id><ar>OPTIONS</ar><jp>OPTIONS</jp><cn></cn></textItem><textItem identifier="btn_howtoplay"><en_us>HOW TO PLAY</en_us><en_uk>HOW TO PLAY</en_uk><nl>SPELREGELS</nl><fr>INSTRUCTIONS</fr><de>ANLEITUNG</de><es>CÓMO JUGAR</es><br>COMO JOGAR</br><pt>COMO JOGAR</pt><it>COME GIOCARE</it><se>SÅ SPELAR MAN</se><pl>JAK GRAĆ</pl><ru>КАК ИГРАТЬ</ru><id>CARA BERMAIN</id><ar>HOW TO PLAY</ar><jp>HOW TO PLAY</jp><cn></cn></textItem><textItem identifier="btn_credits"><en_us>CREDITS</en_us><en_uk>CREDITS</en_uk><nl>DE MAKERS</nl><fr>CRÉDITS</fr><de>CREDITS</de><es>CRÉDITOS</es><br>CRÉDITOS</br><pt>CRÉDITOS</pt><it>RICONOSCIMENTI</it><se>TACKLISTA</se><pl>AUTORZY</pl><ru>ОБ АВТОРАХ</ru><id>KREDIT</id><ar>CREDITS</ar><jp>CREDITS</jp><cn></cn></textItem><textItem identifier="btn_moregamesat"><en_us>More games at:</en_us><en_uk>More games at:</en_uk><nl>Meer spellen op:</nl><fr>Plus de jeux sur :</fr><de>Mehr Spiele auf:</de><es>Más juegos en:</es><br>Mais jogos em:</br><pt>Mais jogos em:</pt><it>Più giochi su:</it><se>Fler spel på:</se><pl>Więcej gier na:</pl><ru>Другие игры:</ru><id>Game lainnya di:</id><ar>More games at:</ar><jp>More games at:</jp><cn></cn></textItem><textItem identifier="btn_backtut"><en_us>Back</en_us><en_uk>Back</en_uk><nl>Terug</nl><fr>Retour</fr><de>Zurück</de><es>Atrás</es><br>Voltar</br><pt>Voltar</pt><it>Indietro</it><se>Bakåt</se><pl>Powrót</pl><ru>Назад</ru><id>Kembali</id><ar>Back</ar><jp>Back</jp><cn></cn></textItem><textItem identifier="btn_nexttut"><en_us>Next</en_us><en_uk>Next</en_uk><nl>Volgende</nl><fr>Suivant</fr><de>Weiter</de><es>Siguiente</es><br>Avançar</br><pt>Seguinte</pt><it>Avanti</it><se>Nästa</se><pl>Dalej</pl><ru>Дальше</ru><id>Berikutnya</id><ar>Next</ar><jp>Next</jp><cn></cn></textItem><textItem identifier="btn_donetut"><en_us>Done</en_us><en_uk>Done</en_uk><nl>Klaar</nl><fr>Terminé</fr><de>Fertig</de><es>Hecho</es><br>Pronto</br><pt>Terminado</pt><it>Fatto</it><se>Klar</se><pl>Gotowe</pl><ru>Ясно!</ru><id>Selesai</id><ar>Done</ar><jp>Done</jp><cn></cn></textItem><textItem identifier="txt_head1"><en_us>HEY HEY HEY!</en_us><en_uk>HEY HEY HEY!</en_uk><nl>HEY, HEY, HEY!</nl><fr>SALUT !</fr><de>HE HE HE!</de><es>¡HEY, HEY, HEY!</es><br>OPA!</br><pt>OLÁ OLÁ OLÁ!</pt><it>HEI HEI HEI!</it><se>HALLÅ DÄR!</se><pl>HEJ HEJ HEJ!</pl><ru>ПРИВЕТ!</ru><id>HEI HEI HEI!</id><ar>HEY HEY HEY!</ar><jp>HEY HEY HEY!</jp><cn></cn></textItem><textItem identifier="txt_tut1"><en_us>Welcome to the tutorial. If you're having a little trouble with the game, this is the help thingy that explains the basics of the gameplay.</en_us><en_uk>Welcome to the tutorial. If you're having a little trouble with the game, this is the help tool that explains the basics of the gameplay.</en_uk><nl>Welkom bij de tutorial. Als je het spel nog wat te moeilijk vindt, leggen we hier de basis van het spel uit.</nl><fr>Bienvenue au cours d'instructions. Si tu t'embrouilles encore un peu avec ce jeu, voici le truc qui va t'en expliquer les bases.</fr><de>Willkommen beim Tutorial. Falls du Schwierigkeiten mit dem Spiel hast, findest du hier die nötige Hilfe – hier erklären wir dir die Grundlagen des Spiels.</de><es>Bienvenido al tutorial. Si tienes algún problemilla con el juego, esta es la cosa esa de ayuda que explica la jugabilidad básica del juego.</es><br>Boas-vindas ao tutorial. Se estiver com problemas para jogar, é aqui que vamos explicar os elementos básicos do jogo.</br><pt>Bem-vindo às instruções. Se estás a ter algumas dificuldades com o jogo, esta é a coisa da ajuda que te explica as regras básicas do jogo.</pt><it>Benvenuto nel tutorial. Se stai avendo delle difficoltà con il gioco, questa è una mano d'aiuto che ti spiegherà le basi delle modalità di gioco.</it><se>Välkommen till lektionsavsnittet. Om du har problem med spelet kan du få spelets grunder förklarade här.</se><pl>Witamy w tutorialu. Jeśli masz kłopoty z grą, tutaj znajdziesz wyjaśnienie jej podstawowych zasad.</pl><ru>Займемся обучением! Если у тебя не получается разобраться в игре, здесь ты узнаешь, что и как нужно делать.</ru><id>Selamat datang di tutorial. Jika kamu mengalami kesulitan dalam permainan, tutorial ini membantu menjelaskan dasar-dasar permainan.</id><ar>Welcome to the tutorial. If you're having a little trouble with the game, this is the help thingy that explains the basics of the gameplay.</ar><jp>Welcome to the tutorial. If you're having a little trouble with the game, this is the help thingy that explains the basics of the gameplay.</jp><cn></cn></textItem><textItem identifier="txt_head2"><en_us>WHAT IS THIS GAME?</en_us><en_uk>WHAT IS THIS GAME?</en_uk><nl>WAT IS DIT VOOR SPEL?</nl><fr>QU'EST-CE QUE CE JEU ?</fr><de>WAS IST DAS ÜBERHAUPT FÜR EIN SPIEL?</de><es>¿ESTE JUEGO QUÉ ES?</es><br>O QUE É ESTE JOGO?</br><pt>O QUE É ESTE JOGO?</pt><it>CHE COS'È QUESTO GIOCO?</it><se>VAD GÅR DET UT PÅ?</se><pl>O CZYM JEST TA GRA?</pl><ru>ЧТО ЭТО ЗА ИГРА?</ru><id>INI PERMAINAN APA?</id><ar>WHAT IS THIS GAME?</ar><jp>WHAT IS THIS GAME?</jp><cn></cn></textItem><textItem identifier="txt_tut2"><en_us>Crazy Craft is a physics-based game where you get to build a craft the way you like it and then beat each level by getting your craft to the end of the track. </en_us><en_uk>Crazy Craft is a physics-based game where you get to design your own craft and then win each level by getting your craft to the end of the track. </en_uk><nl>Crazy Craft is een natuurkundig spelletje waarbij je naar eigen inzicht een voertuig samenstelt en de levels voltooit door je voertuig de finish te laten passeren.</nl><fr>Crazy Craft est un jeu basé sur les lois de la physique où tu peux construire ta machine comme tu veux. Pour réussir les différents niveaux, il faut que ton véhicule passe la ligne d'arrivée.</fr><de>Crazy Craft ist ein auf Physik basierendes Spiel, in dem du ein Fahrzug nach deinen eigenen Vorstellungen baust und dann jeden Level bewältigst, indem du dein Fahrzeug bis zum Ende der Strecke fahren lässt. </de><es>Crazy Craft es un juego basado en la física donde puedes crear un vehículo como quieras y completar cada nivel logrando que llegue al final de la pista.</es><br>Crazy Craft é um jogo de simulação de física no qual você constrói um veículo da maneira que quiser e então vencer cada fase ao levar seu veículo ao final da corrida. </br><pt>Crazy Craft é um jogo com base em física, no qual constróis um veículo à tua maneira e depois vences cada nível fazendo o teu veículo chegar ao fim da pista. </pt><it>Crazy Craft è un gioco basato sulla fisica nel quale puoi costruire un veicolo come vuoi tu e poi superare ogni livello facendo arrivare il tuo mezzo fino alla fine della pista.</it><se>Crazy Craft är ett fysikbaserat spel. Klara nivån genom att bygga ett fordon som lyckas köra i mål på banan.</se><pl>Crazy Craft to gra oparta na zasadach fizyki, w której w dowolny sposób budujesz pojazd, a następnie przechodzisz kolejne poziomy, doprowadzając swój pojazd do końca trasy.</pl><ru>Это игра, использующая физические законы природы. Твоя задача – построить хорошую машину, а затем пройти очередной уровень, доведя машину до финиша.</ru><id>Crazy Craft adalah permainan berbasis fisik dan kamu harus membangun kereta luncur sesuai seleramu, kemudian menaklukkan setiap level dengan cara menyeberangkan kereta luncur kamu ke ujung jalur.</id><ar>Crazy Craft is a physics-based game where you get to build a craft the way you like it and then beat each level by getting your craft to the end of the track. </ar><jp>Crazy Craft is a physics-based game where you get to build a craft the way you like it and then beat each level by getting your craft to the end of the track. </jp><cn></cn></textItem><textItem identifier="txt_head3"><en_us>THE BASICS</en_us><en_uk>THE BASICS</en_uk><nl>DE BASIS</nl><fr>LES BASES</fr><de>DIE GRUNDLAGEN</de><es>LO BÁSICO</es><br>O BÁSICO</br><pt>REGRAS BÁSICAS</pt><it>BASI</it><se>GRUNDERNA</se><pl>PODSTAWY</pl><ru>ОСНОВЫ</ru><id>DASAR-DASAR</id><ar>THE BASICS</ar><jp>THE BASICS</jp><cn></cn></textItem><textItem identifier="txt_tut3"><en_us>To build your craft, all you need is these two windows: the Assembly Window and Parts Window. (Not that we didn't think you could handle three...)</en_us><en_uk>To build your craft, all you need is these two windows: the Assembly Window and the Parts Window. (Not that we didn't think you could handle three...)</en_uk><nl>Om je voertuig te bouwen, heb je maar twee vensters nodig: het bouwvenster en het venster met onderdelen (we weten wel dat je ook best met drie vensters kan werken, maar toch!).</nl><fr>Pour construire ta machine, tu n'as besoin que de ces deux fenêtres : la fenêtre d'assemblage et la fenêtre de pièces détachées. (Loin de nous l'idée que tu n'y arriverais pas avec trois fenêtres…)</fr><de>Um dein Fahrzeug zu bauen, brauchst du nur diese beiden Fenster: das Baufenster und das Teilefenster. (Nicht dass wir denken würden, dass drei zu viel für dich wären...)</de><es>Para crear tu vehículo, sólo necesitas dos ventanas: la ventana de montaje y la ventana de partes. (Pero no es que pensemos que no serías capaz de manejar tres…)</es><br>Para construir seu veículo, você só precisa de duas janelas: a Janela de Montagem e a Janela de Peças. (Não que não pudéssemos ter três janelas, mas enfim...)</br><pt>Para construíres o teu veículo, só precisas destas duas janelas: a Janela de Montagem e a Janela de Peças. (Não é que achássemos que não conseguias lidar com três...)</pt><it>Per costruire il tuo veicolo tutto quello che ti servirà saranno queste due finestre: la finestra di assemblaggio e la finestra dei pezzi. (Non è che pensavamo che non saresti riuscito a cavartela con tre…)</it><se>Allt du behöver för att bygga ditt fordon är de här två fönstren: Byggfönstret och Tillbehörsfönstret. (Inte för att du inte skulle ha pallat tre fönster ...)</se><pl>Wszystko, czego potrzebujesz, aby zbudować swój pojazd, to te dwa okienka: Okno Montażu i Okno Części. (I wcale nie uważamy, że nie poradziłbyś sobie z trzema okienkami...)</pl><ru>Для постройки собственной машины тебе нужны только эти два окна: окно сборки и окно частей (нет, мы понимаем, что тебе и три окна под силу, но...)</ru><id>Untuk membangun kereta luncur, kamu hanya perlu dua jendela ini: Jendela Rakitan dan Jendela Komponen. (Kami tidak menganggap kamu tidak bisa menangani tiga...)</id><ar>To build your craft, all you need is these two windows: the Assembly Window and Parts Window. (Not that we didn't think you could handle three...)</ar><jp>To build your craft, all you need is these two windows: the Assembly Window and Parts Window. (Not that we didn't think you could handle three...)</jp><cn></cn></textItem><textItem identifier="txt_tut4"><en_us>This is the Assembly Window, where you put your parts together to build your craft.</en_us><en_uk>This is the Assembly Window, where you assemble your parts to build your craft.</en_uk><nl>Dit is het bouwvenster, waar je de onderdelen in elkaar zet om je voertuig te bouwen.</nl><fr>Voici la fenêtre d'assemblage où tu peux assembler ta machine.</fr><de>Dies ist das Baufenster, wo du deine Teile zusammensetzt, um dein Fahrzeug zu erschaffen.</de><es>Esta es la ventana de montaje, donde unes las piezas para crear tu vehículo.</es><br>Esta é a Janela de Montagem, onde você junta as peças para construir seu veículo.</br><pt>Esta é a Janela de Montagem, onde juntas as peças para construir o teu veículo.</pt><it>Questa è la finestra di assemblaggio, in cui potrai mettere insieme i tuoi pezzi in modo da costruire il tuo veicolo. </it><se>Det här är Byggfönstret. Här bygger du ditt fordon genom att montera ihop delarna.</se><pl>Oto Okno Montażu, gdzie składasz części razem i budujesz swój pojazd.</pl><ru>Это окно сборки, где ты соединяешь отдельные части, чтобы построить машину.</ru><id>Ini adalah Jendela Rakitan, tempat kamu merakit semua komponen untuk membangun kereta luncur.</id><ar>This is the Assembly Window, where you put your parts together to build your craft.</ar><jp>This is the Assembly Window, where you put your parts together to build your craft.</jp><cn></cn></textItem><textItem identifier="txt_tut5"><en_us>This is the Parts Window, showing the parts available.</en_us><en_uk>This is the Parts Window which shows the parts available to you.</en_uk><nl>Dit is het venster met onderdelen, waar je ziet welke onderdelen er beschikbaar zijn.</nl><fr>Voici la fenêtre des pièces détachées où tu peux voir les pièces mises à ta disposition.</fr><de>Dies ist das Teilefenster, in dem die verfügbaren Teile angezeigt werden.</de><es>Esta es la ventana de partes, que te muestra las partes disponibles.</es><br>Esta é a Janela de Peças, que exibe as peças disponíveis.</br><pt>Esta é a Janela de Peças, com as peças disponíveis.</pt><it>Questa è la finestra dei pezzi, che ti mostra tutti i pezzi disponibili.</it><se>Det här är Tillbehörsfönstret. Här visas de tillgängliga delarna.</se><pl>Oto Okno Części, które pokazuje dostępne części.</pl><ru>Это окно частей, в котором можно увидеть доступные части.</ru><id>Ini Jendela Komponen yang menunjukkan komponen yang tersedia.</id><ar>This is the Parts Window, showing the parts available.</ar><jp>This is the Parts Window, showing the parts available.</jp><cn></cn></textItem><textItem identifier="txt_head4"><en_us>PARTS</en_us><en_uk>PARTS</en_uk><nl>ONDERDELEN</nl><fr>PIÈCES</fr><de>TEILE</de><es>PARTES</es><br>PEÇAS</br><pt>PEÇAS</pt><it>PEZZI</it><se>DELAR</se><pl>CZĘŚCI</pl><ru>ЧАСТИ</ru><id>KOMPONEN</id><ar>PARTS</ar><jp>PARTS</jp><cn></cn></textItem><textItem identifier="txt_tut6"><en_us>Your craft will mostly consist of a few basic parts: The engine is the power source. The body is what holds the engine. The tires carry the craft around. Duh.</en_us><en_uk>Your craft will mostly consist of a few basic parts: the engine is the power source. The body is what holds the engine. The tyres carry the craft around. Duh.</en_uk><nl>Je voertuig zal hoofdzakelijk uit een paar basisonderdelen bestaan. Je motor is de krachtbron. De carrosserie houdt de motor binnen en met de wielen rijdt je voertuig rond... duh!</nl><fr>Ta machine comprendra surtout quelques pièces de base : le moteur est la source de puissance. La carrosserie maintient le tout ensemble. Les pneus supportent la machine pour qu'elle se déplace. Et c'est tout.</fr><de>Dein Fahrzeug wird immer aus ein paar Grundbauteilen bestehen: Der Motor treibt dein Fahrzeug an. Das Chassis hält Motor und Räder zusammen. Auf den Räder fährt das Fahrzeug durch die Gegend. (Ach was?)</de><es>Tu vehículo constará de unas pocas partes básicas: el motor es la fuente de energía, el cuerpo lo que sujeta el motor y los neumáticos los que mueven el vehículo. Claro.</es><br>Seu veículo consiste de algumas peças básicas: O motor é a fonte de potência. A carroceria guarda o motor. As rodas giram para fazer o veículo andar. Dã.</br><pt>O teu veículo consiste principalmente em algumas peças básicas: o motor é a fonte de energia. A carroçaria contém o motor. Os pneus fazer o veículo mover-se. Duh.</pt><it>Il tuo veicolo è composto principalmente da alcuni pezzi di base. Il motore è la fonte di energia. La carrozzeria è ciò che contiene il motore. Le gomme trasportano il veicolo da una parte all'altra. Ovvio.</it><se>Ditt fordon består normalt av några enkla delar: Motorn är kraftkällan; Karossen håller motorn på plats; Hjulen bär upp karossen. Typ.</se><pl>Twój pojazd najczęściej będzie się składał z kilku podstawowych części. Silnik jest źródłem energii. Nadwozie utrzymuje silnik. Koła umożliwiają pojazdowi przemieszczanie się. Też mi odkrycie.</pl><ru>Машина состоит в первую очередь из основных частей. Двигатель – источник энергии. Кузов используется для крепления двигателя. Колеса используются для перемещения машины. Ничего сложного, верно?</ru><id>Kereta luncur kamu biasanya terdiri atas beberapa komponen dasar: Mesin adalah sumber daya. Bodi adalah tempat untuk mesin. Ban menjalankan kereta luncur. Duh.</id><ar>Your craft will mostly consist of a few basic parts: The engine is the power source. The body is what holds the engine. The tires carry the craft around. Duh.</ar><jp>Your craft will mostly consist of a few basic parts: The engine is the power source. The body is what holds the engine. The tires carry the craft around. Duh.</jp><cn></cn></textItem><textItem identifier="txt_tut7"><en_us>Later on you'll get some additional parts like joints and weapons. Joints allow you to attach one part to another. Weapons are for shooting the bad guys. Er, yes, I said bad guys. Nevermind about the bad guys for now. Let's stick to the basics to start.</en_us><en_uk>Later on you'll receive some additional parts like joints and weapons. Joints allow you to attach one part to another. Weapons are for shooting the bad guys. Er, yes, I said bad guys. Never mind about the bad guys for now. Let's stick to the basics to start with.</en_uk><nl>Later krijg je extra onderdelen zoals verbindingsstukken en wapens. Met verbindingsstukken bevestig je twee onderdelen aan elkaar, en met de wapens schiet je de slechteriken neer. Vergeet die voorlopig nog maar: we houden het nu even bij de basis.</nl><fr>Plus tard, tu obtiendras quelques pièces supplémentaires, comme des joints et des armes. Les joints te permettront de fixer les pièces entre elles. Les armes, c'est pour tirer sur les méchants. Les méchant ? J'ai bien dit 'les méchants' ? Pour l'instant, ne t'occupe pas de ça. Continuons avec les bases.</fr><de>Später erhältst du noch weitere Teile wie Verbindungen und Waffen. Mit Verbindungen kannst du Teile aneinanderfügen. Mit Waffen schießt du auf deine Gegner. Ja, Gegner gibt es in dem Spiel auch. Aber um die kümmern wir uns später. Für den Anfang konzentrieren wir uns auf die Grundlagen.</de><es>Más adelante obtendrás partes adicionales como articulaciones y armas. Las articulaciones te permiten unir unas partes con otras. Las armas son para disparar a los malos. Sí, he dicho malos. Pero no te preocupes por ellos ahora. De momento, centrémonos en lo básico.</es><br>Mais tarde, você vai ter peças adicionais, como juntas e armas. As juntas permitem que você una uma peça à outra. As armas servem para atirar nos inimigos. Sim, eu disse inimigos. Não ligue para os inimigos agora. Vamos nos ater ao básico por enquanto.</br><pt>Mais adiante terás mais algumas peças, tais como juntas e armas. As juntas permitem-te ligar uma peça a outra. As armas são para dar tiros nos maus. Ah, pois, eu disse maus. Mas agora isso não interessa nada. Para começar, vamos ficar-nos pelas coisas básicas.</pt><it>In seguito ti verranno dati alcuni pezzi aggiuntivi come ad esempio i giunti e le armi. I giunti ti permettono di unire i pezzi fra di loro. Le armi ti serviranno per sparare i cattivi. Eh, sì, ho detto proprio i cattivi. Ma per il momento non preoccuparti dei cattivi. Per iniziare concentriamoci sulle basi.</it><se>Senare i spelet får du fler delar, till exempel leder och vapen. Leder låter dig koppla ihop en del med en annan. Vapen är till för att skjuta elakingar med. Eh, ja, jag sa elakingar. Mer om dem senare. Låt oss hålla oss till grunderna nu.</se><pl>Później otrzymasz pewne części dodatkowe, jak złącza i bronie. Złącza pozwolą ci na przyczepienie jednej części do drugiej. Bronie służą do zastrzelenia złych facetów. Tak, powiedziałem 'złych facetów'. Ale na razie zostawmy ten temat. Aby rozpocząć, pozostańmy przy podstawach.</pl><ru>Позже к твоим услугам будут дополнительные части вроде перемычек и оружия. Перемычки позволяют соединить одну часть с другой. Оружие используется для отстрела плохишей. Ну да, плохишей. Но пока не будем о мрачном. Давай для начала изучим основы.</ru><id>Nanti kamu akan memperoleh beberapa komponen tambahan seperti sambungan dan senjata. Dengan komponen sambungan, kamu bisa memasangkan satu komponen dengan lainnya. Senjata untuk menembak perusuh. Iya, aku bilang perusuh. Sudahlah, lupakan saja dulu soal perusuh itu. Mari fokus pada dasar-dasar untuk memulai.</id><ar>Later on you'll get some additional parts like joints and weapons. Joints allow you to attach one part to another. Weapons are for shooting the bad guys. Er, yes, I said bad guys. Nevermind about the bad guys for now. Let's stick to the basics to start.</ar><jp>Later on you'll get some additional parts like joints and weapons. Joints allow you to attach one part to another. Weapons are for shooting the bad guys. Er, yes, I said bad guys. Nevermind about the bad guys for now. Let's stick to the basics to start.</jp><cn></cn></textItem><textItem identifier="txt_head5"><en_us>PLACE PARTS INTO THIS WINDOW AND BUILD YOUR CRAFT</en_us><en_uk>PLACE PARTS INTO THIS WINDOW AND BUILD YOUR CRAFT</en_uk><nl>PLAATS DE ONDERDELEN IN DIT VENSTER EN BOUW JE VOERTUIG</nl><fr>PLACE LES PIÈCES DANS CETTE FENÊTRE ET CONSTRUIS TA MACHINE</fr><de>PLATZIERE TEILE IN DIESES FENSTER UND BAUE DEIN FAHRZEUG ZUSAMMEN</de><es>COLOCA PARTES EN ESTA VENTANA Y CREA TU VEHÍCULO</es><br>COLOQUE AS PEÇAS NESTA JANELA E MONTE SEU VEÍCULO</br><pt>COLOCA AS TUAS PEÇAS NESTA JANELA E CONSTRÓI O TEU VEÍCULO</pt><it>METTI I PEZZI IN QUESTA FINESTRA E COSTRUISCI IL TUO VEICOLO</it><se>PLACERA DELAR I DETTA FÖNSTER OCH BYGG DITT FORDON</se><pl>UMIEŚĆ CZĘŚCI W TYM OKNIE I ZBUDUJ SWÓJ POJAZD</pl><ru>ПОМЕЩАЙ ЧАСТИ В ЭТО ОКНО И СОБЕРИ СВОЮ МАШИНУ</ru><id>TARUH KOMPONEN DI JENDELA INI, LALU BANGUN KERETA LUNCUR KAMU</id><ar>PLACE PARTS INTO THIS WINDOW AND BUILD YOUR CRAFT</ar><jp>PLACE PARTS INTO THIS WINDOW AND BUILD YOUR CRAFT</jp><cn></cn></textItem><textItem identifier="txt_head6"><en_us>AVAILABLE PARTS</en_us><en_uk>AVAILABLE PARTS</en_uk><nl>BESCHIKBARE ONDERDELEN</nl><fr>PIÈCES DISPONIBLES</fr><de>VERFÜGBARE TEILE</de><es>PARTES DISPONIBLES</es><br>PEÇAS DISPONÍVEIS</br><pt>PEÇAS DISPONÍVEIS</pt><it>PEZZI DISPONIBILI</it><se>TILLGÄNGLIGA DELAR</se><pl>DOSTĘPNE CZĘŚCI</pl><ru>ДОСТУПНЫЕ ЧАСТИ</ru><id>KOMPONEN YANG TERSEDIA</id><ar>AVAILABLE PARTS</ar><jp>AVAILABLE PARTS</jp><cn></cn></textItem><textItem identifier="txt_head7"><en_us>BUILDING THE CRAFT</en_us><en_uk>BUILDING THE CRAFT</en_uk><nl>HET VOERTUIG BOUWEN</nl><fr>CONSTRUCTION DE LA MACHINE</fr><de>DAS FAHRZEUG ZUSAMMENBAUEN</de><es>CÓMO CREAR EL VEHÍCULO</es><br>MONTANDO O VEÍCULO</br><pt>CONSTRUIR O VEÍCULO</pt><it>COME COSTRUIRE IL VEICOLO</it><se>BYGGA FORDONET</se><pl>BUDOWANIE POJAZDU</pl><ru>ПОСТРОЙКА МАШИНЫ</ru><id>MEMBANGUN KERETA LUNCUR</id><ar>BUILDING THE CRAFT</ar><jp>BUILDING THE CRAFT</jp><cn></cn></textItem><textItem identifier="txt_tut8"><en_us>To build, click on the parts in the Parts Window, then place them inside the Assembly Window.</en_us><en_uk>To build, click on the parts in the Parts Window, and then place them inside the Assembly Window.</en_uk><nl>Om je voertuig te bouwen, klik je op de onderdelen in het venster met onderdelen en plaats je ze in het bouwvenster.</nl><fr>Pour construire ta machine, clique sur les pièces qui se trouvent dans la fenêtre correspondante, puis place-les dans la fenêtre d'assemblage.</fr><de>Klicke zum Bauen die Teile im Teilefenster an und platziere sie dann ins Baufenster.</de><es>Para crear, haz clic en las partes de la ventana de partes y luego colócalas en la ventana de montaje.</es><br>Para montar, clique nas peças na Janela de Peças, e então as coloque na Janela de Montagem.</br><pt>Para construíres, clica nas peças na Janela de Peças e depois coloca-as dentro da Janela de Montagem.</pt><it>Per costruire clicca sui pezzi nella finestra dei pezzi, poi mettili nella finestra di assemblaggio.</it><se>Bygg genom att klicka på delarna i Tillbehörsfönstret och placera dem i Byggfönstret.</se><pl>Aby budować, klikaj na części w Oknie Części, a następnie umieść je wewnątrz Okna Montażu.</pl><ru>Для постройки машины щелкай мышью по частям в окне частей, а затем помещай их в окно сборки.</ru><id>Untuk membangun, klik pada komponen di Jendela Komponen, lalu taruh di dalam Jendela Rakitan</id><ar>To build, click on the parts in the Parts Window, then place them inside the Assembly Window.</ar><jp>To build, click on the parts in the Parts Window, then place them inside the Assembly Window.</jp><cn></cn></textItem><textItem identifier="txt_head8"><en_us>REPOSITIONING THE PART</en_us><en_uk>REPOSITIONING THE PART</en_uk><nl>HET ONDERDEEL VERPLAATSEN</nl><fr>REPOSITIONNEMENT DES PIÈCES</fr><de>TEILE NEU ANORDNEN</de><es>RECOLOCAR LA PARTE</es><br>REPOSICIONANDO A PEÇA</br><pt>REPOSICIONAR A PEÇA</pt><it>COME RISISTEMARE UN PEZZO</it><se>FLYTTA EN DEL</se><pl>ZMIANA POZYCJI CZĘŚCI</pl><ru>ПЕРЕМЕЩЕНИЕ ЧАСТЕЙ</ru><id>MEMPOSISIKAN ULANG KOMPONEN</id><ar>REPOSITIONING THE PART</ar><jp>REPOSITIONING THE PART</jp><cn></cn></textItem><textItem identifier="txt_tut9"><en_us>Any part used is marked. If you want to reposition the part inside the Assembly Window, click on it and then where you'd like to put it instead.</en_us><en_uk>Any part used is marked. If you want to reposition the part inside the Assembly Window, click on it and then click where you would like to place it.</en_uk><nl>Gebruikte onderdelen zijn aangegeven. Als je een onderdeel in het bouwvenster op een andere plek wilt zetten, klik je op het onderdeel en dan op de plek waar je het wilt zetten.</nl><fr>Toutes les pièces utilisées sont barrées. Si tu veux repositionner une pièce dans la fenêtre d'assemblage, clique sur la pièce puis sur l'endroit où tu veux la placer.</fr><de>Jedes verwendete Teil wird markiert. Wenn du die Teile im Baufenster anders anordnen möchtest, klicke sie erst an und dann dahin, wo du sie stattdessen haben möchtest.</de><es>Cualquier parte en uso queda marcada. Si quieres recolocarla dentro de la ventana de montaje, haz clic en ella y luego en el lugar donde quieras colocarla.</es><br>Qualquer peça já usada fica marcada. Se você quiser reposicionar a peça dentro da Janela de Montagem, clique nela e então na posição nova.</br><pt>Qualquer peça usada é marcada. Se quiseres reposicionar a peças dentro da Janela de Montagem, clica nela e depois onde a queres colocar.</pt><it>Ogni pezzo usato viene contrassegnato. Se vuoi risistemare un pezzo all'interno della finestra di assemblaggio cliccaci sopra e poi clicca sul punto in cui vorresti metterlo.</it><se>Den aktiva delen är markerad. Om du vill flytta en del i Byggfönstret, klicka på den och sedan dit du vill flytta den.</se><pl>Używana część jest zaznaczona. Jeśli chcesz zmienić jej pozycję w Oknie Montażu, kliknij na nią, a następnie na miejsce, w którym chcesz ją umieścić.</pl><ru>Все используемые части будут помечены. Если ты хочешь переместить какую-либо часть в окне сборки, щелкни сначала по ней, а затем по тому месту, где ты хочешь ее расположить.</ru><id>Setiap komponen yang digunakan, ditandai. Kalau kamu ingin memposisikan ulang komponen di bagian dalam Jendela Rakitan, klik komponennya, lalu tempat pemindahan yang kamu inginkan.</id><ar>Any part used is marked. If you want to reposition the part inside the Assembly Window, click on it and then where you'd like to put it instead.</ar><jp>Any part used is marked. If you want to reposition the part inside the Assembly Window, click on it and then where you'd like to put it instead.</jp><cn></cn></textItem><textItem identifier="txt_head9"><en_us>BACK TO BUILDING</en_us><en_uk>BACK TO BUILDING</en_uk><nl>VERDER MET BOUWEN</nl><fr>RETOUR A LA CONSTRUCTION</fr><de>ZURÜCK ZUM BAUEN</de><es>SEGUIR CREANDO</es><br>DE VOLTA À MONTAGEM</br><pt>VOLTAMOS À CONSTRUÇÃO</pt><it>TORNA ALLA COSTRUZIONE</it><se>FORTSÄTT BYGGA</se><pl>POWRÓT DO BUDOWANIA</pl><ru>ВЕРНЕМСЯ К ПОСТРОЙКЕ</ru><id>KEMBALI MEMBANGUN</id><ar>BACK TO BUILDING</ar><jp>BACK TO BUILDING</jp><cn></cn></textItem><textItem identifier="txt_tut10"><en_us>Next, your craft is gonna need tires. Place the tire so that its axis, or center point, is stuck to the body. (Otherwise it's not attached.)</en_us><en_uk>Next, your craft is going to need tyres. Place the tyre so that its axis, or centre point, is fixed to the body (otherwise it is not attached).</en_uk><nl>Nu heeft je voertuig wielen nodig. Plaats de wielen zodat de as (of het midden) aan de carrosserie vast zit (anders hangen de wielen los).</nl><fr>Maintenant, ta machine a besoin de pneus. Place-les de façon que leur axe, ou leur centre, se trouve coincé dans la carrosserie. (Autrement ils ne sont pas fixés.)</fr><de>Als Nächstes braucht dein Fahrzeug Räder. Platziere die Räder so, dass ihre Achse, d. h. ihre Mitte auf dem Chassis aufsitzt. (Sonst sind sie nicht verbunden.)</de><es>A continuación, tu vehículo va a necesitar neumáticos. Coloca el neumático de forma que su eje, o punto central, esté pegado al cuerpo. (Si no, no se quedará unido.)</es><br>Agora, seu veículo precisa de rodas. Coloque a roda para que seu eixo, ou ponto central, fique preso a carroceria. (Caso contrário, ela não vai ficar presa.)</br><pt>A seguir, o teu veículo vai precisar de pneus. Coloca os pneus de forma a que o eixo, ou ponto central, esteja preso à carroçaria. (Caso contrário, não ficarão presos.)</pt><it>Per proseguire, il tuo veicolo avrà bisogno di gomme. Metti la gomma in modo che la sua asse, o punto centrale, sia unita alla carrozzeria (altrimenti non verrà attaccata).</it><se>Nu behöver ditt fordon hjul. Placera hjulet så att dess axel (mittpunkt) hamnar på karossen (annars trillar hjulet av).</se><pl>Teraz twój pojazd będzie potrzebował kół. Umieść koło tak, aby jego oś lub punkt centralny przylegał do nadwozia. (W przeciwnym wypadku nie zostanie połączone.)</pl><ru>Теперь машине требуются колеса. Расположи колеса так, чтобы оси, то есть центры колес, касались кузова (иначе они просто отвалятся). </ru><id>Berikutnya, kereta luncur memerlukan roda. Tempatkan roda sedemikian rupa sehingga poros, atau titik pusatnya melekat ke bodi. (Kalau tidak pas, roda tidak bisa dipasang).</id><ar>Next, your craft is gonna need tires. Place the tire so that its axis, or center point, is stuck to the body. (Otherwise it's not attached.)</ar><jp>Next, your craft is gonna need tires. Place the tire so that its axis, or center point, is stuck to the body. (Otherwise it's not attached.)</jp><cn></cn></textItem><textItem identifier="txt_tut11"><en_us>Finally, you'll need to put the engine in the body. When you're happy with your craft, click on the GO button below the Assembly Window. </en_us><en_uk>Finally, you'll need to place the engine in the body. When you're happy with your craft, click on the GO button below the Assembly Window. </en_uk><nl>Tot slot plaats je de motor in je voertuig. Als je tevreden bent met je voertuig, klik je op de knop GO onder het bouwvenster.</nl><fr>Pour finir, tu dois placer le moteur dans la carrosserie. Une fois que ta machine te plait, clique sur le bouton GO sous la fenêtre d'assemblage.</fr><de>Als Letztes musst du den Motor ins Chassis einbauen. Wenn du mit deinem Fahrzeug zufrieden bist, klicke unter dem Baufenster auf LOS. </de><es>Por último, tienes que colocar el motor en el cuerpo. Cuando estés contento con el vehículo creado, haz clic en el botón YA de debajo de la ventana de montaje.</es><br>Por último, você precisa colocar o motor na carroceria. Quando estiver satisfeito com seu veículo, clique no botão PARTIR abaixo da Janela de Montagem.</br><pt>Por fim, tens de colocar um motor na carroçaria. Quando estiveres satisfeito com o teu veículo, clica no botão PARTIR por baixo da Janela de Montagem. </pt><it>Infine avrai bisogno di mettere il motore nella carrozzeria. Clicca sul tasto "VIA" sotto la finestra di assemblaggio non appena sarai soddisfatto del modo in cui hai costruito il tuo veicolo.</it><se>Slutligen måste du placera motorn i karossen. När du är nöjd med ditt fordon, klicka på knappen KÖR under Byggfönstret.</se><pl>Na koniec będziesz musiał umieścić silnik w nadwoziu. Kiedy uznasz, że pojazd jest gotowy, kliknij na przycisk JEDŹ poniżej Okna Montażu.</pl><ru>Осталось установить на кузов двигатель. Когда ты создашь желаемую конструкцию машины, щелкни по кнопке ВПЕРЕД! под окном сборки.</ru><id>Terakhir, kamu harus menaruh mesin di dalam bodi. Setelah kamu puas dengan kereta luncurnya, klik tombol GO di bawah Jendela Rakitan.</id><ar>Finally, you'll need to put the engine in the body. When you're happy with your craft, click on the GO button below the Assembly Window. </ar><jp>Finally, you'll need to put the engine in the body. When you're happy with your craft, click on the GO button below the Assembly Window. </jp><cn></cn></textItem><textItem identifier="txt_head10"><en_us>WHAT IF I'M NOT HAPPY?</en_us><en_uk>WHAT IF I'M NOT HAPPY?</en_uk><nl>WAT ALS IK NIET TEVREDEN BEN?</nl><fr>ET SI CA NE ME PLAÎT PAS ?</fr><de>WAS IST, WENN ICH NICHT ZUFRIEDEN BIN?</de><es>¿Y SI NO ESTOY CONTENTO?</es><br>E SE EU NÃO ESTIVER SATISFEITO?</br><pt>E SE NÃO ESTIVER SATISFEITO?</pt><it>E SE NON SONO SODDISFATTO?</it><se>OM JAG INTE ÄR NÖJD?</se><pl>A JEŚLI NIE BĘDĘ ZADOWOLONY?</pl><ru>А ЕСЛИ РЕЗУЛЬТАТ МНЕ НЕ НРАВИТСЯ?</ru><id>BAGAIMANA KALAU SAYA TIDAK SUKA?</id><ar>WHAT IF I'M NOT HAPPY?</ar><jp>WHAT IF I'M NOT HAPPY?</jp><cn></cn></textItem><textItem identifier="txt_tut12"><en_us>Click Start Over if you want to toss your craft and build a new one. And if you're curious about what kind of crazy track it is out there, use the View Track mode to scroll through the entire thing.</en_us><en_uk>Click Start Over if you want to trash your craft and build a new one. And if you're curious about what kind of crazy track it is out there, use the View Track mode to scroll through the entire circuit!</en_uk><nl>Als je je voertuig weg wilt gooien en een nieuwe wilt maken, klik je op “Opnieuw beginnen”. Als je wilt weten op wat voor maffe baan je moet rijden, gebruik je “Baan bekijken” om door de hele rit te scrollen.</nl><fr>Clique sur 'Recommencer' si tu veux te débarrasser de ta machine pour en construire une autre. Et si tu veux absolument savoir à quoi ressemble le parcours tout à fait dément qu'il faudra emprunter, utilise le mode 'Visualiser le parcours' pour le parcourir en entier.</fr><de>Klicke „Verwerfen“ wenn du dein Fahrzeug verwerfen und ein neues bauen willst. Wenn du neugierig bist, was für eine verrückte Strecke dich erwartet, benutze den Vorschaumodus, um dir die gesamte Strecke anzusehen.</de><es>Haz clic en Empezar de nuevo si quieres eliminar tu vehículo y empezar uno nuevo. Si tienes curiosidad por ver la pista, usa el modo Ver pista para desplazarte por toda la pista.</es><br>Clique em Começar de Novo se quiser jogar fora seu veículo e construir outro do zero. E se estiver curioso para ver qual pista louca lhe aguarda, use o modo Ver Pista para passar por ela toda.</br><pt>Se quiseres deitar fora o teu veículo e construir um novo, clica em Recomeçar. E se estiveres curioso sobre o tipo de pista maluca que te espera, usa o modo Ver Pista para percorreres o circuito inteiro.</pt><it>Clicca su "comincia da capo" se vuoi buttare via il tuo veicolo e costruirne uno nuovo. E se sei curioso di vedere che tipo di piste pazze ci sono in giro, usa la modalità "visualizza la pista" per far scorrere tutte le opzioni disponibili.</it><se>Klicka på "Börja om" om du vill ta bort ditt fordon och bygga ett nytt. Och om vill kolla in den galna banan kan du använda "Visa bana"-läget för att se den.</se><pl>Kliknij Od początku, jeśli chcesz zrezygnować z pojazdu w obecnym kształcie i zacząć od początku. Jeśli jesteś ciekaw, jak zwariowany tor cię czeka, użyj trybu Pokaż tor, aby obejrzeć całą trasę.</pl><ru>Нажми "Сначала", если ты хочешь разобрать построенную машину и построить что-то другое. Если тебе интересно, что за безумная трасса тебя ожидает, воспользуйся режимом просмотра трассы.</ru><id>Klik Mulai Lagi jika kamu ingin membuang kereta luncurmu dan membangun yang baru. Kalau kamu penasaran untuk mengetahui jalur gila macam apa yang ada di sana, gunakan mode Lihat Jalur untuk menggulir ke seluruh jalur.</id><ar>Click Start Over if you want to toss your craft and build a new one. And if you're curious about what kind of crazy track it is out there, use the View Track mode to scroll through the entire thing.</ar><jp>Click Start Over if you want to toss your craft and build a new one. And if you're curious about what kind of crazy track it is out there, use the View Track mode to scroll through the entire thing.</jp><cn></cn></textItem><textItem identifier="txt_head11"><en_us>DONE!</en_us><en_uk>DONE!</en_uk><nl>KLAAR!</nl><fr>C'EST TOUT !</fr><de>FERTIG!</de><es>¡HECHO!</es><br>PRONTO!</br><pt>JÁ ESTÁ!</pt><it>FATTO!</it><se>KLART!</se><pl>GOTOWE!</pl><ru>ГОТОВО!</ru><id>SELESAI!</id><ar>DONE!</ar><jp>DONE!</jp><cn></cn></textItem><textItem identifier="txt_tut13"><en_us>Now that you've clicked GO—voilà—your craft will start rolling down the track in all its glory. It's rrrooolling, baby! But wait. You beat the level only if your craft manages to reach the Finish flag at the other end of the track.</en_us><en_uk>Now that you've clicked GO, voilà! Your craft will start rolling down the track in all its glory. It's rrrooolling, baby! But wait... you win the level only if your craft manages to reach the Finish flag at the other end of the track.</en_uk><nl>Nu je op Go hebt geklikt, zal je voertuig in al zijn pracht over de baan rollen. Het rrrrrrolt als een rollende R! Maar wacht... het level is pas voltooid als je voertuig het tot de finishvlag haalt aan het andere uiteinde van de baan.</nl><fr>Maintenant que tu as cliqué sur GO—c'est parti—ta machine commencera son chemin le long du parcours. Et roule ma poule ! Minute, tout de même : tu n'auras réussi le niveau que si ta machine atteint le drapeau d'arrivée à la fin du parcours.</fr><de>Du hast auf LOS geklickt – darum geht’s jetzt los, dein Fahrzeug nimmt die Strecke in Angriff. Es rollt, Baby! Aber Moment! Du schaffst den Level nur, wenn es deinem Fahrzeug gelingt, die Zielfahne am anderen Ende der Strecke zu erreichen.</de><es>Ahora que has hecho clic en YA, tu vehículo empezará a rodar por la pista en toda su gloria. ¡A rrrrrrodar, chico! Pero espera. Sólo completarás el nivel si tu vehículo logra llegar a la bandera de Meta del otro extremo de la pista.</es><br>Agora que seu veículo deu a partida, ele vai começar a rolar pela pista, em toda a sua glória. E lá vai ele! Mas espere. Você só vence a fase se seu veículo conseguir chegar à bandeira de chegada ao final da pista.</br><pt>Agora que clicaste em PARTIDA—voilà—o teu veículo vai começar a rolar pela pista em grande estilo. É só rrrrrrolar! Mas espera. Só vences o nível se o teu veículo conseguir chegar à Meta na outra ponta do circuito.</pt><it>Adesso che hai cliccato su "via", voilà! Il tuo veicolo inizierà a rotolare lungo la pista in tutta la sua gloria. Sta rotolando, amico! Puoi superare il livello solo se il tuo mezzo raggiungerà la bandierina del traguardo dall'altra parte dellla pista.</it><se>Nu när du har klickat på KÖR, kommer ditt fordon att börja rulla längs banan i all sin härlighet. Den rrruuullar, baby! Men vänta. Ditt fordon måste nå målflaggan vid slutet av banan för att klara nivån.</se><pl>Teraz kliknąłeś JEDŹ - i proszę - twój pojazd zacznie toczyć się w całej okazałości wzdłuż toru. Dajesz radę, skarbie! Ale chwileczkę. Ukończysz poziom tylko wtedy, kiedy twojemu pojazdowi uda się dotrzeć do końcowej flagi na drugim końcu toru.</pl><ru>После того как ты нажмешь ВПЕРЕД!, твоя машина отправится в свой нелегкий путь по трассе. Поехали! Впрочем, подожди-ка. Уровень будет пройден, только если тебе удастся коснуться финишного флага на другом конце трассы.</ru><id>Setelah kamu klik GO—simsalabim—kereta luncur kamu siap meluncur melintasi jalur dengan segala kemegahannya. Serrrru sekali bo! Tapi tunggu. Kamu hanya bisa menaklukkan jalur kalau kereta luncurmu mampu mencapai bendera Finish di ujung jalur.</id><ar>Now that you've clicked GO—voilà—your craft will start rolling down the track in all its glory. It's rrrooolling, baby! But wait. You beat the level only if your craft manages to reach the Finish flag at the other end of the track.</ar><jp>Now that you've clicked GO—voilà—your craft will start rolling down the track in all its glory. It's rrrooolling, baby! But wait. You beat the level only if your craft manages to reach the Finish flag at the other end of the track.</jp><cn></cn></textItem><textItem identifier="txt_head12"><en_us>WHAT IF I SUCKED?</en_us><en_uk>WHAT IF I SUCKED?</en_uk><nl>WAT ALS IK ER NIKS VAN BAK?</nl><fr>ET SI C'EST RATÉ ?</fr><de>UND WENN ICH VERSAGE?</de><es>¿Y SI SE ME HA DADO FATAL?</es><br>E SE EU TIVER ERRADO FEIO?</br><pt>E SE FIQUEI MAL COLOCADO?</pt><it>E SE FACCIO SCHIFO?</it><se>OM JAG VAR KASS DÅ?</se><pl>A JEŚLI ZAWALĘ?</pl><ru>А ЕСЛИ У МЕНЯ НЕ ВЫХОДИТ?</ru><id>BAGAIMANA KALAU SAYA PAYAH?</id><ar>WHAT IF I SUCKED?</ar><jp>WHAT IF I SUCKED?</jp><cn></cn></textItem><textItem identifier="txt_tut14"><en_us>There is a Give Up button at the bottom of the screen if (you think) you can't make it and need to return to the Assembly Window. Yeah giving up is for wusses, but sometimes you don't have a choice.</en_us><en_uk>There is a Give Up button at the bottom of the screen if (you think) you can't make it and need to return to the Assembly Window. You know giving up is for wusses, but sometimes you just don't have any choice.</en_uk><nl>Onderaan het scherm staat een knop “Opgeven”. Klik hierop als (je denkt dat) je het niet gaat redden en terug moet naar het bouwvenster. Opgeven is voor watjes, natuurlijk, maar soms kun je niet anders!</nl><fr>Il y a un bouton 'Abandonner' au bas de l'écran si (tu penses que) tu n'y arriveras pas et que tu dois retourner à la fenêtre d'assemblage. Je le sais : abandonner, c'est pour les trouillards, mais de temps en temps on n'a pas le choix.</fr><de>Am unteren Rand des Bildschirms gibt es eine Schaltfläche zum Aufgeben, wenn (du denkst, dass) dein Fahrzeug die Strecke nicht schafft und du zum Baufenster zurückkehren möchtest. Klar, Aufgeben ist für Weicheier, aber manchmal hat man eben keine Wahl.</de><es>Hay un botón Me rindo en la parte inferior de la pantalla por si (piensas que) no puedes lograrlo y necesitas volver a la ventana de montaje. Sí, rendirse es de cobardes, pero a veces no hay más remedio.</es><br>Há um botão Desistir na parte de baixo da tela se você (achar que) não consegue chegar ao fim e precisa voltar à Janela de Montagem. É, desistir é para fracotes, mas às vezes você não tem escolha.</br><pt>Há um botão Desistir no fundo do ecrã se (achares) que não consegues chegar ao fim e precisas de voltar à Janela de Montagem. Sim, desistir é para totós, mas às vezes não temos outra escolha.</pt><it>Se (pensi che) non ce la fai e devi ritornare alla finestra di assemblaggio troverai il tasto "arrenditi" nella parte inferiore dello schermo. Eh, sì. Arrendersi è una cosa da fifoni ma talvolta non hai altra scelta.</it><se>Det finns en "Ge upp"-knapp längst ned på skärmen om du inte klarar banan och vill återvända till Byggfönstret. Japp, det är mesigt att ge sig, men ibland har du inget annat val.</se><pl>U dołu ekranu znajduje się przycisk Poddaj się, jeśli uznasz, że nie dajesz rady i chcesz wrócić do Okna Montażu. Taak, poddawanie się jest dla mięczaków, ale czasem nie masz wyboru.</pl><ru>Внизу экрана есть кнопка "Сдаться". Если тебе кажется, что этой машине ни за что не достичь конца трассы, нажми эту кнопку, чтобы вернуться в окно сборки. Да, сдаваться нехорошо, но иногда другого выхода просто нет.</ru><id>Ada tombol Give Up (Menyerah) di bagian bawah layar jika (kamu memperkirakan) kamu tidak bisa berhasil dan harus kembali ke Jendela Rakitan. Yah, menyerah itu cuma untuk orang lemah, tapi kadang kamu tidak punya pilihan lain.</id><ar>There is a Give Up button at the bottom of the screen if (you think) you can't make it and need to return to the Assembly Window. Yeah giving up is for wusses, but sometimes you don't have a choice.</ar><jp>There is a Give Up button at the bottom of the screen if (you think) you can't make it and need to return to the Assembly Window. Yeah giving up is for wusses, but sometimes you don't have a choice.</jp><cn></cn></textItem><textItem identifier="txt_tut15"><en_us>But if you do manage to reach the finish, great job! You are way less wussy than those losers who gave up. Go crazy trying to beat the next level, where you will get to build more sophisticated craft like this one shown here.</en_us><en_uk>But if you do manage to reach the finish, great job! You are much less wussy than the losers who gave up. Go crazy trying to win the next level, where you can build more sophisticated craft like this one shown here.</en_uk><nl>Als je de finish wel bereikt: goed gedaan! Je bent veel stoerder dan al die losers die op hebben gegeven. Laat je gek maken in het volgende level, waar je een beter uitgerust voertuig kunt bouwen zoals in dit voorbeeld hier.</nl><fr>Mais si tu arrives à la fin du parcours, c'est génial ! Tu t'en es bien mieux sorti que les nuls qui ont jeté l'éponge. N'en fais qu'à ta tête pour réussir le prochain niveau où tu pourras construire des machines plus sophistiquées comme celle qu'on te montre.</fr><de>Wenn es dir aber gelingt, das Ziel zu erreichen – gut gemacht! Du bist viel härter als die Weicheier, die aufgegeben haben! Gib alles, um den nächsten Level zu meistern, wo du noch abgefahrenere Fahrzeuge wie das hier gezeigte bauen kannst.</de><es>Pero si logras llegar a la meta, ¡buen trabajo! Eres menos cobarde que esos perdedores que se rindieron. Vuélvete loco intentando completar el siguiente nivel, donde crearás vehículos más sofisticados como el mostrado aquí.</es><br>Mas se você conseguir chegar ao final, bom trabalho! Você é bem menos fracote do que os perdedores que desistem. Tente passar pela próxima fase, onde você vai montar veículos mais sofisticados do que este exibido aqui.</br><pt>Mas se conseguires chegar à meta, bom trabalho! És muito menos totó do que os outros que desistiram. Enlouquece a tentar vencer o nível seguinte, onde poderás construir veículos mais sofisticados, tais como este.</pt><it>Ma se invece riesci ad arrivare al traguardo, ottimo lavoro! Sei molto meno fifone di quei falliti che si sono arresi. Vai fuori di testa cercando di superare il prossimo livello nel quale potrai costruire veicoli ancora più sofisticati come ad esempio quello mostrato qui.</it><se>Men snyggt jobbat om du klarar att köra i mål! Då är du sååå mycket bättre än mesarna som gav upp. Ge allt och försök klara nästa nivå. Där får du bygga ännu mer avancerade fordon, som den som visas här.</se><pl>Ale jeśli uda ci się dotrzeć do mety, dobra robota! Nie jesteś takim mięczakiem jak ci frajerzy, którzy się poddali. Oszalejesz, próbując ukończyć następny poziom, w którym będziesz musiał zbudować tak wyrafinowany pojazd, jak pokazany tutaj.</pl><ru>Но если твоя машина доберется до финиша, ты просто молодец! Ты гораздо круче тех слабаков, которые сдались и бросили играть. Теперь попробуй пройти следующий уровень, где тебе придется строить еще более навороченную машину.</ru><id>Tapi, kalau kamu memang bisa mencapai finish, tentu bagus! Berarti, kamu tidak selemah mereka yang memang pecundang dan menyerah. Jungkir-balik mencoba menaklukkan level berikutnya, dan di sana kamu bisa membangun kereta luncur yang lebih canggih seperti yang diperlihatkan di sini.</id><ar>But if you do manage to reach the finish, great job! You are way less wussy than those losers who gave up. Go crazy trying to beat the next level, where you will get to build more sophisticated craft like this one shown here.</ar><jp>But if you do manage to reach the finish, great job! You are way less wussy than those losers who gave up. Go crazy trying to beat the next level, where you will get to build more sophisticated craft like this one shown here.</jp><cn></cn></textItem><textItem identifier="txt_tut16"><en_us>So that covers pretty much everything. Easy huh? Don't forget to check out the Options Menu and look for Hints when you're stuck on a particular level. We're not giving you anything on a silver platter, but they should give you some clues to solve any problems. Have fun!</en_us><en_uk>So that covers pretty much everything. Easy, eh? Don't forget to check out the Options Menu and look for Hints when you're stuck on a particular level. We're not giving you anything on a silver platter, but they should provide you with some clues to solve any problems. Have fun!</en_uk><nl>Dat was het wel zo'n beetje. Makkie, toch? Vergeet niet om in het Optiemenu te kijken voor een hint als je in een level vast komt te zitten. We geven je niets voor niks, maar er zitten handige aanwijzingen bij om je te helpen bij eventuele problemen. Veel plezier!</nl><fr>Ben, en gros c'est tout. Facile, non ? N'oublie pas d'étudier le menu d'options ou d'aller voir les indices lorsque tu coinces à tel ou tel niveau. On ne va pas tout t'expliquer mais te donner des indices pour résoudre tes problèmes qui peuvent t'arriver. Amuse-toi bien !</fr><de>Das war eigentlich auch schon alles. Klingt doch einfach, oder? Schau dir auch das Optionsmenü an. Und wenn du in einem bestimmten Level festsitzt, halte Ausschau nach Hinweisen. Wir servieren dir die Lösung nicht auf dem Silbertablett, aber es gibt kleine Tipps, mit denen du alle Probleme lösen können solltest. Viel Spaß!</de><es>Así que con eso lo hemos visto prácticamente todo. ¿A que es fácil? No olvides mirar el menú de opciones y las pistas si te atascas en un nivel concreto. No te lo vamos a poner en bandeja, pero seguro que te dan algún indicio de cómo resolver el problema. ¡Que te diviertas!</es><br>Bom, cobrimos praticamente tudo. Fácil, né? Não se esqueça de conferir o menu de opções e procurar dicas quando não souber o que fazer em uma fase. Não vamos lhe dar nada de bandeja, mas essas dicas vão ser úteis para resolver problemas. Divirta-se!</br><pt>E assim chegamos ao fim da explicação. É fácil, não é? Se ficares preso num nível, não te esqueças de procurar Dicas no Menu de Opções. Não te damos tudo de bandeja, mas damos-te algumas dicas para resolveres quaisquer problemas. Diverte-te!</pt><it>Dunque questo dovrebbe essere tutto. Facile, no? Non dimenticare di dare uno sguardo al menu delle opzioni e cerca gli aiutini quando sei bloccato in un particolare livello. Non ti stiamo servendo niente su un piatto d'argento, ma dovrebbero darti alcuni indizi su come risolvere qualsiasi problema. Divertiti!</it><se>Det var i stort sett allt. Enkelt va? Glöm inte att kolla in Alternativmenyn och sök efter tips om du fastnar på en nivå. Vi ger dig inte allt på en silverbricka, men tipsen bör ge dig några ledtrådar om hur du kan lösa problemen. Ha det så kul!</se><pl>To by było na tyle. Łatwizna, co? Nie zapomnij o sprawdzeniu Menu Opcji i szukaniu podpowiedzi, kiedy utkniesz na jakimś poziomie. Nie podamy ci niczego na tacy, ale powinieneś uzyskać wskazówki, które pomogą ci w rozwiązaniu problemu. Baw się dobrze!</pl><ru>В общем-то, это все. Просто, верно? Если ты застрянешь на каком-либо уровне, не забудь заглянуть в меню настроек и воспользоваться подсказкой. Мы не намерены выдавать тебе все секреты на блюдечке, однако подсказка поможет тебе найти верное решение проблемы. Желаем удачи!</ru><id>Jadi, itulah semuanya. Mudah kan? Jangan lupa mengecek Menu Opsi dan cari Petunjuk kalau kamu mandek pada level tertentu. Kami tidak menyuguhkan segala kemudahan, tapi petunjuk ini bisa memberi kamu beberapa arahan untuk menyelesaikan masalah. Selamat menikmati!</id><ar>So that covers pretty much everything. Easy huh? Don't forget to check out the Options Menu and look for Hints when you're stuck on a particular level. We're not giving you anything on a silver platter, but they should give you some clues to solve any problems. Have fun!</ar><jp>So that covers pretty much everything. Easy huh? Don't forget to check out the Options Menu and look for Hints when you're stuck on a particular level. We're not giving you anything on a silver platter, but they should give you some clues to solve any problems. Have fun!</jp><cn></cn></textItem><textItem identifier="txt_credits"><en_us>CREDITS</en_us><en_uk>CREDITS</en_uk><nl>DE MAKERS</nl><fr>CRÉDITS</fr><de>CREDITS</de><es>CRÉDITOS</es><br>CRÉDITOS</br><pt>CRÉDITOS</pt><it>RICONOSCIMENTI</it><se>TACKLISTA</se><pl>AUTORZY</pl><ru>АВТОРЫ</ru><id>KREDIT</id><ar>CREDITS</ar><jp>CREDITS</jp><cn></cn></textItem><textItem identifier="txt_programmer"><en_us>PROGRAMMING</en_us><en_uk>PROGRAMMING</en_uk><nl>PROGRAMMEUR</nl><fr>PROGRAMMATION</fr><de>PROGRAMMIERUNG</de><es>PROGRAMACIÓN</es><br>PROGRAMAÇÃO</br><pt>PROGRAMAÇÃO</pt><it>PROGRAMMAZIONE</it><se>PROGRAMMERING</se><pl>PROGRAMOWANIE</pl><ru>ПРОГРАММИСТ</ru><id>PEMOGRAMAN</id><ar>PROGRAMMING</ar><jp>PROGRAMMING</jp><cn></cn></textItem><textItem identifier="txt_gamedesign"><en_us>GAME DESIGN</en_us><en_uk>GAME DESIGN</en_uk><nl>GAMEDESIGN</nl><fr>CONCEPTION DU JEU</fr><de>SPIELDESIGN</de><es>DISEÑO DEL JUEGO</es><br>DESIGN DO JOGO</br><pt>DESIGN DO JOGO</pt><it>PROGETTAZIONE</it><se>SPELDESIGN</se><pl>PROJEKT </pl><ru>ДИЗАЙНЕР</ru><id>DESAIN GAME</id><ar>GAME DESIGN</ar><jp>GAME DESIGN</jp><cn></cn></textItem><textItem identifier="txt_leadartist"><en_us>LEAD ARTIST</en_us><en_uk>LEAD ARTIST</en_uk><nl>HOOFDARTIEST</nl><fr>ARTISTE PRINCIPAL</fr><de>VERANTWORTLICHER GRAFIK</de><es>JEFE DE GRÁFICOS</es><br>CHEFE DE ARTE</br><pt>ARTISTA PRINCIPAL</pt><it>ARTISTA PRINCIPALE</it><se>FORMCHEF</se><pl>DYREKTOR ARTYSTYCZNY</pl><ru>ВЕДУЩИЙ ХУДОЖНИК</ru><id>ARTIS UTAMA</id><ar>LEAD ARTIST</ar><jp>LEAD ARTIST</jp><cn></cn></textItem><textItem identifier="txt_artist"><en_us>ART</en_us><en_uk>ART</en_uk><nl>ARTWORK</nl><fr>ART</fr><de>GRAFIK</de><es>GRÁFICOS</es><br>ARTE</br><pt>ARTE</pt><it>ARTE</it><se>FORM</se><pl>GRAFIKA</pl><ru>ХУДОЖНИКИ</ru><id>SENI</id><ar>ART</ar><jp>ART</jp><cn></cn></textItem><textItem identifier="txt_components"><en_us>COMPONENTS</en_us><en_uk>COMPONENTS</en_uk><nl>COMPONENTEN</nl><fr>PIÈCES DÉTACHÉES</fr><de>KOMPONENTEN</de><es>COMPONENTES</es><br>COMPONENTES</br><pt>COMPONENTES</pt><it>COMPONENTI</it><se>KOMPONENTER</se><pl>KOMPONENTY</pl><ru>МОДУЛИ</ru><id>KOMPONEN</id><ar>COMPONENTS</ar><jp>COMPONENTS</jp><cn></cn></textItem><textItem identifier="txt_sounds"><en_us>SOUND</en_us><en_uk>SOUND</en_uk><nl>GELUID</nl><fr>SON</fr><de>SOUND</de><es>SONIDO</es><br>SOM</br><pt>SOM</pt><it>AUDIO</it><se>LJUD</se><pl>DŹWIĘK</pl><ru>ЗВУК</ru><id>SUARA</id><ar>SOUND</ar><jp>SOUND</jp><cn></cn></textItem><textItem identifier="txt_gametester"><en_us>GAME TESTING</en_us><en_uk>GAME TESTING</en_uk><nl>GAMETESTING</nl><fr>TEST DU JEU</fr><de>SPIELTESTS</de><es>TESTEO DEL JUEGO</es><br>TESTE DO JOGO</br><pt>TESTES AO JOGO</pt><it>GAME TESTING</it><se>SPELTESTNING</se><pl>TESTOWANIE</pl><ru>ТЕСТИРОВАНИЕ ИГРЫ</ru><id>PENGUJIAN GAME</id><ar>GAME TESTING</ar><jp>GAME TESTING</jp><cn></cn></textItem><textItem identifier="txt_lvldesc1"><en_us>The Journey Begins</en_us><en_uk>The Journey Begins</en_uk><nl>De reis begint</nl><fr>Le voyage commence</fr><de>Die Reise beginnt</de><es>Comienza el viaje</es><br>A Jornada Começa</br><pt>A Viagem Começa</pt><it>Il viaggio comincia…</it><se>Resan börjar</se><pl>Rozpoczyna się podróż</pl><ru>Путешествие начинается</ru><id>Mengawali Perjalanan</id><ar>The Journey Begins</ar><jp>The Journey Begins</jp><cn></cn></textItem><textItem identifier="txt_lvldesc2"><en_us>Turtle or Tiger</en_us><en_uk>Turtle or Tiger</en_uk><nl>Schildpad of tijger</nl><fr>Lièvre ou tortue</fr><de>Schildkröte oder Tiger</de><es>Tortuga o tigre</es><br>Tartaruga ou Tigre</br><pt>Tartaruga ou Tigre</pt><it>Tartaruga o tigre</it><se>Tiger eller sköldpadda</se><pl>Żółw czy tygrys</pl><ru>Тигр или черепаха?</ru><id>Kura-Kura atau Macan</id><ar>Turtle or Tiger</ar><jp>Turtle or Tiger</jp><cn></cn></textItem><textItem identifier="txt_lvldesc3"><en_us>Big Rock in the Way</en_us><en_uk>Big Rock in the Way</en_uk><nl>Grote steen op de weg</nl><fr>Le gros rocher dans le chemin</fr><de>Großer Stein im Weg</de><es>Gran roca en el camino</es><br>Grande Pedra no Caminho</br><pt>Pedra Grande no Caminho</pt><it>Grande pietra in cammino</it><se>Fet klippa i vägen</se><pl>Głaz na drodze</pl><ru>Камень на пути</ru><id>Batu Karang Menghalangi</id><ar>Big Rock in the Way</ar><jp>Big Rock in the Way</jp><cn></cn></textItem><textItem identifier="txt_lvldesc4"><en_us>Hill</en_us><en_uk>Hill</en_uk><nl>Bergop</nl><fr>Colline</fr><de>Hügel</de><es>Colina</es><br>Colina</br><pt>Colina</pt><it>Collina</it><se>Backe</se><pl>Wzgórze</pl><ru>Гора</ru><id>Bukit</id><ar>Hill</ar><jp>Hill</jp><cn></cn></textItem><textItem identifier="txt_lvldesc5"><en_us>Bridge Builder</en_us><en_uk>Bridge Builder</en_uk><nl>Bruggenbouwer</nl><fr>Constructeur de ponts</fr><de>Brückenbauer</de><es>Constructor de puentes</es><br>Construindo Pontes</br><pt>Construtor de Pontes</pt><it>Costruttore di ponti</it><se>Brobygge</se><pl>Konstruktor mostów</pl><ru>Строим мост</ru><id>Pembangun Jembatan</id><ar>Bridge Builder</ar><jp>Bridge Builder</jp><cn></cn></textItem><textItem identifier="txt_lvldesc6"><en_us>Breakthrough</en_us><en_uk>Breakthrough</en_uk><nl>Doorbraak</nl><fr>Percée</fr><de>Durchbruch</de><es>Atravesar</es><br>Quebrando Barreiras</br><pt>Inovação</pt><it>Passo in avanti</it><se>Genombrott</se><pl>Wyłom</pl><ru>Пробивная сила</ru><id>Terobosan</id><ar>Breakthrough</ar><jp>Breakthrough</jp><cn></cn></textItem><textItem identifier="txt_lvldesc7"><en_us>Need a Rope?</en_us><en_uk>Need a Rope?</en_uk><nl>Touw nodig?</nl><fr>Besoin d'une corde ?</fr><de>Brauchst du ein Seil?</de><es>¿Necesitas una cuerda?</es><br>Precisa de Corda?</br><pt>Precisas de uma Corda?</pt><it>Hai bisogno di una corda?</it><se>Behöver du ett rep?</se><pl>Potrzebujesz liny?</pl><ru>Без веревки не обойтись</ru><id>Perlu Tali?</id><ar>Need a Rope?</ar><jp>Need a Rope?</jp><cn></cn></textItem><textItem identifier="txt_lvldesc8"><en_us>Speed-Wise</en_us><en_uk>Speed-Wise</en_uk><nl>Snelheidslimiet</nl><fr>Rapide et futé</fr><de>Geschwindigkeitsrausch</de><es>Velocidad</es><br>Boa Velocidade</br><pt>É Só Velocidade</pt><it>Velocissimamente</it><se>Fart e bra</se><pl>Po pierwsze prędkość</pl><ru>Главное – скорость!</ru><id>Soal Kecepatan</id><ar>Speed-Wise</ar><jp>Speed-Wise</jp><cn></cn></textItem><textItem identifier="txt_lvldesc9"><en_us>Up the Mountain</en_us><en_uk>Up the Mountain</en_uk><nl>Bergbeklimmer</nl><fr>Là haut, dans la montagne</fr><de>Den Berg hoch</de><es>Subir la montaña</es><br>Montanha Acima</br><pt>Montanha Acima</pt><it>Su per la montagna</it><se>Upp för berget</se><pl>Pod górę</pl><ru>В гору</ru><id>Puncak Pengunungan</id><ar>Up the Mountain</ar><jp>Up the Mountain</jp><cn></cn></textItem><textItem identifier="txt_lvldesc10"><en_us>Gravity Madness</en_us><en_uk>Gravity Madness</en_uk><nl>Zwaartekrachtig</nl><fr>Ivresse de la gravité</fr><de>Verrückte Schwerkraft</de><es>Locura de gravedad</es><br>Loucura de Gravidade</br><pt>A Loucura da Gravidade</pt><it>Pazzia gravitante</it><se>Galen tyngdkraft</se><pl>Szaleństwo grawitacji</pl><ru>Преодолевая силу тяжести</ru><id>Kehebohan Gravitas</id><ar>Gravity Madness</ar><jp>Gravity Madness</jp><cn></cn></textItem><textItem identifier="txt_lvldesc11"><en_us>Stonehenge Is Missing</en_us><en_uk>Stonehenge Is Missing</en_uk><nl>Waar is Stonehenge?</nl><fr>Stonehenge est perdu</fr><de>Stonehenge fehlt</de><es>Falta Stonehenge</es><br>Faltou o Stonehenge</br><pt>Stonehenge Desapareceu</pt><it>Manca Stonehenge</it><se>Stenar å sånt</se><pl>Zaginione Stonehenge</pl><ru>Пропажа камней</ru><id>Tumpukan Batu Hilang</id><ar>Stonehenge Is Missing</ar><jp>Stonehenge Is Missing</jp><cn></cn></textItem><textItem identifier="txt_lvldesc12"><en_us>Colloseum</en_us><en_uk>Colloseum</en_uk><nl>Colosseum</nl><fr>Colisée</fr><de>Kolloseum</de><es>Coliseo</es><br>Coliseu</br><pt>Coliseu</pt><it>Colosseo</it><se>Colloseum</se><pl>Koloseum</pl><ru>Колизей</ru><id>Koloseum</id><ar>Colloseum</ar><jp>Colloseum</jp><cn></cn></textItem><textItem identifier="txt_lvldesc13"><en_us>Pit Walker</en_us><en_uk>Pit Walker</en_uk><nl>Kuilduiker</nl><fr>Franchisseur de gouffre</fr><de>Grubenläufer</de><es>Caminante de fosos</es><br>Andando Sobre o Buraco</br><pt>Caminhar no Poço</pt><it>Cammina nel box</it><se>Grop-promenad</se><pl>Spacer po dziurach</pl><ru>Преодолевая ямы</ru><id>Berjalan pada Lubang</id><ar>Pit Walker</ar><jp>Pit Walker</jp><cn></cn></textItem><textItem identifier="txt_lvldesc14"><en_us>Pit Jumper</en_us><en_uk>Pit Jumper</en_uk><nl>Kuilspringer</nl><fr>Saut par-dessus le gouffre</fr><de>Grubenspringer</de><es>Saltador de fosos</es><br>Saltando Sobre o Buraco</br><pt>Saltar no Poço</pt><it>Salta nel box</it><se>Grophopp</se><pl>Skoki nad dziurami</pl><ru>Перепрыгивая ямы</ru><id>Melompati Lubang</id><ar>Pit Jumper</ar><jp>Pit Jumper</jp><cn></cn></textItem><textItem identifier="txt_lvldesc15"><en_us>Pit Crawler</en_us><en_uk>Pit Crawler</en_uk><nl>Kuilkruiper</nl><fr>Au pas camarade</fr><de>Grubenkrabbler</de><es>Reptador de fosos</es><br>Rastejando no Buraco</br><pt>Rastejar no Poço</pt><it>Striscia nel box</it><se>Gropkravla</se><pl>Pełzając w dziurach</pl><ru>Переползая ямы</ru><id>Merayap pada Lubang</id><ar>Pit Crawler</ar><jp>Pit Crawler</jp><cn></cn></textItem><textItem identifier="txt_lvldesc16"><en_us>Vertical Limit</en_us><en_uk>Vertical Limit</en_uk><nl>Verticale limiet</nl><fr>Limite verticale</fr><de>Steilwand</de><es>Límite vertical</es><br>Limite Vertical</br><pt>Limite Vertical</pt><it>Limite verticale</it><se>Lodrät gräns</se><pl>Ograniczona wysokość</pl><ru>Выше некуда</ru><id>Terjal</id><ar>Vertical Limit</ar><jp>Vertical Limit</jp><cn></cn></textItem><textItem identifier="txt_lvldesc17"><en_us>Enemy Territory</en_us><en_uk>Enemy Territory</en_uk><nl>Vijandig gebied</nl><fr>Territoire ennemi</fr><de>Feindliches Gebiet</de><es>Territorio enemigo</es><br>Território Inimigo</br><pt>Território Inimigo</pt><it>Territorio nemico</it><se>Fiendeområde</se><pl>Terytorium wroga</pl><ru>Вражеская территория</ru><id>Wilayah Musuh</id><ar>Enemy Territory</ar><jp>Enemy Territory</jp><cn></cn></textItem><textItem identifier="txt_lvldesc18"><en_us>Enemy Sighted</en_us><en_uk>Enemy Sighted</en_uk><nl>Vijand in zicht</nl><fr>Ennemi en vue</fr><de>Feind gesichtet</de><es>Enemigo a la vista</es><br>Inimigo à Vista</br><pt>Inimigo à Vista</pt><it>Avvistato il nemico</it><se>Fiende siktad</se><pl>Nadchodzi wróg</pl><ru>Враг на горизонте!</ru><id>Pengintaian Musuh</id><ar>Enemy Sighted</ar><jp>Enemy Sighted</jp><cn></cn></textItem><textItem identifier="txt_lvldesc19"><en_us>How Long Can You Go?</en_us><en_uk>How Long Can You Go?</en_uk><nl>Hoe lang houd je het vol?</nl><fr>Jusqu'où pourras-tu aller ?</fr><de>Wie weit kommst du?</de><es>¿Cuánto puedes resistir?</es><br>Até Onde Você Vai?</br><pt>Até Onde Aguentas?</pt><it>Quanto a lungo puoi resistere?</it><se>Hur långt kan du nå?</se><pl>Jak daleko dotrzesz?</pl><ru>Чем дальше, тем лучше</ru><id>Seberapa Lama Kamu Bertahan?</id><ar>How Long Can You Go?</ar><jp>How Long Can You Go?</jp><cn></cn></textItem><textItem identifier="txt_lvldesc20"><en_us>Bigfoot Great Escape</en_us><en_uk>Bigfoot Great Escape</en_uk><nl>De grote ontsnapping van Bigfoot</nl><fr>La Grande évasion de Bigfoot</fr><de>Die große Flucht des Yetis</de><es>La gran evasión de Bigfoot</es><br>A Grande Fuga do Pé-Grande</br><pt>Grande Fuga do Bigfoot</pt><it>La grande fuga del piedone</it><se>Den stora flykten</se><pl>Ucieczka Wielkiej Stopy</pl><ru>Побег снежного человека</ru><id>Jalan Keluar Si Kaki Besar</id><ar>Bigfoot Great Escape</ar><jp>Bigfoot Great Escape</jp><cn></cn></textItem><textItem identifier="txt_lvldesc21"><en_us>Annoying Bird</en_us><en_uk>Annoying Bird</en_uk><nl>Rare vogel</nl><fr>Oiseau de malheur</fr><de>Nerviger Vogel</de><es>Pájaro molesto</es><br>Pássaro Irritante</br><pt>Pássaro Irritante</pt><it>Uccello fastidioso</it><se>Störig fågel</se><pl>Irytujący ptak</pl><ru>Надоедливая птица</ru><id>Burung Menjengkelkan</id><ar>Annoying Bird</ar><jp>Annoying Bird</jp><cn></cn></textItem><textItem identifier="txt_lvldesc22"><en_us>Two Smoking Barrels</en_us><en_uk>Two Smoking Barrels</en_uk><nl>Hete geweren</nl><fr>Deux barils fumants</fr><de>Zwei qualmende Fässer</de><es>Dos cañones humeantes</es><br>Duas Armas Quentes</br><pt>Dois Barris Fumegantes</pt><it>Due canne fumanti</it><se>Två rykande pipor</se><pl>Dwie płonące beczki</pl><ru>Дымящиеся стволы</ru><id>Dua Senapan Laras Panjang</id><ar>Two Smoking Barrels</ar><jp>Two Smoking Barrels</jp><cn></cn></textItem><textItem identifier="txt_lvldesc23"><en_us>Heavy Rain</en_us><en_uk>Heavy Rain</en_uk><nl>Zware regen</nl><fr>Pluie battante</fr><de>Heftiger Regen</de><es>Lluvia torrencial</es><br>Chuva Pesada</br><pt>Grande Chuvada</pt><it>Pioggia battente</it><se>Ösregn</se><pl>Ulewa</pl><ru>Под дождем</ru><id>Hujan Deras</id><ar>Heavy Rain</ar><jp>Heavy Rain</jp><cn></cn></textItem><textItem identifier="txt_lvldesc24"><en_us>Fortress</en_us><en_uk>Fortress</en_uk><nl>Fort</nl><fr>Forteresse</fr><de>Festung</de><es>Fortaleza</es><br>Fortaleza</br><pt>Fortaleza</pt><it>Fortezza</it><se>Fortet</se><pl>Forteca</pl><ru>Крепость</ru><id>Benteng</id><ar>Fortress</ar><jp>Fortress</jp><cn></cn></textItem><textItem identifier="txt_lvldesc25"><en_us>Death Valley</en_us><en_uk>Death Valley</en_uk><nl>Vallei des doods</nl><fr>Vallée de la mort</fr><de>Tal des Todes</de><es>Valle de la Muerte</es><br>Vale da Morte</br><pt>Vale da Morte</pt><it>Valle della Morte</it><se>Dödens dal</se><pl>Dolina Śmierci</pl><ru>Долина смерти</ru><id>Lembah Maut</id><ar>Death Valley</ar><jp>Death Valley</jp><cn></cn></textItem><textItem identifier="txt_avaipart"><en_us>AVAILABLE PARTS</en_us><en_uk>AVAILABLE PARTS</en_uk><nl>BESCHIKBARE ONDERDELEN</nl><fr>PIÈCES DISPONIBLES</fr><de>VERFÜGBARE TEILE</de><es>PARTES DISPONIBLES</es><br>PEÇAS DISPONÍVEIS</br><pt>PEÇAS DISPONÍVEIS</pt><it>PEZZI DISPONIBILI</it><se>TILLGÄNGLIGA DELAR</se><pl>DOSTĘPNE CZĘŚCI</pl><ru>ДОСТУПНЫЕ ЧАСТИ</ru><id>KOMPONEN YANG TERSEDIA</id><ar>AVAILABLE PARTS</ar><jp>AVAILABLE PARTS</jp><cn></cn></textItem><textItem identifier="txt_scroll"><en_us>SCROLL</en_us><en_uk>SCROLL</en_uk><nl>SCROLLEN</nl><fr>FAIRE DÉFILER</fr><de>VERSCHIEBEN</de><es>DESPLAZAMIENTO</es><br>ROLAR</br><pt>DESLOCAMENTO</pt><it>FAI SCORRERE</it><se>BLÄDDRA</se><pl>PRZEWIŃ</pl><ru>ПРОСМОТР</ru><id>GULIR</id><ar>SCROLL</ar><jp>SCROLL</jp><cn></cn></textItem><textItem identifier="btn_mainmenu"><en_us>MAIN MENU</en_us><en_uk>MAIN MENU</en_uk><nl>HOOFDMENU</nl><fr>MENU PRINCIPAL</fr><de>HAUPTMENÜ</de><es>MENÚ PRINCIPAL</es><br>MENU PRINCIPAL</br><pt>MENU PRINCIPAL</pt><it>MENU PRINCIPALE</it><se>HUVUDMENY</se><pl>MENU GŁÓWNE</pl><ru>ГЛАВНОЕ МЕНЮ</ru><id>MENU UTAMA</id><ar>MAIN MENU</ar><jp>MAIN MENU</jp><cn></cn></textItem><textItem identifier="btn_retry"><en_us>RETRY</en_us><en_uk>RETRY</en_uk><nl>OPNIEUW</nl><fr>RÉESSAYER</fr><de>NOCHMAL VERSUCHEN</de><es>VOLVER A INTENTAR</es><br>TENTAR DE NOVO</br><pt>TENTAR NOVAMENTE</pt><it>RIPROVA</it><se>FÖRSÖK IGEN</se><pl>SPRÓBUJ PONOWNIE</pl><ru>СНАЧАЛА</ru><id>COBA LAGI</id><ar>RETRY</ar><jp>RETRY</jp><cn></cn></textItem><textItem identifier="btn_reply"><en_us>REPLAY</en_us><en_uk>REPLAY</en_uk><nl>OPNIEUW SPELEN</nl><fr>REJOUER</fr><de>NOCHMAL SPIELEN</de><es>VOLVER A JUGAR</es><br>REPLAY</br><pt>REPETIR</pt><it>RIGIOCA</it><se>SPELA OM</se><pl>POWTÓRZ</pl><ru>ЕЩЕ РАЗ</ru><id>PUTAR LAGI</id><ar>REPLAY</ar><jp>REPLAY</jp><cn></cn></textItem><textItem identifier="btn_nextlevel"><en_us>NEXT LEVEL</en_us><en_uk>NEXT LEVEL</en_uk><nl>VOLGENDE LEVEL</nl><fr>NIVEAU SUIVANT</fr><de>NÄCHSTER LEVEL</de><es>SIGUIENTE NIVEL</es><br>PRÓXIMA FASE</br><pt>NÍVEL SEGUINTE</pt><it>PROSSIMO LIVELLO</it><se>NÄSTA NIVÅ</se><pl>NASTĘPNY POZIOM</pl><ru>СЛЕД. УРОВЕНЬ</ru><id>LEVEL BERIKUTNYA</id><ar>NEXT LEVEL</ar><jp>NEXT LEVEL</jp><cn></cn></textItem><textItem identifier="txt_options"><en_us>OPTIONS</en_us><en_uk>OPTIONS</en_uk><nl>OPTIES</nl><fr>OPTIONS</fr><de>OPTIONEN</de><es>OPCIONES</es><br>OPÇÕES</br><pt>OPÇÕES</pt><it>OPZIONI</it><se>ALTERNATIV</se><pl>OPCJE</pl><ru>НАСТРОЙКИ</ru><id>OPSI</id><ar>OPTIONS</ar><jp>OPTIONS</jp><cn></cn></textItem><textItem identifier="txt_display"><en_us>GRAPHICS</en_us><en_uk>GRAPHICS</en_uk><nl>GRAPHICS</nl><fr>GRAPHISME</fr><de>GRAFIK</de><es>CALIDAD GRÁFICA</es><br>GRÁFICOS</br><pt>GRÁFICOS</pt><it>GRAFICA</it><se>GRAFIK</se><pl>GRAFIKA</pl><ru>КАЧЕСТВО</ru><id>GRAFIS</id><ar>GRAPHICS</ar><jp>GRAPHICS</jp><cn></cn></textItem><textItem identifier="txt_low"><en_us>LOW</en_us><en_uk>LOW</en_uk><nl>LAAG</nl><fr>BASSE</fr><de>NIEDRIG</de><es>BAJA</es><br>BÁSICOS</br><pt>BAIXO</pt><it>BASSA</it><se>LÅG</se><pl>NISKA</pl><ru>НИЗКОЕ</ru><id>RENDAH</id><ar>LOW</ar><jp>LOW</jp><cn></cn></textItem><textItem identifier="txt_medium"><en_us>NORMAL </en_us><en_uk>NORMAL </en_uk><nl>NORMAAL</nl><fr>NORMALE</fr><de>NORMAL</de><es>NORMAL</es><br>NORMAIS</br><pt>NORMAL</pt><it>NORMALE</it><se>NORMAL</se><pl>ŚREDNIA</pl><ru>СРЕДНЕЕ</ru><id>NORMAL</id><ar>NORMAL </ar><jp>NORMAL </jp><cn></cn></textItem><textItem identifier="txt_high"><en_us>BEST</en_us><en_uk>BEST</en_uk><nl>HOOG</nl><fr>HAUTE</fr><de>HOCH</de><es>ALTA</es><br>ÓTIMOS</br><pt>MELHOR</pt><it>ALTA</it><se>HÖG</se><pl>DOBRA</pl><ru>ВЫСОКОЕ</ru><id>TERBAIK</id><ar>BEST</ar><jp>BEST</jp><cn></cn></textItem><textItem identifier="txt_sound"><en_us>SOUND</en_us><en_uk>SOUND</en_uk><nl>GELUID</nl><fr>SON</fr><de>TON</de><es>SONIDO</es><br>SOM</br><pt>SOM</pt><it>AUDIO</it><se>LJUD</se><pl>DŹWIĘK</pl><ru>ЗВУК</ru><id>SUARA</id><ar>SOUND</ar><jp>SOUND</jp><cn></cn></textItem><textItem identifier="txt_on"><en_us>ON</en_us><en_uk>ON</en_uk><nl>AAN</nl><fr>ACTIVÉ</fr><de>AN</de><es>SÍ</es><br>LIGADO</br><pt>ON</pt><it>ON</it><se>PÅ</se><pl>WŁĄCZ</pl><ru>ДА</ru><id>HIDUP</id><ar>ON</ar><jp>ON</jp><cn></cn></textItem><textItem identifier="txt_off"><en_us>OFF</en_us><en_uk>OFF</en_uk><nl>UIT</nl><fr>DÉSACTIVÉ</fr><de>AUS</de><es>NO</es><br>DESLIGADO</br><pt>OFF</pt><it>OFF</it><se>AV</se><pl>WYŁĄCZ</pl><ru>НЕТ</ru><id>MATI</id><ar>OFF</ar><jp>OFF</jp><cn></cn></textItem><textItem identifier="btn_hint"><en_us>HINTS</en_us><en_uk>HINTS</en_uk><nl>HINTS</nl><fr>INDICES</fr><de>HINWEISE</de><es>PISTAS</es><br>DICAS</br><pt>DICAS</pt><it>AIUTINI</it><se>TIPS</se><pl>PODPOWIEDZI</pl><ru>ПОДСКАЗКИ</ru><id>PETUNJUK</id><ar>HINTS</ar><jp>HINTS</jp><cn></cn></textItem><textItem identifier="btn_backtomenu"><en_us>BACK TO MAIN MENU</en_us><en_uk>BACK TO MAIN MENU</en_uk><nl>TERUG NAAR HOOFDMENU</nl><fr>RETOUR AU MENU PRINCIPAL</fr><de>ZURÜCK ZUM HAUPTMENÜ</de><es>VOLVER AL MENÚ PRINCIPAL</es><br>VOLTAR AO MENU PRINCIPAL</br><pt>VOLTAR AO MENU PRINCIPAL</pt><it>INDIETRO AL MENU PRINCIPALE</it><se>TILL HUVUDMENY</se><pl>POWRÓT DO MENU GŁÓWNEGO</pl><ru>ВЕРНУТЬСЯ В МЕНЮ</ru><id>KEMBALI KE MENU UTAMA</id><ar>BACK TO MAIN MENU</ar><jp>BACK TO MAIN MENU</jp><cn></cn></textItem><textItem identifier="txt_resume"><en_us>RESUME</en_us><en_uk>RESUME</en_uk><nl>DOORSPELEN</nl><fr>REPRENDRE</fr><de>WEITERSPIELEN</de><es>REANUDAR</es><br>CONTINUAR</br><pt>RETOMAR</pt><it>RIPRENDI</it><se>ÅTERGÅ</se><pl>KONTYNUUJ</pl><ru>ПРОДОЛЖИТЬ</ru><id>LANJUTKAN</id><ar>RESUME</ar><jp>RESUME</jp><cn></cn></textItem><textItem identifier="txt_hinttitle"><en_us>TAKIN' TOO LONG, HUH?</en_us><en_uk>TAKING TOO LONG, EH?</en_uk><nl>DUURT WAT LANG, HE?</nl><fr>ALORS ? T'ES TROP LENT ?</fr><de>DAUERT ES DIR ZU LANGE?</de><es>¿ESTÁ COSTANDO, EH?</es><br>ESTÁ DEMORANDO, HEIN?</br><pt>NÃO ESTÁS A DEMORAR MUITO?</pt><it>CI IMPIEGA UN PO' TROPPO, EH?</it><se>TAR FÖR LÅNG TID, VA?</se><pl>NIE WYCHODZI, CO?</pl><ru>ЧТО, НЕ ПОЛУЧАЕТСЯ?</ru><id>TERLALU LAMA, KAN?</id><ar>TAKIN' TOO LONG, HUH?</ar><jp>TAKIN' TOO LONG, HUH?</jp><cn></cn></textItem><textItem identifier="txt_hint1"><en_us>Woooooweeee, it's Level 1! You can always check out the tutorial again under How to Play on the Main Menu if you're not sure what to do.</en_us><en_uk>Woooooweeee, it's Level 1! You can always check out the tutorial again under How to Play on the Main Menu if you're not sure what to do.</en_uk><nl>Woooooow, level 1! Als je vergeten bent hoe het moest, kun je altijd even de tutorial bekijken bij de spelregels in het hoofdmenu.</nl><fr>YOUHOU, voici le niveau 1 ! Tu peux toujours te rendre au cours d'instructions sous 'Instructions' dans le menu principal si tu ne sais pas trop ce que tu dois faire.</fr><de>Jippie, Level 1! Du kannst dir jederzeit im Hauptmenü unter Spielanleitung das Tutorial noch einmal ansehen, wenn du nicht genau weißt, was du tun sollst.</de><es>Eeeeeeoooooo, ¡es el nivel 1! Si no estás seguro de qué tienes que hacer, siempre puedes volver a consultar el tutorial en Cómo jugar del Menú principal.</es><br>Obaaaa, é a Fase 1! Você pode conferir de novo o tutorial na seção Como Jogar do Menu Principal, se não souber o que fazer.</br><pt>Vivaaaaa, é o Nível 1! Se não sabes bem o que fazer, podes sempre ver o tutorial outra vez em Como Jogar no Menu Principal.</pt><it>Wow, è il livello 1! Se non sei sicuro di sapere cosa devi fare puoi sempre dare un'altra occhiata al tutorial posto sotto "come giocare" nel menu principale.</it><se>Tjohoooo, nivå 1! Du kan alltid kolla in lektionsavsnittet igen under "Så spelar man" på huvudmenyn om du vill få spelet förklarat.</se><pl>Łaaaaał, mamy poziom 1! Zawsze możesz wrócić do tutorialu pod zakładką Jak grać w Menu głównym, jeśli nie jesteś pewny, co zrobić.</pl><ru>А вот и первый уровень! Если тебе непонятно, что нужно делать, пройди обучение, нажав "Как играть" в главном меню.</ru><id>Woooooweeee, Level 1! Kamu selalu bisa melihat lagi tutorial di bawah Cara Bermain pada Menu Utama kalau tidak tahu apa yang harus dilakukan.</id><ar>Woooooweeee, it's Level 1! You can always check out the tutorial again under How to Play on the Main Menu if you're not sure what to do.</ar><jp>Woooooweeee, it's Level 1! You can always check out the tutorial again under How to Play on the Main Menu if you're not sure what to do.</jp><cn></cn></textItem><textItem identifier="txt_hint2"><en_us>Tigers are better jumpers than turtles.</en_us><en_uk>Tigers are better jumpers than turtles.</en_uk><nl>Tijgers springen beter dan schildpadden.</nl><fr>Les lièvres sautent mieux que les tortues.</fr><de>Tiger können besser springen als Schildkröten.</de><es>Los tigres saltan mejor que las tortugas.</es><br>Tigres saltam melhor do que tartarugas.</br><pt>Os tigres saltam melhor do que as tartarugas.</pt><it>Le tigri saltano meglio delle tartarughe.</it><se>Tigrar hoppar bättre än sköldpaddor.</se><pl>Tygrysy skaczą lepiej niż żółwie.</pl><ru>Тиграм прыжки удаются лучше, чем черепахам.</ru><id>Macan lebih pandai melompat daripada kura-kura.</id><ar>Tigers are better jumpers than turtles.</ar><jp>Tigers are better jumpers than turtles.</jp><cn></cn></textItem><textItem identifier="txt_hint3"><en_us>Big tires are useful for clearing obstacles.</en_us><en_uk>Big tyres are useful for clearing obstacles.</en_uk><nl>Grote banden zijn handig om grote obstakels uit te weg te krijgen.</nl><fr>Les gros pneus sont plus pratiques pour surmonter les obstacles.</fr><de>Mit großen Rädern kommt man besser über Hindernisse hinweg.</de><es>Los neumáticos grandes son útiles para superar obstáculos.</es><br>Rodas grandes são úteis para passar por obstáculos.</br><pt>Os pneus grandes são úteis para ultrapassar obstáculos.</pt><it>Le gomme grandi sono utili per superare gli ostacoli.</it><se>Stora hjul klarar hinder bättre.</se><pl>Duże koła są dobre do usuwania przeszkód.</pl><ru>Большие шины обычно используются для преодоления препятствий.</ru><id>Roda besar berguna untuk menyapu rintangan.</id><ar>Big tires are useful for clearing obstacles.</ar><jp>Big tires are useful for clearing obstacles.</jp><cn></cn></textItem><textItem identifier="txt_hint4"><en_us>Try a new engine?</en_us><en_uk>Try a new engine?</en_uk><nl>Misschien een nieuwe motor?</nl><fr>Essayer un nouveau moteur ?</fr><de>Zeit für einen neuen Motor?</de><es>¿Qué tal un motor nuevo?</es><br>Que tal um motor novo?</br><pt>Queres experimentar um motor novo?</pt><it>Vuoi provare con un nuovo motore?</it><se>Kanske prova en ny motor?</se><pl>Wypróbujesz nowy silnik?</pl><ru>Может, попробуем новый двигатель?</ru><id>Mau coba mesin baru?</id><ar>Try a new engine?</ar><jp>Try a new engine?</jp><cn></cn></textItem><textItem identifier="txt_hint5"><en_us>Maybe a bridge would clear the gap…</en_us><en_uk>Maybe a bridge would clear the gap…</en_uk><nl>Misschien helpt een brug je verder...</nl><fr>Un pont pourrait peut-être t'aider ?</fr><de>Vielleicht könnte eine Brücke die Lücke schließen...</de><es>A lo mejor con un puente se puede atravesar el hueco...</es><br>Talvez uma ponte sirva para passar pelo buraco...</br><pt>Talvez uma ponte ajude a passar o fosso...</pt><it>Forse un ponte potrebbe aiutarti a superare questo salto…</it><se>En bro kanske kan överbrygga gapet...</se><pl>Może most usunąłby lukę?</pl><ru>Попробуем построить мост?</ru><id>Mungkin jembatan bisa mengatasi celah...</id><ar>Maybe a bridge would clear the gap…</ar><jp>Maybe a bridge would clear the gap…</jp><cn></cn></textItem><textItem identifier="txt_hint6"><en_us>Concrete is destructible.</en_us><en_uk>Concrete is destructible.</en_uk><nl>Beton is ook te slopen.</nl><fr>Le béton peut se détruire.</fr><de>Beton ist unzerstörbar.</de><es>El hormigón se puede destruir.</es><br>O concreto pode ser destruído.</br><pt>Pode-se destruir cimento.</pt><it>Il cemento è distruttibile.</it><se>Betong kan krossas.</se><pl>Beton też się niszczy.</pl><ru>Бетон можно разрушить...</ru><id>Beton tidak bisa dihancurkan.</id><ar>Concrete is destructible.</ar><jp>Concrete is destructible.</jp><cn></cn></textItem><textItem identifier="txt_hint7"><en_us>You need something to "touch" the flag.</en_us><en_uk>You need something to "touch" the flag.</en_uk><nl>Je moet de vlag ergens mee “aanraken”.</nl><fr>Tu as besoin de quelque chose pour "toucher" le drapeau.</fr><de>Du brauchst etwas, um die Fahne zu „berühren“.</de><es>Necesitas algo para "tocar" la bandera.</es><br>Você precisa de alguma coisa para "tocar" a bandeira.</br><pt>Precisas de algo para “tocar” na bandeira.</pt><it>Hai bisogno di qualcosa per "toccare" la bandierina.</it><se>Du behöver något att "nudda" flaggan med.</se><pl>Potrzebujesz czegoś, aby "dotknąć" flagi.</pl><ru>Флага достаточно коснуться!</ru><id>Kamu perlu sesuatu untuk “menyentuh” bendera.</id><ar>You need something to "touch" the flag.</ar><jp>You need something to "touch" the flag.</jp><cn></cn></textItem><textItem identifier="txt_hint8"><en_us>Different combos of tires and engines will affect your craft's performance.</en_us><en_uk>Different combos of tyres and engines will affect the performance of your craft.</en_uk><nl>Verschillende combinaties van motor en banden leveren verschillende voertuigprestaties.</nl><fr>Une différente combinaison des pneus et des moteurs modifiera la performance de ton véhicule.</fr><de>Verschiedene Kombinationen aus Rädern und Motoren beeinflussen die Leistung deines Fahrzeugs.</de><es>Las distintas combinaciones de neumáticos y motores afectarán al comportamiento de tu vehículo.</es><br>Combinações diferentes de rodas e motores afetam o desempenho do seu veículo.</br><pt>As diferentes combinações de motores e pneus afectam o desempenho do teu veículo.</pt><it>Le diverse combinazioni di gomme e motori influiranno sul rendimento del tuo veicolo.</it><se>Olika kombinationer av hjul och motor påverkar ditt fordons prestanda.</se><pl>Różne kombinacje kół i silników wpłyną na funkcjonowanie twojego pojazdu.</pl><ru>Попробуй различные сочетания шин и двигателей.</ru><id>Paduan roda dan mesin yang berbeda akan mempengaruhi kinerja kereta luncur.</id><ar>Different combos of tires and engines will affect your craft's performance.</ar><jp>Different combos of tires and engines will affect your craft's performance.</jp><cn></cn></textItem><textItem identifier="txt_hint9"><en_us>Use stairs to climb up the hill.</en_us><en_uk>Use stairs to climb up the hill.</en_uk><nl>Gebruik een trap om de heuvel te beklimmen.</nl><fr>Utilise des escaliers pour monter.</fr><de>Verwende eine Treppe, um den Hügel zu erklimmen.</de><es>Usa escaleras para trepar por la colina.</es><br>Use escadas para subir pela colina.</br><pt>Usa escadas para subir a colina.</pt><it>Usa le scale per salire sulla collina.</it><se>Använd trappor för att klättra upp för backen.</se><pl>Wykorzystaj schody, aby wspiąć się na wzgórze.</pl><ru>Используй лестницу, чтобы подняться на гору.</ru><id>Gunakan tangga untuk memanjat bukit.</id><ar>Use stairs to climb up the hill.</ar><jp>Use stairs to climb up the hill.</jp><cn></cn></textItem><textItem identifier="txt_hint10"><en_us>You can climb like crazy with the turbo engine.</en_us><en_uk>You can climb like crazy with the turbo engine.</en_uk><nl>Met de turbomotor klim je als 'n gek.</nl><fr>Tu peux super bien grimper avec un moteur turbo.</fr><de>Mit dem Turbomotor bist du ein echter Klettermeister.</de><es>Puedes trepar como loco con el motor turbo.</es><br>Você pode subir bastante com o motor turbo.</br><pt>Com o motor turbo podes subir a sério.</pt><it>Con il motore turbo potrai salire in modo pazzesco.</it><se>Med turbomotorn kan du klättra superbra.</se><pl>Z silnikiem turbo możesz wspinać się w szaleńczym tempie.</pl><ru>Используй сверхмощный двигатель, чтобы пулей взлететь вверх!</ru><id>Kamu bisa memanjat secepat kilat dengan mesin turbo.</id><ar>You can climb like crazy with the turbo engine.</ar><jp>You can climb like crazy with the turbo engine.</jp><cn></cn></textItem><textItem identifier="txt_hint11"><en_us>Make yourself a custom track to get across.</en_us><en_uk>Make yourself a custom track to get across.</en_uk><nl>Maak een eigen baan om verder te komen.</nl><fr>Tu peux te faire une piste sur mesure pour arriver de l'autre côté.</fr><de>Erschaff dir deine eigene Strecke um drüberzukommen.</de><es>Hazte una pista a medida para cruzar.</es><br>Monte uma pista personalizada para atravessar.</br><pt>Para atravessares, faz uma pista personalizada.</pt><it>Costruisciti una pista per attraversare.</it><se>Skapa en egen väg som tar dig över.</se><pl>Zrób sobie zwykły tor, aby przejechać.</pl><ru>Создай собственную дорогу, чтобы преодолеть препятствие.</ru><id>Kenali jalur untuk bisa sampai ke ujung.</id><ar>Make yourself a custom track to get across.</ar><jp>Make yourself a custom track to get across.</jp><cn></cn></textItem><textItem identifier="txt_hint12"><en_us>It's about time to show off your craft The Gladiator!</en_us><en_uk>It's about time to show off your craft The Gladiator!</en_uk><nl>Tijd om met je voertuig “de Gladiator” te pronken!</nl><fr>Le moment est venu de mettre en valeur ta machine "Le gladiateur" !</fr><de>Es wird Zeit, den Gladiator rauszulassen!</de><es>¡Es hora de enseñarle tu vehículo al gladiador!</es><br>É hora de mostrar seu veículo novo: o Gladiador!</br><pt>É altura de exibires o teu veículo, O Gladiador!</pt><it>È proprio ora di fare sfoggio del tuo veicolo, "il Gladiatore"!</it><se>Det är dags att visa vad ditt fordon "Gladiatorn" går för!</se><pl>Najwyższy czas pochwalić się pojazdem Gladiator!</pl><ru>Пора похвастаться новой машиной, "Гладиатором"!</ru><id>Sudah waktunya untuk memamerkan kereta luncur kamu, Sang Gladiator!</id><ar>It's about time to show off your craft The Gladiator!</ar><jp>It's about time to show off your craft The Gladiator!</jp><cn></cn></textItem><textItem identifier="txt_hint13"><en_us>The huge one should be in the center of the body.</en_us><en_uk>The huge one should be in the centre of the body.</en_uk><nl>Die grote hoort in het midden van de carrosserie.</nl><fr>Ce qui est énorme devrait être au centre de la machine.</fr><de>Der große gehört in die Mitte des Chassis.</de><es>El más grande debería ir en el centro del cuerpo.</es><br>A maior deve ficar no meio da carroceria.</br><pt>O grande deve estar no centro da carroçaria.</pt><it>Quello enorme dovrebbe essere al centro della carrozzeria.</it><se>Den stora delen ska vara i mitten av karossen.</se><pl>Ten duży powinien znaleźć się w centrum nadwozia.</pl><ru>Установи самое большое посередине кузова.</ru><id>Yang besar harus di tengah bodi.</id><ar>The huge one should be in the center of the body.</ar><jp>The huge one should be in the center of the body.</jp><cn></cn></textItem><textItem identifier="txt_hint14"><en_us>Use the turbo engine.</en_us><en_uk>Use the turbo engine.</en_uk><nl>Gebruik de turbomotor.</nl><fr>Utilise le moteur turbo.</fr><de>Verwende den Turbomotor.</de><es>Usa el motor turbo.</es><br>Use o motor turbo.</br><pt>Usa o motor turbo.</pt><it>Usa il motore turbo.</it><se>Använd turbomotorn.</se><pl>Użyj silnika turbo.</pl><ru>Используй сверхмощный двигатель.</ru><id>Gunakan mesin turbo.</id><ar>Use the turbo engine.</ar><jp>Use the turbo engine.</jp><cn></cn></textItem><textItem identifier="txt_hint15"><en_us>It's the third gap.</en_us><en_uk>It's the third gap.</en_uk><nl>Het is de derde opening.</nl><fr>C'est le troisième gouffre.</fr><de>Es ist die dritte Lücke.</de><es>Es el tercer hueco.</es><br>É o terceiro buraco.</br><pt>É o terceiro fosso.</pt><it>È il terzo salto.</it><se>Det är det tredje hålet.</se><pl>To trzecia luka.</pl><ru>Третья яма...</ru><id>Ini celah ketiga.</id><ar>It's the third gap.</ar><jp>It's the third gap.</jp><cn></cn></textItem><textItem identifier="txt_hint16"><en_us>Two huge tires and turbo engine.</en_us><en_uk>Two huge tyres and turbo engine.</en_uk><nl>Twee enorme banden en een turbomotor.</nl><fr>Deux énormes pneus et un moteur turbo.</fr><de>Zwei große Räder und ein Turbomotor.</de><es>Dos neumáticos enormes y motor turbo.</es><br>Duas rodas grandes e um motor turbo.</br><pt>Dois motores enormes e um motor turbo.</pt><it>Due gomme grandi e un motore turbo.</it><se>Två stora hjul och turbomotorn.</se><pl>Dwa duże koła i silnik turbo.</pl><ru>Сверхмощный двигатель и две здоровенные шины.</ru><id>Dua roda besar dan mesin turbo.</id><ar>Two huge tires and turbo engine.</ar><jp>Two huge tires and turbo engine.</jp><cn></cn></textItem><textItem identifier="txt_hint17"><en_us>Your craft could use something long and horizontal. Line your weapon up the same way.</en_us><en_uk>Your craft could use something long and horizontal. Line your weapon in up the same way.</en_uk><nl>Je voertuig heeft iets langs en horizontaals nodig. Plaats je wapen in dezelfde richting.</nl><fr>Ta machine aurait besoin de quelque chose de long et horizontal. Aligne tes armes dans cette même direction.</fr><de>Dein Fahrzeug braucht etwas Langes, Waagerechtes. Richte deine Waffe auf dieselbe Art aus.</de><es>A tu vehículo le haría falta algo largo y horizontal. Alinea tu arma de la misma forma.</es><br>Seu veículo precisa de alguma coisa longa e horizontal. Alinhe sua arma da mesma maneira.</br><pt>O teu veículo precisa de algo comprido e horizontal. Alinha a tua arma da mesma forma.</pt><it>Il tuo veicolo avrebbe bisogno di qualcosa di lungo e orizzontale. Allinea la tua arma nello stesso modo.</it><se>Ditt fordon behöver något långt och vågrätt. Placera dina vapen åt samma håll.</se><pl>Twój pojazd powinien wykorzystać coś długiego i poziomego. Uszereguj w tem sposób swoje bronie.</pl><ru>Твоей машине нужна длинная горизонтальная часть. Для оружия подойдет тот же принцип.</ru><id>Kereta luncur kamu bisa menggunakan sesuatu yang panjang dan horizontal. Sejajarkan senjatamu ke atas dengan cara yang sama.</id><ar>Your craft could use something long and horizontal. Line your weapon up the same way.</ar><jp>Your craft could use something long and horizontal. Line your weapon up the same way.</jp><cn></cn></textItem><textItem identifier="txt_hint18"><en_us>Pay attention to how you place your weapons; the enemy turrets can break them.</en_us><en_uk>Pay attention to how you place your weapons; the enemy turrets can break them.</en_uk><nl>Let goed op hoe je je wapens plaatst: de vijandelijke schiettorens kunnen ze stukmaken!</nl><fr>Fais attention à la façon dont tu places tes armes ; les tourelles de l'ennemi peuvent les détruire.</fr><de>Achte darauf, wie du deine Waffen anordnest, gegnerische Geschütze können sie zerstören.</de><es>Presta atención a la colocación de tus armas; las torretas enemigas pueden romperlas.</es><br>Preste atenção em como você coloca suas armas; as torres inimigas podem quebrá-las.</br><pt>Tem atenção à maneira como colocas as armas: as torres inimigas podem parti-las.</pt><it>Fai attenzione a dove metti le tue armi; le torrette nemiche possono romperle.</it><se>Var noga med hur du placerar dina vapen, fiendens torn kan förstöra dem.</se><pl>Zwracaj uwagę na to, jak rozmieszczasz swoje bronie - działa wroga mogą je zniszczyć.</pl><ru>Размещай вооружение с умом: вражеские пушки способны его повредить!</ru><id>Perhatikan cara menaruh senjata; menara musuh bisa mematahkannya.</id><ar>Pay attention to how you place your weapons; the enemy turrets can break them.</ar><jp>Pay attention to how you place your weapons; the enemy turrets can break them.</jp><cn></cn></textItem><textItem identifier="txt_hint19"><en_us>You need a durable craft with firepower.</en_us><en_uk>You need a durable craft with firepower.</en_uk><nl>Je hebt een stevig voertuig met schietkracht nodig.</nl><fr>Tu as besoin d'une machine robuste avec une grande puissance de tir.</fr><de>Du brauchst ein stabiles Fahrzeug mit Feuerkraft.</de><es>Necesitas un vehículo resistente con potencia de fuego.</es><br>Você precisa de um veículo durável e com poder de fogo.</br><pt>Precisas de um veículo resistente e com poder de fogo.</pt><it>Hai bisogno di un veicolo resistente dotato di potenza di fuoco.</it><se>Du behöver ett kraftigt fordon med eldkraft.</se><pl>Potrzebujesz solidnego pojazdu z siłą ognia.</pl><ru>Тебе нужна прочная машина с приличной огневой мощью.</ru><id>Kamu perlu kereta luncur yang tangguh dengan mesiu.</id><ar>You need a durable craft with firepower.</ar><jp>You need a durable craft with firepower.</jp><cn></cn></textItem><textItem identifier="txt_hint20"><en_us>The huge tire's not only good for getting through big rocks, ya know…</en_us><en_uk>The huge tyre is not only good for getting through big rocks, you know…</en_uk><nl>De grote band is niet alleen geschikt om door grote stenen te breken, hoor...</nl><fr>Les pneus énormes servent aussi à autre chose qu'à franchir les gros rochers, tu sais…</fr><de>Große Räder helfen nicht nur bei großen Steinen...</de><es>¿Sabes? El neumático enorme no sólo vale para superar grandes rocas...</es><br>Sabe, a roda grande não serve só para passar por pedras grandes...</br><pt>O pneu grande não serve só para ultrapassar pedras grandes, sabes...</pt><it>Quest'enorme gomma non è buona solo per passare sopra le pietre grandi, lo sai?</it><se>Det stora hjulet kan användas till mer än att ta dig över stora stenar ...</se><pl>Wiesz, duże koła nadają się nie tylko do jazdy przez wielkie skały...</pl><ru>Большие шины годятся не только для того, чтобы переезжать через валуны...</ru><id>Roda besar tidak hanya bagus untuk melewati batu karang besar saja tahu....</id><ar>The huge tire's not only good for getting through big rocks, ya know…</ar><jp>The huge tire's not only good for getting through big rocks, ya know…</jp><cn></cn></textItem><textItem identifier="txt_hint21"><en_us>You'll need everything you've got to survive the gunship's fire.</en_us><en_uk>You'll need everything you've got to survive the gunship fire.</en_uk><nl>Gebruik alles wat je hebt om de vuuraanval van het schip te overleven.</nl><fr>Tu auras besoin de tout ce que tu peux avoir pour survivre à l'attaque de ce gunship.</fr><de>Du brauchst alles, was du hast, um das gegnerische Feuer zu überleben.</de><es>Te hará falta todo lo que tienes para sobrevivir a los disparos de la cañonera.</es><br>Você vai precisar de tudo o que tiver para sobreviver aos tiros do helicóptero.</br><pt>Para sobreviveres aos tiros precisas de tudo o que tens.</pt><it>Avrai bisogno di tutto quello che hai per sopravvivere al fuoco dell'elicottero d'assalto.</it><se>Du behöver allt du har för att överleva attackhelikopterns eldgivning.</se><pl>Będziesz potrzebował wszystkiego, co pozwoli ci przeżyć ostrzał ze śmigłowca.</pl><ru>Чтобы уцелеть под огнем орудий, тебе потребуются все имеющиеся части...</ru><id>Kamu perlu segalanya supaya bisa selamat dari tembakan meriam kapal.</id><ar>You'll need everything you've got to survive the gunship's fire.</ar><jp>You'll need everything you've got to survive the gunship's fire.</jp><cn></cn></textItem><textItem identifier="txt_hint22"><en_us>Do it like level 20.</en_us><en_uk>Do it like level 20.</en_uk><nl>Doe hetzelfde als in level 20.</nl><fr>Fais comme au niveau 20.</fr><de>Mach es wie in Level 20.</de><es>Hazlo como en el nivel 20.</es><br>Faça como na fase 20.</br><pt>Faz como no nível 20.</pt><it>Fai come nel livello 20.</it><se>Gör likadant som på nivå 20.</se><pl>Zrób to tak, jak w poziomie 20.</pl><ru>Используй тот же подход, что и на 20 уровне.</ru><id>Lakukan seperti di level 20.</id><ar>Do it like level 20.</ar><jp>Do it like level 20.</jp><cn></cn></textItem><textItem identifier="txt_hint23"><en_us>Protect your engine.</en_us><en_uk>Protect your engine.</en_uk><nl>Bescherm je motor.</nl><fr>Protège ton moteur.</fr><de>Beschütze deinen Motor.</de><es>Protege tu motor.</es><br>Proteja seu motor.</br><pt>Protege o teu motor.</pt><it>Proteggi il tuo motore.</it><se>Skydda din motor.</se><pl>Chroń swój silnik.</pl><ru>Защити двигатель!</ru><id>Lindungi mesin kamu.</id><ar>Protect your engine.</ar><jp>Protect your engine.</jp><cn></cn></textItem><textItem identifier="txt_hint24"><en_us>Protect your engine and take down the concrete.</en_us><en_uk>Protect your engine and take down the concrete.</en_uk><nl>Bescherm je motor en sloop het beton.</nl><fr>Protège ton moteur et démolis le béton.</fr><de>Beschütze deinen Motor und zerstöre den Beton.</de><es>Protege tu motor y derriba el hormigón.</es><br>Proteja seu motor e derrube o concreto.</br><pt>Protege o teu motor e elimina o cimento.</pt><it>Proteggi il tuo motore ed elimina il cemento.</it><se>Skydda din motor och krossa betongen.</se><pl>Chroń swój silnik i zniszcz beton.</pl><ru>Защити двигатель и раздроби бетон!</ru><id>Lindungi mesin kamu dan hancurkan beton.</id><ar>Protect your engine and take down the concrete.</ar><jp>Protect your engine and take down the concrete.</jp><cn></cn></textItem><textItem identifier="txt_hint25"><en_us>Drop the rock from a height to fill the gap…and use any parts you don't need for your craft to do this.</en_us><en_uk>Drop the rock from a height to fill the gap… and use any parts you don't need for your craft to do this.</en_uk><nl>Laat de steen van grote hoogte naar beneden vallen om het gat op te vullen... gebruik hiervoor een willekeurig onderdeel dat je niet voor je voertuig nodig hebt.</nl><fr>Fais tomber le rocher depuis bien haut pour combler le trou…et utilise pour ça toutes les pièces dont tu n'as pas besoin.</fr><de>Lass den Felsen aus großer Höhe fallen, um die Lücke zu schließen...verwende dafür auch alle Teile, die du nicht für dein Fahrzeug brauchst.</de><es>Deja caer la roca desde una altura para cerrar el hueco… y para ello usa cualquier parte que no necesites para tu vehículo.</es><br>Solte a pedra de certa altura para tampar o buraco... para isso, use qualquer peça que não for necessária para o veículo.</br><pt>Larga a pedra de uma grande altura para encheres o fosso... e usa as peças de que não precisas para o teu veículo.</pt><it>Fai cadere la pietra dall'alto per riempire lo spazio…E usa tutti i pezzi che non ti servono per il tuo veicolo per farlo.</it><se>Släpp stenen från en höjd för att fylla hålet. Använd de delar du inte behöver till ditt fordon.</se><pl>Zrzuć kamień z wysokości, aby wypełnić lukę... I użyj do tego dowolnej części, która nie jest potrzebna dla twojego pojazdu.</pl><ru>Яму нужно завалить... Для этого вполне подойдут оставшиеся от сборки машины части.</ru><id>Jatuhkan batu karang dari ketinggian untuk mengisi celah...dan gunakan komponen apa saja yang tidak diperlukan kereta luncur untuk melakukan ini.</id><ar>Drop the rock from a height to fill the gap…and use any parts you don't need for your craft to do this.</ar><jp>Drop the rock from a height to fill the gap…and use any parts you don't need for your craft to do this.</jp><cn></cn></textItem><textItem identifier="txt_theend"><en_us>THE END</en_us><en_uk>THE END</en_uk><nl>EINDE</nl><fr>LA FIN</fr><de>ENDE</de><es>FIN</es><br>FIM</br><pt>FIM</pt><it>FINE</it><se>SLUT</se><pl>KONIEC</pl><ru>КОНЕЦ</ru><id>TAMAT</id><ar>THE END</ar><jp>THE END</jp><cn></cn></textItem><textItem identifier="txt_walkthrough"><en_us>WALKTHROUGH</en_us><en_uk>WALKTHROUGH</en_uk><nl>BEGELEIDING</nl><fr>SOLUTION</fr><de>KOMPLETTLÖSUNG</de><es>SOLUCIÓN</es><br>PASSO-A-PASSO</br><pt>ACOMPANHAMENTO</pt><it>SPIEGAZIONE DETTAGLIATA</it><se>GENOMGÅNG</se><pl>JAK PRZEJŚĆ GRĘ</pl><ru>ПРОХОЖДЕНИЕ</ru><id>MEMPELAJARI</id><ar>WALKTHROUGH</ar><jp>WALKTHROUGH</jp><cn></cn></textItem><textItem identifier="txt_go"><en_us>GO</en_us><en_uk>GO</en_uk><nl>START</nl><fr>GO</fr><de>LOS</de><es>YA</es><br>PARTIR</br><pt>PARTIR</pt><it>VIA</it><se>KÖR</se><pl>JEDŹ</pl><ru>ВПЕРЕД</ru><id>JALAN</id><ar>GO</ar><jp>GO</jp><cn></cn></textItem><textItem identifier="txt_viewtrack"><en_us>VIEW TRACK</en_us><en_uk>VIEW TRACK</en_uk><nl>BAAN BEKIJKEN</nl><fr>VISUALISER LE PARCOURS</fr><de>STRECKE ANSEHEN</de><es>VER PISTA</es><br>VER PISTA</br><pt>VER PISTA</pt><it>VISUALIZZA LA PISTA</it><se>VISA BANA</se><pl>POKAŻ TOR</pl><ru>ОБЗОР ТРАССЫ</ru><id>LIHAT JALUR</id><ar>VIEW TRACK</ar><jp>VIEW TRACK</jp><cn></cn></textItem><textItem identifier="txt_startover"><en_us>START OVER</en_us><en_uk>START OVER</en_uk><nl>OPNIEUW BEGINNEN</nl><fr>RECOMMENCER</fr><de>VERWERFEN</de><es>EMPEZAR DE NUEVO</es><br>COMEÇAR DE NOVO</br><pt>RECOMEÇAR</pt><it>COMINCIA DA CAPO</it><se>BÖRJA OM</se><pl>OD POCZĄTKU</pl><ru>СНАЧАЛА</ru><id>MULAI LAGI</id><ar>START OVER</ar><jp>START OVER</jp><cn></cn></textItem><textItem identifier="txt_skip"><en_us>SKIP</en_us><en_uk>SKIP</en_uk><nl>OVERSLAAN</nl><fr>PASSER</fr><de>ÜBERSPRINGEN</de><es>OMITIR</es><br>PULAR</br><pt>IGNORAR</pt><it>SALTA</it><se>SKIPPA</se><pl>POMIŃ</pl><ru>ПРОПУСТИТЬ</ru><id>LOMPATI</id><ar>SKIP</ar><jp>SKIP</jp><cn></cn></textItem><textItem identifier="txt_giveup"><en_us>GIVE UP</en_us><en_uk>GIVE UP</en_uk><nl>OPGEVEN</nl><fr>ABANDONNER</fr><de>AUFGEBEN</de><es>ME RINDO</es><br>DESISTIR</br><pt>DESISTIR</pt><it>ARRENDITI</it><se>GE UPP</se><pl>PODDAJ SIĘ</pl><ru>СДАТЬСЯ</ru><id>MENYERAH</id><ar>GIVE UP</ar><jp>GIVE UP</jp><cn></cn></textItem><textItem identifier="txt_assemblymode"><en_us>Switch To Assembly Mode</en_us><en_uk>Switch To Assembly Mode</en_uk><nl>NAAR BOUWVENSTER</nl><fr>Passer au mode d'assemblage</fr><de>Zum Baumodus umschalten</de><es>Cambiar a modo Montaje</es><br>Mudar para Modo de Montagem</br><pt>Mudar para o Modo de Montagem</pt><it>Vai alla modalità di assemblaggio</it><se>Växla till Byggläge</se><pl>Przełącz do trybu montażu</pl><ru>Режим сборки</ru><id>Alihkan ke Mode Perakitan</id><ar>Switch To Assembly Mode</ar><jp>Switch To Assembly Mode</jp><cn></cn></textItem></LocalisedText>
;
SpilGame.importXMLv2(xmlData);
trace("Language Data Succesfully included");
stop();
addEventListener(Event.ENTER_FRAME, Loading, false, 0, true);
}
function onServicesReady(_arg1:Event):void{
trace("SpilGamesServices connection ready");
AwardsService.submitAward(award);
}
function frame2(){
Languages.initialize();
SpilGame.initialize("ExampleGame.html", PortalGroup.TWEEN, "ExampleGame.html", this, true);
nextFrame();
}
public function Belugerin():void{
navigateToURL(new URLRequest("http://belugerinstudios.com"), "_blank");
}
function handle_btnWalkthrough(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.agame.com/crazy-craft-walkthrough.html?gamemenu"), "_blank");
}
public static function updateFrameRateTo(_arg1:uint):void{
stageRoot.frameRate = _arg1;
}
}
}//package script
Section 267
//Brand (spill.localisation.Brand)
package spill.localisation {
import flash.xml.*;
public class Brand {
public var domain:String;
public var useGoogleAnalitics:Boolean;// = true
public var emailPage:String;
public var name:String;
public var site_id:uint;
public var isExternal:Boolean;// = false
public var id:Number;
public var hostingDomain:String;// = ""
public var preferedLanguage:String;// = ""
public var moreLink:String;// = ""
public var hasSendToFriendLink:Boolean;// = true
public var portalGroup:uint;
public var emailLink:String;// = "game"
private static const topLevelDoubles:String = (((((((((((((("ac.cn,ac.jp,ac.uk,ad.jp,adm.br,adv.br,agr.br," + "ah.cn,am.br,arq.br,art.br,asn.au,ato.br,av.tr,bel.tr,bio.br,biz.tr,bj.cn,bmd.br,") + "cim.br,cng.br,cnt.br,co.at,co.jp,co.uk,com.au,com.br,com.cn,com.eg,com.hk,com.mx,") + "com.ru,com.tr,com.tw,conf.au,cq.cn,csiro.au,dr.tr,ecn.br,edu.au,edu.br,edu.tr,") + "emu.id.au,eng.br,esp.br,etc.br,eti.br,eun.eg,far.br,fj.cn,fm.br,fnd.br,fot.br,") + "fst.br,g12.br,gb.com,gb.net,gd.cn,gen.tr,ggf.br,gob.mx,gov.au,gov.br,gov.cn,") + "gov.hk,gov.tr,gr.jp,gs.cn,gx.cn,gz.cn,ha.cn,hb.cn,he.cn,hi.cn,hk.cn,hl.cn,hn.cn,") + "id.au,idv.tw,imb.br,ind.br,inf.br,info.au,info.tr,jl.cn,jor.br,js.cn,jx.cn,k12.tr,") + "lel.br,ln.cn,ltd.uk,mat.br,me.uk,med.br,mil.br,mil.tr,mo.cn,mus.br,name.tr,ne.jp,") + "net.au,net.br,net.cn,net.eg,net.hk,net.lu,net.mx,net.ru,net.tr,net.tw,net.uk,") + "nm.cn,no.com,nom.br,not.br,ntr.br,nx.cn,odo.br,oop.br,or.at,or.jp,org.au,org.br,") + "org.cn,org.hk,org.lu,org.ru,org.tr,org.tw,org.uk,plc.uk,pol.tr,pp.ru,ppg.br,pro.br,") + "psc.br,psi.br,qh.cn,qsl.br,rec.br,sc.cn,sd.cn,se.com,se.net,sh.cn,slg.br,sn.cn,") + "srv.br,sx.cn,tel.tr,tj.cn,tmp.br,trd.br,tur.br,tv.br,tw.cn,uk.com,uk.net,vet.br,") + "wattle.id.au,web.tr,xj.cn,xz.cn,yn.cn,zj.cn,zlg.br,co.nr,co.nz,com.fr,com.ph,com.ar,");
public function Brand(){
moreLink = "";
emailLink = "game";
useGoogleAnalitics = true;
hasSendToFriendLink = true;
preferedLanguage = "";
isExternal = false;
hostingDomain = "";
super();
}
public function exportXML():XML{
var _local1:XML;
var _local2:XML;
var _local3:XML;
_local1 = <portal/>
;
_local1.@id = site_id;
_local1.@language = preferedLanguage;
_local1.@channel = portalGroup;
_local2 = <domain/>
;
_local2.appendChild(new XMLNode(3, domain));
_local1.appendChild(_local2);
if (moreLink){
_local3 = <more_games_path/>
;
_local3.appendChild(new XMLNode(3, moreLink));
_local1.appendChild(_local3);
};
_local2 = <game_path/>
;
_local2.appendChild(new XMLNode(3, emailLink));
_local1.appendChild(_local2);
if (!useGoogleAnalitics){
_local1.attributes.noGoogleAnalitics = true;
};
if (!hasSendToFriendLink){
_local1.attributes.noSendToFriendLink = true;
};
return (_local1);
}
private function get utm_source():String{
return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal"));
}
public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{
var _local5:String;
_local5 = ("http://" + domain);
_local5 = (_local5 + ("/" + moreLink));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg2) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg3 = stripSubDomain(_arg3);
if (_arg3 == "localhost"){
_arg3 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg3));
if (((!((_arg4 == ""))) && (!((_arg4 == null))))){
_local5 = (_local5 + ("&utm_content=" + _arg4));
};
};
return (_local5);
}
private function get utm_campaign():String{
if (isExternal){
return (("utm_campaign=" + hostingDomain));
};
return ("");
}
public function get backgroundColor():uint{
return (PortalGroup.backgroundColors[portalGroup]);
}
public function getPromotionLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String="", _arg5:String=""):String{
var _local6:String;
_local6 = ("http://" + domain);
_local6 = (_local6 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local6 = (_local6 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local6 = (_local6 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
trace(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local6 = (_local6 + ("&utm_source=" + _arg4));
if (((!((_arg5 == ""))) && (!((_arg5 == null))))){
_local6 = (_local6 + ("&utm_content=" + _arg5));
};
};
return (_local6);
}
private function get utm_term():String{
return ("utm_term=");
}
public function importXML(_arg1:XMLNode):void{
}
public function getSendToFriendLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String=""):String{
var _local5:String;
if (!hasSendToFriendLink){
return (getMoreGamesLink(_arg1, _arg3));
};
_local5 = ("http://" + domain);
_local5 = (_local5 + ((("/" + emailLink) + "/") + _arg2));
if (useGoogleAnalitics){
_local5 = (_local5 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal"));
_local5 = (_local5 + ("&utm_campaign=" + _arg1));
_arg4 = stripSubDomain(_arg4);
if (_arg4 == "localhost"){
_arg4 = "offline_play";
};
_local5 = (_local5 + ("&utm_source=" + _arg4));
_local5 = (_local5 + "&utm_content=send_to_friend");
};
return (_local5);
}
private static function stripSubDomain(_arg1:String):String{
var _local2:Array;
if (!_arg1){
return ("");
};
_local2 = _arg1.split(".");
if (_local2.length <= 2){
return (_arg1);
};
_local2 = _local2.reverse();
if (topLevelDoubles.indexOf((((_local2[1] + ".") + _local2[0]) + ",")) > 0){
return (((((_local2[2] + ".") + _local2[1]) + ".") + _local2[0]));
};
return (((_local2[1] + ".") + _local2[0]));
}
}
}//package spill.localisation
Section 268
//BrandingLogo (spill.localisation.BrandingLogo)
package spill.localisation {
import flash.events.*;
import flash.display.*;
public class BrandingLogo extends MovieClip {
public function BrandingLogo(){
addFrameScript(0, frame1);
super();
stop();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
if (stage){
added();
};
brandingChanged();
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("brandingChanged", brandingChanged, false, 0, true);
brandingChanged();
}
private function brandingChanged(_arg1:Event=null):void{
if (SpilGame.currentBranding){
gotoAndStop(SpilGame.currentBranding.domain);
};
}
function frame1(){
stop();
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("brandingChanged", brandingChanged);
}
}
}//package spill.localisation
Section 269
//Brandings (spill.localisation.Brandings)
package spill.localisation {
public class Brandings {
private static var brands_by_id:Object = new Object();
private static var brands_by_domain:Object = new Object();
public static function getBrandByID(_arg1:Number):Brand{
return (brands_by_id[_arg1]);
}
public static function getBrandsArray():Array{
var _local1:Array;
var _local2:Brand;
_local1 = new Array();
for each (_local2 in brands_by_domain) {
_local1.push(_local2);
};
return (_local1);
}
private static function addBrand(_arg1:Brand):Brand{
if (brands_by_domain[_arg1.domain]){
trace(("ERROR: Attempting to add duplicate brand by domain: " + _arg1.domain));
} else {
brands_by_domain[_arg1.domain] = _arg1;
};
if (brands_by_id[_arg1.site_id]){
trace(("ERROR: Attempting to add duplicate brand by id: " + _arg1.site_id));
} else {
brands_by_id[_arg1.site_id] = _arg1;
};
return (_arg1);
}
public static function initialize():void{
var _local1:Brand;
_local1 = new Brand();
_local1.site_id = 79;
_local1.domain = "www.agame.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.TWEEN;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 88;
_local1.domain = "www.gamesgames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 90;
_local1.domain = "www.girlsgogames.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 45;
_local1.domain = "www.a10.com";
_local1.preferedLanguage = "en_us";
_local1.portalGroup = PortalGroup.TEEN;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 92;
_local1.domain = "www.games.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 107;
_local1.domain = "www.agame.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.TWEEN;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 102;
_local1.domain = "www.girlsgogames.co.uk";
_local1.preferedLanguage = "en_uk";
_local1.portalGroup = PortalGroup.GIRL;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 2;
_local1.domain = "www.game.com.cn";
_local1.moreLink = "moregames/";
_local1.preferedLanguage = "cn";
_local1.portalGroup = PortalGroup.NONE;
_local1.useGoogleAnalitics = false;
_local1.hasSendToFriendLink = false;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 25;
_local1.domain = "www.spel.nl";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 1;
_local1.domain = "www.spelletjes.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 93;
_local1.domain = "www.girlsgogames.nl";
_local1.emailLink = "spel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 12;
_local1.domain = "www.jeu.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 95;
_local1.domain = "www.girlsgogames.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 11;
_local1.domain = "www.jeux.fr";
_local1.emailLink = "jeu";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "fr";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 26;
_local1.domain = "www.spielen.com";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 94;
_local1.domain = "www.girlsgogames.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 5;
_local1.domain = "www.jetztspielen.de";
_local1.emailLink = "spiel";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "de";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 109;
_local1.domain = "www.minigry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 16;
_local1.domain = "www.gry.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 98;
_local1.domain = "www.girlsgogames.pl";
_local1.emailLink = "gra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "pl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 108;
_local1.domain = "www.spel.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 100;
_local1.domain = "www.girlsgogames.se";
_local1.emailLink = "spel_";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "se";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 44;
_local1.domain = "www.spela.se";
_local1.emailLink = "spel_";
_local1.preferedLanguage = "se";
_local1.portalGroup = PortalGroup.FAMILY;
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 106;
_local1.domain = "www.giocaregratis.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 15;
_local1.domain = "www.gioco.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 99;
_local1.domain = "www.girlsgogames.it";
_local1.emailLink = "gioco";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "it";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 97;
_local1.domain = "www.zapjuegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 86;
_local1.domain = "www.juegos.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 96;
_local1.domain = "www.juegosdechicas.com";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 122;
_local1.domain = "www.girlsgogames.es";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 125;
_local1.domain = "www.juegos.mx";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 126;
_local1.domain = "www.juegosdechicas.mx";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 127;
_local1.domain = "www.juegos.com.ar";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 128;
_local1.domain = "www.juegosdechicas.com.ar";
_local1.emailLink = "juego";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "es";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 91;
_local1.domain = "www.clickjogos.com";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 101;
_local1.domain = "www.girlsgogames.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 50;
_local1.domain = "www.ojogos.com.br";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "br";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 55;
_local1.domain = "www.games.co.id";
_local1.emailLink = "permainanme";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "id";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 105;
_local1.domain = "www.flashgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 104;
_local1.domain = "www.girlsgogames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.GIRL;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 103;
_local1.domain = "www.ourgames.ru";
_local1.emailLink = "igra";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "ru";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 24;
_local1.domain = "www.game.co.in";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "in";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 87;
_local1.domain = "www.ojogos.pt";
_local1.emailLink = "jogo";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "pt";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 120;
_local1.domain = "www.egames.jp";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.TWEEN;
_local1.preferedLanguage = "jp";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 121;
_local1.domain = "www.dailygame.com";
_local1.emailLink = "/game/";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 123;
_local1.domain = "www.zapapa.com";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.ZAPAPA;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 124;
_local1.domain = "www.zapapa.nl";
_local1.emailLink = "game";
_local1.portalGroup = PortalGroup.HYVES;
_local1.preferedLanguage = "nl";
addBrand(_local1);
_local1 = new Brand();
_local1.site_id = 0;
_local1.domain = "gamedev.dev.spilgames.com";
_local1.portalGroup = PortalGroup.FAMILY;
_local1.preferedLanguage = "en_us";
addBrand(_local1);
}
public static function exportXML():XML{
var _local1:XML;
var _local2:Brand;
_local1 = <portals/>
;
for each (_local2 in brands_by_domain) {
_local1.appendChild(_local2.exportXML());
};
return (_local1);
}
public static function getBrandByDomain(_arg1:String):Brand{
return (brands_by_domain[_arg1]);
}
public static function hasDomain(_arg1:String):Boolean{
return (!((brands_by_domain[_arg1] == null)));
}
}
}//package spill.localisation
Section 270
//Language (spill.localisation.Language)
package spill.localisation {
import flash.xml.*;
public class Language {
public var references:Array;
public var name:String;
public var embedInputFonts:Boolean;// = true
public var forceFont:String;// = null
public var id:uint;
public var portal_groups:Array;
public var textLanguage:String;
public var bwcId:int;
public var embedFonts:Boolean;// = true
public var displayName:String;// = ""
public var dname:String;
public function Language(_arg1:String, _arg2:String=null){
embedFonts = true;
embedInputFonts = true;
forceFont = null;
references = [];
displayName = "";
super();
name = _arg1;
dname = _arg2;
portal_groups = new Array();
}
public function exportXML():XMLNode{
var _local1:XMLNode;
var _local2:XMLNode;
var _local3:Array;
var _local4:Array;
var _local5:int;
_local1 = new XMLNode(1, "language");
_local1.attributes.name = name;
if (textLanguage != null){
_local1.attributes.textLanguage = textLanguage;
};
if (references.length){
_local1.attributes.references = references.toString();
};
_local1.attributes.id = bwcId;
_local2 = new XMLNode(1, "display_name");
_local2.firstChild = new XMLNode(3, displayName);
_local1.appendChild(_local2);
_local3 = [];
_local4 = PortalGroup.channelNames;
_local5 = 0;
while (_local5 < _local4.length) {
_local3.push(Brandings.getBrandByDomain(portal_groups[_local5]).site_id);
_local5++;
};
_local1.attributes.channels = _local3.join(",");
return (_local1);
}
public function get p_teen():String{
return (portal_groups[PortalGroup.TEEN]);
}
public function set p_hyves(_arg1:String):void{
portal_groups[PortalGroup.HYVES] = _arg1;
}
public function set p_teen(_arg1:String):void{
portal_groups[PortalGroup.TEEN] = _arg1;
}
public function get p_tween():String{
return (portal_groups[PortalGroup.TWEEN]);
}
public function get p_family():String{
return (portal_groups[PortalGroup.FAMILY]);
}
public function get p_girl():String{
trace("Language", portal_groups[PortalGroup.GIRL]);
return (portal_groups[PortalGroup.GIRL]);
}
public function get p_hyves():String{
return (portal_groups[PortalGroup.HYVES]);
}
public function set p_girl(_arg1:String):void{
portal_groups[PortalGroup.GIRL] = _arg1;
}
public function set p_zapapa(_arg1:String):void{
portal_groups[PortalGroup.ZAPAPA] = _arg1;
}
public function get displayAcronim():String{
return ((dname) ? dname : name);
}
public function set p_family(_arg1:String):void{
portal_groups[PortalGroup.FAMILY] = _arg1;
}
public function set p_tween(_arg1:String):void{
portal_groups[PortalGroup.TWEEN] = _arg1;
}
public function get p_zapapa():String{
return (portal_groups[PortalGroup.ZAPAPA]);
}
}
}//package spill.localisation
Section 271
//Languages (spill.localisation.Languages)
package spill.localisation {
import flash.xml.*;
public class Languages {
public static var languages:Object = new Object();
private static var _init:Boolean = false;
public static function initialize():void{
var _local1:Language;
if (_init){
return;
};
_init = true;
_local1 = new Language("nl");
_local1.displayName = "Nederlands";
_local1.p_family = "www.spelletjes.nl";
_local1.p_tween = "www.spel.nl";
_local1.p_girl = "www.girlsgogames.nl";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.p_hyves = "www.zapapa.nl";
_local1.bwcId = 3;
addLanguage(_local1);
_local1 = new Language("es");
_local1.displayName = "Español";
_local1.p_family = "www.juegos.com";
_local1.p_tween = "www.zapjuegos.com";
_local1.p_girl = "www.girlsgogames.es";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 9;
addLanguage(_local1);
_local1 = new Language("pl");
_local1.displayName = "Polski";
_local1.p_family = "www.gry.pl";
_local1.p_tween = "www.gry.pl";
_local1.p_girl = "www.girlsgogames.pl";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 6;
addLanguage(_local1);
_local1 = new Language("fr");
_local1.displayName = "Français";
_local1.p_family = "www.jeux.fr";
_local1.p_tween = "www.jeu.fr";
_local1.p_girl = "www.girlsgogames.fr";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 4;
addLanguage(_local1);
_local1 = new Language("en_us", "us");
_local1.displayName = "English";
_local1.p_family = "www.gamesgames.com";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.com";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 1;
addLanguage(_local1);
addReference(_local1, "en");
_local1 = new Language("id");
_local1.displayName = "Bahasa Ind.";
_local1.p_family = "www.games.co.id";
_local1.p_tween = "www.games.co.id";
_local1.p_girl = "www.games.co.id";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 11;
addLanguage(_local1);
_local1 = new Language("ru");
_local1.displayName = "Русский";
_local1.p_family = "www.ourgames.ru";
_local1.p_tween = "www.flashgames.ru";
_local1.p_girl = "www.girlsgogames.ru";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 12;
addLanguage(_local1);
_local1 = new Language("se");
_local1.displayName = "Svenska";
_local1.p_family = "www.spela.se";
_local1.p_tween = "www.spel.se";
_local1.p_girl = "www.girlsgogames.se";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 7;
addLanguage(_local1);
addReference(_local1, "sv");
_local1 = new Language("it");
_local1.displayName = "Italiano";
_local1.p_family = "www.gioco.it";
_local1.p_tween = "www.gioco.it";
_local1.p_girl = "www.girlsgogames.it";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 8;
addLanguage(_local1);
_local1 = new Language("en_uk", "uk");
_local1.displayName = "English";
_local1.p_family = "www.games.co.uk";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.girlsgogames.co.uk";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 13;
addLanguage(_local1);
_local1 = new Language("cn");
_local1.displayName = "中文";
_local1.p_family = "www.game.com.cn";
_local1.p_tween = "www.game.com.cn";
_local1.p_girl = "www.game.com.cn";
_local1.p_teen = "www.game.com.cn";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 2;
_local1.embedFonts = false;
_local1.embedInputFonts = false;
_local1.forceFont = "_sans";
addLanguage(_local1);
addReference(_local1, "zh-CN");
addReference(_local1, "zh-TW");
_local1 = new Language("pt");
_local1.displayName = "Português";
_local1.p_family = "www.ojogos.pt";
_local1.p_tween = "www.agame.com";
_local1.p_girl = "www.ojogos.pt";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 17;
addLanguage(_local1);
_local1 = new Language("in");
_local1.displayName = "English";
_local1.p_family = "www.game.co.in";
_local1.p_tween = "www.game.co.in";
_local1.p_girl = "www.game.co.in";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.textLanguage = "en_uk";
_local1.bwcId = 14;
addLanguage(_local1);
_local1 = new Language("de");
_local1.displayName = "Deutsch";
_local1.p_family = "www.jetztspielen.de";
_local1.p_tween = "www.spielen.com";
_local1.p_girl = "www.girlsgogames.de";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 5;
addLanguage(_local1);
_local1 = new Language("br");
_local1.displayName = "Português (BR)";
_local1.p_family = "www.ojogos.com.br";
_local1.p_tween = "www.clickjogos.com";
_local1.p_girl = "www.girlsgogames.com.br";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 10;
addLanguage(_local1);
_local1 = new Language("jp");
_local1.displayName = "日本語";
_local1.p_family = "www.egames.jp";
_local1.p_tween = "www.egames.jp";
_local1.p_girl = "www.egames.jp";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.embedFonts = true;
_local1.embedInputFonts = false;
_local1.forceFont = "MS UI Gothic";
_local1.bwcId = 19;
addLanguage(_local1);
addReference(_local1, "ja");
_local1 = new Language("ar");
_local1.displayName = "English";
_local1.p_family = "www.dailygame.com";
_local1.p_tween = "www.dailygame.com";
_local1.p_girl = "www.dailygame.com";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.bwcId = 20;
addLanguage(_local1);
addReference(_local1, "ar");
_local1 = new Language("es_mx", "mx");
_local1.displayName = "Español";
_local1.p_family = "www.juegos.mx";
_local1.p_tween = "www.juegos.mx";
_local1.p_girl = "www.juegosdechicas.mx";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.textLanguage = "es";
addLanguage(_local1);
addReference(_local1, "mx");
_local1 = new Language("es_ar", "arg");
_local1.displayName = "Español";
_local1.p_family = "www.juegos.com.ar";
_local1.p_tween = "www.juegos.com.ar";
_local1.p_girl = "www.juegosdechicas.com.ar";
_local1.p_teen = "www.a10.com";
_local1.p_zapapa = "www.zapapa.com";
_local1.textLanguage = "es";
addLanguage(_local1);
addReference(_local1, "arg");
}
public static function exportXML():XMLNode{
var _local1:Array;
var _local2:XMLNode;
var _local3:Language;
_local1 = getLanguagesArray();
_local2 = new XMLNode(1, "languages");
for each (_local3 in _local1) {
_local2.appendChild(_local3.exportXML());
};
return (_local2);
}
public static function getLanguagesArray():Array{
var _local1:Array;
var _local2:Object;
var _local3:Language;
_local1 = new Array();
_local2 = new Object();
for each (_local3 in languages) {
if (!_local2[_local3.name]){
_local1.push(_local3);
_local2[_local3.name] = true;
};
};
return (_local1);
}
public static function getLanguage(_arg1:String):Language{
return (languages[_arg1]);
}
private static function addLanguage(_arg1:Language):void{
languages[_arg1.name] = _arg1;
}
private static function addReference(_arg1:Language, _arg2:String):void{
languages[_arg2] = _arg1;
_arg1.references.push(_arg2);
}
public static function getLanguageByOldID(_arg1:int):Language{
var _local2:Language;
for each (_local2 in languages) {
if (_local2.bwcId == _arg1){
return (_local2);
};
};
return (null);
}
}
}//package spill.localisation
Section 272
//LanguageSelectBox (spill.localisation.LanguageSelectBox)
package spill.localisation {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class LanguageSelectBox extends MovieClip {
private var flag:MovieClip;
private var mc:MovieClip;
private var popup:MovieClip;
private var languageName_text:TextField;
var lang:String;
public function LanguageSelectBox(){
trace("new langselecbox");
super();
if (numChildren > 0){
removeChildAt(0);
};
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true);
Languages.initialize();
popup = new LanguageSelectPopup_mc();
x = Math.round(x);
y = Math.round(y);
popup.y = (-(Math.floor(popup.height)) + 1);
popup.visible = false;
addChild(popup);
mc = new LanguageSelectBox_mc();
addChild(mc);
flag = mc.flag;
languageName_text = mc.languageName_text;
if (stage){
added();
};
init();
languageChanged();
}
private function added(_arg1:Event=null):void{
trace("addedselebnox");
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
}
public function init():void{
var _local1:Array;
var _local2:int;
var _local3:MovieClip;
var _local4:Language;
trace("initselectbox");
_local1 = new Array(popup.l_br, popup.l_de, popup.l_en_us, popup.l_fr, popup.l_in, popup.l_jp, popup.l_pt, popup.l_ru, popup.l_ar, popup.l_cn, popup.l_en_uk, popup.l_es, popup.l_id, popup.l_it, popup.l_nl, popup.l_pl, popup.l_se, popup.l_es_mx, popup.l_es_ar);
_local2 = 0;
while (_local2 < _local1.length) {
_local3 = MovieClip(_local1[_local2]);
if (_local3){
_local3.addEventListener(MouseEvent.CLICK, itemClicked, true, 0, true);
_local3.flag.gotoAndStop(_local3.name.substr(2));
_local3.flag.mouseEnabled = false;
_local3.text.mouseEnabled = false;
_local4 = Languages.getLanguage(_local3.name.substr(2));
if (_local4){
_local3.text.text = _local4.displayAcronim;
} else {
trace((("Error, '" + _local3.name.substr(2)) + "' language not found"));
};
} else {
trace((((("Error, btn number '" + _local2) + "' is not a MovieClip or there is no button '") + _local1[_local2]) + "'"));
};
_local2++;
};
}
public function set popupLocation(_arg1:String):void{
trace(("popupLocation = " + _arg1));
if (_arg1 == "bottom"){
popup.y = Math.floor(mc.height);
} else {
popup.y = (-(Math.floor(mc.height)) + 1);
};
}
private function mouseOver(_arg1:MouseEvent):void{
popup.visible = true;
}
private function languageChanged(_arg1:Event=null):void{
if (SpilGame.currentLanguage){
if (lang == "cn"){
flag.gotoAndStop(lang);
} else {
flag.gotoAndStop(SpilGame.currentLanguage.name);
};
languageName_text.text = SpilGame.currentLanguage.displayName;
languageName_text.embedFonts = SpilGame.currentLanguage.embedInputFonts;
trace(("tae" + languageName_text.text));
};
}
private function mouseOut(_arg1:MouseEvent):void{
popup.visible = false;
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
private function itemClicked(_arg1:MouseEvent):void{
lang = _arg1.currentTarget.name.substr(2);
if (lang == "cn"){
SpilGame.changeLanguage("en_us");
} else {
SpilGame.changeLanguage(lang);
};
popup.visible = false;
}
}
}//package spill.localisation
Section 273
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc)
package spill.localisation {
import flash.display.*;
import flash.text.*;
public dynamic class LanguageSelectBox_mc extends MovieClip {
public var flag:MovieClip;
public var languageName_text:TextField;
}
}//package spill.localisation
Section 274
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc)
package spill.localisation {
import flash.display.*;
public dynamic class LanguageSelectPopup_mc extends MovieClip {
public var l_in:MovieClip;
public var l_ar:MovieClip;
public var l_br:MovieClip;
public var l_cn:MovieClip;
public var l_se:MovieClip;
public var l_de:MovieClip;
public var l_es:MovieClip;
public var l_en_uk:MovieClip;
public var l_fr:MovieClip;
public var l_en_us:MovieClip;
public var l_pl:MovieClip;
public var l_pt:MovieClip;
public var l_nl:MovieClip;
public var l_id:MovieClip;
public var l_it:MovieClip;
public var l_jp:MovieClip;
public var l_ru:MovieClip;
}
}//package spill.localisation
Section 275
//LocalizedTextField (spill.localisation.LocalizedTextField)
package spill.localisation {
import flash.events.*;
public class LocalizedTextField extends TextFieldFit {
private var regex:RegExp;
private var originalText:String;
public function LocalizedTextField(){
regex = /{([^{}]*)}/g;
super();
addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
added();
}
private function languageChanged(_arg1:Event):void{
text = originalText;
updateProperties();
}
override public function set text(_arg1:String):void{
originalText = _arg1;
if ((_arg1 is String)){
super.text = _arg1.replace(regex, replaceFn);
} else {
super.text = "";
};
}
private function removed(_arg1:Event):void{
SpilGame.removeEventListener("languageChanged", languageChanged);
}
private function replaceFn():String{
var _local2:String;
_local2 = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
private function added(_arg1:Event=null):void{
SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true);
text = originalText;
}
}
}//package spill.localisation
Section 276
//PortalGroup (spill.localisation.PortalGroup)
package spill.localisation {
import flash.xml.*;
public class PortalGroup {
public static const FAMILY:uint = 0;
public static const channelNames:Array = ["family", "tween", "girl", "teen", "zapapa", "hyves"];
public static const ZAPAPA:uint = 4;
public static const TWEEN:uint = 1;
public static const HYVES:uint = 5;
public static const TEEN:uint = 3;
public static const GIRL:uint = 2;
public static const backgroundColors:Array = [0xFFFFFF, 0xFFFFFF, 16742331, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF];
public static const NONE:uint = 6;
public static function getName(_arg1:int):String{
return (channelNames[_arg1]);
}
public static function exportXML():XMLNode{
var _local1:XMLNode;
var _local2:int;
var _local3:XMLNode;
_local1 = new XMLNode(1, "channels");
_local2 = 0;
while (_local2 < 5) {
_local3 = new XMLNode(1, "channel");
_local3.attributes.name = channelNames[_local2];
_local3.attributes.id = _local2;
_local1.appendChild(_local3);
_local2++;
};
return (_local1);
}
}
}//package spill.localisation
Section 277
//spil_internal (spill.localisation.spil_internal)
package spill.localisation {
public namespace spil_internal = "spill.localisation";
}//package spill.localisation
Section 278
//SpilGame (spill.localisation.SpilGame)
package spill.localisation {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import flash.external.*;
public class SpilGame {
private static const cookieName:String = "spilgames_language_v100";
private static const cookiePath:String = "/";
private static const cookieLanguageVar:String = "savedLang";
public static const LANGUAGE_CHANGED:String = "languageChanged";
public static const BRANDING_CHANGED:String = "brandingChanged";
private static var strings:Object = new Object();
public static var currentBranding:Brand;
private static var contexMenuItem:ContextMenuItem;
spil_internal static var gameName:String;
spil_internal static var debugHostDomain:String = "";
private static var localDomains:Object = new Object();
spil_internal static var emailPage:String;
private static var channelLock:Boolean = false;
spil_internal static var debugEmbedDomain:String = "";
private static var eventDispatcher:EventDispatcher;
private static var _init:Boolean = false;
public static var currentLanguage:Language;
spil_internal static var portalGroup:uint;
private static var stage:Sprite;
public static function getSpilCompanyLink():String{
if (currentLanguage.name == "cn"){
return ("http://www.game.com.cn/downloads/");
};
return ("http://www.gameportal.net");
}
public static function getPromotionLink(_arg1:String="feature_promotion"):String{
var _local2:String;
_local2 = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1));
}
public static function traceAllBrands():void{
trace(outputAllBrands());
}
public static function getString(_arg1:String):String{
var _local2:Object;
_local2 = strings[_arg1];
if (_local2){
if (currentLanguage.textLanguage){
return (_local2[currentLanguage.textLanguage]);
};
return (_local2[currentLanguage.name]);
//unresolved jump
};
return ("");
}
public static function initialize(_arg1:String, _arg2:int, _arg3:String, _arg4:Sprite, _arg5:Boolean=false):void{
stage = _arg4;
if (_init){
trace("ERROR: LocalisationManager already initialised");
return;
};
_init = true;
localDomains["localhost"] = true;
localDomains["www8.agame.com"] = true;
localDomains["gamedev.dev.spilgames.com"] = true;
localDomains["stg.spel.nl"] = true;
localDomains["stg.girlsgogames.nl"] = true;
localDomains["stg.pl.spel.nl"] = true;
localDomains["stg.pl.girlsgogames.nl"] = true;
trace(localDomains["stg.girlsgogames.nl"]);
Brandings.initialize();
Languages.initialize();
initContexMenu(_arg4);
channelLock = _arg5;
gameName = _arg1.replace(" ", "_");
portalGroup = _arg2;
emailPage = _arg3;
chooseLanguage();
chooseBranding();
}
public static function get isExternal():Boolean{
return (((((!(Brandings.hasDomain(embedDomain))) && (!(localDomains[embedDomain])))) && (!(isStagingDomain))));
}
private static function initContexMenu(_arg1:Sprite):void{
contexMenuItem = new ContextMenuItem("");
_arg1.contextMenu = new ContextMenu();
_arg1.contextMenu.customItems.push(contexMenuItem);
contexMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contexMenuClicked);
}
private static function replaceFn():String{
var _local2:String;
_local2 = SpilGame.getString(arguments[1]);
if (((!(_local2)) || ((_local2 == "")))){
return ((("{" + arguments[1]) + "}"));
};
return (_local2);
}
spil_internal static function get hostingDomain():String{
var _local1:LocalConnection;
if (debugHostDomain != ""){
return (debugHostDomain);
};
_local1 = new LocalConnection();
return (_local1.domain);
}
spil_internal static function chooseLanguage():void{
if (cookieLanguage != null){
currentLanguage = cookieLanguage;
} else {
if (isExternal){
currentLanguage = systemLanguage;
} else {
currentLanguage = portalLanguage;
if (!currentLanguage){
currentLanguage = systemLanguage;
};
};
};
if (!currentLanguage){
trace("Unable to determine language, using 'English US'");
currentLanguage = Languages.getLanguage("en_us");
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
private static function contexMenuClicked(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest(getMoreGamesLink("Contex_Menu")));
}
public static function initTextField(_arg1:TextField):void{
var _local2:TextFormat;
trace(_arg1.text);
_arg1.text = _arg1.text.replace(/{([^{}]*)}/g, replaceFn);
trace(_arg1.text);
_arg1.embedFonts = currentLanguage.embedFonts;
if (currentLanguage.forceFont != ""){
_local2 = new TextFormat();
_local2.font = currentLanguage.forceFont;
_arg1.setTextFormat(_local2);
};
}
public static function importXMLv2(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.attribute("identifier")] = new Object());
for each (_local4 in _local2.children()) {
if (_local4.children().length() > 0){
_local3[_local4.name()] = _local4.children()[0].toString();
} else {
_local3[_local4.name()] = "";
};
};
};
}
spil_internal static function changeLanguage(_arg1:String):void{
var _local2:Language;
_local2 = Languages.getLanguage(_arg1);
if (!_local2){
trace("ERROR: Supplied language string does not have a matching language");
} else {
cookieLanguage = _local2;
currentLanguage = _local2;
};
TextFieldFit.embedFonts = currentLanguage.embedFonts;
TextFieldFit.forceFont = currentLanguage.forceFont;
chooseBranding();
dispatchEvent(new Event(LANGUAGE_CHANGED));
}
public static function getSendToFriendLink():String{
return (currentBranding.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain));
}
spil_internal static function chooseBranding():void{
currentBranding = Brandings.getBrandByDomain(currentLanguage.portal_groups[portalGroup]);
if (!(currentBranding is Brand)){
currentBranding = Brandings.getBrandByDomain("www.agame.com");
};
contexMenuItem.caption = ("More Games: " + currentBranding.domain);
dispatchEvent(new Event(BRANDING_CHANGED));
}
spil_internal static function get systemLanguage():Language{
return (Languages.getLanguage(Capabilities.language));
}
spil_internal static function set cookieLanguage(_arg1:Language):void{
var _local2:SharedObject;
_local2 = SharedObject.getLocal(cookieName, cookiePath);
if (_arg1 == null){
_local2.data[cookieLanguageVar] = null;
} else {
_local2.data[cookieLanguageVar] = _arg1.name;
};
_local2.flush();
}
public static function importXML(_arg1:XML):void{
var _local2:XML;
var _local3:Object;
var _local4:XML;
for each (_local2 in _arg1.children()) {
_local3 = (strings[_local2.identifier] = new Object());
for each (_local4 in _local2.children()) {
_local3[_local4.name()] = _local4.children()[0].toString();
};
};
}
spil_internal static function dispatchEvent(_arg1:Event):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.dispatchEvent(_arg1);
}
private static function getDomain(_arg1:String):String{
var _local2:String;
var _local3:uint;
if (_arg1.indexOf("file") == 0){
return ("offline_play");
};
_local2 = new String();
_local3 = 7;
while (_local3 < _arg1.length) {
if (_arg1.charAt(_local3) == "/"){
break;
};
_local2 = (_local2 + _arg1.charAt(_local3));
_local3++;
};
if (_local2 == "localhost"){
_local2 = "offline_play";
};
return (_local2);
}
public static function exportXML():XML{
var _local1:XML;
_local1 = <spil_games/>
;
_local1.appendChild(Brandings.exportXML());
_local1.appendChild(Languages.exportXML());
_local1.appendChild(PortalGroup.exportXML());
return (_local1);
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public static function outputAllBrands():String{
var _local1:Array;
var _local2:String;
var _local3:Brand;
_local1 = Brandings.getBrandsArray();
_local2 = "";
for each (_local3 in _local1) {
_local2 = (_local2 + (_local3.getSendToFriendLink(gameName, emailPage, isExternal, embedDomain) + "\n"));
};
return (_local2);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (!eventDispatcher){
eventDispatcher = new EventDispatcher();
};
eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function getMoreGamesLink(_arg1:String=""):String{
var _local2:String;
_local2 = (embedDomain) ? embedDomain : hostingDomain;
return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1));
}
public static function get isStagingDomain():Boolean{
var _local1:String;
_local1 = ("http://" + embedDomain);
return ((_local1.indexOf("http://stg.") >= 0));
}
spil_internal static function get cookieLanguage():Language{
var _local1:SharedObject;
var _local2:String;
_local1 = SharedObject.getLocal(cookieName, cookiePath);
_local2 = String(_local1.data[cookieLanguageVar]);
return (Languages.getLanguage(_local2));
}
private static function get portalLanguage():Language{
var _local1:Brand;
var _local2:String;
var _local3:Language;
if (isExternal){
return (null);
};
if (!embedDomain){
return (null);
};
_local1 = Brandings.getBrandByDomain(embedDomain);
if (!_local1){
return (null);
};
_local2 = _local1.preferedLanguage;
if (!_local2){
return (null);
};
_local3 = Languages.getLanguage(_local2);
if (!_local3){
return (null);
};
return (_local3);
}
spil_internal static function get embedDomain():String{
var loc:String;
if (debugEmbedDomain != ""){
return (debugEmbedDomain);
};
if (ExternalInterface.available){
try {
loc = ExternalInterface.call("window.location.href.toString");
if (((!((loc == ""))) && (!((loc == null))))){
trace(("embed domain = " + getDomain(loc)));
return (getDomain(loc));
};
} catch(e:SecurityError) {
trace(("Security Error connecting to external interface, error = " + e));
} catch(e:Error) {
trace(("Error connecting to external interface, error = " + e));
};
};
return (null);
}
}
}//package spill.localisation
Section 279
//SpilGamesLink (spill.localisation.SpilGamesLink)
package spill.localisation {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class SpilGamesLink extends SimpleButton {
public function SpilGamesLink(){
addEventListener(MouseEvent.CLICK, buttonClicked);
}
private function buttonClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()), "_blank");
}
}
}//package spill.localisation
Section 280
//TextFieldFit (spill.localisation.TextFieldFit)
package spill.localisation {
import flash.utils.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.filters.*;
public class TextFieldFit extends MovieClip {
protected var _text:String;// = "default"
protected var _textSize:Number;// = 12
protected var _embedFonts:Boolean;// = true
protected var _glowColor:uint;// = 0
private var h:Number;
protected var _antiAliasType:String;// = "advanced"
private var w:Number;
protected var _useGlowFilter:Boolean;// = false
protected var _hAlign:String;// = "left"
protected var _textColor:uint;// = 0
protected var _glowStrength:Number;// = 5
protected var _glowBlur:Number;// = 3
private var field:TextField;
protected var _gridFitType:String;// = "pixel"
protected var _glowQuality:Number;// = 1
private var debugBounding:Sprite;
protected var _disableWordwrap:Boolean;// = false
protected var _multiline:Boolean;// = false
protected var _font:String;// = ""
protected var _underline:Boolean;// = false
protected var _vAlign:String;// = "top"
protected var _italic:Boolean;// = false
protected var _bold:Boolean;// = false
private var sizeChanged:Boolean;// = true
private var embeddedFonts:Array;
protected var _selectable:Boolean;// = false
private var format:TextFormat;
private var valid:Boolean;// = true
private static const gutter:Number = 2;
spil_internal static var embedFonts:Boolean = true;
spil_internal static var forceAAType:String = null;
spil_internal static var forceFont:String = null;
public static var alwaysCheckWidth:Boolean = false;
public function TextFieldFit(){
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
sizeChanged = true;
valid = true;
_text = "default";
_textColor = 0;
_textSize = 12;
_multiline = false;
_disableWordwrap = false;
_hAlign = "left";
_vAlign = "top";
_bold = false;
_underline = false;
_italic = false;
_selectable = false;
_font = "";
_embedFonts = true;
_antiAliasType = "advanced";
_gridFitType = "pixel";
_useGlowFilter = false;
_glowBlur = 3;
_glowColor = 0;
_glowStrength = 5;
_glowQuality = 1;
super();
_local1 = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")));
_local2 = width;
_local3 = height;
if (numChildren > 0){
removeChildAt(0);
};
if (!field){
field = new TextField();
addChild(field);
};
field.border = false;
field.background = false;
field.type = TextFieldType.DYNAMIC;
mouseEnabled = false;
mouseChildren = false;
format = new TextFormat();
embeddedFonts = Font.enumerateFonts(false);
setSize(_local2, _local3);
validate();
if (stage){
addEventListener(Event.RENDER, init);
stage.invalidate();
};
init();
}
private function resizeText(_arg1:Boolean=false):void{
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
if (format.size <= 3){
trace("WARNING: Text resised to 3px, either an error occured or the text just wont fit");
return;
};
field.setTextFormat(format);
resizeText(true);
} else {
if (_arg1 == false){
while (doesTextFit()) {
if (format.size <= textSize){
format.size = Object((Number(format.size) + 1));
field.setTextFormat(format);
if (!doesTextFit()){
format.size = Object((Number(format.size) - 1));
field.setTextFormat(format);
break;
};
} else {
break;
};
};
};
};
}
public function get italic():Boolean{
return (_italic);
}
public function get textColor():uint{
return (_textColor);
}
public function get vAlign():String{
return (_vAlign);
}
public function get useGlowFilter():Boolean{
return (_useGlowFilter);
}
public function get selectable():Boolean{
return (_selectable);
}
public function set italic(_arg1:Boolean):void{
_italic = _arg1;
invalidate();
}
public function set text(_arg1:String):void{
_text = _arg1;
invalidate();
}
public function set vAlign(_arg1:String):void{
_vAlign = _arg1;
invalidate();
}
public function get font():String{
return (_font);
}
public function set textColor(_arg1:uint):void{
_textColor = _arg1;
invalidate();
}
public function get antiAliasType():String{
return (_antiAliasType);
}
public function get bold():Boolean{
return (_bold);
}
public function set useGlowFilter(_arg1:Boolean):void{
_useGlowFilter = _arg1;
invalidate();
}
public function set font(_arg1:String):void{
_font = _arg1;
invalidate();
}
public function set selectable(_arg1:Boolean):void{
_selectable = _arg1;
invalidate();
}
public function get multiline():Boolean{
return (_multiline);
}
public function set disableWordwrap(_arg1:Boolean):void{
_disableWordwrap = _arg1;
invalidate();
}
public function get glowQuality():Number{
return (_glowQuality);
}
public function get embedFonts():Boolean{
return (_embedFonts);
}
public function get gridFitType():String{
return (_gridFitType);
}
public function get underline():Boolean{
return (_underline);
}
public function get textSize():Number{
return (_textSize);
}
public function set antiAliasType(_arg1:String):void{
_antiAliasType = _arg1;
invalidate();
}
protected function updateProperties():void{
var _local1:Boolean;
var _local2:Font;
field.text = _text;
field.multiline = ((((_text.indexOf(" ") < 0)) && ((_text.length < 14)))) ? false : _multiline;
field.wordWrap = ((field.multiline) && (!(_disableWordwrap)));
field.selectable = _selectable;
field.antiAliasType = (forceAAType) ? forceAAType : _antiAliasType;
field.gridFitType = _gridFitType;
embeddedFonts = Font.enumerateFonts(false);
if (((((_embedFonts) && (!((_font == ""))))) && (TextFieldFit.embedFonts))){
_local1 = false;
for each (_local2 in embeddedFonts) {
if (_font == _local2.fontName){
_local1 = true;
break;
};
};
field.embedFonts = _local1;
if (!_local1){
trace(((("WARNING: Embedded font '" + _font) + "' not found, disabling embedding of fonts, text = ") + _text));
};
} else {
field.embedFonts = false;
};
if (TextFieldFit.forceFont){
format.font = TextFieldFit.forceFont;
} else {
if (_font != ""){
format.font = _font;
};
};
if (sizeChanged){
format.size = _textSize;
};
format.color = _textColor;
format.align = _hAlign;
format.bold = _bold;
format.italic = _italic;
format.underline = _underline;
format.leftMargin = 0;
format.rightMargin = 0;
field.setTextFormat(format);
if (_useGlowFilter){
filters = [new GlowFilter(_glowColor, 1, _glowBlur, _glowBlur, _glowStrength, _glowQuality)];
} else {
filters = [];
};
}
private function doesTextFit():Boolean{
if (((((field.textHeight + (gutter * 2)) > h)) || (((((field.textWidth + (gutter * 2)) > w)) && (((!(field.multiline)) || (alwaysCheckWidth))))))){
return (false);
};
return (true);
}
public function get glowStrength():Number{
return (_glowStrength);
}
public function set hAlign(_arg1:String):void{
_hAlign = _arg1;
invalidate();
}
private function init(_arg1:Event=null):void{
removeEventListener(Event.RENDER, init);
updateProperties();
layoutText();
}
public function set bold(_arg1:Boolean):void{
_bold = _arg1;
invalidate();
}
private function validate(_arg1:Event=null):void{
updateProperties();
layoutText();
removeEventListener(Event.ENTER_FRAME, validate);
valid = true;
}
public function get text():String{
return (_text);
}
public function set glowBlur(_arg1:Number):void{
_glowBlur = _arg1;
invalidate();
}
private function invalidate():void{
if (valid){
addEventListener(Event.ENTER_FRAME, validate);
if (stage){
stage.invalidate();
};
valid = false;
};
}
public function set embedFonts(_arg1:Boolean):void{
_embedFonts = _arg1;
invalidate();
}
public function set multiline(_arg1:Boolean):void{
_multiline = _arg1;
invalidate();
}
public function get disableWordwrap():Boolean{
return (_disableWordwrap);
}
public function set glowQuality(_arg1:Number):void{
_glowQuality = _arg1;
invalidate();
}
private function layoutText():void{
resizeText();
field.height = (field.textHeight + (gutter * 2));
if (vAlign == "top"){
field.y = 0;
} else {
if (vAlign == "middle"){
field.y = ((h - field.height) / 2);
} else {
if (vAlign == "bottom"){
field.y = (h - field.height);
};
};
};
}
public function get hAlign():String{
return (_hAlign);
}
public function setSize(_arg1:Number, _arg2:Number):void{
w = _arg1;
h = _arg2;
scaleX = (scaleY = 1);
field.width = w;
field.height = h;
invalidate();
}
public function set gridFitType(_arg1:String):void{
_gridFitType = _arg1;
invalidate();
}
public function set underline(_arg1:Boolean):void{
_underline = _arg1;
invalidate();
}
public function get glowBlur():Number{
return (_glowBlur);
}
public function set textSize(_arg1:Number):void{
_textSize = _arg1;
sizeChanged = true;
invalidate();
}
public function set glowColor(_arg1:uint):void{
_glowColor = _arg1;
invalidate();
}
public function get glowColor():uint{
return (_glowColor);
}
public function set glowStrength(_arg1:Number):void{
_glowStrength = _arg1;
invalidate();
}
}
}//package spill.localisation
Section 281
//CBulletFX1 (CBulletFX1)
package {
import flash.display.*;
public dynamic class CBulletFX1 extends MovieClip {
}
}//package
Section 282
//CBulletFX2 (CBulletFX2)
package {
import flash.display.*;
public dynamic class CBulletFX2 extends MovieClip {
}
}//package
Section 283
//CConcreteMask (CConcreteMask)
package {
import flash.display.*;
public dynamic class CConcreteMask extends MovieClip {
}
}//package
Section 284
//CDamageFX1 (CDamageFX1)
package {
import flash.display.*;
public dynamic class CDamageFX1 extends MovieClip {
}
}//package
Section 285
//CHeliMask (CHeliMask)
package {
import flash.display.*;
public dynamic class CHeliMask extends MovieClip {
}
}//package
Section 286
//CHexagonPartMask (CHexagonPartMask)
package {
import flash.display.*;
public dynamic class CHexagonPartMask extends MovieClip {
}
}//package
Section 287
//CLogo (CLogo)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class CLogo extends MovieClip {
private var url:String;// = "http://www.belugerinstudios.com"
private var req:URLRequest;
public function CLogo(){
url = "http://www.belugerinstudios.com";
req = new URLRequest(url);
super();
}
public function Init(_arg1:String=""):void{
url = _arg1;
req = new URLRequest(url);
addEventListener(MouseEvent.CLICK, OnClick, false, 0, true);
}
public function OnClick(_arg1:MouseEvent):void{
navigateToURL(req, "_blank");
trace("ok");
}
}
}//package
Section 288
//CRectanglePartMask (CRectanglePartMask)
package {
import flash.display.*;
public dynamic class CRectanglePartMask extends MovieClip {
}
}//package
Section 289
//CRectangleTallPartMask (CRectangleTallPartMask)
package {
import flash.display.*;
public dynamic class CRectangleTallPartMask extends MovieClip {
}
}//package
Section 290
//CRectangleWidePartMask (CRectangleWidePartMask)
package {
import flash.display.*;
public dynamic class CRectangleWidePartMask extends MovieClip {
}
}//package
Section 291
//CSGameplay (CSGameplay)
package {
import flash.media.*;
public dynamic class CSGameplay extends Sound {
}
}//package
Section 292
//CShreds (CShreds)
package {
import flash.display.*;
public dynamic class CShreds extends MovieClip {
}
}//package
Section 293
//CSMenu (CSMenu)
package {
import flash.media.*;
public dynamic class CSMenu extends Sound {
}
}//package
Section 294
//CSquarePartMask (CSquarePartMask)
package {
import flash.display.*;
public dynamic class CSquarePartMask extends MovieClip {
}
}//package
Section 295
//CTankMask (CTankMask)
package {
import flash.display.*;
public dynamic class CTankMask extends MovieClip {
}
}//package
Section 296
//CTireBPartMask (CTireBPartMask)
package {
import flash.display.*;
public dynamic class CTireBPartMask extends MovieClip {
}
}//package
Section 297
//CTireMPartMask (CTireMPartMask)
package {
import flash.display.*;
public dynamic class CTireMPartMask extends MovieClip {
}
}//package
Section 298
//CTireSPartMask (CTireSPartMask)
package {
import flash.display.*;
public dynamic class CTireSPartMask extends MovieClip {
}
}//package
Section 299
//CTireTPartMask (CTireTPartMask)
package {
import flash.display.*;
public dynamic class CTireTPartMask extends MovieClip {
}
}//package
Section 300
//CTurretMask (CTurretMask)
package {
import flash.display.*;
public dynamic class CTurretMask extends MovieClip {
}
}//package
Section 301
//CWallMask (CWallMask)
package {
import flash.display.*;
public dynamic class CWallMask extends MovieClip {
}
}//package
Section 302
//CVulcan1Mask (CVulcan1Mask)
package {
import flash.display.*;
public dynamic class CVulcan1Mask extends MovieClip {
}
}//package
Section 303
//CVulcanMask (CVulcanMask)
package {
import flash.display.*;
public dynamic class CVulcanMask extends MovieClip {
}
}//package
Section 304
//logo_bg (logo_bg)
package {
public dynamic class logo_bg extends CLogo {
}
}//package
Section 305
//TxtAssembly (TxtAssembly)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtAssembly extends MovieClip {
public var __id101_:LocalizedTextField;
public function TxtAssembly(){
__setProp___id101__mctxtassembly_Layer1_1();
}
function __setProp___id101__mctxtassembly_Layer1_1(){
try {
__id101_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id101_.text = "{txt_assemblymode}";
__id101_.textColor = 0xFFFFFF;
__id101_.textSize = 12;
__id101_.bold = false;
__id101_.disableWordwrap = false;
__id101_.embedFonts = true;
__id101_.font = "Times New Roman";
__id101_.hAlign = "left";
__id101_.multiline = false;
__id101_.vAlign = "top";
__id101_.antiAliasType = "advanced";
__id101_.glowBlur = 3;
__id101_.glowColor = 0;
__id101_.useGlowFilter = false;
__id101_.glowQuality = 1;
__id101_.glowStrength = 5;
__id101_.gridFitType = "pixel";
__id101_.italic = false;
__id101_.selectable = false;
__id101_.underline = false;
try {
__id101_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 306
//TxtAvai (TxtAvai)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtAvai extends MovieClip {
public var __id0_:LocalizedTextField;
public function TxtAvai(){
__setProp___id0__mctxtavaipart_Layer1_1();
}
function __setProp___id0__mctxtavaipart_Layer1_1(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.text = "{txt_avaipart}";
__id0_.textColor = 0x9BDD00;
__id0_.textSize = 12;
__id0_.bold = true;
__id0_.disableWordwrap = false;
__id0_.embedFonts = true;
__id0_.font = "Times New Roman";
__id0_.hAlign = "left";
__id0_.multiline = false;
__id0_.vAlign = "top";
__id0_.antiAliasType = "advanced";
__id0_.glowBlur = 3;
__id0_.glowColor = 0;
__id0_.useGlowFilter = false;
__id0_.glowQuality = 1;
__id0_.glowStrength = 5;
__id0_.gridFitType = "pixel";
__id0_.italic = false;
__id0_.selectable = false;
__id0_.underline = false;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 307
//TxtGiveup (TxtGiveup)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtGiveup extends MovieClip {
public var __id98_:LocalizedTextField;
public function TxtGiveup(){
__setProp___id98__mctxtgiveup_Layer1_1();
}
function __setProp___id98__mctxtgiveup_Layer1_1(){
try {
__id98_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id98_.text = "{txt_giveup}";
__id98_.textColor = 0xCCCCCC;
__id98_.textSize = 12;
__id98_.bold = false;
__id98_.disableWordwrap = false;
__id98_.embedFonts = true;
__id98_.font = "Times New Roman";
__id98_.hAlign = "right";
__id98_.multiline = false;
__id98_.vAlign = "top";
__id98_.antiAliasType = "advanced";
__id98_.glowBlur = 3;
__id98_.glowColor = 0;
__id98_.useGlowFilter = false;
__id98_.glowQuality = 1;
__id98_.glowStrength = 5;
__id98_.gridFitType = "pixel";
__id98_.italic = false;
__id98_.selectable = false;
__id98_.underline = false;
try {
__id98_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 308
//TxtGo (TxtGo)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtGo extends MovieClip {
public var __id102_:LocalizedTextField;
public function TxtGo(){
__setProp___id102__mctxtgo_Layer1_1();
}
function __setProp___id102__mctxtgo_Layer1_1(){
try {
__id102_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id102_.text = "{txt_go}";
__id102_.textColor = 0x9900;
__id102_.textSize = 12;
__id102_.bold = false;
__id102_.disableWordwrap = false;
__id102_.embedFonts = true;
__id102_.font = "Times New Roman";
__id102_.hAlign = "center";
__id102_.multiline = false;
__id102_.vAlign = "top";
__id102_.antiAliasType = "advanced";
__id102_.glowBlur = 3;
__id102_.glowColor = 0;
__id102_.useGlowFilter = false;
__id102_.glowQuality = 1;
__id102_.glowStrength = 5;
__id102_.gridFitType = "pixel";
__id102_.italic = false;
__id102_.selectable = false;
__id102_.underline = false;
try {
__id102_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 309
//TxtMain (TxtMain)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtMain extends MovieClip {
public var __id92_:LocalizedTextField;
public function TxtMain(){
__setProp___id92__mctxtmainmenu_Layer2_1();
}
function __setProp___id92__mctxtmainmenu_Layer2_1(){
try {
__id92_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id92_.text = "{btn_mainmenu}";
__id92_.textColor = 0xFFFFFF;
__id92_.textSize = 12;
__id92_.bold = false;
__id92_.disableWordwrap = false;
__id92_.embedFonts = true;
__id92_.font = "Times New Roman";
__id92_.hAlign = "center";
__id92_.multiline = false;
__id92_.vAlign = "top";
__id92_.antiAliasType = "advanced";
__id92_.glowBlur = 3;
__id92_.glowColor = 0;
__id92_.useGlowFilter = false;
__id92_.glowQuality = 1;
__id92_.glowStrength = 5;
__id92_.gridFitType = "pixel";
__id92_.italic = false;
__id92_.selectable = false;
__id92_.underline = false;
try {
__id92_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 310
//TxtMoregame (TxtMoregame)
package {
import flash.display.*;
public dynamic class TxtMoregame extends MovieClip {
}
}//package
Section 311
//TxtNext (TxtNext)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtNext extends MovieClip {
public var __id95_:LocalizedTextField;
public function TxtNext(){
__setProp___id95__mctxtnextlevel_Layer1_1();
}
function __setProp___id95__mctxtnextlevel_Layer1_1(){
try {
__id95_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id95_.text = "{btn_nextlevel}";
__id95_.textColor = 0xFFFFFF;
__id95_.textSize = 12;
__id95_.bold = false;
__id95_.disableWordwrap = false;
__id95_.embedFonts = true;
__id95_.font = "Times New Roman";
__id95_.hAlign = "center";
__id95_.multiline = false;
__id95_.vAlign = "top";
__id95_.antiAliasType = "advanced";
__id95_.glowBlur = 3;
__id95_.glowColor = 0;
__id95_.useGlowFilter = false;
__id95_.glowQuality = 1;
__id95_.glowStrength = 5;
__id95_.gridFitType = "pixel";
__id95_.italic = false;
__id95_.selectable = false;
__id95_.underline = false;
try {
__id95_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 312
//TxtOption (TxtOption)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtOption extends MovieClip {
public var __id100_:LocalizedTextField;
public function TxtOption(){
__setProp___id100__mctxtoption_Layer1_1();
}
function __setProp___id100__mctxtoption_Layer1_1(){
try {
__id100_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id100_.text = "{txt_options}";
__id100_.textColor = 12446461;
__id100_.textSize = 12;
__id100_.bold = false;
__id100_.disableWordwrap = false;
__id100_.embedFonts = true;
__id100_.font = "Times New Roman";
__id100_.hAlign = "center";
__id100_.multiline = false;
__id100_.vAlign = "top";
__id100_.antiAliasType = "advanced";
__id100_.glowBlur = 3;
__id100_.glowColor = 0;
__id100_.useGlowFilter = false;
__id100_.glowQuality = 1;
__id100_.glowStrength = 5;
__id100_.gridFitType = "pixel";
__id100_.italic = false;
__id100_.selectable = false;
__id100_.underline = false;
try {
__id100_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 313
//TxtReplay (TxtReplay)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtReplay extends MovieClip {
public var __id94_:LocalizedTextField;
public function TxtReplay(){
__setProp___id94__mctxtreplaylevel_Layer1_1();
}
function __setProp___id94__mctxtreplaylevel_Layer1_1(){
try {
__id94_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id94_.text = "{btn_reply}";
__id94_.textColor = 0xFFFFFF;
__id94_.textSize = 12;
__id94_.bold = false;
__id94_.disableWordwrap = false;
__id94_.embedFonts = true;
__id94_.font = "Times New Roman";
__id94_.hAlign = "center";
__id94_.multiline = false;
__id94_.vAlign = "top";
__id94_.antiAliasType = "advanced";
__id94_.glowBlur = 3;
__id94_.glowColor = 0;
__id94_.useGlowFilter = false;
__id94_.glowQuality = 1;
__id94_.glowStrength = 5;
__id94_.gridFitType = "pixel";
__id94_.italic = false;
__id94_.selectable = false;
__id94_.underline = false;
try {
__id94_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 314
//TxtRetry (TxtRetry)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtRetry extends MovieClip {
public var __id93_:LocalizedTextField;
public function TxtRetry(){
__setProp___id93__mctxtretrylevel_Layer1_1();
}
function __setProp___id93__mctxtretrylevel_Layer1_1(){
try {
__id93_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id93_.text = "{btn_retry}";
__id93_.textColor = 0xFFFFFF;
__id93_.textSize = 12;
__id93_.bold = false;
__id93_.disableWordwrap = false;
__id93_.embedFonts = true;
__id93_.font = "Times New Roman";
__id93_.hAlign = "center";
__id93_.multiline = false;
__id93_.vAlign = "top";
__id93_.antiAliasType = "advanced";
__id93_.glowBlur = 3;
__id93_.glowColor = 0;
__id93_.useGlowFilter = false;
__id93_.glowQuality = 1;
__id93_.glowStrength = 5;
__id93_.gridFitType = "pixel";
__id93_.italic = false;
__id93_.selectable = false;
__id93_.underline = false;
try {
__id93_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 315
//TxtSkip (TxtSkip)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtSkip extends MovieClip {
public var __id99_:LocalizedTextField;
public function TxtSkip(){
__setProp___id99__mctxtskip_Layer2_1();
}
function __setProp___id99__mctxtskip_Layer2_1(){
try {
__id99_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id99_.text = "{txt_skip}";
__id99_.textColor = 0xCCCCCC;
__id99_.textSize = 12;
__id99_.bold = false;
__id99_.disableWordwrap = false;
__id99_.embedFonts = true;
__id99_.font = "Times New Roman";
__id99_.hAlign = "right";
__id99_.multiline = false;
__id99_.vAlign = "top";
__id99_.antiAliasType = "advanced";
__id99_.glowBlur = 3;
__id99_.glowColor = 0;
__id99_.useGlowFilter = false;
__id99_.glowQuality = 1;
__id99_.glowStrength = 5;
__id99_.gridFitType = "pixel";
__id99_.italic = false;
__id99_.selectable = false;
__id99_.underline = false;
try {
__id99_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 316
//TxtStartover (TxtStartover)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtStartover extends MovieClip {
public var __id97_:LocalizedTextField;
public function TxtStartover(){
__setProp___id97__mctxtstartover_Layer1_1();
}
function __setProp___id97__mctxtstartover_Layer1_1(){
try {
__id97_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id97_.text = "{txt_startover}";
__id97_.textColor = 12446461;
__id97_.textSize = 12;
__id97_.bold = false;
__id97_.disableWordwrap = false;
__id97_.embedFonts = true;
__id97_.font = "Times New Roman";
__id97_.hAlign = "center";
__id97_.multiline = false;
__id97_.vAlign = "top";
__id97_.antiAliasType = "advanced";
__id97_.glowBlur = 3;
__id97_.glowColor = 0;
__id97_.useGlowFilter = false;
__id97_.glowQuality = 1;
__id97_.glowStrength = 5;
__id97_.gridFitType = "pixel";
__id97_.italic = false;
__id97_.selectable = false;
__id97_.underline = false;
try {
__id97_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 317
//TxtViewtrack (TxtViewtrack)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class TxtViewtrack extends MovieClip {
public var __id96_:LocalizedTextField;
public function TxtViewtrack(){
__setProp___id96__mctxtviewtrack_Layer1_1();
}
function __setProp___id96__mctxtviewtrack_Layer1_1(){
try {
__id96_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id96_.text = "{txt_viewtrack}";
__id96_.textColor = 12446461;
__id96_.textSize = 12;
__id96_.bold = false;
__id96_.disableWordwrap = false;
__id96_.embedFonts = true;
__id96_.font = "Times New Roman";
__id96_.hAlign = "center";
__id96_.multiline = false;
__id96_.vAlign = "top";
__id96_.antiAliasType = "advanced";
__id96_.glowBlur = 3;
__id96_.glowColor = 0;
__id96_.useGlowFilter = false;
__id96_.glowQuality = 1;
__id96_.glowStrength = 5;
__id96_.gridFitType = "pixel";
__id96_.italic = false;
__id96_.selectable = false;
__id96_.underline = false;
try {
__id96_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 318
//Walkthrough (Walkthrough)
package {
import flash.display.*;
import spill.localisation.*;
public dynamic class Walkthrough extends MovieClip {
public var __id103_:LocalizedTextField;
public function Walkthrough(){
__setProp___id103__mcwalktrough_Layer1_1();
}
function __setProp___id103__mcwalktrough_Layer1_1(){
try {
__id103_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id103_.text = "{txt_walkthrough}";
__id103_.textColor = 0xFFFFFF;
__id103_.textSize = 12;
__id103_.bold = true;
__id103_.disableWordwrap = false;
__id103_.embedFonts = false;
__id103_.font = "Arial";
__id103_.hAlign = "right";
__id103_.multiline = false;
__id103_.vAlign = "top";
__id103_.antiAliasType = "advanced";
__id103_.glowBlur = 3;
__id103_.glowColor = 0;
__id103_.useGlowFilter = false;
__id103_.glowQuality = 1;
__id103_.glowStrength = 5;
__id103_.gridFitType = "pixel";
__id103_.italic = false;
__id103_.selectable = false;
__id103_.underline = false;
try {
__id103_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package