STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229457
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2574 · P5148

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/29805946?noj=FRM29805946-5DC" width="1" height="1"></div>

Nitro-Ninjas.swf

This is the info page for
Flash #113661

(Click the ID number above for more basic data on this flash file.)


Text
loading...

<p align="center"><font face="Arial" size="40" color="#66cc00" letterSpacing="1.000000" kerning="1">100%</font></p>

Nitro

ninjas

more games at:

<p align="left"></p>

-

© www.spilgames.com

© www.spilgames.com

BR

space bar

1

2

3

4

4

<p align="left"><font face="DigifaceWide" size="10" color="#d9e021" letterSpacing="0.000000" kerning="1">0000000</font></p>

<p align="center"><font face="DigifaceWide" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">00:00</font></p>

nitro

<p align="right"><font face="Arial Black" size="10" color="#ff0000" letterSpacing="0.000000" kerning="1">10</font></p>

<p align="left"></p>

<p align="left"></p>

-

<p align="left"></p>

<p align="left"></p>

<p align="left"></p>

of 6

ActionScript [AS3]

Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2CircleDef extends b2ShapeDef { public var radius:Number; public var localPosition:b2Vec2; 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.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { b2internal var m_localPosition:b2Vec2; b2internal var m_radius:Number; public function b2CircleShape(_arg1:b2ShapeDef){ m_localPosition = new b2Vec2(); super(_arg1); var _local2:b2CircleDef = (_arg1 as b2CircleDef); m_type = e_circleShape; m_localPosition.SetV(_local2.localPosition); m_radius = _local2.radius; } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):int{ var _local10:Number; var _local6:b2Mat22 = _arg1.R; var _local7:Number = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y))); var _local8:Number = (_arg1.position.y + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y))); var _local9:Number = (_arg4.p1.x - _local7); _local10 = (_arg4.p1.y - _local8); var _local11:Number = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius)); if (_local11 < 0){ _arg2[0] = 0; return (e_startsInsideCollide); }; var _local12:Number = (_arg4.p2.x - _arg4.p1.x); var _local13:Number = (_arg4.p2.y - _arg4.p1.y); var _local14:Number = ((_local9 * _local12) + (_local10 * _local13)); var _local15:Number = ((_local12 * _local12) + (_local13 * _local13)); var _local16:Number = ((_local14 * _local14) - (_local15 * _local11)); if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){ return (e_missCollide); }; var _local17:Number = -((_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 (e_hitCollide); }; return (e_missCollide); } public function GetLocalPosition():b2Vec2{ return (m_localPosition); } public function GetRadius():Number{ return (m_radius); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; _local4 = _arg2.R; var _local5:Number = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); var _local6:Number = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _local4 = _arg3.R; var _local7:Number = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); var _local8:Number = (_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)); } 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 b2internal function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:Number = (m_localPosition.x - _arg1.x); var _local3:Number = (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 = _arg2.R; var _local4:Number = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); var _local5:Number = (_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)); } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22 = _arg1.R; var _local4:Number = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); var _local5:Number = (_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))); } } }//package Box2D.Collision.Shapes
Section 3
//b2EdgeChainDef (Box2D.Collision.Shapes.b2EdgeChainDef) package Box2D.Collision.Shapes { public class b2EdgeChainDef extends b2ShapeDef { public var vertices:Array; public var vertexCount:int; public var isALoop:Boolean; public function b2EdgeChainDef(){ type = b2Shape.e_edgeShape; vertexCount = 0; isALoop = true; vertices = []; } } }//package Box2D.Collision.Shapes
Section 4
//b2EdgeShape (Box2D.Collision.Shapes.b2EdgeShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2EdgeShape extends b2Shape { b2internal var m_v1:b2Vec2; b2internal var m_v2:b2Vec2; private var s_supportVec:b2Vec2; b2internal var m_coreV1:b2Vec2; b2internal var m_coreV2:b2Vec2; b2internal var m_prevEdge:b2EdgeShape; b2internal var m_direction:b2Vec2; b2internal var m_cornerConvex1:Boolean; b2internal var m_cornerConvex2:Boolean; b2internal var m_cornerDir1:b2Vec2; b2internal var m_cornerDir2:b2Vec2; b2internal var m_nextEdge:b2EdgeShape; b2internal var m_normal:b2Vec2; b2internal var m_length:Number; public function b2EdgeShape(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2ShapeDef){ s_supportVec = new b2Vec2(); m_v1 = new b2Vec2(); m_v2 = new b2Vec2(); m_coreV1 = new b2Vec2(); m_coreV2 = new b2Vec2(); m_normal = new b2Vec2(); m_direction = new b2Vec2(); m_cornerDir1 = new b2Vec2(); m_cornerDir2 = new b2Vec2(); super(_arg3); m_type = e_edgeShape; m_prevEdge = null; m_nextEdge = null; m_v1 = _arg1; m_v2 = _arg2; m_direction.Set((m_v2.x - m_v1.x), (m_v2.y - m_v1.y)); m_length = m_direction.Normalize(); m_normal.Set(m_direction.y, -(m_direction.x)); m_coreV1.Set(((-(b2Settings.b2_toiSlop) * (m_normal.x - m_direction.x)) + m_v1.x), ((-(b2Settings.b2_toiSlop) * (m_normal.y - m_direction.y)) + m_v1.y)); m_coreV2.Set(((-(b2Settings.b2_toiSlop) * (m_normal.x + m_direction.x)) + m_v2.x), ((-(b2Settings.b2_toiSlop) * (m_normal.y + m_direction.y)) + m_v2.y)); m_cornerDir1 = m_normal; m_cornerDir2.Set(-(m_normal.x), -(m_normal.y)); } b2internal function SetPrevEdge(_arg1:b2EdgeShape, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Boolean):void{ m_prevEdge = _arg1; m_coreV1 = _arg2; m_cornerDir1 = _arg3; m_cornerConvex1 = _arg4; } public function GetCorner2Vector():b2Vec2{ return (m_cornerDir2); } public function GetDirectionVector():b2Vec2{ return (m_direction); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22 = _arg2.R; var _local4:Number = (_arg2.position.x + ((_local3.col1.x * m_v1.x) + (_local3.col2.x * m_v1.y))); var _local5:Number = (_arg2.position.y + ((_local3.col1.y * m_v1.x) + (_local3.col2.y * m_v1.y))); var _local6:Number = (_arg2.position.x + ((_local3.col1.x * m_v2.x) + (_local3.col2.x * m_v2.y))); var _local7:Number = (_arg2.position.y + ((_local3.col1.y * m_v2.x) + (_local3.col2.y * m_v2.y))); if (_local4 < _local6){ _arg1.lowerBound.x = _local4; _arg1.upperBound.x = _local6; } else { _arg1.lowerBound.x = _local6; _arg1.upperBound.x = _local4; }; if (_local5 < _local7){ _arg1.lowerBound.y = _local5; _arg1.upperBound.y = _local7; } else { _arg1.lowerBound.y = _local7; _arg1.upperBound.y = _local5; }; } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):int{ var _local6:b2Mat22; var _local12:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local7:Number = (_arg4.p2.x - _arg4.p1.x); var _local8:Number = (_arg4.p2.y - _arg4.p1.y); _local6 = _arg1.R; var _local9:Number = (_arg1.position.x + ((_local6.col1.x * m_v1.x) + (_local6.col2.x * m_v1.y))); var _local10:Number = (_arg1.position.y + ((_local6.col1.y * m_v1.x) + (_local6.col2.y * m_v1.y))); var _local11:Number = ((_arg1.position.y + ((_local6.col1.y * m_v2.x) + (_local6.col2.y * m_v2.y))) - _local10); _local12 = -(((_arg1.position.x + ((_local6.col1.x * m_v2.x) + (_local6.col2.x * m_v2.y))) - _local9)); var _local13:Number = (100 * Number.MIN_VALUE); var _local14:Number = -(((_local7 * _local11) + (_local8 * _local12))); if (_local14 > _local13){ _local15 = (_arg4.p1.x - _local9); _local16 = (_arg4.p1.y - _local10); _local17 = ((_local15 * _local11) + (_local16 * _local12)); if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local14))))){ _local18 = ((-(_local7) * _local16) + (_local8 * _local15)); if (((((-(_local13) * _local14) <= _local18)) && ((_local18 <= (_local14 * (1 + _local13)))))){ _local17 = (_local17 / _local14); _arg2[0] = _local17; _local19 = Math.sqrt(((_local11 * _local11) + (_local12 * _local12))); _arg3.x = (_local11 / _local19); _arg3.y = (_local12 / _local19); return (e_hitCollide); }; }; }; return (e_missCollide); } public function GetNextEdge():b2EdgeShape{ return (m_nextEdge); } override public function ComputeMass(_arg1:b2MassData):void{ _arg1.mass = 0; _arg1.center.SetV(m_v1); _arg1.I = 0; } public function Corner1IsConvex():Boolean{ return (m_cornerConvex1); } public function Corner2IsConvex():Boolean{ return (m_cornerConvex2); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Mat22 = _arg1.R; var _local5:Number = (_arg1.position.x + ((_local4.col1.x * m_coreV1.x) + (_local4.col2.x * m_coreV1.y))); var _local6:Number = (_arg1.position.y + ((_local4.col1.y * m_coreV1.x) + (_local4.col2.y * m_coreV1.y))); var _local7:Number = (_arg1.position.x + ((_local4.col1.x * m_coreV2.x) + (_local4.col2.x * m_coreV2.y))); var _local8:Number = (_arg1.position.y + ((_local4.col1.y * m_coreV2.x) + (_local4.col2.y * m_coreV2.y))); if (((_local5 * _arg2) + (_local6 * _arg3)) > ((_local7 * _arg2) + (_local8 * _arg3))){ s_supportVec.x = _local5; s_supportVec.y = _local6; } else { s_supportVec.x = _local7; s_supportVec.y = _local8; }; return (s_supportVec); } b2internal function SetNextEdge(_arg1:b2EdgeShape, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Boolean):void{ m_nextEdge = _arg1; m_coreV2 = _arg2; m_cornerDir2 = _arg3; m_cornerConvex2 = _arg4; } public function GetLength():Number{ return (m_length); } public function GetCorner1Vector():b2Vec2{ return (m_cornerDir1); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; _local4 = _arg2.R; var _local5:Number = (_arg2.position.x + ((_local4.col1.x * m_v1.x) + (_local4.col2.x * m_v1.y))); var _local6:Number = (_arg2.position.y + ((_local4.col1.y * m_v1.x) + (_local4.col2.y * m_v1.y))); var _local7:Number = (_arg2.position.x + ((_local4.col1.x * m_v2.x) + (_local4.col2.x * m_v2.y))); var _local8:Number = (_arg2.position.y + ((_local4.col1.y * m_v2.x) + (_local4.col2.y * m_v2.y))); _local4 = _arg3.R; var _local9:Number = (_arg3.position.x + ((_local4.col1.x * m_v1.x) + (_local4.col2.x * m_v1.y))); var _local10:Number = (_arg3.position.y + ((_local4.col1.y * m_v1.x) + (_local4.col2.y * m_v1.y))); var _local11:Number = (_arg3.position.x + ((_local4.col1.x * m_v2.x) + (_local4.col2.x * m_v2.y))); var _local12:Number = (_arg3.position.y + ((_local4.col1.y * m_v2.x) + (_local4.col2.y * m_v2.y))); _arg1.lowerBound.x = ((((((_local5 < _local7)) ? _local5 : _local7 < _local9)) ? ((_local5 < _local7)) ? _local5 : _local7 : _local9 < _local11)) ? ((((_local5 < _local7)) ? _local5 : _local7 < _local9)) ? ((_local5 < _local7)) ? _local5 : _local7 : _local9 : _local11; _arg1.lowerBound.y = ((((((_local6 < _local8)) ? _local6 : _local8 < _local10)) ? ((_local6 < _local8)) ? _local6 : _local8 : _local10 < _local12)) ? ((((_local6 < _local8)) ? _local6 : _local8 < _local10)) ? ((_local6 < _local8)) ? _local6 : _local8 : _local10 : _local12; _arg1.upperBound.x = ((((((_local5 > _local7)) ? _local5 : _local7 > _local9)) ? ((_local5 > _local7)) ? _local5 : _local7 : _local9 > _local11)) ? ((((_local5 > _local7)) ? _local5 : _local7 > _local9)) ? ((_local5 > _local7)) ? _local5 : _local7 : _local9 : _local11; _arg1.upperBound.y = ((((((_local6 > _local8)) ? _local6 : _local8 > _local10)) ? ((_local6 > _local8)) ? _local6 : _local8 : _local10 > _local12)) ? ((((_local6 > _local8)) ? _local6 : _local8 > _local10)) ? ((_local6 > _local8)) ? _local6 : _local8 : _local10 : _local12; } public function GetCoreVertex1():b2Vec2{ return (m_coreV1); } public function GetCoreVertex2():b2Vec2{ return (m_coreV2); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ var _local2:b2Mat22 = _arg1.R; return (new b2Vec2((_arg1.position.x + ((_local2.col1.x * m_coreV1.x) + (_local2.col2.x * m_coreV1.y))), (_arg1.position.y + ((_local2.col1.y * m_coreV1.x) + (_local2.col2.y * m_coreV1.y))))); } public function GetNormalVector():b2Vec2{ return (m_normal); } public function GetPrevEdge():b2EdgeShape{ return (m_prevEdge); } override b2internal function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:Number = (m_coreV1.x - _arg1.x); var _local3:Number = (m_coreV1.y - _arg1.y); var _local4:Number = ((_local2 * _local2) + (_local3 * _local3)); _local2 = (m_coreV2.x - _arg1.x); _local3 = (m_coreV2.y - _arg1.y); var _local5:Number = ((_local2 * _local2) + (_local3 * _local3)); m_sweepRadius = Math.sqrt(((_local4 > _local5)) ? _local4 : _local5); } public function GetVertex1():b2Vec2{ return (m_v1); } public function GetVertex2():b2Vec2{ return (m_v2); } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } } }//package Box2D.Collision.Shapes
Section 5
//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 Copy():b2FilterData{ var _local1:b2FilterData = new b2FilterData(); _local1.categoryBits = categoryBits; _local1.maskBits = maskBits; _local1.groupIndex = groupIndex; return (_local1); } } }//package Box2D.Collision.Shapes
Section 6
//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(){ center = new b2Vec2(0, 0); super(); } } }//package Box2D.Collision.Shapes
Section 7
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolygonDef extends b2ShapeDef { public var vertices:Array; public var vertexCount:int; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonDef(){ vertices = new Array(b2Settings.b2_maxPolygonVertices); super(); type = b2Shape.e_polygonShape; vertexCount = 0; var _local1:int; 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 8
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonShape extends b2Shape { private var m_coreVertices:Array; b2internal var m_vertices:Array; private var s_supportVec:b2Vec2; b2internal var m_centroid:b2Vec2; b2internal var m_normals:Array; private var m_obb:b2OBB; b2internal 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 _local3: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; var _local2:b2PolygonDef = (_arg1 as b2PolygonDef); m_vertexCount = _local2.vertexCount; var _local4:int = _local3; var _local5:int = _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 ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2AABB = s_sweptAABB1; var _local5:b2AABB = 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 GetCoreVertices():Array{ return (m_coreVertices); } public function GetCentroid():b2Vec2{ return (m_centroid); } 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 TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):int{ var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local20:Number; var _local21:Number; var _local6:Number = 0; var _local7:Number = _arg5; _local8 = (_arg4.p1.x - _arg1.position.x); _local9 = (_arg4.p1.y - _arg1.position.y); _local10 = _arg1.R; var _local12:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); var _local13:Number = ((_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; var _local14:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); var _local15:Number = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); var _local16:Number = (_local14 - _local12); var _local17:Number = (_local15 - _local13); var _local18 = -1; var _local19:int; 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){ if (_local20 < 0){ return (e_missCollide); }; } else { 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 (e_missCollide); }; _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 (e_hitCollide); }; _arg2[0] = 0; return (e_startsInsideCollide); } override public function ComputeMass(_arg1:b2MassData):void{ 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; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = (1 / 3); var _local9:int; 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 GetNormals():Array{ return (m_normals); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Vec2; var _local5:b2Mat22; var _local11:Number; _local5 = _arg1.R; var _local6:Number = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y)); var _local7:Number = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y)); var _local8:int; _local4 = m_coreVertices[0]; var _local9:Number = ((_local4.x * _local6) + (_local4.y * _local7)); var _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 ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Mat22 = 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(); var _local6:b2Mat22 = _local5; _local4 = m_obb.extents; var _local7:Number = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y)); var _local8:Number = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y)); _local3 = _arg2.R; _local4 = m_obb.center; var _local9:Number = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); var _local10:Number = (_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)); } override b2internal function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:b2Vec2; var _local4:Number; var _local5:Number; m_sweepRadius = 0; var _local3:int; 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 TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Vec2; var _local10:Number; var _local4:b2Mat22 = _arg1.R; var _local5:Number = (_arg2.x - _arg1.position.x); var _local6:Number = (_arg2.y - _arg1.position.y); var _local7:Number = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y)); var _local8:Number = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y)); var _local9:int; 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 static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{ var _local3:b2Vec2; var _local7:Number; 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(); var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; _local7 = (1 / 3); var _local8:int; 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); } b2internal static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{ var _local4:int; 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; var _local5:Array = new Array((b2Settings.b2_maxPolygonVertices + 1)); _local4 = 0; while (_local4 < _arg3) { _local5[_local4] = _arg2[_local4]; _local4++; }; _local5[_arg3] = _local5[0]; var _local6:Number = 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 9
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Shape { b2internal var m_next:b2Shape; b2internal var m_type:int; b2internal var m_sweepRadius:Number; b2internal var m_density:Number; private var m_filter:b2FilterData; b2internal var m_friction:Number; private var m_isSensor:Boolean; b2internal var m_restitution:Number; private var m_proxy:b2Proxy; private var m_userData; b2internal var m_body:b2Body; b2internal static const e_polygonShape:int = 1; public static const e_hitCollide:int = 1; public static const e_missCollide:int = 0; b2internal static const e_edgeShape:int = 2; b2internal static const e_unknownShape:int = -1; b2internal static const e_circleShape:int = 0; b2internal static const e_shapeTypeCount:int = 3; public static const e_startsInsideCollide:int = -1; 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_proxy = null; m_filter = _arg1.filter.Copy(); m_isSensor = _arg1.isSensor; } public function SetUserData(_arg1):void{ m_userData = _arg1; } 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 SetRestitution(_arg1:Number):void{ m_restitution = _arg1; } public function GetType():int{ return (m_type); } public function GetRestitution():Number{ return (m_restitution); } public function SetSensor(_arg1:Boolean):void{ m_isSensor = _arg1; } public function GetFriction():Number{ return (m_friction); } public function GetFilterData():b2FilterData{ return (m_filter.Copy()); } public function SetFriction(_arg1:Number):void{ m_friction = _arg1; } public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):int{ return (e_missCollide); } b2internal function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ if (m_proxy == null){ return; }; _arg1.DestroyProxy(m_proxy); var _local3:b2AABB = s_resetAABB; ComputeAABB(_local3, _arg2); var _local4:Boolean = _arg1.InRange(_local3); if (_local4){ m_proxy = _arg1.CreateProxy(_local3, this); } else { m_proxy = null; }; } public function IsSensor():Boolean{ return (m_isSensor); } public function GetUserData(){ return (m_userData); } b2internal function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{ if (m_proxy == null){ return (false); }; var _local4:b2AABB = s_syncAABB; ComputeSweptAABB(_local4, _arg2, _arg3); if (_arg1.InRange(_local4)){ _arg1.MoveProxy(m_proxy, _local4); return (true); }; return (false); } public function ComputeMass(_arg1:b2MassData):void{ } public function SetFilterData(_arg1:b2FilterData):void{ m_filter = _arg1.Copy(); } b2internal function DestroyProxy(_arg1:b2BroadPhase):void{ if (m_proxy){ _arg1.DestroyProxy(m_proxy); m_proxy = null; }; } b2internal function UpdateSweepRadius(_arg1:b2Vec2):void{ } public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ } public function GetBody():b2Body{ return (m_body); } b2internal function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB = s_proxyAABB; ComputeAABB(_local3, _arg2); var _local4:Boolean = _arg1.InRange(_local3); if (_local4){ m_proxy = _arg1.CreateProxy(_local3, this); } else { m_proxy = null; }; } public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } b2internal static function Destroy(_arg1:b2Shape, _arg2):void{ var _local3:b2EdgeShape; switch (_arg1.m_type){ case e_edgeShape: _local3 = (_arg1 as b2EdgeShape); if (_local3.m_nextEdge != null){ _local3.m_nextEdge.m_prevEdge = null; }; if (_local3.m_prevEdge != null){ _local3.m_prevEdge.m_nextEdge = null; }; break; }; } b2internal 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 10
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { public class b2ShapeDef { public var friction:Number;// = 0.2 public var isSensor:Boolean;// = false public var density:Number;// = 0 public var restitution:Number;// = 0 public var userData;// = null public var filter:b2FilterData; public var type:int; public function b2ShapeDef(){ type = b2Shape.e_unknownShape; filter = new b2FilterData(); super(); } } }//package Box2D.Collision.Shapes
Section 11
//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 = (upperBound.x - lowerBound.x); var _local2:Number = (upperBound.y - lowerBound.y); var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 12
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var value:uint; public var stabbingCount:uint; public var proxy:b2Proxy; public function Swap(_arg1:b2Bound):void{ var _local2:uint = value; var _local3:b2Proxy = proxy; var _local4:uint = stabbingCount; value = _arg1.value; proxy = _arg1.proxy; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxy = _local3; _arg1.stabbingCount = _local4; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Box2D.Collision
Section 13
//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 14
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { b2internal var m_bounds:Array; b2internal var m_quantizationFactor:b2Vec2; b2internal var m_worldAABB:b2AABB; private var m_querySortKeys:Array; private var m_freeProxy:b2Proxy; b2internal var m_proxyCount:int; b2internal var m_proxyPool:Array; private var m_queryResultCount:int; b2internal var m_pairManager:b2PairManager; private var m_timeStamp:uint; private 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; m_pairManager = new b2PairManager(); m_proxyPool = new Array(); m_bounds = new Array(); m_querySortKeys = new Array(); m_queryResults = new Array(); m_quantizationFactor = new b2Vec2(); super(); m_pairManager.Initialize(this, _arg2); m_worldAABB = _arg1; m_proxyCount = 0; m_bounds = new Array(2); _local3 = 0; while (_local3 < 2) { m_bounds[_local3] = new Array(); _local3++; }; var _local4:Number = (_arg1.upperBound.x - _arg1.lowerBound.x); var _local5:Number = (_arg1.upperBound.y - _arg1.lowerBound.y); m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4); m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5); m_timeStamp = 1; m_queryResultCount = 0; } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local6:uint; var _local7:uint; var _local12:b2Proxy; var _local4:Array = new Array(); var _local5:Array = new Array(); ComputeBounds(_local4, _local5, _arg1); var _local8:Array = [_local6]; var _local9:Array = [_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); var _local10:int; var _local11:int; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_queryResults[_local11]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } public function Commit():void{ m_pairManager.Commit(); } private function IncrementTimeStamp():void{ var _local1:uint; if (m_timeStamp == b2Settings.USHRT_MAX){ _local1 = 0; while (_local1 < m_proxyPool.length) { (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 _local10:b2Bound; var _local12:int; var _local13:int; var _local14:b2Proxy; var _local8:uint = BinarySearch(_arg5, _arg6, _arg3); var _local9:uint = BinarySearch(_arg5, _arg6, _arg4); var _local11:uint = _local8; while (_local11 < _local9) { _local10 = _arg5[_local11]; if (_local10.IsLower()){ IncrementOverlapCount(_local10.proxy); }; _local11++; }; if (_local8 > 0){ _local12 = (_local8 - 1); _local10 = _arg5[_local12]; _local13 = _local10.stabbingCount; while (_local13) { _local10 = _arg5[_local12]; if (_local10.IsLower()){ _local14 = _local10.proxy; if (_local8 <= _local14.upperBounds[_arg7]){ IncrementOverlapCount(_local10.proxy); _local13--; }; }; _local12--; }; }; _arg1[0] = _local8; _arg2[0] = _local9; } private function AddProxyResult(_arg1:b2Proxy, _arg2:Number, _arg3:Function):void{ var _local8:Number; var _local9:b2Proxy; var _local4:Number = _arg3(_arg1.userData); if (_local4 < 0){ return; }; var _local5:Number = 0; while ((((_local5 < m_queryResultCount)) && ((m_querySortKeys[_local5] < _local4)))) { _local5++; }; var _local6:Number = _local4; var _local7:b2Proxy = _arg1; m_queryResultCount = (m_queryResultCount + 1); if (m_queryResultCount > _arg2){ m_queryResultCount = _arg2; }; while (_local5 < m_queryResultCount) { _local8 = m_querySortKeys[_local5]; _local9 = m_queryResults[_local5]; m_querySortKeys[_local5] = _local6; m_queryResults[_local5] = _local7; _local6 = _local8; _local7 = _local9; _local5++; }; } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local5:b2Bound; var _local6:b2Bound; var _local3:int; 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 = _arg3.lowerBound.x; var _local5:Number = _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); var _local6:Number = _arg3.upperBound.x; var _local7:Number = _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):b2Proxy{ var _local3:uint; var _local4:b2Proxy; var _local5:int; var _local6:int; var _local11:Array; var _local12:uint; var _local13:uint; var _local14:Array; var _local15:Array; var _local16:b2Bound; var _local17:b2Bound; var _local18:b2Bound; var _local19:b2Proxy; if (!m_freeProxy){ m_freeProxy = (m_proxyPool[m_proxyCount] = new b2Proxy()); m_freeProxy.next = null; m_freeProxy.timeStamp = 0; m_freeProxy.overlapCount = b2_invalid; m_freeProxy.userData = null; _local5 = 0; while (_local5 < 2) { _local6 = (m_proxyCount * 2); var _temp1 = _local6; _local6 = (_local6 + 1); var _local20 = _temp1; m_bounds[_local5][_local20] = new b2Bound(); m_bounds[_local5][_local6] = new b2Bound(); _local5++; }; }; _local4 = m_freeProxy; m_freeProxy = _local4.next; _local4.overlapCount = 0; _local4.userData = _arg2; var _local7:uint = (2 * m_proxyCount); var _local8:Array = new Array(); var _local9:Array = new Array(); ComputeBounds(_local8, _local9, _arg1); var _local10:int; while (_local10 < 2) { _local11 = m_bounds[_local10]; _local14 = [_local12]; _local15 = [_local13]; Query(_local14, _local15, _local8[_local10], _local9[_local10], _local11, _local7, _local10); _local12 = _local14[0]; _local13 = _local15[0]; _local11.splice(_local13, 0, _local11[(_local11.length - 1)]); _local11.length--; _local11.splice(_local12, 0, _local11[(_local11.length - 1)]); _local11.length--; _local13++; _local16 = _local11[_local12]; _local17 = _local11[_local13]; _local16.value = _local8[_local10]; _local16.proxy = _local4; _local17.value = _local9[_local10]; _local17.proxy = _local4; _local18 = _local11[int((_local12 - 1))]; _local16.stabbingCount = ((_local12 == 0)) ? 0 : _local18.stabbingCount; _local18 = _local11[int((_local13 - 1))]; _local17.stabbingCount = _local18.stabbingCount; _local3 = _local12; while (_local3 < _local13) { _local18 = _local11[_local3]; _local18.stabbingCount++; _local3++; }; _local3 = _local12; while (_local3 < (_local7 + 2)) { _local16 = _local11[_local3]; _local19 = _local16.proxy; if (_local16.IsLower()){ _local19.lowerBounds[_local10] = _local3; } else { _local19.upperBounds[_local10] = _local3; }; _local3++; }; _local10++; }; m_proxyCount++; _local5 = 0; while (_local5 < m_queryResultCount) { m_pairManager.AddBufferedPair(_local4, m_queryResults[_local5]); _local5++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); return (_local4); } public function DestroyProxy(_arg1:b2Proxy):void{ var _local2:b2Bound; var _local3:b2Bound; var _local7:Array; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:int; var _local13:uint; var _local14:int; var _local15:b2Proxy; var _local4:int = (2 * m_proxyCount); var _local5:int; while (_local5 < 2) { _local7 = m_bounds[_local5]; _local8 = _arg1.lowerBounds[_local5]; _local9 = _arg1.upperBounds[_local5]; _local2 = _local7[_local8]; _local10 = _local2.value; _local3 = _local7[_local9]; _local11 = _local3.value; _local7.splice(_local9, 1); _local7.splice(_local8, 1); _local7.push(_local2); _local7.push(_local3); _local12 = (_local4 - 2); _local13 = _local8; while (_local13 < _local12) { _local2 = _local7[_local13]; _local15 = _local2.proxy; if (_local2.IsLower()){ _local15.lowerBounds[_local5] = _local13; } else { _local15.upperBounds[_local5] = _local13; }; _local13++; }; _local12 = (_local9 - 1); _local14 = _local8; while (_local14 < _local12) { _local2 = _local7[_local14]; _local2.stabbingCount--; _local14++; }; Query([0], [0], _local10, _local11, _local7, (_local4 - 2), _local5); _local5++; }; var _local6:int; while (_local6 < m_queryResultCount) { m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local6]); _local6++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); _arg1.userData = null; _arg1.overlapCount = b2_invalid; _arg1.lowerBounds[0] = b2_invalid; _arg1.lowerBounds[1] = b2_invalid; _arg1.upperBounds[0] = b2_invalid; _arg1.upperBounds[1] = b2_invalid; _arg1.next = m_freeProxy; m_freeProxy = _arg1; m_proxyCount--; } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local5:b2Bound; var _local3:int; 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 _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local5:int; 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:b2Proxy):void{ if (_arg1.timeStamp < m_timeStamp){ _arg1.timeStamp = m_timeStamp; _arg1.overlapCount = 1; } else { _arg1.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 QuerySegment(_arg1:b2Segment, _arg2, _arg3:int, _arg4:Function):int{ var _local15:int; var _local16:int; var _local17:b2Proxy; var _local18:uint; var _local19:uint; var _local22:int; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2Proxy; var _local27:Number; var _local28:Number; var _local5:Number = 1; var _local6:Number = ((_arg1.p2.x - _arg1.p1.x) * m_quantizationFactor.x); var _local7:Number = ((_arg1.p2.y - _arg1.p1.y) * m_quantizationFactor.y); var _local8:int = ((_local6 < -(Number.MIN_VALUE))) ? -1 : ((_local6 > Number.MIN_VALUE)) ? 1 : 0; var _local9:int = ((_local7 < -(Number.MIN_VALUE))) ? -1 : ((_local7 > Number.MIN_VALUE)) ? 1 : 0; var _local10:Number = (m_quantizationFactor.x * (_arg1.p1.x - m_worldAABB.lowerBound.x)); var _local11:Number = (m_quantizationFactor.y * (_arg1.p1.y - m_worldAABB.lowerBound.y)); var _local12:Array = new Array(); var _local13:Array = new Array(); _local12[0] = (uint(_local10) & (b2Settings.USHRT_MAX - 1)); _local12[1] = (uint(_local11) & (b2Settings.USHRT_MAX - 1)); _local13[0] = (_local12[0] + 1); _local13[1] = (_local12[1] + 1); var _local14:Array = new Array(); var _local20:Array = [_local18]; var _local21:Array = [_local19]; Query(_local20, _local21, _local12[0], _local13[0], m_bounds[0], (2 * m_proxyCount), 0); if (_local8 >= 0){ _local15 = (_local21[0] - 1); } else { _local15 = _local20[0]; }; Query(_local20, _local21, _local12[1], _local13[1], m_bounds[1], (2 * m_proxyCount), 1); if (_local9 >= 0){ _local16 = (_local21[0] - 1); } else { _local16 = _local20[0]; }; if (_arg4 != null){ _local23 = 0; while (_local23 < m_queryResultCount) { m_querySortKeys[_local23] = _arg4(m_queryResults[_local23].userData); _local23++; }; _local23 = 0; while (_local23 < (m_queryResultCount - 1)) { _local24 = m_querySortKeys[_local23]; _local25 = m_querySortKeys[(_local23 + 1)]; if (((_local24)<0) ? (_local25 >= 0) : (((_local24 > _local25)) && ((_local25 >= 0)))){ m_querySortKeys[(_local23 + 1)] = _local24; m_querySortKeys[_local23] = _local25; _local26 = m_queryResults[(_local23 + 1)]; m_queryResults[(_local23 + 1)] = m_queryResults[_local23]; m_queryResults[_local23] = _local26; --_local23; if (_local23 == -1){ _local23 = 1; }; } else { _local23++; }; }; while ((((m_queryResultCount > 0)) && ((m_querySortKeys[(m_queryResultCount - 1)] < 0)))) { m_queryResultCount--; }; }; while (true) { _local27 = 0; _local28 = 0; _local15 = (_local15 + ((_local8 >= 0)) ? 1 : -1); if ((((_local15 < 0)) || ((_local15 >= (m_proxyCount * 2))))){ break; }; if (_local8 != 0){ _local27 = ((m_bounds[0][_local15].value - _local10) / _local6); }; _local16 = (_local16 + ((_local9 >= 0)) ? 1 : -1); if ((((_local16 < 0)) || ((_local16 >= (m_proxyCount * 2))))){ break; }; if (_local9 != 0){ _local28 = ((m_bounds[1][_local16].value - _local11) / _local7); }; while (true) { if ((((_local9 == 0)) || (((!((_local8 == 0))) && ((_local27 < _local28)))))){ if (_local27 > _local5){ break; }; if (((_local8 > 0)) ? m_bounds[0][_local15].IsLower() : m_bounds[0][_local15].IsUpper()){ _local17 = m_bounds[0][_local15].proxy; if (_local9 >= 0){ if ((((_local17.lowerBounds[1] <= (_local16 - 1))) && ((_local17.upperBounds[1] >= _local16)))){ if (_arg4 != null){ AddProxyResult(_local17, _arg3, _arg4); } else { m_queryResults[m_queryResultCount] = _local17; m_queryResultCount++; }; }; } else { if ((((_local17.lowerBounds[1] <= _local16)) && ((_local17.upperBounds[1] >= (_local16 + 1))))){ if (_arg4 != null){ AddProxyResult(_local17, _arg3, _arg4); } else { m_queryResults[m_queryResultCount] = _local17; m_queryResultCount++; }; }; }; }; if (((((((!((_arg4 == null))) && ((m_queryResultCount == _arg3)))) && ((m_queryResultCount > 0)))) && ((_local27 > m_querySortKeys[(m_queryResultCount - 1)])))){ break; }; if (_local8 > 0){ _local15++; if (_local15 == (m_proxyCount * 2)){ break; }; } else { --_local15; if (_local15 < 0){ break; }; }; _local27 = ((m_bounds[0][_local15].value - _local10) / _local6); } else { if (_local28 > _local5){ break; }; if (((_local9 > 0)) ? m_bounds[1][_local16].IsLower() : m_bounds[1][_local16].IsUpper()){ _local17 = m_bounds[1][_local16].proxy; if (_local8 >= 0){ if ((((_local17.lowerBounds[0] <= (_local15 - 1))) && ((_local17.upperBounds[0] >= _local15)))){ if (_arg4 != null){ AddProxyResult(_local17, _arg3, _arg4); } else { m_queryResults[m_queryResultCount] = _local17; m_queryResultCount++; }; }; } else { if ((((_local17.lowerBounds[0] <= _local15)) && ((_local17.upperBounds[0] >= (_local15 + 1))))){ if (_arg4 != null){ AddProxyResult(_local17, _arg3, _arg4); } else { m_queryResults[m_queryResultCount] = _local17; m_queryResultCount++; }; }; }; }; if (((((((!((_arg4 == null))) && ((m_queryResultCount == _arg3)))) && ((m_queryResultCount > 0)))) && ((_local28 > m_querySortKeys[(m_queryResultCount - 1)])))){ break; }; if (_local9 > 0){ _local16++; if (_local16 == (m_proxyCount * 2)){ break; }; } else { --_local16; if (_local16 < 0){ break; }; }; _local28 = ((m_bounds[1][_local16].value - _local11) / _local7); }; }; break; }; _local22 = 0; _local23 = 0; while ((((_local23 < m_queryResultCount)) && ((_local22 < _arg3)))) { _local17 = m_queryResults[_local23]; _arg2[_local23] = _local17.userData; _local23++; _local22++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local22); } public function MoveProxy(_arg1:b2Proxy, _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 _local15:Array; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:uint; var _local20:int; var _local21:int; var _local22:b2Proxy; if (_arg1 == null){ return; }; if (_arg2.IsValid() == false){ return; }; var _local12:uint = (2 * m_proxyCount); var _local13:b2BoundValues = new b2BoundValues(); ComputeBounds(_local13.lowerValues, _local13.upperValues, _arg2); var _local14:b2BoundValues = new b2BoundValues(); _local5 = 0; while (_local5 < 2) { _local7 = m_bounds[_local5][_arg1.lowerBounds[_local5]]; _local14.lowerValues[_local5] = _local7.value; _local7 = m_bounds[_local5][_arg1.upperBounds[_local5]]; _local14.upperValues[_local5] = _local7.value; _local5++; }; _local5 = 0; while (_local5 < 2) { _local15 = m_bounds[_local5]; _local16 = _arg1.lowerBounds[_local5]; _local17 = _arg1.upperBounds[_local5]; _local18 = _local13.lowerValues[_local5]; _local19 = _local13.upperValues[_local5]; _local7 = _local15[_local16]; _local20 = (_local18 - _local7.value); _local7.value = _local18; _local7 = _local15[_local17]; _local21 = (_local19 - _local7.value); _local7.value = _local19; if (_local20 < 0){ _local6 = _local16; while ((((_local6 > 0)) && ((_local18 < (_local15[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local15[_local6]; _local8 = _local15[int((_local6 - 1))]; _local22 = _local8.proxy; _local8.stabbingCount++; if (_local8.IsUpper() == true){ if (TestOverlap(_local13, _local22)){ m_pairManager.AddBufferedPair(_arg1, _local22); }; _local3 = _local22.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local22.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _arg1.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; if (_local21 > 0){ _local6 = _local17; while ((((_local6 < (_local12 - 1))) && (((_local15[int((_local6 + 1))] as b2Bound).value <= _local19)))) { _local7 = _local15[_local6]; _local9 = _local15[int((_local6 + 1))]; _local11 = _local9.proxy; _local9.stabbingCount++; if (_local9.IsLower() == true){ if (TestOverlap(_local13, _local11)){ m_pairManager.AddBufferedPair(_arg1, _local11); }; _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 = _arg1.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local20 > 0){ _local6 = _local16; while ((((_local6 < (_local12 - 1))) && (((_local15[int((_local6 + 1))] as b2Bound).value <= _local18)))) { _local7 = _local15[_local6]; _local9 = _local15[int((_local6 + 1))]; _local11 = _local9.proxy; _local9.stabbingCount--; if (_local9.IsUpper()){ if (TestOverlap(_local14, _local11)){ m_pairManager.RemoveBufferedPair(_arg1, _local11); }; _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 = _arg1.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local21 < 0){ _local6 = _local17; while ((((_local6 > 0)) && ((_local19 < (_local15[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local15[_local6]; _local8 = _local15[int((_local6 - 1))]; _local22 = _local8.proxy; _local8.stabbingCount--; if (_local8.IsLower() == true){ if (TestOverlap(_local14, _local22)){ m_pairManager.RemoveBufferedPair(_arg1, _local22); }; _local3 = _local22.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local22.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _arg1.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 _local6:int; var _local7:b2Bound; var _local4:int; var _local5:int = (_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 15
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 _local11:b2Mat22; var _local12:b2Vec2; var _local25:Number; var _local6:int = _arg1.m_vertexCount; var _local7:Array = _arg1.m_vertices; var _local8:Array = _arg1.m_normals; var _local9:int = _arg4.m_vertexCount; var _local10:Array = _arg4.m_vertices; _local11 = _arg2.R; _local12 = _local8[_arg3]; var _local13:Number = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)); var _local14:Number = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)); _local11 = _arg5.R; var _local15:Number = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14)); var _local16:Number = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14)); var _local17:int; var _local18:Number = Number.MAX_VALUE; var _local19:int; 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; var _local20:Number = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); var _local21:Number = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local12 = _local10[_local17]; _local11 = _arg5.R; var _local22:Number = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); var _local23:Number = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local22 = (_local22 - _local20); _local23 = (_local23 - _local21); var _local24:Number = ((_local22 * _local13) + (_local23 * _local14)); return (_local24); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2 = _arg2.lowerBound; var _local4:b2Vec2 = _arg1.upperBound; var _local5:Number = (_local3.x - _local4.x); var _local6:Number = (_local3.y - _local4.y); _local3 = _arg1.lowerBound; _local4 = _arg2.upperBound; var _local7:Number = (_local3.x - _local4.x); var _local8:Number = (_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 _local12:b2Mat22; var _local13:b2Vec2; var _local20:ClipVertex; var _local23:Number; var _local7:int = _arg2.m_vertexCount; var _local8:Array = _arg2.m_normals; var _local9:int = _arg5.m_vertexCount; var _local10:Array = _arg5.m_vertices; var _local11:Array = _arg5.m_normals; _local12 = _arg3.R; _local13 = _local8[_arg4]; var _local14:Number = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)); var _local15:Number = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)); _local12 = _arg6.R; var _local16:Number = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15)); _local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15)); _local14 = _local16; var _local17:int; var _local18:Number = Number.MAX_VALUE; var _local19:int; while (_local19 < _local9) { _local13 = _local11[_local19]; _local23 = ((_local14 * _local13.x) + (_local15 * _local13.y)); if (_local23 < _local18){ _local18 = _local23; _local17 = _local19; }; _local19++; }; var _local21:int = _local17; var _local22:int = (((_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 _local13:b2PolygonShape; var _local14:b2PolygonShape; var _local17:int; var _local18:uint; var _local34:int; var _local37:b2Vec2; var _local38:Number; var _local39:b2ManifoldPoint; _arg1.pointCount = 0; var _local7:int; var _local8:Array = [_local7]; var _local9:Number = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5); _local7 = _local8[0]; if (_local9 > 0){ return; }; var _local10:int; var _local11:Array = [_local10]; var _local12:Number = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3); _local10 = _local11[0]; if (_local12 > 0){ return; }; var _local15:b2XForm = new b2XForm(); var _local16:b2XForm = new b2XForm(); var _local19:Number = 0.98; var _local20:Number = 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; }; var _local21:Array = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16); var _local22:int = _local13.m_vertexCount; var _local23:Array = _local13.m_vertices; var _local24:b2Vec2 = _local23[_local17]; var _local25:b2Vec2 = _local24.Copy(); if ((_local17 + 1) < _local22){ _local24 = _local23[int((_local17 + 1))]; _local37 = _local24.Copy(); } else { _local24 = _local23[0]; _local37 = _local24.Copy(); }; var _local26:b2Vec2 = b2Math.SubtractVV(_local37, _local25); var _local27:b2Vec2 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25)); _local27.Normalize(); var _local28:b2Vec2 = b2Math.b2CrossVF(_local27, 1); _local25 = b2Math.b2MulX(_local15, _local25); _local37 = b2Math.b2MulX(_local15, _local37); var _local29:Number = b2Math.b2Dot(_local28, _local25); var _local30:Number = -(b2Math.b2Dot(_local27, _local25)); var _local31:Number = b2Math.b2Dot(_local27, _local37); var _local32:Array = [new ClipVertex(), new ClipVertex()]; var _local33:Array = [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(); var _local35:int; var _local36:int; while (_local36 < b2Settings.b2_maxManifoldPoints) { _local6 = _local33[_local36]; _local38 = (((_local28.x * _local6.v.x) + (_local28.y * _local6.v.y)) - _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 _local8:b2Vec2; var _local9:b2Mat22; var _local22:int; var _local23:Number; var _local24:int; var _local25:Number; var _local6:int = _arg2.m_vertexCount; var _local7:Array = _arg2.m_normals; _local9 = _arg5.R; _local8 = _arg4.m_centroid; var _local10:Number = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))); var _local11:Number = (_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)))); var _local12:Number = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y)); var _local13:Number = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y)); var _local14:int; var _local15:Number = -(Number.MAX_VALUE); var _local16:int; while (_local16 < _local6) { _local8 = _local7[_local16]; _local25 = ((_local8.x * _local12) + (_local8.y * _local13)); if (_local25 > _local15){ _local15 = _local25; _local14 = _local16; }; _local16++; }; var _local17:Number = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; var _local18:int = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1); var _local19:Number = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5); if (_local19 > 0){ return (_local19); }; var _local20:int = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0; var _local21:Number = 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 _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); var _local10:Number = (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 _local18:Number; var _local24:Number; var _local25:Number; _arg1.pointCount = 0; _local6 = _arg3.R; _local7 = _arg2.m_localPosition; var _local8:Number = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local9:Number = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local6 = _arg5.R; _local7 = _arg4.m_localPosition; var _local10:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local11:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); var _local12:Number = (_local10 - _local8); var _local13:Number = (_local11 - _local9); var _local14:Number = ((_local12 * _local12) + (_local13 * _local13)); var _local15:Number = _arg2.m_radius; var _local16:Number = _arg4.m_radius; var _local17:Number = (_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; var _local19:b2ManifoldPoint = _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)); var _local20:Number = (0.5 * (_local8 + _local10)); var _local21:Number = (0.5 * (_local9 + _local11)); var _local22:Number = (_local20 - _arg3.position.x); var _local23:Number = (_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 _local17:Number; var _local32:Number; var _local33:Number; var _local34:Number; _arg1.pointCount = 0; _local12 = _arg5.R; _local11 = _arg4.m_localPosition; var _local13:Number = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y))); var _local14:Number = (_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; var _local15:Number = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); var _local16:Number = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); var _local18:int; var _local19:Number = -(Number.MAX_VALUE); var _local20:Number = _arg4.m_radius; var _local21:int = _arg2.m_vertexCount; var _local22:Array = _arg2.m_vertices; var _local23:Array = _arg2.m_normals; var _local24:int; 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; }; var _local25:int = _local18; var _local26:int = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0; _local11 = _local22[_local25]; var _local27:b2Vec2 = _local22[_local26]; var _local28:Number = (_local27.x - _local11.x); var _local29:Number = (_local27.y - _local11.y); var _local30:Number = Math.sqrt(((_local28 * _local28) + (_local29 * _local29))); _local28 = (_local28 / _local30); _local29 = (_local29 / _local30); _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); var _local31:Number = ((_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 = b2_nullFeature; }; }; _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 16
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { import Box2D.Common.*; public class b2ContactID { b2internal 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 = new b2ContactID(); _local1.key = key; return (_local1); } 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); } public function get key():uint{ return (_key); } } }//package Box2D.Collision
Section 17
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class b2ContactPoint { public var friction:Number; 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 velocity:b2Vec2; public function b2ContactPoint(){ position = new b2Vec2(); velocity = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 18
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local4:Number = (100 * Number.MIN_VALUE); var _local5:int; while (_local5 < _arg3) { _local6 = _arg2[_local5]; _local7 = (((_arg1.x - _local6.x) < 0)) ? -((_arg1.x - _local6.x)) : (_arg1.x - _local6.x); _local8 = (((_arg1.y - _local6.y) < 0)) ? -((_arg1.y - _local6.y)) : (_arg1.y - _local6.y); _local9 = ((_arg1.x < 0)) ? -(_arg1.x) : (((_arg1.x > _local6.x) < 0)) ? -(_local6.x) : (_local6.x) ? ((_arg1.x < 0)) ? -(_arg1.x) : _arg1.x : ((_local6.x < 0)) ? -(_local6.x) : _local6.x; _local10 = ((_arg1.x < 0)) ? -(_arg1.y) : (((_arg1.y > _local6.y) < 0)) ? -(_local6.y) : (_local6.y) ? ((_arg1.y < 0)) ? -(_arg1.y) : _arg1.y : ((_local6.y < 0)) ? -(_local6.y) : _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 _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; var _local8:Array = s_p1s; var _local9:Array = s_p2s; var _local10:Array = s_points; var _local11:int; _arg1.SetV(_arg3.GetFirstVertex(_arg4)); _arg2.SetV(_arg5.GetFirstVertex(_arg6)); var _local12:Number = 0; var _local13 = 20; var _local14:int; 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 - _local21) <= (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 (_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 DistanceEdgeCircle(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2EdgeShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Vec2; var _local9:b2Mat22; var _local10:b2Vec2; var _local8:Number = (_arg5.m_radius - b2Settings.b2_toiSlop); _local9 = _arg6.R; _local10 = _arg5.m_localPosition; var _local11:Number = (_arg6.position.x + ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y))); var _local12:Number = (_arg6.position.y + ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y))); _local9 = _arg4.R; var _local13:Number = (_local11 - _arg4.position.x); var _local14:Number = (_local12 - _arg4.position.y); var _local15:Number = ((_local13 * _local9.col1.x) + (_local14 * _local9.col1.y)); var _local16:Number = ((_local13 * _local9.col2.x) + (_local14 * _local9.col2.y)); var _local17:Number = (((_local15 - _arg3.m_coreV1.x) * _arg3.m_direction.x) + ((_local16 - _arg3.m_coreV1.y) * _arg3.m_direction.y)); if (_local17 <= 0){ _local9 = _arg4.R; _local10 = _arg3.m_coreV1; _arg1.x = (_arg4.position.x + ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y))); _arg1.y = (_arg4.position.y + ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y))); } else { if (_local17 >= _arg3.m_length){ _local9 = _arg4.R; _local10 = _arg3.m_coreV2; _arg1.x = (_arg4.position.x + ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y))); _arg1.y = (_arg4.position.y + ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y))); } else { _local9 = _arg4.R; _local13 = (_arg3.m_coreV1.x + (_local17 * _arg3.m_direction.x)); _local14 = (_arg3.m_coreV1.y + (_local17 * _arg3.m_direction.y)); _arg1.x = (_arg4.position.x + ((_local9.col1.x * _local13) + (_local9.col2.x * _local14))); _arg1.y = (_arg4.position.y + ((_local9.col1.y * _local13) + (_local9.col2.y * _local14))); _local17 = (((_local15 - _arg3.m_coreV1.x) * _arg3.m_normal.x) + ((_local16 - _arg3.m_coreV1.y) * _arg3.m_normal.y)); if (_local17 < 0){ if (_local17 < -(_local8)){ _local9 = _arg4.R; _local13 = (_local15 + (_local8 * _arg3.m_normal.x)); _local14 = (_local16 + (_local8 * _arg3.m_normal.y)); _arg2.x = (_arg4.position.x + ((_local9.col1.x * _local13) + (_local9.col2.x * _local14))); _arg2.y = (_arg4.position.y + ((_local9.col1.y * _local13) + (_local9.col2.y * _local14))); return ((-(_local17) - _local8)); }; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } else { if (_local17 > _local8){ _local9 = _arg4.R; _local13 = (_local15 - (_local8 * _arg3.m_normal.x)); _local14 = (_local16 - (_local8 * _arg3.m_normal.y)); _arg2.x = (_arg4.position.x + ((_local9.col1.x * _local13) + (_local9.col2.x * _local14))); _arg2.y = (_arg4.position.y + ((_local9.col1.y * _local13) + (_local9.col2.y * _local14))); return ((_local17 - _local8)); }; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); }; }; }; _local13 = (_local11 - _arg1.x); _local14 = (_local12 - _arg1.y); _local17 = ((_local13 * _local13) + (_local14 * _local14)); if (_local17 > (_local8 * _local8)){ _local17 = Math.sqrt(_local17); _arg2.x = (_local11 - ((_local8 * _local13) / _local17)); _arg2.y = (_local12 - ((_local8 * _local14) / _local17)); return ((_local17 - _local8)); }; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local19:Number; var _local20:Number; _local7 = _arg4.R; _local8 = _arg3.m_localPosition; var _local9:Number = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); var _local10:Number = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local7 = _arg6.R; _local8 = _arg5.m_localPosition; var _local11:Number = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); var _local12:Number = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); var _local13:Number = (_local11 - _local9); var _local14:Number = (_local12 - _local10); var _local15:Number = ((_local13 * _local13) + (_local14 * _local14)); var _local16:Number = (_arg3.m_radius - b2Settings.b2_toiSlop); var _local17:Number = (_arg5.m_radius - b2Settings.b2_toiSlop); var _local18:Number = (_local16 + _local17); if (_local15 > (_local18 * _local18)){ _local19 = Math.sqrt(_local15); _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(_local15); _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 _local35: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]; var _local14:b2Vec2 = _arg4[2]; var _local15:Number = _local6.x; var _local16:Number = _local6.y; var _local17:Number = _local7.x; var _local18:Number = _local7.y; var _local19:Number = _local8.x; var _local20:Number = _local8.y; var _local21:Number = (_local17 - _local15); var _local22:Number = (_local18 - _local16); var _local23:Number = (_local19 - _local15); var _local24:Number = (_local20 - _local16); var _local25:Number = (_local19 - _local17); var _local26:Number = (_local20 - _local18); var _local27:Number = -(((_local15 * _local21) + (_local16 * _local22))); var _local28:Number = ((_local17 * _local21) + (_local18 * _local22)); var _local29:Number = -(((_local15 * _local23) + (_local16 * _local24))); var _local30:Number = ((_local19 * _local23) + (_local20 * _local24)); var _local31:Number = -(((_local17 * _local25) + (_local18 * _local26))); var _local32:Number = ((_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); }; var _local33:Number = ((_local21 * _local24) - (_local22 * _local23)); var _local34:Number = (_local33 * ((_local15 * _local18) - (_local16 * _local17))); var _local36:Number = (_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); }; var _local37:Number = (_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); }; var _local38:Number = ((_local36 + _local37) + _local34); _local38 = (1 / _local38); var _local39:Number = (_local36 * _local38); var _local40:Number = (_local37 * _local38); var _local41:Number = ((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 _local12:Number; var _local13:Number; var _local14:Number; var _local9:b2Point = 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))); var _local10:Number = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity); var _local11:Number = (_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 = _arg3.m_type; var _local8:int = _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, _arg4, _arg5, _arg6)); }; if ((((_local7 == b2Shape.e_edgeShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistanceEdgeCircle(_arg1, _arg2, (_arg3 as b2EdgeShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_edgeShape)))){ return (DistanceEdgeCircle(_arg2, _arg1, (_arg5 as b2EdgeShape), _arg6, (_arg3 as b2CircleShape), _arg4)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_edgeShape)))){ return (DistanceGeneric(_arg2, _arg1, _arg5, _arg6, _arg3, _arg4)); }; if ((((_local7 == b2Shape.e_edgeShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)); }; return (0); } public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local17:Number; var _local6:b2Vec2 = _arg5[0]; var _local7:b2Vec2 = _arg5[1]; var _local8:b2Vec2 = _arg3[0]; _local9 = _arg3[1]; _local10 = _arg4[0]; _local11 = _arg4[1]; var _local12:Number = -(_local7.x); var _local13:Number = -(_local7.y); var _local14:Number = (_local6.x - _local7.x); var _local15:Number = (_local6.y - _local7.y); var _local16:Number = 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 19
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var pointCount:int;// = 0 public var normal:b2Vec2; public var points:Array; public function b2Manifold(){ points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ManifoldPoint(); _local1++; }; normal = new b2Vec2(); } public function Set(_arg1:b2Manifold):void{ pointCount = _arg1.pointCount; var _local2:int; 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; while (_local1 < b2Settings.b2_maxManifoldPoints) { (points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; normal.SetZero(); pointCount = 0; } } }//package Box2D.Collision
Section 20
//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 21
//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 22
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { import Box2D.Common.*; public class b2Pair { public var proxy1:b2Proxy; public var proxy2:b2Proxy; public var status:uint; public var userData;// = null public var next:b2Pair; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = b2Settings.USHRT_MAX; public static var e_pairFinal:uint = 4; public static var e_pairRemoved:uint = 2; 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 23
//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 24
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { b2internal var m_pairCount:int; private var m_callback:b2PairCallback; b2internal var m_pairs:Array; private var m_pairBufferCount:int; private var m_broadPhase:b2BroadPhase; private var m_pairBuffer:Array; private var m_freePair:b2Pair; public function b2PairManager(){ m_pairs = new Array(); m_pairBuffer = new Array(); m_pairCount = 0; m_pairBufferCount = 0; m_freePair = null; } public function RemoveBufferedPair(_arg1:b2Proxy, _arg2:b2Proxy):void{ var _local3:b2Pair = Find(_arg1, _arg2); if (_local3 == null){ return; }; if (_local3.IsBuffered() == false){ _local3.SetBuffered(); m_pairBuffer[m_pairBufferCount] = _local3; m_pairBufferCount++; }; _local3.SetRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{ m_broadPhase = _arg1; m_callback = _arg2; } public function Commit():void{ var _local1:int; var _local3:b2Pair; var _local4:b2Proxy; var _local5:b2Proxy; var _local2:int; _local1 = 0; while (_local1 < m_pairBufferCount) { _local3 = m_pairBuffer[_local1]; _local3.ClearBuffered(); _local4 = _local3.proxy1; _local5 = _local3.proxy2; if (_local3.IsRemoved()){ if (_local3.IsFinal() == true){ m_callback.PairRemoved(_local4.userData, _local5.userData, _local3.userData); }; m_pairBuffer[_local2] = _local3; _local2++; } else { if (_local3.IsFinal() == false){ _local3.userData = m_callback.PairAdded(_local4.userData, _local5.userData); _local3.SetFinal(); }; }; _local1++; }; _local1 = 0; while (_local1 < _local2) { _local3 = m_pairBuffer[_local1]; RemovePair(_local3.proxy1, _local3.proxy2); _local1++; }; m_pairBufferCount = 0; if (b2BroadPhase.s_validate){ ValidateTable(); }; } private function ValidateTable():void{ } private function Find(_arg1:b2Proxy, _arg2:b2Proxy):b2Pair{ return (_arg1.pairs[_arg2]); } public function AddBufferedPair(_arg1:b2Proxy, _arg2:b2Proxy):void{ var _local3:b2Pair = AddPair(_arg1, _arg2); if (_local3.IsBuffered() == false){ _local3.SetBuffered(); m_pairBuffer[m_pairBufferCount] = _local3; m_pairBufferCount++; }; _local3.ClearRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function AddPair(_arg1:b2Proxy, _arg2:b2Proxy):b2Pair{ var _local3:b2Pair = _arg1.pairs[_arg2]; if (_local3 != null){ return (_local3); }; if (m_freePair == null){ m_freePair = new b2Pair(); m_pairs.push(m_freePair); }; _local3 = m_freePair; m_freePair = _local3.next; _local3.proxy1 = _arg1; _local3.proxy2 = _arg2; _local3.status = 0; _local3.userData = null; _local3.next = null; _arg1.pairs[_arg2] = _local3; _arg2.pairs[_arg1] = _local3; m_pairCount++; return (_local3); } private function ValidateBuffer():void{ } private function RemovePair(_arg1:b2Proxy, _arg2:b2Proxy){ var _local3:b2Pair = _arg1.pairs[_arg2]; if (_local3 == null){ return (null); }; var _local4:* = _local3.userData; delete _arg1.pairs[_arg2]; delete _arg2.pairs[_arg1]; _local3.next = m_freePair; _local3.proxy1 = null; _local3.proxy2 = null; _local3.userData = null; _local3.status = 0; m_freePair = _local3; m_pairCount--; return (_local4); } } }//package Box2D.Collision
Section 25
//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 26
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { import flash.utils.*; public class b2Proxy { public var pairs:Dictionary; public var overlapCount:uint; public var next:b2Proxy; public var userData;// = null public var lowerBounds:Array; public var upperBounds:Array; public var timeStamp:uint; public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; pairs = new Dictionary(); super(); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } } }//package Box2D.Collision
Section 27
//b2Segment (Box2D.Collision.b2Segment) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; 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 _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local5:b2Vec2 = _arg3.p1; var _local6:Number = (_arg3.p2.x - _local5.x); var _local7:Number = (_arg3.p2.y - _local5.y); var _local8:Number = (p2.x - p1.x); var _local9:Number = (p2.y - p1.y); var _local10:Number = _local9; var _local11:Number = -(_local8); var _local12:Number = (100 * Number.MIN_VALUE); var _local13:Number = -(((_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 = ((-(_local6) * _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); } public function Extend(_arg1:b2AABB):void{ ExtendForward(_arg1); ExtendBackward(_arg1); } public function ExtendForward(_arg1:b2AABB):void{ var _local4:Number; var _local2:Number = (p2.x - p1.x); var _local3:Number = (p2.y - p1.y); _local4 = Math.min(((_local2 > 0)) ? ((_arg1.upperBound.x - p1.x) / _local2) : ((_local2 < 0)) ? ((_arg1.lowerBound.x - p1.x) / _local2) : Number.POSITIVE_INFINITY, ((_local3 > 0)) ? ((_arg1.upperBound.y - p1.y) / _local3) : ((_local3 < 0)) ? ((_arg1.lowerBound.y - p1.y) / _local3) : Number.POSITIVE_INFINITY); p2.x = (p1.x + (_local2 * _local4)); p2.y = (p1.y + (_local3 * _local4)); } public function ExtendBackward(_arg1:b2AABB):void{ var _local4:Number; var _local2:Number = (-(p2.x) + p1.x); var _local3:Number = (-(p2.y) + p1.y); _local4 = Math.min(((_local2 > 0)) ? ((_arg1.upperBound.x - p2.x) / _local2) : ((_local2 < 0)) ? ((_arg1.lowerBound.x - p2.x) / _local2) : Number.POSITIVE_INFINITY, ((_local3 > 0)) ? ((_arg1.upperBound.y - p2.y) / _local3) : ((_local3 < 0)) ? ((_arg1.lowerBound.y - p2.y) / _local3) : Number.POSITIVE_INFINITY); p1.x = (p2.x + (_local2 * _local4)); p1.y = (p2.y + (_local3 * _local4)); } } }//package Box2D.Collision
Section 28
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 _local25:Number; var _local26:b2XForm; var _local27:b2XForm; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local7:Number = _arg1.m_sweepRadius; var _local8:Number = _arg3.m_sweepRadius; var _local9:Number = _arg2.t0; var _local10:Number = (_arg2.c.x - _arg2.c0.x); var _local11:Number = (_arg2.c.y - _arg2.c0.y); var _local12:Number = (_arg4.c.x - _arg4.c0.x); var _local13:Number = (_arg4.c.y - _arg4.c0.y); var _local14:Number = (_arg2.a - _arg2.a0); var _local15:Number = (_arg4.a - _arg4.a0); var _local16:Number = 0; var _local17:b2Vec2 = s_p1; var _local18:b2Vec2 = s_p2; var _local19 = 20; var _local20:int; var _local21:Number = 0; var _local22:Number = 0; var _local23:Number = 0; var _local24:Number = 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 29
//ClipVertex (Box2D.Collision.ClipVertex) package Box2D.Collision { import Box2D.Common.Math.*; public class ClipVertex { public var id:b2ContactID; public var v:b2Vec2; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 30
//Features (Box2D.Collision.Features) package Box2D.Collision { import Box2D.Common.*; public class Features { b2internal var _referenceEdge:int; b2internal var _incidentEdge:int; b2internal var _flip:int; b2internal var _incidentVertex:int; b2internal 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 get incidentVertex():int{ return (_incidentVertex); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 31
//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 SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function Set(_arg1:Number):void{ var _local2:Number; _local2 = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } 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 GetInverse(_arg1:b2Mat22):b2Mat22{ var _local2:Number; var _local4:Number; var _local6:Number; _local2 = col1.x; var _local3:Number = col2.x; _local4 = col1.y; var _local5:Number = 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 = col1.x; var _local5:Number = col2.x; var _local6:Number = col1.y; var _local7:Number = col2.y; var _local8:Number = ((_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 32
//b2Mat33 (Box2D.Common.Math.b2Mat33) package Box2D.Common.Math { public class b2Mat33 { public var col1:b2Vec3; public var col2:b2Vec3; public var col3:b2Vec3; public function b2Mat33(_arg1:b2Vec3=null, _arg2:b2Vec3=null, _arg3:b2Vec3=null){ col1 = new b2Vec3(); col2 = new b2Vec3(); col3 = new b2Vec3(); super(); if (((((!(_arg1)) && (!(_arg2)))) && (!(_arg3)))){ col1.SetZero(); col2.SetZero(); col3.SetZero(); } else { col1.SetV(_arg1); col2.SetV(_arg2); col3.SetV(_arg3); }; } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col3.x = 0; col1.y = 0; col2.y = 1; col3.y = 0; col1.z = 0; col2.z = 0; col3.z = 1; } public function Solve22(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number; _local4 = col1.x; var _local5:Number = col2.x; var _local6:Number = col1.y; var _local7:Number = col2.y; var _local8:Number = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } public function SetZero():void{ col1.x = 0; col2.x = 0; col3.x = 0; col1.y = 0; col2.y = 0; col3.y = 0; col1.z = 0; col2.z = 0; col3.z = 0; } public function SetM(_arg1:b2Mat33):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); col3.SetV(_arg1.col3); } public function AddM(_arg1:b2Mat33):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col1.z = (col1.z + _arg1.col1.z); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); col2.z = (col2.z + _arg1.col2.z); col3.x = (col3.x + _arg1.col3.x); col3.y = (col3.y + _arg1.col3.y); col3.z = (col3.z + _arg1.col3.z); } public function SetVVV(_arg1:b2Vec3, _arg2:b2Vec3, _arg3:b2Vec3):void{ col1.SetV(_arg1); col2.SetV(_arg2); col3.SetV(_arg3); } public function Copy():b2Mat33{ return (new b2Mat33(col1, col2, col3)); } public function Solve33(_arg1:b2Vec3, _arg2:Number, _arg3:Number, _arg4:Number):b2Vec3{ var _local5:Number = col1.x; var _local6:Number = col1.y; var _local7:Number = col1.z; var _local8:Number = col2.x; var _local9:Number = col2.y; var _local10:Number = col2.z; var _local11:Number = col3.x; var _local12:Number = col3.y; var _local13:Number = col3.z; var _local14:Number = (((_local5 * ((_local9 * _local13) - (_local10 * _local12))) + (_local6 * ((_local10 * _local11) - (_local8 * _local13)))) + (_local7 * ((_local8 * _local12) - (_local9 * _local11)))); _local14 = (1 / _local14); _arg1.x = (_local14 * (((_arg2 * ((_local9 * _local13) - (_local10 * _local12))) + (_arg3 * ((_local10 * _local11) - (_local8 * _local13)))) + (_arg4 * ((_local8 * _local12) - (_local9 * _local11))))); _arg1.y = (_local14 * (((_local5 * ((_arg3 * _local13) - (_arg4 * _local12))) + (_local6 * ((_arg4 * _local11) - (_arg2 * _local13)))) + (_local7 * ((_arg2 * _local12) - (_arg3 * _local11))))); _arg1.z = (_local14 * (((_local5 * ((_local9 * _arg4) - (_local10 * _arg3))) + (_local6 * ((_local10 * _arg2) - (_local8 * _arg4)))) + (_local7 * ((_local8 * _arg3) - (_local9 * _arg2))))); return (_arg1); } } }//package Box2D.Common.Math
Section 33
//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 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = 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 = 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 = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (((_local3 * _local3) + (_local4 * _local4))); } public static function b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:* = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = 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 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = 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 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = 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 = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); var _local4:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); var _local5:b2Mat22 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean = (((_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 = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = 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 = 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 = 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 34
//b2Sweep (Box2D.Common.Math.b2Sweep) package Box2D.Common.Math { public class b2Sweep { public var localCenter:b2Vec2; public var a:Number; public var c:b2Vec2; public var a0:Number; public var c0:b2Vec2; 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 _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); }; var _local3:b2Mat22 = _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 35
//b2Vec2 (Box2D.Common.Math.b2Vec2) package Box2D.Common.Math { public class b2Vec2 { public var y:Number; public var x:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } 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 MulM(_arg1:b2Mat22):void{ var _local2:Number = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function SetZero():void{ x = 0; y = 0; } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function Normalize():Number{ var _local1:Number = Math.sqrt(((x * x) + (y * y))); if (_local1 < Number.MIN_VALUE){ return (0); }; var _local2:Number = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function CrossVF(_arg1:Number):void{ var _local2:Number = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } 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 CrossFV(_arg1:Number):void{ var _local2:Number = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public function Abs():void{ if (x < 0){ x = -(x); }; if (y < 0){ y = -(y); }; } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number = 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 static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 36
//b2Vec3 (Box2D.Common.Math.b2Vec3) package Box2D.Common.Math { public class b2Vec3 { public var x:Number; public var y:Number; public var z:Number; public function b2Vec3(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ this.x = _arg1; this.y = _arg2; this.z = _arg3; } public function Add(_arg1:b2Vec3):void{ x = (x + _arg1.x); y = (y + _arg1.y); z = (z + _arg1.z); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ this.x = _arg1; this.y = _arg2; this.z = _arg3; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); z = (z * _arg1); } public function SetZero():void{ x = (y = (z = 0)); } public function SetV(_arg1:b2Vec3):void{ x = _arg1.x; y = _arg1.y; z = _arg1.z; } public function Negative():b2Vec3{ return (new b2Vec3(-(x), -(y), -(z))); } public function Subtract(_arg1:b2Vec3):void{ x = (x - _arg1.x); y = (y - _arg1.y); z = (z - _arg1.z); } public function Copy():b2Vec3{ return (new b2Vec3(x, y, z)); } } }//package Box2D.Common.Math
Section 37
//b2XForm (Box2D.Common.Math.b2XForm) package Box2D.Common.Math { public class b2XForm { public var position:b2Vec2; public var R:b2Mat22; 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 38
//b2Color (Box2D.Common.b2Color) package Box2D.Common { import Box2D.Common.Math.*; public class b2Color { private var _r:uint;// = 0 private var _g:uint;// = 0 private var _b:uint;// = 0 public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){ _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 set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function get color():uint{ return ((((_r << 16) | (_g << 8)) | _b)); } public function set r(_arg1:Number):void{ _r = 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 39
//b2internal (Box2D.Common.b2internal) package Box2D.Common { public namespace b2internal = "http://www.box2d.org/ns/b2internal"; }//package Box2D.Common
Section 40
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_maxLinearVelocity:Number = 200; public static const b2_pi:Number = 3.14159265358979; 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_maxLinearVelocitySquared:Number = 40000; public static const b2_maxTOIJointsPerIsland:int = 32; 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_maxTOIContactsPerIsland:int = 32; 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 b2_timeToSleep:Number = 0.5; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearCorrection:Number = 0.2; public static const b2_toiSlop:Number = 0.04; public static const VERSION:String = "2.0.2"; public static function b2MixFriction(_arg1:Number, _arg2:Number):Number{ return (Math.sqrt((_arg1 * _arg2))); } public static function b2MixRestitution(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 41
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { private var m_manifolds:Array; private var m_manifold:b2Manifold; private var m0:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; var _local3:b2ManifoldPoint = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override b2internal function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local8:b2ManifoldPoint; var _local5:b2Body = m_shape1.m_body; var _local6:b2Body = 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); var _local7:b2ContactPoint = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = b2Settings.b2MixFriction(m_shape1.GetFriction(), m_shape2.GetFriction()); _local7.restitution = b2Settings.b2MixRestitution(m_shape1.GetRestitution(), m_shape2.GetRestitution()); 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); }; }; } override public function GetManifolds():Array{ return (m_manifolds); } 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 42
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Contact { b2internal var m_shape1:b2Shape; b2internal var m_shape2:b2Shape; b2internal var m_prev:b2Contact; b2internal var m_toi:Number; b2internal var m_next:b2Contact; b2internal var m_manifoldCount:int; b2internal var m_node1:b2ContactEdge; b2internal var m_node2:b2ContactEdge; b2internal var m_flags:uint; b2internal static var e_toiFlag:uint = 8; b2internal static var e_nonSolidFlag:uint = 1; b2internal static var e_slowFlag:uint = 2; b2internal static var e_islandFlag:uint = 4; b2internal static var s_registers:Array; b2internal 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_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 IsSolid():Boolean{ return (((m_flags & e_nonSolidFlag) == 0)); } public function GetShape1():b2Shape{ return (m_shape1); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetNext():b2Contact{ return (m_next); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function GetManifolds():Array{ return (null); } b2internal function Update(_arg1:b2ContactListener):void{ var _local2:int = m_manifoldCount; Evaluate(_arg1); var _local3:int = m_manifoldCount; var _local4:b2Body = m_shape1.m_body; var _local5:b2Body = 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); }; } b2internal function Evaluate(_arg1:b2ContactListener):void{ } b2internal static function InitializeRegisters():void{ var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); var _local1:int; 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); AddType(b2EdgeAndCircleContact.Create, b2EdgeAndCircleContact.Destroy, b2Shape.e_edgeShape, b2Shape.e_circleShape); AddType(b2PolyAndEdgeContact.Create, b2PolyAndEdgeContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_edgeShape); } b2internal static function Destroy(_arg1:b2Contact, _arg2):void{ if (_arg1.m_manifoldCount > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; var _local3:int = _arg1.m_shape1.m_type; var _local4:int = _arg1.m_shape2.m_type; var _local5:b2ContactRegister = s_registers[_local3][_local4]; var _local6:Function = _local5.destroyFcn; _local6(_arg1, _arg2); } b2internal 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; }; } b2internal static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local8:b2Contact; var _local9:int; var _local10:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; var _local4:int = _arg1.m_type; var _local5:int = _arg2.m_type; var _local6:b2ContactRegister = s_registers[_local4][_local5]; var _local7:Function = _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 43
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var normal:b2Vec2; public var restitution:Number; public var K:b2Mat22; public var body1:b2Body; public var manifold:b2Manifold; public var body2:b2Body; public var friction:Number; public var normalMass:b2Mat22; public var pointCount:int; public function b2ContactConstraint(){ normal = new b2Vec2(); normalMass = new b2Mat22(); K = new b2Mat22(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 44
//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 normalImpulse:Number; public var tangentImpulse:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var equalizedMass:Number; public var tangentMass:Number; 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 45
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactEdge { public var other:b2Body; public var prev:b2ContactEdge; public var contact:b2Contact; public var next:b2ContactEdge; } }//package Box2D.Dynamics.Contacts
Section 46
//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 47
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Collision.*; public class b2ContactResult { public var position:b2Vec2; public var shape1:b2Shape; public var shape2:b2Shape; public var normalImpulse:Number; public var normal:b2Vec2; 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 48
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactSolver { private var m_constraintCount:int; b2internal var m_constraints:Array; private var m_allocator; private 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 _local10:b2Shape; var _local11:b2Shape; var _local12:b2Body; var _local13:b2Body; var _local14:int; var _local15:Array; 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:int; var _local25:b2Manifold; var _local26:Number; var _local27:Number; var _local28:b2ContactConstraint; var _local29:uint; var _local30:b2ManifoldPoint; var _local31:b2ContactConstraintPoint; 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; var _local48:b2ContactConstraintPoint; var _local49:b2ContactConstraintPoint; var _local50:Number; var _local51:Number; var _local52:Number; var _local53:Number; var _local54:Number; var _local55:Number; var _local56:Number; var _local57:Number; var _local58:Number; var _local59:Number; var _local60:Number; var _local61:Number; m_step = new b2TimeStep(); m_constraints = new Array(); super(); m_step.dt = _arg1.dt; m_step.inv_dt = _arg1.inv_dt; m_step.positionIterations = _arg1.positionIterations; m_step.velocityIterations = _arg1.velocityIterations; 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++; }; var _local9:int; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; _local10 = _local5.m_shape1; _local11 = _local5.m_shape2; _local12 = _local10.m_body; _local13 = _local11.m_body; _local14 = _local5.m_manifoldCount; _local15 = _local5.GetManifolds(); _local16 = b2Settings.b2MixFriction(_local10.GetFriction(), _local11.GetFriction()); _local17 = b2Settings.b2MixRestitution(_local10.GetRestitution(), _local11.GetRestitution()); _local18 = _local12.m_linearVelocity.x; _local19 = _local12.m_linearVelocity.y; _local20 = _local13.m_linearVelocity.x; _local21 = _local13.m_linearVelocity.y; _local22 = _local12.m_angularVelocity; _local23 = _local13.m_angularVelocity; _local24 = 0; while (_local24 < _local14) { _local25 = _local15[_local24]; _local26 = _local25.normal.x; _local27 = _local25.normal.y; _local28 = m_constraints[_local9]; _local28.body1 = _local12; _local28.body2 = _local13; _local28.manifold = _local25; _local28.normal.x = _local26; _local28.normal.y = _local27; _local28.pointCount = _local25.pointCount; _local28.friction = _local16; _local28.restitution = _local17; _local29 = 0; while (_local29 < _local28.pointCount) { _local30 = _local25.points[_local29]; _local31 = _local28.points[_local29]; _local31.normalImpulse = _local30.normalImpulse; _local31.tangentImpulse = _local30.tangentImpulse; _local31.separation = _local30.separation; _local31.localAnchor1.SetV(_local30.localPoint1); _local31.localAnchor2.SetV(_local30.localPoint2); _local8 = _local12.m_xf.R; _local34 = (_local30.localPoint1.x - _local12.m_sweep.localCenter.x); _local35 = (_local30.localPoint1.y - _local12.m_sweep.localCenter.y); _local32 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35)); _local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35)); _local34 = _local32; _local31.r1.Set(_local34, _local35); _local8 = _local13.m_xf.R; _local36 = (_local30.localPoint2.x - _local13.m_sweep.localCenter.x); _local37 = (_local30.localPoint2.y - _local13.m_sweep.localCenter.y); _local32 = ((_local8.col1.x * _local36) + (_local8.col2.x * _local37)); _local37 = ((_local8.col1.y * _local36) + (_local8.col2.y * _local37)); _local36 = _local32; _local31.r2.Set(_local36, _local37); _local38 = ((_local34 * _local27) - (_local35 * _local26)); _local39 = ((_local36 * _local27) - (_local37 * _local26)); _local38 = (_local38 * _local38); _local39 = (_local39 * _local39); _local40 = (((_local12.m_invMass + _local13.m_invMass) + (_local12.m_invI * _local38)) + (_local13.m_invI * _local39)); _local31.normalMass = (1 / _local40); _local41 = ((_local12.m_mass * _local12.m_invMass) + (_local13.m_mass * _local13.m_invMass)); _local41 = (_local41 + (((_local12.m_mass * _local12.m_invI) * _local38) + ((_local13.m_mass * _local13.m_invI) * _local39))); _local31.equalizedMass = (1 / _local41); _local42 = _local27; _local43 = -(_local26); _local44 = ((_local34 * _local43) - (_local35 * _local42)); _local45 = ((_local36 * _local43) - (_local37 * _local42)); _local44 = (_local44 * _local44); _local45 = (_local45 * _local45); _local46 = (((_local12.m_invMass + _local13.m_invMass) + (_local12.m_invI * _local44)) + (_local13.m_invI * _local45)); _local31.tangentMass = (1 / _local46); _local31.velocityBias = 0; if (_local31.separation > 0){ _local31.velocityBias = (-60 * _local31.separation); } else { _local32 = (((_local20 + (-(_local23) * _local37)) - _local18) - (-(_local22) * _local35)); _local33 = (((_local21 + (_local23 * _local36)) - _local19) - (_local22 * _local34)); _local47 = ((_local28.normal.x * _local32) + (_local28.normal.y * _local33)); if (_local47 < -(b2Settings.b2_velocityThreshold)){ _local31.velocityBias = (_local31.velocityBias + (-(_local28.restitution) * _local47)); }; }; _local29++; }; if (_local28.pointCount == 2){ _local48 = _local28.points[0]; _local49 = _local28.points[1]; _local50 = _local12.m_invMass; _local51 = _local12.m_invI; _local52 = _local13.m_invMass; _local53 = _local13.m_invI; _local54 = ((_local48.r1.x * _local27) - (_local48.r1.y * _local26)); _local55 = ((_local48.r2.x * _local27) - (_local48.r2.y * _local26)); _local56 = ((_local49.r1.x * _local27) - (_local49.r1.y * _local26)); _local57 = ((_local49.r2.x * _local27) - (_local49.r2.y * _local26)); _local58 = (((_local50 + _local52) + ((_local51 * _local54) * _local54)) + ((_local53 * _local55) * _local55)); _local59 = (((_local50 + _local52) + ((_local51 * _local56) * _local56)) + ((_local53 * _local57) * _local57)); _local60 = (((_local50 + _local52) + ((_local51 * _local54) * _local56)) + ((_local53 * _local55) * _local57)); _local61 = 100; if ((_local58 * _local58) < (_local61 * ((_local58 * _local59) - (_local60 * _local60)))){ _local28.K.col1.Set(_local58, _local60); _local28.K.col2.Set(_local60, _local59); _local28.K.GetInverse(_local28.normalMass); } else { _local28.pointCount = 1; }; }; _local9++; _local24++; }; _local6++; }; } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2Mat22; 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; var _local5:int; 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 _local3:b2Mat22; var _local4:b2Vec2; 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 _local2:Number = 0; var _local5:int; 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 = (_local35 * _local17); _local37 = (_local35 * _local18); _local9.x = (_local9.x - (_local13 * _local36)); _local9.y = (_local9.y - (_local13 * _local37)); _local10 = (_local10 - (_local14 * ((_local22 * _local37) - (_local23 * _local36)))); _local7.m_sweep.a = _local10; _local7.SynchronizeTransform(); _local11.x = (_local11.x + (_local15 * _local36)); _local11.y = (_local11.y + (_local15 * _local37)); _local12 = (_local12 + (_local16 * ((_local24 * _local37) - (_local25 * _local36)))); _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:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:b2Mat22; var _local24:b2Vec2; var _local26:b2ContactConstraint; var _local27:b2Body; var _local28:b2Body; var _local29:Number; var _local30:Number; var _local31:b2Vec2; var _local32:b2Vec2; 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:int; var _local44:Number; var _local45:b2ContactConstraintPoint; var _local46:b2ContactConstraintPoint; var _local47:Number; var _local48:Number; var _local49:Number; var _local50:Number; var _local51:Number; var _local52:Number; var _local53:Number; var _local54:Number; var _local55:Number; var _local56:Number; var _local57:Number; var _local58:Number; var _local59:Number; var _local25:int; while (_local25 < m_constraintCount) { _local26 = m_constraints[_local25]; _local27 = _local26.body1; _local28 = _local26.body2; _local29 = _local27.m_angularVelocity; _local30 = _local28.m_angularVelocity; _local31 = _local27.m_linearVelocity; _local32 = _local28.m_linearVelocity; _local33 = _local27.m_invMass; _local34 = _local27.m_invI; _local35 = _local28.m_invMass; _local36 = _local28.m_invI; _local37 = _local26.normal.x; _local38 = _local26.normal.y; _local39 = _local38; _local40 = -(_local37); _local41 = _local26.friction; _local43 = _local26.pointCount; if (_local26.pointCount == 1){ _local2 = _local26.points[0]; _local7 = (((_local32.x + (-(_local30) * _local2.r2.y)) - _local31.x) - (-(_local29) * _local2.r1.y)); _local8 = (((_local32.y + (_local30 * _local2.r2.x)) - _local31.y) - (_local29 * _local2.r1.x)); _local9 = ((_local7 * _local37) + (_local8 * _local38)); _local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias)); _local10 = ((_local7 * _local39) + (_local8 * _local40)); _local12 = (_local2.tangentMass * -(_local10)); _local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0); _local11 = (_local13 - _local2.normalImpulse); _local44 = (_local41 * _local2.normalImpulse); _local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local44), _local44); _local12 = (_local14 - _local2.tangentImpulse); _local15 = ((_local11 * _local37) + (_local12 * _local39)); _local16 = ((_local11 * _local38) + (_local12 * _local40)); _local31.x = (_local31.x - (_local33 * _local15)); _local31.y = (_local31.y - (_local33 * _local16)); _local29 = (_local29 - (_local34 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15)))); _local32.x = (_local32.x + (_local35 * _local15)); _local32.y = (_local32.y + (_local35 * _local16)); _local30 = (_local30 + (_local36 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15)))); _local2.normalImpulse = _local13; _local2.tangentImpulse = _local14; } else { _local45 = _local26.points[0]; _local46 = _local26.points[1]; _local47 = _local45.normalImpulse; _local48 = _local46.normalImpulse; _local49 = (((_local32.x - (_local30 * _local45.r2.y)) - _local31.x) + (_local29 * _local45.r1.y)); _local50 = (((_local32.y + (_local30 * _local45.r2.x)) - _local31.y) - (_local29 * _local45.r1.x)); _local51 = (((_local32.x - (_local30 * _local46.r2.y)) - _local31.x) + (_local29 * _local46.r1.y)); _local52 = (((_local32.y + (_local30 * _local46.r2.x)) - _local31.y) - (_local29 * _local46.r1.x)); _local53 = ((_local49 * _local37) + (_local50 * _local38)); _local54 = ((_local51 * _local37) + (_local52 * _local38)); _local55 = (_local53 - _local45.velocityBias); _local56 = (_local54 - _local46.velocityBias); _local23 = _local26.K; _local55 = (_local55 - ((_local23.col1.x * _local47) + (_local23.col2.x * _local48))); _local56 = (_local56 - ((_local23.col1.y * _local47) + (_local23.col2.y * _local48))); _local57 = 0.001; while (true) { _local23 = _local26.normalMass; _local58 = -(((_local23.col1.x * _local55) + (_local23.col2.x * _local56))); _local59 = -(((_local23.col1.y * _local55) + (_local23.col2.y * _local56))); if ((((_local58 >= 0)) && ((_local59 >= 0)))){ _local17 = (_local58 - _local47); _local18 = (_local59 - _local48); _local19 = (_local17 * _local37); _local20 = (_local17 * _local38); _local21 = (_local18 * _local37); _local22 = (_local18 * _local38); _local31.x = (_local31.x - (_local33 * (_local19 + _local21))); _local31.y = (_local31.y - (_local33 * (_local20 + _local22))); _local29 = (_local29 - (_local34 * ((((_local45.r1.x * _local20) - (_local45.r1.y * _local19)) + (_local46.r1.x * _local22)) - (_local46.r1.y * _local21)))); _local32.x = (_local32.x + (_local35 * (_local19 + _local21))); _local32.y = (_local32.y + (_local35 * (_local20 + _local22))); _local30 = (_local30 + (_local36 * ((((_local45.r2.x * _local20) - (_local45.r2.y * _local19)) + (_local46.r2.x * _local22)) - (_local46.r2.y * _local21)))); _local45.normalImpulse = _local58; _local46.normalImpulse = _local59; break; }; _local58 = (-(_local45.normalMass) * _local55); _local59 = 0; _local53 = 0; _local54 = ((_local26.K.col1.y * _local58) + _local56); if ((((_local58 >= 0)) && ((_local54 >= 0)))){ _local17 = (_local58 - _local47); _local18 = (_local59 - _local48); _local19 = (_local17 * _local37); _local20 = (_local17 * _local38); _local21 = (_local18 * _local37); _local22 = (_local18 * _local38); _local31.x = (_local31.x - (_local33 * (_local19 + _local21))); _local31.y = (_local31.y - (_local33 * (_local20 + _local22))); _local29 = (_local29 - (_local34 * ((((_local45.r1.x * _local20) - (_local45.r1.y * _local19)) + (_local46.r1.x * _local22)) - (_local46.r1.y * _local21)))); _local32.x = (_local32.x + (_local35 * (_local19 + _local21))); _local32.y = (_local32.y + (_local35 * (_local20 + _local22))); _local30 = (_local30 + (_local36 * ((((_local45.r2.x * _local20) - (_local45.r2.y * _local19)) + (_local46.r2.x * _local22)) - (_local46.r2.y * _local21)))); _local45.normalImpulse = _local58; _local46.normalImpulse = _local59; break; }; _local58 = 0; _local59 = (-(_local46.normalMass) * _local56); _local53 = ((_local26.K.col2.x * _local59) + _local55); _local54 = 0; if ((((_local59 >= 0)) && ((_local53 >= 0)))){ _local17 = (_local58 - _local47); _local18 = (_local59 - _local48); _local19 = (_local17 * _local37); _local20 = (_local17 * _local38); _local21 = (_local18 * _local37); _local22 = (_local18 * _local38); _local31.x = (_local31.x - (_local33 * (_local19 + _local21))); _local31.y = (_local31.y - (_local33 * (_local20 + _local22))); _local29 = (_local29 - (_local34 * ((((_local45.r1.x * _local20) - (_local45.r1.y * _local19)) + (_local46.r1.x * _local22)) - (_local46.r1.y * _local21)))); _local32.x = (_local32.x + (_local35 * (_local19 + _local21))); _local32.y = (_local32.y + (_local35 * (_local20 + _local22))); _local30 = (_local30 + (_local36 * ((((_local45.r2.x * _local20) - (_local45.r2.y * _local19)) + (_local46.r2.x * _local22)) - (_local46.r2.y * _local21)))); _local45.normalImpulse = _local58; _local46.normalImpulse = _local59; break; }; _local58 = 0; _local59 = 0; _local53 = _local55; _local54 = _local56; if ((((_local53 >= 0)) && ((_local54 >= 0)))){ _local17 = (_local58 - _local47); _local18 = (_local59 - _local48); _local19 = (_local17 * _local37); _local20 = (_local17 * _local38); _local21 = (_local18 * _local37); _local22 = (_local18 * _local38); _local31.x = (_local31.x - (_local33 * (_local19 + _local21))); _local31.y = (_local31.y - (_local33 * (_local20 + _local22))); _local29 = (_local29 - (_local34 * ((((_local45.r1.x * _local20) - (_local45.r1.y * _local19)) + (_local46.r1.x * _local22)) - (_local46.r1.y * _local21)))); _local32.x = (_local32.x + (_local35 * (_local19 + _local21))); _local32.y = (_local32.y + (_local35 * (_local20 + _local22))); _local30 = (_local30 + (_local36 * ((((_local45.r2.x * _local20) - (_local45.r2.y * _local19)) + (_local46.r2.x * _local22)) - (_local46.r2.y * _local21)))); _local45.normalImpulse = _local58; _local46.normalImpulse = _local59; break; }; break; }; _local1 = 0; while (_local1 < _local26.pointCount) { _local2 = _local26.points[_local1]; _local7 = (((_local32.x - (_local30 * _local2.r2.y)) - _local31.x) + (_local29 * _local2.r1.y)); _local8 = (((_local32.y + (_local30 * _local2.r2.x)) - _local31.y) - (_local29 * _local2.r1.x)); _local10 = ((_local7 * _local39) + (_local8 * _local40)); _local12 = (_local2.tangentMass * -(_local10)); _local44 = (_local41 * _local2.normalImpulse); _local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local44), _local44); _local12 = (_local14 - _local2.tangentImpulse); _local15 = (_local12 * _local39); _local16 = (_local12 * _local40); _local31.x = (_local31.x - (_local33 * _local15)); _local31.y = (_local31.y - (_local33 * _local16)); _local29 = (_local29 - (_local34 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15)))); _local32.x = (_local32.x + (_local35 * _local15)); _local32.y = (_local32.y + (_local35 * _local16)); _local30 = (_local30 + (_local36 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15)))); _local2.tangentImpulse = _local14; _local1++; }; }; _local27.m_angularVelocity = _local29; _local28.m_angularVelocity = _local30; _local25++; }; } public function FinalizeVelocityConstraints():void{ var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ManifoldPoint; var _local6:b2ContactConstraintPoint; var _local1:int; 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 49
//b2EdgeAndCircleContact (Box2D.Dynamics.Contacts.b2EdgeAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2EdgeAndCircleContact extends b2Contact { private var m_manifolds:Array; private var m_manifold:b2Manifold; private var m0:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2EdgeAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; var _local3:b2ManifoldPoint = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override b2internal function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local8:b2ManifoldPoint; var _local5:b2Body = m_shape1.m_body; var _local6:b2Body = m_shape2.m_body; m0.Set(m_manifold); b2CollideEdgeAndCircle(m_manifold, (m_shape1 as b2EdgeShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf); var _local7:b2ContactPoint = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = b2Settings.b2MixFriction(m_shape1.GetFriction(), m_shape2.GetFriction()); _local7.restitution = b2Settings.b2MixRestitution(m_shape1.GetRestitution(), m_shape2.GetRestitution()); 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); }; }; } private function b2CollideEdgeAndCircle(_arg1:b2Manifold, _arg2:b2EdgeShape, _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:b2ManifoldPoint; var _local21:Number; var _local24:Number; _arg1.pointCount = 0; _local6 = _arg5.R; _local7 = _arg4.m_localPosition; var _local13:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local14:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local6 = _arg3.R; _local10 = (_local13 - _arg3.position.x); _local11 = (_local14 - _arg3.position.y); var _local15:Number = ((_local10 * _local6.col1.x) + (_local11 * _local6.col1.y)); var _local16:Number = ((_local10 * _local6.col2.x) + (_local11 * _local6.col2.y)); var _local17:b2Vec2 = _arg2.m_normal; var _local18:b2Vec2 = _arg2.m_v1; var _local19:b2Vec2 = _arg2.m_v2; var _local20:Number = _arg4.m_radius; var _local22:Number = (((_local15 - _local18.x) * _arg2.m_direction.x) + ((_local16 - _local18.y) * _arg2.m_direction.y)); var _local23:Boolean; if (_local22 <= 0){ _local8 = (_local15 - _local18.x); _local9 = (_local16 - _local18.y); if (((_local8 * _arg2.m_cornerDir1.x) + (_local9 * _arg2.m_cornerDir1.y)) < 0){ return; }; _local8 = (_local13 - (_arg3.position.x + ((_local6.col1.x * _local18.x) + (_local6.col2.x * _local18.y)))); _local9 = (_local14 - (_arg3.position.y + ((_local6.col1.y * _local18.x) + (_local6.col2.y * _local18.y)))); } else { if (_local22 >= _arg2.m_length){ _local8 = (_local15 - _local19.x); _local9 = (_local16 - _local19.y); if (((_local8 * _arg2.m_cornerDir2.x) + (_local9 * _arg2.m_cornerDir2.y)) > 0){ return; }; _local8 = (_local13 - (_arg3.position.x + ((_local6.col1.x * _local19.x) + (_local6.col2.x * _local19.y)))); _local9 = (_local14 - (_arg3.position.y + ((_local6.col1.y * _local19.x) + (_local6.col2.y * _local19.y)))); } else { _local21 = (((_local15 - _local18.x) * _local17.x) + ((_local16 - _local18.y) * _local17.y)); if ((((_local21 > _local20)) || ((_local21 < -(_local20))))){ return; }; _local21 = (_local21 - _local20); _local6 = _arg3.R; _arg1.normal.x = ((_local6.col1.x * _local17.x) + (_local6.col2.x * _local17.y)); _arg1.normal.y = ((_local6.col1.y * _local17.x) + (_local6.col2.y * _local17.y)); _local23 = true; }; }; if (!_local23){ _local24 = ((_local8 * _local8) + (_local9 * _local9)); if (_local24 > (_local20 * _local20)){ return; }; if (_local24 < Number.MIN_VALUE){ _local21 = -(_local20); _arg1.normal.x = ((_local6.col1.x * _local17.x) + (_local6.col2.x * _local17.y)); _arg1.normal.y = ((_local6.col1.y * _local17.x) + (_local6.col2.y * _local17.y)); } else { _local24 = Math.sqrt(_local24); _local8 = (_local8 / _local24); _local9 = (_local9 / _local24); _local21 = (_local24 - _local20); _arg1.normal.x = _local8; _arg1.normal.y = _local9; }; }; _local12 = _arg1.points[0]; _arg1.pointCount = 1; _local12.id.key = 0; _local12.separation = _local21; _local13 = (_local13 - (_local20 * _arg1.normal.x)); _local14 = (_local14 - (_local20 * _arg1.normal.y)); _local10 = (_local13 - _arg3.position.x); _local11 = (_local14 - _arg3.position.y); _local12.localPoint1.x = ((_local10 * _local6.col1.x) + (_local11 * _local6.col1.y)); _local12.localPoint1.y = ((_local10 * _local6.col2.x) + (_local11 * _local6.col2.y)); _local6 = _arg5.R; _local10 = (_local13 - _arg5.position.x); _local11 = (_local14 - _arg5.position.y); _local12.localPoint2.x = ((_local10 * _local6.col1.x) + (_local11 * _local6.col1.y)); _local12.localPoint2.y = ((_local10 * _local6.col2.x) + (_local11 * _local6.col2.y)); } override public function GetManifolds():Array{ return (m_manifolds); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2EdgeAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 50
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; import Box2D.Common.*; public class b2NullContact extends b2Contact { override b2internal function Evaluate(_arg1:b2ContactListener):void{ } override public function GetManifolds():Array{ return (null); } } }//package Box2D.Dynamics.Contacts
Section 51
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { private var m_manifolds:Array; private var m_manifold:b2Manifold; private var m0:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ 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; } override b2internal function Evaluate(_arg1:b2ContactListener):void{ var _local2:int; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2ManifoldPoint; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; var _local6:b2Body = m_shape1.m_body; var _local7:b2Body = 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); var _local8:Array = [false, false]; var _local9:b2ContactPoint = s_evalCP; _local9.shape1 = m_shape1; _local9.shape2 = m_shape2; _local9.friction = b2Settings.b2MixFriction(m_shape1.GetFriction(), m_shape2.GetFriction()); _local9.restitution = b2Settings.b2MixRestitution(m_shape1.GetRestitution(), m_shape2.GetRestitution()); 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++; }; } override public function GetManifolds():Array{ return (m_manifolds); } 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 52
//b2PolyAndEdgeContact (Box2D.Dynamics.Contacts.b2PolyAndEdgeContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolyAndEdgeContact extends b2Contact { private var m_manifolds:Array; private var m_manifold:b2Manifold; private var m0:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolyAndEdgeContact(_arg1:b2Shape, _arg2:b2Shape){ 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_edgeShape)); m_manifold.pointCount = 0; } override b2internal function Evaluate(_arg1:b2ContactListener):void{ var _local2:int; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2ManifoldPoint; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; var _local6:b2Body = m_shape1.m_body; var _local7:b2Body = m_shape2.m_body; m0.Set(m_manifold); b2CollidePolyAndEdge(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2EdgeShape), _local7.m_xf); var _local8:Array = [false, false]; var _local9:b2ContactPoint = s_evalCP; _local9.shape1 = m_shape1; _local9.shape2 = m_shape2; _local9.friction = b2Settings.b2MixFriction(m_shape1.GetFriction(), m_shape2.GetFriction()); _local9.restitution = b2Settings.b2MixRestitution(m_shape1.GetRestitution(), m_shape2.GetRestitution()); 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++; }; } private function b2CollidePolyAndEdge(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2EdgeShape, _arg5:b2XForm):void{ var _local6:b2Mat22; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:b2ManifoldPoint; var _local12:Number; var _local25:Number; var _local28:Number; var _local48:Number; _arg1.pointCount = 0; _local6 = _arg5.R; _local7 = _arg4.m_v1; var _local13:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local14:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local7 = _arg4.m_v2; var _local15:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local16:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local7 = _arg4.m_normal; var _local17:Number = ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)); var _local18:Number = ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)); _local6 = _arg3.R; _local9 = (_local13 - _arg3.position.x); _local10 = (_local14 - _arg3.position.y); var _local19:Number = ((_local9 * _local6.col1.x) + (_local10 * _local6.col1.y)); var _local20:Number = ((_local9 * _local6.col2.x) + (_local10 * _local6.col2.y)); _local9 = (_local15 - _arg3.position.x); _local10 = (_local16 - _arg3.position.y); var _local21:Number = ((_local9 * _local6.col1.x) + (_local10 * _local6.col1.y)); var _local22:Number = ((_local9 * _local6.col2.x) + (_local10 * _local6.col2.y)); var _local23:Number = ((_local17 * _local6.col1.x) + (_local18 * _local6.col1.y)); var _local24:Number = ((_local17 * _local6.col2.x) + (_local18 * _local6.col2.y)); var _local26 = -1; var _local27:Number = -(Number.MAX_VALUE); var _local29 = -1; var _local30:Number = -(Number.MAX_VALUE); var _local31:Number = -(Number.MAX_VALUE); var _local32:Boolean; var _local33 = -1; var _local34:int = _arg2.m_vertexCount; var _local35:Array = _arg2.m_vertices; var _local36:Array = _arg2.m_normals; var _local37 = -1; var _local38 = -1; var _local39 = -1; var _local40 = -1; var _local41:Number = 0; var _local42:Number = 0; var _local43:Number = 0; var _local44:Number = 0; var _local45:Number = Number.MAX_VALUE; _local7 = _local35[(_local34 - 1)]; _local41 = (((_local7.x - _local19) * _local23) + ((_local7.y - _local20) * _local24)); var _local46:int; while (_local46 < _local34) { _local7 = _local35[_local46]; _local8 = _local36[_local46]; _local25 = (((_local19 - _local7.x) * _local8.x) + ((_local20 - _local7.y) * _local8.y)); _local28 = (((_local21 - _local7.x) * _local8.x) + ((_local22 - _local7.y) * _local8.y)); if (_local28 < _local25){ if (_local28 > _local31){ _local31 = _local28; _local32 = false; _local33 = _local46; }; } else { if (_local25 > _local31){ _local31 = _local25; _local32 = true; _local33 = _local46; }; }; if (_local25 > _local27){ _local27 = _local25; _local26 = _local46; }; if (_local28 > _local30){ _local30 = _local28; _local29 = _local46; }; _local42 = (((_local7.x - _local19) * _local23) + ((_local7.y - _local20) * _local24)); if ((((_local42 >= 0)) && ((_local41 < 0)))){ _local39 = ((_local46)==0) ? (_local34 - 1) : (_local46 - 1); _local40 = _local46; _local44 = _local41; } else { if ((((_local42 < 0)) && ((_local41 >= 0)))){ _local37 = ((_local46)==0) ? (_local34 - 1) : (_local46 - 1); _local38 = _local46; _local43 = _local42; }; }; if (_local42 < _local45){ _local45 = _local42; }; _local41 = _local42; _local46++; }; if (_local37 == -1){ return; }; if (_local31 > 0){ return; }; if (((((_local32) && (_arg4.m_cornerConvex1))) || (((!(_local32)) && (_arg4.m_cornerConvex2))))){ if (_local31 > (_local45 + b2Settings.b2_linearSlop)){ if (_local32){ _local6 = _arg5.R; _local7 = _arg4.m_cornerDir1; _local9 = ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)); _local10 = ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)); _local6 = _arg3.R; _local13 = ((_local6.col1.x * _local9) + (_local6.col2.x * _local10)); _local14 = ((_local6.col1.y * _local9) + (_local6.col2.y * _local10)); _local8 = _local36[_local26]; if (((_local8.x * _local13) + (_local8.y * _local14)) >= 0){ return; }; } else { _local6 = _arg5.R; _local7 = _arg4.m_cornerDir2; _local9 = ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)); _local10 = ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)); _local6 = _arg3.R; _local13 = ((_local6.col1.x * _local9) + (_local6.col2.x * _local10)); _local14 = ((_local6.col1.y * _local9) + (_local6.col2.y * _local10)); _local8 = _local36[_local29]; if (((_local8.x * _local13) + (_local8.y * _local14)) <= 0){ return; }; }; _local11 = _arg1.points[0]; _arg1.pointCount = 1; _local6 = _arg3.R; _local8 = _local36[_local33]; _arg1.normal.x = ((_local6.col1.x * _local8.x) + (_local6.col2.x * _local8.y)); _arg1.normal.y = ((_local6.col1.y * _local8.x) + (_local6.col2.y * _local8.y)); _local11.separation = _local31; _local11.id.features.incidentEdge = _local33; _local11.id.features.incidentVertex = b2Collision.b2_nullFeature; _local11.id.features.referenceEdge = 0; _local11.id.features.flip = 0; if (_local32){ _local11.localPoint1.x = _local19; _local11.localPoint1.y = _local20; _local11.localPoint2.x = _arg4.m_v1.x; _local11.localPoint2.y = _arg4.m_v1.y; } else { _local11.localPoint1.x = _local21; _local11.localPoint1.y = _local22; _local11.localPoint2.x = _arg4.m_v2.x; _local11.localPoint2.y = _arg4.m_v2.y; }; return; }; }; _arg1.normal.x = -(_local17); _arg1.normal.y = -(_local18); if (_local38 == _local39){ _local11 = _arg1.points[0]; _arg1.pointCount = 1; _local11.id.features.incidentEdge = _local38; _local11.id.features.incidentVertex = b2Collision.b2_nullFeature; _local11.id.features.referenceEdge = 0; _local11.id.features.flip = 0; _local7 = _local35[_local38]; _local11.localPoint1.x = _local7.x; _local11.localPoint1.y = _local7.y; _local6 = _arg3.R; _local9 = ((_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))) - _arg5.position.x); _local10 = ((_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))) - _arg5.position.y); _local6 = _arg5.R; _local11.localPoint2.x = ((_local9 * _local6.col1.x) + (_local10 * _local6.col1.y)); _local11.localPoint2.y = ((_local9 * _local6.col2.x) + (_local10 * _local6.col2.y)); _local11.separation = _local43; return; }; _arg1.pointCount = 2; _local9 = -(_local24); _local10 = _local23; _local7 = _local35[_local38]; var _local47:Number = ((_local9 * (_local7.x - _local19)) + (_local10 * (_local7.y - _local20))); _local40 = ((_local38)==(_local34 - 1)) ? 0 : (_local38 + 1); _local7 = _local35[_local39]; if (_local40 != _local39){ _local39 = _local40; _local44 = ((_local23 * (_local7.x - _local19)) + (_local24 * (_local7.y - _local20))); }; _local48 = ((_local9 * (_local7.x - _local19)) + (_local10 * (_local7.y - _local20))); _local11 = _arg1.points[0]; _local11.id.features.incidentEdge = _local38; _local11.id.features.incidentVertex = b2Collision.b2_nullFeature; _local11.id.features.referenceEdge = 0; _local11.id.features.flip = 0; if (_local47 > _arg4.m_length){ _local11.localPoint1.x = _local21; _local11.localPoint1.y = _local22; _local11.localPoint2.x = _arg4.m_v2.x; _local11.localPoint2.y = _arg4.m_v2.y; _local12 = ((_arg4.m_length - _local48) / (_local47 - _local48)); if ((((_local12 > (100 * Number.MIN_VALUE))) && ((_local12 < 1)))){ _local11.separation = ((_local44 * (1 - _local12)) + (_local43 * _local12)); } else { _local11.separation = _local43; }; } else { _local7 = _local35[_local38]; _local11.localPoint1.x = _local7.x; _local11.localPoint1.y = _local7.y; _local6 = _arg3.R; _local9 = ((_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))) - _arg5.position.x); _local10 = ((_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))) - _arg5.position.y); _local6 = _arg5.R; _local11.localPoint2.x = ((_local9 * _local6.col1.x) + (_local10 * _local6.col1.y)); _local11.localPoint2.y = ((_local9 * _local6.col2.x) + (_local10 * _local6.col2.y)); _local11.separation = _local43; }; _local11 = _arg1.points[1]; _local11.id.features.incidentEdge = _local39; _local11.id.features.incidentVertex = b2Collision.b2_nullFeature; _local11.id.features.referenceEdge = 0; _local11.id.features.flip = 0; if (_local48 < 0){ _local11.localPoint1.x = _local19; _local11.localPoint1.y = _local20; _local11.localPoint2.x = _arg4.m_v1.x; _local11.localPoint2.y = _arg4.m_v1.y; _local12 = (-(_local47) / (_local48 - _local47)); if ((((_local12 > (100 * Number.MIN_VALUE))) && ((_local12 < 1)))){ _local11.separation = ((_local43 * (1 - _local12)) + (_local44 * _local12)); } else { _local11.separation = _local44; }; } else { _local7 = _local35[_local39]; _local11.localPoint1.x = _local7.x; _local11.localPoint1.y = _local7.y; _local6 = _arg3.R; _local9 = ((_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))) - _arg5.position.x); _local10 = ((_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))) - _arg5.position.y); _local6 = _arg5.R; _local11.localPoint2.x = ((_local9 * _local6.col1.x) + (_local10 * _local6.col1.y)); _local11.localPoint2.y = ((_local9 * _local6.col2.x) + (_local10 * _local6.col2.y)); _local11.separation = _local44; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndEdgeContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 53
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; private 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 b2internal function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local7:b2ContactPoint; var _local8:int; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; var _local5:b2Body = m_shape1.m_body; var _local6:b2Body = 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); var _local9:Array = [false, false]; _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = b2Settings.b2MixFriction(m_shape1.GetFriction(), m_shape2.GetFriction()); _local7.restitution = b2Settings.b2MixRestitution(m_shape1.GetRestitution(), m_shape2.GetRestitution()); 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++; }; } override public function GetManifolds():Array{ return (m_manifolds); } 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 54
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2DistanceJoint extends b2Joint { private var m_localAnchor1:b2Vec2; private var m_localAnchor2:b2Vec2; private var m_bias:Number; private var m_gamma:Number; private var m_u:b2Vec2; private var m_mass:Number; private var m_impulse:Number; private var m_dampingRatio:Number; private var m_frequencyHz:Number; private 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; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override b2internal 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 _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _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); var _local10:Number = 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(); }; var _local11:Number = ((_local6 * m_u.y) - (_local7 * m_u.x)); var _local12:Number = ((_local8 * m_u.y) - (_local9 * m_u.x)); var _local13:Number = (((_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(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2(((_arg1 * m_impulse) * m_u.x), ((_arg1 * m_impulse) * m_u.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:b2Mat22; if (m_frequencyHz > 0){ return (true); }; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; _local2 = _local3.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); var _local7:Number = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); var _local9:Number = (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; var _local10:Number = (((_local4.m_sweep.c.x + _local8) - _local3.m_sweep.c.x) - _local5); var _local11:Number = (((_local4.m_sweep.c.y + _local9) - _local3.m_sweep.c.y) - _local6); var _local12:Number = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local12); _local11 = (_local11 / _local12); var _local13:Number = (_local12 - m_length); _local13 = b2Math.b2Clamp(_local13, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local14:Number = (-(m_mass) * _local13); m_u.Set(_local10, _local11); var _local15:Number = (_local14 * m_u.x); var _local16:Number = (_local14 * m_u.y); _local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local15)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local16)); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local5 * _local16) - (_local6 * _local15)))); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local15)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local16)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local8 * _local16) - (_local9 * _local15)))); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); return ((b2Math.b2Abs(_local13) < b2Settings.b2_linearSlop)); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; _local2 = _local3.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); var _local7:Number = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); var _local9:Number = (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; var _local10:Number = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6)); var _local11:Number = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5)); var _local12:Number = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9)); var _local13:Number = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8)); var _local14:Number = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11))); var _local15:Number = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse))); m_impulse = (m_impulse + _local15); var _local16:Number = (_local15 * m_u.x); var _local17:Number = (_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 55
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2DistanceJointDef extends b2JointDef { public var localAnchor1:b2Vec2; public var length:Number; public var dampingRatio:Number; public var localAnchor2:b2Vec2; public var frequencyHz:Number; 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{ body1 = _arg1; body2 = _arg2; localAnchor1.SetV(body1.GetLocalPoint(_arg3)); localAnchor2.SetV(body2.GetLocalPoint(_arg4)); var _local5:Number = (_arg4.x - _arg3.x); var _local6:Number = (_arg4.y - _arg3.y); length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6))); frequencyHz = 0; dampingRatio = 0; } } }//package Box2D.Dynamics.Joints
Section 56
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2GearJoint extends b2Joint { private var m_ground2:b2Body; private var m_groundAnchor1:b2Vec2; private var m_groundAnchor2:b2Vec2; private var m_localAnchor1:b2Vec2; private var m_localAnchor2:b2Vec2; private var m_ratio:Number; private var m_revolute2:b2RevoluteJoint; private var m_mass:Number; private var m_impulse:Number; private var m_prismatic2:b2PrismaticJoint; private var m_ground1:b2Body; private var m_revolute1:b2RevoluteJoint; private var m_prismatic1:b2PrismaticJoint; private var m_constant:Number; private var m_J:b2Jacobian; public function b2GearJoint(_arg1:b2GearJointDef){ 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); var _local2:int = _arg1.joint1.m_type; var _local3:int = _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_impulse = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ 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 _local2:b2Body = m_ground1; var _local3:b2Body = m_ground2; var _local4:b2Body = m_body1; var _local5:b2Body = m_body2; var _local14:Number = 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){ _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * m_impulse) * m_J.linear1.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * m_impulse) * m_J.linear1.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * m_impulse) * m_J.angular1)); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * m_impulse) * m_J.linear2.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * m_impulse) * m_J.linear2.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * m_impulse) * m_J.angular2)); } else { m_impulse = 0; }; } override public function GetReactionTorque(_arg1:Number):Number{ var _local2:b2Mat22 = m_body2.m_xf.R; var _local3:Number = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x); var _local4:Number = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y); var _local5:Number = ((_local2.col1.x * _local3) + (_local2.col2.x * _local4)); _local4 = ((_local2.col1.y * _local3) + (_local2.col2.y * _local4)); _local3 = _local5; var _local6:Number = (m_impulse * m_J.linear2.x); var _local7:Number = (m_impulse * m_J.linear2.y); return ((_arg1 * (((m_impulse * m_J.angular2) - (_local3 * _local7)) + (_local4 * _local6)))); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2(((_arg1 * m_impulse) * m_J.linear2.x), ((_arg1 * m_impulse) * m_J.linear2.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local5:Number; var _local6:Number; var _local2:Number = 0; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; if (m_revolute1){ _local5 = m_revolute1.GetJointAngle(); } else { _local5 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local6 = m_revolute2.GetJointAngle(); } else { _local6 = m_prismatic2.GetJointTranslation(); }; var _local7:Number = (m_constant - (_local5 + (m_ratio * _local6))); var _local8:Number = (-(m_mass) * _local7); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local8) * m_J.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local8) * m_J.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local8) * m_J.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local4.m_invMass * _local8) * m_J.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local4.m_invMass * _local8) * m_J.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local4.m_invI * _local8) * m_J.angular2)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); return ((_local2 < b2Settings.b2_linearSlop)); } public function GetRatio():Number{ return (m_ratio); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:Number = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); var _local5:Number = (-(m_mass) * _local4); m_impulse = (m_impulse + _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local5) * m_J.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local5) * m_J.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local5) * m_J.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local5) * m_J.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local5) * m_J.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local5) * m_J.angular2)); } } }//package Box2D.Dynamics.Joints
Section 57
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { public class b2GearJointDef extends b2JointDef { public var joint1:b2Joint; public var joint2:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 58
//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 angular1:Number; public var angular2: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 59
//b2Joint (Box2D.Dynamics.Joints.b2Joint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2Joint { b2internal var m_islandFlag:Boolean; b2internal var m_collideConnected:Boolean; b2internal var m_prev:b2Joint; b2internal var m_type:int; b2internal var m_next:b2Joint; b2internal var m_node1:b2JointEdge; b2internal var m_node2:b2JointEdge; b2internal var m_localCenter1:b2Vec2; b2internal var m_localCenter2:b2Vec2; b2internal var m_invMass1:Number; b2internal var m_invI2:Number; b2internal var m_invMass2:Number; private var m_userData; b2internal var m_body1:b2Body; b2internal var m_body2:b2Body; b2internal var m_invI1:Number; b2internal static const e_prismaticJoint:int = 2; b2internal static const e_equalLimits:int = 3; b2internal static const e_lineJoint:int = 7; b2internal static const e_gearJoint:int = 6; b2internal static const e_atUpperLimit:int = 2; b2internal static const e_atLowerLimit:int = 1; b2internal static const e_revoluteJoint:int = 1; b2internal static const e_inactiveLimit:int = 0; b2internal static const e_pulleyJoint:int = 4; b2internal static const e_unknownJoint:int = 0; b2internal static const e_distanceJoint:int = 3; b2internal static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_node1 = new b2JointEdge(); m_node2 = new b2JointEdge(); m_localCenter1 = new b2Vec2(); m_localCenter2 = new b2Vec2(); 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 GetBody2():b2Body{ return (m_body2); } b2internal function ComputeXForm(_arg1:b2XForm, _arg2:b2Vec2, _arg3:b2Vec2, _arg4:Number):void{ _arg1.R.Set(_arg4); _arg1.position.SetV(b2Math.SubtractVV(_arg2, b2Math.b2MulMV(_arg1.R, _arg3))); } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function GetNext():b2Joint{ return (m_next); } public function GetType():int{ return (m_type); } b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce(_arg1:Number):b2Vec2{ return (null); } b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ return (false); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetBody1():b2Body{ return (m_body1); } b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } b2internal static function Destroy(_arg1:b2Joint, _arg2):void{ } b2internal static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; 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; case e_lineJoint: _local3 = new b2LineJoint((_arg1 as b2LineJointDef)); break; default: break; }; return (_local3); } } }//package Box2D.Dynamics.Joints
Section 60
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointDef { public var body2:b2Body; public var type:int; public var userData; public var collideConnected:Boolean; public var body1:b2Body; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 61
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointEdge { public var other:b2Body; public var next:b2JointEdge; public var prev:b2JointEdge; public var joint:b2Joint; } }//package Box2D.Dynamics.Joints
Section 62
//b2LineJoint (Box2D.Dynamics.Joints.b2LineJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2LineJoint extends b2Joint { private var m_a1:Number; private var m_a2:Number; private var m_perp:b2Vec2; private var m_lowerTranslation:Number; b2internal var m_localXAxis1:b2Vec2; private var m_impulse:b2Vec2; private var m_enableLimit:Boolean; private var m_maxMotorForce:Number; private var m_localYAxis1:b2Vec2; private var m_s2:Number; private var m_axis:b2Vec2; private var m_motorMass:Number; private var m_s1:Number; private var m_upperTranslation:Number; b2internal var m_localAnchor1:b2Vec2; b2internal var m_localAnchor2:b2Vec2; private var m_limitState:int; private var m_motorImpulse:Number; private var m_motorSpeed:Number; private var m_enableMotor:Boolean; private var m_K:b2Mat22; public function b2LineJoint(_arg1:b2LineJointDef){ 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_axis = new b2Vec2(); m_perp = new b2Vec2(); m_K = new b2Mat22(); m_impulse = new b2Vec2(); 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_impulse.SetZero(); m_motorMass = 0; m_motorImpulse = 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; m_limitState = e_inactiveLimit; m_axis.SetZero(); m_perp.SetZero(); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:b2Vec2; var _local19:b2Vec2; var _local20:Number; var _local21:Number; var _local22:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:b2Vec2 = _local2.m_linearVelocity; var _local5:Number = _local2.m_angularVelocity; var _local6:b2Vec2 = _local3.m_linearVelocity; var _local7:Number = _local3.m_angularVelocity; if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local13 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local14 = (m_motorMass * (m_motorSpeed - _local13)); _local15 = m_motorImpulse; _local16 = (_arg1.dt * m_maxMotorForce); m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local14), -(_local16), _local16); _local14 = (m_motorImpulse - _local15); _local8 = (_local14 * m_axis.x); _local9 = (_local14 * m_axis.y); _local10 = (_local14 * m_a1); _local11 = (_local14 * m_a2); _local4.x = (_local4.x - (m_invMass1 * _local8)); _local4.y = (_local4.y - (m_invMass1 * _local9)); _local5 = (_local5 - (m_invI1 * _local10)); _local6.x = (_local6.x + (m_invMass2 * _local8)); _local6.y = (_local6.y + (m_invMass2 * _local9)); _local7 = (_local7 + (m_invI2 * _local11)); }; var _local12:Number = ((((m_perp.x * (_local6.x - _local4.x)) + (m_perp.y * (_local6.y - _local4.y))) + (m_s2 * _local7)) - (m_s1 * _local5)); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local17 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local18 = m_impulse.Copy(); _local19 = m_K.Solve(new b2Vec2(), -(_local12), -(_local17)); m_impulse.Add(_local19); if (m_limitState == e_atLowerLimit){ m_impulse.y = b2Math.b2Max(m_impulse.y, 0); } else { if (m_limitState == e_atUpperLimit){ m_impulse.y = b2Math.b2Min(m_impulse.y, 0); }; }; _local20 = (-(_local12) - ((m_impulse.y - _local18.y) * m_K.col2.x)); _local21 = ((_local20 / m_K.col1.x) + _local18.x); m_impulse.x = _local21; _local19.x = (m_impulse.x - _local18.x); _local19.y = (m_impulse.y - _local18.y); _local8 = ((_local19.x * m_perp.x) + (_local19.y * m_axis.x)); _local9 = ((_local19.x * m_perp.y) + (_local19.y * m_axis.y)); _local10 = ((_local19.x * m_s1) + (_local19.y * m_a1)); _local11 = ((_local19.x * m_s2) + (_local19.y * m_a2)); _local4.x = (_local4.x - (m_invMass1 * _local8)); _local4.y = (_local4.y - (m_invMass1 * _local9)); _local5 = (_local5 - (m_invI1 * _local10)); _local6.x = (_local6.x + (m_invMass2 * _local8)); _local6.y = (_local6.y + (m_invMass2 * _local9)); _local7 = (_local7 + (m_invI2 * _local11)); } else { _local22 = (-(_local12) / m_K.col1.x); m_impulse.x = (m_impulse.x + _local22); _local8 = (_local22 * m_perp.x); _local9 = (_local22 * m_perp.y); _local10 = (_local22 * m_s1); _local11 = (_local22 * m_s2); _local4.x = (_local4.x - (m_invMass1 * _local8)); _local4.y = (_local4.y - (m_invMass1 * _local9)); _local5 = (_local5 - (m_invI1 * _local10)); _local6.x = (_local6.x + (m_invMass2 * _local8)); _local6.y = (_local6.y + (m_invMass2 * _local9)); _local7 = (_local7 + (m_invI2 * _local11)); }; _local2.m_linearVelocity.SetV(_local4); _local2.m_angularVelocity = _local5; _local3.m_linearVelocity.SetV(_local6); _local3.m_angularVelocity = _local7; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetLowerLimit():Number{ return (m_lowerTranslation); } public function EnableMotor(_arg1:Boolean):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_enableMotor = _arg1; } public function GetJointTranslation():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:b2Vec2 = _local1.GetWorldPoint(m_localAnchor1); var _local5:b2Vec2 = _local2.GetWorldPoint(m_localAnchor2); var _local6:Number = (_local5.x - _local4.x); var _local7:Number = (_local5.y - _local4.y); var _local8:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local9:Number = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.y) * m_axis.x))), (_arg1 * ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.y) * m_axis.y))))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local10:b2Mat22; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local4:b2Body = m_body1; var _local5:b2Body = m_body2; var _local6:b2Vec2 = _local4.m_sweep.c; var _local7:Number = _local4.m_sweep.a; var _local8:b2Vec2 = _local5.m_sweep.c; var _local9:Number = _local5.m_sweep.a; var _local16:Number = 0; var _local17:Number = 0; var _local18:Boolean; var _local19:Number = 0; var _local20:b2Mat22 = new b2Mat22(_local7); var _local21:b2Mat22 = new b2Mat22(_local9); _local10 = _local20; var _local22:Number = (m_localAnchor1.x - m_localCenter1.x); var _local23:Number = (m_localAnchor1.y - m_localCenter1.y); _local11 = ((_local10.col1.x * _local22) + (_local10.col2.x * _local23)); _local23 = ((_local10.col1.y * _local22) + (_local10.col2.y * _local23)); _local22 = _local11; _local10 = _local21; var _local24:Number = (m_localAnchor2.x - m_localCenter2.x); var _local25:Number = (m_localAnchor2.y - m_localCenter2.y); _local11 = ((_local10.col1.x * _local24) + (_local10.col2.x * _local25)); _local25 = ((_local10.col1.y * _local24) + (_local10.col2.y * _local25)); _local24 = _local11; var _local26:Number = (((_local8.x + _local24) - _local6.x) - _local22); var _local27:Number = (((_local8.y + _local25) - _local6.y) - _local23); if (m_enableLimit){ m_axis = b2Math.b2MulMV(_local20, m_localXAxis1); m_a1 = (((_local26 + _local22) * m_axis.y) - ((_local27 + _local23) * m_axis.x)); m_a2 = ((_local24 * m_axis.y) - (_local25 * m_axis.x)); _local34 = ((m_axis.x * _local26) + (m_axis.y * _local27)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ _local19 = b2Math.b2Clamp(_local34, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local16 = b2Math.b2Abs(_local34); _local18 = true; } else { if (_local34 <= m_lowerTranslation){ _local19 = b2Math.b2Clamp(((_local34 - m_lowerTranslation) + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local16 = (m_lowerTranslation - _local34); _local18 = true; } else { if (_local34 >= m_upperTranslation){ _local19 = b2Math.b2Clamp(((_local34 - m_upperTranslation) + b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local16 = (_local34 - m_upperTranslation); _local18 = true; }; }; }; }; m_perp = b2Math.b2MulMV(_local20, m_localYAxis1); m_s1 = (((_local26 + _local22) * m_perp.y) - ((_local27 + _local23) * m_perp.x)); m_s2 = ((_local24 * m_perp.y) - (_local25 * m_perp.x)); var _local28:b2Vec2 = new b2Vec2(); var _local29:Number = ((m_perp.x * _local26) + (m_perp.y * _local27)); _local16 = b2Math.b2Max(_local16, b2Math.b2Abs(_local29)); _local17 = 0; if (_local18){ _local12 = m_invMass1; _local13 = m_invMass2; _local14 = m_invI1; _local15 = m_invI2; m_K.col1.x = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); m_K.col1.y = (((_local14 * m_s1) * m_a1) + ((_local15 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (((_local12 + _local13) + ((_local14 * m_a1) * m_a1)) + ((_local15 * m_a2) * m_a2)); m_K.Solve(_local28, -(_local29), -(_local19)); } else { _local12 = m_invMass1; _local13 = m_invMass2; _local14 = m_invI1; _local15 = m_invI2; _local35 = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); _local36 = (-(_local29) / _local35); _local28.x = _local36; _local28.y = 0; }; var _local30:Number = ((_local28.x * m_perp.x) + (_local28.y * m_axis.x)); var _local31:Number = ((_local28.x * m_perp.y) + (_local28.y * m_axis.y)); var _local32:Number = ((_local28.x * m_s1) + (_local28.y * m_a1)); var _local33:Number = ((_local28.x * m_s2) + (_local28.y * m_a2)); _local6.x = (_local6.x - (m_invMass1 * _local30)); _local6.y = (_local6.y - (m_invMass1 * _local31)); _local7 = (_local7 - (m_invI1 * _local32)); _local8.x = (_local8.x + (m_invMass2 * _local30)); _local8.y = (_local8.y + (m_invMass2 * _local31)); _local9 = (_local9 + (m_invI2 * _local33)); _local4.m_sweep.a = _local7; _local5.m_sweep.a = _local9; _local4.SynchronizeTransform(); _local5.SynchronizeTransform(); return ((((_local16 <= b2Settings.b2_linearSlop)) && ((_local17 <= b2Settings.b2_angularSlop)))); } public function SetMotorSpeed(_arg1:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_xf.R; var _local4:Number = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); var _local5:Number = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); var _local6:Number = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; var _local7:Number = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); var _local8:Number = (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; var _local9:Number = (_local1.m_sweep.c.x + _local4); var _local10:Number = (_local1.m_sweep.c.y + _local5); var _local11:Number = (_local2.m_sweep.c.x + _local7); var _local12:Number = (_local2.m_sweep.c.y + _local8); var _local13:Number = (_local11 - _local9); var _local14:Number = (_local12 - _local10); var _local15:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local16:b2Vec2 = _local1.m_linearVelocity; var _local17:b2Vec2 = _local2.m_linearVelocity; var _local18:Number = _local1.m_angularVelocity; var _local19:Number = _local2.m_angularVelocity; var _local20:Number = (((_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); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local5:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; m_localCenter1.SetV(_local2.GetLocalCenter()); m_localCenter2.SetV(_local3.GetLocalCenter()); var _local6:b2XForm = _local2.GetXForm(); var _local7:b2XForm = _local3.GetXForm(); _local4 = _local2.m_xf.R; var _local8:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local4 = _local3.m_xf.R; var _local10:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local11:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local10) + (_local4.col2.x * _local11)); _local11 = ((_local4.col1.y * _local10) + (_local4.col2.y * _local11)); _local10 = _local5; var _local12:Number = (((_local3.m_sweep.c.x + _local10) - _local2.m_sweep.c.x) - _local8); var _local13:Number = (((_local3.m_sweep.c.y + _local11) - _local2.m_sweep.c.y) - _local9); m_invMass1 = _local2.m_invMass; m_invMass2 = _local3.m_invMass; m_invI1 = _local2.m_invI; m_invI2 = _local3.m_invI; m_axis.SetV(b2Math.b2MulMV(_local6.R, m_localXAxis1)); m_a1 = (((_local12 + _local8) * m_axis.y) - ((_local13 + _local9) * m_axis.x)); m_a2 = ((_local10 * m_axis.y) - (_local11 * m_axis.x)); m_motorMass = (((m_invMass1 + m_invMass2) + ((m_invI1 * m_a1) * m_a1)) + ((m_invI2 * m_a2) * m_a2)); m_motorMass = (1 / m_motorMass); m_perp.SetV(b2Math.b2MulMV(_local6.R, m_localYAxis1)); m_s1 = (((_local12 + _local8) * m_perp.y) - ((_local13 + _local9) * m_perp.x)); m_s2 = ((_local10 * m_perp.y) - (_local11 * m_perp.x)); var _local14:Number = m_invMass1; var _local15:Number = m_invMass2; var _local16:Number = m_invI1; var _local17:Number = m_invI2; m_K.col1.x = (((_local14 + _local15) + ((_local16 * m_s1) * m_s1)) + ((_local17 * m_s2) * m_s2)); m_K.col1.y = (((_local16 * m_s1) * m_a1) + ((_local17 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (((_local14 + _local15) + ((_local16 * m_a1) * m_a1)) + ((_local17 * m_a2) * m_a2)); if (m_enableLimit){ _local18 = ((m_axis.x * _local12) + (m_axis.y * _local13)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local18 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitState = e_atLowerLimit; m_impulse.y = 0; }; } else { if (_local18 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitState = e_atUpperLimit; m_impulse.y = 0; }; } else { m_limitState = e_inactiveLimit; m_impulse.y = 0; }; }; }; } else { m_limitState = e_inactiveLimit; }; if (m_enableMotor == false){ m_motorImpulse = 0; }; if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_motorImpulse = (m_motorImpulse * _arg1.dtRatio); _local19 = ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.y) * m_axis.x)); _local20 = ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.y) * m_axis.y)); _local21 = ((m_impulse.x * m_s1) + ((m_motorImpulse + m_impulse.y) * m_a1)); _local22 = ((m_impulse.x * m_s2) + ((m_motorImpulse + m_impulse.y) * m_a2)); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (m_invMass1 * _local19)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (m_invMass1 * _local20)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (m_invI1 * _local21)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (m_invMass2 * _local19)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (m_invMass2 * _local20)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (m_invI2 * _local22)); } else { m_impulse.SetZero(); m_motorImpulse = 0; }; } public function GetMotorForce():Number{ return (m_motorImpulse); } public function EnableLimit(_arg1:Boolean):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_enableLimit = _arg1; } public function SetMaxMotorForce(_arg1:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_maxMotorForce = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.y)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } } }//package Box2D.Dynamics.Joints
Section 63
//b2LineJointDef (Box2D.Dynamics.Joints.b2LineJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2LineJointDef extends b2JointDef { public var motorSpeed:Number; public var localAxis1:b2Vec2; public var upperTranslation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public var maxMotorForce:Number; public var lowerTranslation:Number; public function b2LineJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); localAxis1 = new b2Vec2(); super(); type = b2Joint.e_lineJoint; localAxis1.Set(1, 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); } } }//package Box2D.Dynamics.Joints
Section 64
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { private var K1:b2Mat22; private var K:b2Mat22; private var m_beta:Number; private var m_mass:b2Mat22; private var K2:b2Mat22; private var m_target:b2Vec2; private var m_gamma:Number; private var m_impulse:b2Vec2; private var m_C:b2Vec2; private var m_localAnchor:b2Vec2; private var m_maxForce:Number; private var m_dampingRatio:Number; private var m_frequencyHz:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local3: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); var _local2:Number = (m_target.x - m_body2.m_xf.position.x); _local3 = (m_target.y - m_body2.m_xf.position.y); var _local4:b2Mat22 = 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(); m_frequencyHz = _arg1.frequencyHz; m_dampingRatio = _arg1.dampingRatio; m_beta = 0; m_gamma = 0; } public function SetTarget(_arg1:b2Vec2):void{ if (m_body2.IsSleeping()){ m_body2.WakeUp(); }; m_target = _arg1; } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor)); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local7:b2Mat22; var _local8:Number; var _local9:Number; _local2 = m_body2; var _local3:Number = _local2.GetMass(); var _local4:Number = ((2 * Math.PI) * m_frequencyHz); var _local5:Number = (((2 * _local3) * m_dampingRatio) * _local4); var _local6:Number = ((_local3 * _local4) * _local4); m_gamma = (1 / (_arg1.dt * (_local5 + (_arg1.dt * _local6)))); m_beta = ((_arg1.dt * _local6) * m_gamma); _local7 = _local2.m_xf.R; _local8 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local9 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); var _local10:Number = ((_local7.col1.x * _local8) + (_local7.col2.x * _local9)); _local9 = ((_local7.col1.y * _local8) + (_local7.col2.y * _local9)); _local8 = _local10; var _local11:Number = _local2.m_invMass; var _local12:Number = _local2.m_invI; K1.col1.x = _local11; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local11; K2.col1.x = ((_local12 * _local9) * _local9); K2.col2.x = ((-(_local12) * _local8) * _local9); K2.col1.y = ((-(_local12) * _local8) * _local9); K2.col2.y = ((_local12 * _local8) * _local8); K.SetM(K1); K.AddM(K2); K.col1.x = (K.col1.x + m_gamma); K.col2.y = (K.col2.y + m_gamma); K.GetInverse(m_mass); m_C.x = ((_local2.m_sweep.c.x + _local8) - m_target.x); m_C.y = ((_local2.m_sweep.c.y + _local9) - m_target.y); _local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98); m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local11 * m_impulse.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local11 * m_impulse.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * ((_local8 * m_impulse.y) - (_local9 * m_impulse.x)))); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * m_impulse.x), (_arg1 * m_impulse.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ return (true); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local2:b2Body = m_body2; _local3 = _local2.m_xf.R; var _local6:Number = (m_localAnchor.x - _local2.m_sweep.localCenter.x); var _local7:Number = (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; var _local8:Number = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7)); var _local9:Number = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6)); _local3 = m_mass; _local4 = ((_local8 + (m_beta * m_C.x)) + (m_gamma * m_impulse.x)); _local5 = ((_local9 + (m_beta * m_C.y)) + (m_gamma * m_impulse.y)); var _local10:Number = -(((_local3.col1.x * _local4) + (_local3.col2.x * _local5))); var _local11:Number = -(((_local3.col1.y * _local4) + (_local3.col2.y * _local5))); var _local12:Number = m_impulse.x; var _local13:Number = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); var _local14:Number = (_arg1.dt * m_maxForce); if (m_impulse.LengthSquared() > (_local14 * _local14)){ m_impulse.Multiply((_local14 / m_impulse.Length())); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local10)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local11)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local11) - (_local7 * _local10)))); } } }//package Box2D.Dynamics.Joints
Section 65
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var target:b2Vec2; public var maxForce:Number; public var dampingRatio:Number; public var frequencyHz:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; } } }//package Box2D.Dynamics.Joints
Section 66
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PrismaticJoint extends b2Joint { private var m_a1:Number; private var m_a2:Number; private var m_perp:b2Vec2; private var m_lowerTranslation:Number; b2internal var m_localXAxis1:b2Vec2; private var m_refAngle:Number; private var m_impulse:b2Vec3; private var m_enableLimit:Boolean; private var m_maxMotorForce:Number; private var m_localYAxis1:b2Vec2; private var m_s2:Number; private var m_axis:b2Vec2; private var m_motorMass:Number; private var m_s1:Number; private var m_upperTranslation:Number; b2internal var m_localAnchor1:b2Vec2; b2internal var m_localAnchor2:b2Vec2; private var m_limitState:int; private var m_motorImpulse:Number; private var m_motorSpeed:Number; private var m_enableMotor:Boolean; private var m_K:b2Mat33; 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_axis = new b2Vec2(); m_perp = new b2Vec2(); m_K = new b2Mat33(); m_impulse = new b2Vec3(); 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_impulse.SetZero(); m_motorMass = 0; m_motorImpulse = 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; m_limitState = e_inactiveLimit; m_axis.SetZero(); m_perp.SetZero(); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:b2Vec3; var _local20:b2Vec3; var _local21:Number; var _local22:Number; var _local23:b2Vec2; var _local24:b2Vec2; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:b2Vec2 = _local2.m_linearVelocity; var _local5:Number = _local2.m_angularVelocity; var _local6:b2Vec2 = _local3.m_linearVelocity; var _local7:Number = _local3.m_angularVelocity; if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local14 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local15 = (m_motorMass * (m_motorSpeed - _local14)); _local16 = m_motorImpulse; _local17 = (_arg1.dt * m_maxMotorForce); m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local15), -(_local17), _local17); _local15 = (m_motorImpulse - _local16); _local8 = (_local15 * m_axis.x); _local9 = (_local15 * m_axis.y); _local10 = (_local15 * m_a1); _local11 = (_local15 * m_a2); _local4.x = (_local4.x - (m_invMass1 * _local8)); _local4.y = (_local4.y - (m_invMass1 * _local9)); _local5 = (_local5 - (m_invI1 * _local10)); _local6.x = (_local6.x + (m_invMass2 * _local8)); _local6.y = (_local6.y + (m_invMass2 * _local9)); _local7 = (_local7 + (m_invI2 * _local11)); }; var _local12:Number = ((((m_perp.x * (_local6.x - _local4.x)) + (m_perp.y * (_local6.y - _local4.y))) + (m_s2 * _local7)) - (m_s1 * _local5)); var _local13:Number = (_local7 - _local5); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local18 = ((((m_axis.x * (_local6.x - _local4.x)) + (m_axis.y * (_local6.y - _local4.y))) + (m_a2 * _local7)) - (m_a1 * _local5)); _local19 = m_impulse.Copy(); _local20 = m_K.Solve33(new b2Vec3(), -(_local12), -(_local13), -(_local18)); m_impulse.Add(_local20); if (m_limitState == e_atLowerLimit){ m_impulse.z = b2Math.b2Max(m_impulse.z, 0); } else { if (m_limitState == e_atUpperLimit){ m_impulse.z = b2Math.b2Min(m_impulse.z, 0); }; }; _local21 = (-(_local12) - ((m_impulse.z - _local19.z) * m_K.col3.x)); _local22 = (-(_local13) - ((m_impulse.z - _local19.z) * m_K.col3.y)); _local23 = m_K.Solve22(new b2Vec2(), _local21, _local22); m_K.Solve22(new b2Vec2(), _local21, _local22).x = (_local23.x + _local19.x); _local23.y = (_local23.y + _local19.y); m_impulse.x = _local23.x; m_impulse.y = _local23.y; _local20.x = (m_impulse.x - _local19.x); _local20.y = (m_impulse.y - _local19.y); _local20.z = (m_impulse.z - _local19.z); _local8 = ((_local20.x * m_perp.x) + (_local20.z * m_axis.x)); _local9 = ((_local20.x * m_perp.y) + (_local20.z * m_axis.y)); _local10 = (((_local20.x * m_s1) + _local20.y) + (_local20.z * m_a1)); _local11 = (((_local20.x * m_s2) + _local20.y) + (_local20.z * m_a2)); _local4.x = (_local4.x - (m_invMass1 * _local8)); _local4.y = (_local4.y - (m_invMass1 * _local9)); _local5 = (_local5 - (m_invI1 * _local10)); _local6.x = (_local6.x + (m_invMass2 * _local8)); _local6.y = (_local6.y + (m_invMass2 * _local9)); _local7 = (_local7 + (m_invI2 * _local11)); } else { _local24 = m_K.Solve22(new b2Vec2(), -(_local12), -(_local13)); m_impulse.x = (m_impulse.x + _local24.x); m_impulse.y = (m_impulse.y + _local24.y); _local8 = (_local24.x * m_perp.x); _local9 = (_local24.x * m_perp.y); _local10 = ((_local24.x * m_s1) + _local24.y); _local11 = ((_local24.x * m_s2) + _local24.y); _local4.x = (_local4.x - (m_invMass1 * _local8)); _local4.y = (_local4.y - (m_invMass1 * _local9)); _local5 = (_local5 - (m_invI1 * _local10)); _local6.x = (_local6.x + (m_invMass2 * _local8)); _local6.y = (_local6.y + (m_invMass2 * _local9)); _local7 = (_local7 + (m_invI2 * _local11)); }; _local2.m_linearVelocity.SetV(_local4); _local2.m_angularVelocity = _local5; _local3.m_linearVelocity.SetV(_local6); _local3.m_angularVelocity = _local7; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetLowerLimit():Number{ return (m_lowerTranslation); } public function EnableMotor(_arg1:Boolean):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_enableMotor = _arg1; } public function GetJointTranslation():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:b2Vec2 = _local1.GetWorldPoint(m_localAnchor1); var _local5:b2Vec2 = _local2.GetWorldPoint(m_localAnchor2); var _local6:Number = (_local5.x - _local4.x); var _local7:Number = (_local5.y - _local4.y); var _local8:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local9:Number = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.z) * m_axis.x))), (_arg1 * ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.z) * m_axis.y))))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local10:b2Mat22; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:b2Vec2; var _local4:b2Body = m_body1; var _local5:b2Body = m_body2; var _local6:b2Vec2 = _local4.m_sweep.c; var _local7:Number = _local4.m_sweep.a; var _local8:b2Vec2 = _local5.m_sweep.c; var _local9:Number = _local5.m_sweep.a; var _local16:Number = 0; var _local17:Number = 0; var _local18:Boolean; var _local19:Number = 0; var _local20:b2Mat22 = new b2Mat22(_local7); var _local21:b2Mat22 = new b2Mat22(_local9); _local10 = _local20; var _local22:Number = (m_localAnchor1.x - m_localCenter1.x); var _local23:Number = (m_localAnchor1.y - m_localCenter1.y); _local11 = ((_local10.col1.x * _local22) + (_local10.col2.x * _local23)); _local23 = ((_local10.col1.y * _local22) + (_local10.col2.y * _local23)); _local22 = _local11; _local10 = _local21; var _local24:Number = (m_localAnchor2.x - m_localCenter2.x); var _local25:Number = (m_localAnchor2.y - m_localCenter2.y); _local11 = ((_local10.col1.x * _local24) + (_local10.col2.x * _local25)); _local25 = ((_local10.col1.y * _local24) + (_local10.col2.y * _local25)); _local24 = _local11; var _local26:Number = (((_local8.x + _local24) - _local6.x) - _local22); var _local27:Number = (((_local8.y + _local25) - _local6.y) - _local23); if (m_enableLimit){ m_axis = b2Math.b2MulMV(_local20, m_localXAxis1); m_a1 = (((_local26 + _local22) * m_axis.y) - ((_local27 + _local23) * m_axis.x)); m_a2 = ((_local24 * m_axis.y) - (_local25 * m_axis.x)); _local35 = ((m_axis.x * _local26) + (m_axis.y * _local27)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ _local19 = b2Math.b2Clamp(_local35, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local16 = b2Math.b2Abs(_local35); _local18 = true; } else { if (_local35 <= m_lowerTranslation){ _local19 = b2Math.b2Clamp(((_local35 - m_lowerTranslation) + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local16 = (m_lowerTranslation - _local35); _local18 = true; } else { if (_local35 >= m_upperTranslation){ _local19 = b2Math.b2Clamp(((_local35 - m_upperTranslation) + b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local16 = (_local35 - m_upperTranslation); _local18 = true; }; }; }; }; m_perp = b2Math.b2MulMV(_local20, m_localYAxis1); m_s1 = (((_local26 + _local22) * m_perp.y) - ((_local27 + _local23) * m_perp.x)); m_s2 = ((_local24 * m_perp.y) - (_local25 * m_perp.x)); var _local28:b2Vec3 = new b2Vec3(); var _local29:Number = ((m_perp.x * _local26) + (m_perp.y * _local27)); var _local30:Number = ((_local9 - _local7) - m_refAngle); _local16 = b2Math.b2Max(_local16, b2Math.b2Abs(_local29)); _local17 = b2Math.b2Abs(_local30); if (_local18){ _local12 = m_invMass1; _local13 = m_invMass2; _local14 = m_invI1; _local15 = m_invI2; m_K.col1.x = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); m_K.col1.y = ((_local14 * m_s1) + (_local15 * m_s2)); m_K.col1.z = (((_local14 * m_s1) * m_a1) + ((_local15 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (_local14 + _local15); m_K.col2.z = ((_local14 * m_a1) + (_local15 * m_a2)); m_K.col3.x = m_K.col1.z; m_K.col3.y = m_K.col2.z; m_K.col3.z = (((_local12 + _local13) + ((_local14 * m_a1) * m_a1)) + ((_local15 * m_a2) * m_a2)); m_K.Solve33(_local28, -(_local29), -(_local30), -(_local19)); } else { _local12 = m_invMass1; _local13 = m_invMass2; _local14 = m_invI1; _local15 = m_invI2; _local36 = (((_local12 + _local13) + ((_local14 * m_s1) * m_s1)) + ((_local15 * m_s2) * m_s2)); _local37 = ((_local14 * m_s1) + (_local15 * m_s2)); _local38 = (_local14 + _local15); m_K.col1.Set(_local36, _local37, 0); m_K.col2.Set(_local37, _local38, 0); _local39 = m_K.Solve22(new b2Vec2(), -(_local29), -(_local30)); _local28.x = _local39.x; _local28.y = _local39.y; _local28.z = 0; }; var _local31:Number = ((_local28.x * m_perp.x) + (_local28.z * m_axis.x)); var _local32:Number = ((_local28.x * m_perp.y) + (_local28.z * m_axis.y)); var _local33:Number = (((_local28.x * m_s1) + _local28.y) + (_local28.z * m_a1)); var _local34:Number = (((_local28.x * m_s2) + _local28.y) + (_local28.z * m_a2)); _local6.x = (_local6.x - (m_invMass1 * _local31)); _local6.y = (_local6.y - (m_invMass1 * _local32)); _local7 = (_local7 - (m_invI1 * _local33)); _local8.x = (_local8.x + (m_invMass2 * _local31)); _local8.y = (_local8.y + (m_invMass2 * _local32)); _local9 = (_local9 + (m_invI2 * _local34)); _local4.m_sweep.a = _local7; _local5.m_sweep.a = _local9; _local4.SynchronizeTransform(); _local5.SynchronizeTransform(); return ((((_local16 <= b2Settings.b2_linearSlop)) && ((_local17 <= b2Settings.b2_angularSlop)))); } public function SetMotorSpeed(_arg1:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_xf.R; var _local4:Number = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); var _local5:Number = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); var _local6:Number = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; var _local7:Number = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); var _local8:Number = (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; var _local9:Number = (_local1.m_sweep.c.x + _local4); var _local10:Number = (_local1.m_sweep.c.y + _local5); var _local11:Number = (_local2.m_sweep.c.x + _local7); var _local12:Number = (_local2.m_sweep.c.y + _local8); var _local13:Number = (_local11 - _local9); var _local14:Number = (_local12 - _local10); var _local15:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local16:b2Vec2 = _local1.m_linearVelocity; var _local17:b2Vec2 = _local2.m_linearVelocity; var _local18:Number = _local1.m_angularVelocity; var _local19:Number = _local2.m_angularVelocity; var _local20:Number = (((_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); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local5:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; m_localCenter1.SetV(_local2.GetLocalCenter()); m_localCenter2.SetV(_local3.GetLocalCenter()); var _local6:b2XForm = _local2.GetXForm(); var _local7:b2XForm = _local3.GetXForm(); _local4 = _local2.m_xf.R; var _local8:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local4 = _local3.m_xf.R; var _local10:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local11:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local10) + (_local4.col2.x * _local11)); _local11 = ((_local4.col1.y * _local10) + (_local4.col2.y * _local11)); _local10 = _local5; var _local12:Number = (((_local3.m_sweep.c.x + _local10) - _local2.m_sweep.c.x) - _local8); var _local13:Number = (((_local3.m_sweep.c.y + _local11) - _local2.m_sweep.c.y) - _local9); m_invMass1 = _local2.m_invMass; m_invMass2 = _local3.m_invMass; m_invI1 = _local2.m_invI; m_invI2 = _local3.m_invI; m_axis.SetV(b2Math.b2MulMV(_local6.R, m_localXAxis1)); m_a1 = (((_local12 + _local8) * m_axis.y) - ((_local13 + _local9) * m_axis.x)); m_a2 = ((_local10 * m_axis.y) - (_local11 * m_axis.x)); m_motorMass = (((m_invMass1 + m_invMass2) + ((m_invI1 * m_a1) * m_a1)) + ((m_invI2 * m_a2) * m_a2)); m_motorMass = (1 / m_motorMass); m_perp.SetV(b2Math.b2MulMV(_local6.R, m_localYAxis1)); m_s1 = (((_local12 + _local8) * m_perp.y) - ((_local13 + _local9) * m_perp.x)); m_s2 = ((_local10 * m_perp.y) - (_local11 * m_perp.x)); var _local14:Number = m_invMass1; var _local15:Number = m_invMass2; var _local16:Number = m_invI1; var _local17:Number = m_invI2; m_K.col1.x = (((_local14 + _local15) + ((_local16 * m_s1) * m_s1)) + ((_local17 * m_s2) * m_s2)); m_K.col1.y = ((_local16 * m_s1) + (_local17 * m_s2)); m_K.col1.z = (((_local16 * m_s1) * m_a1) + ((_local17 * m_s2) * m_a2)); m_K.col2.x = m_K.col1.y; m_K.col2.y = (_local16 + _local17); m_K.col2.z = ((_local16 * m_a1) + (_local17 * m_a2)); m_K.col3.x = m_K.col1.z; m_K.col3.y = m_K.col2.z; m_K.col3.z = (((_local14 + _local15) + ((_local16 * m_a1) * m_a1)) + ((_local17 * m_a2) * m_a2)); if (m_enableLimit){ _local18 = ((m_axis.x * _local12) + (m_axis.y * _local13)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local18 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitState = e_atLowerLimit; m_impulse.z = 0; }; } else { if (_local18 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitState = e_atUpperLimit; m_impulse.z = 0; }; } else { m_limitState = e_inactiveLimit; m_impulse.z = 0; }; }; }; } else { m_limitState = e_inactiveLimit; }; if (m_enableMotor == false){ m_motorImpulse = 0; }; if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_motorImpulse = (m_motorImpulse * _arg1.dtRatio); _local19 = ((m_impulse.x * m_perp.x) + ((m_motorImpulse + m_impulse.z) * m_axis.x)); _local20 = ((m_impulse.x * m_perp.y) + ((m_motorImpulse + m_impulse.z) * m_axis.y)); _local21 = (((m_impulse.x * m_s1) + m_impulse.y) + ((m_motorImpulse + m_impulse.z) * m_a1)); _local22 = (((m_impulse.x * m_s2) + m_impulse.y) + ((m_motorImpulse + m_impulse.z) * m_a2)); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (m_invMass1 * _local19)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (m_invMass1 * _local20)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (m_invI1 * _local21)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (m_invMass2 * _local19)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (m_invMass2 * _local20)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (m_invI2 * _local22)); } else { m_impulse.SetZero(); m_motorImpulse = 0; }; } public function GetMotorForce():Number{ return (m_motorImpulse); } public function EnableLimit(_arg1:Boolean):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_enableLimit = _arg1; } public function SetMaxMotorForce(_arg1:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_maxMotorForce = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.y)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } } }//package Box2D.Dynamics.Joints
Section 67
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var motorSpeed:Number; public var localAxis1:b2Vec2; public var referenceAngle:Number; public var upperTranslation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public var maxMotorForce:Number; 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 68
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PulleyJoint extends b2Joint { private var m_limitState1:int; private var m_limitState2:int; private var m_ground:b2Body; private var m_maxLength2:Number; private var m_maxLength1:Number; private var m_impulse:Number; private var m_constant:Number; private var m_state:int; private var m_ratio:Number; private var m_groundAnchor1:b2Vec2; private var m_groundAnchor2:b2Vec2; private var m_localAnchor1:b2Vec2; private var m_localAnchor2:b2Vec2; private var m_limitMass1:Number; private var m_limitMass2:Number; private var m_pulleyMass:Number; private var m_limitImpulse1:Number; private var m_limitImpulse2:Number; private var m_u1:b2Vec2; private var m_u2:b2Vec2; b2internal 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_impulse = 0; m_limitImpulse1 = 0; m_limitImpulse2 = 0; } public function GetGroundAnchor2():b2Vec2{ var _local1:b2Vec2 = 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(_arg1:Number):b2Vec2{ return (new b2Vec2(((_arg1 * m_impulse) * m_u2.x), ((_arg1 * m_impulse) * m_u2.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local4:b2Mat22; 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 _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local5:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x); var _local6:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y); var _local7:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x); var _local8:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y); var _local24:Number = 0; if (m_state == e_atUpperLimit){ _local4 = _local2.m_xf.R; _local9 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local10 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local9) + (_local4.col2.x * _local10)); _local10 = ((_local4.col1.y * _local9) + (_local4.col2.y * _local10)); _local9 = _local23; _local4 = _local3.m_xf.R; _local11 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local11) + (_local4.col2.x * _local12)); _local12 = ((_local4.col1.y * _local11) + (_local4.col2.y * _local12)); _local11 = _local23; _local13 = (_local2.m_sweep.c.x + _local9); _local14 = (_local2.m_sweep.c.y + _local10); _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); m_u1.Set((_local13 - _local5), (_local14 - _local6)); m_u2.Set((_local15 - _local7), (_local16 - _local8)); _local17 = m_u1.Length(); _local18 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local17)); } else { m_u1.SetZero(); }; if (_local18 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local18)); } else { m_u2.SetZero(); }; _local19 = ((m_constant - _local17) - (m_ratio * _local18)); _local24 = b2Math.b2Max(_local24, -(_local19)); _local19 = b2Math.b2Clamp((_local19 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local20 = (-(m_pulleyMass) * _local19); _local13 = (-(_local20) * m_u1.x); _local14 = (-(_local20) * m_u1.y); _local15 = ((-(m_ratio) * _local20) * m_u2.x); _local16 = ((-(m_ratio) * _local20) * m_u2.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local13)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local14)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local9 * _local14) - (_local10 * _local13)))); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local15)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local16)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local11 * _local16) - (_local12 * _local15)))); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); }; if (m_limitState1 == e_atUpperLimit){ _local4 = _local2.m_xf.R; _local9 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local10 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local9) + (_local4.col2.x * _local10)); _local10 = ((_local4.col1.y * _local9) + (_local4.col2.y * _local10)); _local9 = _local23; _local13 = (_local2.m_sweep.c.x + _local9); _local14 = (_local2.m_sweep.c.y + _local10); m_u1.Set((_local13 - _local5), (_local14 - _local6)); _local17 = m_u1.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u1.x = (m_u1.x * (1 / _local17)); m_u1.y = (m_u1.y * (1 / _local17)); } else { m_u1.SetZero(); }; _local19 = (m_maxLength1 - _local17); _local24 = b2Math.b2Max(_local24, -(_local19)); _local19 = b2Math.b2Clamp((_local19 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local20 = (-(m_limitMass1) * _local19); _local13 = (-(_local20) * m_u1.x); _local14 = (-(_local20) * m_u1.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local13)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local14)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local9 * _local14) - (_local10 * _local13)))); _local2.SynchronizeTransform(); }; if (m_limitState2 == e_atUpperLimit){ _local4 = _local3.m_xf.R; _local11 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local23 = ((_local4.col1.x * _local11) + (_local4.col2.x * _local12)); _local12 = ((_local4.col1.y * _local11) + (_local4.col2.y * _local12)); _local11 = _local23; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); m_u2.Set((_local15 - _local7), (_local16 - _local8)); _local18 = m_u2.Length(); if (_local18 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local18)); m_u2.y = (m_u2.y * (1 / _local18)); } else { m_u2.SetZero(); }; _local19 = (m_maxLength2 - _local18); _local24 = b2Math.b2Max(_local24, -(_local19)); _local19 = b2Math.b2Clamp((_local19 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local20 = (-(m_limitMass2) * _local19); _local15 = (-(_local20) * m_u2.x); _local16 = (-(_local20) * m_u2.y); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local15)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local16)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local11 * _local16) - (_local12 * _local15)))); _local3.SynchronizeTransform(); }; return ((_local24 < b2Settings.b2_linearSlop)); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local4:b2Mat22; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local2 = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); var _local7:Number = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (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; var _local10:Number = (_local2.m_sweep.c.x + _local5); var _local11:Number = (_local2.m_sweep.c.y + _local6); var _local12:Number = (_local3.m_sweep.c.x + _local8); var _local13:Number = (_local3.m_sweep.c.y + _local9); var _local14:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x); var _local15:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y); var _local16:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x); var _local17:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y); m_u1.Set((_local10 - _local14), (_local11 - _local15)); m_u2.Set((_local12 - _local16), (_local13 - _local17)); var _local18:Number = m_u1.Length(); var _local19:Number = 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(); }; var _local20:Number = ((m_constant - _local18) - (m_ratio * _local19)); if (_local20 > 0){ m_state = e_inactiveLimit; m_impulse = 0; } else { m_state = e_atUpperLimit; }; if (_local18 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitImpulse1 = 0; } else { m_limitState1 = e_atUpperLimit; }; if (_local19 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitImpulse2 = 0; } else { m_limitState2 = e_atUpperLimit; }; var _local21:Number = ((_local5 * m_u1.y) - (_local6 * m_u1.x)); var _local22:Number = ((_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){ m_impulse = (m_impulse * _arg1.dtRatio); m_limitImpulse1 = (m_limitImpulse1 * _arg1.dtRatio); m_limitImpulse2 = (m_limitImpulse2 * _arg1.dtRatio); _local23 = ((-(m_impulse) - m_limitImpulse1) * m_u1.x); _local24 = ((-(m_impulse) - m_limitImpulse1) * m_u1.y); _local25 = (((-(m_ratio) * m_impulse) - m_limitImpulse2) * m_u2.x); _local26 = (((-(m_ratio) * m_impulse) - m_limitImpulse2) * 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_impulse = 0; m_limitImpulse1 = 0; m_limitImpulse2 = 0; }; } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Vec2 = m_body2.GetWorldPoint(m_localAnchor2); var _local2:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x); var _local3:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y); var _local4:Number = (_local1.x - _local2); var _local5:Number = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4: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 _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); var _local7:Number = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (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 = (m_pulleyMass * -(_local18)); _local20 = m_impulse; m_impulse = b2Math.b2Max(0, (m_impulse + _local19)); _local19 = (m_impulse - _local20); _local14 = (-(_local19) * m_u1.x); _local15 = (-(_local19) * m_u1.y); _local16 = ((-(m_ratio) * _local19) * m_u2.x); _local17 = ((-(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 = (-(m_limitMass1) * _local18); _local20 = m_limitImpulse1; m_limitImpulse1 = b2Math.b2Max(0, (m_limitImpulse1 + _local19)); _local19 = (m_limitImpulse1 - _local20); _local14 = (-(_local19) * m_u1.x); _local15 = (-(_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 = (-(m_limitMass2) * _local18); _local20 = m_limitImpulse2; m_limitImpulse2 = b2Math.b2Max(0, (m_limitImpulse2 + _local19)); _local19 = (m_limitImpulse2 - _local20); _local16 = (-(_local19) * m_u2.x); _local17 = (-(_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 = m_body1.GetWorldPoint(m_localAnchor1); var _local2:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x); var _local3:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y); var _local4:Number = (_local1.x - _local2); var _local5:Number = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } public function GetGroundAnchor1():b2Vec2{ var _local1:b2Vec2 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } } }//package Box2D.Dynamics.Joints
Section 69
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength1:Number; public var maxLength2:Number; public var length1:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var groundAnchor1:b2Vec2; public var groundAnchor2:b2Vec2; public var ratio:Number; public var length2:Number; 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{ body1 = _arg1; body2 = _arg2; groundAnchor1.SetV(_arg3); groundAnchor2.SetV(_arg4); localAnchor1 = body1.GetLocalPoint(_arg5); localAnchor2 = body2.GetLocalPoint(_arg6); var _local8:Number = (_arg5.x - _arg3.x); var _local9:Number = (_arg5.y - _arg3.y); length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); var _local10:Number = (_arg6.x - _arg4.x); var _local11:Number = (_arg6.y - _arg4.y); length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; var _local12:Number = (length1 + (ratio * length2)); maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 70
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { private var m_mass:b2Mat33; private var m_impulse:b2Vec3; private var m_enableLimit:Boolean; private var m_limitState:int; private var m_motorMass:Number; b2internal var m_localAnchor1:b2Vec2; b2internal var m_localAnchor2:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; private var K:b2Mat22; private var m_motorImpulse:Number; private var m_enableMotor:Boolean; private var m_referenceAngle:Number; private var m_upperAngle:Number; private var m_motorSpeed:Number; private var m_lowerAngle:Number; private var m_maxMotorTorque:Number; private 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_impulse = new b2Vec3(); m_mass = new b2Mat33(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_referenceAngle = _arg1.referenceAngle; m_impulse.SetZero(); m_motorImpulse = 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; m_limitState = e_inactiveLimit; } override b2internal function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:b2Vec3; var _local28:Number; var _local29:Number; var _local30:b2Vec2; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local12:b2Vec2 = _local2.m_linearVelocity; var _local13:Number = _local2.m_angularVelocity; var _local14:b2Vec2 = _local3.m_linearVelocity; var _local15:Number = _local3.m_angularVelocity; var _local16:Number = _local2.m_invMass; var _local17:Number = _local3.m_invMass; var _local18:Number = _local2.m_invI; var _local19:Number = _local3.m_invI; if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local20 = ((_local15 - _local13) - m_motorSpeed); _local21 = (m_motorMass * -(_local20)); _local22 = m_motorImpulse; _local23 = (_arg1.dt * m_maxMotorTorque); m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local21), -(_local23), _local23); _local21 = (m_motorImpulse - _local22); _local13 = (_local13 - (_local18 * _local21)); _local15 = (_local15 + (_local19 * _local21)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local4 = _local2.m_xf.R; _local8 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local4 = _local3.m_xf.R; _local10 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local10) + (_local4.col2.x * _local11)); _local11 = ((_local4.col1.y * _local10) + (_local4.col2.y * _local11)); _local10 = _local5; _local24 = (((_local14.x + (-(_local15) * _local11)) - _local12.x) - (-(_local13) * _local9)); _local25 = (((_local14.y + (_local15 * _local10)) - _local12.y) - (_local13 * _local8)); _local26 = (_local15 - _local13); _local27 = m_mass.Solve33(new b2Vec3(), -(_local24), -(_local25), -(_local26)); if (m_limitState == e_equalLimits){ m_impulse.Add(_local27); } else { if (m_limitState == e_atLowerLimit){ _local6 = (m_impulse.z + _local27.z); if (_local6 < 0){ _local7 = m_mass.Solve22(new b2Vec2(), -(_local24), -(_local25)); _local27.x = _local7.x; _local27.y = _local7.y; _local27.z = -(m_impulse.z); m_impulse.x = (m_impulse.x + _local7.x); m_impulse.y = (m_impulse.y + _local7.y); m_impulse.z = 0; }; } else { if (m_limitState == e_atUpperLimit){ _local6 = (m_impulse.z + _local27.z); if (_local6 > 0){ _local7 = m_mass.Solve22(new b2Vec2(), -(_local24), -(_local25)); _local27.x = _local7.x; _local27.y = _local7.y; _local27.z = -(m_impulse.z); m_impulse.x = (m_impulse.x + _local7.x); m_impulse.y = (m_impulse.y + _local7.y); m_impulse.z = 0; }; }; }; }; _local12.x = (_local12.x - (_local16 * _local27.x)); _local12.y = (_local12.y - (_local16 * _local27.y)); _local13 = (_local13 - (_local18 * (((_local8 * _local27.y) - (_local9 * _local27.x)) + _local27.z))); _local14.x = (_local14.x + (_local17 * _local27.x)); _local14.y = (_local14.y + (_local17 * _local27.y)); _local15 = (_local15 + (_local19 * (((_local10 * _local27.y) - (_local11 * _local27.x)) + _local27.z))); } else { _local4 = _local2.m_xf.R; _local8 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local4 = _local3.m_xf.R; _local10 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local10) + (_local4.col2.x * _local11)); _local11 = ((_local4.col1.y * _local10) + (_local4.col2.y * _local11)); _local10 = _local5; _local28 = (((_local14.x + (-(_local15) * _local11)) - _local12.x) - (-(_local13) * _local9)); _local29 = (((_local14.y + (_local15 * _local10)) - _local12.y) - (_local13 * _local8)); _local30 = m_mass.Solve22(new b2Vec2(), -(_local28), -(_local29)); m_impulse.x = (m_impulse.x + _local30.x); m_impulse.y = (m_impulse.y + _local30.y); _local12.x = (_local12.x - (_local16 * _local30.x)); _local12.y = (_local12.y - (_local16 * _local30.y)); _local13 = (_local13 - (_local18 * ((_local8 * _local30.y) - (_local9 * _local30.x)))); _local14.x = (_local14.x + (_local17 * _local30.x)); _local14.y = (_local14.y + (_local17 * _local30.y)); _local15 = (_local15 + (_local19 * ((_local10 * _local30.y) - (_local11 * _local30.x)))); }; _local2.m_linearVelocity.SetV(_local12); _local2.m_angularVelocity = _local13; _local3.m_linearVelocity.SetV(_local14); _local3.m_angularVelocity = _local15; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function GetUpperLimit():Number{ return (m_upperAngle); } public function GetLowerLimit():Number{ return (m_lowerAngle); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2((_arg1 * m_impulse.x), (_arg1 * m_impulse.y))); } override b2internal function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:Number; var _local4:b2Mat22; var _local9:Number; var _local10:Number; var _local11:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local5:b2Body = m_body1; var _local6:b2Body = m_body2; var _local7:Number = 0; var _local8:Number = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local25 = ((_local6.m_sweep.a - _local5.m_sweep.a) - m_referenceAngle); _local26 = 0; if (m_limitState == e_equalLimits){ _local3 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local3); _local7 = b2Math.b2Abs(_local3); } else { if (m_limitState == e_atLowerLimit){ _local3 = (_local25 - m_lowerAngle); _local7 = -(_local3); _local3 = b2Math.b2Clamp((_local3 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local26 = (-(m_motorMass) * _local3); } else { if (m_limitState == e_atUpperLimit){ _local3 = (_local25 - m_upperAngle); _local7 = _local3; _local3 = b2Math.b2Clamp((_local3 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local3); }; }; }; _local5.m_sweep.a = (_local5.m_sweep.a - (_local5.m_invI * _local26)); _local6.m_sweep.a = (_local6.m_sweep.a + (_local6.m_invI * _local26)); _local5.SynchronizeTransform(); _local6.SynchronizeTransform(); }; _local4 = _local5.m_xf.R; var _local12:Number = (m_localAnchor1.x - _local5.m_sweep.localCenter.x); var _local13:Number = (m_localAnchor1.y - _local5.m_sweep.localCenter.y); _local9 = ((_local4.col1.x * _local12) + (_local4.col2.x * _local13)); _local13 = ((_local4.col1.y * _local12) + (_local4.col2.y * _local13)); _local12 = _local9; _local4 = _local6.m_xf.R; var _local14:Number = (m_localAnchor2.x - _local6.m_sweep.localCenter.x); var _local15:Number = (m_localAnchor2.y - _local6.m_sweep.localCenter.y); _local9 = ((_local4.col1.x * _local14) + (_local4.col2.x * _local15)); _local15 = ((_local4.col1.y * _local14) + (_local4.col2.y * _local15)); _local14 = _local9; var _local16:Number = (((_local6.m_sweep.c.x + _local14) - _local5.m_sweep.c.x) - _local12); var _local17:Number = (((_local6.m_sweep.c.y + _local15) - _local5.m_sweep.c.y) - _local13); var _local18:Number = ((_local16 * _local16) + (_local17 * _local17)); var _local19:Number = Math.sqrt(_local18); _local8 = _local19; var _local20:Number = _local5.m_invMass; var _local21:Number = _local6.m_invMass; var _local22:Number = _local5.m_invI; var _local23:Number = _local6.m_invI; var _local24:Number = (10 * b2Settings.b2_linearSlop); if (_local18 > (_local24 * _local24)){ _local27 = (_local16 / _local19); _local28 = (_local17 / _local19); _local29 = (_local20 + _local21); _local30 = (1 / _local29); _local10 = (_local30 * -(_local16)); _local11 = (_local30 * -(_local17)); _local31 = 0.5; _local5.m_sweep.c.x = (_local5.m_sweep.c.x - ((_local31 * _local20) * _local10)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y - ((_local31 * _local20) * _local11)); _local6.m_sweep.c.x = (_local6.m_sweep.c.x + ((_local31 * _local21) * _local10)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + ((_local31 * _local21) * _local11)); _local16 = (((_local6.m_sweep.c.x + _local14) - _local5.m_sweep.c.x) - _local12); _local17 = (((_local6.m_sweep.c.y + _local15) - _local5.m_sweep.c.y) - _local13); }; K1.col1.x = (_local20 + _local21); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local20 + _local21); K2.col1.x = ((_local22 * _local13) * _local13); K2.col2.x = ((-(_local22) * _local12) * _local13); K2.col1.y = ((-(_local22) * _local12) * _local13); K2.col2.y = ((_local22 * _local12) * _local12); K3.col1.x = ((_local23 * _local15) * _local15); K3.col2.x = ((-(_local23) * _local14) * _local15); K3.col1.y = ((-(_local23) * _local14) * _local15); K3.col2.y = ((_local23 * _local14) * _local14); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local16), -(_local17)); _local10 = tImpulse.x; _local11 = tImpulse.y; _local5.m_sweep.c.x = (_local5.m_sweep.c.x - (_local5.m_invMass * _local10)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y - (_local5.m_invMass * _local11)); _local5.m_sweep.a = (_local5.m_sweep.a - (_local5.m_invI * ((_local12 * _local11) - (_local13 * _local10)))); _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_local6.m_invMass * _local10)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_local6.m_invMass * _local11)); _local6.m_sweep.a = (_local6.m_sweep.a + (_local6.m_invI * ((_local14 * _local11) - (_local15 * _local10)))); _local5.SynchronizeTransform(); _local6.SynchronizeTransform(); return ((((_local8 <= b2Settings.b2_linearSlop)) && ((_local7 <= b2Settings.b2_angularSlop)))); } public function SetMotorSpeed(_arg1:Number):void{ m_body1.WakeUp(); m_body2.WakeUp(); m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } 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)); } public function GetMotorTorque():Number{ return (m_maxMotorTorque); } override b2internal function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local2 = m_body1; _local3 = m_body2; if (((m_enableMotor) || (m_enableLimit))){ }; _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; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (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; var _local10:Number = _local2.m_invMass; var _local11:Number = _local3.m_invMass; var _local12:Number = _local2.m_invI; var _local13:Number = _local3.m_invI; m_mass.col1.x = (((_local10 + _local11) + ((_local7 * _local7) * _local12)) + ((_local9 * _local9) * _local13)); m_mass.col2.x = (((-(_local7) * _local6) * _local12) - ((_local9 * _local8) * _local13)); m_mass.col3.x = ((-(_local7) * _local12) - (_local9 * _local13)); m_mass.col1.y = m_mass.col2.x; m_mass.col2.y = (((_local10 + _local11) + ((_local6 * _local6) * _local12)) + ((_local8 * _local8) * _local13)); m_mass.col3.y = ((_local6 * _local12) + (_local8 * _local13)); m_mass.col1.z = m_mass.col3.x; m_mass.col2.z = m_mass.col3.y; m_mass.col3.z = (_local12 + _local13); m_motorMass = (1 / (_local12 + _local13)); if (m_enableMotor == false){ m_motorImpulse = 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_impulse.z = 0; }; m_limitState = e_atLowerLimit; } else { if (_local14 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_impulse.z = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_impulse.z = 0; }; }; }; } else { m_limitState = e_inactiveLimit; }; if (_arg1.warmStarting){ m_impulse.x = (m_impulse.x * _arg1.dtRatio); m_impulse.y = (m_impulse.y * _arg1.dtRatio); m_motorImpulse = (m_motorImpulse * _arg1.dtRatio); _local15 = m_impulse.x; _local16 = m_impulse.y; _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local10 * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local10 * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local12 * ((((_local6 * _local16) - (_local7 * _local15)) + m_motorImpulse) + m_impulse.z))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * ((((_local8 * _local16) - (_local9 * _local15)) + m_motorImpulse) + m_impulse.z))); } else { m_impulse.SetZero(); m_motorImpulse = 0; }; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } override public function GetReactionTorque(_arg1:Number):Number{ return ((_arg1 * m_impulse.z)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ m_body1.WakeUp(); m_body2.WakeUp(); return (m_enableMotor); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } } }//package Box2D.Dynamics.Joints
Section 71
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var upperAngle:Number; public var enableMotor:Boolean; public var referenceAngle:Number; public var motorSpeed:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var lowerAngle:Number; public var maxMotorTorque:Number; 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 72
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Body { b2internal var m_sleepTime:Number; b2internal var m_next:b2Body; b2internal var m_angularVelocity:Number; b2internal var m_xf:b2XForm; b2internal var m_contactList:b2ContactEdge; b2internal var m_shapeList:b2Shape; b2internal var m_force:b2Vec2; b2internal var m_mass:Number; b2internal var m_sweep:b2Sweep; private var m_userData; b2internal var m_torque:Number; b2internal var m_flags:uint; b2internal var m_world:b2World; b2internal var m_linearVelocity:b2Vec2; b2internal var m_prev:b2Body; b2internal var m_invMass:Number; private var m_type:int; b2internal var m_angularDamping:Number; b2internal var m_linearDamping:Number; b2internal var m_invI:Number; b2internal var m_islandIndex:int; b2internal var m_shapeCount:int; b2internal var m_jointList:b2JointEdge; b2internal var m_I:Number; b2internal static var e_fixedRotationFlag:uint = 64; b2internal static var e_frozenFlag:uint = 2; b2internal static var e_maxTypes:uint = 3; b2internal static var e_sleepFlag:uint = 8; private static var s_massData:b2MassData = new b2MassData(); b2internal static var e_bulletFlag:uint = 32; b2internal static var e_staticType:uint = 1; b2internal static var e_islandFlag:uint = 4; b2internal static var e_allowSleepFlag:uint = 16; private static var s_xf1:b2XForm = new b2XForm(); b2internal static var e_dynamicType:uint = 2; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ 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); var _local3:b2Mat22 = m_xf.R; var _local4:b2Vec2 = 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.y + (m_angularVelocity * (_arg1.x - m_sweep.c.x))))); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22 = m_xf.R; var _local3:b2Vec2 = 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 SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } public function GetLinearDamping():Number{ return (m_linearDamping); } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } private function connectEdges(_arg1:b2EdgeShape, _arg2:b2EdgeShape, _arg3:Number):Number{ var _local4:Number = Math.atan2(_arg2.GetDirectionVector().y, _arg2.GetDirectionVector().x); var _local5:Number = Math.tan(((_local4 - _arg3) * 0.5)); var _local6:b2Vec2 = b2Math.MulFV(_local5, _arg2.GetDirectionVector()); _local6 = b2Math.SubtractVV(_local6, _arg2.GetNormalVector()); _local6 = b2Math.MulFV(b2Settings.b2_toiSlop, _local6); _local6 = b2Math.AddVV(_local6, _arg2.GetVertex1()); var _local7:b2Vec2 = b2Math.AddVV(_arg1.GetDirectionVector(), _arg2.GetDirectionVector()); _local7.Normalize(); var _local8 = (b2Math.b2Dot(_arg1.GetDirectionVector(), _arg2.GetNormalVector()) > 0); _arg1.SetNextEdge(_arg2, _local6, _local7, _local8); _arg2.SetPrevEdge(_arg1, _local6, _local7, _local8); return (_local4); } 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 GetAngularDamping():Number{ return (m_angularDamping); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function SetAngularDamping(_arg1:Number):void{ m_angularDamping = _arg1; } b2internal function SynchronizeTransform():void{ m_xf.R.Set(m_sweep.a); var _local1:b2Mat22 = m_xf.R; var _local2:b2Vec2 = 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 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 SetMassFromShapes():void{ var _local1:b2Shape; if (m_world.m_lock == true){ return; }; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; var _local2:Number = 0; var _local3:Number = 0; var _local4:b2MassData = 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); var _local5:b2Mat22 = m_xf.R; var _local6:b2Vec2 = 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; }; var _local7:int = 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 SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{ var _local3:b2Shape; 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); var _local4:b2Mat22 = m_xf.R; var _local5:b2Vec2 = 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); var _local6:Boolean; _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 SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } b2internal function SynchronizeShapes():Boolean{ var _local4:b2Shape; var _local1:b2XForm = s_xf1; _local1.R.Set(m_sweep.a0); var _local2:b2Mat22 = _local1.R; var _local3:b2Vec2 = 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))); var _local5:Boolean; _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 GetAngularVelocity():Number{ return (m_angularVelocity); } public function GetMass():Number{ return (m_mass); } 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 GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22 = m_xf.R; var _local3:b2Vec2 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (new b2Vec2((m_linearVelocity.x - (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.y + (m_angularVelocity * (_local3.x - m_sweep.c.x))))); } public function GetNext():b2Body{ return (m_next); } public function SetMass(_arg1:b2MassData):void{ var _local2:b2Shape; 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); var _local3:b2Mat22 = m_xf.R; var _local4:b2Vec2 = 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; }; var _local5:int = 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 SetStatic():void{ if (m_type == e_staticType){ return; }; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; m_type = e_staticType; var _local1:b2Shape = m_shapeList; while (_local1) { _local1.RefilterProxy(m_world.m_broadPhase, m_xf); _local1 = _local1.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); } b2internal 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 _local3:b2EdgeChainDef; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:int; var _local7:b2EdgeShape; var _local8:b2EdgeShape; var _local9:b2EdgeShape; var _local10:Number; if (m_world.m_lock == true){ return (null); }; if (_arg1.type == b2Shape.e_edgeShape){ _local3 = (_arg1 as b2EdgeChainDef); if (_local3.isALoop){ _local4 = _local3.vertices[(_local3.vertexCount - 1)]; _local6 = 0; } else { _local4 = _local3.vertices[0]; _local6 = 1; }; _local7 = null; _local8 = null; _local9 = null; _local10 = 0; while (_local6 < _local3.vertexCount) { _local5 = _local3.vertices[_local6]; _local9 = new b2EdgeShape(_local4, _local5, _arg1); _local9.m_next = m_shapeList; m_shapeList = _local9; m_shapeCount++; _local9.m_body = this; _local9.CreateProxy(m_world.m_broadPhase, m_xf); _local9.UpdateSweepRadius(m_sweep.localCenter); if (_local8 == null){ _local7 = _local9; _local10 = Math.atan2(_local9.GetDirectionVector().y, _local9.GetDirectionVector().x); } else { _local10 = connectEdges(_local8, _local9, _local10); }; _local8 = _local9; _local4 = _local5; _local6++; }; if (_local3.isALoop){ connectEdges(_local8, _local7, _local10); }; return (_local7); }; var _local2:b2Shape = 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); } b2internal function IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointEdge = 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{ if (m_world.m_lock == true){ return; }; _arg1.DestroyProxy(m_world.m_broadPhase); var _local2:b2Shape = m_shapeList; var _local3:b2Shape; var _local4:Boolean; 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 IsFixedRotation():Boolean{ return (((m_flags & e_fixedRotationFlag) == e_fixedRotationFlag)); } public function IsAllowSleeping():Boolean{ return (((m_flags & e_allowSleepFlag) == e_allowSleepFlag)); } public function GetUserData(){ return (m_userData); } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function SetFixedRotation(_arg1:Boolean):void{ if (_arg1){ m_angularVelocity = 0; m_invI = 0; m_flags = (m_flags | e_fixedRotationFlag); } else { if (m_I > 0){ m_invI = (1 / m_I); m_flags = (m_flags & e_fixedRotationFlag); }; }; } 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 SetLinearDamping(_arg1:Number):void{ m_linearDamping = _arg1; } public function GetWorld():b2World{ return (m_world); } public function GetPosition():b2Vec2{ return (m_xf.position); } } }//package Box2D.Dynamics
Section 73
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class b2BodyDef { public var angularDamping:Number; public var angle:Number; public var isSleeping:Boolean; public var position:b2Vec2; public var isBullet:Boolean; public var allowSleep:Boolean; public var userData; public var fixedRotation:Boolean; 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 74
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 75
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2ContactFilter { b2internal static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData = _arg1.GetFilterData(); var _local4:b2FilterData = _arg2.GetFilterData(); if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){ return ((_local3.groupIndex > 0)); }; var _local5:Boolean = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } public function RayCollide(_arg1, _arg2:b2Shape):Boolean{ if (!_arg1){ return (true); }; return (ShouldCollide((_arg1 as b2Shape), _arg2)); } } }//package Box2D.Dynamics
Section 76
//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 77
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2ContactManager extends b2PairCallback { b2internal var m_world:b2World; private var m_destroyImmediate:Boolean; private 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 PairRemoved(_arg1, _arg2, _arg3):void{ if (_arg3 == null){ return; }; var _local4:b2Contact = (_arg3 as b2Contact); if (_local4 == m_nullContact){ return; }; Destroy(_local4); } public function Destroy(_arg1:b2Contact):void{ var _local8:Array; var _local9:int; var _local10:b2Manifold; var _local11:int; var _local12:b2ManifoldPoint; var _local13:b2Vec2; var _local14:b2Vec2; var _local2:b2Shape = _arg1.m_shape1; var _local3:b2Shape = _arg1.m_shape2; var _local4:b2Body = _local2.m_body; var _local5:b2Body = _local3.m_body; var _local6:b2ContactPoint = s_evalCP; _local6.shape1 = _arg1.m_shape1; _local6.shape2 = _arg1.m_shape2; _local6.friction = b2Settings.b2MixFriction(_local2.GetFriction(), _local3.GetFriction()); _local6.restitution = b2Settings.b2MixRestitution(_local2.GetRestitution(), _local3.GetRestitution()); var _local7:int = _arg1.m_manifoldCount; if ((((_local7 > 0)) && (m_world.m_contactListener))){ _local8 = _arg1.GetManifolds(); _local9 = 0; while (_local9 < _local7) { _local10 = _local8[_local9]; _local6.normal.SetV(_local10.normal); _local11 = 0; while (_local11 < _local10.pointCount) { _local12 = _local10.points[_local11]; _local6.position = _local4.GetWorldPoint(_local12.localPoint1); _local13 = _local4.GetLinearVelocityFromLocalPoint(_local12.localPoint1); _local14 = _local5.GetLinearVelocityFromLocalPoint(_local12.localPoint2); _local6.velocity.Set((_local14.x - _local13.x), (_local14.y - _local13.y)); _local6.separation = _local12.separation; _local6.id.key = _local12.id._key; m_world.m_contactListener.Remove(_local6); _local11++; }; _local9++; }; }; 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; }; 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 == _local4.m_contactList){ _local4.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 == _local5.m_contactList){ _local5.m_contactList = _arg1.m_node2.next; }; b2Contact.Destroy(_arg1, m_world.m_blockAllocator); m_world.m_contactCount--; } override public function PairAdded(_arg1, _arg2){ var _local3:b2Shape = (_arg1 as b2Shape); var _local4:b2Shape = (_arg2 as b2Shape); var _local5:b2Body = _local3.m_body; var _local6:b2Body = _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); }; var _local7:b2Contact = 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); } public function Collide():void{ var _local2:b2Body; var _local3:b2Body; var _local1:b2Contact = 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 78
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import flash.display.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2DebugDraw { private var m_xformScale:Number;// = 1 private var m_fillAlpha:Number;// = 1 private var m_alpha:Number;// = 1 private var m_lineThickness:Number;// = 1 private var m_drawFlags:uint; b2internal var m_sprite:Sprite; private 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_drawFlags = 0; } public function SetDrawScale(_arg1:Number):void{ m_drawScale = _arg1; } public function GetFillAlpha():Number{ return (m_fillAlpha); } public function GetAlpha():Number{ return (m_alpha); } public function GetLineThickness():Number{ return (m_lineThickness); } public function GetDrawScale():Number{ return (m_drawScale); } public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ 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); var _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 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 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 GetSprite():Sprite{ return (m_sprite); } public function GetXFormScale():Number{ return (m_xformScale); } public function SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } public function SetSprite(_arg1:Sprite):void{ m_sprite = _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 SetXFormScale(_arg1:Number):void{ m_xformScale = _arg1; } public function GetFlags():uint{ return (m_drawFlags); } public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); var _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)); } public function SetFillAlpha(_arg1:Number):void{ m_fillAlpha = _arg1; } public function SetAlpha(_arg1:Number):void{ m_alpha = _arg1; } public function SetLineThickness(_arg1:Number):void{ m_lineThickness = _arg1; } } }//package Box2D.Dynamics
Section 79
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; public class b2DestructionListener { public function SayGoodbyeShape(_arg1:b2Shape):void{ } public function SayGoodbyeJoint(_arg1:b2Joint):void{ } } }//package Box2D.Dynamics
Section 80
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Island { private var m_listener:b2ContactListener; private var m_bodyCapacity:int; b2internal var m_bodies:Array; b2internal var m_joints:Array; b2internal var m_jointCapacity:int; b2internal var m_contactCount:int; b2internal var m_contacts:Array; b2internal var m_contactCapacity:int; b2internal var m_jointCount:int; private var m_allocator; b2internal 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++; }; } public function AddBody(_arg1:b2Body):void{ _arg1.m_islandIndex = m_bodyCount; 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 _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; }; var _local4:int; 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 AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean):void{ var _local4:int; var _local5:int; var _local6:b2Body; var _local7:b2Joint; var _local9:Boolean; var _local10:Boolean; var _local11:Boolean; var _local12:Number; var _local13:Number; var _local14:Number; _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; 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; }; }; }; _local4++; }; var _local8:b2ContactSolver = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local8.InitVelocityConstraints(_arg1); _local4 = 0; while (_local4 < m_jointCount) { _local7 = m_joints[_local4]; _local7.InitVelocityConstraints(_arg1); _local4++; }; _local4 = 0; while (_local4 < _arg1.velocityIterations) { _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.SolveVelocityConstraints(_arg1); _local5++; }; _local8.SolveVelocityConstraints(); _local4++; }; _local8.FinalizeVelocityConstraints(); _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; 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(); }; _local4++; }; _local4 = 0; while (_local4 < _arg1.positionIterations) { _local9 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local10 = true; _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local11 = _local7.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local10 = ((_local10) && (_local11)); _local5++; }; if (((_local9) && (_local10))){ break; }; _local4++; }; Report(_local8.m_constraints); if (_arg3){ _local12 = Number.MAX_VALUE; _local13 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local14 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; if (_local6.m_invMass == 0){ } else { if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){ _local6.m_sleepTime = 0; _local12 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local14)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local13)))){ _local6.m_sleepTime = 0; _local12 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local12 = b2Math.b2Min(_local12, _local6.m_sleepTime); }; }; _local4++; }; if (_local12 >= b2Settings.b2_timeToSleep){ _local4 = 0; while (_local4 < m_bodyCount) { _local6 = m_bodies[_local4]; m_bodies[_local4].m_flags = (_local6.m_flags | b2Body.e_sleepFlag); _local6.m_linearVelocity.SetZero(); _local6.m_angularVelocity = 0; _local4++; }; }; }; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:int; var _local3:int; var _local6:b2Body; var _local7:Boolean; var _local8:Boolean; var _local9:Boolean; var _local4:b2ContactSolver = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _arg1.warmStarting = true; _local2 = 0; while (_local2 < m_jointCount) { m_joints[_local2].InitVelocityConstraints(_arg1); _local2++; }; _local2 = 0; while (_local2 < _arg1.velocityIterations) { _local4.SolveVelocityConstraints(); _local3 = 0; while (_local3 < m_jointCount) { m_joints[_local3].InitVelocityConstraints(_arg1); _local3++; }; _local2++; }; _local2 = 0; while (_local2 < m_bodyCount) { _local6 = m_bodies[_local2]; 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(); }; _local2++; }; var _local5:Number = 0.75; _local2 = 0; while (_local2 < _arg1.positionIterations) { _local7 = _local4.SolvePositionConstraints(_local5); _local8 = true; _local3 = 0; while (_local3 < m_jointCount) { _local9 = m_joints[_local3].SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local8 = ((_local8) && (_local9)); _local3++; }; if (((_local7) && (_local8))){ break; }; _local2++; }; Report(_local4.m_constraints); } } }//package Box2D.Dynamics
Section 81
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var warmStarting:Boolean; public var inv_dt:Number; public var dt:Number; public var velocityIterations:int; public var dtRatio:Number; public var positionIterations:int; } }//package Box2D.Dynamics
Section 82
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2World { private var m_inv_dt0:Number; private var m_boundaryListener:b2BoundaryListener; b2internal var m_contactList:b2Contact; b2internal var m_blockAllocator; b2internal var m_contactListener:b2ContactListener; b2internal var m_raycastSegment:b2Segment; b2internal var m_broadPhase:b2BroadPhase; private var m_destructionListener:b2DestructionListener; private var m_jointCount:int; b2internal var m_lock:Boolean; private var m_bodyCount:int; b2internal var m_raycastUserData; private var m_allowSleep:Boolean; b2internal var m_groundBody:b2Body; b2internal var m_contactCount:int; b2internal var m_raycastNormal:b2Vec2; b2internal var m_contactFilter:b2ContactFilter; b2internal var m_bodyList:b2Body; private var m_debugDraw:b2DebugDraw; b2internal var m_stackAllocator; private var m_jointList:b2Joint; private var m_gravity:b2Vec2; private var m_contactManager:b2ContactManager; private static var s_xf:b2XForm = new b2XForm(); private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); private static var m_continuousPhysics:Boolean; private static var m_warmStarting:Boolean; private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6); public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ m_raycastNormal = new b2Vec2(); 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_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); var _local4:b2BodyDef = new b2BodyDef(); m_groundBody = CreateBody(_local4); } b2internal function DrawJoint(_arg1:b2Joint):void{ var _local11:b2PulleyJoint; var _local12:b2Vec2; var _local13:b2Vec2; var _local2:b2Body = _arg1.m_body1; var _local3:b2Body = _arg1.m_body2; var _local4:b2XForm = _local2.m_xf; var _local5:b2XForm = _local3.m_xf; var _local6:b2Vec2 = _local4.position; var _local7:b2Vec2 = _local5.position; var _local8:b2Vec2 = _arg1.GetAnchor1(); var _local9:b2Vec2 = _arg1.GetAnchor2(); var _local10:b2Color = 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); } b2internal function DrawDebugData():void{ var _local2:int; var _local3:b2Body; var _local4:b2Shape; var _local5:b2Joint; var _local6:b2BroadPhase; var _local11:b2XForm; var _local15:Boolean; var _local16:b2Pair; var _local17:b2Proxy; var _local18:b2Proxy; var _local19:b2Vec2; var _local20:b2Vec2; var _local21:b2Proxy; var _local22:b2PolygonShape; var _local23:b2OBB; var _local24:b2Vec2; var _local25:b2Mat22; var _local26:b2Vec2; var _local27:Number; if (m_debugDraw == null){ return; }; m_debugDraw.m_sprite.graphics.clear(); var _local1:uint = m_debugDraw.GetFlags(); var _local7:b2Vec2 = new b2Vec2(); var _local8:b2Vec2 = new b2Vec2(); var _local9:b2Vec2 = new b2Vec2(); var _local10:b2Color = new b2Color(0, 0, 0); var _local12:b2AABB = new b2AABB(); var _local13:b2AABB = new b2AABB(); var _local14:Array = [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); for each (_local16 in _local6.m_pairManager.m_pairs) { _local17 = _local16.proxy1; _local18 = _local16.proxy2; if (((!(_local17)) || (!(_local18)))){ } else { _local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local17.lowerBounds[0]].value)); _local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local17.lowerBounds[1]].value)); _local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local17.upperBounds[0]].value)); _local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local17.upperBounds[1]].value)); _local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value)); _local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value)); _local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value)); _local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.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); }; }; }; if ((_local1 & b2DebugDraw.e_aabbBit)){ _local6 = m_broadPhase; _local19 = _local6.m_worldAABB.lowerBound; _local20 = _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 < _local6.m_proxyPool.length) { _local21 = _local6.m_proxyPool[_local2]; if (_local21.IsValid() == false){ } else { _local12.lowerBound.x = (_local19.x + (_local7.x * _local6.m_bounds[0][_local21.lowerBounds[0]].value)); _local12.lowerBound.y = (_local19.y + (_local7.y * _local6.m_bounds[1][_local21.lowerBounds[1]].value)); _local12.upperBound.x = (_local19.x + (_local7.x * _local6.m_bounds[0][_local21.upperBounds[0]].value)); _local12.upperBound.y = (_local19.y + (_local7.y * _local6.m_bounds[1][_local21.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(_local19.x, _local19.y); _local14[1].Set(_local20.x, _local19.y); _local14[2].Set(_local20.x, _local20.y); _local14[3].Set(_local19.x, _local20.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 { _local22 = (_local4 as b2PolygonShape); _local23 = _local22.GetOBB(); _local24 = _local23.extents; _local14[0].Set(-(_local24.x), -(_local24.y)); _local14[1].Set(_local24.x, -(_local24.y)); _local14[2].Set(_local24.x, _local24.y); _local14[3].Set(-(_local24.x), _local24.y); _local2 = 0; while (_local2 < 4) { _local25 = _local23.R; _local26 = _local14[_local2]; _local27 = (_local23.center.x + ((_local25.col1.x * _local26.x) + (_local25.col2.x * _local26.y))); _local14[_local2].y = (_local23.center.y + ((_local25.col1.y * _local26.x) + (_local25.col2.y * _local26.y))); _local14[_local2].x = _local27; _local25 = _local11.R; _local27 = (_local11.position.x + ((_local25.col1.x * _local26.x) + (_local25.col2.x * _local26.y))); _local14[_local2].y = (_local11.position.y + ((_local25.col1.y * _local26.x) + (_local25.col2.y * _local26.y))); _local14[_local2].x = _local27; _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 _local4:b2JointEdge; var _local5:b2Shape; if (m_lock == true){ return; }; var _local2:b2JointEdge = _arg1.m_jointList; while (_local2) { _local4 = _local2; _local2 = _local2.next; if (m_destructionListener){ m_destructionListener.SayGoodbyeJoint(_local4.joint); }; DestroyJoint(_local4.joint); }; var _local3:b2Shape = _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--; } b2internal function DrawShape(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{ 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; var _local16:b2EdgeShape; var _local5:b2Color = 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; case b2Shape.e_edgeShape: _local16 = (_arg1 as b2EdgeShape); m_debugDraw.DrawSegment(b2Math.b2MulX(_arg2, _local16.GetVertex1()), b2Math.b2MulX(_arg2, _local16.GetVertex2()), _arg3); if (_arg4){ m_debugDraw.DrawSegment(b2Math.b2MulX(_arg2, _local16.GetCoreVertex1()), b2Math.b2MulX(_arg2, _local16.GetCoreVertex2()), _local5); }; break; }; } public function GetGroundBody():b2Body{ return (m_groundBody); } public function SetContactFilter(_arg1:b2ContactFilter):void{ m_contactFilter = _arg1; } b2internal function Solve(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local9:int; var _local10:int; var _local11:b2Body; var _local12:b2ContactEdge; var _local13:b2JointEdge; var _local14:Boolean; var _local3:b2Island = 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; }; var _local4:b2Contact = m_contactList; while (_local4) { _local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag)); _local4 = _local4.m_next; }; var _local5:b2Joint = m_jointList; while (_local5) { _local5.m_islandFlag = false; _local5 = _local5.m_next; }; var _local6:int = m_bodyCount; var _local7:Array = new Array(_local6); var _local8:b2Body = 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_allowSleep); _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 = new Array(_arg3); var _local5:int = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); var _local6:int; while (_local6 < _local5) { _arg2[_local6] = _local4[_local6]; _local6++; }; return (_local5); } public function GetContactCount():int{ return (m_contactCount); } b2internal 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:b2Joint; var _local12:b2Contact; var _local13:b2Contact; var _local14:Number; var _local15:b2Body; var _local16:int; var _local17:int; var _local18:b2JointEdge; var _local19:b2TimeStep; var _local20:int; var _local21:Number; var _local22:Number; var _local23:b2Body; var _local24:Boolean; var _local9:b2Island = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, b2Settings.b2_maxTOIJointsPerIsland, m_stackAllocator, m_contactListener); var _local10:int = m_bodyCount; var _local11:Array = new Array(_local10); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2.m_sweep.t0 = 0; _local2 = _local2.m_next; }; _local12 = m_contactList; while (_local12) { _local12.m_flags = (_local12.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local12 = _local12.m_next; }; _local8 = m_jointList; while (_local8) { _local8.m_islandFlag = false; _local8 = _local8.m_next; }; while (true) { _local13 = null; _local14 = 1; _local12 = m_contactList; for (;_local12;(_local12 = _local12.m_next)) { if ((_local12.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){ } else { _local21 = 1; if ((_local12.m_flags & b2Contact.e_toiFlag)){ _local21 = _local12.m_toi; } else { _local3 = _local12.m_shape1; _local4 = _local12.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){ continue; }; _local22 = _local5.m_sweep.t0; if (_local5.m_sweep.t0 < _local6.m_sweep.t0){ _local22 = _local6.m_sweep.t0; _local5.m_sweep.Advance(_local22); } else { if (_local6.m_sweep.t0 < _local5.m_sweep.t0){ _local22 = _local5.m_sweep.t0; _local6.m_sweep.Advance(_local22); }; }; _local21 = b2TimeOfImpact.TimeOfImpact(_local12.m_shape1, _local5.m_sweep, _local12.m_shape2, _local6.m_sweep); if ((((_local21 > 0)) && ((_local21 < 1)))){ _local21 = (((1 - _local21) * _local22) + _local21); if (_local21 > 1){ _local21 = 1; }; }; _local12.m_toi = _local21; _local12.m_flags = (_local12.m_flags | b2Contact.e_toiFlag); }; if ((((Number.MIN_VALUE < _local21)) && ((_local21 < _local14)))){ _local13 = _local12; _local14 = _local21; }; }; }; if ((((_local13 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local14)))){ break; }; _local3 = _local13.m_shape1; _local4 = _local13.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local5.Advance(_local14); _local6.Advance(_local14); _local13.Update(m_contactListener); _local13.m_flags = (_local13.m_flags & ~(b2Contact.e_toiFlag)); if (_local13.m_manifoldCount == 0){ } else { _local15 = _local5; if (_local15.IsStatic()){ _local15 = _local6; }; _local9.Clear(); _local16 = 0; _local17 = 0; var _temp1 = _local17; _local17 = (_local17 + 1); _local11[(_local16 + _temp1)] = _local15; _local15.m_flags = (_local15.m_flags | b2Body.e_islandFlag); while (_local17 > 0) { var _temp2 = _local16; _local16 = (_local16 + 1); _local2 = _local11[_temp2]; _local17--; _local9.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local7 = _local2.m_contactList; while (_local7) { if (_local9.m_contactCount == _local9.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 { _local9.AddContact(_local7.contact); _local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag); _local23 = _local7.other; if ((_local23.m_flags & b2Body.e_islandFlag)){ } else { if (_local23.IsStatic() == false){ _local23.Advance(_local14); _local23.WakeUp(); }; _local11[(_local16 + _local17)] = _local23; _local17++; _local23.m_flags = (_local23.m_flags | b2Body.e_islandFlag); }; }; }; }; _local7 = _local7.next; }; }; }; _local18 = _local2.m_jointList; while (_local18) { if (_local9.m_jointCount == _local9.m_jointCapacity){ } else { if (_local18.joint.m_islandFlag == true){ } else { _local9.AddJoint(_local18.joint); _local18.joint.m_islandFlag = true; _local23 = _local18.other; if ((_local23.m_flags & b2Body.e_islandFlag)){ } else { if (!_local23.IsStatic()){ _local23.Advance(_local14); _local23.WakeUp(); }; _local11[(_local16 + _local17)] = _local23; _local17++; _local23.m_flags = (_local23.m_flags | b2Body.e_islandFlag); }; }; }; _local18 = _local18.next; }; _local19 = new b2TimeStep(); _local19.warmStarting = false; _local19.dt = ((1 - _local14) * _arg1.dt); _local19.inv_dt = (1 / _local19.dt); _local19.dtRatio = 0; _local19.velocityIterations = _arg1.velocityIterations; _local19.positionIterations = _arg1.positionIterations; _local9.SolveTOI(_local19); _local20 = 0; while (_local20 < _local9.m_bodyCount) { _local2 = _local9.m_bodies[_local20]; _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local24 = _local2.SynchronizeShapes(); if ((((_local24 == 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; }; }; }; _local20++; }; _local20 = 0; while (_local20 < _local9.m_contactCount) { _local12 = _local9.m_contacts[_local20]; _local9.m_contacts[_local20].m_flags = (_local12.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local20++; }; _local20 = 0; while (_local20 < _local9.m_jointCount) { _local8 = _local9.m_joints[_local20]; _local8.m_islandFlag = false; _local20++; }; m_broadPhase.Commit(); }; }; } public function GetJointList():b2Joint{ return (m_jointList); } public function Validate():void{ m_broadPhase.Validate(); } public function SetGravity(_arg1:b2Vec2):void{ m_gravity = _arg1; } 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 Raycast(_arg1:b2Segment, _arg2:Array, _arg3:int, _arg4:Boolean, _arg5):int{ var _local7:int; var _local6:Array = new Array(_arg3); m_raycastSegment = _arg1; m_raycastUserData = _arg5; if (_arg4){ _local7 = m_broadPhase.QuerySegment(_arg1, _local6, _arg3, RaycastSortKey); } else { _local7 = m_broadPhase.QuerySegment(_arg1, _local6, _arg3, RaycastSortKey2); }; var _local8:int; while (_local8 < _local7) { _arg2[_local8] = _local6[_local8]; _local8++; }; return (_local7); } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local3:b2Body; var _local4:b2Shape; var _local2:b2Joint = 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 _local5:b2Body; var _local6:b2Shape; var _local2:Boolean = _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; }; var _local3:b2Body = _arg1.m_body1; var _local4:b2Body = _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; } b2internal function RaycastSortKey(_arg1:b2Shape):Number{ if (((m_contactFilter) && (!(m_contactFilter.RayCollide(m_raycastUserData, _arg1))))){ return (-1); }; var _local2:b2Body = _arg1.GetBody(); var _local3:b2XForm = _local2.GetXForm(); var _local4:Array = [0]; if (_arg1.TestSegment(_local3, _local4, m_raycastNormal, m_raycastSegment, 1) == b2Shape.e_missCollide){ return (-1); }; return (_local4[0]); } b2internal function RaycastSortKey2(_arg1:b2Shape):Number{ if (((m_contactFilter) && (!(m_contactFilter.RayCollide(m_raycastUserData, _arg1))))){ return (-1); }; var _local2:b2Body = _arg1.GetBody(); var _local3:b2XForm = _local2.GetXForm(); var _local4:Array = [0]; if (_arg1.TestSegment(_local3, _local4, m_raycastNormal, m_raycastSegment, 1) != b2Shape.e_hitCollide){ return (-1); }; return (_local4[0]); } public function RaycastOne(_arg1:b2Segment, _arg2:Array, _arg3:b2Vec2, _arg4:Boolean, _arg5):b2Shape{ var _local6:Array = new Array(1); var _local7:Number = Raycast(_arg1, _local6, 1, _arg4, _arg5); if (_local7 == 0){ return (null); }; if (_local7 > 1){ }; var _local8:b2Shape = _local6[0]; var _local9:b2XForm = _local8.GetBody().GetXForm(); _local8.TestSegment(_local9, _arg2, _arg3, _arg1, 1); return (_local8); } public function CreateBody(_arg1:b2BodyDef):b2Body{ if (m_lock == true){ return (null); }; var _local2:b2Body = 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, _arg3:int):void{ m_lock = true; var _local4:b2TimeStep = new b2TimeStep(); _local4.dt = _arg1; _local4.velocityIterations = _arg2; _local4.positionIterations = _arg3; if (_arg1 > 0){ _local4.inv_dt = (1 / _arg1); } else { _local4.inv_dt = 0; }; _local4.dtRatio = (m_inv_dt0 * _arg1); _local4.warmStarting = m_warmStarting; m_contactManager.Collide(); if (_local4.dt > 0){ Solve(_local4); }; if (((m_continuousPhysics) && ((_local4.dt > 0)))){ SolveTOI(_local4); }; DrawDebugData(); m_inv_dt0 = _local4.inv_dt; m_lock = false; } public function GetGravity():b2Vec2{ return (m_gravity); } public function GetBodyCount():int{ return (m_bodyCount); } public function InRange(_arg1:b2AABB):Boolean{ return (m_broadPhase.InRange(_arg1)); } public function GetJointCount():int{ return (m_jointCount); } } }//package Box2D.Dynamics
Section 83
//b2Bezier (Box2D.b2Bezier) package Box2D { import Box2D.Common.Math.*; public class b2Bezier { public static function parseCurve(_arg1:Array, _arg2:Number){ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:Number; var _local11:Number; var _local13:*; if (_arg2 == 0){ return (null); }; _local3 = new b2Vec2(); _local4 = new b2Vec2(); _local5 = new b2Vec2(); _local6 = new b2Vec2(); _local7 = new b2Vec2(); _local8 = new b2Vec2(); _local9 = new b2Vec2(); _local10 = (1 / _arg2); _local11 = ((1 / _arg2) * _local10); _local3.x = _arg1[0].x; _local3.y = _arg1[0].y; _local4.x = ((3 * _local10) * (_arg1[1].x - _arg1[0].x)); _local4.y = ((3 * _local10) * (_arg1[1].y - _arg1[0].y)); _local7.x = ((3 * _local11) * ((_arg1[0].x - (2 * _arg1[1].x)) + _arg1[2].x)); _local7.y = ((3 * _local11) * ((_arg1[0].y - (2 * _arg1[1].y)) + _arg1[2].y)); _local8.x = (((3 * _local11) * _local10) * (((3 * (_arg1[1].x - _arg1[2].x)) + _arg1[3].x) - _arg1[0].x)); _local8.y = (((3 * _local11) * _local10) * (((3 * (_arg1[1].y - _arg1[2].y)) + _arg1[3].y) - _arg1[0].y)); _local6.x = (_local8.x + _local8.x); _local6.y = (_local8.y + _local8.y); _local5.x = (_local7.x + _local7.x); _local5.y = (_local7.y + _local7.y); _local9.x = ((1 / 3) * _local8.x); _local9.y = ((1 / 3) * _local8.y); var _local12:Array = new Array(_arg2); if (!_local12){ return (null); }; _local13 = 0; while (_local13 < (_arg2 - 1)) { _local12[_local13] = new b2Vec2(); _local12[_local13].x = _local3.x; _local12[_local13].y = _local3.y; _local3.x = (((_local3.x + _local4.x) + _local7.x) + _local9.x); _local3.y = (((_local3.y + _local4.y) + _local7.y) + _local9.y); _local4.x = ((_local4.x + _local5.x) + _local8.x); _local4.y = ((_local4.y + _local5.y) + _local8.y); _local5.x = (_local5.x + _local6.x); _local5.y = (_local5.y + _local6.y); _local7.x = (_local7.x + _local8.x); _local7.y = (_local7.y + _local8.y); _local13 = (_local13 + 1); }; _local12[(_local12.length - 1)] = new b2Vec2(_arg1[3].x, _arg1[3].y); return (_local12); } } }//package Box2D
Section 84
//b2SVG (Box2D.b2SVG) package Box2D { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2SVG { public static function parseSVG(_arg1:XML, _arg2:b2World, _arg3:Number, _arg4:Number):Array{ var _local7:Number; var _local9:XML; var _local10:String; var _local11:String; var _local12:Array; var _local13:b2Vec2; var _local14:b2Vec2; var _local15:b2Vec2; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:String; var _local19:Boolean; var _local20:Array; var _local21:Array; var _local22:int; var _local23:String; var _local5:Namespace = _arg1.namespace(""); var _local6:Boolean; if (_arg4 > 0){ _local7 = _arg4; } else { _local6 = true; }; var _local8:b2EdgeChainDef = new b2EdgeChainDef(); _local8.friction = 10; _local8.restitution = 0; for each (_local9 in _arg1.._local5::path) { if (_local6){ _local7 = Math.round((returnStrokeWidth(_local9.@style) * 10)); }; _local10 = _local9.@d; for each (_local11 in [" ", "\f", "\n", "\r", "\t"]) { _local10 = _local10.split(_local11).join(","); }; for each (_local11 in ["M", "m", "Z", "z", "L", "l", "H", "h", "V", "v", "C", "c", "S", "s", "Q", "q", "T", "t", "A", "a"]) { _local10 = _local10.split(_local11).join((("," + _local11) + ",")); }; _local10 = _local10.split("-").join(",-"); _local12 = _local10.split(","); _local12 = _local12.filter(filterEmptyString); _local13 = new b2Vec2(0, 0); _local14 = null; _local15 = null; _local16 = null; _local17 = null; _local18 = null; _local19 = false; _local21 = new Array(); _local8.vertices.length = 0; _local22 = 0; while (true) { if (_local22 == _local12.length){ if (_local8.vertices.length >= 2){ _local8.vertexCount = _local8.vertices.length; _local8.isALoop = false; _local21.push(_arg2.GetGroundBody().CreateShape(_local8)); }; break; }; _local23 = _local12[_local22]; _local22++; switch (_local23){ case "Z": case "z": if (_local8.vertices.length >= 3){ _local8.vertices.pop(); _local8.vertexCount = _local8.vertices.length; _local8.isALoop = true; _local21.push(_arg2.GetGroundBody().CreateShape(_local8)); }; _local8.vertices.length = 0; _local8.vertices.push(_local13); break; case "M": case "m": if (_local8.vertices.length >= 2){ _local8.vertexCount = _local8.vertices.length; _local8.isALoop = false; _local21.push(_arg2.GetGroundBody().CreateShape(_local8)); }; _local19 = (_local23 == "m"); if (_local19){ _local13 = new b2Vec2((_local13.x + (_local12[_local22] / _arg3)), (_local13.y + (_local12[(_local22 + 1)] / _arg3))); } else { _local13 = new b2Vec2((_local12[_local22] / _arg3), (_local12[(_local22 + 1)] / _arg3)); }; _local22 = (_local22 + 2); _local8.vertices.length = 0; _local8.vertices.push(_local13); case "L": case "l": if (_local23 == "l"){ _local19 = true; } else { if (_local23 == "L"){ _local19 = false; }; }; while (!(isNaN(parseFloat(_local12[_local22])))) { if (_local19){ _local13 = new b2Vec2((_local13.x + (_local12[_local22] / _arg3)), (_local13.y + (_local12[(_local22 + 1)] / _arg3))); } else { _local13 = new b2Vec2((_local12[_local22] / _arg3), (_local12[(_local22 + 1)] / _arg3)); }; _local22 = (_local22 + 2); _local8.vertices.push(_local13); }; break; case "H": case "h": _local19 = (_local23 == "h"); do { if (_local19){ _local13 = new b2Vec2((_local13.x + (_local12[_local22] / _arg3)), _local13.y); } else { _local13 = new b2Vec2((_local12[_local22] / _arg3), _local13.y); }; _local22++; } while (!(isNaN(parseFloat(_local12[_local22])))); _local8.vertices.push(_local13); break; case "V": case "v": _local19 = (_local23 == "v"); do { if (_local19){ _local13 = new b2Vec2(_local13.x, (_local13.y + (_local12[_local22] / _arg3))); } else { _local13 = new b2Vec2(_local13.x, (_local12[_local22] / _arg3)); }; _local22++; } while (!(isNaN(parseFloat(_local12[_local22])))); _local8.vertices.push(_local13); break; case "C": case "c": _local19 = (_local23 == "c"); do { if (_local19){ _local14 = new b2Vec2((_local13.x + (_local12[_local22] / _arg3)), (_local13.y + (_local12[(_local22 + 1)] / _arg3))); _local15 = new b2Vec2((_local13.x + (_local12[(_local22 + 2)] / _arg3)), (_local13.y + (_local12[(_local22 + 3)] / _arg3))); _local16 = new b2Vec2((_local13.x + (_local12[(_local22 + 4)] / _arg3)), (_local13.y + (_local12[(_local22 + 5)] / _arg3))); } else { _local14 = new b2Vec2((_local12[_local22] / _arg3), (_local12[(_local22 + 1)] / _arg3)); _local15 = new b2Vec2((_local12[(_local22 + 2)] / _arg3), (_local12[(_local22 + 3)] / _arg3)); _local16 = new b2Vec2((_local12[(_local22 + 4)] / _arg3), (_local12[(_local22 + 5)] / _arg3)); }; _local22 = (_local22 + 6); _local20 = b2Bezier.parseCurve([_local13, _local14, _local15, _local16], _local7); _local20.shift(); _local8.vertices = _local8.vertices.concat(_local20); _local13 = _local16; } while (!(isNaN(parseFloat(_local12[_local22])))); _local17 = _local15; break; case "S": case "s": _local19 = (_local23 == "s"); do { if ((((((((_local18 == "C")) || ((_local18 == "c")))) || ((_local18 == "S")))) || ((_local18 == "s")))){ _local14 = new b2Vec2(((_local13.x * 2) - _local17.x), ((_local13.y * 2) - _local17.y)); } else { _local14 = new b2Vec2(_local13.x, _local13.y); }; if (_local19){ _local15 = new b2Vec2((_local13.x + (_local12[_local22] / _arg3)), (_local13.y + (_local12[(_local22 + 1)] / _arg3))); _local16 = new b2Vec2((_local13.x + (_local12[(_local22 + 2)] / _arg3)), (_local13.y + (_local12[(_local22 + 3)] / _arg3))); } else { _local15 = new b2Vec2((_local12[_local22] / _arg3), (_local12[(_local22 + 1)] / _arg3)); _local16 = new b2Vec2((_local12[(_local22 + 2)] / _arg3), (_local12[(_local22 + 3)] / _arg3)); }; _local22 = (_local22 + 4); _local20 = b2Bezier.parseCurve([_local13, _local14, _local15, _local16], _local7); _local20.shift(); _local8.vertices = _local8.vertices.concat(_local20); _local13 = _local16; _local17 = _local15; _local18 = _local23; } while (!(isNaN(parseFloat(_local12[_local22])))); break; case "Q": case "q": case "T": case "t": case "A": case "a": throw (new Error(("TODO: Unimplemented path command: " + _local23))); }; _local18 = _local23; }; }; return (_local21); } public static function returnStrokeWidth(_arg1:String):Number{ var _local2:Array; _local2 = _arg1.replace("px", "").split(";"); return (Number(_local2[3].slice(13, _local2[3].length))); } private static function filterEmptyString(_arg1, _arg2:int, _arg3:Array):Boolean{ return (!((_arg1 == ""))); } } }//package Box2D
Section 85
//CampaignInfo (com.google.analytics.campaign.CampaignInfo) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignInfo { private var _new:Boolean; private var _empty:Boolean; public function CampaignInfo(_arg1:Boolean=true, _arg2:Boolean=false){ _empty = _arg1; _new = _arg2; } public function isEmpty():Boolean{ return (_empty); } public function toURLString():String{ var _local1:Variables; _local1 = toVariables(); return (_local1.toString()); } public function toVariables():Variables{ var _local1:Variables; _local1 = new Variables(); _local1.URIencode = true; if (((!(isEmpty())) && (isNew()))){ _local1.utmcn = utmcn; }; if (((!(isEmpty())) && (!(isNew())))){ _local1.utmcr = utmcr; }; return (_local1); } public function isNew():Boolean{ return (_new); } public function get utmcn():String{ return ("1"); } public function get utmcr():String{ return ("1"); } } }//package com.google.analytics.campaign
Section 86
//CampaignKey (com.google.analytics.campaign.CampaignKey) package com.google.analytics.campaign { public class CampaignKey { public var UCMD:String;// = "utm_medium" public var UCID:String;// = "utm_id" public var UCTR:String;// = "utm_term" public var UCSR:String;// = "utm_source" public var UCNO:String;// = "utm_nooverride" public var UCCN:String;// = "utm_campaign" public var UGCLID:String;// = "gclid" public var UCCT:String;// = "utm_content" } }//package com.google.analytics.campaign
Section 87
//CampaignManager (com.google.analytics.campaign.CampaignManager) package com.google.analytics.campaign { import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; public class CampaignManager { private var _config:Configuration; private var _domainHash:Number; private var _debug:DebugConfiguration; private var _timeStamp:Number; private var _referrer:String; private var _buffer:Buffer; public static const trackingDelimiter:String = "|"; public function CampaignManager(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Number, _arg5:String, _arg6:Number){ _config = _arg1; _debug = _arg2; _buffer = _arg3; _domainHash = _arg4; _referrer = _arg5; _timeStamp = _arg6; } public function hasNoOverride(_arg1:String):Boolean{ var _local2:CampaignKey; var _local3:Variables; var _local4:String; _local2 = _config.campaignKey; if (_arg1 == ""){ return (false); }; _local3 = new Variables(_arg1); _local4 = ""; if (_local3.hasOwnProperty(_local2.UCNO)){ _local4 = _local3[_local2.UCNO]; switch (_local4){ case "1": return (true); case "": case "0": default: return (false); }; }; return (false); } public function getCampaignInformation(_arg1:String, _arg2:Boolean):CampaignInfo{ var _local3:CampaignInfo; var _local4:CampaignTracker; var _local5:Boolean; var _local6:Boolean; var _local7:int; var _local8:CampaignTracker; var _local9:int; _local3 = new CampaignInfo(); _local5 = false; _local6 = false; _local7 = 0; if (((_config.allowLinker) && (_buffer.isGenuine()))){ if (!_buffer.hasUTMZ()){ return (_local3); }; }; _local4 = getTrackerFromSearchString(_arg1); if (isValid(_local4)){ _local6 = hasNoOverride(_arg1); if (((_local6) && (!(_buffer.hasUTMZ())))){ return (_local3); }; }; if (!isValid(_local4)){ _local4 = getOrganicCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(_local4)))){ return (_local3); }; }; if (((!(isValid(_local4))) && (_arg2))){ _local4 = getReferrerCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(_local4)))){ return (_local3); }; }; if (!isValid(_local4)){ if (((!(_buffer.hasUTMZ())) && (_arg2))){ _local4 = getDirectCampaign(); }; }; if (!isValid(_local4)){ return (_local3); }; if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){ _local8 = new CampaignTracker(); _local8.fromTrackerString(_buffer.utmz.campaignTracking); _local5 = (_local8.toTrackerString() == _local4.toTrackerString()); _local7 = _buffer.utmz.responseCount; }; if (((!(_local5)) || (_arg2))){ _local9 = _buffer.utma.sessionCount; _local7++; if (_local9 == 0){ _local9 = 1; }; _buffer.utmz.domainHash = _domainHash; _buffer.utmz.campaignCreation = _timeStamp; _buffer.utmz.campaignSessions = _local9; _buffer.utmz.responseCount = _local7; _buffer.utmz.campaignTracking = _local4.toTrackerString(); _debug.info(_buffer.utmz.toString(), VisualDebugMode.geek); _local3 = new CampaignInfo(false, true); } else { _local3 = new CampaignInfo(false, false); }; return (_local3); } public function isValid(_arg1:CampaignTracker):Boolean{ if (((_arg1) && (_arg1.isValid()))){ return (true); }; return (false); } public function getTrackerFromSearchString(_arg1:String):CampaignTracker{ var _local2:CampaignTracker; var _local3:CampaignTracker; var _local4:CampaignKey; var _local5:Variables; _local2 = getOrganicCampaign(); _local3 = new CampaignTracker(); _local4 = _config.campaignKey; if (_arg1 == ""){ return (_local3); }; _local5 = new Variables(_arg1); if (_local5.hasOwnProperty(_local4.UCID)){ _local3.id = _local5[_local4.UCID]; }; if (_local5.hasOwnProperty(_local4.UCSR)){ _local3.source = _local5[_local4.UCSR]; }; if (_local5.hasOwnProperty(_local4.UGCLID)){ _local3.clickId = _local5[_local4.UGCLID]; }; if (_local5.hasOwnProperty(_local4.UCCN)){ _local3.name = _local5[_local4.UCCN]; } else { _local3.name = "(not set)"; }; if (_local5.hasOwnProperty(_local4.UCMD)){ _local3.medium = _local5[_local4.UCMD]; } else { _local3.medium = "(not set)"; }; if (_local5.hasOwnProperty(_local4.UCTR)){ _local3.term = _local5[_local4.UCTR]; } else { if (((_local2) && (!((_local2.term == ""))))){ _local3.term = _local2.term; }; }; if (_local5.hasOwnProperty(_local4.UCCT)){ _local3.content = _local5[_local4.UCCT]; }; return (_local3); } public function getOrganicCampaign():CampaignTracker{ var _local1:CampaignTracker; var _local2:URL; var _local3:String; var _local4:Array; var _local5:OrganicReferrer; var _local6:String; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (_local1); }; _local2 = new URL(_referrer); _local3 = ""; if (_local2.hostName != ""){ if (_local2.hostName.indexOf(".") > -1){ _local4 = _local2.hostName.split("."); switch (_local4.length){ case 2: _local3 = _local4[0]; break; case 3: _local3 = _local4[1]; break; }; }; }; if (_config.organic.match(_local3)){ _local5 = _config.organic.getReferrerByName(_local3); _local6 = _config.organic.getKeywordValue(_local5, _local2.search); _local1 = new CampaignTracker(); _local1.source = _local5.engine; _local1.name = "(organic)"; _local1.medium = "organic"; _local1.term = _local6; }; return (_local1); } public function isIgnoredReferral(_arg1:CampaignTracker):Boolean{ if (((_arg1) && ((_arg1.medium == "referral")))){ return (_config.organic.isIgnoredReferral(_arg1.source)); }; return (false); } public function getDirectCampaign():CampaignTracker{ var _local1:CampaignTracker; _local1 = new CampaignTracker(); _local1.source = "(direct)"; _local1.name = "(direct)"; _local1.medium = "(none)"; return (_local1); } public function isIgnoredKeyword(_arg1:CampaignTracker):Boolean{ if (((_arg1) && ((_arg1.medium == "organic")))){ return (_config.organic.isIgnoredKeyword(_arg1.term)); }; return (false); } public function getReferrerCampaign():CampaignTracker{ var _local1:CampaignTracker; var _local2:URL; var _local3:String; var _local4:String; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (_local1); }; _local2 = new URL(_referrer); _local3 = _local2.hostName; _local4 = _local2.path; if (_local3.indexOf("www.") == 0){ _local3 = _local3.substr(4); }; _local1 = new CampaignTracker(); _local1.source = _local3; _local1.name = "(referral)"; _local1.medium = "referral"; _local1.content = _local4; return (_local1); } public static function isInvalidReferrer(_arg1:String):Boolean{ var _local2:URL; if ((((((_arg1 == "")) || ((_arg1 == "-")))) || ((_arg1 == "0")))){ return (true); }; if (_arg1.indexOf("://") > -1){ _local2 = new URL(_arg1); if ((((_local2.protocol == Protocols.file)) || ((_local2.protocol == Protocols.none)))){ return (true); }; }; return (false); } public static function isFromGoogleCSE(_arg1:String, _arg2:Configuration):Boolean{ var _local3:URL; _local3 = new URL(_arg1); if (_local3.hostName.indexOf(_arg2.google) > -1){ if (_local3.search.indexOf((_arg2.googleSearchParam + "=")) > -1){ if (_local3.path == ("/" + _arg2.googleCsePath)){ return (true); }; }; }; return (false); } } }//package com.google.analytics.campaign
Section 88
//CampaignTracker (com.google.analytics.campaign.CampaignTracker) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignTracker { public var content:String; public var source:String; public var clickId:String; public var name:String; public var term:String; public var medium:String; public var id:String; public function CampaignTracker(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:String="", _arg5:String="", _arg6:String="", _arg7:String=""){ this.id = _arg1; this.source = _arg2; this.clickId = _arg3; this.name = _arg4; this.medium = _arg5; this.term = _arg6; this.content = _arg7; } public function isValid():Boolean{ if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){ return (true); }; return (false); } public function toTrackerString():String{ var _local1:Array = []; _addIfNotEmpty(_local1, "utmcsr=", source); _addIfNotEmpty(_local1, "utmccn=", name); _addIfNotEmpty(_local1, "utmcmd=", medium); _addIfNotEmpty(_local1, "utmctr=", term); _addIfNotEmpty(_local1, "utmcct=", content); _addIfNotEmpty(_local1, "utmcid=", id); _addIfNotEmpty(_local1, "utmgclid=", clickId); return (_local1.join(CampaignManager.trackingDelimiter)); } private function _addIfNotEmpty(_arg1:Array, _arg2:String, _arg3:String):void{ if (_arg3 != ""){ _arg3 = _arg3.split("+").join("%20"); _arg3 = _arg3.split(" ").join("%20"); _arg1.push((_arg2 + _arg3)); }; } public function fromTrackerString(_arg1:String):void{ var _local2:String = _arg1.split(CampaignManager.trackingDelimiter).join("&"); var _local3:Variables = new Variables(_local2); if (_local3.hasOwnProperty("utmcid")){ this.id = _local3["utmcid"]; }; if (_local3.hasOwnProperty("utmcsr")){ this.source = _local3["utmcsr"]; }; if (_local3.hasOwnProperty("utmccn")){ this.name = _local3["utmccn"]; }; if (_local3.hasOwnProperty("utmcmd")){ this.medium = _local3["utmcmd"]; }; if (_local3.hasOwnProperty("utmctr")){ this.term = _local3["utmctr"]; }; if (_local3.hasOwnProperty("utmcct")){ this.content = _local3["utmcct"]; }; if (_local3.hasOwnProperty("utmgclid")){ this.clickId = _local3["utmgclid"]; }; } } }//package com.google.analytics.campaign
Section 89
//FlashTracker (com.google.analytics.components.FlashTracker) package com.google.analytics.components { import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.core.*; import flash.display.*; import com.google.analytics.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; import flash.utils.*; import com.google.analytics.events.*; public class FlashTracker extends Sprite implements AnalyticsTracker { private var _adSense:AdSenseGlobals; private var _env:Environment; protected var _height:Number;// = 18 private var _idleTimer:IdleTimer; private var _config:Configuration; private var _mode:String;// = "AS3" private var _dom:HTMLDOM; private var _ready:Boolean;// = false protected var _width:Number;// = 18 private var _account:String;// = "" protected var _componentInspectorSetting:Boolean; private var _visualDebug:Boolean;// = false public var boundingBox_mc:DisplayObject; private var _debug:DebugConfiguration; private var _buffer:Buffer; private var _display:DisplayObject; protected var livePreviewHeight:Number; private var _jsproxy:JavascriptProxy; protected var isLivePreview:Boolean; protected var preview:MovieClip; private var _gifRequest:GIFRequest; protected var livePreviewWidth:Number; private var _tracker:GoogleAnalyticsAPI; public static var version:Version = API.version; public function FlashTracker(){ _ready = false; _account = ""; _mode = TrackerMode.AS3; _visualDebug = false; _width = 18; _height = 18; super(); _tracker = new TrackerCache(); isLivePreview = _checkLivePreview(); _componentInspectorSetting = false; if (boundingBox_mc){ boundingBox_mc.visible = false; removeChild(boundingBox_mc); boundingBox_mc = null; }; if (isLivePreview){ _createLivePreview(); }; addEventListener(Event.ENTER_FRAME, _factory); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ return (_tracker.trackEvent(_arg1, _arg2, _arg3, _arg4)); } public function trackTrans():void{ _tracker.trackTrans(); } private function _createLivePreview():void{ var _local1:Graphics; var _local2:Class; preview = new MovieClip(); _local1 = preview.graphics; _local1.beginFill(0xFFFFFF); _local1.moveTo(0, 0); _local1.lineTo(0, _width); _local1.lineTo(_width, _height); _local1.lineTo(_height, 0); _local1.lineTo(0, 0); _local1.endFill(); _local2 = (getDefinitionByName("com.google.analytics.components::Icon") as Class); preview.icon_mc = new (_local2); preview.icon_mc.name = "icon_mc"; preview.addChild(preview.icon_mc); addChild(preview); } public function trackPageview(_arg1:String=""):void{ _tracker.trackPageview(_arg1); } public function get account():String{ return (_account); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _tracker.linkByPost(_arg1, _arg2); } public function getDetectTitle():Boolean{ return (_tracker.getDetectTitle()); } public function setCampNameKey(_arg1:String):void{ _tracker.setCampNameKey(_arg1); } public function resetSession():void{ _tracker.resetSession(); } public function set account(_arg1:String):void{ _account = _arg1; } public function get debug():DebugConfiguration{ if (!_debug){ _createDebugAndConfig(); }; return (_debug); } public function createEventTracker(_arg1:String):EventTracker{ return (_tracker.createEventTracker(_arg1)); } public function set config(_arg1:Configuration):void{ _config = _arg1; } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ return (_tracker.addTrans(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)); } public function setLocalServerMode():void{ _tracker.setLocalServerMode(); } public function getLocalGifPath():String{ return (_tracker.getLocalGifPath()); } public function clearIgnoredRef():void{ _tracker.clearIgnoredRef(); } public function isReady():Boolean{ return (_ready); } public function set debug(_arg1:DebugConfiguration):void{ _debug = _arg1; } public function getVersion():String{ return (_tracker.getVersion()); } public function setLocalRemoteServerMode():void{ _tracker.setLocalRemoteServerMode(); } public function setCampNOKey(_arg1:String):void{ _tracker.setCampNOKey(_arg1); } public function addIgnoredOrganic(_arg1:String):void{ _tracker.addIgnoredOrganic(_arg1); } public function setCookiePath(_arg1:String):void{ _tracker.setCookiePath(_arg1); } public function setCampTermKey(_arg1:String):void{ _tracker.setCampTermKey(_arg1); } private function _trackerFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account)); _adSense = new AdSenseGlobals(debug); _dom = new HTMLDOM(debug); _dom.cacheProperties(); _env = new Environment("", "", "", debug, _dom); _buffer = new Buffer(config, debug, false); _gifRequest = new GIFRequest(config, debug, _buffer, _env); _idleTimer = new IdleTimer(config, debug, _display, _buffer); _env.url = _display.stage.loaderInfo.url; return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense)); } public function setCampaignTrack(_arg1:Boolean):void{ _tracker.setCampaignTrack(_arg1); } public function getServiceMode():ServerOperationMode{ return (_tracker.getServiceMode()); } public function set componentInspectorSetting(_arg1:Boolean):void{ _componentInspectorSetting = _arg1; } public function setSessionTimeout(_arg1:int):void{ _tracker.setSessionTimeout(_arg1); } public function setRemoteServerMode():void{ _tracker.setRemoteServerMode(); } public function get visualDebug():Boolean{ return (_visualDebug); } public function addOrganic(_arg1:String, _arg2:String):void{ _tracker.addOrganic(_arg1, _arg2); } public function setCookieTimeout(_arg1:int):void{ _tracker.setCookieTimeout(_arg1); } public function getClientInfo():Boolean{ return (_tracker.getClientInfo()); } public function setAllowLinker(_arg1:Boolean):void{ _tracker.setAllowLinker(_arg1); } public function setClientInfo(_arg1:Boolean):void{ _tracker.setClientInfo(_arg1); } private function _bridgeFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account)); return (new Bridge(account, _debug, _jsproxy)); } public function get config():Configuration{ if (!_config){ _createDebugAndConfig(); }; return (_config); } public function set mode(_arg1:String):void{ _mode = _arg1; } public function setDetectFlash(_arg1:Boolean):void{ _tracker.setDetectFlash(_arg1); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _tracker.addItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function setVar(_arg1:String):void{ _tracker.setVar(_arg1); } public function clearIgnoredOrganic():void{ _tracker.clearIgnoredOrganic(); } public function setDomainName(_arg1:String):void{ _tracker.setDomainName(_arg1); } private function _checkLivePreview():Boolean{ if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){ return (true); }; return (false); } public function setCampSourceKey(_arg1:String):void{ _tracker.setCampSourceKey(_arg1); } public function setCampContentKey(_arg1:String):void{ _tracker.setCampContentKey(_arg1); } public function setSize(_arg1:Number, _arg2:Number):void{ } public function setAllowAnchor(_arg1:Boolean):void{ _tracker.setAllowAnchor(_arg1); } public function setLocalGifPath(_arg1:String):void{ _tracker.setLocalGifPath(_arg1); } public function get mode():String{ return (_mode); } public function setSampleRate(_arg1:Number):void{ _tracker.setSampleRate(_arg1); } public function setAllowHash(_arg1:Boolean):void{ _tracker.setAllowHash(_arg1); } public function setDetectTitle(_arg1:Boolean):void{ _tracker.setDetectTitle(_arg1); } public function cookiePathCopy(_arg1:String):void{ _tracker.cookiePathCopy(_arg1); } private function _factory(_arg1:Event):void{ var _local2:GoogleAnalyticsAPI; var _local3:TrackerCache; removeEventListener(Event.ENTER_FRAME, _factory); if (isLivePreview){ return; }; _display = this; _createDebugAndConfig(); if (visualDebug){ debug.layout = new Layout(debug, _display); debug.active = visualDebug; }; _jsproxy = new JavascriptProxy(debug); _local3 = (_tracker as TrackerCache); switch (mode){ case TrackerMode.BRIDGE: _local2 = _bridgeFactory(); break; case TrackerMode.AS3: default: _local2 = _trackerFactory(); }; if (!_local3.isEmpty()){ _local3.tracker = _local2; _local3.flush(); }; _tracker = _local2; _ready = true; dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this)); } public function getDetectFlash():Boolean{ return (_tracker.getDetectFlash()); } public function clearOrganic():void{ _tracker.clearOrganic(); } private function _createDebugAndConfig():void{ if (!_debug){ this.debug = new DebugConfiguration(); }; if (!_config){ this.config = new Configuration(debug); }; } public function addIgnoredRef(_arg1:String):void{ _tracker.addIgnoredRef(_arg1); } public function set visualDebug(_arg1:Boolean):void{ _visualDebug = _arg1; } public function setCampMediumKey(_arg1:String):void{ _tracker.setCampMediumKey(_arg1); } public function getAccount():String{ return (_tracker.getAccount()); } public function link(_arg1:String, _arg2:Boolean=false):void{ _tracker.link(_arg1, _arg2); } } var _local1:* = ServerOperationMode; return (_local1); }//package com.google.analytics.components
Section 90
//GATrackerLibrary (com.google.analytics.components.GATrackerLibrary) package com.google.analytics.components { import flash.display.*; import com.google.analytics.*; import com.google.analytics.utils.*; public class GATrackerLibrary extends MovieClip { public static var version:Version = API.version; } }//package com.google.analytics.components
Section 91
//Icon (com.google.analytics.components.Icon) package com.google.analytics.components { import flash.display.*; public dynamic class Icon extends MovieClip { } }//package com.google.analytics.components
Section 92
//BrowserInfo (com.google.analytics.core.BrowserInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.utils.*; public class BrowserInfo { private var _config:Configuration; private var _info:Environment; public function BrowserInfo(_arg1:Configuration, _arg2:Environment){ _config = _arg1; _info = _arg2; } public function get utmul():String{ return (_info.language.toLowerCase()); } public function get utmje():String{ return ("0"); } public function toURLString():String{ var _local1:Variables; _local1 = toVariables(); return (_local1.toString()); } public function get utmsr():String{ return (((_info.screenWidth + "x") + _info.screenHeight)); } public function get utmcs():String{ return (_info.languageEncoding); } public function get utmfl():String{ var _local1:Version; if (_config.detectFlash){ _local1 = _info.flashVersion; return (((((_local1.major + ".") + _local1.minor) + " r") + _local1.build)); }; return ("-"); } public function toVariables():Variables{ var _local1:Variables; _local1 = new Variables(); _local1.URIencode = true; _local1.utmcs = utmcs; _local1.utmsr = utmsr; _local1.utmsc = utmsc; _local1.utmul = utmul; _local1.utmje = utmje; _local1.utmfl = utmfl; return (_local1); } public function get utmsc():String{ return ((_info.screenColorDepth + "-bit")); } } }//package com.google.analytics.core
Section 93
//Buffer (com.google.analytics.core.Buffer) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.net.*; import flash.events.*; import com.google.analytics.data.*; public dynamic class Buffer { private var _SO:SharedObject; private var _OBJ:Object; private var _utma:UTMA; private var _utmb:UTMB; private var _utmc:UTMC; private var _debug:DebugConfiguration; private var _utmk:UTMK; private var _config:Configuration; private var _utmv:UTMV; private var _utmz:UTMZ; private var _volatile:Boolean; public function Buffer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Boolean=false, _arg4:Object=null){ var _local5:Boolean; var _local6:String; super(); _config = _arg1; _debug = _arg2; UTMB.defaultTimespan = _config.sessionTimeout; UTMZ.defaultTimespan = _config.conversionTimeout; if (!_arg3){ _SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath); _local5 = false; if (_SO.data.utma){ if (!hasUTMA()){ _createUMTA(); }; _utma.fromSharedObject(_SO.data.utma); if (_debug.verbose){ _debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek); }; if (_utma.isExpired()){ if (_debug.verbose){ _debug.warning("UTMA has expired", VisualDebugMode.advanced); }; _clearUTMA(); _local5 = true; }; }; if (_SO.data.utmb){ if (!hasUTMB()){ _createUMTB(); }; _utmb.fromSharedObject(_SO.data.utmb); if (_debug.verbose){ _debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek); }; if (_utmb.isExpired()){ if (_debug.verbose){ _debug.warning("UTMB has expired", VisualDebugMode.advanced); }; _clearUTMB(); _local5 = true; }; }; if (_SO.data.utmc){ delete _SO.data.utmc; _local5 = true; }; if (_SO.data.utmk){ if (!hasUTMK()){ _createUMTK(); }; _utmk.fromSharedObject(_SO.data.utmk); if (_debug.verbose){ _debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek); }; }; if (_SO.data.utmv){ if (!hasUTMV()){ _createUMTV(); }; _utmv.fromSharedObject(_SO.data.utmv); if (_debug.verbose){ _debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek); }; if (_utmv.isExpired()){ if (_debug.verbose){ _debug.warning("UTMV has expired", VisualDebugMode.advanced); }; _clearUTMV(); _local5 = true; }; }; if (_SO.data.utmz){ if (!hasUTMZ()){ _createUMTZ(); }; _utmz.fromSharedObject(_SO.data.utmz); if (_debug.verbose){ _debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek); }; if (_utmz.isExpired()){ if (_debug.verbose){ _debug.warning("UTMZ has expired", VisualDebugMode.advanced); }; _clearUTMZ(); _local5 = true; }; }; if (_local5){ save(); }; } else { _OBJ = new Object(); if (_arg4){ for (_local6 in _arg4) { _OBJ[_local6] = _arg4[_local6]; }; }; }; _volatile = _arg3; } public function clearCookies():void{ utma.reset(); utmb.reset(); utmc.reset(); utmz.reset(); utmv.reset(); utmk.reset(); } public function save():void{ var flushStatus:String; if (!isVolatile()){ flushStatus = null; try { flushStatus = _SO.flush(); } catch(e:Error) { _debug.warning("Error...Could not write SharedObject to disk"); }; switch (flushStatus){ case SharedObjectFlushStatus.PENDING: _debug.info("Requesting permission to save object..."); _SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); break; case SharedObjectFlushStatus.FLUSHED: _debug.info("Value flushed to disk."); break; }; }; } public function get utmv():UTMV{ if (!hasUTMV()){ _createUMTV(); }; return (_utmv); } public function get utmz():UTMZ{ if (!hasUTMZ()){ _createUMTZ(); }; return (_utmz); } public function hasUTMA():Boolean{ if (_utma){ return (true); }; return (false); } public function hasUTMB():Boolean{ if (_utmb){ return (true); }; return (false); } public function hasUTMC():Boolean{ if (_utmc){ return (true); }; return (false); } public function isGenuine():Boolean{ if (!hasUTMK()){ return (true); }; return ((utmk.hash == generateCookiesHash())); } public function resetCurrentSession():void{ _clearUTMB(); _clearUTMC(); save(); } public function hasUTMK():Boolean{ if (_utmk){ return (true); }; return (false); } public function generateCookiesHash():Number{ var _local1 = ""; _local1 = (_local1 + utma.valueOf()); _local1 = (_local1 + utmb.valueOf()); _local1 = (_local1 + utmc.valueOf()); _local1 = (_local1 + utmz.valueOf()); _local1 = (_local1 + utmv.valueOf()); return (Utils.generateHash(_local1)); } private function _createUMTB():void{ _utmb = new UTMB(); _utmb.proxy = this; } private function _createUMTC():void{ _utmc = new UTMC(); } private function _createUMTA():void{ _utma = new UTMA(); _utma.proxy = this; } public function hasUTMV():Boolean{ if (_utmv){ return (true); }; return (false); } private function _createUMTK():void{ _utmk = new UTMK(); _utmk.proxy = this; } public function hasUTMZ():Boolean{ if (_utmz){ return (true); }; return (false); } private function _createUMTV():void{ _utmv = new UTMV(); _utmv.proxy = this; } private function _onFlushStatus(_arg1:NetStatusEvent):void{ _debug.info("User closed permission dialog..."); switch (_arg1.info.code){ case "SharedObject.Flush.Success": _debug.info("User granted permission -- value saved."); break; case "SharedObject.Flush.Failed": _debug.info("User denied permission -- value not saved."); break; }; _SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); } private function _createUMTZ():void{ _utmz = new UTMZ(); _utmz.proxy = this; } public function updateUTMA(_arg1:Number):void{ if (_debug.verbose){ _debug.info((("updateUTMA( " + _arg1) + " )"), VisualDebugMode.advanced); }; if (!utma.isEmpty()){ if (isNaN(utma.sessionCount)){ utma.sessionCount = 1; } else { utma.sessionCount = (utma.sessionCount + 1); }; utma.lastTime = utma.currentTime; utma.currentTime = _arg1; }; } private function _clearUTMA():void{ _utma = null; if (!isVolatile()){ _SO.data.utma = null; delete _SO.data.utma; }; } private function _clearUTMC():void{ _utmc = null; } private function _clearUTMB():void{ _utmb = null; if (!isVolatile()){ _SO.data.utmb = null; delete _SO.data.utmb; }; } public function update(_arg1:String, _arg2):void{ if (isVolatile()){ _OBJ[_arg1] = _arg2; } else { _SO.data[_arg1] = _arg2; }; } private function _clearUTMZ():void{ _utmz = null; if (!isVolatile()){ _SO.data.utmz = null; delete _SO.data.utmz; }; } private function _clearUTMV():void{ _utmv = null; if (!isVolatile()){ _SO.data.utmv = null; delete _SO.data.utmv; }; } public function isVolatile():Boolean{ return (_volatile); } public function get utma():UTMA{ if (!hasUTMA()){ _createUMTA(); }; return (_utma); } public function get utmb():UTMB{ if (!hasUTMB()){ _createUMTB(); }; return (_utmb); } public function get utmc():UTMC{ if (!hasUTMC()){ _createUMTC(); }; return (_utmc); } public function get utmk():UTMK{ if (!hasUTMK()){ _createUMTK(); }; return (_utmk); } } }//package com.google.analytics.core
Section 94
//DocumentInfo (com.google.analytics.core.DocumentInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.utils.*; import com.google.analytics.external.*; public class DocumentInfo { private var _config:Configuration; private var _utmr:String; private var _adSense:AdSenseGlobals; private var _info:Environment; private var _pageURL:String; public function DocumentInfo(_arg1:Configuration, _arg2:Environment, _arg3:String, _arg4:String=null, _arg5:AdSenseGlobals=null){ _config = _arg1; _info = _arg2; _utmr = _arg3; _pageURL = _arg4; _adSense = _arg5; } public function get utmr():String{ if (!_utmr){ return ("-"); }; return (_utmr); } public function toURLString():String{ var _local1:Variables; _local1 = toVariables(); return (_local1.toString()); } private function _renderPageURL(_arg1:String=""):String{ var _local2:String; var _local3:String; _local2 = _info.locationPath; _local3 = _info.locationSearch; if (((!(_arg1)) || ((_arg1 == "")))){ _arg1 = (_local2 + unescape(_local3)); }; return (_arg1); } public function get utmp():String{ return (_renderPageURL(_pageURL)); } private function _generateHitId():Number{ var _local1:Number; if (((_adSense.hid) && (!((_adSense.hid == ""))))){ _local1 = Number(_adSense.hid); } else { _local1 = Math.round((Math.random() * 2147483647)); _adSense.hid = String(_local1); }; return (_local1); } public function get utmhid():String{ return (String(_generateHitId())); } public function toVariables():Variables{ var _local1:Variables; _local1 = new Variables(); _local1.URIencode = true; if (((_config.detectTitle) && (!((utmdt == ""))))){ _local1.utmdt = utmdt; }; _local1.utmhid = utmhid; _local1.utmr = utmr; _local1.utmp = utmp; return (_local1); } public function get utmdt():String{ return (_info.documentTitle); } } }//package com.google.analytics.core
Section 95
//Domain (com.google.analytics.core.Domain) package com.google.analytics.core { import com.google.analytics.debug.*; public class Domain { private var _mode:DomainNameMode; private var _debug:DebugConfiguration; private var _name:String; public function Domain(_arg1:DomainNameMode=null, _arg2:String="", _arg3:DebugConfiguration=null){ _debug = _arg3; if (_arg1 == null){ _arg1 = DomainNameMode.auto; }; _mode = _arg1; if (_arg1 == DomainNameMode.custom){ this.name = _arg2; } else { _name = _arg2; }; } public function get mode():DomainNameMode{ return (_mode); } public function set mode(_arg1:DomainNameMode):void{ _mode = _arg1; if (_mode == DomainNameMode.none){ _name = ""; }; } public function get name():String{ return (_name); } public function set name(_arg1:String):void{ if (((!((_arg1.charAt(0) == "."))) && (_debug))){ _debug.warning(("missing leading period \".\", cookie will only be accessible on " + _arg1), VisualDebugMode.geek); }; _name = _arg1; } } }//package com.google.analytics.core
Section 96
//DomainNameMode (com.google.analytics.core.DomainNameMode) package com.google.analytics.core { public class DomainNameMode { private var _value:int; private var _name:String; public static const custom:DomainNameMode = new DomainNameMode(2, "custom"); ; public static const none:DomainNameMode = new DomainNameMode(0, "none"); ; public static const auto:DomainNameMode = new DomainNameMode(1, "auto"); ; public function DomainNameMode(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 97
//EventInfo (com.google.analytics.core.EventInfo) package com.google.analytics.core { import com.google.analytics.utils.*; import com.google.analytics.data.*; public class EventInfo { private var _isEventHit:Boolean; private var _ext10:X10; private var _x10:X10; public function EventInfo(_arg1:Boolean, _arg2:X10, _arg3:X10=null){ _isEventHit = _arg1; _x10 = _arg2; _ext10 = _arg3; } public function toURLString():String{ var _local1:Variables; _local1 = toVariables(); return (_local1.toString()); } public function get utmt():String{ return ("event"); } public function get utme():String{ return (_x10.renderMergedUrlString(_ext10)); } public function toVariables():Variables{ var _local1:Variables; _local1 = new Variables(); _local1.URIencode = true; if (_isEventHit){ _local1.utmt = utmt; }; _local1.utme = utme; return (_local1); } } }//package com.google.analytics.core
Section 98
//EventTracker (com.google.analytics.core.EventTracker) package com.google.analytics.core { import com.google.analytics.v4.*; public class EventTracker { private var _parent:GoogleAnalyticsAPI; public var name:String; public function EventTracker(_arg1:String, _arg2:GoogleAnalyticsAPI){ this.name = _arg1; _parent = _arg2; } public function trackEvent(_arg1:String, _arg2:String=null, _arg3:Number=NaN):Boolean{ return (_parent.trackEvent(name, _arg1, _arg2, _arg3)); } } }//package com.google.analytics.core
Section 99
//ga_internal (com.google.analytics.core.ga_internal) package com.google.analytics.core { public namespace ga_internal; }//package com.google.analytics.core
Section 100
//GIFRequest (com.google.analytics.core.GIFRequest) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.net.*; import com.google.analytics.utils.*; import flash.events.*; import flash.display.*; import flash.system.*; public class GIFRequest { private var _info:Environment; private var _count:int; private var _utmac:String; private var _alertcount:int; private var _debug:DebugConfiguration; private var _lastRequest:URLRequest; private var _buffer:Buffer; private var _config:Configuration; private var _requests:Array; public function GIFRequest(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:Buffer, _arg4:Environment){ _config = _arg1; _debug = _arg2; _buffer = _arg3; _info = _arg4; _count = 0; _alertcount = 0; _requests = []; } public function get utmn():String{ return ((Utils.generate32bitRandom() as String)); } public function onIOError(_arg1:IOErrorEvent):void{ var _local2:String = _lastRequest.url; var _local3:String = String((_requests.length - 1)); var _local4 = (("Gif Request #" + _local3) + " failed"); if (_debug.GIFRequests){ if (!_debug.verbose){ if (_local2.indexOf("?") > -1){ _local2 = _local2.split("?")[0]; }; _local2 = _shortenURL(_local2); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ _local4 = (_local4 + ((" \"" + _local2) + "\" does not exists or is unreachable")); }; _debug.failure(_local4); } else { _debug.warning(_local4); }; _removeListeners(_arg1.target); } public function send(_arg1:String, _arg2:Variables=null, _arg3:Boolean=false, _arg4:Boolean=false):void{ var _local5:String; var _local6:URLRequest; var _local7:URLRequest; _utmac = _arg1; if (!_arg2){ _arg2 = new Variables(); }; _arg2.URIencode = false; _arg2.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"]; _arg2.post = ["utmcc"]; if (_debug.verbose){ _debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek); }; if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (_arg3))){ if (_arg4){ updateToken(); }; if (((((_arg3) || (!(_arg4)))) || ((_buffer.utmb.token >= 1)))){ if (((!(_arg3)) && (_arg4))){ _buffer.utmb.token = (_buffer.utmb.token - 1); }; _buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1); if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; _arg2.utmwv = utmwv; _arg2.utmn = Utils.generate32bitRandom(); if (_info.domainName != ""){ _arg2.utmhn = _info.domainName; }; if (_config.sampleRate < 1){ _arg2.utmsp = (_config.sampleRate * 100); }; if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){ _local5 = _info.locationSWFPath; if (_local5.lastIndexOf("/") > 0){ _local5 = _local5.substring(0, _local5.lastIndexOf("/")); }; _local6 = new URLRequest(); if (_config.localGIFpath.indexOf("http") == 0){ _local6.url = _config.localGIFpath; } else { _local6.url = (_local5 + _config.localGIFpath); }; _local6.url = (_local6.url + ("?" + _arg2.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(_local6); } else { sendRequest(_local6); }; }; if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){ _local7 = new URLRequest(); if (_info.protocol == Protocols.HTTPS){ _local7.url = _config.secureRemoteGIFpath; } else { if (_info.protocol == Protocols.HTTP){ _local7.url = _config.remoteGIFpath; } else { _local7.url = _config.remoteGIFpath; }; }; _arg2.utmac = utmac; _arg2.utmcc = encodeURIComponent(utmcc); _local7.url = (_local7.url + ("?" + _arg2.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(_local7); } else { sendRequest(_local7); }; }; }; }; } public function onSecurityError(_arg1:SecurityErrorEvent):void{ if (_debug.GIFRequests){ _debug.failure(_arg1.text); }; } public function get utmsp():String{ return (((_config.sampleRate * 100) as String)); } public function get utmcc():String{ var _local1:Array = []; if (_buffer.hasUTMA()){ _local1.push((_buffer.utma.toURLString() + ";")); }; if (_buffer.hasUTMZ()){ _local1.push((_buffer.utmz.toURLString() + ";")); }; if (_buffer.hasUTMV()){ _local1.push((_buffer.utmv.toURLString() + ";")); }; return (_local1.join("+")); } public function get utmac():String{ return (_utmac); } public function get utmwv():String{ return (_config.version); } public function sendRequest(_arg1:URLRequest):void{ var request = _arg1; var loader:Loader = new Loader(); loader.name = String(_count++); var context:LoaderContext = new LoaderContext(false); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); _lastRequest = request; _requests[loader.name] = new RequestObject(request); try { loader.load(request, context); } catch(e:Error) { _debug.failure("\"Loader.load()\" could not instanciate Gif Request"); }; } private function _removeListeners(_arg1:Object):void{ _arg1.removeEventListener(IOErrorEvent.IO_ERROR, onIOError); _arg1.removeEventListener(Event.COMPLETE, onComplete); } public function updateToken():void{ var _local2:Number; var _local1:Number = new Date().getTime(); _local2 = ((_local1 - _buffer.utmb.lastTime) * (_config.tokenRate / 1000)); if (_debug.verbose){ _debug.info(("tokenDelta: " + _local2), VisualDebugMode.geek); }; if (_local2 >= 1){ _buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + _local2)), _config.bucketCapacity); _buffer.utmb.lastTime = _local1; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; }; } public function get utmhn():String{ return (_info.domainName); } private function _shortenURL(_arg1:String):String{ var _local2:Array; if (_arg1.length > 60){ _local2 = _arg1.split("/"); while (_arg1.length > 60) { _local2.shift(); _arg1 = ("../" + _local2.join("/")); }; }; return (_arg1); } private function _debugSend(_arg1:URLRequest):void{ var _local3:String; var _local2 = ""; switch (_debug.mode){ case VisualDebugMode.geek: _local2 = ((("Gif Request #" + _alertcount) + ":\n") + _arg1.url); break; case VisualDebugMode.advanced: _local3 = _arg1.url; if (_local3.indexOf("?") > -1){ _local3 = _local3.split("?")[0]; }; _local3 = _shortenURL(_local3); _local2 = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?"); break; case VisualDebugMode.basic: default: _local2 = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?"); }; _debug.alertGifRequest(_local2, _arg1, this); _alertcount++; } public function onComplete(_arg1:Event):void{ var _local2:String = _arg1.target.loader.name; _requests[_local2].complete(); var _local3 = (("Gif Request #" + _local2) + " sent"); var _local4:String = _requests[_local2].request.url; if (_debug.GIFRequests){ if (!_debug.verbose){ if (_local4.indexOf("?") > -1){ _local4 = _local4.split("?")[0]; }; _local4 = _shortenURL(_local4); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ _local3 = (_local3 + ((" to \"" + _local4) + "\"")); }; _debug.success(_local3); } else { _debug.info(_local3); }; _removeListeners(_arg1.target); } } }//package com.google.analytics.core
Section 101
//IdleTimer (com.google.analytics.core.IdleTimer) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.events.*; import flash.display.*; import flash.utils.*; public class IdleTimer { private var _loop:Timer; private var _stage:Stage; private var _lastMove:int; private var _debug:DebugConfiguration; private var _session:Timer; private var _inactivity:Number; private var _buffer:Buffer; public function IdleTimer(_arg1:Configuration, _arg2:DebugConfiguration, _arg3:DisplayObject, _arg4:Buffer){ var _local5:Number; var _local6:Number; var _local7:Number; super(); _local5 = _arg1.idleLoop; _local6 = _arg1.idleTimeout; _local7 = _arg1.sessionTimeout; _loop = new Timer((_local5 * 1000)); _session = new Timer((_local7 * 1000), 1); _debug = _arg2; _stage = _arg3.stage; _buffer = _arg4; _lastMove = getTimer(); _inactivity = (_local6 * 1000); _loop.addEventListener(TimerEvent.TIMER, checkForIdle); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); _stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); _debug.info(((((("delay: " + _local5) + "sec , inactivity: ") + _local6) + "sec, sessionTimeout: ") + _local7), VisualDebugMode.geek); _loop.start(); } private function onMouseMove(_arg1:MouseEvent):void{ _lastMove = getTimer(); if (_session.running){ _debug.info("session timer reset", VisualDebugMode.geek); _session.reset(); }; } public function endSession(_arg1:TimerEvent):void{ _session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession); _debug.info("session timer end session", VisualDebugMode.geek); _session.reset(); _buffer.resetCurrentSession(); _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); _debug.info(_buffer.utmc.toString(), VisualDebugMode.geek); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); } public function checkForIdle(_arg1:TimerEvent):void{ var _local2:int; _local2 = getTimer(); if ((_local2 - _lastMove) >= _inactivity){ if (!_session.running){ _debug.info("session timer start", VisualDebugMode.geek); _session.start(); }; }; } } }//package com.google.analytics.core
Section 102
//Organic (com.google.analytics.core.Organic) package com.google.analytics.core { import com.google.analytics.utils.*; public class Organic { private var _sourcesCache:Array; private var _sourcesEngine:Array; private var _ignoredKeywords:Array; private var _ignoredReferralsCache:Object; private var _ignoredReferrals:Array; private var _ignoredKeywordsCache:Object; private var _sources:Array; public static var throwErrors:Boolean = false; public function Organic(){ _sources = []; _sourcesCache = []; _sourcesEngine = []; _ignoredReferrals = []; _ignoredReferralsCache = {}; _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function getKeywordValue(_arg1:OrganicReferrer, _arg2:String):String{ var _local3:String; _local3 = _arg1.keyword; return (getKeywordValueFromPath(_local3, _arg2)); } public function isIgnoredKeyword(_arg1:String):Boolean{ if (_ignoredKeywordsCache.hasOwnProperty(_arg1)){ return (true); }; return (false); } public function isIgnoredReferral(_arg1:String):Boolean{ if (_ignoredReferralsCache.hasOwnProperty(_arg1)){ return (true); }; return (false); } public function clear():void{ clearEngines(); clearIgnoredReferrals(); clearIgnoredKeywords(); } public function get ignoredKeywordsCount():int{ return (_ignoredKeywords.length); } public function match(_arg1:String):Boolean{ if (_arg1 == ""){ return (false); }; _arg1 = _arg1.toLowerCase(); if (_sourcesEngine[_arg1] != undefined){ return (true); }; return (false); } public function get count():int{ return (_sources.length); } public function addSource(_arg1:String, _arg2:String):void{ var _local3:OrganicReferrer; _local3 = new OrganicReferrer(_arg1, _arg2); if (_sourcesCache[_local3.toString()] == undefined){ _sources.push(_local3); _sourcesCache[_local3.toString()] = (_sources.length - 1); if (_sourcesEngine[_local3.engine] == undefined){ _sourcesEngine[_local3.engine] = [(_sources.length - 1)]; } else { _sourcesEngine[_local3.engine].push((_sources.length - 1)); }; } else { if (throwErrors){ throw (new Error((_local3.toString() + " already exists, we don't add it."))); }; }; } public function clearIgnoredKeywords():void{ _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function clearEngines():void{ _sources = []; _sourcesCache = []; _sourcesEngine = []; } public function get ignoredReferralsCount():int{ return (_ignoredReferrals.length); } public function addIgnoredReferral(_arg1:String):void{ if (_ignoredReferralsCache[_arg1] == undefined){ _ignoredReferrals.push(_arg1); _ignoredReferralsCache[_arg1] = (_ignoredReferrals.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it."))); }; }; } public function clearIgnoredReferrals():void{ _ignoredReferrals = []; _ignoredReferralsCache = {}; } public function getReferrerByName(_arg1:String):OrganicReferrer{ var _local2:int; if (match(_arg1)){ _local2 = _sourcesEngine[_arg1][0]; return (_sources[_local2]); }; return (null); } public function addIgnoredKeyword(_arg1:String):void{ if (_ignoredKeywordsCache[_arg1] == undefined){ _ignoredKeywords.push(_arg1); _ignoredKeywordsCache[_arg1] = (_ignoredKeywords.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + _arg1) + "\" already exists, we don't add it."))); }; }; } public function get sources():Array{ return (_sources); } public static function getKeywordValueFromPath(_arg1:String, _arg2:String):String{ var _local3:String; var _local4:Variables; if (_arg2.indexOf((_arg1 + "=")) > -1){ if (_arg2.charAt(0) == "?"){ _arg2 = _arg2.substr(1); }; _arg2 = _arg2.split("+").join("%20"); _local4 = new Variables(_arg2); _local3 = _local4[_arg1]; }; return (_local3); } } }//package com.google.analytics.core
Section 103
//OrganicReferrer (com.google.analytics.core.OrganicReferrer) package com.google.analytics.core { public class OrganicReferrer { private var _engine:String; private var _keyword:String; public function OrganicReferrer(_arg1:String, _arg2:String){ this.engine = _arg1; this.keyword = _arg2; } public function set engine(_arg1:String):void{ _engine = _arg1.toLowerCase(); } public function get keyword():String{ return (_keyword); } public function toString():String{ return (((engine + "?") + keyword)); } public function get engine():String{ return (_engine); } public function set keyword(_arg1:String):void{ _keyword = _arg1.toLowerCase(); } } }//package com.google.analytics.core
Section 104
//RequestObject (com.google.analytics.core.RequestObject) package com.google.analytics.core { import flash.net.*; import flash.utils.*; public class RequestObject { public var start:int; public var request:URLRequest; public var end:int; public function RequestObject(_arg1:URLRequest){ start = getTimer(); this.request = _arg1; } public function toString():String{ var _local1:Array; _local1 = []; _local1.push((("duration: " + duration) + "ms")); _local1.push(("url: " + request.url)); return ((("{ " + _local1.join(", ")) + " }")); } public function get duration():int{ if (!hasCompleted()){ return (0); }; return ((end - start)); } public function hasCompleted():Boolean{ return ((end > 0)); } public function complete():void{ end = getTimer(); } } }//package com.google.analytics.core
Section 105
//ServerOperationMode (com.google.analytics.core.ServerOperationMode) package com.google.analytics.core { public class ServerOperationMode { private var _value:int; private var _name:String; public static const both:ServerOperationMode = new ServerOperationMode(2, "both"); ; public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote"); ; public static const local:ServerOperationMode = new ServerOperationMode(0, "local"); ; public function ServerOperationMode(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 106
//TrackerCache (com.google.analytics.core.TrackerCache) package com.google.analytics.core { import com.google.analytics.v4.*; import flash.errors.*; public class TrackerCache implements GoogleAnalyticsAPI { public var tracker:GoogleAnalyticsAPI; private var _ar:Array; public static var CACHE_THROW_ERROR:Boolean; public function TrackerCache(_arg1:GoogleAnalyticsAPI=null){ this.tracker = _arg1; _ar = []; } public function size():uint{ return (_ar.length); } public function flush():void{ var _local1:Object; var _local2:String; var _local3:Array; var _local4:int; var _local5:int; if (tracker == null){ return; }; if (size() > 0){ _local4 = _ar.length; while (_local5 < _local4) { _local1 = _ar.shift(); _local2 = (_local1.name as String); _local3 = (_local1.args as Array); if (((!((_local2 == null))) && ((_local2 in tracker)))){ (tracker[_local2] as Function).apply(tracker, _local3); }; _local5++; }; }; } public function enqueue(_arg1:String, ... _args):Boolean{ if (_arg1 == null){ return (false); }; _ar.push({name:_arg1, args:_args}); return (true); } public function link(_arg1:String, _arg2:Boolean=false):void{ enqueue("link", _arg1, _arg2); } public function addOrganic(_arg1:String, _arg2:String):void{ enqueue("addOrganic", _arg1, _arg2); } public function setAllowLinker(_arg1:Boolean):void{ enqueue("setAllowLinker", _arg1); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ enqueue("trackEvent", _arg1, _arg2, _arg3, _arg4); return (true); } public function getClientInfo():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment.")); }; return (false); } public function trackTrans():void{ enqueue("trackTrans"); } public function trackPageview(_arg1:String=""):void{ enqueue("trackPageview", _arg1); } public function setClientInfo(_arg1:Boolean):void{ enqueue("setClientInfo", _arg1); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ enqueue("linkByPost", _arg1, _arg2); } public function setCookieTimeout(_arg1:int):void{ enqueue("setCookieTimeout", _arg1); } public function isEmpty():Boolean{ return ((_ar.length == 0)); } public function getDetectTitle():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment.")); }; return (false); } public function resetSession():void{ enqueue("resetSession"); } public function setDetectFlash(_arg1:Boolean):void{ enqueue("setDetectFlash", _arg1); } public function clear():void{ _ar = []; } public function setCampNameKey(_arg1:String):void{ enqueue("setCampNameKey", _arg1); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ enqueue("addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function createEventTracker(_arg1:String):EventTracker{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment.")); }; return (null); } public function setVar(_arg1:String):void{ enqueue("setVar", _arg1); } public function clearIgnoredOrganic():void{ enqueue("clearIgnoredOrganic"); } public function setDomainName(_arg1:String):void{ enqueue("setDomainName", _arg1); } public function setCampSourceKey(_arg1:String):void{ enqueue("setCampSourceKey", _arg1); } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment.")); }; return (null); } public function setCampContentKey(_arg1:String):void{ enqueue("setCampContentKey", _arg1); } public function setLocalServerMode():void{ enqueue("setLocalServerMode"); } public function getLocalGifPath():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment.")); }; return (""); } public function setAllowAnchor(_arg1:Boolean):void{ enqueue("setAllowAnchor", _arg1); } public function clearIgnoredRef():void{ enqueue("clearIgnoredRef"); } public function setLocalGifPath(_arg1:String):void{ enqueue("setLocalGifPath", _arg1); } public function getVersion():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment.")); }; return (""); } public function setCookiePath(_arg1:String):void{ enqueue("setCookiePath", _arg1); } public function setSampleRate(_arg1:Number):void{ enqueue("setSampleRate", _arg1); } public function setDetectTitle(_arg1:Boolean):void{ enqueue("setDetectTitle", _arg1); } public function setAllowHash(_arg1:Boolean):void{ enqueue("setAllowHash", _arg1); } public function addIgnoredOrganic(_arg1:String):void{ enqueue("addIgnoredOrganic", _arg1); } public function setCampNOKey(_arg1:String):void{ enqueue("setCampNOKey", _arg1); } public function getServiceMode():ServerOperationMode{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment.")); }; return (null); } public function setLocalRemoteServerMode():void{ enqueue("setLocalRemoteServerMode"); } public function cookiePathCopy(_arg1:String):void{ enqueue("cookiePathCopy", _arg1); } public function getDetectFlash():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment.")); }; return (false); } public function setCampaignTrack(_arg1:Boolean):void{ enqueue("setCampaignTrack", _arg1); } public function clearOrganic():void{ enqueue("clearOrganic"); } public function setCampTermKey(_arg1:String):void{ enqueue("setCampTermKey", _arg1); } public function addIgnoredRef(_arg1:String):void{ enqueue("addIgnoredRef", _arg1); } public function setCampMediumKey(_arg1:String):void{ enqueue("setCampMediumKey", _arg1); } public function setSessionTimeout(_arg1:int):void{ enqueue("setSessionTimeout", _arg1); } public function setRemoteServerMode():void{ enqueue("setRemoteServerMode"); } public function element(){ return (_ar[0]); } public function getAccount():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment.")); }; return (""); } } }//package com.google.analytics.core
Section 107
//TrackerMode (com.google.analytics.core.TrackerMode) package com.google.analytics.core { public class TrackerMode { public static const BRIDGE:String = "Bridge"; public static const AS3:String = "AS3"; } }//package com.google.analytics.core
Section 108
//Utils (com.google.analytics.core.Utils) package com.google.analytics.core { public class Utils { public static function trim(_arg1:String, _arg2:Boolean=false):String{ var _local3:Array; var _local4:String; var _local5:int; var _local6:int; var _local7:int; if (_arg1 == ""){ return (""); }; _local3 = [" ", "\n", "\r", "\t"]; _local4 = _arg1; if (_arg2){ _local5 = 0; while ((((_local5 < _local3.length)) && ((_local4.indexOf(_local3[_local5]) > -1)))) { _local4 = _local4.split(_local3[_local5]).join(""); _local5++; }; } else { _local6 = 0; while ((((_local6 < _local4.length)) && ((_local3.indexOf(_local4.charAt(_local6)) > -1)))) { _local6++; }; _local4 = _local4.substr(_local6); _local7 = (_local4.length - 1); while ((((_local7 >= 0)) && ((_local3.indexOf(_local4.charAt(_local7)) > -1)))) { _local7--; }; _local4 = _local4.substring(0, (_local7 + 1)); }; return (_local4); } public static function generateHash(_arg1:String):int{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local2 = 1; _local3 = 0; if (((!((_arg1 == null))) && (!((_arg1 == ""))))){ _local2 = 0; _local4 = (_arg1.length - 1); while (_local4 >= 0) { _local5 = _arg1.charCodeAt(_local4); _local2 = ((((_local2 << 6) & 268435455) + _local5) + (_local5 << 14)); _local3 = (_local2 & 266338304); if (_local3 != 0){ _local2 = (_local2 ^ (_local3 >> 21)); }; _local4--; }; }; return (_local2); } public static function generate32bitRandom():int{ return (Math.round((Math.random() * 2147483647))); } public static function validateAccount(_arg1:String):Boolean{ var _local2:RegExp; _local2 = /^UA-[0-9]*-[0-9]*$/; return (_local2.test(_arg1)); } } }//package com.google.analytics.core
Section 109
//Cookie (com.google.analytics.data.Cookie) package com.google.analytics.data { public interface Cookie { function fromSharedObject(_arg1:Object):void; function toURLString():String; function get creation():Date; function toSharedObject():Object; function isExpired():Boolean; function set creation(_arg1:Date):void; function set expiration(_arg1:Date):void; function get expiration():Date; } }//package com.google.analytics.data
Section 110
//UTMA (com.google.analytics.data.UTMA) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMA extends UTMCookie { private var _sessionId:Number; private var _domainHash:Number; private var _firstTime:Number; private var _currentTime:Number; private var _lastTime:Number; private var _sessionCount:Number; public function UTMA(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:Number=NaN, _arg6:Number=NaN){ super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000)); this.domainHash = _arg1; this.sessionId = _arg2; this.firstTime = _arg3; this.lastTime = _arg4; this.currentTime = _arg5; this.sessionCount = _arg6; } public function get lastTime():Number{ return (_lastTime); } public function set lastTime(_arg1:Number):void{ _lastTime = _arg1; update(); } public function set currentTime(_arg1:Number):void{ _currentTime = _arg1; update(); } public function get sessionId():Number{ return (_sessionId); } public function get sessionCount():Number{ return (_sessionCount); } public function get firstTime():Number{ return (_firstTime); } public function get currentTime():Number{ return (_currentTime); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set sessionId(_arg1:Number):void{ _sessionId = _arg1; update(); } public function set sessionCount(_arg1:Number):void{ _sessionCount = _arg1; update(); } public function get domainHash():Number{ return (_domainHash); } public function set firstTime(_arg1:Number):void{ _firstTime = _arg1; update(); } } }//package com.google.analytics.data
Section 111
//UTMB (com.google.analytics.data.UTMB) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMB extends UTMCookie { private var _trackCount:Number; private var _lastTime:Number; private var _domainHash:Number; private var _token:Number; public static var defaultTimespan:Number = Timespan.thirtyminutes; public function UTMB(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN){ super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000)); this.domainHash = _arg1; this.trackCount = _arg2; this.token = _arg3; this.lastTime = _arg4; } public function set token(_arg1:Number):void{ _token = _arg1; update(); } public function set trackCount(_arg1:Number):void{ _trackCount = _arg1; update(); } public function get lastTime():Number{ return (_lastTime); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set lastTime(_arg1:Number):void{ _lastTime = _arg1; update(); } public function get domainHash():Number{ return (_domainHash); } public function get token():Number{ return (_token); } public function get trackCount():Number{ return (_trackCount); } } }//package com.google.analytics.data
Section 112
//UTMC (com.google.analytics.data.UTMC) package com.google.analytics.data { public class UTMC extends UTMCookie { private var _domainHash:Number; public function UTMC(_arg1:Number=NaN){ super("utmc", "__utmc", ["domainHash"]); this.domainHash = _arg1; } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function get domainHash():Number{ return (_domainHash); } } }//package com.google.analytics.data
Section 113
//UTMCookie (com.google.analytics.data.UTMCookie) package com.google.analytics.data { import com.google.analytics.core.*; public class UTMCookie implements Cookie { protected var inURL:String; protected var name:String; private var _creation:Date; private var _expiration:Date; public var proxy:Buffer; private var _timespan:Number; protected var fields:Array; public function UTMCookie(_arg1:String, _arg2:String, _arg3:Array, _arg4:Number=0){ this.name = _arg1; this.inURL = _arg2; this.fields = _arg3; _timestamp(_arg4); } public function isEmpty():Boolean{ var _local1:int; var _local2:String; var _local3:int; _local1 = 0; _local3 = 0; while (_local3 < fields.length) { _local2 = fields[_local3]; if ((((this[_local2] is Number)) && (isNaN(this[_local2])))){ _local1++; } else { if ((((this[_local2] is String)) && ((this[_local2] == "")))){ _local1++; }; }; _local3++; }; if (_local1 == fields.length){ return (true); }; return (false); } protected function update():void{ resetTimestamp(); if (proxy){ proxy.update(name, toSharedObject()); }; } public function fromSharedObject(_arg1:Object):void{ var _local2:String; var _local3:int; var _local4:int; _local3 = fields.length; _local4 = 0; while (_local4 < _local3) { _local2 = fields[_local4]; if (_arg1[_local2]){ this[_local2] = _arg1[_local2]; }; _local4++; }; if (_arg1.creation){ this.creation = _arg1.creation; }; if (_arg1.expiration){ this.expiration = _arg1.expiration; }; } private function _timestamp(_arg1:Number):void{ creation = new Date(); _timespan = _arg1; if (_arg1 > 0){ expiration = new Date((creation.valueOf() + _arg1)); }; } public function isExpired():Boolean{ var _local1:Date; var _local2:Number; _local1 = new Date(); _local2 = (expiration.valueOf() - _local1.valueOf()); if (_local2 <= 0){ return (true); }; return (false); } public function set expiration(_arg1:Date):void{ _expiration = _arg1; } public function get creation():Date{ return (_creation); } public function reset():void{ var _local1:String; var _local2:int; _local2 = 0; while (_local2 < fields.length) { _local1 = fields[_local2]; if ((this[_local1] is Number)){ this[_local1] = NaN; } else { if ((this[_local1] is String)){ this[_local1] = ""; }; }; _local2++; }; resetTimestamp(); update(); } public function valueOf():String{ var _local1:Array; var _local2:String; var _local3:*; var _local4:int; _local1 = []; _local4 = 0; while (_local4 < fields.length) { _local2 = fields[_local4]; _local3 = this[_local2]; if ((_local3 is String)){ if (_local3 == ""){ _local3 = "-"; _local1.push(_local3); } else { _local1.push(_local3); }; } else { if ((_local3 is Number)){ if (_local3 == 0){ _local1.push(_local3); } else { if (isNaN(_local3)){ _local3 = "-"; _local1.push(_local3); } else { _local1.push(_local3); }; }; }; }; _local4++; }; return (("" + _local1.join("."))); } public function resetTimestamp(_arg1:Number=NaN):void{ if (!isNaN(_arg1)){ _timespan = _arg1; }; _creation = null; _expiration = null; _timestamp(_timespan); } public function get expiration():Date{ if (_expiration){ return (_expiration); }; return (new Date((new Date().valueOf() + 1000))); } public function toURLString():String{ return (((inURL + "=") + valueOf())); } public function toSharedObject():Object{ var _local1:Object; var _local2:String; var _local3:*; var _local4:int; _local1 = {}; _local4 = 0; for (;_local4 < fields.length;_local4++) { _local2 = fields[_local4]; _local3 = this[_local2]; if ((_local3 is String)){ _local1[_local2] = _local3; } else { if (_local3 == 0){ _local1[_local2] = _local3; } else { if (isNaN(_local3)){ continue; } else { _local1[_local2] = _local3; }; }; }; }; _local1.creation = creation; _local1.expiration = expiration; return (_local1); } public function toString(_arg1:Boolean=false):String{ var _local2:Array; var _local3:String; var _local4:*; var _local5:int; var _local6:int; var _local7:String; _local2 = []; _local5 = fields.length; _local6 = 0; for (;_local6 < _local5;_local6++) { _local3 = fields[_local6]; _local4 = this[_local3]; if ((_local4 is String)){ _local2.push((((_local3 + ": \"") + _local4) + "\"")); } else { if (_local4 == 0){ _local2.push(((_local3 + ": ") + _local4)); } else { if (isNaN(_local4)){ continue; } else { _local2.push(((_local3 + ": ") + _local4)); }; }; }; }; _local7 = (((name.toUpperCase() + " {") + _local2.join(", ")) + "}"); if (_arg1){ _local7 = (_local7 + (((" creation:" + creation) + ", expiration:") + expiration)); }; return (_local7); } public function set creation(_arg1:Date):void{ _creation = _arg1; } } }//package com.google.analytics.data
Section 114
//UTMK (com.google.analytics.data.UTMK) package com.google.analytics.data { public class UTMK extends UTMCookie { private var _hash:Number; public function UTMK(_arg1:Number=NaN){ super("utmk", "__utmk", ["hash"]); this.hash = _arg1; } public function set hash(_arg1:Number):void{ _hash = _arg1; update(); } public function get hash():Number{ return (_hash); } } }//package com.google.analytics.data
Section 115
//UTMV (com.google.analytics.data.UTMV) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMV extends UTMCookie { private var _domainHash:Number; private var _value:String; public function UTMV(_arg1:Number=NaN, _arg2:String=""){ super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000)); this.domainHash = _arg1; this.value = _arg2; } override public function toURLString():String{ return (((inURL + "=") + encodeURI(valueOf()))); } public function get value():String{ return (_value); } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set value(_arg1:String):void{ _value = _arg1; update(); } } }//package com.google.analytics.data
Section 116
//UTMZ (com.google.analytics.data.UTMZ) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMZ extends UTMCookie { private var _campaignTracking:String; private var _campaignCreation:Number; private var _responseCount:Number; private var _domainHash:Number; private var _campaignSessions:Number; public static var defaultTimespan:Number = Timespan.sixmonths; public function UTMZ(_arg1:Number=NaN, _arg2:Number=NaN, _arg3:Number=NaN, _arg4:Number=NaN, _arg5:String=""){ super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000)); this.domainHash = _arg1; this.campaignCreation = _arg2; this.campaignSessions = _arg3; this.responseCount = _arg4; this.campaignTracking = _arg5; } public function set responseCount(_arg1:Number):void{ _responseCount = _arg1; update(); } public function set domainHash(_arg1:Number):void{ _domainHash = _arg1; update(); } public function set campaignCreation(_arg1:Number):void{ _campaignCreation = _arg1; update(); } public function get campaignTracking():String{ return (_campaignTracking); } public function get campaignSessions():Number{ return (_campaignSessions); } public function get domainHash():Number{ return (_domainHash); } public function get responseCount():Number{ return (_responseCount); } public function get campaignCreation():Number{ return (_campaignCreation); } public function set campaignSessions(_arg1:Number):void{ _campaignSessions = _arg1; update(); } public function set campaignTracking(_arg1:String):void{ _campaignTracking = _arg1; update(); } } }//package com.google.analytics.data
Section 117
//X10 (com.google.analytics.data.X10) package com.google.analytics.data { public class X10 { private var _delimEnd:String;// = ")" private var _delimSet:String;// = "*" private var _escapeChar:String;// = "'" private var _delimBegin:String;// = "(" private var _delimNumValue:String;// = "!" private var _key:String;// = "k" private var _set:Array; private var _projectData:Object; private var _hasData:int; private var _escapeCharMap:Object; private var _minimum:int; private var _value:String;// = "v" public function X10(){ _key = "k"; _value = "v"; _set = [_key, _value]; _delimBegin = "("; _delimEnd = ")"; _delimSet = "*"; _delimNumValue = "!"; _escapeChar = "'"; super(); _projectData = {}; _escapeCharMap = {}; _escapeCharMap[_escapeChar] = "'0"; _escapeCharMap[_delimEnd] = "'1"; _escapeCharMap[_delimSet] = "'2"; _escapeCharMap[_delimNumValue] = "'3"; _minimum = 1; } private function _clearInternal(_arg1:Number, _arg2:String):void{ var _local3:Boolean; var _local4:int; var _local5:int; if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){ _projectData[_arg1][_arg2] = undefined; _local3 = true; _local5 = _set.length; _local4 = 0; while (_local4 < _local5) { if (_projectData[_arg1][_set[_local4]] != undefined){ _local3 = false; break; }; _local4++; }; if (_local3){ _projectData[_arg1] = undefined; _hasData = (_hasData - 1); }; }; } public function hasData():Boolean{ return ((_hasData > 0)); } private function _setInternal(_arg1:Number, _arg2:String, _arg3:Number, _arg4:String):void{ if (!hasProject(_arg1)){ _projectData[_arg1] = {}; }; if (_projectData[_arg1][_arg2] == undefined){ _projectData[_arg1][_arg2] = []; }; _projectData[_arg1][_arg2][_arg3] = _arg4; _hasData = (_hasData + 1); } public function hasProject(_arg1:Number):Boolean{ return (_projectData[_arg1]); } public function clearKey(_arg1:Number):void{ _clearInternal(_arg1, _key); } private function _renderDataType(_arg1:Array):String{ var _local2:Array; var _local3:String; var _local4:int; _local2 = []; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4] != undefined){ _local3 = ""; if (((!((_local4 == _minimum))) && ((_arg1[(_local4 - 1)] == undefined)))){ _local3 = (_local3 + _local4.toString()); _local3 = (_local3 + _delimNumValue); }; _local3 = (_local3 + _escapeExtensibleValue(_arg1[_local4])); _local2.push(_local3); }; _local4++; }; return (((_delimBegin + _local2.join(_delimSet)) + _delimEnd)); } public function getKey(_arg1:Number, _arg2:Number):String{ return ((_getInternal(_arg1, _key, _arg2) as String)); } public function clearValue(_arg1:Number):void{ _clearInternal(_arg1, _value); } public function renderMergedUrlString(_arg1:X10=null):String{ var _local2:Array; var _local3:String; if (!_arg1){ return (renderUrlString()); }; _local2 = [_arg1.renderUrlString()]; for (_local3 in _projectData) { if (((hasProject(Number(_local3))) && (!(_arg1.hasProject(Number(_local3)))))){ _local2.push((_local3 + _renderProject(_projectData[_local3]))); }; }; return (_local2.join("")); } public function setValue(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ if (((((!((Math.round(_arg3) == _arg3))) || (isNaN(_arg3)))) || ((_arg3 == Infinity)))){ return (false); }; _setInternal(_arg1, _value, _arg2, _arg3.toString()); return (true); } public function renderUrlString():String{ var _local1:Array; var _local2:String; _local1 = []; for (_local2 in _projectData) { if (hasProject(Number(_local2))){ _local1.push((_local2 + _renderProject(_projectData[_local2]))); }; }; return (_local1.join("")); } private function _getInternal(_arg1:Number, _arg2:String, _arg3:Number):Object{ if (((hasProject(_arg1)) && (!((_projectData[_arg1][_arg2] == undefined))))){ return (_projectData[_arg1][_arg2][_arg3]); }; return (undefined); } public function setKey(_arg1:Number, _arg2:Number, _arg3:String):Boolean{ _setInternal(_arg1, _key, _arg2, _arg3); return (true); } public function getValue(_arg1:Number, _arg2:Number){ var _local3:*; _local3 = _getInternal(_arg1, _value, _arg2); if (_local3 == null){ return (null); }; return (Number(_local3)); } private function _renderProject(_arg1:Object):String{ var _local2:String; var _local3:Boolean; var _local4:int; var _local5:Array; var _local6:int; _local2 = ""; _local3 = false; _local6 = _set.length; _local4 = 0; while (_local4 < _local6) { _local5 = _arg1[_set[_local4]]; if (_local5){ if (_local3){ _local2 = (_local2 + _set[_local4]); }; _local2 = (_local2 + _renderDataType(_local5)); _local3 = false; } else { _local3 = true; }; _local4++; }; return (_local2); } private function _escapeExtensibleValue(_arg1:String):String{ var _local2:String; var _local3:int; var _local4:String; var _local5:String; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1.charAt(_local3); _local5 = _escapeCharMap[_local4]; if (_local5){ _local2 = (_local2 + _local5); } else { _local2 = (_local2 + _local4); }; _local3++; }; return (_local2); } } }//package com.google.analytics.data
Section 118
//_Style (com.google.analytics.debug._Style) package com.google.analytics.debug { import flash.net.*; import flash.text.*; public class _Style { public var borderColor:uint; public var backgroundColor:uint; private var _sheet:StyleSheet; public var roundedCorner:uint; public var alertColor:uint; public var infoColor:uint; public var successColor:uint; private var _loader:URLLoader; public var failureColor:uint; private var _defaultSheet:String; public var warningColor:uint; public function _Style(){ _sheet = new StyleSheet(); _loader = new URLLoader(); _init(); } private function _parseSheet(_arg1:String):void{ _sheet.parseCSS(_arg1); } public function get sheet():StyleSheet{ return (_sheet); } private function _init():void{ _defaultSheet = ""; _defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n"); _defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n"); _defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + "\n"); roundedCorner = 6; backgroundColor = 0xCCCCCC; borderColor = 0x555555; infoColor = 16777113; alertColor = 0xFFCC00; warningColor = 0xCC0000; successColor = 0xFF00; failureColor = 0xFF0000; _parseSheet(_defaultSheet); } } }//package com.google.analytics.debug
Section 119
//Alert (com.google.analytics.debug.Alert) package com.google.analytics.debug { import flash.events.*; public class Alert extends Label { public var actionOnNextLine:Boolean;// = true public var autoClose:Boolean;// = true private var _actions:Array; public function Alert(_arg1:String, _arg2:Array, _arg3:String="uiAlert", _arg4:uint=0, _arg5:Align=null, _arg6:Boolean=false, _arg7:Boolean=true){ var _local8:int; autoClose = true; actionOnNextLine = true; if (_arg4 == 0){ _arg4 = Style.alertColor; }; if (_arg5 == null){ _arg5 = Align.center; }; super(_arg1, _arg3, _arg4, _arg5, _arg6); this.selectable = true; super.mouseChildren = true; this.buttonMode = true; this.mouseEnabled = true; this.useHandCursor = true; this.actionOnNextLine = _arg7; _actions = []; _local8 = 0; while (_local8 < _arg2.length) { _arg2[_local8].container = this; _actions.push(_arg2[_local8]); _local8++; }; } protected function getAction(_arg1:String):AlertAction{ var _local2:int; _local2 = 0; while (_local2 < _actions.length) { if (_arg1 == _actions[_local2].activator){ return (_actions[_local2]); }; _local2++; }; return (null); } override protected function layout():void{ super.layout(); _defineActions(); } protected function spaces(_arg1:int):String{ var _local2:String; var _local3:String; var _local4:int; _local2 = ""; _local3 = " "; _local4 = 0; while (_local4 < (_arg1 + 1)) { _local2 = (_local2 + _local3); _local4++; }; return (_local2); } override public function onLink(_arg1:TextEvent):void{ var _local2:AlertAction; if (isValidAction(_arg1.text)){ _local2 = getAction(_arg1.text); if (_local2){ _local2.execute(); }; }; if (autoClose){ close(); }; } protected function isValidAction(_arg1:String):Boolean{ var _local2:int; _local2 = 0; while (_local2 < _actions.length) { if (_arg1 == _actions[_local2].activator){ return (true); }; _local2++; }; return (false); } private function _defineActions():void{ var _local1:String; var _local2:Array; var _local3:AlertAction; var _local4:int; _local1 = ""; if (actionOnNextLine){ _local1 = (_local1 + "\n"); } else { _local1 = (_local1 + " |"); }; _local1 = (_local1 + " "); _local2 = []; _local4 = 0; while (_local4 < _actions.length) { _local3 = _actions[_local4]; _local2.push((((("<a href=\"event:" + _local3.activator) + "\">") + _local3.name) + "</a>")); _local4++; }; _local1 = (_local1 + _local2.join(" | ")); appendText(_local1, "uiAlertAction"); } public function close():void{ if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 120
//AlertAction (com.google.analytics.debug.AlertAction) package com.google.analytics.debug { public class AlertAction { public var container:Alert; private var _callback; public var name:String; public var activator:String; public function AlertAction(_arg1:String, _arg2:String, _arg3){ this.name = _arg1; this.activator = _arg2; _callback = _arg3; } public function execute():void{ if (_callback){ if ((_callback is Function)){ (_callback as Function)(); } else { if ((_callback is String)){ var _local1 = container; _local1[_callback](); }; }; }; } } }//package com.google.analytics.debug
Section 121
//Align (com.google.analytics.debug.Align) package com.google.analytics.debug { public class Align { private var _value:int; private var _name:String; public static const bottomRight:Align = new Align(18, "bottomRight"); ; public static const right:Align = new Align(16, "right"); ; public static const left:Align = new Align(32, "left"); ; public static const topRight:Align = new Align(17, "topRight"); ; public static const bottom:Align = new Align(2, "bottom"); ; public static const bottomLeft:Align = new Align(34, "bottomLeft"); ; public static const topLeft:Align = new Align(33, "topLeft"); ; public static const center:Align = new Align(0x0100, "center"); ; public static const none:Align = new Align(0, "none"); ; public static const top:Align = new Align(1, "top"); ; public function Align(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 122
//Background (com.google.analytics.debug.Background) package com.google.analytics.debug { import flash.display.*; public class Background { public static function drawRounded(_arg1, _arg2:Graphics, _arg3:uint=0, _arg4:uint=0):void{ var _local5:uint; var _local6:uint; var _local7:uint; _local7 = Style.roundedCorner; if ((((_arg3 > 0)) && ((_arg4 > 0)))){ _local5 = _arg3; _local6 = _arg4; } else { _local5 = _arg1.width; _local6 = _arg1.height; }; if (((_arg1.stickToEdge) && (!((_arg1.alignement == Align.none))))){ switch (_arg1.alignement){ case Align.top: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, _local7); break; case Align.topLeft: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, 0, _local7); break; case Align.topRight: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, 0, _local7, 0); break; case Align.bottom: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, _local7, 0, 0); break; case Align.bottomLeft: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, 0); break; case Align.bottomRight: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, 0, 0); break; case Align.left: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, 0, _local7, 0, _local7); break; case Align.right: _arg2.drawRoundRectComplex(0, 0, _local5, _local6, _local7, 0, _local7, 0); break; case Align.center: _arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7); break; }; } else { _arg2.drawRoundRect(0, 0, _local5, _local6, _local7, _local7); }; } } }//package com.google.analytics.debug
Section 123
//Debug (com.google.analytics.debug.Debug) package com.google.analytics.debug { import flash.events.*; import flash.ui.*; public class Debug extends Label { private var _lines:Array; private var _preferredForcedWidth:uint;// = 540 private var _linediff:int;// = 0 public var maxLines:uint;// = 16 public static var count:uint = 0; public function Debug(_arg1:uint=0, _arg2:Align=null, _arg3:Boolean=false){ if (_arg2 == null){ _arg2 = Align.bottom; }; super("", "uiLabel", _arg1, _arg2, _arg3); this.name = ("Debug" + count++); _lines = []; selectable = true; addEventListener(KeyboardEvent.KEY_DOWN, onKey); } public function writeBold(_arg1:String):void{ write(_arg1, true); } private function _getLinesToDisplay(_arg1:int=0):Array{ var _local2:Array; var _local3:uint; var _local4:uint; if ((_lines.length - 1) > maxLines){ if ((_linediff <= 0)){ _linediff = (_linediff + _arg1); } else { if ((((_linediff > 0)) && ((_arg1 < 0)))){ _linediff = (_linediff + _arg1); }; }; _local3 = ((_lines.length - maxLines) + _linediff); _local4 = (_local3 + maxLines); _local2 = _lines.slice(_local3, _local4); } else { _local2 = _lines; }; return (_local2); } private function onKey(_arg1:KeyboardEvent=null):void{ var _local2:Array; switch (_arg1.keyCode){ case Keyboard.DOWN: _local2 = _getLinesToDisplay(1); break; case Keyboard.UP: _local2 = _getLinesToDisplay(-1); break; default: _local2 = null; }; if (_local2 == null){ return; }; text = _local2.join("\n"); } override public function get forcedWidth():uint{ if (this.parent){ if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){ return (_preferredForcedWidth); }; return (UISprite(this.parent).forcedWidth); //unresolved jump }; return (super.forcedWidth); } public function write(_arg1:String, _arg2:Boolean=false):void{ var _local3:Array; if (_arg1.indexOf("") > -1){ _local3 = _arg1.split("\n"); } else { _local3 = [_arg1]; }; var _local4 = ""; var _local5 = ""; if (_arg2){ _local4 = "<b>"; _local5 = "</b>"; }; var _local6:int; while (_local6 < _local3.length) { _lines.push(((_local4 + _local3[_local6]) + _local5)); _local6++; }; var _local7:Array = _getLinesToDisplay(); text = _local7.join("\n"); } public function close():void{ dispose(); } override protected function dispose():void{ removeEventListener(KeyboardEvent.KEY_DOWN, onKey); super.dispose(); } } }//package com.google.analytics.debug
Section 124
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration) package com.google.analytics.debug { import com.google.analytics.core.*; import flash.net.*; import flash.utils.*; import flash.ui.*; public class DebugConfiguration { public var showHideKey:Number; private var _mode:VisualDebugMode; private var _verbose:Boolean;// = false public var destroyKey:Number; public var GIFRequests:Boolean;// = false public var showInfos:Boolean;// = true public var infoTimeout:Number;// = 1000 public var minimizedOnStart:Boolean;// = false private var _active:Boolean;// = false public var traceOutput:Boolean;// = false public var layout:ILayout; public var warningTimeout:Number;// = 1500 public var javascript:Boolean;// = false public var showWarnings:Boolean;// = true private var _visualInitialized:Boolean;// = false public function DebugConfiguration(){ _mode = VisualDebugMode.basic; showHideKey = Keyboard.SPACE; destroyKey = Keyboard.BACKSPACE; super(); } public function get verbose():Boolean{ return (_verbose); } public function set verbose(_arg1:Boolean):void{ _verbose = _arg1; } public function set mode(_arg1):void{ if ((_arg1 is String)){ switch (_arg1){ case "geek": _arg1 = VisualDebugMode.geek; break; case "advanced": _arg1 = VisualDebugMode.advanced; break; case "basic": default: _arg1 = VisualDebugMode.basic; }; }; _mode = _arg1; } public function success(_arg1:String):void{ if (layout){ layout.createSuccessAlert(_arg1); }; if (traceOutput){ trace((("[+] " + _arg1) + " !!")); }; } public function get active():Boolean{ return (_active); } private function _initializeVisual():void{ if (layout){ layout.init(); _visualInitialized = true; }; } private function _destroyVisual():void{ if (((layout) && (_visualInitialized))){ layout.destroy(); }; } public function warning(_arg1:String, _arg2:VisualDebugMode=null):void{ if (_filter(_arg2)){ return; }; if (((layout) && (showWarnings))){ layout.createWarning(_arg1); }; if (traceOutput){ trace((("## " + _arg1) + " ##")); }; } private function _filter(_arg1:VisualDebugMode=null):Boolean{ return (((_arg1) && ((int(_arg1) >= int(this.mode))))); } public function failure(_arg1:String):void{ if (layout){ layout.createFailureAlert(_arg1); }; if (traceOutput){ trace((("[-] " + _arg1) + " !!")); }; } public function get mode(){ return (_mode); } public function set active(_arg1:Boolean):void{ _active = _arg1; if (_active){ _initializeVisual(); } else { _destroyVisual(); }; } protected function trace(_arg1:String):void{ var _local7:Array; var _local8:int; var _local2:Array = []; var _local3 = ""; var _local4 = ""; if (this.mode == VisualDebugMode.geek){ _local3 = (getTimer() + " - "); _local4 = (new Array(_local3.length).join(" ") + " "); }; if (_arg1.indexOf("\n") > -1){ _local7 = _arg1.split("\n"); _local8 = 0; while (_local8 < _local7.length) { if (_local7[_local8] == ""){ } else { if (_local8 == 0){ _local2.push((_local3 + _local7[_local8])); } else { _local2.push((_local4 + _local7[_local8])); }; }; _local8++; }; } else { _local2.push((_local3 + _arg1)); }; var _local5:int = _local2.length; var _local6:int; while (_local6 < _local5) { trace(_local2[_local6]); _local6++; }; } public function alert(_arg1:String):void{ if (layout){ layout.createAlert(_arg1); }; if (traceOutput){ trace((("!! " + _arg1) + " !!")); }; } public function info(_arg1:String, _arg2:VisualDebugMode=null):void{ if (_filter(_arg2)){ return; }; if (((layout) && (showInfos))){ layout.createInfo(_arg1); }; if (traceOutput){ trace(_arg1); }; } public function alertGifRequest(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{ if (layout){ layout.createGIFRequestAlert(_arg1, _arg2, _arg3); }; if (traceOutput){ trace(((">> " + _arg1) + " <<")); }; } } }//package com.google.analytics.debug
Section 125
//FailureAlert (com.google.analytics.debug.FailureAlert) package com.google.analytics.debug { public class FailureAlert extends Alert { public function FailureAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){ var _local4:Align; var _local5:Boolean; var _local6:Boolean; _local4 = Align.bottomLeft; _local5 = true; _local6 = false; if (_arg1.verbose){ _arg2 = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + _arg2); _local4 = Align.center; _local5 = false; _local6 = true; }; super(_arg2, _arg3, "uiFailure", Style.failureColor, _local4, _local5, _local6); } } }//package com.google.analytics.debug
Section 126
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert) package com.google.analytics.debug { public class GIFRequestAlert extends Alert { public function GIFRequestAlert(_arg1:String, _arg2:Array){ super(_arg1, _arg2); } } }//package com.google.analytics.debug
Section 127
//ILayout (com.google.analytics.debug.ILayout) package com.google.analytics.debug { import com.google.analytics.core.*; import flash.net.*; import flash.display.*; public interface ILayout { function createWarning(_arg1:String):void; function addToStage(_arg1:DisplayObject):void; function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void; function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void; function createInfo(_arg1:String):void; function createFailureAlert(_arg1:String):void; function addToPanel(_arg1:String, _arg2:DisplayObject):void; function init():void; function createSuccessAlert(_arg1:String):void; function createVisualDebug():void; function createAlert(_arg1:String):void; function destroy():void; function bringToFront(_arg1:DisplayObject):void; function isAvailable():Boolean; } }//package com.google.analytics.debug
Section 128
//Info (com.google.analytics.debug.Info) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Info extends Label { private var _timer:Timer; public function Info(_arg1:String="", _arg2:uint=3000){ super(_arg1, "uiInfo", Style.infoColor, Align.top, true); if (_arg2 > 0){ _timer = new Timer(_arg2, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function onComplete(_arg1:TimerEvent):void{ close(); } override public function onLink(_arg1:TextEvent):void{ switch (_arg1.text){ case "hide": close(); break; }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 129
//Label (com.google.analytics.debug.Label) package com.google.analytics.debug { import flash.events.*; import flash.display.*; import flash.text.*; public class Label extends UISprite { private var _color:uint; private var _background:Shape; private var _textField:TextField; public var stickToEdge:Boolean; private var _text:String; protected var selectable:Boolean; private var _tag:String; public static var count:uint = 0; public function Label(_arg1:String="", _arg2:String="uiLabel", _arg3:uint=0, _arg4:Align=null, _arg5:Boolean=false){ this.name = ("Label" + count++); selectable = false; _background = new Shape(); _textField = new TextField(); _text = _arg1; _tag = _arg2; if (_arg4 == null){ _arg4 = Align.none; }; this.alignement = _arg4; this.stickToEdge = _arg5; if (_arg3 == 0){ _arg3 = Style.backgroundColor; }; _color = _arg3; _textField.addEventListener(TextEvent.LINK, onLink); } public function get tag():String{ return (_tag); } private function _draw():void{ var _local1:Graphics = _background.graphics; _local1.clear(); _local1.beginFill(_color); var _local2:uint = _textField.width; var _local3:uint = _textField.height; if (forcedWidth > 0){ _local2 = forcedWidth; }; Background.drawRounded(this, _local1, _local2, _local3); _local1.endFill(); } public function get text():String{ return (_textField.text); } public function appendText(_arg1:String, _arg2:String=""):void{ if (_arg1 == ""){ return; }; if (_arg2 == ""){ _arg2 = tag; }; _textField.htmlText = (_textField.htmlText + (((("<span class=\"" + _arg2) + "\">") + _arg1) + "</span>")); _text = (_text + _arg1); _draw(); resize(); } public function set text(_arg1:String):void{ if (_arg1 == ""){ _arg1 = _text; }; _textField.htmlText = (((("<span class=\"" + tag) + "\">") + _arg1) + "</span>"); _text = _arg1; _draw(); resize(); } override protected function layout():void{ _textField.type = TextFieldType.DYNAMIC; _textField.autoSize = TextFieldAutoSize.LEFT; _textField.background = false; _textField.selectable = selectable; _textField.multiline = true; _textField.styleSheet = Style.sheet; this.text = _text; addChild(_background); addChild(_textField); } public function set tag(_arg1:String):void{ _tag = _arg1; text = ""; } public function onLink(_arg1:TextEvent):void{ } override protected function dispose():void{ _textField.removeEventListener(TextEvent.LINK, onLink); super.dispose(); } } }//package com.google.analytics.debug
Section 130
//Layout (com.google.analytics.debug.Layout) package com.google.analytics.debug { import com.google.analytics.core.*; import flash.net.*; import flash.events.*; import flash.display.*; import com.google.analytics.*; public class Layout implements ILayout { private var _display:DisplayObject; private var _infoQueue:Array; private var _maxCharPerLine:int;// = 85 private var _hasInfo:Boolean; private var _warningQueue:Array; private var _hasDebug:Boolean; private var _hasWarning:Boolean; private var _mainPanel:Panel; private var _GRAlertQueue:Array; private var _debug:DebugConfiguration; public var visualDebug:Debug; private var _hasGRAlert:Boolean; public function Layout(_arg1:DebugConfiguration, _arg2:DisplayObject){ _display = _arg2; _debug = _arg1; _hasWarning = false; _hasInfo = false; _hasDebug = false; _hasGRAlert = false; _warningQueue = []; _infoQueue = []; _GRAlertQueue = []; } private function onKey(_arg1:KeyboardEvent=null):void{ switch (_arg1.keyCode){ case _debug.showHideKey: _mainPanel.visible = !(_mainPanel.visible); break; case _debug.destroyKey: destroy(); break; }; } public function createWarning(_arg1:String):void{ if (((_hasWarning) || (!(isAvailable())))){ _warningQueue.push(_arg1); return; }; _arg1 = _filterMaxChars(_arg1); _hasWarning = true; var _local2:Warning = new Warning(_arg1, _debug.warningTimeout); addToPanel("analytics", _local2); _local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true); if (_hasDebug){ visualDebug.writeBold(_arg1); }; } public function bringToFront(_arg1:DisplayObject):void{ _display.stage.setChildIndex(_arg1, (_display.stage.numChildren - 1)); } public function createFailureAlert(_arg1:String):void{ var _local2:AlertAction; if (_debug.verbose){ _arg1 = _filterMaxChars(_arg1); _local2 = new AlertAction("Close", "close", "close"); } else { _local2 = new AlertAction("X", "close", "close"); }; var _local3:Alert = new FailureAlert(_debug, _arg1, [_local2]); addToPanel("analytics", _local3); if (_hasDebug){ if (_debug.verbose){ _arg1 = _arg1.split("\n").join(""); _arg1 = _filterMaxChars(_arg1, 66); }; visualDebug.writeBold(_arg1); }; } public function init():void{ var _local1 = 10; var _local2:uint = (_display.stage.stageWidth - (_local1 * 2)); var _local3:uint = (_display.stage.stageHeight - (_local1 * 2)); var _local4:Panel = new Panel("analytics", _local2, _local3); _local4.alignement = Align.top; _local4.stickToEdge = false; _local4.title = ("Google Analytics v" + GATracker.version); _mainPanel = _local4; addToStage(_local4); bringToFront(_local4); if (_debug.minimizedOnStart){ _mainPanel.onToggle(); }; createVisualDebug(); _display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true); } public function addToPanel(_arg1:String, _arg2:DisplayObject):void{ var _local4:Panel; var _local3:DisplayObject = _display.stage.getChildByName(_arg1); if (_local3){ _local4 = (_local3 as Panel); _local4.addData(_arg2); } else { trace((("panel \"" + _arg1) + "\" not found")); }; } private function _clearInfo(_arg1:Event):void{ _hasInfo = false; if (_infoQueue.length > 0){ createInfo(_infoQueue.shift()); }; } private function _filterMaxChars(_arg1:String, _arg2:int=0):String{ var _local6:String; var _local3 = "\n"; var _local4:Array = []; var _local5:Array = _arg1.split(_local3); if (_arg2 == 0){ _arg2 = _maxCharPerLine; }; var _local7:int; while (_local7 < _local5.length) { _local6 = _local5[_local7]; while (_local6.length > _arg2) { _local4.push(_local6.substr(0, _arg2)); _local6 = _local6.substring(_arg2); }; _local4.push(_local6); _local7++; }; return (_local4.join(_local3)); } private function _clearGRAlert(_arg1:Event):void{ _hasGRAlert = false; if (_GRAlertQueue.length > 0){ createGIFRequestAlert.apply(this, _GRAlertQueue.shift()); }; } public function createSuccessAlert(_arg1:String):void{ var _local2:AlertAction; if (_debug.verbose){ _arg1 = _filterMaxChars(_arg1); _local2 = new AlertAction("Close", "close", "close"); } else { _local2 = new AlertAction("X", "close", "close"); }; var _local3:Alert = new SuccessAlert(_debug, _arg1, [_local2]); addToPanel("analytics", _local3); if (_hasDebug){ if (_debug.verbose){ _arg1 = _arg1.split("\n").join(""); _arg1 = _filterMaxChars(_arg1, 66); }; visualDebug.writeBold(_arg1); }; } public function isAvailable():Boolean{ return (!((_display.stage == null))); } public function createAlert(_arg1:String):void{ _arg1 = _filterMaxChars(_arg1); var _local2:Alert = new Alert(_arg1, [new AlertAction("Close", "close", "close")]); addToPanel("analytics", _local2); if (_hasDebug){ visualDebug.writeBold(_arg1); }; } public function createInfo(_arg1:String):void{ if (((_hasInfo) || (!(isAvailable())))){ _infoQueue.push(_arg1); return; }; _arg1 = _filterMaxChars(_arg1); _hasInfo = true; var _local2:Info = new Info(_arg1, _debug.infoTimeout); addToPanel("analytics", _local2); _local2.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true); if (_hasDebug){ visualDebug.write(_arg1); }; } public function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void{ var message = _arg1; var request = _arg2; var ref = _arg3; if (_hasGRAlert){ _GRAlertQueue.push([message, request, ref]); return; }; _hasGRAlert = true; var f:Function = function ():void{ ref.sendRequest(request); }; message = _filterMaxChars(message); var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]); addToPanel("analytics", gra); gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.write(message); }; } public function createVisualDebug():void{ if (!visualDebug){ visualDebug = new Debug(); visualDebug.alignement = Align.bottom; visualDebug.stickToEdge = true; addToPanel("analytics", visualDebug); _hasDebug = true; }; } public function addToStage(_arg1:DisplayObject):void{ _display.stage.addChild(_arg1); } private function _clearWarning(_arg1:Event):void{ _hasWarning = false; if (_warningQueue.length > 0){ createWarning(_warningQueue.shift()); }; } public function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void{ var _local4:Panel = new Panel(_arg1, _arg2, _arg3); _local4.alignement = Align.center; _local4.stickToEdge = false; addToStage(_local4); bringToFront(_local4); } public function destroy():void{ _mainPanel.close(); _debug.layout = null; } } }//package com.google.analytics.debug
Section 131
//Margin (com.google.analytics.debug.Margin) package com.google.analytics.debug { public class Margin { public var bottom:int; public var top:int; public var right:int; public var left:int; public function Margin(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){ this.top = _arg1; this.bottom = _arg2; this.left = _arg3; this.right = _arg4; } } }//package com.google.analytics.debug
Section 132
//Panel (com.google.analytics.debug.Panel) package com.google.analytics.debug { import flash.events.*; import flash.display.*; public class Panel extends UISprite { private var _savedH:uint; private var _data:UISprite; private var _mask:Sprite; private var _background:Shape; private var _savedW:uint; private var _stickToEdge:Boolean; private var _border:Shape; private var _borderColor:uint; protected var baseAlpha:Number; private var _backgroundColor:uint; private var _title:Label; private var _colapsed:Boolean; private var _name:String; public function Panel(_arg1:String, _arg2:uint, _arg3:uint, _arg4:uint=0, _arg5:uint=0, _arg6:Number=0.3, _arg7:Align=null, _arg8:Boolean=false){ _name = _arg1; this.name = _arg1; this.mouseEnabled = false; _colapsed = false; forcedWidth = _arg2; forcedHeight = _arg3; this.baseAlpha = _arg6; _background = new Shape(); _data = new UISprite(); _data.forcedWidth = _arg2; _data.forcedHeight = _arg3; _data.mouseEnabled = false; _title = new Label(_arg1, "uiLabel", 0xFFFFFF, Align.topLeft, _arg8); _title.buttonMode = true; _title.margin.top = 0.6; _title.margin.left = 0.6; _title.addEventListener(MouseEvent.CLICK, onToggle); _title.mouseChildren = false; _border = new Shape(); _mask = new Sprite(); _mask.useHandCursor = false; _mask.mouseEnabled = false; _mask.mouseChildren = false; if (_arg7 == null){ _arg7 = Align.none; }; this.alignement = _arg7; this.stickToEdge = _arg8; if (_arg4 == 0){ _arg4 = Style.backgroundColor; }; _backgroundColor = _arg4; if (_arg5 == 0){ _arg5 = Style.borderColor; }; _borderColor = _arg5; } public function get stickToEdge():Boolean{ return (_stickToEdge); } public function onToggle(_arg1:MouseEvent=null):void{ if (_colapsed){ _data.visible = true; } else { _data.visible = false; }; _colapsed = !(_colapsed); _update(); resize(); } public function set stickToEdge(_arg1:Boolean):void{ _stickToEdge = _arg1; _title.stickToEdge = _arg1; } override protected function dispose():void{ _title.removeEventListener(MouseEvent.CLICK, onToggle); super.dispose(); } private function _draw():void{ var _local1:uint; var _local2:uint; if (((_savedW) && (_savedH))){ forcedWidth = _savedW; forcedHeight = _savedH; }; if (!_colapsed){ _local1 = forcedWidth; _local2 = forcedHeight; } else { _local1 = _title.width; _local2 = _title.height; _savedW = forcedWidth; _savedH = forcedHeight; forcedWidth = _local1; forcedHeight = _local2; }; var _local3:Graphics = _background.graphics; _local3.clear(); _local3.beginFill(_backgroundColor); Background.drawRounded(this, _local3, _local1, _local2); _local3.endFill(); var _local4:Graphics = _data.graphics; _local4.clear(); _local4.beginFill(_backgroundColor, 0); Background.drawRounded(this, _local4, _local1, _local2); _local4.endFill(); var _local5:Graphics = _border.graphics; _local5.clear(); _local5.lineStyle(0.1, _borderColor); Background.drawRounded(this, _local5, _local1, _local2); _local5.endFill(); var _local6:Graphics = _mask.graphics; _local6.clear(); _local6.beginFill(_backgroundColor); Background.drawRounded(this, _local6, (_local1 + 1), (_local2 + 1)); _local6.endFill(); } public function get title():String{ return (_title.text); } private function _update():void{ _draw(); if (baseAlpha < 1){ _background.alpha = baseAlpha; _border.alpha = baseAlpha; }; } public function addData(_arg1:DisplayObject):void{ _data.addChild(_arg1); } override protected function layout():void{ _update(); addChild(_background); addChild(_data); addChild(_title); addChild(_border); addChild(_mask); mask = _mask; } public function set title(_arg1:String):void{ _title.text = _arg1; } public function close():void{ dispose(); if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 133
//Style (com.google.analytics.debug.Style) package com.google.analytics.debug { public const Style:_Style = new _Style(); }//package com.google.analytics.debug
Section 134
//SuccessAlert (com.google.analytics.debug.SuccessAlert) package com.google.analytics.debug { public class SuccessAlert extends Alert { public function SuccessAlert(_arg1:DebugConfiguration, _arg2:String, _arg3:Array){ var _local4:Align; var _local5:Boolean; var _local6:Boolean; _local4 = Align.bottomLeft; _local5 = true; _local6 = false; if (_arg1.verbose){ _arg2 = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + _arg2); _local4 = Align.center; _local5 = false; _local6 = true; }; super(_arg2, _arg3, "uiSuccess", Style.successColor, _local4, _local5, _local6); } } }//package com.google.analytics.debug
Section 135
//UISprite (com.google.analytics.debug.UISprite) package com.google.analytics.debug { import flash.events.*; import flash.display.*; public class UISprite extends Sprite { private var _forcedHeight:uint; protected var listenResize:Boolean; public var alignement:Align; private var _forcedWidth:uint; public var margin:Margin; protected var alignTarget:DisplayObject; public function UISprite(_arg1:DisplayObject=null){ listenResize = false; alignement = Align.none; this.alignTarget = _arg1; margin = new Margin(); addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); } protected function dispose():void{ var _local1:DisplayObject; var _local2:int; _local2 = 0; while (_local2 < numChildren) { _local1 = getChildAt(_local2); if (_local1){ removeChild(_local1); }; _local2++; }; } protected function layout():void{ } public function get forcedHeight():uint{ if (_forcedHeight){ return (_forcedHeight); }; return (height); } public function alignTo(_arg1:Align, _arg2:DisplayObject=null):void{ var _local3:uint; var _local4:uint; var _local5:uint; var _local6:uint; var _local7:UISprite; if (_arg2 == null){ if ((parent is Stage)){ _arg2 = this.stage; } else { _arg2 = parent; }; }; if (_arg2 == this.stage){ if (this.stage == null){ return; }; _local3 = this.stage.stageHeight; _local4 = this.stage.stageWidth; _local5 = 0; _local6 = 0; } else { _local7 = (_arg2 as UISprite); if (_local7.forcedHeight){ _local3 = _local7.forcedHeight; } else { _local3 = _local7.height; }; if (_local7.forcedWidth){ _local4 = _local7.forcedWidth; } else { _local4 = _local7.width; }; _local5 = 0; _local6 = 0; }; switch (_arg1){ case Align.top: x = ((_local4 / 2) - (forcedWidth / 2)); y = (_local6 + margin.top); break; case Align.bottom: x = ((_local4 / 2) - (forcedWidth / 2)); y = (((_local6 + _local3) - forcedHeight) - margin.bottom); break; case Align.left: x = (_local5 + margin.left); y = ((_local3 / 2) - (forcedHeight / 2)); break; case Align.right: x = (((_local5 + _local4) - forcedWidth) - margin.right); y = ((_local3 / 2) - (forcedHeight / 2)); break; case Align.center: x = ((_local4 / 2) - (forcedWidth / 2)); y = ((_local3 / 2) - (forcedHeight / 2)); break; case Align.topLeft: x = (_local5 + margin.left); y = (_local6 + margin.top); break; case Align.topRight: x = (((_local5 + _local4) - forcedWidth) - margin.right); y = (_local6 + margin.top); break; case Align.bottomLeft: x = (_local5 + margin.left); y = (((_local6 + _local3) - forcedHeight) - margin.bottom); break; case Align.bottomRight: x = (((_local5 + _local4) - forcedWidth) - margin.right); y = (((_local6 + _local3) - forcedHeight) - margin.bottom); break; }; if (((!(listenResize)) && (!((_arg1 == Align.none))))){ _arg2.addEventListener(Event.RESIZE, onResize, false, 0, true); listenResize = true; }; this.alignement = _arg1; this.alignTarget = _arg2; } public function get forcedWidth():uint{ if (_forcedWidth){ return (_forcedWidth); }; return (width); } protected function onResize(_arg1:Event):void{ resize(); } private function _onRemovedFromStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); dispose(); } public function resize():void{ if (alignement != Align.none){ alignTo(alignement, alignTarget); }; } private function _onAddedToStage(_arg1:Event):void{ layout(); resize(); } public function set forcedHeight(_arg1:uint):void{ _forcedHeight = _arg1; } public function set forcedWidth(_arg1:uint):void{ _forcedWidth = _arg1; } } }//package com.google.analytics.debug
Section 136
//Warning (com.google.analytics.debug.Warning) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Warning extends Label { private var _timer:Timer; public function Warning(_arg1:String="", _arg2:uint=3000){ super(_arg1, "uiWarning", Style.warningColor, Align.top, false); margin.top = 32; if (_arg2 > 0){ _timer = new Timer(_arg2, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function onComplete(_arg1:TimerEvent):void{ close(); } override public function onLink(_arg1:TextEvent):void{ switch (_arg1.text){ case "hide": close(); break; }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 137
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode) package com.google.analytics.debug { public class VisualDebugMode { private var _value:int; private var _name:String; public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced"); ; public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek"); ; public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic"); ; public function VisualDebugMode(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 138
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent) package com.google.analytics.events { import flash.events.*; import com.google.analytics.*; public class AnalyticsEvent extends Event { public var tracker:AnalyticsTracker; public static const READY:String = "ready"; public function AnalyticsEvent(_arg1:String, _arg2:AnalyticsTracker, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.tracker = _arg2; } override public function clone():Event{ return (new AnalyticsEvent(type, tracker, bubbles, cancelable)); } } }//package com.google.analytics.events
Section 139
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals) package com.google.analytics.external { import com.google.analytics.debug.*; public class AdSenseGlobals extends JavascriptProxy { private var _gaGlobalVerified:Boolean;// = false public static var gaGlobal_js:XML = <script> <![CDATA[ function() { try { gaGlobal } catch(e) { gaGlobal = {} ; } } ]]> </script> ; public function AdSenseGlobals(_arg1:DebugConfiguration){ _gaGlobalVerified = false; super(_arg1); } public function set vid(_arg1:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.vid", _arg1); } public function get hid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.hid")); } public function get dh():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.dh")); } public function get gaGlobal():Object{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal")); } public function set hid(_arg1:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.hid", _arg1); } public function get sid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.sid")); } private function _verify():void{ if (!_gaGlobalVerified){ executeBlock(gaGlobal_js); _gaGlobalVerified = true; }; } public function get vid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.vid")); } public function set sid(_arg1:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.sid", _arg1); } } }//package com.google.analytics.external
Section 140
//HTMLDOM (com.google.analytics.external.HTMLDOM) package com.google.analytics.external { import com.google.analytics.debug.*; public class HTMLDOM extends JavascriptProxy { private var _referrer:String; private var _protocol:String; private var _host:String; private var _location:String; private var _pathname:String; private var _title:String; private var _characterSet:String; private var _search:String; private var _language:String; private var _colorDepth:String; public static var cache_properties_js:XML = <script> <![CDATA[ function() { var obj = {}; obj.host = document.location.host; obj.language = navigator.language ? navigator.language : navigator.browserLanguage; obj.characterSet = document.characterSet ? document.characterSet : document.charset; obj.colorDepth = window.screen.colorDepth; obj.location = document.location.toString(); obj.pathname = document.location.pathname; obj.protocol = document.location.protocol; obj.search = document.location.search; obj.referrer = document.referrer; obj.title = document.title; return obj; } ]]> </script> ; public function HTMLDOM(_arg1:DebugConfiguration){ super(_arg1); } public function get search():String{ if (_search){ return (_search); }; if (!isAvailable()){ return (null); }; _search = getProperty("document.location.search"); return (_search); } public function get location():String{ if (_location){ return (_location); }; if (!isAvailable()){ return (null); }; _location = getPropertyString("document.location"); return (_location); } public function get pathname():String{ if (_pathname){ return (_pathname); }; if (!isAvailable()){ return (null); }; _pathname = getProperty("document.location.pathname"); return (_pathname); } public function get referrer():String{ if (_referrer){ return (_referrer); }; if (!isAvailable()){ return (null); }; _referrer = getProperty("document.referrer"); return (_referrer); } public function get protocol():String{ if (_protocol){ return (_protocol); }; if (!isAvailable()){ return (null); }; _protocol = getProperty("document.location.protocol"); return (_protocol); } public function cacheProperties():void{ var _local1:Object; if (!isAvailable()){ return; }; _local1 = call(cache_properties_js); if (_local1){ _host = _local1.host; _language = _local1.language; _characterSet = _local1.characterSet; _colorDepth = _local1.colorDepth; _location = _local1.location; _pathname = _local1.pathname; _protocol = _local1.protocol; _search = _local1.search; _referrer = _local1.referrer; _title = _local1.title; }; } public function get colorDepth():String{ if (_colorDepth){ return (_colorDepth); }; if (!isAvailable()){ return (null); }; _colorDepth = getProperty("window.screen.colorDepth"); return (_colorDepth); } public function get title():String{ if (_title){ return (_title); }; if (!isAvailable()){ return (null); }; _title = getProperty("document.title"); return (_title); } public function get host():String{ if (_host){ return (_host); }; if (!isAvailable()){ return (null); }; _host = getProperty("document.location.host"); return (_host); } public function get characterSet():String{ var _local1:String; if (_characterSet){ return (_characterSet); }; if (!isAvailable()){ return (null); }; _local1 = getProperty("document.characterSet"); if (_local1 == null){ _local1 = getProperty("document.charset"); }; _characterSet = _local1; return (_characterSet); } public function get language():String{ var _local1:String; if (_language){ return (_language); }; if (!isAvailable()){ return (null); }; _local1 = getProperty("navigator.language"); if (_local1 == null){ _local1 = getProperty("navigator.browserLanguage"); }; _language = _local1; return (_language); } } }//package com.google.analytics.external
Section 141
//JavascriptProxy (com.google.analytics.external.JavascriptProxy) package com.google.analytics.external { import com.google.analytics.debug.*; import flash.system.*; import flash.external.*; public class JavascriptProxy { private var _notAvailableWarning:Boolean;// = true private var _debug:DebugConfiguration; public static var setProperty_js:XML = <script> <![CDATA[ function( path , value ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } target[ prop ] = value ; } ]]> </script> ; public static var hasProperty_js:XML = <script> <![CDATA[ function( path ) { var paths; if( path.indexOf(".") > 0 ) { paths = path.split("."); } else { paths = [path]; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } if( target ) { return true; } else { return false; } } ]]> </script> ; public static var setPropertyRef_js:XML = <script> <![CDATA[ function( path , target ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } alert( "paths:"+paths.length+", prop:"+prop ); var targets; var name; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } alert( "targets:"+targets.length+", name:"+name ); var root = window; var len = paths.length; for( var i = 0 ; i < len ; i++ ) { root = root[ paths[i] ] ; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } root[ prop ] = ref[name] ; } ]]> </script> ; public function JavascriptProxy(_arg1:DebugConfiguration){ _notAvailableWarning = true; super(); _debug = _arg1; } public function getProperty(_arg1:String){ return (call((_arg1 + ".valueOf"))); } public function hasProperty(_arg1:String):Boolean{ return (call(hasProperty_js, _arg1)); } public function setProperty(_arg1:String, _arg2):void{ call(setProperty_js, _arg1, _arg2); } public function executeBlock(_arg1:String):void{ var data = _arg1; if (isAvailable()){ try { ExternalInterface.call(data); } catch(e:SecurityError) { if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; } catch(e:Error) { if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message)); }; }; }; } public function getPropertyString(_arg1:String):String{ return (call((_arg1 + ".toString"))); } public function setPropertyByReference(_arg1:String, _arg2:String):void{ call(setPropertyRef_js, _arg1, _arg2); } public function call(_arg1:String, ... _args){ var output:String; var functionName = _arg1; var args = _args; if (isAvailable()){ try { if (((_debug.javascript) && (_debug.verbose))){ output = ""; output = ("Flash->JS: " + functionName); output = (output + "( "); if (args.length > 0){ output = (output + args.join(",")); }; output = (output + " )"); _debug.info(output); }; args.unshift(functionName); return (ExternalInterface.call.apply(ExternalInterface, args)); } catch(e:SecurityError) { if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; } catch(e:Error) { if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + e.message)); }; }; }; return (null); } public function isAvailable():Boolean{ var _local1:Boolean; _local1 = ExternalInterface.available; if (((_local1) && ((Capabilities.playerType == "External")))){ _local1 = false; }; if (((((!(_local1)) && (_debug.javascript))) && (_notAvailableWarning))){ _debug.warning("ExternalInterface is not available."); _notAvailableWarning = false; }; return (_local1); } } }//package com.google.analytics.external
Section 142
//Environment (com.google.analytics.utils.Environment) package com.google.analytics.utils { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; import flash.system.*; public class Environment { private var _dom:HTMLDOM; private var _appName:String; private var _debug:DebugConfiguration; private var _appVersion:Version; private var _url:String; private var _protocol:Protocols; private var _userAgent:UserAgent; public function Environment(_arg1:String="", _arg2:String="", _arg3:String="", _arg4:DebugConfiguration=null, _arg5:HTMLDOM=null){ var _local6:Version; super(); if (_arg2 == ""){ if (isAIR()){ _arg2 = "AIR"; } else { _arg2 = "Flash"; }; }; if (_arg3 == ""){ _local6 = flashVersion; } else { _local6 = Version.fromString(_arg3); }; _url = _arg1; _appName = _arg2; _appVersion = _local6; _debug = _arg4; _dom = _arg5; } public function isAIR():Boolean{ return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application")))); } public function get playerType():String{ return (Capabilities.playerType); } public function get locationSearch():String{ var _local1:String; _local1 = _dom.search; if (_local1){ return (_local1); }; return (""); } public function get protocol():Protocols{ if (!_protocol){ _findProtocol(); }; return (_protocol); } public function get flashVersion():Version{ var _local1:Version; _local1 = Version.fromString(Capabilities.version.split(" ")[1], ","); return (_local1); } public function get screenWidth():Number{ return (Capabilities.screenResolutionX); } public function get languageEncoding():String{ var _local1:String; if (System.useCodePage){ _local1 = _dom.characterSet; if (_local1){ return (_local1); }; return ("-"); }; return ("UTF-8"); } public function get appName():String{ return (_appName); } public function get screenColorDepth():String{ var _local1:String; var _local2:String; switch (Capabilities.screenColor){ case "bw": _local1 = "1"; break; case "gray": _local1 = "2"; break; case "color": default: _local1 = "24"; }; _local2 = _dom.colorDepth; if (_local2){ _local1 = _local2; }; return (_local1); } private function _findProtocol():void{ var _local1:Protocols; var _local2:String; var _local3:String; var _local4:String; var _local5:String; _local1 = Protocols.none; if (_url != ""){ _local4 = _url.toLowerCase(); _local5 = _local4.substr(0, 5); switch (_local5){ case "file:": _local1 = Protocols.file; break; case "http:": _local1 = Protocols.HTTP; break; case "https": if (_local4.charAt(5) == ":"){ _local1 = Protocols.HTTPS; }; break; default: _protocol = Protocols.none; }; }; _local2 = _dom.protocol; _local3 = (_local1.toString() + ":").toLowerCase(); if (((((_local2) && (!((_local2 == _local3))))) && (_debug))){ _debug.warning(((("Protocol mismatch: SWF=" + _local3) + ", DOM=") + _local2)); }; _protocol = _local1; } public function get locationSWFPath():String{ return (_url); } public function get platform():String{ var _local1:String; _local1 = Capabilities.manufacturer; return (_local1.split("Adobe ")[1]); } public function get operatingSystem():String{ return (Capabilities.os); } public function set appName(_arg1:String):void{ _appName = _arg1; userAgent.applicationProduct = _arg1; } public function get userAgent():UserAgent{ if (!_userAgent){ _userAgent = new UserAgent(this, appName, appVersion.toString(4)); }; return (_userAgent); } ga_internal function set url(_arg1:String):void{ _url = _arg1; } public function get referrer():String{ var _local1:String; _local1 = _dom.referrer; if (_local1){ return (_local1); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function isInHTML():Boolean{ return ((Capabilities.playerType == "PlugIn")); } public function get language():String{ var _local1:String; var _local2:String; _local1 = _dom.language; _local2 = Capabilities.language; if (_local1){ if ((((_local1.length > _local2.length)) && ((_local1.substr(0, _local2.length) == _local2)))){ _local2 = _local1; }; }; return (_local2); } public function get domainName():String{ var _local1:String; var _local2:String; var _local3:int; if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){ _local1 = _url.toLowerCase(); if (protocol == Protocols.HTTP){ _local2 = _local1.split("http://").join(""); } else { if (protocol == Protocols.HTTPS){ _local2 = _local1.split("https://").join(""); }; }; _local3 = _local2.indexOf("/"); if (_local3 > -1){ _local2 = _local2.substring(0, _local3); }; return (_local2); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function set userAgent(_arg1:UserAgent):void{ _userAgent = _arg1; } public function set appVersion(_arg1:Version):void{ _appVersion = _arg1; userAgent.applicationVersion = _arg1.toString(4); } public function get screenHeight():Number{ return (Capabilities.screenResolutionY); } public function get locationPath():String{ var _local1:String; _local1 = _dom.pathname; if (_local1){ return (_local1); }; return (""); } public function get documentTitle():String{ var _local1:String; _local1 = _dom.title; if (_local1){ return (_local1); }; return (""); } public function get appVersion():Version{ return (_appVersion); } } }//package com.google.analytics.utils
Section 143
//Protocols (com.google.analytics.utils.Protocols) package com.google.analytics.utils { public class Protocols { private var _value:int; private var _name:String; public static const none:Protocols = new Protocols(0, "none"); ; public static const HTTPS:Protocols = new Protocols(3, "HTTPS"); ; public static const file:Protocols = new Protocols(1, "file"); ; public static const HTTP:Protocols = new Protocols(2, "HTTP"); ; public function Protocols(_arg1:int=0, _arg2:String=""){ _value = _arg1; _name = _arg2; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.utils
Section 144
//Timespan (com.google.analytics.utils.Timespan) package com.google.analytics.utils { public class Timespan { public static var sixmonths:Number = 15768000; public static var twoyears:Number = 63072000; public static var thirtyminutes:Number = 1800; } }//package com.google.analytics.utils
Section 145
//URL (com.google.analytics.utils.URL) package com.google.analytics.utils { public class URL { private var _url:String; public function URL(_arg1:String=""){ _url = _arg1.toLowerCase(); } public function get domain():String{ var _local1:Array; if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){ _local1 = hostName.split("."); switch (_local1.length){ case 2: return (hostName); case 3: if (_local1[1] == "co"){ return (hostName); }; _local1.shift(); return (_local1.join(".")); case 4: _local1.shift(); return (_local1.join(".")); }; }; return (""); } public function get path():String{ var _local1:String = _url; if (_local1.indexOf("://") > -1){ _local1 = _local1.split("://")[1]; }; if (_local1.indexOf(hostName) == 0){ _local1 = _local1.substr(hostName.length); }; if (_local1.indexOf("?") > -1){ _local1 = _local1.split("?")[0]; }; if (_local1.charAt(0) != "/"){ _local1 = ("/" + _local1); }; return (_local1); } public function get protocol():Protocols{ var _local1:String = _url.split("://")[0]; switch (_local1){ case "file": return (Protocols.file); case "http": return (Protocols.HTTP); case "https": return (Protocols.HTTPS); default: return (Protocols.none); }; } public function get hostName():String{ var _local1:String = _url; if (_local1.indexOf("://") > -1){ _local1 = _local1.split("://")[1]; }; if (_local1.indexOf("/") > -1){ _local1 = _local1.split("/")[0]; }; if (_local1.indexOf("?") > -1){ _local1 = _local1.split("?")[0]; }; if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){ return (""); }; return (_local1); } public function get subDomain():String{ if (((!((domain == ""))) && (!((domain == hostName))))){ return (hostName.split(("." + domain)).join("")); }; return (""); } public function get search():String{ var _local1:String = _url; if (_local1.indexOf("://") > -1){ _local1 = _local1.split("://")[1]; }; if (_local1.indexOf(hostName) == 0){ _local1 = _local1.substr(hostName.length); }; if (_local1.indexOf("?") > -1){ _local1 = _local1.split("?")[1]; } else { _local1 = ""; }; return (_local1); } } }//package com.google.analytics.utils
Section 146
//UserAgent (com.google.analytics.utils.UserAgent) package com.google.analytics.utils { import com.google.analytics.core.*; import flash.system.*; public class UserAgent { private var _version:Version; private var _localInfo:Environment; private var _applicationProduct:String; public static var minimal:Boolean = false; public function UserAgent(_arg1:Environment, _arg2:String="", _arg3:String=""){ _localInfo = _arg1; applicationProduct = _arg2; _version = Version.fromString(_arg3); } public function get tamarinProductToken():String{ if (UserAgent.minimal){ return (""); }; if (System.vmVersion){ return (("Tamarin/" + Utils.trim(System.vmVersion, true))); }; return (""); } public function set applicationProduct(_arg1:String):void{ _applicationProduct = _arg1; } public function get applicationVersion():String{ return (_version.toString(2)); } public function get applicationProductToken():String{ var _local1:String; _local1 = applicationProduct; if (applicationVersion != ""){ _local1 = (_local1 + ("/" + applicationVersion)); }; return (_local1); } public function get vendorProductToken():String{ var _local1:String; _local1 = ""; if (_localInfo.isAIR()){ _local1 = (_local1 + "AIR"); } else { _local1 = (_local1 + "FlashPlayer"); }; _local1 = (_local1 + "/"); _local1 = (_local1 + _version.toString(3)); return (_local1); } public function toString():String{ var _local1:String; _local1 = ""; _local1 = (_local1 + applicationProductToken); if (applicationComment != ""){ _local1 = (_local1 + (" " + applicationComment)); }; if (tamarinProductToken != ""){ _local1 = (_local1 + (" " + tamarinProductToken)); }; if (vendorProductToken != ""){ _local1 = (_local1 + (" " + vendorProductToken)); }; return (_local1); } public function get applicationComment():String{ var _local1:Array; _local1 = []; _local1.push(_localInfo.platform); _local1.push(_localInfo.playerType); if (!UserAgent.minimal){ _local1.push(_localInfo.operatingSystem); _local1.push(_localInfo.language); }; if (Capabilities.isDebugger){ _local1.push("DEBUG"); }; if (_local1.length > 0){ return ((("(" + _local1.join("; ")) + ")")); }; return (""); } public function set applicationVersion(_arg1:String):void{ _version = Version.fromString(_arg1); } public function get applicationProduct():String{ return (_applicationProduct); } } }//package com.google.analytics.utils
Section 147
//Variables (com.google.analytics.utils.Variables) package com.google.analytics.utils { import flash.net.*; public dynamic class Variables { public var post:Array; public var URIencode:Boolean; public var pre:Array; public var sort:Boolean;// = true public function Variables(_arg1:String=null, _arg2:Array=null, _arg3:Array=null){ pre = []; post = []; super(); if (_arg1){ decode(_arg1); }; if (_arg2){ this.pre = _arg2; }; if (_arg3){ this.post = _arg3; }; } private function _join(_arg1:Variables):void{ var _local2:String; if (!_arg1){ return; }; for (_local2 in _arg1) { this[_local2] = _arg1[_local2]; }; } public function join(... _args):void{ var _local2:int = _args.length; var _local3:int; while (_local3 < _local2) { if (!(_args[_local3] is Variables)){ } else { _join(_args[_local3]); }; _local3++; }; } public function toString():String{ var _local2:String; var _local3:String; var _local4:String; var _local5:int; var _local6:int; var _local7:String; var _local8:String; var _local1:Array = []; for (_local3 in this) { _local2 = this[_local3]; if (URIencode){ _local2 = encodeURI(_local2); }; _local1.push(((_local3 + "=") + _local2)); }; if (sort){ _local1.sort(); }; if (pre.length > 0){ pre.reverse(); _local5 = 0; while (_local5 < pre.length) { _local7 = pre[_local5]; _local6 = 0; while (_local6 < _local1.length) { _local4 = _local1[_local6]; if (_local4.indexOf(_local7) == 0){ _local1.unshift(_local1.splice(_local6, 1)[0]); }; _local6++; }; _local5++; }; pre.reverse(); }; if (post.length > 0){ _local5 = 0; while (_local5 < post.length) { _local8 = post[_local5]; _local6 = 0; while (_local6 < _local1.length) { _local4 = _local1[_local6]; if (_local4.indexOf(_local8) == 0){ _local1.push(_local1.splice(_local6, 1)[0]); }; _local6++; }; _local5++; }; }; return (_local1.join("&")); } public function decode(_arg1:String):void{ var _local2:Array; var _local3:String; var _local4:String; var _local5:String; var _local6:Array; if (_arg1 == ""){ return; }; if (_arg1.indexOf("&") > -1){ _local2 = _arg1.split("&"); } else { _local2 = [_arg1]; }; var _local7:int; while (_local7 < _local2.length) { _local3 = _local2[_local7]; if (_local3.indexOf("=") > -1){ _local6 = _local3.split("="); _local4 = _local6[0]; _local5 = decodeURI(_local6[1]); this[_local4] = _local5; }; _local7++; }; } public function toURLVariables():URLVariables{ var _local2:String; var _local1:URLVariables = new URLVariables(); for (_local2 in this) { _local1[_local2] = this[_local2]; }; return (_local1); } } }//package com.google.analytics.utils
Section 148
//Version (com.google.analytics.utils.Version) package com.google.analytics.utils { public class Version { private var _maxBuild:uint;// = 0xFF private var _maxMinor:uint;// = 15 private var _maxMajor:uint;// = 15 private var _revision:uint; private var _separator:String;// = "." private var _maxRevision:uint;// = 0xFFFF private var _build:uint; private var _minor:uint; private var _major:uint; public function Version(_arg1:uint=0, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0){ var _local5:Version; _maxMajor = 15; _maxMinor = 15; _maxBuild = 0xFF; _maxRevision = 0xFFFF; _separator = "."; super(); if ((((((((_arg1 > _maxMajor)) && ((_arg2 == 0)))) && ((_arg3 == 0)))) && ((_arg4 == 0)))){ _local5 = Version.fromNumber(_arg1); _arg1 = _local5.major; _arg2 = _local5.minor; _arg3 = _local5.build; _arg4 = _local5.revision; }; this.major = _arg1; this.minor = _arg2; this.build = _arg3; this.revision = _arg4; } public function toString(_arg1:int=0):String{ var _local2:Array; if ((((_arg1 <= 0)) || ((_arg1 > 4)))){ _arg1 = getFields(); }; switch (_arg1){ case 1: _local2 = [major]; break; case 2: _local2 = [major, minor]; break; case 3: _local2 = [major, minor, build]; break; case 4: default: _local2 = [major, minor, build, revision]; }; return (_local2.join(_separator)); } public function get revision():uint{ return (_revision); } public function set build(_arg1:uint):void{ _build = Math.min(_arg1, _maxBuild); } public function set minor(_arg1:uint):void{ _minor = Math.min(_arg1, _maxMinor); } public function get build():uint{ return (_build); } public function set major(_arg1:uint):void{ _major = Math.min(_arg1, _maxMajor); } public function get minor():uint{ return (_minor); } public function valueOf():uint{ return (((((major << 28) | (minor << 24)) | (build << 16)) | revision)); } public function get major():uint{ return (_major); } public function set revision(_arg1:uint):void{ _revision = Math.min(_arg1, _maxRevision); } private function getFields():int{ var _local1:int; _local1 = 4; if (revision == 0){ _local1--; }; if ((((_local1 == 3)) && ((build == 0)))){ _local1--; }; if ((((_local1 == 2)) && ((minor == 0)))){ _local1--; }; return (_local1); } public function equals(_arg1):Boolean{ if (!(_arg1 is Version)){ return (false); }; if ((((((((_arg1.major == major)) && ((_arg1.minor == minor)))) && ((_arg1.build == build)))) && ((_arg1.revision == revision)))){ return (true); }; return (false); } public static function fromString(_arg1:String="", _arg2:String="."):Version{ var _local3:Version; var _local4:Array; _local3 = new (Version); if ((((_arg1 == "")) || ((_arg1 == null)))){ return (_local3); }; if (_arg1.indexOf(_arg2) > -1){ _local4 = _arg1.split(_arg2); _local3.major = parseInt(_local4[0]); _local3.minor = parseInt(_local4[1]); _local3.build = parseInt(_local4[2]); _local3.revision = parseInt(_local4[3]); } else { _local3.major = parseInt(_arg1); }; return (_local3); } public static function fromNumber(_arg1:Number=0):Version{ var _local2:Version; _local2 = new (Version); if (((((((((((isNaN(_arg1)) || ((_arg1 == 0)))) || ((_arg1 < 0)))) || ((_arg1 == Number.MAX_VALUE)))) || ((_arg1 == Number.POSITIVE_INFINITY)))) || ((_arg1 == Number.NEGATIVE_INFINITY)))){ return (_local2); }; _local2.major = (_arg1 >>> 28); _local2.minor = ((_arg1 & 251658240) >>> 24); _local2.build = ((_arg1 & 0xFF0000) >>> 16); _local2.revision = (_arg1 & 0xFFFF); return (_local2); } } }//package com.google.analytics.utils
Section 149
//Bridge (com.google.analytics.v4.Bridge) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; public class Bridge implements GoogleAnalyticsAPI { private var _debug:DebugConfiguration; private var _proxy:JavascriptProxy; private var _jsContainer:String;// = "_GATracker" private var _hasGATracker:Boolean;// = false private var _account:String; private static var _linkTrackingObject_js:XML = <script> <![CDATA[ function( container , target ) { var targets ; var name ; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } window[container][target] = ref[name] ; } ]]> </script> ; private static var _createTrackingObject_js:XML = <script> <![CDATA[ function( acct ) { _GATracker[acct] = _gat._getTracker(acct); } ]]> </script> ; private static var _injectTrackingObject_js:XML = <script> <![CDATA[ function() { try { _GATracker } catch(e) { _GATracker = {}; } } ]]> </script> ; private static var _checkGAJS_js:XML = <script> <![CDATA[ function() { if( _gat && _gat._getTracker ) { return true; } return false; } ]]> </script> ; private static var _checkValidTrackingObject_js:XML = <script> <![CDATA[ function(acct) { if( _GATracker[acct] && (_GATracker[acct]._getAccount) ) { return true ; } else { return false; } } ]]> </script> ; public function Bridge(_arg1:String, _arg2:DebugConfiguration, _arg3:JavascriptProxy){ var _local4:String; var _local5:String; var _local6:String; super(); _account = _arg1; _debug = _arg2; _proxy = _arg3; if (!_checkGAJS()){ _local4 = ""; _local4 = (_local4 + "ga.js not found, be sure to check if\n"); _local4 = (_local4 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n"); _local4 = (_local4 + "is included in the HTML."); _debug.warning(_local4); throw (new Error(_local4)); }; if (!_hasGATracker){ if (((_debug.javascript) && (_debug.verbose))){ _local5 = ""; _local5 = (_local5 + "The Google Analytics tracking code was not found on the container page\n"); _local5 = (_local5 + "we create it"); _debug.info(_local5, VisualDebugMode.advanced); }; _injectTrackingObject(); }; if (Utils.validateAccount(_arg1)){ _createTrackingObject(_arg1); } else { if (_checkTrackingObject(_arg1)){ _linkTrackingObject(_arg1); } else { _local6 = ""; _local6 = (_local6 + (("JS Object \"" + _arg1) + "\" doesn't exist in DOM\n")); _local6 = (_local6 + "Bridge object not created."); _debug.warning(_local6); throw (new Error(_local6)); }; }; } public function link(_arg1:String, _arg2:Boolean=false):void{ _debug.info((((("link( " + _arg1) + ", ") + _arg2) + " )")); _call("_link", _arg1, _arg2); } public function addOrganic(_arg1:String, _arg2:String):void{ _debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )")); _call("_addOrganic", _arg1); } public function setAllowLinker(_arg1:Boolean):void{ _debug.info((("setAllowLinker( " + _arg1) + " )")); _call("_setAllowLinker", _arg1); } private function _linkTrackingObject(_arg1:String):void{ _proxy.call(_linkTrackingObject_js, _jsContainer, _arg1); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ var _local5 = 2; if (((_arg3) && (!((_arg3 == ""))))){ _local5 = 3; }; if ((((_local5 == 3)) && (!(isNaN(_arg4))))){ _local5 = 4; }; switch (_local5){ case 4: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )")); return (_call("_trackEvent", _arg1, _arg2, _arg3, _arg4)); case 3: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )")); return (_call("_trackEvent", _arg1, _arg2, _arg3)); case 2: default: _debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )")); return (_call("_trackEvent", _arg1, _arg2)); }; } public function setClientInfo(_arg1:Boolean):void{ _debug.info((("setClientInfo( " + _arg1) + " )")); _call("_setClientInfo", _arg1); } public function trackTrans():void{ _debug.info("trackTrans()"); _call("_trackTrans"); } public function setCookieTimeout(_arg1:int):void{ _debug.info((("setCookieTimeout( " + _arg1) + " )")); _call("_setCookieTimeout", _arg1); } public function trackPageview(_arg1:String=""):void{ _debug.info((("trackPageview( " + _arg1) + " )")); _call("_trackPageview", _arg1); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_call("_getClientInfo")); } private function _checkValidTrackingObject(_arg1:String):Boolean{ return (_proxy.call(_checkValidTrackingObject_js, _arg1)); } private function _checkGAJS():Boolean{ return (_proxy.call(_checkGAJS_js)); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _debug.warning((((("linkByPost( " + _arg1) + ", ") + _arg2) + " ) not implemented")); } private function _call(_arg1:String, ... _args){ _args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + _arg1)); return (_proxy.call.apply(_proxy, _args)); } public function hasGAJS():Boolean{ return (_checkGAJS()); } private function _checkTrackingObject(_arg1:String):Boolean{ var _local2:Boolean = _proxy.hasProperty(_arg1); var _local3:Boolean = _proxy.hasProperty((_arg1 + "._getAccount")); return (((_local2) && (_local3))); } public function resetSession():void{ _debug.warning("resetSession() not implemented"); } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_call("_getDetectTitle")); } public function setCampNameKey(_arg1:String):void{ _debug.info((("setCampNameKey( " + _arg1) + " )")); _call("_setCampNameKey", _arg1); } public function setDetectFlash(_arg1:Boolean):void{ _debug.info((("setDetectFlash( " + _arg1) + " )")); _call("_setDetectFlash", _arg1); } public function createEventTracker(_arg1:String):EventTracker{ _debug.info((("createEventTracker( " + _arg1) + " )")); return (new EventTracker(_arg1, this)); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _debug.info((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " )")); _call("_addItem", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _call("_clearIgnoreOrganic"); } public function setVar(_arg1:String):void{ _debug.info((("setVar( " + _arg1) + " )")); _call("_setVar", _arg1); } public function setDomainName(_arg1:String):void{ _debug.info((("setDomainName( " + _arg1) + " )")); _call("_setDomainName", _arg1); } public function hasTrackingAccount(_arg1:String):Boolean{ if (Utils.validateAccount(_arg1)){ return (_checkValidTrackingObject(_arg1)); }; return (_checkTrackingObject(_arg1)); } public function setCampSourceKey(_arg1:String):void{ _debug.info((("setCampSourceKey( " + _arg1) + " )")); _call("_setCampSourceKey", _arg1); } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ _debug.info((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " )")); _call("_addTrans", _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); return (null); } public function setCampContentKey(_arg1:String):void{ _debug.info((("setCampContentKey( " + _arg1) + " )")); _call("_setCampContentKey", _arg1); } public function setLocalServerMode():void{ _debug.info("setLocalServerMode()"); _call("_setLocalServerMode"); } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_call("_getLocalGifPath")); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _call("_clearIgnoreRef"); } public function setAllowAnchor(_arg1:Boolean):void{ _debug.info((("setAllowAnchor( " + _arg1) + " )")); _call("_setAllowAnchor", _arg1); } public function setLocalGifPath(_arg1:String):void{ _debug.info((("setLocalGifPath( " + _arg1) + " )")); _call("_setLocalGifPath", _arg1); } public function getVersion():String{ _debug.info("getVersion()"); return (_call("_getVersion")); } private function _injectTrackingObject():void{ _proxy.executeBlock(_injectTrackingObject_js); _hasGATracker = true; } public function setCookiePath(_arg1:String):void{ _debug.info((("setCookiePath( " + _arg1) + " )")); _call("_setCookiePath", _arg1); } public function setSampleRate(_arg1:Number):void{ _debug.info((("setSampleRate( " + _arg1) + " )")); _call("_setSampleRate", _arg1); } public function setAllowHash(_arg1:Boolean):void{ _debug.info((("setAllowHash( " + _arg1) + " )")); _call("_setAllowHash", _arg1); } public function addIgnoredOrganic(_arg1:String):void{ _debug.info((("addIgnoredOrganic( " + _arg1) + " )")); _call("_addIgnoredOrganic", _arg1); } public function setCampNOKey(_arg1:String):void{ _debug.info((("setCampNOKey( " + _arg1) + " )")); _call("_setCampNOKey", _arg1); } public function cookiePathCopy(_arg1:String):void{ _debug.info((("cookiePathCopy( " + _arg1) + " )")); _call("_cookiePathCopy", _arg1); } public function setLocalRemoteServerMode():void{ _debug.info("setLocalRemoteServerMode()"); _call("_setLocalRemoteServerMode"); } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_call("_getServiceMode")); } public function setDetectTitle(_arg1:Boolean):void{ _debug.info((("setDetectTitle( " + _arg1) + " )")); _call("_setDetectTitle", _arg1); } private function _createTrackingObject(_arg1:String):void{ _proxy.call(_createTrackingObject_js, _arg1); } public function setCampaignTrack(_arg1:Boolean):void{ _debug.info((("setCampaignTrack( " + _arg1) + " )")); _call("_setCampaignTrack", _arg1); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _call("_clearOrganic"); } public function setCampTermKey(_arg1:String):void{ _debug.info((("setCampTermKey( " + _arg1) + " )")); _call("_setCampTermKey", _arg1); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_call("_getDetectFlash")); } public function setCampMediumKey(_arg1:String):void{ _debug.info((("setCampMediumKey( " + _arg1) + " )")); _call("_setCampMediumKey", _arg1); } public function addIgnoredRef(_arg1:String):void{ _debug.info((("addIgnoredRef( " + _arg1) + " )")); _call("_addIgnoredRef", _arg1); } public function setSessionTimeout(_arg1:int):void{ _debug.info((("setSessionTimeout( " + _arg1) + " )")); _call("_setSessionTimeout", _arg1); } public function setRemoteServerMode():void{ _debug.info("setRemoteServerMode()"); _call("_setRemoteServerMode"); } public function getAccount():String{ _debug.info("getAccount()"); return (_call("_getAccount")); } } }//package com.google.analytics.v4
Section 150
//Configuration (com.google.analytics.v4.Configuration) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import com.google.analytics.campaign.*; public class Configuration { public var serverMode:ServerOperationMode; public var detectFlash:Boolean;// = true public var allowLocalTracking:Boolean;// = true public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif" public var hasSiteOverlay:Boolean;// = false private var _version:String;// = "4.3as" public var allowDomainHash:Boolean;// = true public var detectClientInfo:Boolean;// = true public var idleLoop:Number;// = 30 public var isTrackOutboundSubdomains:Boolean;// = false public var cookiePath:String;// = "/" public var transactionFieldDelim:String;// = "|" private var _organic:Organic; private var _cookieName:String;// = "analytics" public var campaignKey:CampaignKey; public var google:String;// = "google" public var googleCsePath:String;// = "cse" public var bucketCapacity:Number;// = 10 private var _sampleRate:Number;// = 1 public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif" public var googleSearchParam:String;// = "q" public var allowLinker:Boolean;// = false public var maxOutboundLinkExamined:Number;// = 1000 private var _debug:DebugConfiguration; private var _trackingLimitPerSession:int;// = 500 private var _domain:Domain; public var allowAnchor:Boolean;// = false public var tokenCliff:int;// = 10 public var sessionTimeout:Number; public var idleTimeout:Number;// = 60 public var campaignTracking:Boolean;// = true public var domainName:String;// = "" public var detectTitle:Boolean;// = true public var tokenRate:Number;// = 0.2 public var conversionTimeout:Number; public var localGIFpath:String;// = "/__utm.gif" public function Configuration(_arg1:DebugConfiguration=null){ _version = "4.3as"; _sampleRate = 1; _trackingLimitPerSession = 500; _organic = new Organic(); googleCsePath = "cse"; googleSearchParam = "q"; google = "google"; _cookieName = "analytics"; allowDomainHash = true; allowAnchor = false; allowLinker = false; hasSiteOverlay = false; tokenRate = 0.2; conversionTimeout = Timespan.sixmonths; sessionTimeout = Timespan.thirtyminutes; idleLoop = 30; idleTimeout = 60; maxOutboundLinkExamined = 1000; tokenCliff = 10; bucketCapacity = 10; detectClientInfo = true; detectFlash = true; detectTitle = true; campaignKey = new CampaignKey(); campaignTracking = true; isTrackOutboundSubdomains = false; serverMode = ServerOperationMode.remote; localGIFpath = "/__utm.gif"; remoteGIFpath = "http://www.google-analytics.com/__utm.gif"; secureRemoteGIFpath = "https://ssl.google-analytics.com/__utm.gif"; cookiePath = "/"; transactionFieldDelim = "|"; domainName = ""; allowLocalTracking = true; super(); _debug = _arg1; _domain = new Domain(DomainNameMode.auto, "", _debug); serverMode = ServerOperationMode.remote; _initOrganicSources(); } public function get organic():Organic{ return (_organic); } public function get trackingLimitPerSession():int{ return (_trackingLimitPerSession); } private function _initOrganicSources():void{ addOrganicSource(google, googleSearchParam); addOrganicSource("yahoo", "p"); addOrganicSource("msn", "q"); addOrganicSource("aol", "query"); addOrganicSource("aol", "encquery"); addOrganicSource("lycos", "query"); addOrganicSource("ask", "q"); addOrganicSource("altavista", "q"); addOrganicSource("netscape", "query"); addOrganicSource("cnn", "query"); addOrganicSource("looksmart", "qt"); addOrganicSource("about", "terms"); addOrganicSource("mamma", "query"); addOrganicSource("alltheweb", "q"); addOrganicSource("gigablast", "q"); addOrganicSource("voila", "rdata"); addOrganicSource("virgilio", "qs"); addOrganicSource("live", "q"); addOrganicSource("baidu", "wd"); addOrganicSource("alice", "qs"); addOrganicSource("yandex", "text"); addOrganicSource("najdi", "q"); addOrganicSource("aol", "q"); addOrganicSource("club-internet", "q"); addOrganicSource("mama", "query"); addOrganicSource("seznam", "q"); addOrganicSource("search", "q"); addOrganicSource("wp", "szukaj"); addOrganicSource("onet", "qt"); addOrganicSource("netsprint", "q"); addOrganicSource("google.interia", "q"); addOrganicSource("szukacz", "q"); addOrganicSource("yam", "k"); addOrganicSource("pchome", "q"); addOrganicSource("kvasir", "searchExpr"); addOrganicSource("sesam", "q"); addOrganicSource("ozu", "q"); addOrganicSource("terra", "query"); addOrganicSource("nostrum", "query"); addOrganicSource("mynet", "q"); addOrganicSource("ekolay", "q"); addOrganicSource("search.ilse", "search_for"); } public function get sampleRate():Number{ return (_sampleRate); } public function get cookieName():String{ return (_cookieName); } public function addOrganicSource(_arg1:String, _arg2:String):void{ var engine = _arg1; var keyword = _arg2; try { _organic.addSource(engine, keyword); } catch(e:Error) { if (((_debug) && (_debug.active))){ _debug.warning(e.message); }; }; } public function get domain():Domain{ return (_domain); } public function set sampleRate(_arg1:Number):void{ if (_arg1 <= 0){ _arg1 = 0.1; }; if (_arg1 > 1){ _arg1 = 1; }; _arg1 = Number(_arg1.toFixed(2)); _sampleRate = _arg1; } public function get version():String{ return (_version); } } }//package com.google.analytics.v4
Section 151
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI) package com.google.analytics.v4 { import com.google.analytics.core.*; public interface GoogleAnalyticsAPI { function setCampSourceKey(_arg1:String):void; function getServiceMode():ServerOperationMode; function resetSession():void; function setLocalServerMode():void; function setCampContentKey(_arg1:String):void; function addOrganic(_arg1:String, _arg2:String):void; function setDetectFlash(_arg1:Boolean):void; function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object; function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean; function setCampTermKey(_arg1:String):void; function setCampNameKey(_arg1:String):void; function addIgnoredOrganic(_arg1:String):void; function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void; function setAllowLinker(_arg1:Boolean):void; function getClientInfo():Boolean; function getDetectFlash():Boolean; function setCampaignTrack(_arg1:Boolean):void; function createEventTracker(_arg1:String):EventTracker; function setCookieTimeout(_arg1:int):void; function setAllowAnchor(_arg1:Boolean):void; function trackTrans():void; function clearOrganic():void; function trackPageview(_arg1:String=""):void; function setLocalGifPath(_arg1:String):void; function getVersion():String; function getLocalGifPath():String; function setVar(_arg1:String):void; function clearIgnoredOrganic():void; function setCampMediumKey(_arg1:String):void; function addIgnoredRef(_arg1:String):void; function setClientInfo(_arg1:Boolean):void; function setCookiePath(_arg1:String):void; function setSampleRate(_arg1:Number):void; function setSessionTimeout(_arg1:int):void; function setRemoteServerMode():void; function clearIgnoredRef():void; function setDomainName(_arg1:String):void; function setDetectTitle(_arg1:Boolean):void; function setAllowHash(_arg1:Boolean):void; function getAccount():String; function linkByPost(_arg1:Object, _arg2:Boolean=false):void; function link(_arg1:String, _arg2:Boolean=false):void; function setCampNOKey(_arg1:String):void; function setLocalRemoteServerMode():void; function cookiePathCopy(_arg1:String):void; function getDetectTitle():Boolean; } }//package com.google.analytics.v4
Section 152
//Tracker (com.google.analytics.v4.Tracker) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import com.google.analytics.data.*; import com.google.analytics.external.*; import com.google.analytics.campaign.*; public class Tracker implements GoogleAnalyticsAPI { private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3; private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1; private const EVENT_TRACKER_PROJECT_ID:int = 5; private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1; private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2; private var _adSense:AdSenseGlobals; private var _eventTracker:X10; private var _noSessionInformation:Boolean;// = false private var _browserInfo:BrowserInfo; private var _debug:DebugConfiguration; private var _isNewVisitor:Boolean;// = false private var _buffer:Buffer; private var _config:Configuration; private var _x10Module:X10; private var _campaign:CampaignManager; private var _formatedReferrer:String; private var _timeStamp:Number; private var _info:Environment; private var _domainHash:Number; private var _campaignInfo:CampaignInfo; private var _gifRequest:GIFRequest; private var _hasInitData:Boolean;// = false private var _account:String; public function Tracker(_arg1:String, _arg2:Configuration, _arg3:DebugConfiguration, _arg4:Environment, _arg5:Buffer, _arg6:GIFRequest, _arg7:AdSenseGlobals){ var _local8:String; super(); _account = _arg1; _config = _arg2; _debug = _arg3; _info = _arg4; _buffer = _arg5; _gifRequest = _arg6; _adSense = _arg7; if (!Utils.validateAccount(_arg1)){ _local8 = (("Account \"" + _arg1) + "\" is not valid."); _debug.warning(_local8); throw (new Error(_local8)); }; _initData(); } private function _doTracking():Boolean{ if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){ return (true); }; if (_config.allowLocalTracking){ return (true); }; return (false); } public function addOrganic(_arg1:String, _arg2:String):void{ _debug.info((("addOrganic( " + [_arg1, _arg2].join(", ")) + " )")); _config.organic.addSource(_arg1, _arg2); } public function setAllowLinker(_arg1:Boolean):void{ _config.allowLinker = _arg1; _debug.info((("setAllowLinker( " + _config.allowLinker) + " )")); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ var _local5:Boolean; var _local6 = 2; if (((!((_arg1 == ""))) && (!((_arg2 == ""))))){ _eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID); _eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID); _local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, _arg1); _local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, _arg2); if (((_arg3) && (!((_arg3 == ""))))){ _local5 = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, _arg3); _local6 = 3; if (!isNaN(_arg4)){ _local5 = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, _arg4); _local6 = 4; }; }; if (_local5){ _debug.info(((("valid event tracking call\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek); _sendXEvent(_eventTracker); }; } else { _debug.warning(((("event tracking call is not valid, failed!\ncategory: " + _arg1) + "\naction: ") + _arg2), VisualDebugMode.geek); _local5 = false; }; switch (_local6){ case 4: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3, _arg4].join(", ")) + " )")); break; case 3: _debug.info((("trackEvent( " + [_arg1, _arg2, _arg3].join(", ")) + " )")); break; case 2: default: _debug.info((("trackEvent( " + [_arg1, _arg2].join(", ")) + " )")); }; return (_local5); } public function trackPageview(_arg1:String=""):void{ _debug.info((("trackPageview( " + _arg1) + " )")); if (_doTracking()){ _initData(); _trackMetrics(_arg1); _noSessionInformation = false; } else { _debug.warning((("trackPageview( " + _arg1) + " ) failed")); }; } public function setCookieTimeout(_arg1:int):void{ _config.conversionTimeout = _arg1; _debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )")); } public function trackTrans():void{ _debug.warning("trackTrans() not implemented"); } public function setClientInfo(_arg1:Boolean):void{ _config.detectClientInfo = _arg1; _debug.info((("setClientInfo( " + _config.detectClientInfo) + " )")); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _debug.warning((("linkByPost( " + [_arg1, _arg2].join(", ")) + " ) not implemented")); } private function _initData():void{ var _local1:String; var _local2:String; if (!_hasInitData){ _updateDomainName(); _domainHash = _getDomainHash(); _timeStamp = Math.round((new Date().getTime() / 1000)); if (_debug.verbose){ _local1 = ""; _local1 = (_local1 + "_initData 0"); _local1 = (_local1 + ("\ndomain name: " + _config.domainName)); _local1 = (_local1 + ("\ndomain hash: " + _domainHash)); _local1 = (_local1 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")")); _debug.info(_local1, VisualDebugMode.geek); }; }; if (_doTracking()){ _handleCookie(); }; if (!_hasInitData){ if (_doTracking()){ _formatedReferrer = _formatReferrer(); _browserInfo = new BrowserInfo(_config, _info); _debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced); if (_config.campaignTracking){ _campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp); _campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation); _debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced); }; }; _x10Module = new X10(); _eventTracker = new X10(); _hasInitData = true; }; if (_config.hasSiteOverlay){ _debug.warning("Site Overlay is not supported"); }; if (_debug.verbose){ _local2 = ""; _local2 = (_local2 + "_initData (misc)"); _local2 = (_local2 + ("\nflash version: " + _info.flashVersion.toString(4))); _local2 = (_local2 + ("\nprotocol: " + _info.protocol)); _local2 = (_local2 + (("\ndefault domain name (auto): \"" + _info.domainName) + "\"")); _local2 = (_local2 + ("\nlanguage: " + _info.language)); _local2 = (_local2 + ("\ndomain hash: " + _getDomainHash())); _local2 = (_local2 + ("\nuser-agent: " + _info.userAgent)); _debug.info(_local2, VisualDebugMode.geek); }; } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_config.detectTitle); } public function resetSession():void{ _debug.info("resetSession()"); _buffer.resetCurrentSession(); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_config.detectClientInfo); } private function _sendXEvent(_arg1:X10=null):void{ var _local2:Variables; var _local3:EventInfo; var _local4:Variables; var _local5:Variables; _initData(); if (_takeSample()){ _local2 = new Variables(); _local2.URIencode = true; _local3 = new EventInfo(true, _x10Module, _arg1); _local4 = _local3.toVariables(); _local5 = _renderMetricsSearchVariables(); _local2.join(_local4, _local5); _gifRequest.send(_account, _local2, false, true); }; } public function setDetectFlash(_arg1:Boolean):void{ _config.detectFlash = _arg1; _debug.info((("setDetectFlash( " + _config.detectFlash) + " )")); } public function setCampNameKey(_arg1:String):void{ _config.campaignKey.UCCN = _arg1; var _local2 = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCCN]")); } else { _debug.info(_local2); }; } private function _formatReferrer():String{ var _local2:String; var _local3:URL; var _local4:URL; var _local1:String = _info.referrer; if ((((_local1 == "")) || ((_local1 == "localhost")))){ _local1 = "-"; } else { _local2 = _info.domainName; _local3 = new URL(_local1); _local4 = new URL(("http://" + _local2)); if (_local3.hostName == _local2){ return ("-"); }; if (_local4.domain == _local3.domain){ if (_local4.subDomain != _local3.subDomain){ _local1 = "0"; }; }; if ((((_local1.charAt(0) == "[")) && (_local1.charAt((_local1.length - 1))))){ _local1 = "-"; }; }; _debug.info(("formated referrer: " + _local1), VisualDebugMode.advanced); return (_local1); } private function _visitCode():Number{ if (_debug.verbose){ _debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek); }; return (_buffer.utma.sessionId); } public function createEventTracker(_arg1:String):EventTracker{ _debug.info((("createEventTracker( " + _arg1) + " )")); return (new EventTracker(_arg1, this)); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _debug.warning((("addItem( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6].join(", ")) + " ) not implemented")); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _config.organic.clearIgnoredKeywords(); } public function setVar(_arg1:String):void{ var _local2:Variables; if (((!((_arg1 == ""))) && (_isNotGoogleSearch()))){ _initData(); _buffer.utmv.domainHash = _domainHash; _buffer.utmv.value = _arg1; if (_debug.verbose){ _debug.info(_buffer.utmv.toString(), VisualDebugMode.geek); }; _debug.info((("setVar( " + _arg1) + " )")); if (_takeSample()){ _local2 = new Variables(); _local2.utmt = "var"; _gifRequest.send(_account, _local2); }; } else { _debug.warning((("setVar \"" + _arg1) + "\" is ignored")); }; } public function setDomainName(_arg1:String):void{ if (_arg1 == "auto"){ _config.domain.mode = DomainNameMode.auto; } else { if (_arg1 == "none"){ _config.domain.mode = DomainNameMode.none; } else { _config.domain.mode = DomainNameMode.custom; _config.domain.name = _arg1; }; }; _updateDomainName(); _debug.info((("setDomainName( " + _config.domainName) + " )")); } private function _updateDomainName():void{ var _local1:String; if (_config.domain.mode == DomainNameMode.auto){ _local1 = _info.domainName; if (_local1.substring(0, 4) == "www."){ _local1 = _local1.substring(4); }; _config.domain.name = _local1; }; _config.domainName = _config.domain.name.toLowerCase(); _debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced); } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ _debug.warning((("addTrans( " + [_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8].join(", ")) + " ) not implemented")); return (null); } private function _renderMetricsSearchVariables(_arg1:String=""):Variables{ var _local4:Variables; var _local2:Variables = new Variables(); _local2.URIencode = true; var _local3:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, _arg1, _adSense); _debug.info(("docInfo: " + _local3.toURLString()), VisualDebugMode.geek); if (_config.campaignTracking){ _local4 = _campaignInfo.toVariables(); }; var _local5:Variables = _browserInfo.toVariables(); _local2.join(_local3.toVariables(), _local5, _local4); return (_local2); } public function setCampContentKey(_arg1:String):void{ _config.campaignKey.UCCT = _arg1; var _local2 = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCCT]")); } else { _debug.info(_local2); }; } private function _handleCookie():void{ var _local1:String; var _local2:String; var _local3:Array; var _local4:String; if (_config.allowLinker){ }; if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){ if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){ _buffer.updateUTMA(_timeStamp); _noSessionInformation = true; }; if (_debug.verbose){ _debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek); }; } else { _debug.info("create a new utma", VisualDebugMode.advanced); _buffer.utma.domainHash = _domainHash; _buffer.utma.sessionId = _getUniqueSessionId(); _buffer.utma.firstTime = _timeStamp; _buffer.utma.lastTime = _timeStamp; _buffer.utma.currentTime = _timeStamp; _buffer.utma.sessionCount = 1; if (_debug.verbose){ _debug.info(_buffer.utma.toString(), VisualDebugMode.geek); }; _noSessionInformation = true; _isNewVisitor = true; }; if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){ if (_adSense.sid){ _buffer.utma.currentTime = Number(_adSense.sid); if (_debug.verbose){ _local1 = ""; _local1 = (_local1 + "AdSense sid found\n"); _local1 = (_local1 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(_local1, VisualDebugMode.geek); }; }; if (_isNewVisitor){ if (_adSense.sid){ _buffer.utma.lastTime = Number(_adSense.sid); if (_debug.verbose){ _local2 = ""; _local2 = (_local2 + "AdSense sid found (new visitor)\n"); _local2 = (_local2 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(_local2, VisualDebugMode.geek); }; }; if (_adSense.vid){ _local3 = _adSense.vid.split("."); _buffer.utma.sessionId = Number(_local3[0]); _buffer.utma.firstTime = Number(_local3[1]); if (_debug.verbose){ _local4 = ""; _local4 = (_local4 + "AdSense vid found (new visitor)\n"); _local4 = (_local4 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(_local3[0])) + ")\n")); _local4 = (_local4 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(_local3[1])) + ")")); _debug.info(_local4, VisualDebugMode.geek); }; }; if (_debug.verbose){ _debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek); }; }; }; _buffer.utmb.domainHash = _domainHash; if (isNaN(_buffer.utmb.trackCount)){ _buffer.utmb.trackCount = 0; }; if (isNaN(_buffer.utmb.token)){ _buffer.utmb.token = _config.tokenCliff; }; if (isNaN(_buffer.utmb.lastTime)){ _buffer.utmb.lastTime = _buffer.utma.currentTime; }; _buffer.utmc.domainHash = _domainHash; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced); _debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced); }; } public function setLocalServerMode():void{ _config.serverMode = ServerOperationMode.local; _debug.info("setLocalServerMode()"); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _config.organic.clearIgnoredReferrals(); } public function setCampSourceKey(_arg1:String):void{ _config.campaignKey.UCSR = _arg1; var _local2 = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCSR]")); } else { _debug.info(_local2); }; } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_config.localGIFpath); } public function setLocalGifPath(_arg1:String):void{ _config.localGIFpath = _arg1; _debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )")); } public function getVersion():String{ _debug.info("getVersion()"); return (_config.version); } public function setAllowAnchor(_arg1:Boolean):void{ _config.allowAnchor = _arg1; _debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )")); } private function _isNotGoogleSearch():Boolean{ var _local1:String = _config.domainName; var _local2 = (_local1.indexOf("www.google.") < 0); var _local3 = (_local1.indexOf(".google.") < 0); var _local4 = (_local1.indexOf("google.") < 0); var _local5 = (_local1.indexOf("google.org") > -1); return (((((((((_local2) || (_local3))) || (_local4))) || (!((_config.cookiePath == "/"))))) || (_local5))); } public function setSampleRate(_arg1:Number):void{ if (_arg1 < 0){ _debug.warning("sample rate can not be negative, ignoring value."); } else { _config.sampleRate = _arg1; }; _debug.info((("setSampleRate( " + _config.sampleRate) + " )")); } private function _takeSample():Boolean{ if (_debug.verbose){ _debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek); }; return (((_visitCode() % 10000) < (_config.sampleRate * 10000))); } public function setCookiePath(_arg1:String):void{ _config.cookiePath = _arg1; _debug.info((("setCookiePath( " + _config.cookiePath) + " )")); } public function setAllowHash(_arg1:Boolean):void{ _config.allowDomainHash = _arg1; _debug.info((("setAllowHash( " + _config.allowDomainHash) + " )")); } private function _generateUserDataHash():Number{ var _local1 = ""; _local1 = (_local1 + _info.appName); _local1 = (_local1 + _info.appVersion); _local1 = (_local1 + _info.language); _local1 = (_local1 + _info.platform); _local1 = (_local1 + _info.userAgent.toString()); _local1 = (_local1 + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth)); _local1 = (_local1 + _info.referrer); return (Utils.generateHash(_local1)); } public function setCampNOKey(_arg1:String):void{ _config.campaignKey.UCNO = _arg1; var _local2 = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCNO]")); } else { _debug.info(_local2); }; } public function addIgnoredOrganic(_arg1:String):void{ _debug.info((("addIgnoredOrganic( " + _arg1) + " )")); _config.organic.addIgnoredKeyword(_arg1); } public function setLocalRemoteServerMode():void{ _config.serverMode = ServerOperationMode.both; _debug.info("setLocalRemoteServerMode()"); } public function cookiePathCopy(_arg1:String):void{ _debug.warning((("cookiePathCopy( " + _arg1) + " ) not implemented")); } public function setDetectTitle(_arg1:Boolean):void{ _config.detectTitle = _arg1; _debug.info((("setDetectTitle( " + _config.detectTitle) + " )")); } public function setCampTermKey(_arg1:String):void{ _config.campaignKey.UCTR = _arg1; var _local2 = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCTR]")); } else { _debug.info(_local2); }; } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_config.serverMode); } private function _trackMetrics(_arg1:String=""):void{ var _local2:Variables; var _local3:Variables; var _local4:Variables; var _local5:EventInfo; if (_takeSample()){ _local2 = new Variables(); _local2.URIencode = true; if (((_x10Module) && (_x10Module.hasData()))){ _local5 = new EventInfo(false, _x10Module); _local3 = _local5.toVariables(); }; _local4 = _renderMetricsSearchVariables(_arg1); _local2.join(_local3, _local4); _gifRequest.send(_account, _local2); }; } public function setCampaignTrack(_arg1:Boolean):void{ _config.campaignTracking = _arg1; _debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )")); } public function addIgnoredRef(_arg1:String):void{ _debug.info((("addIgnoredRef( " + _arg1) + " )")); _config.organic.addIgnoredReferral(_arg1); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _config.organic.clearEngines(); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_config.detectFlash); } public function setCampMediumKey(_arg1:String):void{ _config.campaignKey.UCMD = _arg1; var _local2 = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((_local2 + " [UCMD]")); } else { _debug.info(_local2); }; } private function _getUniqueSessionId():Number{ var _local1:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647); _debug.info(("Session ID: " + _local1), VisualDebugMode.geek); return (_local1); } private function _getDomainHash():Number{ if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){ _config.domainName = ""; return (1); }; _updateDomainName(); if (_config.allowDomainHash){ return (Utils.generateHash(_config.domainName)); }; return (1); } public function setSessionTimeout(_arg1:int):void{ _config.sessionTimeout = _arg1; _debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )")); } public function getAccount():String{ _debug.info("getAccount()"); return (_account); } public function link(_arg1:String, _arg2:Boolean=false):void{ _debug.warning((("link( " + [_arg1, _arg2].join(", ")) + " ) not implemented")); } public function setRemoteServerMode():void{ _config.serverMode = ServerOperationMode.remote; _debug.info("setRemoteServerMode()"); } } }//package com.google.analytics.v4
Section 153
//AnalyticsTracker (com.google.analytics.AnalyticsTracker) package com.google.analytics { import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.events.*; public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher { function set config(_arg1:Configuration):void; function isReady():Boolean; function get mode():String; function set debug(_arg1:DebugConfiguration):void; function get account():String; function set mode(_arg1:String):void; function get config():Configuration; function get debug():DebugConfiguration; function set account(_arg1:String):void; function get visualDebug():Boolean; function set visualDebug(_arg1:Boolean):void; } }//package com.google.analytics
Section 154
//API (com.google.analytics.API) package com.google.analytics { import com.google.analytics.utils.*; public class API { public static var version:Version = new Version(); version.major = 1; version.minor = 0; version.build = 1; version.revision = "$Rev: 319 $ ".split(" ")[1]; } }//package com.google.analytics
Section 155
//GATracker (com.google.analytics.GATracker) package com.google.analytics { import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import flash.events.*; import flash.display.*; import com.google.analytics.external.*; import com.google.analytics.events.*; public class GATracker implements AnalyticsTracker { private var _adSense:AdSenseGlobals; private var _env:Environment; private var _visualDebug:Boolean; private var _idleTimer:IdleTimer; private var _debug:DebugConfiguration; private var _buffer:Buffer; private var _config:Configuration; private var _mode:String; private var _display:DisplayObject; private var _jsproxy:JavascriptProxy; private var _dom:HTMLDOM; private var _eventDispatcher:EventDispatcher; private var _ready:Boolean;// = false private var _gifRequest:GIFRequest; private var _account:String; private var _tracker:GoogleAnalyticsAPI; public static var version:Version = API.version; public static var autobuild:Boolean = true; public function GATracker(_arg1:DisplayObject, _arg2:String, _arg3:String="AS3", _arg4:Boolean=false, _arg5:Configuration=null, _arg6:DebugConfiguration=null){ _ready = false; super(); _display = _arg1; _eventDispatcher = new EventDispatcher(this); _tracker = new TrackerCache(); this.account = _arg2; this.mode = _arg3; this.visualDebug = _arg4; if (!_arg6){ this.debug = new DebugConfiguration(); }; if (!_arg5){ this.config = new Configuration(_arg6); }; if (autobuild){ _factory(); }; } public function link(_arg1:String, _arg2:Boolean=false):void{ _tracker.link(_arg1, _arg2); } public function addOrganic(_arg1:String, _arg2:String):void{ _tracker.addOrganic(_arg1, _arg2); } public function setAllowLinker(_arg1:Boolean):void{ _tracker.setAllowLinker(_arg1); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean{ return (_tracker.trackEvent(_arg1, _arg2, _arg3, _arg4)); } public function setCookieTimeout(_arg1:int):void{ _tracker.setCookieTimeout(_arg1); } public function trackTrans():void{ _tracker.trackTrans(); } public function trackPageview(_arg1:String=""):void{ _tracker.trackPageview(_arg1); } public function getClientInfo():Boolean{ return (_tracker.getClientInfo()); } public function setClientInfo(_arg1:Boolean):void{ _tracker.setClientInfo(_arg1); } public function get account():String{ return (_account); } public function linkByPost(_arg1:Object, _arg2:Boolean=false):void{ _tracker.linkByPost(_arg1, _arg2); } public function getDetectTitle():Boolean{ return (_tracker.getDetectTitle()); } public function dispatchEvent(_arg1:Event):Boolean{ return (_eventDispatcher.dispatchEvent(_arg1)); } public function get config():Configuration{ return (_config); } public function set mode(_arg1:String):void{ _mode = _arg1; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ _eventDispatcher.removeEventListener(_arg1, _arg2, _arg3); } public function setDetectFlash(_arg1:Boolean):void{ _tracker.setDetectFlash(_arg1); } public function resetSession():void{ _tracker.resetSession(); } public function setCampNameKey(_arg1:String):void{ _tracker.setCampNameKey(_arg1); } public function get debug():DebugConfiguration{ return (_debug); } public function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void{ _tracker.addItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); } private function _bridgeFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account)); return (new Bridge(account, _debug, _jsproxy)); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ _eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function clearIgnoredOrganic():void{ _tracker.clearIgnoredOrganic(); } public function set account(_arg1:String):void{ _account = _arg1; } public function setVar(_arg1:String):void{ _tracker.setVar(_arg1); } public function build():void{ if (!isReady()){ _factory(); }; } public function setDomainName(_arg1:String):void{ _tracker.setDomainName(_arg1); } public function createEventTracker(_arg1:String):EventTracker{ return (_tracker.createEventTracker(_arg1)); } public function set config(_arg1:Configuration):void{ _config = _arg1; } public function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object{ return (_tracker.addTrans(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8)); } public function setCampSourceKey(_arg1:String):void{ _tracker.setCampSourceKey(_arg1); } public function setCampContentKey(_arg1:String):void{ _tracker.setCampContentKey(_arg1); } public function willTrigger(_arg1:String):Boolean{ return (_eventDispatcher.willTrigger(_arg1)); } public function setLocalServerMode():void{ _tracker.setLocalServerMode(); } public function isReady():Boolean{ return (_ready); } public function getLocalGifPath():String{ return (_tracker.getLocalGifPath()); } public function setAllowAnchor(_arg1:Boolean):void{ _tracker.setAllowAnchor(_arg1); } public function clearIgnoredRef():void{ _tracker.clearIgnoredRef(); } public function get mode():String{ return (_mode); } public function set debug(_arg1:DebugConfiguration):void{ _debug = _arg1; } public function setLocalGifPath(_arg1:String):void{ _tracker.setLocalGifPath(_arg1); } public function getVersion():String{ return (_tracker.getVersion()); } public function setSampleRate(_arg1:Number):void{ _tracker.setSampleRate(_arg1); } public function setCookiePath(_arg1:String):void{ _tracker.setCookiePath(_arg1); } public function setAllowHash(_arg1:Boolean):void{ _tracker.setAllowHash(_arg1); } public function setCampNOKey(_arg1:String):void{ _tracker.setCampNOKey(_arg1); } public function addIgnoredOrganic(_arg1:String):void{ _tracker.addIgnoredOrganic(_arg1); } public function setLocalRemoteServerMode():void{ _tracker.setLocalRemoteServerMode(); } public function cookiePathCopy(_arg1:String):void{ _tracker.cookiePathCopy(_arg1); } private function _factory():void{ var _local1:GoogleAnalyticsAPI; var _local2:TrackerCache; _jsproxy = new JavascriptProxy(debug); if (visualDebug){ debug.layout = new Layout(debug, _display); debug.active = visualDebug; }; _local2 = (_tracker as TrackerCache); switch (mode){ case TrackerMode.BRIDGE: _local1 = _bridgeFactory(); break; case TrackerMode.AS3: default: _local1 = _trackerFactory(); }; if (!_local2.isEmpty()){ _local2.tracker = _local1; _local2.flush(); }; _tracker = _local1; _ready = true; dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this)); } public function setCampTermKey(_arg1:String):void{ _tracker.setCampTermKey(_arg1); } private function _trackerFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account)); _adSense = new AdSenseGlobals(debug); _dom = new HTMLDOM(debug); _dom.cacheProperties(); _env = new Environment("", "", "", debug, _dom); _buffer = new Buffer(config, debug, false); _gifRequest = new GIFRequest(config, debug, _buffer, _env); _idleTimer = new IdleTimer(config, debug, _display, _buffer); _env.url = _display.stage.loaderInfo.url; return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense)); } public function setDetectTitle(_arg1:Boolean):void{ _tracker.setDetectTitle(_arg1); } public function getServiceMode():ServerOperationMode{ return (_tracker.getServiceMode()); } public function clearOrganic():void{ _tracker.clearOrganic(); } public function setCampaignTrack(_arg1:Boolean):void{ _tracker.setCampaignTrack(_arg1); } public function addIgnoredRef(_arg1:String):void{ _tracker.addIgnoredRef(_arg1); } public function set visualDebug(_arg1:Boolean):void{ _visualDebug = _arg1; } public function setCampMediumKey(_arg1:String):void{ _tracker.setCampMediumKey(_arg1); } public function setSessionTimeout(_arg1:int):void{ _tracker.setSessionTimeout(_arg1); } public function getDetectFlash():Boolean{ return (_tracker.getDetectFlash()); } public function get visualDebug():Boolean{ return (_visualDebug); } public function getAccount():String{ return (_tracker.getAccount()); } public function hasEventListener(_arg1:String):Boolean{ return (_eventDispatcher.hasEventListener(_arg1)); } public function setRemoteServerMode():void{ _tracker.setRemoteServerMode(); } } var _local1:* = ServerOperationMode; return (_local1); }//package com.google.analytics
Section 156
//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 157
//ScoreService (com.spilgames.api.ScoreService) package com.spilgames.api { public class ScoreService { public static function submitScore(_arg1:int, _arg2:Function=null):int{ return (SpilGamesServices.getInstance().send("Score", "submitScore", _arg2, {score:_arg1, userName:User.getUserName(), userHash:User.getUserHash()})); } } }//package com.spilgames.api
Section 158
//SpilGamesServices (com.spilgames.api.SpilGamesServices) package com.spilgames.api { import flash.net.*; import flash.events.*; import flash.display.*; import flash.system.*; public class SpilGamesServices extends MovieClip { private var _connected:Boolean;// = false private var _connecting:Boolean;// = false private var DEFAULT_CONNECTION_LOCATION:String;// = "http://www8.agame.com/games/flash/services/ServicesConnection.swf" private var _loader:Loader; private var _servicesConnection;// = null public static const INVALID_ID:int = -1; private static var _instance:SpilGamesServices = null; public function SpilGamesServices(_arg1:Private=null){ if (!_arg1){ throw (new Error("Cannot instantiate this class, use SpilGamesServices.getInstance")); }; } private function handleRemovedFromStage(_arg1:Event):void{ } 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); } 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 version():String{ return ("1.0"); } public function isReady():Boolean{ return (((!((_servicesConnection == null))) && (_servicesConnection.isReady()))); } 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); }; } 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 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")); } public function get connection(){ return (_servicesConnection); } public function getSiteID():int{ if (_servicesConnection != null){ return (_servicesConnection.getSiteID()); }; return (INVALID_ID); } public function getChannelID():int{ if (_servicesConnection != null){ return (_servicesConnection.getChannelID()); }; return (INVALID_ID); } 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 function getItemID():int{ if (_servicesConnection != null){ return (_servicesConnection.getItemID()); }; return (INVALID_ID); } public function allowDomain(_arg1:String):void{ Security.allowDomain("*"); Security.allowInsecureDomain("*"); } public function get connecting():Boolean{ return (_connecting); } public function isDomainAllowed():Boolean{ return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid()))); } 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); }; }; } public static function getInstance():SpilGamesServices{ if (!_instance){ _instance = new SpilGamesServices(new Private()); }; return (_instance); } } }//package com.spilgames.api class Private { private function Private(){ } }
Section 159
//User (com.spilgames.api.User) package com.spilgames.api { import flash.display.*; public class User { public static function getUserName():String{ var _local1:* = SpilGamesServices.getInstance().connection; if (_local1 != null){ return (_local1.getUserName()); }; return (""); } public static function isGuest():Boolean{ var _local2:DisplayObject; var _local3:Object; var _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:* = SpilGamesServices.getInstance().connection; if (_local1 != null){ return (_local1.getUserHash()); }; return (""); } } }//package com.spilgames.api
Section 160
//JStoSWF (com.spilgames.external.JStoSWF) package com.spilgames.external { public class JStoSWF { private var m_oCallFuntions:Object; private static var m_oJStoSWF:JStoSWF; public function JStoSWF():void{ this.m_oCallFuntions = new Object(); } public function parse(_arg1:Object):void{ var _local2:int; if (_arg1.call){ switch (_arg1.call){ case "MULTI": _local2 = 0; while (_local2 < _arg1.calls.length) { JStoSWF.instance().parse(_arg1.calls[_local2]); _local2++; }; break; default: if (this.m_oCallFuntions[_arg1.call]){ if (!_arg1.params){ _arg1.params = {}; }; var _local3 = this.m_oCallFuntions; _local3[_arg1.call](_arg1.params); } else { trace((("call: " + _arg1.call) + " not found in call functions!")); }; break; }; } else { trace("call attribute not found in CallObject!"); }; } public function addCallFunction(_arg1:String, _arg2:Function):void{ if (!this.m_oCallFuntions[_arg1]){ this.m_oCallFuntions[_arg1] = _arg2; }; } public static function instance():JStoSWF{ if (m_oJStoSWF == null){ m_oJStoSWF = new (JStoSWF); }; return (m_oJStoSWF); } } }//package com.spilgames.external
Section 161
//TweenEvent (gs.events.TweenEvent) package gs.events { import flash.events.*; public class TweenEvent extends Event { public var info:Object; public static const UPDATE:String = "update"; public static const START:String = "start"; public static const version:Number = 0.9; public static const COMPLETE:String = "complete"; public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.info = _arg2; } override public function clone():Event{ return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable)); } } }//package gs.events
Section 162
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin) package gs.plugins { import flash.display.*; import gs.*; public class AutoAlphaPlugin extends TweenPlugin { protected var _tweenVisible:Boolean; protected var _target:Object; protected var _visible:Boolean; protected var _tween:TweenLite; public static const VERSION:Number = 1; public static const API:Number = 1; public function AutoAlphaPlugin(){ this.propName = "autoAlpha"; this.overwriteProps = ["alpha", "visible"]; this.onComplete = onCompleteTween; } override public function killProps(_arg1:Object):void{ super.killProps(_arg1); _tweenVisible = !(Boolean(("visible" in _arg1))); } public function onCompleteTween():void{ if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){ _target.visible = _visible; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _visible = Boolean(!((_arg2 == 0))); _tweenVisible = true; addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); if (((!((_target.visible == true))) && (_tweenVisible))){ _target.visible = true; }; } } }//package gs.plugins
Section 163
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class BevelFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BevelFilterPlugin(){ this.propName = "bevelFilter"; this.overwriteProps = ["bevelFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BevelFilter; initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 164
//BezierPlugin (gs.plugins.BezierPlugin) package gs.plugins { import gs.*; import gs.utils.tween.*; public class BezierPlugin extends TweenPlugin { protected var _future:Object; protected var _orient:Boolean; protected var _orientData:Array; protected var _target:Object; protected var _beziers:Object; protected static const _RAD2DEG:Number = 57.2957795130823; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function BezierPlugin(){ _future = {}; super(); this.propName = "bezier"; this.overwriteProps = []; } override public function killProps(_arg1:Object):void{ var _local2:String; for (_local2 in _beziers) { if ((_local2 in _arg1)){ delete _beziers[_local2]; }; }; super.killProps(_arg1); } protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{ var _local5:int; var _local6:String; _target = _arg1.target; if (_arg1.exposedVars.orientToBezier == true){ _orientData = [["x", "y", "rotation", 0]]; _orient = true; } else { if ((_arg1.exposedVars.orientToBezier is Array)){ _orientData = _arg1.exposedVars.orientToBezier; _orient = true; }; }; var _local4:Object = {}; _local5 = 0; while (_local5 < _arg2.length) { for (_local6 in _arg2[_local5]) { if (_local4[_local6] == undefined){ _local4[_local6] = [_arg1.target[_local6]]; }; if (typeof(_arg2[_local5][_local6]) == "number"){ _local4[_local6].push(_arg2[_local5][_local6]); } else { _local4[_local6].push((_arg1.target[_local6] + Number(_arg2[_local5][_local6]))); }; }; _local5++; }; for (_local6 in _local4) { this.overwriteProps[this.overwriteProps.length] = _local6; if (_arg1.exposedVars[_local6] != undefined){ if (typeof(_arg1.exposedVars[_local6]) == "number"){ _local4[_local6].push(_arg1.exposedVars[_local6]); } else { _local4[_local6].push((_arg1.target[_local6] + Number(_arg1.exposedVars[_local6]))); }; delete _arg1.exposedVars[_local6]; _local5 = (_arg1.tweens.length - 1); while (_local5 > -1) { if (_arg1.tweens[_local5].name == _local6){ _arg1.tweens.splice(_local5, 1); }; _local5--; }; }; }; _beziers = parseBeziers(_local4, _arg3); } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), false); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:String; var _local4:Object; var _local5:Number; var _local6:uint; var _local7:Number; var _local8:int; var _local9:Object; var _local10:Boolean; var _local11:Number; var _local12:Number; var _local13:Array; var _local14:Number; if (_arg1 == 1){ for (_local3 in _beziers) { _local2 = (_beziers[_local3].length - 1); _target[_local3] = _beziers[_local3][_local2][2]; }; } else { for (_local3 in _beziers) { _local6 = _beziers[_local3].length; if (_arg1 < 0){ _local2 = 0; } else { if (_arg1 >= 1){ _local2 = (_local6 - 1); } else { _local2 = int((_local6 * _arg1)); }; }; _local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6); _local4 = _beziers[_local3][_local2]; if (this.round){ _local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); _local8 = ((_local7)<0) ? -1 : 1; _target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7); } else { _target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); }; }; }; if (_orient){ _local9 = _target; _local10 = this.round; _target = _future; this.round = false; _orient = false; this.changeFactor = (_arg1 + 0.01); _target = _local9; this.round = _local10; _orient = true; _local2 = 0; while (_local2 < _orientData.length) { _local13 = _orientData[_local2]; _local14 = ((_local13[3]) || (0)); _local11 = (_future[_local13[0]] - _target[_local13[0]]); _local12 = (_future[_local13[1]] - _target[_local13[1]]); _target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14); _local2++; }; }; } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]]; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]]; _local3++; }; } else { _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)]; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)]; _local3++; }; _local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]]; } else { if (_local4.length == 3){ _local5[_local5.length] = [_local4[0], _local4[1], _local4[2]]; } else { if (_local4.length == 2){ _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; }; }; }; return (_local7); } } }//package gs.plugins
Section 165
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin) package gs.plugins { import gs.*; public class BezierThroughPlugin extends BezierPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BezierThroughPlugin(){ this.propName = "bezierThrough"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), true); return (true); } } }//package gs.plugins
Section 166
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class BlurFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function BlurFilterPlugin(){ this.propName = "blurFilter"; this.overwriteProps = ["blurFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BlurFilter; initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2)))); return (true); } } }//package gs.plugins
Section 167
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class ColorMatrixFilterPlugin extends FilterPlugin { protected var _matrix:Array; protected var _matrixTween:EndArrayPlugin; public static const API:Number = 1; public static const VERSION:Number = 1.1; protected static var _lumG:Number = 0.71516; protected static var _lumR:Number = 0.212671; protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; protected static var _lumB:Number = 0.072169; public function ColorMatrixFilterPlugin(){ this.propName = "colorMatrixFilter"; this.overwriteProps = ["colorMatrixFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = ColorMatrixFilter; var _local4:Object = _arg2; initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice())); _matrix = ColorMatrixFilter(_filter).matrix; var _local5:Array = []; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _local5 = _local4.matrix; } else { if (_local4.relative == true){ _local5 = _matrix.slice(); } else { _local5 = _idMatrix.slice(); }; _local5 = setBrightness(_local5, _local4.brightness); _local5 = setContrast(_local5, _local4.contrast); _local5 = setHue(_local5, _local4.hue); _local5 = setSaturation(_local5, _local4.saturation); _local5 = setThreshold(_local5, _local4.threshold); if (!isNaN(_local4.colorize)){ _local5 = colorize(_local5, _local4.colorize, _local4.amount); }; }; _matrixTween = new EndArrayPlugin(); _matrixTween.init(_matrix, _local5); return (true); } override public function set changeFactor(_arg1:Number):void{ _matrixTween.changeFactor = _arg1; ColorMatrixFilter(_filter).matrix = _matrix; super.changeFactor = _arg1; } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Number = (1 - _arg2); var _local4:Number = (_local3 * _lumR); var _local5:Number = (_local3 * _lumG); var _local6:Number = (_local3 * _lumB); var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function setHue(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); var _local3:Number = Math.cos(_arg2); var _local4:Number = Math.sin(_arg2); var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; var _local3:Array = []; var _local4:int; var _local5:int; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF); var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF); var _local6:Number = ((_arg2 & 0xFF) / 0xFF); var _local7:Number = (1 - _arg3); var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } } }//package gs.plugins
Section 168
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class DropShadowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function DropShadowFilterPlugin(){ this.propName = "dropShadowFilter"; this.overwriteProps = ["dropShadowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = DropShadowFilter; initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject)); return (true); } } }//package gs.plugins
Section 169
//EndArrayPlugin (gs.plugins.EndArrayPlugin) package gs.plugins { import flash.display.*; import gs.*; import gs.utils.tween.*; public class EndArrayPlugin extends TweenPlugin { protected var _a:Array; protected var _info:Array; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function EndArrayPlugin(){ _info = []; super(); this.propName = "endArray"; this.overwriteProps = ["endArray"]; } public function init(_arg1:Array, _arg2:Array):void{ _a = _arg1; var _local3:int = (_arg2.length - 1); while (_local3 > -1) { if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){ _info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3])); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (false); }; init((_arg1 as Array), _arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:ArrayTweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_info.length - 1); while (_local2 > -1) { _local3 = _info[_local2]; _a[_local3.index] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } } }//package gs.plugins
Section 170
//FilterPlugin (gs.plugins.FilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; import gs.utils.tween.*; public class FilterPlugin extends TweenPlugin { protected var _remove:Boolean; protected var _target:Object; protected var _index:int; protected var _filter:BitmapFilter; protected var _type:Class; public static const VERSION:Number = 1.03; public static const API:Number = 1; public function onCompleteTween():void{ var _local1:int; var _local2:Array; if (_remove){ _local2 = _target.filters; if (!(_local2[_index] is _type)){ _local1 = (_local2.length - 1); while (_local1 > -1) { if ((_local2[_local1] is _type)){ _local2.splice(_local1, 1); break; }; _local1--; }; } else { _local2.splice(_index, 1); }; _target.filters = _local2; }; } protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{ var _local4:String; var _local5:int; var _local6:HexColorsPlugin; var _local3:Array = _target.filters; _index = -1; if (_arg1.index != null){ _index = _arg1.index; } else { _local5 = (_local3.length - 1); while (_local5 > -1) { if ((_local3[_local5] is _type)){ _index = _local5; break; }; _local5--; }; }; if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){ _index = ((_arg1.index)!=null) ? _arg1.index : _local3.length; _local3[_index] = _arg2; _target.filters = _local3; }; _filter = _local3[_index]; _remove = Boolean((_arg1.remove == true)); if (_remove){ this.onComplete = onCompleteTween; }; var _local7:Object = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1; for (_local4 in _local7) { if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){ } else { if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){ _local6 = new HexColorsPlugin(); _local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]); _tweens[_tweens.length] = new TweenInfo(_local6, "changeFactor", 0, 1, _local4, false); } else { if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){ _filter[_local4] = _local7[_local4]; } else { addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4); }; }; }; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:TweenInfo; var _local4:Array = _target.filters; _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; if (!(_local4[_index] is _type)){ _index = (_local4.length - 1); _local2 = (_local4.length - 1); while (_local2 > -1) { if ((_local4[_local2] is _type)){ _index = _local2; break; }; _local2--; }; }; _local4[_index] = _filter; _target.filters = _local4; } } }//package gs.plugins
Section 171
//FramePlugin (gs.plugins.FramePlugin) package gs.plugins { import flash.display.*; import gs.*; public class FramePlugin extends TweenPlugin { protected var _target:MovieClip; public var frame:int; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function FramePlugin(){ this.propName = "frame"; this.overwriteProps = ["frame"]; this.round = true; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){ return (false); }; _target = (_arg1 as MovieClip); this.frame = _target.currentFrame; addTween(this, "frame", this.frame, _arg2, "frame"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.gotoAndStop(this.frame); } } }//package gs.plugins
Section 172
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.filters.*; public class GlowFilterPlugin extends FilterPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function GlowFilterPlugin(){ this.propName = "glowFilter"; this.overwriteProps = ["glowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = GlowFilter; initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout)); return (true); } } }//package gs.plugins
Section 173
//HexColorsPlugin (gs.plugins.HexColorsPlugin) package gs.plugins { import flash.display.*; import gs.*; public class HexColorsPlugin extends TweenPlugin { protected var _colors:Array; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function HexColorsPlugin(){ this.propName = "hexColors"; this.overwriteProps = []; _colors = []; } override public function killProps(_arg1:Object):void{ var _local2:int = (_colors.length - 1); while (_local2 > -1) { if (_arg1[_colors[_local2][1]] != undefined){ _colors.splice(_local2, 1); }; _local2--; }; super.killProps(_arg1); } public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{ var _local5:Number; var _local6:Number; var _local7:Number; if (_arg3 != _arg4){ _local5 = (_arg3 >> 16); _local6 = ((_arg3 >> 8) & 0xFF); _local7 = (_arg3 & 0xFF); _colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)]; this.overwriteProps[this.overwriteProps.length] = _arg2; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:Array; _local2 = (_colors.length - 1); while (_local2 > -1) { _local3 = _colors[_local2]; _local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7]))); _local2--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; for (_local4 in _arg2) { initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4])); }; return (true); } } }//package gs.plugins
Section 174
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin) package gs.plugins { public class RemoveTintPlugin extends TintPlugin { public static const VERSION:Number = 1.01; public static const API:Number = 1; public function RemoveTintPlugin(){ this.propName = "removeTint"; } } }//package gs.plugins
Section 175
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin) package gs.plugins { import flash.display.*; import gs.*; public class RoundPropsPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function RoundPropsPlugin(){ this.propName = "roundProps"; this.overwriteProps = []; this.round = true; } public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 176
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin) package gs.plugins { import flash.display.*; import gs.*; public class ShortRotationPlugin extends TweenPlugin { public static const VERSION:Number = 1; public static const API:Number = 1; public function ShortRotationPlugin(){ this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; if (typeof(_arg2) == "number"){ return (false); }; for (_local4 in _arg2) { initRotation(_arg1, _local4, _arg1[_local4], _arg2[_local4]); }; return (true); } public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ var _local5:Number = ((_arg4 - _arg3) % 360); if (((_arg4 - _arg3) % 360) != (_local5 % 180)){ _local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360); }; addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package gs.plugins
Section 177
//TintPlugin (gs.plugins.TintPlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.geom.*; import gs.utils.tween.*; public class TintPlugin extends TweenPlugin { protected var _target:DisplayObject; protected var _ct:ColorTransform; protected var _ignoreAlpha:Boolean; public static const VERSION:Number = 1.1; public static const API:Number = 1; protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"]; public function TintPlugin(){ this.propName = "tint"; this.overwriteProps = ["tint"]; } public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{ var _local3:int; var _local4:String; _target = _arg1; _ct = _target.transform.colorTransform; _local3 = (_props.length - 1); while (_local3 > -1) { _local4 = _props[_local3]; if (_ct[_local4] != _arg2[_local4]){ _tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false); }; _local3--; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg1 is DisplayObject)){ return (false); }; var _local4:ColorTransform = new ColorTransform(); if (((!((_arg2 == null))) && (!((_arg3.exposedVars.removeTint == true))))){ _local4.color = uint(_arg2); }; _ignoreAlpha = true; init((_arg1 as DisplayObject), _local4); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:ColorTransform; updateTweens(_arg1); if (_ignoreAlpha){ _local2 = _target.transform.colorTransform; _ct.alphaMultiplier = _local2.alphaMultiplier; _ct.alphaOffset = _local2.alphaOffset; }; _target.transform.colorTransform = _ct; } } }//package gs.plugins
Section 178
//TweenPlugin (gs.plugins.TweenPlugin) package gs.plugins { import gs.*; import gs.utils.tween.*; public class TweenPlugin { public var overwriteProps:Array; protected var _tweens:Array; public var propName:String; public var onComplete:Function; public var round:Boolean; protected var _changeFactor:Number;// = 0 public static const VERSION:Number = 1.03; public static const API:Number = 1; public function TweenPlugin(){ _tweens = []; super(); } protected function updateTweens(_arg1:Number):void{ var _local2:int; var _local3:TweenInfo; var _local4:Number; var _local5:int; if (this.round){ _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local5 = ((_local4)<0) ? -1 : 1; _local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4); _local2--; }; } else { _local2 = (_tweens.length - 1); while (_local2 > -1) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); _local2--; }; }; } public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _changeFactor = _arg1; } protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{ var _local6:Number; if (_arg4 != null){ _local6 = ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4); if (_local6 != 0){ _tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false); }; }; } public function killProps(_arg1:Object):void{ var _local2:int; _local2 = (this.overwriteProps.length - 1); while (_local2 > -1) { if ((this.overwriteProps[_local2] in _arg1)){ this.overwriteProps.splice(_local2, 1); }; _local2--; }; _local2 = (_tweens.length - 1); while (_local2 > -1) { if ((_tweens[_local2].name in _arg1)){ _tweens.splice(_local2, 1); }; _local2--; }; } public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName); return (true); } public function get changeFactor():Number{ return (_changeFactor); } public static function activate(_arg1:Array):Boolean{ var _local2:int; var _local3:Object; _local2 = (_arg1.length - 1); while (_local2 > -1) { _local3 = new (_arg1[_local2]); TweenLite.plugins[_local3.propName] = _arg1[_local2]; _local2--; }; return (true); } } }//package gs.plugins
Section 179
//VisiblePlugin (gs.plugins.VisiblePlugin) package gs.plugins { import flash.display.*; import gs.*; public class VisiblePlugin extends TweenPlugin { protected var _target:Object; protected var _visible:Boolean; protected var _tween:TweenLite; public static const VERSION:Number = 1; public static const API:Number = 1; public function VisiblePlugin(){ this.propName = "visible"; this.overwriteProps = ["visible"]; this.onComplete = onCompleteTween; } public function onCompleteTween():void{ if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){ _target.visible = _visible; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _visible = Boolean(_arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ if (_target.visible != true){ _target.visible = true; }; } } }//package gs.plugins
Section 180
//VolumePlugin (gs.plugins.VolumePlugin) package gs.plugins { import flash.display.*; import gs.*; import flash.media.*; public class VolumePlugin extends TweenPlugin { protected var _target:Object; protected var _st:SoundTransform; public static const VERSION:Number = 1.01; public static const API:Number = 1; public function VolumePlugin(){ this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){ return (false); }; _target = _arg1; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, _arg2, "volume"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.soundTransform = _st; } } }//package gs.plugins
Section 181
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo) package gs.utils.tween { public class ArrayTweenInfo { public var change:Number; public var start:Number; public var index:uint; public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){ this.index = _arg1; this.start = _arg2; this.change = _arg3; } } }//package gs.utils.tween
Section 182
//TweenInfo (gs.utils.tween.TweenInfo) package gs.utils.tween { public class TweenInfo { public var start:Number; public var name:String; public var change:Number; public var target:Object; public var property:String; public var isPlugin:Boolean; public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; } } }//package gs.utils.tween
Section 183
//OverwriteManager (gs.OverwriteManager) package gs { import flash.utils.*; import gs.utils.tween.*; import flash.errors.*; public class OverwriteManager { public static const ALL:int = 1; public static const NONE:int = 0; public static const AUTO:int = 2; public static const CONCURRENT:int = 3; public static const version:Number = 3.12; public static var mode:int; public static var enabled:Boolean; public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array):void{ var _local4:int; var _local5:String; var _local6:TweenInfo; _local4 = (_arg3.length - 1); while (_local4 > -1) { _local6 = _arg3[_local4]; if ((_local6.name in _arg1)){ _arg3.splice(_local4, 1); } else { if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){ _local6.target.killProps(_arg1); if (_local6.target.overwriteProps.length == 0){ _arg3.splice(_local4, 1); }; }; }; _local4--; }; for (_local5 in _arg1) { delete _arg2[_local5]; }; } public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{ var _local7:int; var _local8:TweenLite; var _local10:Array; var _local11:Object; var _local12:int; var _local13:TweenInfo; var _local14:Array; var _local3:Object = _arg1.vars; var _local4:int = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite); if ((((_local4 < 2)) || ((_arg2 == null)))){ return; }; var _local5:Number = _arg1.startTime; var _local6:Array = []; var _local9 = -1; _local7 = (_arg2.length - 1); while (_local7 > -1) { _local8 = _arg2[_local7]; if (_local8 == _arg1){ _local9 = _local7; } else { if ((((((_local7 < _local9)) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){ _local6[_local6.length] = _local8; }; }; _local7--; }; if ((((_local6.length == 0)) || ((_arg1.tweens.length == 0)))){ return; }; if (_local4 == AUTO){ _local10 = _arg1.tweens; _local11 = {}; _local7 = (_local10.length - 1); while (_local7 > -1) { _local13 = _local10[_local7]; if (_local13.isPlugin){ if (_local13.name == "_MULTIPLE_"){ _local14 = _local13.target.overwriteProps; _local12 = (_local14.length - 1); while (_local12 > -1) { _local11[_local14[_local12]] = true; _local12--; }; } else { _local11[_local13.name] = true; }; _local11[_local13.target.propName] = true; } else { _local11[_local13.name] = true; }; _local7--; }; _local7 = (_local6.length - 1); while (_local7 > -1) { killVars(_local11, _local6[_local7].exposedVars, _local6[_local7].tweens); _local7--; }; } else { _local7 = (_local6.length - 1); while (_local7 > -1) { _local6[_local7].enabled = false; _local7--; }; }; } public static function init(_arg1:int=2):int{ if (TweenLite.version < 10.09){ }; TweenLite.overwriteManager = OverwriteManager; mode = _arg1; enabled = true; return (mode); } } }//package gs
Section 184
//TweenLite (gs.TweenLite) package gs { import flash.events.*; import flash.display.*; import flash.utils.*; import gs.utils.tween.*; import gs.plugins.*; public class TweenLite { public var started:Boolean; public var delay:Number; protected var _hasUpdate:Boolean; protected var _hasPlugins:Boolean; public var initted:Boolean; public var active:Boolean; public var startTime:Number; public var target:Object; public var duration:Number; public var gc:Boolean; public var tweens:Array; public var vars:Object; public var ease:Function; public var exposedVars:Object; public var initTime:Number; public var combinedTimeScale:Number; public static const version:Number = 10.092; private static var _timer:Timer = new Timer(2000); public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var currentTime:uint; public static var masterList:Dictionary = new Dictionary(false); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1}; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public static var timingSprite:Sprite = new Sprite(); public static var overwriteManager:Object; private static var _tlInitted:Boolean; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ if (_arg1 == null){ return; }; if (!_tlInitted){ TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]); currentTime = getTimer(); timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; _timer.addEventListener("timer", killGarbage, false, 0, true); _timer.start(); _tlInitted = true; }; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); this.combinedTimeScale = ((_arg3.timeScale) || (1)); this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0)))); this.target = _arg1; if (typeof(this.vars.ease) != "function"){ this.vars.ease = defaultEase; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; this.ease = this.vars.ease; this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars; this.tweens = []; this.initTime = currentTime; this.startTime = (this.initTime + (this.delay * 1000)); var _local4:int = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); if (((!((_arg1 in masterList))) || ((_local4 == 1)))){ masterList[_arg1] = [this]; } else { masterList[_arg1].push(this); }; if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){ initTweenVals(); if (this.active){ render((this.startTime + 1)); } else { render(this.startTime); }; if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){ this.target.visible = this.exposedVars.visible; }; }; } public function get enabled():Boolean{ return ((this.gc) ? false : true); } public function set enabled(_arg1:Boolean):void{ var _local2:Array; var _local3:Boolean; var _local4:int; if (_arg1){ if (!(this.target in masterList)){ masterList[this.target] = [this]; } else { _local2 = masterList[this.target]; _local4 = (_local2.length - 1); while (_local4 > -1) { if (_local2[_local4] == this){ _local3 = true; break; }; _local4--; }; if (!_local3){ _local2[_local2.length] = this; }; }; }; this.gc = (_arg1) ? false : true; if (this.gc){ this.active = false; } else { this.active = this.started; }; } public function clear():void{ this.tweens = []; this.vars = (this.exposedVars = {ease:this.vars.ease}); _hasUpdate = false; } public function render(_arg1:uint):void{ var _local3:Number; var _local4:TweenInfo; var _local5:int; var _local2:Number = ((_arg1 - this.startTime) * 0.001); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change)); _local5--; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } public function activate():void{ this.started = (this.active = true); if (!this.initted){ initTweenVals(); }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; } public function initTweenVals():void{ var _local1:String; var _local2:int; var _local3:*; var _local4:TweenInfo; if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){ this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false); }; for (_local1 in this.exposedVars) { if ((_local1 in _reservedProps)){ } else { if ((_local1 in plugins)){ _local3 = new (plugins[_local1]); if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){ this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false); } else { this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true); _hasPlugins = true; }; } else { this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false); }; }; }; if (this.vars.runBackwards == true){ _local2 = (this.tweens.length - 1); while (_local2 > -1) { _local4 = this.tweens[_local2]; this.tweens[_local2].start = (_local4.start + _local4.change); _local4.change = -(_local4.change); _local2--; }; }; if (this.vars.onUpdate != null){ _hasUpdate = true; }; if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){ overwriteManager.manageOverwrites(this, masterList[this.target]); }; this.initted = true; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function killVars(_arg1:Object):void{ if (overwriteManager.enabled){ overwriteManager.killVars(_arg1, this.exposedVars, this.tweens); }; } public function complete(_arg1:Boolean=false):void{ var _local2:int; if (!_arg1){ if (!this.initted){ initTweenVals(); }; this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale)); render(currentTime); return; }; if (_hasPlugins){ _local2 = (this.tweens.length - 1); while (_local2 > -1) { if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){ this.tweens[_local2].target.onComplete(); }; _local2--; }; }; if (this.vars.persist != true){ this.enabled = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public static function updateAll(_arg1:Event=null):void{ var _local4:Array; var _local5:int; var _local6:TweenLite; var _local2:uint = (currentTime = getTimer()); var _local3:Dictionary = masterList; for each (_local4 in _local3) { _local5 = (_local4.length - 1); while (_local5 > -1) { _local6 = _local4[_local5]; if (_local6.active){ _local6.render(_local2); } else { if (_local6.gc){ _local4.splice(_local5, 1); } else { if (_local2 >= _local6.startTime){ _local6.activate(); _local6.render(_local2); }; }; }; _local5--; }; }; } public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{ if (_arg1 != null){ if (_arg2){ _arg1.clear(); }; _arg1.enabled = false; }; } public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; var _local5:TweenLite; if (((!((_arg1 == null))) && ((_arg1 in masterList)))){ _local3 = masterList[_arg1]; _local4 = (_local3.length - 1); while (_local4 > -1) { _local5 = _local3[_local4]; if (((_arg2) && (!(_local5.gc)))){ _local5.complete(false); }; _local5.clear(); _local4--; }; delete masterList[_arg1]; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } protected static function killGarbage(_arg1:TimerEvent):void{ var _local3:Object; var _local2:Dictionary = masterList; for (_local3 in _local2) { if (_local2[_local3].length == 0){ delete _local2[_local3]; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0})); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 185
//TweenMax (gs.TweenMax) package gs { import flash.events.*; import flash.utils.*; import gs.utils.tween.*; import gs.plugins.*; import gs.events.*; public class TweenMax extends TweenLite implements IEventDispatcher { protected var _dispatcher:EventDispatcher; protected var _callbacks:Object; public var pauseTime:Number; protected var _repeatCount:Number; protected var _timeScale:Number; public static const version:Number = 10.12; public static var removeTween:Function = TweenLite.removeTween; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(); ; protected static var _pausedTweens:Dictionary = new Dictionary(false); protected static var _globalTimeScale:Number = 1; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]); public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ super(_arg1, _arg2, _arg3); if (TweenLite.version < 10.092){ }; if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenMax)))){ _timeScale = 1; this.combinedTimeScale = _globalTimeScale; } else { _timeScale = this.combinedTimeScale; this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale); }; if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){ this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); if ((((_arg2 == 0)) && ((this.delay == 0)))){ onUpdateDispatcher(); onCompleteDispatcher(); }; }; _repeatCount = 0; if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){ this.vars.persist = true; }; if ((((this.delay == 0)) && (!((this.vars.startAt == null))))){ this.vars.startAt.overwrite = 0; new TweenMax(this.target, 0, this.vars.startAt); }; } public function dispatchEvent(_arg1:Event):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.dispatchEvent(_arg1)); } public function get reversed():Boolean{ return ((this.ease == reverseEase)); } public function set reversed(_arg1:Boolean):void{ if (this.reversed != _arg1){ reverse(); }; } public function get progress():Number{ var _local1:Number = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime; var _local2:Number = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale); if (_local2 > 1){ return (1); }; if (_local2 < 0){ return (0); }; return (_local2); } override public function set enabled(_arg1:Boolean):void{ if (!_arg1){ _pausedTweens[this] = null; delete _pausedTweens[this]; }; super.enabled = _arg1; if (_arg1){ this.combinedTimeScale = (_timeScale * _globalTimeScale); }; } protected function onStartDispatcher(... _args):void{ if (_callbacks.onStart != null){ _callbacks.onStart.apply(null, this.vars.onStartParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local5:int; var _local6:TweenInfo; var _local7:Object; var _local8:Object; var _local9:Array; var _local10:Boolean; var _local11:Array; var _local12:Object; var _local4:Number = this.progress; if (this.initted){ if (!_arg3){ _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local6 = this.tweens[_local5]; if (_local6.name == _arg1){ _local6.target[_local6.property] = _local6.start; }; _local5--; }; }; _local7 = this.vars; _local8 = this.exposedVars; _local9 = this.tweens; _local10 = _hasPlugins; this.tweens = []; this.vars = (this.exposedVars = {}); this.vars[_arg1] = _arg2; initTweenVals(); if (((!((this.ease == reverseEase))) && ((_local7.ease is Function)))){ this.ease = _local7.ease; }; if (((_arg3) && (!((_local4 == 0))))){ adjustStartValues(); }; _local11 = this.tweens; this.vars = _local7; this.exposedVars = _local8; this.tweens = _local9; _local12 = {}; _local12[_arg1] = true; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local6 = this.tweens[_local5]; if (_local6.name == _arg1){ this.tweens.splice(_local5, 1); } else { if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){ _local6.target.killProps(_local12); if (_local6.target.overwriteProps.length == 0){ this.tweens.splice(_local5, 1); }; }; }; _local5--; }; this.tweens = this.tweens.concat(_local11); _hasPlugins = Boolean(((_local10) || (_hasPlugins))); }; this.vars[_arg1] = (this.exposedVars[_arg1] = _arg2); } override public function initTweenVals():void{ var _local1:int; var _local2:int; var _local3:String; var _local4:String; var _local5:Array; var _local6:Object; var _local7:TweenInfo; if (((!((this.vars.startAt == null))) && (!((this.delay == 0))))){ this.vars.startAt.overwrite = 0; new TweenMax(this.target, 0, this.vars.startAt); }; super.initTweenVals(); if ((((this.exposedVars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){ _local5 = this.exposedVars.roundProps; _local1 = (_local5.length - 1); while (_local1 > -1) { _local3 = _local5[_local1]; _local2 = (this.tweens.length - 1); while (_local2 > -1) { _local7 = this.tweens[_local2]; if (_local7.name == _local3){ if (_local7.isPlugin){ _local7.target.round = true; } else { if (_local6 == null){ _local6 = new TweenLite.plugins.roundProps(); _local6.add(_local7.target, _local3, _local7.start, _local7.change); _hasPlugins = true; this.tweens[_local2] = new TweenInfo(_local6, "changeFactor", 0, 1, _local3, true); } else { _local6.add(_local7.target, _local3, _local7.start, _local7.change); this.tweens.splice(_local2, 1); }; }; } else { if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){ _local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " "); if (_local4.indexOf(((" " + _local3) + " ")) != -1){ _local7.target.round = true; }; }; }; _local2--; }; _local1--; }; }; } public function restart(_arg1:Boolean=false):void{ if (_arg1){ this.initTime = currentTime; this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale))); } else { this.startTime = currentTime; this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale))); }; _repeatCount = 0; if (this.target != this.vars.onComplete){ render(this.startTime); }; this.pauseTime = NaN; _pausedTweens[this] = null; delete _pausedTweens[this]; this.enabled = true; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if ((((_arg1 == TweenEvent.UPDATE)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){ this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } protected function adjustStartValues():void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:TweenInfo; var _local6:int; var _local1:Number = this.progress; if (_local1 != 0){ _local2 = this.ease(_local1, 0, 1, 1); _local3 = (1 / (1 - _local2)); _local6 = (this.tweens.length - 1); while (_local6 > -1) { _local5 = this.tweens[_local6]; _local4 = (_local5.start + _local5.change); if (_local5.isPlugin){ _local5.change = ((_local4 - _local2) * _local3); } else { _local5.change = ((_local4 - _local5.target[_local5.property]) * _local3); }; _local5.start = (_local4 - _local5.change); _local6--; }; }; } override public function render(_arg1:uint):void{ var _local3:Number; var _local4:TweenInfo; var _local5:int; var _local2:Number = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change)); _local5--; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } protected function initDispatcher():void{ var _local1:Object; var _local2:String; if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); _callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete}; if (this.vars.isTV == true){ this.vars = this.vars.clone(); } else { _local1 = {}; for (_local2 in this.vars) { _local1[_local2] = this.vars[_local2]; }; this.vars = _local1; }; this.vars.onStart = onStartDispatcher; this.vars.onComplete = onCompleteDispatcher; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); this.vars.onUpdate = onUpdateDispatcher; _hasUpdate = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; }; } public function willTrigger(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.willTrigger(_arg1)); } public function get repeatCount():Number{ return (_repeatCount); } public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; var _local3:Number = this.progress; if (((_arg1) && ((_local3 > 0)))){ this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); }; if (_arg2 != false){ if (_local3 < 1){ resume(); } else { restart(); }; }; } protected function onUpdateDispatcher(... _args):void{ if (_callbacks.onUpdate != null){ _callbacks.onUpdate.apply(null, this.vars.onUpdateParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); } public function set paused(_arg1:Boolean):void{ if (_arg1){ pause(); } else { resume(); }; } public function resume():void{ this.enabled = true; if (!isNaN(this.pauseTime)){ this.initTime = (this.initTime + (currentTime - this.pauseTime)); this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale))); this.pauseTime = NaN; if (((!(this.started)) && ((currentTime >= this.startTime)))){ activate(); } else { this.active = this.started; }; _pausedTweens[this] = null; delete _pausedTweens[this]; }; } public function get paused():Boolean{ return (!(isNaN(this.pauseTime))); } public function set repeatCount(_arg1:Number):void{ _repeatCount = _arg1; } public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4)); } public function killProperties(_arg1:Array):void{ var _local3:int; var _local2:Object = {}; _local3 = (_arg1.length - 1); while (_local3 > -1) { _local2[_arg1[_local3]] = true; _local3--; }; killVars(_local2); } public function set progress(_arg1:Number):void{ this.startTime = (currentTime - ((this.duration * _arg1) * 1000)); this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); if (!this.started){ activate(); }; render(currentTime); if (!isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.active = false; }; } public function hasEventListener(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.hasEventListener(_arg1)); } public function pause():void{ if (isNaN(this.pauseTime)){ this.pauseTime = currentTime; this.startTime = 999999999999999; this.enabled = false; _pausedTweens[this] = this; }; } override public function complete(_arg1:Boolean=false):void{ if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){ _repeatCount++; if (!isNaN(this.vars.yoyo)){ this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease; }; this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime; this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale))); } else { if (this.vars.persist == true){ pause(); }; }; super.complete(_arg1); } public function set timeScale(_arg1:Number):void{ if (_arg1 < 1E-5){ _arg1 = (_timeScale = 1E-5); } else { _timeScale = _arg1; _arg1 = (_arg1 * _globalTimeScale); }; this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1))); if (this.startTime != 999999999999999){ this.startTime = (this.initTime + (this.delay * (1000 / _arg1))); }; this.combinedTimeScale = _arg1; } public function invalidate(_arg1:Boolean=true):void{ var _local2:Number; if (this.initted){ _local2 = this.progress; if (((!(_arg1)) && (!((_local2 == 0))))){ this.progress = 0; }; this.tweens = []; _hasPlugins = false; this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars; initTweenVals(); _timeScale = ((this.vars.timeScale) || (1)); this.combinedTimeScale = (_timeScale * _globalTimeScale); this.delay = ((this.vars.delay) || (0)); if (isNaN(this.pauseTime)){ this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale)); }; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ if (_dispatcher != null){ this.vars.onStart = _callbacks.onStart; this.vars.onUpdate = _callbacks.onUpdate; this.vars.onComplete = _callbacks.onComplete; _dispatcher = null; }; initDispatcher(); }; if (_local2 != 0){ if (_arg1){ adjustStartValues(); } else { this.progress = _local2; }; }; }; } public function get timeScale():Number{ return (_timeScale); } protected function onCompleteDispatcher(... _args):void{ if (_callbacks.onComplete != null){ _callbacks.onComplete.apply(null, this.vars.onCompleteParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } public static function set globalTimeScale(_arg1:Number):void{ setGlobalTimeScale(_arg1); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(true, _arg1, _arg2); } public static function killAllDelayedCalls(_arg1:Boolean=false):void{ killAll(_arg1, false, true); } public static function setGlobalTimeScale(_arg1:Number):void{ var _local3:int; var _local4:Array; if (_arg1 < 1E-5){ _arg1 = 1E-5; }; var _local2:Dictionary = masterList; _globalTimeScale = _arg1; for each (_local4 in _local2) { _local3 = (_local4.length - 1); while (_local3 > -1) { if ((_local4[_local3] is TweenMax)){ _local4[_local3].timeScale = (_local4[_local3].timeScale * 1); }; _local3--; }; }; } public static function get globalTimeScale():Number{ return (_globalTimeScale); } public static function getTweensOf(_arg1:Object):Array{ var _local4:TweenLite; var _local5:int; var _local2:Array = masterList[_arg1]; var _local3:Array = []; if (_local2 != null){ _local5 = (_local2.length - 1); while (_local5 > -1) { if (!_local2[_local5].gc){ _local3[_local3.length] = _local2[_local5]; }; _local5--; }; }; for each (_local4 in _pausedTweens) { if (_local4.target == _arg1){ _local3[_local3.length] = _local4; }; }; return (_local3); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, persist:_arg4, overwrite:0})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array = getTweensOf(_arg1); var _local3:int = (_local2.length - 1); while (_local3 > -1) { if (((((_local2[_local3].active) || ((_local2[_local3].startTime == currentTime)))) && (!(_local2[_local3].gc)))){ return (true); }; _local3--; }; return (false); } public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local5:Boolean; var _local4:Array = getAllTweens(); var _local6:int = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){ _local4[_local6].paused = _arg1; }; _local6--; }; } public static function killAllTweens(_arg1:Boolean=false):void{ killAll(_arg1, true, false); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local5:Boolean; var _local6:int; var _local4:Array = getAllTweens(); _local6 = (_local4.length - 1); while (_local6 > -1) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ if (_arg1){ _local4[_local6].complete(false); _local4[_local6].clear(); } else { TweenLite.removeTween(_local4[_local6], true); }; }; _local6--; }; } public static function getAllTweens():Array{ var _local3:Array; var _local4:int; var _local5:TweenLite; var _local1:Dictionary = masterList; var _local2:Array = []; for each (_local3 in _local1) { _local4 = (_local3.length - 1); while (_local4 > -1) { if (!_local3[_local4].gc){ _local2[_local2.length] = _local3[_local4]; }; _local4--; }; }; for each (_local5 in _pausedTweens) { _local2[_local2.length] = _local5; }; return (_local2); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(false, _arg1, _arg2); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } } }//package gs
Section 186
//flag_icon_342 (NitroNinjas_fla.flag_icon_342) package NitroNinjas_fla { import flash.display.*; public dynamic class flag_icon_342 extends MovieClip { public function flag_icon_342(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package NitroNinjas_fla
Section 187
//ButtonDefault (OtherClasses.Buttons.ButtonDefault) package OtherClasses.Buttons { import flash.events.*; import flash.display.*; public class ButtonDefault extends MovieClip { public var parentSource:Sprite; public var hoverMC:MovieClip; var theRoot:MovieClip; public function ButtonDefault(){ this.addEventListener(Event.ADDED_TO_STAGE, init); } function mouseIsOver(_arg1:MouseEvent):void{ this.gotoAndPlay("mouseOver"); } function mouseIsOut(_arg1:MouseEvent):void{ this.gotoAndStop("normal"); } function init(_arg1:Event):void{ this.removeEventListener(Event.ADDED_TO_STAGE, init); theRoot = MovieClip(root); this.hoverMC.addEventListener(MouseEvent.MOUSE_OVER, mouseIsOver); this.hoverMC.addEventListener(MouseEvent.MOUSE_OUT, mouseIsOut); this.hoverMC.addEventListener(MouseEvent.CLICK, mouseIsClicked); runOtherInitStuff(); } function runClickFunction():void{ } function runOtherInitStuff():void{ } function removeClickListener():void{ this.hoverMC.removeEventListener(MouseEvent.CLICK, mouseIsClicked); } public function kill():void{ this.hoverMC.removeEventListener(MouseEvent.MOUSE_OVER, mouseIsOver); this.hoverMC.removeEventListener(MouseEvent.MOUSE_OUT, mouseIsOut); parentSource.removeChild(this); } function mouseIsClicked(_arg1:MouseEvent):void{ removeClickListener(); runClickFunction(); } } }//package OtherClasses.Buttons
Section 188
//HowToPlay_MM (OtherClasses.Buttons.HowToPlay_MM) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class HowToPlay_MM extends ButtonDefault { public var __setPropDict:Dictionary; public var theText:LocalizedTextField; public function HowToPlay_MM(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 20, frame21, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20); parentSource = _arg1; } function frame18(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame10(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame11(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame12(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame13(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame14(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame15(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame16(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame17(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function __setProp_theText_howToPlay_MM_buttontext_0(){ try { theText["componentInspectorSetting"] = true; } catch(e:Error) { }; theText.text = "{btn_howtoplay}"; theText.textColor = 0xFFFFFF; theText.textSize = 12; theText.bold = false; theText.disableWordwrap = false; theText.embedFonts = true; theText.font = ""; theText.hAlign = "center"; theText.multiline = false; theText.vAlign = "top"; theText.antiAliasType = "advanced"; theText.glowBlur = 3; theText.glowColor = 0; theText.useGlowFilter = false; theText.glowQuality = 1; theText.glowStrength = 5; theText.gridFitType = "pixel"; theText.italic = false; theText.selectable = false; theText.underline = false; try { theText["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_theText_howToPlay_MM_buttontext_1(){ try { theText["componentInspectorSetting"] = true; } catch(e:Error) { }; theText.text = "{btn_howtoplay}"; theText.textColor = 0xFF00; theText.textSize = 12; theText.bold = false; theText.disableWordwrap = false; theText.embedFonts = true; theText.font = ""; theText.hAlign = "center"; theText.multiline = false; theText.vAlign = "top"; theText.antiAliasType = "advanced"; theText.glowBlur = 3; theText.glowColor = 0; theText.useGlowFilter = false; theText.glowQuality = 1; theText.glowStrength = 5; theText.gridFitType = "pixel"; theText.italic = false; theText.selectable = false; theText.underline = false; try { theText["componentInspectorSetting"] = false; } catch(e:Error) { }; } function frame19(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.menuSelectSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[theText] == undefined)) || (!((int(__setPropDict[theText]) == 1))))){ __setPropDict[theText] = 1; __setProp_theText_howToPlay_MM_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame21(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; stop(); } function frame20(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } function frame9(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_howToPlay_MM_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.manipulateBlackFader("MM_TO_HTP"); } } }//package OtherClasses.Buttons
Section 189
//HowToPlay_PW (OtherClasses.Buttons.HowToPlay_PW) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class HowToPlay_PW extends ButtonDefault { public var __id6_:LocalizedTextField; public var __setPropDict:Dictionary; public function HowToPlay_PW(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame2(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } function __setProp___id6__howToPlay_PW_buttontext_0(){ try { __id6_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id6_.text = "{btn_howtoplay}"; __id6_.textColor = 0xFFFFFF; __id6_.textSize = 12; __id6_.bold = false; __id6_.disableWordwrap = false; __id6_.embedFonts = true; __id6_.font = ""; __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___id6__howToPlay_PW_buttontext_1(){ try { __id6_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id6_.text = "{btn_howtoplay}"; __id6_.textColor = 0xFF00; __id6_.textSize = 12; __id6_.bold = false; __id6_.disableWordwrap = false; __id6_.embedFonts = true; __id6_.font = ""; __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 frame6(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } function frame1(){ if ((((__setPropDict[__id6_] == undefined)) || (!((int(__setPropDict[__id6_]) == 1))))){ __setPropDict[__id6_] = 1; __setProp___id6__howToPlay_PW_buttontext_0(); }; stop(); } function frame9(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; stop(); } function frame4(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id6_] == undefined)) || (!((((int(__setPropDict[__id6_]) >= 2)) && ((int(__setPropDict[__id6_]) <= 9))))))){ __setPropDict[__id6_] = currentFrame; __setProp___id6__howToPlay_PW_buttontext_1(); }; } override function mouseIsClicked(_arg1:MouseEvent):void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.displayHowToPlayWithinGame(); } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); if (NitroNinjas.menuChannel != null){ NitroNinjas.menuChannel.stop(); }; } } }//package OtherClasses.Buttons
Section 190
//MainMenu_HTP (OtherClasses.Buttons.MainMenu_HTP) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class MainMenu_HTP extends ButtonDefault { public var __id13_:LocalizedTextField; public var __setPropDict:Dictionary; public function MainMenu_HTP(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 7, frame8, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id13_] == undefined)) || (!((int(__setPropDict[__id13_]) == 1))))){ __setPropDict[__id13_] = 1; __setProp___id13__mainMenu_HTP_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; } function __setProp___id13__mainMenu_HTP_buttontext_0(){ try { __id13_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id13_.text = "{btn_mainmenu}"; __id13_.textColor = 0xFFFFFF; __id13_.textSize = 12; __id13_.bold = false; __id13_.disableWordwrap = false; __id13_.embedFonts = true; __id13_.font = ""; __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) { }; } function frame7(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id13_] == undefined)) || (!((((int(__setPropDict[__id13_]) >= 2)) && ((int(__setPropDict[__id13_]) <= 8))))))){ __setPropDict[__id13_] = currentFrame; __setProp___id13__mainMenu_HTP_buttontext_1(); }; stop(); } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); if (NitroNinjas.cameFromGame){ theRoot.returnToMainMenuFromHTPWhilePaused(); } else { if (!NitroNinjas.cameFromGame){ theRoot.manipulateBlackFader("HTP_TO_MM"); }; }; } function __setProp___id13__mainMenu_HTP_buttontext_1(){ try { __id13_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id13_.text = "{btn_mainmenu}"; __id13_.textColor = 0xFF00; __id13_.textSize = 12; __id13_.bold = false; __id13_.disableWordwrap = false; __id13_.embedFonts = true; __id13_.font = ""; __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) { }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } } }//package OtherClasses.Buttons
Section 191
//MainMenu_IG (OtherClasses.Buttons.MainMenu_IG) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class MainMenu_IG extends ButtonDefault { public var __id8_:LocalizedTextField; public var __setPropDict:Dictionary; public function MainMenu_IG(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame2(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } function frame1(){ if ((((__setPropDict[__id8_] == undefined)) || (!((int(__setPropDict[__id8_]) == 1))))){ __setPropDict[__id8_] = 1; __setProp___id8__mainMenu_IG_buttontext_0(); }; stop(); } function frame9(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; stop(); } function __setProp___id8__mainMenu_IG_buttontext_0(){ try { __id8_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id8_.text = "{btn_mainmenu}"; __id8_.textColor = 0xFFFFFF; __id8_.textSize = 12; __id8_.bold = false; __id8_.disableWordwrap = false; __id8_.embedFonts = true; __id8_.font = ""; __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) { }; } function __setProp___id8__mainMenu_IG_buttontext_1(){ try { __id8_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id8_.text = "{btn_mainmenu}"; __id8_.textColor = 0xFF00; __id8_.textSize = 12; __id8_.bold = false; __id8_.disableWordwrap = false; __id8_.embedFonts = true; __id8_.font = ""; __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) { }; } function frame8(){ if ((((__setPropDict[__id8_] == undefined)) || (!((((int(__setPropDict[__id8_]) >= 2)) && ((int(__setPropDict[__id8_]) <= 9))))))){ __setPropDict[__id8_] = currentFrame; __setProp___id8__mainMenu_IG_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.returnToMainMenuFromGame(); } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } } }//package OtherClasses.Buttons
Section 192
//MainMenu_PW (OtherClasses.Buttons.MainMenu_PW) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class MainMenu_PW extends ButtonDefault { public var __id5_:LocalizedTextField; public var __setPropDict:Dictionary; public function MainMenu_PW(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } function __setProp___id5__mainMenu_PW_buttontext_0(){ try { __id5_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id5_.text = "{btn_mainmenu}"; __id5_.textColor = 0xFFFFFF; __id5_.textSize = 12; __id5_.bold = false; __id5_.disableWordwrap = false; __id5_.embedFonts = true; __id5_.font = ""; __id5_.hAlign = "center"; __id5_.multiline = false; __id5_.vAlign = "top"; __id5_.antiAliasType = "advanced"; __id5_.glowBlur = 3; __id5_.glowColor = 0; __id5_.useGlowFilter = false; __id5_.glowQuality = 1; __id5_.glowStrength = 5; __id5_.gridFitType = "pixel"; __id5_.italic = false; __id5_.selectable = false; __id5_.underline = false; try { __id5_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id5__mainMenu_PW_buttontext_1(){ try { __id5_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id5_.text = "{btn_mainmenu}"; __id5_.textColor = 0xFF00; __id5_.textSize = 12; __id5_.bold = false; __id5_.disableWordwrap = false; __id5_.embedFonts = true; __id5_.font = ""; __id5_.hAlign = "center"; __id5_.multiline = false; __id5_.vAlign = "top"; __id5_.antiAliasType = "advanced"; __id5_.glowBlur = 3; __id5_.glowColor = 0; __id5_.useGlowFilter = false; __id5_.glowQuality = 1; __id5_.glowStrength = 5; __id5_.gridFitType = "pixel"; __id5_.italic = false; __id5_.selectable = false; __id5_.underline = false; try { __id5_["componentInspectorSetting"] = false; } catch(e:Error) { }; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id5_] == undefined)) || (!((int(__setPropDict[__id5_]) == 1))))){ __setPropDict[__id5_] = 1; __setProp___id5__mainMenu_PW_buttontext_0(); }; stop(); } function frame3(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } function frame9(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; stop(); } function frame7(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } function frame2(){ if ((((__setPropDict[__id5_] == undefined)) || (!((((int(__setPropDict[__id5_]) >= 2)) && ((int(__setPropDict[__id5_]) <= 9))))))){ __setPropDict[__id5_] = currentFrame; __setProp___id5__mainMenu_PW_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.returnToMainMenuFromPauseMode(); } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); if (NitroNinjas.menuChannel != null){ NitroNinjas.menuChannel.stop(); }; } } }//package OtherClasses.Buttons
Section 193
//MoreGames_IG (OtherClasses.Buttons.MoreGames_IG) package OtherClasses.Buttons { import spill.localisation.*; import flash.net.*; import flash.events.*; import flash.display.*; import flash.utils.*; public class MoreGames_IG extends ButtonDefault { public var __id4_:LocalizedTextField; public var mgblEMC:MovieClip; public var __setPropDict:Dictionary; public function MoreGames_IG(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 5, frame6, 1, frame2, 2, frame3, 3, frame4, 4, frame5); parentSource = _arg1; } function __setProp___id4__moreGames_IG_buttontext_1(){ try { __id4_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id4_.text = "{btn_moregamesat}"; __id4_.textColor = 0xFF00; __id4_.textSize = 12; __id4_.bold = false; __id4_.disableWordwrap = false; __id4_.embedFonts = true; __id4_.font = ""; __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) { }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id4_] == undefined)) || (!((int(__setPropDict[__id4_]) == 1))))){ __setPropDict[__id4_] = 1; __setProp___id4__moreGames_IG_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 2)) && ((int(__setPropDict[__id4_]) <= 6))))))){ __setPropDict[__id4_] = currentFrame; __setProp___id4__moreGames_IG_buttontext_1(); }; } function __setProp___id4__moreGames_IG_buttontext_0(){ try { __id4_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id4_.text = "{btn_moregamesat}"; __id4_.textColor = 0xFFFFFF; __id4_.textSize = 12; __id4_.bold = false; __id4_.disableWordwrap = false; __id4_.embedFonts = true; __id4_.font = ""; __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 frame4(){ if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 2)) && ((int(__setPropDict[__id4_]) <= 6))))))){ __setPropDict[__id4_] = currentFrame; __setProp___id4__moreGames_IG_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 2)) && ((int(__setPropDict[__id4_]) <= 6))))))){ __setPropDict[__id4_] = currentFrame; __setProp___id4__moreGames_IG_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 2)) && ((int(__setPropDict[__id4_]) <= 6))))))){ __setPropDict[__id4_] = currentFrame; __setProp___id4__moreGames_IG_buttontext_1(); }; stop(); } function frame3(){ if ((((__setPropDict[__id4_] == undefined)) || (!((((int(__setPropDict[__id4_]) >= 2)) && ((int(__setPropDict[__id4_]) <= 6))))))){ __setPropDict[__id4_] = currentFrame; __setProp___id4__moreGames_IG_buttontext_1(); }; } override function mouseIsClicked(_arg1:MouseEvent):void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank"); } override function runOtherInitStuff():void{ NitroNinjas.localization.loadEndGameBrandingLogo(mgblEMC); } } }//package OtherClasses.Buttons
Section 194
//MoreGames_MM (OtherClasses.Buttons.MoreGames_MM) package OtherClasses.Buttons { import spill.localisation.*; import flash.net.*; import flash.events.*; import flash.display.*; import flash.utils.*; public class MoreGames_MM extends ButtonDefault { public var __setPropDict:Dictionary; public var mgblEMC:MovieClip; public var theText:LocalizedTextField; public function MoreGames_MM(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 20, frame21, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20); parentSource = _arg1; } function __setProp_theText_moreGames_MM_buttontext_0(){ try { theText["componentInspectorSetting"] = true; } catch(e:Error) { }; theText.text = "{btn_moregamesat}"; theText.textColor = 0xFFFFFF; theText.textSize = 12; theText.bold = false; theText.disableWordwrap = false; theText.embedFonts = true; theText.font = ""; theText.hAlign = "center"; theText.multiline = false; theText.vAlign = "top"; theText.antiAliasType = "advanced"; theText.glowBlur = 3; theText.glowColor = 0; theText.useGlowFilter = false; theText.glowQuality = 1; theText.glowStrength = 5; theText.gridFitType = "pixel"; theText.italic = false; theText.selectable = false; theText.underline = false; try { theText["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_theText_moreGames_MM_buttontext_1(){ try { theText["componentInspectorSetting"] = true; } catch(e:Error) { }; theText.text = "{btn_moregamesat}"; theText.textColor = 0xFF00; theText.textSize = 12; theText.bold = false; theText.disableWordwrap = false; theText.embedFonts = true; theText.font = ""; theText.hAlign = "center"; theText.multiline = false; theText.vAlign = "top"; theText.antiAliasType = "advanced"; theText.glowBlur = 3; theText.glowColor = 0; theText.useGlowFilter = false; theText.glowQuality = 1; theText.glowStrength = 5; theText.gridFitType = "pixel"; theText.italic = false; theText.selectable = false; theText.underline = false; try { theText["componentInspectorSetting"] = false; } catch(e:Error) { }; } function frame10(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame11(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame12(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame13(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame14(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame15(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame16(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame17(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame18(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame19(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.menuSelectSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[theText] == undefined)) || (!((int(__setPropDict[theText]) == 1))))){ __setPropDict[theText] = 1; __setProp_theText_moreGames_MM_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } function frame21(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; stop(); } function frame20(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } override function mouseIsClicked(_arg1:MouseEvent):void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank"); } function frame9(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_moreGames_MM_buttontext_1(); }; } override function runOtherInitStuff():void{ NitroNinjas.localization.loadEndGameBrandingLogo(mgblEMC); } } }//package OtherClasses.Buttons
Section 195
//MoreGames_PW (OtherClasses.Buttons.MoreGames_PW) package OtherClasses.Buttons { import spill.localisation.*; import flash.net.*; import flash.events.*; import flash.display.*; import flash.utils.*; public class MoreGames_PW extends ButtonDefault { public var __id3_:LocalizedTextField; public var mgblEMC:MovieClip; public var __setPropDict:Dictionary; public function MoreGames_PW(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 5, frame6, 1, frame2, 2, frame3, 3, frame4, 4, frame5); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id3_] == undefined)) || (!((int(__setPropDict[__id3_]) == 1))))){ __setPropDict[__id3_] = 1; __setProp___id3__moreGames_PW_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 2)) && ((int(__setPropDict[__id3_]) <= 6))))))){ __setPropDict[__id3_] = currentFrame; __setProp___id3__moreGames_PW_buttontext_1(); }; } override function runOtherInitStuff():void{ NitroNinjas.localization.loadEndGameBrandingLogo(mgblEMC); } function frame5(){ if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 2)) && ((int(__setPropDict[__id3_]) <= 6))))))){ __setPropDict[__id3_] = currentFrame; __setProp___id3__moreGames_PW_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 2)) && ((int(__setPropDict[__id3_]) <= 6))))))){ __setPropDict[__id3_] = currentFrame; __setProp___id3__moreGames_PW_buttontext_1(); }; stop(); } function frame3(){ if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 2)) && ((int(__setPropDict[__id3_]) <= 6))))))){ __setPropDict[__id3_] = currentFrame; __setProp___id3__moreGames_PW_buttontext_1(); }; } function __setProp___id3__moreGames_PW_buttontext_1(){ try { __id3_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id3_.text = "{btn_moregamesat}"; __id3_.textColor = 0xFF00; __id3_.textSize = 12; __id3_.bold = false; __id3_.disableWordwrap = false; __id3_.embedFonts = true; __id3_.font = ""; __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) { }; } function frame4(){ if ((((__setPropDict[__id3_] == undefined)) || (!((((int(__setPropDict[__id3_]) >= 2)) && ((int(__setPropDict[__id3_]) <= 6))))))){ __setPropDict[__id3_] = currentFrame; __setProp___id3__moreGames_PW_buttontext_1(); }; } override function mouseIsClicked(_arg1:MouseEvent):void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank"); } function __setProp___id3__moreGames_PW_buttontext_0(){ try { __id3_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id3_.text = "{btn_moregamesat}"; __id3_.textColor = 0xFFFFFF; __id3_.textSize = 12; __id3_.bold = false; __id3_.disableWordwrap = false; __id3_.embedFonts = true; __id3_.font = ""; __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) { }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); if (NitroNinjas.menuChannel != null){ NitroNinjas.menuChannel.stop(); }; } } }//package OtherClasses.Buttons
Section 196
//MusicButton (OtherClasses.Buttons.MusicButton) package OtherClasses.Buttons { import flash.events.*; public class MusicButton extends ButtonDefault { public function MusicButton(_arg1){ addFrameScript(0, frame1, 1, frame2); parentSource = _arg1; } override function mouseIsClicked(_arg1:MouseEvent):void{ if (NitroNinjas.musicIsOn){ NitroNinjas.musicST.volume = 0; NitroNinjas.musicChannel.soundTransform = NitroNinjas.musicST; this.gotoAndStop("musicOff"); NitroNinjas.musicIsOn = false; } else { if (!NitroNinjas.musicIsOn){ NitroNinjas.musicST.volume = 1; NitroNinjas.musicChannel.soundTransform = NitroNinjas.musicST; this.gotoAndStop("musicOn"); NitroNinjas.musicIsOn = true; }; }; } override function mouseIsOver(_arg1:MouseEvent):void{ } function frame1(){ stop(); } function frame2(){ stop(); } override function mouseIsOut(_arg1:MouseEvent):void{ } } }//package OtherClasses.Buttons
Section 197
//Next_HTP (OtherClasses.Buttons.Next_HTP) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class Next_HTP extends ButtonDefault { public var __id12_:LocalizedTextField; public var __setPropDict:Dictionary; public function Next_HTP(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 7, frame8, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7); parentSource = _arg1; } function __setProp___id12__next_HTP_buttontext_0(){ try { __id12_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id12_.text = "{btn_startgame}"; __id12_.textColor = 0xFFFFFF; __id12_.textSize = 12; __id12_.bold = false; __id12_.disableWordwrap = false; __id12_.embedFonts = true; __id12_.font = ""; __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) { }; } function __setProp___id12__next_HTP_buttontext_1(){ try { __id12_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id12_.text = "{btn_startgame}"; __id12_.textColor = 0xFF00; __id12_.textSize = 12; __id12_.bold = false; __id12_.disableWordwrap = false; __id12_.embedFonts = true; __id12_.font = ""; __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) { }; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id12_] == undefined)) || (!((int(__setPropDict[__id12_]) == 1))))){ __setPropDict[__id12_] = 1; __setProp___id12__next_HTP_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; stop(); } function frame3(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[__id12_] == undefined)) || (!((((int(__setPropDict[__id12_]) >= 2)) && ((int(__setPropDict[__id12_]) <= 8))))))){ __setPropDict[__id12_] = currentFrame; __setProp___id12__next_HTP_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); if (NitroNinjas.firstTime){ NitroNinjas.firstTime = false; }; if (!NitroNinjas.cameFromGame){ theRoot.manipulateBlackFader("HTP_TO_GAME"); } else { if (NitroNinjas.cameFromGame){ theRoot.resumeGameFromHTP(); }; }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } } }//package OtherClasses.Buttons
Section 198
//NextLevel_IG (OtherClasses.Buttons.NextLevel_IG) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class NextLevel_IG extends ButtonDefault { public var __id11_:LocalizedTextField; public var __setPropDict:Dictionary; public function NextLevel_IG(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame2(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } function frame1(){ if ((((__setPropDict[__id11_] == undefined)) || (!((int(__setPropDict[__id11_]) == 1))))){ __setPropDict[__id11_] = 1; __setProp___id11__nextLevel_IG_buttontext_0(); }; stop(); } function frame9(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; stop(); } function __setProp___id11__nextLevel_IG_buttontext_0(){ try { __id11_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id11_.text = "{btn_nextlevel}"; __id11_.textColor = 0xFFFFFF; __id11_.textSize = 12; __id11_.bold = false; __id11_.disableWordwrap = false; __id11_.embedFonts = true; __id11_.font = ""; __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) { }; } function __setProp___id11__nextLevel_IG_buttontext_1(){ try { __id11_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id11_.text = "{btn_nextlevel}"; __id11_.textColor = 0xFF00; __id11_.textSize = 12; __id11_.bold = false; __id11_.disableWordwrap = false; __id11_.embedFonts = true; __id11_.font = ""; __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) { }; } function frame8(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.proceedToNextLevel(); } function frame5(){ if ((((__setPropDict[__id11_] == undefined)) || (!((((int(__setPropDict[__id11_]) >= 2)) && ((int(__setPropDict[__id11_]) <= 9))))))){ __setPropDict[__id11_] = currentFrame; __setProp___id11__nextLevel_IG_buttontext_1(); }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } } }//package OtherClasses.Buttons
Section 199
//Restart_IG (OtherClasses.Buttons.Restart_IG) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class Restart_IG extends ButtonDefault { public var __id9_:LocalizedTextField; public var __setPropDict:Dictionary; public function Restart_IG(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id9_] == undefined)) || (!((int(__setPropDict[__id9_]) == 1))))){ __setPropDict[__id9_] = 1; __setProp___id9__restart_IG_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; } function frame9(){ if ((((__setPropDict[__id9_] == undefined)) || (!((((int(__setPropDict[__id9_]) >= 2)) && ((int(__setPropDict[__id9_]) <= 9))))))){ __setPropDict[__id9_] = currentFrame; __setProp___id9__restart_IG_buttontext_1(); }; stop(); } override function runClickFunction():void{ theRoot.restartGame(); } function __setProp___id9__restart_IG_buttontext_0(){ try { __id9_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id9_.text = "{btn_restart}"; __id9_.textColor = 0xFFFFFF; __id9_.textSize = 12; __id9_.bold = false; __id9_.disableWordwrap = false; __id9_.embedFonts = true; __id9_.font = ""; __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) { }; } function __setProp___id9__restart_IG_buttontext_1(){ try { __id9_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id9_.text = "{btn_restart}"; __id9_.textColor = 0xFF00; __id9_.textSize = 12; __id9_.bold = false; __id9_.disableWordwrap = false; __id9_.embedFonts = true; __id9_.font = ""; __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) { }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); if (NitroNinjas.menuChannel != null){ NitroNinjas.menuChannel.stop(); }; } } }//package OtherClasses.Buttons
Section 200
//ResumeGame_IG (OtherClasses.Buttons.ResumeGame_IG) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class ResumeGame_IG extends ButtonDefault { public var __id7_:LocalizedTextField; public var __setPropDict:Dictionary; public function ResumeGame_IG(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id7_] == undefined)) || (!((int(__setPropDict[__id7_]) == 1))))){ __setPropDict[__id7_] = 1; __setProp___id7__resumeGame_IG_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function frame9(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; stop(); } function frame3(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[__id7_] == undefined)) || (!((((int(__setPropDict[__id7_]) >= 2)) && ((int(__setPropDict[__id7_]) <= 9))))))){ __setPropDict[__id7_] = currentFrame; __setProp___id7__resumeGame_IG_buttontext_1(); }; } function __setProp___id7__resumeGame_IG_buttontext_1(){ try { __id7_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id7_.text = "{btn_resume}"; __id7_.textColor = 0xFF00; __id7_.textSize = 12; __id7_.bold = false; __id7_.disableWordwrap = false; __id7_.embedFonts = true; __id7_.font = ""; __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) { }; } override function mouseIsClicked(_arg1:MouseEvent):void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.togglePause(); } function __setProp___id7__resumeGame_IG_buttontext_0(){ try { __id7_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id7_.text = "{btn_resume}"; __id7_.textColor = 0xFFFFFF; __id7_.textSize = 12; __id7_.bold = false; __id7_.disableWordwrap = false; __id7_.embedFonts = true; __id7_.font = ""; __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) { }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); if (NitroNinjas.menuChannel != null){ NitroNinjas.menuChannel.stop(); }; } } }//package OtherClasses.Buttons
Section 201
//SoundEffectsButton (OtherClasses.Buttons.SoundEffectsButton) package OtherClasses.Buttons { import flash.events.*; public class SoundEffectsButton extends ButtonDefault { public function SoundEffectsButton(_arg1){ addFrameScript(0, frame1, 1, frame2); parentSource = _arg1; } override function mouseIsClicked(_arg1:MouseEvent):void{ if (NitroNinjas.sfxIsOn){ NitroNinjas.soundEffectsST.volume = 0; this.gotoAndStop("sfxOff"); NitroNinjas.sfxIsOn = false; } else { if (!NitroNinjas.sfxIsOn){ NitroNinjas.soundEffectsST.volume = 1; this.gotoAndStop("sfxOn"); NitroNinjas.sfxIsOn = true; }; }; } override function mouseIsOver(_arg1:MouseEvent):void{ } function frame1(){ stop(); } function frame2(){ stop(); } override function mouseIsOut(_arg1:MouseEvent):void{ } } }//package OtherClasses.Buttons
Section 202
//StageQualityButton (OtherClasses.Buttons.StageQualityButton) package OtherClasses.Buttons { import flash.events.*; import flash.display.*; public class StageQualityButton extends ButtonDefault { public function StageQualityButton(_arg1){ addFrameScript(0, frame1, 1, frame2, 2, frame3); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ } function frame1(){ stop(); } function frame2(){ stop(); } function frame3(){ stop(); } override function mouseIsClicked(_arg1:MouseEvent):void{ switch (stage.quality){ case "HIGH": stage.quality = StageQuality.MEDIUM; this.gotoAndStop("normalQuality"); break; case "MEDIUM": stage.quality = StageQuality.LOW; this.gotoAndStop("lowQuality"); break; case "LOW": stage.quality = StageQuality.HIGH; this.gotoAndStop("highQuality"); break; }; } override function mouseIsOut(_arg1:MouseEvent):void{ } } }//package OtherClasses.Buttons
Section 203
//StartGame_MM (OtherClasses.Buttons.StartGame_MM) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class StartGame_MM extends ButtonDefault { public var __setPropDict:Dictionary; public var theText:LocalizedTextField; public function StartGame_MM(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 20, frame21, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20); parentSource = _arg1; } function __setProp_theText_startGame_MM_buttontext_0(){ try { theText["componentInspectorSetting"] = true; } catch(e:Error) { }; theText.text = "{btn_startgame}"; theText.textColor = 0xFFFFFF; theText.textSize = 12; theText.bold = false; theText.disableWordwrap = false; theText.embedFonts = true; theText.font = ""; theText.hAlign = "center"; theText.multiline = false; theText.vAlign = "top"; theText.antiAliasType = "advanced"; theText.glowBlur = 3; theText.glowColor = 0; theText.useGlowFilter = false; theText.glowQuality = 1; theText.glowStrength = 5; theText.gridFitType = "pixel"; theText.italic = false; theText.selectable = false; theText.underline = false; try { theText["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_theText_startGame_MM_buttontext_1(){ try { theText["componentInspectorSetting"] = true; } catch(e:Error) { }; theText.text = "{btn_startgame}"; theText.textColor = 0xFF00; theText.textSize = 12; theText.bold = false; theText.disableWordwrap = false; theText.embedFonts = true; theText.font = ""; theText.hAlign = "center"; theText.multiline = false; theText.vAlign = "top"; theText.antiAliasType = "advanced"; theText.glowBlur = 3; theText.glowColor = 0; theText.useGlowFilter = false; theText.glowQuality = 1; theText.glowStrength = 5; theText.gridFitType = "pixel"; theText.italic = false; theText.selectable = false; theText.underline = false; try { theText["componentInspectorSetting"] = false; } catch(e:Error) { }; } function frame10(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame11(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame12(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame13(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame14(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame15(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame16(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame17(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame18(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame19(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); NitroNinjas.menuChannel.stop(); } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.menuSelectSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[theText] == undefined)) || (!((int(__setPropDict[theText]) == 1))))){ __setPropDict[theText] = 1; __setProp_theText_startGame_MM_buttontext_0(); }; stop(); } function frame2(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame3(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame7(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame21(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; stop(); } function frame20(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } function frame9(){ if ((((__setPropDict[theText] == undefined)) || (!((((int(__setPropDict[theText]) >= 2)) && ((int(__setPropDict[theText]) <= 21))))))){ __setPropDict[theText] = currentFrame; __setProp_theText_startGame_MM_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); if (NitroNinjas.firstTime){ theRoot.manipulateBlackFader("MM_TO_HTP"); } else { if (!NitroNinjas.firstTime){ theRoot.manipulateBlackFader("MM_TO_GAME"); }; }; } } }//package OtherClasses.Buttons
Section 204
//TryAgain_IG (OtherClasses.Buttons.TryAgain_IG) package OtherClasses.Buttons { import spill.localisation.*; import flash.events.*; import flash.utils.*; public class TryAgain_IG extends ButtonDefault { public var __id10_:LocalizedTextField; public var __setPropDict:Dictionary; public function TryAgain_IG(_arg1){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 8, frame9, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8); parentSource = _arg1; } override function mouseIsOver(_arg1:MouseEvent):void{ super.mouseIsOver(_arg1); NitroNinjas.menuChannel = NitroNinjas.secondMenuSFX.play(0, 0, NitroNinjas.soundEffectsST); } function frame1(){ if ((((__setPropDict[__id10_] == undefined)) || (!((int(__setPropDict[__id10_]) == 1))))){ __setPropDict[__id10_] = 1; __setProp___id10__tryAgain_IG_buttontext_0(); }; stop(); } function frame3(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } function frame4(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } function frame5(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } function frame6(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } function __setProp___id10__tryAgain_IG_buttontext_0(){ try { __id10_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id10_.text = "{btn_tryagain}"; __id10_.textColor = 0xFFFFFF; __id10_.textSize = 12; __id10_.bold = false; __id10_.disableWordwrap = false; __id10_.embedFonts = true; __id10_.font = ""; __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___id10__tryAgain_IG_buttontext_1(){ try { __id10_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id10_.text = "{btn_tryagain}"; __id10_.textColor = 0xFF00; __id10_.textSize = 12; __id10_.bold = false; __id10_.disableWordwrap = false; __id10_.embedFonts = true; __id10_.font = ""; __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 frame9(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; stop(); } function frame7(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } function frame8(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } function frame2(){ if ((((__setPropDict[__id10_] == undefined)) || (!((((int(__setPropDict[__id10_]) >= 2)) && ((int(__setPropDict[__id10_]) <= 9))))))){ __setPropDict[__id10_] = currentFrame; __setProp___id10__tryAgain_IG_buttontext_1(); }; } override function runClickFunction():void{ NitroNinjas.menuChannel.stop(); NitroNinjas.menuChannel = NitroNinjas.menuClickSFX.play(0, 0, NitroNinjas.soundEffectsST); theRoot.tryAgainLevel(); } override function mouseIsOut(_arg1:MouseEvent):void{ super.mouseIsOut(_arg1); if (NitroNinjas.menuChannel != null){ NitroNinjas.menuChannel.stop(); }; } } }//package OtherClasses.Buttons
Section 205
//Clock (OtherClasses.Clock) package OtherClasses { import spill.localisation.*; import flash.events.*; import flash.display.*; import flash.text.*; public class Clock extends MovieClip { public var textfield:TextField; var blinkCount:int;// = 29 public var __id19_:LocalizedTextField; var theTime:int; public var innerClock:MovieClip; public function Clock(){ __setProp___id19__clock_art_0(); } function runEnterFrame(_arg1:Event):void{ if (!NitroNinjas.isPaused){ blinkCount--; if (blinkCount == 15){ this.innerClock.alpha = 0; } else { if (blinkCount == 0){ blinkCount = 29; this.innerClock.alpha = 1; }; }; }; } public function update(_arg1):void{ var _local2:int; var _local3:int; if (_arg1 > 59){ _local2 = Math.floor((_arg1 / 60)); _local3 = (_arg1 - (60 * _local2)); if (_local3 < 10){ this.innerClock.textfield.text = String((((("0" + _local2) + ":") + "0") + _local3)); } else { if (_local3 >= 10){ this.innerClock.textfield.text = String(((("0" + _local2) + ":") + _local3)); }; }; } else { if (_arg1 <= 59){ _local3 = _arg1; if (_local3 > 9){ this.innerClock.textfield.text = String(("00:" + _local3)); } else { if (_local3 <= 9){ this.innerClock.textfield.text = String((("00:" + "0") + _local3)); }; }; }; }; if (_arg1 == 10){ this.addEventListener(Event.ENTER_FRAME, runEnterFrame); }; NitroNinjas.timeString = this.innerClock.textfield.text; } function __setProp___id19__clock_art_0(){ try { __id19_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id19_.text = "{msg_time}"; __id19_.textColor = 0xFF0000; __id19_.textSize = 10; __id19_.bold = false; __id19_.disableWordwrap = false; __id19_.embedFonts = true; __id19_.font = ""; __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) { }; } } }//package OtherClasses
Section 206
//GameCompleteScreen (OtherClasses.GameCompleteScreen) package OtherClasses { import spill.localisation.*; import flash.display.*; import flash.text.*; public class GameCompleteScreen extends MovieClip { public var __id24_:LocalizedTextField; public var points:TextField; public var __id22_:LocalizedTextField; public var __id21_:LocalizedTextField; public var __id23_:LocalizedTextField; public var timeLeft:TextField; public function GameCompleteScreen(){ __setProp___id21__gameCompleteScreen_Layer5_0(); __setProp___id22__gameCompleteScreen_text_0(); __setProp___id23__gameCompleteScreen_text_0(); __setProp___id24__gameCompleteScreen_text_0(); } public function update():void{ this.timeLeft.text = String(NitroNinjas.timeString); this.points.text = String(NitroNinjas.savedScore); } function __setProp___id21__gameCompleteScreen_Layer5_0(){ try { __id21_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id21_.text = "{msg_pressspacecontinue}"; __id21_.textColor = 0xFFCC00; __id21_.textSize = 12; __id21_.bold = false; __id21_.disableWordwrap = false; __id21_.embedFonts = true; __id21_.font = ""; __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 __setProp___id24__gameCompleteScreen_text_0(){ try { __id24_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id24_.text = "{msg_gamecomplete}"; __id24_.textColor = 0xFFFFFF; __id24_.textSize = 30; __id24_.bold = false; __id24_.disableWordwrap = false; __id24_.embedFonts = true; __id24_.font = ""; __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___id23__gameCompleteScreen_text_0(){ try { __id23_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id23_.text = "{msg_points}"; __id23_.textColor = 0xFFFFFF; __id23_.textSize = 16; __id23_.bold = false; __id23_.disableWordwrap = false; __id23_.embedFonts = true; __id23_.font = ""; __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) { }; } function __setProp___id22__gameCompleteScreen_text_0(){ try { __id22_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id22_.text = "{msg_time}"; __id22_.textColor = 0xFFFFFF; __id22_.textSize = 16; __id22_.bold = false; __id22_.disableWordwrap = false; __id22_.embedFonts = true; __id22_.font = ""; __id22_.hAlign = "left"; __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 OtherClasses
Section 207
//LevelCompleteScreen (OtherClasses.LevelCompleteScreen) package OtherClasses { import spill.localisation.*; import flash.display.*; import flash.text.*; public class LevelCompleteScreen extends MovieClip { public var __id26_:LocalizedTextField; public var __id25_:LocalizedTextField; public var points:TextField; public var level:TextField; public var timeLeft:TextField; public var __id29_:LocalizedTextField; public var __id28_:LocalizedTextField; public var __id27_:LocalizedTextField; public function LevelCompleteScreen(){ __setProp___id25__levelCompleteScreen_Layer5_0(); __setProp___id26__levelCompleteScreen_text_0(); __setProp___id27__levelCompleteScreen_text_0(); __setProp___id28__levelCompleteScreen_text_0(); __setProp___id29__levelCompleteScreen_text_0(); } public function update():void{ this.level.text = String(NitroNinjas.levelNumber); this.timeLeft.text = String(NitroNinjas.timeString); this.points.text = String(NitroNinjas.savedScore); } function __setProp___id25__levelCompleteScreen_Layer5_0(){ try { __id25_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id25_.text = "{msg_pressspacecontinue}"; __id25_.textColor = 0xFFCC00; __id25_.textSize = 12; __id25_.bold = false; __id25_.disableWordwrap = false; __id25_.embedFonts = true; __id25_.font = ""; __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___id26__levelCompleteScreen_text_0(){ try { __id26_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id26_.text = "{msg_level}"; __id26_.textColor = 0xFFFFFF; __id26_.textSize = 16; __id26_.bold = false; __id26_.disableWordwrap = false; __id26_.embedFonts = true; __id26_.font = ""; __id26_.hAlign = "left"; __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___id27__levelCompleteScreen_text_0(){ try { __id27_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id27_.text = "{msg_time}"; __id27_.textColor = 0xFFFFFF; __id27_.textSize = 16; __id27_.bold = false; __id27_.disableWordwrap = false; __id27_.embedFonts = true; __id27_.font = ""; __id27_.hAlign = "left"; __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) { }; } function __setProp___id29__levelCompleteScreen_text_0(){ try { __id29_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id29_.text = "{msg_levelcomplete}"; __id29_.textColor = 0xFFFFFF; __id29_.textSize = 30; __id29_.bold = false; __id29_.disableWordwrap = false; __id29_.embedFonts = true; __id29_.font = ""; __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) { }; } function __setProp___id28__levelCompleteScreen_text_0(){ try { __id28_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id28_.text = "{msg_points}"; __id28_.textColor = 0xFFFFFF; __id28_.textSize = 16; __id28_.bold = false; __id28_.disableWordwrap = false; __id28_.embedFonts = true; __id28_.font = ""; __id28_.hAlign = "left"; __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) { }; } } }//package OtherClasses
Section 208
//LevelEMC (OtherClasses.LevelEMC) package OtherClasses { import flash.display.*; public class LevelEMC extends MovieClip { public var debugDrawEMC:MovieClip; public var cpflEMC:MovieClip; public var ninjaStarsEMC:MovieClip; public var backgroundEMC:MovieClip; public var vehicleEMC:MovieClip; public var exhaustEMC:MovieClip; public var obstaclesEMC:MovieClip; } }//package OtherClasses
Section 209
//LevelIndicator (OtherClasses.LevelIndicator) package OtherClasses { import spill.localisation.*; import flash.display.*; public class LevelIndicator extends MovieClip { public var lc:LocalizedTextField; public function LevelIndicator(){ __setProp_lc_levelIndicatorSprite_Layer2_0(); } public function update():void{ var _local1:String; switch (NitroNinjas.levelNumber){ case 1: _local1 = "{msg_level1}"; break; case 2: _local1 = "{msg_level2}"; break; case 3: _local1 = "{msg_level3}"; break; case 4: _local1 = "{msg_level4}"; break; case 5: _local1 = "{msg_level5}"; break; case 6: _local1 = "{msg_level6}"; break; }; lc.text = _local1; } function __setProp_lc_levelIndicatorSprite_Layer2_0(){ try { lc["componentInspectorSetting"] = true; } catch(e:Error) { }; lc.text = "{msg_level}"; lc.textColor = 0xFFFFFF; lc.textSize = 8; lc.bold = false; lc.disableWordwrap = false; lc.embedFonts = true; lc.font = ""; lc.hAlign = "left"; lc.multiline = false; lc.vAlign = "middle"; lc.antiAliasType = "advanced"; lc.glowBlur = 3; lc.glowColor = 0; lc.useGlowFilter = false; lc.glowQuality = 1; lc.glowStrength = 5; lc.gridFitType = "pixel"; lc.italic = false; lc.selectable = false; lc.underline = false; try { lc["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package OtherClasses
Section 210
//LivesLeftIndicator (OtherClasses.LivesLeftIndicator) package OtherClasses { import spill.localisation.*; import flash.display.*; import flash.text.*; public class LivesLeftIndicator extends MovieClip { public var __id20_:LocalizedTextField; public var textbox:TextField; public function LivesLeftIndicator(){ __setProp___id20__livesLeftIndicatorSprite_Layer2_0(); } function __setProp___id20__livesLeftIndicatorSprite_Layer2_0(){ try { __id20_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id20_.text = "{msg_lives}"; __id20_.textColor = 0xFF0000; __id20_.textSize = 9; __id20_.bold = false; __id20_.disableWordwrap = false; __id20_.embedFonts = true; __id20_.font = ""; __id20_.hAlign = "left"; __id20_.multiline = false; __id20_.vAlign = "middle"; __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 update():void{ this.textbox.text = String(NitroNinjas.livesLeft); } } }//package OtherClasses
Section 211
//MF (OtherClasses.MF) package OtherClasses { public class MF { public static function mtp(_arg1):Number{ var _local2:Number = (_arg1 * NitroNinjas.ratio); return (_local2); } public static function ptm(_arg1):Number{ var _local2:Number = (_arg1 / NitroNinjas.ratio); return (_local2); } public static function toDeg(_arg1):Number{ var _local2:Number = ((_arg1 * 180) / Math.PI); return (_local2); } public static function toRad(_arg1):Number{ var _local2:Number = ((_arg1 * Math.PI) / 180); return (_local2); } } }//package OtherClasses
Section 212
//NitroBar (OtherClasses.NitroBar) package OtherClasses { import flash.events.*; import flash.display.*; public class NitroBar extends MovieClip { var percentage:Number; var origWidth:Number; var perc:Number; public var insideBar:MovieClip; public function NitroBar(_arg1){ percentage = _arg1; this.addEventListener(Event.ADDED_TO_STAGE, init); } function init(_arg1:Event):void{ origWidth = this.insideBar.width; updateBarLength(percentage); } public function removeEL():void{ this.removeEventListener(Event.ADDED_TO_STAGE, init); } public function updateBarLength(_arg1):void{ this.insideBar.width = (_arg1 * origWidth); } } }//package OtherClasses
Section 213
//NitroNinjasCL (OtherClasses.NitroNinjasCL) package OtherClasses { import flash.display.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import Box2D.Collision.*; public class NitroNinjasCL extends b2ContactListener { override public function Add(_arg1:b2ContactPoint):void{ var _local6:Number; var _local7:Number; var _local8:b2Body; var _local9:int; var _local10:Sprite; var _local2:b2Body = _arg1.shape1.GetBody(); var _local3:b2Body = _arg1.shape2.GetBody(); var _local4:String = _local2.GetUserData(); var _local5:String = _local3.GetUserData(); if ((((_local4 == "WheelOne")) || ((_local5 == "WheelOne")))){ if (((((((((((((((!((_local4 == "NinjaStar"))) && (!((_local4 == "CheckPointFlagOne"))))) && (!((_local4 == "CheckPointFlagTwo"))))) && (!((_local4 == "FinishFlag"))))) && (!((_local5 == "NinjaStar"))))) && (!((_local5 == "CheckPointFlagOne"))))) && (!((_local5 == "CheckPointFlagTwo"))))) && (!((_local5 == "FinishFlag"))))){ if (!NitroNinjas.wheelOneLanded){ NitroNinjas.wheelOneLanded = true; }; if (((((((((((((((((((((((((((((((((((!((_local4 == "PrimarySteps"))) && (!((_local4 == "SecondarySteps"))))) && (!((_local4 == "FinalSteps"))))) && (!((_local4 == "EntranceSteps"))))) && (!((_local4 == "PrimaryStepsSmall"))))) && (!((_local4 == "SecondaryStepsSmall"))))) && (!((_local4 == "FinalStepsSmall"))))) && (!((_local4 == "EntranceStepsSmall"))))) && (!((_local4 == "DeathDropSensor"))))) && (!((_local5 == "PrimarySteps"))))) && (!((_local5 == "SecondarySteps"))))) && (!((_local5 == "FinalSteps"))))) && (!((_local5 == "EntranceSteps"))))) && (!((_local5 == "PrimaryStepsSmall"))))) && (!((_local5 == "SecondaryStepsSmall"))))) && (!((_local5 == "FinalStepsSmall"))))) && (!((_local5 == "EntranceStepsSmall"))))) && (!((_local5 == "DeathDropSensor"))))){ if (_local4 == "WheelOne"){ _local6 = _local2.GetLinearVelocity().y; } else { if (_local5 == "WheelOne"){ _local6 = _local3.GetLinearVelocity().y; }; }; if (_local6 > 20){ if (NitroNinjas.landChannel != null){ NitroNinjas.landChannel.stop(); }; NitroNinjas.landChannel = NitroNinjas.landSFX.play(0, 0, NitroNinjas.soundEffectsST); }; }; }; } else { if ((((_local4 == "WheelTwo")) || ((_local5 == "WheelTwo")))){ if (((((((((((((((!((_local4 == "NinjaStar"))) && (!((_local4 == "CheckPointFlagOne"))))) && (!((_local4 == "CheckPointFlagTwo"))))) && (!((_local4 == "FinishFlag"))))) && (!((_local5 == "NinjaStar"))))) && (!((_local5 == "CheckPointFlagOne"))))) && (!((_local5 == "CheckPointFlagTwo"))))) && (!((_local5 == "FinishFlag"))))){ if (!NitroNinjas.wheelTwoLanded){ NitroNinjas.wheelTwoLanded = true; }; if (((((((((((((((((((((((((((((((((((!((_local4 == "PrimarySteps"))) && (!((_local4 == "SecondarySteps"))))) && (!((_local4 == "FinalSteps"))))) && (!((_local4 == "EntranceSteps"))))) && (!((_local4 == "PrimaryStepsSmall"))))) && (!((_local4 == "SecondaryStepsSmall"))))) && (!((_local4 == "FinalStepsSmall"))))) && (!((_local4 == "EntranceStepsSmall"))))) && (!((_local4 == "DeathDropSensor"))))) && (!((_local5 == "PrimarySteps"))))) && (!((_local5 == "SecondarySteps"))))) && (!((_local5 == "FinalSteps"))))) && (!((_local5 == "EntranceSteps"))))) && (!((_local5 == "PrimaryStepsSmall"))))) && (!((_local5 == "SecondaryStepsSmall"))))) && (!((_local5 == "FinalStepsSmall"))))) && (!((_local5 == "EntranceStepsSmall"))))) && (!((_local5 == "DeathDropSensor"))))){ if (_local4 == "WheelTwo"){ _local7 = _local2.GetLinearVelocity().y; } else { if (_local5 == "WheelTwo"){ _local7 = _local3.GetLinearVelocity().y; }; }; if (_local7 > 20){ if (NitroNinjas.landChannel != null){ NitroNinjas.landChannel.stop(); }; NitroNinjas.landChannel = NitroNinjas.landSFX.play(0, 0, NitroNinjas.soundEffectsST); }; }; }; }; }; if ((((NitroNinjas.wheelOneLanded == true)) && ((NitroNinjas.wheelTwoLanded == true)))){ if (!NitroNinjas.onTheGround){ NitroNinjas.onTheGround = true; }; }; if ((((_local4 == "NinjaStar")) || ((_local5 == "NinjaStar")))){ if (((!(NitroNinjas.crashInitiated)) && (!(NitroNinjas.hitDeathDrop)))){ if (_local4 == "NinjaStar"){ _local8 = _local2; } else { if (_local5 == "NinjaStar"){ _local8 = _local3; }; }; _local9 = NitroNinjas.ninjaStarBodyArray.indexOf(_local8); _local10 = NitroNinjas.ninjaStarSpriteArray[_local9]; if (_local10.visible == true){ _local10.visible = false; NitroNinjas.score = (NitroNinjas.score + 100); NitroNinjas.scoreMC.update(NitroNinjas.score); NitroNinjas.starsCollected++; if (NitroNinjas.starsChannel != null){ NitroNinjas.starsChannel.stop(); }; NitroNinjas.starsChannel = NitroNinjas.starSFX.play(0, 0, NitroNinjas.soundEffectsST); }; }; }; if ((((_local4 == "CheckPointFlagOne")) || ((_local5 == "CheckPointFlagOne")))){ if (((!(NitroNinjas.checkPointOneIsSet)) && (!(NitroNinjas.crashInitiated)))){ NitroNinjas.checkPointOneIsSet = true; NitroNinjas.newBikeX = NitroNinjas.checkPointFlagX; NitroNinjas.newBikeY = ((2000 - NitroNinjas.checkPointFlagY) - 100); NitroNinjas.lastCamX = NitroNinjas.currentCamX; NitroNinjas.displayTrickBox("{msg_checkpoint}"); }; }; if ((((_local4 == "CheckPointFlagTwo")) || ((_local5 == "CheckPointFlagTwo")))){ if (((!(NitroNinjas.checkPointTwoIsSet)) && (!(NitroNinjas.crashInitiated)))){ NitroNinjas.checkPointTwoIsSet = true; NitroNinjas.newBikeX = NitroNinjas.checkPointFlagTwoX; NitroNinjas.newBikeY = ((2000 - NitroNinjas.checkPointFlagTwoY) - 100); NitroNinjas.lastCamX = NitroNinjas.currentCamX; NitroNinjas.displayTrickBox("{msg_checkpoint}"); }; }; if ((((_local4 == "FinishFlag")) || ((_local5 == "FinishFlag")))){ if (!NitroNinjas.finishFlagIsSet){ NitroNinjas.finishFlagIsSet = true; }; }; if ((((((((_local4 == "SecondarySteps")) || ((_local5 == "SecondarySteps")))) || ((_local4 == "SecondaryStepsSmall")))) || ((_local5 == "SecondaryStepsSmall")))){ if ((((_local4 == "SecondarySteps")) || ((_local4 == "SecondaryStepsSmall")))){ if (NitroNinjas.loopsOnSecondary == -1){ if (_local4 == "SecondarySteps"){ NitroNinjas.typeOfLoop = "normal"; } else { if (_local4 == "SecondaryStepsSmall"){ NitroNinjas.typeOfLoop = "small"; }; }; NitroNinjas.loopToBeManipulated = _local2; NitroNinjas.loopsOnSecondary = 0; }; } else { if ((((_local5 == "SecondarySteps")) || ((_local5 == "SecondaryStepsSmall")))){ if (NitroNinjas.loopsOnSecondary == -1){ if (_local5 == "SecondarySteps"){ NitroNinjas.typeOfLoop = "normal"; } else { if (_local5 == "SecondaryStepsSmall"){ NitroNinjas.typeOfLoop = "small"; }; }; NitroNinjas.loopToBeManipulated = _local3; NitroNinjas.loopsOnSecondary = 0; }; }; }; }; if ((((((((_local4 == "FinalSteps")) || ((_local5 == "FinalSteps")))) || ((_local4 == "FinalStepsSmall")))) || ((_local5 == "FinalStepsSmall")))){ if ((((_local4 == "FinalSteps")) || ((_local4 == "FinalStepsSmall")))){ if (NitroNinjas.loopsOnFinal == -1){ NitroNinjas.loopToBeManipulated = _local2; NitroNinjas.loopsOnFinal = 0; }; } else { if ((((_local5 == "FinalSteps")) || ((_local5 == "FinalStepsSmall")))){ if (NitroNinjas.loopsOnFinal == -1){ NitroNinjas.loopToBeManipulated = _local3; NitroNinjas.loopsOnFinal = 0; }; }; }; }; if ((((((((_local4 == "EntranceSteps")) || ((_local5 == "EntranceSteps")))) || ((_local4 == "EntranceStepsSmall")))) || ((_local5 == "EntranceStepsSmall")))){ if ((((_local4 == "EntranceSteps")) || ((_local5 == "EntranceSteps")))){ NitroNinjas.typeOfLoop = "normal"; } else { if ((((_local4 == "EntranceStepsSmall")) || ((_local5 == "EntranceStepsSmall")))){ NitroNinjas.typeOfLoop = "small"; }; }; if (NitroNinjas.loopsOnEntrance == -1){ NitroNinjas.loopsOnEntrance = 0; }; }; if ((((_local4 == "DeathDropSensor")) || ((_local5 == "DeathDropSensor")))){ if (((!((_local4 == "LoweringPlatform"))) && (!((_local5 == "LoweringPlatform"))))){ if (!NitroNinjas.hitDeathDrop){ NitroNinjas.initiateDeathDropHit(); }; if ((((_local4 == "EjectedNinja")) || ((_local5 == "EjectedNinja")))){ if (!NitroNinjas.ninjaEjectedHitDeathDrop){ NitroNinjas.ninjaEjectedHitDeathDrop = true; }; }; }; }; super.Add(_arg1); } override public function Remove(_arg1:b2ContactPoint):void{ var _local2:String = _arg1.shape1.GetBody().GetUserData(); var _local3:String = _arg1.shape2.GetBody().GetUserData(); if ((((_local2 == "WheelOne")) || ((_local3 == "WheelOne")))){ if (((((((((((((((!((_local2 == "NinjaStar"))) && (!((_local2 == "CheckPointFlagOne"))))) && (!((_local2 == "CheckPointFlagTwo"))))) && (!((_local2 == "FinishFlag"))))) && (!((_local3 == "NinjaStar"))))) && (!((_local3 == "CheckPointFlagOne"))))) && (!((_local3 == "CheckPointFlagTwo"))))) && (!((_local3 == "FinishFlag"))))){ if (NitroNinjas.wheelOneLanded){ NitroNinjas.wheelOneLanded = false; }; }; } else { if ((((_local2 == "WheelTwo")) || ((_local3 == "WheelTwo")))){ if (((((((((((((((!((_local2 == "NinjaStar"))) && (!((_local2 == "CheckPointFlagOne"))))) && (!((_local2 == "CheckPointFlagTwo"))))) && (!((_local2 == "FinishFlag"))))) && (!((_local3 == "NinjaStar"))))) && (!((_local3 == "CheckPointFlagOne"))))) && (!((_local3 == "CheckPointFlagTwo"))))) && (!((_local3 == "FinishFlag"))))){ if (NitroNinjas.wheelTwoLanded){ NitroNinjas.wheelTwoLanded = false; }; }; }; }; if (((!(NitroNinjas.wheelOneLanded)) && (!(NitroNinjas.wheelTwoLanded)))){ if (NitroNinjas.onTheGround){ NitroNinjas.onTheGround = false; }; }; super.Remove(_arg1); } override public function Persist(_arg1:b2ContactPoint):void{ var _local7:int; var _local8:b2RevoluteJoint; var _local2 = 3; var _local3:b2Body = _arg1.shape1.GetBody(); var _local4:b2Body = _arg1.shape2.GetBody(); var _local5:String = _arg1.shape1.GetBody().GetUserData(); var _local6:String = _arg1.shape2.GetBody().GetUserData(); if ((((_local5 == "Chassis")) || ((_local6 == "Chassis")))){ if (((((((((((((((((((!((_local5 == "NinjaStar"))) && (!((_local5 == "CheckPointFlagOne"))))) && (!((_local5 == "CheckPointFlagTwo"))))) && (!((_local5 == "FinishFlag"))))) && (!((_local5 == "DeathDropSensor"))))) && (!((_local6 == "NinjaStar"))))) && (!((_local6 == "CheckPointFlagOne"))))) && (!((_local6 == "CheckPointFlagTwo"))))) && (!((_local6 == "FinishFlag"))))) && (!((_local6 == "DeathDropSensor"))))){ if (!NitroNinjas.crashInitiated){ if ((((_local5 == "LoweringPlatform")) || ((_local6 == "LoweringPlatform")))){ NitroNinjas.initiateCrash("LoweringPlatform"); } else { NitroNinjas.initiateCrash(); }; }; }; }; if ((((_local5 == "WheelOne")) || ((_local6 == "WheelOne")))){ if (((((((((((((((((((!((_local5 == "NinjaStar"))) && (!((_local5 == "CheckPointFlagOne"))))) && (!((_local5 == "CheckPointFlagTwo"))))) && (!((_local5 == "FinishFlag"))))) && (!((_local5 == "DriveOverObstacle"))))) && (!((_local6 == "NinjaStar"))))) && (!((_local6 == "CheckPointFlagOne"))))) && (!((_local6 == "CheckPointFlagTwo"))))) && (!((_local6 == "FinishFlag"))))) && (!((_local6 == "DriveOverObstacle"))))){ if (!NitroNinjas.wheelOneLanded){ NitroNinjas.wheelOneLanded = true; }; }; } else { if ((((_local5 == "WheelTwo")) || ((_local6 == "WheelTwo")))){ if (((((((((((((((((((!((_local5 == "NinjaStar"))) && (!((_local5 == "CheckPointFlagOne"))))) && (!((_local5 == "CheckPointFlagTwo"))))) && (!((_local5 == "FinishFlag"))))) && (!((_local5 == "DriveOverObstacle"))))) && (!((_local6 == "NinjaStar"))))) && (!((_local6 == "CheckPointFlagOne"))))) && (!((_local6 == "CheckPointFlagTwo"))))) && (!((_local6 == "FinishFlag"))))) && (!((_local6 == "DriveOverObstacle"))))){ if (!NitroNinjas.wheelTwoLanded){ NitroNinjas.wheelTwoLanded = true; }; }; }; }; if (((NitroNinjas.wheelOneLanded) && (NitroNinjas.wheelTwoLanded))){ if (!NitroNinjas.onTheGround){ NitroNinjas.onTheGround = true; }; }; if ((((_local5 == "LoweringPlatform")) || ((_local6 == "LoweringPlatform")))){ if (_local5 == "LoweringPlatform"){ _local7 = NitroNinjas.loweringPlatformsCollection.indexOf(_local3); } else { if (_local6 == "LoweringPlatform"){ _local7 = NitroNinjas.loweringPlatformsCollection.indexOf(_local4); }; }; _local8 = NitroNinjas.loweringPlatformsJoints[_local7]; if (_local8 != null){ NitroNinjas.theWorld.DestroyJoint(_local8); NitroNinjas.loweringPlatformsJoints[_local7] = null; }; }; if ((((((((_local5 == "SecondarySteps")) || ((_local6 == "SecondarySteps")))) || ((_local5 == "SecondaryStepsSmall")))) || ((_local6 == "SecondaryStepsSmall")))){ NitroNinjas.wheel1.ApplyTorque(_local2); NitroNinjas.wheel2.ApplyTorque(_local2); }; if ((((((((_local5 == "FinalSteps")) || ((_local6 == "FinalSteps")))) || ((_local5 == "FinalStepsSmall")))) || ((_local6 == "FinalStepsSmall")))){ NitroNinjas.wheel1.ApplyTorque(_local2); NitroNinjas.wheel2.ApplyTorque(_local2); }; super.Persist(_arg1); } } }//package OtherClasses
Section 214
//OrangeExhaust (OtherClasses.OrangeExhaust) package OtherClasses { import flash.events.*; import flash.display.*; public class OrangeExhaust extends Sprite { var timeToKill:int; public function OrangeExhaust(){ this.addEventListener(Event.ADDED_TO_STAGE, init); } function init(_arg1:Event):void{ timeToKill = 10; this.addEventListener(Event.ENTER_FRAME, fadeOut); } public function removeOE():void{ this.removeEventListener(Event.ADDED_TO_STAGE, init); this.removeEventListener(Event.ENTER_FRAME, fadeOut); NitroNinjas.ls.exhaustEMC.removeChild(this); } function fadeOut(_arg1:Event):void{ if (!NitroNinjas.isPaused){ this.scaleY = (this.scaleY * 0.9); timeToKill--; if (timeToKill <= 0){ removeOE(); }; }; } } }//package OtherClasses
Section 215
//PreloaderBar (OtherClasses.PreloaderBar) package OtherClasses { import flash.events.*; import flash.display.*; import flash.filters.*; public class PreloaderBar extends MovieClip { var originalWidth:int; public var stretchingBar:MovieClip; public var percentageText:MovieClip; public var loadingText:MovieClip; public function PreloaderBar(){ this.addEventListener(Event.ADDED_TO_STAGE, init); } function init(_arg1:Event):void{ originalWidth = 300; var _local2:GlowFilter = new GlowFilter(0, 1, 6, 6, 10, 1, false, false); loadingText.filters = [_local2]; percentageText.filters = [_local2]; this.removeEventListener(Event.ADDED_TO_STAGE, init); } public function update(_arg1):void{ var _local2:* = (_arg1 / 100); stretchingBar.width = (_local2 * originalWidth); percentageText.textfield.text = String((Math.round(_arg1) + "%")); } } }//package OtherClasses
Section 216
//ScoreMC (OtherClasses.ScoreMC) package OtherClasses { import spill.localisation.*; import flash.display.*; import flash.text.*; public class ScoreMC extends MovieClip { var theScore:int; public var textfield:TextField; public var __id18_:LocalizedTextField; public function ScoreMC(){ __setProp___id18__scoreboard_Layer3_0(); } public function update(_arg1):void{ this.textfield.text = String(_arg1); } function __setProp___id18__scoreboard_Layer3_0(){ try { __id18_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id18_.text = "{msg_score}"; __id18_.textColor = 0xFFFFFF; __id18_.textSize = 10; __id18_.bold = false; __id18_.disableWordwrap = false; __id18_.embedFonts = true; __id18_.font = ""; __id18_.hAlign = "left"; __id18_.multiline = false; __id18_.vAlign = "middle"; __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) { }; } } }//package OtherClasses
Section 217
//SecondsTillStart (OtherClasses.SecondsTillStart) package OtherClasses { import spill.localisation.*; import flash.events.*; import flash.display.*; import flash.text.*; import flash.filters.*; import flash.utils.*; public class SecondsTillStart extends MovieClip { public var stsTimer:Timer; var currentSeconds:int; var theRoot:MovieClip; public var textfield:TextField; public var lc:LocalizedTextField; public function SecondsTillStart(){ this.addEventListener(Event.ADDED_TO_STAGE, init); __setProp_lc_secondsTillStartMC_Layer1_0(); } function removeMeAndBeginGame():void{ theRoot.commenceLevel(); stsTimer.removeEventListener(TimerEvent.TIMER, runTimer); stsTimer.stop(); this.filters = []; NitroNinjas.interfaceEMC.removeChild(this); } function runTimer(_arg1:TimerEvent):void{ currentSeconds--; if (currentSeconds == 2){ lc.text = "{msg_ready}"; NitroNinjas.inGameChannel = NitroNinjas.readyGoSFX.play(0, 0, NitroNinjas.soundEffectsST); } else { if (currentSeconds == 1){ lc.text = "{msg_go}"; } else { if (currentSeconds == 0){ removeMeAndBeginGame(); }; }; }; } function __setProp_lc_secondsTillStartMC_Layer1_0(){ try { lc["componentInspectorSetting"] = true; } catch(e:Error) { }; lc.text = ""; lc.textColor = 0xFF6600; lc.textSize = 70; lc.bold = false; lc.disableWordwrap = false; lc.embedFonts = true; lc.font = ""; lc.hAlign = "center"; lc.multiline = false; lc.vAlign = "middle"; lc.antiAliasType = "advanced"; lc.glowBlur = 3; lc.glowColor = 0; lc.useGlowFilter = false; lc.glowQuality = 1; lc.glowStrength = 5; lc.gridFitType = "pixel"; lc.italic = false; lc.selectable = false; lc.underline = false; try { lc["componentInspectorSetting"] = false; } catch(e:Error) { }; } function init(_arg1:Event):void{ var _local4:String; theRoot = MovieClip(root); var _local2:GlowFilter = new GlowFilter(0xFFFFFF, 1, 6, 6, 30); this.filters = [_local2]; currentSeconds = 4; var _local3:int = NitroNinjas.levelNumber; switch (_local3){ case 1: _local4 = "{msg_level1}"; break; case 2: _local4 = "{msg_level2}"; break; case 3: _local4 = "{msg_level3}"; break; case 4: _local4 = "{msg_level4}"; break; case 5: _local4 = "{msg_level5}"; break; case 6: _local4 = "{msg_level6}"; break; }; lc.text = _local4; stsTimer = new Timer(1000, 4); stsTimer.addEventListener(TimerEvent.TIMER, runTimer); stsTimer.start(); } } }//package OtherClasses
Section 218
//TempPreloader (OtherClasses.TempPreloader) package OtherClasses { import flash.display.*; import flash.text.*; public class TempPreloader extends MovieClip { public var textfield:TextField; public function update(_arg1):void{ if (textfield != null){ this.textfield.text = String((Math.round(_arg1) + "%")); //unresolved jump }; } } }//package OtherClasses
Section 219
//TimeIsUpScreen (OtherClasses.TimeIsUpScreen) package OtherClasses { import spill.localisation.*; import flash.display.*; import flash.text.*; public class TimeIsUpScreen extends MovieClip { public var __id2_:LocalizedTextField; public var __id0_:LocalizedTextField; public var livesLeft:TextField; public var __id1_:LocalizedTextField; public function TimeIsUpScreen(){ __setProp___id0__timeIsUpScreenBackground_Layer1_0(); __setProp___id1__timeIsUpScreenBackground_Layer1_0(); __setProp___id2__timeIsUpScreenBackground_Layer1_0(); } function __setProp___id0__timeIsUpScreenBackground_Layer1_0(){ try { __id0_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id0_.text = "{msg_lives}"; __id0_.textColor = 0xFFFFFF; __id0_.textSize = 16; __id0_.bold = false; __id0_.disableWordwrap = false; __id0_.embedFonts = true; __id0_.font = ""; __id0_.hAlign = "right"; __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) { }; } function __setProp___id2__timeIsUpScreenBackground_Layer1_0(){ try { __id2_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id2_.text = "{msg_pressspaceagain}"; __id2_.textColor = 0xFFCC00; __id2_.textSize = 12; __id2_.bold = false; __id2_.disableWordwrap = false; __id2_.embedFonts = true; __id2_.font = ""; __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) { }; } public function update():void{ this.livesLeft.text = String(NitroNinjas.livesLeft); } function __setProp___id1__timeIsUpScreenBackground_Layer1_0(){ try { __id1_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id1_.text = "{msg_times_up}"; __id1_.textColor = 0xFFFFFF; __id1_.textSize = 30; __id1_.bold = false; __id1_.disableWordwrap = false; __id1_.embedFonts = true; __id1_.font = ""; __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) { }; } } }//package OtherClasses
Section 220
//TrickText (OtherClasses.TrickText) package OtherClasses { import spill.localisation.*; import flash.events.*; import flash.display.*; import flash.text.*; import flash.filters.*; import spill.utils.*; public class TrickText extends MovieClip { var delay:int; var delayInitiated:Boolean; public var textfield:TextField; var ct:String; var trickPerformed:String; public function TrickText(_arg1){ this.addEventListener(Event.ADDED_TO_STAGE, init); trickPerformed = _arg1; } function runEnterFrame(_arg1:Event):void{ if (!NitroNinjas.isPaused){ if (!delayInitiated){ delay++; if (delay >= 2){ this.visible = true; delayInitiated = true; cacheAsBitmap = true; }; return; }; this.y = (this.y - 7); this.alpha = (this.alpha - 0.01); if (this.alpha <= 0){ removeTT(); }; }; } public function removeTT():void{ this.removeEventListener(Event.ADDED_TO_STAGE, init); this.removeEventListener(Event.ENTER_FRAME, runEnterFrame); NitroNinjas.scrollingTextEMC.removeChild(this); } function init(_arg1:Event):void{ this.visible = false; delay = 0; delayInitiated = false; this.addEventListener(Event.ENTER_FRAME, runEnterFrame); var _local2:Array = [new GlowFilter(0xFFFFFF, 1, 6, 6, 30)]; var _local3:LocalizedTextField = createSpillTxt(trickPerformed, 0xFF6600, 25, 1, _local2, 700, 63); addChild(_local3); } } }//package OtherClasses
Section 221
//CGoogleAnalitycs (spill.components.CGoogleAnalitycs) package spill.components { import flash.events.*; import com.google.analytics.*; public class CGoogleAnalitycs extends Comp { private var _ga:GATracker; override protected function init(_arg1:Event):void{ super.init(_arg1); var _local2:Boolean; _ga = new GATracker(this, "UA-6695967-1", "AS3", _local2); } public function trackEvent(_arg1:String, _arg2:String, _arg3:String="per session", _arg4:Number=0):void{ _ga.trackEvent(_arg1, _arg2, _arg3, _arg4); } } }//package spill.components
Section 222
//CLocalization (spill.components.CLocalization) package spill.components { import spill.localisation.*; import flash.net.*; import flash.events.*; import flash.display.*; import spill.config.*; import flash.ui.*; public class CLocalization extends Comp { private var _brandingLogo:BrandingLogo; private var _spilButton:SpilGamesLink; private var _languageSelectBox:LanguageSelectBox; public function loadIntroBranding():void{ _brandingLogo.x = 351; _brandingLogo.y = 458; _brandingLogo.scaleX = 1; _brandingLogo.scaleY = 1; addChild(_brandingLogo); _brandingLogo.addEventListener(MouseEvent.CLICK, handleBrandingLogoClicked); } public function removeIntroBranding():void{ _brandingLogo.removeEventListener(MouseEvent.CLICK, handleBrandingLogoClicked); removeChild(_brandingLogo); } private function handleSpilGamesButtonClicked(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink())); } public function loadEndGameBrandingLogo(_arg1):void{ _brandingLogo.x = 0; _brandingLogo.y = 10; _brandingLogo.scaleX = 0.6; _brandingLogo.scaleY = 0.6; _arg1.addChild(_brandingLogo); } public function removeEndGameBrandingLogo():void{ NitroNinjas.endLevelSprite.removeChild(_brandingLogo); } override protected function init(_arg1:Event):void{ super.init(_arg1); contextMenu = new ContextMenu(); contextMenu.hideBuiltInItems(); Languages.initialize(); var _local2:Array = Languages.getLanguagesArray(); var _local3:int = _local2.length; while (_local3--) { _local2[_local3].forceFont = "Arial Black"; _local2[_local3].embedFonts = true; }; Languages.getLanguage("jp").forceFont = "MS PGothic"; Languages.getLanguage("jp").embedFonts = true; Languages.getLanguage("cn").forceFont = "SimHei"; Languages.getLanguage("cn").embedFonts = true; SpilGame.initialize(NitroNinjasConfig.GAME_NAME, PortalGroup.TEENS, NitroNinjasConfig.PAGE_NAME, this, true); var _local4:XML = <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=""><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=""><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=""><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=""><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=""><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=""><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=""><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=""><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=""><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=""><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=""><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=""><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=""><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="btn_startgame"><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>ゲームを始める</jp><cn>开始游戏</cn></textItem><textItem identifier="btn_moregamesat"><en_us>More extreme sports at:</en_us><en_uk>More extreme sports at:</en_uk><nl>Meer extreme sport op:</nl><fr>Plus de sports extrêmes sur :</fr><de>Mehr Extremsport auf:</de><es>Más deportes extremos en:</es><br>Mais esportes radicais em:</br><pt>Mais desportos radicais em:</pt><it>Più sport estremi su:</it><se>Mer extremsport på:</se><pl>Więcej ekstremalnego sportu na:</pl><ru>Другие похожие игры на</ru><id>Olahraga ekstrem lainnya di:</id><ar>More extreme sports at:</ar><jp>他のおもしろスポーツゲーム:</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>Spelregler</se><pl>Jak grać</pl><ru>Как играть</ru><id>Cara Main</id><ar>How to Play</ar><jp>操作方法</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>メインメニュー</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>次の関門</jp><cn>下一关</cn></textItem><textItem identifier="msg_levelcomplete"><en_us>Level Completed!</en_us><en_uk>Level Completed!</en_uk><nl>Level uitgespeeld!</nl><fr>Niveau réussi !</fr><de>Level beendet!</de><es>¡Nivel completado!</es><br>Fase Concluída!</br><pt>Nível acabado!</pt><it>Livello completato!</it><se>Nivå klarad!</se><pl>Poziom ukończony!</pl><ru>Уровень пройден!</ru><id>Level selesai!</id><ar>Level Completed!</ar><jp>関門通過!</jp><cn>过关!</cn></textItem><textItem identifier="msg_level"><en_us>Level</en_us><en_uk>Level</en_uk><nl>Level</nl><fr>Niveau</fr><de>Level</de><es>Nivel</es><br>Fase</br><pt>Nível</pt><it>Livello</it><se>Nivå</se><pl>Poziom</pl><ru>Уровень</ru><id>Level</id><ar>Level</ar><jp>関門</jp><cn>关卡</cn></textItem><textItem identifier="msg_points"><en_us>Score</en_us><en_uk>Score</en_uk><nl>Score</nl><fr>Score</fr><de>Punkte</de><es>Puntuación</es><br>Pontos</br><pt>Pontuação</pt><it>Punteggio</it><se>Poäng</se><pl>Wynik</pl><ru>Счет</ru><id>Skor</id><ar>Score</ar><jp>得点</jp><cn>得分 </cn></textItem><textItem identifier="msg_time"><en_us>Time</en_us><en_uk>Time</en_uk><nl>Tijd</nl><fr>Temps</fr><de>Zeit</de><es>Tiempo</es><br>Tempo</br><pt>Tempo</pt><it>Tempo</it><se>Tid</se><pl>Czas</pl><ru>Время</ru><id>Waktu</id><ar>Time</ar><jp>時間</jp><cn>时间</cn></textItem><textItem identifier="msg_pressspacecontinue"><en_us>PRESS SPACE TO CONTINUE</en_us><en_uk>PRESS THE SPACEBAR TO CONTINUE</en_uk><nl>DRUK OP DE SPATIEBALK OM VERDER TE GAAN</nl><fr>APPUIE SUR ESPACE POUR CONTINUER</fr><de>ZUM WEITERMACHEN LEERTASTE DRÜCKEN</de><es>PULSA ESPACIO PARA CONTINUAR</es><br>BATA NA BARRA DE ESPAÇO PARA CONTINUAR</br><pt>PRIME A BARRA DE ESPAÇOS PARA CONTINUAR</pt><it>PREMI SPAZIO PER CONTINUARE</it><se>TRYCK MELLANSLAG FÖR ATT FORTSÄTTA</se><pl>NACIŚNIJ SPACJĘ, ABY KONTYNUOWAĆ</pl><ru>НАЖМИТЕ ПРОБЕЛ ДЛЯ ПРОДОЛЖЕНИЯ</ru><id>TEKAN SPASI UNTUK MELANJUTKAN</id><ar>PRESS SPACE TO CONTINUE</ar><jp>スペースキーを 押して ゲームを 再開</jp><cn>按空格键继续</cn></textItem><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="msg_checkpoint"><en_us>Checkpoint!</en_us><en_uk>Checkpoint!</en_uk><nl>Controlepunt!</nl><fr>Poste de contrôle !</fr><de>Kontrollpunkt!</de><es>¡Punto de control!</es><br>Ponto de Controle!</br><pt>Ponto de Controlo!</pt><it>Posto di blocco!</it><se>Sparpunkt!</se><pl>Punkt kontrolny!</pl><ru>Контрольная точка!</ru><id>Rambu pemeriksaan!</id><ar>Checkpoint!</ar><jp>関所通過!</jp><cn>检查站!</cn></textItem><textItem identifier="msg_lives"><en_us>Lives</en_us><en_uk>Lives</en_uk><nl>Levens</nl><fr>Vies</fr><de>Leben</de><es>Vidas</es><br>Vidas</br><pt>Vidas</pt><it>Vite</it><se>Liv</se><pl>Życia</pl><ru>Жизни</ru><id>Nyawa</id><ar>Lives</ar><jp>命</jp><cn>生命</cn></textItem><textItem identifier="msg_score"><en_us>Score</en_us><en_uk>Score</en_uk><nl>Score</nl><fr>Score</fr><de>Punkte</de><es>Puntuación</es><br>Pontos</br><pt>Pontuação</pt><it>Punteggio</it><se>Poäng</se><pl>Wynik</pl><ru>Счет</ru><id>Skor</id><ar>Score</ar><jp>スコア</jp><cn>得分 </cn></textItem><textItem identifier="btn_pause"><en_us>Pause</en_us><en_uk>Pause</en_uk><nl>Pauze</nl><fr>Pause</fr><de>Pause</de><es>Pausar</es><br>Pausa</br><pt>Pausa</pt><it>Pausa</it><se>Pausa</se><pl>Pauza</pl><ru>Пауза</ru><id>Jeda</id><ar>Pause</ar><jp>一時中断</jp><cn>暂停</cn></textItem><textItem identifier="msg_gamepaused"><en_us>PAUSE</en_us><en_uk>PAUSE</en_uk><nl>PAUZE</nl><fr>PAUSE</fr><de>PAUSE</de><es>PAUSA</es><br>PAUSA</br><pt>PAUSA</pt><it>PAUSA</it><se>PAUSA</se><pl>PAUZA</pl><ru>ПАУЗА</ru><id>JEDA</id><ar>PAUSE</ar><jp>中断中</jp><cn>暂停</cn></textItem><textItem identifier="msg_pressspaceagain"><en_us>Press "space" to try again</en_us><en_uk>Press "space" to try again</en_uk><nl>DRUK OP DE SPATIEBALK OM OPNIEUW TE PROBEREN</nl><fr>APPUIE SUR ESPACE POUR CONTINUER</fr><de>ZUM WEITERMACHEN LEERTASTE DRÜCKEN</de><es>PULSA ESPACIO PARA CONTINUAR</es><br>BATA NA BARRA DE ESPAÇO PARA CONTINUAR</br><pt>PRIME A BARRA DE ESPAÇOS PARA CONTINUAR</pt><it>PREMI SPAZIO PER CONTINUARE</it><se>TRYCK MELLANSLAG FÖR ATT FORTSÄTTA</se><pl>NACIŚNIJ SPACJĘ, ABY KONTYNUOWAĆ</pl><ru>НАЖМИТЕ ПРОБЕЛ ДЛЯ ПРОДОЛЖЕНИЯ</ru><id>TEKAN SPASI UNTUK MELANJUTKAN</id><ar>Press "space" to try again</ar><jp>スペースキーでゲームを再開</jp><cn>按空格键再试一次</cn></textItem><textItem identifier="btn_back"><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>戻る</jp><cn>后退</cn></textItem><textItem identifier="msg_levelfailed"><en_us>Level Failed</en_us><en_uk>Level Failed</en_uk><nl>Level niet gehaald</nl><fr>Niveau échoué</fr><de>Level nicht geschafft</de><es>Nivel no superado</es><br>Falhou na Fase</br><pt>Nível Falhado</pt><it>Livello fallito</it><se>Nivå ej klarad</se><pl>Poziom nie został ukończony</pl><ru>Уровень не пройден</ru><id>Level Gagal</id><ar>Level Failed</ar><jp>関門通過失敗</jp><cn>闯关失败</cn></textItem><textItem identifier="btn_restart"><en_us>Restart</en_us><en_uk>Restart</en_uk><nl>Opnieuw beginnen</nl><fr>Recommencer</fr><de>Neustart</de><es>Volver a empezar</es><br>Reiniciar</br><pt>Recomeçar</pt><it>Riavvia</it><se>Omstart</se><pl>Restart</pl><ru>Начать сначала</ru><id>Mulai dari awal</id><ar>Restart</ar><jp>再スタート</jp><cn>重新开始游戏</cn></textItem><textItem identifier="msg_gameover"><en_us>Game Over</en_us><en_uk>Game Over</en_uk><nl>Game over</nl><fr>Game over</fr><de>Game over</de><es>Fin de partida</es><br>Acabou</br><pt>Fim do Jogo</pt><it>Gioco finito </it><se>Game over</se><pl>Koniec gry</pl><ru>Конец игры</ru><id>Game Tamat</id><ar>Game Over</ar><jp>これにて終了・・・</jp><cn>游戏结束</cn></textItem><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="msg_gamecomplete"><en_us>Game Complete!</en_us><en_uk>Game Completed!</en_uk><nl>Spel uitgespeeld!</nl><fr>Jeu réussi !</fr><de>Spiel beendet!</de><es>¡Juego completado!</es><br>Jogo Concluído!</br><pt>Jogo Concluído!</pt><it>Gioco completo!</it><se>Spel klarat!</se><pl>Gra ukończona!</pl><ru>Игра пройдена!</ru><id>Game Selesai!</id><ar>Game Complete!</ar><jp>全ての関門を通過!</jp><cn>游戏完成!</cn></textItem><textItem identifier="btn_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 lagi</id><ar>Resume</ar><jp>再開する</jp><cn>继续</cn></textItem><textItem identifier="msg_livesleft"><en_us>Lives Left</en_us><en_uk>Lives Left</en_uk><nl>Levens over:</nl><fr>Vies restantes</fr><de>Leben übrig</de><es>Vidas restantes</es><br>Vidas Restando</br><pt>Vidas Restantes</pt><it>Vite restanti</it><se>Liv kvar</se><pl>Pozostałe życia</pl><ru>Жизней</ru><id>Sisa Nyawa</id><ar>Lives Left</ar><jp>残りの命</jp><cn>剩余生命</cn></textItem><textItem identifier="btn_tryagain"><en_us>Try Again</en_us><en_uk>Try again</en_uk><nl>Nog een keer</nl><fr>Essayer de nouveau </fr><de>Nochmal probieren</de><es>¿Volver a intentar?</es><br>Tentar de Novo</br><pt>Tentar Novamente</pt><it>Riprova</it><se>Försöka igen</se><pl>Spróbuj ponownie</pl><ru>Еще раз</ru><id>Coba lagi</id><ar>Try Again</ar><jp>もう1度挑戦する</jp><cn>再试一次</cn></textItem><textItem identifier="msg_help_up"><en_us>Press up to accelerate</en_us><en_uk>Press up to accelerate</en_uk><nl>Druk op omhoog om vooruit te gaan.</nl><fr>ACCÉLÉRER</fr><de>BESCHLEUNIGEN</de><es>ACELERAR</es><br>ACELERAR</br><pt>ACELERAR</pt><it>ACCELERA</it><se>GASA</se><pl>PRZYŚPIESZ</pl><ru>УСКОРЕНИЕ</ru><id>MEMPERCEPAT</id><ar>Press up to accelerate</ar><jp>上矢印キーで加速</jp><cn>加速</cn></textItem><textItem identifier="msg_help_jump"><en_us>Press the Spacebar to jump.</en_us><en_uk>Press the Spacebar to jump.</en_uk><nl>Druk op de spatiebalk om te springen.</nl><fr>Appuie sur la barre d'espace pour sauter.</fr><de>Drücke zum Springen die Leertaste.</de><es>Pulsa la barra espaciadora para saltar.</es><br>Pressione a Barra de Espaço para saltar.</br><pt>Prime a Barra de Espaços para saltar.</pt><it>Premi la barra spaziatrice per saltare.</it><se>Tryck mellanslag för att hoppa.</se><pl>Naciśnij spację, aby podskoczyć.</pl><ru>Нажимай пробел для прыжка.</ru><id>Tekan Spacebar untuk melompat.</id><ar>Press the Spacebar to jump.</ar><jp>スペースキーで飛ぶ</jp><cn>按空格键,短距飞跃。</cn></textItem><textItem identifier="msg_help_tricks"><en_us>Use these to perform tricks</en_us><en_uk>Use these to perform tricks</en_uk><nl>Gebruik deze om stunts te doen</nl><fr>CASCADES</fr><de>STUNTS</de><es>ACROBACIAS</es><br>ACROBACIAS</br><pt>TRUQUES</pt><it>ACROBAZIE</it><se>TRICK</se><pl>TRIKI</pl><ru>ТРЮКИ</ru><id>PERTUNJUKAN</id><ar>Use these to perform tricks</ar><jp>番号キーでいろいろな術を決める</jp><cn>用这些来表演特技</cn></textItem><textItem identifier="msg_help_fruits"><en_us>Collect these for points and turbo speed</en_us><en_uk>Collect these for points and turbo speed</en_uk><nl>Verzamel deze voor punten en turbo</nl><fr>Collecter</fr><de>Sammeln</de><es>Recoger</es><br>Recolher</br><pt>Recolher</pt><it>Raccogli</it><se>Samla</se><pl>Zbierz</pl><ru>Соберите</ru><id>Kumpulkan</id><ar>Collect these for points and turbo speed</ar><jp>手裏剣を集めて得点とターボを獲得!</jp><cn>得分</cn></textItem><textItem identifier="msg_help_rotate"><en_us>Left/Right = Lean Back/Forward</en_us><en_uk>Left/Right = Lean Back/Forward</en_uk><nl>Links/rechts = Achterwaarts/voorwaarts leunen</nl><fr>Gauche/droite = se pencher en arrière/avant </fr><de>Pfeiltaste nach links/rechts = Nach hinten/vorne beugen </de><es>Izquierda/derecha = inclinarse hacia atrás/hacia delante</es><br>Esquerda/Direita = Inclinar para trás/para a frente</br><pt>Esquerda/Direita = Inclinar para Trás/Frente </pt><it>Tasti freccia sinistro/destro = Piegati all'indietro/in avanti </it><se>Vänster/Höger = Luta bakåt/Framåt </se><pl>Strzałka w lewo/w prawo = pochyl się do tyłu/do przodu </pl><ru>Клавиши "влево"/"вправо" = наклон назад/вперед </ru><id>Panah Kiri/Kanan = Miring ke belakang/ke depan</id><ar>Left/Right = Lean Back/Forward</ar><jp>左/右矢印キーでバイクを前後に傾ける </jp><cn>左/右=后倾/前倾</cn></textItem><textItem identifier="msg_trick1"><en_us>ONE ARM ASSASSIN</en_us><en_uk>ONE ARM ASSASSIN</en_uk><nl>KATANA ZWAAI</nl><fr>Embuscade</fr><de>Hinterhalt</de><es>Emboscada</es><br>Emboscada</br><pt>Emboscada</pt><it>Imboscata</it><se>Bakhåll</se><pl>Pułapka</pl><ru>Засада</ru><id>Sergap</id><ar>AMBUSH</ar><jp>片手立ちの術</jp><cn>埋伏</cn></textItem><textItem identifier="msg_trick2"><en_us>HELICOPTER KICK</en_us><en_uk>HELICOPTER KICK</en_uk><nl>HELICOPTER TRAP</nl><fr>HELICOPTER</fr><de>HELICOPTER</de><es>HELICOPTER</es><br>HELICOPTER</br><pt>HELICÓPTERO</pt><it>ELICOTTERO</it><se>HELIKOPTER</se><pl>HELIKOPTER</pl><ru>ВЕРТОЛЕТ</ru><id>HELICOPTER</id><ar>HELICOPTER</ar><jp>飛ぶ鳥の術</jp><cn>直升机</cn></textItem><textItem identifier="msg_trick3"><en_us>DOUBLE FRONT KICK</en_us><en_uk>DOUBLE FRONT KICK</en_uk><nl>DUBBELE TRAP</nl><fr>FLASH KICK</fr><de>FLASH KICK</de><es>FLASH KICK</es><br>FLASH KICK</br><pt>FLASH KICK</pt><it>FLASH KICK</it><se>FLASH KICK</se><pl>FLASH KICK</pl><ru>FLASH KICK</ru><id>FLASH KICK</id><ar>FLASH KICK</ar><jp>両手逆立ちの術</jp><cn>闪电踢</cn></textItem><textItem identifier="msg_trick4"><en_us>JUMP AND SLICE</en_us><en_uk>JUMP AND SLICE</en_uk><nl>SUPER ZWAAI</nl><fr>EXECUTIONER</fr><de>EXECUTIONER</de><es>EXECUTIONER</es><br>EXECUTIONER</br><pt>EXECUTIONER</pt><it>BOIA</it><se>EXECUTIONER</se><pl>EXECUTIONER</pl><ru>EXECUTIONER</ru><id>EXECUTIONER</id><ar>EXECUTIONER</ar><jp>忍者八門の術</jp><cn>行刑者</cn></textItem><textItem identifier="msg_superbonus"><en_us>Super Bonus!</en_us><en_uk>Super Bonus!</en_uk><nl>Superbonus!</nl><fr>Super bonus !</fr><de>Superbonus!</de><es>¡Súper bonificación!</es><br>Super-Bônus!</br><pt>Super Bónus!</pt><it>Super bonus!</it><se>Superbonus!</se><pl>Superbonus!</pl><ru>Супербонус!</ru><id>Bonus Super!</id><ar>Bonus Super!</ar><jp>ご褒美!</jp><cn>超级大奖!</cn></textItem><textItem identifier="msg_turbo"><en_us>Turbo Power</en_us><en_uk>Turbo Power</en_uk><nl>Turbopower</nl><fr>Puissance turbo</fr><de>Turboantrieb</de><es>Energía turbo</es><br>Poder de Turbo</br><pt>Turbo</pt><it>Forza turbo</it><se>Turbokraft</se><pl>Moc turbo</pl><ru>Ускоритель</ru><id>Daya Turbo</id><ar>Turbo Power</ar><jp>ターボパワー</jp><cn>涡轮能量</cn></textItem><textItem identifier="msg_level1_comp"><en_us>Level 1 of 6 completed.</en_us><en_uk>Level 1 of 6 completed.</en_uk><nl>Level 1 van 6 voltooid.</nl><fr>Niveau 1 sur 6 réussi.</fr><de>Level 1 von 6 abgeschlossen.</de><es>Nivel 1 de 6 completado.</es><br>Fase 1 de 6 concluída.</br><pt>Nível 1 de 6 concluído.</pt><it>Completato il livello 1 di 6.</it><se>Nivå 1 av 6 klarad.</se><pl>Ukończono poziom 1 z 6.</pl><ru>Пройден 1 уровень из 6</ru><id>Level 1 dari 6 selesai.</id><ar>Level 1 of 6 completed.</ar><jp>関門 1/6 をクリアしました</jp><cn>共 6 关,已过 1 关</cn></textItem><textItem identifier="msg_level2_comp"><en_us>Level 2 of 6 completed.</en_us><en_uk>Level 2 of 6 completed.</en_uk><nl>Level 2 van 6 voltooid.</nl><fr>Niveau 2 sur 6 réussi.</fr><de>Level 2 von 6 abgeschlossen.</de><es>Nivel 2 de 6 completado.</es><br>Fase 2 de 6 concluída.</br><pt>Nível 2 de 6 concluído.</pt><it>Completato il livello 2 di 6.</it><se>Nivå 2 av 6 klarad.</se><pl>Ukończono poziom 2 z 6.</pl><ru>Пройден 2 уровень из 6</ru><id>Level 2 dari 6 selesai.</id><ar>Level 2 of 6 completed.</ar><jp>関門 2/6 をクリアしました</jp><cn>共 6 关,已过 2 关</cn></textItem><textItem identifier="msg_level3_comp"><en_us>Level 3 of 6 completed.</en_us><en_uk>Level 3 of 6 completed.</en_uk><nl>Level 3 van 6 voltooid.</nl><fr>Niveau 3 sur 6 réussi.</fr><de>Level 3 von 6 abgeschlossen.</de><es>Nivel 3 de 6 completado.</es><br>Fase 3 de 6 concluída.</br><pt>Nível 3 de 6 concluído.</pt><it>Completato il livello 3 di 6.</it><se>Nivå 3 av 6 klarad.</se><pl>Ukończono poziom 3 z 6.</pl><ru>Пройден 3 уровень из 6</ru><id>Level 3 dari 6 selesai.</id><ar>Level 3 of 6 completed.</ar><jp>関門 3/6 をクリアしました</jp><cn>共 6 关,已过 3 关</cn></textItem><textItem identifier="msg_level4_comp"><en_us>Level 4 of 6 completed.</en_us><en_uk>Level 4 of 6 completed.</en_uk><nl>Level 4 van 6 voltooid.</nl><fr>Niveau 4 sur 6 réussi.</fr><de>Level 4 von 6 abgeschlossen.</de><es>Nivel 4 de 6 completado.</es><br>Fase 4 de 6 concluída.</br><pt>Nível 4 de 6 concluído.</pt><it>Completato il livello 4 di 6.</it><se>Nivå 4 av 6 klarad.</se><pl>Ukończono poziom 4 z 6.</pl><ru>Пройден 4 уровень из 6</ru><id>Level 4 dari 6 selesai.</id><ar>Level 4 of 6 completed.</ar><jp>関門 4/6 をクリアしました</jp><cn>共 6 关,已过 4 关</cn></textItem><textItem identifier="msg_level5_comp"><en_us>Level 5 of 6 completed.</en_us><en_uk>Level 5 of 6 completed.</en_uk><nl>Level 5 van 6 voltooid.</nl><fr>Niveau 5 sur 6 réussi.</fr><de>Level 5 von 6 abgeschlossen.</de><es>Nivel 5 de 6 completado.</es><br>Fase 5 de 6 concluída.</br><pt>Nível 5 de 6 concluído.</pt><it>Completato il livello 5 di 6.</it><se>Nivå 5 av 6 klarad.</se><pl>Ukończono poziom 5 z 6.</pl><ru>Пройден 5 уровень из 6</ru><id>Level 5 dari 6 selesai.</id><ar>Level 5 of 6 completed.</ar><jp>関門 5/6 をクリアしました</jp><cn>共 6 关,已过 5 关</cn></textItem><textItem identifier="msg_level6_comp"><en_us>Level 6 of 6 completed.</en_us><en_uk>Level 6 of 6 completed.</en_uk><nl>Level 6 van 6 voltooid.</nl><fr>Niveau 6 sur 6 réussi.</fr><de>Level 6 von 6 abgeschlossen.</de><es>Nivel 6 de 6 completado.</es><br>Fase 6 de 6 concluída.</br><pt>Nível 6 de 6 concluído.</pt><it>Completato il livello 6 di 6.</it><se>Nivå 6 av 6 klarad.</se><pl>Ukończono poziom 6 z 6.</pl><ru>Пройден 6 уровень из 6</ru><id>Level 6 dari 6 selesai.</id><ar>Level 6 of 6 completed.</ar><jp>関門 6/6 をクリアしました</jp><cn>共 6 关,已过 6 关</cn></textItem><textItem identifier="msg_level7_comp"><en_us>Level 7 of 8 completed.</en_us><en_uk>Level 7 of 8 completed.</en_uk><nl>Level 7 van 8 voltooid.</nl><fr>Niveau 7 sur 8 réussi.</fr><de>Level 7 von 8 abgeschlossen.</de><es>Nivel 7 de 8 completado.</es><br>Fase 7 de 8 concluída.</br><pt>Nível 7 de 8 concluído.</pt><it>Completato il livello 7 di 8.</it><se>Nivå 7 av 8 klarad.</se><pl>Ukończono poziom 7 z 8.</pl><ru>Пройден 7 уровень из 8</ru><id>Level 7 dari 8 selesai.</id><ar>Level 7 of 8 completed.</ar><jp>関門 7/8 をクリアしました</jp><cn>共 8 关,已过 7 关</cn></textItem><textItem identifier="msg_level8_comp"><en_us>Level 8 of 8 completed.</en_us><en_uk>Level 8 of 8 completed.</en_uk><nl>Level 8 van 8 voltooid.</nl><fr>Niveau 8 sur 8 réussi.</fr><de>Level 8 von 8 abgeschlossen.</de><es>Nivel 8 de 8 completado.</es><br>Fase 8 de 8 concluída.</br><pt>Nível 8 de 8 concluído.</pt><it>Completato il livello 8 di 8.</it><se>Nivå 8 av 8 klarad.</se><pl>Ukończono poziom 8 z 8.</pl><ru>Пройден 8 уровень из 8</ru><id>Level 8 dari 8 selesai.</id><ar>Level 8 of 8 completed.</ar><jp>関門 8/8 をクリアしました</jp><cn>共 8 关,已过 8 关</cn></textItem><textItem identifier="msg_ready"><en_us>Ready… Set…</en_us><en_uk>Get ready… Get set…</en_uk><nl>Klaar voor de start...</nl><fr>À vos marques… prêts…</fr><de>Auf die Plätze... Fertig...</de><es>Preparados... Listos...</es><br>Preparar... Apontar...</br><pt>Preparado... A postos...</pt><it>Pronti…Partenza…</it><se>Klara... Färdiga...</se><pl>Gotów... Do startu...</pl><ru>Приготовились...</ru><id>Siap… Siaga…</id><ar>Get ready… Get set…</ar><jp>よーい…</jp><cn>就位… 准备…</cn></textItem><textItem identifier="msg_go"><en_us>Go!</en_us><en_uk>Go!</en_uk><nl>Af!</nl><fr>Partez !</fr><de>Los!</de><es>¡Ya!</es><br>Largar!</br><pt>Partida!</pt><it>Via!</it><se>Gå!</se><pl>Start!</pl><ru>Поехали!</ru><id>Jalan!</id><ar>Go!</ar><jp>ドン!</jp><cn>出发!</cn></textItem><textItem identifier="msg_level1"><en_us>Level 1</en_us><en_uk>Level 1 </en_uk><nl>Level 1 </nl><fr>Niveau 1 </fr><de>Level 1 </de><es>Nivel 1 </es><br>Fase 1</br><pt>Nível 1 </pt><it>Livello 1</it><se>Nivå 1 </se><pl>Poziom 1 </pl><ru>Yровень 1</ru><id>Level 1 </id><ar>Level 1 </ar><jp>関門 1</jp><cn>关卡1</cn></textItem><textItem identifier="msg_level2"><en_us>Level 2</en_us><en_uk>Level 2</en_uk><nl>Level 2</nl><fr>Niveau 2</fr><de>Level 2</de><es>Nivel 2</es><br>Fase 2</br><pt>Nível 2</pt><it>Livello 2</it><se>Nivå 2</se><pl>Poziom 2</pl><ru>Yровень 2</ru><id>Level 2</id><ar>Level 2</ar><jp>関門 2</jp><cn>关卡2</cn></textItem><textItem identifier="msg_level3"><en_us>Level 3</en_us><en_uk>Level 3</en_uk><nl>Level 3</nl><fr>Niveau 3</fr><de>Level 3</de><es>Nivel 3</es><br>Fase 3</br><pt>Nível 3</pt><it>Livello 3</it><se>Nivå 3</se><pl>Poziom 3</pl><ru>Yровень 3</ru><id>Level 3</id><ar>Level 3</ar><jp>関門 3</jp><cn>关卡3</cn></textItem><textItem identifier="msg_level4"><en_us>Level 4</en_us><en_uk>Level 4</en_uk><nl>Level 4</nl><fr>Niveau 4</fr><de>Level 4</de><es>Nivel 4</es><br>Fase 4</br><pt>Nível 4</pt><it>Livello 4</it><se>Nivå 4</se><pl>Poziom 4</pl><ru>Yровень 4</ru><id>Level 4</id><ar>Level 4</ar><jp>関門 4</jp><cn>关卡4</cn></textItem><textItem identifier="msg_level5"><en_us>Level 5</en_us><en_uk>Level 5</en_uk><nl>Level 5</nl><fr>Niveau 5</fr><de>Level 5</de><es>Nivel 5</es><br>Fase 5</br><pt>Nível 5</pt><it>Livello 5</it><se>Nivå 5</se><pl>Poziom 5</pl><ru>Yровень 5</ru><id>Level 5</id><ar>Level 5</ar><jp>関門 5</jp><cn>关卡5</cn></textItem><textItem identifier="msg_level6"><en_us>Level 6</en_us><en_uk>Level 6</en_uk><nl>Level 6</nl><fr>Niveau 6</fr><de>Level 6</de><es>Nivel 6</es><br>Fase 6</br><pt>Nível 6</pt><it>Livello 6</it><se>Nivå 6</se><pl>Poziom 6</pl><ru>Yровень 6</ru><id>Level 6</id><ar>Level 6</ar><jp>関門 6</jp><cn>关卡6</cn></textItem><textItem identifier="msg_times_up"><en_us>Time's up!</en_us><en_uk>Time is up!</en_uk><nl>Je tijd is om!</nl><fr>Fin de temps limite !</fr><de>Zeit abgelaufen!</de><es>¡Se acabó el tiempo!</es><br>Acabou o tempo!</br><pt>Acabou o Tempo!</pt><it>Tempo scaduto!</it><se>Tiden är ute!</se><pl>Czas minął!</pl><ru>Время вышло!</ru><id>Waktu habis!</id><ar>Time's up!</ar><jp>時間切れです!</jp><cn>时间到了!</cn></textItem></LocalisedText> ; SpilGame.importXMLv2(_local4); SpilGame.importXMLv2(_local4); _brandingLogo = new BrandingLogo(); _brandingLogo.x = 576; _brandingLogo.y = 310; _brandingLogo.mouseEnabled = (_brandingLogo.buttonMode = (_brandingLogo.useHandCursor = true)); } private function handleBrandingLogoClicked(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(SpilGame.getMoreGamesLink("Mainscreen")), "_blank"); } override protected function destroy(_arg1:Event):void{ super.destroy(_arg1); _spilButton.removeEventListener(MouseEvent.CLICK, handleSpilGamesButtonClicked); } public function loadDisplay(_arg1):void{ _languageSelectBox = new LanguageSelectBox(); _languageSelectBox.x = 19; _languageSelectBox.y = 14; _languageSelectBox.popupLocation = "bottom"; _arg1.addChild(_languageSelectBox); _spilButton = new SpilGamesLink(); _spilButton.x = 11; _spilButton.y = 467; _spilButton.blendMode = BlendMode.INVERT; _spilButton.addEventListener(MouseEvent.CLICK, handleSpilGamesButtonClicked); _arg1.addChild(_spilButton); } public function removeDisplay(_arg1):void{ _arg1.removeChild(_languageSelectBox); _arg1.removeChild(_spilButton); } } }//package spill.components
Section 223
//Comp (spill.components.Comp) package spill.components { import flash.events.*; import flash.display.*; public class Comp extends Sprite { private var _component; public function Comp(){ addEventListener(Event.ADDED_TO_STAGE, init); } protected function init(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, init); addEventListener(Event.REMOVED_FROM_STAGE, destroy); } protected function destroy(_arg1:Event):void{ removeEventListener(Event.REMOVED_FROM_STAGE, destroy); _component = null; } public function setComponent(_arg1):void{ if (_component){ removeChild(_component); }; _component = _arg1; addChild(_component); } public function get component(){ return (_component); } } }//package spill.components
Section 224
//CSubmitter (spill.components.CSubmitter) package spill.components { import flash.events.*; import flash.display.*; import flash.text.*; import com.spilgames.api.*; public class CSubmitter extends Comp { private var _scoreCallbackID:int; private var _debugDisplay:TextField; private var _awardsCallbackID:int; public function CSubmitter(){ _debugDisplay = new TextField(); super(); } public function submitScore(_arg1:Number):void{ _scoreCallbackID = ScoreService.submitScore(_arg1, onScoreRequestProcessed); } public function submitAward(_arg1:String):void{ _awardsCallbackID = AwardsService.submitAward(_arg1, onAwardRequestProcessed); } private function onServicesReady(_arg1:Event):void{ } override protected function init(_arg1:Event):void{ super.init(_arg1); var _local2:SpilGamesServices = SpilGamesServices.getInstance(); _local2.addEventListener("servicesReady", onServicesReady); _local2.addEventListener("servicesFailed", onServicesFailed); _local2.connect(this); } private function onScoreRequestProcessed(_arg1:int, _arg2:Object):void{ _debugDisplay.appendText(("onScoreRequestProcessed" + "\n")); _debugDisplay.appendText((("\tcallbackID: " + _arg1) + "\n")); if (!_arg2.errorMessage){ _debugDisplay.appendText((("\txml: " + _arg2.xml) + "\n")); } else { _debugDisplay.appendText((("\tError in request: " + _arg2.errorMessage) + "\n")); }; } private function onSubmitAwardButtonClick(_arg1:MouseEvent):void{ _awardsCallbackID = AwardsService.submitAward("award1", onAwardRequestProcessed); } private function onServicesFailed(_arg1:ErrorEvent):void{ } private function onSubmitScoreButtonClick(_arg1:MouseEvent):void{ _scoreCallbackID = ScoreService.submitScore(12345, onScoreRequestProcessed); } private function onAwardRequestProcessed(_arg1:int, _arg2:Object):void{ _debugDisplay.appendText(("onAwardRequestProcessed" + "\n")); _debugDisplay.appendText((("\tcallbackID: " + _arg1) + "\n")); if (!_arg2.errorMessage){ _debugDisplay.appendText((("\txml: " + _arg2.xml) + "\n")); } else { _debugDisplay.appendText((("\tError in request: " + _arg2.errorMessage) + "\n")); }; } private function createGUI():void{ var _local1:TextFormat = new TextFormat(); _local1.size = 8; _local1.align = TextFormatAlign.CENTER; var _local2:Sprite = new Sprite(); _local2.graphics.beginFill(0x666666, 1); _local2.graphics.drawRect(0, 0, 50, 20); _local2.graphics.endFill(); var _local3:TextField = new TextField(); _local3.mouseEnabled = false; _local3.text = "submitScore"; _local3.width = _local2.width; _local3.height = _local2.height; _local3.setTextFormat(_local1); _local2.addChild(_local3); _local2.useHandCursor = (_local2.buttonMode = true); _local2.addEventListener(MouseEvent.CLICK, onSubmitScoreButtonClick); var _local4:Sprite = new Sprite(); _local4.graphics.beginFill(0x666666, 1); _local4.graphics.drawRect(0, 0, 50, 20); _local4.graphics.endFill(); _local4.x = 60; var _local5:TextField = new TextField(); _local5.mouseEnabled = false; _local5.text = "submitAward"; _local5.width = _local4.width; _local5.height = _local4.height; _local5.setTextFormat(_local1); _local4.addChild(_local5); _local4.useHandCursor = (_local4.buttonMode = true); _local4.addEventListener(MouseEvent.CLICK, onSubmitAwardButtonClick); addChild(_local2); addChild(_local4); _debugDisplay = new TextField(); _debugDisplay.y = 25; _debugDisplay.width = stage.stageWidth; _debugDisplay.height = stage.stageHeight; addChild(_debugDisplay); } } }//package spill.components
Section 225
//NitroNinjasConfig (spill.config.NitroNinjasConfig) package spill.config { public class NitroNinjasConfig { public static const TRACKER_COMPLETED:String = "game completed"; public static const TRACKER_HALF_REACHED:String = "50% completed"; public static const AWARD1:String = "award1"; public static const AWARD2:String = "award2"; public static const TRACKER_INIT:String = "mainscreen viewed"; public static const GAME_NAME:String = "Nitro_Ninjas"; public static const PAGE_NAME:String = "Nitro_Ninjas.html"; public static const AWARD3:String = "award3"; public static const AWARD4:String = "award4"; public static const AWARD5:String = "award5"; public function NitroNinjasConfig(_arg1:SingletonEnforcer){ } } }//package spill.config class SingletonEnforcer { private function SingletonEnforcer(){ } }
Section 226
//Brand (spill.localisation.Brand) package spill.localisation { import flash.xml.*; public class Brand { public var domain:String; 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 emailLink:String;// = "game" public var portalGroup:uint; public var useGoogleAnalitics:Boolean;// = true 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,") + "com.id,com.in"); private function get utm_campaign():String{ if (isExternal){ return (("utm_campaign=" + hostingDomain)); }; return (""); } public function exportXML():XML{ var _local3:XML; var _local1:XML = <portal/> ; _local1.@id = site_id; _local1.@language = preferedLanguage; _local1.@channel = portalGroup; var _local2:XML = <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); } public function getPromotionLink(_arg1:String, _arg2:String, _arg3:Boolean, _arg4:String="", _arg5:String=""):String{ var _local6:String = ("http://" + domain); _local6 = (_local6 + ((("/" + emailLink) + "/") + _arg2)); if (useGoogleAnalitics){ _local6 = (_local6 + ("?utm_medium=brandedgames_" + (_arg3) ? "external" : "internal")); _local6 = (_local6 + ("&utm_campaign=" + _arg1)); _arg4 = stripSubDomain(_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_source():String{ return (("utm_source=brandedgames_" + (isExternal) ? "external" : "internal")); } public function getMoreGamesLink(_arg1:String, _arg2:Boolean, _arg3:String="", _arg4:String=""):String{ var _local5:String = ("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); } public function get backgroundColor():uint{ return (PortalGroup.backgroundColors[portalGroup]); } 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{ if (!hasSendToFriendLink){ return (getMoreGamesLink(_arg1, _arg3)); }; var _local5:String = ("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{ if (!_arg1){ return (""); }; var _local2:Array = _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 227
//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 228
//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 _local2:Brand; var _local1:Array = 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]){ } else { brands_by_domain[_arg1.domain] = _arg1; }; if (brands_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.TEENS; 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.YOUNG_ADULTS; 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.TEENS; 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.TEENS; _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.TEENS; _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.TEENS; _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.TEENS; _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.TEENS; _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.TEENS; _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.TEENS; _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.com.mx"; _local1.emailLink = "juego"; _local1.portalGroup = PortalGroup.TEENS; _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.TEENS; _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.TEENS; _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.TEENS; _local1.preferedLanguage = "id"; addBrand(_local1); _local1 = new Brand(); _local1.site_id = 105; _local1.domain = "www.flashgames.ru"; _local1.emailLink = "igra"; _local1.portalGroup = PortalGroup.TEENS; _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.TEENS; _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.TEENS; _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 _local2:Brand; var _local1:XML = <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 229
//Language (spill.localisation.Language) package spill.localisation { import flash.xml.*; public class Language { public var portal_groups:Array; public var references:Array; public var name:String; public var embedInputFonts:Boolean;// = true public var id:uint; public var forceFont:String;// = null 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){ references = []; super(); name = _arg1; dname = _arg2; portal_groups = new Array(); } public function exportXML():XMLNode{ var _local1:XMLNode = 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; var _local2:XMLNode = new XMLNode(1, "display_name"); _local2.firstChild = new XMLNode(3, displayName); _local1.appendChild(_local2); var _local3:Array = []; var _local4:Array = PortalGroup.channelNames; var _local5:int; 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.YOUNG_ADULTS]); } public function set p_hyves(_arg1:String):void{ portal_groups[PortalGroup.HYVES] = _arg1; } public function set p_teen(_arg1:String):void{ portal_groups[PortalGroup.YOUNG_ADULTS] = _arg1; } public function get p_tween():String{ return (portal_groups[PortalGroup.TEENS]); } public function get p_family():String{ return (portal_groups[PortalGroup.FAMILY]); } public function get p_girl():String{ 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.TEENS] = _arg1; } public function get p_zapapa():String{ return (portal_groups[PortalGroup.ZAPAPA]); } } }//package spill.localisation
Section 230
//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.ojogos.pt"; _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.com.mx"; _local1.p_tween = "www.juegos.com.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 _local3:Language; var _local1:Array = getLanguagesArray(); var _local2:XMLNode = new XMLNode(1, "languages"); for each (_local3 in _local1) { _local2.appendChild(_local3.exportXML()); }; return (_local2); } public static function getLanguagesArray():Array{ var _local3:Language; var _local1:Array = new Array(); var _local2:Object = 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 231
//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 languageName_text:TextField; private var popup:MovieClip; private var mc:MovieClip; public function LanguageSelectBox(){ 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{ SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true); } private function mouseOut(_arg1:MouseEvent):void{ popup.visible = false; } public function set popupLocation(_arg1:String):void{ if (_arg1 == "bottom"){ popup.y = Math.floor(mc.height); } else { popup.y = (-(Math.floor(mc.height)) + 1); }; } private function removed(_arg1:Event):void{ SpilGame.removeEventListener("languageChanged", languageChanged); } public function init():void{ var _local3:MovieClip; var _local4:Language; var _local1:Array = 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); var _local2:int; for (;_local2 < _local1.length;_local2++) { _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; //unresolved jump }; continue; }; }; } private function itemClicked(_arg1:MouseEvent):void{ SpilGame.changeLanguage(_arg1.currentTarget.name.substr(2)); popup.visible = false; } private function mouseOver(_arg1:MouseEvent):void{ popup.visible = true; } private function languageChanged(_arg1:Event=null):void{ if (SpilGame.currentLanguage){ if ((((SpilGame.portalGroup == PortalGroup.HYVES)) && ((SpilGame.currentLanguage.name == "nl")))){ this.visible = false; return; }; this.visible = true; flag.gotoAndStop(SpilGame.currentLanguage.name); languageName_text.text = SpilGame.currentLanguage.displayName; languageName_text.embedFonts = SpilGame.currentLanguage.embedInputFonts; }; } } }//package spill.localisation
Section 232
//LanguageSelectBox_mc (spill.localisation.LanguageSelectBox_mc) package spill.localisation { import flash.display.*; import flash.text.*; public dynamic class LanguageSelectBox_mc extends MovieClip { public var languageName_text:TextField; public var flag:MovieClip; } }//package spill.localisation
Section 233
//LanguageSelectPopup_mc (spill.localisation.LanguageSelectPopup_mc) package spill.localisation { import flash.display.*; public dynamic class LanguageSelectPopup_mc extends MovieClip { public var l_cn:MovieClip; public var l_br:MovieClip; public var l_se:MovieClip; public var l_id:MovieClip; public var l_es_ar:MovieClip; public var l_es_mx:MovieClip; public var l_in:MovieClip; public var l_en_uk:MovieClip; public var l_en_us:MovieClip; public var l_es:MovieClip; public var l_ar:MovieClip; public var l_it:MovieClip; public var l_pl:MovieClip; public var l_nl:MovieClip; public var l_de:MovieClip; public var l_ru:MovieClip; public var l_pt:MovieClip; public var l_jp:MovieClip; public var l_fr:MovieClip; } }//package spill.localisation
Section 234
//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 added(_arg1:Event=null):void{ SpilGame.addEventListener("languageChanged", languageChanged, false, 0, true); text = originalText; } private function replaceFn():String{ var _local2:String = SpilGame.getString(arguments[1]); if (((!(_local2)) || ((_local2 == "")))){ return ((("{" + arguments[1]) + "}")); }; return (_local2); } private function removed(_arg1:Event):void{ SpilGame.removeEventListener("languageChanged", languageChanged); } 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 languageChanged(_arg1:Event):void{ text = originalText; updateProperties(); } } }//package spill.localisation
Section 235
//PortalGroup (spill.localisation.PortalGroup) package spill.localisation { import flash.xml.*; public class PortalGroup { public static const YOUNG_ADULTS:uint = 3; 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 HYVES:uint = 5; public static const TEENS:uint = 1; 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 _local3:XMLNode; var _local1:XMLNode = new XMLNode(1, "channels"); var _local2:int; 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 236
//spil_internal (spill.localisation.spil_internal) package spill.localisation { public namespace spil_internal = "spill.localisation"; }//package spill.localisation
Section 237
//SpilGame (spill.localisation.SpilGame) package spill.localisation { import flash.net.*; import flash.events.*; import flash.display.*; import flash.text.*; 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 = (embedDomain) ? embedDomain : hostingDomain; return (currentBranding.getPromotionLink(gameName, emailPage, isExternal, _local2, _arg1)); } public static function traceAllBrands():void{ } public static function getString(_arg1:String):String{ var _local2:Object = 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){ 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; Brandings.initialize(); Languages.initialize(); initContexMenu(_arg4); channelLock = _arg5; gameName = _arg1.replace(" ", "_"); portalGroup = _arg2; emailPage = _arg3; chooseLanguage(); chooseBranding(); if (portalGroup == PortalGroup.HYVES){ changeLanguage("nl"); }; } 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 = 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){ 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; _arg1.text = _arg1.text.replace(/{([^{}]*)}/g, replaceFn); _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 = Languages.getLanguage(_arg1); if (!_local2){ } 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 = 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 = <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 _local3:Brand; var _local1:Array = Brandings.getBrandsArray(); var _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 = (embedDomain) ? embedDomain : hostingDomain; return (currentBranding.getMoreGamesLink(gameName, isExternal, _local2, _arg1)); } public static function get isStagingDomain():Boolean{ var _local1:String = ("http://" + embedDomain); return ((_local1.indexOf("http://stg.") >= 0)); } spil_internal static function get cookieLanguage():Language{ var _local1:SharedObject = SharedObject.getLocal(cookieName, cookiePath); var _local2:String = 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))))){ return (getDomain(loc)); }; } catch(e:SecurityError) { } catch(e:Error) { }; }; return (null); } } }//package spill.localisation
Section 238
//SpilGamesLink (spill.localisation.SpilGamesLink) package spill.localisation { import flash.net.*; import flash.events.*; import flash.display.*; public class SpilGamesLink extends SimpleButton { private function buttonClicked(_arg1:MouseEvent):void{ navigateToURL(new URLRequest(SpilGame.getSpilCompanyLink()), "_blank"); } } }//package spill.localisation
Section 239
//TextFieldFit (spill.localisation.TextFieldFit) package spill.localisation { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; public class TextFieldFit extends MovieClip { protected var _glowQuality:Number;// = 1 protected var _gridFitType:String;// = "pixel" protected var _text:String;// = "default" private var debugBounding:Sprite; protected var _disableWordwrap:Boolean;// = false protected var _textSize:Number;// = 12 protected var _multiline:Boolean;// = false protected var _font:String;// = "" protected var _embedFonts:Boolean;// = true protected var _underline:Boolean;// = false protected var _vAlign:String;// = "top" protected var _italic:Boolean;// = false protected var _useGlowFilter:Boolean;// = false protected var _glowColor:uint;// = 0 protected var _bold:Boolean;// = false private var h:Number; protected var _antiAliasType:String;// = "advanced" private var sizeChanged:Boolean;// = true private var w:Number; private var embeddedFonts:Array; protected var _hAlign:String;// = "left" protected var _textColor:uint;// = 0 protected var _glowStrength:Number;// = 5 protected var _glowBlur:Number;// = 3 protected var _selectable:Boolean;// = false private var format:TextFormat; private var field:TextField; 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 = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent"))); var _local2:Number = width; var _local3:Number = 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){ 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 set hAlign(_arg1:String):void{ _hAlign = _arg1; invalidate(); } public function set bold(_arg1:Boolean):void{ _bold = _arg1; invalidate(); } private function init(_arg1:Event=null):void{ removeEventListener(Event.RENDER, init); updateProperties(); layoutText(); } private function validate(_arg1:Event=null):void{ updateProperties(); layoutText(); removeEventListener(Event.ENTER_FRAME, validate); valid = true; } public function set glowBlur(_arg1:Number):void{ _glowBlur = _arg1; invalidate(); } public function get vAlign():String{ return (_vAlign); } public function get italic():Boolean{ return (_italic); } public function get textColor():uint{ return (_textColor); } private function invalidate():void{ if (valid){ addEventListener(Event.ENTER_FRAME, validate); if (stage){ stage.invalidate(); }; valid = false; }; } public function get text():String{ return (_text); } public function get useGlowFilter():Boolean{ return (_useGlowFilter); } public function get selectable():Boolean{ return (_selectable); } public function set text(_arg1:String):void{ _text = _arg1; invalidate(); } public function set embedFonts(_arg1:Boolean):void{ _embedFonts = _arg1; invalidate(); } public function set vAlign(_arg1:String):void{ _vAlign = _arg1; invalidate(); } public function set italic(_arg1:Boolean):void{ _italic = _arg1; invalidate(); } public function get font():String{ return (_font); } public function set multiline(_arg1:Boolean):void{ _multiline = _arg1; invalidate(); } public function get disableWordwrap():Boolean{ return (_disableWordwrap); } public function set textColor(_arg1:uint):void{ _textColor = _arg1; invalidate(); } public function get antiAliasType():String{ return (_antiAliasType); } 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 set glowQuality(_arg1:Number):void{ _glowQuality = _arg1; invalidate(); } 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 get bold():Boolean{ return (_bold); } 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 useGlowFilter(_arg1:Boolean):void{ _useGlowFilter = _arg1; invalidate(); } public function set font(_arg1:String):void{ _font = _arg1; invalidate(); } public function set textSize(_arg1:Number):void{ _textSize = _arg1; sizeChanged = true; invalidate(); } public function set selectable(_arg1:Boolean):void{ _selectable = _arg1; invalidate(); } public function get multiline():Boolean{ return (_multiline); } public function get embedFonts():Boolean{ return (_embedFonts); } public function set glowColor(_arg1:uint):void{ _glowColor = _arg1; invalidate(); } public function set disableWordwrap(_arg1:Boolean):void{ _disableWordwrap = _arg1; invalidate(); } public function get glowQuality():Number{ return (_glowQuality); } public function get gridFitType():String{ return (_gridFitType); } public function get underline():Boolean{ return (_underline); } public function get textSize():Number{ return (_textSize); } public function get glowColor():uint{ return (_glowColor); } public function set antiAliasType(_arg1:String):void{ _antiAliasType = _arg1; invalidate(); } public function set glowStrength(_arg1:Number):void{ _glowStrength = _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){ //unresolved jump }; } else { field.embedFonts = false; }; if (TextFieldFit.forceFont){ format.font = TextFieldFit.forceFont; } else { 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); } 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); } } }//package spill.localisation
Section 240
//createSpillTxt (spill.utils.createSpillTxt) package spill.utils { import spill.localisation.*; public function createSpillTxt(_arg1:String, _arg2:uint=0, _arg3:Number=12, _arg4:Number=1, _arg5:Array=null, _arg6:Number=NaN, _arg7:Number=NaN):LocalizedTextField{ var _local8:LocalizedTextField = new LocalizedTextField(); _local8.text = _arg1; _local8.textColor = _arg2; _local8.textSize = _arg3; _local8.hAlign = "center"; if (!((isNaN(_arg6)) && (isNaN(_arg7)))){ _local8.hAlign = "center"; _local8.setSize(400, 400); }; _local8.scaleX = (_local8.scaleY = _arg4); _local8.filters = _arg5; return (_local8); } }//package spill.utils
Section 241
//Submitter (Spill.Components.Submitter) package Spill.Components { import flash.display.*; public dynamic class Submitter extends MovieClip { public var OO00OO1l1l:SubmitterProxy; } }//package Spill.Components
Section 242
//m_ToUrl (Util.m_ToUrl) package Util { import flash.net.*; import flash.external.*; public class m_ToUrl { private static const spildomain:Array = [".spilgames.eu", ".spilgames.com", ".a10.com", ".agame.com", ".girlsgogames.com", ".games.co.uk", ".mygames.co.uk", ".girlsgogames.co.uk", ".spel.nl", ".spelletjes.nl", ".girlsgogames.nl", ".jetztspielen.de", ".spielen.com", ".girlsgogames.de", ".jeux.fr", ".jeu.fr", ".girlsgogames.fr", ".juegos.com", ".zapjuegos.com", ".juegosdechicas.com", ".gioco.it", ".giocaregratis.it", ".girlsgogames.it", ".gry.pl", ".minigry.pl", ".girlsgogames.pl", ".spela.se", ".spel.eu", ".girlsgogames.se", ".ojogos.pt", ".ourgames.ru", ".flashgames.ru", ".girlsgogames.ru", ".oyunlar123.com", ".asoyun.com", ".girlsgogamestr.com", ".gamesgames.com", ".agame.com", ".girlsgogames.com", ".juegos.com", ".zapjuegos.com", ".juegosdechicas.com", ".ojogos.com.br", ".clickjogos.com", ".girlsgogames.com.br", ".game.com.cn", ".xiaoyouxi.com", ".egames.jp", ".game.co.in", ".girlsgogames.in", ".games.co.id", ".laro.com.ph", ".game.com.my", ".onrpg.com", ".zlonggames.com", ".zapapa.com"]; private static var loc; private static var request:URLRequest; public function m_ToUrl():void{ super(); try { loc = ExternalInterface.call("window.location.href.toString"); } catch(e) { loc = "error"; }; if ((((loc == null)) || ((loc == "")))){ loc = "error"; }; if (String(loc).indexOf(".swf") != -1){ loc = "error"; }; } public function m_checkDomain():Boolean{ if (((!((searchForSite(returnDomain(loc)) == -1))) && (!((loc == "error"))))){ return (true); }; return (false); } private static function searchForSite(_arg1:String):Number{ var _local2:uint; if (((spildomain) && (_arg1))){ _local2 = 0; while (_local2 < spildomain.length) { if (_arg1.lastIndexOf(spildomain[_local2]) > -1){ return (_local2); }; _local2++; }; return (-1); } else { trace("cannot find site name"); }; return (-1); } private static function returnDomain(_arg1:String):String{ var _local2:String = new String(); var _local3:uint = 7; while (_local3 < _arg1.length) { if (_arg1.charAt(_local3) == "/"){ break; }; _local2 = (_local2 + _arg1.charAt(_local3)); _local3++; }; return (_local2); } } }//package Util
Section 243
//backRib (backRib) package { import flash.display.*; public dynamic class backRib extends Sprite { } }//package
Section 244
//bikeChassis (bikeChassis) package { import flash.display.*; public dynamic class bikeChassis extends MovieClip { } }//package
Section 245
//blackFaderSprite (blackFaderSprite) package { import flash.display.*; public dynamic class blackFaderSprite extends Sprite { } }//package
Section 246
//cansWithOilSprite (cansWithOilSprite) package { import flash.display.*; public dynamic class cansWithOilSprite extends Sprite { } }//package
Section 247
//carSprite (carSprite) package { import flash.display.*; public dynamic class carSprite extends Sprite { } }//package
Section 248
//CheckPointFlagMC (CheckPointFlagMC) package { import flash.display.*; public dynamic class CheckPointFlagMC extends MovieClip { } }//package
Section 249
//crash_sfx (crash_sfx) package { import flash.media.*; public dynamic class crash_sfx extends Sound { } }//package
Section 250
//drive_fast_sfx (drive_fast_sfx) package { import flash.media.*; public dynamic class drive_fast_sfx extends Sound { } }//package
Section 251
//drive_fast_slow_sfx (drive_fast_slow_sfx) package { import flash.media.*; public dynamic class drive_fast_slow_sfx extends Sound { } }//package
Section 252
//drive_slow_fast_sfx (drive_slow_fast_sfx) package { import flash.media.*; public dynamic class drive_slow_fast_sfx extends Sound { } }//package
Section 253
//ejectedNinja (ejectedNinja) package { import flash.display.*; public dynamic class ejectedNinja extends MovieClip { public function ejectedNinja(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package
Section 254
//failed_music (failed_music) package { import flash.media.*; public dynamic class failed_music extends Sound { } }//package
Section 255
//FinishFlagMC (FinishFlagMC) package { import flash.display.*; public dynamic class FinishFlagMC extends MovieClip { } }//package
Section 256
//frontShocks (frontShocks) package { import flash.display.*; public dynamic class frontShocks extends Sprite { } }//package
Section 257
//game_complete_music (game_complete_music) package { import flash.media.*; public dynamic class game_complete_music extends Sound { } }//package
Section 258
//gameBG (gameBG) package { import flash.display.*; public dynamic class gameBG extends Sprite { } }//package
Section 259
//gameBGScrollSprite (gameBGScrollSprite) package { import flash.display.*; public dynamic class gameBGScrollSprite extends Sprite { } }//package
Section 260
//gameOverScreenBG (gameOverScreenBG) package { import spill.localisation.*; import flash.net.*; import flash.events.*; import flash.display.*; import flash.xml.*; import flash.text.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import flash.media.*; import flash.ui.*; import flash.system.*; import flash.external.*; import flash.errors.*; import adobe.utils.*; import flash.accessibility.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class gameOverScreenBG extends Sprite { public var __id31_:LocalizedTextField; public var __id30_:LocalizedTextField; public function gameOverScreenBG(){ __setProp___id30__gameOverScreenBackground_Layer1_0(); __setProp___id31__gameOverScreenBackground_items_0(); } function __setProp___id31__gameOverScreenBackground_items_0(){ try { __id31_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id31_.text = "{msg_pressspaceagain}"; __id31_.textColor = 0xFFCC00; __id31_.textSize = 12; __id31_.bold = false; __id31_.disableWordwrap = false; __id31_.embedFonts = true; __id31_.font = ""; __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___id30__gameOverScreenBackground_Layer1_0(){ try { __id30_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id30_.text = "{msg_gameover}"; __id30_.textColor = 0xFFFFFF; __id30_.textSize = 30; __id30_.bold = false; __id30_.disableWordwrap = false; __id30_.embedFonts = true; __id30_.font = ""; __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) { }; } } }//package
Section 261
//garbageBagsSprite (garbageBagsSprite) package { import flash.display.*; public dynamic class garbageBagsSprite extends Sprite { } }//package
Section 262
//graphBG (graphBG) package { import flash.display.*; public dynamic class graphBG extends Sprite { } }//package
Section 263
//greyLoweringPlatformSprite (greyLoweringPlatformSprite) package { import flash.display.*; public dynamic class greyLoweringPlatformSprite extends Sprite { } }//package
Section 264
//howToPlayBackground (howToPlayBackground) package { import spill.localisation.*; import flash.net.*; import flash.events.*; import flash.display.*; import flash.xml.*; import flash.text.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import flash.media.*; import flash.ui.*; import flash.system.*; import flash.external.*; import flash.errors.*; import adobe.utils.*; import flash.accessibility.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; public dynamic class howToPlayBackground extends Sprite { public var __id15_:LocalizedTextField; public var __id14_:LocalizedTextField; public var __id17_:LocalizedTextField; public var __id16_:LocalizedTextField; public function howToPlayBackground(){ __setProp___id14__HOW_TO_PLAY_Background_Layer1_0(); __setProp___id15__HOW_TO_PLAY_Background_Layer6_0(); __setProp___id16__HOW_TO_PLAY_Background_Layer6_0(); __setProp___id17__HOW_TO_PLAY_Background_Layer6_0(); } function __setProp___id14__HOW_TO_PLAY_Background_Layer1_0(){ try { __id14_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id14_.text = "{btn_howtoplay}"; __id14_.textColor = 0xFFFFFF; __id14_.textSize = 30; __id14_.bold = false; __id14_.disableWordwrap = false; __id14_.embedFonts = true; __id14_.font = ""; __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) { }; } function __setProp___id17__HOW_TO_PLAY_Background_Layer6_0(){ try { __id17_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id17_.text = "{msg_help_tricks}"; __id17_.textColor = 0xFFFFFF; __id17_.textSize = 12; __id17_.bold = false; __id17_.disableWordwrap = false; __id17_.embedFonts = true; __id17_.font = ""; __id17_.hAlign = "center"; __id17_.multiline = false; __id17_.vAlign = "middle"; __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___id16__HOW_TO_PLAY_Background_Layer6_0(){ try { __id16_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id16_.text = "{msg_help_jump}"; __id16_.textColor = 0xFFFFFF; __id16_.textSize = 12; __id16_.bold = false; __id16_.disableWordwrap = false; __id16_.embedFonts = true; __id16_.font = ""; __id16_.hAlign = "center"; __id16_.multiline = false; __id16_.vAlign = "middle"; __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___id15__HOW_TO_PLAY_Background_Layer6_0(){ try { __id15_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id15_.text = "{msg_help_up}"; __id15_.textColor = 0xFFFFFF; __id15_.textSize = 12; __id15_.bold = false; __id15_.disableWordwrap = false; __id15_.embedFonts = true; __id15_.font = ""; __id15_.hAlign = "center"; __id15_.multiline = false; __id15_.vAlign = "middle"; __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) { }; } } }//package
Section 265
//howToPlayImageBG (howToPlayImageBG) package { import flash.display.*; public dynamic class howToPlayImageBG extends Sprite { } }//package
Section 266
//land_sfx (land_sfx) package { import flash.media.*; public dynamic class land_sfx extends Sound { } }//package
Section 267
//level_music (level_music) package { import flash.media.*; public dynamic class level_music extends Sound { } }//package
Section 268
//level_win_music (level_win_music) package { import flash.media.*; public dynamic class level_win_music extends Sound { } }//package
Section 269
//level1_1 (level1_1) package { import flash.display.*; public dynamic class level1_1 extends Sprite { } }//package
Section 270
//level1_10 (level1_10) package { import flash.display.*; public dynamic class level1_10 extends Sprite { } }//package
Section 271
//level1_11 (level1_11) package { import flash.display.*; public dynamic class level1_11 extends Sprite { } }//package
Section 272
//level1_12 (level1_12) package { import flash.display.*; public dynamic class level1_12 extends Sprite { } }//package
Section 273
//level1_13 (level1_13) package { import flash.display.*; public dynamic class level1_13 extends Sprite { } }//package
Section 274
//level1_14 (level1_14) package { import flash.display.*; public dynamic class level1_14 extends Sprite { } }//package
Section 275
//level1_15 (level1_15) package { import flash.display.*; public dynamic class level1_15 extends Sprite { } }//package
Section 276
//level1_16 (level1_16) package { import flash.display.*; public dynamic class level1_16 extends Sprite { } }//package
Section 277
//level1_17 (level1_17) package { import flash.display.*; public dynamic class level1_17 extends Sprite { } }//package
Section 278
//level1_18 (level1_18) package { import flash.display.*; public dynamic class level1_18 extends Sprite { } }//package
Section 279
//level1_19 (level1_19) package { import flash.display.*; public dynamic class level1_19 extends Sprite { } }//package
Section 280
//level1_2 (level1_2) package { import flash.display.*; public dynamic class level1_2 extends Sprite { } }//package
Section 281
//level1_20 (level1_20) package { import flash.display.*; public dynamic class level1_20 extends Sprite { } }//package
Section 282
//level1_21 (level1_21) package { import flash.display.*; public dynamic class level1_21 extends Sprite { } }//package
Section 283
//level1_22 (level1_22) package { import flash.display.*; public dynamic class level1_22 extends Sprite { } }//package
Section 284
//level1_23 (level1_23) package { import flash.display.*; public dynamic class level1_23 extends Sprite { } }//package
Section 285
//level1_3 (level1_3) package { import flash.display.*; public dynamic class level1_3 extends Sprite { } }//package
Section 286
//level1_4 (level1_4) package { import flash.display.*; public dynamic class level1_4 extends Sprite { } }//package
Section 287
//level1_5 (level1_5) package { import flash.display.*; public dynamic class level1_5 extends Sprite { } }//package
Section 288
//level1_6 (level1_6) package { import flash.display.*; public dynamic class level1_6 extends Sprite { } }//package
Section 289
//level1_7 (level1_7) package { import flash.display.*; public dynamic class level1_7 extends Sprite { } }//package
Section 290
//level1_8 (level1_8) package { import flash.display.*; public dynamic class level1_8 extends Sprite { } }//package
Section 291
//level1_9 (level1_9) package { import flash.display.*; public dynamic class level1_9 extends Sprite { } }//package
Section 292
//level2_1 (level2_1) package { import flash.display.*; public dynamic class level2_1 extends Sprite { } }//package
Section 293
//level2_10 (level2_10) package { import flash.display.*; public dynamic class level2_10 extends Sprite { } }//package
Section 294
//level2_11 (level2_11) package { import flash.display.*; public dynamic class level2_11 extends Sprite { } }//package
Section 295
//level2_12 (level2_12) package { import flash.display.*; public dynamic class level2_12 extends Sprite { } }//package
Section 296
//level2_13 (level2_13) package { import flash.display.*; public dynamic class level2_13 extends Sprite { } }//package
Section 297
//level2_14 (level2_14) package { import flash.display.*; public dynamic class level2_14 extends Sprite { } }//package
Section 298
//level2_15 (level2_15) package { import flash.display.*; public dynamic class level2_15 extends Sprite { } }//package
Section 299
//level2_16 (level2_16) package { import flash.display.*; public dynamic class level2_16 extends Sprite { } }//package
Section 300
//level2_17 (level2_17) package { import flash.display.*; public dynamic class level2_17 extends Sprite { } }//package
Section 301
//level2_18 (level2_18) package { import flash.display.*; public dynamic class level2_18 extends Sprite { } }//package
Section 302
//level2_19 (level2_19) package { import flash.display.*; public dynamic class level2_19 extends Sprite { } }//package
Section 303
//level2_2 (level2_2) package { import flash.display.*; public dynamic class level2_2 extends Sprite { } }//package
Section 304
//level2_20 (level2_20) package { import flash.display.*; public dynamic class level2_20 extends Sprite { } }//package
Section 305
//level2_21 (level2_21) package { import flash.display.*; public dynamic class level2_21 extends Sprite { } }//package
Section 306
//level2_22 (level2_22) package { import flash.display.*; public dynamic class level2_22 extends Sprite { } }//package
Section 307
//level2_23 (level2_23) package { import flash.display.*; public dynamic class level2_23 extends Sprite { } }//package
Section 308
//level2_24 (level2_24) package { import flash.display.*; public dynamic class level2_24 extends Sprite { } }//package
Section 309
//level2_25 (level2_25) package { import flash.display.*; public dynamic class level2_25 extends Sprite { } }//package
Section 310
//level2_3 (level2_3) package { import flash.display.*; public dynamic class level2_3 extends Sprite { } }//package
Section 311
//level2_4 (level2_4) package { import flash.display.*; public dynamic class level2_4 extends Sprite { } }//package
Section 312
//level2_5 (level2_5) package { import flash.display.*; public dynamic class level2_5 extends Sprite { } }//package
Section 313
//level2_6 (level2_6) package { import flash.display.*; public dynamic class level2_6 extends Sprite { } }//package
Section 314
//level2_7 (level2_7) package { import flash.display.*; public dynamic class level2_7 extends Sprite { } }//package
Section 315
//level2_8 (level2_8) package { import flash.display.*; public dynamic class level2_8 extends Sprite { } }//package
Section 316
//level2_9 (level2_9) package { import flash.display.*; public dynamic class level2_9 extends Sprite { } }//package
Section 317
//level3_1 (level3_1) package { import flash.display.*; public dynamic class level3_1 extends Sprite { } }//package
Section 318
//level3_10 (level3_10) package { import flash.display.*; public dynamic class level3_10 extends Sprite { } }//package
Section 319
//level3_11 (level3_11) package { import flash.display.*; public dynamic class level3_11 extends Sprite { } }//package
Section 320
//level3_12 (level3_12) package { import flash.display.*; public dynamic class level3_12 extends Sprite { } }//package
Section 321
//level3_13 (level3_13) package { import flash.display.*; public dynamic class level3_13 extends Sprite { } }//package
Section 322
//level3_14 (level3_14) package { import flash.display.*; public dynamic class level3_14 extends Sprite { } }//package
Section 323
//level3_15 (level3_15) package { import flash.display.*; public dynamic class level3_15 extends Sprite { } }//package
Section 324
//level3_16 (level3_16) package { import flash.display.*; public dynamic class level3_16 extends Sprite { } }//package
Section 325
//level3_17 (level3_17) package { import flash.display.*; public dynamic class level3_17 extends Sprite { } }//package
Section 326
//level3_18 (level3_18) package { import flash.display.*; public dynamic class level3_18 extends Sprite { } }//package
Section 327
//level3_19 (level3_19) package { import flash.display.*; public dynamic class level3_19 extends Sprite { } }//package
Section 328
//level3_2 (level3_2) package { import flash.display.*; public dynamic class level3_2 extends Sprite { } }//package
Section 329
//level3_20 (level3_20) package { import flash.display.*; public dynamic class level3_20 extends Sprite { } }//package
Section 330
//level3_21 (level3_21) package { import flash.display.*; public dynamic class level3_21 extends Sprite { } }//package
Section 331
//level3_22 (level3_22) package { import flash.display.*; public dynamic class level3_22 extends Sprite { } }//package
Section 332
//level3_23 (level3_23) package { import flash.display.*; public dynamic class level3_23 extends Sprite { } }//package
Section 333
//level3_24 (level3_24) package { import flash.display.*; public dynamic class level3_24 extends Sprite { } }//package
Section 334
//level3_25 (level3_25) package { import flash.display.*; public dynamic class level3_25 extends Sprite { } }//package
Section 335
//level3_26 (level3_26) package { import flash.display.*; public dynamic class level3_26 extends Sprite { } }//package
Section 336
//level3_3 (level3_3) package { import flash.display.*; public dynamic class level3_3 extends Sprite { } }//package
Section 337
//level3_4 (level3_4) package { import flash.display.*; public dynamic class level3_4 extends Sprite { } }//package
Section 338
//level3_5 (level3_5) package { import flash.display.*; public dynamic class level3_5 extends Sprite { } }//package
Section 339
//level3_6 (level3_6) package { import flash.display.*; public dynamic class level3_6 extends Sprite { } }//package
Section 340
//level3_7 (level3_7) package { import flash.display.*; public dynamic class level3_7 extends Sprite { } }//package
Section 341
//level3_8 (level3_8) package { import flash.display.*; public dynamic class level3_8 extends Sprite { } }//package
Section 342
//level3_9 (level3_9) package { import flash.display.*; public dynamic class level3_9 extends Sprite { } }//package
Section 343
//level4_1 (level4_1) package { import flash.display.*; public dynamic class level4_1 extends Sprite { } }//package
Section 344
//level4_10 (level4_10) package { import flash.display.*; public dynamic class level4_10 extends Sprite { } }//package
Section 345
//level4_11 (level4_11) package { import flash.display.*; public dynamic class level4_11 extends Sprite { } }//package
Section 346
//level4_12 (level4_12) package { import flash.display.*; public dynamic class level4_12 extends Sprite { } }//package
Section 347
//level4_13 (level4_13) package { import flash.display.*; public dynamic class level4_13 extends Sprite { } }//package
Section 348
//level4_14 (level4_14) package { import flash.display.*; public dynamic class level4_14 extends Sprite { } }//package
Section 349
//level4_15 (level4_15) package { import flash.display.*; public dynamic class level4_15 extends Sprite { } }//package
Section 350
//level4_16 (level4_16) package { import flash.display.*; public dynamic class level4_16 extends Sprite { } }//package
Section 351
//level4_17 (level4_17) package { import flash.display.*; public dynamic class level4_17 extends Sprite { } }//package
Section 352
//level4_18 (level4_18) package { import flash.display.*; public dynamic class level4_18 extends Sprite { } }//package
Section 353
//level4_19 (level4_19) package { import flash.display.*; public dynamic class level4_19 extends Sprite { } }//package
Section 354
//level4_2 (level4_2) package { import flash.display.*; public dynamic class level4_2 extends Sprite { } }//package
Section 355
//level4_20 (level4_20) package { import flash.display.*; public dynamic class level4_20 extends Sprite { } }//package
Section 356
//level4_21 (level4_21) package { import flash.display.*; public dynamic class level4_21 extends Sprite { } }//package
Section 357
//level4_22 (level4_22) package { import flash.display.*; public dynamic class level4_22 extends Sprite { } }//package
Section 358
//level4_23 (level4_23) package { import flash.display.*; public dynamic class level4_23 extends Sprite { } }//package
Section 359
//level4_24 (level4_24) package { import flash.display.*; public dynamic class level4_24 extends Sprite { } }//package
Section 360
//level4_25 (level4_25) package { import flash.display.*; public dynamic class level4_25 extends Sprite { } }//package
Section 361
//level4_3 (level4_3) package { import flash.display.*; public dynamic class level4_3 extends Sprite { } }//package
Section 362
//level4_4 (level4_4) package { import flash.display.*; public dynamic class level4_4 extends Sprite { } }//package
Section 363
//level4_5 (level4_5) package { import flash.display.*; public dynamic class level4_5 extends Sprite { } }//package
Section 364
//level4_6 (level4_6) package { import flash.display.*; public dynamic class level4_6 extends Sprite { } }//package
Section 365
//level4_7 (level4_7) package { import flash.display.*; public dynamic class level4_7 extends Sprite { } }//package
Section 366
//level4_8 (level4_8) package { import flash.display.*; public dynamic class level4_8 extends Sprite { } }//package
Section 367
//level4_9 (level4_9) package { import flash.display.*; public dynamic class level4_9 extends Sprite { } }//package
Section 368
//level5_1 (level5_1) package { import flash.display.*; public dynamic class level5_1 extends Sprite { } }//package
Section 369
//level5_10 (level5_10) package { import flash.display.*; public dynamic class level5_10 extends Sprite { } }//package
Section 370
//level5_11 (level5_11) package { import flash.display.*; public dynamic class level5_11 extends Sprite { } }//package
Section 371
//level5_12 (level5_12) package { import flash.display.*; public dynamic class level5_12 extends Sprite { } }//package
Section 372
//level5_13 (level5_13) package { import flash.display.*; public dynamic class level5_13 extends Sprite { } }//package
Section 373
//level5_14 (level5_14) package { import flash.display.*; public dynamic class level5_14 extends Sprite { } }//package
Section 374
//level5_15 (level5_15) package { import flash.display.*; public dynamic class level5_15 extends Sprite { } }//package
Section 375
//level5_16 (level5_16) package { import flash.display.*; public dynamic class level5_16 extends Sprite { } }//package
Section 376
//level5_17 (level5_17) package { import flash.display.*; public dynamic class level5_17 extends Sprite { } }//package
Section 377
//level5_18 (level5_18) package { import flash.display.*; public dynamic class level5_18 extends Sprite { } }//package
Section 378
//level5_19 (level5_19) package { import flash.display.*; public dynamic class level5_19 extends Sprite { } }//package
Section 379
//level5_2 (level5_2) package { import flash.display.*; public dynamic class level5_2 extends Sprite { } }//package
Section 380
//level5_20 (level5_20) package { import flash.display.*; public dynamic class level5_20 extends Sprite { } }//package
Section 381
//level5_21 (level5_21) package { import flash.display.*; public dynamic class level5_21 extends Sprite { } }//package
Section 382
//level5_22 (level5_22) package { import flash.display.*; public dynamic class level5_22 extends Sprite { } }//package
Section 383
//level5_23 (level5_23) package { import flash.display.*; public dynamic class level5_23 extends Sprite { } }//package
Section 384
//level5_24 (level5_24) package { import flash.display.*; public dynamic class level5_24 extends Sprite { } }//package
Section 385
//level5_25 (level5_25) package { import flash.display.*; public dynamic class level5_25 extends Sprite { } }//package
Section 386
//level5_26 (level5_26) package { import flash.display.*; public dynamic class level5_26 extends Sprite { } }//package
Section 387
//level5_3 (level5_3) package { import flash.display.*; public dynamic class level5_3 extends Sprite { } }//package
Section 388
//level5_4 (level5_4) package { import flash.display.*; public dynamic class level5_4 extends Sprite { } }//package
Section 389
//level5_5 (level5_5) package { import flash.display.*; public dynamic class level5_5 extends Sprite { } }//package
Section 390
//level5_6 (level5_6) package { import flash.display.*; public dynamic class level5_6 extends Sprite { } }//package
Section 391
//level5_7 (level5_7) package { import flash.display.*; public dynamic class level5_7 extends Sprite { } }//package
Section 392
//level5_8 (level5_8) package { import flash.display.*; public dynamic class level5_8 extends Sprite { } }//package
Section 393
//level5_9 (level5_9) package { import flash.display.*; public dynamic class level5_9 extends Sprite { } }//package
Section 394
//level6_1 (level6_1) package { import flash.display.*; public dynamic class level6_1 extends Sprite { } }//package
Section 395
//level6_10 (level6_10) package { import flash.display.*; public dynamic class level6_10 extends Sprite { } }//package
Section 396
//level6_11 (level6_11) package { import flash.display.*; public dynamic class level6_11 extends Sprite { } }//package
Section 397
//level6_12 (level6_12) package { import flash.display.*; public dynamic class level6_12 extends Sprite { } }//package
Section 398
//level6_13 (level6_13) package { import flash.display.*; public dynamic class level6_13 extends Sprite { } }//package
Section 399
//level6_14 (level6_14) package { import flash.display.*; public dynamic class level6_14 extends Sprite { } }//package
Section 400
//level6_15 (level6_15) package { import flash.display.*; public dynamic class level6_15 extends Sprite { } }//package
Section 401
//level6_16 (level6_16) package { import flash.display.*; public dynamic class level6_16 extends Sprite { } }//package
Section 402
//level6_17 (level6_17) package { import flash.display.*; public dynamic class level6_17 extends Sprite { } }//package
Section 403
//level6_18 (level6_18) package { import flash.display.*; public dynamic class level6_18 extends Sprite { } }//package
Section 404
//level6_19 (level6_19) package { import flash.display.*; public dynamic class level6_19 extends Sprite { } }//package
Section 405
//level6_2 (level6_2) package { import flash.display.*; public dynamic class level6_2 extends Sprite { } }//package
Section 406
//level6_20 (level6_20) package { import flash.display.*; public dynamic class level6_20 extends Sprite { } }//package
Section 407
//level6_21 (level6_21) package { import flash.display.*; public dynamic class level6_21 extends Sprite { } }//package
Section 408
//level6_22 (level6_22) package { import flash.display.*; public dynamic class level6_22 extends Sprite { } }//package
Section 409
//level6_23 (level6_23) package { import flash.display.*; public dynamic class level6_23 extends Sprite { } }//package
Section 410
//level6_24 (level6_24) package { import flash.display.*; public dynamic class level6_24 extends Sprite { } }//package
Section 411
//level6_25 (level6_25) package { import flash.display.*; public dynamic class level6_25 extends Sprite { } }//package
Section 412
//level6_26 (level6_26) package { import flash.display.*; public dynamic class level6_26 extends Sprite { } }//package
Section 413
//level6_27 (level6_27) package { import flash.display.*; public dynamic class level6_27 extends Sprite { } }//package
Section 414
//level6_28 (level6_28) package { import flash.display.*; public dynamic class level6_28 extends Sprite { } }//package
Section 415
//level6_29 (level6_29) package { import flash.display.*; public dynamic class level6_29 extends Sprite { } }//package
Section 416
//level6_3 (level6_3) package { import flash.display.*; public dynamic class level6_3 extends Sprite { } }//package
Section 417
//level6_4 (level6_4) package { import flash.display.*; public dynamic class level6_4 extends Sprite { } }//package
Section 418
//level6_5 (level6_5) package { import flash.display.*; public dynamic class level6_5 extends Sprite { } }//package
Section 419
//level6_6 (level6_6) package { import flash.display.*; public dynamic class level6_6 extends Sprite { } }//package
Section 420
//level6_7 (level6_7) package { import flash.display.*; public dynamic class level6_7 extends Sprite { } }//package
Section 421
//level6_8 (level6_8) package { import flash.display.*; public dynamic class level6_8 extends Sprite { } }//package
Section 422
//level6_9 (level6_9) package { import flash.display.*; public dynamic class level6_9 extends Sprite { } }//package
Section 423
//liftSprite (liftSprite) package { import flash.display.*; public dynamic class liftSprite extends Sprite { } }//package
Section 424
//LocFixSprite (LocFixSprite) package { import flash.display.*; public dynamic class LocFixSprite extends Sprite { } }//package
Section 425
//loopSpriteBack (loopSpriteBack) package { import flash.display.*; public dynamic class loopSpriteBack extends Sprite { } }//package
Section 426
//loopSpriteFront (loopSpriteFront) package { import flash.display.*; public dynamic class loopSpriteFront extends Sprite { } }//package
Section 427
//loweringPlatformWiresSprite (loweringPlatformWiresSprite) package { import flash.display.*; public dynamic class loweringPlatformWiresSprite extends Sprite { } }//package
Section 428
//mainMenuBackground (mainMenuBackground) package { import flash.display.*; public dynamic class mainMenuBackground extends MovieClip { public function mainMenuBackground(){ addFrameScript(37, frame38); } function frame38(){ stop(); } } }//package
Section 429
//mainscreen_music (mainscreen_music) package { import flash.media.*; public dynamic class mainscreen_music extends Sound { } }//package
Section 430
//menu_click_sfx (menu_click_sfx) package { import flash.media.*; public dynamic class menu_click_sfx extends Sound { } }//package
Section 431
//menu_select_sfx (menu_select_sfx) package { import flash.media.*; public dynamic class menu_select_sfx extends Sound { } }//package
Section 432
//ninjaOnBike (ninjaOnBike) package { import flash.display.*; public dynamic class ninjaOnBike extends MovieClip { public var ninjaScarf:MovieClip; } }//package
Section 433
//NinjaStarSprite (NinjaStarSprite) package { import flash.display.*; public dynamic class NinjaStarSprite extends Sprite { } }//package
Section 434
//nitro_exhaust_sfx (nitro_exhaust_sfx) package { import flash.media.*; public dynamic class nitro_exhaust_sfx extends Sound { } }//package
Section 435
//nitro_sfx (nitro_sfx) package { import flash.media.*; public dynamic class nitro_sfx extends Sound { } }//package
Section 436
//NitroNinjas (NitroNinjas) package { import spill.localisation.*; import flash.events.*; import flash.display.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import gs.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import OtherClasses.*; import spill.config.*; import Box2D.*; import flash.media.*; import spill.components.*; import OtherClasses.Buttons.*; public class NitroNinjas extends MovieClip { var livesLeftIndicator:MovieClip; var wheelTwoSensor:b2Body; var pauseMC:MovieClip; var localizedBugResolved:Boolean; var nitroBar:MovieClip; var clockMC:MovieClip; var miniSeconds:int; var rotationCount:int; var previousDegrees:Number; var driveOverObstaclesDef:Array; var lowerBoxNail:b2RevoluteJoint; var scarfStatus:String; var terrainDefinition:XML; var finishFlagMC:MovieClip; var roomState:String;// = "" public var tp:MovieClip; var seconds:int; var moreGamesLink:MovieClip; var maxTorque:Number; var leftSA:b2Body; var wheelOneSensor:b2Body; var presentSpeedCatched:Number; var sensorMotor1:b2RevoluteJoint; var sensorMotor2:b2RevoluteJoint; var gameBackground:Sprite; var tiresWithRampObstacleConstruction:Array; var gameBackgroundRect:Rectangle; var checkpointFlagBody:b2Body; var finishFlagBody:b2Body; var deathCounter:int; var levelIndicator:MovieClip; var secondsTillStart:MovieClip; var tireJunkObstacleConstruction:Array; var previousSpeedCatched:Number;// = 0 var carObstacleConstruction:Array; var submitter:CSubmitter; var lowerBox:b2Body; var nitroMaxTorque:int;// = 120 var rotationTorque:Number; var deathDropSensorsDef:Array; var garbageBagObstacleConstruction:Array; var timeStep:Number;// = 0.00833333333333333 var wheelTorque:Number; var googleAnalitycs:CGoogleAnalitycs; var nitroWheelTorque:int;// = 60 var jumpForce:b2Vec2; var normalMaxTorque:int;// = 70 var rightSA:b2Body; var checkPointFlagMC:MovieClip; var readyForNitro:Boolean; var wheelieCount:int; var degreeCount:Number; var cansWithOilObstacleConstruction:Array; var levelEndStat:String;// = "" var ninjaStarPositions:Array; var degreeCountBegan:Boolean; var clockTimer:Timer; var locFixSprite:Sprite; var normalWheelTorque:int;// = 40 var tricksDoneInAir:int; var levelHasEnded:Boolean; var levelTerrainSprites:Array; public static var failedMusic:Sound; public static var trickChannelPos:Number; public static var mainMenu_IG:MovieClip; public static var ratio:int = 30; public static var nitroChannel:SoundChannel; public static var driveFastSlowLength:int; public static var finishLineX:int; public static var finishLineY:int; public static var driveOverObstaclesArray:Array; public static var sfxButton:MovieClip; public static var oneKey:Boolean; public static var wheelTwoLanded:Boolean; public static var loweringPlatformsCollection:Array; public static var lastCamX:Number; public static var award3Submitted:Boolean; public static var chassis:b2Body; public static var loopToBeManipulated:b2Body; public static var loweringPlatformsJoints:Array; public static var trickChannel:SoundChannel; public static var wheel1:b2Body; public static var wheel2:b2Body; public static var ejectNinja:Boolean; public static var leftPJ:b2PrismaticJoint; public static var engineChannelPos:Number; public static var onTheGround:Boolean; public static var startGame_MM:MovieClip; public static var theEjectedNinja:MovieClip; public static var moreGames_MM:MovieClip; public static var timesTurboUsed:int; public static var frontSprocketSprite:Sprite; public static var theNinjaOnBike:MovieClip; public static var savedScore:int = 0; public static var inGameChannel:SoundChannel; public static var motor1:b2RevoluteJoint; public static var motor2:b2RevoluteJoint; public static var rearSprocketSprite:Sprite; public static var currentMusicPlaying:String; public static var menuClickSFX:Sound; public static var downKey:Boolean; public static var engineChannel:SoundChannel; public static var award5Submitted:Boolean; public static var google1Complete:Boolean = false; public static var twoKey:Boolean; public static var musicIsOn:Boolean = true; public static var ninjaYSpeed:Number; public static var trickThreeSFX:Sound; public static var superBonusSFX:Sound; public static var targetLoweringPlatform:b2Body; public static var loopsOnSecondary:int; public static var chassisSprite:MovieClip; public static var nitroSFX:Sound; public static var score:int; public static var hasHitDriveOverObstacle:Boolean; public static var google3Complete:Boolean = false; public static var scrollingTextEMC:MovieClip; public static var readyGoSFX:Sound; public static var landChannel:SoundChannel; public static var checkPointFlagTwoY:int; public static var rightKey:Boolean; public static var checkPointFlagTwoX:int; public static var localization:CLocalization; public static var landSFX:Sound; public static var menuChannel:SoundChannel; public static var trickFourSFX:Sound; public static var keysEnabled:Boolean; public static var wheelOneLanded:Boolean; public static var soundEffectsST:SoundTransform; public static var blackFader:Sprite; public static var moreGames_PW:MovieClip; public static var smallLoopConstruction:Array; public static var mainMenu_HTP:MovieClip; public static var loopDef:Array; public static var interfaceEMC:Sprite; public static var primaryStepsCollection:Array; public static var endGameBMD:BitmapData; public static var sfxIsOn:Boolean = true; public static var finalStepsCollection:Array; public static var starSFX:Sound; public static var timeBonusPoints:int; public static var currentEngineSound:String; public static var newBikeX:Number; public static var countDownTillFinish:int; public static var allowFinishLineCountDown:Boolean; public static var mainMenuEMC:Sprite; public static var ninjaIsEjecting:Boolean; public static var newBikeY:Number; public static var driveFastSlowSFX:Sound; public static var fallingPlatformDropOnHeadCounter:int; public static var typeOfLoop:String; public static var ninjaStarSpriteArray:Array; public static var leftKey:Boolean; public static var mainMenu_PW:MovieClip; public static var frontShocksSprite:Sprite; public static var levelMusic:Sound; public static var targetLoweringPlatformJoint:b2PrismaticJoint; public static var award2Submitted:Boolean; public static var isPaused:Boolean; public static var crashInitiated:Boolean; public static var qualityButton:MovieClip; public static var rightPJ:b2PrismaticJoint; public static var secondaryStepsCollection:Array; public static var mainMenuBG:MovieClip; public static var howToPlay_MM:MovieClip; public static var wheelTwoSprite:Sprite; public static var nitroChannelPos:Number; public static var prevWheelOnePos:Number; public static var hitDeathDrop:Boolean; public static var sfxButton_PW:MovieClip; public static var nitroInProgress:Boolean; public static var tryAgain_IG:MovieClip; public static var ninjaStarBodyArray:Array; public static var tricksExecuted:int; public static var howToPlayBG:Sprite; public static var timeString:String; public static var loweringPlatformsSprites:Array; public static var restart_IG:MovieClip; public static var menuSelectSFX:Sound; public static var cameFromGame:Boolean; public static var award4Submitted:Boolean; public static var levelWinMusic:Sound; public static var musicST:SoundTransform; public static var nitroPercentage:Number; public static var fourKey:Boolean; public static var isInit:Boolean; public static var htpImageBG:Sprite; public static var crashSFX:Sound; public static var currentTrick:String; public static var starsChannel:SoundChannel; public static var loopsOnEntrance:int; public static var driveSlowFastSFX:Sound; public static var trickHasLooped:Boolean; public static var back_HTP:MovieClip; public static var driveSlowFastLength:int; public static var prevWheelTwoPos:Number; public static var crashSafetyTimer:int; public static var markedForDeath:Boolean; public static var next_HTP:MovieClip; public static var finishFlagIsSet:Boolean; public static var checkPointTwoIsSet:Boolean; public static var loweringPlatformsArray:Array; public static var currentCamX:Number; public static var pauseWindow:Sprite; public static var howToPlay_PW:MovieClip; public static var loopsOnFinal:int; public static var endLevelSprite:Sprite; public static var musicButton_PW:MovieClip; public static var musicChannel:SoundChannel; public static var secondMenuSFX:Sound; public static var wholeLevelHeight:int; public static var loopConstruction:Array; public static var ls:MovieClip; public static var dieIfSpeedOrTimeRequiredIsMet:Boolean; public static var checkPointOneIsSet:Boolean; public static var firstTime:Boolean = true; public static var mainScreenMusic:Sound; public static var theWorld:b2World; public static var gameOverInitiated:Boolean; public static var entranceStepsCollection:Array; public static var scoreMC:MovieClip; public static var trickOneSFX:Sound; public static var livesLeft:int; public static var musicButton:MovieClip; public static var ninjaEjectedHitDeathDrop:Boolean; public static var wheelOneSprite:Sprite; public static var wholeLevelWidth:int; public static var driveFastSFX:Sound; public static var upKey:Boolean; public static var playingTrick:Boolean; public static var gameCompleteMusic:Sound; public static var nextLevel_IG:MovieClip; public static var resumeGameButton:MovieClip; public static var trickTwoSFX:Sound; public static var currentTrickSound:String; public static var moreGames_IG:MovieClip; public static var ninjaXSpeed:Number; public static var nitroExhaustSFX:Sound; public static var threeKey:Boolean; public static var checkPointFlagX:int; public static var checkPointFlagY:int; public static var award1Submitted:Boolean; public static var levelNumber:int; public static var starsCollected:int; public static var qualityButton_PW:MovieClip; public static var google2Complete:Boolean = false; public static var rearShocksSprite:Sprite; public static var ejectedNinjaBody:b2Body; public function NitroNinjas(){ stop(); var _local1 = "teens"; if (_local1 == "hyves"){ tp = new PreloaderBar(); tp.x = 200; tp.y = 216; addChild(tp); } else { if ((((_local1 == "teens")) || ((_local1 == "zapapa")))){ tp = new TempPreloader(); tp.x = 502; tp.y = 222; addChild(tp); }; }; localization = new CLocalization(); addChild(localization); localization.loadIntroBranding(); stage.addEventListener(Event.ENTER_FRAME, runByteTracer); } function normalizeMaxTorque():void{ if (!nitroInProgress){ if (maxTorque > normalMaxTorque){ maxTorque = (maxTorque - 0.25); if (maxTorque < normalMaxTorque){ maxTorque = normalMaxTorque; }; }; if (wheelTorque > normalWheelTorque){ wheelTorque = (wheelTorque - 0.25); if (wheelTorque < normalWheelTorque){ wheelTorque = normalWheelTorque; }; }; }; } function checkIfTimeToRunFinishCounter():void{ if (allowFinishLineCountDown){ countDownTillFinish--; if (countDownTillFinish <= 0){ allowFinishLineCountDown = false; finishTheLevel(); }; }; } public function resumeGameFromHTP():void{ clearHTP(); ls.visible = true; gameBackground.visible = true; interfaceEMC.visible = true; scrollingTextEMC.visible = true; togglePause(); } public function tryAgainLevel():void{ if (nextLevel_IG != null){ nextLevel_IG.kill(); nextLevel_IG = null; }; if (mainMenu_IG != null){ mainMenu_IG.kill(); mainMenu_IG = null; }; if (moreGames_IG != null){ moreGames_IG.kill(); moreGames_IG = null; }; if (tryAgain_IG != null){ tryAgain_IG.kill(); tryAgain_IG = null; }; if (restart_IG != null){ restart_IG.kill(); restart_IG = null; }; while (endLevelSprite.numChildren > 0) { endLevelSprite.removeChild(endLevelSprite.getChildAt(0)); }; removeChild(endLevelSprite); endLevelSprite = null; initGame("repeat"); } function clearMainMenu():void{ mainMenuEMC.removeChild(mainMenuBG); mainMenuBG = null; localization.removeDisplay(mainMenuEMC); startGame_MM.kill(); howToPlay_MM.kill(); moreGames_MM.kill(); qualityButton.kill(); sfxButton.kill(); startGame_MM = null; howToPlay_MM = null; moreGames_MM = null; qualityButton = null; sfxButton = null; } function keyIsDown(_arg1:KeyboardEvent):void{ if (keysEnabled){ switch (_arg1.keyCode){ case 38: reactivatePJMotors(); beginEngineSound("up"); upKey = true; break; case 40: reactivatePJMotors(); beginEngineSound("down"); downKey = true; break; case 37: reactivatePJMotors(); leftKey = true; break; case 39: reactivatePJMotors(); rightKey = true; break; case 32: if (!isPaused){ reactivatePJMotors(); if (((wheelOneLanded) || (wheelTwoLanded))){ chassis.ApplyForce(jumpForce, chassis.GetWorldCenter()); }; }; break; case 49: if (((!(playingTrick)) && (!(onTheGround)))){ oneKey = true; playingTrick = true; currentTrick = "trick1"; theNinjaOnBike.gotoAndPlay(currentTrick); beginTrickSound(currentTrick); }; break; case 50: if (((!(playingTrick)) && (!(onTheGround)))){ twoKey = true; playingTrick = true; currentTrick = "trick2"; theNinjaOnBike.gotoAndPlay(currentTrick); beginTrickSound(currentTrick); }; break; case 51: if (((!(playingTrick)) && (!(onTheGround)))){ threeKey = true; playingTrick = true; currentTrick = "trick3"; theNinjaOnBike.gotoAndPlay(currentTrick); beginTrickSound(currentTrick); }; break; case 52: if (((!(playingTrick)) && (!(onTheGround)))){ fourKey = true; playingTrick = true; currentTrick = "trick4"; theNinjaOnBike.gotoAndPlay(currentTrick); beginTrickSound(currentTrick); }; break; }; }; if (_arg1.keyCode == 80){ togglePause(); }; } function setUpInterfaceElements():void{ var _local3:Class; var _local4:MovieClip; var _local1:Sprite = new backRib(); _local1.x = -16; _local1.y = -3; interfaceEMC.addChild(_local1); levelIndicator = new LevelIndicator(); levelIndicator.update(); levelIndicator.x = 337; levelIndicator.y = 46; interfaceEMC.addChild(levelIndicator); livesLeftIndicator = new LivesLeftIndicator(); livesLeftIndicator.update(); livesLeftIndicator.x = 420; livesLeftIndicator.y = 46; interfaceEMC.addChild(livesLeftIndicator); scoreMC = new ScoreMC(); scoreMC.update(score); scoreMC.x = 426; scoreMC.y = 27; interfaceEMC.addChild(scoreMC); nitroBar = new NitroBar(0); nitroBar.x = 105; nitroBar.y = 481; interfaceEMC.addChild(nitroBar); clockMC = new Clock(); clockMC.update(seconds); clockMC.x = 607; clockMC.y = 36; interfaceEMC.addChild(clockMC); clockTimer.addEventListener(TimerEvent.TIMER, updateClock); pauseMC = new PauseMC(); pauseMC.x = 278; pauseMC.y = 27; pauseMC.gotoAndStop("normal"); interfaceEMC.addChild(pauseMC); pauseMC.buttonMode = true; pauseMC.addEventListener(MouseEvent.CLICK, togglePause); var _local2:Array = [trick1Box, trick2Box, trick3Box, trick4Box]; var _local5 = 28; var _local6:int; while (_local6 < _local2.length) { _local3 = _local2[_local6]; _local4 = new (_local3); _local4.x = _local5; _local4.y = 28; interfaceEMC.addChild(_local4); _local5 = (_local5 + 53); _local6++; }; } function updateCam():void{ var _local1:Number; var _local2:Number; var _local3:Rectangle; var _local4:Number; var _local5:Number; if (!levelHasEnded){ _local1 = MF.mtp(chassis.GetPosition().x); _local2 = MF.mtp(chassis.GetPosition().y); if (((!(hitDeathDrop)) && (!(finishFlagIsSet)))){ _local3 = ls.scrollRect; if (_local1 > 190){ if (!ninjaIsEjecting){ _local3.x = Math.floor((_local1 - 190)); } else { if (((ninjaIsEjecting) && (!(ninjaEjectedHitDeathDrop)))){ _local4 = MF.mtp(ejectedNinjaBody.GetPosition().x); _local3.x = Math.floor((_local4 - 190)); }; }; }; if (!ninjaIsEjecting){ _local3.y = Math.floor((_local2 - 270)); } else { if (((ninjaIsEjecting) && (!(ninjaEjectedHitDeathDrop)))){ _local5 = MF.mtp(ejectedNinjaBody.GetPosition().y); _local3.y = Math.floor((_local5 - 270)); }; }; ls.scrollRect = _local3; }; }; } function setUpGraphics():void{ var _local4:Sprite; var _local5:int; var _local6:Class; var _local7:int; var _local10:Sprite; var _local11:*; var _local12:String; var _local13:Sprite; var _local14:Sprite; var _local1 = -1400; var _local2:int; while (_local2 < 4) { _local10 = new gameBGScrollSprite(); _local10.x = _local1; gameBackground.addChild(_local10); _local1 = (_local1 + 1400); _local2++; }; var _local3:int; var _local8:int; while (_local8 < levelTerrainSprites.length) { if (levelTerrainSprites[_local8][0] != "blank"){ if (levelTerrainSprites[_local8][1] == "single"){ _local6 = levelTerrainSprites[_local8][0]; _local4 = new (_local6); _local4.x = _local3; ls.backgroundEMC.addChild(_local4); _local3 = (_local3 + levelTerrainSprites[_local8][3]); } else { if (levelTerrainSprites[_local8][1] == "loop"){ _local7 = levelTerrainSprites[_local8][2]; _local6 = levelTerrainSprites[_local8][0]; _local5 = 0; while (_local5 < _local7) { _local4 = new (_local6); _local4.x = _local3; ls.backgroundEMC.addChild(_local4); _local3 = (_local3 + levelTerrainSprites[_local8][3]); _local5++; }; }; }; } else { if (levelTerrainSprites[_local8][0] == "blank"){ _local7 = levelTerrainSprites[_local8][2]; _local11 = levelTerrainSprites[_local8][1]; _local5 = 0; while (_local5 < _local7) { _local3 = (_local3 + _local11); _local5++; }; }; }; _local8++; }; wheelOneSprite = new wheelSprite(); wheelOneSprite.x = MF.mtp(wheel1.GetPosition().x); wheelOneSprite.y = MF.mtp(wheel1.GetPosition().y); wheelOneSprite.rotation = MF.toDeg(wheel1.GetAngle()); ls.vehicleEMC.addChild(wheelOneSprite); wheelTwoSprite = new wheelSprite(); wheelTwoSprite.x = MF.mtp(wheel2.GetPosition().x); wheelTwoSprite.y = MF.mtp(wheel2.GetPosition().y); wheelTwoSprite.rotation = MF.toDeg(wheel2.GetAngle()); ls.vehicleEMC.addChild(wheelTwoSprite); frontShocksSprite = new frontShocks(); frontShocksSprite.x = MF.mtp(rightSA.GetPosition().x); frontShocksSprite.y = MF.mtp(rightSA.GetPosition().y); frontShocksSprite.rotation = (MF.toDeg(rightSA.GetAngle()) + MF.toRad(60)); ls.vehicleEMC.addChild(frontShocksSprite); rearShocksSprite = new rearShocks(); rearShocksSprite.x = MF.mtp(leftSA.GetPosition().x); rearShocksSprite.y = MF.mtp(leftSA.GetPosition().y); rearShocksSprite.rotation = (MF.toDeg(leftSA.GetAngle()) + MF.toRad(120)); ls.vehicleEMC.addChild(rearShocksSprite); frontSprocketSprite = new sprocket(); frontSprocketSprite.x = MF.mtp(wheel1.GetPosition().x); frontSprocketSprite.y = MF.mtp(wheel1.GetPosition().y); frontSprocketSprite.rotation = MF.toDeg(wheel1.GetAngle()); ls.vehicleEMC.addChild(frontSprocketSprite); rearSprocketSprite = new sprocket(); rearSprocketSprite.x = MF.mtp(wheel2.GetPosition().x); rearSprocketSprite.y = MF.mtp(wheel2.GetPosition().y); rearSprocketSprite.rotation = MF.toDeg(wheel2.GetAngle()); ls.vehicleEMC.addChild(rearSprocketSprite); chassisSprite = new bikeChassis(); chassisSprite.x = MF.mtp(chassis.GetPosition().x); chassisSprite.y = MF.mtp(chassis.GetPosition().y); chassisSprite.rotation = MF.toDeg(chassis.GetAngle()); chassisSprite.gotoAndStop("fixed"); ls.vehicleEMC.addChild(chassisSprite); theNinjaOnBike = new ninjaOnBike(); theNinjaOnBike.x = MF.mtp(chassis.GetPosition().x); theNinjaOnBike.y = MF.mtp(chassis.GetPosition().y); theNinjaOnBike.rotation = MF.toDeg(chassis.GetAngle()); theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); theNinjaOnBike.gotoAndStop("idle"); ls.vehicleEMC.addChild(theNinjaOnBike); theEjectedNinja = new ejectedNinja(); theEjectedNinja.gotoAndStop("on_bike"); ls.vehicleEMC.addChild(theEjectedNinja); theEjectedNinja.visible = false; var _local9:int; while (_local9 < loopDef.length) { _local12 = loopDef[_local9][2]; switch (_local12){ case "normal": _local13 = new loopSpriteBack(); _local14 = new loopSpriteFront(); break; case "small": _local13 = new smallLoopSpriteBack(); _local14 = new smallLoopSpriteFront(); break; }; _local13.x = loopDef[_local9][0]; _local13.y = (wholeLevelHeight - loopDef[_local9][1]); ls.obstaclesEMC.addChild(_local13); _local14.x = loopDef[_local9][0]; _local14.y = (wholeLevelHeight - loopDef[_local9][1]); ls.cpflEMC.addChild(_local14); _local9++; }; } function htpToMM():void{ clearHTP(); initMainMenu(); } function keyIsUp(_arg1:KeyboardEvent):void{ if (keysEnabled){ switch (_arg1.keyCode){ case 38: endEngineSound("up"); upKey = false; break; case 40: endEngineSound("down"); downKey = false; break; case 37: leftKey = false; break; case 39: rightKey = false; break; case 49: oneKey = false; break; case 50: twoKey = false; break; case 51: threeKey = false; break; case 52: fourKey = false; break; }; }; } function clearAllLoweringPlatforms():void{ var _local1:int; while (_local1 < loweringPlatformsCollection.length) { if (loweringPlatformsCollection[_local1] != null){ theWorld.DestroyBody(loweringPlatformsCollection[_local1]); loweringPlatformsCollection[_local1] = null; }; ls.backgroundEMC.removeChild(loweringPlatformsSprites[_local1]); loweringPlatformsSprites[_local1] = null; _local1++; }; loweringPlatformsCollection = []; loweringPlatformsJoints = []; loweringPlatformsSprites = []; } function checkIfTrickHasEnded():void{ if (((!(crashInitiated)) && (!(hitDeathDrop)))){ if (currentTrick != "trick3"){ if (theNinjaOnBike.currentLabel == (currentTrick + "_loopEnd")){ switch (currentTrick){ case "trick1": if (oneKey){ if (!trickHasLooped){ incrementTricksDoneCount("firstTrick"); trickHasLooped = true; score = (score + 200); displayTrickBox("{msg_trick1}"); incrementTricksExecuted(); } else { if (trickHasLooped){ incrementTricksDoneCount("hasLoopedTrick"); score = (score + 66); }; }; theNinjaOnBike.gotoAndPlay((currentTrick + "_loopStart")); beginTrickSound(currentTrick); } else { if (!oneKey){ if (!trickHasLooped){ incrementTricksDoneCount("firstTrick"); trickHasLooped = true; score = (score + 200); displayTrickBox("{msg_trick1}"); incrementTricksExecuted(); } else { if (trickHasLooped){ incrementTricksDoneCount("hasLoopedTrick"); score = (score + 66); }; }; }; }; break; case "trick2": if (twoKey){ if (!trickHasLooped){ incrementTricksDoneCount("firstTrick"); trickHasLooped = true; score = (score + 200); displayTrickBox("{msg_trick2}"); incrementTricksExecuted(); } else { if (trickHasLooped){ incrementTricksDoneCount("hasLoopedTrick"); score = (score + 66); }; }; theNinjaOnBike.gotoAndPlay((currentTrick + "_loopStart")); beginTrickSound(currentTrick); } else { if (!twoKey){ if (!trickHasLooped){ incrementTricksDoneCount("firstTrick"); trickHasLooped = true; score = (score + 200); displayTrickBox("{msg_trick2}"); incrementTricksExecuted(); } else { if (trickHasLooped){ incrementTricksDoneCount("hasLoopedTrick"); score = (score + 66); }; }; }; }; break; case "trick4": if (fourKey){ if (!trickHasLooped){ incrementTricksDoneCount("firstTrick"); trickHasLooped = true; score = (score + 230); displayTrickBox("{msg_trick4}"); incrementTricksExecuted(); } else { if (trickHasLooped){ incrementTricksDoneCount("hasLoopedTrick"); score = (score + 90); }; }; theNinjaOnBike.gotoAndPlay((currentTrick + "_loopStart")); beginTrickSound(currentTrick); } else { if (!fourKey){ if (!trickHasLooped){ incrementTricksDoneCount("firstTrick"); trickHasLooped = true; score = (score + 230); displayTrickBox("{msg_trick4}"); incrementTricksExecuted(); } else { if (trickHasLooped){ incrementTricksDoneCount("hasLoopedTrick"); score = (score + 90); }; }; }; }; break; }; scoreMC.update(score); }; if (theNinjaOnBike.currentLabel == (currentTrick + "_end")){ theNinjaOnBike.gotoAndStop("idle"); playingTrick = false; currentTrick = ""; trickHasLooped = false; trickChannel = null; }; } else { if (currentTrick == "trick3"){ if (theNinjaOnBike.currentLabel == (currentTrick + "_end")){ if (threeKey){ incrementTricksDoneCount("firstTrick"); score = (score + 250); theNinjaOnBike.gotoAndPlay(currentTrick); beginTrickSound(currentTrick); incrementTricksExecuted(); } else { if (!threeKey){ theNinjaOnBike.gotoAndStop("idle"); playingTrick = false; incrementTricksDoneCount("firstTrick"); currentTrick = ""; trickHasLooped = false; }; }; displayTrickBox("{msg_trick3}"); trickChannel = null; }; }; }; }; } function checkIfBonusShouldBeDisplayed():void{ if (tricksDoneInAir == 3){ tricksDoneInAir = 0; initiateBonus(); }; } function initSounds():void{ menuSelectSFX = new menu_select_sfx(); menuClickSFX = new menu_click_sfx(); secondMenuSFX = new second_menu_sfx(); readyGoSFX = new ready_go(); starSFX = new star_sfx(); landSFX = new land_sfx(); crashSFX = new crash_sfx(); driveSlowFastSFX = new drive_slow_fast_sfx(); driveFastSFX = new drive_fast_sfx(); driveFastSlowSFX = new drive_fast_slow_sfx(); trickOneSFX = new slice_sfx(); trickTwoSFX = new woosh1_sfx(); trickThreeSFX = new woosh2_sfx(); trickFourSFX = new trick4_sfx(); nitroSFX = new nitro_sfx(); nitroExhaustSFX = new nitro_exhaust_sfx(); superBonusSFX = new super_bonus_sfx(); mainScreenMusic = new mainscreen_music(); levelMusic = new level_music(); failedMusic = new failed_music(); levelWinMusic = new level_win_music(); gameCompleteMusic = new game_complete_music(); driveSlowFastLength = driveSlowFastSFX.length; driveFastSlowLength = driveFastSlowSFX.length; musicST = new SoundTransform(1, 0); soundEffectsST = new SoundTransform(1, 0); } function updateScarfSway(_arg1):void{ var _local2:Number; var _local3:Number; var _local4:Number; _local3 = Math.round(_arg1); _local4 = 1700; if (theNinjaOnBike.currentLabel == "idle"){ if (_local3 < 0){ _local3 = 0; }; _local2 = (_local3 / _local4); theNinjaOnBike.ninjaScarf.ninjaScarfInner.rotation = Math.round((_local2 * 40)); if (_local2 < 0.07){ if (scarfStatus != "idle"){ scarfStatus = "idle"; theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); }; } else { if (_local2 <= 0.33){ if (scarfStatus != "slowSpeed"){ scarfStatus = "slowSpeed"; theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); }; } else { if (_local2 <= 0.66){ if (scarfStatus != "midSpeed"){ scarfStatus = "midSpeed"; theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); }; } else { if (_local2 <= 1){ if (scarfStatus != "highSpeed"){ scarfStatus = "highSpeed"; theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); }; }; }; }; }; if (theNinjaOnBike.ninjaScarf.ninjaScarfInner.currentLabel == (scarfStatus + "_end")){ theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); }; }; } function setUpCheckPointAndFinishLine():void{ var _local1:int; var _local2:int; var _local3:String; var _local10:int; var _local4:b2PolygonDef = new b2PolygonDef(); _local4.SetAsBox(MF.ptm(8), MF.ptm(1000)); _local4.density = 0; _local4.isSensor = true; var _local5:b2BodyDef = new b2BodyDef(); var _local6:int; while (_local6 < 2) { switch (_local6){ case 0: _local1 = checkPointFlagX; _local2 = checkPointFlagY; _local3 = "CheckPointFlagOne"; break; case 1: _local1 = checkPointFlagTwoX; _local2 = checkPointFlagTwoY; _local3 = "CheckPointFlagTwo"; }; _local10 = (wholeLevelHeight - _local2); _local5.position.Set(MF.ptm(_local1), MF.ptm((_local10 - 1000))); checkpointFlagBody = theWorld.CreateBody(_local5); checkpointFlagBody.CreateShape(_local4); checkpointFlagBody.SetMassFromShapes(); checkpointFlagBody.SetUserData(_local3); checkPointFlagMC = new CheckPointFlagMC(); checkPointFlagMC.x = _local1; checkPointFlagMC.y = (_local10 - 50); ls.cpflEMC.addChild(checkPointFlagMC); checkPointFlagMC = null; _local6++; }; var _local7:b2PolygonDef = new b2PolygonDef(); _local7.SetAsBox(MF.ptm(8), MF.ptm(1000)); _local7.density = 0; _local7.isSensor = true; var _local8:b2BodyDef = new b2BodyDef(); var _local9:int = (wholeLevelHeight - finishLineY); _local8.position.Set(MF.ptm(finishLineX), MF.ptm((_local9 - 1000))); finishFlagBody = theWorld.CreateBody(_local8); finishFlagBody.CreateShape(_local7); finishFlagBody.SetMassFromShapes(); finishFlagBody.SetUserData("FinishFlag"); finishFlagMC = new FinishFlagMC(); finishFlagMC.x = finishLineX; finishFlagMC.y = _local9; finishFlagMC.gotoAndStop("startFrame"); ls.cpflEMC.addChild(finishFlagMC); finishFlagMC.play(); } function setUpLoopPart(_arg1):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:b2BodyDef; var _local8:String; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:b2PolygonDef; var _local15:b2Body; if (_arg1 == "secondary"){ _local4 = secondaryStepsCollection.indexOf(loopToBeManipulated); _local5 = loopDef[_local4][0]; _local6 = (wholeLevelHeight - loopDef[_local4][1]); _local7 = new b2BodyDef(); _local7.position.Set(MF.ptm(_local5), MF.ptm(_local6)); _local15 = theWorld.CreateBody(_local7); if (typeOfLoop == "normal"){ _local3 = 0; while (_local3 < loopConstruction.length) { _local8 = loopConstruction[_local3][0]; _local9 = loopConstruction[_local3][1]; _local10 = loopConstruction[_local3][2]; _local11 = loopConstruction[_local3][3]; _local12 = loopConstruction[_local3][4]; _local13 = loopConstruction[_local3][5]; _local14 = new b2PolygonDef(); _local14.SetAsOrientedBox(MF.ptm(_local11), MF.ptm(_local12), new b2Vec2(MF.ptm(_local9), MF.ptm(_local10)), MF.toRad(_local13)); _local14.density = 0; _local14.friction = 3; _local14.restitution = 0; if (_local8 == "FinalSteps"){ _local14.isSensor = false; _local15.CreateShape(_local14); }; _local3++; }; } else { if (typeOfLoop == "small"){ _local3 = 0; while (_local3 < smallLoopConstruction.length) { _local8 = smallLoopConstruction[_local3][0]; _local9 = smallLoopConstruction[_local3][1]; _local10 = smallLoopConstruction[_local3][2]; _local11 = smallLoopConstruction[_local3][3]; _local12 = smallLoopConstruction[_local3][4]; _local13 = smallLoopConstruction[_local3][5]; _local14 = new b2PolygonDef(); _local14.SetAsOrientedBox(MF.ptm(_local11), MF.ptm(_local12), new b2Vec2(MF.ptm(_local9), MF.ptm(_local10)), MF.toRad(_local13)); _local14.density = 0; _local14.friction = 3; _local14.restitution = 0; if (_local8 == "FinalStepsSmall"){ _local14.isSensor = false; _local15.CreateShape(_local14); }; _local3++; }; }; }; _local15.SetMassFromShapes(); if (typeOfLoop == "normal"){ _local15.SetUserData("FinalSteps"); } else { if (typeOfLoop == "small"){ _local15.SetUserData("FinalStepsSmall"); }; }; if (finalStepsCollection[_local4] != null){ theWorld.DestroyBody(finalStepsCollection[_local4]); }; finalStepsCollection[_local4] = _local15; }; if (_arg1 == "final"){ if (loopsOnEntrance != -1){ loopsOnEntrance = -1; }; _local4 = finalStepsCollection.indexOf(loopToBeManipulated); if (primaryStepsCollection[_local4] != null){ theWorld.DestroyBody(primaryStepsCollection[_local4]); primaryStepsCollection[_local4] = null; }; maxTorque = nitroMaxTorque; wheelTorque = nitroWheelTorque; }; if (_arg1 == "entrance"){ loopsOnSecondary = -1; loopsOnFinal = -1; }; } function setUpNinjaStars():void{ var _local2:int; var _local3:int; var _local4:Number; var _local5:b2CircleDef; var _local6:b2BodyDef; var _local7:b2Body; var _local8:Sprite; var _local1:int; while (_local1 < ninjaStarPositions.length) { _local2 = ninjaStarPositions[_local1][0]; _local3 = (wholeLevelHeight - ninjaStarPositions[_local1][1]); _local4 = Math.round((Math.random() * 360)); _local5 = new b2CircleDef(); _local5.radius = MF.ptm(15); _local5.density = 0; _local5.isSensor = true; _local6 = new b2BodyDef(); _local6.position.Set(MF.ptm(_local2), MF.ptm(_local3)); _local7 = theWorld.CreateBody(_local6); _local7.CreateShape(_local5); _local7.SetUserData("NinjaStar"); _local7.SetMassFromShapes(); _local7.PutToSleep(); ninjaStarBodyArray.push(_local7); _local8 = new NinjaStarSprite(); _local8.x = _local2; _local8.y = _local3; _local8.rotation = _local4; ls.ninjaStarsEMC.addChild(_local8); ninjaStarSpriteArray.push(_local8); _local1++; }; } function incrementTricksExecuted():void{ tricksExecuted++; } public function proceedToNextLevel():void{ if (levelNumber < 6){ levelNumber = (levelNumber + 1); if (nextLevel_IG != null){ nextLevel_IG.kill(); nextLevel_IG = null; }; if (mainMenu_IG != null){ mainMenu_IG.kill(); mainMenu_IG = null; }; if (moreGames_IG != null){ moreGames_IG.kill(); moreGames_IG = null; }; if (tryAgain_IG != null){ tryAgain_IG.kill(); tryAgain_IG = null; }; if (restart_IG != null){ restart_IG.kill(); restart_IG = null; }; while (endLevelSprite.numChildren > 0) { endLevelSprite.removeChild(endLevelSprite.getChildAt(0)); }; removeChild(endLevelSprite); endLevelSprite = null; initGame("nextlevel"); }; } function updateNitroBarLength():void{ if (nitroBar != null){ nitroBar.updateBarLength(nitroPercentage); }; } function checkIfReadyToEjectNinja():void{ var _local1:b2PolygonDef; var _local2:b2BodyDef; var _local3:Number; var _local4:Number; if (ejectNinja){ ejectNinja = false; theNinjaOnBike.alpha = 0; _local1 = new b2PolygonDef(); _local1.SetAsBox(MF.ptm(35), MF.ptm(35)); _local1.density = 0.1; _local1.friction = 5; _local1.restitution = 0; _local1.filter.groupIndex = -1; _local2 = new b2BodyDef(); _local2.position.Set(MF.ptm(theNinjaOnBike.x), MF.ptm(theNinjaOnBike.y)); ejectedNinjaBody = theWorld.CreateBody(_local2); ejectedNinjaBody.CreateShape(_local1); ejectedNinjaBody.SetMassFromShapes(); ejectedNinjaBody.SetAngularDamping(50); ejectedNinjaBody.SetUserData("EjectedNinja"); theEjectedNinja.visible = true; theEjectedNinja.x = MF.ptm(ejectedNinjaBody.GetPosition().x); theEjectedNinja.y = MF.ptm(ejectedNinjaBody.GetPosition().y); theEjectedNinja.rotation = chassisSprite.rotation; _local3 = ((Math.random() * -400) + 200); _local4 = ((Math.random() * -200) + -900); ejectedNinjaBody.ApplyForce(new b2Vec2(_local3, _local4), ejectedNinjaBody.GetWorldCenter()); ninjaIsEjecting = true; }; } function destroyAllNinjaStars():void{ var _local1:int; _local1 = 0; while (_local1 < ninjaStarBodyArray.length) { theWorld.DestroyBody(ninjaStarBodyArray[_local1]); _local1++; }; while (ls.ninjaStarsEMC.numChildren > 0) { ls.ninjaStarsEMC.removeChildAt(0); }; ninjaStarBodyArray = []; ninjaStarBodyArray = null; ninjaStarSpriteArray = []; ninjaStarSpriteArray = null; } public function restartGame():void{ resetLevelNumber(); savedScore = 0; if (nextLevel_IG != null){ nextLevel_IG.kill(); nextLevel_IG = null; }; if (mainMenu_IG != null){ mainMenu_IG.kill(); mainMenu_IG = null; }; if (moreGames_IG != null){ moreGames_IG.kill(); moreGames_IG = null; }; if (tryAgain_IG != null){ tryAgain_IG.kill(); tryAgain_IG = null; }; if (restart_IG != null){ restart_IG.kill(); restart_IG = null; }; while (endLevelSprite.numChildren > 0) { endLevelSprite.removeChild(endLevelSprite.getChildAt(0)); }; removeChild(endLevelSprite); endLevelSprite = null; initGame("new"); } function listenForLoopUpdates():void{ if (loopsOnSecondary == 0){ loopsOnSecondary = 1; setUpLoopPart("secondary"); }; if (loopsOnFinal == 0){ loopsOnFinal = 1; setUpLoopPart("final"); }; if (loopsOnEntrance == 0){ loopsOnEntrance = 1; setUpLoopPart("entrance"); }; } function mmToHTP():void{ clearMainMenu(); initHowToPlay(); } function setUpPrimaryLoops():void{ var _local1:int; var _local2:int; var _local3:b2Body; var _local4:int; var _local5:int; var _local6:b2BodyDef; var _local7:b2Body; var _local8:b2Body; var _local9:b2Body; var _local10:String; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:b2PolygonDef; var _local17:b2Body; if (primaryStepsCollection.length > 0){ _local1 = 0; while (_local1 < primaryStepsCollection.length) { _local3 = primaryStepsCollection[_local1]; if (_local3 != null){ theWorld.DestroyBody(_local3); }; _local1++; }; primaryStepsCollection = []; }; if (secondaryStepsCollection.length > 0){ _local1 = 0; while (_local1 < secondaryStepsCollection.length) { _local3 = secondaryStepsCollection[_local1]; if (_local3 != null){ theWorld.DestroyBody(_local3); }; _local1++; }; secondaryStepsCollection = []; }; if (finalStepsCollection.length > 0){ _local1 = 0; while (_local1 < finalStepsCollection.length) { _local3 = finalStepsCollection[_local1]; if (_local3 != null){ theWorld.DestroyBody(_local3); }; _local1++; }; finalStepsCollection = []; }; if (entranceStepsCollection.length > 0){ _local1 = 0; while (_local1 < entranceStepsCollection.length) { _local3 = entranceStepsCollection[_local1]; if (_local3 != null){ theWorld.DestroyBody(_local3); }; _local1++; }; entranceStepsCollection = []; }; _local3 = null; loopsOnSecondary = -1; loopsOnFinal = -1; loopsOnEntrance = -1; _local1 = 0; while (_local1 < loopDef.length) { _local4 = loopDef[_local1][0]; _local5 = (wholeLevelHeight - loopDef[_local1][1]); typeOfLoop = loopDef[_local1][2]; _local6 = new b2BodyDef(); _local6.position.Set(MF.ptm(_local4), MF.ptm(_local5)); _local7 = theWorld.CreateBody(_local6); _local8 = theWorld.CreateBody(_local6); _local9 = theWorld.CreateBody(_local6); if (typeOfLoop == "normal"){ _local2 = 0; while (_local2 < loopConstruction.length) { _local10 = loopConstruction[_local2][0]; _local11 = loopConstruction[_local2][1]; _local12 = loopConstruction[_local2][2]; _local13 = loopConstruction[_local2][3]; _local14 = loopConstruction[_local2][4]; _local15 = loopConstruction[_local2][5]; _local16 = new b2PolygonDef(); _local16.SetAsOrientedBox(MF.ptm(_local13), MF.ptm(_local14), new b2Vec2(MF.ptm(_local11), MF.ptm(_local12)), MF.toRad(_local15)); _local16.density = 0; _local16.friction = 3; _local16.restitution = 0; if (_local10 == "PrimarySteps"){ _local16.isSensor = false; _local7.CreateShape(_local16); } else { if (_local10 == "SecondarySteps"){ _local16.isSensor = false; _local8.CreateShape(_local16); } else { if (_local10 == "EntranceSteps"){ _local16.isSensor = true; _local9.CreateShape(_local16); }; }; }; _local2++; }; } else { if (typeOfLoop == "small"){ _local2 = 0; while (_local2 < smallLoopConstruction.length) { _local10 = smallLoopConstruction[_local2][0]; _local11 = smallLoopConstruction[_local2][1]; _local12 = smallLoopConstruction[_local2][2]; _local13 = smallLoopConstruction[_local2][3]; _local14 = smallLoopConstruction[_local2][4]; _local15 = smallLoopConstruction[_local2][5]; _local16 = new b2PolygonDef(); _local16.SetAsOrientedBox(MF.ptm(_local13), MF.ptm(_local14), new b2Vec2(MF.ptm(_local11), MF.ptm(_local12)), MF.toRad(_local15)); _local16.density = 0; _local16.friction = 3; _local16.restitution = 0; if (_local10 == "PrimaryStepsSmall"){ _local16.isSensor = false; _local7.CreateShape(_local16); } else { if (_local10 == "SecondaryStepsSmall"){ _local16.isSensor = false; _local8.CreateShape(_local16); } else { if (_local10 == "EntranceStepsSmall"){ _local16.isSensor = true; _local9.CreateShape(_local16); }; }; }; _local2++; }; }; }; if (typeOfLoop == "normal"){ _local7.SetMassFromShapes(); _local7.SetUserData("PrimarySteps"); primaryStepsCollection.push(_local7); _local8.SetMassFromShapes(); _local8.SetUserData("SecondarySteps"); secondaryStepsCollection.push(_local8); _local9.SetMassFromShapes(); _local9.SetUserData("EntranceSteps"); entranceStepsCollection.push(_local9); } else { if (typeOfLoop == "small"){ _local7.SetMassFromShapes(); _local7.SetUserData("PrimaryStepsSmall"); primaryStepsCollection.push(_local7); _local8.SetMassFromShapes(); _local8.SetUserData("SecondaryStepsSmall"); secondaryStepsCollection.push(_local8); _local9.SetMassFromShapes(); _local9.SetUserData("EntranceStepsSmall"); entranceStepsCollection.push(_local9); }; }; finalStepsCollection.push(_local17); _local1++; }; } function setUpPauseWindow():void{ pauseWindow = new pauseWindowSprite(); addChild(pauseWindow); pauseWindow.mouseEnabled = false; pauseWindow.visible = false; resumeGameButton = new ResumeGame_IG(this); resumeGameButton.x = 351; resumeGameButton.y = 172; addChild(resumeGameButton); resumeGameButton.buttonMode = true; resumeGameButton.visible = false; howToPlay_PW = new HowToPlay_PW(this); howToPlay_PW.x = 351; howToPlay_PW.y = 231; addChild(howToPlay_PW); howToPlay_PW.buttonMode = true; howToPlay_PW.visible = false; mainMenu_PW = new MainMenu_PW(this); mainMenu_PW.x = 351; mainMenu_PW.y = 291; addChild(mainMenu_PW); mainMenu_PW.buttonMode = true; mainMenu_PW.visible = false; moreGames_PW = new MoreGames_PW(this); moreGames_PW.x = 351; moreGames_PW.y = 366; addChild(moreGames_PW); moreGames_PW.buttonMode = true; moreGames_PW.visible = false; qualityButton_PW = new StageQualityButton(this); qualityButton_PW.x = 386; qualityButton_PW.y = 126; addChild(qualityButton_PW); qualityButton_PW.buttonMode = true; qualityButton_PW.visible = false; sfxButton_PW = new SoundEffectsButton(this); sfxButton_PW.x = 350; sfxButton_PW.y = 126; if (sfxIsOn){ sfxButton_PW.gotoAndStop("sfxOn"); } else { if (!sfxIsOn){ sfxButton_PW.gotoAndStop("sfxOff"); }; }; addChild(sfxButton_PW); sfxButton_PW.buttonMode = true; sfxButton_PW.visible = false; musicButton_PW = new MusicButton(this); musicButton_PW.x = 316; musicButton_PW.y = 126; if (musicIsOn){ musicButton_PW.gotoAndStop("musicOn"); } else { if (!musicIsOn){ musicButton_PW.gotoAndStop("musicOff"); }; }; addChild(musicButton_PW); musicButton_PW.buttonMode = true; musicButton_PW.visible = false; } function respawnFromDeathDrop():void{ var _local1:TweenMax = new TweenMax(chassisSprite, 0, {removeTint:true}); var _local2:TweenMax = new TweenMax(theNinjaOnBike, 0, {removeTint:true}); var _local3:TweenMax = new TweenMax(wheelOneSprite, 0, {removeTint:true}); var _local4:TweenMax = new TweenMax(wheelTwoSprite, 0, {removeTint:true}); var _local5:TweenMax = new TweenMax(frontShocksSprite, 0, {removeTint:true}); var _local6:TweenMax = new TweenMax(rearShocksSprite, 0, {removeTint:true}); var _local7:TweenMax = new TweenMax(frontSprocketSprite, 0, {removeTint:true}); var _local8:TweenMax = new TweenMax(rearSprocketSprite, 0, {removeTint:true}); fallingPlatformDropOnHeadCounter = 0; livesLeft--; if (livesLeft > -1){ reSpawn(); } else { if (livesLeft == -1){ levelEnded("GameOver"); }; }; dieIfSpeedOrTimeRequiredIsMet = false; } function destroyEntireBike():void{ theWorld.DestroyJoint(rightPJ); theWorld.DestroyJoint(leftPJ); theWorld.DestroyJoint(motor1); theWorld.DestroyJoint(motor2); theWorld.DestroyJoint(sensorMotor1); theWorld.DestroyJoint(sensorMotor2); theWorld.DestroyJoint(lowerBoxNail); theWorld.DestroyBody(chassis); theWorld.DestroyBody(lowerBox); theWorld.DestroyBody(rightSA); theWorld.DestroyBody(leftSA); theWorld.DestroyBody(wheel1); theWorld.DestroyBody(wheel2); theWorld.DestroyBody(wheelOneSensor); theWorld.DestroyBody(wheelTwoSensor); chassis = null; lowerBox = null; rightSA = null; leftSA = null; wheel1 = null; wheel2 = null; rightPJ = null; leftPJ = null; motor1 = null; motor2 = null; sensorMotor1 = null; sensorMotor2 = null; lowerBoxNail = null; } function incrementDegreeCount():void{ var _local1:Boolean; var _local4:String; var _local2:Number = MF.toDeg(chassis.GetAngle()); degreeCount = (degreeCount + (_local2 - previousDegrees)); previousDegrees = _local2; if (degreeCount < 0){ _local1 = false; } else { _local1 = true; }; var _local3:Number = Math.abs(degreeCount); if (((!(crashInitiated)) && (!(hitDeathDrop)))){ if (_local3 >= 320){ rotationCount++; incrementTricksDoneCount("rotation"); score = (score + 200); scoreMC.update(score); incrementTricksExecuted(); _local4 = String((rotationCount * 360)); if (_local1){ displayTrickBox(_local4); } else { displayTrickBox(("Backflip " + _local4)); }; degreeCount = 0; }; }; } function clearInGameItems(_arg1):void{ var _local2:b2Body; var _local3:Bitmap; levelHasEnded = true; if (_arg1 == "endgame"){ if (blackFader.alpha != 0){ blackFader.alpha = 0; }; endGameBMD = new BitmapData(700, 510, false); endGameBMD.draw(stage); _local3 = new Bitmap(endGameBMD); }; stage.removeEventListener(Event.ENTER_FRAME, update); stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyIsDown); stage.removeEventListener(KeyboardEvent.KEY_UP, keyIsUp); clearAllLoweringPlatforms(); destroyAllNinjaStars(); while ((_local2 = theWorld.GetBodyList())) { theWorld.DestroyBody(_local2); }; clockTimer.stop(); clockTimer.removeEventListener(TimerEvent.TIMER, updateClock); clockTimer = null; deactivateAllKeys(); theWorld = null; while (gameBackground.numChildren > 0) { gameBackground.removeChild(gameBackground.getChildAt(0)); }; removeChild(gameBackground); gameBackground = null; removeChild(interfaceEMC); interfaceEMC = null; while (scrollingTextEMC.numChildren > 0) { (scrollingTextEMC.getChildAt(0) as TrickText).removeTT(); }; removeChild(scrollingTextEMC); scrollingTextEMC = null; while (ls.exhaustEMC.numChildren > 0) { ls.exhaustEMC.getChildAt(0).removeOE(); }; removeChild(ls); ls = null; removeChild(pauseWindow); pauseWindow = null; resumeGameButton.kill(); resumeGameButton = null; howToPlay_PW.kill(); howToPlay_PW = null; mainMenu_PW.kill(); mainMenu_PW = null; moreGames_PW.kill(); moreGames_PW = null; qualityButton_PW.kill(); qualityButton_PW = null; sfxButton_PW.kill(); sfxButton_PW = null; musicButton_PW.kill(); musicButton_PW = null; removeChild(blackFader); blackFader = null; chassisSprite = null; theNinjaOnBike = null; wheelOneSprite = null; wheelTwoSprite = null; frontShocksSprite = null; rearShocksSprite = null; frontSprocketSprite = null; rearSprocketSprite = null; theNinjaOnBike = null; checkPointFlagMC = null; finishFlagMC = null; driveOverObstaclesArray = null; ninjaStarSpriteArray = null; scoreMC = null; nitroBar = null; clockMC = null; pauseMC = null; if (engineChannel != null){ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel.stop(); engineChannel = null; engineChannelPos = 0; }; if (trickChannel != null){ trickChannel.stop(); trickChannel = null; trickChannelPos = 0; }; if (nitroChannel != null){ nitroChannel.stop(); nitroChannel = null; nitroChannelPos = 0; }; endLevelSprite = new Sprite(); addChild(endLevelSprite); if (_arg1 == "endgame"){ endLevelSprite.addChild(_local3); }; } public function activateAllKeys():void{ keysEnabled = true; } function updateClock(_arg1:TimerEvent):void{ seconds--; clockMC.update(seconds); if (timeBonusPoints > 0){ timeBonusPoints = (timeBonusPoints - 60); if (timeBonusPoints < 0){ timeBonusPoints = 0; }; }; } function update(_arg1:Event):void{ var _local2:int; while (_local2 < 4) { theWorld.Step(timeStep, 10, 10); _local2++; }; ninjaXSpeed = MF.mtp(chassis.GetLinearVelocity().x); ninjaYSpeed = MF.mtp(chassis.GetLinearVelocity().y); updateSpritePositions(); updateVehicleMovement(); listenForLoopUpdates(); updateScarfSway(ninjaXSpeed); dampenIdleWheelMovement(ninjaXSpeed, ninjaYSpeed); checkIfDoingWheelie(); normalizeMaxTorque(); checkIfNeedToReleaseOrangeExhaust(); checkIfOffTheGround(); checkIfTrickHasEnded(); checkIfTimeToReactToCrash(); checkIfBonusShouldBeDisplayed(); checkIfOutOfTime(); checkIfFinishFlagHasBeenHit(); checkIfTimeToRunFinishCounter(); checkIfReadyToEjectNinja(); updateStatusOfEjectedNinja(); updateNitroBarLength(); updateLoweringPlatformSprites(); checkIfMarkedForDeath(); updateCam(); updateBackgroundCamera(); checkIfNeedToSubmitAwards(); } function mmToGame():void{ clearMainMenu(); removeBlackFaderAndProceedToGame(); } function checkIfTimeToReactToCrash():void{ var _local1:TweenMax; var _local2:TweenMax; if (dieIfSpeedOrTimeRequiredIsMet){ if (((hitDeathDrop) && (!(crashInitiated)))){ if (deathCounter < 15){ deathCounter++; } else { if (deathCounter >= 15){ deathCounter = 0; _local1 = new TweenMax(blackFader, 0.5, {alpha:1, onComplete:respawnFromDeathDrop}); }; }; } else { if (crashInitiated){ if (deathCounter < 58){ deathCounter++; } else { if (deathCounter >= 58){ deathCounter = 0; if (dieIfSpeedOrTimeRequiredIsMet){ _local2 = new TweenMax(blackFader, 0.5, {alpha:1, onComplete:respawnFromCrash}); }; }; }; }; }; }; } function updateBackgroundCamera():void{ var _local1:Number; var _local2:Rectangle; var _local3:*; if (((!(levelHasEnded)) && (!(finishFlagIsSet)))){ if (!ninjaIsEjecting){ _local1 = (ninjaXSpeed / 700); _local2 = gameBackgroundRect; _local2.x = (_local2.x + _local1); } else { if (((ninjaIsEjecting) && (!(ninjaEjectedHitDeathDrop)))){ _local3 = MF.mtp(ejectedNinjaBody.GetLinearVelocity().x); _local1 = (_local3 / 700); _local2 = gameBackgroundRect; _local2.x = (_local2.x + _local1); }; }; if (_local2 != null){ currentCamX = _local2.x; gameBackground.scrollRect = _local2; }; }; } function setUpWorld():void{ var _local1:b2AABB = new b2AABB(); _local1.lowerBound.Set(MF.ptm(0), MF.ptm(-10000)); _local1.upperBound.Set(MF.ptm(70000), MF.ptm(4000)); var _local2:b2Vec2 = new b2Vec2(0, 20); theWorld = new b2World(_local1, _local2, true); theWorld.SetContactListener(new NitroNinjasCL()); } public function displayHowToPlayWithinGame():void{ ls.visible = false; gameBackground.visible = false; interfaceEMC.visible = false; scrollingTextEMC.visible = false; pauseWindow.visible = false; resumeGameButton.visible = false; howToPlay_PW.visible = false; mainMenu_PW.visible = false; moreGames_PW.visible = false; qualityButton_PW.visible = false; sfxButton_PW.visible = false; musicButton_PW.visible = false; initHowToPlay(); } function otherKeyIsDown(_arg1:KeyboardEvent):void{ if ((((_arg1.keyCode == 32)) && (!((roomState == "InGame"))))){ switch (roomState){ case "MainMenu": if (firstTime){ if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); manipulateBlackFader("MM_TO_HTP"); } else { if (!firstTime){ if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); manipulateBlackFader("MM_TO_GAME"); }; }; break; case "HowToPlay": if (firstTime){ firstTime = false; }; if (!cameFromGame){ if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); manipulateBlackFader("HTP_TO_GAME"); } else { if (cameFromGame){ if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); resumeGameFromHTP(); }; }; break; case "LevelEnd": switch (levelEndStat){ case "TimesUp": if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); tryAgainLevel(); break; case "GameOver": if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); restartGame(); break; case "LevelComplete": if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); proceedToNextLevel(); break; case "GameComplete": if (menuChannel != null){ menuChannel.stop(); }; menuChannel = menuClickSFX.play(0, 0, soundEffectsST); restartGame(); break; }; break; case "PauseWindow": if (isPaused){ togglePause(); }; break; }; }; } function createBike():void{ var _local10:Number; var _local11:Number; var _local14:Number; var _local15:Number; var _local1 = 29; var _local2 = 15; var _local3:b2BodyDef = new b2BodyDef(); _local3.position.Set(MF.ptm(newBikeX), MF.ptm(newBikeY)); var _local4:b2PolygonDef = new b2PolygonDef(); _local4.SetAsBox(MF.ptm(38), MF.ptm(7)); _local4.density = 0.25; _local4.friction = 1; _local4.restitution = 0; _local4.filter.groupIndex = -1; chassis = theWorld.CreateBody(_local3); chassis.CreateShape(_local4); _local4.SetAsOrientedBox(MF.ptm(47), MF.ptm(5), new b2Vec2(MF.ptm(-5), 0), 0); _local4.density = 0.01; chassis.CreateShape(_local4); _local4.density = 0.25; _local4.SetAsOrientedBox(MF.ptm(13), MF.ptm(3), new b2Vec2(MF.ptm(_local1), MF.ptm(_local2)), MF.toRad(60)); chassis.CreateShape(_local4); _local4.SetAsOrientedBox(MF.ptm(13), MF.ptm(3), new b2Vec2(MF.ptm(-(_local1)), MF.ptm(_local2)), MF.toRad(120)); chassis.CreateShape(_local4); chassis.SetMassFromShapes(); chassis.AllowSleeping(false); chassis.SetAngularDamping(11); chassis.SetUserData("Chassis"); _local4.SetAsOrientedBox(MF.ptm(20), MF.ptm(15), new b2Vec2(0, MF.ptm(20)), 0); _local4.density = 0.0001; _local4.filter.groupIndex = -1; var _local5:b2BodyDef = new b2BodyDef(); _local5.position.Set(MF.ptm(newBikeX), MF.ptm(newBikeY)); lowerBox = theWorld.CreateBody(_local5); lowerBox.CreateShape(_local4); lowerBox.SetMassFromShapes(); lowerBox.SetUserData("LowerBox"); var _local6:b2RevoluteJointDef = new b2RevoluteJointDef(); _local6.Initialize(chassis, lowerBox, chassis.GetWorldCenter()); _local6.lowerAngle = 0; _local6.upperAngle = 0; _local6.enableLimit = true; lowerBoxNail = (theWorld.CreateJoint(_local6) as b2RevoluteJoint); var _local7:Number = MF.toRad(60); var _local8:Number = MF.toRad(120); var _local9 = 15; var _local12:b2PolygonDef = new b2PolygonDef(); _local12.SetAsBox(MF.ptm(10), MF.ptm(3)); _local12.density = 0.3; _local12.friction = 1; _local12.restitution = 0; _local12.filter.groupIndex = -1; _local10 = (Math.cos(_local7) * _local9); _local11 = (Math.sin(_local7) * _local9); var _local13:b2BodyDef = new b2BodyDef(); _local13.position.Set(MF.ptm(((newBikeX + _local1) + _local10)), MF.ptm(((newBikeY + _local2) + _local11))); _local13.angle = _local7; rightSA = theWorld.CreateBody(_local13); rightSA.CreateShape(_local12); rightSA.SetMassFromShapes(); rightSA.SetUserData("RightSA"); _local10 = (Math.cos(_local8) * _local9); _local11 = (Math.sin(_local8) * _local9); _local12.SetAsBox(MF.ptm(10), MF.ptm(3)); _local13.position.Set(MF.ptm(((newBikeX - _local1) + _local10)), MF.ptm(((newBikeY + _local2) + _local11))); _local13.angle = _local8; leftSA = theWorld.CreateBody(_local13); leftSA.CreateShape(_local12); leftSA.SetMassFromShapes(); leftSA.SetUserData("LeftSA"); _local14 = Math.cos(_local7); _local15 = Math.sin(_local7); var _local16:b2PrismaticJointDef = new b2PrismaticJointDef(); _local16.Initialize(chassis, rightSA, rightSA.GetPosition(), new b2Vec2(_local14, _local15)); _local16.lowerTranslation = MF.ptm(-5); _local16.upperTranslation = 0; _local16.enableLimit = true; _local16.maxMotorForce = 18; _local16.motorSpeed = 1.5; _local16.enableMotor = true; rightPJ = (theWorld.CreateJoint(_local16) as b2PrismaticJoint); _local14 = Math.cos(_local8); _local15 = Math.sin(_local8); _local16.Initialize(chassis, leftSA, leftSA.GetPosition(), new b2Vec2(_local14, _local15)); _local16.maxMotorForce = 18; _local16.motorSpeed = 1.5; leftPJ = (theWorld.CreateJoint(_local16) as b2PrismaticJoint); var _local17 = 7; var _local18:Number = (Math.cos(_local7) * _local17); var _local19:Number = (Math.sin(_local7) * _local17); var _local20:Number = (Math.cos(_local8) * _local17); var _local21:Number = (Math.sin(_local8) * _local17); var _local22:b2CircleDef = new b2CircleDef(); _local22.radius = MF.ptm(15.5); _local22.density = 0.35; _local22.friction = 3; _local22.restitution = 0; _local22.filter.groupIndex = -1; var _local23:b2BodyDef = new b2BodyDef(); _local23.position.Set((rightSA.GetPosition().x + MF.ptm(_local18)), (rightSA.GetPosition().y + MF.ptm(_local19))); _local23.angularDamping = 3; wheel1 = theWorld.CreateBody(_local23); wheel1.CreateShape(_local22); wheel1.SetMassFromShapes(); wheel1.AllowSleeping(false); wheel1.SetUserData("WheelOneNonSensor"); _local23.position.Set((leftSA.GetPosition().x + MF.ptm(_local20)), (leftSA.GetPosition().y + MF.ptm(_local21))); wheel2 = theWorld.CreateBody(_local23); wheel2.CreateShape(_local22); wheel2.SetMassFromShapes(); wheel2.AllowSleeping(false); wheel2.SetUserData("WheelTwoNonSensor"); var _local24:b2RevoluteJointDef = new b2RevoluteJointDef(); _local24.enableMotor = false; _local24.Initialize(rightSA, wheel1, wheel1.GetWorldCenter()); motor1 = (theWorld.CreateJoint(_local24) as b2RevoluteJoint); _local24.Initialize(leftSA, wheel2, wheel2.GetWorldCenter()); motor2 = (theWorld.CreateJoint(_local24) as b2RevoluteJoint); _local22.radius = MF.ptm(16.5); _local22.density = 0.001; _local22.friction = 0; _local22.restitution = 0; _local22.filter.groupIndex = -1; _local22.isSensor = true; var _local25:b2BodyDef = new b2BodyDef(); _local25.position.Set((rightSA.GetPosition().x + MF.ptm(_local18)), (rightSA.GetPosition().y + MF.ptm(_local19))); wheelOneSensor = theWorld.CreateBody(_local25); wheelOneSensor.CreateShape(_local22); wheelOneSensor.SetMassFromShapes(); wheelOneSensor.AllowSleeping(false); wheelOneSensor.SetUserData("WheelOne"); _local25.position.Set((leftSA.GetPosition().x + MF.ptm(_local20)), (leftSA.GetPosition().y + MF.ptm(_local21))); wheelTwoSensor = theWorld.CreateBody(_local25); wheelTwoSensor.CreateShape(_local22); wheelTwoSensor.SetMassFromShapes(); wheelTwoSensor.AllowSleeping(false); wheelTwoSensor.SetUserData("WheelTwo"); _local24.Initialize(rightSA, wheelOneSensor, wheelOneSensor.GetWorldCenter()); sensorMotor1 = (theWorld.CreateJoint(_local24) as b2RevoluteJoint); _local24.Initialize(leftSA, wheelTwoSensor, wheelTwoSensor.GetWorldCenter()); sensorMotor2 = (theWorld.CreateJoint(_local24) as b2RevoluteJoint); disableShockAbsorbers(); } function setUpLoweringPlatforms():void{ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; var _local6:b2PolygonDef; var _local7:b2BodyDef; var _local8:b2Body; var _local9:b2RevoluteJointDef; var _local10:b2RevoluteJoint; var _local11:Sprite; var _local12:Sprite; var _local1:int; while (_local1 < loweringPlatformsArray.length) { _local2 = loweringPlatformsArray[_local1][0]; _local3 = (wholeLevelHeight - loweringPlatformsArray[_local1][1]); _local4 = 480.5; _local5 = 70.5; _local6 = new b2PolygonDef(); _local6.SetAsBox(MF.ptm(_local4), MF.ptm(_local5)); _local6.density = 1; _local6.friction = 5; _local6.restitution = 0; _local7 = new b2BodyDef(); _local7.position.Set(MF.ptm(_local2), MF.ptm(_local3)); _local8 = theWorld.CreateBody(_local7); _local8.CreateShape(_local6); _local8.SetMassFromShapes(); _local8.SetLinearDamping(0.3); _local8.SetUserData("LoweringPlatform"); loweringPlatformsCollection.push(_local8); _local9 = new b2RevoluteJointDef(); _local9.Initialize(theWorld.GetGroundBody(), _local8, _local8.GetWorldCenter()); _local9.upperAngle = 0; _local9.lowerAngle = 0; _local9.enableLimit = true; _local10 = (theWorld.CreateJoint(_local9) as b2RevoluteJoint); loweringPlatformsJoints.push(_local10); _local11 = new liftSprite(); _local11.x = (_local2 - 0.5); _local11.y = (_local3 - 70); ls.backgroundEMC.addChild(_local11); _local12 = new greyLoweringPlatformSprite(); _local12.x = _local2; _local12.y = _local3; ls.backgroundEMC.addChild(_local12); loweringPlatformsSprites.push(_local12); _local1++; }; } function initiateBonus():void{ score = (score + 1000); scoreMC.update(score); displayTrickBox("{msg_superbonus}"); inGameChannel = superBonusSFX.play(0, 0, soundEffectsST); } function reSpawn():void{ var _local1:Rectangle; livesLeftIndicator.update(); destroyEntireBike(); clearAllLoweringPlatforms(); nitroPercentage = 0; readyForNitro = false; crashSafetyTimer = 145; createBike(); setUpLoweringPlatforms(); chassisSprite.gotoAndStop("fixed"); theNinjaOnBike.alpha = 1; activateAllKeys(); crashInitiated = false; hitDeathDrop = false; ninjaEjectedHitDeathDrop = false; setUpPrimaryLoops(); _local1 = gameBackgroundRect; _local1.x = lastCamX; gameBackground.scrollRect = _local1; if (engineChannel != null){ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel.stop(); engineChannel = null; }; rotationCount = 0; degreeCount = 0; degreeCountBegan = false; if (playingTrick){ theNinjaOnBike.gotoAndStop("idle"); playingTrick = false; currentTrick = ""; trickHasLooped = false; }; var _local2:TweenMax = new TweenMax(blackFader, 0.5, {alpha:0}); } function init(_arg1:Event=null):void{ submitter = new CSubmitter(); addChild(submitter); resetLevelNumber(); initMainMenuEMC(); initSounds(); initMainMenu(); } function htpToGame():void{ clearHTP(); removeBlackFaderAndProceedToGame(); } public function togglePause(_arg1:MouseEvent=null):void{ if (!isPaused){ isPaused = true; deactivateAllKeys(); stage.removeEventListener(Event.ENTER_FRAME, update); if (secondsTillStart == null){ clockTimer.stop(); }; if (theNinjaOnBike.currentLabel != "idle"){ theNinjaOnBike.stop(); }; theNinjaOnBike.ninjaScarf.ninjaScarfInner.stop(); pauseMC.gotoAndStop("paused"); if (secondsTillStart != null){ secondsTillStart.stsTimer.stop(); }; if (musicChannel != null){ musicChannel.stop(); }; if (engineChannel != null){ engineChannelPos = engineChannel.position; }; if (trickChannel != null){ trickChannelPos = trickChannel.position; }; if (nitroChannel != null){ nitroChannelPos = nitroChannel.position; }; if (engineChannel != null){ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel.stop(); }; if (trickChannel != null){ trickChannel.stop(); }; if (nitroChannel != null){ nitroChannel.stop(); }; roomState = "PauseWindow"; pauseWindow.visible = true; resumeGameButton.visible = true; howToPlay_PW.visible = true; mainMenu_PW.visible = true; moreGames_PW.visible = true; qualityButton_PW.visible = true; sfxButton_PW.visible = true; musicButton_PW.visible = true; } else { if (isPaused){ isPaused = false; activateAllKeys(); stage.addEventListener(Event.ENTER_FRAME, update); if (secondsTillStart == null){ clockTimer.start(); }; if (theNinjaOnBike.currentLabel != "idle"){ theNinjaOnBike.play(); }; theNinjaOnBike.ninjaScarf.ninjaScarfInner.gotoAndPlay(scarfStatus); pauseMC.gotoAndStop("normal"); if (secondsTillStart != null){ secondsTillStart.stsTimer.start(); }; musicChannel = levelMusic.play(0, 999, musicST); if (currentMusicPlaying != "level_music"){ currentMusicPlaying = "level_music"; }; if (engineChannel != null){ switch (currentEngineSound){ case "drive_slow_fast": engineChannel = driveSlowFastSFX.play(engineChannelPos, 0, soundEffectsST); currentEngineSound = "drive_slow_fast"; break; case "drive_fast": if (((upKey) || (downKey))){ engineChannel = driveFastSFX.play(0, 99, soundEffectsST); currentEngineSound = "drive_fast"; } else { if (((!(upKey)) && (!(downKey)))){ engineChannel = driveFastSlowSFX.play(0, 0, soundEffectsST); currentEngineSound = "drive_fast_slow"; }; }; break; case "drive_fast_slow": engineChannel = driveFastSlowSFX.play(engineChannelPos, 0, soundEffectsST); currentEngineSound = "drive_fast_slow"; break; }; }; if (playingTrick){ switch (currentTrickSound){ case "trick1": trickChannel = trickOneSFX.play(trickChannelPos, 0, soundEffectsST); break; case "trick2": trickChannel = trickTwoSFX.play(trickChannelPos, 0, soundEffectsST); break; case "trick3": trickChannel = trickThreeSFX.play(trickChannelPos, 0, soundEffectsST); break; case "trick4": trickChannel = trickThreeSFX.play(trickChannelPos, 0, soundEffectsST); break; }; }; if (nitroChannel != null){ nitroChannel = nitroExhaustSFX.play(nitroChannelPos, 0, soundEffectsST); }; roomState = "InGame"; pauseWindow.visible = false; resumeGameButton.visible = false; howToPlay_PW.visible = false; mainMenu_PW.visible = false; moreGames_PW.visible = false; qualityButton_PW.visible = false; sfxButton_PW.visible = false; musicButton_PW.visible = false; }; }; } function resetLevelNumber():void{ levelNumber = 1; } function initGame(_arg1):void{ if (_arg1 == "new"){ livesLeft = 10; award1Submitted = false; award2Submitted = false; award3Submitted = false; award4Submitted = false; award5Submitted = false; }; defineVariables(); defineLevelDependentVariables(); setUpWorld(); setUpEMCs(); setUpPauseWindow(); setUpTerrain(); createBike(); setUpObstacleRamps(); setUpCheckPointAndFinishLine(); setUpPrimaryLoops(); setUpDeathDropSensors(); setUpSideBlockers(); setUpGraphics(); setUpLoweringPlatforms(); setUpNinjaStars(); setUpInterfaceElements(); setUpSecondsTillStart(); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyIsDown); stage.addEventListener(KeyboardEvent.KEY_UP, keyIsUp); stage.addEventListener(Event.ENTER_FRAME, update); roomState = "InGame"; if (endGameBMD != null){ endGameBMD.dispose(); }; if (((!((musicChannel == null))) && (!((currentMusicPlaying == "level_music"))))){ musicChannel.stop(); }; musicChannel = levelMusic.play(0, 999, musicST); currentMusicPlaying = "level_music"; } function updateSpritePositions():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; if (chassis != null){ chassisSprite.x = MF.mtp(chassis.GetPosition().x); chassisSprite.y = MF.mtp(chassis.GetPosition().y); chassisSprite.rotation = MF.toDeg(chassis.GetAngle()); theNinjaOnBike.x = MF.mtp(chassis.GetPosition().x); theNinjaOnBike.y = MF.mtp(chassis.GetPosition().y); theNinjaOnBike.rotation = MF.toDeg(chassis.GetAngle()); }; if (wheel1 != null){ _local1 = MF.toDeg(wheel1.GetAngle()); _local2 = (_local1 - prevWheelOnePos); prevWheelOnePos = _local1; wheelOneSprite.x = MF.mtp(wheel1.GetPosition().x); wheelOneSprite.y = MF.mtp(wheel1.GetPosition().y); wheelOneSprite.rotation = (wheelOneSprite.rotation + _local2); frontSprocketSprite.x = MF.mtp(wheel1.GetPosition().x); frontSprocketSprite.y = MF.mtp(wheel1.GetPosition().y); frontSprocketSprite.rotation = MF.toDeg(wheel1.GetAngle()); }; if (wheel2 != null){ _local3 = MF.toDeg(wheel2.GetAngle()); _local4 = (_local3 - prevWheelTwoPos); prevWheelTwoPos = _local3; wheelTwoSprite.x = MF.mtp(wheel2.GetPosition().x); wheelTwoSprite.y = MF.mtp(wheel2.GetPosition().y); wheelTwoSprite.rotation = (wheelTwoSprite.rotation + _local4); rearSprocketSprite.x = MF.mtp(wheel2.GetPosition().x); rearSprocketSprite.y = MF.mtp(wheel2.GetPosition().y); rearSprocketSprite.rotation = MF.toDeg(wheel2.GetAngle()); }; if (rightSA != null){ frontShocksSprite.x = MF.mtp(rightSA.GetPosition().x); frontShocksSprite.y = MF.mtp(rightSA.GetPosition().y); frontShocksSprite.rotation = (MF.toDeg(rightSA.GetAngle()) + MF.toRad(60)); }; if (leftSA != null){ rearShocksSprite.x = MF.mtp(leftSA.GetPosition().x); rearShocksSprite.y = MF.mtp(leftSA.GetPosition().y); rearShocksSprite.rotation = (MF.toDeg(leftSA.GetAngle()) + MF.toRad(120)); }; if (ninjaIsEjecting){ theEjectedNinja.x = MF.mtp(ejectedNinjaBody.GetPosition().x); theEjectedNinja.y = MF.mtp(ejectedNinjaBody.GetPosition().y); }; } function checkIfDoingWheelie():void{ if (!crashInitiated){ if (((((!(wheelOneLanded)) && (wheelTwoLanded))) || (((wheelOneLanded) && (!(wheelTwoLanded)))))){ if (wheelieCount < 30){ wheelieCount++; if (wheelieCount == 30){ wheelieCount = 0; if (nitroPercentage < 1){ nitroPercentage = (nitroPercentage + 0.035); score = (score + 50); scoreMC.update(score); if (nitroPercentage >= 1){ nitroPercentage = 1; readyForNitro = true; }; }; }; }; }; }; if (((((wheelOneLanded) && (wheelTwoLanded))) && (!((wheelieCount == 0))))){ wheelieCount = 0; }; } function checkIfMarkedForDeath():void{ if (((markedForDeath) && (!(gameOverInitiated)))){ levelEnded("GameOver"); gameOverInitiated = true; }; } function dampenIdleWheelMovement(_arg1, _arg2):void{ var _local3:int; var _local4:int; _local3 = Math.abs(_arg1); _local4 = Math.abs(_arg2); if ((((_local3 < 2)) && ((_local4 < 2)))){ if ((((((((((rightPJ.IsMotorEnabled() == true)) && (!(upKey)))) && (!(downKey)))) && (!(leftKey)))) && (!(rightKey)))){ rightPJ.SetLimits(0, 0); leftPJ.SetLimits(0, 0); rightPJ.EnableMotor(false); leftPJ.EnableMotor(false); }; }; } function sendLivesAward():void{ if (!award3Submitted){ if (livesLeft == 10){ award3Submitted = true; submitter.submitAward(NitroNinjasConfig.AWARD3); }; }; } function removeBlackFaderAndProceedToGame():void{ removeChild(blackFader); blackFader = null; initGame("new"); } function checkIfReadyForNitro():void{ var _local1:GlowFilter; if (((((readyForNitro) && (!(crashInitiated)))) && (!(hitDeathDrop)))){ readyForNitro = false; maxTorque = nitroMaxTorque; wheelTorque = nitroWheelTorque; _local1 = new GlowFilter(); _local1.color = 0xCC00; _local1.blurX = 10; _local1.blurY = 10; wheelOneSprite.filters = [_local1]; wheelTwoSprite.filters = [_local1]; theNinjaOnBike.filters = [_local1]; nitroInProgress = true; timesTurboUsed++; nitroChannel = nitroSFX.play(0, 0, soundEffectsST); nitroChannel = nitroExhaustSFX.play(0, 0, soundEffectsST); }; } public function returnToMainMenuFromPauseMode():void{ clearInGameItems("pausemode"); resetLevelNumber(); savedScore = 0; initMainMenu(); } function setUpEMCs():void{ gameBackground = new Sprite(); gameBackground.scrollRect = new Rectangle(0, 0, 700, 510); gameBackgroundRect = gameBackground.scrollRect; addChild(gameBackground); ls = new LevelEMC(); ls.scrollRect = new Rectangle(0, 0, 700, 510); addChild(ls); scrollingTextEMC = new MovieClip(); addChild(scrollingTextEMC); scrollingTextEMC.scrollRect = new Rectangle(0, 0, 700, 510); interfaceEMC = new Sprite(); addChild(interfaceEMC); interfaceEMC.scrollRect = new Rectangle(0, 0, 700, 510); blackFader = new blackFaderSprite(); addChild(blackFader); blackFader.alpha = 1; blackFader.mouseEnabled = false; } function clearHTP():void{ mainMenuEMC.removeChild(htpImageBG); htpImageBG = null; mainMenuEMC.removeChild(howToPlayBG); howToPlayBG = null; next_HTP.kill(); mainMenu_HTP.kill(); next_HTP = null; mainMenu_HTP = null; } function finishTheLevel():void{ savedScore = Number((score + timeBonusPoints)); if ((((levelNumber == 3)) && (!(google2Complete)))){ googleAnalitycs.trackEvent(NitroNinjasConfig.GAME_NAME, NitroNinjasConfig.TRACKER_HALF_REACHED); google2Complete = true; }; if ((((levelNumber == 6)) && (!(google3Complete)))){ googleAnalitycs.trackEvent(NitroNinjasConfig.GAME_NAME, NitroNinjasConfig.TRACKER_COMPLETED); google3Complete = true; }; if (levelNumber < 6){ levelEnded("LevelComplete"); } else { if (levelNumber == 6){ levelEnded("GameComplete"); }; }; } function checkIfNeedToSubmitAwards():void{ if (!award1Submitted){ if ((((tricksExecuted > 9)) && ((tricksExecuted < 30)))){ award1Submitted = true; submitter.submitAward(NitroNinjasConfig.AWARD1); }; }; if (!award2Submitted){ if (tricksExecuted >= 30){ award2Submitted = true; submitter.submitAward(NitroNinjasConfig.AWARD2); }; }; if (!award4Submitted){ if (starsCollected >= 30){ award4Submitted = true; submitter.submitAward(NitroNinjasConfig.AWARD4); }; }; if (!award5Submitted){ if (timesTurboUsed >= 3){ award5Submitted = true; submitter.submitAward(NitroNinjasConfig.AWARD5); }; }; } function reactivatePJMotors():void{ if (rightPJ.IsMotorEnabled() == false){ rightPJ.SetLimits(MF.ptm(-5), 0); leftPJ.SetLimits(MF.ptm(-5), 0); rightPJ.EnableMotor(true); leftPJ.EnableMotor(true); }; } function setUpSideBlockers():void{ var _local1:b2PolygonDef = new b2PolygonDef(); _local1.SetAsBox(MF.ptm(5), MF.ptm(1000)); _local1.density = 0; _local1.restitution = 0; _local1.friction = 0; var _local2:b2BodyDef = new b2BodyDef(); _local2.position.Set(0, MF.ptm(1000)); var _local3:b2Body = theWorld.CreateBody(_local2); _local3.CreateShape(_local1); _local3.SetMassFromShapes(); } function checkIfOutOfTime():void{ if (seconds == 0){ if (livesLeft > 0){ levelEnded("TimesUp"); livesLeft--; } else { if (livesLeft <= 0){ levelEnded("GameOver"); }; }; }; } public function returnToMainMenuFromGame():void{ resetLevelNumber(); savedScore = 0; if (nextLevel_IG != null){ nextLevel_IG.kill(); nextLevel_IG = null; }; if (mainMenu_IG != null){ mainMenu_IG.kill(); mainMenu_IG = null; }; if (moreGames_IG != null){ moreGames_IG.kill(); moreGames_IG = null; }; if (tryAgain_IG != null){ tryAgain_IG.kill(); tryAgain_IG = null; }; if (restart_IG != null){ restart_IG.kill(); restart_IG = null; }; while (endLevelSprite.numChildren > 0) { endLevelSprite.removeChild(endLevelSprite.getChildAt(0)); }; removeChild(endLevelSprite); endLevelSprite = null; initMainMenu(); } function fixLocBug(_arg1:MouseEvent):void{ locFixSprite.removeEventListener(MouseEvent.MOUSE_MOVE, fixLocBug); removeChild(locFixSprite); locFixSprite = null; (startGame_MM.theText as LocalizedTextField).setSize(130, 20); (howToPlay_MM.theText as LocalizedTextField).setSize(130, 20); (moreGames_MM.theText as LocalizedTextField).setSize(164, 36); localizedBugResolved = true; } function checkIfOffTheGround():void{ if (((!(onTheGround)) && (!(degreeCountBegan)))){ degreeCountBegan = true; previousDegrees = MF.toDeg(chassis.GetAngle()); incrementDegreeCount(); } else { if (((!(onTheGround)) && (degreeCountBegan))){ incrementDegreeCount(); } else { if (onTheGround){ rotationCount = 0; degreeCount = 0; previousDegrees = 0; degreeCountBegan = false; checkIfReadyForNitro(); if (tricksDoneInAir != 0){ tricksDoneInAir = 0; }; }; }; }; if (((wheelOneLanded) || (wheelTwoLanded))){ if (playingTrick){ theNinjaOnBike.gotoAndStop("idle"); playingTrick = false; currentTrick = ""; trickHasLooped = false; endTrickSound(); }; }; } function initHowToPlay():void{ htpImageBG = new howToPlayImageBG(); mainMenuEMC.addChild(htpImageBG); howToPlayBG = new howToPlayBackground(); mainMenuEMC.addChild(howToPlayBG); next_HTP = new Next_HTP(mainMenuEMC); next_HTP.x = 543; next_HTP.y = 455; next_HTP.buttonMode = true; mainMenuEMC.addChild(next_HTP); mainMenu_HTP = new MainMenu_HTP(mainMenuEMC); mainMenu_HTP.x = 157; mainMenu_HTP.y = 455; mainMenu_HTP.buttonMode = true; mainMenuEMC.addChild(mainMenu_HTP); roomState = "HowToPlay"; var _local1:TweenMax = new TweenMax(blackFader, 0.5, {alpha:0}); } public function manipulateBlackFader(_arg1):void{ var _local2:TweenMax; var _local3:TweenMax; var _local4:TweenMax; var _local5:TweenMax; switch (_arg1){ case "MM_TO_HTP": _local2 = new TweenMax(blackFader, 0.5, {alpha:1, onComplete:mmToHTP}); break; case "MM_TO_GAME": _local3 = new TweenMax(blackFader, 0.5, {alpha:1, onComplete:mmToGame}); break; case "HTP_TO_GAME": _local4 = new TweenMax(blackFader, 0.5, {alpha:1, onComplete:htpToGame}); break; case "HTP_TO_MM": _local5 = new TweenMax(blackFader, 0.5, {alpha:1, onComplete:htpToMM}); break; }; } function levelEnded(_arg1):void{ var _local2:MovieClip; var _local3:Sprite; var _local4:MovieClip; var _local5:MovieClip; clearInGameItems("endgame"); if (_arg1 == "GameComplete"){ sendLivesAward(); }; if ((((_arg1 == "GameComplete")) || ((_arg1 == "GameOver")))){ submitter.submitScore(savedScore); }; switch (_arg1){ case "TimesUp": _local2 = new TimeIsUpScreen(); _local2.update(); endLevelSprite.addChild(_local2); tryAgain_IG = new TryAgain_IG(endLevelSprite); tryAgain_IG.x = 476; tryAgain_IG.y = 191; tryAgain_IG.buttonMode = true; endLevelSprite.addChild(tryAgain_IG); mainMenu_IG = new MainMenu_IG(endLevelSprite); mainMenu_IG.x = 476; mainMenu_IG.y = 251; mainMenu_IG.buttonMode = true; endLevelSprite.addChild(mainMenu_IG); moreGames_IG = new MoreGames_IG(endLevelSprite); moreGames_IG.x = 474; moreGames_IG.y = 326; moreGames_IG.buttonMode = true; endLevelSprite.addChild(moreGames_IG); if (((!((musicChannel == null))) && (!((currentMusicPlaying == "failed_music"))))){ musicChannel.stop(); }; musicChannel = failedMusic.play(0, 0, musicST); currentMusicPlaying = "failed_music"; break; case "GameOver": _local3 = new gameOverScreenBG(); endLevelSprite.addChild(_local3); restart_IG = new Restart_IG(endLevelSprite); restart_IG.x = 476; restart_IG.y = 191; restart_IG.buttonMode = true; endLevelSprite.addChild(restart_IG); mainMenu_IG = new MainMenu_IG(endLevelSprite); mainMenu_IG.x = 476; mainMenu_IG.y = 251; mainMenu_IG.buttonMode = true; endLevelSprite.addChild(mainMenu_IG); moreGames_IG = new MoreGames_IG(endLevelSprite); moreGames_IG.x = 474; moreGames_IG.y = 326; moreGames_IG.buttonMode = true; endLevelSprite.addChild(moreGames_IG); if (((!((musicChannel == null))) && (!((currentMusicPlaying == "failed_music"))))){ musicChannel.stop(); }; musicChannel = failedMusic.play(0, 0, musicST); currentMusicPlaying = "failed_music"; break; case "LevelComplete": _local4 = new LevelCompleteScreen(); _local4.update(); endLevelSprite.addChild(_local4); nextLevel_IG = new NextLevel_IG(endLevelSprite); nextLevel_IG.x = 476; nextLevel_IG.y = 191; nextLevel_IG.buttonMode = true; endLevelSprite.addChild(nextLevel_IG); mainMenu_IG = new MainMenu_IG(endLevelSprite); mainMenu_IG.x = 476; mainMenu_IG.y = 251; mainMenu_IG.buttonMode = true; endLevelSprite.addChild(mainMenu_IG); moreGames_IG = new MoreGames_IG(endLevelSprite); moreGames_IG.x = 474; moreGames_IG.y = 326; moreGames_IG.buttonMode = true; endLevelSprite.addChild(moreGames_IG); if (((!((musicChannel == null))) && (!((currentMusicPlaying == "level_win_music"))))){ musicChannel.stop(); }; musicChannel = levelWinMusic.play(0, 0, musicST); currentMusicPlaying = "level_win_music"; break; case "GameComplete": _local5 = new GameCompleteScreen(); _local5.update(); endLevelSprite.addChild(_local5); restart_IG = new Restart_IG(endLevelSprite); restart_IG.x = 476; restart_IG.y = 191; restart_IG.buttonMode = true; endLevelSprite.addChild(restart_IG); mainMenu_IG = new MainMenu_IG(endLevelSprite); mainMenu_IG.x = 476; mainMenu_IG.y = 251; mainMenu_IG.buttonMode = true; endLevelSprite.addChild(mainMenu_IG); moreGames_IG = new MoreGames_IG(endLevelSprite); moreGames_IG.x = 474; moreGames_IG.y = 326; moreGames_IG.buttonMode = true; endLevelSprite.addChild(moreGames_IG); if (((!((musicChannel == null))) && (!((currentMusicPlaying == "game_complete_music"))))){ musicChannel.stop(); }; musicChannel = gameCompleteMusic.play(0, 0, musicST); currentMusicPlaying = "game_complete_music"; break; }; levelEndStat = _arg1; roomState = "LevelEnd"; } public function returnToMainMenuFromHTPWhilePaused():void{ clearInGameItems("pausemode"); clearHTP(); resetLevelNumber(); savedScore = 0; initMainMenu(); } function incrementTricksDoneCount(_arg1):void{ if (_arg1 == "firstTrick"){ if (nitroPercentage < 1){ if (nitroPercentage > 0.8){ nitroPercentage = 1; } else { nitroPercentage = (nitroPercentage + 0.2); }; tricksDoneInAir++; if (nitroPercentage >= 1){ readyForNitro = true; }; }; } else { if (_arg1 == "hasLoopedTrick"){ if (nitroPercentage < 1){ if (nitroPercentage > 0.95){ nitroPercentage = 1; } else { nitroPercentage = (nitroPercentage + 0.05); }; if (nitroPercentage >= 1){ readyForNitro = true; }; }; } else { if (_arg1 == "rotation"){ if (nitroPercentage < 1){ if (nitroPercentage > 0.8){ nitroPercentage = 1; } else { nitroPercentage = (nitroPercentage + 0.2); }; tricksDoneInAir++; if (nitroPercentage >= 1){ readyForNitro = true; }; }; }; }; }; } function disableShockAbsorbers():void{ rightPJ.SetLimits(0, 0); leftPJ.SetLimits(0, 0); rightPJ.EnableMotor(false); leftPJ.EnableMotor(false); } function defineLevelDependentVariables():void{ switch (levelNumber){ case 1: newBikeX = 195; newBikeY = 1700; checkPointFlagX = 18207; checkPointFlagY = 340; checkPointFlagTwoX = 24315; checkPointFlagTwoY = 1093; finishLineX = 44500; finishLineY = 140; seconds = 180; levelTerrainSprites = [[level1_1, "loop", 2, 500], [level1_2, "single", null, 2000], [level1_3, "single", null, 2000], [level1_4, "single", null, 2000], [level1_5, "single", null, 2000], [level1_6, "single", null, 1000], [level1_7, "loop", 5, 500], [level1_8, "single", null, 2000], [level1_9, "single", null, 2000], [level1_10, "single", null, 2000], [level1_11, "single", null, 2000], [level1_12, "single", null, 500], ["blank", 500, 1], [level1_13, "single", null, 2000], [level1_14, "single", null, 2000], [level1_15, "single", null, 2000], [level1_16, "single", null, 2000], [level1_17, "single", null, 2000], [level1_18, "single", null, 2000], [level1_19, "single", null, 2000], [level1_20, "single", null, 2000], [level1_21, "single", null, 1500], ["blank", 500, 1], [level1_22, "single", null, 500], [level1_23, "loop", 10, 500]]; ninjaStarPositions = [[852, 238], [909, 238], [966, 238], [1023, 238], [1080, 238], [1136, 238], [2324, 557], [2405, 616], [2512, 606], [2559, 676], [2598, 752], [2238, 616], [0x0909, 715], [2395, 760], [2446, 685], [2619, 616], [2499, 755], [2658, 706], [2321, 640], [2740, 722], [2770, 622], [2704, 561], [2208, 718], [2787, 534], [2706, 643], [4850, 331], [4914, 331], [4977, 331], [5046, 331], [5117, 331], [12832, 740], [12971, 743], [13061, 743], [12841, 619], [12911, 687], [13041, 685], [13125, 674], [12767, 624], [12927, 594], [13011, 608], [13209, 615], [12765, 524], [12911, 527], [13050, 537], [13136, 559], [13195, 511], [13277, 541], [12852, 466], [13072, 469], [13400, 789], [13485, 803], [13683, 810], [13239, 718], [13384, 721], [13524, 731], [13610, 753], [13669, 705], [13751, 735], [13325, 660], [13838, 680], [13436, 662], [13575, 695], [13819, 803], [13489, 559], [13515, 639], [13645, 637], [13729, 626], [13372, 576], [17259, 705], [17457, 712], [17298, 634], [17384, 656], [17443, 608], [17337, 723], [17220, 490], [17350, 576], [17216, 590], [17290, 542], [17420, 540], [17350, 472], [23095, 1100], [23159, 1112], [23225, 1122], [23288, 1131], [23350, 1139], [23410, 1147], [23468, 1155], [25064, 1084], [25131, 1077], [25200, 1071], [25265, 1066], [25334, 1059], [25402, 1053], [25470, 1048], [28776, 1060], [28851, 1060], [0x7100, 1060], [29004, 1060], [29075, 1060], [29145, 1060], [29221, 1060], [29296, 1060], [29373, 1060], [29449, 1060], [29520, 1060], [29590, 1060], [29662, 1060], [29737, 1060], [29814, 1060], [29891, 1060], [29962, 1060], [30032, 1060], [30103, 1060], [30178, 1060], [30255, 1060], [30331, 1060], [30402, 1060], [30472, 1060], [27928, 232], [28003, 232], [28080, 232], [28156, 232], [28227, 232], [28298, 232], [28373, 232], [28448, 232], [28525, 232], [28601, 232], [0x7000, 232], [28742, 232], [28814, 232], [28890, 232], [28967, 232], [29043, 232], [29114, 232], [0x7200, 232], [29255, 232], [29330, 232], [29407, 232], [29483, 232], [29554, 232], [29624, 232], [29695, 232], [29765, 232], [29836, 232], [29911, 232], [29988, 232], [30064, 232], [30135, 232], [30205, 232], [30883, 232], [30958, 232], [31035, 232], [31111, 232], [31182, 232], [31252, 232], [31327, 232], [31403, 232], [31480, 232], [31486, 1060], [31561, 1060], [31638, 1060], [31715, 1060], [31786, 1060], [31856, 1060], [31931, 1060], [32006, 1060], [32083, 1060], [32159, 1060], [32230, 1060], [32300, 1060], [31557, 232], [31632, 232], [31709, 232], [31785, 232], [31856, 232], [31926, 232], [32001, 232], [32077, 232], [32154, 232], [32230, 232], [32301, 232], [32371, 232], [32443, 232], [32518, 232], [32595, 232], [32672, 232], [32743, 232], [32813, 232], [32884, 232], [32959, 232], [33036, 232], [33112, 232], [33183, 232], [33253, 232], [33323, 232], [33394, 232], [33465, 232], [33540, 232], [33617, 232], [33693, 232], [33764, 232], [33834, 232], [33899, 232], [33974, 232], [34051, 232], [34127, 232], [34198, 232], [35119, 1043], [35194, 1043], [35271, 1043], [35348, 1043], [35419, 1043], [35489, 1043], [35560, 1043], [35635, 1043], [35712, 1043], [35788, 1043], [35859, 1043], [35929, 1043], [35156, 1091], [35232, 1091], [35309, 1091], [35385, 1091], [35456, 1091], [35526, 1091], [35597, 1091], [35672, 1091], [35749, 1091], [35825, 1091], [35896, 1091], [35966, 1091], [36004, 1043], [33293, 1060], [33368, 1060], [33445, 1060], [33521, 1060], [33592, 1060], [33662, 1060], [33737, 1060], [33812, 1060], [33890, 1060], [33966, 1060], [34037, 1060], [34107, 1060], [38942, 1898], [38963, 1776], [39068, 1789], [39038, 1882], [39145, 1868], [0x9900, 1776], [39016, 1684], [39124, 1696], [39124, 1962], [39262, 1852], [0x9800, 1684], [38851, 1831], [38972, 1572], [39221, 1684], [39075, 1610], [39232, 1591], [39311, 1759], [39322, 1666], [39154, 1513], [39341, 1572], [39262, 1513], [38830, 1746], [38860, 1602], [39053, 1500], [39519, 1652], [39539, 1531], [39644, 1544], [39614, 1636], [39721, 1622], [39744, 1531], [39592, 1438], [39700, 1451], [39700, 1716], [39838, 1606], [39489, 1438], [39428, 1585], [39549, 1326], [39797, 1438], [39651, 1364], [39808, 1345], [39887, 1514], [39898, 1421], [39730, 1267], [39917, 1326], [39838, 1267], [39406, 1501], [39436, 1356], [39630, 1254], [39335, 1501], [38985, 1451], [39292, 1389], [39082, 1438], [39394, 1427], [39093, 1345], [39183, 1421], [39015, 1267], [39202, 1326], [39123, 1267], [39373, 1317], [39202, 1149], [39307, 1162], [39277, 1254], [39384, 1240], [39407, 1149], [39255, 1056], [39363, 1069], [39501, 1224], [39460, 1056], [39314, 982], [39550, 1132], [39561, 1039], [39700, 1089], [39805, 1102], [39775, 1194], [39883, 1180], [39906, 1089], [39753, 996], [39862, 1009], [40000, 1164], [39959, 996], [39812, 922], [40049, 1072], [40060, 979], [39378, 1958], [39394, 1744], [39501, 1742], [39247, 1965], [39335, 1869], [39444, 1882], [39480, 1824], [39619, 1714], [39541, 1869], [39296, 2027], [39642, 1852], [12103, 667.95], [12055, 691.95], [11992, 703.95], [11932, 695.95], [11882.05, 673.95], [11840.05, 646.95], [11808.05, 610.95], [11786.05, 568.95], [11773.05, 523.95], [11771.05, 476.95], [11780.05, 425.95], [11801.05, 378.95], [11836.05, 338.95]]; driveOverObstaclesDef = [["tirejunk", 12622, 240], ["tireswithramp", 30170, 140], ["tireswithramp", 34197, 140]]; deathDropSensorsDef = [[19850, -250, 19850, 3]]; loopDef = [[11281, 240, "normal"], [12001, 240, "normal"]]; terrainDefinition = <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="70000" height="2000" id="svg2"> <defs id="defs4"/> <path d="m 0,1800 1200,0 c 0,0 337.3407,68.4395 680,-160 360,-240 440,40 440,40 l 0,820" id="path2908" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 2800,2500 0,-880 c 0,0 1160,100 1640,100 480,0 880,-40 880,-40 l 0,820" id="path2910" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 5720,2500 0,-780 200,0 c 0,0 724.0234,-144.3738 740,-400 20,-320 860,320 860,320 0,0 4.5164,290.0879 280,240 220,-40 240,-240 240,-240 l 40,-120 c 180,-100 640,-80 640,-80 0,0 500.3139,8.2512 640,120 200,160 477.8227,198.0889 560,200 l 487.813,0 350,0 1962.187,0 0,740" id="path2912" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 13320,2500 0,-720 c 0,0 880,-60 960,-80 80,-20 380,240 480,240 26.904,0 160,-40 240,-40 70.769,0 102.141,-112.6762 140,-160 99.272,-124.0896 411.075,-49.785 460,-40 79.673,15.9346 333.738,13.1796 513.267,56.6365 45.804,11.0872 77.643,25.1825 86.733,43.3635 40,80 620,140 740,160 61.223,10.2039 260,-100 280,-180 33.836,-135.3433 331.02,20 380,20 0,0 660,-180 700,-140 40,40 280,80 280,80" id="path2914" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 18580,1740 c 120,0 380,-160 380,-160 0,0 440,-180 800,-380 227.952,-126.6402 860,-700 1040,-480 180,220 160,280 160,280 l 0,1500" id="path2916" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 21520,2500 0,-1380 2140,-240 0,1620" id="path2918" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 24020,2500 0,-1620 c 0,0 1160,120 1500,120 340,0 1060,-1000 1280,-580 220,420 400,560 660,560 l 0,1520" id="path2827" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 28640,1120 0,-140 960,0 0,140 -960,0 z" id="path2838" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 29600,1120 0,-140 960,0 0,140 -960,0 z" id="path2838-1" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 31380,1120 0,-140 960,0 0,140 -960,0 z" id="path2838-1-7" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 33220,1120 0,-140 960,0 0,140 -960,0 z" id="path2838-1-7-4" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 35080,1120 0,-140 960,0 0,140 -960,0 z" id="path2838-1-7-4-0" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 27840,2500 0,-640 2480,0 0,640" id="path2828" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 30820,2500 0,-640 3440,0 0,640" id="path2830" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 34740,2500 0,-640 c 940,-520 2360,-180 3480,-1060 560,-500 560,-60 560,-60 l 0,1222.435 0,537.565" id="path2832" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 39540,2500 0,-640 6800,0" id="path2834" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </svg> ; break; case 2: newBikeX = 195; newBikeY = 200; checkPointFlagX = 27250; checkPointFlagY = 1179; checkPointFlagTwoX = 37324; checkPointFlagTwoY = 539; finishLineX = 49500; finishLineY = 560; seconds = 180; levelTerrainSprites = [[level2_1, "single", null, 2000], [level2_2, "single", null, 1500], [level2_3, "loop", 3, 500], [level2_4, "single", null, 2000], [level2_5, "single", null, 2000], [level2_6, "single", null, 2000], [level2_7, "single", null, 2000], [level2_8, "single", null, 2000], [level2_9, "single", null, 2000], [level2_10, "single", null, 2000], [level2_11, "single", null, 1000], [level2_12, "loop", 5, 500], [level2_13, "single", null, 2000], [level2_14, "single", null, 2000], [level2_15, "single", null, 2000], [level2_16, "single", null, 2000], [level2_17, "single", null, 2000], [level2_18, "single", null, 2000], [level2_19, "single", null, 2000], [level2_20, "single", null, 2000], [level2_21, "single", null, 2000], [level2_22, "single", null, 2000], [level2_23, "single", null, 2000], [level2_24, "single", null, 500], [level2_25, "loop", 11, 500]]; ninjaStarPositions = [[1337, 1136], [1398, 1093], [1463, 1050], [1528, 1012], [1595, 967], [1662, 930], [1734, 885], [1809, 842], [1886, 800], [1959, 756], [0x0808, 721], [8056, 1675], [8126, 1629], [8163, 1720], [8165, 1541], [7997, 1777], [7983, 1709], [8076, 1741], [8014, 1609], [8079, 1569], [8137, 1802], [8218, 1642], [8238, 1762], [8262, 1580], [8304, 1709], [7926, 1651], [8056, 1859], [0x2020, 1848], [8148, 1914], [8486, 1653], [8556, 1608], [8593, 1699], [8595, 1520], [8427, 1756], [8413, 1688], [8506, 1720], [8444, 1588], [8509, 1548], [8567, 1781], [8648, 1621], [8668, 1741], [8692, 1559], [8734, 1688], [8356, 1630], [8486, 1838], [8654, 1827], [8579, 1893], [8254, 1937], [8309, 1859], [8329, 1979], [8353, 1797], [8395, 1926], [8993, 1227], [9049, 1227], [9106, 1227], [9166, 1227], [9226, 1227], [9286, 1227], [9345, 1227], [9412, 1227], [9481, 1227], [9550, 1227], [10245, 1227], [10301, 1227], [10358, 1227], [10418, 1227], [10478, 1227], [10538, 1227], [10597, 1227], [10664, 1227], [10733, 1227], [10802, 1227], [10862, 1227], [10921, 1227], [10988, 1227], [11057, 1227], [11126, 1227], [9330, 376], [9393, 368], [9458, 357], [9267, 369], [9206, 359], [9145, 355], [9078, 350], [9523, 349], [9589, 338], [9661, 332], [9729, 323], [9795, 325], [9859, 343], [9933, 358], [10005, 367], [10075, 376], [10143, 388], [10220, 398], [10294, 408], [10375, 416], [10451, 424], [10532, 426], [10617, 423], [10707, 410], [10795, 394], [11320, 386], [11398, 394], [11480, 406], [11558, 417], [11632, 423], [11698, 429], [11795, 1226], [11862, 1226], [11931, 1226], [12004, 1226], [12076, 1226], [12150, 1226], [12226, 1226], [12302, 1226], [12379, 1226], [12460, 1226], [12531, 1226], [12603, 1226], [13414, 1235], [13481, 1235], [13550, 1235], [13623, 1235], [13695, 1235], [13769, 1235], [13845, 1235], [13921, 1235], [13999, 1235], [14079, 1235], [14150, 1235], [14222, 1235], [13020, 405], [13093, 381], [13172, 367], [13256, 351], [13337, 333], [13669, 299], [13746, 323], [13820, 340], [13893, 352], [13970, 359], [14047, 358], [14126, 343], [14777, 388], [14840, 395], [14900, 401], [14961, 405], [15053, 1223], [15107, 1223], [15158, 1223], [15208, 1223], [15261, 1223], [15312, 1223], [15364, 1223], [15419, 1223], [15474, 1223], [15521, 1223], [15571, 1223], [15626, 1223], [15678, 1223], [15730, 1223], [15783, 1223], [15834, 1223], [15886, 1223], [15024, 409], [15084, 411], [15148, 414], [15211, 420], [15271, 424], [15332, 427], [15396, 433], [15456, 430], [16734, 1219], [16788, 1219], [16839, 1219], [16889, 1219], [16942, 1219], [16993, 1219], [17045, 1219], [17100, 1219], [17155, 1219], [17202, 1219], [17252, 1219], [17307, 1219], [17359, 1219], [17411, 1219], [17464, 1219], [17515, 1219], [17567, 1219], [16761, 1254], [16815, 1254], [16866, 1254], [16916, 1254], [16969, 1254], [17020, 1254], [17072, 1254], [17127, 1254], [17182, 1254], [17229, 1254], [17279, 1254], [17334, 1254], [17386, 1254], [17438, 1254], [17491, 1254], [17542, 1254], [15516, 425], [15576, 417], [15634, 408], [15693, 397], [15750, 389], [15806, 380], [16507, 376], [16570, 383], [16630, 389], [16691, 394], [16754, 398], [16815, 402], [16879, 407], [16942, 413], [19299, 410], [19359, 410], [19419, 410], [19482, 410], [19544, 409], [19600, 408], [19660, 408], [19720, 408], [19783, 408], [19845, 407], [19900, 407], [18182, 374], [18221, 331], [18163, 333], [18253, 376], [18221, 416], [18295, 336], [18303, 405], [24270, 1962], [24505, 1652], [24545, 1914], [24336, 1581], [24524, 1578], [24427, 1578], [24432, 1722], [24366, 1498], [24181, 1509], [24402, 1652], [24456, 1509], [24274, 1509], [24558, 1722], [24494, 1739], [24354, 1703], [24170, 1581], [24244, 1673], [24140, 1777], [24244, 1581], [24119, 1706], [24306, 1643], [24135, 1639], [24287, 1726], [24200, 1722], [24306, 1815], [24457, 1802], [24375, 1845], [24222, 1794], [24432, 1930], [24181, 1846], [24524, 1824], [24310, 1878], [24475, 1876], [24360, 1932], [24240, 1892], [24369, 1777], [24075, 2008], [24088, 1816], [24054, 1918], [24596, 1652], [24674, 1817], [24644, 1748], [24625, 1583], [24596, 1798], [24699, 1897], [24617, 1940], [24717, 1972], [24611, 1872], [24708, 1517], [24699, 1585], [24718, 1751], [24689, 1665], [24747, 1837], [30401, 1020], [30441, 1282], [30328, 1090], [30298, 1020], [30454, 1090], [30390, 1107], [30250, 1071], [30140, 1041], [30202, 1011], [30183, 1094], [30202, 1183], [30353, 1170], [30271, 1213], [30118, 1162], [30328, 1298], [30420, 1192], [30206, 1246], [30371, 1244], [30256, 1300], [30265, 1145], [30492, 1020], [30570, 1185], [30540, 1116], [30492, 1166], [30507, 1240], [30614, 1119], [30585, 1033], [37024, 623], [37086, 627], [37153, 630], [37220, 632], [37293, 633], [36085, 465], [36166, 467], [36240, 468], [36315, 469], [36010, 462], [39734, 1482], [39748, 1282], [40081, 1312], [40145, 1482], [40051, 1428], [39959, 1379], [39972, 1277], [39972, 1552], [40087, 1590], [39873, 1482], [39815, 1386], [39764, 1574], [39876, 1616], [39684, 1398], [39989, 1672], [39856, 1282], [40282, 1562], [39886, 1724], [40252, 1450], [40002, 1790], [40181, 1370], [39764, 1690], [40282, 1763], [40312, 1654], [0x9D00, 1702], [40200, 1597], [40098, 1760], [43590, 2253], [43604, 2053], [43937, 2083], [44001, 2253], [43907, 2200], [43815, 2150], [43828, 0x0800], [43828, 2323], [43943, 2362], [43729, 2253], [43671, 2157], [43620, 2346], [43732, 2387], [43540, 2170], [43845, 2444], [43712, 2053], [44138, 2333], [43742, 2495], [44108, 2221], [43858, 2561], [44037, 2141], [43620, 2461], [44138, 2534], [44168, 2426], [44048, 2474], [44056, 2368], [43954, 2531], [44248, 1985], [44262, 1785], [44601, 2094], [44329, 1889], [44278, 2078], [44390, 2119], [44198, 1902], [44503, 2176], [44370, 1785], [44400, 2227], [44516, 2293], [44278, 2193], [44796, 2266], [44826, 2158], [44706, 2206], [44714, 2100], [44612, 2263], [44289, 2368], [44404, 2406], [44306, 2488], [44599, 2378], [44319, 2606], [44599, 2579], [44629, 2470], [44508, 2518], [44517, 2413], [44415, 2576], [44138, 0x0800], [44168, 2141], [44088, 1965], [44354, 2770], [44260, 2717], [44168, 2668], [44181, 2840], [44296, 2879], [44082, 2770], [44024, 2674], [43973, 2863], [44085, 2904], [44198, 2961], [44095, 3012], [44211, 3078], [44390, 2658], [43973, 2978], [44401, 2991], [44409, 2885], [44307, 3048], [44755, 2686], [44819, 2855], [44725, 2802], [44633, 2753], [44646, 2651], [44646, 2926], [44547, 2855], [44956, 2935], [44926, 2823], [44855, 2743], [44766, 2408], [44830, 2577], [44736, 2524], [45044, 2529], [45239, 2500], [44937, 2545], [44866, 2465], [45050, 2670], [45269, 2593], [44960, 2609], [45157, 2536], [44866, 2667], [45100, 2949], [45114, 2750], [45447, 2780], [45338, 2745], [45050, 2866], [45222, 2750], [5003, 707.95], [4955, 731.95], [4892, 743.95], [4832, 735.95], [4782.05, 713.95], [4740.05, 686.95], [4708.05, 650.95], [4686.05, 608.95], [4673.05, 563.95], [4671.05, 516.95], [4680.05, 465.95], [5045.95, 672.95], [5075.95, 632.95], [5097.95, 591.95], [21049, 747.95], [21001, 771.95], [20938, 783.95], [20878, 775.95], [20828.05, 753.95], [20786.05, 726.95], [21851.95, 509], [21837, 556], [21811, 597], [21772, 628], [21727, 646], [21679, 645], [21636, 632], [21598, 605], [21570, 569], [21553, 531], [21848.95, 463], [21831, 421], [21799, 384], [0x5500, 358], [21548, 489]]; driveOverObstaclesDef = [["tirejunk", 33890, 260]]; deathDropSensorsDef = [[22300, -250, 22300, 3]]; loopDef = [[4040, 280, "normal"], [4901, 280, "normal"], [20947, 320, "normal"], [21701, 320, "small"]]; terrainDefinition = <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="70000" height="2000" id="svg2843"> <defs id="defs2845"/> <g transform="translate(0,947.63782)" id="layer1"> <path d="m 0,280 440,0 c 0,0 1760,1440 2960,1440 1200,0 1840,0 1840,0 0,0 1640,-80 2120,-680 390.3219,-487.90243 680,-240 680,-240 l 0,1700" transform="translate(0,-947.63782)" id="path2855" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 8680,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2866" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 10200,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2925" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 11720,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2951" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 13340,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2953" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 14980,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2955" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 16680,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2957" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 8520,2500 0,-740 c 0,0 640,-40 720,-40 80,0 440,40 480,40 40,0 720,-120 880,-80 160,40 320,40 320,40 l 0,780" transform="translate(0,-947.63782)" id="path2961" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 11280,2500 0,-780 c 0,0 360,-80 560,-40 200,40 480,80 560,80 80,0 480,-120 600,-80 120,40 480,80 560,80 80,0 360,-120 520,-80 160,40 160,40 160,40 l 0,780" transform="translate(0,-947.63782)" id="path2963" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 14560,2500 0,-780 c 0,0 720,-80 960,-40 240,40 720,120 880,80 160,-40 680,-120 920,-80 240,40 440,80 600,80 160,0 240,160 240,160 0,0 240,120 400,0 160,-120 120,-160 280,-200 160,-40 880,-40 880,-40 l 2820,0 c 0,0 980,0 1220,-460 298.346,-571.83 560,-440 560,-440 l 0,1720" transform="translate(0,-947.63782)" id="path2965" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 24720,2500 0,-1640 c 0,0 280,280 860,280 580,0 720,-360 820,-320 100,40 140,60 140,60 0,0 140,100 340,0" transform="translate(0,-947.63782)" id="path2969" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 26880,880 c 0,0 180,-100 400,-60 220,40 240,80 240,80 l 80,200 440,300 c 0,0 1200,-40 1320,-140 120,-100 620,-80 620,-80 l 0,1320" transform="translate(0,-947.63782)" id="path2971" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 30660,2500 0,-1300 c 0,0 380,0 520,60 140,60 120,-200 200,-200 80,0 160,20 160,20 0,0 380,200 520,220 140,20 160,400 280,400 120,0 160,-220 200,-180 40,40 540,220 620,220 80,0 980,0 980,0 0,0 -3.036,137.1675 100,220" transform="translate(0,-947.63782)" id="path2973" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 34240,1960 c 0,0 440,0 520,-40 80,-40 120,-160 120,-160" transform="translate(0,-947.63782)" id="path3011" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 34880,1760 460,0 c 0,0 20,100 120,100 100,0 340,-20 360,-60 20,-40 17.538,-160 100,-160 80,0 440,-20 440,-20 0,0 0,80 140,80 140,0 280,0 300,-40 20,-40 30.042,-162.5105 100,-180 80,-20 500,-20 500,-20 0,0 20,140 180,140 160,0 420,0 420,0 0,0 189.303,-44.5198 280,-200 140,-240 380,-200 380,-200 l 520,0 c 0,0 366.508,-39.0041 480,-200 240,-340 460,-80 460,-80 l 120,80 0,400 c 0,0 58.498,260.6826 280,160 220,-100 240,-120 240,-120" transform="translate(0,-947.63782)" id="path3013" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 44600,2500 c 0,-20 0,-1060 0,-1060 l 7460,0" transform="translate(0,-947.63782)" id="path3017" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 40760,1440 160,-200 c 80,-120 520,-180 800,-180 280,0 960,-20 960,-20 0,0 811.429,-337.14286 965.714,-708.57143 C 43800,-40 44040,240 44040,240 l 0,2260" transform="translate(0,-947.63782)" id="path3019" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </g> </svg> ; break; case 3: newBikeX = 195; newBikeY = 447; checkPointFlagX = 19006; checkPointFlagY = 120; checkPointFlagTwoX = 37789; checkPointFlagTwoY = 717; finishLineX = 50637; finishLineY = 80; seconds = 180; levelTerrainSprites = [[level3_1, "single", null, 2000], [level3_2, "single", null, 2000], [level3_3, "single", null, 2000], [level3_4, "single", null, 2000], [level3_5, "single", null, 2000], [level3_6, "single", null, 2000], [level3_7, "single", null, 2000], [level3_8, "single", null, 2000], [level3_9, "single", null, 2000], [level3_10, "single", null, 1000], [level3_11, "loop", 6, 500], [level3_12, "single", null, 2000], [level3_13, "single", null, 1000], ["blank", 500, 2], [level3_14, "single", null, 2000], [level3_15, "single", null, 500], ["blank", 500, 1], [level3_16, "single", null, 1500], ["blank", 500, 1], [level3_17, "single", null, 1500], ["blank", 500, 1], [level3_18, "single", null, 2000], [level3_19, "single", null, 2000], [level3_20, "single", null, 2000], [level3_21, "single", null, 500], [level3_22, "loop", 4, 500], [level3_23, "single", null, 500], [level3_24, "single", null, 2000], [level3_25, "single", null, 1500], [level3_26, "loop", 12, 500]]; ninjaStarPositions = [[2020, 1320], [2110, 1320], [2200, 1320], [2290, 1320], [2380, 1320], [2470, 1320], [0x0A00, 1320], [2650, 1320], [2740, 1320], [2830, 1320], [2065, 1345], [2155, 1345], [2245, 1345], [2335, 1345], [2425, 1345], [2515, 1345], [2605, 1345], [2695, 1345], [2785, 1345], [5259, 2220], [5496, 2168], [5283, 2028], [5389, 2360], [5611, 2176], [5253, 2108], [5317, 2282], [5272, 2368], [5526, 2330], [5331, 2436], [5198, 2318], [5173, 2176], [5337, 2168], [5158, 2078], [5489, 2406], [5432, 2228], [5411, 2088], [5563, 2258], [5661, 2330], [6010, 2209], [5797, 2069], [5791, 2469], [6125, 2217], [5767, 2149], [5719, 2391], [5674, 2477], [5928, 2439], [5733, 2546], [5600, 2427], [5687, 2217], [5852, 2209], [5673, 2119], [5892, 2516], [5834, 2338], [5925, 2129], [5965, 2368], [6140, 1921], [6208, 1921], [6273, 1921], [6345, 1921], [6413, 1921], [6486, 1921], [6555, 1921], [6623, 1921], [6700, 1921], [6778, 1921], [6855, 1921], [6933, 1921], [8060, 1712], [8125, 1712], [8197, 1712], [8265, 1712], [8338, 1712], [8407, 1712], [8475, 1712], [8552, 1712], [8630, 1712], [8707, 1712], [8785, 1712], [8907, 258], [8972, 270], [9039, 280], [8834, 252], [8753, 244], [10612, 417], [10687, 406], [10754, 398], [10538, 428], [10470, 435], [10404, 438], [10010, 1607], [10075, 1607], [10147, 1607], [10215, 1607], [10288, 1607], [10357, 1607], [10425, 1607], [10502, 1607], [10580, 1607], [10657, 1607], [10735, 1607], [11827, 1406], [11891, 1406], [11963, 1406], [12047, 1350], [12112, 1350], [12184, 1350], [12252, 1350], [12325, 1350], [12394, 1350], [12462, 1350], [12539, 1404], [12617, 1404], [12694, 1404], [12883, 234], [12946, 239], [13014, 241], [12816, 237], [12752, 239], [15823, 206], [15899, 195], [15965, 187], [15750, 217], [15681, 223], [15615, 227], [13874, 1151], [13939, 1151], [14011, 1151], [14079, 1151], [14152, 1151], [14221, 1151], [14289, 1151], [14366, 1151], [14444, 1151], [14521, 1151], [14599, 1151], [13216, 234], [13279, 239], [13347, 241], [13149, 237], [13084, 239], [14673, 1151], [13812, 1151], [27854, 1068], [27738, 1009], [24883, 445], [24998, 490], [25107, 429], [25005, 371], [25229, 493], [25107, 573], [25258, 605], [25370, 523], [25258, 381], [25386, 438], [25488, 518], [25594, 415], [25482, 621], [25693, 557], [27626, 902], [27667, 969], [27818, 989], [27939, 1078], [28035, 1133], [28128, 1250], [28266, 1274], [27974, 1166], [28218, 1230], [25715, 475], [25830, 520], [25939, 459], [25837, 401], [26061, 523], [25939, 603], [26090, 635], [26202, 553], [26090, 411], [26218, 468], [26320, 548], [26426, 445], [26314, 651], [26525, 587], [36501, 1573], [36462, 1520], [36424, 1469], [36325, 1408], [36378, 1429], [36846, 1373], [36891, 1334], [36934, 1293], [37504, 1098], [37563, 1089], [37625, 1084], [37681, 1078], [37732, 1075], [35320, 1943], [35385, 1941], [35454, 1937], [35526, 1932], [35593, 1926], [38206, 1268], [38256, 1323], [0x9595, 1253], [38121, 1117], [38226, 1385], [38157, 1205], [38221, 1203], [38176, 1147], [38166, 1323], [38303, 1368], [35659, 1917], [36229, 1686], [36165, 1936], [36491, 1917], [36504, 1750], [36594, 1834], [36318, 1962], [36344, 1616], [36619, 1949], [36434, 2019], [36094, 1654], [36242, 1827], [36018, 1840], [36363, 1840], [36120, 1782], [36376, 1725], [35924, 2006], [36199, 2070], [36288, 2154], [36039, 1936], [35936, 2147], [36058, 2160], [36071, 2045], [36534, 2064], [36860, 2045], [36688, 2090], [36988, 2077], [36803, 2147], [36421, 2100], [36344, 2286], [36446, 2228], [42081, 339], [42017, 589], [42343, 570], [42356, 403], [42446, 486], [42170, 614], [42196, 269], [42471, 602], [42286, 672], [41946, 307], [42094, 480], [41870, 493], [42215, 493], [41972, 435], [42228, 378], [41776, 659], [42051, 723], [42140, 806], [0xA3A3, 589], [41788, 800], [41910, 813], [41923, 698], [42386, 717], [42627, 456], [42540, 742], [42755, 488], [42570, 559], [42273, 753], [42196, 939], [42298, 881], [42657, 811], [42670, 644], [42760, 728], [42785, 843], [42700, 958], [42941, 698], [42854, 984], [43069, 730], [42884, 800], [45385, 1574], [45321, 1824], [45647, 1805], [45660, 1638], [45750, 1722], [45475, 1850], [45500, 1504], [45775, 1837], [45590, 1907], [45251, 0x0606], [45398, 1715], [45174, 1728], [45519, 1728], [45276, 1670], [45532, 1613], [45080, 1894], [45355, 1958], [45445, 2042], [45195, 1824], [45093, 2035], [45214, 0x0800], [45227, 1933], [45690, 1952], [45931, 1692], [45844, 1978], [46059, 1724], [45874, 1794], [45577, 1988], [45500, 2174], [45603, 2116], [45961, 2046], [45974, 1880], [46064, 1963], [46089, 2078], [46004, 2193], [46245, 1933], [46158, 2219], [46373, 1965], [46188, 2035], [45716, 1551], [45844, 1583], [46124, 1818], [46137, 1651], [46226, 1734], [46252, 1850], [46408, 1704], [46536, 1736], [46350, 1807], [45735, 2127], [45863, 2159], [45778, 2274], [45931, 2300], [45775, 2042], [20795, 160], [20842, 189], [20876, 234], [20893.95, 283], [20886.95, 329], [20865, 374], [20832, 412], [20791, 437], [20743, 446], [20694, 434], [20651, 412], [20617, 374], [20598, 333], [20593, 290], [21424, 374], [21391, 412], [21350, 437], [21302, 446], [21253, 434], [21210, 412], [21176, 374], [21157, 333], [21152, 290], [40462, 587.95], [40414, 611.95], [40351, 623.95], [40291, 615.95], [40241.05, 593.95], [40199.05, 566.95], [40167.05, 530.95], [40145.05, 488.95], [40132.05, 443.95], [40130.05, 396.95], [40139.05, 345.95], [40504, 553.1], [40535, 515.1], [40556.05, 475.1], [40565.05, 432.05], [40566.05, 385.05], [40556.05, 339.05], [40535, 295.05], [40501, 0x0100]]; driveOverObstaclesDef = [["car", 41623, 160]]; deathDropSensorsDef = [[21199, -250, 21199, 3]]; loopDef = [[20742, 120, "small"], [21301, 120, "small"], [40360, 160, "normal"], [41101, 160, "small"]]; loweringPlatformsArray = [[1350, 1301], [46301, 1319], [47301, 1319]]; terrainDefinition = <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="70000" height="2000" id="svg2"> <defs id="defs4"/> <g transform="translate(0,947.63782)" id="layer1"> <path d="m 800,1920 1000,0 c 0,0 2280,-440 3440,-1640 400,-440 640,40 640,40 l 0,1280 80,280 c 0,0 320,-100 400,-60 80,40 80,100 120,100 40,0 160,40 240,-40 80,-80 40,-80 80,-120 40,-40 360,-40 400,0 40,40 120,160 160,120 40,-40 240,-40 240,-40 0,0 160,40 200,40 40,0 240,-40 320,-40 80,0 360,40 400,40 40,0 560,-80 600,-80 40,0 360,160 480,120 120,-40 320,-80 360,-120 40,-40 40,-80 80,-120 60,-60 680,0 720,40 40,40 480,200 560,160 80,-40 400,-40 480,-40 80,0 440,40 520,40 80,0 680,-40 840,-40 160,0 240,80 600,80 360,0 255.517,-47.7199 320,-80 160,-80 680,80 840,80 160,0 280,-80 440,-80 160,0 560,80 720,80 160,0 320,0 320,0" transform="translate(0,-947.63782)" id="path2844" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 6080,260 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2944" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 7920,460 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2946" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 9920,620 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2970" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 11760,820 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2972" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 13760,1020 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2974" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 16400,1920 c 0,0 380,-60 460,-60 80,0 100,20 140,20 40,0 180,0 200,-20 20,-20 60,-80 100,-80 40,0 240,-20 320,-20 80,0 220,0 240,20 20,20 200,60 300,60 100,0 200,40 340,40 140,0 3440,0 3440,0 0,0 1680,0 2300,-180 720,-220 680,40 680,40 l 0,760" transform="translate(0,-947.63782)" id="path2976" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 26410,1981.2434 26340,1860 l 831.384,-480.0002 70,121.2434 -831.384,480.0002 z" transform="translate(0,-947.63782)" id="path2978" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 27630,1321.2436 -70,-121.2435 831.383,-480.00003 70,121.2435 L 27630,1321.2436 z" transform="translate(0,-947.63782)" id="path2982" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 29356.235,775.22962 29320,640 l 927.289,-248.46628 36.235,135.22962 -927.289,248.46628 z" transform="translate(0,-947.63782)" id="path2984" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 31156.235,455.22962 31120,320 l 927.289,-248.46628 36.235,135.22962 -927.289,248.46628 z" transform="translate(0,-947.63782)" id="path2986" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 33040,80 c 0,0 440,-40 560,-40 120,0 400,40 520,40 120,0 80,240 160,240 80,0 400,80 480,80 80,0 120,-120 240,-160 120,-40 80,-80 120,-120 40,-40 600,-40 680,80 80,120 0,400 240,440 240,40 400,-40 440,-120 40,-80 426.334,172.66874 480,280 40,80 240,120 240,120 0,0 280,40 280,120 0,80 40,280 360,240 320,-40 240,-240 360,-280 120,-40 400,40 520,320 120,280 320,120 360,240 40,120 40,240 120,240 80,0 200,40 280,40 80,0 2340,0 2340,0 l 0,660" transform="translate(0,-947.63782)" id="path2988" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </g> <path d="m 33040,2500 0,-2420" id="path2878" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 42400,2500 c 0,-20 0,-660 0,-660 0,0 1040,-20 2420,-1140 363.86,-295.30658 460,0 460,0 l 0,1300" id="path2880" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 45280,1920 8360,0" id="path2882" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 0,580 800,0 0,1420" id="path2832" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 1960,860 0,-140 960,0 0,140 -960,0 z" id="path2975" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </svg> ; break; case 4: newBikeX = 195; newBikeY = 501; checkPointFlagX = 18329; checkPointFlagY = 1904; checkPointFlagTwoX = 28743; checkPointFlagTwoY = 1237; finishLineX = 48057; finishLineY = 380; seconds = 180; levelTerrainSprites = [[level4_1, "single", null, 1500], ["blank", 500, 5], [level4_2, "single", null, 2000], [level4_3, "single", null, 2000], [level4_4, "single", null, 2000], [level4_5, "single", null, 2000], [level4_6, "single", null, 1000], [level4_7, "loop", 2, 500], [level4_8, "single", null, 500], ["blank", 500, 1], [level4_9, "single", null, 2000], [level4_10, "single", null, 2000], [level4_11, "single", null, 2000], [level4_12, "single", null, 2000], [level4_13, "single", null, 1500], ["blank", 500, 5], [level4_14, "single", null, 2000], [level4_15, "single", null, 2000], [level4_16, "single", null, 2000], [level4_17, "single", null, 500], [level4_18, "loop", 4, 500], [level4_19, "single", null, 500], ["blank", 500, 2], [level4_20, "single", null, 2000], [level4_21, "single", null, 2000], [level4_22, "single", null, 1500], [level4_23, "single", null, 2000], [level4_24, "single", null, 2000], [level4_25, "loop", 4, 500]]; ninjaStarPositions = [[6181, 188], [6258, 197], [6328, 207], [4969, 169], [5035, 158], [5104, 148], [5173, 134], [5247, 126], [5826, 247], [5897, 241], [5969, 228], [6033, 215], [6103, 199], [0x1900, 217], [6466, 231], [12192, 275], [12255, 222], [12322, 178], [12399, 145], [12483, 121], [12584, 108], [11294, 484], [11361, 488], [11426, 488], [11500, 488], [11579, 491], [11666, 491], [11754, 486], [11853, 482], [11953, 473], [12076, 457], [16192, 275], [16255, 222], [16322, 178], [16399, 145], [16483, 121], [16584, 108], [14320, 250], [14414, 275], [14542, 278], [14669, 275], [14418, 187], [14522, 202], [14498, 360], [14365, 381], [14616, 430], [14458, 478], [14758, 349], [14723, 467], [14838, 437], [14635, 342], [14566, 518], [14899, 331], [14813, 560], [14698, 584], [14979, 427], [14949, 536], [15078, 499], [15059, 326], [14822, 258], [15389, 437], [15454, 507], [15525, 574], [15595, 642], [15658, 712], [15728, 778], [15798, 853], [15882, 931], [15952, 1002], [15370, 510], [15448, 603], [15522, 666], [15648, 790], [15803, 931], [15886, 1014], [15976, 1101], [19272, 2122], [19378, 2090], [19349, 2186], [19400, 1978], [19307, 2045], [19486, 2131], [19477, 2054], [19429, 2218], [19432, 2118], [19512, 2227], [19384, 2035], [19374, 2282], [19285, 2198], [19480, 2288], [19557, 2170], [19573, 2083], [19598, 2243], [19650, 2147], [19544, 2323], [19416, 2358], [19490, 2390], [19650, 2323], [19592, 2410], [19701, 2221], [19765, 2314], [19522, 2483], [19573, 2013], [19723, 2074], [19320, 2317], [19717, 2387], [21858, 1941], [21963, 1909], [21934, 2005], [21986, 1797], [21893, 1864], [22072, 1951], [22062, 1874], [22629, 1749], [22018, 1938], [22712, 1759], [21970, 1855], [0x5858, 1827], [21870, 2018], [22680, 1820], [22142, 1989], [22158, 1903], [22798, 1775], [22235, 1967], [22744, 1855], [0x5858, 1890], [22690, 1922], [22850, 1855], [22792, 1941], [22866, 1752], [22914, 1832], [22722, 2015], [22158, 1832], [22309, 1893], [22629, 1971], [22859, 1919], [31944, 1485], [32180, 1433], [31967, 1293], [32073, 1625], [32296, 1441], [31937, 1373], [32001, 1547], [31956, 1633], [32210, 1595], [32016, 1701], [31883, 1583], [31857, 1441], [32022, 1433], [31843, 1343], [32174, 1671], [32116, 1493], [32096, 1353], [32248, 1523], [33007, 888], [33356, 767], [33143, 628], [33136, 1027], [33407, 858], [33113, 707], [33064, 949], [33020, 1035], [33274, 997], [33079, 1104], [32285, 1692], [33033, 775], [33197, 767], [33018, 677], [33237, 1074], [33180, 896], [33271, 687], [33311, 926], [41494, 500], [41580, 500], [41668, 500], [41754, 500], [41842, 500], [41936, 500], [42029, 500], [42114, 500], [42202, 500], [42288, 500], [42376, 500], [42594, 500], [42680, 500], [42768, 500], [42854, 500], [42942, 500], [43036, 500], [43129, 500], [43214, 500], [43302, 500], [43388, 500], [43476, 500], [43730, 500], [43816, 500], [43904, 500], [43990, 500], [44078, 500], [44172, 500], [44265, 500], [44350, 500], [44438, 500], [44524, 500], [44612, 500], [13535, 531.95], [13472, 543.95], [13412, 535.95], [13362.05, 513.95], [13320.05, 486.95], [13288.05, 450.95], [35103, 594], [35070, 632], [35029, 657], [34981, 666], [34932, 654], [34889, 632], [34855, 594], [34836, 553], [34831, 510], [35123, 554], [35128, 507], [35115, 462], [35091, 421], [35055, 389], [34603, 594], [34570, 632], [34529, 657], [34481, 666], [34432, 654], [34389, 632], [34623, 554], [34070, 632], [34029, 657], [33981, 666], [33932, 654], [33889, 632], [33854, 597], [33831, 553], [3011.9, 1092], [3080.9, 1092], [3148.95, 1092], [3214.95, 1092], [3284.95, 1092], [3350.95, 1092], [3419, 1092], [3494, 1092], [3567, 1092], [3637, 1092], [3706, 1092], [3777, 1092], [3847.05, 1092], [3913.05, 1092], [24660.9, 1482], [24729.9, 1482], [24797.95, 1482], [24863.95, 1482], [24933.95, 1482], [24999.95, 1482], [25068, 1482], [25143, 1482], [25216, 1482], [25286, 1482], [25355, 1482], [25426, 1482], [25496.05, 1482], [25562.05, 1482], [25960.9, 1382], [26029.9, 1382], [26097.95, 1382], [26163.95, 1382], [26233.95, 1382], [26299.95, 1382], [0x6700, 1382], [26443, 1382], [26516, 1382], [26586, 1382], [26655, 1382], [26726, 1382], [26796.05, 1382], [26862.05, 1382], [44910.9, 418], [44979.9, 418], [45047.95, 418], [45113.95, 418], [45183.95, 418], [45249.95, 418], [45318, 418], [45393, 418], [45466, 418], [45536, 418], [45605, 418], [45676, 418], [45746.05, 418], [45812.05, 418]]; driveOverObstaclesDef = [["car", 14101, 80], ["tireswithramp", 35533, 340]]; deathDropSensorsDef = [[23041, -250, 23041, 3]]; loopDef = [[13481, 80, "normal"], [33980, 340, "small"], [34480, 340, "small"], [34980, 340, "small"]]; loweringPlatformsArray = [[2197, 1331], [3458, 1001], [25107, 1391], [26407, 1291], [45357, 327]]; terrainDefinition = <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="70000" height="2000" id="svg2831"> <defs id="defs2833"/> <g transform="translate(0,947.63782)" id="layer1"> <path d="m 0,620 660,0 c 0,0 320,0 500,-60 174.9286,-58.30953 160,40 160,40 l 0,1900" transform="translate(0,-947.63782)" id="path2843" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 4480,2500 0,-580 300,-60 c 119.198,-22.2234 332.906,24.6736 460,40 100,0 500,-60 500,-60 149.5026,-20.2031 330.9035,62.0203 440,60 141.4214,-4.0406 380,-60 380,-60 0,0 244.6396,-8.8934 380,80 120,80 260,0 620,-120 349.8571,-116.619 360,-80 360,-80 0,0 40,0 160,40 120,40 320,-80 360,-160 40,-80 400,-120 480,-80 80,40 440,120 480,80 40,-40 360,-120 440,-80 80,40 200,40 200,40 0,0 280,120 320,280 40,160 480,40 520,0 40,-40 40,-40 120,-160 91.483,-137.2252 960,-80 1080,0 120,80 200,240 560,240 360,0 1640,0 1640,0 l 0,580" transform="translate(0,-947.63782)" id="path2849" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <g transform="translate(14520,292.32675)" id="1"/> <path d="M 15478.995,1718.9949 15380,1620 l 678.823,-678.82251 98.994,98.99491 -678.822,678.8225 z" transform="translate(0,-947.63782)" id="path2865" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 23520,600 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2876" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 16670,821.24356 16600,700 l 831.384,-480 70,121.24356 -831.384,480 z" transform="translate(0,-947.63782)" id="path2878" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 17780,2500 0,-2300 c 0,0 460,-140 740,-100 280,40 120,140 300,160 180,20 300,-20 340,-60 40,-40 80,-100 100,-100 20,0 320,120 320,120 0,0 0,120 60,140 60,20 180,60 220,20 40,-40 40,-100 80,-80 40,20 480,60 500,140 20,80 140,160 160,160 20,0 240,0 280,-160 40,-160 280,-160 440,-160 160,0 220,180 220,180 0,0 40,60 160,40 120,-20 117.574,-33.32993 160,-100 0,0 20,-30 60,-120 54.489,-122.60067 335.949,222.02031 540,220 228.294,2.02031 120,-160 200,-200 100.655,-50.32744 220.16,119.47341 300,120 79.998,0.52764 460,0 460,0 l 0,2080" transform="translate(0,-947.63782)" id="path2880" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 27080,940 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2884" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 28400,2500 0,-1680 c 0,0 162.548,-17.90291 220,-40 106.986,-22.81263 220,-20 300,0 120,40 200,20 200,20 0,0 180,-40 240,-40 60,0 240,80 260,60 20,-20 180,-60 200,-60 20,0 180,80 180,140 0,60 80,140 160,140 80,0 200,-20 240,-80 40,-60 20,-120 100,-140 80,-20 360,-20 480,200 120,220 340,220 440,200 100,-20 360,-160 380,-280 20,-120 60,-180 180,-160 120,20 240,117.53789 240,200 0,80 200,160 240,140 40,-20 100,-120 140,-60 23.171,34.7568 47.219,58.0472 80,140 40,100 187.713,-36.8613 200,0 40,120 -144.858,206.5605 -140,260 20,220 380,200 380,200 l 2580,0 0,840" transform="translate(0,-947.63782)" id="path2886" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </g> <path d="m 37360,2500 0,-920 360,-20 c 100,0 120,-40 300,20 40,20 380,-40 500,-20 120,20 580,40 620,20 40,-20 280,-40 340,-40 60,0 300,20 360,40 60,20 540,-60 680,-40 140,20 400,40 500,40 100,0 260,0 260,0 l 0,920" id="path2826" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 41460,1740 0,-140 960,0 0,140 -960,0 z" id="path2837" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 42560,1740 0,-140 960,0 0,140 -960,0 z" id="path2839" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 43680,1740 0,-140 960,0 0,140 -960,0 z" id="path2841" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 46080,2500 0,-880 4700,0" id="path2854" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </svg> ; break; case 5: newBikeX = 195; newBikeY = 501; checkPointFlagX = 22481; checkPointFlagY = 1600; checkPointFlagTwoX = 38556; checkPointFlagTwoY = 140; finishLineX = 52500; finishLineY = 600; seconds = 180; levelTerrainSprites = [[level5_1, "single", null, 2000], [level5_2, "single", null, 2000], [level5_3, "single", null, 2000], [level5_4, "single", null, 2000], [level5_5, "single", null, 1500], ["blank", 500, 1], [level5_6, "single", null, 2000], [level5_7, "single", null, 1500], ["blank", 500, 4], [level5_8, "single", null, 500], [level5_9, "loop", 3, 500], [level5_10, "single", null, 500], ["blank", 500, 2], [level5_11, "single", null, 2000], [level5_12, "single", null, 2000], [level5_13, "single", null, 500], ["blank", 500, 1], [level5_14, "single", null, 1500], ["blank", 500, 1], [level5_15, "single", null, 1500], ["blank", 500, 1], [level5_16, "single", null, 2000], [level5_17, "single", null, 2000], [level5_18, "single", null, 2000], [level5_19, "single", null, 2000], [level5_20, "single", null, 2000], [level5_21, "single", null, 2000], [level5_22, "single", null, 2000], [level5_23, "single", null, 2000], [level5_24, "single", null, 1500], ["blank", 500, 10], [level5_25, "single", null, 500], [level5_26, "loop", 4, 500]]; ninjaStarPositions = [[1387, 0x0505], [1466, 1268], [1547, 1245], [1632, 1217], [1727, 1182], [1829, 1133], [1926, 1078], [2014, 1026], [2120, 976], [2219, 936], [6044, 701], [6014, 786], [6112, 756], [6083, 833], [6003, 880], [6151, 953], [5994, 958], [6082, 906], [6188, 848], [5959, 726], [6299, 756], [6269, 842], [6367, 812], [6338, 888], [6258, 935], [6406, 1008], [6249, 1013], [6337, 961], [6443, 904], [6214, 782], [6553, 691], [6523, 777], [6621, 747], [6592, 823], [6512, 870], [6660, 943], [6503, 948], [6591, 896], [6697, 839], [6468, 717], [6079, 988], [6049, 1073], [6147, 1043], [6118, 1120], [6205, 1095], [6367, 1167], [6197, 1172], [6285, 1120], [6345, 1049], [5994, 1013], [21615, 1691], [21713, 1691], [21817, 1691], [21914, 1691], [22013, 1691], [22113, 1691], [22224, 1691], [22326, 1691], [22433, 1691], [22535, 1691], [22617, 1691], [22700, 1691], [22795, 1691], [22895, 1691], [22999, 1691], [23114, 1691], [23229, 1691], [23342, 1691], [23446, 1691], [26488, 1276], [26586, 1276], [26690, 1276], [26787, 1276], [26886, 1276], [26987, 1276], [27097, 1276], [27199, 1276], [27306, 1276], [32842, 1185], [33135, 1198], [32992, 1242], [32982, 1139], [32885, 1077], [33003, 1061], [32924, 1198], [32912, 1293], [33069, 1237], [33012, 1323], [33064, 1144], [33083, 1310], [32954, 1376], [32866, 1374], [33042, 1430], [32957, 1462], [33101, 1400], [32851, 1269], [33165, 1299], [32877, 1460], [34595, 945], [34743, 891], [34702, 1198], [34590, 832], [34520, 792], [34611, 754], [34532, 891], [34520, 986], [34677, 930], [34620, 1016], [34672, 837], [34691, 1003], [34562, 1069], [34773, 784], [34650, 1123], [34590, 1174], [34709, 1093], [34856, 1067], [34773, 992], [34888, 884], [34637, 1238], [34784, 1190], [34691, 765], [34787, 1114], [34867, 1181], [34736, 1293], [37430, 298], [37491, 297], [37550, 293], [37612, 287], [37667, 277], [41381, 854], [41429, 904], [41475, 950], [41525, 997], [41573, 1045], [41621, 1090], [41669, 1133], [41712, 1178], [41757, 1221], [41805, 1266], [41850, 1312], [41894, 1360], [41939, 1405], [41987, 1450], [43229, 1611], [43315, 1611], [43398, 1611], [43486, 1611], [43574, 1611], [43667, 1611], [43757, 1611], [43840, 1611], [43925, 1611], [44054, 1611], [44141, 1611], [44224, 1611], [44312, 1611], [44400, 1611], [44493, 1611], [44582, 1611], [44666, 1611], [44750, 1611], [44840, 1611], [44933, 1611], [45022, 1611], [45106, 1611], [16602, 647.95], [16554, 671.95], [16491, 683.95], [16431, 675.95], [16381.05, 653.95], [16339.05, 626.95], [16307.05, 590.95], [16285.05, 548.95], [16272.05, 503.95], [16270.05, 456.95], [16279.05, 405.95], [16645, 610.95], [16675, 570.95], [16696, 524.95], [0x4141, 473.95], [16702, 422.95], [16688, 378], [16661, 337], [16621, 299], [9156.9, 164], [9225.9, 164], [9293.95, 164], [9359.95, 164], [9429.95, 164], [9495.95, 164], [9564, 164], [9639, 164], [9712, 164], [9782, 164], [9851, 164], [9922, 164], [9992.05, 164], [10058.05, 164], [13463.9, 342], [13532.9, 342], [13600.95, 342], [13666.95, 342], [13736.95, 342], [13802.95, 342], [13871, 342], [13946, 342], [14019, 342], [14089, 342], [14158, 342], [14229, 342], [14299.05, 342], [14365.05, 342], [14566.9, 304], [14635.9, 304], [14703.95, 304], [14769.95, 304], [14839.95, 304], [14905.95, 304], [14974, 304], [15049, 304], [15122, 304], [15192, 304], [15261, 304], [15332, 304], [15402.05, 304], [15468.05, 304], [45966.9, 1411], [46035.9, 1411], [46103.95, 1411], [46169.95, 1411], [46239.95, 1411], [46305.95, 1411], [46374, 1411], [46449, 1411], [46522, 1411], [0xB600, 1411], [46661, 1411], [46732, 1411], [46802.05, 1411], [46868.05, 1411], [47166.9, 1211], [47235.9, 1211], [47303.95, 1211], [47369.95, 1211], [47439.95, 1211], [47505.95, 1211], [47574, 1211], [47649, 1211], [47722, 1211], [47792, 1211], [47861, 1211], [47932, 1211], [48002.05, 1211], [48068.05, 1211], [48366.9, 1011], [48435.9, 1011], [48503.95, 1011], [48569.95, 1011], [48639.95, 1011], [48705.95, 1011], [48774, 1011], [48849, 1011], [48922, 1011], [48992, 1011], [49061, 1011], [49132, 1011], [49202.05, 1011], [49268.05, 1011], [49566.9, 811], [49635.9, 811], [49703.95, 811], [49769.95, 811], [49839.95, 811], [49905.95, 811], [49974, 811], [50049, 811], [50122, 811], [50192, 811], [50261, 811], [50332, 811], [50402.05, 811], [50468.05, 811]]; driveOverObstaclesDef = [["canswithoil", 17437, 220]]; deathDropSensorsDef = [[25310, -250, 25310, 3]]; loopDef = [[16500, 220, "normal"]]; loweringPlatformsArray = [[9603, 73], [13910, 251], [15013, 213], [46413, 1320], [47613, 1120], [48813, 920], [50013, 720]]; terrainDefinition = <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="70000" height="2000" id="svg2"> <defs id="defs4"/> <g transform="translate(0,947.63782)" id="layer1"> <path d="m 0,680 800,0 c 0,0 720,0 1120,280 410.5979,287.4185 1200,160 1520,160 240,0 640,280 640,280 365.7143,34.2857 420,0 540,-20 120,-20 220,0 360,0 140,0 170,90 260,100 107.0446,11.8938 220,-50 260,10 40,60 360,70 420,30 60,-40 20,-160 120,-140 100,20 120,100 280,100 160,0 260,0 300,40 40,40 120,60 220,60 100,0 176.6139,149.1535 220,160 40,10 90,10 90,10 50,-20 180,-20 250,-70 50,-30 160,20 200,80 33.282,49.923 180,-90 210,-50 30,40 30,70 150,70 42.4264,0 120,-20 160,20 40,40 320,50 360,50 l 580,0 0,650" transform="translate(0,-947.63782)" id="path2820" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 10150,2500 0,-620 c 0,0 10,-30 50,-30 40,0 100,0 100,0 0,0 70,-10 90,-20 20,-10 90,0 100,30 10,30 260,10 290,-40 30,-50 30,-70 70,-80 40,-10 250,-60 290,-40 37.947,18.9737 270,-30 280,-60 10,-30 49.321,-42.3304 80,-50 40,-10 190,-80 200,-30 8.771,43.8529 161.026,46.3246 180,40 60,-20 10,-130 150,-130 42.426,0 130,10 170,30 35.777,17.8885 260,160 680,160 l 480,0 0,840" transform="translate(0,-947.63782)" id="path2822" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 15640,2500 0,-680 c 0,0 80,-40 280,-40 l 1600,0 0,720" transform="translate(0,-947.63782)" id="path2824" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 21560,540 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2835" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 19318.995,1818.9949 19220,1720 l 707.107,-707.1068 98.995,98.995 -707.107,707.1067 z" transform="translate(0,-947.63782)" id="path2837" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 20430,1061.2436 20360,940 l 831.384,-480 70,121.24356 L 20430,1061.2436 z" transform="translate(0,-947.63782)" id="path2839" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 22520,540 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2841" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </g> <path d="m 24380,720 0,-140 960,0 0,140 -960,0 z" id="path2825" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 26420,960 0,-140 960,0 0,140 -960,0 z" id="path2829" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 28220,1180 0,-140 960,0 0,140 -960,0 z" id="path2831" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 29440,2500 0,-1060 c 0,0 480,-200 680,-180 200,20 320,120 620,80 300,-40 320,-100 480,-80 160,20 120,80 180,120 16.641,11.094 87.685,20 240,20 140,0 180,0 280,-100 186.011,-186.0108 380,-140 420,-80 45.742,68.6126 340,100 480,20 140,-80 60,-240 160,-240 100,0 100,120 180,180 0,0 111.875,77.1875 340,60 100,0 340,20 380,180 40,160 560,220 620,100 60,-120 0,-240 120,-220 120,20 360,200 340,340 -20,140 200,180 280,120 80,-60 20,-160 100,-160 72.111,0 280,140 400,140 120,0 140,0 140,0 0,0 120,20 180,100 60,80 500,100 620,100 0,0 60,0 220,-20 143.108,-17.8885 158.261,-33.7199 220,-20 180,40 220,-20 240,-80 20,-60 20,-80 60,-80 40,0 220,0 240,40 20,40 60,20 160,0 100,-20 60,-60 100,-80 40,-20 140,-20 160,60 20,80 260,100 260,100 l 380,0 0,640" id="path2833" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 38816.235,2015.2296 38780,1880 l 927.289,-248.4663 36.234,135.2296 -927.288,248.4663 z" id="path2838" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 40190,1761.2436 40120,1640 l 831.384,-480 70,121.2436 -831.384,480 z" id="path2840" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 41458.995,1318.9949 41360,1220 l 678.823,-678.82251 98.994,98.99495 -678.822,678.82246 z" id="path2842" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 42320,640 0,-140 960,0 0,140 -960,0 z" id="path2844" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 43280,640 0,-140 960,0 0,140 -960,0 z" id="path2846" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 44240,640 0,-140 960,0 0,140 -960,0 z" id="path2848" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 50620,2500 0,-1100 5500,0" id="path2852" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </svg> ; break; case 6: newBikeX = 195; newBikeY = 801; checkPointFlagX = 19264; checkPointFlagY = 680; checkPointFlagTwoX = 43691; checkPointFlagTwoY = 170; finishLineX = 59500; finishLineY = 680; seconds = 180; levelTerrainSprites = [[level6_1, "single", null, 2000], [level6_2, "single", null, 500], [level6_3, "loop", 3, 500], [level6_4, "single", null, 2000], [level6_5, "single", null, 2000], [level6_6, "single", null, 2000], [level6_7, "single", null, 2000], [level6_8, "single", null, 2000], [level6_9, "single", null, 1000], ["blank", 500, 6], [level6_10, "single", null, 2000], [level6_11, "single", null, 2000], [level6_12, "single", null, 2000], [level6_13, "single", null, 2000], [level6_14, "single", null, 2000], [level6_15, "single", null, 2000], [level6_16, "single", null, 2000], [level6_17, "single", null, 2000], [level6_18, "single", null, 2000], [level6_19, "single", null, 2000], [level6_20, "single", null, 2000], [level6_21, "single", null, 2000], [level6_22, "single", null, 2000], [level6_23, "single", null, 2000], [level6_24, "single", null, 2000], [level6_25, "single", null, 2000], [level6_26, "single", null, 2000], [level6_27, "single", null, 2000], [level6_28, "single", null, 1500], [level6_29, "loop", 9, 500]]; ninjaStarPositions = [[1534, 472], [1582, 421], [1633, 371], [1689, 326], [1754, 274], [1818, 234], [4208, 307], [4298, 315], [4286, 227], [4436, 312], [4367, 403], [4385, 246], [4553, 254], [4644, 262], [4781, 259], [4712, 350], [4466, 238], [4454, 441], [4545, 449], [4532, 361], [4682, 446], [4631, 380], [4298, 395], [4424, 505], [4268, 490], [4153, 373], [4217, 425], [4775, 471], [4873, 490], [4796, 386], [4886, 394], [5487, 1264], [5578, 1272], [5565, 1184], [5715, 1269], [5646, 1360], [5664, 1203], [5832, 1211], [5923, 1219], [5910, 1131], [6060, 1216], [5992, 1307], [6009, 1151], [5586, 1099], [5677, 1107], [5664, 1019], [5814, 1104], [5746, 1195], [5763, 1039], [5734, 1398], [5824, 1406], [5812, 1318], [5962, 1403], [5893, 1494], [5910, 1337], [5625, 1504], [5578, 1352], [5712, 1541], [5802, 1550], [5704, 1462], [5548, 1447], [5432, 1330], [5496, 1382], [6054, 1428], [6153, 1447], [6075, 1343], [6165, 1351], [5979, 1482], [5985, 1550], [5887, 1616], [6077, 1501], [11810, 1977], [11901, 1986], [11888, 1898], [12038, 1983], [11970, 2074], [11987, 1917], [11910, 1813], [12000, 1821], [11988, 1733], [12069, 1909], [12086, 1752], [11901, 2065], [11820, 2095], [11858, 1815], [11871, 1719], [18718, 782], [18790, 782], [18869, 782], [18949, 706], [19026, 706], [19107, 706], [19189, 778], [19277, 778], [19365, 778], [19448, 778], [19531, 778], [19624, 778], [19710, 706], [19795, 706], [19869, 706], [19946, 706], [20034, 776], [20122, 776], [20205, 776], [20288, 776], [20381, 776], [20467, 776], [20552, 776], [20626, 706], [20706, 706], [20794, 706], [20877, 706], [20960, 706], [21053, 706], [26592, 528], [26669, 573], [26747, 618], [26829, 659], [26910, 709], [26984, 750], [27058, 792], [27133, 840], [27205, 878], [27270, 914], [27336, 955], [29549, 1535], [29626, 1580], [29704, 1625], [29786, 1666], [29867, 1716], [29941, 1757], [30014, 0x0707], [30090, 1847], [30162, 1885], [30227, 1921], [30293, 1962], [34058, 1842], [34088, 1928], [34184, 1973], [34130, 1827], [34200, 1851], [34155, 1912], [34246, 1936], [34118, 1990], [34251, 1995], [34077, 2042], [34136, 2064], [34202, 2058], [34114, 2131], [0x8585, 2134], [34062, 2101], [34051, 1986], [34042, 1928], [34074, 2174], [34128, 2210], [34190, 2192], [34106, 2262], [35775, 1984], [35666, 1834], [35804, 1782], [35861, 1933], [35730, 1952], [35711, 1725], [35964, 2067], [35887, 0x0800], [35922, 2160], [35941, 2000], [35839, 1824], [35788, 2093], [35858, 2192], [35909, 2278], [35925, 2099], [36034, 1862], [35925, 1862], [36005, 2003], [35986, 2179], [36031, 2070], [35834, 1727], [35943, 1743], [37610, 1774], [37640, 1861], [37736, 1906], [37682, 1760], [37768, 1988], [37707, 1845], [37565, 1946], [37670, 1923], [37570, 2005], [37629, 1974], [37688, 1997], [37700, 2240], [37666, 2064], [37733, 2067], [37614, 2034], [37603, 1918], [37594, 1861], [37626, 2107], [37680, 2142], [37742, 2125], [37658, 2195], [37722, 2192], [37565, 2179], [37594, 2256], [37600, 2154], [37581, 2080], [41771, 648], [41892, 618], [42025, 579], [42152, 544], [42264, 0x0200], [42382, 474], [42499, 436], [46706, 298], [46790, 307], [46891, 317], [46981, 325], [47083, 331], [47181, 338], [48894, 314], [48973, 314], [49042, 314], [49110, 314], [49174, 314], [49246, 314], [55101, 1798], [54934, 1718], [55072, 1667], [55187, 1747], [0xD6D6, 1837], [54979, 1610], [55203, 1882], [55069, 1933], [55162, 1974], [55267, 1814], [54890, 1837], [55165, 1638], [54970, 1978], [0xD700, 2077], [55149, 2093], [55251, 2006], [55520, 2070], [55354, 1990], [55491, 1939], [55606, 2019], [55418, 2109], [55398, 1882], [55622, 2154], [55488, 2205], [55581, 2246], [55686, 2086], [55309, 2109], [55584, 1910], [55389, 2250], [55459, 2349], [55568, 2365], [55670, 2278], [55951, 1984], [55785, 1904], [55922, 1853], [56037, 1933], [55849, 2022], [55829, 1795], [56053, 2067], [55919, 2118], [56012, 2160], [56117, 2000], [55740, 2022], [56015, 1824], [55820, 2163], [55890, 2262], [55999, 2278], [56101, 2192], [56210, 1862], [56415, 1907], [56281, 1958], [56373, 2000], [56101, 1862], [56181, 2003], [56252, 2102], [56361, 2118], [56463, 2032], [56329, 2352], [56162, 2272], [56300, 2221], [56415, 2301], [56226, 2390], [56207, 2163], [56431, 2435], [56297, 2486], [56389, 2528], [56495, 2368], [56117, 2390], [56393, 2192], [56197, 2531], [56268, 2630], [56377, 2646], [56479, 0x0A00], [56071, 1448], [55904, 1368], [56042, 1317], [56157, 1397], [55968, 1487], [55949, 1260], [56173, 1532], [56039, 1583], [56131, 1624], [56237, 1464], [55859, 1487], [56135, 1288], [55939, 1628], [56010, 1727], [56119, 1743], [56221, 1656], [56432, 1288], [56330, 1327], [56535, 1372], [56400, 1423], [56493, 1464], [56599, 1304], [56221, 1327], [56301, 1468], [56371, 1567], [56480, 1583], [56583, 1496], [56282, 1736], [56419, 1685], [56535, 1765], [56327, 1628], [56512, 1656], [56856, 1562], [56689, 1482], [56827, 1430], [56942, 1510], [56753, 1600], [56734, 1373], [56958, 1645], [56824, 1696], [56917, 1738], [57022, 1578], [56645, 1600], [56920, 1402], [56725, 1741], [57006, 1770], [57217, 1402], [57115, 1440], [57320, 1485], [57185, 0x0600], [57278, 1578], [57384, 1418], [57006, 1440], [57086, 1581], [57157, 1680], [57265, 1696], [57368, 1610], [57205, 1798], [57112, 1741], [57297, 1770], [56931, 1083], [56764, 1003], [56902, 952], [57017, 1032], [56828, 1121], [56809, 894], [57033, 1166], [56899, 1217], [56991, 1259], [57097, 1099], [56719, 1121], [56995, 923], [56799, 1262], [57081, 1291], [57292, 923], [57190, 961], [57395, 1006], [57260, 1057], [57353, 1099], [57459, 939], [57081, 961], [57161, 1102], [57231, 1201], [57340, 1217], [57443, 1131], [57279, 1320], [57187, 1262], [57372, 1291], [56539, 2469], [56555, 2603], [56619, 2536], [56603, 2728], [56814, 2360], [56712, 2399], [56917, 2443], [56782, 2495], [56875, 2536], [56981, 2376], [56603, 2399], [56683, 2539], [56753, 2639], [56862, 2655], [56965, 2568], [56801, 2757], [56709, 2699], [56894, 2728], [56614, 1990], [56630, 2125], [56588, 2218], [56694, 2058], [56591, 1882], [56678, 2250], [56889, 1882], [56787, 1920], [56991, 1965], [56857, 2016], [56950, 2058], [57055, 1898], [56678, 1920], [56758, 2061], [56828, 2160], [56937, 2176], [57039, 2090], [56876, 2278], [56783, 2221], [56969, 2250], [56155, 1171], [55989, 1091], [56126, 1039], [56241, 1119], [56033, 982], [56321, 1187], [56219, 1011], [56517, 1011], [56414, 1049], [56619, 1094], [56485, 1145], [56577, 1187], [56683, 1027], [56305, 1049], [56385, 1190], [56067, 2561], [56135, 2701], [56302, 2798], [55931, 2787], [56023, 2829], [55476, 2445], [56162, 2832], [55831, 2832], [55902, 2931], [56011, 2947], [55460, 2637], [55520, 2546], [55536, 2680], [55600, 2613], [55796, 2437], [55693, 2475], [55898, 2520], [55764, 2571], [55856, 2613], [55962, 2453], [55584, 2475], [55664, 2616], [55735, 2715], [55844, 2731], [55946, 2645], [55690, 2776], [57228, 2442], [57062, 2362], [57199, 2311], [57315, 2391], [57126, 2480], [57107, 2253], [57331, 2525], [57196, 2576], [57289, 2618], [57395, 2458], [57017, 2480], [57292, 2282], [57097, 2621], [57379, 2650], [57379, 2320], [57459, 2461], [57313, 2164], [57146, 2084], [57284, 2033], [57399, 2113], [57191, 1975], [57377, 2004], [57463, 2043], [3603, 547.95], [3555, 571.95], [3492, 583.95], [3432, 575.95], [3382.05, 553.95], [3340.05, 526.95], [3308.05, 490.95], [3286.05, 448.95], [51233, 634], [0xC800, 672], [51159, 697], [51111, 706], [51062, 694], [51019, 672], [50985, 634], [50966, 593], [50961, 550], [51256, 595.05], [51265, 552.05], [51255, 510.05], [51233, 471.05], [51800, 672], [51759, 697], [51711, 706], [51662, 694], [51619, 672], [51585, 634], [52503, 807.95], [52455, 831.95], [52392, 843.95], [52332, 835.95], [52282.05, 813.95], [52240.05, 786.95], [52208.05, 750.95], [52186.05, 708.95], [52544.95, 773.95], [52576.95, 731.95], [52595.95, 688.95], [52608.95, 645.95], [52609.95, 598.95], [52590.95, 547.95], [52562.95, 501.95], [52527.95, 457], [52167, 664.95], [52166, 616.95], [52175, 571.95], [52194, 527.95], [53191, 672], [53150, 697], [53102, 706], [53053, 694], [53010, 672], [52976, 634], [52953.95, 592.05], [52949.95, 544.05], [53226, 634.1], [53249, 590.05], [53254, 548.05], [53242, 507.05], [53224, 467.05], [53185, 433.05], [53140, 412.05], [52959.95, 501.05], [15913.9, 992], [15982.9, 992], [16050.95, 992], [16116.95, 992], [16186.95, 992], [16252.95, 992], [16321, 992], [16396, 992], [16469, 992], [16539, 992], [16608, 992], [16679, 992], [16749.05, 992], [16815.05, 992], [17013.9, 928], [17082.9, 928], [17150.95, 928], [17216.95, 928], [17286.95, 928], [17352.95, 928], [17421, 928], [17496, 928], [17569, 928], [17639, 928], [17708, 928], [17779, 928], [17849.05, 928], [17915.05, 928]]; driveOverObstaclesDef = [["tireswithramp", 4018, 120]]; deathDropSensorsDef = [[29489, -250, 29489, 3]]; loopDef = [[3501, 120, "normal"], [51110, 380, "small"], [51710, 380, "small"], [52401, 380, "normal"], [53101, 380, "small"]]; loweringPlatformsArray = [[15260, 1018], [16360, 901], [17460, 837]]; terrainDefinition = <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="80000" height="2000" id="svg2"> <defs id="defs4"/> <g transform="translate(0,947.63782)" id="layer1"> <path d="m 0,960 720,0 c 0,0 380,0 560,280 180,280 460,640 880,640 420,0 1980,0 1980,0 l 0,620" transform="translate(0,-947.63782)" id="path2818" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 4880,2500 0,-780 c 0,0 260,-20 420,-360 160,-340 500,-320 500,-320 0,0 122,106 320,160 0,0 920,80 1000,-200 80,-280 320,-360 360,-280 40,80 246.8629,320 360,320 320,0 320,-240 440,-160 120,80 320,40 840,40 320,0 80,-120 360,-80 280,40 800,80 1120,80 320,0 0,-120 280,-80 280,40 320,200 560,200 126.491,0 280,-40 320,-200 40,-160 0,-480 200,-480 200,0 440,160 440,160 0,0 80,240 280,240 200,0 456,-96 600,-80 0,0 360,40 440,120 80,80 880,60 880,60 l 0,1640" transform="translate(0,-947.63782)" id="path2822" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 18240,1460 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2833" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 19200,1460 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2835" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 20160,1460 0,-140 960,0 0,140 -960,0 z" transform="translate(0,-947.63782)" id="path2837" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 25036.235,1975.2296 25000,1840 l 927.289,-248.4663 36.234,135.2296 -927.288,248.4663 z" transform="translate(0,-947.63782)" id="path2841" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 21400,2500 0,-1140 c 0,0 899.334,19.3341 1200,320 160,160 1040,160 1160,160 120,0 880,0 880,0 l 0,660" transform="translate(0,-947.63782)" id="path2843" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 26610,1661.2436 26540,1540 l 831.384,-480 70,121.2436 -831.384,480 z" transform="translate(0,-947.63782)" id="path2845" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 28056.235,975.22966 28020,840 l 927.288,-248.46638 36.235,135.22962 -927.288,248.46642 z" transform="translate(0,-947.63782)" id="path2847" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 29590,641.24356 29520,520 l 831.384,-480 70,121.24356 -831.384,480 z" transform="translate(0,-947.63782)" id="path2851" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 31080,2500 0,-2420 c 0,0 480,-80 560,-40 80,40 400,200 520,160 120,-40 440,-40 520,0 80,40 200,80 200,400 0,320 1000,40 1080,-40 80,-80 40,-320 200,-320 160,0 360,80 400,240 40,160 1000,240 1080,0 91.214,-273.6421 680,-120 760,40 80,160 240,200 280,200 l 360,0 c 0,0 560,2.84262 560,-280 0,-300 540,-100.00002 660,-40 104.297,52.14836 100,55 100,60 0,11 0,521.24685 0,540 l 0,1500" transform="translate(0,-947.63782)" id="path2853" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 38403.765,695.22962 38440,560 l 927.289,248.46628 -36.235,135.22962 -927.289,-248.46628 z" transform="translate(0,-947.63782)" id="path2855" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 39963.765,1135.2296 40000,1000 l 927.289,248.4663 -36.235,135.2296 -927.289,-248.4663 z" transform="translate(0,-947.63782)" id="path2857" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="M 41603.765,1575.2296 41640,1440 l 927.289,248.4663 -36.235,135.2296 -927.289,-248.4663 z" transform="translate(0,-947.63782)" id="path2859" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </g> <path d="m 42600,2500 0,-620 c 0,0 800,0 960,-40 160,-40 560,40 640,40 80,0 680,-80 880,-80 200,0 640,80 840,80 200,0 1280,-160 1360,-120 80,40 0,120 240,120 240,0 1066.334,-47.1115 1120,-65 60,-20 -80,-95 160,-95 280,0 680,0 680,0" id="path2831" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 49480,1720 c 0,0 60,0 40,-60 -20,-80 560,-40 560,-40 l 520,0" id="path2834" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> <path d="m 50600,1620 3080,0 c 0,0 640,20 1000,-660 360,-680 560,-440 560,-440 l 0,800 9680,0" id="path2836" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/> </svg> ; break; }; } function checkIfFinishFlagHasBeenHit():void{ if (((finishFlagIsSet) && (!(crashInitiated)))){ if (!allowFinishLineCountDown){ clockTimer.stop(); deactivateAllKeys(); allowFinishLineCountDown = true; }; }; } function setUpSecondsTillStart():void{ secondsTillStart = new SecondsTillStart(); secondsTillStart.x = 350; secondsTillStart.y = 0xFF; interfaceEMC.addChild(secondsTillStart); deactivateAllKeys(); var _local1:TweenMax = new TweenMax(blackFader, 0.5, {alpha:0}); } function initMainMenuEMC():void{ mainMenuEMC = new Sprite(); addChild(mainMenuEMC); if (!isInit){ isInit = true; googleAnalitycs = new CGoogleAnalitycs(); addChild(googleAnalitycs); if (!google1Complete){ googleAnalitycs.trackEvent(NitroNinjasConfig.GAME_NAME, NitroNinjasConfig.TRACKER_INIT); google1Complete = true; }; }; stage.addEventListener(KeyboardEvent.KEY_DOWN, otherKeyIsDown); } function setUpObstacleRamps():void{ var _local1:int; var _local2:int; var _local3:String; var _local4:int; var _local5:int; var _local6:b2BodyDef; var _local7:b2Body; var _local8:b2PolygonDef; var _local9:String; var _local10:int; var _local11:int; var _local12:Number; var _local13:int; var _local14:int; var _local15:Sprite; var _local16:Array; _local1 = 0; while (_local1 < driveOverObstaclesDef.length) { _local3 = driveOverObstaclesDef[_local1][0]; _local4 = driveOverObstaclesDef[_local1][1]; _local5 = driveOverObstaclesDef[_local1][2]; _local6 = new b2BodyDef(); _local6.position.Set(MF.ptm(_local4), MF.ptm((wholeLevelHeight - _local5))); _local7 = theWorld.CreateBody(_local6); _local8 = new b2PolygonDef(); switch (_local3){ case "car": _local16 = carObstacleConstruction; break; case "tirejunk": _local16 = tireJunkObstacleConstruction; break; case "garbagebags": _local16 = garbageBagObstacleConstruction; break; case "tireswithramp": _local16 = tiresWithRampObstacleConstruction; break; case "canswithoil": _local16 = cansWithOilObstacleConstruction; break; }; _local2 = 0; while (_local2 < _local16.length) { _local9 = _local16[_local2][0]; _local10 = _local16[_local2][1]; _local11 = _local16[_local2][2]; _local12 = _local16[_local2][3]; _local13 = _local16[_local2][4]; _local14 = _local16[_local2][5]; _local8.SetAsOrientedBox(MF.ptm(_local13), MF.ptm(_local14), new b2Vec2(MF.ptm(_local10), MF.ptm(_local11)), MF.toRad(_local12)); _local8.density = 0; _local8.friction = 5; _local8.restitution = 0; _local7.CreateShape(_local8); _local2++; }; _local7.SetMassFromShapes(); _local7.SetUserData("DriveOverObstacle"); switch (_local3){ case "tireswithramp": _local15 = new tiresWithRampSprite(); break; case "tirejunk": _local15 = new tireJunkSprite(); break; case "garbagebags": _local15 = new garbageBagsSprite(); break; case "canswithoil": _local15 = new cansWithOilSprite(); break; case "car": _local15 = new carSprite(); break; }; _local15.x = _local4; _local15.y = (wholeLevelHeight - _local5); ls.obstaclesEMC.addChild(_local15); driveOverObstaclesArray.push(_local7); _local1++; }; } function setUpDeathDropSensors():void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:b2PolygonDef; var _local7:b2BodyDef; var _local8:b2Body; var _local1:int; while (_local1 < deathDropSensorsDef.length) { _local2 = deathDropSensorsDef[_local1][0]; _local3 = (wholeLevelHeight - deathDropSensorsDef[_local1][1]); _local4 = deathDropSensorsDef[_local1][2]; _local5 = deathDropSensorsDef[_local1][3]; _local6 = new b2PolygonDef(); _local6.SetAsBox(MF.ptm(_local4), MF.ptm(_local5)); _local6.density = 0; _local6.isSensor = true; _local7 = new b2BodyDef(); _local7.position.Set(MF.ptm(_local2), MF.ptm(_local3)); _local8 = theWorld.CreateBody(_local7); _local8.CreateShape(_local6); _local8.SetMassFromShapes(); _local8.SetUserData("DeathDropSensor"); _local1++; }; } function updateStatusOfEjectedNinja():void{ var _local1:Number; var _local2:Number; if (ninjaIsEjecting){ if (crashSafetyTimer > 0){ crashSafetyTimer--; if (crashSafetyTimer <= 0){ dieIfSpeedOrTimeRequiredIsMet = true; return; }; }; _local1 = Math.abs(ejectedNinjaBody.GetLinearVelocity().x); _local2 = Math.abs(ejectedNinjaBody.GetLinearVelocity().y); if (theEjectedNinja.currentLabel == "on_bike"){ if ((((_local1 > 0.5)) || ((_local2 > 0.5)))){ theEjectedNinja.gotoAndStop("tuck"); }; } else { if (theEjectedNinja.currentLabel == "tuck"){ theEjectedNinja.rotation = (theEjectedNinja.rotation + 20); if ((((_local1 < 0.5)) && ((_local2 < 0.5)))){ theEjectedNinja.gotoAndPlay("tuck_to_standing"); theEjectedNinja.rotation = 0; dieIfSpeedOrTimeRequiredIsMet = true; }; }; }; }; } function checkIfNeedToReleaseOrangeExhaust():void{ var _local1:Sprite; if (nitroInProgress){ _local1 = new OrangeExhaust(); _local1.x = chassisSprite.x; _local1.y = chassisSprite.y; _local1.rotation = chassisSprite.rotation; ls.exhaustEMC.addChild(_local1); }; } function updateLoweringPlatformSprites():void{ var _local1:int; var _local2:b2Body; var _local3:Sprite; var _local4:Number; var _local5:Number; var _local6:Number; _local1 = 0; while (_local1 < loweringPlatformsCollection.length) { _local2 = loweringPlatformsCollection[_local1]; _local3 = loweringPlatformsSprites[_local1]; _local4 = MF.mtp(_local2.GetPosition().x); _local5 = MF.mtp(_local2.GetPosition().y); _local6 = MF.toDeg(_local2.GetAngle()); _local3.x = _local4; _local3.y = _local5; _local3.rotation = _local6; _local1++; }; } function setUpTerrain():void{ b2SVG.parseSVG(terrainDefinition, theWorld, ratio, 20); } function runByteTracer(_arg1:Event):void{ var _local2:Number = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100); tp.update(_local2); if (_local2 >= 100){ stage.removeEventListener(Event.ENTER_FRAME, runByteTracer); localization.removeIntroBranding(); while (numChildren > 1) { if (getChildAt(0) != localization){ removeChildAt(0); }; }; tp = null; gotoAndStop(2); init(); }; } function respawnFromCrash():void{ ninjaIsEjecting = false; theEjectedNinja.x = 0; theEjectedNinja.y = 0; theEjectedNinja.gotoAndStop("on_bike"); theEjectedNinja.visible = false; theWorld.DestroyBody(ejectedNinjaBody); ejectedNinjaBody = null; livesLeft--; if (livesLeft > -1){ reSpawn(); } else { if (livesLeft <= -1){ levelEnded("GameOver"); }; }; dieIfSpeedOrTimeRequiredIsMet = false; } function initMainMenu():void{ var _local1:String; mainMenuBG = new mainMenuBackground(); mainMenuBG.gotoAndStop("start"); mainMenuEMC.addChild(mainMenuBG); startGame_MM = new StartGame_MM(mainMenuEMC); startGame_MM.x = 112; startGame_MM.y = 307; startGame_MM.buttonMode = true; mainMenuEMC.addChild(startGame_MM); howToPlay_MM = new HowToPlay_MM(mainMenuEMC); howToPlay_MM.x = 344; howToPlay_MM.y = 307; howToPlay_MM.buttonMode = true; mainMenuEMC.addChild(howToPlay_MM); moreGames_MM = new MoreGames_MM(mainMenuEMC); moreGames_MM.x = 576; moreGames_MM.y = 307; moreGames_MM.buttonMode = true; mainMenuEMC.addChild(moreGames_MM); sfxButton = new SoundEffectsButton(mainMenuEMC); sfxButton.x = 635; sfxButton.y = 14; sfxButton.buttonMode = true; if (sfxIsOn){ sfxButton.gotoAndStop("sfxOn"); } else { if (!sfxIsOn){ sfxButton.gotoAndStop("sfxOff"); }; }; mainMenuEMC.addChild(sfxButton); musicButton = new MusicButton(mainMenuEMC); musicButton.x = 603; musicButton.y = 14; musicButton.buttonMode = true; if (musicIsOn){ musicButton.gotoAndStop("musicOn"); } else { if (!musicIsOn){ musicButton.gotoAndStop("musicOff"); }; }; mainMenuEMC.addChild(musicButton); qualityButton = new StageQualityButton(mainMenuEMC); qualityButton.x = 667; qualityButton.y = 14; qualityButton.buttonMode = true; switch (stage.quality){ case "HIGH": _local1 = "highQuality"; break; case "MEDIUM": _local1 = "mediumQuality"; break; case "LOW": _local1 = "lowQuality"; break; }; qualityButton.gotoAndStop(_local1); mainMenuEMC.addChild(qualityButton); localization.loadDisplay(mainMenuEMC); if (blackFader == null){ blackFader = new blackFaderSprite(); addChild(blackFader); blackFader.mouseEnabled = false; }; mainMenuBG.gotoAndPlay("start"); if (((!((musicChannel == null))) && (!((currentMusicPlaying == "mainscreen_music"))))){ musicChannel.stop(); }; if (currentMusicPlaying != "mainscreen_music"){ musicChannel = mainScreenMusic.play(0, 999, musicST); currentMusicPlaying = "mainscreen_music"; }; cameFromGame = false; roomState = "MainMenu"; var _local2:TweenMax = new TweenMax(blackFader, 0.5, {alpha:0}); if (!localizedBugResolved){ locFixSprite = new LocFixSprite(); addChild(locFixSprite); locFixSprite.addEventListener(MouseEvent.MOUSE_MOVE, fixLocBug); }; } function updateVehicleMovement():void{ var _local1:Number = wheel1.GetAngularVelocity(); var _local2:Number = wheel2.GetAngularVelocity(); if (nitroInProgress){ if (nitroPercentage > 0){ nitroPercentage = (nitroPercentage - 0.007); if (_local1 < maxTorque){ wheel1.ApplyTorque(wheelTorque); }; if (_local2 < maxTorque){ wheel2.ApplyTorque(wheelTorque); }; } else { if (nitroPercentage <= 0){ nitroPercentage = 0; nitroInProgress = false; if (nitroChannel != null){ nitroChannel.stop(); nitroChannel = null; }; wheelOneSprite.filters = []; wheelTwoSprite.filters = []; theNinjaOnBike.filters = []; }; }; } else { if ((((upKey == true)) && ((downKey == false)))){ if (_local1 < maxTorque){ wheel1.ApplyTorque(wheelTorque); }; if (_local2 < maxTorque){ wheel2.ApplyTorque(wheelTorque); }; } else { if ((((upKey == false)) && ((downKey == true)))){ if (_local1 > -(maxTorque)){ wheel1.ApplyTorque(-(wheelTorque)); }; if (_local2 > -(maxTorque)){ wheel2.ApplyTorque(-(wheelTorque)); }; }; }; }; if ((((leftKey == true)) && ((rightKey == false)))){ chassis.ApplyTorque(-(rotationTorque)); } else { if ((((leftKey == false)) && ((rightKey == true)))){ chassis.ApplyTorque(rotationTorque); }; }; } public function commenceLevel():void{ secondsTillStart = null; stage.focus = stage; activateAllKeys(); clockTimer.start(); } function defineVariables():void{ downKey = false; upKey = false; leftKey = false; rightKey = false; oneKey = false; twoKey = false; threeKey = false; fourKey = false; keysEnabled = true; maxTorque = normalMaxTorque; wheelTorque = normalWheelTorque; rotationTorque = 170; wheelOneLanded = false; wheelTwoLanded = false; onTheGround = false; degreeCountBegan = false; degreeCount = 0; previousDegrees = 0; rotationCount = 0; driveOverObstaclesArray = []; clockTimer = new Timer(1000); miniSeconds = 0; readyForNitro = false; nitroInProgress = false; nitroPercentage = 0; loweringPlatformsArray = []; loweringPlatformsCollection = []; loweringPlatformsJoints = []; loweringPlatformsSprites = []; tricksExecuted = 0; starsCollected = 0; timesTurboUsed = 0; carObstacleConstruction = [["TheShortBox", -25, -77, -28.3057708740234, 15, 2.5], ["TheShortBox", -52, -63, -28.3057708740234, 15, 2.5], ["TheShortBox", -78, -49, -28.3057708740234, 15, 2.5], ["TheShortBox", -104, -35, -28.3057708740234, 15, 2.5], ["TheShortBox", -131, -21, -28.3057708740234, 15, 2.5], ["TheShortBox", -157, -7, -28.3057708740234, 15, 2.5], ["TheShortBox", 1, -83, 2.57035827636719, 15, 2.5], ["TheShortBox", 30, -81, 4.36286926269531, 15, 2.5], ["TheShortBox", 59, -75, 18.0055847167969, 15, 2.5], ["TheShortBox", 84, -62, 38.3514404296875, 15, 2.5], ["TheShortBox", 109, -50, 10.7024078369141, 15, 2.5], ["TheShortBox", 138, -43, 17.227294921875, 15, 2.5], ["TheShortBox", 152, -23, 73.1979827880859, 15, 2.5], ["TheShortBox", 162, 0, 59.4348907470703, 15, 2.5]]; tireJunkObstacleConstruction = [["TheShortBox", -75, -20, -33.0002899169922, 15, 2.5], ["TheShortBox", -50, -36, -33.0002899169922, 15, 2.5], ["TheShortBox", -101, -4, -29.7685241699219, 15, 2.5], ["TheShortBox", -25, -52, -33.0002899169922, 15, 2.5], ["TheShortBox", 1, -64, -15.2148742675781, 15, 2.5], ["TheShortBox", 29, -65, 9.61904907226563, 15, 2.5], ["TheShortBox", 53, -53, 40.2069091796875, 15, 2.5], ["TheShortBox", 76, -34, 41.5046844482422, 15, 2.5], ["TheShortBox", 93, -11, 60.0611419677734, 15, 2.5]]; garbageBagObstacleConstruction = [["TheShortBox", -14, -40, -31.3048095703125, 15, 2.5], ["TheShortBox", -39, -23, -38.5888366699219, 15, 2.5], ["TheShortBox", -62, -5, -38.5888366699219, 15, 2.5], ["TheShortBox", 8, -38, 34.0825042724609, 15, 2.5], ["TheShortBox", 21, -41, -31.0411224365234, 15, 2.5], ["TheShortBox", 41, -38, 47.4105529785156, 15, 2.5], ["TheShortBox", 57, -14, 63.4685363769531, 15, 2.5], ["TheShortBox", 72, 0, 10.0358123779297, 15, 2.5]]; tiresWithRampObstacleConstruction = [["TheShortBox", -60, -2, -20.2850036621094, 15, 2.5], ["TheShortBox", -32, -12, -20.2850036621094, 15, 2.5], ["TheShortBox", -4, -22, -20.2850036621094, 15, 2.5], ["TheShortBox", 23, -32, -20.2850036621094, 15, 2.5], ["TheShortBox", 64, -16, -89.9667816162109, 15, 2.5], ["TheShortBox", 51, -33, 0, 15, 2.5]]; cansWithOilObstacleConstruction = [["TheShortBox", 21, -63, -42.8396148681641, 15, 2.5], ["TheShortBox", -1, -43, -42.8396148681641, 15, 2.5], ["TheShortBox", -23, -23, -42.8396148681641, 15, 2.5], ["TheShortBox", -45, -3, -42.8396148681641, 15, 2.5], ["TheShortBox", 36, -58, 0, 15, 2.5], ["TheShortBox", 48, -43, -88.2520141601563, 15, 2.5], ["TheShortBox", 47, -13, -88.2520141601563, 15, 2.5]]; loopConstruction = [["PrimarySteps", 10.35, 5.55, 19, 6, -9.01800537109375], ["PrimarySteps", 47.5, -1.6, 19, 6, -12.5308380126953], ["PrimarySteps", 84.2, -13.25, 19, 6, -22.8276214599609], ["PrimarySteps", 118.4, -31.05, 19, 6, -32.365478515625], ["PrimarySteps", 149.15, -54.15, 19, 6, -41.6768341064453], ["PrimarySteps", 176.25, -81.3, 19, 6, -48.6743011474609], ["PrimarySteps", 199.7, -111.85, 19, 6, -56.6353454589844], ["PrimarySteps", 217.85, -146.2, 19, 6, -67.8958129882813], ["PrimarySteps", 229.45, -182.9, 19, 6, -77.1529693603516], ["PrimarySteps", 234.9, -219.15, 19, 6, -85.4998168945313], ["PrimarySteps", 236.2, -256.35, 19, 6, -90.4694671630859], ["PrimarySteps", 232.75, -291.45, 19, 6, -99.7413787841797], ["PrimarySteps", 224.2, -324.4, 19, 6, -109.018081665039], ["PrimarySteps", 209.55, -358.85, 19, 6, -116.761947631836], ["PrimarySteps", 190.5, -389.55, 19, 6, -127.021728515625], ["PrimarySteps", 166.2, -418.4, 19, 6, -133.227828979492], ["PrimarySteps", 138.3, -444.35, 19, 6, 38.637939453125], ["PrimarySteps", 106.5, -465.4, 19, 6, 28.0898284912109], ["PrimarySteps", 71.5, -481.25, 19, 6, 20.5935821533203], ["PrimarySteps", 34.25, -491.35, 19, 6, 9.48896789550781], ["PrimarySteps", -3.55, -495.85, 19, 6, 4.30462646484375], ["SecondarySteps", -39.15, -495.45, 19, 6, -5.5247802734375], ["SecondarySteps", -75.65, -489.4, 19, 6, -13.5200042724609], ["SecondarySteps", -110.45, -478.1, 19, 6, -22.6357421875], ["SecondarySteps", -143.7, -460.9, 19, 6, -32.0895843505859], ["SecondarySteps", -173.9, -439.55, 19, 6, -38.3277740478516], ["SecondarySteps", -200.55, -414.75, 19, 6, -47.7929840087891], ["FinalSteps", -223.85, -385.2, 19, 6, -55.8821258544922], ["FinalSteps", -242.35, -351.9, 19, 6, -66.4242248535156], ["FinalSteps", -254.65, -316.2, 19, 6, -75.4162445068359], ["FinalSteps", -261.45, -279.95, 19, 6, -83.43603515625], ["FinalSteps", -263.95, -243.2, 19, 6, -88.7604827880859], ["FinalSteps", -262.2, -205.75, 19, 6, 83.2480163574219], ["FinalSteps", -254.5, -169.8, 19, 6, 72.5242004394531], ["FinalSteps", -241.2, -134.05, 19, 6, 66.4793243408203], ["FinalSteps", -224.85, -105.6, 19, 6, 54.4533233642578], ["FinalSteps", -204.6, -79.55, 19, 6, 49.1236114501953], ["FinalSteps", -182.95, -56.6, 19, 6, 43.1390380859375], ["FinalSteps", -157.2, -36.45, 19, 6, 32.896240234375], ["FinalSteps", -130.5, -20.8, 19, 6, 27.3912963867188], ["FinalSteps", -100.85, -8.1, 19, 6, 19.5601654052734], ["FinalSteps", -68.1, 0.5, 19, 6, 10.2949981689453], ["FinalSteps", -34.4, 4.55, 19, 6, 3.07620239257813], ["FinalSteps", -7.65, 5.65, 19, 6, 0.98956298828125], ["EntranceSteps", 0, -480.9, 19, 6, 0]]; smallLoopConstruction = [["PrimaryStepsSmall", 17.85, 5, 19, 6, -5.33935546875], ["PrimaryStepsSmall", 52.95, -1.55, 19, 6, -16.1532592773438], ["PrimaryStepsSmall", 86.35, -15.55, 19, 6, -28.9456787109375], ["PrimaryStepsSmall", 116.3, -36.55, 19, 6, -41.2066497802734], ["PrimaryStepsSmall", 140.85, -62.4, 19, 6, -52.0002746582031], ["PrimaryStepsSmall", 160.7, -93.25, 19, 6, -63.0140686035156], ["PrimaryStepsSmall", 173.95, -126.65, 19, 6, -74.0025482177734], ["PrimaryStepsSmall", 180.1, -160.6, 19, 6, -85.7997131347656], ["PrimaryStepsSmall", 180.1, -194.4, 19, 6, -94.3533020019531], ["PrimaryStepsSmall", 176.45, -216.8, 19, 6, -102.098571777344], ["PrimaryStepsSmall", 169.55, -239.9, 19, 6, -110.878814697266], ["PrimaryStepsSmall", 159.4, -261.55, 19, 6, -120.405395507813], ["PrimaryStepsSmall", 141.95, -287.55, 19, 6, -129.170532226563], ["PrimaryStepsSmall", 122.3, -308.35, 19, 6, -137.217330932617], ["PrimaryStepsSmall", 99.65, -326.55, 19, 6, -145.277709960938], ["PrimaryStepsSmall", 79.65, -338.15, 19, 6, -154.06787109375], ["PrimaryStepsSmall", 53.15, -348.75, 19, 6, -164.129455566406], ["PrimaryStepsSmall", 27.7, -354.2, 19, 6, -173.15837097168], ["PrimaryStepsSmall", 6.15, -355.95, 19, 6, -178.957992553711], ["SecondaryStepsSmall", -27.4, -354.1, 19, 6, -8.56376647949219], ["SecondaryStepsSmall", -62.15, -345.7, 19, 6, -20.5744323730469], ["SecondaryStepsSmall", -91.75, -331.7, 19, 6, -31.8769836425781], ["SecondaryStepsSmall", -117.65, -312.95, 19, 6, -41.6543884277344], ["SecondaryStepsSmall", -141.25, -288.75, 19, 6, -52.4574737548828], ["SecondaryStepsSmall", -156.4, -267.05, 19, 6, -59.9857025146484], ["FinalStepsSmall", -169.3, -240.85, 19, 6, -68.9550018310547], ["FinalStepsSmall", -177.05, -214.7, 19, 6, -78.5222015380859], ["FinalStepsSmall", -180.9, -184.8, 19, 6, -88.0869445800781], ["FinalStepsSmall", -180.1, -155.25, 19, 6, -94.6383056640625], ["FinalStepsSmall", -176.3, -132.35, 19, 6, -103.654647827148], ["FinalStepsSmall", -167.65, -105.2, 19, 6, -113.166915893555], ["FinalStepsSmall", -154.25, -79.95, 19, 6, -122.196762084961], ["FinalStepsSmall", -136.65, -56.35, 19, 6, -132.472640991211], ["FinalStepsSmall", -114.95, -35.1, 19, 6, -138.730560302734], ["FinalStepsSmall", -97.85, -22.25, 19, 6, -148.739898681641], ["FinalStepsSmall", -71.6, -8.25, 19, 6, -159.257934570313], ["FinalStepsSmall", -38.2, 1.5, 19, 6, -168.565032958984], ["FinalStepsSmall", -10.2, 5.4, 19, 6, -175.571075439453], ["EntranceStepsSmall", 7.15, -344, 19, 6, 0]]; wholeLevelHeight = 2000; wholeLevelWidth = 70000; tricksDoneInAir = 0; playingTrick = false; score = savedScore; currentTrick = ""; ninjaStarBodyArray = []; ninjaStarSpriteArray = []; hasHitDriveOverObstacle = false; dieIfSpeedOrTimeRequiredIsMet = false; jumpForce = new b2Vec2(0, -1000); checkPointOneIsSet = false; checkPointTwoIsSet = false; finishFlagIsSet = false; isPaused = false; crashInitiated = false; deathCounter = 0; ninjaIsEjecting = false; ejectNinja = false; hitDeathDrop = false; ninjaEjectedHitDeathDrop = false; primaryStepsCollection = []; secondaryStepsCollection = []; finalStepsCollection = []; entranceStepsCollection = []; scarfStatus = "idle"; wheelieCount = 0; trickHasLooped = false; levelHasEnded = false; crashSafetyTimer = 145; cameFromGame = true; fallingPlatformDropOnHeadCounter = 0; timeBonusPoints = 10800; prevWheelOnePos = 0; prevWheelTwoPos = 0; allowFinishLineCountDown = false; countDownTillFinish = 30; lastCamX = 0; currentCamX = 0; markedForDeath = false; gameOverInitiated = false; } public static function deactivateAllKeys():void{ keysEnabled = false; upKey = false; downKey = false; leftKey = false; rightKey = false; oneKey = false; twoKey = false; threeKey = false; fourKey = false; } public static function endEngineSound(_arg1):void{ var _local2:Boolean; var _local3:Boolean; var _local4:Number; var _local5:Number; switch (_arg1){ case "up": _local2 = upKey; _local3 = downKey; break; case "down": _local2 = downKey; _local3 = upKey; break; }; if (((_local2) && (!(_local3)))){ _local4 = 0; if (engineChannel != null){ _local4 = engineChannel.position; }; if (engineChannel != null){ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel.stop(); }; if (currentEngineSound == "drive_slow_fast"){ _local5 = (((driveSlowFastLength - _local4) / driveSlowFastLength) * driveFastSlowLength); } else { if (currentEngineSound == "drive_fast"){ _local5 = 0; } else { _local5 = 0; }; }; engineChannel = driveFastSlowSFX.play(_local5, 0, soundEffectsST); currentEngineSound = "drive_fast_slow"; }; } public static function incrementFPDOHCCounter():void{ var _local1:int; while (_local1 < loweringPlatformsSprites.length) { if (theNinjaOnBike.hitTestObject(loweringPlatformsSprites[_local1])){ initiateCustomCrash(); break; }; _local1++; }; } public static function initiateDeathDropHit():void{ var _local1:Number; var _local2:Number; if (((((!(hitDeathDrop)) && (!(crashInitiated)))) && (!(finishFlagIsSet)))){ hitDeathDrop = true; deactivateAllKeys(); engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); _local1 = 0; if (engineChannel != null){ _local1 = engineChannel.position; engineChannel.stop(); }; if (currentEngineSound != "drive_fast_slow"){ if (currentEngineSound == "drive_slow_fast"){ _local2 = (((driveSlowFastLength - _local1) / driveSlowFastLength) * driveFastSlowLength); } else { if (currentEngineSound == "drive_fast"){ _local2 = 0; }; }; engineChannel = driveFastSlowSFX.play(_local2, 0, soundEffectsST); currentEngineSound = "drive_fast_slow"; }; dieIfSpeedOrTimeRequiredIsMet = true; }; } public static function displayTrickBox(_arg1):void{ var _local2:MovieClip = new TrickText(_arg1); _local2.x = 150; _local2.y = 0xFF; scrollingTextEMC.addChild(_local2); } public static function initiateCustomCrash():void{ var _local1:TweenMax; var _local2:TweenMax; var _local3:TweenMax; var _local4:TweenMax; var _local5:TweenMax; var _local6:TweenMax; var _local7:TweenMax; var _local8:TweenMax; if (((((!(crashInitiated)) && (!(hitDeathDrop)))) && (!(finishFlagIsSet)))){ if (livesLeft > 0){ hitDeathDrop = true; _local1 = new TweenMax(chassisSprite, 0.5, {tint:0xFFFFFF}); _local2 = new TweenMax(theNinjaOnBike, 0.5, {tint:0xFFFFFF}); _local3 = new TweenMax(wheelOneSprite, 0.5, {tint:0xFFFFFF}); _local4 = new TweenMax(wheelTwoSprite, 0.5, {tint:0xFFFFFF}); _local5 = new TweenMax(frontShocksSprite, 0.5, {tint:0xFFFFFF}); _local6 = new TweenMax(rearShocksSprite, 0.5, {tint:0xFFFFFF}); _local7 = new TweenMax(frontSprocketSprite, 0.5, {tint:0xFFFFFF}); _local8 = new TweenMax(rearSprocketSprite, 0.5, {tint:0xFFFFFF}); nitroPercentage = 0; if (nitroChannel != null){ nitroChannel.stop(); nitroChannel = null; }; if (engineChannel != null){ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel.stop(); engineChannel = null; }; dieIfSpeedOrTimeRequiredIsMet = true; } else { if (livesLeft <= 0){ if (!markedForDeath){ markedForDeath = true; inGameChannel = crashSFX.play(0, 0, soundEffectsST); }; }; }; }; } public static function initiateCrash(_arg1=null):void{ var _local2:Number; if (((((!(crashInitiated)) && (!(hitDeathDrop)))) && (!(finishFlagIsSet)))){ _local2 = chassisSprite.rotation; if ((((((_local2 > -45)) && ((_local2 < 45)))) || ((((_local2 < -135)) && ((_local2 > 135)))))){ if (_arg1 == "LoweringPlatform"){ incrementFPDOHCCounter(); }; } else { if (livesLeft > 0){ crashInitiated = true; if (playingTrick){ theNinjaOnBike.gotoAndStop("idle"); playingTrick = false; currentTrick = ""; trickHasLooped = false; }; chassisSprite.gotoAndStop("destroyed"); deactivateAllKeys(); ejectNinja = true; rightPJ.EnableMotor(false); leftPJ.EnableMotor(false); inGameChannel = crashSFX.play(0, 0, soundEffectsST); nitroPercentage = 0; if (nitroChannel != null){ nitroChannel.stop(); nitroChannel = null; }; if (engineChannel != null){ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel.stop(); engineChannel = null; }; } else { if (livesLeft <= 0){ if (!markedForDeath){ markedForDeath = true; inGameChannel = crashSFX.play(0, 0, soundEffectsST); }; }; }; }; }; } public static function endTrickSound():void{ if (trickChannel != null){ trickChannel.stop(); trickChannel = null; }; } public static function playFastEngineLoopSound(_arg1:Event):void{ engineChannel.removeEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); engineChannel = driveFastSFX.play(0, 99, soundEffectsST); currentEngineSound = "drive_fast"; } public static function beginTrickSound(_arg1):void{ if (trickChannel != null){ trickChannel.stop(); }; switch (_arg1){ case "trick1": trickChannel = trickOneSFX.play(0, 0, soundEffectsST); break; case "trick2": trickChannel = trickTwoSFX.play(0, 0, soundEffectsST); break; case "trick3": trickChannel = trickThreeSFX.play(0, 0, soundEffectsST); break; case "trick4": trickChannel = trickFourSFX.play(0, 0, soundEffectsST); break; }; currentTrickSound = _arg1; } public static function beginEngineSound(_arg1):void{ var _local2:Boolean; var _local3:Boolean; var _local4:Number; var _local5:Number; switch (_arg1){ case "up": _local2 = upKey; _local3 = downKey; break; case "down": _local2 = downKey; _local3 = upKey; break; }; if (((!(_local2)) && (!(_local3)))){ if (engineChannel != null){ _local4 = engineChannel.position; _local5 = (((driveFastSlowLength - _local4) / driveFastSlowLength) * driveSlowFastLength); engineChannel.stop(); } else { _local5 = 0; }; engineChannel = driveSlowFastSFX.play(_local5, 0, soundEffectsST); currentEngineSound = "drive_slow_fast"; if (engineChannel != null){ engineChannel.addEventListener(Event.SOUND_COMPLETE, playFastEngineLoopSound); }; }; } } }//package
Section 437
//PauseMC (PauseMC) package { import flash.display.*; public dynamic class PauseMC extends MovieClip { } }//package
Section 438
//pauseWindowSprite (pauseWindowSprite) package { import flash.display.*; public dynamic class pauseWindowSprite extends Sprite { } }//package
Section 439
//ready_go (ready_go) package { import flash.media.*; public dynamic class ready_go extends Sound { } }//package
Section 440
//rearShocks (rearShocks) package { import flash.display.*; public dynamic class rearShocks extends Sprite { } }//package
Section 441
//second_menu_sfx (second_menu_sfx) package { import flash.media.*; public dynamic class second_menu_sfx extends Sound { } }//package
Section 442
//slice_sfx (slice_sfx) package { import flash.media.*; public dynamic class slice_sfx extends Sound { } }//package
Section 443
//smallLoopSpriteBack (smallLoopSpriteBack) package { import flash.display.*; public dynamic class smallLoopSpriteBack extends Sprite { } }//package
Section 444
//smallLoopSpriteFront (smallLoopSpriteFront) package { import flash.display.*; public dynamic class smallLoopSpriteFront extends Sprite { } }//package
Section 445
//sprocket (sprocket) package { import flash.display.*; public dynamic class sprocket extends Sprite { } }//package
Section 446
//star_sfx (star_sfx) package { import flash.media.*; public dynamic class star_sfx extends Sound { } }//package
Section 447
//SubmitterProxy (SubmitterProxy) package { import com.spilgames.external.*; import flash.events.*; import Util.*; import flash.display.*; import flash.net.*; import flash.external.*; import flash.system.*; public class SubmitterProxy extends MovieClip { public var m_scoreXMLData:XML; private var userHash:Object;// = null private var swfURL:String; private var pagesize:int; private var pagenr:int; private var gameid:Object; private var gameName:String; private var serverSelect:int;// = 1 private var siteid:Object; public var m_scoreType:String; private var safeDomain:Array; public var m_scoreServerTimeXMLData:XML; private var domainOk:Boolean; private var iconData:int; private var htmlName:String; private var locale:String; public var m_achievXMLData:XML; private var channelid:Object; private var codeString:String; private var parentObj; public var m_scoreOrder:int; private var requestStackInvalidUser:Array; private var userName:Object;// = null private var content; private var ldr:Loader; public function SubmitterProxy():void{ var cld:*; super(); Security.allowDomain("*"); domainOk = false; parentObj = this.parent; parentObj.stop(); var i:int; while (true) { try { cld = parentObj.getChildAt(i); if ((cld is MovieClip)){ cld.visible = false; } else { parentObj.removeChild(cld); }; i = (i + 1); } catch(e:Error) { break; }; }; try { parentObj["setLoader"] = setLoader; parentObj["isDomainAllowed"] = isDomainAllowed; parentObj["hasUserData"] = hasUserData; parentObj["_O0000Ol01"] = setLoader; parentObj["_O0Olll0lO"] = isDomainAllowed; } catch(e:Error) { }; } private function onLoadDone(_arg1:Event):void{ content = _arg1.currentTarget.content; content.init(siteid, 1, gameid, channelid, m_scoreOrder, locale, iconData, pagesize, pagenr, userName, userHash, serverSelect); content.addEventListener("HyScorSubmitterLoaded", HyScorSubmitterReady); content.addEventListener("ScoreLoadError", onEventScore); content.addEventListener("ScoreLoadTimeComplete", onEventScore); content.addEventListener("ScoreLoadSubmitComplete", onEventScore); content.addEventListener("ScoreLoadListComplete", onEventScore); content.addEventListener("ScoreLoadUserListComplete", onEventScore); content.addEventListener("AchievLoadError", onEventAchiev); content.addEventListener("AchievLoadTimeComplete", onEventAchiev); content.addEventListener("AchievLoadListComplete", onEventAchiev); content.addEventListener("AchievLoadInfoComplete", onEventAchiev); content.addEventListener("AchievLoadGrantComplete", onEventAchiev); parentObj["isSWFReady"] = isSWFReady; parentObj["getScoreServerTime"] = getScoreServerTime; parentObj["submitScore"] = submitScore; parentObj["requestHighscoreList"] = requestHighscoreList; parentObj["requestUserHighscoreList"] = requestUserHighscoreList; parentObj["submitGrantAward"] = submitGrantAward; parentObj["requestAwardList"] = requestAwardList; parentObj["requestAwardInfo"] = requestAwardInfo; parentObj["destroy"] = destroy; parentObj["_O0O1l0OO0"] = isSWFReady; parentObj["_O01Ol1O1O"] = getScoreServerTime; parentObj["_O01lOO10O"] = submitScore; parentObj["_O110l10ll"] = requestHighscoreList; parentObj["_O11lll1OO0"] = requestUserHighscoreList; parentObj["_O00OOl1Ol"] = submitGrantAward; parentObj["_O1OlO10OO"] = requestAwardList; parentObj["_OOlOOOll1"] = requestAwardInfo; parentObj["_O010ll111"] = destroy; initJStoSWFListeners(); } private function updateAvatar(_arg1:Object):void{ var _local2:String = _arg1.id; var _local3:String = _arg1.type; var _local4:String = (((("UPDATE_AVATAR" + "|-|") + _local2) + "|-|") + _local3); parentObj.dispatchEvent(new DataEvent("SiteDataEvent", false, false, _local4)); } private function isSWFReady():Boolean{ return (!((content == null))); } private function isDomainValid(_arg1:Boolean=false):Boolean{ var _local4:String; var _local5:m_ToUrl; var _local2:Boolean = _arg1; if (!_local2){ safeDomain = ["www8.agame.com"]; } else { safeDomain = ["localhost", ".agame.com", ".zlonggames.com", ".spilgames.com", ".a10.com", ".spilgames.eu", ".girlsgogames.com", ".games.co.uk", ".mygames.co.uk", ".girlsgogames.co.uk", ".spel.nl", ".spelletjes.nl", ".girlsgogames.nl", ".jetztspielen.de", ".spielen.com", ".girlsgogames.de", ".jeux.fr", ".jeu.fr", ".girlsgogames.fr", ".juegos.com", ".zapjuegos.com", ".juegosdechicas.com", ".gioco.it", ".giocaregratis.it", ".girlsgogames.it", ".gry.pl", ".minigry.pl", ".girlsgogames.pl", ".spela.se", ".spel.eu", ".girlsgogames.se", ".ojogos.pt", ".ourgames.ru", ".flashgames.ru", ".girlsgogames.ru", ".oyunlar123.com", ".asoyun.com", ".girlsgogamestr.com", ".gamesgames.com", ".juegos.com", ".zapjuegos.com", ".juegosdechicas.com", ".ojogos.com.br", ".clickjogos.com", ".girlsgogames.com.br", ".game.com.cn", ".xiaoyouxi.com", ".egames.jp", ".game.co.in", ".girlsgogames.in", ".games.co.id", ".laro.com.ph", ".game.com.my", ".dailygame.com"]; }; var _local3:LocalConnection = new LocalConnection(); if (((isNaN((gameid as int))) || (isNaN((siteid as int))))){ return (false); }; for each (_local4 in safeDomain) { if (_local3.domain.lastIndexOf(_local4) > -1){ _local5 = new m_ToUrl(); if (_local5.m_checkDomain()){ domainOk = true; return (true); }; }; }; return (false); } private function initJStoSWFListeners():void{ if (ExternalInterface.available){ try { ExternalInterface.addCallback("JStoSWF", JStoSWF.instance().parse); JStoSWF.instance().addCallFunction("UPDATE_USER", updateUser); JStoSWF.instance().addCallFunction("UPDATE_AVATAR", updateAvatar); JStoSWF.instance().addCallFunction("UPDATE_GALLERY", updateGallery); } catch(e:Error) { parentObj.dispatchEvent(new Event("FAILED_INIT_JStoSWF")); }; }; } private function destroy():void{ content.removeEventListener("ScoreLoadError", onEventScore); content.removeEventListener("ScoreLoadTimeComplete", onEventScore); content.removeEventListener("ScoreLoadSubmitComplete", onEventScore); content.removeEventListener("ScoreLoadListComplete", onEventScore); content.removeEventListener("ScoreLoadUserListComplete", onEventScore); content.removeEventListener("AchievLoadError", onEventAchiev); content.removeEventListener("AchievLoadTimeComplete", onEventAchiev); content.removeEventListener("AchievLoadListComplete", onEventAchiev); content.removeEventListener("AchievLoadInfoComplete", onEventAchiev); content.removeEventListener("AchievLoadGrantComplete", onEventAchiev); parentObj = null; safeDomain = null; content = null; userName = null; userHash = null; ldr = null; m_scoreXMLData = null; m_achievXMLData = null; } private function setLoader(_arg1=null, _arg2:String="default", _arg3="", _arg4:int=0, _arg5:String="normal", _arg6:String="", _arg7:int=0, _arg8:int=0, _arg9:int=1, _arg10:Boolean=false, _arg11:int=1):void{ m_scoreType = _arg5; m_scoreOrder = _arg4; gameName = _arg2; if (_arg3 == ""){ htmlName = gameName; } else { htmlName = _arg3; }; if (((!((_arg1 == null))) && (!((_arg1.loaderInfo == null))))){ userName = _arg1.loaderInfo.parameters["username"]; userHash = _arg1.loaderInfo.parameters["hash"]; gameid = _arg1.loaderInfo.parameters["id"]; siteid = _arg1.loaderInfo.parameters["s"]; channelid = _arg1.loaderInfo.parameters["c"]; swfURL = "http://www8.agame.com/games/flash/highscore/SubmitterV2.swf"; if (isDomainValid(_arg10)){ getSwf(); } else { parentObj.dispatchEvent(new Event("LoadingFailed")); }; }; locale = _arg6; iconData = _arg7; pagesize = _arg8; pagenr = _arg9; serverSelect = _arg11; requestStackInvalidUser = new Array(); } private function updateUser(_arg1:Object):void{ var _local2:String = _arg1.username; var _local3:String = _arg1.hash; var _local4:String = _arg1.id; userName = _local2; userHash = _local3; var _local5:String = (((((("UPDATE_USER" + "|-|") + _local2) + "|-|") + _local3) + "|-|") + _local4); parentObj.dispatchEvent(new DataEvent("SiteDataEvent", false, false, _local5)); processInvalidUserList(); } private function requestUserHighscoreList(_arg1:String):void{ if (content){ content.OO0011ll1O(_arg1); }; } private function onIoError(_arg1:IOErrorEvent):void{ removeEventListener(Event.ENTER_FRAME, checkLoadBytes); parentObj.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR)); } public function set O0l00l0O0(_arg1:XML):void{ m_scoreXMLData = _arg1; } public function get O0l00l0O0():XML{ return (m_scoreXMLData); } private function requestHighscoreList():void{ if (content){ content.O01l01OlO(); }; } public function set O1OlOO00O(_arg1:XML):void{ m_achievXMLData = _arg1; } public function get O1OlOO00O():XML{ return (m_achievXMLData); } private function isDomainAllowed(_arg1:Boolean=false):Boolean{ return (isDomainValid(_arg1)); } private function HyScorSubmitterReady(_arg1:Event):void{ if (content){ content.removeEventListener("HyScorSubmitterLoaded", HyScorSubmitterReady); }; parentObj.dispatchEvent(new Event(Event.COMPLETE)); } private function updateGallery(_arg1:Object):void{ var _local2:String = _arg1.id; var _local3:String = _arg1.type; var _local4:String = (((("UPDATE_GALLERY" + "|-|") + _local2) + "|-|") + _local3); parentObj.dispatchEvent(new DataEvent("SiteDataEvent", false, false, _local4)); } private function getSwf():void{ stop(); ldr = new Loader(); ldr.load(new URLRequest(swfURL)); parentObj.addChildAt(ldr, 0); this.addEventListener(Event.ENTER_FRAME, checkLoadBytes); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadDone); ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIoError); } private function getScoreServerTime():void{ if (content){ content.OO011OOl1(); }; } private function hasUserData():Boolean{ return (((!((userName == null))) && (!((userHash == null))))); } private function requestAwardList():void{ if (content){ if (!hasUserData()){ requestStackInvalidUser.push({type:"REQUEST_AWARDLIST"}); }; content.O1l0OOl1l(userName, userHash); }; } public function set O1lll0ll0(_arg1:XML):void{ m_scoreServerTimeXMLData = _arg1; } private function onEventScore(_arg1:Event):void{ if ((((((_arg1.type == "ScoreLoadSubmitComplete")) || ((_arg1.type == "ScoreLoadListComplete")))) || ((_arg1.type == "ScoreLoadUserListComplete")))){ m_scoreXMLData = content.O011Oll0O(); } else { if (_arg1.type == "ScoreLoadTimeComplete"){ m_scoreServerTimeXMLData = content.OO011OOl1(); } else { m_scoreXMLData = content.O0001O0Ol(); }; }; parentObj.dispatchEvent(_arg1); } private function submitGrantAward(_arg1:String):void{ if (content){ if (!hasUserData()){ requestStackInvalidUser.push({type:"SUBMIT_AWARD", value:_arg1}); }; content.OO00lO1l0(_arg1, userName, userHash); }; } private function requestAwardInfo(_arg1:int):void{ if (content){ content.O1OlOO111(_arg1); }; } private function processInvalidUserList():void{ var _local1:Object; while (requestStackInvalidUser.length > 0) { _local1 = requestStackInvalidUser.pop(); if (_local1.type == "SUBMIT_SCORE"){ submitScore(_local1.value); } else { if (_local1.type == "SUBMIT_AWARD"){ submitGrantAward(_local1.value); } else { if (_local1.type == "REQUEST_AWARDLIST"){ requestAwardList(); }; }; }; }; } private function onEventAchiev(_arg1:Event):void{ if ((((((_arg1.type == "AchievLoadListComplete")) || ((_arg1.type == "AchievLoadInfoComplete")))) || ((_arg1.type == "AchievLoadGrantComplete")))){ m_achievXMLData = content.O11OO0l0l(); } else { m_achievXMLData = content.O0O100l0l(); }; parentObj.dispatchEvent(_arg1); } public function get O1lll0ll0():XML{ return (m_scoreServerTimeXMLData); } private function doCommTest():String{ if (content){ return (content.OOOO00ll0()); }; return (("FAILED " + content)); } private function submitScore(_arg1:int):void{ if (content){ if (!hasUserData()){ requestStackInvalidUser.push({type:"SUBMIT_SCORE", value:_arg1}); }; content.O0l01llOl(_arg1, userName, userHash); }; } private function checkLoadBytes(_arg1:Event):void{ var _local2 = (((ldr.contentLoaderInfo.bytesLoaded / ldr.contentLoaderInfo.bytesTotal) * 100) >> 0); if (_local2 >= 100){ removeEventListener(Event.ENTER_FRAME, checkLoadBytes); }; } } }//package
Section 448
//super_bonus_sfx (super_bonus_sfx) package { import flash.media.*; public dynamic class super_bonus_sfx extends Sound { } }//package
Section 449
//tireJunkSprite (tireJunkSprite) package { import flash.display.*; public dynamic class tireJunkSprite extends Sprite { } }//package
Section 450
//tiresWithRampSprite (tiresWithRampSprite) package { import flash.display.*; public dynamic class tiresWithRampSprite extends Sprite { } }//package
Section 451
//trick1Box (trick1Box) package { import flash.display.*; public dynamic class trick1Box extends MovieClip { } }//package
Section 452
//trick2Box (trick2Box) package { import flash.display.*; public dynamic class trick2Box extends MovieClip { } }//package
Section 453
//trick3Box (trick3Box) package { import flash.display.*; public dynamic class trick3Box extends MovieClip { } }//package
Section 454
//trick4_sfx (trick4_sfx) package { import flash.media.*; public dynamic class trick4_sfx extends Sound { } }//package
Section 455
//trick4Box (trick4Box) package { import flash.display.*; public dynamic class trick4Box extends MovieClip { } }//package
Section 456
//wheelSprite (wheelSprite) package { import flash.display.*; public dynamic class wheelSprite extends Sprite { } }//package
Section 457
//woosh1_sfx (woosh1_sfx) package { import flash.media.*; public dynamic class woosh1_sfx extends Sound { } }//package
Section 458
//woosh2_sfx (woosh2_sfx) package { import flash.media.*; public dynamic class woosh2_sfx extends Sound { } }//package

Library Items

Symbol 1 GraphicUsed by:4 1133
Symbol 2 GraphicUsed by:4 1133
Symbol 3 GraphicUsed by:4 1133
Symbol 4 MovieClipUses:1 2 3Used by:13
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:7
Symbol 7 MovieClipUses:6Used by:13
Symbol 8 GraphicUsed by:13
Symbol 9 FontUsed by:10 303 307 371 1222 1244 1245 1251 1252 1253 1254
Symbol 10 TextUses:9Used by:13
Symbol 11 FontUsed by:12 157 377 976 978 980 981 982 1246
Symbol 12 EditableTextUses:11Used by:13
Symbol 13 MovieClip {OtherClasses.TempPreloader}Uses:4 7 8 10 12Used by:Timeline
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:16
Symbol 16 MovieClipUses:15Used by:152
Symbol 17 GraphicUsed by:28
Symbol 18 GraphicUsed by:28
Symbol 19 GraphicUsed by:28
Symbol 20 GraphicUsed by:28 145 150
Symbol 21 GraphicUsed by:28
Symbol 22 GraphicUsed by:28
Symbol 23 GraphicUsed by:28
Symbol 24 GraphicUsed by:28
Symbol 25 GraphicUsed by:28
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:28
Symbol 28 MovieClipUses:17 18 19 20 21 22 23 24 25 27Used by:152
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:152
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:152
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClipUses:33Used by:152
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClipUses:35Used by:152
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:152
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:39Used by:152
Symbol 41 GraphicUsed by:42
Symbol 42 MovieClipUses:41Used by:152
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:152
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClipUses:45Used by:152
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:152
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:152
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClipUses:51Used by:152
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:152
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:152
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClipUses:57Used by:59
Symbol 59 MovieClipUses:58Used by:152
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClipUses:60Used by:62
Symbol 62 MovieClipUses:61Used by:152
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClipUses:63Used by:65
Symbol 65 MovieClipUses:64Used by:152
Symbol 66 GraphicUsed by:67
Symbol 67 MovieClipUses:66Used by:68
Symbol 68 MovieClipUses:67Used by:152
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClipUses:69Used by:71
Symbol 71 MovieClipUses:70Used by:152
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:72Used by:74
Symbol 74 MovieClipUses:73Used by:152
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClipUses:75Used by:77
Symbol 77 MovieClipUses:76Used by:152
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClipUses:78Used by:80
Symbol 80 MovieClipUses:79Used by:152
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClipUses:81Used by:83
Symbol 83 MovieClipUses:82Used by:152
Symbol 84 GraphicUsed by:85
Symbol 85 MovieClipUses:84Used by:86
Symbol 86 MovieClipUses:85Used by:152
Symbol 87 GraphicUsed by:88
Symbol 88 MovieClipUses:87Used by:89
Symbol 89 MovieClipUses:88Used by:152
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90Used by:92
Symbol 92 MovieClipUses:91Used by:152
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClipUses:93Used by:95
Symbol 95 MovieClipUses:94Used by:152
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClipUses:96Used by:152
Symbol 98 GraphicUsed by:99
Symbol 99 MovieClipUses:98Used by:152
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClipUses:100Used by:152
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClipUses:102Used by:152
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClipUses:104Used by:152
Symbol 106 GraphicUsed by:107
Symbol 107 MovieClipUses:106Used by:152
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClipUses:108Used by:152
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClipUses:110Used by:152
Symbol 112 GraphicUsed by:113
Symbol 113 MovieClipUses:112Used by:152
Symbol 114 BitmapUsed by:115
Symbol 115 GraphicUses:114Used by:116
Symbol 116 MovieClipUses:115Used by:152
Symbol 117 BitmapUsed by:118
Symbol 118 GraphicUses:117Used by:119
Symbol 119 MovieClipUses:118Used by:152
Symbol 120 GraphicUsed by:121
Symbol 121 MovieClipUses:120Used by:152
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:122Used by:152
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:124Used by:152
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClipUses:126Used by:152
Symbol 128 GraphicUsed by:129
Symbol 129 MovieClipUses:128Used by:152
Symbol 130 GraphicUsed by:131
Symbol 131 MovieClipUses:130Used by:152
Symbol 132 GraphicUsed by:133
Symbol 133 MovieClipUses:132Used by:152
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClipUses:134Used by:152
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:136Used by:138
Symbol 138 MovieClipUses:137Used by:152
Symbol 139 GraphicUsed by:141
Symbol 140 GraphicUsed by:141 148
Symbol 141 MovieClipUses:139 140Used by:146
Symbol 142 GraphicUsed by:145 150
Symbol 143 GraphicUsed by:144 149
Symbol 144 MovieClipUses:143Used by:145
Symbol 145 MovieClipUses:142 144 20Used by:146
Symbol 146 MovieClipUses:141 145Used by:152
Symbol 147 GraphicUsed by:148
Symbol 148 MovieClipUses:147 140Used by:151
Symbol 149 MovieClipUses:143Used by:150
Symbol 150 MovieClipUses:142 149 20Used by:151
Symbol 151 MovieClipUses:148 150Used by:152
Symbol 152 MovieClip {spill.localisation.BrandingLogo}Uses:16 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 59 62 65 68 71 74 77 80 83 86 89 92 95 97 99 101 103 105 107 109 111 113 116 119 121 123 125 127 129 131 133 135 138 146 151Used by:Timeline
Symbol 153 GraphicUsed by:Timeline
Symbol 154 FontUsed by:155 156
Symbol 155 TextUses:154Used by:Timeline
Symbol 156 TextUses:154Used by:Timeline
Symbol 157 TextUses:11Used by:Timeline
Symbol 158 Sound {woosh2_sfx}
Symbol 159 Sound {woosh1_sfx}
Symbol 160 Sound {trick4_sfx}
Symbol 161 Sound {super_bonus_sfx}
Symbol 162 Sound {star_sfx}
Symbol 163 Sound {slice_sfx}
Symbol 164 Sound {second_menu_sfx}
Symbol 165 Sound {ready_go}
Symbol 166 Sound {nitro_sfx}
Symbol 167 Sound {nitro_exhaust_sfx}
Symbol 168 Sound {menu_select_sfx}
Symbol 169 Sound {menu_click_sfx}
Symbol 170 Sound {mainscreen_music}
Symbol 171 Sound {level_win_music}
Symbol 172 Sound {level_music}
Symbol 173 Sound {land_sfx}
Symbol 174 Sound {game_complete_music}
Symbol 175 Sound {failed_music}
Symbol 176 Sound {drive_slow_fast_sfx}
Symbol 177 Sound {drive_fast_slow_sfx}
Symbol 178 Sound {drive_fast_sfx}
Symbol 179 Sound {crash_sfx}
Symbol 180 GraphicUsed by:185
Symbol 181 BitmapUsed by:182 187 191
Symbol 182 GraphicUses:181Used by:185
Symbol 183 BitmapUsed by:184 188 192 677 680 682 686 690 694 697 699 703 707 711 715 724 728 1057 1060 1064 1066 1069
Symbol 184 GraphicUses:183Used by:185
Symbol 185 MovieClip {level1_2}Uses:180 182 184
Symbol 186 GraphicUsed by:189
Symbol 187 GraphicUses:181Used by:189
Symbol 188 GraphicUses:183Used by:189
Symbol 189 MovieClip {level1_3}Uses:186 187 188
Symbol 190 GraphicUsed by:193
Symbol 191 GraphicUses:181Used by:193
Symbol 192 GraphicUses:183Used by:193
Symbol 193 MovieClip {level1_4}Uses:190 191 192
Symbol 194 BitmapUsed by:195
Symbol 195 GraphicUses:194Used by:272
Symbol 196 BitmapUsed by:197
Symbol 197 GraphicUses:196Used by:272
Symbol 198 BitmapUsed by:199
Symbol 199 GraphicUses:198Used by:272
Symbol 200 BitmapUsed by:201
Symbol 201 GraphicUses:200Used by:272
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:272
Symbol 204 BitmapUsed by:205
Symbol 205 GraphicUses:204Used by:272
Symbol 206 BitmapUsed by:207
Symbol 207 GraphicUses:206Used by:272
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:272
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:272
Symbol 212 BitmapUsed by:213
Symbol 213 GraphicUses:212Used by:272
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214Used by:272
Symbol 216 BitmapUsed by:217
Symbol 217 GraphicUses:216Used by:272
Symbol 218 BitmapUsed by:219
Symbol 219 GraphicUses:218Used by:272
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:272
Symbol 222 BitmapUsed by:223
Symbol 223 GraphicUses:222Used by:272
Symbol 224 BitmapUsed by:225
Symbol 225 GraphicUses:224Used by:272
Symbol 226 BitmapUsed by:227
Symbol 227 GraphicUses:226Used by:272
Symbol 228 BitmapUsed by:229
Symbol 229 GraphicUses:228Used by:272
Symbol 230 BitmapUsed by:231
Symbol 231 GraphicUses:230Used by:272
Symbol 232 BitmapUsed by:233
Symbol 233 GraphicUses:232Used by:272
Symbol 234 BitmapUsed by:235
Symbol 235 GraphicUses:234Used by:272
Symbol 236 BitmapUsed by:237
Symbol 237 GraphicUses:236Used by:272
Symbol 238 BitmapUsed by:239
Symbol 239 GraphicUses:238Used by:272
Symbol 240 BitmapUsed by:241
Symbol 241 GraphicUses:240Used by:272
Symbol 242 BitmapUsed by:243
Symbol 243 GraphicUses:242Used by:272
Symbol 244 BitmapUsed by:245
Symbol 245 GraphicUses:244Used by:272
Symbol 246 BitmapUsed by:247
Symbol 247 GraphicUses:246Used by:272
Symbol 248 BitmapUsed by:249
Symbol 249 GraphicUses:248Used by:272
Symbol 250 BitmapUsed by:251
Symbol 251 GraphicUses:250Used by:272
Symbol 252 BitmapUsed by:253
Symbol 253 GraphicUses:252Used by:272
Symbol 254 BitmapUsed by:255
Symbol 255 GraphicUses:254Used by:272
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:272
Symbol 258 BitmapUsed by:259
Symbol 259 GraphicUses:258Used by:272
Symbol 260 BitmapUsed by:261
Symbol 261 GraphicUses:260Used by:272
Symbol 262 BitmapUsed by:263
Symbol 263 GraphicUses:262Used by:272
Symbol 264 BitmapUsed by:265
Symbol 265 GraphicUses:264Used by:272
Symbol 266 BitmapUsed by:267
Symbol 267 GraphicUses:266Used by:272
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:272
Symbol 270 BitmapUsed by:271
Symbol 271 GraphicUses:270Used by:272
Symbol 272 MovieClip {FinishFlagMC}Uses:195 197 199 201 203 205 207 209 211 213 215 217 219 221 223 225 227 229 231 233 235 237 239 241 243 245 247 249 251 253 255 257 259 261 263 265 267 269 271
Symbol 273 GraphicUsed by:274 372 378 973 1214
Symbol 274 MovieClipUses:273Used by:308 1247 1255 1273
Symbol 275 GraphicUsed by:308
Symbol 276 GraphicUsed by:277
Symbol 277 MovieClipUses:276Used by:308 1273
Symbol 278 GraphicUsed by:308
Symbol 279 GraphicUsed by:280 1231
Symbol 280 MovieClipUses:279Used by:308 1247 1273
Symbol 281 GraphicUsed by:308
Symbol 282 GraphicUsed by:283
Symbol 283 MovieClipUses:282Used by:308 1273
Symbol 284 GraphicUsed by:308
Symbol 285 GraphicUsed by:286
Symbol 286 MovieClipUses:285Used by:308 1273
Symbol 287 GraphicUsed by:308 1273
Symbol 288 GraphicUsed by:289
Symbol 289 MovieClipUses:288Used by:308 1273
Symbol 290 GraphicUsed by:308
Symbol 291 GraphicUsed by:292
Symbol 292 MovieClipUses:291Used by:308 1273
Symbol 293 GraphicUsed by:308
Symbol 294 MovieClipUsed by:308 1273
Symbol 295 MovieClipUsed by:308 1273
Symbol 296 GraphicUsed by:308 1273
Symbol 297 GraphicUsed by:298
Symbol 298 MovieClipUses:297Used by:308 1273
Symbol 299 GraphicUsed by:308
Symbol 300 GraphicUsed by:301
Symbol 301 MovieClipUses:300Used by:308 1273
Symbol 302 GraphicUsed by:308
Symbol 303 EditableTextUses:9Used by:308
Symbol 304 GraphicUsed by:305
Symbol 305 MovieClipUses:304Used by:306 336
Symbol 306 MovieClip {spill.localisation.LocalizedTextField}Uses:305Used by:308 332 948 950 954 956 958 960 962 964 966 970 972 983 1043 1054 1178 1182 1195 1223 1225 1247 1255 1273
Symbol 307 TextUses:9Used by:308
Symbol 308 MovieClip {OtherClasses.TimeIsUpScreen}Uses:274 275 277 278 280 281 283 284 286 287 289 290 292 293 294 295 296 298 299 301 302 303 306 307
Symbol 309 BitmapUsed by:310
Symbol 310 GraphicUses:309Used by:311
Symbol 311 MovieClip {howToPlayImageBG}Uses:310
Symbol 312 GraphicUsed by:332 948 950
Symbol 313 MovieClipUsed by:332 948 950
Symbol 314 GraphicUsed by:315
Symbol 315 MovieClipUses:314Used by:332 948 950 954 956 958 960 962 964 966 1043 1054
Symbol 316 GraphicUsed by:332
Symbol 317 GraphicUsed by:318 969 1033 1276
Symbol 318 MovieClipUses:317Used by:332
Symbol 319 ShapeTweeningUsed by:332
Symbol 320 ShapeTweeningUsed by:332
Symbol 321 ShapeTweeningUsed by:332
Symbol 322 ShapeTweeningUsed by:332
Symbol 323 ShapeTweeningUsed by:332
Symbol 324 GraphicUsed by:332
Symbol 325 ShapeTweeningUsed by:332
Symbol 326 GraphicUsed by:332
Symbol 327 GraphicUsed by:332
Symbol 328 GraphicUsed by:329
Symbol 329 MovieClipUses:328Used by:331
Symbol 330 GraphicUsed by:331
Symbol 331 MovieClipUses:329 330Used by:332 948 950 954 956 958 960 962 964 966 970 972 1043 1054
Symbol 332 MovieClip {OtherClasses.Buttons.MoreGames_MM}Uses:312 313 306 315 316 318 319 320 321 322 323 324 325 326 327 331
Symbol 333 GraphicUsed by:335
Symbol 334 MovieClip {SubmitterProxy}Used by:335
Symbol 335 MovieClip {Spill.Components.Submitter}Uses:333 334
Symbol 336 MovieClip {spill.localisation.LanguageSelectBox}Uses:305
Symbol 337 FontUsed by:338 340
Symbol 338 TextUses:337Used by:341
Symbol 339 GraphicUsed by:341
Symbol 340 TextUses:337Used by:341
Symbol 341 Button {spill.localisation.SpilGamesLink}Uses:338 339 340
Symbol 342 GraphicUsed by:345
Symbol 343 GraphicUsed by:345
Symbol 344 GraphicUsed by:345
Symbol 345 ButtonUses:342 343 344Used by:372
Symbol 346 GraphicUsed by:370
Symbol 347 GraphicUsed by:370
Symbol 348 GraphicUsed by:370
Symbol 349 GraphicUsed by:370
Symbol 350 GraphicUsed by:370
Symbol 351 GraphicUsed by:370
Symbol 352 GraphicUsed by:370
Symbol 353 GraphicUsed by:370
Symbol 354 GraphicUsed by:370
Symbol 355 GraphicUsed by:370
Symbol 356 GraphicUsed by:370
Symbol 357 GraphicUsed by:370
Symbol 358 GraphicUsed by:370
Symbol 359 GraphicUsed by:370
Symbol 360 GraphicUsed by:370
Symbol 361 GraphicUsed by:370
Symbol 362 GraphicUsed by:370
Symbol 363 GraphicUsed by:370
Symbol 364 GraphicUsed by:370
Symbol 365 GraphicUsed by:370
Symbol 366 BitmapUsed by:367
Symbol 367 GraphicUses:366Used by:370
Symbol 368 BitmapUsed by:369
Symbol 369 GraphicUses:368Used by:370
Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342}Uses:346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 367 369Used by:372 378
Symbol 371 EditableTextUses:9Used by:372
Symbol 372 MovieClipUses:345 273 370 371Used by:375
Symbol 373 GraphicUsed by:374
Symbol 374 MovieClipUses:373Used by:375
Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc}Uses:372 374
Symbol 376 GraphicUsed by:378
Symbol 377 EditableTextUses:11Used by:378
Symbol 378 MovieClip {spill.localisation.LanguageSelectBox_mc}Uses:376 377 273 370
Symbol 379 GraphicUsed by:384
Symbol 380 BitmapUsed by:381 386 390 394 401 405 408 415 420 427 431 435 439 443 447 456 460 469 473 477 481 485 491 495 502 506 513 517 520 524 529 536 540 544 548 575 579 583 587 600 607 611 615 619 623 627 634 638 642 646 650 654 658 662 672 676 682 685 689 693 699 702 706 710 714 718 723 727 731 747 762 772 776 780 784 792 796 803 807 823 827 838 842 846 850 854 858 865 875 879 883 887 891 895 1056 1063 1066
Symbol 381 GraphicUses:380Used by:384
Symbol 382 BitmapUsed by:383 387 391 395 398 402 406 408 612 616 620 624 628 631 635 639 643 647 651 655 659 663 666 669 673
Symbol 383 GraphicUses:382Used by:384
Symbol 384 MovieClip {level2_18}Uses:379 381 383
Symbol 385 GraphicUsed by:388
Symbol 386 GraphicUses:380Used by:388 534 1070
Symbol 387 GraphicUses:382Used by:388
Symbol 388 MovieClip {level2_19}Uses:385 386 387
Symbol 389 GraphicUsed by:392
Symbol 390 GraphicUses:380Used by:392
Symbol 391 GraphicUses:382Used by:392
Symbol 392 MovieClip {level2_20}Uses:389 390 391
Symbol 393 GraphicUsed by:396
Symbol 394 GraphicUses:380Used by:396 399
Symbol 395 GraphicUses:382Used by:396
Symbol 396 MovieClip {level2_21}Uses:393 394 395
Symbol 397 GraphicUsed by:399
Symbol 398 GraphicUses:382Used by:399
Symbol 399 MovieClip {level2_22}Uses:397 394 398
Symbol 400 GraphicUsed by:403
Symbol 401 GraphicUses:380Used by:403
Symbol 402 GraphicUses:382Used by:403
Symbol 403 MovieClip {level2_23}Uses:400 401 402
Symbol 404 GraphicUsed by:407
Symbol 405 GraphicUses:380Used by:407 737 742 745 754 757
Symbol 406 GraphicUses:382Used by:407
Symbol 407 MovieClip {level2_24}Uses:404 405 406
Symbol 408 GraphicUses:382 380Used by:409
Symbol 409 MovieClip {level2_25}Uses:408
Symbol 410 BitmapUsed by:412
Symbol 411 BitmapUsed by:412
Symbol 412 GraphicUses:410 411Used by:413
Symbol 413 MovieClip {liftSprite}Uses:412
Symbol 414 GraphicUsed by:418
Symbol 415 GraphicUses:380Used by:418 632
Symbol 416 BitmapUsed by:417 421 424 428 432 436 440 444 448 457 462 470 474 478 482 486 492 496 499 503 507 510 514 521
Symbol 417 GraphicUses:416Used by:418
Symbol 418 MovieClip {level6_1}Uses:414 415 417
Symbol 419 GraphicUsed by:422
Symbol 420 GraphicUses:380Used by:422 425 553 556 559 698 752 788 815 821
Symbol 421 GraphicUses:416Used by:422
Symbol 422 MovieClip {level6_2}Uses:419 420 421
Symbol 423 GraphicUsed by:425
Symbol 424 GraphicUses:416Used by:425 518
Symbol 425 MovieClip {level6_3}Uses:423 420 424
Symbol 426 GraphicUsed by:429
Symbol 427 GraphicUses:380Used by:429
Symbol 428 GraphicUses:416Used by:429
Symbol 429 MovieClip {level6_4}Uses:426 427 428
Symbol 430 GraphicUsed by:433
Symbol 431 GraphicUses:380Used by:433
Symbol 432 GraphicUses:416Used by:433
Symbol 433 MovieClip {level6_5}Uses:430 431 432
Symbol 434 GraphicUsed by:437
Symbol 435 GraphicUses:380Used by:437
Symbol 436 GraphicUses:416Used by:437
Symbol 437 MovieClip {level6_6}Uses:434 435 436
Symbol 438 GraphicUsed by:441
Symbol 439 GraphicUses:380Used by:441
Symbol 440 GraphicUses:416Used by:441
Symbol 441 MovieClip {level6_7}Uses:438 439 440
Symbol 442 GraphicUsed by:445
Symbol 443 GraphicUses:380Used by:445
Symbol 444 GraphicUses:416Used by:445
Symbol 445 MovieClip {level6_8}Uses:442 443 444
Symbol 446 GraphicUsed by:449
Symbol 447 GraphicUses:380Used by:449
Symbol 448 GraphicUses:416Used by:449
Symbol 449 MovieClip {level6_9}Uses:446 447 448
Symbol 450 BitmapUsed by:453 462 464 466 486 488 521 562 564 567 569 572 588 592 595 597 655 659 663 666 669 677 680 682 686 736 738 769 773 789 833 835 861 872 888 899
Symbol 451 BitmapUsed by:453 521 564 567 569 572 595 597 655 659 663 666 669 677 680 682 686 736 738 769 773 872 888 899
Symbol 452 BitmapUsed by:453 462 464 466 486 488 521 562 564 567 569 572 588 592 595 597 655 659 663 666 669 677 680 682 686 736 738 769 773 789 833 835 861 872 888 899
Symbol 453 GraphicUses:450 451 452Used by:454
Symbol 454 MovieClip {level6_10}Uses:453
Symbol 455 GraphicUsed by:458
Symbol 456 GraphicUses:380Used by:458
Symbol 457 GraphicUses:416Used by:458
Symbol 458 MovieClip {level6_12}Uses:455 456 457
Symbol 459 GraphicUsed by:463
Symbol 460 GraphicUses:380Used by:463
Symbol 461 BitmapUsed by:462 464 466 486 488 562 588 592 789 833 835 861
Symbol 462 GraphicUses:450 461 452 416Used by:463
Symbol 463 MovieClip {level6_13}Uses:459 460 462
Symbol 464 GraphicUses:450 461 452Used by:465
Symbol 465 MovieClip {level6_14}Uses:464
Symbol 466 GraphicUses:450 461 452Used by:467
Symbol 467 MovieClip {level6_15}Uses:466
Symbol 468 GraphicUsed by:471
Symbol 469 GraphicUses:380Used by:471
Symbol 470 GraphicUses:416Used by:471
Symbol 471 MovieClip {level6_16}Uses:468 469 470
Symbol 472 GraphicUsed by:475
Symbol 473 GraphicUses:380Used by:475
Symbol 474 GraphicUses:416Used by:475
Symbol 475 MovieClip {level6_18}Uses:472 473 474
Symbol 476 GraphicUsed by:479
Symbol 477 GraphicUses:380Used by:479
Symbol 478 GraphicUses:416Used by:479
Symbol 479 MovieClip {level6_17}Uses:476 477 478
Symbol 480 GraphicUsed by:483
Symbol 481 GraphicUses:380Used by:483
Symbol 482 GraphicUses:416Used by:483
Symbol 483 MovieClip {level6_19}Uses:480 481 482
Symbol 484 GraphicUsed by:487
Symbol 485 GraphicUses:380Used by:487 770
Symbol 486 GraphicUses:450 461 452 416Used by:487
Symbol 487 MovieClip {level6_20}Uses:484 485 486
Symbol 488 GraphicUses:450 461 452Used by:489
Symbol 489 MovieClip {level6_21}Uses:488
Symbol 490 GraphicUsed by:493
Symbol 491 GraphicUses:380Used by:493
Symbol 492 GraphicUses:416Used by:493
Symbol 493 MovieClip {level6_22}Uses:490 491 492
Symbol 494 GraphicUsed by:497
Symbol 495 GraphicUses:380Used by:497 500
Symbol 496 GraphicUses:416Used by:497
Symbol 497 MovieClip {level6_23}Uses:494 495 496
Symbol 498 GraphicUsed by:500
Symbol 499 GraphicUses:416Used by:500
Symbol 500 MovieClip {level6_24}Uses:498 495 499
Symbol 501 GraphicUsed by:504
Symbol 502 GraphicUses:380Used by:504
Symbol 503 GraphicUses:416Used by:504
Symbol 504 MovieClip {level6_25}Uses:501 502 503
Symbol 505 GraphicUsed by:508
Symbol 506 GraphicUses:380Used by:508 511
Symbol 507 GraphicUses:416Used by:508
Symbol 508 MovieClip {level6_26}Uses:505 506 507
Symbol 509 GraphicUsed by:511
Symbol 510 GraphicUses:416Used by:511
Symbol 511 MovieClip {level6_27}Uses:509 506 510
Symbol 512 GraphicUsed by:515
Symbol 513 GraphicUses:380Used by:515
Symbol 514 GraphicUses:416Used by:515
Symbol 515 MovieClip {level6_28}Uses:512 513 514
Symbol 516 GraphicUsed by:518
Symbol 517 GraphicUses:380Used by:518
Symbol 518 MovieClip {level6_29}Uses:516 517 424
Symbol 519 GraphicUsed by:522
Symbol 520 GraphicUses:380Used by:522 573
Symbol 521 GraphicUses:450 451 452 416Used by:522
Symbol 522 MovieClip {level6_11}Uses:519 520 521
Symbol 523 GraphicUsed by:527
Symbol 524 GraphicUses:380Used by:527
Symbol 525 BitmapUsed by:526 530 533 537 541 545 549 552 555 558 572 576 580 584 588 601 604 608
Symbol 526 GraphicUses:525Used by:527
Symbol 527 MovieClip {level5_1}Uses:523 524 526
Symbol 528 GraphicUsed by:531
Symbol 529 GraphicUses:380Used by:531 667 670
Symbol 530 GraphicUses:525Used by:531
Symbol 531 MovieClip {level5_2}Uses:528 529 530
Symbol 532 GraphicUsed by:534
Symbol 533 GraphicUses:525Used by:534
Symbol 534 MovieClip {level5_3}Uses:532 386 533
Symbol 535 GraphicUsed by:538
Symbol 536 GraphicUses:380Used by:538
Symbol 537 GraphicUses:525Used by:538
Symbol 538 MovieClip {level5_4}Uses:535 536 537
Symbol 539 GraphicUsed by:542
Symbol 540 GraphicUses:380Used by:542
Symbol 541 GraphicUses:525Used by:542
Symbol 542 MovieClip {level5_5}Uses:539 540 541
Symbol 543 GraphicUsed by:546
Symbol 544 GraphicUses:380Used by:546
Symbol 545 GraphicUses:525Used by:546
Symbol 546 MovieClip {level5_6}Uses:543 544 545
Symbol 547 GraphicUsed by:550
Symbol 548 GraphicUses:380Used by:550
Symbol 549 GraphicUses:525Used by:550
Symbol 550 MovieClip {level5_7}Uses:547 548 549
Symbol 551 GraphicUsed by:553
Symbol 552 GraphicUses:525Used by:553
Symbol 553 MovieClip {level5_8}Uses:551 420 552
Symbol 554 GraphicUsed by:556
Symbol 555 GraphicUses:525Used by:556
Symbol 556 MovieClip {level5_9}Uses:554 420 555
Symbol 557 GraphicUsed by:559
Symbol 558 GraphicUses:525Used by:559
Symbol 559 MovieClip {level5_10}Uses:557 420 558
Symbol 560 BitmapUsed by:562
Symbol 561 BitmapUsed by:562
Symbol 562 GraphicUses:560 561 450 461 452Used by:563
Symbol 563 MovieClip {level5_11}Uses:562
Symbol 564 GraphicUses:450 451 452Used by:565
Symbol 565 MovieClip {level5_12}Uses:564
Symbol 566 MovieClip {level5_13}
Symbol 567 GraphicUses:450 451 452Used by:568
Symbol 568 MovieClip {level5_14}Uses:567
Symbol 569 GraphicUses:450 451 452Used by:570
Symbol 570 MovieClip {level5_15}Uses:569
Symbol 571 GraphicUsed by:573
Symbol 572 GraphicUses:525 450 451 452Used by:573
Symbol 573 MovieClip {level5_16}Uses:571 520 572
Symbol 574 GraphicUsed by:577
Symbol 575 GraphicUses:380Used by:577
Symbol 576 GraphicUses:525Used by:577
Symbol 577 MovieClip {level5_17}Uses:574 575 576
Symbol 578 GraphicUsed by:581
Symbol 579 GraphicUses:380Used by:581
Symbol 580 GraphicUses:525Used by:581
Symbol 581 MovieClip {level5_18}Uses:578 579 580
Symbol 582 GraphicUsed by:585
Symbol 583 GraphicUses:380Used by:585
Symbol 584 GraphicUses:525Used by:585
Symbol 585 MovieClip {level5_20}Uses:582 583 584
Symbol 586 GraphicUsed by:589
Symbol 587 GraphicUses:380Used by:589
Symbol 588 GraphicUses:450 461 452 525Used by:589
Symbol 589 MovieClip {level5_21}Uses:586 587 588
Symbol 590 BitmapUsed by:592 595
Symbol 591 BitmapUsed by:592 595
Symbol 592 GraphicUses:461 450 590 452 591Used by:593
Symbol 593 MovieClip {level5_22}Uses:592
Symbol 594 BitmapUsed by:595
Symbol 595 GraphicUses:590 594 591 450 451 452Used by:596
Symbol 596 MovieClip {level5_23}Uses:595
Symbol 597 GraphicUses:450 451 452Used by:598
Symbol 598 MovieClip {level5_24}Uses:597
Symbol 599 GraphicUsed by:602
Symbol 600 GraphicUses:380Used by:602 605
Symbol 601 GraphicUses:525Used by:602
Symbol 602 MovieClip {level5_25}Uses:599 600 601
Symbol 603 GraphicUsed by:605
Symbol 604 GraphicUses:525Used by:605
Symbol 605 MovieClip {level5_26}Uses:603 600 604
Symbol 606 GraphicUsed by:609
Symbol 607 GraphicUses:380Used by:609
Symbol 608 GraphicUses:525Used by:609
Symbol 609 MovieClip {level5_19}Uses:606 607 608
Symbol 610 GraphicUsed by:613
Symbol 611 GraphicUses:380Used by:613
Symbol 612 GraphicUses:382Used by:613
Symbol 613 MovieClip {level2_11}Uses:610 611 612
Symbol 614 GraphicUsed by:617
Symbol 615 GraphicUses:380Used by:617
Symbol 616 GraphicUses:382Used by:617
Symbol 617 MovieClip {level2_12}Uses:614 615 616
Symbol 618 GraphicUsed by:621
Symbol 619 GraphicUses:380Used by:621
Symbol 620 GraphicUses:382Used by:621
Symbol 621 MovieClip {level2_13}Uses:618 619 620
Symbol 622 GraphicUsed by:625
Symbol 623 GraphicUses:380Used by:625
Symbol 624 GraphicUses:382Used by:625
Symbol 625 MovieClip {level2_15}Uses:622 623 624
Symbol 626 GraphicUsed by:629
Symbol 627 GraphicUses:380Used by:629
Symbol 628 GraphicUses:382Used by:629
Symbol 629 MovieClip {level2_16}Uses:626 627 628
Symbol 630 GraphicUsed by:632
Symbol 631 GraphicUses:382Used by:632
Symbol 632 MovieClip {level2_17}Uses:630 415 631
Symbol 633 GraphicUsed by:636
Symbol 634 GraphicUses:380Used by:636
Symbol 635 GraphicUses:382Used by:636
Symbol 636 MovieClip {level2_14}Uses:633 634 635
Symbol 637 GraphicUsed by:640
Symbol 638 GraphicUses:380Used by:640
Symbol 639 GraphicUses:382Used by:640
Symbol 640 MovieClip {level2_1}Uses:637 638 639
Symbol 641 GraphicUsed by:644
Symbol 642 GraphicUses:380Used by:644
Symbol 643 GraphicUses:382Used by:644
Symbol 644 MovieClip {level2_2}Uses:641 642 643
Symbol 645 GraphicUsed by:648
Symbol 646 GraphicUses:380Used by:648
Symbol 647 GraphicUses:382Used by:648
Symbol 648 MovieClip {level2_3}Uses:645 646 647
Symbol 649 GraphicUsed by:652
Symbol 650 GraphicUses:380Used by:652
Symbol 651 GraphicUses:382Used by:652
Symbol 652 MovieClip {level2_4}Uses:649 650 651
Symbol 653 GraphicUsed by:656
Symbol 654 GraphicUses:380Used by:656
Symbol 655 GraphicUses:450 451 452 382Used by:656
Symbol 656 MovieClip {level2_5}Uses:653 654 655
Symbol 657 GraphicUsed by:660
Symbol 658 GraphicUses:380Used by:660
Symbol 659 GraphicUses:450 451 452 382Used by:660
Symbol 660 MovieClip {level2_6}Uses:657 658 659
Symbol 661 GraphicUsed by:664
Symbol 662 GraphicUses:380Used by:664
Symbol 663 GraphicUses:450 451 452 382Used by:664
Symbol 664 MovieClip {level2_7}Uses:661 662 663
Symbol 665 GraphicUsed by:667
Symbol 666 GraphicUses:450 451 452 382Used by:667
Symbol 667 MovieClip {level2_8}Uses:665 529 666
Symbol 668 GraphicUsed by:670
Symbol 669 GraphicUses:450 451 452 382Used by:670
Symbol 670 MovieClip {level2_9}Uses:668 529 669
Symbol 671 GraphicUsed by:674
Symbol 672 GraphicUses:380Used by:674
Symbol 673 GraphicUses:382Used by:674
Symbol 674 MovieClip {level2_10}Uses:671 672 673
Symbol 675 GraphicUsed by:678
Symbol 676 GraphicUses:380Used by:678 681 801 812
Symbol 677 GraphicUses:450 451 452 183Used by:678
Symbol 678 MovieClip {level1_16}Uses:675 676 677
Symbol 679 GraphicUsed by:681
Symbol 680 GraphicUses:450 451 452 183Used by:681
Symbol 681 MovieClip {level1_17}Uses:679 676 680
Symbol 682 GraphicUses:450 451 452 183 380Used by:683
Symbol 683 MovieClip {level1_18}Uses:682
Symbol 684 GraphicUsed by:687
Symbol 685 GraphicUses:380Used by:687
Symbol 686 GraphicUses:450 451 452 183Used by:687
Symbol 687 MovieClip {level1_19}Uses:684 685 686
Symbol 688 GraphicUsed by:691
Symbol 689 GraphicUses:380Used by:691
Symbol 690 GraphicUses:183Used by:691
Symbol 691 MovieClip {level1_20}Uses:688 689 690
Symbol 692 GraphicUsed by:695
Symbol 693 GraphicUses:380Used by:695
Symbol 694 GraphicUses:183Used by:695
Symbol 695 MovieClip {level1_21}Uses:692 693 694
Symbol 696 GraphicUsed by:698
Symbol 697 GraphicUses:183Used by:698
Symbol 698 MovieClip {level1_22}Uses:696 420 697
Symbol 699 GraphicUses:183 380Used by:700
Symbol 700 MovieClip {level1_23}Uses:699
Symbol 701 GraphicUsed by:704
Symbol 702 GraphicUses:380Used by:704
Symbol 703 GraphicUses:183Used by:704
Symbol 704 MovieClip {level1_9}Uses:701 702 703
Symbol 705 GraphicUsed by:708
Symbol 706 GraphicUses:380Used by:708
Symbol 707 GraphicUses:183Used by:708
Symbol 708 MovieClip {level1_10}Uses:705 706 707
Symbol 709 GraphicUsed by:712
Symbol 710 GraphicUses:380Used by:712
Symbol 711 GraphicUses:183Used by:712
Symbol 712 MovieClip {level1_11}Uses:709 710 711
Symbol 713 GraphicUsed by:716
Symbol 714 GraphicUses:380Used by:716
Symbol 715 GraphicUses:183Used by:716
Symbol 716 MovieClip {level1_12}Uses:713 714 715
Symbol 717 GraphicUsed by:721
Symbol 718 GraphicUses:380Used by:721
Symbol 719 BitmapUsed by:720 724
Symbol 720 GraphicUses:719Used by:721
Symbol 721 MovieClip {level1_13}Uses:717 718 720
Symbol 722 GraphicUsed by:725
Symbol 723 GraphicUses:380Used by:725
Symbol 724 GraphicUses:719 183Used by:725
Symbol 725 MovieClip {level1_14}Uses:722 723 724
Symbol 726 GraphicUsed by:729
Symbol 727 GraphicUses:380Used by:729
Symbol 728 GraphicUses:183Used by:729
Symbol 729 MovieClip {level1_15}Uses:726 727 728
Symbol 730 GraphicUsed by:734
Symbol 731 GraphicUses:380Used by:734 760
Symbol 732 BitmapUsed by:733 736 741 744 748 751 756 759 763 766 769 773 777 781 787 793 797 800 804 808 811 814 817 820 824 828 831 839 843 847 851 855 859 869 872 876 880 884 888 892 896 899 902
Symbol 733 GraphicUses:732Used by:734
Symbol 734 MovieClip {level4_21}Uses:730 731 733
Symbol 735 GraphicUsed by:737
Symbol 736 GraphicUses:450 451 452 732Used by:737
Symbol 737 MovieClip {level4_22}Uses:735 405 736
Symbol 738 GraphicUses:450 451 452Used by:739
Symbol 739 MovieClip {level4_23}Uses:738
Symbol 740 GraphicUsed by:742
Symbol 741 GraphicUses:732Used by:742
Symbol 742 MovieClip {level4_24}Uses:740 405 741
Symbol 743 GraphicUsed by:745
Symbol 744 GraphicUses:732Used by:745 754 785
Symbol 745 MovieClip {level4_25}Uses:743 405 744
Symbol 746 GraphicUsed by:749
Symbol 747 GraphicUses:380Used by:749
Symbol 748 GraphicUses:732Used by:749
Symbol 749 MovieClip {level4_16}Uses:746 747 748
Symbol 750 GraphicUsed by:752
Symbol 751 GraphicUses:732Used by:752
Symbol 752 MovieClip {level4_17}Uses:750 420 751
Symbol 753 GraphicUsed by:754
Symbol 754 MovieClip {level4_18}Uses:753 405 744
Symbol 755 GraphicUsed by:757
Symbol 756 GraphicUses:732Used by:757
Symbol 757 MovieClip {level4_19}Uses:755 405 756
Symbol 758 GraphicUsed by:760
Symbol 759 GraphicUses:732Used by:760
Symbol 760 MovieClip {level4_20}Uses:758 731 759
Symbol 761 GraphicUsed by:764
Symbol 762 GraphicUses:380Used by:764 767
Symbol 763 GraphicUses:732Used by:764
Symbol 764 MovieClip {level4_11}Uses:761 762 763
Symbol 765 GraphicUsed by:767
Symbol 766 GraphicUses:732Used by:767
Symbol 767 MovieClip {level4_12}Uses:765 762 766
Symbol 768 GraphicUsed by:770
Symbol 769 GraphicUses:450 451 452 732Used by:770
Symbol 770 MovieClip {level4_13}Uses:768 485 769
Symbol 771 GraphicUsed by:774
Symbol 772 GraphicUses:380Used by:774
Symbol 773 GraphicUses:450 451 452 732Used by:774
Symbol 774 MovieClip {level4_14}Uses:771 772 773
Symbol 775 GraphicUsed by:778
Symbol 776 GraphicUses:380Used by:778
Symbol 777 GraphicUses:732Used by:778
Symbol 778 MovieClip {level4_15}Uses:775 776 777
Symbol 779 GraphicUsed by:782
Symbol 780 GraphicUses:380Used by:782
Symbol 781 GraphicUses:732Used by:782
Symbol 782 MovieClip {level4_6}Uses:779 780 781
Symbol 783 GraphicUsed by:785
Symbol 784 GraphicUses:380Used by:785 818 832 1061
Symbol 785 MovieClip {level4_7}Uses:783 784 744
Symbol 786 GraphicUsed by:788
Symbol 787 GraphicUses:732Used by:788
Symbol 788 MovieClip {level4_8}Uses:786 420 787
Symbol 789 GraphicUses:450 461 452Used by:790
Symbol 790 MovieClip {level4_9}Uses:789
Symbol 791 GraphicUsed by:794
Symbol 792 GraphicUses:380Used by:794
Symbol 793 GraphicUses:732Used by:794
Symbol 794 MovieClip {level4_10}Uses:791 792 793
Symbol 795 GraphicUsed by:798
Symbol 796 GraphicUses:380Used by:798
Symbol 797 GraphicUses:732Used by:798
Symbol 798 MovieClip {level4_1}Uses:795 796 797
Symbol 799 GraphicUsed by:801
Symbol 800 GraphicUses:732Used by:801
Symbol 801 MovieClip {level4_2}Uses:799 676 800
Symbol 802 GraphicUsed by:805
Symbol 803 GraphicUses:380Used by:805
Symbol 804 GraphicUses:732Used by:805
Symbol 805 MovieClip {level4_3}Uses:802 803 804
Symbol 806 GraphicUsed by:809
Symbol 807 GraphicUses:380Used by:809
Symbol 808 GraphicUses:732Used by:809
Symbol 809 MovieClip {level4_4}Uses:806 807 808
Symbol 810 GraphicUsed by:812
Symbol 811 GraphicUses:732Used by:812
Symbol 812 MovieClip {level4_5}Uses:810 676 811
Symbol 813 GraphicUsed by:815
Symbol 814 GraphicUses:732Used by:815
Symbol 815 MovieClip {level3_21}Uses:813 420 814
Symbol 816 GraphicUsed by:818
Symbol 817 GraphicUses:732Used by:818
Symbol 818 MovieClip {level3_22}Uses:816 784 817
Symbol 819 GraphicUsed by:821
Symbol 820 GraphicUses:732Used by:821
Symbol 821 MovieClip {level3_23}Uses:819 420 820
Symbol 822 GraphicUsed by:825
Symbol 823 GraphicUses:380Used by:825
Symbol 824 GraphicUses:732Used by:825
Symbol 825 MovieClip {level3_24}Uses:822 823 824
Symbol 826 GraphicUsed by:829
Symbol 827 GraphicUses:380Used by:829
Symbol 828 GraphicUses:732Used by:829
Symbol 829 MovieClip {level3_25}Uses:826 827 828
Symbol 830 GraphicUsed by:832
Symbol 831 GraphicUses:732Used by:832
Symbol 832 MovieClip {level3_26}Uses:830 784 831
Symbol 833 GraphicUses:450 461 452Used by:834
Symbol 834 MovieClip {level3_16}Uses:833
Symbol 835 GraphicUses:450 461 452Used by:836
Symbol 836 MovieClip {level3_17}Uses:835
Symbol 837 GraphicUsed by:840
Symbol 838 GraphicUses:380Used by:840
Symbol 839 GraphicUses:732Used by:840
Symbol 840 MovieClip {level3_18}Uses:837 838 839
Symbol 841 GraphicUsed by:844
Symbol 842 GraphicUses:380Used by:844
Symbol 843 GraphicUses:732Used by:844
Symbol 844 MovieClip {level3_19}Uses:841 842 843
Symbol 845 GraphicUsed by:848
Symbol 846 GraphicUses:380Used by:848
Symbol 847 GraphicUses:732Used by:848
Symbol 848 MovieClip {level3_20}Uses:845 846 847
Symbol 849 GraphicUsed by:852
Symbol 850 GraphicUses:380Used by:852
Symbol 851 GraphicUses:732Used by:852
Symbol 852 MovieClip {level3_11}Uses:849 850 851
Symbol 853 GraphicUsed by:856
Symbol 854 GraphicUses:380Used by:856
Symbol 855 GraphicUses:732Used by:856
Symbol 856 MovieClip {level3_12}Uses:853 854 855
Symbol 857 GraphicUsed by:860
Symbol 858 GraphicUses:380Used by:860
Symbol 859 GraphicUses:732Used by:860
Symbol 860 MovieClip {level3_13}Uses:857 858 859
Symbol 861 GraphicUses:450 461 452Used by:862
Symbol 862 MovieClip {level3_14}Uses:861
Symbol 863 MovieClip {level3_15}
Symbol 864 GraphicUsed by:870
Symbol 865 GraphicUses:380Used by:870 873 900 903
Symbol 866 BitmapUsed by:869 902
Symbol 867 BitmapUsed by:869 902
Symbol 868 BitmapUsed by:869 902
Symbol 869 GraphicUses:732 866 867 868Used by:870
Symbol 870 MovieClip {level3_6}Uses:864 865 869
Symbol 871 GraphicUsed by:873
Symbol 872 GraphicUses:732 450 451 452Used by:873
Symbol 873 MovieClip {level3_7}Uses:871 865 872
Symbol 874 GraphicUsed by:877
Symbol 875 GraphicUses:380Used by:877
Symbol 876 GraphicUses:732Used by:877
Symbol 877 MovieClip {level3_8}Uses:874 875 876
Symbol 878 GraphicUsed by:881
Symbol 879 GraphicUses:380Used by:881
Symbol 880 GraphicUses:732Used by:881
Symbol 881 MovieClip {level3_9}Uses:878 879 880
Symbol 882 GraphicUsed by:885
Symbol 883 GraphicUses:380Used by:885
Symbol 884 GraphicUses:732Used by:885
Symbol 885 MovieClip {level3_10}Uses:882 883 884
Symbol 886 GraphicUsed by:889
Symbol 887 GraphicUses:380Used by:889
Symbol 888 GraphicUses:450 451 452 732Used by:889
Symbol 889 MovieClip {level3_1}Uses:886 887 888
Symbol 890 GraphicUsed by:893
Symbol 891 GraphicUses:380Used by:893
Symbol 892 GraphicUses:732Used by:893
Symbol 893 MovieClip {level3_2}Uses:890 891 892
Symbol 894 GraphicUsed by:897
Symbol 895 GraphicUses:380Used by:897
Symbol 896 GraphicUses:732Used by:897
Symbol 897 MovieClip {level3_3}Uses:894 895 896
Symbol 898 GraphicUsed by:900
Symbol 899 GraphicUses:450 451 452 732Used by:900
Symbol 900 MovieClip {level3_4}Uses:898 865 899
Symbol 901 GraphicUsed by:903
Symbol 902 GraphicUses:866 867 868 732Used by:903
Symbol 903 MovieClip {level3_5}Uses:901 865 902
Symbol 904 GraphicUsed by:944 1144
Symbol 905 GraphicUsed by:944
Symbol 906 GraphicUsed by:944
Symbol 907 GraphicUsed by:944
Symbol 908 GraphicUsed by:944
Symbol 909 GraphicUsed by:944
Symbol 910 GraphicUsed by:944
Symbol 911 GraphicUsed by:921
Symbol 912 GraphicUsed by:921
Symbol 913 GraphicUsed by:921
Symbol 914 GraphicUsed by:921
Symbol 915 GraphicUsed by:921
Symbol 916 GraphicUsed by:921
Symbol 917 GraphicUsed by:921
Symbol 918 GraphicUsed by:921
Symbol 919 GraphicUsed by:921
Symbol 920 GraphicUsed by:921
Symbol 921 MovieClipUses:911 912 913 914 915 916 917 918 919 920Used by:922
Symbol 922 MovieClipUses:921Used by:944
Symbol 923 GraphicUsed by:944
Symbol 924 GraphicUsed by:944
Symbol 925 GraphicUsed by:944
Symbol 926 GraphicUsed by:944
Symbol 927 GraphicUsed by:944
Symbol 928 GraphicUsed by:944
Symbol 929 GraphicUsed by:944
Symbol 930 GraphicUsed by:944
Symbol 931 GraphicUsed by:944
Symbol 932 GraphicUsed by:944
Symbol 933 ShapeTweeningUsed by:944
Symbol 934 GraphicUsed by:944
Symbol 935 ShapeTweeningUsed by:944
Symbol 936 ShapeTweeningUsed by:944
Symbol 937 GraphicUsed by:944
Symbol 938 ShapeTweeningUsed by:944
Symbol 939 GraphicUsed by:944
Symbol 940 GraphicUsed by:944
Symbol 941 ShapeTweeningUsed by:944
Symbol 942 ShapeTweeningUsed by:944
Symbol 943 GraphicUsed by:944
Symbol 944 MovieClip {ninjaOnBike}Uses:904 905 906 907 908 909 910 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943
Symbol 945 GraphicUsed by:946 952
Symbol 946 MovieClipUses:945Used by:948 950
Symbol 947 GraphicUsed by:948
Symbol 948 MovieClip {OtherClasses.Buttons.MoreGames_PW}Uses:312 313 306 315 946 947 331
Symbol 949 GraphicUsed by:950
Symbol 950 MovieClip {OtherClasses.Buttons.MoreGames_IG}Uses:312 313 306 315 946 949 331
Symbol 951 GraphicUsed by:954 956 958 960 962 964 966 1043 1054
Symbol 952 MovieClipUses:945Used by:954 956 958 960 962 964 966
Symbol 953 GraphicUsed by:954
Symbol 954 MovieClip {OtherClasses.Buttons.MainMenu_PW}Uses:951 306 315 952 953 331
Symbol 955 GraphicUsed by:956
Symbol 956 MovieClip {OtherClasses.Buttons.HowToPlay_PW}Uses:951 306 315 952 955 331
Symbol 957 GraphicUsed by:958
Symbol 958 MovieClip {OtherClasses.Buttons.ResumeGame_IG}Uses:951 306 315 952 957 331
Symbol 959 GraphicUsed by:960
Symbol 960 MovieClip {OtherClasses.Buttons.MainMenu_IG}Uses:951 306 315 952 959 331
Symbol 961 GraphicUsed by:962
Symbol 962 MovieClip {OtherClasses.Buttons.Restart_IG}Uses:951 306 315 952 961 331
Symbol 963 GraphicUsed by:964
Symbol 964 MovieClip {OtherClasses.Buttons.TryAgain_IG}Uses:951 306 315 952 963 331
Symbol 965 GraphicUsed by:966
Symbol 966 MovieClip {OtherClasses.Buttons.NextLevel_IG}Uses:951 306 315 952 965 331
Symbol 967 GraphicUsed by:970 972
Symbol 968 GraphicUsed by:970
Symbol 969 MovieClipUses:317Used by:970 972
Symbol 970 MovieClip {OtherClasses.Buttons.Next_HTP}Uses:967 306 968 969 331
Symbol 971 GraphicUsed by:972
Symbol 972 MovieClip {OtherClasses.Buttons.MainMenu_HTP}Uses:967 306 971 969 331
Symbol 973 MovieClipUses:273Used by:983 1213
Symbol 974 GraphicUsed by:983
Symbol 975 GraphicUsed by:983
Symbol 976 TextUses:11Used by:983
Symbol 977 GraphicUsed by:983
Symbol 978 TextUses:11Used by:983
Symbol 979 GraphicUsed by:983
Symbol 980 TextUses:11Used by:983
Symbol 981 TextUses:11Used by:983
Symbol 982 TextUses:11Used by:983
Symbol 983 MovieClip {howToPlayBackground}Uses:973 974 306 975 976 977 978 979 980 981 982
Symbol 984 BitmapUsed by:985
Symbol 985 GraphicUses:984Used by:1031
Symbol 986 BitmapUsed by:987
Symbol 987 GraphicUses:986Used by:988
Symbol 988 MovieClipUses:987Used by:1031
Symbol 989 GraphicUsed by:1031
Symbol 990 BitmapUsed by:992
Symbol 991 BitmapUsed by:992
Symbol 992 GraphicUses:990 991Used by:1031
Symbol 993 GraphicUsed by:994
Symbol 994 MovieClipUses:993Used by:1031 1255
Symbol 995 GraphicUsed by:996
Symbol 996 MovieClipUses:995Used by:1031 1255
Symbol 997 GraphicUsed by:998
Symbol 998 MovieClipUses:997Used by:1031 1255
Symbol 999 GraphicUsed by:1000
Symbol 1000 MovieClipUses:999Used by:1031 1255
Symbol 1001 GraphicUsed by:1002
Symbol 1002 MovieClipUses:1001Used by:1031 1255
Symbol 1003 GraphicUsed by:1004
Symbol 1004 MovieClipUses:1003Used by:1031 1255
Symbol 1005 GraphicUsed by:1006
Symbol 1006 MovieClipUses:1005Used by:1031 1255
Symbol 1007 GraphicUsed by:1008
Symbol 1008 MovieClipUses:1007Used by:1031 1255
Symbol 1009 GraphicUsed by:1031
Symbol 1010 GraphicUsed by:1031
Symbol 1011 GraphicUsed by:1018
Symbol 1012 GraphicUsed by:1017
Symbol 1013 ShapeTweeningUsed by:1017
Symbol 1014 GraphicUsed by:1017
Symbol 1015 GraphicUsed by:1017
Symbol 1016 GraphicUsed by:1017
Symbol 1017 MovieClipUses:1012 1013 1014 1015 1016Used by:1018
Symbol 1018 MovieClipUses:1011 1017Used by:1031
Symbol 1019 GraphicUsed by:1031
Symbol 1020 GraphicUsed by:1021
Symbol 1021 MovieClipUses:1020Used by:1031
Symbol 1022 GraphicUsed by:1031
Symbol 1023 ShapeTweeningUsed by:1031
Symbol 1024 GraphicUsed by:1031
Symbol 1025 ShapeTweeningUsed by:1031
Symbol 1026 ShapeTweeningUsed by:1031
Symbol 1027 GraphicUsed by:1031
Symbol 1028 ShapeTweeningUsed by:1031
Symbol 1029 GraphicUsed by:1031
Symbol 1030 GraphicUsed by:1031
Symbol 1031 MovieClip {mainMenuBackground}Uses:985 988 989 992 994 996 998 1000 1002 1004 1006 1008 1009 1010 1018 1019 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
Symbol 1032 GraphicUsed by:1043
Symbol 1033 MovieClipUses:317Used by:1043 1054
Symbol 1034 ShapeTweeningUsed by:1043
Symbol 1035 ShapeTweeningUsed by:1043
Symbol 1036 ShapeTweeningUsed by:1043
Symbol 1037 ShapeTweeningUsed by:1043
Symbol 1038 ShapeTweeningUsed by:1043
Symbol 1039 GraphicUsed by:1043
Symbol 1040 ShapeTweeningUsed by:1043
Symbol 1041 GraphicUsed by:1043
Symbol 1042 GraphicUsed by:1043
Symbol 1043 MovieClip {OtherClasses.Buttons.HowToPlay_MM}Uses:951 306 315 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 331
Symbol 1044 GraphicUsed by:1054
Symbol 1045 ShapeTweeningUsed by:1054
Symbol 1046 ShapeTweeningUsed by:1054
Symbol 1047 ShapeTweeningUsed by:1054
Symbol 1048 ShapeTweeningUsed by:1054
Symbol 1049 ShapeTweeningUsed by:1054
Symbol 1050 GraphicUsed by:1054
Symbol 1051 ShapeTweeningUsed by:1054
Symbol 1052 GraphicUsed by:1054
Symbol 1053 GraphicUsed by:1054
Symbol 1054 MovieClip {OtherClasses.Buttons.StartGame_MM}Uses:951 306 315 1044 1033 1045 1046 1047 1048 1049 1050 1051 1052 1053 331
Symbol 1055 GraphicUsed by:1058
Symbol 1056 GraphicUses:380Used by:1058
Symbol 1057 GraphicUses:183Used by:1058
Symbol 1058 MovieClip {level1_6}Uses:1055 1056 1057
Symbol 1059 GraphicUsed by:1061
Symbol 1060 GraphicUses:183Used by:1061
Symbol 1061 MovieClip {level1_7}Uses:1059 784 1060
Symbol 1062 GraphicUsed by:1065
Symbol 1063 GraphicUses:380Used by:1065
Symbol 1064 GraphicUses:183Used by:1065
Symbol 1065 MovieClip {level1_8}Uses:1062 1063 1064
Symbol 1066 GraphicUses:183 380Used by:1067
Symbol 1067 MovieClip {level1_1}Uses:1066
Symbol 1068 GraphicUsed by:1070
Symbol 1069 GraphicUses:183Used by:1070
Symbol 1070 MovieClip {level1_5}Uses:1068 386 1069
Symbol 1071 BitmapUsed by:1072
Symbol 1072 GraphicUses:1071Used by:1073
Symbol 1073 MovieClip {loopSpriteFront}Uses:1072
Symbol 1074 BitmapUsed by:1075
Symbol 1075 GraphicUses:1074Used by:1076
Symbol 1076 MovieClip {loopSpriteBack}Uses:1075
Symbol 1077 GraphicUsed by:1078
Symbol 1078 MovieClip {carSprite}Uses:1077
Symbol 1079 GraphicUsed by:1087
Symbol 1080 GraphicUsed by:1087
Symbol 1081 ShapeTweeningUsed by:1087
Symbol 1082 ShapeTweeningUsed by:1087
Symbol 1083 GraphicUsed by:1087
Symbol 1084 ShapeTweeningUsed by:1087
Symbol 1085 ShapeTweeningUsed by:1087
Symbol 1086 GraphicUsed by:1087
Symbol 1087 MovieClip {trick4Box}Uses:1079 1080 1081 1082 1083 1084 1085 1086
Symbol 1088 GraphicUsed by:1096
Symbol 1089 GraphicUsed by:1096
Symbol 1090 ShapeTweeningUsed by:1096
Symbol 1091 ShapeTweeningUsed by:1096
Symbol 1092 GraphicUsed by:1096
Symbol 1093 ShapeTweeningUsed by:1096
Symbol 1094 ShapeTweeningUsed by:1096
Symbol 1095 GraphicUsed by:1096
Symbol 1096 MovieClip {trick3Box}Uses:1088 1089 1090 1091 1092 1093 1094 1095
Symbol 1097 GraphicUsed by:1105
Symbol 1098 GraphicUsed by:1105
Symbol 1099 ShapeTweeningUsed by:1105
Symbol 1100 ShapeTweeningUsed by:1105
Symbol 1101 GraphicUsed by:1105
Symbol 1102 ShapeTweeningUsed by:1105
Symbol 1103 ShapeTweeningUsed by:1105
Symbol 1104 GraphicUsed by:1105
Symbol 1105 MovieClip {trick2Box}Uses:1097 1098 1099 1100 1101 1102 1103 1104
Symbol 1106 GraphicUsed by:1114
Symbol 1107 GraphicUsed by:1114
Symbol 1108 ShapeTweeningUsed by:1114
Symbol 1109 ShapeTweeningUsed by:1114
Symbol 1110 GraphicUsed by:1114
Symbol 1111 ShapeTweeningUsed by:1114
Symbol 1112 ShapeTweeningUsed by:1114
Symbol 1113 GraphicUsed by:1114
Symbol 1114 MovieClip {trick1Box}Uses:1106 1107 1108 1109 1110 1111 1112 1113
Symbol 1115 GraphicUsed by:1116
Symbol 1116 MovieClip {cansWithOilSprite}Uses:1115
Symbol 1117 GraphicUsed by:1118
Symbol 1118 MovieClip {garbageBagsSprite}Uses:1117
Symbol 1119 GraphicUsed by:1120
Symbol 1120 MovieClip {tireJunkSprite}Uses:1119
Symbol 1121 GraphicUsed by:1122
Symbol 1122 MovieClip {tiresWithRampSprite}Uses:1121
Symbol 1123 BitmapUsed by:1124
Symbol 1124 GraphicUses:1123Used by:1127
Symbol 1125 GraphicUsed by:1127
Symbol 1126 GraphicUsed by:1127
Symbol 1127 MovieClip {bikeChassis}Uses:1124 1125 1126
Symbol 1128 GraphicUsed by:1144
Symbol 1129 GraphicUsed by:1144
Symbol 1130 GraphicUsed by:1144
Symbol 1131 GraphicUsed by:1144
Symbol 1132 GraphicUsed by:1144
Symbol 1133 MovieClipUses:1 2 3Used by:1144
Symbol 1134 GraphicUsed by:1144
Symbol 1135 GraphicUsed by:1144
Symbol 1136 GraphicUsed by:1144
Symbol 1137 GraphicUsed by:1144
Symbol 1138 GraphicUsed by:1144
Symbol 1139 GraphicUsed by:1144
Symbol 1140 GraphicUsed by:1144
Symbol 1141 GraphicUsed by:1144
Symbol 1142 GraphicUsed by:1144
Symbol 1143 GraphicUsed by:1144
Symbol 1144 MovieClip {ejectedNinja}Uses:904 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143
Symbol 1145 BitmapUsed by:1146
Symbol 1146 GraphicUses:1145Used by:1147
Symbol 1147 MovieClip {NinjaStarSprite}Uses:1146
Symbol 1148 GraphicUsed by:1169
Symbol 1149 BitmapUsed by:1150 1152 1153 1154 1156 1157 1159 1161 1162 1163 1164 1165 1166
Symbol 1150 GraphicUses:1149Used by:1169
Symbol 1151 GraphicUsed by:1169
Symbol 1152 GraphicUses:1149Used by:1169
Symbol 1153 GraphicUses:1149Used by:1169
Symbol 1154 GraphicUses:1149Used by:1169
Symbol 1155 BitmapUsed by:1156 1157 1159 1161 1162 1163 1164 1165
Symbol 1156 GraphicUses:1149 1155Used by:1169
Symbol 1157 GraphicUses:1149 1155Used by:1169
Symbol 1158 BitmapUsed by:1159 1161 1162 1163 1164 1165 1166 1167
Symbol 1159 GraphicUses:1149 1158 1155Used by:1169
Symbol 1160 BitmapUsed by:1161 1162 1163 1164 1165 1166 1167 1168
Symbol 1161 GraphicUses:1149 1160 1158 1155Used by:1169
Symbol 1162 GraphicUses:1149 1160 1158 1155Used by:1169
Symbol 1163 GraphicUses:1149 1160 1158 1155Used by:1169
Symbol 1164 GraphicUses:1149 1160 1158 1155Used by:1169
Symbol 1165 GraphicUses:1160 1158 1149 1155Used by:1169
Symbol 1166 GraphicUses:1160 1158 1149Used by:1169
Symbol 1167 GraphicUses:1160 1158Used by:1169
Symbol 1168 GraphicUses:1160Used by:1169
Symbol 1169 MovieClip {CheckPointFlagMC}Uses:1148 1150 1151 1152 1153 1154 1156 1157 1159 1161 1162 1163 1164 1165 1166 1167 1168
Symbol 1170 GraphicUsed by:1174
Symbol 1171 FontUsed by:1172
Symbol 1172 TextUses:1171Used by:1174
Symbol 1173 GraphicUsed by:1174
Symbol 1174 MovieClip {PauseMC}Uses:1170 1172 1173
Symbol 1175 GraphicUsed by:1178
Symbol 1176 FontUsed by:1177 1180 1184
Symbol 1177 EditableTextUses:1176Used by:1178
Symbol 1178 MovieClip {OtherClasses.ScoreMC}Uses:1175 306 1177
Symbol 1179 GraphicUsed by:1182
Symbol 1180 EditableTextUses:1176Used by:1181
Symbol 1181 MovieClipUses:1180Used by:1182
Symbol 1182 MovieClip {OtherClasses.Clock}Uses:1179 306 1181
Symbol 1183 GraphicUsed by:1187
Symbol 1184 TextUses:1176Used by:1187
Symbol 1185 GraphicUsed by:1186
Symbol 1186 MovieClipUses:1185Used by:1187
Symbol 1187 MovieClip {OtherClasses.NitroBar}Uses:1183 1184 1186
Symbol 1188 BitmapUsed by:1189
Symbol 1189 GraphicUses:1188Used by:1190
Symbol 1190 MovieClip {graphBG}Uses:1189
Symbol 1191 BitmapUsed by:1192
Symbol 1192 GraphicUses:1191Used by:1193
Symbol 1193 MovieClip {OtherClasses.OrangeExhaust}Uses:1192
Symbol 1194 MovieClip {OtherClasses.TrickText}
Symbol 1195 MovieClip {OtherClasses.SecondsTillStart}Uses:306
Symbol 1196 MovieClipUsed by:1197
Symbol 1197 MovieClip {OtherClasses.LevelEMC}Uses:1196
Symbol 1198 GraphicUsed by:1199
Symbol 1199 MovieClip {sprocket}Uses:1198
Symbol 1200 GraphicUsed by:1201
Symbol 1201 MovieClip {rearShocks}Uses:1200
Symbol 1202 GraphicUsed by:1203
Symbol 1203 MovieClip {frontShocks}Uses:1202
Symbol 1204 GraphicUsed by:1205
Symbol 1205 MovieClip {wheelSprite}Uses:1204
Symbol 1206 BitmapUsed by:1207
Symbol 1207 GraphicUses:1206Used by:1208
Symbol 1208 MovieClip {gameBG}Uses:1207
Symbol 1209 GraphicUsed by:1210
Symbol 1210 MovieClip {backRib}Uses:1209
Symbol 1211 GraphicUsed by:1213
Symbol 1212 GraphicUsed by:1213
Symbol 1213 MovieClip {pauseWindowSprite}Uses:1211 973 1212
Symbol 1214 MovieClip {blackFaderSprite}Uses:273
Symbol 1215 BitmapUsed by:1216
Symbol 1216 GraphicUses:1215Used by:1217
Symbol 1217 MovieClip {smallLoopSpriteBack}Uses:1216
Symbol 1218 BitmapUsed by:1219
Symbol 1219 GraphicUses:1218Used by:1220
Symbol 1220 MovieClip {smallLoopSpriteFront}Uses:1219
Symbol 1221 GraphicUsed by:1223
Symbol 1222 EditableTextUses:9Used by:1223
Symbol 1223 MovieClip {OtherClasses.LivesLeftIndicator}Uses:1221 1222 306
Symbol 1224 GraphicUsed by:1225
Symbol 1225 MovieClip {OtherClasses.LevelIndicator}Uses:1224 306
Symbol 1226 GraphicUsed by:1247
Symbol 1227 GraphicUsed by:1228
Symbol 1228 MovieClipUses:1227Used by:1247
Symbol 1229 GraphicUsed by:1247
Symbol 1230 GraphicUsed by:1247
Symbol 1231 MovieClipUses:279Used by:1247
Symbol 1232 GraphicUsed by:1233
Symbol 1233 MovieClipUses:1232Used by:1247
Symbol 1234 GraphicUsed by:1247
Symbol 1235 GraphicUsed by:1236
Symbol 1236 MovieClipUses:1235Used by:1247
Symbol 1237 GraphicUsed by:1247
Symbol 1238 GraphicUsed by:1239
Symbol 1239 MovieClipUses:1238Used by:1247
Symbol 1240 GraphicUsed by:1247
Symbol 1241 GraphicUsed by:1242
Symbol 1242 MovieClipUses:1241Used by:1247
Symbol 1243 GraphicUsed by:1247
Symbol 1244 EditableTextUses:9Used by:1247
Symbol 1245 EditableTextUses:9Used by:1247
Symbol 1246 TextUses:11Used by:1247 1255
Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen}Uses:274 1226 306 1228 1229 280 1230 1231 1233 1234 1236 1237 1239 1240 1242 1243 1244 1245 1246
Symbol 1248 GraphicUsed by:1255
Symbol 1249 GraphicUsed by:1250
Symbol 1250 MovieClipUses:1249Used by:1255
Symbol 1251 EditableTextUses:9Used by:1255
Symbol 1252 EditableTextUses:9Used by:1255
Symbol 1253 EditableTextUses:9Used by:1255
Symbol 1254 TextUses:9Used by:1255
Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen}Uses:274 1248 1250 994 996 998 1000 1002 1004 1006 1008 306 1251 1252 1253 1254 1246
Symbol 1256 BitmapUsed by:1257
Symbol 1257 GraphicUses:1256Used by:1258
Symbol 1258 MovieClip {loweringPlatformWiresSprite}Uses:1257
Symbol 1259 BitmapUsed by:1260
Symbol 1260 GraphicUses:1259Used by:1261
Symbol 1261 MovieClip {greyLoweringPlatformSprite}Uses:1260
Symbol 1262 BitmapUsed by:1263
Symbol 1263 GraphicUses:1262Used by:1264
Symbol 1264 MovieClip {gameBGScrollSprite}Uses:1263
Symbol 1265 GraphicUsed by:1273
Symbol 1266 GraphicUsed by:1273
Symbol 1267 GraphicUsed by:1273
Symbol 1268 GraphicUsed by:1273
Symbol 1269 GraphicUsed by:1273
Symbol 1270 GraphicUsed by:1273
Symbol 1271 GraphicUsed by:1273
Symbol 1272 GraphicUsed by:1273
Symbol 1273 MovieClip {gameOverScreenBG}Uses:274 1265 277 1266 280 1267 283 1268 286 287 289 1269 292 1270 294 295 296 298 1271 301 1272 306
Symbol 1274 GraphicUsed by:1279
Symbol 1275 GraphicUsed by:1279
Symbol 1276 MovieClipUses:317Used by:1279 1282 1285
Symbol 1277 GraphicUsed by:1279
Symbol 1278 GraphicUsed by:1279
Symbol 1279 MovieClip {OtherClasses.Buttons.StageQualityButton}Uses:1274 1275 1276 1277 1278
Symbol 1280 GraphicUsed by:1282
Symbol 1281 GraphicUsed by:1282
Symbol 1282 MovieClip {OtherClasses.Buttons.SoundEffectsButton}Uses:1280 1276 1281
Symbol 1283 GraphicUsed by:1285
Symbol 1284 GraphicUsed by:1285
Symbol 1285 MovieClip {OtherClasses.Buttons.MusicButton}Uses:1283 1276 1284
Symbol 1286 GraphicUsed by:1287
Symbol 1287 MovieClip {LocFixSprite}Uses:1286
Symbol 1288 GraphicUsed by:1289
Symbol 1289 MovieClipUses:1288Used by:1293
Symbol 1290 BitmapUsed by:1291
Symbol 1291 GraphicUses:1290Used by:1292
Symbol 1292 MovieClip {com.google.analytics.components.Icon}Uses:1291Used by:1293
Symbol 1293 MovieClip {com.google.analytics.components.FlashTracker}Uses:1289 1292

Instance Names

"textfield"Symbol 13 MovieClip {OtherClasses.TempPreloader} Frame 1Symbol 12 EditableText
"livesLeft"Symbol 308 MovieClip {OtherClasses.TimeIsUpScreen} Frame 1Symbol 303 EditableText
"__id0_"Symbol 308 MovieClip {OtherClasses.TimeIsUpScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id1_"Symbol 308 MovieClip {OtherClasses.TimeIsUpScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id2_"Symbol 308 MovieClip {OtherClasses.TimeIsUpScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"mgblEMC"Symbol 332 MovieClip {OtherClasses.Buttons.MoreGames_MM} Frame 1Symbol 313 MovieClip
"theText"Symbol 332 MovieClip {OtherClasses.Buttons.MoreGames_MM} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 332 MovieClip {OtherClasses.Buttons.MoreGames_MM} Frame 1Symbol 318 MovieClip
"OO00OO1l1l"Symbol 335 MovieClip {Spill.Components.Submitter} Frame 1Symbol 334 MovieClip {SubmitterProxy}
"flag"Symbol 372 MovieClip Frame 1Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342}
"text"Symbol 372 MovieClip Frame 1Symbol 371 EditableText
"l_de"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_en_us"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_fr"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_it"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_nl"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_pl"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_es_mx"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_br"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_cn"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_en_uk"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_es"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_id"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_jp"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_pt"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_ar"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_in"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_es_ar"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_se"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"l_ru"Symbol 375 MovieClip {spill.localisation.LanguageSelectPopup_mc} Frame 1Symbol 372 MovieClip
"languageName_text"Symbol 378 MovieClip {spill.localisation.LanguageSelectBox_mc} Frame 1Symbol 377 EditableText
"flag"Symbol 378 MovieClip {spill.localisation.LanguageSelectBox_mc} Frame 1Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342}
"ninjaScarfInner"Symbol 922 MovieClip Frame 1Symbol 921 MovieClip
"ninjaScarf"Symbol 944 MovieClip {ninjaOnBike} Frame 1Symbol 922 MovieClip
"mgblEMC"Symbol 948 MovieClip {OtherClasses.Buttons.MoreGames_PW} Frame 1Symbol 313 MovieClip
"__id3_"Symbol 948 MovieClip {OtherClasses.Buttons.MoreGames_PW} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 948 MovieClip {OtherClasses.Buttons.MoreGames_PW} Frame 1Symbol 946 MovieClip
"mgblEMC"Symbol 950 MovieClip {OtherClasses.Buttons.MoreGames_IG} Frame 1Symbol 313 MovieClip
"__id4_"Symbol 950 MovieClip {OtherClasses.Buttons.MoreGames_IG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 950 MovieClip {OtherClasses.Buttons.MoreGames_IG} Frame 1Symbol 946 MovieClip
"__id5_"Symbol 954 MovieClip {OtherClasses.Buttons.MainMenu_PW} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 954 MovieClip {OtherClasses.Buttons.MainMenu_PW} Frame 1Symbol 952 MovieClip
"__id6_"Symbol 956 MovieClip {OtherClasses.Buttons.HowToPlay_PW} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 956 MovieClip {OtherClasses.Buttons.HowToPlay_PW} Frame 1Symbol 952 MovieClip
"__id7_"Symbol 958 MovieClip {OtherClasses.Buttons.ResumeGame_IG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 958 MovieClip {OtherClasses.Buttons.ResumeGame_IG} Frame 1Symbol 952 MovieClip
"__id8_"Symbol 960 MovieClip {OtherClasses.Buttons.MainMenu_IG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 960 MovieClip {OtherClasses.Buttons.MainMenu_IG} Frame 1Symbol 952 MovieClip
"__id9_"Symbol 962 MovieClip {OtherClasses.Buttons.Restart_IG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 962 MovieClip {OtherClasses.Buttons.Restart_IG} Frame 1Symbol 952 MovieClip
"__id10_"Symbol 964 MovieClip {OtherClasses.Buttons.TryAgain_IG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 964 MovieClip {OtherClasses.Buttons.TryAgain_IG} Frame 1Symbol 952 MovieClip
"__id11_"Symbol 966 MovieClip {OtherClasses.Buttons.NextLevel_IG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 966 MovieClip {OtherClasses.Buttons.NextLevel_IG} Frame 1Symbol 952 MovieClip
"__id12_"Symbol 970 MovieClip {OtherClasses.Buttons.Next_HTP} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 970 MovieClip {OtherClasses.Buttons.Next_HTP} Frame 1Symbol 969 MovieClip
"__id13_"Symbol 972 MovieClip {OtherClasses.Buttons.MainMenu_HTP} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 972 MovieClip {OtherClasses.Buttons.MainMenu_HTP} Frame 1Symbol 969 MovieClip
"__id14_"Symbol 983 MovieClip {howToPlayBackground} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id15_"Symbol 983 MovieClip {howToPlayBackground} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id16_"Symbol 983 MovieClip {howToPlayBackground} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id17_"Symbol 983 MovieClip {howToPlayBackground} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"theText"Symbol 1043 MovieClip {OtherClasses.Buttons.HowToPlay_MM} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 1043 MovieClip {OtherClasses.Buttons.HowToPlay_MM} Frame 1Symbol 1033 MovieClip
"theText"Symbol 1054 MovieClip {OtherClasses.Buttons.StartGame_MM} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 1054 MovieClip {OtherClasses.Buttons.StartGame_MM} Frame 1Symbol 1033 MovieClip
"__id18_"Symbol 1178 MovieClip {OtherClasses.ScoreMC} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"textfield"Symbol 1178 MovieClip {OtherClasses.ScoreMC} Frame 1Symbol 1177 EditableText
"textfield"Symbol 1181 MovieClip Frame 1Symbol 1180 EditableText
"__id19_"Symbol 1182 MovieClip {OtherClasses.Clock} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"innerClock"Symbol 1182 MovieClip {OtherClasses.Clock} Frame 1Symbol 1181 MovieClip
"insideBar"Symbol 1187 MovieClip {OtherClasses.NitroBar} Frame 1Symbol 1186 MovieClip
"lc"Symbol 1195 MovieClip {OtherClasses.SecondsTillStart} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"backgroundEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"debugDrawEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"obstaclesEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"exhaustEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"ninjaStarsEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"vehicleEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"cpflEMC"Symbol 1197 MovieClip {OtherClasses.LevelEMC} Frame 1Symbol 1196 MovieClip
"textbox"Symbol 1223 MovieClip {OtherClasses.LivesLeftIndicator} Frame 1Symbol 1222 EditableText
"__id20_"Symbol 1223 MovieClip {OtherClasses.LivesLeftIndicator} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"lc"Symbol 1225 MovieClip {OtherClasses.LevelIndicator} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id21_"Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"timeLeft"Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen} Frame 1Symbol 1244 EditableText
"points"Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen} Frame 1Symbol 1245 EditableText
"__id22_"Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id23_"Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id24_"Symbol 1247 MovieClip {OtherClasses.GameCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id25_"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"level"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 1251 EditableText
"timeLeft"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 1252 EditableText
"points"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 1253 EditableText
"__id26_"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id27_"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id28_"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id29_"Symbol 1255 MovieClip {OtherClasses.LevelCompleteScreen} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id30_"Symbol 1273 MovieClip {gameOverScreenBG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"__id31_"Symbol 1273 MovieClip {gameOverScreenBG} Frame 1Symbol 306 MovieClip {spill.localisation.LocalizedTextField}
"hoverMC"Symbol 1279 MovieClip {OtherClasses.Buttons.StageQualityButton} Frame 1Symbol 1276 MovieClip
"hoverMC"Symbol 1282 MovieClip {OtherClasses.Buttons.SoundEffectsButton} Frame 1Symbol 1276 MovieClip
"hoverMC"Symbol 1285 MovieClip {OtherClasses.Buttons.MusicButton} Frame 1Symbol 1276 MovieClip
"boundingBox_mc"Symbol 1293 MovieClip {com.google.analytics.components.FlashTracker} Frame 1Symbol 1289 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""

Labels

"midSpeed"Symbol 4 MovieClip Frame 1
"www.agame.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 1
"www.game.com.cn"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 2
"www.zapjuegos.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 3
"www.spel.nl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 4
"www.jeu.fr"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 5
"www.spielen.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 6
"www.clickjogos.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 7
"www.giocaregratis.it"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 8
"www.spel.se"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 9
"www.mygames.co.uk"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 10
"www.flashgames.ru"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 11
"www.game.co.in"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 12
"www.games.co.id"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 13
"www.minigry.pl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 14
"www.asoyun.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 15
"www.game.com.my"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 16
"www.gamesgames.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 17
"www.spelletjes.nl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 18
"www.jeux.fr"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 19
"www.jetztspielen.de"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 20
"www.gry.pl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 21
"www.spela.se"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 22
"www.gioco.it"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 23
"www.juegos.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 24
"www.juegos.com.mx"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 25
"www.juegos.com.ar"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 26
"www.ojogos.com.br"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 27
"www.ourgames.ru"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 28
"www.games.co.uk"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 29
"www.oyunlar123.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 30
"www.girlsgogames.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 31
"www.girlsgogames.in"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 32
"www.girlsgogamestr.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 33
"www.girlsgogames.com.br"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 34
"www.girlsgogames.fr"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 35
"www.girlsgogames.co.uk"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 36
"www.girlsgogames.de"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 37
"www.girlsgogames.pl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 38
"www.girlsgogames.ru"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 39
"www.juegosdechicas.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 40
"www.juegosdechicas.com.ar"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 41
"www.juegosdechicas.mx"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 42
"www.girlsgogames.it"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 43
"www.girlsgogames.es"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 44
"www.girlsgogames.nl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 45
"www.girlsgogames.se"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 46
"www.ojogos.pt"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 47
"www.laro.com.ph"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 48
"www.egames.jp"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 49
"www.a10.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 50
"www.dailygame.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 51
"www.zapapa.com"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 52
"www.zapapa.nl"Symbol 152 MovieClip {spill.localisation.BrandingLogo} Frame 53
"startFrame"Symbol 272 MovieClip {FinishFlagMC} Frame 1
"normal"Symbol 332 MovieClip {OtherClasses.Buttons.MoreGames_MM} Frame 1
"mouseOver"Symbol 332 MovieClip {OtherClasses.Buttons.MoreGames_MM} Frame 2
"br"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 1
"nl"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 2
"cn"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 3
"de"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 4
"es"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 5
"fr"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 6
"in"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 7
"it"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 8
"jp"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 9
"my"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 10
"ph"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 11
"pl"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 12
"pt"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 13
"ru"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 14
"se"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 15
"tr"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 16
"en_uk"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 17
"en_us"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 18
"id"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 19
"ar"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 20
"es_mx"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 21
"es_ar"Symbol 370 MovieClip {NitroNinjas_fla.flag_icon_342} Frame 22
"idle"Symbol 921 MovieClip Frame 1
"idle_end"Symbol 921 MovieClip Frame 2
"slowSpeed"Symbol 921 MovieClip Frame 3
"slowSpeed_end"Symbol 921 MovieClip Frame 11
"midSpeed"Symbol 921 MovieClip Frame 12
"midSpeed_end"Symbol 921 MovieClip Frame 17
"highSpeed"Symbol 921 MovieClip Frame 18
"highSpeed_end"Symbol 921 MovieClip Frame 20
"idle"Symbol 944 MovieClip {ninjaOnBike} Frame 1
"trick1"Symbol 944 MovieClip {ninjaOnBike} Frame 10
"trick1_loopStart"Symbol 944 MovieClip {ninjaOnBike} Frame 20
"trick1_loopEnd"Symbol 944 MovieClip {ninjaOnBike} Frame 40
"trick1_blank"Symbol 944 MovieClip {ninjaOnBike} Frame 41
"trick1_end"Symbol 944 MovieClip {ninjaOnBike} Frame 50
"trick2"Symbol 944 MovieClip {ninjaOnBike} Frame 51
"trick2_loopStart"Symbol 944 MovieClip {ninjaOnBike} Frame 62
"trick2_loopEnd"Symbol 944 MovieClip {ninjaOnBike} Frame 82
"trick2_blank"Symbol 944 MovieClip {ninjaOnBike} Frame 83
"trick2_end"Symbol 944 MovieClip {ninjaOnBike} Frame 91
"trick3"Symbol 944 MovieClip {ninjaOnBike} Frame 92
"trick3_end"Symbol 944 MovieClip {ninjaOnBike} Frame 132
"trick4"Symbol 944 MovieClip {ninjaOnBike} Frame 133
"trick4_loopStart"Symbol 944 MovieClip {ninjaOnBike} Frame 143
"trick4_loopEnd"Symbol 944 MovieClip {ninjaOnBike} Frame 181
"trick4_blank"Symbol 944 MovieClip {ninjaOnBike} Frame 182
"trick4_end"Symbol 944 MovieClip {ninjaOnBike} Frame 191
"normal"Symbol 948 MovieClip {OtherClasses.Buttons.MoreGames_PW} Frame 1
"mouseOver"Symbol 948 MovieClip {OtherClasses.Buttons.MoreGames_PW} Frame 2
"normal"Symbol 950 MovieClip {OtherClasses.Buttons.MoreGames_IG} Frame 1
"mouseOver"Symbol 950 MovieClip {OtherClasses.Buttons.MoreGames_IG} Frame 2
"normal"Symbol 954 MovieClip {OtherClasses.Buttons.MainMenu_PW} Frame 1
"mouseOver"Symbol 954 MovieClip {OtherClasses.Buttons.MainMenu_PW} Frame 2
"normal"Symbol 956 MovieClip {OtherClasses.Buttons.HowToPlay_PW} Frame 1
"mouseOver"Symbol 956 MovieClip {OtherClasses.Buttons.HowToPlay_PW} Frame 2
"normal"Symbol 958 MovieClip {OtherClasses.Buttons.ResumeGame_IG} Frame 1
"mouseOver"Symbol 958 MovieClip {OtherClasses.Buttons.ResumeGame_IG} Frame 2
"normal"Symbol 960 MovieClip {OtherClasses.Buttons.MainMenu_IG} Frame 1
"mouseOver"Symbol 960 MovieClip {OtherClasses.Buttons.MainMenu_IG} Frame 2
"normal"Symbol 962 MovieClip {OtherClasses.Buttons.Restart_IG} Frame 1
"mouseOver"Symbol 962 MovieClip {OtherClasses.Buttons.Restart_IG} Frame 2
"normal"Symbol 964 MovieClip {OtherClasses.Buttons.TryAgain_IG} Frame 1
"mouseOver"Symbol 964 MovieClip {OtherClasses.Buttons.TryAgain_IG} Frame 2
"normal"Symbol 966 MovieClip {OtherClasses.Buttons.NextLevel_IG} Frame 1
"mouseOver"Symbol 966 MovieClip {OtherClasses.Buttons.NextLevel_IG} Frame 2
"normal"Symbol 970 MovieClip {OtherClasses.Buttons.Next_HTP} Frame 1
"mouseOver"Symbol 970 MovieClip {OtherClasses.Buttons.Next_HTP} Frame 2
"normal"Symbol 972 MovieClip {OtherClasses.Buttons.MainMenu_HTP} Frame 1
"mouseOver"Symbol 972 MovieClip {OtherClasses.Buttons.MainMenu_HTP} Frame 2
"start"Symbol 1031 MovieClip {mainMenuBackground} Frame 1
"normal"Symbol 1043 MovieClip {OtherClasses.Buttons.HowToPlay_MM} Frame 1
"mouseOver"Symbol 1043 MovieClip {OtherClasses.Buttons.HowToPlay_MM} Frame 2
"normal"Symbol 1054 MovieClip {OtherClasses.Buttons.StartGame_MM} Frame 1
"mouseOver"Symbol 1054 MovieClip {OtherClasses.Buttons.StartGame_MM} Frame 2
"fixed"Symbol 1127 MovieClip {bikeChassis} Frame 1
"destroyed"Symbol 1127 MovieClip {bikeChassis} Frame 2
"on_bike"Symbol 1144 MovieClip {ejectedNinja} Frame 1
"tuck"Symbol 1144 MovieClip {ejectedNinja} Frame 2
"tuck_to_standing"Symbol 1144 MovieClip {ejectedNinja} Frame 3
"paused"Symbol 1174 MovieClip {PauseMC} Frame 1
"normal"Symbol 1174 MovieClip {PauseMC} Frame 2
"highQuality"Symbol 1279 MovieClip {OtherClasses.Buttons.StageQualityButton} Frame 1
"normalQuality"Symbol 1279 MovieClip {OtherClasses.Buttons.StageQualityButton} Frame 2
"lowQuality"Symbol 1279 MovieClip {OtherClasses.Buttons.StageQualityButton} Frame 3
"sfxOn"Symbol 1282 MovieClip {OtherClasses.Buttons.SoundEffectsButton} Frame 1
"sfxOff"Symbol 1282 MovieClip {OtherClasses.Buttons.SoundEffectsButton} Frame 2
"musicOn"Symbol 1285 MovieClip {OtherClasses.Buttons.MusicButton} Frame 1
"musicOff"Symbol 1285 MovieClip {OtherClasses.Buttons.MusicButton} Frame 2




http://swfchan.com/23/113661/info.shtml
Created: 11/3 -2019 10:36:48 Last modified: 11/3 -2019 10:36:48 Server time: 05/11 -2024 14:52:06