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

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

515320_CoverOrange.swf

This is the info page for
Flash #78608

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


Text
SUBMIT YOUR SCORE

YOUR NAME

Congratulations!

Error, score not send (no connection?)

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

<p align="center"><font face="Arial" size="12" color="#000033" letterSpacing="0.000000" kerning="0"><a href="http://get.adobe.com/flashplayer/?promoid=BUIGP" target = "_blank"><b>For best performance upgrade to the latest Adobe Flash Player version. Your version #</b></a></font></p>

<p align="center"><font face="Arial" size="12" color="#0000cc" letterSpacing="0.000000" kerning="0"><a href="http://get.adobe.com/flashplayer/?promoid=BUIGP" target = "_blank"><b>Get the latest Adobe Flash player.</b></a></font></p>

v11r

YOUR NAME

<p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Anton Koshechkin</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Nata, DASHA, M0RGAN</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Maxim Yurchenko</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>BOX2D</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Johnny-K</b></font></p>

din

box

din

box

din

circ

din

circ

stat

box

din

gvozd

din

kacheli

din

kacheliD

stat

box

stat

box

stat

box

stat

box

stat

box

stat

box

stat

box

din

krysha

din

kryshaL

din

kryshaR

din

kryshaR

krest

din

din

stat

krest

din

box

stat

box

stat

box

stat

circ

din

box

din

tringl

stat

tringl

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

circ

din

box

din

box

<p align="center"><font face="Comic Sans MS" size="16" color="#003e66" letterSpacing="1.000000" kerning="0">If you get stuck or wish to replay a level, press &apos;reset&apos; or use &apos;space&apos; key or see a hint by clicking the &apos;solution&apos;</font></p>

<p align="center"><font face="Comic Sans MS" size="16" color="#003e66" letterSpacing="1.000000" kerning="0">If you get stuck or wish to replay a level, press &apos;reset&apos; or use &apos;space&apos; key or see a hint by clicking the &apos;solution&apos;</font></p>

din

box

din

box

credits

<p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Developed by: </b></font></p><p align="center"></p><p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>&nbsp;&nbsp;Graphics by: </b></font></p><p align="center"></p><p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Tested by: </b></font></p><p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>&nbsp;</b></font></p><p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Physics by: </b></font></p><p align="center"></p><p align="center"></p><p align="center"><font face="DS Zombie Cyr" size="12" color="#cc6600" letterSpacing="1.000000" kerning="0"><b>Thanks to: </b></font></p><p align="center"></p>

v11r

<p align="center"><font face="Arial" size="30" color="#cc6600" letterSpacing="4.000000" kerning="0"><b>0</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="20" color="#ffff00" letterSpacing="3.000000" kerning="0"><b>Start a new game?</b></font></p><p align="center"><font face="DS Zombie Cyr" size="20" color="#ffff00" letterSpacing="3.000000" kerning="0"><b>Progress will be reset.</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="21" color="#ffff00" letterSpacing="4.000000" kerning="0"><b>INSTRUCTIONS</b></font></p>

<p align="center"><font face="Arial" size="30" color="#cc6600" letterSpacing="4.000000" kerning="0"><b>2</b></font></p>

<p align="center"><font face="Webdings" size="100" color="#ffff66" letterSpacing="1.000000" kerning="0">)</font></p>

din

circ

din

circ

<p align="center"><font face="Webdings" size="83" color="#ffff66" letterSpacing="1.000000" kerning="0">)</font></p>

<p align="center"><font face="Webdings" size="83" color="#ffff66" letterSpacing="1.000000" kerning="0">)</font></p>

<p align="center"><font face="Arial" size="30" color="#ff6600" letterSpacing="4.000000" kerning="0"><b>?</b></font></p>

+

=

<p align="center"><font face="Arial" size="30" color="#cc6600" letterSpacing="4.000000" kerning="0"><b>1</b></font></p>

<p align="center"><font face="Arial" size="30" color="#cc6600" letterSpacing="4.000000" kerning="0"><b>3</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="69" color="#ffff00" letterSpacing="4.000000" kerning="0"><b>level</b></font></p>

score: 0000

LEVEL 20

total: 0000

<p align="center"><font face="DS Zombie Cyr" size="20" color="#ffff00" letterSpacing="3.000000" kerning="0"><b>CONGRATULATIONS!</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="17" color="#ff6600" letterSpacing="4.000000" kerning="0">YOUR TOTAL SCORE</font></p>

<p align="center"><font face="DS Zombie Cyr" size="30" color="#dd0000" letterSpacing="3.000000" kerning="0"><b>0123456789</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="43" color="#ff6600" letterSpacing="4.000000" kerning="0"><b>New level</b></font></p><p align="center"><font face="DS Zombie Cyr" size="43" color="#ff6600" letterSpacing="4.000000" kerning="0"><b>record!</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="19" color="#ffff00" letterSpacing="2.000000" kerning="0"><b>total </b></font></p><p align="center"><font face="DS Zombie Cyr" size="19" color="#ffff00" letterSpacing="2.000000" kerning="0"><b>score</b></font></p>

<p align="center"><font face="DS Zombie Cyr" size="20" color="#ff0000" letterSpacing="2.000000" kerning="0">12345</font></p>

din

circ

ActionScript [AS3]

Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2CircleDef extends b2ShapeDef { public var localPosition:b2Vec2; public var radius:Number; public function b2CircleDef(){ localPosition = new b2Vec2(0, 0); super(); type = b2Shape.e_circleShape; radius = 1; } } }//package Box2D.Collision.Shapes
Section 2
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { public var m_radius:Number; public var m_localPosition:b2Vec2; public function b2CircleShape(_arg1:b2ShapeDef){ var _local2:b2CircleDef; m_localPosition = new b2Vec2(); super(_arg1); _local2 = (_arg1 as b2CircleDef); m_type = e_circleShape; m_localPosition.SetV(_local2.localPosition); m_radius = _local2.radius; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg1.R; _local4 = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); _local5 = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _local4 = (_arg2.x - _local4); _local5 = (_arg2.y - _local5); return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius))); } public function GetLocalPosition():b2Vec2{ return (m_localPosition); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local6 = _arg1.R; _local7 = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y))); _local8 = (_arg1.position.x + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y))); _local9 = (_arg4.p1.x - _local7); _local10 = (_arg4.p1.y - _local8); _local11 = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius)); if (_local11 < 0){ return (false); }; _local12 = (_arg4.p2.x - _arg4.p1.x); _local13 = (_arg4.p2.y - _arg4.p1.y); _local14 = ((_local9 * _local12) + (_local10 * _local13)); _local15 = ((_local12 * _local12) + (_local13 * _local13)); _local16 = ((_local14 * _local14) - (_local15 * _local11)); if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){ return (false); }; _local17 = -((_local14 + Math.sqrt(_local16))); if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){ _local17 = (_local17 / _local15); _arg2[0] = _local17; _arg3.x = (_local9 + (_local17 * _local12)); _arg3.y = (_local10 + (_local17 * _local13)); _arg3.Normalize(); return (true); }; return (false); } override public function ComputeMass(_arg1:b2MassData):void{ _arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius); _arg1.center.SetV(m_localPosition); _arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y)))); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = _arg2.R; _local5 = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); _local6 = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _local4 = _arg3.R; _local7 = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); _local8 = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius)); _arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius)); } public function GetRadius():Number{ return (m_radius); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:Number; var _local3:Number; _local2 = (m_localPosition.x - _arg1.x); _local3 = (m_localPosition.y - _arg1.y); _local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg2.R; _local4 = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); _local5 = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius)); _arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius)); } } }//package Box2D.Collision.Shapes
Section 3
//b2FilterData (Box2D.Collision.Shapes.b2FilterData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2FilterData { public var maskBits:uint;// = 0xFFFF public var groupIndex:int;// = 0 public var categoryBits:uint;// = 1 public function b2FilterData(){ categoryBits = 1; maskBits = 0xFFFF; groupIndex = 0; super(); } public function Copy():b2FilterData{ var _local1:b2FilterData; _local1 = new b2FilterData(); _local1.categoryBits = categoryBits; _local1.maskBits = maskBits; _local1.groupIndex = groupIndex; return (_local1); } } }//package Box2D.Collision.Shapes
Section 4
//b2MassData (Box2D.Collision.Shapes.b2MassData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2MassData { public var mass:Number;// = 0 public var center:b2Vec2; public var I:Number;// = 0 public function b2MassData(){ mass = 0; center = new b2Vec2(0, 0); I = 0; super(); } } }//package Box2D.Collision.Shapes
Section 5
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolygonDef extends b2ShapeDef { public var vertexCount:int; public var vertices:Array; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonDef(){ var _local1:int; vertices = new Array(b2Settings.b2_maxPolygonVertices); super(); type = b2Shape.e_polygonShape; vertexCount = 0; _local1 = 0; while (_local1 < b2Settings.b2_maxPolygonVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } public function SetAsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{ var _local5:b2Vec2; var _local6:b2Mat22; var _local7:int; vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); if (_arg3){ _local5 = _arg3; _local6 = s_mat; _local6.Set(_arg4); _local7 = 0; while (_local7 < vertexCount) { _arg3 = vertices[_local7]; _arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y))); _arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y))); _arg3.x = _arg1; _local7++; }; }; } public function SetAsBox(_arg1:Number, _arg2:Number):void{ vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); } } }//package Box2D.Collision.Shapes
Section 6
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape) package Box2D.Collision.Shapes { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PolygonShape extends b2Shape { public var m_vertices:Array; public var m_normals:Array; private var s_supportVec:b2Vec2; public var m_obb:b2OBB; public var m_coreVertices:Array; public var m_centroid:b2Vec2; public var m_vertexCount:int; private static var s_computeMat:b2Mat22 = new b2Mat22(); private static var s_sweptAABB1:b2AABB = new b2AABB(); private static var s_sweptAABB2:b2AABB = new b2AABB(); public function b2PolygonShape(_arg1:b2ShapeDef){ var _local2:b2PolygonDef; var _local3:int; var _local4:int; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; s_supportVec = new b2Vec2(); m_obb = new b2OBB(); m_vertices = new Array(b2Settings.b2_maxPolygonVertices); m_normals = new Array(b2Settings.b2_maxPolygonVertices); m_coreVertices = new Array(b2Settings.b2_maxPolygonVertices); super(_arg1); m_type = e_polygonShape; _local2 = (_arg1 as b2PolygonDef); m_vertexCount = _local2.vertexCount; _local4 = _local3; _local5 = _local3; _local3 = 0; while (_local3 < m_vertexCount) { m_vertices[_local3] = _local2.vertices[_local3].Copy(); _local3++; }; _local3 = 0; while (_local3 < m_vertexCount) { _local4 = _local3; _local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0; _local6 = (m_vertices[_local5].x - m_vertices[_local4].x); _local7 = (m_vertices[_local5].y - m_vertices[_local4].y); _local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); m_normals[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8)); _local3++; }; m_centroid = ComputeCentroid(_local2.vertices, _local2.vertexCount); ComputeOBB(m_obb, m_vertices, m_vertexCount); _local3 = 0; while (_local3 < m_vertexCount) { _local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (m_vertexCount - 1); _local5 = _local3; _local9 = m_normals[_local4].x; _local10 = m_normals[_local4].y; _local11 = m_normals[_local5].x; _local12 = m_normals[_local5].y; _local13 = (m_vertices[_local3].x - m_centroid.x); _local14 = (m_vertices[_local3].y - m_centroid.y); _local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop); _local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop); _local17 = (1 / ((_local9 * _local12) - (_local10 * _local11))); m_coreVertices[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + m_centroid.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + m_centroid.y)); _local3++; }; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Vec2; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:Number; _local4 = _arg1.R; _local5 = (_arg2.x - _arg1.position.x); _local6 = (_arg2.y - _arg1.position.y); _local7 = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y)); _local8 = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y)); _local9 = 0; while (_local9 < m_vertexCount) { _local3 = m_vertices[_local9]; _local5 = (_local7 - _local3.x); _local6 = (_local8 - _local3.y); _local3 = m_normals[_local9]; _local10 = ((_local3.x * _local5) + (_local3.y * _local6)); if (_local10 > 0){ return (false); }; _local9++; }; return (true); } public function GetCoreVertices():Array{ return (m_coreVertices); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:Number; var _local21:Number; _local6 = 0; _local7 = _arg5; _local8 = (_arg4.p1.x - _arg1.position.x); _local9 = (_arg4.p1.y - _arg1.position.y); _local10 = _arg1.R; _local12 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local13 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local8 = (_arg4.p2.x - _arg1.position.x); _local9 = (_arg4.p2.y - _arg1.position.y); _local10 = _arg1.R; _local14 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local15 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local16 = (_local14 - _local12); _local17 = (_local15 - _local13); _local18 = -1; _local19 = 0; while (_local19 < m_vertexCount) { _local11 = m_vertices[_local19]; _local8 = (_local11.x - _local12); _local9 = (_local11.y - _local13); _local11 = m_normals[_local19]; _local20 = ((_local11.x * _local8) + (_local11.y * _local9)); _local21 = ((_local11.x * _local16) + (_local11.y * _local17)); if ((((_local21 < 0)) && ((_local20 < (_local6 * _local21))))){ _local6 = (_local20 / _local21); _local18 = _local19; } else { if ((((_local21 > 0)) && ((_local20 < (_local7 * _local21))))){ _local7 = (_local20 / _local21); }; }; if (_local7 < _local6){ return (false); }; _local19++; }; if (_local18 >= 0){ _arg2[0] = _local6; _local10 = _arg1.R; _local11 = m_normals[_local18]; _arg3.x = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _arg3.y = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); return (true); }; return (false); } public function GetCentroid():b2Vec2{ return (m_centroid); } override public function ComputeMass(_arg1:b2MassData):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = (1 / 3); _local9 = 0; while (_local9 < m_vertexCount) { _local10 = m_vertices[_local9]; _local11 = (((_local9 + 1) < m_vertexCount)) ? m_vertices[int((_local9 + 1))] : m_vertices[0]; _local12 = (_local10.x - _local6); _local13 = (_local10.y - _local7); _local14 = (_local11.x - _local6); _local15 = (_local11.y - _local7); _local16 = ((_local12 * _local15) - (_local13 * _local14)); _local17 = (0.5 * _local16); _local4 = (_local4 + _local17); _local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x))); _local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y))); _local18 = _local6; _local19 = _local7; _local20 = _local12; _local21 = _local13; _local22 = _local14; _local23 = _local15; _local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18)); _local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local5 = (_local5 + (_local16 * (_local24 + _local25))); _local9++; }; _arg1.mass = (m_density * _local4); _local2 = (_local2 * (1 / _local4)); _local3 = (_local3 * (1 / _local4)); _arg1.center.Set(_local2, _local3); _arg1.I = (m_density * _local5); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Vec2; var _local5:b2Mat22; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:int; var _local11:Number; _local5 = _arg1.R; _local6 = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y)); _local7 = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y)); _local8 = 0; _local4 = m_coreVertices[0]; _local9 = ((_local4.x * _local6) + (_local4.y * _local7)); _local10 = 1; while (_local10 < m_vertexCount) { _local4 = m_coreVertices[_local10]; _local11 = ((_local4.x * _local6) + (_local4.y * _local7)); if (_local11 > _local9){ _local8 = _local10; _local9 = _local11; }; _local10++; }; _local5 = _arg1.R; _local4 = m_coreVertices[_local8]; s_supportVec.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y))); s_supportVec.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y))); return (s_supportVec); } public function GetVertexCount():int{ return (m_vertexCount); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2AABB; var _local5:b2AABB; _local4 = s_sweptAABB1; _local5 = s_sweptAABB2; ComputeAABB(_local4, _arg2); ComputeAABB(_local5, _arg3); _arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y); _arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y); } public function GetVertices():Array{ return (m_vertices); } public function GetNormals():Array{ return (m_normals); } public function GetOBB():b2OBB{ return (m_obb); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_coreVertices[0])); } public function Centroid(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_centroid)); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:b2Vec2; var _local3:int; var _local4:Number; var _local5:Number; m_sweepRadius = 0; _local3 = 0; while (_local3 < m_vertexCount) { _local2 = m_coreVertices[_local3]; _local4 = (_local2.x - _arg1.x); _local5 = (_local2.y - _arg1.y); _local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_local4 > m_sweepRadius){ m_sweepRadius = _local4; }; _local3++; }; } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Mat22; var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local5 = s_computeMat; _local3 = _arg2.R; _local4 = m_obb.R.col1; _local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local4 = m_obb.R.col2; _local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local5.Abs(); _local6 = _local5; _local4 = m_obb.extents; _local7 = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y)); _local8 = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y)); _local3 = _arg2.R; _local4 = m_obb.center; _local9 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); _local10 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y))); _arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8)); _arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8)); } public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{ var _local3:b2Vec2; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = new b2Vec2(); _local4 = 0; _local5 = 0; _local6 = 0; _local7 = (1 / 3); _local8 = 0; while (_local8 < _arg2) { _local9 = _arg1[_local8]; _local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0]; _local11 = (_local9.x - _local5); _local12 = (_local9.y - _local6); _local13 = (_local10.x - _local5); _local14 = (_local10.y - _local6); _local15 = ((_local11 * _local14) - (_local12 * _local13)); _local16 = (0.5 * _local15); _local4 = (_local4 + _local16); _local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x))); _local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y))); _local8++; }; _local3.x = (_local3.x * (1 / _local4)); _local3.y = (_local3.y * (1 / _local4)); return (_local3); } public static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{ var _local4:int; var _local5:Array; var _local6:Number; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:b2Mat22; _local5 = new Array((b2Settings.b2_maxPolygonVertices + 1)); _local4 = 0; while (_local4 < _arg3) { _local5[_local4] = _arg2[_local4]; _local4++; }; _local5[_arg3] = _local5[0]; _local6 = Number.MAX_VALUE; _local4 = 1; while (_local4 <= _arg3) { _local7 = _local5[int((_local4 - 1))]; _local8 = (_local5[_local4].x - _local7.x); _local9 = (_local5[_local4].y - _local7.y); _local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local8 = (_local8 / _local10); _local9 = (_local9 / _local10); _local11 = -(_local9); _local12 = _local8; _local13 = Number.MAX_VALUE; _local14 = Number.MAX_VALUE; _local15 = -(Number.MAX_VALUE); _local16 = -(Number.MAX_VALUE); _local17 = 0; while (_local17 < _arg3) { _local19 = (_local5[_local17].x - _local7.x); _local20 = (_local5[_local17].y - _local7.y); _local21 = ((_local8 * _local19) + (_local9 * _local20)); _local22 = ((_local11 * _local19) + (_local12 * _local20)); if (_local21 < _local13){ _local13 = _local21; }; if (_local22 < _local14){ _local14 = _local22; }; if (_local21 > _local15){ _local15 = _local21; }; if (_local22 > _local16){ _local16 = _local22; }; _local17++; }; _local18 = ((_local15 - _local13) * (_local16 - _local14)); if (_local18 < (0.95 * _local6)){ _local6 = _local18; _arg1.R.col1.x = _local8; _arg1.R.col1.y = _local9; _arg1.R.col2.x = _local11; _arg1.R.col2.y = _local12; _local23 = (0.5 * (_local13 + _local15)); _local24 = (0.5 * (_local14 + _local16)); _local25 = _arg1.R; _arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24))); _arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24))); _arg1.extents.x = (0.5 * (_local15 - _local13)); _arg1.extents.y = (0.5 * (_local16 - _local14)); }; _local4++; }; } } }//package Box2D.Collision.Shapes
Section 7
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2Shape { public var m_type:int; public var m_sweepRadius:Number; public var m_density:Number; public var m_filter:b2FilterData; public var m_friction:Number; public var m_next:b2Shape; public var m_restitution:Number; public var m_userData; public var m_isSensor:Boolean; public var m_proxyId:uint; public var m_body:b2Body; public static const e_polygonShape:int = 1; public static const e_unknownShape:int = -1; public static const e_circleShape:int = 0; public static const e_shapeTypeCount:int = 2; private static var s_resetAABB:b2AABB = new b2AABB(); private static var s_syncAABB:b2AABB = new b2AABB(); private static var s_proxyAABB:b2AABB = new b2AABB(); public function b2Shape(_arg1:b2ShapeDef){ m_userData = _arg1.userData; m_friction = _arg1.friction; m_restitution = _arg1.restitution; m_density = _arg1.density; m_body = null; m_sweepRadius = 0; m_next = null; m_proxyId = b2Pair.b2_nullProxy; m_filter = _arg1.filter.Copy(); m_isSensor = _arg1.isSensor; } public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } public function GetSweepRadius():Number{ return (m_sweepRadius); } public function GetNext():b2Shape{ return (m_next); } public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ } public function GetType():int{ return (m_type); } public function GetRestitution():Number{ return (m_restitution); } public function GetFriction():Number{ return (m_friction); } public function GetFilterData():b2FilterData{ return (m_filter.Copy()); } public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ return (false); } public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB; var _local4:Boolean; if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _arg1.DestroyProxy(m_proxyId); _local3 = s_resetAABB; ComputeAABB(_local3, _arg2); _local4 = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function SetFilterData(_arg1:b2FilterData):void{ m_filter = _arg1.Copy(); } public function GetUserData(){ return (m_userData); } public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{ var _local4:b2AABB; if (m_proxyId == b2Pair.b2_nullProxy){ return (false); }; _local4 = s_syncAABB; ComputeSweptAABB(_local4, _arg2, _arg3); if (_arg1.InRange(_local4)){ _arg1.MoveProxy(m_proxyId, _local4); return (true); }; return (false); } public function ComputeMass(_arg1:b2MassData):void{ } public function IsSensor():Boolean{ return (m_isSensor); } public function DestroyProxy(_arg1:b2BroadPhase):void{ if (m_proxyId != b2Pair.b2_nullProxy){ _arg1.DestroyProxy(m_proxyId); m_proxyId = b2Pair.b2_nullProxy; }; } public function UpdateSweepRadius(_arg1:b2Vec2):void{ } public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ } public function GetBody():b2Body{ return (m_body); } public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB; var _local4:Boolean; _local3 = s_proxyAABB; ComputeAABB(_local3, _arg2); _local4 = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function SetUserData(_arg1):void{ m_userData = _arg1; } public static function Destroy(_arg1:b2Shape, _arg2):void{ } public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{ switch (_arg1.type){ case e_circleShape: return (new b2CircleShape(_arg1)); case e_polygonShape: return (new b2PolygonShape(_arg1)); default: return (null); }; } } }//package Box2D.Collision.Shapes
Section 8
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2ShapeDef { public var isSensor:Boolean;// = false public var density:Number;// = 0 public var type:int; public var restitution:Number;// = 0 public var userData;// = null public var filter:b2FilterData; public var friction:Number;// = 0.2 public function b2ShapeDef(){ type = b2Shape.e_unknownShape; userData = null; friction = 0.2; restitution = 0; density = 0; isSensor = false; filter = new b2FilterData(); super(); } } }//package Box2D.Collision.Shapes
Section 9
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var upperBound:b2Vec2; public var lowerBound:b2Vec2; public function b2AABB(){ lowerBound = new b2Vec2(); upperBound = new b2Vec2(); super(); } public function IsValid():Boolean{ var _local1:Number; var _local2:Number; var _local3:Boolean; _local1 = (upperBound.x - lowerBound.x); _local2 = (upperBound.y - lowerBound.y); _local3 = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 10
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var proxyId:uint; public var stabbingCount:uint; public var value:uint; public function Swap(_arg1:b2Bound):void{ var _local2:uint; var _local3:uint; var _local4:uint; _local2 = value; _local3 = proxyId; _local4 = stabbingCount; value = _arg1.value; proxyId = _arg1.proxyId; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxyId = _local3; _arg1.stabbingCount = _local4; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Box2D.Collision
Section 11
//b2BoundValues (Box2D.Collision.b2BoundValues) package Box2D.Collision { public class b2BoundValues { public var lowerValues:Array; public var upperValues:Array; public function b2BoundValues(){ lowerValues = [0, 0]; upperValues = [0, 0]; super(); } } }//package Box2D.Collision
Section 12
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { public var m_quantizationFactor:b2Vec2; public var m_worldAABB:b2AABB; public var m_bounds:Array; public var m_freeProxy:uint; public var m_proxyCount:int; public var m_proxyPool:Array; public var m_queryResultCount:int; public var m_pairManager:b2PairManager; public var m_timeStamp:uint; public var m_queryResults:Array; public static const b2_nullEdge:uint = b2Settings.USHRT_MAX; public static const b2_invalid:uint = b2Settings.USHRT_MAX; public static var s_validate:Boolean = false; public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){ var _local3:int; var _local4:Number; var _local5:Number; var _local6:b2Proxy; var _local7:int; m_pairManager = new b2PairManager(); m_proxyPool = new Array(b2Settings.b2_maxPairs); m_bounds = new Array((2 * b2Settings.b2_maxProxies)); m_queryResults = new Array(b2Settings.b2_maxProxies); m_quantizationFactor = new b2Vec2(); super(); m_pairManager.Initialize(this, _arg2); m_worldAABB = _arg1; m_proxyCount = 0; _local3 = 0; while (_local3 < b2Settings.b2_maxProxies) { m_queryResults[_local3] = 0; _local3++; }; m_bounds = new Array(2); _local3 = 0; while (_local3 < 2) { m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies)); _local7 = 0; while (_local7 < (2 * b2Settings.b2_maxProxies)) { m_bounds[_local3][_local7] = new b2Bound(); _local7++; }; _local3++; }; _local4 = (_arg1.upperBound.x - _arg1.lowerBound.x); _local5 = (_arg1.upperBound.y - _arg1.lowerBound.y); m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4); m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5); _local3 = 0; while (_local3 < (b2Settings.b2_maxProxies - 1)) { _local6 = new b2Proxy(); m_proxyPool[_local3] = _local6; _local6.SetNext((_local3 + 1)); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; _local3++; }; _local6 = new b2Proxy(); m_proxyPool[int((b2Settings.b2_maxProxies - 1))] = _local6; _local6.SetNext(b2Pair.b2_nullProxy); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; m_freeProxy = 0; m_timeStamp = 1; m_queryResultCount = 0; } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local4:Array; var _local5:Array; var _local6:uint; var _local7:uint; var _local8:Array; var _local9:Array; var _local10:int; var _local11:int; var _local12:b2Proxy; _local4 = new Array(); _local5 = new Array(); ComputeBounds(_local4, _local5, _arg1); _local8 = [_local6]; _local9 = [_local7]; Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0); Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1); _local10 = 0; _local11 = 0; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_proxyPool[m_queryResults[_local11]]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } public function Commit():void{ m_pairManager.Commit(); } public function GetProxy(_arg1:int):b2Proxy{ var _local2:b2Proxy; _local2 = m_proxyPool[_arg1]; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){ return (null); }; return (_local2); } private function IncrementTimeStamp():void{ var _local1:uint; if (m_timeStamp == b2Settings.USHRT_MAX){ _local1 = 0; while (_local1 < b2Settings.b2_maxProxies) { (m_proxyPool[_local1] as b2Proxy).timeStamp = 0; _local1++; }; m_timeStamp = 1; } else { m_timeStamp++; }; } private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{ var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local11:uint; var _local12:int; var _local13:int; var _local14:b2Proxy; _local8 = BinarySearch(_arg5, _arg6, _arg3); _local9 = BinarySearch(_arg5, _arg6, _arg4); _local11 = _local8; while (_local11 < _local9) { _local10 = _arg5[_local11]; if (_local10.IsLower()){ IncrementOverlapCount(_local10.proxyId); }; _local11++; }; if (_local8 > 0){ _local12 = (_local8 - 1); _local10 = _arg5[_local12]; _local13 = _local10.stabbingCount; while (_local13) { _local10 = _arg5[_local12]; if (_local10.IsLower()){ _local14 = m_proxyPool[_local10.proxyId]; if (_local8 <= _local14.upperBounds[_arg7]){ IncrementOverlapCount(_local10.proxyId); _local13--; }; }; _local12--; }; }; _arg1[0] = _local8; _arg2[0] = _local9; } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local3:int; var _local4:Array; var _local5:b2Bound; var _local6:b2Bound; _local3 = 0; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg1.lowerBounds[_local3]]; _local6 = _local4[_arg2.upperBounds[_local3]]; if (_local5.value > _local6.value){ return (false); }; _local5 = _local4[_arg1.upperBounds[_local3]]; _local6 = _local4[_arg2.lowerBounds[_local3]]; if (_local5.value < _local6.value){ return (false); }; _local3++; }; return (true); } private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = _arg3.lowerBound.x; _local5 = _arg3.lowerBound.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y); _local6 = _arg3.upperBound.x; _local7 = _arg3.upperBound.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1); } public function CreateProxy(_arg1:b2AABB, _arg2):uint{ var _local3:uint; var _local4:b2Proxy; var _local5:uint; var _local6:uint; var _local7:Array; var _local8:Array; var _local9:int; var _local10:int; var _local11:Array; var _local12:uint; var _local13:uint; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:int; var _local18:int; var _local19:b2Bound; var _local20:b2Bound; var _local21:b2Bound; var _local22:int; var _local23:b2Proxy; _local5 = m_freeProxy; _local4 = m_proxyPool[_local5]; m_freeProxy = _local4.GetNext(); _local4.overlapCount = 0; _local4.userData = _arg2; _local6 = (2 * m_proxyCount); _local7 = new Array(); _local8 = new Array(); ComputeBounds(_local7, _local8, _arg1); _local9 = 0; while (_local9 < 2) { _local11 = m_bounds[_local9]; _local14 = [_local12]; _local15 = [_local13]; Query(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9); _local12 = _local14[0]; _local13 = _local15[0]; _local16 = new Array(); _local18 = (_local6 - _local13); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[int((_local13 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local22 = (_local13 + 2); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[int((_local22 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local16 = new Array(); _local18 = (_local13 - _local12); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[int((_local12 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local22 = (_local12 + 1); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[int((_local22 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local13++; _local19 = _local11[_local12]; _local20 = _local11[_local13]; _local19.value = _local7[_local9]; _local19.proxyId = _local5; _local20.value = _local8[_local9]; _local20.proxyId = _local5; _local21 = _local11[int((_local12 - 1))]; _local19.stabbingCount = ((_local12 == 0)) ? 0 : _local21.stabbingCount; _local21 = _local11[int((_local13 - 1))]; _local20.stabbingCount = _local21.stabbingCount; _local3 = _local12; while (_local3 < _local13) { _local21 = _local11[_local3]; _local21.stabbingCount++; _local3++; }; _local3 = _local12; while (_local3 < (_local6 + 2)) { _local19 = _local11[_local3]; _local23 = m_proxyPool[_local19.proxyId]; if (_local19.IsLower()){ _local23.lowerBounds[_local9] = _local3; } else { _local23.upperBounds[_local9] = _local3; }; _local3++; }; _local9++; }; m_proxyCount++; _local10 = 0; while (_local10 < m_queryResultCount) { m_pairManager.AddBufferedPair(_local5, m_queryResults[_local10]); _local10++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); return (_local5); } public function DestroyProxy(_arg1:uint):void{ var _local2:b2Bound; var _local3:b2Bound; var _local4:b2Proxy; var _local5:int; var _local6:int; var _local7:int; var _local8:Array; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:Array; var _local14:int; var _local15:int; var _local16:int; var _local17:uint; var _local18:int; var _local19:b2Proxy; _local4 = m_proxyPool[_arg1]; _local5 = (2 * m_proxyCount); _local6 = 0; while (_local6 < 2) { _local8 = m_bounds[_local6]; _local9 = _local4.lowerBounds[_local6]; _local10 = _local4.upperBounds[_local6]; _local2 = _local8[_local9]; _local11 = _local2.value; _local3 = _local8[_local10]; _local12 = _local3.value; _local13 = new Array(); _local15 = ((_local10 - _local9) - 1); _local14 = 0; while (_local14 < _local15) { _local13[_local14] = new b2Bound(); _local2 = _local13[_local14]; _local3 = _local8[int(((_local9 + 1) + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = _local13.length; _local16 = _local9; _local14 = 0; while (_local14 < _local15) { _local3 = _local13[_local14]; _local2 = _local8[int((_local16 + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local13 = new Array(); _local15 = ((_local5 - _local10) - 1); _local14 = 0; while (_local14 < _local15) { _local13[_local14] = new b2Bound(); _local2 = _local13[_local14]; _local3 = _local8[int(((_local10 + 1) + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = _local13.length; _local16 = (_local10 - 1); _local14 = 0; while (_local14 < _local15) { _local3 = _local13[_local14]; _local2 = _local8[int((_local16 + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = (_local5 - 2); _local17 = _local9; while (_local17 < _local15) { _local2 = _local8[_local17]; _local19 = m_proxyPool[_local2.proxyId]; if (_local2.IsLower()){ _local19.lowerBounds[_local6] = _local17; } else { _local19.upperBounds[_local6] = _local17; }; _local17++; }; _local15 = (_local10 - 1); _local18 = _local9; while (_local18 < _local15) { _local2 = _local8[_local18]; _local2.stabbingCount--; _local18++; }; Query([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6); _local6++; }; _local7 = 0; while (_local7 < m_queryResultCount) { m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local7]); _local7++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); _local4.userData = null; _local4.overlapCount = b2_invalid; _local4.lowerBounds[0] = b2_invalid; _local4.lowerBounds[1] = b2_invalid; _local4.upperBounds[0] = b2_invalid; _local4.upperBounds[1] = b2_invalid; _local4.SetNext(m_freeProxy); m_freeProxy = _arg1; m_proxyCount--; } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local3:int; var _local4:Array; var _local5:b2Bound; _local3 = 0; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg2.upperBounds[_local3]]; if (_arg1.lowerValues[_local3] > _local5.value){ return (false); }; _local5 = _local4[_arg2.lowerBounds[_local3]]; if (_arg1.upperValues[_local3] < _local5.value){ return (false); }; _local3++; }; return (true); } public function Validate():void{ var _local1:b2Pair; var _local2:b2Proxy; var _local3:b2Proxy; var _local4:Boolean; var _local5:int; var _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; _local5 = 0; while (_local5 < 2) { _local6 = m_bounds[_local5]; _local7 = (2 * m_proxyCount); _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local10 = _local6[_local9]; if (_local10.IsLower() == true){ _local8++; } else { _local8--; }; _local9++; }; _local5++; }; } private function IncrementOverlapCount(_arg1:uint):void{ var _local2:b2Proxy; _local2 = m_proxyPool[_arg1]; if (_local2.timeStamp < m_timeStamp){ _local2.timeStamp = m_timeStamp; _local2.overlapCount = 1; } else { _local2.overlapCount = 2; m_queryResults[m_queryResultCount] = _arg1; m_queryResultCount++; }; } public function InRange(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = _arg1.lowerBound.x; _local3 = _arg1.lowerBound.y; _local2 = (_local2 - m_worldAABB.upperBound.x); _local3 = (_local3 - m_worldAABB.upperBound.y); _local4 = m_worldAABB.lowerBound.x; _local5 = m_worldAABB.lowerBound.y; _local4 = (_local4 - _arg1.upperBound.x); _local5 = (_local5 - _arg1.upperBound.y); _local2 = b2Math.b2Max(_local2, _local4); _local3 = b2Math.b2Max(_local3, _local5); return ((b2Math.b2Max(_local2, _local3) < 0)); } public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{ var _local3:Array; var _local4:int; var _local5:uint; var _local6:uint; var _local7:b2Bound; var _local8:b2Bound; var _local9:b2Bound; var _local10:uint; var _local11:b2Proxy; var _local12:uint; var _local13:b2Proxy; var _local14:b2BoundValues; var _local15:b2BoundValues; var _local16:Array; var _local17:uint; var _local18:uint; var _local19:uint; var _local20:uint; var _local21:int; var _local22:int; var _local23:uint; var _local24:b2Proxy; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){ return; }; if (_arg2.IsValid() == false){ return; }; _local12 = (2 * m_proxyCount); _local13 = m_proxyPool[_arg1]; _local14 = new b2BoundValues(); ComputeBounds(_local14.lowerValues, _local14.upperValues, _arg2); _local15 = new b2BoundValues(); _local5 = 0; while (_local5 < 2) { _local7 = m_bounds[_local5][_local13.lowerBounds[_local5]]; _local15.lowerValues[_local5] = _local7.value; _local7 = m_bounds[_local5][_local13.upperBounds[_local5]]; _local15.upperValues[_local5] = _local7.value; _local5++; }; _local5 = 0; while (_local5 < 2) { _local16 = m_bounds[_local5]; _local17 = _local13.lowerBounds[_local5]; _local18 = _local13.upperBounds[_local5]; _local19 = _local14.lowerValues[_local5]; _local20 = _local14.upperValues[_local5]; _local7 = _local16[_local17]; _local21 = (_local19 - _local7.value); _local7.value = _local19; _local7 = _local16[_local18]; _local22 = (_local20 - _local7.value); _local7.value = _local20; if (_local21 < 0){ _local6 = _local17; while ((((_local6 > 0)) && ((_local19 < (_local16[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local16[_local6]; _local8 = _local16[int((_local6 - 1))]; _local23 = _local8.proxyId; _local24 = m_proxyPool[_local8.proxyId]; _local8.stabbingCount++; if (_local8.IsUpper() == true){ if (TestOverlap(_local14, _local24)){ m_pairManager.AddBufferedPair(_arg1, _local23); }; _local3 = _local24.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local24.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _local13.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; if (_local22 > 0){ _local6 = _local18; while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local20)))) { _local7 = _local16[_local6]; _local9 = _local16[int((_local6 + 1))]; _local10 = _local9.proxyId; _local11 = m_proxyPool[_local10]; _local9.stabbingCount++; if (_local9.IsLower() == true){ if (TestOverlap(_local14, _local11)){ m_pairManager.AddBufferedPair(_arg1, _local10); }; _local3 = _local11.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local11.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _local13.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local21 > 0){ _local6 = _local17; while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local19)))) { _local7 = _local16[_local6]; _local9 = _local16[int((_local6 + 1))]; _local10 = _local9.proxyId; _local11 = m_proxyPool[_local10]; _local9.stabbingCount--; if (_local9.IsUpper()){ if (TestOverlap(_local15, _local11)){ m_pairManager.RemoveBufferedPair(_arg1, _local10); }; _local3 = _local11.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local11.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _local13.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local22 < 0){ _local6 = _local18; while ((((_local6 > 0)) && ((_local20 < (_local16[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local16[_local6]; _local8 = _local16[int((_local6 - 1))]; _local23 = _local8.proxyId; _local24 = m_proxyPool[_local23]; _local8.stabbingCount--; if (_local8.IsLower() == true){ if (TestOverlap(_local15, _local24)){ m_pairManager.RemoveBufferedPair(_arg1, _local23); }; _local3 = _local24.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local24.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _local13.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; _local5++; }; } public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{ var _local4:int; var _local5:int; var _local6:int; var _local7:b2Bound; _local4 = 0; _local5 = (_arg2 - 1); while (_local4 <= _local5) { _local6 = ((_local4 + _local5) / 2); _local7 = _arg1[_local6]; if (_local7.value > _arg3){ _local5 = (_local6 - 1); } else { if (_local7.value < _arg3){ _local4 = (_local6 + 1); } else { return (uint(_local6)); }; }; }; return (uint(_local4)); } } }//package Box2D.Collision
Section 13
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 14
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local6:int; var _local7:Array; var _local8:Array; var _local9:int; var _local10:Array; var _local11:b2Mat22; var _local12:b2Vec2; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _local6 = _arg1.m_vertexCount; _local7 = _arg1.m_vertices; _local8 = _arg1.m_normals; _local9 = _arg4.m_vertexCount; _local10 = _arg4.m_vertices; _local11 = _arg2.R; _local12 = _local8[_arg3]; _local13 = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)); _local14 = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)); _local11 = _arg5.R; _local15 = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14)); _local16 = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14)); _local17 = 0; _local18 = Number.MAX_VALUE; _local19 = 0; while (_local19 < _local9) { _local12 = _local10[_local19]; _local25 = ((_local12.x * _local15) + (_local12.y * _local16)); if (_local25 < _local18){ _local18 = _local25; _local17 = _local19; }; _local19++; }; _local12 = _local7[_arg3]; _local11 = _arg2.R; _local20 = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); _local21 = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local12 = _local10[_local17]; _local11 = _arg5.R; _local22 = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); _local23 = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local22 = (_local22 - _local20); _local23 = (_local23 - _local21); _local24 = ((_local22 * _local13) + (_local23 * _local14)); return (_local24); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local3 = _arg2.lowerBound; _local4 = _arg1.upperBound; _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local3 = _arg1.lowerBound; _local4 = _arg2.upperBound; _local7 = (_local3.x - _local4.x); _local8 = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{ var _local7:int; var _local8:Array; var _local9:int; var _local10:Array; var _local11:Array; var _local12:b2Mat22; var _local13:b2Vec2; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:ClipVertex; var _local21:int; var _local22:int; var _local23:Number; _local7 = _arg2.m_vertexCount; _local8 = _arg2.m_normals; _local9 = _arg5.m_vertexCount; _local10 = _arg5.m_vertices; _local11 = _arg5.m_normals; _local12 = _arg3.R; _local13 = _local8[_arg4]; _local14 = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)); _local15 = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)); _local12 = _arg6.R; _local16 = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15)); _local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15)); _local14 = _local16; _local17 = 0; _local18 = Number.MAX_VALUE; _local19 = 0; while (_local19 < _local9) { _local13 = _local11[_local19]; _local23 = ((_local14 * _local13.x) + (_local15 * _local13.y)); if (_local23 < _local18){ _local18 = _local23; _local17 = _local19; }; _local19++; }; _local21 = _local17; _local22 = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0; _local20 = _arg1[0]; _local13 = _local10[_local21]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local21; _local20.id.features.incidentVertex = 0; _local20 = _arg1[1]; _local13 = _local10[_local22]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local22; _local20.id.features.incidentVertex = 1; } public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{ var _local6:ClipVertex; var _local7:int; var _local8:Array; var _local9:Number; var _local10:int; var _local11:Array; var _local12:Number; var _local13:b2PolygonShape; var _local14:b2PolygonShape; var _local15:b2XForm; var _local16:b2XForm; var _local17:int; var _local18:uint; var _local19:Number; var _local20:Number; var _local21:Array; var _local22:int; var _local23:Array; var _local24:b2Vec2; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:b2Vec2; var _local28:b2Vec2; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Array; var _local33:Array; var _local34:int; var _local35:int; var _local36:int; var _local37:b2Vec2; var _local38:Number; var _local39:b2ManifoldPoint; _arg1.pointCount = 0; _local7 = 0; _local8 = [_local7]; _local9 = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5); _local7 = _local8[0]; if (_local9 > 0){ return; }; _local10 = 0; _local11 = [_local10]; _local12 = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3); _local10 = _local11[0]; if (_local12 > 0){ return; }; _local15 = new b2XForm(); _local16 = new b2XForm(); _local19 = 0.98; _local20 = 0.001; if (_local12 > ((_local19 * _local9) + _local20)){ _local13 = _arg4; _local14 = _arg2; _local15.Set(_arg5); _local16.Set(_arg3); _local17 = _local10; _local18 = 1; } else { _local13 = _arg2; _local14 = _arg4; _local15.Set(_arg3); _local16.Set(_arg5); _local17 = _local7; _local18 = 0; }; _local21 = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16); _local22 = _local13.m_vertexCount; _local23 = _local13.m_vertices; _local24 = _local23[_local17]; _local25 = _local24.Copy(); if ((_local17 + 1) < _local22){ _local24 = _local23[int((_local17 + 1))]; _local37 = _local24.Copy(); } else { _local24 = _local23[0]; _local37 = _local24.Copy(); }; _local26 = b2Math.SubtractVV(_local37, _local25); _local27 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25)); _local27.Normalize(); _local28 = b2Math.b2CrossVF(_local27, 1); _local25 = b2Math.b2MulX(_local15, _local25); _local37 = b2Math.b2MulX(_local15, _local37); _local29 = b2Math.b2Dot(_local28, _local25); _local30 = -(b2Math.b2Dot(_local27, _local25)); _local31 = b2Math.b2Dot(_local27, _local37); _local32 = [new ClipVertex(), new ClipVertex()]; _local33 = [new ClipVertex(), new ClipVertex()]; _local34 = ClipSegmentToLine(_local32, _local21, _local27.Negative(), _local30); if (_local34 < 2){ return; }; _local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31); if (_local34 < 2){ return; }; _arg1.normal = (_local18) ? _local28.Negative() : _local28.Copy(); _local35 = 0; _local36 = 0; while (_local36 < b2Settings.b2_maxManifoldPoints) { _local6 = _local33[_local36]; _local38 = (b2Math.b2Dot(_local28, _local6.v) - _local29); if (_local38 <= 0){ _local39 = _arg1.points[_local35]; _local39.separation = _local38; _local39.localPoint1 = b2Math.b2MulXT(_arg3, _local6.v); _local39.localPoint2 = b2Math.b2MulXT(_arg5, _local6.v); _local39.id.key = _local6.id._key; _local39.id.features.flip = _local18; _local35++; }; _local36++; }; _arg1.pointCount = _local35; } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local6:int; var _local7:Array; var _local8:b2Vec2; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:int; var _local15:Number; var _local16:int; var _local17:Number; var _local18:int; var _local19:Number; var _local20:int; var _local21:Number; var _local22:int; var _local23:Number; var _local24:int; var _local25:Number; _local6 = _arg2.m_vertexCount; _local7 = _arg2.m_normals; _local9 = _arg5.R; _local8 = _arg4.m_centroid; _local10 = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))); _local11 = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))); _local9 = _arg3.R; _local8 = _arg2.m_centroid; _local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)))); _local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)))); _local12 = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y)); _local13 = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y)); _local14 = 0; _local15 = -(Number.MAX_VALUE); _local16 = 0; while (_local16 < _local6) { _local8 = _local7[_local16]; _local25 = ((_local8.x * _local12) + (_local8.y * _local13)); if (_local25 > _local15){ _local15 = _local25; _local14 = _local16; }; _local16++; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; _local18 = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1); _local19 = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5); if (_local19 > 0){ return (_local19); }; _local20 = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0; _local21 = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5); if (_local21 > 0){ return (_local21); }; if ((((_local19 > _local17)) && ((_local19 > _local21)))){ _local24 = -1; _local22 = _local18; _local23 = _local19; } else { if (_local21 > _local17){ _local24 = 1; _local22 = _local20; _local23 = _local21; } else { _arg1[0] = _local14; return (_local17); }; }; while (true) { if (_local24 == -1){ _local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1); } else { _local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; if (_local17 > _local23){ _local22 = _local14; _local23 = _local17; } else { break; }; }; _arg1[0] = _local22; return (_local23); } public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local5:ClipVertex; var _local6:int; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:b2Vec2; var _local13:ClipVertex; _local6 = 0; _local5 = _arg2[0]; _local7 = _local5.v; _local5 = _arg2[1]; _local8 = _local5.v; _local9 = (b2Math.b2Dot(_arg3, _local7) - _arg4); _local10 = (b2Math.b2Dot(_arg3, _local8) - _arg4); if (_local9 <= 0){ var _temp1 = _local6; _local6 = (_local6 + 1); var _local14 = _temp1; _arg1[_local14] = _arg2[0]; }; if (_local10 <= 0){ var _temp2 = _local6; _local6 = (_local6 + 1); _local14 = _temp2; _arg1[_local14] = _arg2[1]; }; if ((_local9 * _local10) < 0){ _local11 = (_local9 / (_local9 - _local10)); _local5 = _arg1[_local6]; _local12 = _local5.v; _local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x))); _local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y))); _local5 = _arg1[_local6]; if (_local9 > 0){ _local13 = _arg2[0]; _local5.id = _local13.id; } else { _local13 = _arg2[1]; _local5.id = _local13.id; }; _local6++; }; return (_local6); } public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2Mat22; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:b2ManifoldPoint; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _arg1.pointCount = 0; _local6 = _arg3.R; _local7 = _arg2.m_localPosition; _local8 = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); _local9 = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local6 = _arg5.R; _local7 = _arg4.m_localPosition; _local10 = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); _local11 = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local12 = (_local10 - _local8); _local13 = (_local11 - _local9); _local14 = ((_local12 * _local12) + (_local13 * _local13)); _local15 = _arg2.m_radius; _local16 = _arg4.m_radius; _local17 = (_local15 + _local16); if (_local14 > (_local17 * _local17)){ return; }; if (_local14 < Number.MIN_VALUE){ _local18 = -(_local17); _arg1.normal.Set(0, 1); } else { _local24 = Math.sqrt(_local14); _local18 = (_local24 - _local17); _local25 = (1 / _local24); _arg1.normal.x = (_local25 * _local12); _arg1.normal.y = (_local25 * _local13); }; _arg1.pointCount = 1; _local19 = _arg1.points[0]; _local19.id.key = 0; _local19.separation = _local18; _local8 = (_local8 + (_local15 * _arg1.normal.x)); _local9 = (_local9 + (_local15 * _arg1.normal.y)); _local10 = (_local10 - (_local16 * _arg1.normal.x)); _local11 = (_local11 - (_local16 * _arg1.normal.y)); _local20 = (0.5 * (_local8 + _local10)); _local21 = (0.5 * (_local9 + _local11)); _local22 = (_local20 - _arg3.position.x); _local23 = (_local21 - _arg3.position.y); _local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y)); _local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y)); _local22 = (_local20 - _arg5.position.x); _local23 = (_local21 - _arg5.position.y); _local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y)); _local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y)); } public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2ManifoldPoint; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:b2Mat22; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:Number; var _local20:Number; var _local21:int; var _local22:Array; var _local23:Array; var _local24:int; var _local25:int; var _local26:int; var _local27:b2Vec2; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; _arg1.pointCount = 0; _local12 = _arg5.R; _local11 = _arg4.m_localPosition; _local13 = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y))); _local14 = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y))); _local7 = (_local13 - _arg3.position.x); _local8 = (_local14 - _arg3.position.y); _local12 = _arg3.R; _local15 = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local16 = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local18 = 0; _local19 = -(Number.MAX_VALUE); _local20 = _arg4.m_radius; _local21 = _arg2.m_vertexCount; _local22 = _arg2.m_vertices; _local23 = _arg2.m_normals; _local24 = 0; while (_local24 < _local21) { _local11 = _local22[_local24]; _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local11 = _local23[_local24]; _local34 = ((_local11.x * _local7) + (_local11.y * _local8)); if (_local34 > _local20){ return; }; if (_local34 > _local19){ _local19 = _local34; _local18 = _local24; }; _local24++; }; if (_local19 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local11 = _local23[_local18]; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)); _arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)); _local6 = _arg1.points[0]; _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = b2_nullFeature; _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local19 - _local20); return; }; _local25 = _local18; _local26 = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0; _local11 = _local22[_local25]; _local27 = _local22[_local26]; _local28 = (_local27.x - _local11.x); _local29 = (_local27.y - _local11.y); _local30 = Math.sqrt(((_local28 * _local28) + (_local29 * _local29))); _local28 = (_local28 / _local30); _local29 = (_local29 / _local30); _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local31 = ((_local7 * _local28) + (_local8 * _local29)); _local6 = _arg1.points[0]; if (_local31 <= 0){ _local32 = _local11.x; _local33 = _local11.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local25; } else { if (_local31 >= _local30){ _local32 = _local27.x; _local33 = _local27.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local26; } else { _local32 = ((_local28 * _local31) + _local11.x); _local33 = ((_local29 * _local31) + _local11.y); _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = 0; }; }; _local7 = (_local15 - _local32); _local8 = (_local16 - _local33); _local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8))); _local7 = (_local7 / _local17); _local8 = (_local8 / _local17); if (_local17 > _local20){ return; }; _arg1.pointCount = 1; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8)); _arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8)); _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local17 - _local20); _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; } } }//package Box2D.Collision
Section 15
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { public class b2ContactID { public var _key:uint; public var features:Features; public function b2ContactID(){ features = new Features(); super(); features._m_id = this; } public function Set(_arg1:b2ContactID):void{ key = _arg1._key; } public function Copy():b2ContactID{ var _local1:b2ContactID; _local1 = new b2ContactID(); _local1.key = key; return (_local1); } public function get key():uint{ return (_key); } public function set key(_arg1:uint):void{ _key = _arg1; features._referenceEdge = (_key & 0xFF); features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF); features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF); features._flip = (((_key & 4278190080) >> 24) & 0xFF); } } }//package Box2D.Collision
Section 16
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class b2ContactPoint { public var separation:Number; public var normal:b2Vec2; public var position:b2Vec2; public var restitution:Number; public var shape1:b2Shape; public var shape2:b2Shape; public var id:b2ContactID; public var friction:Number; public var velocity:b2Vec2; public function b2ContactPoint(){ position = new b2Vec2(); velocity = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 17
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Distance { private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var gPoint:b2Point = new b2Point(); public static var g_GJK_Iterations:int = 0; public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{ var _local4:Number; var _local5:int; var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local4 = (100 * Number.MIN_VALUE); _local5 = 0; while (_local5 < _arg3) { _local6 = _arg2[_local5]; _local7 = Math.abs((_arg1.x - _local6.x)); _local8 = Math.abs((_arg1.y - _local6.y)); _local9 = Math.max(Math.abs(_arg1.x), Math.abs(_local6.x)); _local10 = Math.max(Math.abs(_arg1.y), Math.abs(_local6.y)); if ((((_local7 < (_local4 * (_local9 + 1)))) && ((_local8 < (_local4 * (_local10 + 1)))))){ return (true); }; _local5++; }; return (false); } public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{ var _local7:b2Vec2; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:int; var _local12:Number; var _local13:int; var _local14:int; var _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:int; _local8 = s_p1s; _local9 = s_p2s; _local10 = s_points; _local11 = 0; _arg1.SetV(_arg3.GetFirstVertex(_arg4)); _arg2.SetV(_arg5.GetFirstVertex(_arg6)); _local12 = 0; _local13 = 20; _local14 = 0; while (_local14 < _local13) { _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local17 = _arg3.Support(_arg4, _local15, _local16); _local18 = _arg5.Support(_arg6, -(_local15), -(_local16)); _local12 = ((_local15 * _local15) + (_local16 * _local16)); _local19 = (_local18.x - _local17.x); _local20 = (_local18.y - _local17.y); _local21 = ((_local15 * _local19) + (_local16 * _local20)); if ((_local12 - ((_local15 * _local19) + (_local16 * _local20))) <= (0.01 * _local12)){ if (_local11 == 0){ _arg1.SetV(_local17); _arg2.SetV(_local18); }; g_GJK_Iterations = _local14; return (Math.sqrt(_local12)); }; switch (_local11){ case 0: _local7 = _local8[0]; _local7.SetV(_local17); _local7 = _local9[0]; _local7.SetV(_local18); _local7 = _local10[0]; _local7.x = _local19; _local7.y = _local20; _arg1.SetV(_local8[0]); _arg2.SetV(_local9[0]); _local11++; break; case 1: _local7 = _local8[1]; _local7.SetV(_local17); _local7 = _local9[1]; _local7.SetV(_local18); _local7 = _local10[1]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10); break; case 2: _local7 = _local8[2]; _local7.SetV(_local17); _local7 = _local9[2]; _local7.SetV(_local18); _local7 = _local10[2]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10); break; }; if (_local11 == 3){ g_GJK_Iterations = _local14; return (0); }; _local22 = -(Number.MAX_VALUE); _local23 = 0; while (_local23 < _local11) { _local7 = _local10[_local23]; _local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y))); _local23++; }; if ((((_local11 == 3)) || ((_local12 <= ((100 * Number.MIN_VALUE) * _local22))))){ g_GJK_Iterations = _local14; _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local12 = ((_local15 * _local15) + (_local16 * _local16)); return (Math.sqrt(_local12)); }; _local14++; }; g_GJK_Iterations = _local13; return (Math.sqrt(_local12)); } public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local7 = _arg4.R; _local8 = _arg3.m_localPosition; _local9 = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local10 = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local7 = _arg6.R; _local8 = _arg5.m_localPosition; _local11 = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local12 = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = ((_local13 * _local13) + (_local14 * _local14)); _local16 = (_arg3.m_radius - b2Settings.b2_toiSlop); _local17 = (_arg5.m_radius - b2Settings.b2_toiSlop); _local18 = (_local16 + _local17); if (_local15 > (_local18 * _local18)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _local20 = (_local19 - _local18); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = (_local11 - (_local17 * _local13)); _arg2.y = (_local12 - (_local17 * _local14)); return (_local20); }; if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); }; _arg1.x = _local9; _arg1.y = _local10; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Vec2; var _local14:b2Vec2; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg5[2]; _local9 = _arg3[0]; _local10 = _arg3[1]; _local11 = _arg3[2]; _local12 = _arg4[0]; _local13 = _arg4[1]; _local14 = _arg4[2]; _local15 = _local6.x; _local16 = _local6.y; _local17 = _local7.x; _local18 = _local7.y; _local19 = _local8.x; _local20 = _local8.y; _local21 = (_local17 - _local15); _local22 = (_local18 - _local16); _local23 = (_local19 - _local15); _local24 = (_local20 - _local16); _local25 = (_local19 - _local17); _local26 = (_local20 - _local18); _local27 = -(((_local15 * _local21) + (_local16 * _local22))); _local28 = ((_local17 * _local21) + (_local18 * _local22)); _local29 = -(((_local15 * _local23) + (_local16 * _local24))); _local30 = ((_local19 * _local23) + (_local20 * _local24)); _local31 = -(((_local17 * _local25) + (_local18 * _local26))); _local32 = ((_local19 * _local25) + (_local20 * _local26)); if ((((_local30 <= 0)) && ((_local32 <= 0)))){ _arg1.SetV(_local11); _arg2.SetV(_local14); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (1); }; _local33 = ((_local21 * _local24) - (_local22 * _local23)); _local34 = (_local33 * ((_local15 * _local18) - (_local16 * _local17))); _local36 = (_local33 * ((_local17 * _local20) - (_local18 * _local19))); if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){ _local35 = (_local31 / (_local31 + _local32)); _arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x))); _arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y))); _arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x))); _arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y))); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (2); }; _local37 = (_local33 * ((_local19 * _local16) - (_local20 * _local15))); if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){ _local35 = (_local29 / (_local29 + _local30)); _arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x))); _arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y))); _arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x))); _arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y))); _local10.SetV(_local11); _local13.SetV(_local14); _local7.SetV(_local8); return (2); }; _local38 = ((_local36 + _local37) + _local34); _local38 = (1 / _local38); _local39 = (_local36 * _local38); _local40 = (_local37 * _local38); _local41 = ((1 - _local39) - _local40); _arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x)); _arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y)); _arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x)); _arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y)); return (3); } public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local9:b2Point; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local9 = gPoint; _local8 = _arg5.m_localPosition; _local7 = _arg6.R; _local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local10 = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity); _local11 = (_arg5.m_radius - b2Settings.b2_toiSlop); if (_local10 > _local11){ _local10 = (_local10 - _local11); _local12 = (_arg2.x - _arg1.x); _local13 = (_arg2.y - _arg1.y); _local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13))); _local12 = (_local12 / _local14); _local13 = (_local13 / _local14); _arg2.x = (_arg2.x - (_local11 * _local12)); _arg2.y = (_arg2.y - (_local11 * _local13)); } else { _local10 = 0; _arg2.x = _arg1.x; _arg2.y = _arg1.y; }; return (_local10); } public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{ var _local7:int; var _local8:int; _local7 = _arg3.m_type; _local8 = _arg5.m_type; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6)); }; return (0); } public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg3[0]; _local9 = _arg3[1]; _local10 = _arg4[0]; _local11 = _arg4[1]; _local12 = -(_local7.x); _local13 = -(_local7.y); _local14 = (_local6.x - _local7.x); _local15 = (_local6.y - _local7.y); _local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15))); _local14 = (_local14 / _local16); _local15 = (_local15 / _local16); _local17 = ((_local12 * _local14) + (_local13 * _local15)); if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){ _arg1.SetV(_local9); _arg2.SetV(_local11); _local8.SetV(_local9); _local10.SetV(_local11); _local6.SetV(_local7); return (1); }; _local17 = (_local17 / _local16); _arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x))); _arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y))); _arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x))); _arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y))); return (2); } } }//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var points:Array; public var pointCount:int;// = 0 public var normal:b2Vec2; public function b2Manifold(){ var _local1:int; pointCount = 0; super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ManifoldPoint(); _local1++; }; normal = new b2Vec2(); } public function Set(_arg1:b2Manifold):void{ var _local2:int; pointCount = _arg1.pointCount; _local2 = 0; while (_local2 < b2Settings.b2_maxManifoldPoints) { (points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]); _local2++; }; normal.SetV(_arg1.normal); } public function Reset():void{ var _local1:int; _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { (points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; normal.SetZero(); pointCount = 0; } } }//package Box2D.Collision
Section 19
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ManifoldPoint { public var separation:Number; public var localPoint2:b2Vec2; public var normalImpulse:Number; public var tangentImpulse:Number; public var localPoint1:b2Vec2; public var id:b2ContactID; public function b2ManifoldPoint(){ localPoint1 = new b2Vec2(); localPoint2 = new b2Vec2(); id = new b2ContactID(); super(); } public function Set(_arg1:b2ManifoldPoint):void{ localPoint1.SetV(_arg1.localPoint1); localPoint2.SetV(_arg1.localPoint2); separation = _arg1.separation; normalImpulse = _arg1.normalImpulse; tangentImpulse = _arg1.tangentImpulse; id.key = _arg1.id.key; } public function Reset():void{ localPoint1.SetZero(); localPoint2.SetZero(); separation = 0; normalImpulse = 0; tangentImpulse = 0; id.key = 0; } } }//package Box2D.Collision
Section 20
//b2OBB (Box2D.Collision.b2OBB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2OBB { public var R:b2Mat22; public var center:b2Vec2; public var extents:b2Vec2; public function b2OBB(){ R = new b2Mat22(); center = new b2Vec2(); extents = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 21
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { import Box2D.Common.*; public class b2Pair { public var userData;// = null public var proxyId1:uint; public var proxyId2:uint; public var status:uint; public var next:uint; public static var e_pairFinal:uint = 4; public static var b2_tableMask:int = (b2_tableCapacity - 1); public static var e_pairRemoved:uint = 2; public static var b2_nullPair:uint = b2Settings.USHRT_MAX; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = b2Settings.USHRT_MAX; public static var b2_tableCapacity:int = b2Settings.b2_maxPairs; public function b2Pair(){ userData = null; super(); } public function SetBuffered():void{ status = (status | e_pairBuffered); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } } }//package Box2D.Collision
Section 22
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairRemoved(_arg1, _arg2, _arg3):void{ } public function PairAdded(_arg1, _arg2){ return (null); } } }//package Box2D.Collision
Section 23
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_pairCount:int; public var m_pairBuffer:Array; public var m_callback:b2PairCallback; public var m_pairs:Array; public var m_pairBufferCount:int; public var m_hashTable:Array; public var m_broadPhase:b2BroadPhase; public var m_freePair:uint; public function b2PairManager(){ var _local1:uint; super(); m_hashTable = new Array(b2Pair.b2_tableCapacity); _local1 = 0; while (_local1 < b2Pair.b2_tableCapacity) { m_hashTable[_local1] = b2Pair.b2_nullPair; _local1++; }; m_pairs = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1] = new b2Pair(); _local1++; }; m_pairBuffer = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairBuffer[_local1] = new b2BufferedPair(); _local1++; }; _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy; m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy; m_pairs[_local1].userData = null; m_pairs[_local1].status = 0; m_pairs[_local1].next = (_local1 + 1); _local1++; }; m_pairs[int((b2Settings.b2_maxPairs - 1))].next = b2Pair.b2_nullPair; m_pairCount = 0; m_pairBufferCount = 0; } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{ var _local4:b2Pair; var _local5:uint; _local5 = m_hashTable[_arg3]; _local4 = m_pairs[_local5]; while (((!((_local5 == b2Pair.b2_nullPair))) && ((Equals(_local4, _arg1, _arg2) == false)))) { _local5 = _local4.next; _local4 = m_pairs[_local5]; }; if (_local5 == b2Pair.b2_nullPair){ return (null); }; return (_local4); } private function Find(_arg1:uint, _arg2:uint):b2Pair{ var _local3:uint; var _local4:uint; if (_arg1 > _arg2){ _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); return (FindHash(_arg1, _arg2, _local3)); } private function ValidateBuffer():void{ } public function Commit():void{ var _local1:b2BufferedPair; var _local2:int; var _local3:int; var _local4:Array; var _local5:b2Pair; var _local6:b2Proxy; var _local7:b2Proxy; _local3 = 0; _local4 = m_broadPhase.m_proxyPool; _local2 = 0; while (_local2 < m_pairBufferCount) { _local1 = m_pairBuffer[_local2]; _local5 = Find(_local1.proxyId1, _local1.proxyId2); _local5.ClearBuffered(); _local6 = _local4[_local5.proxyId1]; _local7 = _local4[_local5.proxyId2]; if (_local5.IsRemoved()){ if (_local5.IsFinal() == true){ m_callback.PairRemoved(_local6.userData, _local7.userData, _local5.userData); }; _local1 = m_pairBuffer[_local3]; _local1.proxyId1 = _local5.proxyId1; _local1.proxyId2 = _local5.proxyId2; _local3++; } else { if (_local5.IsFinal() == false){ _local5.userData = m_callback.PairAdded(_local6.userData, _local7.userData); _local5.SetFinal(); }; }; _local2++; }; _local2 = 0; while (_local2 < _local3) { _local1 = m_pairBuffer[_local2]; RemovePair(_local1.proxyId1, _local1.proxyId2); _local2++; }; m_pairBufferCount = 0; if (b2BroadPhase.s_validate){ ValidateTable(); }; } public function RemoveBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair; _local4 = Find(_arg1, _arg2); if (_local4 == null){ return; }; if (_local4.IsBuffered() == false){ _local4.SetBuffered(); _local3 = m_pairBuffer[m_pairBufferCount]; _local3.proxyId1 = _local4.proxyId1; _local3.proxyId2 = _local4.proxyId2; m_pairBufferCount++; }; _local4.SetRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function RemovePair(_arg1:uint, _arg2:uint){ var _local3:b2Pair; var _local4:uint; var _local5:uint; var _local6:b2Pair; var _local7:uint; var _local8:uint; var _local9:*; if (_arg1 > _arg2){ _local7 = _arg1; _arg1 = _arg2; _arg2 = _local7; }; _local4 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local5 = m_hashTable[_local4]; _local6 = null; while (_local5 != b2Pair.b2_nullPair) { if (Equals(m_pairs[_local5], _arg1, _arg2)){ _local8 = _local5; _local3 = m_pairs[_local5]; if (_local6){ _local6.next = _local3.next; } else { m_hashTable[_local4] = _local3.next; }; _local3 = m_pairs[_local8]; _local9 = _local3.userData; _local3.next = m_freePair; _local3.proxyId1 = b2Pair.b2_nullProxy; _local3.proxyId2 = b2Pair.b2_nullProxy; _local3.userData = null; _local3.status = 0; m_freePair = _local8; m_pairCount--; return (_local9); } else { _local6 = m_pairs[_local5]; _local5 = _local6.next; }; }; return (null); } public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{ m_broadPhase = _arg1; m_callback = _arg2; } public function AddBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair; _local4 = AddPair(_arg1, _arg2); if (_local4.IsBuffered() == false){ _local4.SetBuffered(); _local3 = m_pairBuffer[m_pairBufferCount]; _local3.proxyId1 = _local4.proxyId1; _local3.proxyId2 = _local4.proxyId2; m_pairBufferCount++; }; _local4.ClearRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function AddPair(_arg1:uint, _arg2:uint):b2Pair{ var _local3:uint; var _local4:b2Pair; var _local5:uint; var _local6:uint; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local4 = FindHash(_arg1, _arg2, _local3); if (_local4 != null){ return (_local4); }; _local5 = m_freePair; _local4 = m_pairs[_local5]; m_freePair = _local4.next; _local4.proxyId1 = _arg1; _local4.proxyId2 = _arg2; _local4.status = 0; _local4.userData = null; _local4.next = m_hashTable[_local3]; m_hashTable[_local3] = _local5; m_pairCount++; return (_local4); } private function ValidateTable():void{ } public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{ return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))); } public static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint; _local3 = (((_arg2 << 16) & 4294901760) | _arg1); _local3 = (~(_local3) + ((_local3 << 15) & 4294934528)); _local3 = (_local3 ^ ((_local3 >> 12) & 1048575)); _local3 = (_local3 + ((_local3 << 2) & 4294967292)); _local3 = (_local3 ^ ((_local3 >> 4) & 268435455)); _local3 = (_local3 * 2057); _local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF)); return (_local3); } public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{ return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3)))); } } }//package Box2D.Collision
Section 24
//b2Point (Box2D.Collision.b2Point) package Box2D.Collision { import Box2D.Common.Math.*; public class b2Point { public var p:b2Vec2; public function b2Point(){ p = new b2Vec2(); super(); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (p); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ return (p); } } }//package Box2D.Collision
Section 25
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { public class b2Proxy { public var overlapCount:uint; public var lowerBounds:Array; public var upperBounds:Array; public var userData;// = null public var timeStamp:uint; public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; userData = null; super(); } public function GetNext():uint{ return (lowerBounds[0]); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } public function SetNext(_arg1:uint):void{ lowerBounds[0] = (_arg1 & 0xFFFF); } } }//package Box2D.Collision
Section 26
//b2Segment (Box2D.Collision.b2Segment) package Box2D.Collision { import Box2D.Common.Math.*; 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 _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; _local5 = _arg3.p1; _local6 = (_arg3.p2.x - _local5.x); _local7 = (_arg3.p2.y - _local5.y); _local8 = (p2.x - p1.x); _local9 = (p2.y - p1.y); _local10 = _local9; _local11 = -(_local8); _local12 = (100 * Number.MIN_VALUE); _local13 = -(((_local6 * _local10) + (_local7 * _local11))); if (_local13 > _local12){ _local14 = (_local5.x - p1.x); _local15 = (_local5.y - p1.y); _local16 = ((_local14 * _local10) + (_local15 * _local11)); if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){ _local17 = ((-(_local7) * _local15) + (_local7 * _local14)); if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){ _local16 = (_local16 / _local13); _local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local18); _local11 = (_local11 / _local18); _arg1[0] = _local16; _arg2.Set(_local10, _local11); return (true); }; }; }; return (false); } } }//package Box2D.Collision
Section 27
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2TimeOfImpact { public static var s_xf1:b2XForm = new b2XForm(); public static var s_xf2:b2XForm = new b2XForm(); public static var s_p1:b2Vec2 = new b2Vec2(); public static var s_p2:b2Vec2 = new b2Vec2(); public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:int; var _local20:int; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2XForm; var _local27:b2XForm; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; _local7 = _arg1.m_sweepRadius; _local8 = _arg3.m_sweepRadius; _local9 = _arg2.t0; _local10 = (_arg2.c.x - _arg2.c0.x); _local11 = (_arg2.c.y - _arg2.c0.y); _local12 = (_arg4.c.x - _arg4.c0.x); _local13 = (_arg4.c.y - _arg4.c0.y); _local14 = (_arg2.a - _arg2.a0); _local15 = (_arg4.a - _arg4.a0); _local16 = 0; _local17 = s_p1; _local18 = s_p2; _local19 = 20; _local20 = 0; _local21 = 0; _local22 = 0; _local23 = 0; _local24 = 0; while (true) { _local25 = (((1 - _local16) * _local9) + _local16); _local26 = s_xf1; _local27 = s_xf2; _arg2.GetXForm(_local26, _local25); _arg4.GetXForm(_local27, _local25); _local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27); if (_local20 == 0){ if (_local23 > (2 * b2Settings.b2_toiSlop)){ _local24 = (1.5 * b2Settings.b2_toiSlop); } else { _local5 = (0.05 * b2Settings.b2_toiSlop); _local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop)); _local24 = ((_local5 > _local6)) ? _local5 : _local6; }; }; if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){ break; }; _local21 = (_local18.x - _local17.x); _local22 = (_local18.y - _local17.y); _local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22))); _local21 = (_local21 / _local28); _local22 = (_local22 / _local28); _local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8)); if (_local29 == 0){ _local16 = 1; break; }; _local30 = ((_local23 - _local24) / _local29); _local31 = (_local16 + _local30); if ((((_local31 < 0)) || ((1 < _local31)))){ _local16 = 1; break; }; if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){ break; }; _local16 = _local31; _local20++; }; return (_local16); } } }//package Box2D.Collision
Section 28
//ClipVertex (Box2D.Collision.ClipVertex) package Box2D.Collision { import Box2D.Common.Math.*; public class ClipVertex { public var v:b2Vec2; public var id:b2ContactID; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 29
//Features (Box2D.Collision.Features) package Box2D.Collision { public class Features { public var _referenceEdge:int; public var _incidentEdge:int; public var _flip:int; public var _incidentVertex:int; public var _m_id:b2ContactID; public function get referenceEdge():int{ return (_referenceEdge); } public function set incidentVertex(_arg1:int):void{ _incidentVertex = _arg1; _m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000)); } public function get flip():int{ return (_flip); } public function get incidentEdge():int{ return (_incidentEdge); } public function set referenceEdge(_arg1:int):void{ _referenceEdge = _arg1; _m_id._key = ((_m_id._key & 4294967040) | (_referenceEdge & 0xFF)); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 30
//b2Mat22 (Box2D.Common.Math.b2Mat22) package Box2D.Common.Math { import Box2D.Common.*; public class b2Mat22 { public var col1:b2Vec2; public var col2:b2Vec2; public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){ var _local4:Number; var _local5:Number; col1 = new b2Vec2(); col2 = new b2Vec2(); super(); if (((!((_arg2 == null))) && (!((_arg3 == null))))){ col1.SetV(_arg2); col2.SetV(_arg3); } else { _local4 = Math.cos(_arg1); _local5 = Math.sin(_arg1); col1.x = _local4; col2.x = -(_local5); col1.y = _local5; col2.y = _local4; }; } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col1.y = 0; col2.y = 1; } public function Set(_arg1:Number):void{ var _local2:Number; var _local3:Number; _local2 = Math.cos(_arg1); _local3 = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function SetZero():void{ col1.x = 0; col2.x = 0; col1.y = 0; col2.y = 0; } public function SetM(_arg1:b2Mat22):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); } public function AddM(_arg1:b2Mat22):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); } public function Abs():void{ col1.Abs(); col2.Abs(); } public function Copy():b2Mat22{ return (new b2Mat22(0, col1, col2)); } public function Invert(_arg1:b2Mat22):b2Mat22{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = col1.x; _local3 = col2.x; _local4 = col1.y; _local5 = col2.y; _local6 = ((_local2 * _local5) - (_local3 * _local4)); _local6 = (1 / _local6); _arg1.col1.x = (_local6 * _local5); _arg1.col2.x = (-(_local6) * _local3); _arg1.col1.y = (-(_local6) * _local4); _arg1.col2.y = (_local6 * _local2); return (_arg1); } public function GetAngle():Number{ return (Math.atan2(col1.y, col1.x)); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = col1.x; _local5 = col2.x; _local6 = col1.y; _local7 = col2.y; _local8 = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Box2D.Common.Math
Section 31
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1)); public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity); public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0); public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function b2IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = b2MulMV(_arg1.R, _arg2); _local3.x = (_local3.x + _arg1.position.x); _local3.y = (_local3.y + _arg1.position.y); return (_local3); } public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (((_local3 * _local3) + (_local4 * _local4))); } public static function b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:*; _local3 = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22; _local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function b2MulXT(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; var _local4:Number; _local3 = SubtractVV(_arg2, _arg1.position); _local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y)); _local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y)); _local3.x = _local4; return (_local3); } public static function b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (b2Max(_arg2, b2Min(_arg1, _arg3))); } public static function b2AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2; _local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Mat22; _local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); _local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); _local5 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean; _local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2NextPowerOfTwo(_arg1:uint):uint{ _arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647)); _arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823)); _arg1 = (_arg1 | ((_arg1 >> 4) & 268435455)); _arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF)); _arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF)); return ((_arg1 + 1)); } public static function b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } } }//package Box2D.Common.Math
Section 32
//b2Sweep (Box2D.Common.Math.b2Sweep) package Box2D.Common.Math { import Box2D.Common.*; public class b2Sweep { public var localCenter:b2Vec2; public var c:b2Vec2; public var a:Number; public var c0:b2Vec2; public var a0:Number; public var t0:Number; public function b2Sweep(){ localCenter = new b2Vec2(); c0 = new b2Vec2(); c = new b2Vec2(); super(); } public function Advance(_arg1:Number):void{ var _local2:Number; if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){ _local2 = ((_arg1 - t0) / (1 - t0)); c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x)); c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y)); a0 = (((1 - _local2) * a0) + (_local2 * a)); t0 = _arg1; }; } public function GetXForm(_arg1:b2XForm, _arg2:Number):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; if ((1 - t0) > Number.MIN_VALUE){ _local4 = ((_arg2 - t0) / (1 - t0)); _arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x)); _arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y)); _local5 = (((1 - _local4) * a0) + (_local4 * a)); _arg1.R.Set(_local5); } else { _arg1.position.SetV(c); _arg1.R.Set(a); }; _local3 = _arg1.R; _arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y))); _arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y))); } } }//package Box2D.Common.Math
Section 33
//b2Vec2 (Box2D.Common.Math.b2Vec2) package Box2D.Common.Math { import Box2D.Common.*; public class b2Vec2 { public var x:Number; public var y:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Set(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function Length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function LengthSquared():Number{ return (((x * x) + (y * y))); } public function SetZero():void{ x = 0; y = 0; } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function MaxV(_arg1:b2Vec2):void{ x = ((x > _arg1.x)) ? x : _arg1.x; y = ((y > _arg1.y)) ? y : _arg1.y; } public function SetV(_arg1:b2Vec2):void{ x = _arg1.x; y = _arg1.y; } public function Negative():b2Vec2{ return (new b2Vec2(-(x), -(y))); } public function CrossVF(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } public function Abs():void{ if (x < 0){ x = -(x); }; if (y < 0){ y = -(y); }; } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y)))); } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function MulM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function Normalize():Number{ var _local1:Number; var _local2:Number; _local1 = Math.sqrt(((x * x) + (y * y))); if (_local1 < Number.MIN_VALUE){ return (0); }; _local2 = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function CrossFV(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 34
//b2XForm (Box2D.Common.Math.b2XForm) package Box2D.Common.Math { import Box2D.Common.*; public class b2XForm { public var R:b2Mat22; public var position:b2Vec2; public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{ position = new b2Vec2(); R = new b2Mat22(); super(); if (_arg1){ position.SetV(_arg1); R.SetM(_arg2); }; } public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{ position.SetV(_arg1); R.SetM(_arg2); } public function Set(_arg1:b2XForm):void{ position.SetV(_arg1.position); R.SetM(_arg1.R); } public function SetIdentity():void{ position.SetZero(); R.SetIdentity(); } } }//package Box2D.Common.Math
Section 35
//b2Color (Box2D.Common.b2Color) package Box2D.Common { import Box2D.Common.Math.*; public class b2Color { private var _g:uint;// = 0 private var _b:uint;// = 0 private var _r:uint;// = 0 public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){ _r = 0; _g = 0; _b = 0; super(); _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function get color():uint{ return (((_r | (_g << 8)) | (_b << 16))); } public function set r(_arg1:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set g(_arg1:Number):void{ _g = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } } }//package Box2D.Common
Section 36
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static const b2_linearSleepTolerance:Number = 0.01; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.005; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxProxies:int = 0x0200; public static const b2_maxAngularVelocitySquared:Number = 62500; public static const b2_maxPolygonVertices:int = 8; public static const b2_velocityThreshold:Number = 1; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxPairs:int = 4096; public static const b2_maxTOIContactsPerIsland:int = 32; public static const b2_timeToSleep:Number = 0.5; public static const b2_maxManifoldPoints:int = 2; public static const b2_maxAngularVelocity:Number = 250; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearVelocity:Number = 200; public static const b2_maxLinearCorrection:Number = 0.2; public static const b2_toiSlop:Number = 0.04; public static const b2_maxLinearVelocitySquared:Number = 40000; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 37
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ var _local3:b2ManifoldPoint; m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; _local3 = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactPoint; var _local8:b2ManifoldPoint; _local5 = m_shape1.m_body; _local6 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf); _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = m_friction; _local7.restitution = m_restitution; if (m_manifold.pointCount > 0){ m_manifoldCount = 1; _local8 = m_manifold.points[0]; if (m0.pointCount == 0){ _local8.normalImpulse = 0; _local8.tangentImpulse = 0; if (_arg1){ _local7.position = _local5.GetWorldPoint(_local8.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local8.separation; _local7.id.key = _local8.id._key; _arg1.Add(_local7); }; } else { _local4 = m0.points[0]; _local8.normalImpulse = _local4.normalImpulse; _local8.tangentImpulse = _local4.tangentImpulse; if (_arg1){ _local7.position = _local5.GetWorldPoint(_local8.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local8.separation; _local7.id.key = _local8.id._key; _arg1.Persist(_local7); }; }; } else { m_manifoldCount = 0; if ((((m0.pointCount > 0)) && (_arg1))){ _local4 = m0.points[0]; _local7.position = _local5.GetWorldPoint(_local4.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m0.normal); _local7.separation = _local4.separation; _local7.id.key = _local4.id._key; _arg1.Remove(_local7); }; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2CircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 38
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Contact { public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_prev:b2Contact; public var m_toi:Number; public var m_next:b2Contact; public var m_friction:Number; public var m_manifoldCount:int; public var m_node1:b2ContactEdge; public var m_node2:b2ContactEdge; public var m_restitution:Number; public var m_flags:uint; public static var e_toiFlag:uint = 8; public static var e_nonSolidFlag:uint = 1; public static var e_slowFlag:uint = 2; public static var e_islandFlag:uint = 4; public static var s_registers:Array; public static var s_initialized:Boolean = false; public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){ m_node1 = new b2ContactEdge(); m_node2 = new b2ContactEdge(); super(); m_flags = 0; if (((!(_arg1)) || (!(_arg2)))){ m_shape1 = null; m_shape2 = null; return; }; if (((_arg1.IsSensor()) || (_arg2.IsSensor()))){ m_flags = (m_flags | e_nonSolidFlag); }; m_shape1 = _arg1; m_shape2 = _arg2; m_manifoldCount = 0; m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction)); m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution); m_prev = null; m_next = null; m_node1.contact = null; m_node1.prev = null; m_node1.next = null; m_node1.other = null; m_node2.contact = null; m_node2.prev = null; m_node2.next = null; m_node2.other = null; } public function GetShape1():b2Shape{ return (m_shape1); } public function IsSolid():Boolean{ return (((m_flags & e_nonSolidFlag) == 0)); } public function GetNext():b2Contact{ return (m_next); } public function GetManifolds():Array{ return (null); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function Update(_arg1:b2ContactListener):void{ var _local2:int; var _local3:int; var _local4:b2Body; var _local5:b2Body; _local2 = m_manifoldCount; Evaluate(_arg1); _local3 = m_manifoldCount; _local4 = m_shape1.m_body; _local5 = m_shape2.m_body; if ((((_local3 == 0)) && ((_local2 > 0)))){ _local4.WakeUp(); _local5.WakeUp(); }; if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){ m_flags = (m_flags & ~(e_slowFlag)); } else { m_flags = (m_flags | e_slowFlag); }; } public function Evaluate(_arg1:b2ContactListener):void{ } public static function InitializeRegisters():void{ var _local1:int; var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); _local1 = 0; while (_local1 < b2Shape.e_shapeTypeCount) { s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { s_registers[_local1][_local2] = new b2ContactRegister(); _local2++; }; _local1++; }; AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape); AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape); AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape); } public static function Destroy(_arg1:b2Contact, _arg2):void{ var _local3:int; var _local4:int; var _local5:b2ContactRegister; var _local6:Function; if (_arg1.m_manifoldCount > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; _local3 = _arg1.m_shape1.m_type; _local4 = _arg1.m_shape2.m_type; _local5 = s_registers[_local3][_local4]; _local6 = _local5.destroyFcn; _local6(_arg1, _arg2); } public static function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{ s_registers[_arg3][_arg4].createFcn = _arg1; s_registers[_arg3][_arg4].destroyFcn = _arg2; s_registers[_arg3][_arg4].primary = true; if (_arg3 != _arg4){ s_registers[_arg4][_arg3].createFcn = _arg1; s_registers[_arg4][_arg3].destroyFcn = _arg2; s_registers[_arg4][_arg3].primary = false; }; } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local4:int; var _local5:int; var _local6:b2ContactRegister; var _local7:Function; var _local8:b2Contact; var _local9:int; var _local10:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; _local4 = _arg1.m_type; _local5 = _arg2.m_type; _local6 = s_registers[_local4][_local5]; _local7 = _local6.createFcn; if (_local7 != null){ if (_local6.primary){ return (_local7(_arg1, _arg2, _arg3)); }; _local8 = _local7(_arg2, _arg1, _arg3); _local9 = 0; while (_local9 < _local8.m_manifoldCount) { _local10 = _local8.GetManifolds()[_local9]; _local8.GetManifolds()[_local9].normal = _local10.normal.Negative(); _local9++; }; return (_local8); //unresolved jump }; return (null); } } }//package Box2D.Dynamics.Contacts
Section 39
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var restitution:Number; public var body1:b2Body; public var manifold:b2Manifold; public var normal:b2Vec2; public var body2:b2Body; public var friction:Number; public var pointCount:int; public function b2ContactConstraint(){ var _local1:int; normal = new b2Vec2(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 40
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var r2:b2Vec2; public var separation:Number; public var positionImpulse:Number; public var normalImpulse:Number; public var equalizedMass:Number; public var tangentMass:Number; public var tangentImpulse:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var normalMass:Number; public var velocityBias:Number; public var r1:b2Vec2; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); r1 = new b2Vec2(); r2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 41
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactEdge { public var next:b2ContactEdge; public var other:b2Body; public var contact:b2Contact; public var prev:b2ContactEdge; } }//package Box2D.Dynamics.Contacts
Section 42
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var primary:Boolean; public var createFcn:Function; public var destroyFcn:Function; } }//package Box2D.Dynamics.Contacts
Section 43
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class b2ContactResult { public var normal:b2Vec2; public var position:b2Vec2; public var shape1:b2Shape; public var shape2:b2Shape; public var normalImpulse:Number; public var tangentImpulse:Number; public var id:b2ContactID; public function b2ContactResult(){ position = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Dynamics.Contacts
Section 44
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2ContactSolver { public var m_constraintCount:int; public var m_constraints:Array; public var m_allocator; public var m_step:b2TimeStep; public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){ var _local5:b2Contact; var _local6:int; var _local7:b2Vec2; var _local8:b2Mat22; var _local9:int; var _local10:b2Body; var _local11:b2Body; var _local12:int; var _local13:Array; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:int; var _local23:b2Manifold; var _local24:Number; var _local25:Number; var _local26:b2ContactConstraint; var _local27:uint; var _local28:b2ManifoldPoint; var _local29:b2ContactConstraintPoint; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:Number; var _local45:Number; var _local46:Number; var _local47:Number; m_step = new b2TimeStep(); m_constraints = new Array(); super(); m_step.dt = _arg1.dt; m_step.inv_dt = _arg1.inv_dt; m_step.maxIterations = _arg1.maxIterations; m_allocator = _arg4; m_constraintCount = 0; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; m_constraintCount = (m_constraintCount + _local5.m_manifoldCount); _local6++; }; _local6 = 0; while (_local6 < m_constraintCount) { m_constraints[_local6] = new b2ContactConstraint(); _local6++; }; _local9 = 0; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; _local10 = _local5.m_shape1.m_body; _local11 = _local5.m_shape2.m_body; _local12 = _local5.m_manifoldCount; _local13 = _local5.GetManifolds(); _local14 = _local5.m_friction; _local15 = _local5.m_restitution; _local16 = _local10.m_linearVelocity.x; _local17 = _local10.m_linearVelocity.y; _local18 = _local11.m_linearVelocity.x; _local19 = _local11.m_linearVelocity.y; _local20 = _local10.m_angularVelocity; _local21 = _local11.m_angularVelocity; _local22 = 0; while (_local22 < _local12) { _local23 = _local13[_local22]; _local24 = _local23.normal.x; _local25 = _local23.normal.y; _local26 = m_constraints[_local9]; _local26.body1 = _local10; _local26.body2 = _local11; _local26.manifold = _local23; _local26.normal.x = _local24; _local26.normal.y = _local25; _local26.pointCount = _local23.pointCount; _local26.friction = _local14; _local26.restitution = _local15; _local27 = 0; while (_local27 < _local26.pointCount) { _local28 = _local23.points[_local27]; _local29 = _local26.points[_local27]; _local29.normalImpulse = _local28.normalImpulse; _local29.tangentImpulse = _local28.tangentImpulse; _local29.separation = _local28.separation; _local29.positionImpulse = 0; _local29.localAnchor1.SetV(_local28.localPoint1); _local29.localAnchor2.SetV(_local28.localPoint2); _local8 = _local10.m_xf.R; _local32 = (_local28.localPoint1.x - _local10.m_sweep.localCenter.x); _local33 = (_local28.localPoint1.y - _local10.m_sweep.localCenter.y); _local30 = ((_local8.col1.x * _local32) + (_local8.col2.x * _local33)); _local33 = ((_local8.col1.y * _local32) + (_local8.col2.y * _local33)); _local32 = _local30; _local29.r1.Set(_local32, _local33); _local8 = _local11.m_xf.R; _local34 = (_local28.localPoint2.x - _local11.m_sweep.localCenter.x); _local35 = (_local28.localPoint2.y - _local11.m_sweep.localCenter.y); _local30 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35)); _local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35)); _local34 = _local30; _local29.r2.Set(_local34, _local35); _local36 = ((_local32 * _local32) + (_local33 * _local33)); _local37 = ((_local34 * _local34) + (_local35 * _local35)); _local38 = ((_local32 * _local24) + (_local33 * _local25)); _local39 = ((_local34 * _local24) + (_local35 * _local25)); _local40 = (_local10.m_invMass + _local11.m_invMass); _local40 = (_local40 + ((_local10.m_invI * (_local36 - (_local38 * _local38))) + (_local11.m_invI * (_local37 - (_local39 * _local39))))); _local29.normalMass = (1 / _local40); _local41 = ((_local10.m_mass * _local10.m_invMass) + (_local11.m_mass * _local11.m_invMass)); _local41 = (_local41 + (((_local10.m_mass * _local10.m_invI) * (_local36 - (_local38 * _local38))) + ((_local11.m_mass * _local11.m_invI) * (_local37 - (_local39 * _local39))))); _local29.equalizedMass = (1 / _local41); _local42 = _local25; _local43 = -(_local24); _local44 = ((_local32 * _local42) + (_local33 * _local43)); _local45 = ((_local34 * _local42) + (_local35 * _local43)); _local46 = (_local10.m_invMass + _local11.m_invMass); _local46 = (_local46 + ((_local10.m_invI * (_local36 - (_local44 * _local44))) + (_local11.m_invI * (_local37 - (_local45 * _local45))))); _local29.tangentMass = (1 / _local46); _local29.velocityBias = 0; if (_local29.separation > 0){ _local29.velocityBias = (-60 * _local29.separation); }; _local30 = (((_local18 + (-(_local21) * _local35)) - _local16) - (-(_local20) * _local33)); _local31 = (((_local19 + (_local21 * _local34)) - _local17) - (_local20 * _local32)); _local47 = ((_local26.normal.x * _local30) + (_local26.normal.y * _local31)); if (_local47 < -(b2Settings.b2_velocityThreshold)){ _local29.velocityBias = (_local29.velocityBias + (-(_local26.restitution) * _local47)); }; _local27++; }; _local9++; _local22++; }; _local6++; }; } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2Mat22; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:b2ContactConstraintPoint; var _local21:Number; var _local22:Number; var _local23:b2ContactConstraintPoint; _local5 = 0; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_invMass; _local10 = _local7.m_invI; _local11 = _local8.m_invMass; _local12 = _local8.m_invI; _local13 = _local6.normal.x; _local14 = _local6.normal.y; _local15 = _local14; _local16 = -(_local13); if (_arg1.warmStarting){ _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local20 = _local6.points[_local18]; _local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio); _local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio); _local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15)); _local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16)); _local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.r1.x * _local22) - (_local20.r1.y * _local21)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22)); _local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.r2.x * _local22) - (_local20.r2.y * _local21)))); _local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21)); _local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22)); _local18++; }; } else { _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local23 = _local6.points[_local18]; _local23.normalImpulse = 0; _local23.tangentImpulse = 0; _local18++; }; }; _local5++; }; } public function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:b2Vec2; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:int; var _local20:int; var _local21:b2ContactConstraintPoint; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; _local2 = 0; _local5 = 0; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_sweep.c; _local10 = _local7.m_sweep.a; _local11 = _local8.m_sweep.c; _local12 = _local8.m_sweep.a; _local13 = (_local7.m_mass * _local7.m_invMass); _local14 = (_local7.m_mass * _local7.m_invI); _local15 = (_local8.m_mass * _local8.m_invMass); _local16 = (_local8.m_mass * _local8.m_invI); _local17 = _local6.normal.x; _local18 = _local6.normal.y; _local19 = _local6.pointCount; _local20 = 0; while (_local20 < _local19) { _local21 = _local6.points[_local20]; _local3 = _local7.m_xf.R; _local4 = _local7.m_sweep.localCenter; _local22 = (_local21.localAnchor1.x - _local4.x); _local23 = (_local21.localAnchor1.y - _local4.y); _local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23)); _local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23)); _local22 = _local26; _local3 = _local8.m_xf.R; _local4 = _local8.m_sweep.localCenter; _local24 = (_local21.localAnchor2.x - _local4.x); _local25 = (_local21.localAnchor2.y - _local4.y); _local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25)); _local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25)); _local24 = _local26; _local27 = (_local9.x + _local22); _local28 = (_local9.y + _local23); _local29 = (_local11.x + _local24); _local30 = (_local11.y + _local25); _local31 = (_local29 - _local27); _local32 = (_local30 - _local28); _local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation); _local2 = b2Math.b2Min(_local2, _local33); _local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local35 = (-(_local21.equalizedMass) * _local34); _local36 = _local21.positionImpulse; _local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0); _local35 = (_local21.positionImpulse - _local36); _local37 = (_local35 * _local17); _local38 = (_local35 * _local18); _local9.x = (_local9.x - (_local13 * _local37)); _local9.y = (_local9.y - (_local13 * _local38)); _local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37)))); _local7.m_sweep.a = _local10; _local7.SynchronizeTransform(); _local11.x = (_local11.x + (_local15 * _local37)); _local11.y = (_local11.y + (_local15 * _local38)); _local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37)))); _local8.m_sweep.a = _local12; _local8.SynchronizeTransform(); _local20++; }; _local5++; }; return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop))); } public function SolveVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraintPoint; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:b2Mat22; var _local18:b2Vec2; var _local19:int; var _local20:b2ContactConstraint; var _local21:b2Body; var _local22:b2Body; var _local23:Number; var _local24:Number; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:int; var _local38:Number; _local19 = 0; while (_local19 < m_constraintCount) { _local20 = m_constraints[_local19]; _local21 = _local20.body1; _local22 = _local20.body2; _local23 = _local21.m_angularVelocity; _local24 = _local22.m_angularVelocity; _local25 = _local21.m_linearVelocity; _local26 = _local22.m_linearVelocity; _local27 = _local21.m_invMass; _local28 = _local21.m_invI; _local29 = _local22.m_invMass; _local30 = _local22.m_invI; _local31 = _local20.normal.x; _local32 = _local20.normal.y; _local33 = _local32; _local34 = -(_local31); _local35 = _local20.friction; _local37 = _local20.pointCount; _local1 = 0; while (_local1 < _local37) { _local2 = _local20.points[_local1]; _local7 = (((_local26.x + (-(_local24) * _local2.r2.y)) - _local25.x) - (-(_local23) * _local2.r1.y)); _local8 = (((_local26.y + (_local24 * _local2.r2.x)) - _local25.y) - (_local23 * _local2.r1.x)); _local9 = ((_local7 * _local31) + (_local8 * _local32)); _local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias)); _local10 = ((_local7 * _local33) + (_local8 * _local34)); _local12 = (_local2.tangentMass * -(_local10)); _local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0); _local11 = (_local13 - _local2.normalImpulse); _local38 = (_local35 * _local2.normalImpulse); _local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local38), _local38); _local12 = (_local14 - _local2.tangentImpulse); _local15 = ((_local11 * _local31) + (_local12 * _local33)); _local16 = ((_local11 * _local32) + (_local12 * _local34)); _local25.x = (_local25.x - (_local27 * _local15)); _local25.y = (_local25.y - (_local27 * _local16)); _local23 = (_local23 - (_local28 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15)))); _local26.x = (_local26.x + (_local29 * _local15)); _local26.y = (_local26.y + (_local29 * _local16)); _local24 = (_local24 + (_local30 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15)))); _local2.normalImpulse = _local13; _local2.tangentImpulse = _local14; _local1++; }; _local21.m_angularVelocity = _local23; _local22.m_angularVelocity = _local24; _local19++; }; } public function FinalizeVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ManifoldPoint; var _local6:b2ContactConstraintPoint; _local1 = 0; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 45
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2NullContact extends b2Contact { override public function GetManifolds():Array{ return (null); } override public function Evaluate(_arg1:b2ContactListener):void{ } } }//package Box2D.Dynamics.Contacts
Section 46
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ var _local3:b2ManifoldPoint; m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape)); b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape)); m_manifold.pointCount = 0; _local3 = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:int; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2ManifoldPoint; var _local6:b2Body; var _local7:b2Body; var _local8:Array; var _local9:b2ContactPoint; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; _local6 = m_shape1.m_body; _local7 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf); _local8 = [false, false]; _local9 = s_evalCP; _local9.shape1 = m_shape1; _local9.shape2 = m_shape2; _local9.friction = m_friction; _local9.restitution = m_restitution; if (m_manifold.pointCount > 0){ _local2 = 0; while (_local2 < m_manifold.pointCount) { _local10 = m_manifold.points[_local2]; _local10.normalImpulse = 0; _local10.tangentImpulse = 0; _local11 = false; _local12 = _local10.id._key; _local13 = 0; while (_local13 < m0.pointCount) { if (_local8[_local13] == true){ } else { _local5 = m0.points[_local13]; if (_local5.id._key == _local12){ _local8[_local13] = true; _local10.normalImpulse = _local5.normalImpulse; _local10.tangentImpulse = _local5.tangentImpulse; _local11 = true; if (_arg1 != null){ _local9.position = _local6.GetWorldPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m_manifold.normal); _local9.separation = _local10.separation; _local9.id.key = _local12; _arg1.Persist(_local9); }; break; }; }; _local13++; }; if ((((_local11 == false)) && (!((_arg1 == null))))){ _local9.position = _local6.GetWorldPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m_manifold.normal); _local9.separation = _local10.separation; _local9.id.key = _local12; _arg1.Add(_local9); }; _local2++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (_arg1 == null){ return; }; _local2 = 0; while (_local2 < m0.pointCount) { if (_local8[_local2]){ } else { _local5 = m0.points[_local2]; _local9.position = _local6.GetWorldPoint(_local5.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local5.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local5.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m0.normal); _local9.separation = _local5.separation; _local9.id.key = _local5.id._key; _arg1.Remove(_local9); }; _local2++; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 47
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2PolygonContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{ m0 = new b2Manifold(); m_manifolds = [new b2Manifold()]; super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactPoint; var _local8:int; var _local9:Array; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; _local5 = m_shape1.m_body; _local6 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf); _local9 = [false, false]; _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = m_friction; _local7.restitution = m_restitution; if (m_manifold.pointCount > 0){ _local8 = 0; while (_local8 < m_manifold.pointCount) { _local10 = m_manifold.points[_local8]; _local10.normalImpulse = 0; _local10.tangentImpulse = 0; _local11 = false; _local12 = _local10.id._key; _local13 = 0; while (_local13 < m0.pointCount) { if (_local9[_local13] == true){ } else { _local4 = m0.points[_local13]; if (_local4.id._key == _local12){ _local9[_local13] = true; _local10.normalImpulse = _local4.normalImpulse; _local10.tangentImpulse = _local4.tangentImpulse; _local11 = true; if (_arg1 != null){ _local7.position = _local5.GetWorldPoint(_local10.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local10.separation; _local7.id.key = _local12; _arg1.Persist(_local7); }; break; }; }; _local13++; }; if ((((_local11 == false)) && (!((_arg1 == null))))){ _local7.position = _local5.GetWorldPoint(_local10.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local10.separation; _local7.id.key = _local12; _arg1.Add(_local7); }; _local8++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (_arg1 == null){ return; }; _local8 = 0; while (_local8 < m0.pointCount) { if (_local9[_local8]){ } else { _local4 = m0.points[_local8]; _local7.position = _local5.GetWorldPoint(_local4.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m0.normal); _local7.separation = _local4.separation; _local7.id.key = _local4.id._key; _arg1.Remove(_local7); }; _local8++; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolygonContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 48
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2DistanceJoint extends b2Joint { public var m_mass:Number; public var m_u:b2Vec2; public var m_impulse:Number; public var m_dampingRatio:Number; public var m_frequencyHz:Number; public var m_localAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_bias:Number; public var m_gamma:Number; public var m_length:Number; public function b2DistanceJoint(_arg1:b2DistanceJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u = new b2Vec2(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_length = _arg1.length; m_frequencyHz = _arg1.frequencyHz; m_dampingRatio = _arg1.dampingRatio; m_impulse = 0; m_gamma = 0; m_bias = 0; m_inv_dt = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = new b2Vec2(); _local1.SetV(m_u); _local1.Multiply((m_inv_dt * m_impulse)); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; if (m_frequencyHz > 0){ return (true); }; _local2 = m_body1; _local3 = m_body2; _local1 = _local2.m_xf.R; _local4 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local6 = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5)); _local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5)); _local4 = _local6; _local1 = _local3.m_xf.R; _local7 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local6 = ((_local1.col1.x * _local7) + (_local1.col2.x * _local8)); _local8 = ((_local1.col1.y * _local7) + (_local1.col2.y * _local8)); _local7 = _local6; _local9 = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4); _local10 = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5); _local11 = Math.sqrt(((_local9 * _local9) + (_local10 * _local10))); _local9 = (_local9 / _local11); _local10 = (_local10 / _local11); _local12 = (_local11 - m_length); _local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local13 = (-(m_mass) * _local12); m_u.Set(_local9, _local10); _local14 = (_local13 * m_u.x); _local15 = (_local13 * m_u.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x - (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y - (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a - (_local2.m_invI * ((_local4 * _local15) - (_local5 * _local14)))); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local14)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local15)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local7 * _local15) - (_local8 * _local14)))); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); return ((b2Math.b2Abs(_local12) < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; m_inv_dt = _arg1.inv_dt; _local4 = m_body1; _local5 = m_body2; _local2 = _local4.m_xf.R; _local6 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7)); _local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7)); _local6 = _local3; _local2 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; m_u.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6); m_u.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7); _local10 = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y))); if (_local10 > b2Settings.b2_linearSlop){ m_u.Multiply((1 / _local10)); } else { m_u.SetZero(); }; _local11 = ((_local6 * m_u.y) - (_local7 * m_u.x)); _local12 = ((_local8 * m_u.y) - (_local9 * m_u.x)); _local13 = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12)); m_mass = (1 / _local13); if (m_frequencyHz > 0){ _local14 = (_local10 - m_length); _local15 = ((2 * Math.PI) * m_frequencyHz); _local16 = (((2 * m_mass) * m_dampingRatio) * _local15); _local17 = ((m_mass * _local15) * _local15); m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17)))); m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma); m_mass = (1 / (_local13 + m_gamma)); }; if (_arg1.warmStarting){ m_impulse = (m_impulse * _arg1.dtRatio); _local18 = (m_impulse * m_u.x); _local19 = (m_impulse * m_u.y); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18)))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18)))); } else { m_impulse = 0; }; } override public function GetReactionTorque():Number{ return (0); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local3 = m_body1; _local4 = m_body2; _local2 = _local3.m_xf.R; _local5 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; _local8 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local7; _local10 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6)); _local11 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5)); _local12 = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9)); _local13 = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8)); _local14 = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11))); _local15 = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse))); m_impulse = (m_impulse + _local15); _local16 = (_local15 * m_u.x); _local17 = (_local15 * m_u.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16)))); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17)); _local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); } } }//package Box2D.Dynamics.Joints
Section 49
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2DistanceJointDef extends b2JointDef { public var length:Number; public var dampingRatio:Number; public var frequencyHz:Number; public var localAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public function b2DistanceJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; length = 1; frequencyHz = 0; dampingRatio = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ var _local5:Number; var _local6:Number; body1 = _arg1; body2 = _arg2; localAnchor1.SetV(body1.GetLocalPoint(_arg3)); localAnchor2.SetV(body2.GetLocalPoint(_arg4)); _local5 = (_arg4.x - _arg3.x); _local6 = (_arg4.y - _arg3.y); length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6))); frequencyHz = 0; dampingRatio = 0; } } }//package Box2D.Dynamics.Joints
Section 50
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2GearJoint extends b2Joint { public var m_force:Number; public var m_mass:Number; public var m_prismatic1:b2PrismaticJoint; public var m_prismatic2:b2PrismaticJoint; public var m_ground1:b2Body; public var m_ground2:b2Body; public var m_constant:Number; public var m_revolute1:b2RevoluteJoint; public var m_revolute2:b2RevoluteJoint; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_J:b2Jacobian; public function b2GearJoint(_arg1:b2GearJointDef){ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_J = new b2Jacobian(); super(_arg1); _local2 = _arg1.joint1.m_type; _local3 = _arg1.joint2.m_type; m_revolute1 = null; m_prismatic1 = null; m_revolute2 = null; m_prismatic2 = null; m_ground1 = _arg1.joint1.m_body1; m_body1 = _arg1.joint1.m_body2; if (_local2 == b2Joint.e_revoluteJoint){ m_revolute1 = (_arg1.joint1 as b2RevoluteJoint); m_groundAnchor1.SetV(m_revolute1.m_localAnchor1); m_localAnchor1.SetV(m_revolute1.m_localAnchor2); _local4 = m_revolute1.GetJointAngle(); } else { m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint); m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1); m_localAnchor1.SetV(m_prismatic1.m_localAnchor2); _local4 = m_prismatic1.GetJointTranslation(); }; m_ground2 = _arg1.joint2.m_body1; m_body2 = _arg1.joint2.m_body2; if (_local3 == b2Joint.e_revoluteJoint){ m_revolute2 = (_arg1.joint2 as b2RevoluteJoint); m_groundAnchor2.SetV(m_revolute2.m_localAnchor1); m_localAnchor2.SetV(m_revolute2.m_localAnchor2); _local5 = m_revolute2.GetJointAngle(); } else { m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint); m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1); m_localAnchor2.SetV(m_prismatic2.m_localAnchor2); _local5 = m_prismatic2.GetJointTranslation(); }; m_ratio = _arg1.ratio; m_constant = (_local4 + (m_ratio * _local5)); m_force = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = new b2Vec2((m_force * m_J.linear2.x), (m_force * m_J.linear2.y)); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local1 = 0; _local2 = m_body1; _local3 = m_body2; if (m_revolute1){ _local4 = m_revolute1.GetJointAngle(); } else { _local4 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local5 = m_revolute2.GetJointAngle(); } else { _local5 = m_prismatic2.GetJointTranslation(); }; _local6 = (m_constant - (_local4 + (m_ratio * _local5))); _local7 = (-(m_mass) * _local6); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + ((_local2.m_invMass * _local7) * m_J.linear1.x)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * m_J.linear1.y)); _local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * m_J.angular1)); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * m_J.linear2.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * m_J.linear2.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * m_J.angular2)); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); return ((_local1 < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; _local2 = m_ground1; _local3 = m_ground2; _local4 = m_body1; _local5 = m_body2; _local14 = 0; m_J.SetZero(); if (m_revolute1){ m_J.angular1 = -1; _local14 = (_local14 + _local4.m_invI); } else { _local10 = _local2.m_xf.R; _local11 = m_prismatic1.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local4.m_xf.R; _local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linear1.Set(-(_local6), -(_local7)); m_J.angular1 = -(_local12); _local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12))); }; if (m_revolute2){ m_J.angular2 = -(m_ratio); _local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI)); } else { _local10 = _local3.m_xf.R; _local11 = m_prismatic2.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7)); m_J.angular2 = (-(m_ratio) * _local12); _local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12)))); }; m_mass = (1 / _local14); if (_arg1.warmStarting){ _local15 = (_arg1.dt * m_force); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * m_J.linear1.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * m_J.linear1.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * m_J.angular1)); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * m_J.linear2.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * m_J.linear2.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * m_J.angular2)); } else { m_force = 0; }; } override public function GetReactionTorque():Number{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; _local1 = m_body2.m_xf.R; _local2 = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x); _local3 = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y); _local4 = ((_local1.col1.x * _local2) + (_local1.col2.x * _local3)); _local3 = ((_local1.col1.y * _local2) + (_local1.col2.y * _local3)); _local2 = _local4; _local4 = ((m_force * m_J.angular2) - ((_local2 * (m_force * m_J.linear2.y)) - (_local3 * (m_force * m_J.linear2.x)))); return (_local4); } public function GetRatio():Number{ return (m_ratio); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = m_body1; _local3 = m_body2; _local4 = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local5 = ((-(_arg1.inv_dt) * m_mass) * _local4); m_force = (m_force + _local5); _local6 = (_arg1.dt * _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local6) * m_J.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * m_J.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * m_J.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * m_J.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * m_J.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * m_J.angular2)); } } }//package Box2D.Dynamics.Joints
Section 51
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2GearJointDef extends b2JointDef { public var joint2:b2Joint; public var joint1:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 52
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var linear1:b2Vec2; public var linear2:b2Vec2; public var angular2:Number; public var angular1:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linear1.SetV(_arg1); angular1 = _arg2; linear2.SetV(_arg3); angular2 = _arg4; } public function SetZero():void{ linear1.SetZero(); angular1 = 0; linear2.SetZero(); angular2 = 0; } public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{ return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4))); } } }//package Box2D.Dynamics.Joints
Section 53
//b2Joint (Box2D.Dynamics.Joints.b2Joint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2Joint { public var m_islandFlag:Boolean; public var m_body1:b2Body; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_type:int; public var m_collideConnected:Boolean; public var m_node1:b2JointEdge; public var m_node2:b2JointEdge; public var m_inv_dt:Number; public var m_userData; public var m_body2:b2Body; public static const e_unknownJoint:int = 0; public static const e_inactiveLimit:int = 0; public static const e_atUpperLimit:int = 2; public static const e_atLowerLimit:int = 1; public static const e_gearJoint:int = 6; public static const e_revoluteJoint:int = 1; public static const e_equalLimits:int = 3; public static const e_distanceJoint:int = 3; public static const e_pulleyJoint:int = 4; public static const e_prismaticJoint:int = 2; public static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_node1 = new b2JointEdge(); m_node2 = new b2JointEdge(); super(); m_type = _arg1.type; m_prev = null; m_next = null; m_body1 = _arg1.body1; m_body2 = _arg1.body2; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function GetType():int{ return (m_type); } public function GetBody2():b2Body{ return (m_body2); } public function GetNext():b2Joint{ return (m_next); } public function GetReactionTorque():Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce():b2Vec2{ return (null); } public function SolvePositionConstraints():Boolean{ return (false); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetBody1():b2Body{ return (m_body1); } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public function InitPositionConstraints():void{ } public static function Destroy(_arg1:b2Joint, _arg2):void{ } public static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; _local3 = null; switch (_arg1.type){ case e_distanceJoint: _local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef)); break; case e_mouseJoint: _local3 = new b2MouseJoint((_arg1 as b2MouseJointDef)); break; case e_prismaticJoint: _local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef)); break; case e_revoluteJoint: _local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef)); break; case e_pulleyJoint: _local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef)); break; case e_gearJoint: _local3 = new b2GearJoint((_arg1 as b2GearJointDef)); break; default: break; }; return (_local3); } } }//package Box2D.Dynamics.Joints
Section 54
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2JointDef { public var collideConnected:Boolean; public var body1:b2Body; public var body2:b2Body; public var userData; public var type:int; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 55
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointEdge { public var joint:b2Joint; public var other:b2Body; public var next:b2JointEdge; public var prev:b2JointEdge; } }//package Box2D.Dynamics.Joints
Section 56
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { public var m_beta:Number; public var m_mass:b2Mat22; public var m_target:b2Vec2; public var m_impulse:b2Vec2; public var m_localAnchor:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K:b2Mat22; public var m_gamma:Number; public var m_C:b2Vec2; public var m_maxForce:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local2:Number; var _local3:Number; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); m_localAnchor = new b2Vec2(); m_target = new b2Vec2(); m_impulse = new b2Vec2(); m_mass = new b2Mat22(); m_C = new b2Vec2(); super(_arg1); m_target.SetV(_arg1.target); _local2 = (m_target.x - m_body2.m_xf.position.x); _local3 = (m_target.y - m_body2.m_xf.position.y); _local4 = m_body2.m_xf.R; m_localAnchor.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y)); m_localAnchor.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y)); m_maxForce = _arg1.maxForce; m_impulse.SetZero(); _local5 = m_body2.m_mass; _local6 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); _local7 = (((2 * _local5) * _arg1.dampingRatio) * _local6); _local8 = ((_arg1.timeStep * _local5) * (_local6 * _local6)); m_gamma = (1 / (_local7 + _local8)); m_beta = (_local8 / (_local7 + _local8)); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor)); } override public function GetReactionForce():b2Vec2{ return (m_impulse); } override public function SolvePositionConstraints():Boolean{ return (true); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local2 = m_body2; _local3 = _local2.m_xf.R; _local4 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local5 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local7 = _local2.m_invMass; _local8 = _local2.m_invI; K1.col1.x = _local7; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local7; K2.col1.x = ((_local8 * _local5) * _local5); K2.col2.x = ((-(_local8) * _local4) * _local5); K2.col1.y = ((-(_local8) * _local4) * _local5); K2.col2.y = ((_local8 * _local4) * _local4); K.SetM(K1); K.AddM(K2); K.col1.x = (K.col1.x + m_gamma); K.col2.y = (K.col2.y + m_gamma); K.Invert(m_mass); m_C.x = ((_local2.m_sweep.c.x + _local4) - m_target.x); m_C.y = ((_local2.m_sweep.c.y + _local5) - m_target.y); _local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98); _local9 = (_arg1.dt * m_impulse.x); _local10 = (_arg1.dt * m_impulse.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local7 * _local9)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local7 * _local10)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local8 * ((_local4 * _local10) - (_local5 * _local9)))); } override public function GetReactionTorque():Number{ return (0); } public function SetTarget(_arg1:b2Vec2):void{ if (m_body2.IsSleeping()){ m_body2.WakeUp(); }; m_target = _arg1; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local2 = m_body2; _local3 = _local2.m_xf.R; _local6 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7)); _local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7)); _local6 = _local4; _local8 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7)); _local9 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6)); _local3 = m_mass; _local4 = ((_local8 + ((m_beta * _arg1.inv_dt) * m_C.x)) + ((m_gamma * _arg1.dt) * m_impulse.x)); _local5 = ((_local9 + ((m_beta * _arg1.inv_dt) * m_C.y)) + ((m_gamma * _arg1.dt) * m_impulse.y)); _local10 = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5))); _local11 = (-(_arg1.inv_dt) * ((_local3.col1.y * _local4) + (_local3.col2.y * _local5))); _local12 = m_impulse.x; _local13 = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); _local14 = m_impulse.Length(); if (_local14 > m_maxForce){ m_impulse.Multiply((m_maxForce / _local14)); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local15 = (_arg1.dt * _local10); _local16 = (_arg1.dt * _local11); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15)))); } } }//package Box2D.Dynamics.Joints
Section 57
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var frequencyHz:Number; public var dampingRatio:Number; public var maxForce:Number; public var target:b2Vec2; public var timeStep:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; timeStep = (1 / 60); } } }//package Box2D.Dynamics.Joints
Section 58
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PrismaticJoint extends b2Joint { public var m_limitForce:Number; public var m_refAngle:Number; public var m_lowerTranslation:Number; public var m_localXAxis1:b2Vec2; public var m_torque:Number; public var m_enableLimit:Boolean; public var m_motorForce:Number; public var m_force:Number; public var m_localYAxis1:b2Vec2; public var m_motorMass:Number; public var m_maxMotorForce:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_angularMass:Number; public var m_limitState:int; public var m_linearMass:Number; public var m_upperTranslation:Number; public var m_motorJacobian:b2Jacobian; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_linearJacobian:b2Jacobian; public var m_enableMotor:Boolean; public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_localXAxis1 = new b2Vec2(); m_localYAxis1 = new b2Vec2(); m_linearJacobian = new b2Jacobian(); m_motorJacobian = new b2Jacobian(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_localXAxis1.SetV(_arg1.localAxis1); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_refAngle = _arg1.referenceAngle; m_linearJacobian.SetZero(); m_linearMass = 0; m_force = 0; m_angularMass = 0; m_torque = 0; m_motorJacobian.SetZero(); m_motorMass = 0; m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 0; m_lowerTranslation = _arg1.lowerTranslation; m_upperTranslation = _arg1.upperTranslation; m_maxMotorForce = _arg1.maxMotorForce; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetLowerLimit():Number{ return (m_lowerTranslation); } public function GetJointTranslation():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:b2Vec2; var _local9:Number; _local1 = m_body1; _local2 = m_body2; _local4 = _local1.GetWorldPoint(m_localAnchor1); _local5 = _local2.GetWorldPoint(m_localAnchor2); _local6 = (_local5.x - _local4.x); _local7 = (_local5.y - _local4.y); _local8 = _local1.GetWorldVector(m_localXAxis1); _local9 = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.m_xf.R; _local2 = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y))); _local3 = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y))); _local4 = (m_force * ((_local1.col1.x * m_localYAxis1.x) + (_local1.col2.x * m_localYAxis1.y))); _local5 = (m_force * ((_local1.col1.y * m_localYAxis1.x) + (_local1.col2.y * m_localYAxis1.y))); return (new b2Vec2(((m_limitForce * _local2) + (m_force * _local4)), ((m_limitForce * _local3) + (m_force * _local5)))); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; _local3 = m_body1; _local4 = m_body2; _local5 = _local3.m_invMass; _local6 = _local4.m_invMass; _local7 = _local3.m_invI; _local8 = _local4.m_invI; _local9 = _local3.m_xf.R; _local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12)); _local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12)); _local11 = _local10; _local9 = _local4.m_xf.R; _local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local21 = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); _local22 = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); _local23 = ((_local21 * _local19) + (_local22 * _local20)); _local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local24 = (-(m_linearMass) * _local23); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) * m_linearJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) * m_linearJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) * m_linearJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) * m_linearJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) * m_linearJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) * m_linearJacobian.angular2)); _local25 = b2Math.b2Abs(_local23); _local26 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_refAngle); _local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local27 = (-(m_angularMass) * _local26); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local27)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local27)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); _local28 = b2Math.b2Abs(_local26); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local9 = _local3.m_xf.R; _local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12)); _local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12)); _local11 = _local10; _local9 = _local4.m_xf.R; _local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y)); _local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y)); _local31 = ((_local29 * _local19) + (_local30 * _local20)); _local32 = 0; if (m_limitState == e_equalLimits){ _local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26)); } else { if (m_limitState == e_atLowerLimit){ _local1 = (_local31 - m_lowerTranslation); _local25 = b2Math.b2Max(_local25, -(_local1)); _local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); } else { if (m_limitState == e_atUpperLimit){ _local1 = (_local31 - m_upperTranslation); _local25 = b2Math.b2Max(_local25, _local1); _local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); }; }; }; _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) * m_motorJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * m_motorJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * m_motorJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * m_motorJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * m_motorJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * m_motorJacobian.angular2)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:b2Vec2; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_xf.R; _local4 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; _local7 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8)); _local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8)); _local7 = _local6; _local9 = (_local1.m_sweep.c.x + _local4); _local10 = (_local1.m_sweep.c.y + _local5); _local11 = (_local2.m_sweep.c.x + _local7); _local12 = (_local2.m_sweep.c.y + _local8); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = _local1.GetWorldVector(m_localXAxis1); _local16 = _local1.m_linearVelocity; _local17 = _local2.m_linearVelocity; _local18 = _local1.m_angularVelocity; _local19 = _local2.m_angularVelocity; _local20 = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local10 = _local2.m_invMass; _local11 = _local3.m_invMass; _local12 = _local2.m_invI; _local13 = _local3.m_invI; _local4 = _local2.m_xf.R; _local14 = ((_local4.col1.x * m_localYAxis1.x) + (_local4.col2.x * m_localYAxis1.y)); _local15 = ((_local4.col1.y * m_localYAxis1.x) + (_local4.col2.y * m_localYAxis1.y)); _local16 = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x); _local17 = ((_local3.m_sweep.c.y + _local9) - _local2.m_sweep.c.y); m_linearJacobian.linear1.x = -(_local14); m_linearJacobian.linear1.y = -(_local15); m_linearJacobian.linear2.x = _local14; m_linearJacobian.linear2.y = _local15; m_linearJacobian.angular1 = -(((_local16 * _local15) - (_local17 * _local14))); m_linearJacobian.angular2 = ((_local8 * _local15) - (_local9 * _local14)); m_linearMass = (((_local10 + ((_local12 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local11) + ((_local13 * m_linearJacobian.angular2) * m_linearJacobian.angular2)); m_linearMass = (1 / m_linearMass); m_angularMass = (_local12 + _local13); if (m_angularMass > Number.MIN_VALUE){ m_angularMass = (1 / m_angularMass); }; if (((m_enableLimit) || (m_enableMotor))){ _local4 = _local2.m_xf.R; _local18 = ((_local4.col1.x * m_localXAxis1.x) + (_local4.col2.x * m_localXAxis1.y)); _local19 = ((_local4.col1.y * m_localXAxis1.x) + (_local4.col2.y * m_localXAxis1.y)); m_motorJacobian.linear1.x = -(_local18); m_motorJacobian.linear1.y = -(_local19); m_motorJacobian.linear2.x = _local18; m_motorJacobian.linear2.y = _local19; m_motorJacobian.angular1 = -(((_local16 * _local19) - (_local17 * _local18))); m_motorJacobian.angular2 = ((_local8 * _local19) - (_local9 * _local18)); m_motorMass = (((_local10 + ((_local12 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local11) + ((_local13 * m_motorJacobian.angular2) * m_motorJacobian.angular2)); m_motorMass = (1 / m_motorMass); if (m_enableLimit){ _local20 = (_local16 - _local6); _local21 = (_local17 - _local7); _local22 = ((_local18 * _local20) + (_local19 * _local21)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local22 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitForce = 0; }; m_limitState = e_atLowerLimit; } else { if (_local22 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitForce = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitForce = 0; }; }; }; }; }; if (m_enableMotor == false){ m_motorForce = 0; }; if (m_enableLimit == false){ m_limitForce = 0; }; if (_arg1.warmStarting){ _local23 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.x))); _local24 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.y))); _local25 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.x))); _local26 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.y))); _local27 = (_arg1.dt * (((m_force * m_linearJacobian.angular1) - m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular1))); _local28 = (_arg1.dt * (((m_force * m_linearJacobian.angular2) + m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular2))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28)); } else { m_force = 0; m_torque = 0; m_limitForce = 0; m_motorForce = 0; }; m_limitPositionImpulse = 0; } public function GetMotorForce():Number{ return (m_motorForce); } public function SetMaxMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } override public function GetReactionTorque():Number{ return (m_torque); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_invMass; _local5 = _local3.m_invMass; _local6 = _local2.m_invI; _local7 = _local3.m_invI; _local9 = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local10 = ((-(_arg1.inv_dt) * m_linearMass) * _local9); m_force = (m_force + _local10); _local11 = (_arg1.dt * _local10); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_linearJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_linearJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_linearJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_linearJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_linearJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_linearJacobian.angular2)); _local12 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local13 = ((-(_arg1.inv_dt) * m_angularMass) * _local12); m_torque = (m_torque + _local13); _local14 = (_arg1.dt * _local13); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local14)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local14)); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local15 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed); _local16 = ((-(_arg1.inv_dt) * m_motorMass) * _local15); _local17 = m_motorForce; m_motorForce = b2Math.b2Clamp((m_motorForce + _local16), -(m_maxMotorForce), m_maxMotorForce); _local16 = (m_motorForce - _local17); _local11 = (_arg1.dt * _local16); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local18 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local19 = ((-(_arg1.inv_dt) * m_motorMass) * _local18); if (m_limitState == e_equalLimits){ m_limitForce = (m_limitForce + _local19); } else { if (m_limitState == e_atLowerLimit){ _local8 = m_limitForce; m_limitForce = b2Math.b2Max((m_limitForce + _local19), 0); _local19 = (m_limitForce - _local8); } else { if (m_limitState == e_atUpperLimit){ _local8 = m_limitForce; m_limitForce = b2Math.b2Min((m_limitForce + _local19), 0); _local19 = (m_limitForce - _local8); }; }; }; _local11 = (_arg1.dt * _local19); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2)); }; } } }//package Box2D.Dynamics.Joints
Section 59
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var localAxis1:b2Vec2; public var referenceAngle:Number; public var maxMotorForce:Number; public var motorSpeed:Number; public var upperTranslation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public var lowerTranslation:Number; public function b2PrismaticJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); localAxis1 = new b2Vec2(); super(); type = b2Joint.e_prismaticJoint; localAxis1.Set(1, 0); referenceAngle = 0; enableLimit = false; lowerTranslation = 0; upperTranslation = 0; enableMotor = false; maxMotorForce = 0; motorSpeed = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); localAxis1 = body1.GetLocalVector(_arg4); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 60
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PulleyJoint extends b2Joint { public var m_ground:b2Body; public var m_maxLength2:Number; public var m_limitForce1:Number; public var m_maxLength1:Number; public var m_limitState1:int; public var m_limitState2:int; public var m_limitPositionImpulse2:Number; public var m_force:Number; public var m_limitPositionImpulse1:Number; public var m_constant:Number; public var m_state:int; public var m_ratio:Number; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_positionImpulse:Number; public var m_limitMass2:Number; public var m_limitMass1:Number; public var m_pulleyMass:Number; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_limitForce2:Number; public static const b2_minPulleyLength:Number = 2; public function b2PulleyJoint(_arg1:b2PulleyJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u1 = new b2Vec2(); m_u2 = new b2Vec2(); super(_arg1); m_ground = m_body1.m_world.m_groundBody; m_groundAnchor1.x = (_arg1.groundAnchor1.x - m_ground.m_xf.position.x); m_groundAnchor1.y = (_arg1.groundAnchor1.y - m_ground.m_xf.position.y); m_groundAnchor2.x = (_arg1.groundAnchor2.x - m_ground.m_xf.position.x); m_groundAnchor2.y = (_arg1.groundAnchor2.y - m_ground.m_xf.position.y); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_ratio = _arg1.ratio; m_constant = (_arg1.length1 + (m_ratio * _arg1.length2)); m_maxLength1 = b2Math.b2Min(_arg1.maxLength1, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.b2Min(_arg1.maxLength2, ((m_constant - b2_minPulleyLength) / m_ratio)); m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; } public function GetGroundAnchor2():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor2); return (_local1); } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = m_u2.Copy(); _local1.Multiply(m_force); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; _local1 = m_body1; _local2 = m_body2; _local4 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local5 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local6 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local7 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local23 = 0; if (m_state == e_atUpperLimit){ _local3 = _local1.m_xf.R; _local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9)); _local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9)); _local8 = _local22; _local3 = _local2.m_xf.R; _local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local12 = (_local1.m_sweep.c.x + _local8); _local13 = (_local1.m_sweep.c.y + _local9); _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u1.Set((_local12 - _local4), (_local13 - _local5)); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local16 = m_u1.Length(); _local17 = m_u2.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local16)); } else { m_u1.SetZero(); }; if (_local17 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local17)); } else { m_u2.SetZero(); }; _local18 = ((m_constant - _local16) - (m_ratio * _local17)); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_pulleyMass) * _local18); _local20 = m_positionImpulse; m_positionImpulse = b2Math.b2Max(0, (m_positionImpulse + _local19)); _local19 = (m_positionImpulse - _local20); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local14 = ((-(m_ratio) * _local19) * m_u2.x); _local15 = ((-(m_ratio) * _local19) * m_u2.y); _local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12)); _local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13)); _local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local1.SynchronizeTransform(); _local2.SynchronizeTransform(); }; if (m_limitState1 == e_atUpperLimit){ _local3 = _local1.m_xf.R; _local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9)); _local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9)); _local8 = _local22; _local12 = (_local1.m_sweep.c.x + _local8); _local13 = (_local1.m_sweep.c.y + _local9); m_u1.Set((_local12 - _local4), (_local13 - _local5)); _local16 = m_u1.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.x = (m_u1.x * (1 / _local16)); m_u1.y = (m_u1.y * (1 / _local16)); } else { m_u1.SetZero(); }; _local18 = (m_maxLength1 - _local16); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass1) * _local18); _local21 = m_limitPositionImpulse1; m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19)); _local19 = (m_limitPositionImpulse1 - _local21); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12)); _local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13)); _local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local1.SynchronizeTransform(); }; if (m_limitState2 == e_atUpperLimit){ _local3 = _local2.m_xf.R; _local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local17 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local17)); m_u2.y = (m_u2.y * (1 / _local17)); } else { m_u2.SetZero(); }; _local18 = (m_maxLength2 - _local17); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass2) * _local18); _local21 = m_limitPositionImpulse2; m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19)); _local19 = (m_limitPositionImpulse2 - _local21); _local14 = (-(_local19) * m_u2.x); _local15 = (-(_local19) * m_u2.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local2.SynchronizeTransform(); }; return ((_local23 < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; _local10 = (_local2.m_sweep.c.x + _local5); _local11 = (_local2.m_sweep.c.y + _local6); _local12 = (_local3.m_sweep.c.x + _local8); _local13 = (_local3.m_sweep.c.y + _local9); _local14 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local15 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local16 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local17 = (m_ground.m_xf.position.y + m_groundAnchor2.y); m_u1.Set((_local10 - _local14), (_local11 - _local15)); m_u2.Set((_local12 - _local16), (_local13 - _local17)); _local18 = m_u1.Length(); _local19 = m_u2.Length(); if (_local18 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local18)); } else { m_u1.SetZero(); }; if (_local19 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local19)); } else { m_u2.SetZero(); }; _local20 = ((m_constant - _local18) - (m_ratio * _local19)); if (_local20 > 0){ m_state = e_inactiveLimit; m_force = 0; } else { m_state = e_atUpperLimit; m_positionImpulse = 0; }; if (_local18 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitForce1 = 0; } else { m_limitState1 = e_atUpperLimit; m_limitPositionImpulse1 = 0; }; if (_local19 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitForce2 = 0; } else { m_limitState2 = e_atUpperLimit; m_limitPositionImpulse2 = 0; }; _local21 = ((_local5 * m_u1.y) - (_local6 * m_u1.x)); _local22 = ((_local8 * m_u2.y) - (_local9 * m_u2.x)); m_limitMass1 = (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21)); m_limitMass2 = (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22)); m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2)); m_limitMass1 = (1 / m_limitMass1); m_limitMass2 = (1 / m_limitMass2); m_pulleyMass = (1 / m_pulleyMass); if (_arg1.warmStarting){ _local23 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.x); _local24 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.y); _local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.x); _local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25)))); } else { m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; }; } override public function GetReactionTorque():Number{ return (0); } public function GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body2.GetWorldPoint(m_localAnchor2); _local2 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local3 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local4 = (_local1.x - _local2); _local5 = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; if (m_state == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13)))); _local19 = ((-(_arg1.inv_dt) * m_pulleyMass) * _local18); _local20 = m_force; m_force = b2Math.b2Max(0, (m_force + _local19)); _local19 = (m_force - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local16 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.x); _local17 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; if (m_limitState1 == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local18 = -(((m_u1.x * _local10) + (m_u1.y * _local11))); _local19 = ((-(_arg1.inv_dt) * m_limitMass1) * _local18); _local20 = m_limitForce1; m_limitForce1 = b2Math.b2Max(0, (m_limitForce1 + _local19)); _local19 = (m_limitForce1 - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); }; if (m_limitState2 == e_atUpperLimit){ _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = -(((m_u2.x * _local12) + (m_u2.y * _local13))); _local19 = ((-(_arg1.inv_dt) * m_limitMass2) * _local18); _local20 = m_limitForce2; m_limitForce2 = b2Math.b2Max(0, (m_limitForce2 + _local19)); _local19 = (m_limitForce2 - _local20); _local16 = ((-(_arg1.dt) * _local19) * m_u2.x); _local17 = ((-(_arg1.dt) * _local19) * m_u2.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; } public function GetLength1():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.GetWorldPoint(m_localAnchor1); _local2 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local3 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local4 = (_local1.x - _local2); _local5 = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } public function GetGroundAnchor1():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } } }//package Box2D.Dynamics.Joints
Section 61
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength2:Number; public var length1:Number; public var length2:Number; public var maxLength1:Number; public var ratio:Number; public var groundAnchor1:b2Vec2; public var groundAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public function b2PulleyJointDef(){ groundAnchor1 = new b2Vec2(); groundAnchor2 = new b2Vec2(); localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundAnchor1.Set(-1, 1); groundAnchor2.Set(1, 1); localAnchor1.Set(-1, 0); localAnchor2.Set(1, 0); length1 = 0; maxLength1 = 0; length2 = 0; maxLength2 = 0; ratio = 1; collideConnected = true; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; body1 = _arg1; body2 = _arg2; groundAnchor1.SetV(_arg3); groundAnchor2.SetV(_arg4); localAnchor1 = body1.GetLocalPoint(_arg5); localAnchor2 = body2.GetLocalPoint(_arg6); _local8 = (_arg5.x - _arg3.x); _local9 = (_arg5.y - _arg3.y); length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local10 = (_arg6.x - _arg4.x); _local11 = (_arg6.y - _arg4.y); length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; _local12 = (length1 + (ratio * length2)); maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 62
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { public var m_limitForce:Number; public var m_motorForce:Number; public var m_pivotMass:b2Mat22; public var m_enableLimit:Boolean; public var m_limitState:int; public var m_motorMass:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; private var K:b2Mat22; public var m_pivotForce:b2Vec2; public var m_motorSpeed:Number; public var m_enableMotor:Boolean; public var m_limitPositionImpulse:Number; public var m_maxMotorTorque:Number; public var m_referenceAngle:Number; public var m_lowerAngle:Number; public var m_upperAngle:Number; public static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_pivotForce = new b2Vec2(); m_pivotMass = new b2Mat22(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_referenceAngle = _arg1.referenceAngle; m_pivotForce.Set(0, 0); m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 0; m_lowerAngle = _arg1.lowerAngle; m_upperAngle = _arg1.upperAngle; m_maxMotorTorque = _arg1.maxMotorTorque; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetUpperLimit():Number{ return (m_upperAngle); } public function GetLowerLimit():Number{ return (m_lowerAngle); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ return (m_pivotForce); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local3 = m_body1; _local4 = m_body2; _local5 = 0; _local6 = _local3.m_xf.R; _local7 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local8 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local9 = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8)); _local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8)); _local7 = _local9; _local6 = _local4.m_xf.R; _local10 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local9 = ((_local6.col1.x * _local10) + (_local6.col2.x * _local11)); _local11 = ((_local6.col1.y * _local10) + (_local6.col2.y * _local11)); _local10 = _local9; _local12 = (_local3.m_sweep.c.x + _local7); _local13 = (_local3.m_sweep.c.y + _local8); _local14 = (_local4.m_sweep.c.x + _local10); _local15 = (_local4.m_sweep.c.y + _local11); _local16 = (_local14 - _local12); _local17 = (_local15 - _local13); _local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17))); _local18 = _local3.m_invMass; _local19 = _local4.m_invMass; _local20 = _local3.m_invI; _local21 = _local4.m_invI; K1.col1.x = (_local18 + _local19); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local18 + _local19); K2.col1.x = ((_local20 * _local8) * _local8); K2.col2.x = ((-(_local20) * _local7) * _local8); K2.col1.y = ((-(_local20) * _local7) * _local8); K2.col2.y = ((_local20 * _local7) * _local7); K3.col1.x = ((_local21 * _local11) * _local11); K3.col2.x = ((-(_local21) * _local10) * _local11); K3.col1.y = ((-(_local21) * _local10) * _local11); K3.col2.y = ((_local21 * _local10) * _local10); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local16), -(_local17)); _local22 = tImpulse.x; _local23 = tImpulse.y; _local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local22)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local23)); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local7 * _local23) - (_local8 * _local22)))); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local22)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local23)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local10 * _local23) - (_local11 * _local22)))); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); _local24 = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local25 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_referenceAngle); _local26 = 0; if (m_limitState == e_equalLimits){ _local2 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local2); _local24 = b2Math.b2Abs(_local2); } else { if (m_limitState == e_atLowerLimit){ _local2 = (_local25 - m_lowerAngle); _local24 = b2Math.b2Max(0, -(_local2)); _local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local26 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local26), 0); _local26 = (m_limitPositionImpulse - _local1); } else { if (m_limitState == e_atUpperLimit){ _local2 = (_local25 - m_upperAngle); _local24 = b2Math.b2Max(0, _local2); _local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local26), 0); _local26 = (m_limitPositionImpulse - _local1); }; }; }; _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local26)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local26)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local24 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function SetMaxMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetJointAngle():Number{ return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local10 = _local2.m_invMass; _local11 = _local3.m_invMass; _local12 = _local2.m_invI; _local13 = _local3.m_invI; K1.col1.x = (_local10 + _local11); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local10 + _local11); K2.col1.x = ((_local12 * _local7) * _local7); K2.col2.x = ((-(_local12) * _local6) * _local7); K2.col1.y = ((-(_local12) * _local6) * _local7); K2.col2.y = ((_local12 * _local6) * _local6); K3.col1.x = ((_local13 * _local9) * _local9); K3.col2.x = ((-(_local13) * _local8) * _local9); K3.col1.y = ((-(_local13) * _local8) * _local9); K3.col2.y = ((_local13 * _local8) * _local8); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Invert(m_pivotMass); m_motorMass = (1 / (_local12 + _local13)); if (m_enableMotor == false){ m_motorForce = 0; }; if (m_enableLimit){ _local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - m_referenceAngle); if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){ m_limitState = e_equalLimits; } else { if (_local14 <= m_lowerAngle){ if (m_limitState != e_atLowerLimit){ m_limitForce = 0; }; m_limitState = e_atLowerLimit; } else { if (_local14 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_limitForce = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitForce = 0; }; }; }; } else { m_limitForce = 0; }; if (_arg1.warmStarting){ _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * m_pivotForce.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * m_pivotForce.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * m_pivotForce.y) - (_local7 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * m_pivotForce.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * m_pivotForce.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * m_pivotForce.y) - (_local9 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); } else { m_pivotForce.SetZero(); m_motorForce = 0; m_limitForce = 0; }; m_limitPositionImpulse = 0; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } public function GetMotorTorque():Number{ return (m_motorForce); } override public function GetReactionTorque():Number{ return (m_limitForce); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local11 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7)); _local12 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6)); _local13 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.x * _local11) + (m_pivotMass.col2.x * _local12))); _local14 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.y * _local11) + (m_pivotMass.col2.y * _local12))); m_pivotForce.x = (m_pivotForce.x + _local13); m_pivotForce.y = (m_pivotForce.y + _local14); _local15 = (_arg1.dt * _local13); _local16 = (_arg1.dt * _local14); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local16) - (_local9 * _local15)))); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local17 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed); _local18 = ((-(_arg1.inv_dt) * m_motorMass) * _local17); _local19 = m_motorForce; m_motorForce = b2Math.b2Clamp((m_motorForce + _local18), -(m_maxMotorTorque), m_maxMotorTorque); _local18 = (m_motorForce - _local19); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local18)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local18)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local20 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local21 = ((-(_arg1.inv_dt) * m_motorMass) * _local20); if (m_limitState == e_equalLimits){ m_limitForce = (m_limitForce + _local21); } else { if (m_limitState == e_atLowerLimit){ _local10 = m_limitForce; m_limitForce = b2Math.b2Max((m_limitForce + _local21), 0); _local21 = (m_limitForce - _local10); } else { if (m_limitState == e_atUpperLimit){ _local10 = m_limitForce; m_limitForce = b2Math.b2Min((m_limitForce + _local21), 0); _local21 = (m_limitForce - _local10); }; }; }; _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local21)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local21)); }; } } }//package Box2D.Dynamics.Joints
Section 63
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var referenceAngle:Number; public var upperAngle:Number; public var lowerAngle:Number; public var motorSpeed:Number; public var maxMotorTorque:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public function b2RevoluteJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_revoluteJoint; localAnchor1.Set(0, 0); localAnchor2.Set(0, 0); referenceAngle = 0; lowerAngle = 0; upperAngle = 0; maxMotorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 64
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Body { public var ball:Boolean;// = false public var m_contactList:b2ContactEdge; public var m_angularVelocity:Number; public var m_invI:Number; public var typnum;// = "" public var m_xf:b2XForm; public var m_torque:Number; public var m_flags:uint; public var m_linearVelocity:b2Vec2; public var p_typ:String; public var m_world:b2World; public var m_shapeCount:int; public var bw;// = "down" public var tou:Boolean;// = false public var sukaYa;// = false public var m_next:b2Body; public var m_mass:Number; public var typ;// = "typ" public var m_shapeList:b2Shape; public var m_force:b2Vec2; public var m_sweep:b2Sweep; public var m_userData; public var m_invMass:Number; public var spec;// = false public var m_prev:b2Body; public var m_linearDamping:Number; public var m_type:int; public var m_angularDamping:Number; public var mish:Boolean;// = false public var m_sleepTime:Number; public var m_jointList:b2JointEdge; public var m_I:Number; public static var e_fixedRotationFlag:uint = 64; public static var e_frozenFlag:uint = 2; public static var e_maxTypes:uint = 3; public static var e_sleepFlag:uint = 8; private static var s_massData:b2MassData = new b2MassData(); public static var e_bulletFlag:uint = 32; public static var e_staticType:uint = 1; public static var e_islandFlag:uint = 4; public static var e_allowSleepFlag:uint = 16; private static var s_xf1:b2XForm = new b2XForm(); public static var e_dynamicType:uint = 2; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ var _local3:b2Mat22; var _local4:b2Vec2; m_xf = new b2XForm(); m_sweep = new b2Sweep(); m_linearVelocity = new b2Vec2(); m_force = new b2Vec2(); mish = false; tou = false; sukaYa = false; spec = false; typ = "typ"; typnum = ""; bw = "down"; ball = false; super(); m_flags = 0; if (_arg1.isBullet){ m_flags = (m_flags | e_bulletFlag); }; if (_arg1.fixedRotation){ m_flags = (m_flags | e_fixedRotationFlag); }; if (_arg1.allowSleep){ m_flags = (m_flags | e_allowSleepFlag); }; if (_arg1.isSleeping){ m_flags = (m_flags | e_sleepFlag); }; m_world = _arg2; m_xf.position.SetV(_arg1.position); m_xf.R.Set(_arg1.angle); m_sweep.localCenter.SetV(_arg1.massData.center); m_sweep.t0 = 1; m_sweep.a0 = (m_sweep.a = _arg1.angle); _local3 = m_xf.R; _local4 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_jointList = null; m_contactList = null; m_prev = null; m_next = null; m_linearDamping = _arg1.linearDamping; m_angularDamping = _arg1.angularDamping; m_force.Set(0, 0); m_torque = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_sleepTime = 0; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.massData.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.massData.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; m_userData = _arg1.userData; m_shapeList = null; m_shapeCount = 0; } public function SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function SynchronizeTransform():void{ var _local1:b2Mat22; var _local2:b2Vec2; m_xf.R.Set(m_sweep.a); _local1 = m_xf.R; _local2 = m_sweep.localCenter; m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y))); m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y))); } public function 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 SetMassFromShapes():void{ var _local1:b2Shape; var _local2:Number; var _local3:Number; var _local4:b2MassData; var _local5:b2Mat22; var _local6:b2Vec2; var _local7:int; if (m_world.m_lock == true){ return; }; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; _local2 = 0; _local3 = 0; _local4 = s_massData; _local1 = m_shapeList; while (_local1) { _local1.ComputeMass(_local4); m_mass = (m_mass + _local4.mass); _local2 = (_local2 + (_local4.mass * _local4.center.x)); _local3 = (_local3 + (_local4.mass * _local4.center.y)); m_I = (m_I + _local4.I); _local1 = _local1.m_next; }; if (m_mass > 0){ m_invMass = (1 / m_mass); _local2 = (_local2 * m_invMass); _local3 = (_local3 * m_invMass); }; if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){ m_I = (m_I - (m_mass * ((_local2 * _local2) + (_local3 * _local3)))); m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; m_sweep.localCenter.Set(_local2, _local3); _local5 = m_xf.R; _local6 = m_sweep.localCenter; m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y)); m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); _local1 = m_shapeList; while (_local1) { _local1.UpdateSweepRadius(m_sweep.localCenter); _local1 = _local1.m_next; }; _local7 = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local7 != m_type){ _local1 = m_shapeList; while (_local1) { _local1.RefilterProxy(m_world.m_broadPhase, m_xf); _local1 = _local1.m_next; }; }; } public function SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{ var _local3:b2Shape; var _local4:b2Mat22; var _local5:b2Vec2; var _local6:Boolean; var _local7:Boolean; if (m_world.m_lock == true){ return (true); }; if (IsFrozen()){ return (false); }; m_xf.R.Set(_arg2); m_xf.position.SetV(_arg1); _local4 = m_xf.R; _local5 = m_sweep.localCenter; m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y)); m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_sweep.a0 = (m_sweep.a = _arg2); _local6 = false; _local3 = m_shapeList; while (_local3) { _local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf); if (_local7 == false){ _local6 = true; break; }; _local3 = _local3.m_next; }; if (_local6 == true){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local3 = m_shapeList; while (_local3) { _local3.DestroyProxy(m_world.m_broadPhase); _local3 = _local3.m_next; }; return (false); }; m_world.m_broadPhase.Commit(); return (true); } public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; m_force.x = (m_force.x + _arg1.x); m_force.y = (m_force.y + _arg1.y); m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))); } public function SynchronizeShapes():Boolean{ var _local1:b2XForm; var _local2:b2Mat22; var _local3:b2Vec2; var _local4:b2Shape; var _local5:Boolean; _local1 = s_xf1; _local1.R.Set(m_sweep.a0); _local2 = _local1.R; _local3 = m_sweep.localCenter; _local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y))); _local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y))); _local5 = true; _local4 = m_shapeList; while (_local4) { _local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf); if (_local5 == false){ break; }; _local4 = _local4.m_next; }; if (_local5 == false){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local4 = m_shapeList; while (_local4) { _local4.DestroyProxy(m_world.m_broadPhase); _local4 = _local4.m_next; }; return (false); }; return (true); } public function GetAngle():Number{ return (m_sweep.a); } public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22; var _local3:b2Vec2; _local2 = m_xf.R; _local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_local3.x - m_sweep.c.x))))); } public function GetNext():b2Body{ return (m_next); } public function GetMass():Number{ return (m_mass); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } public function GetShapeList():b2Shape{ return (m_shapeList); } public function SetMass(_arg1:b2MassData):void{ var _local2:b2Shape; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:int; if (m_world.m_lock == true){ return; }; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; m_sweep.localCenter.SetV(_arg1.center); _local3 = m_xf.R; _local4 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); _local2 = m_shapeList; while (_local2) { _local2.UpdateSweepRadius(m_sweep.localCenter); _local2 = _local2.m_next; }; _local5 = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local5 != m_type){ _local2 = m_shapeList; while (_local2) { _local2.RefilterProxy(m_world.m_broadPhase, m_xf); _local2 = _local2.m_next; }; }; } public function IsStatic():Boolean{ return ((m_type == e_staticType)); } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_xf.R, _arg1)); } public function Advance(_arg1:Number):void{ m_sweep.Advance(_arg1); m_sweep.c.SetV(m_sweep.c0); m_sweep.a = m_sweep.a0; SynchronizeTransform(); } public function GetUserData(){ return (m_userData); } public function GetWorldCenter():b2Vec2{ return (m_sweep.c); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{ return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_arg1.x - m_sweep.c.x))))); } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } public function GetPosition():b2Vec2{ return (m_xf.position); } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_xf.R, _arg1)); } public function IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsDynamic():Boolean{ return ((m_type == e_dynamicType)); } public function GetInertia():Number{ return (m_I); } public function GetJointList():b2JointEdge{ return (m_jointList); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulXT(m_xf, _arg1)); } 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 IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointEdge; _local2 = m_jointList; while (_local2) { if (_local2.other == _arg1){ return ((_local2.joint.m_collideConnected == false)); }; _local2 = _local2.next; }; return (false); } public function CreateShape(_arg1:b2ShapeDef):b2Shape{ var _local2:b2Shape; if (m_world.m_lock == true){ return (null); }; _local2 = b2Shape.Create(_arg1, m_world.m_blockAllocator); _local2.m_next = m_shapeList; m_shapeList = _local2; m_shapeCount++; _local2.m_body = this; _local2.CreateProxy(m_world.m_broadPhase, m_xf); _local2.UpdateSweepRadius(m_sweep.localCenter); return (_local2); } public function DestroyShape(_arg1:b2Shape):void{ var _local2:b2Shape; var _local3:b2Shape; var _local4:Boolean; if (m_world.m_lock == true){ return; }; _arg1.DestroyProxy(m_world.m_broadPhase); _local2 = m_shapeList; _local3 = null; _local4 = false; while (_local2 != null) { if (_local2 == _arg1){ if (_local3){ _local3.m_next = _arg1.m_next; } else { m_shapeList = _arg1.m_next; }; _local4 = true; break; }; _local3 = _local2; _local2 = _local2.m_next; }; _arg1.m_body = null; _arg1.m_next = null; m_shapeCount--; b2Shape.Destroy(_arg1, m_world.m_blockAllocator); } public function SetBullet(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_bulletFlag); } else { m_flags = (m_flags & ~(e_bulletFlag)); }; } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function ApplyTorque(_arg1:Number):void{ if (IsSleeping()){ WakeUp(); }; m_torque = (m_torque + _arg1); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22; var _local3:b2Vec2; _local2 = m_xf.R; _local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (_local3); } public function GetWorld():b2World{ return (m_world); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } } }//package Box2D.Dynamics
Section 65
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Contacts.*; public class b2BodyDef { public var isSleeping:Boolean; public var position:b2Vec2; public var isBullet:Boolean; public var allowSleep:Boolean; public var userData; public var angularDamping:Number; public var fixedRotation:Boolean; public var angle:Number; public var linearDamping:Number; public var massData:b2MassData; public function b2BodyDef(){ massData = new b2MassData(); position = new b2Vec2(); super(); massData.center.SetZero(); massData.mass = 0; massData.I = 0; userData = null; position.Set(0, 0); angle = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; isSleeping = false; fixedRotation = false; isBullet = false; } } }//package Box2D.Dynamics
Section 66
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 67
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2ContactFilter { public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; var _local5:Boolean; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){ return ((_local3.groupIndex > 0)); }; _local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } } }//package Box2D.Dynamics
Section 68
//b2ContactListener (Box2D.Dynamics.b2ContactListener) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; public class b2ContactListener { public function Add(_arg1:b2ContactPoint):void{ } public function Remove(_arg1:b2ContactPoint):void{ } public function Persist(_arg1:b2ContactPoint):void{ } public function Result(_arg1:b2ContactResult):void{ } } }//package Box2D.Dynamics
Section 69
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_destroyImmediate:Boolean; public var m_nullContact:b2NullContact; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2ContactManager(){ m_nullContact = new b2NullContact(); super(); m_world = null; m_destroyImmediate = false; } override public function PairAdded(_arg1, _arg2){ var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2Contact; _local3 = (_arg1 as b2Shape); _local4 = (_arg2 as b2Shape); _local5 = _local3.m_body; _local6 = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){ return (m_nullContact); }; _local7 = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator); if (_local7 == null){ return (m_nullContact); }; _local3 = _local7.m_shape1; _local4 = _local7.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local7.m_prev = null; _local7.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local7; }; m_world.m_contactList = _local7; _local7.m_node1.contact = _local7; _local7.m_node1.other = _local6; _local7.m_node1.prev = null; _local7.m_node1.next = _local5.m_contactList; if (_local5.m_contactList != null){ _local5.m_contactList.prev = _local7.m_node1; }; _local5.m_contactList = _local7.m_node1; _local7.m_node2.contact = _local7; _local7.m_node2.other = _local5; _local7.m_node2.prev = null; _local7.m_node2.next = _local6.m_contactList; if (_local6.m_contactList != null){ _local6.m_contactList.prev = _local7.m_node2; }; _local6.m_contactList = _local7.m_node2; m_world.m_contactCount++; return (_local7); } override public function PairRemoved(_arg1, _arg2, _arg3):void{ var _local4:b2Contact; if (_arg3 == null){ return; }; _local4 = (_arg3 as b2Contact); if (_local4 == m_nullContact){ return; }; Destroy(_local4); } public function Destroy(_arg1:b2Contact):void{ var _local2:b2Shape; var _local3:b2Shape; var _local4:int; var _local5:b2Body; var _local6:b2Body; var _local7:b2Body; var _local8:b2Body; var _local9:Array; var _local10:b2ContactPoint; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2Vec2; var _local16:b2Vec2; _local2 = _arg1.m_shape1; _local3 = _arg1.m_shape2; _local4 = _arg1.m_manifoldCount; if ((((_local4 > 0)) && (m_world.m_contactListener))){ _local7 = _local2.m_body; _local8 = _local3.m_body; _local9 = _arg1.GetManifolds(); _local10 = s_evalCP; _local10.shape1 = _arg1.m_shape1; _local10.shape2 = _arg1.m_shape1; _local10.friction = _arg1.m_friction; _local10.restitution = _arg1.m_restitution; _local11 = 0; while (_local11 < _local4) { _local12 = _local9[_local11]; _local10.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local10.position = _local7.GetWorldPoint(_local14.localPoint1); _local15 = _local7.GetLinearVelocityFromLocalPoint(_local14.localPoint1); _local16 = _local8.GetLinearVelocityFromLocalPoint(_local14.localPoint2); _local10.velocity.Set((_local16.x - _local15.x), (_local16.y - _local15.y)); _local10.separation = _local14.separation; _local10.id.key = _local14.id._key; m_world.m_contactListener.Remove(_local10); _local13++; }; _local11++; }; }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_world.m_contactList){ m_world.m_contactList = _arg1.m_next; }; _local5 = _local2.m_body; _local6 = _local3.m_body; if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local5.m_contactList){ _local5.m_contactList = _arg1.m_node1.next; }; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local6.m_contactList){ _local6.m_contactList = _arg1.m_node2.next; }; b2Contact.Destroy(_arg1, m_world.m_blockAllocator); m_world.m_contactCount--; } public function Collide():void{ var _local1:b2Contact; var _local2:b2Body; var _local3:b2Body; _local1 = m_world.m_contactList; while (_local1) { _local2 = _local1.m_shape1.m_body; _local3 = _local1.m_shape2.m_body; if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){ } else { _local1.Update(m_world.m_contactListener); }; _local1 = _local1.m_next; }; } } }//package Box2D.Dynamics
Section 70
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; import flash.display.*; public class b2DebugDraw { public var m_xformScale:Number;// = 1 public var m_fillAlpha:Number;// = 1 public var m_alpha:Number;// = 1 public var m_lineThickness:Number;// = 1 public var m_drawFlags:uint; public var m_sprite:Sprite; public var m_drawScale:Number;// = 1 public static var e_coreShapeBit:uint = 4; public static var e_shapeBit:uint = 1; public static var e_centerOfMassBit:uint = 64; public static var e_aabbBit:uint = 8; public static var e_obbBit:uint = 16; public static var e_pairBit:uint = 32; public static var e_jointBit:uint = 2; public function b2DebugDraw(){ m_drawScale = 1; m_lineThickness = 1; m_alpha = 1; m_fillAlpha = 1; m_xformScale = 1; super(); m_drawFlags = 0; } public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ var _local4:int; m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.beginFill(_arg3.color, m_fillAlpha); _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.endFill(); } public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); } public function DrawXForm(_arg1:b2XForm):void{ m_sprite.graphics.lineStyle(m_lineThickness, 0xFF0000, m_alpha); m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col1.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col1.y)) * m_drawScale)); m_sprite.graphics.lineStyle(m_lineThickness, 0xFF00, m_alpha); m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col2.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col2.y)) * m_drawScale)); } public function ClearFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags & ~(_arg1)); } public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg4.color, m_alpha); m_sprite.graphics.moveTo(0, 0); m_sprite.graphics.beginFill(_arg4.color, m_fillAlpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); m_sprite.graphics.endFill(); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * m_drawScale), ((_arg1.y + (_arg3.y * _arg2)) * m_drawScale)); } public function SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } public function AppendFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags | _arg1); } public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo((_arg2.x * m_drawScale), (_arg2.y * m_drawScale)); } public function GetFlags():uint{ return (m_drawFlags); } public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ var _local4:int; m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); } } }//package Box2D.Dynamics
Section 71
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; public class b2DestructionListener { public function SayGoodbyeJoint(_arg1:b2Joint):void{ } public function SayGoodbyeShape(_arg1:b2Shape):void{ } } }//package Box2D.Dynamics
Section 72
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Island { public var m_joints:Array; public var m_listener:b2ContactListener; public var m_positionIterationCount:int; public var m_bodyCapacity:int; public var m_bodies:Array; public var m_jointCapacity:int; public var m_contactCount:int; public var m_contacts:Array; public var m_contactCapacity:int; public var m_jointCount:int; public var m_allocator; public var m_bodyCount:int; private static var s_reportCR:b2ContactResult = new b2ContactResult(); public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){ var _local6:int; super(); m_bodyCapacity = _arg1; m_contactCapacity = _arg2; m_jointCapacity = _arg3; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_allocator = _arg4; m_listener = _arg5; m_bodies = new Array(_arg1); _local6 = 0; while (_local6 < _arg1) { m_bodies[_local6] = null; _local6++; }; m_contacts = new Array(_arg2); _local6 = 0; while (_local6 < _arg2) { m_contacts[_local6] = null; _local6++; }; m_joints = new Array(_arg3); _local6 = 0; while (_local6 < _arg3) { m_joints[_local6] = null; _local6++; }; m_positionIterationCount = 0; } public function AddBody(_arg1:b2Body):void{ var _local2 = m_bodyCount++; m_bodies[_local2] = _arg1; } public function AddJoint(_arg1:b2Joint):void{ var _local2 = m_jointCount++; m_joints[_local2] = _arg1; } public function Report(_arg1:Array):void{ var _local2:b2Mat22; var _local3:b2Vec2; var _local4:int; var _local5:b2Contact; var _local6:b2ContactConstraint; var _local7:b2ContactResult; var _local8:b2Body; var _local9:int; var _local10:Array; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2ContactConstraintPoint; if (m_listener == null){ return; }; _local4 = 0; while (_local4 < m_contactCount) { _local5 = m_contacts[_local4]; _local6 = _arg1[_local4]; _local7 = s_reportCR; _local7.shape1 = _local5.m_shape1; _local7.shape2 = _local5.m_shape2; _local8 = _local7.shape1.m_body; _local9 = _local5.m_manifoldCount; _local10 = _local5.GetManifolds(); _local11 = 0; while (_local11 < _local9) { _local12 = _local10[_local11]; _local7.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local15 = _local6.points[_local13]; _local7.position = _local8.GetWorldPoint(_local14.localPoint1); _local7.normalImpulse = _local15.normalImpulse; _local7.tangentImpulse = _local15.tangentImpulse; _local7.id.key = _local14.id.key; m_listener.Result(_local7); _local13++; }; _local11++; }; _local4++; }; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{ var _local5:int; var _local6:b2Body; var _local7:b2Joint; var _local8:b2ContactSolver; var _local9:*; var _local10:int; var _local11:Boolean; var _local12:Boolean; var _local13:Boolean; var _local14:Number; var _local15:Number; var _local16:Number; _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { if (_local6.bw == "up"){ _local9 = -1; } else { _local9 = 1; }; _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * ((_local9 * _arg2.x) + (_local6.m_invMass * _local6.m_force.x)))); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * ((_local9 * _arg2.y) + (_local6.m_invMass * _local6.m_force.y)))); _local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque)); _local6.m_force.SetZero(); _local6.m_torque = 0; _local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1)); _local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1)); if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){ _local6.m_linearVelocity.Normalize(); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity); }; if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){ if (_local6.m_angularVelocity < 0){ _local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity); } else { _local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity; }; }; }; _local5++; }; _local8 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local8.InitVelocityConstraints(_arg1); _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitVelocityConstraints(_arg1); _local5++; }; _local5 = 0; while (_local5 < _arg1.maxIterations) { _local8.SolveVelocityConstraints(); _local10 = 0; while (_local10 < m_jointCount) { _local7 = m_joints[_local10]; _local7.SolveVelocityConstraints(_arg1); _local10++; }; _local5++; }; _local8.FinalizeVelocityConstraints(); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { _local6.m_sweep.c0.SetV(_local6.m_sweep.c); _local6.m_sweep.a0 = _local6.m_sweep.a; _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y)); _local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity)); _local6.SynchronizeTransform(); }; _local5++; }; if (_arg3){ _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitPositionConstraints(); _local5++; }; m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.maxIterations) { _local11 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local12 = true; _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local13 = _local7.SolvePositionConstraints(); _local12 = ((_local12) && (_local13)); _local5++; }; if (((_local11) && (_local12))){ break; }; m_positionIterationCount++; }; }; Report(_local8.m_constraints); if (_arg4){ _local14 = Number.MAX_VALUE; _local15 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local16 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.m_invMass == 0){ } else { if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){ _local6.m_sleepTime = 0; _local14 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local16)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local15)))){ _local6.m_sleepTime = 0; _local14 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local14 = b2Math.b2Min(_local14, _local6.m_sleepTime); }; }; _local5++; }; if (_local14 >= b2Settings.b2_timeToSleep){ _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag); _local6.m_linearVelocity.SetZero(); _local6.m_angularVelocity = 0; _local5++; }; }; }; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:int; var _local3:b2ContactSolver; var _local4:Number; var _local5:b2Body; var _local6:Boolean; _local3 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local2 = 0; while (_local2 < _arg1.maxIterations) { _local3.SolveVelocityConstraints(); _local2++; }; _local2 = 0; while (_local2 < m_bodyCount) { _local5 = m_bodies[_local2]; if (_local5.IsStatic()){ } else { _local5.m_sweep.c0.SetV(_local5.m_sweep.c); _local5.m_sweep.a0 = _local5.m_sweep.a; _local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_arg1.dt * _local5.m_linearVelocity.x)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_arg1.dt * _local5.m_linearVelocity.y)); _local5.m_sweep.a = (_local5.m_sweep.a + (_arg1.dt * _local5.m_angularVelocity)); _local5.SynchronizeTransform(); }; _local2++; }; _local4 = 0.75; _local2 = 0; while (_local2 < _arg1.maxIterations) { _local6 = _local3.SolvePositionConstraints(_local4); if (_local6){ break; }; _local2++; }; Report(_local3.m_constraints); } } }//package Box2D.Dynamics
Section 73
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var warmStarting:Boolean; public var positionCorrection:Boolean; public var dt:Number; public var maxIterations:int; public var dtRatio:Number; public var inv_dt:Number; } }//package Box2D.Dynamics
Section 74
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2World { public var m_inv_dt0:Number; public var m_boundaryListener:b2BoundaryListener; public var m_contactList:b2Contact; public var m_blockAllocator; public var m_contactListener:b2ContactListener; public var m_allowSleep:Boolean; public var m_broadPhase:b2BroadPhase; public var m_destructionListener:b2DestructionListener; public var m_jointCount:int; public var m_bodyCount:int; public var m_lock:Boolean; public var m_positionIterationCount:int; public var m_groundBody:b2Body; public var m_contactCount:int; public var m_debugDraw:b2DebugDraw; public var m_contactFilter:b2ContactFilter; public var m_bodyList:b2Body; public var m_stackAllocator; public var m_jointList:b2Joint; public var m_gravity:b2Vec2; public var m_contactManager:b2ContactManager; private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); public static var m_continuousPhysics:Boolean; public static var m_warmStarting:Boolean; private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6); public static var m_positionCorrection:Boolean; private static var s_xf:b2XForm = new b2XForm(); public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ var _local4:b2BodyDef; m_contactManager = new b2ContactManager(); super(); m_destructionListener = null; m_boundaryListener = null; m_contactFilter = b2ContactFilter.b2_defaultFilter; m_contactListener = null; m_debugDraw = null; m_bodyList = null; m_contactList = null; m_jointList = null; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_positionCorrection = true; m_warmStarting = true; m_continuousPhysics = true; m_allowSleep = _arg3; m_gravity = _arg2; m_lock = false; m_inv_dt0 = 0; m_contactManager.m_world = this; m_broadPhase = new b2BroadPhase(_arg1, m_contactManager); _local4 = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function DrawJoint(_arg1:b2Joint):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2XForm; var _local5:b2XForm; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Color; var _local11:b2PulleyJoint; var _local12:b2Vec2; var _local13:b2Vec2; _local2 = _arg1.m_body1; _local3 = _arg1.m_body2; _local4 = _local2.m_xf; _local5 = _local3.m_xf; _local6 = _local4.position; _local7 = _local5.position; _local8 = _arg1.GetAnchor1(); _local9 = _arg1.GetAnchor2(); _local10 = s_jointColor; switch (_arg1.m_type){ case b2Joint.e_distanceJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; case b2Joint.e_pulleyJoint: _local11 = (_arg1 as b2PulleyJoint); _local12 = _local11.GetGroundAnchor1(); _local13 = _local11.GetGroundAnchor2(); m_debugDraw.DrawSegment(_local12, _local8, _local10); m_debugDraw.DrawSegment(_local13, _local9, _local10); m_debugDraw.DrawSegment(_local12, _local13, _local10); break; case b2Joint.e_mouseJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; default: if (_local2 != m_groundBody){ m_debugDraw.DrawSegment(_local6, _local8, _local10); }; m_debugDraw.DrawSegment(_local8, _local9, _local10); if (_local3 != m_groundBody){ m_debugDraw.DrawSegment(_local7, _local9, _local10); }; }; } public function Refilter(_arg1:b2Shape):void{ _arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf); } public function SetDebugDraw(_arg1:b2DebugDraw):void{ m_debugDraw = _arg1; } public function SetContinuousPhysics(_arg1:Boolean):void{ m_continuousPhysics = _arg1; } public function GetProxyCount():int{ return (m_broadPhase.m_proxyCount); } public function DrawDebugData():void{ var _local1:uint; var _local2:int; var _local3:b2Body; var _local4:b2Shape; var _local5:b2Joint; var _local6:b2BroadPhase; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Color; var _local11:b2XForm; var _local12:b2AABB; var _local13:b2AABB; var _local14:Array; var _local15:Boolean; var _local16:uint; var _local17:b2Pair; var _local18:b2Proxy; var _local19:b2Proxy; var _local20:b2Vec2; var _local21:b2Vec2; var _local22:b2Proxy; var _local23:b2PolygonShape; var _local24:b2OBB; var _local25:b2Vec2; var _local26:b2Mat22; var _local27:b2Vec2; var _local28:Number; if (m_debugDraw == null){ return; }; m_debugDraw.m_sprite.graphics.clear(); _local1 = m_debugDraw.GetFlags(); _local7 = new b2Vec2(); _local8 = new b2Vec2(); _local9 = new b2Vec2(); _local10 = new b2Color(0, 0, 0); _local12 = new b2AABB(); _local13 = new b2AABB(); _local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()]; if ((_local1 & b2DebugDraw.e_shapeBit)){ _local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local3.IsStatic()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15); } else { if (_local3.IsSleeping()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15); } else { DrawShape(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15); }; }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_jointBit)){ _local5 = m_jointList; while (_local5) { DrawJoint(_local5); _local5 = _local5.m_next; }; }; if ((_local1 & b2DebugDraw.e_pairBit)){ _local6 = m_broadPhase; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.9, 0.3); _local2 = 0; while (_local2 < b2Pair.b2_tableCapacity) { _local16 = _local6.m_pairManager.m_hashTable[_local2]; while (_local16 != b2Pair.b2_nullPair) { _local17 = _local6.m_pairManager.m_pairs[_local16]; _local18 = _local6.m_proxyPool[_local17.proxyId1]; _local19 = _local6.m_proxyPool[_local17.proxyId2]; _local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value)); _local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value)); _local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value)); _local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.upperBounds[1]].value)); _local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.lowerBounds[0]].value)); _local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.lowerBounds[1]].value)); _local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.upperBounds[0]].value)); _local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.upperBounds[1]].value)); _local8.x = (0.5 * (_local12.lowerBound.x + _local12.upperBound.x)); _local8.y = (0.5 * (_local12.lowerBound.y + _local12.upperBound.y)); _local9.x = (0.5 * (_local13.lowerBound.x + _local13.upperBound.x)); _local9.y = (0.5 * (_local13.lowerBound.y + _local13.upperBound.y)); m_debugDraw.DrawSegment(_local8, _local9, _local10); _local16 = _local17.next; }; _local2++; }; }; if ((_local1 & b2DebugDraw.e_aabbBit)){ _local6 = m_broadPhase; _local20 = _local6.m_worldAABB.lowerBound; _local21 = _local6.m_worldAABB.upperBound; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.3, 0.9); _local2 = 0; while (_local2 < b2Settings.b2_maxProxies) { _local22 = _local6.m_proxyPool[_local2]; if (_local22.IsValid() == false){ } else { _local12.lowerBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.lowerBounds[0]].value)); _local12.lowerBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.lowerBounds[1]].value)); _local12.upperBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.upperBounds[0]].value)); _local12.upperBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.upperBounds[1]].value)); _local14[0].Set(_local12.lowerBound.x, _local12.lowerBound.y); _local14[1].Set(_local12.upperBound.x, _local12.lowerBound.y); _local14[2].Set(_local12.upperBound.x, _local12.upperBound.y); _local14[3].Set(_local12.lowerBound.x, _local12.upperBound.y); m_debugDraw.DrawPolygon(_local14, 4, _local10); }; _local2++; }; _local14[0].Set(_local20.x, _local20.y); _local14[1].Set(_local21.x, _local20.y); _local14[2].Set(_local21.x, _local21.y); _local14[3].Set(_local20.x, _local21.y); m_debugDraw.DrawPolygon(_local14, 4, new b2Color(0.3, 0.9, 0.9)); }; if ((_local1 & b2DebugDraw.e_obbBit)){ _local10.Set(0.5, 0.3, 0.5); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local4.m_type != b2Shape.e_polygonShape){ } else { _local23 = (_local4 as b2PolygonShape); _local24 = _local23.GetOBB(); _local25 = _local24.extents; _local14[0].Set(-(_local25.x), -(_local25.y)); _local14[1].Set(_local25.x, -(_local25.y)); _local14[2].Set(_local25.x, _local25.y); _local14[3].Set(-(_local25.x), _local25.y); _local2 = 0; while (_local2 < 4) { _local26 = _local24.R; _local27 = _local14[_local2]; _local28 = (_local24.center.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y))); _local14[_local2].y = (_local24.center.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y))); _local14[_local2].x = _local28; _local26 = _local11.R; _local28 = (_local11.position.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y))); _local14[_local2].y = (_local11.position.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y))); _local14[_local2].x = _local28; _local2++; }; m_debugDraw.DrawPolygon(_local14, 4, _local10); }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_centerOfMassBit)){ _local3 = m_bodyList; while (_local3) { _local11 = s_xf; _local11.R = _local3.m_xf.R; _local11.position = _local3.GetWorldCenter(); m_debugDraw.DrawXForm(_local11); _local3 = _local3.m_next; }; }; } public function DestroyBody(_arg1:b2Body):void{ var _local2:b2JointEdge; var _local3:b2Shape; var _local4:b2JointEdge; var _local5:b2Shape; if (m_lock == true){ return; }; _local2 = _arg1.m_jointList; while (_local2) { _local4 = _local2; _local2 = _local2.next; if (m_destructionListener){ m_destructionListener.SayGoodbyeJoint(_local4.joint); }; DestroyJoint(_local4.joint); }; _local3 = _arg1.m_shapeList; while (_local3) { _local5 = _local3; _local3 = _local3.m_next; if (m_destructionListener){ m_destructionListener.SayGoodbyeShape(_local5); }; _local5.DestroyProxy(m_broadPhase); b2Shape.Destroy(_local5, m_blockAllocator); }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_bodyList){ m_bodyList = _arg1.m_next; }; m_bodyCount--; } public function SetContactFilter(_arg1:b2ContactFilter):void{ m_contactFilter = _arg1; } public function GetGroundBody():b2Body{ return (m_groundBody); } public function DrawShape(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{ var _local5:b2Color; var _local6:b2CircleShape; var _local7:b2Vec2; var _local8:Number; var _local9:b2Vec2; var _local10:int; var _local11:b2PolygonShape; var _local12:int; var _local13:Array; var _local14:Array; var _local15:Array; _local5 = s_coreColor; switch (_arg1.m_type){ case b2Shape.e_circleShape: _local6 = (_arg1 as b2CircleShape); _local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition); _local8 = _local6.m_radius; _local9 = _arg2.R.col1; m_debugDraw.DrawSolidCircle(_local7, _local8, _local9, _arg3); if (_arg4){ m_debugDraw.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5); }; break; case b2Shape.e_polygonShape: _local11 = (_arg1 as b2PolygonShape); _local12 = _local11.GetVertexCount(); _local13 = _local11.GetVertices(); _local14 = new Array(b2Settings.b2_maxPolygonVertices); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]); _local10++; }; m_debugDraw.DrawSolidPolygon(_local14, _local12, _arg3); if (_arg4){ _local15 = _local11.GetCoreVertices(); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]); _local10++; }; m_debugDraw.DrawPolygon(_local14, _local12, _local5); }; break; }; } public function GetContactCount():int{ return (m_contactCount); } public function Solve(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Island; var _local4:b2Contact; var _local5:b2Joint; var _local6:int; var _local7:Array; var _local8:b2Body; var _local9:int; var _local10:int; var _local11:b2Body; var _local12:b2ContactEdge; var _local13:b2JointEdge; var _local14:Boolean; m_positionIterationCount = 0; _local3 = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator, m_contactListener); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2 = _local2.m_next; }; _local4 = m_contactList; while (_local4) { _local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag)); _local4 = _local4.m_next; }; _local5 = m_jointList; while (_local5) { _local5.m_islandFlag = false; _local5 = _local5.m_next; }; _local6 = m_bodyCount; _local7 = new Array(_local6); _local8 = m_bodyList; while (_local8) { if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){ } else { if (_local8.IsStatic()){ } else { _local3.Clear(); _local9 = 0; var _temp1 = _local9; _local9 = (_local9 + 1); var _local15 = _temp1; _local7[_local15] = _local8; _local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag); while (_local9 > 0) { --_local9; _local2 = _local7[_local9]; _local3.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local12 = _local2.m_contactList; while (_local12) { if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){ } else { if (_local12.contact.m_manifoldCount == 0){ } else { _local3.AddContact(_local12.contact); _local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag); _local11 = _local12.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local9; _local9 = (_local9 + 1); var _local16 = _temp2; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; }; _local12 = _local12.next; }; _local13 = _local2.m_jointList; while (_local13) { if (_local13.joint.m_islandFlag == true){ } else { _local3.AddJoint(_local13.joint); _local13.joint.m_islandFlag = true; _local11 = _local13.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local9; _local9 = (_local9 + 1); _local16 = _temp3; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; _local13 = _local13.next; }; }; }; _local3.Solve(_arg1, m_gravity, m_positionCorrection, m_allowSleep); if (_local3.m_positionIterationCount > m_positionIterationCount){ m_positionIterationCount = _local3.m_positionIterationCount; }; _local10 = 0; while (_local10 < _local3.m_bodyCount) { _local2 = _local3.m_bodies[_local10]; if (_local2.IsStatic()){ _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); }; _local10++; }; }; }; _local8 = _local8.m_next; }; _local2 = m_bodyList; while (_local2) { if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local14 = _local2.SynchronizeShapes(); if ((((_local14 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; }; }; _local2 = _local2.m_next; }; m_broadPhase.Commit(); } public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array; var _local5:int; var _local6:int; _local4 = new Array(_arg3); _local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); _local6 = 0; while (_local6 < _local5) { _arg2[_local6] = _local4[_local6]; _local6++; }; return (_local5); } public function SetGravity(_arg1:b2Vec2):void{ m_gravity = _arg1; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactEdge; var _local8:b2Island; var _local9:int; var _local10:Array; var _local11:b2Contact; var _local12:b2Contact; var _local13:Number; var _local14:b2Body; var _local15:int; var _local16:b2TimeStep; var _local17:int; var _local18:Number; var _local19:Number; var _local20:b2Body; var _local21:Boolean; _local8 = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, m_stackAllocator, m_contactListener); _local9 = m_bodyCount; _local10 = new Array(_local9); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2.m_sweep.t0 = 0; _local2 = _local2.m_next; }; _local11 = m_contactList; while (_local11) { _local11.m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local11 = _local11.m_next; }; while (true) { _local12 = null; _local13 = 1; _local11 = m_contactList; for (;_local11;(_local11 = _local11.m_next)) { if ((_local11.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){ } else { _local18 = 1; if ((_local11.m_flags & b2Contact.e_toiFlag)){ _local18 = _local11.m_toi; } else { _local3 = _local11.m_shape1; _local4 = _local11.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){ continue; }; _local19 = _local5.m_sweep.t0; if (_local5.m_sweep.t0 < _local6.m_sweep.t0){ _local19 = _local6.m_sweep.t0; _local5.m_sweep.Advance(_local19); } else { if (_local6.m_sweep.t0 < _local5.m_sweep.t0){ _local19 = _local5.m_sweep.t0; _local6.m_sweep.Advance(_local19); }; }; _local18 = b2TimeOfImpact.TimeOfImpact(_local11.m_shape1, _local5.m_sweep, _local11.m_shape2, _local6.m_sweep); if ((((_local18 > 0)) && ((_local18 < 1)))){ _local18 = (((1 - _local18) * _local19) + _local18); if (_local18 > 1){ _local18 = 1; }; }; _local11.m_toi = _local18; _local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag); }; if ((((Number.MIN_VALUE < _local18)) && ((_local18 < _local13)))){ _local12 = _local11; _local13 = _local18; }; }; }; if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){ break; }; _local3 = _local12.m_shape1; _local4 = _local12.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local5.Advance(_local13); _local6.Advance(_local13); _local12.Update(m_contactListener); _local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag)); if (_local12.m_manifoldCount == 0){ } else { _local14 = _local5; if (_local14.IsStatic()){ _local14 = _local6; }; _local8.Clear(); _local15 = 0; var _temp1 = _local15; _local15 = (_local15 + 1); var _local22 = _temp1; _local10[_local22] = _local14; _local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag); while (_local15 > 0) { --_local15; _local2 = _local10[_local15]; _local8.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local7 = _local2.m_contactList; while (_local7) { if (_local8.m_contactCount == _local8.m_contactCapacity){ } else { if ((_local7.contact.m_flags & ((b2Contact.e_islandFlag | b2Contact.e_slowFlag) | b2Contact.e_nonSolidFlag))){ } else { if (_local7.contact.m_manifoldCount == 0){ } else { _local8.AddContact(_local7.contact); _local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag); _local20 = _local7.other; if ((_local20.m_flags & b2Body.e_islandFlag)){ } else { if (_local20.IsStatic() == false){ _local20.Advance(_local13); _local20.WakeUp(); }; var _temp2 = _local15; _local15 = (_local15 + 1); var _local23 = _temp2; _local10[_local23] = _local20; _local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag); }; }; }; }; _local7 = _local7.next; }; }; }; _local16 = new b2TimeStep(); _local16.dt = ((1 - _local13) * _arg1.dt); _local16.inv_dt = (1 / _local16.dt); _local16.maxIterations = _arg1.maxIterations; _local8.SolveTOI(_local16); _local17 = 0; while (_local17 < _local8.m_bodyCount) { _local2 = _local8.m_bodies[_local17]; _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local21 = _local2.SynchronizeShapes(); if ((((_local21 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; _local7 = _local2.m_contactList; while (_local7) { _local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag)); _local7 = _local7.next; }; }; }; _local17++; }; _local17 = 0; while (_local17 < _local8.m_contactCount) { _local11 = _local8.m_contacts[_local17]; _local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local17++; }; m_broadPhase.Commit(); }; }; } public function GetJointList():b2Joint{ return (m_jointList); } public function Validate():void{ m_broadPhase.Validate(); } public function GetPairCount():int{ return (m_broadPhase.m_pairManager.m_pairCount); } public function GetBodyList():b2Body{ return (m_bodyList); } public function SetWarmStarting(_arg1:Boolean):void{ m_warmStarting = _arg1; } public function SetPositionCorrection(_arg1:Boolean):void{ m_positionCorrection = _arg1; } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local2:b2Joint; var _local3:b2Body; var _local4:b2Shape; _local2 = b2Joint.Create(_arg1, m_blockAllocator); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_node1.joint = _local2; _local2.m_node1.other = _local2.m_body2; _local2.m_node1.prev = null; _local2.m_node1.next = _local2.m_body1.m_jointList; if (_local2.m_body1.m_jointList){ _local2.m_body1.m_jointList.prev = _local2.m_node1; }; _local2.m_body1.m_jointList = _local2.m_node1; _local2.m_node2.joint = _local2; _local2.m_node2.other = _local2.m_body1; _local2.m_node2.prev = null; _local2.m_node2.next = _local2.m_body2.m_jointList; if (_local2.m_body2.m_jointList){ _local2.m_body2.m_jointList.prev = _local2.m_node2; }; _local2.m_body2.m_jointList = _local2.m_node2; if (_arg1.collideConnected == false){ _local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2; _local4 = _local3.m_shapeList; while (_local4) { _local4.RefilterProxy(m_broadPhase, _local3.m_xf); _local4 = _local4.m_next; }; }; return (_local2); } public function DestroyJoint(_arg1:b2Joint):void{ var _local2:Boolean; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:b2Shape; _local2 = _arg1.m_collideConnected; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_jointList){ m_jointList = _arg1.m_next; }; _local3 = _arg1.m_body1; _local4 = _arg1.m_body2; _local3.WakeUp(); _local4.WakeUp(); if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local3.m_jointList){ _local3.m_jointList = _arg1.m_node1.next; }; _arg1.m_node1.prev = null; _arg1.m_node1.next = null; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local4.m_jointList){ _local4.m_jointList = _arg1.m_node2.next; }; _arg1.m_node2.prev = null; _arg1.m_node2.next = null; b2Joint.Destroy(_arg1, m_blockAllocator); m_jointCount--; if (_local2 == false){ _local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4; _local6 = _local5.m_shapeList; while (_local6) { _local6.RefilterProxy(m_broadPhase, _local5.m_xf); _local6 = _local6.m_next; }; }; } public function SetContactListener(_arg1:b2ContactListener):void{ m_contactListener = _arg1; } public function CreateBody(_arg1:b2BodyDef):b2Body{ var _local2:b2Body; if (m_lock == true){ return (null); }; _local2 = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function SetBoundaryListener(_arg1:b2BoundaryListener):void{ m_boundaryListener = _arg1; } public function SetDestructionListener(_arg1:b2DestructionListener):void{ m_destructionListener = _arg1; } public function Step(_arg1:Number, _arg2:int):void{ var _local3:b2TimeStep; m_lock = true; _local3 = new b2TimeStep(); _local3.dt = _arg1; _local3.maxIterations = _arg2; if (_arg1 > 0){ _local3.inv_dt = (1 / _arg1); } else { _local3.inv_dt = 0; }; _local3.dtRatio = (m_inv_dt0 * _arg1); _local3.positionCorrection = m_positionCorrection; _local3.warmStarting = m_warmStarting; m_contactManager.Collide(); if (_local3.dt > 0){ Solve(_local3); }; if (((m_continuousPhysics) && ((_local3.dt > 0)))){ SolveTOI(_local3); }; DrawDebugData(); m_inv_dt0 = _local3.inv_dt; m_lock = false; } public function GetBodyCount():int{ return (m_bodyCount); } public function GetJointCount():int{ return (m_jointCount); } } }//package Box2D.Dynamics
Section 75
//bblogo_4 (bubblebox_submit_score_fla.bblogo_4) package bubblebox_submit_score_fla { import flash.events.*; import flash.display.*; public dynamic class bblogo_4 extends MovieClip { public function bblogo_4(){ addFrameScript(0, frame1); } function frame1(){ this.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){ Main5.goToLink("menu"); }); } } }//package bubblebox_submit_score_fla
Section 76
//bubblebox_saving_5 (bubblebox_submit_score_fla.bubblebox_saving_5) package bubblebox_submit_score_fla { import flash.display.*; public dynamic class bubblebox_saving_5 extends MovieClip { public function bubblebox_saving_5(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package bubblebox_submit_score_fla
Section 77
//bubblebox_send_btn_2 (bubblebox_submit_score_fla.bubblebox_send_btn_2) package bubblebox_submit_score_fla { import flash.events.*; import flash.display.*; public dynamic class bubblebox_send_btn_2 extends MovieClip { public function bubblebox_send_btn_2(){ addFrameScript(0, frame1); } function frame1(){ stop(); this.mouseChildren = false; this.useHandCursor = true; this.buttonMode = true; this.addEventListener(MouseEvent.MOUSE_OVER, function (_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(2); }); this.addEventListener(MouseEvent.MOUSE_OUT, function (_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(1); }); } } }//package bubblebox_submit_score_fla
Section 78
//bubblebox_try_again_10 (bubblebox_submit_score_fla.bubblebox_try_again_10) package bubblebox_submit_score_fla { import flash.events.*; import flash.display.*; public dynamic class bubblebox_try_again_10 extends MovieClip { public function bubblebox_try_again_10(){ addFrameScript(0, frame1); } function frame1(){ stop(); this.mouseChildren = false; this.useHandCursor = true; this.buttonMode = true; this.addEventListener(MouseEvent.MOUSE_OVER, function (_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(2); }); this.addEventListener(MouseEvent.MOUSE_OUT, function (_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(1); }); } } }//package bubblebox_submit_score_fla
Section 79
//bubblebox_view_scores_8 (bubblebox_submit_score_fla.bubblebox_view_scores_8) package bubblebox_submit_score_fla { import flash.events.*; import flash.display.*; public dynamic class bubblebox_view_scores_8 extends MovieClip { public function bubblebox_view_scores_8(){ addFrameScript(0, frame1); } function frame1(){ stop(); this.mouseChildren = false; this.useHandCursor = true; this.buttonMode = true; this.addEventListener(MouseEvent.MOUSE_OVER, function (_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(2); }); this.addEventListener(MouseEvent.MOUSE_OUT, function (_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(1); }); } } }//package bubblebox_submit_score_fla
Section 80
//bubble_logo3_100 (CoverOrange_cpmStar_2_fla.bubble_logo3_100) package CoverOrange_cpmStar_2_fla { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class bubble_logo3_100 extends MovieClip { public function bubble_logo3_100(){ addFrameScript(0, frame1, 9, frame10); } function frame10(){ stop(); } function frame1(){ stop(); } } }//package CoverOrange_cpmStar_2_fla
Section 81
//MainTimeline (CoverOrange_cpmStar_2_fla.MainTimeline) package CoverOrange_cpmStar_2_fla { import flash.events.*; import flash.display.*; import flash.media.*; import CPMStar.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class MainTimeline extends MovieClip { public var informFPv:TextField; public var vers_2:String; public var ad:DisplayObject; public var vers:String; public var button:SimpleButton; public var numVer:String; public var textFild:TextField; public var format:TextFormat; public var k:int; public var arr:Array; public var q:Boolean; public var textFild_2:TextField; public var ploader:MovieClip; public var simv:String; public var adBox; public var nums:String; public var i:int; public var CPMStarContentSpotID:String; public var startPlay:button_start; public var probel:Number; public var urlik:String; public var informFPv_2:TextField; public var numVerNumber:int; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2); } public function play_Batton_click(_arg1:Event=null){ if (q){ removeChild(adBox); }; removeChild(button); button.removeEventListener(MouseEvent.CLICK, play_Batton_click); end(); } function frame1(){ vers = Capabilities.version; if (vers){ textFild = this.informFPv; textFild_2 = this.informFPv_2; format = new TextFormat(); format.underline = true; vers_2 = vers.replace(",", "."); vers_2 = vers_2.replace(",", "."); vers_2 = vers_2.replace(",", "."); vers_2 = vers_2.replace(",", "."); numVer = ""; nums = "0123456789"; k = 0; while (k < vers.length) { simv = vers.substring(k, (k + 1)); if (nums.indexOf(simv) > -1){ numVer = (numVer + simv); simv = vers.substring((k + 1), (k + 2)); if (!(nums.indexOf(simv) > -1)){ break; }; }; k++; }; if (numVer == ""){ numVer = "0"; }; numVerNumber = Number(numVer); probel = vers_2.indexOf(" "); if (probel > -1){ textFild.text = ("For best performance upgrade to the latest Adobe Flash Player version. Your version " + vers_2.substr(probel)); textFild.visible = (numVerNumber < 10); textFild_2.visible = textFild.visible; textFild_2.setTextFormat(format); }; }; arr = ["armorgames.com", "andkon.com", "smart-kit.com", "kongregate.com", "addictinggames.com"]; q = true; urlik = stage.loaderInfo.url; i = 0; while (i < arr.length) { if (urlik.indexOf(arr[i]) > -1){ q = false; break; }; i++; }; stop(); button = this.startPlay; button.visible = false; button.addEventListener(MouseEvent.CLICK, play_Batton_click); addEventListener(Event.ENTER_FRAME, update); if (q){ adBox = new MovieClip(); CPMStarContentSpotID = "1063QDEE9D467"; ad = new AdLoader(CPMStarContentSpotID); adBox.addChild(ad); adBox.graphics.beginFill(0, 1); adBox.graphics.drawRect(0, 0, 300, 250); adBox.x = 170; adBox.y = 70; addChild(adBox); }; } public function play_Batton(_arg1:Event=null){ button.visible = true; removeEventListener(Event.ENTER_FRAME, update); } function frame2(){ stop(); addChild(new Main5()); } public function update(_arg1:Event){ var _local2:Number; _local2 = Math.floor(((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 20)); ploader.gotoAndStop(_local2); if (root.loaderInfo.bytesLoaded >= root.loaderInfo.bytesTotal){ play_Batton(); }; } public function end(_arg1:Event=null){ gotoAndStop(2); } } }//package CoverOrange_cpmStar_2_fla
Section 82
//tank_7 (CoverOrange_cpmStar_2_fla.tank_7) package CoverOrange_cpmStar_2_fla { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class tank_7 extends MovieClip { public var play_latest_text:MovieClip; public function tank_7(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package CoverOrange_cpmStar_2_fla
Section 83
//AdLoader (CPMStar.AdLoader) package CPMStar { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; public class AdLoader extends Sprite { private var contentspotid:String; private var cpmstarLoader:Loader; public function AdLoader(_arg1:String){ this.contentspotid = _arg1; addEventListener(Event.ADDED, addedHandler); } private function addedHandler(_arg1:Event):void{ var _local2:String; var _local3:DisplayObjectContainer; removeEventListener(Event.ADDED, addedHandler); Security.allowDomain("server.cpmstar.com"); _local2 = "http://server.cpmstar.com/adviewas3.swf"; _local3 = parent; cpmstarLoader = new Loader(); cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler); cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler); cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid))); addChild(cpmstarLoader); } private function dispatchHandler(_arg1:Event):void{ dispatchEvent(_arg1); } } }//package CPMStar
Section 84
//anton (anton) package { import flash.display.*; public dynamic class anton extends SimpleButton { } }//package
Section 85
//ay (ay) package { import flash.media.*; public dynamic class ay extends Sound { } }//package
Section 86
//ball (ball) package { import flash.display.*; import flash.text.*; public dynamic class ball extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 87
//blam (blam) package { import flash.media.*; public dynamic class blam extends Sound { } }//package
Section 88
//bomb (bomb) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class bomb extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; public function bomb(){ addFrameScript(0, frame1, 1, frame2, 17, frame18); } function frame18(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 89
//box (box) package { import flash.display.*; import flash.text.*; public dynamic class box extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 90
//bubblebox_logo_ro1 (bubblebox_logo_ro1) package { import flash.display.*; public dynamic class bubblebox_logo_ro1 extends SimpleButton { } }//package
Section 91
//bubblebox_score (bubblebox_score) package { import flash.display.*; import flash.text.*; public dynamic class bubblebox_score extends MovieClip { public var insertname:TextField; } }//package
Section 92
//bubblebox_submit_score (bubblebox_submit_score) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class bubblebox_submit_score extends BubbleboxScores { public var hexArray_chr:Object; public var validWeeklyScore:Object; public var vartext:Object; public var validScore:Object; public function bubblebox_submit_score(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } public function hh(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7)); } public function str2blks_MD5(_arg1){ _arg1 = String(_arg1); nblk = (((_arg1.length + 8) >> 6) + 1); blks = new Array((nblk * 16)); i = 0; while (i < (nblk * 16)) { blks[i] = 0; i++; }; i = 0; while (i < _arg1.length) { blks[(i >> 2)] = (blks[(i >> 2)] | (_arg1.charCodeAt(i) << ((i % 4) * 8))); i++; }; blks[(i >> 2)] = (blks[(i >> 2)] | (128 << ((i % 4) * 8))); blks[((nblk * 16) - 2)] = (_arg1.length * 8); return (blks); } public function ii(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public function cmn(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ return (addme(rol(addme(addme(_arg2, _arg1), addme(_arg4, _arg6)), _arg5), _arg3)); } function frame3(){ this.bubblebox_view_score.addEventListener(MouseEvent.CLICK, function (_arg1:Event){ Main5.goToLink("highscore"); _arg1.target.parent.dispatchEvent(new Event("viewScores")); }); vartext = ""; validScore = true; validWeeklyScore = true; if (isNaN(this.result_scorepos)){ validScore = false; }; if (isNaN(this.result_scorepos)){ validWeeklyScore = false; }; if ((((validScore == true)) && ((this.result_scorepos <= 1000)))){ vartext = (("Congratulations, you're ranked nr " + this.result_scorepos) + " in the alltime highscores!!"); } else { if ((((validWeeklyScore == true)) && ((this.result_weeklyScorepos <= 1000)))){ vartext = (("Congratulations, you're ranked nr " + this.result_weeklyScorepos) + " in the weekly highscores."); } else { vartext = "Sorry, you did not make it into the weekly or alltime top 1000."; }; }; this.postext.text = vartext; } function frame1(){ MathbitAND = function (_arg1, _arg2){ var _local3:*; var _local4:*; _local3 = undefined; _local4 = undefined; if ((((_arg1 < 0)) && ((_arg2 < 0)))){ _local3 = ((_arg1 & 1) & (_arg2 & 1)); _local4 = ((_arg1 >>> 1) & (_arg2 >>> 1)); return (((_local4 << 1) | _local3)); }; return ((_arg1 & _arg2)); }; hexArray_chr = "0123456789abcdef"; String.prototype.MD5 = function (){ var _local1:*; _local1 = this; xArray = str2blks_MD5(_local1); a = 1732584193; b = -271733879; c = -1732584194; d = 271733878; i = 0; while (i < xArray.length) { olda = a; oldb = b; oldc = c; oldd = d; a = ff(a, b, c, d, xArray[(i + 0)], 7, -680876936); d = ff(d, a, b, c, xArray[(i + 1)], 12, -389564586); c = ff(c, d, a, b, xArray[(i + 2)], 17, 606105819); b = ff(b, c, d, a, xArray[(i + 3)], 22, -1044525330); a = ff(a, b, c, d, xArray[(i + 4)], 7, -176418897); d = ff(d, a, b, c, xArray[(i + 5)], 12, 1200080426); c = ff(c, d, a, b, xArray[(i + 6)], 17, -1473231341); b = ff(b, c, d, a, xArray[(i + 7)], 22, -45705983); a = ff(a, b, c, d, xArray[(i + 8)], 7, 1770035416); d = ff(d, a, b, c, xArray[(i + 9)], 12, -1958414417); c = ff(c, d, a, b, xArray[(i + 10)], 17, -42063); b = ff(b, c, d, a, xArray[(i + 11)], 22, -1990404162); a = ff(a, b, c, d, xArray[(i + 12)], 7, 1804603682); d = ff(d, a, b, c, xArray[(i + 13)], 12, -40341101); c = ff(c, d, a, b, xArray[(i + 14)], 17, -1502002290); b = ff(b, c, d, a, xArray[(i + 15)], 22, 1236535329); a = gg(a, b, c, d, xArray[(i + 1)], 5, -165796510); d = gg(d, a, b, c, xArray[(i + 6)], 9, -1069501632); c = gg(c, d, a, b, xArray[(i + 11)], 14, 643717713); b = gg(b, c, d, a, xArray[(i + 0)], 20, -373897302); a = gg(a, b, c, d, xArray[(i + 5)], 5, -701558691); d = gg(d, a, b, c, xArray[(i + 10)], 9, 38016083); c = gg(c, d, a, b, xArray[(i + 15)], 14, -660478335); b = gg(b, c, d, a, xArray[(i + 4)], 20, -405537848); a = gg(a, b, c, d, xArray[(i + 9)], 5, 568446438); d = gg(d, a, b, c, xArray[(i + 14)], 9, -1019803690); c = gg(c, d, a, b, xArray[(i + 3)], 14, -187363961); b = gg(b, c, d, a, xArray[(i + 8)], 20, 1163531501); a = gg(a, b, c, d, xArray[(i + 13)], 5, -1444681467); d = gg(d, a, b, c, xArray[(i + 2)], 9, -51403784); c = gg(c, d, a, b, xArray[(i + 7)], 14, 1735328473); b = gg(b, c, d, a, xArray[(i + 12)], 20, -1926607734); a = hh(a, b, c, d, xArray[(i + 5)], 4, -378558); d = hh(d, a, b, c, xArray[(i + 8)], 11, -2022574463); c = hh(c, d, a, b, xArray[(i + 11)], 16, 1839030562); b = hh(b, c, d, a, xArray[(i + 14)], 23, -35309556); a = hh(a, b, c, d, xArray[(i + 1)], 4, -1530992060); d = hh(d, a, b, c, xArray[(i + 4)], 11, 1272893353); c = hh(c, d, a, b, xArray[(i + 7)], 16, -155497632); b = hh(b, c, d, a, xArray[(i + 10)], 23, -1094730640); a = hh(a, b, c, d, xArray[(i + 13)], 4, 681279174); d = hh(d, a, b, c, xArray[(i + 0)], 11, -358537222); c = hh(c, d, a, b, xArray[(i + 3)], 16, -722521979); b = hh(b, c, d, a, xArray[(i + 6)], 23, 76029189); a = hh(a, b, c, d, xArray[(i + 9)], 4, -640364487); d = hh(d, a, b, c, xArray[(i + 12)], 11, -421815835); c = hh(c, d, a, b, xArray[(i + 15)], 16, 530742520); b = hh(b, c, d, a, xArray[(i + 2)], 23, -995338651); a = ii(a, b, c, d, xArray[(i + 0)], 6, -198630844); d = ii(d, a, b, c, xArray[(i + 7)], 10, 1126891415); c = ii(c, d, a, b, xArray[(i + 14)], 15, -1416354905); b = ii(b, c, d, a, xArray[(i + 5)], 21, -57434055); a = ii(a, b, c, d, xArray[(i + 12)], 6, 1700485571); d = ii(d, a, b, c, xArray[(i + 3)], 10, -1894986606); c = ii(c, d, a, b, xArray[(i + 10)], 15, -1051523); b = ii(b, c, d, a, xArray[(i + 1)], 21, -2054922799); a = ii(a, b, c, d, xArray[(i + 8)], 6, 1873313359); d = ii(d, a, b, c, xArray[(i + 15)], 10, -30611744); c = ii(c, d, a, b, xArray[(i + 6)], 15, -1560198380); b = ii(b, c, d, a, xArray[(i + 13)], 21, 1309151649); a = ii(a, b, c, d, xArray[(i + 4)], 6, -145523070); d = ii(d, a, b, c, xArray[(i + 11)], 10, -1120210379); c = ii(c, d, a, b, xArray[(i + 2)], 15, 718787259); b = ii(b, c, d, a, xArray[(i + 9)], 21, -343485551); a = addme(a, olda); b = addme(b, oldb); c = addme(c, oldc); d = addme(d, oldd); i = (i + 16); }; return ((((rhexArray(a) + rhexArray(b)) + rhexArray(c)) + rhexArray(d))); }; stop(); scoreMc = this; sendBubbleBoxScore = function (_arg1, _arg2:Sprite){ var gameID:*; var root:*; var sendStr:*; var preHashStr:*; var hashStr:*; var data:*; var request:*; var param1 = _arg1; var param2 = _arg2; gameID = param1; root = param2; userData = new URLLoader(); sendStr = ((((gameID + "_") + root.score) + "_") + root.bubblebox_name.text); preHashStr = ((((((((((gameID + "_") + "4234232143214421") + "_") + root.score) + "_") + "2537625476251") + "_") + root.bubblebox_name.text) + "_") + "desleutelistessa"); hashStr = preHashStr.MD5(); data = new URLVariables(((("datastring=" + sendStr) + "&hashstring=") + hashStr)); userData.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:Event){ scoreMc.gotoAndStop("tryagain"); }); userData.addEventListener(Event.COMPLETE, function (_arg1:Event){ var _local2:String; var _local3:Array; var _local4:*; var _local5:*; var _local6:Object; _local2 = null; _local3 = null; _local4 = _arg1.target; _local5 = _local4.data.split("&"); _local6 = {}; for each (_local2 in _local5) { _local3 = _local2.split("="); if (_local3.length == 2){ _local6[_local3[0]] = _local3[1]; }; }; scoreMc.result_scoreID = _local6.id; scoreMc.result_weeklyID = _local6.weekly_id; scoreMc.result_scorepos = _local6.scorepos; scoreMc.result_weeklyScorepos = _local6.weeklyScorepos; scoreMc.gotoAndStop("success"); }); request = new URLRequest("http://www.bubblebox.com/scripts/insertscore2009.php"); request.method = URLRequestMethod.POST; request.data = data; userData.load(request); }; this.send_btn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){ var _local2:*; _local2 = _arg1.target.parent; if (((!((_local2.bubblebox_name.text == "YOUR NAME"))) && ((_local2.bubblebox_name.text.length > 0)))){ sendBubbleBoxScore("1541", _local2); _local2.gotoAndStop("saving"); _local2.dispatchEvent(new Event("sendScores")); }; }); } public function rhexArray(_arg1){ str = ""; j = 0; while (j <= 3) { str = (str + (hexArray_chr.charAt(MathbitAND((_arg1 >> ((j * 8) + 4)), 15)) + hexArray_chr.charAt(MathbitAND((_arg1 >> (j * 8)), 15)))); j++; }; return (str); } function frame4(){ this.try_again.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){ _arg1.currentTarget.parent.gotoAndStop(1); }); } function frame2(){ stop(); } public function ff(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (cmn((MathbitAND(_arg2, _arg3) | MathbitAND(~(_arg2), _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7)); } public function rol(_arg1, _arg2){ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } public function gg(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ return (cmn((MathbitAND(_arg2, _arg4) | MathbitAND(_arg3, ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public function addme(_arg1, _arg2){ var _local3:*; var _local4:*; _local3 = (MathbitAND(_arg1, 0xFFFF) + MathbitAND(_arg2, 0xFFFF)); _local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return ((((((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)) << 16) | MathbitAND(_local3, 0xFFFF))); } } }//package
Section 93
//BubbleboxScores (BubbleboxScores) package { import flash.display.*; public dynamic class BubbleboxScores extends MovieClip { public function setScore(_arg1:Number, _arg2:int):void{ this.bubbleboxGameID = _arg2; this.score = _arg1; this.gotoAndStop(1); } } }//package
Section 94
//bubblknopks_3 (bubblknopks_3) package { import flash.display.*; public dynamic class bubblknopks_3 extends MovieClip { } }//package
Section 95
//bubblknopks_4 (bubblknopks_4) package { import flash.display.*; public dynamic class bubblknopks_4 extends MovieClip { } }//package
Section 96
//bum (bum) package { import flash.media.*; public dynamic class bum extends Sound { } }//package
Section 97
//button_back (button_back) package { import flash.display.*; public dynamic class button_back extends SimpleButton { } }//package
Section 98
//button_credits (button_credits) package { import flash.display.*; public dynamic class button_credits extends SimpleButton { } }//package
Section 99
//button_highscore (button_highscore) package { import flash.display.*; public dynamic class button_highscore extends SimpleButton { } }//package
Section 100
//button_instruction (button_instruction) package { import flash.display.*; public dynamic class button_instruction extends SimpleButton { } }//package
Section 101
//button_levels (button_levels) package { import flash.display.*; public dynamic class button_levels extends SimpleButton { } }//package
Section 102
//button_levels_2 (button_levels_2) package { import flash.display.*; public dynamic class button_levels_2 extends SimpleButton { } }//package
Section 103
//button_liders (button_liders) package { import flash.display.*; public dynamic class button_liders extends SimpleButton { } }//package
Section 104
//button_menu (button_menu) package { import flash.display.*; public dynamic class button_menu extends SimpleButton { } }//package
Section 105
//button_more_games (button_more_games) package { import flash.display.*; public dynamic class button_more_games extends SimpleButton { } }//package
Section 106
//button_Nata (button_Nata) package { import flash.display.*; public dynamic class button_Nata extends SimpleButton { } }//package
Section 107
//button_ok (button_ok) package { import flash.display.*; public dynamic class button_ok extends SimpleButton { } }//package
Section 108
//button_reset (button_reset) package { import flash.display.*; public dynamic class button_reset extends SimpleButton { } }//package
Section 109
//button_solution (button_solution) package { import flash.display.*; public dynamic class button_solution extends SimpleButton { } }//package
Section 110
//button_start (button_start) package { import flash.display.*; public dynamic class button_start extends SimpleButton { } }//package
Section 111
//cancel (cancel) package { import flash.display.*; public dynamic class cancel extends SimpleButton { } }//package
Section 112
//credits (credits) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class credits extends MovieClip { public function credits(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 113
//credits_2 (credits_2) package { import flash.display.*; public dynamic class credits_2 extends MovieClip { public var myjohny_k:Символ7; public var myNata:button_Nata; public var myMax:max; public var butMenu:button_menu; public var mybox:Символ5; public var myAnton:anton; public var bubble_credits:bubblebox_logo_ro1; } }//package
Section 114
//dinElementBOCHKA (dinElementBOCHKA) package { import flash.display.*; import flash.text.*; public dynamic class dinElementBOCHKA extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 115
//dinElementBOCHKA_D (dinElementBOCHKA_D) package { import flash.display.*; import flash.text.*; public dynamic class dinElementBOCHKA_D extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 116
//dinElementBOX_G (dinElementBOX_G) package { import flash.display.*; import flash.text.*; public dynamic class dinElementBOX_G extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 117
//dinElementBOX_V (dinElementBOX_V) package { import flash.display.*; import flash.text.*; public dynamic class dinElementBOX_V extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 118
//dinElementCircle (dinElementCircle) package { import flash.display.*; import flash.text.*; public dynamic class dinElementCircle extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 119
//dverca_din (dverca_din) package { import flash.display.*; import flash.text.*; public dynamic class dverca_din extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 120
//f_1 (f_1) package { import flash.display.*; public dynamic class f_1 extends MovieClip { } }//package
Section 121
//f_2 (f_2) package { import flash.display.*; public dynamic class f_2 extends MovieClip { } }//package
Section 122
//f_3 (f_3) package { import flash.display.*; public dynamic class f_3 extends MovieClip { } }//package
Section 123
//f_4 (f_4) package { import flash.display.*; public dynamic class f_4 extends MovieClip { } }//package
Section 124
//fonMenu (fonMenu) package { import flash.display.*; public dynamic class fonMenu extends MovieClip { } }//package
Section 125
//gvozd_prav (gvozd_prav) package { import flash.display.*; import flash.text.*; public dynamic class gvozd_prav extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 126
//ha_ha (ha_ha) package { import flash.media.*; public dynamic class ha_ha extends Sound { } }//package
Section 127
//hitTestKrug (hitTestKrug) package { import flash.display.*; public dynamic class hitTestKrug extends MovieClip { } }//package
Section 128
//hitTestKvadrat (hitTestKvadrat) package { import flash.display.*; public dynamic class hitTestKvadrat extends MovieClip { } }//package
Section 129
//instruction (instruction) package { import flash.display.*; public dynamic class instruction extends MovieClip { public var butMenu:button_menu; public var bubble_instr:bubblebox_logo_ro1; } }//package
Section 130
//Intro (Intro) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class Intro extends MovieClip { public var play_latest_text:MovieClip; public function Intro(){ addFrameScript(146, frame147); } function frame147(){ stop(); } } }//package
Section 131
//joint (joint) package { import flash.display.*; public dynamic class joint extends MovieClip { } }//package
Section 132
//kacheli_din (kacheli_din) package { import flash.display.*; import flash.text.*; public dynamic class kacheli_din extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 133
//kacheliD_din (kacheliD_din) package { import flash.display.*; import flash.text.*; public dynamic class kacheliD_din extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 134
//kirpich_1 (kirpich_1) package { import flash.display.*; import flash.text.*; public dynamic class kirpich_1 extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 135
//kirpich_2 (kirpich_2) package { import flash.display.*; import flash.text.*; public dynamic class kirpich_2 extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 136
//kirpich_3 (kirpich_3) package { import flash.display.*; import flash.text.*; public dynamic class kirpich_3 extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 137
//kirpich_4 (kirpich_4) package { import flash.display.*; import flash.text.*; public dynamic class kirpich_4 extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 138
//klap (klap) package { import flash.media.*; public dynamic class klap extends Sound { } }//package
Section 139
//kreplenie (kreplenie) package { import flash.display.*; public dynamic class kreplenie extends MovieClip { } }//package
Section 140
//krest_din (krest_din) package { import flash.display.*; import flash.text.*; public dynamic class krest_din extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 141
//krest_stat (krest_stat) package { import flash.display.*; import flash.text.*; public dynamic class krest_stat extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 142
//kryndec (kryndec) package { import flash.media.*; public dynamic class kryndec extends Sound { } }//package
Section 143
//krysha (krysha) package { import flash.display.*; import flash.text.*; public dynamic class krysha extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 144
//kryshaL (kryshaL) package { import flash.display.*; import flash.text.*; public dynamic class kryshaL extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 145
//kryshaR (kryshaR) package { import flash.display.*; import flash.text.*; public dynamic class kryshaR extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 146
//L_1 (L_1) package { import flash.display.*; public dynamic class L_1 extends MovieClip { public var val_1:values; } }//package
Section 147
//L_10 (L_10) package { import flash.display.*; public dynamic class L_10 extends MovieClip { public var val_1:values; } }//package
Section 148
//L_11 (L_11) package { import flash.display.*; public dynamic class L_11 extends MovieClip { public var val_1:values; } }//package
Section 149
//L_12 (L_12) package { import flash.display.*; public dynamic class L_12 extends MovieClip { public var val_1:values; public var val_2:values; } }//package
Section 150
//L_13 (L_13) package { import flash.display.*; public dynamic class L_13 extends MovieClip { public var val_1:values; } }//package
Section 151
//L_14 (L_14) package { import flash.display.*; public dynamic class L_14 extends MovieClip { public var krep:joint; public var val_1:values; public var val_2:values; } }//package
Section 152
//L_15 (L_15) package { import flash.display.*; public dynamic class L_15 extends MovieClip { public var val_1:values; } }//package
Section 153
//L_16 (L_16) package { import flash.display.*; public dynamic class L_16 extends MovieClip { public var krep:joint; public var val_1:values; public var val_2:values; } }//package
Section 154
//L_17 (L_17) package { import flash.display.*; public dynamic class L_17 extends MovieClip { public var krep:joint; public var val_1:values; } }//package
Section 155
//L_18 (L_18) package { import flash.display.*; public dynamic class L_18 extends MovieClip { public var krep:joint; public var val_1:values; } }//package
Section 156
//L_19 (L_19) package { import flash.display.*; public dynamic class L_19 extends MovieClip { public var val_1:values; } }//package
Section 157
//L_2 (L_2) package { import flash.display.*; public dynamic class L_2 extends MovieClip { public var val_1:values; } }//package
Section 158
//L_20 (L_20) package { import flash.display.*; public dynamic class L_20 extends MovieClip { public var krep:joint; public var val_1:values; } }//package
Section 159
//L_3 (L_3) package { import flash.display.*; public dynamic class L_3 extends MovieClip { public var val_1:values; } }//package
Section 160
//L_4 (L_4) package { import flash.display.*; public dynamic class L_4 extends MovieClip { public var val_1:values; } }//package
Section 161
//L_5 (L_5) package { import flash.display.*; public dynamic class L_5 extends MovieClip { public var val_1:values; public var val_2:values; } }//package
Section 162
//L_6 (L_6) package { import flash.display.*; public dynamic class L_6 extends MovieClip { public var val_1:values; public var val_2:values; } }//package
Section 163
//L_7 (L_7) package { import flash.display.*; public dynamic class L_7 extends MovieClip { public var val_1:values; } }//package
Section 164
//L_8 (L_8) package { import flash.display.*; public dynamic class L_8 extends MovieClip { public var val_1:values; public var val_2:values; } }//package
Section 165
//L_9 (L_9) package { import flash.display.*; public dynamic class L_9 extends MovieClip { public var val_1:values; public var val_2:values; } }//package
Section 166
//lampa (lampa) package { import flash.display.*; public dynamic class lampa extends MovieClip { } }//package
Section 167
//littl (littl) package { import flash.display.*; import flash.text.*; public dynamic class littl extends MovieClip { public var qwe:TextField; } }//package
Section 168
//lopast1_box_stat (lopast1_box_stat) package { import flash.display.*; import flash.text.*; public dynamic class lopast1_box_stat extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 169
//lopast2_box_stat (lopast2_box_stat) package { import flash.display.*; import flash.text.*; public dynamic class lopast2_box_stat extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 170
//Main5 (Main5) package { import Box2D.Collision.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Contacts.*; import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.ui.*; public dynamic class Main5 extends MovieClip { private var waitNewRecord:int;// = 0 public var drawing:Boolean;// = false private var mayValueStrashno1:int; private var mayValueStrashno2:int; var myPlayAgain:MovieClip; var myPim:Sound; var xLeftMax;// = 10 var pelenaBubble:MovieClip; public var m_iterations:Number;// = 10 private var bz:int;// = 1 public var ataka:Boolean;// = false public var timeVsryv:int; private var ifOtheContactFirst:Boolean; var q:int; private var cv:int;// = 0 var n:int;// = 10 public var pelenaStart:Boolean;// = false var myKryndec:Sound; public var the_rev_joint1:b2RevoluteJointDef; public var lopastIsMove:Boolean;// = true var dest_joint:b2DistanceJoint; private var ifBOCHKAContactFirst:Boolean; public var level_10:Array; public var level_11:Array; public var level_12:Array; var myOy:Sound; public var level_14:Array; public var level_15:Array; public var level_16:Array; public var level_17:Array; public var level_18:Array; public var level_19:Array; public var level_13:Array; private var levelScores:int; var myMusicMenu:Sound; public var level_20:Array; public var myHitTestKvadrat:hitTestKvadrat; public var m_phys_scale:Number;// = 30 public var obj:Object; private var ifBoxContactFirst:Boolean; var myKlap:Sound; private var allScores:int; public var nameGame:String;// = "CoverOrange13" public var myMenu:menu; var myBum:Sound; public var kD:int;// = 1 var regionHeight:Number;// = 170 public var massivBombochek:Array; var the_dist_joint:b2DistanceJointDef; var myOoo:Sound; public var m_world:b2World; public var initX:Number; public var initY:Number; private var ifBallContactFirst:Boolean; public var myCredits:credits_2; private var mayValueStandart1:int; public var myHitTestKrug:hitTestKrug; var mcAlpha:Number; private var mayValueStandart2:int; var myLogo; public var rezhim:String;// = "menu" var xRighrMax;// = 630 public var mc:MovieClip; public var mcPelena:pelena; var finalnX:Number; var finalnY:Number; public var allSleep:Boolean; var myPum:Sound; var myBlam:Sound; var musicLevelTransform:SoundTransform; var mcWidth:int; private var myPozdr:pozdravlenie; private var myZastavka:zastavka; public var isWasGame:Boolean;// = false var myMama:Sound; private var isSound:Boolean;// = true private var rezhimValues1:String; private var rezhimValues2:String; private var isLevelWasProyden:Boolean;// = true var introBubble:MovieClip; public var MusicLevelVal:Number;// = 0.7 private var cv2:int;// = 0 public var level_2:Array; public var myLevels:select_levels; public var level_9:Array; public var level_3:Array; public var level_7:Array; public var level_1:Array; public var level_4:Array; public var level_6:Array; public var level_8:Array; public var level_5:Array; public var waitForSound:Number; var initYreal:Number; var myOyi:Sound; var mcHeight:int; private var shapeType:String;// = "circleShape" public var m_dbgSprite; public var allShape:Array; public var massivScores:Array; var musicMenuTransform:SoundTransform; private var valueIsTrue:Boolean; public var m_timestep:Number;// = 0.0333333333333333 public var myOblako:oblako; var yDownMax;// = 240 public var hitTest:Boolean;// = false public var levelOsypaem:Boolean; private var bz2:int; private var colUmer:MovieClip; var initXreal:Number; public var region:MovieClip; private var _so:SharedObject; var myAy:Sound; public var tempY:Number; public var tempX:Number; private var melnAngel:int;// = 0 var myNoShape:Sound; private var isMusic:Boolean;// = true private var gameWazProydena:Boolean;// = false var timePause:Number;// = 0 var myMusicLevel:Sound; var regionWidth:Number;// = 170 var zt:int;// = 0 public var showPozdr;// = true var musicMenuChannel:SoundChannel; public var myInstruction:instruction; var butReset:button_reset; var myPay:Sound; var mySht:Sound; public var myHitTest:MovieClip; public var MusicMenuVal:Number;// = 3 var butMenu:button_menu; public var tekLevel:Number;// = 1 public var level:MovieClip; public var wasMovied:Boolean;// = false public var isPressReset:Boolean; var musicLevelChannel:SoundChannel; public var the_rev_joint:b2RevoluteJointDef; public var tekShape:Number;// = 0 var myHa_ha:Sound; public var myPanel:MovieClip; private var ifBOCHKA_DContactFirst:Boolean; private var isPressNext:Boolean;// = false var yUpMax;// = 0 private var soundMama:Boolean; private var digestTimer:Timer; public static const b:String = "bochkaShape"; public static const c:String = "circleShape"; public static const bm:String = "bochkamShape"; public static const r:String = "rectangleShape"; private static var param:String; public function Main5():void{ myNoShape = new noShape(); myOyi = new oyi(); myAy = new ay(); myPay = new pay(); myOy = new oy(); mySht = new sht(); myBum = new bum(); myBlam = new blam(); myPum = new pum(); myPim = new pim(); myMama = new mama(); myOoo = new ooo(); myHa_ha = new ha_ha(); myKryndec = new kryndec(); myKlap = new klap(); myMusicLevel = new music(); myMusicMenu = new menu_mp3(); musicLevelTransform = new SoundTransform(); musicMenuTransform = new SoundTransform(); butReset = new button_reset(); butMenu = new button_menu(); the_dist_joint = new b2DistanceJointDef(); myZastavka = new zastavka(); waitNewRecord = 0; gameWazProydena = false; isPressNext = false; isLevelWasProyden = true; isSound = true; isMusic = true; cv = 0; cv2 = 0; bz = 1; melnAngel = 0; nameGame = "CoverOrange13"; rezhim = "menu"; isWasGame = false; lopastIsMove = true; hitTest = false; kD = 1; myPanel = new panel(); myMenu = new menu(); shapeType = c; m_phys_scale = 30; m_timestep = (1 / 30); m_iterations = 10; myOblako = new oblako(); MusicLevelVal = 0.7; MusicMenuVal = 3; ataka = false; level_1 = [r]; level_2 = [bm, r]; level_3 = [r]; level_4 = [c, r]; level_5 = [c, r, r]; level_6 = [c]; level_7 = [c, bm, c]; level_8 = [r, bm, c]; level_9 = [c, c, c]; level_10 = [c, c, c, c, r]; level_11 = [c, c, c, bm]; level_12 = [c, c, r]; level_13 = [bm, c]; level_14 = [c, c]; level_15 = [c, c, c, c]; level_16 = [c, r, c]; level_17 = [c, c, bm]; level_18 = [c, bm, c, bm]; level_19 = [c, c, r]; level_20 = [bm, c, c]; myPlayAgain = new playAgain(); allShape = [level_1, level_2, level_3, level_4, level_5, level_6, level_7, level_8, level_9, level_10, level_11, level_12, level_13, level_14, level_15, level_16, level_17, level_18, level_19, level_20]; tekShape = 0; tekLevel = 1; massivScores = new Array(); massivBombochek = new Array(); regionWidth = 170; regionHeight = 170; xRighrMax = 630; xLeftMax = 10; yUpMax = 0; yDownMax = 240; drawing = false; wasMovied = false; pelenaStart = false; showPozdr = true; myLogo = new bubblebox_logo_ro1(); timePause = 0; pelenaBubble = new p1(); introBubble = new Intro(); zt = 0; n = 10; super(); addEventListener(Event.ADDED_TO_STAGE, Main4); } function saveGameScores(_arg1:MouseEvent){ myPozdr.butOk.removeEventListener(MouseEvent.CLICK, saveGameScores); myPozdr.bubble_pozdr.removeEventListener(MouseEvent.CLICK, go_bubble_pozdr); removeChild(myPozdr); myPozdr = null; rezhim = "menu"; setChildIndex(myMenu, (numChildren - 1)); playMusicMenu(); myMenu.butBack.removeEventListener(MouseEvent.CLICK, back_game); myMenu.butBack.addEventListener(MouseEvent.CLICK, go_game); } public function go_Credits(_arg1:MouseEvent){ myCredits = new (credits_2); addChild(myCredits); myCredits.myAnton.addEventListener(MouseEvent.CLICK, go_Anton); myCredits.myMax.addEventListener(MouseEvent.CLICK, go_Max); myCredits.myNata.addEventListener(MouseEvent.CLICK, go_Nata); myCredits.mybox.addEventListener(MouseEvent.CLICK, go_box); myCredits.myjohny_k.addEventListener(MouseEvent.CLICK, go_johny_k); myCredits.bubble_credits.addEventListener(MouseEvent.CLICK, go_bubble_credits); myCredits.butMenu.addEventListener(MouseEvent.CLICK, back_menu_from_cred); myCredits.butMenu.width = (myCredits.butMenu.width + 20); myCredits.butMenu.height = (myCredits.butMenu.height + 5); } public function go_bubble_credits(_arg1:MouseEvent){ goToLink("bubble_credits"); } function play_Sound(_arg1:Sound){ if (((isSound) && ((waitForSound > 10)))){ _arg1.play(); }; } public function back_menu_from_cred(_arg1:MouseEvent){ myCredits.butMenu.removeEventListener(MouseEvent.CLICK, back_menu_from_cred); myCredits.myAnton.removeEventListener(MouseEvent.CLICK, go_Anton); myCredits.myMax.removeEventListener(MouseEvent.CLICK, go_Max); myCredits.myNata.removeEventListener(MouseEvent.CLICK, go_Nata); myCredits.mybox.removeEventListener(MouseEvent.CLICK, go_box); myCredits.myjohny_k.removeEventListener(MouseEvent.CLICK, go_johny_k); myCredits.bubble_credits.removeEventListener(MouseEvent.CLICK, go_bubble_credits); removeChild(myCredits); myCredits = null; } public function addTringl(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2Body; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.vertexCount = 3; _local4.vertices[0].Set(0, -(((_local2.height / 2) / m_phys_scale))); _local4.vertices[1].Set(((_local2.width / 2) / m_phys_scale), ((_local2.height / 2) / m_phys_scale)); _local4.vertices[2].Set(-(((_local2.width / 2) / m_phys_scale)), ((_local2.height / 2) / m_phys_scale)); if (_local2.typeObj.text == "din"){ _local4.density = 1; _local4.friction = 0.1; _local4.restitution = 0.2; }; _local5 = m_world.CreateBody(_local3); _local5.CreateShape(_local4); _local5.SetMassFromShapes(); _local5.SetBullet(true); } public function back_game(_arg1:MouseEvent){ if (isWasGame){ setChildIndex(myMenu, 0); rezhim = "game"; showPlayButtons(); playMusicLevel(); }; } function playMusicMenu(){ if (isMusic){ musicLevelChannel.stop(); musicMenuTransform.volume = MusicMenuVal; musicMenuChannel = myMusicMenu.play(0, 10000, musicMenuTransform); }; } public function go_intro(_arg1:MouseEvent){ goToLink("intro"); } public function go_bubble_menu(_arg1:MouseEvent){ goToLink("menu"); } public function addGvozd(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2PolygonDef; var _local6:b2Body; var _local7:b2CircleDef; var _local8:b2BodyDef; var _local9:b2Body; var _local10:b2RevoluteJoint; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox(((12 / m_phys_scale) / 2), ((_local2.height / m_phys_scale) / 2)); _local4.density = 200; _local4.friction = 0.1; _local4.restitution = 0.2; _local5 = new b2PolygonDef(); _local5.SetAsOrientedBox(((_local2.width / m_phys_scale) / 2), ((24 / m_phys_scale) / 2), new b2Vec2(0, -1.65), 0); _local5.density = 1; _local6 = m_world.CreateBody(_local3); _local6.CreateShape(_local5); _local6.CreateShape(_local4); _local6.SetMassFromShapes(); _local6.SetBullet(true); _local7 = new b2CircleDef(); _local7.radius = 0; _local8 = new b2BodyDef(); _local8.position.Set((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale)); _local9 = m_world.CreateBody(_local8); _local9.CreateShape(_local7); the_rev_joint = new b2RevoluteJointDef(); the_rev_joint.Initialize(_local9, _local6, new b2Vec2((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale))); _local10 = (m_world.CreateJoint(the_rev_joint) as b2RevoluteJoint); } public function nextShape():void{ var _local1:*; var _local2:*; shapeType = allShape[(tekLevel - 1)][tekShape]; if (shapeType){ if (shapeType == r){ mc = new box(); mcWidth = 140; mcHeight = 90; }; if (shapeType == c){ mc = new ball(); mcWidth = 90; mcHeight = 90; }; if (shapeType == b){ mc = new dinElementBOCHKA_D(); mcWidth = 60; mcHeight = 80; }; if (shapeType == bm){ mc = new dinElementBOCHKA(); mcWidth = 70; mcHeight = 90; }; _local1 = mouseX; _local2 = mouseY; mc.width = mcWidth; mc.height = mcHeight; if ((_local2 + (mc.height / 2)) > yDownMax){ _local2 = (yDownMax - (mc.height / 2)); }; mc.x = _local1; mc.y = _local2; mc.alpha = 0; wasMovied = true; level.addChild(mc); } else { digestTimer.stop(); }; } public function go_Nata(_arg1:Event){ var _local2:URLRequest; _local2 = new URLRequest("mailto:arosw@mail.ru"); navigateToURL(_local2, "_blank"); } public function update5(_arg1:Event){ if (this.introBubble.currentLabel == "stopFrame"){ pelenaBubble.x = 0; pelenaBubble.y = 0; pelenaBubble.alpha = (pelenaBubble.alpha + 0.02); if (pelenaBubble.alpha > 1){ introBubble.removeEventListener(MouseEvent.CLICK, go_intro); removeChild(introBubble); pelenaBubble.removeEventListener(MouseEvent.CLICK, go_pelenaBubble); removeEventListener(Event.ENTER_FRAME, update5); removeChild(pelenaBubble); Main3(); }; }; } public function go_levels(_arg1:MouseEvent){ var _local2:int; var _local3:int; var _local4:Number; var _local5:Object; var _local6:*; var _local7:Number; rezhim = "selectLevels"; myLevels = new (select_levels); addChild(myLevels); myLevels.namePlayer.gotoAndStop(1); myLevels.namePlayer.setScore(allScores, 1541); myLevels.butMenu.addEventListener(MouseEvent.CLICK, back_menu_from_levels); _local2 = 1; _local3 = 0; while (_local3 < myLevels.numChildren) { if (myLevels.getChildAt(_local3).name.substring(0, 2) == "l_"){ _local4 = Number(myLevels.getChildAt(_local3).name.substring(2, 4)); _local5 = myLevels.getChildAt(_local3); (_local5.getChildByName("qwe") as TextField).text = _local2.toString(); _local2++; if (_local4 > (massivScores.length + 1)){ _local6 = new (stop_level); myLevels.addChild(_local6); _local6.x = (myLevels.getChildAt(_local3).x - 4); _local6.y = (myLevels.getChildAt(_local3).y - 4); } else { if (_local4 != (massivScores.length + 1)){ _local7 = massivScores[(_local4 - 1)]; myLevels[("lcor_" + _local4)].text = _local7; }; }; myLevels.getChildAt(_local3).addEventListener(MouseEvent.MOUSE_OVER, mouse_on_levels); myLevels.getChildAt(_local3).addEventListener(MouseEvent.MOUSE_OUT, mouse_out_levels); myLevels.getChildAt(_local3).addEventListener(MouseEvent.CLICK, mouse_click_levels); }; _local3++; }; myLevels.total_scores.text = allScores.toString(); myLevels.bubble_selector.addEventListener(MouseEvent.CLICK, go_bubble_selector); } public function go_bubble_highscore(_arg1:MouseEvent){ goToLink("highscore"); } public function go_Instr(_arg1:MouseEvent){ myInstruction = new (instruction); addChild(myInstruction); myInstruction.butMenu.addEventListener(MouseEvent.CLICK, back_menu_from_instr); myInstruction.bubble_instr.addEventListener(MouseEvent.CLICK, go_bubble_instr); } public function go_bubble_pozdr(_arg1:MouseEvent){ goToLink("pozdravlenie"); } public function addCircle(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2CircleDef; var _local5:b2Body; _local2 = _arg1; _local2.radius = (_local2.width / 2); _local3 = new b2BodyDef(); _local3.position.Set((_local2.x / m_phys_scale), (_local2.y / m_phys_scale)); _local3.userData = _local2; _local4 = new b2CircleDef(); _local4.radius = Math.abs((_local2.radius / m_phys_scale)); if (_local2.typeObj.text == "din"){ _local4.density = 1; _local4.friction = 0.3; _local4.restitution = 0.3; }; if ((_local2 is bomb)){ _local4.density = 20; }; _local5 = m_world.CreateBody(_local3); _local5.CreateShape(_local4); _local5.SetMassFromShapes(); _local5.SetBullet(true); if ((_local2 is bomb)){ _local5.SetBullet(false); massivBombochek.push(_local5); }; } public function mouse_on_levels(_arg1:MouseEvent){ var _local2:MovieClip; _local2 = (_arg1.currentTarget as MovieClip); _local2.mouseChildren = false; _local2.buttonMode = true; _local2.useHandCursor = true; myLevels.myRamka.x = (_local2.x - 23); myLevels.myRamka.y = (_local2.y - 8); } public function go_bubble_selector(_arg1:MouseEvent){ goToLink("select_level"); } public function go_johny_k(_arg1:Event){ var _local2:URLRequest; _local2 = new URLRequest("mailto:johnny@johnny-k.ru"); navigateToURL(_local2, "_blank"); } public function go_game(_arg1:MouseEvent){ playMusicLevel(); delete_level(level); if (tekLevel > 20){ tekLevel = 1; gameWazProydena = true; }; startNextLevel(tekLevel); } function Update(_arg1:Event){ var _local2:Number; var _local3:b2Body; var _local4:MovieClip; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:b2ContactEdge; var _local9:Number; var _local10:Number; var _local11:b2ContactEdge; var _local12:int; var _local13:Sound; animations(); if (rezhim != "game"){ return; }; waitForSound++; m_world.Step(m_timestep, m_iterations); allSleep = false; _local2 = 0; hitTest = false; _local3 = m_world.m_bodyList; while (_local3) { _local4 = _local3.m_userData; if (((mc) && (_local4))){ if (((((!((_local4 is krest_din))) && (!((_local4 is krest_stat))))) && (!((_local4 is lopast1_box_stat))))){ if (_local4.hitTestObject(mc)){ hitTest = true; }; }; }; if ((((_local4 is Sprite)) && (!(_local3.IsStatic())))){ _local5 = _local4.x; _local6 = _local4.y; _local4.x = (_local3.GetPosition().x * m_phys_scale); _local4.y = (_local3.GetPosition().y * m_phys_scale); _local4.rotation = (_local3.GetAngle() * (180 / Math.PI)); if (!(((tekLevel == 16)) && ((_local4 is values)))){ if (((((!((_local4 is kacheli_din))) && (!((_local4 is kacheliD_din))))) && (!((_local4 is gvozd_prav))))){ _local5 = Math.abs((_local4.x - _local5)); _local6 = Math.abs((_local4.y - _local6)); _local7 = Math.max(_local5, _local6); if (_local2 < _local7){ _local2 = _local7; }; }; }; if ((_local4 is values)){ if (_local4.name == "val_1"){ if (((_local3.IsSleeping()) && (!((_local4.currentLabel == "umer"))))){ if (!cv){ cv = _local4.rotation; }; if (cv){ cv = (cv - ((cv / Math.abs(cv)) * 4)); _local4.rotation = cv; if ((4 - Math.abs(cv)) > 0){ _local3.SetXForm(new b2Vec2((_local4.x / 30), (_local4.y / 30)), 0); cv = 0; }; }; }; if (((!(_local3.m_contactList)) && (!((rezhimValues1 == "strashno"))))){ mayValueStrashno1++; if (mayValueStrashno1 > 8){ rezhimValues1 = "strashno"; mayValueStandart1 = 0; _local4.gotoAndPlay("strashno"); }; }; if (((_local3.m_contactList) && (!((rezhimValues1 == "standart"))))){ mayValueStandart1++; if ((((mayValueStandart1 == 1)) && (!(timeVsryv)))){ play_Sound(myOyi); }; if (mayValueStandart1 > 8){ rezhimValues1 = "standart"; mayValueStrashno1 = 0; _local4.gotoAndPlay("uspokoilis"); }; }; }; if (_local4.name == "val_2"){ if (((_local3.IsSleeping()) && (!((_local4.currentLabel == "umer"))))){ if (!cv2){ cv2 = _local4.rotation; }; if (cv2){ cv2 = (cv2 - ((cv2 / Math.abs(cv2)) * 4)); _local4.rotation = cv2; if ((4 - Math.abs(cv2)) > 0){ _local3.SetXForm(new b2Vec2((_local4.x / 30), (_local4.y / 30)), 0); cv2 = 0; }; }; }; if (((!(_local3.m_contactList)) && (!((rezhimValues2 == "strashno"))))){ mayValueStrashno2++; if (mayValueStrashno2 > 8){ rezhimValues2 = "strashno"; mayValueStandart2 = 0; _local4.gotoAndPlay("strashno"); }; }; if (((_local3.m_contactList) && (!((rezhimValues2 == "standart"))))){ mayValueStandart2++; if (mayValueStandart2 == 1){ play_Sound(myAy); }; if (mayValueStandart2 > 8){ rezhimValues2 = "standart"; mayValueStrashno2 = 0; _local4.gotoAndPlay("uspokoilis"); }; }; }; _local8 = _local3.m_contactList; while (_local8) { if ((((_local8.other.m_userData is bomb)) && (!(timeVsryv)))){ _local9 = _local4.x; _local10 = _local4.y; level.setChildIndex(_local4, (level.numChildren - 1)); level.setChildIndex(mcPelena, (level.numChildren - 1)); level.setChildIndex(myOblako, (level.numChildren - 1)); _local4.gotoAndPlay("ubivaem"); play_Sound(myKryndec); if ((((_local4.name == "val_1")) && (level.getChildByName("val_2")))){ level.val_2.gotoAndPlay("plakaem"); }; if (_local4.name == "val_2"){ level.val_1.gotoAndPlay("plakaem"); }; colUmer = _local4; timeVsryv = 1; bz = 2; }; _local8 = _local8.next; }; if (((((!(timeVsryv)) && (!(soundMama)))) && ((_local4.y > 480)))){ play_Sound(myMama); soundMama = true; }; } else { obj = _local4; if (((!(_local3.m_contactList)) && (obj.hasOwnProperty("typeObj")))){ obj.typeObj.text = "no"; }; if (_local3.m_contactList){ if (obj.typeObj.text != "asd"){ if ((_local4 is bomb)){ _local11 = _local3.m_contactList; while (_local11) { if (!(_local11.other.m_userData is bomb)){ play_Sound(myPim); obj.typeObj.text = "asd"; }; _local11 = _local11.next; }; }; if ((_local4 is box)){ play_Sound(myBum); }; obj.typeObj.text = "asd"; if ((_local4 is dinElementBOCHKA)){ play_Sound(myBlam); }; obj.typeObj.text = "asd"; if ((_local4 is dinElementBOCHKA_D)){ play_Sound(myPum); }; obj.typeObj.text = "asd"; if ((_local4 is ball)){ play_Sound(myKlap); }; obj.typeObj.text = "asd"; }; }; if (massivBombochek.length > 70){ massivBombochek[1].m_userData.gotoAndPlay("start"); m_world.DestroyBody(massivBombochek[1]); massivBombochek[1].m_userData = null; massivBombochek.shift(); }; }; if ((((_local3.GetPosition().y > 25)) && (!((_local4 is bomb))))){ if ((_local4 is values)){ valueIsTrue = false; }; level.removeChild((_local4 as Sprite)); m_world.DestroyBody(_local3); _local4 = null; }; }; _local3 = _local3.m_next; }; if (shapeType == "circleShape"){ myHitTest = myHitTestKrug; } else { myHitTest = myHitTestKvadrat; }; if (((hitTest) && (shapeType))){ setChildIndex(myHitTest, (numChildren - 1)); myHitTest.x = mc.x; myHitTest.width = mc.width; myHitTest.y = mc.y; myHitTest.height = mc.height; } else { myHitTest.x = 10000; myHitTest.y = 10000; }; if ((((mc.alpha < 0.3)) && (wasMovied))){ mc.alpha = (mc.alpha + 0.004); }; if ((((((mc.alpha > 0)) && (!(wasMovied)))) && (shapeType))){ mc.alpha = (mc.alpha - 0.004); }; if (mc.alpha <= 0){ myHitTest.alpha = 0; }; if (mc.alpha > 0){ myHitTest.alpha = 1; }; if (((!(pelenaStart)) && ((mcPelena.alpha > 0)))){ mcPelena.alpha = (mcPelena.alpha - 0.2); }; if (((pelenaStart) && ((getTimer() > waitNewRecord)))){ waitNewRecord = 0; mcPelena.alpha = (mcPelena.alpha + 0.2); if (mcPelena.alpha > 1){ pelenaStart = false; if (((isPressNext) && ((tekLevel == 21)))){ gameWazProydena = true; isPressNext = false; }; if (((((((!(timeVsryv)) && (!(isPressReset)))) && (valueIsTrue))) && (!(isPressNext)))){ if (((gameWazProydena) && (showPozdr))){ mcPelena.alpha = 0; tekLevel = 1; rezhim = "pozdravlenie"; myPozdr = new pozdravlenie(); myPozdr.totalScore.text = allScores.toString(); myPozdr.butOk.addEventListener(MouseEvent.CLICK, saveGameScores); addChild(myPozdr); myPozdr.bubble_pozdr.addEventListener(MouseEvent.CLICK, go_bubble_pozdr); stage.focus = myPozdr.namePlayer; hidePlayButtons(); showPozdr = false; setChildIndex(myLogo, 0); myPozdr.namePlayer.gotoAndStop(1); myPozdr.namePlayer.setScore(allScores, 1541); return; }; if (!showPozdr){ select_level_from_game(null); return; }; }; isPressNext = false; delete_level(level); startNextLevel(tekLevel); }; }; if (((((!(valueIsTrue)) && (!(levelOsypaem)))) && (!(pelenaStart)))){ level.setChildIndex(mcPelena, (level.numChildren - 1)); if (ataka){ level.setChildIndex(myOblako, (level.numChildren - 1)); }; pelenaStart = true; }; if (ataka){ level.val_1.y = (level.val_1.y + bz2); bz2 = (bz2 * -1); atakaNow(); } else { if ((((((_local2 < 0.04)) && (!(shapeType)))) && (!(pelenaStart)))){ bz2 = 0.5; if (((!((tekLevel == 16))) && (!((tekLevel == 6))))){ level.val_1.gotoAndPlay("boimsa"); if (level.getChildByName("val_2")){ level.val_2.gotoAndPlay("boimsa"); }; }; ataka = true; myOblako.x = -1000; level.addChild(myOblako); _local12 = (Math.round((Math.random() * 1000)) % 3); if (_local12 == 0){ _local13 = new oblakoSound_0(); }; if (_local12 == 1){ _local13 = new oblakoSound_1(); }; if (_local12 == 2){ _local13 = new oblakoSound_2(); }; play_Sound(_local13); }; }; if (timeVsryv){ timeVsryv++; if (colUmer.currentLabel == "stopDrozh"){ bz = 0; }; colUmer.x = (colUmer.x + bz); bz = (bz * -1); if (timeVsryv == 100){ pelenaStart = true; }; }; } public function mouseMoved(_arg1:MouseEvent){ var _local2:*; var _local3:*; if (rezhim != "game"){ return; }; if (shapeType){ wasMovied = true; _local2 = _arg1.stageX; _local3 = _arg1.stageY; if ((_local3 + (mc.height / 2)) > yDownMax){ _local3 = (yDownMax - (mc.height / 2)); }; mc.x = _local2; mc.y = _local3; if (_arg1.stageY > 450){ wasMovied = false; }; }; } public function mouseReleased(_arg1:MouseEvent){ if (((!((rezhim == "game"))) || (timeVsryv))){ return; }; yDownMax = 240; if (((((wasMovied) && (shapeType))) && (!(hitTest)))){ play_Sound(mySht); mc.alpha = 1; if ((((((shapeType == r)) || ((shapeType == b)))) || ((shapeType == bm)))){ addBox(mc); }; if (shapeType == c){ addCircle(mc); }; tekShape++; showAllShapes(tekShape); nextShape(); }; } public function mouseLeave(_arg1:Event){ if (rezhim != "game"){ return; }; wasMovied = false; } public function back_menu_from_levels(_arg1:MouseEvent){ clearListenersFromSelectorLevels(); (rezhim == "game"); } public function go_Sound_OUT(_arg1:MouseEvent){ if (!isSound){ myMenu.onSound.gotoAndStop("off"); } else { myMenu.onSound.gotoAndStop("on"); }; } public function go_Max(_arg1:Event){ var _local2:URLRequest; _local2 = new URLRequest("mailto:maxim-777-m@ya.ru"); navigateToURL(_local2, "_blank"); } public function addBox(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2Body; var _local6:b2CircleDef; var _local7:b2BodyDef; var _local8:b2Body; var _local9:b2RevoluteJoint; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox(((_local2.width / m_phys_scale) / 2), ((_local2.height / m_phys_scale) / 2)); if (_local2.typeObj.text == "din"){ _local4.density = 1; _local4.friction = 0.1; _local4.restitution = 0.2; }; _local5 = m_world.CreateBody(_local3); _local5.CreateShape(_local4); _local5.SetMassFromShapes(); _local5.SetBullet(true); if ((_local2 is lopast1_box_stat)){ _local4.density = 10; _local4.friction = 10; _local5.CreateShape(_local4); _local5.SetMassFromShapes(); _local6 = new b2CircleDef(); _local6.radius = 0; _local7 = new b2BodyDef(); _local7.position.Set((level.krep.x / m_phys_scale), (level.krep.y - (5 / m_phys_scale))); _local8 = m_world.CreateBody(_local7); _local8.CreateShape(_local6); the_rev_joint = new b2RevoluteJointDef(); the_rev_joint.Initialize(_local8, _local5, new b2Vec2((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale))); the_rev_joint.enableMotor = true; the_rev_joint.motorSpeed = 1; the_rev_joint.maxMotorTorque = 1000; _local9 = (m_world.CreateJoint(the_rev_joint) as b2RevoluteJoint); }; } public function Main4(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, Main4); MochiBot.track(this, "7ed560fc"); introBubble.x = 320; introBubble.y = 240; addChild(introBubble); pelenaBubble.alpha = 0; pelenaBubble.x = 640; pelenaBubble.addEventListener(MouseEvent.CLICK, go_pelenaBubble); addChild(pelenaBubble); introBubble.addEventListener(MouseEvent.CLICK, go_intro); addEventListener(Event.ENTER_FRAME, update5); } public function Main3():void{ var _local1:b2AABB; var _local2:b2Vec2; var _local3:Boolean; var _local4:Class; var _local5:String; var _local6:Number; myLogo.x = 575; myLogo.y = 14; myLogo.width = 113; myLogo.height = 15; addChild(myLogo); myLogo.addEventListener(MouseEvent.CLICK, go_bubble_game); _local1 = new b2AABB(); _local1.lowerBound.Set(-500, -500); _local1.upperBound.Set(500, 500); _local2 = new b2Vec2(0, 10); _local3 = true; m_world = new b2World(_local1, _local2, _local3); allScores = 0; _so = SharedObject.getLocal(nameGame); while (_so.data[("level_" + tekLevel)] >= 0) { _local6 = _so.data[("level_" + tekLevel)]; if (_local6 > 1000){ _so.data[("level_" + tekLevel)] = 0; _so.flush(); _local6 = 0; }; massivScores[(tekLevel - 1)] = _local6; allScores = (allScores + _so.data[("level_" + tekLevel)]); tekLevel++; }; _so.data["allScores"] = allScores; if (_so.data.isMusic){ isMusic = false; }; if (_so.data.isSound){ isSound = false; }; if (isMusic){ musicMenuTransform.volume = MusicMenuVal; musicMenuChannel = myMusicMenu.play(0, 10, musicMenuTransform); }; if (tekLevel > 20){ tekLevel = 1; gameWazProydena = true; showPozdr = false; }; _local4 = (getDefinitionByName(("L_" + tekLevel)) as Class); level = new (_local4); level.x = 0; level.y = -30; addChild(level); addChild(myPanel); myPanel.x = 0; myPanel.y = 0; myPanel.level_text.text = ("LEVEL " + tekLevel); _local5 = allScores.toString(); while (_local5.length < 4) { _local5 = ("0" + _local5); }; myPanel.timeTotal_text.text = ("total: " + _local5); addChild(butReset); butReset.addEventListener(MouseEvent.MOUSE_UP, play_again); addChild(butMenu); butMenu.addEventListener(MouseEvent.MOUSE_UP, go_menu); myPanel.butSelectLevel.addEventListener(MouseEvent.MOUSE_UP, select_level_from_game); myPanel.butSolution.addEventListener(MouseEvent.MOUSE_UP, go_bubble_solution); hidePlayButtons(); myMenu.x = 0; myMenu.y = -30; addChild(myMenu); myMenu.onMusic.gotoAndStop("off"); myMenu.onSound.gotoAndStop("off"); if (isSound){ myMenu.onSound.gotoAndStop("on"); }; if (isMusic){ myMenu.onMusic.gotoAndStop("on"); }; myMenu.bubble_menu.addEventListener(MouseEvent.CLICK, go_bubble_menu); myMenu.butPlay.addEventListener(MouseEvent.CLICK, showYesNo); myMenu.butLevels.addEventListener(MouseEvent.CLICK, go_levels); myMenu.butInstr.addEventListener(MouseEvent.CLICK, go_Instr); myMenu.butCredits.addEventListener(MouseEvent.CLICK, go_Credits); myMenu.butBack.addEventListener(MouseEvent.CLICK, go_game); myMenu.moreGames.addEventListener(MouseEvent.CLICK, go_moreGames); myMenu.highscore.addEventListener(MouseEvent.CLICK, go_bubble_highscore); myMenu.addtosite.addEventListener(MouseEvent.CLICK, go_bubble_addtosite); myMenu.onSound.addEventListener(MouseEvent.CLICK, go_Sound); myMenu.onSound.addEventListener(MouseEvent.MOUSE_OVER, go_Sound_OVER); myMenu.onSound.addEventListener(MouseEvent.MOUSE_OUT, go_Sound_OUT); myMenu.onMusic.addEventListener(MouseEvent.CLICK, go_Music); myMenu.onMusic.addEventListener(MouseEvent.MOUSE_OVER, go_Music_OVER); myMenu.onMusic.addEventListener(MouseEvent.MOUSE_OUT, go_Music_OUT); addEventListener(Event.ENTER_FRAME, Update); myHitTestKvadrat = new hitTestKvadrat(); myHitTestKvadrat.x = 1000; myHitTestKvadrat.y = 1000; addChild(myHitTestKvadrat); myHitTestKrug = new hitTestKrug(); myHitTestKrug.x = 10000; myHitTestKrug.y = 10000; addChild(myHitTestKrug); stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePressed); stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved); stage.addEventListener(MouseEvent.MOUSE_UP, mouseReleased); stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_down); } public function mouse_click_levels(_arg1:MouseEvent){ tekLevel = Number((_arg1.currentTarget as MovieClip).name.substring(2, 4)); myLevels.bubble_selector.removeEventListener(MouseEvent.CLICK, go_bubble_selector); clearListenersFromSelectorLevels(); go_game(null); } function animations(){ var _local1:int; var _local2:int; var _local3:String; var _local4:String; _local1 = Math.round((Math.random() * 100)); _local2 = Math.round((Math.random() * 1000)); _local3 = level.val_1.currentLabel; if (_local3 == "standart"){ if (_local1 == 40){ level.val_1.gotoAndPlay("morgaem"); }; if (_local2 == 50){ level.val_1.gotoAndPlay("podmigivaem"); }; }; if (level.getChildByName("val_2")){ _local4 = level.val_2.currentLabel; if (_local4 == "standart"){ if (_local1 == 60){ level.val_2.gotoAndPlay("morgaem"); }; if (_local2 == 70){ level.val_2.gotoAndPlay("podmigivaem"); }; }; }; } public function back_menu_from_instr(_arg1:MouseEvent){ myInstruction.butMenu.removeEventListener(MouseEvent.CLICK, back_menu_from_instr); myInstruction.bubble_instr.removeEventListener(MouseEvent.CLICK, go_bubble_instr); rezhim = "menu"; removeChild(myInstruction); myInstruction = null; } public function go_moreGames(_arg1:MouseEvent){ goToLink("more_game"); } public function go_Sound_OVER(_arg1:MouseEvent){ if (!isSound){ myMenu.onSound.gotoAndStop("mousOn_2"); } else { myMenu.onSound.gotoAndStop("mousOn_1"); }; } public function go_box(_arg1:Event){ var _local2:URLRequest; _local2 = new URLRequest("http://www.box2d.org"); navigateToURL(_local2, "_blank"); } public function startNextLevel(_arg1){ var _local2:Class; var _local3:int; n = 10; bz2 = 0; q = 1; isLevelWasProyden = false; ataka = false; tekShape = 0; levelOsypaem = false; timeVsryv = 0; isWasGame = true; ifBoxContactFirst = true; ifBOCHKAContactFirst = true; ifBallContactFirst = true; ifBOCHKA_DContactFirst = true; levelScores = 1000; isPressReset = false; ifOtheContactFirst = true; soundMama = false; waitForSound = 0; valueIsTrue = true; mayValueStandart1 = 0; mayValueStandart2 = 0; rezhimValues1 = "standart"; rezhimValues2 = "standart"; massivBombochek.length = 0; if (_arg1 > 20){ _arg1 = 20; gameWazProydena = true; }; _local2 = (getDefinitionByName(("L_" + _arg1)) as Class); level = new (_local2); level.x = 0; level.y = -30; addChild(level); stage.focus = this; _local3 = 0; while (_local3 < level.numChildren) { obj = level.getChildAt(_local3); obj.cacheAsBitmap = true; if (!(obj is SimpleButton)){ if (obj.hasOwnProperty("shapeObj")){ if (obj.shapeObj.text == "box"){ addBox(obj); }; if (obj.shapeObj.text == "circ"){ addCircle(obj); }; if (obj.shapeObj.text == "tringl"){ addTringl(obj); }; if (obj.shapeObj.text == "krest"){ addKrest(obj); }; if (obj.shapeObj.text == "gvozd"){ addGvozd(obj); }; if (obj.shapeObj.text == "kacheli"){ addKacheli(obj); }; if (obj.shapeObj.text == "kacheliD"){ addKacheliD(obj); }; if (obj.shapeObj.text == "krysha"){ addKrysha(obj); }; if (obj.shapeObj.text == "kryshaR"){ addKryshaRight(obj); }; if (obj.shapeObj.text == "kryshaL"){ addKryshaLeft(obj); }; }; }; _local3++; }; showAllShapes(tekShape); nextShape(); myPanel.level_text.text = ("LEVEL " + _arg1.toString()); setChildIndex(myPanel, (numChildren - 1)); showPlayButtons(); mcPelena = new pelena(); level.addChild(mcPelena); if (digestTimer){ digestTimer.stop(); }; digestTimer = new Timer(100, 0); digestTimer.addEventListener(TimerEvent.TIMER, digestTimerListener); digestTimer.start(); rezhim = "game"; setChildIndex(myLogo, (numChildren - 1)); } public function showYesNo(_arg1:MouseEvent){ if ((((tekLevel > 1)) || (gameWazProydena))){ addChild(myPlayAgain); myPlayAgain.butNo.addEventListener(MouseEvent.CLICK, back_menu_from_quations); myPlayAgain.butOk.addEventListener(MouseEvent.CLICK, back_menu_after_clear); } else { go_game(null); }; } public function play_solution(_arg1:MouseEvent){ } public function addKryshaLeft(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2PolygonDef; var _local6:b2Body; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox(((15 / m_phys_scale) / 2), ((_local2.height / m_phys_scale) / 2)); _local4.density = 10; _local4.friction = 0.1; _local4.restitution = 0.2; _local5 = new b2PolygonDef(); _local5.SetAsOrientedBox((47 / m_phys_scale), (7.5 / m_phys_scale), new b2Vec2((-47 / m_phys_scale), -1.45), 0); _local5.density = 1; _local4.friction = 0.1; _local4.restitution = 0.2; _local6 = m_world.CreateBody(_local3); _local6.CreateShape(_local4); _local6.CreateShape(_local5); _local6.SetMassFromShapes(); _local6.SetBullet(true); } public function go_pelenaBubble(_arg1:MouseEvent){ goToLink("pelenaBubble"); } public function addKacheliD(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2PolygonDef; var _local6:b2Body; var _local7:b2CircleDef; var _local8:b2BodyDef; var _local9:b2Body; var _local10:b2RevoluteJoint; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox((((_local2.width - 43) / m_phys_scale) / 2), ((12 / m_phys_scale) / 2)); _local4.density = 1; _local4.friction = 0.1; _local4.restitution = 0.2; _local5 = new b2PolygonDef(); _local5.SetAsOrientedBox((6 / m_phys_scale), (20 / m_phys_scale), new b2Vec2((120 / m_phys_scale), -0.65), 0.5); _local5.density = 1; _local5.friction = 0.1; _local5.restitution = 0.2; _local6 = m_world.CreateBody(_local3); _local6.CreateShape(_local5); _local6.CreateShape(_local4); _local6.SetMassFromShapes(); _local6.SetBullet(true); _local7 = new b2CircleDef(); _local7.radius = 0; _local8 = new b2BodyDef(); _local8.position.Set((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale)); _local9 = m_world.CreateBody(_local8); _local9.CreateShape(_local7); the_rev_joint = new b2RevoluteJointDef(); the_rev_joint.Initialize(_local9, _local6, new b2Vec2((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale))); _local10 = (m_world.CreateJoint(the_rev_joint) as b2RevoluteJoint); } public function go_menu(_arg1:MouseEvent){ if (rezhim == "game"){ playMusicMenu(); setChildIndex(myMenu, (numChildren - 1)); hidePlayButtons(); myMenu.butBack.removeEventListener(MouseEvent.CLICK, go_game); myMenu.butBack.addEventListener(MouseEvent.CLICK, back_game); }; rezhim = "menu"; setChildIndex(myLogo, 0); } function showPlayButtons(){ butReset.x = 50; butReset.y = 454; setChildIndex(butReset, (numChildren - 1)); butMenu.x = 592; butMenu.y = 454; setChildIndex(butMenu, (numChildren - 1)); myPanel.butSelectLevel.x = 511.6; myPanel.butSelectLevel.y = 460.6; myPanel.butSolution.x = 131.6; myPanel.butSolution.y = 460.6; } function saveNewRecordsGame(_arg1:MouseEvent){ } public function clearListenersFromSelectorLevels():void{ var _local1:int; _local1 = 0; while (_local1 < myLevels.numChildren) { if (myLevels.getChildAt(_local1).name.substring(0, 2) == "l_"){ myLevels.getChildAt(_local1).removeEventListener(MouseEvent.MOUSE_OVER, mouse_on_levels); myLevels.getChildAt(_local1).removeEventListener(MouseEvent.MOUSE_OUT, mouse_out_levels); myLevels.getChildAt(_local1).removeEventListener(MouseEvent.CLICK, mouse_click_levels); }; _local1++; }; removeChild(myLevels); myLevels = null; if (level.newRecord){ removeChild(level.newRecord); }; if (mcPelena){ mcPelena.alpha = 0; }; if (isLevelWasProyden){ myMenu.butBack.removeEventListener(MouseEvent.CLICK, back_game); myMenu.butBack.addEventListener(MouseEvent.CLICK, go_game); }; } public function go_Music_OVER(_arg1:MouseEvent){ if (!isMusic){ myMenu.onMusic.gotoAndStop("mousOn_2"); } else { myMenu.onMusic.gotoAndStop("mousOn_1"); }; } public function go_bubble_solution(_arg1:MouseEvent){ goToLink("walk"); } public function key_down(_arg1:KeyboardEvent){ var _local2:int; if (rezhim == "game"){ if ((((((_arg1.keyCode == 32)) || ((_arg1.keyCode == 82)))) || ((_arg1.keyCode == 114)))){ isPressReset = true; pelenaStart = true; }; if ((((((_arg1.keyCode == 78)) && (_arg1.ctrlKey))) && (_arg1.altKey))){ if (!massivScores[(tekLevel - 1)]){ massivScores[(tekLevel - 1)] = 0; allScores = 0; _local2 = 0; while (_local2 < massivScores.length) { allScores = (allScores + massivScores[_local2]); _local2++; }; myPanel.timeTotal_text.text = ("total: " + allScores); _so.data[("level_" + tekLevel)] = massivScores[(tekLevel - 1)]; _so.data["allScores"] = allScores; _so.flush(); }; tekLevel++; isPressNext = true; pelenaStart = true; }; }; if ((((((((_arg1.keyCode == 48)) && (_arg1.ctrlKey))) && (_arg1.altKey))) && (_arg1.shiftKey))){ playMusicMenu(); clearGame(); }; } public function play_again(_arg1:MouseEvent){ isPressReset = true; level.setChildIndex(mcPelena, (level.numChildren - 1)); pelenaStart = true; } public function addKrest(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2Body; var _local6:b2CircleDef; var _local7:b2BodyDef; var _local8:b2Body; var _local9:b2RevoluteJoint; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox(((210 / m_phys_scale) / 2), ((15.5 / m_phys_scale) / 2)); _local4.density = 100; _local5 = m_world.CreateBody(_local3); _local5.CreateShape(_local4); _local4.SetAsBox(((15.5 / m_phys_scale) / 2), ((210 / m_phys_scale) / 2)); _local5.CreateShape(_local4); _local5.SetMassFromShapes(); _local5.SetBullet(true); _local6 = new b2CircleDef(); _local6.radius = 0; _local7 = new b2BodyDef(); _local7.position.Set((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale)); _local8 = m_world.CreateBody(_local7); _local8.CreateShape(_local6); the_rev_joint = new b2RevoluteJointDef(); the_rev_joint.Initialize(_local8, _local5, new b2Vec2((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale))); if (_local2.typeObj.text == "din"){ the_rev_joint.enableMotor = true; the_rev_joint.motorSpeed = 1; the_rev_joint.maxMotorTorque = 3000; }; _local9 = (m_world.CreateJoint(the_rev_joint) as b2RevoluteJoint); } public function addKacheli(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:*; var _local5:*; var _local6:*; var _local7:b2PolygonDef; var _local8:b2PolygonDef; var _local9:b2PolygonDef; var _local10:b2PolygonDef; var _local11:b2Body; var _local12:b2CircleDef; var _local13:b2BodyDef; var _local14:b2Body; var _local15:b2RevoluteJoint; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = 12; _local5 = 12; _local6 = 12; _local7 = new b2PolygonDef(); _local7.SetAsBox(((_local4 / m_phys_scale) / 2), ((130 / m_phys_scale) / 2)); _local7.density = 100; _local7.friction = 0.1; _local7.restitution = 0.2; _local8 = new b2PolygonDef(); _local8.SetAsOrientedBox((((_local2.width / 2) - (_local4 / 4)) / m_phys_scale), ((_local5 / m_phys_scale) / 2), new b2Vec2((((_local2.width / 2) - (_local4 / 4)) / m_phys_scale), 0), 0); _local8.density = 1; _local9 = new b2PolygonDef(); _local9.SetAsOrientedBox((19 / m_phys_scale), ((_local6 / m_phys_scale) / 2), new b2Vec2((19 / m_phys_scale), -2.38), -0.5); _local9.density = 1; _local9.friction = 0.1; _local9.restitution = 0.2; _local10 = new b2PolygonDef(); _local10.SetAsOrientedBox((19 / m_phys_scale), ((_local6 / m_phys_scale) / 2), new b2Vec2((19 / m_phys_scale), 2.42), 0.5); _local10.density = 1; _local9.friction = 0.1; _local9.restitution = 0.2; _local11 = m_world.CreateBody(_local3); _local11.CreateShape(_local7); _local11.CreateShape(_local8); _local11.CreateShape(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); _local11.SetBullet(true); _local12 = new b2CircleDef(); _local12.radius = 0; _local13 = new b2BodyDef(); _local13.position.Set((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale)); _local14 = m_world.CreateBody(_local13); _local14.CreateShape(_local12); the_rev_joint = new b2RevoluteJointDef(); the_rev_joint.Initialize(_local14, _local11, new b2Vec2((level.krep.x / m_phys_scale), (level.krep.y / m_phys_scale))); _local15 = (m_world.CreateJoint(the_rev_joint) as b2RevoluteJoint); } public function go_bubble_addtosite(_arg1:MouseEvent){ goToLink("addtosite"); } function playMusicLevel(){ if (isMusic){ musicMenuChannel.stop(); musicLevelTransform.volume = MusicLevelVal; musicLevelChannel = myMusicLevel.play(0, 10000, musicLevelTransform); }; } public function go_Sound(_arg1:MouseEvent){ if (isSound){ myMenu.onSound.gotoAndStop("off"); isSound = false; _so.data.isSound = "x"; } else { myMenu.onSound.gotoAndStop("on"); isSound = true; _so.data.isSound = null; }; } public function go_bubble_game(_arg1:MouseEvent){ goToLink("game"); } function hidePlayButtons(){ butReset.x = -1150; butReset.y = 464; butMenu.x = 1590; butMenu.y = 464; myPanel.butSelectLevel.x = 1100; myPanel.butSelectLevel.y = 464; myPanel.butSolution.x = 1540; myPanel.butSolution.y = 464; } public function checkLoaded(_arg1:ProgressEvent):void{ var _local2:Number; _local2 = Math.ceil(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100)); if (_local2 == 100){ }; } public function select_level_from_game(_arg1:MouseEvent){ go_menu(null); go_levels(null); } public function mouse_out_levels(_arg1:MouseEvent){ myLevels.myRamka.y = -200; } public function go_Music_OUT(_arg1:MouseEvent){ if (!isMusic){ myMenu.onMusic.gotoAndStop("off"); } else { myMenu.onMusic.gotoAndStop("on"); }; } public function addKryshaRight(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2PolygonDef; var _local6:b2Body; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox(((15 / m_phys_scale) / 2), ((_local2.height / m_phys_scale) / 2)); _local4.density = 10; _local4.friction = 0.1; _local4.restitution = 0.2; _local5 = new b2PolygonDef(); _local5.SetAsOrientedBox((47 / m_phys_scale), (8 / m_phys_scale), new b2Vec2((47 / m_phys_scale), -1.45), 0); _local5.density = 1; _local4.friction = 0.1; _local4.restitution = 0.2; _local6 = m_world.CreateBody(_local3); _local6.CreateShape(_local4); _local6.CreateShape(_local5); _local6.SetMassFromShapes(); _local6.SetBullet(true); } public function showAllShapes(_arg1):void{ var _local2:MovieClip; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:Object; _local3 = 0; while (_local3 < 10) { _local6 = 0; while (_local6 < level.numChildren) { _local7 = level.getChildAt(_local6); if (((((!((_local7.toString() == "[object TextField]"))) && (!((_local7.toString() == "[object StaticText]"))))) && (!((_local7 is SimpleButton))))){ _local2 = MovieClip(_local7); if (((((_local2.hasOwnProperty("shapeObj")) && (_local2.hasOwnProperty("typeObj")))) && ((_local2.typeObj.text == "NoPlay")))){ level.removeChild(_local2); }; }; _local6++; }; _local3++; }; _local4 = 0; _local5 = _arg1; while (allShape[(tekLevel - 1)][_local5]) { shapeType = allShape[(tekLevel - 1)][_local5]; if (shapeType == c){ _local2 = new ball(); }; if (shapeType == r){ _local2 = new box(); }; if (shapeType == b){ _local2 = new dinElementBOCHKA_D(); }; if (shapeType == bm){ _local2 = new dinElementBOCHKA(); }; _local2.typeObj.text = "NoPlay"; _local2.x = (30 + _local4); _local2.y = 55; _local2.width = 35; _local2.height = 35; _local2.alpha = 0.5; level.addChild(_local2); level.setChildIndex(_local2, (level.numChildren - 2)); _local2.name = ("qw_" + _local4); _local4 = (_local4 + 40); _local5++; }; } public function go_bubble_instr(_arg1:MouseEvent){ goToLink("instruction"); } public function addKrysha(_arg1:Object):void{ var _local2:*; var _local3:b2BodyDef; var _local4:b2PolygonDef; var _local5:b2PolygonDef; var _local6:b2Body; _local2 = _arg1; _local3 = new b2BodyDef(); _local3.position.x = (_local2.x / m_phys_scale); _local3.position.y = (_local2.y / m_phys_scale); _local3.angle = 0.09; _local3.userData = _local2; _local4 = new b2PolygonDef(); _local4.SetAsBox(((15 / m_phys_scale) / 2), ((_local2.height / m_phys_scale) / 2)); _local4.density = 6; _local4.friction = 0.1; _local4.restitution = 0.2; _local5 = new b2PolygonDef(); _local5.SetAsOrientedBox((47 / m_phys_scale), (8 / m_phys_scale), new b2Vec2((47 / m_phys_scale), -1.45), 0); _local5.density = 1; _local4.friction = 0.1; _local4.restitution = 0.2; _local6 = m_world.CreateBody(_local3); _local6.CreateShape(_local4); _local6.CreateShape(_local5); _local6.SetMassFromShapes(); _local6.SetBullet(true); } public function back_menu_after_clear(_arg1:MouseEvent){ clearGame(); removeChild(myPlayAgain); go_game(null); } public function back_menu_from_quations(_arg1:MouseEvent){ myPlayAgain.butOk.removeEventListener(MouseEvent.CLICK, back_menu_after_clear); myPlayAgain.butNo.removeEventListener(MouseEvent.CLICK, back_menu_from_quations); removeChild(myPlayAgain); } public function digestTimerListener(_arg1:TimerEvent):void{ var _local2:String; if (rezhim != "game"){ return; }; levelScores--; if (levelScores < 0){ levelScores = 0; }; _local2 = levelScores.toString(); while (_local2.length < 4) { _local2 = ("0" + _local2); }; myPanel.timeLevel_text.text = ("score: " + _local2); } public function mousePressed(_arg1:MouseEvent){ var _local2:*; var _local3:*; if (rezhim != "game"){ return; }; _local2 = _arg1.stageX; _local3 = _arg1.stageY; if (_local3 < 240){ yDownMax = 240; }; if (((hitTest) && (shapeType))){ play_Sound(myNoShape); }; } public function go_Anton(_arg1:Event){ var _local2:URLRequest; _local2 = new URLRequest("mailto:arosw@mail.ru"); navigateToURL(_local2, "_blank"); } public function atakaNow(){ var _local1:MovieClip; var _local2:int; var _local3:int; var _local4:String; var _local5:record; if (zt > q){ myOblako.x = (n - 30); myOblako.y = 80; _local1 = new bomb(); _local1.x = n; _local1.y = 80; level.addChild(_local1); level.setChildIndex(_local1, (level.numChildren - 2)); addCircle(_local1); n = (n + 5); zt = 0; if ((((((((n > 700)) && (!(pelenaStart)))) && (!(timeVsryv)))) && ((level.val_1.currentLabel == "zhdem")))){ level.val_1.gotoAndPlay("raduemsya"); if (level.getChildByName("val_2")){ level.val_2.gotoAndPlay("raduemsya"); }; play_Sound(myHa_ha); }; if ((((((n == 150)) && (!((tekLevel == 16))))) && (!((tekLevel == 6))))){ _local2 = Math.round((Math.random() * 10)); if (_local2 > 4){ play_Sound(myOy); } else { play_Sound(myOoo); }; }; if ((((((n > 900)) && (!(pelenaStart)))) && (!(timeVsryv)))){ level.removeChild(myOblako); if (level.getChildByName("val_2")){ level.val_2.gotoAndPlay("raduemsya"); }; if (massivScores[(tekLevel - 1)] < levelScores){ _local5 = new record(); _local5.x = 170; _local5.y = 100; waitNewRecord = (getTimer() + 4000); level.addChild(_local5); }; if ((((massivScores[(tekLevel - 1)] < levelScores)) || (!(massivScores[(tekLevel - 1)])))){ massivScores[(tekLevel - 1)] = levelScores; _so = SharedObject.getLocal(nameGame); _so.data[("level_" + tekLevel)] = levelScores; _so.flush(); }; allScores = 0; pelenaStart = true; level.setChildIndex(mcPelena, (level.numChildren - 1)); _local3 = 0; while (_local3 < massivScores.length) { allScores = (allScores + massivScores[_local3]); _local3++; }; _local4 = allScores.toString(); while (_local4.length < 4) { _local4 = ("0" + _local4); }; myPanel.timeTotal_text.text = ("total: " + _local4); _so = SharedObject.getLocal(nameGame); _so.data["allScores"] = allScores; _so.flush(); isLevelWasProyden = true; tekLevel++; if (tekLevel > 20){ tekLevel = 1; gameWazProydena = true; }; }; }; zt++; } public function clearGame(){ tekLevel = 1; while (tekLevel < 21) { massivScores[(tekLevel - 1)] = -1; _so.data[("level_" + tekLevel)] = -1; _so.flush(); tekLevel++; }; massivScores.length = 0; allScores = 0; showPozdr = true; tekLevel = 1; _so.data.allScores = null; _so.data.namePlayer = null; _so.flush(); gameWazProydena = false; rezhim = "menu"; setChildIndex(myMenu, (numChildren - 1)); myPanel.timeTotal_text.text = "total: 0000"; myPanel.timeLevel_text.text = "level: 0000"; hidePlayButtons(); myMenu.butBack.removeEventListener(MouseEvent.CLICK, back_game); myMenu.butBack.addEventListener(MouseEvent.CLICK, go_game); } public function go_Music(_arg1:MouseEvent){ if (isMusic){ myMenu.onMusic.gotoAndStop("off"); isMusic = false; _so.data.isMusic = "x"; musicMenuChannel.stop(); } else { myMenu.onMusic.gotoAndStop("on"); isMusic = true; _so.data.isMusic = null; musicMenuTransform.volume = MusicMenuVal; musicMenuChannel = myMusicMenu.play(0, 10, musicMenuTransform); }; } function delete_level(_arg1){ var _local2:b2Body; _local2 = m_world.m_bodyList; while (_local2) { m_world.DestroyBody(_local2); if ((_local2.m_userData is Sprite)){ _arg1.removeChild(_local2.m_userData); _local2.m_userData = null; }; _local2 = _local2.m_next; }; removeChild(_arg1); } public function button_Pressed(_arg1:MouseEvent){ } public static function goToLink(_arg1:String){ var _local2:Number; var _local3:*; var _local4:URLRequest; _local2 = 1541; _local3 = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + _local2) + "&subid="); if (_arg1.length == 0){ _arg1 = "undef"; }; _local3 = (_local3 + _arg1); if (_arg1 == "addtosite"){ _local3 = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + _local2) + "&subid=addToSite&action=addtosite"); }; if (_arg1 == "walk"){ _local3 = "http://www.bubblebox.com/clickreg.php?type=gamestats&id=1541&subid=walkthrough&action=walkthrough_coverorange"; }; if (_arg1 == "highscore"){ _local3 = (("http://www.bubblebox.com/clickreg.php?type=gamestats&id=" + _local2) + "&subid=highscores&action=viewscores"); }; _local4 = new URLRequest(_local3); navigateToURL(_local4, "_blank"); } } }//package
Section 171
//mama (mama) package { import flash.media.*; public dynamic class mama extends Sound { } }//package
Section 172
//max (max) package { import flash.display.*; public dynamic class max extends SimpleButton { } }//package
Section 173
//menu (menu) package { import flash.display.*; public dynamic class menu extends MovieClip { public var butBack:button_back; public var butInstr:button_instruction; public var addtosite:button_liders; public var highscore:button_highscore; public var bubble_menu:bubblebox_logo_ro1; public var butLevels:button_levels; public var butPlay:button_start; public var onSound:onSoundes; public var moreGames:button_more_games; public var onMusic:onMusices; public var butCredits:button_credits; } }//package
Section 174
//menu_mp3 (menu_mp3) package { import flash.media.*; public dynamic class menu_mp3 extends Sound { } }//package
Section 175
//micro (micro) package { import flash.display.*; public dynamic class micro extends MovieClip { } }//package
Section 176
//mmm (mmm) package { import flash.media.*; public dynamic class mmm extends Sound { } }//package
Section 177
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 178
//music (music) package { import flash.media.*; public dynamic class music extends Sound { } }//package
Section 179
//nextLevel (nextLevel) package { import flash.display.*; public dynamic class nextLevel extends MovieClip { } }//package
Section 180
//noShape (noShape) package { import flash.media.*; public dynamic class noShape extends Sound { } }//package
Section 181
//oblako (oblako) package { import flash.display.*; public dynamic class oblako extends MovieClip { } }//package
Section 182
//oblakoSound_0 (oblakoSound_0) package { import flash.media.*; public dynamic class oblakoSound_0 extends Sound { } }//package
Section 183
//oblakoSound_1 (oblakoSound_1) package { import flash.media.*; public dynamic class oblakoSound_1 extends Sound { } }//package
Section 184
//oblakoSound_2 (oblakoSound_2) package { import flash.media.*; public dynamic class oblakoSound_2 extends Sound { } }//package
Section 185
//onMusices (onMusices) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class onMusices extends MovieClip { public function onMusices(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 186
//onSoundes (onSoundes) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class onSoundes extends MovieClip { public function onSoundes(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 187
//ooo (ooo) package { import flash.media.*; public dynamic class ooo extends Sound { } }//package
Section 188
//oy (oy) package { import flash.media.*; public dynamic class oy extends Sound { } }//package
Section 189
//oyi (oyi) package { import flash.media.*; public dynamic class oyi extends Sound { } }//package
Section 190
//p1 (p1) package { import flash.display.*; public dynamic class p1 extends MovieClip { } }//package
Section 191
//panel (panel) package { import flash.display.*; import flash.text.*; public dynamic class panel extends MovieClip { public var timeTotal_text:TextField; public var level_text:TextField; public var butSolution:button_solution; public var butReset:button_reset; public var butMenu:button_menu; public var butSelectLevel:button_levels; public var timeLevel_text:TextField; } }//package
Section 192
//pay (pay) package { import flash.media.*; public dynamic class pay extends Sound { } }//package
Section 193
//pelena (pelena) package { import flash.display.*; public dynamic class pelena extends MovieClip { } }//package
Section 194
//pim (pim) package { import flash.media.*; public dynamic class pim extends Sound { } }//package
Section 195
//playAgain (playAgain) package { import flash.display.*; public dynamic class playAgain extends MovieClip { public var butNo:cancel; public var butOk:button_ok; } }//package
Section 196
//pozdravlenie (pozdravlenie) package { import flash.display.*; import flash.text.*; public dynamic class pozdravlenie extends MovieClip { public var butOk:button_ok; public var namePlayer:bubblebox_submit_score; public var totalScore:TextField; public var bubble_pozdr:bubblebox_logo_ro1; } }//package
Section 197
//pum (pum) package { import flash.media.*; public dynamic class pum extends Sound { } }//package
Section 198
//ramka (ramka) package { import flash.display.*; public dynamic class ramka extends MovieClip { } }//package
Section 199
//record (record) package { import flash.display.*; public dynamic class record extends MovieClip { } }//package
Section 200
//regionObl (regionObl) package { import flash.display.*; public dynamic class regionObl extends MovieClip { } }//package
Section 201
//select_levels (select_levels) package { import flash.display.*; import flash.text.*; public dynamic class select_levels extends MovieClip { public var bubble_selector:bubblebox_logo_ro1; public var lcor_1:TextField; public var lcor_2:TextField; public var lcor_3:TextField; public var lcor_4:TextField; public var lcor_5:TextField; public var lcor_6:TextField; public var l_10:littl; public var lcor_8:TextField; public var lcor_9:TextField; public var l_13:littl; public var l_14:littl; public var l_15:littl; public var l_16:littl; public var lcor_7:TextField; public var l_11:littl; public var l_12:littl; public var l_17:littl; public var l_18:littl; public var lcor_10:TextField; public var lcor_11:TextField; public var lcor_12:TextField; public var lcor_13:TextField; public var lcor_14:TextField; public var lcor_15:TextField; public var lcor_16:TextField; public var lcor_17:TextField; public var lcor_18:TextField; public var lcor_19:TextField; public var l_20:littl; public var l_19:littl; public var lcor_20:TextField; public var l_1:littl; public var l_3:littl; public var l_5:littl; public var l_6:littl; public var l_8:littl; public var l_9:littl; public var l_7:littl; public var l_2:littl; public var l_4:littl; public var namePlayer:bubblebox_submit_score; public var total_scores:TextField; public var butMenu:button_menu; public var myRamka:ramka; } }//package
Section 202
//sht (sht) package { import flash.media.*; public dynamic class sht extends Sound { } }//package
Section 203
//startPelena (startPelena) package { import flash.display.*; public dynamic class startPelena extends MovieClip { } }//package
Section 204
//statElementBox (statElementBox) package { import flash.display.*; import flash.text.*; public dynamic class statElementBox extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 205
//statElementCircle (statElementCircle) package { import flash.display.*; import flash.text.*; public dynamic class statElementCircle extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 206
//stop_level (stop_level) package { import flash.display.*; public dynamic class stop_level extends MovieClip { } }//package
Section 207
//the_box (the_box) package { import flash.display.*; import flash.text.*; public dynamic class the_box extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 208
//tringl_din (tringl_din) package { import flash.display.*; import flash.text.*; public dynamic class tringl_din extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 209
//tringl_stat (tringl_stat) package { import flash.display.*; import flash.text.*; public dynamic class tringl_stat extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; } }//package
Section 210
//values (values) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class values extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; public function values(){ addFrameScript(1, frame2, 15, frame16, 41, frame42, 51, frame52, 69, frame70, 86, frame87, 180, frame181, 221, frame222, 276, frame277, 324, frame325); } function frame277(){ stop(); } function frame70(){ gotoAndPlay("standart"); } function frame325(){ stop(); } function frame87(){ gotoAndPlay("standart"); } function frame16(){ stop(); } function frame181(){ gotoAndPlay("plakaem"); } function frame2(){ stop(); } function frame222(){ stop(); stop(); } function frame42(){ gotoAndStop("standart"); } function frame52(){ gotoAndPlay("vertimZrachki"); } } }//package
Section 211
//values111 (values111) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public dynamic class values111 extends MovieClip { public var typeObj:TextField; public var shapeObj:TextField; public function values111(){ addFrameScript(68, frame69); } function frame69(){ stop(); } } }//package
Section 212
//zastavka (zastavka) package { import flash.display.*; public dynamic class zastavka extends MovieClip { } }//package
Section 213
//надпись (надпись) package { import flash.display.*; public dynamic class надпись extends MovieClip { } }//package
Section 214
//Символ5 (Символ5) package { import flash.display.*; public dynamic class Символ5 extends SimpleButton { } }//package
Section 215
//Символ7 (Символ7) package { import flash.display.*; public dynamic class Символ7 extends SimpleButton { } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {zastavka}Uses:1
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClip {startPelena}Uses:3Used by:1010
Symbol 5 GraphicUsed by:8 11 16
Symbol 6 GraphicUsed by:7 8
Symbol 7 MovieClipUses:6Used by:8
Symbol 8 MovieClip {bubblebox_submit_score_fla.bubblebox_try_again_10}Uses:5 6 7Used by:33
Symbol 9 GraphicUsed by:10 11 233
Symbol 10 MovieClipUses:9Used by:11
Symbol 11 MovieClip {bubblebox_submit_score_fla.bubblebox_view_scores_8}Uses:5 9 10Used by:33
Symbol 12 GraphicUsed by:13 233
Symbol 13 MovieClipUses:12Used by:16
Symbol 14 GraphicUsed by:15 33 940
Symbol 15 MovieClipUses:14Used by:16
Symbol 16 MovieClip {bubblebox_submit_score_fla.bubblebox_saving_5}Uses:5 13 15Used by:33
Symbol 17 BitmapUsed by:18
Symbol 18 GraphicUses:17Used by:19 33
Symbol 19 MovieClip {bubblebox_submit_score_fla.bblogo_4}Uses:18Used by:33
Symbol 20 GraphicUsed by:24
Symbol 21 GraphicUsed by:24
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:24
Symbol 24 MovieClip {bubblebox_submit_score_fla.bubblebox_send_btn_2}Uses:20 21 23Used by:33
Symbol 25 GraphicUsed by:33
Symbol 26 GraphicUsed by:33
Symbol 27 FontUsed by:28 31 37 38 42 43 46 47 50 51 53 54 56 57 59 60 62 63 67 68 70 71 73 74 76 77 79 80 84 85 89 90 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 130 131 132 133 134 135 136 137 138 139 140 141 143 144 204 205 338 339 341 342 345 346 348 349 352 353 356 357 366 367 371 372 375 376 378 379 382 383 385 386 389 390 392 393 395 396 399 400 404 405 409 410 412 413 418 419 421 424 425 428 429 432 433 441 442 446 447 451 452 456 457 460 461 465 466 467 468 470 471 473 474 477 478 481 482 485 486 489 490 493 494 495 496 497 498 499 500 501 502 504 505 518 519 523 524 533 534 535 536 537 538 539 540 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 566 567 579 580 582 583 586 587 589 590 592 593 595 596 598 599 601 602 610 611 614 615 618 619 622 623 626 627 631 632 643 644 645 646 647 648 649 650 651 652 654 655 657 658 660 661 663 664 666 667 669 670 671 672 673 674 675 676 677 678 679 680 681 682 684 685 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 768 769 777 778 803 804 806 807 838 852 856 857 858 859 868 875 876 953 954
Symbol 28 TextUses:27Used by:33
Symbol 29 FontUsed by:30 32 231
Symbol 30 EditableTextUses:29Used by:33
Symbol 31 EditableTextUses:27Used by:33
Symbol 32 EditableTextUses:29Used by:33
Symbol 33 MovieClip {bubblebox_submit_score}Uses:25 26 24 28 19 14 30 16 11 31 8 32 18Used by:901 931
Symbol 34 BitmapUsed by:35 87 604 629 951
Symbol 35 GraphicUses:34Used by:145 737
Symbol 36 GraphicUsed by:145
Symbol 37 EditableTextUses:27Used by:145
Symbol 38 EditableTextUses:27Used by:145
Symbol 39 GraphicUsed by:145 737
Symbol 40 GraphicUsed by:145 737
Symbol 41 GraphicUsed by:145 737
Symbol 42 EditableTextUses:27Used by:145
Symbol 43 EditableTextUses:27Used by:145
Symbol 44 GraphicUsed by:145 737
Symbol 45 GraphicUsed by:145 737
Symbol 46 EditableTextUses:27Used by:145
Symbol 47 EditableTextUses:27Used by:145
Symbol 48 GraphicUsed by:145 737
Symbol 49 GraphicUsed by:145 737
Symbol 50 EditableTextUses:27Used by:145
Symbol 51 EditableTextUses:27Used by:145
Symbol 52 GraphicUsed by:145
Symbol 53 EditableTextUses:27Used by:145
Symbol 54 EditableTextUses:27Used by:145
Symbol 55 GraphicUsed by:145 737
Symbol 56 EditableTextUses:27Used by:145
Symbol 57 EditableTextUses:27Used by:145
Symbol 58 GraphicUsed by:145 737
Symbol 59 EditableTextUses:27Used by:145
Symbol 60 EditableTextUses:27Used by:145
Symbol 61 GraphicUsed by:145 737
Symbol 62 EditableTextUses:27Used by:145
Symbol 63 EditableTextUses:27Used by:145
Symbol 64 GraphicUsed by:145 737
Symbol 65 GraphicUsed by:145 737
Symbol 66 GraphicUsed by:145 737
Symbol 67 EditableTextUses:27Used by:145
Symbol 68 EditableTextUses:27Used by:145
Symbol 69 GraphicUsed by:145 737
Symbol 70 EditableTextUses:27Used by:145
Symbol 71 EditableTextUses:27Used by:145
Symbol 72 GraphicUsed by:145 737
Symbol 73 EditableTextUses:27Used by:145
Symbol 74 EditableTextUses:27Used by:145
Symbol 75 GraphicUsed by:145 737
Symbol 76 EditableTextUses:27Used by:145
Symbol 77 EditableTextUses:27Used by:145
Symbol 78 GraphicUsed by:145 737
Symbol 79 EditableTextUses:27Used by:145
Symbol 80 EditableTextUses:27Used by:145
Symbol 81 GraphicUsed by:145 737
Symbol 82 GraphicUsed by:145 737
Symbol 83 GraphicUsed by:145 737
Symbol 84 EditableTextUses:27Used by:145
Symbol 85 EditableTextUses:27Used by:145
Symbol 86 GraphicUsed by:145 737
Symbol 87 GraphicUses:34Used by:145
Symbol 88 GraphicUsed by:145 737
Symbol 89 EditableTextUses:27Used by:145
Symbol 90 EditableTextUses:27Used by:145
Symbol 91 GraphicUsed by:145 737
Symbol 92 GraphicUsed by:145 737
Symbol 93 GraphicUsed by:145 737
Symbol 94 GraphicUsed by:145 737
Symbol 95 EditableTextUses:27Used by:145
Symbol 96 EditableTextUses:27Used by:145
Symbol 97 EditableTextUses:27Used by:145
Symbol 98 EditableTextUses:27Used by:145
Symbol 99 EditableTextUses:27Used by:145
Symbol 100 EditableTextUses:27Used by:145
Symbol 101 EditableTextUses:27Used by:145
Symbol 102 EditableTextUses:27Used by:145
Symbol 103 EditableTextUses:27Used by:145
Symbol 104 EditableTextUses:27Used by:145
Symbol 105 EditableTextUses:27Used by:145
Symbol 106 EditableTextUses:27Used by:145
Symbol 107 EditableTextUses:27Used by:145
Symbol 108 EditableTextUses:27Used by:145
Symbol 109 EditableTextUses:27Used by:145
Symbol 110 EditableTextUses:27Used by:145
Symbol 111 EditableTextUses:27Used by:145
Symbol 112 EditableTextUses:27Used by:145
Symbol 113 EditableTextUses:27Used by:145
Symbol 114 EditableTextUses:27Used by:145
Symbol 115 EditableTextUses:27Used by:145
Symbol 116 EditableTextUses:27Used by:145
Symbol 117 EditableTextUses:27Used by:145
Symbol 118 EditableTextUses:27Used by:145
Symbol 119 EditableTextUses:27Used by:145
Symbol 120 EditableTextUses:27Used by:145
Symbol 121 EditableTextUses:27Used by:145
Symbol 122 EditableTextUses:27Used by:145
Symbol 123 EditableTextUses:27Used by:145
Symbol 124 EditableTextUses:27Used by:145
Symbol 125 EditableTextUses:27Used by:145
Symbol 126 EditableTextUses:27Used by:145
Symbol 127 EditableTextUses:27Used by:145
Symbol 128 EditableTextUses:27Used by:145
Symbol 129 GraphicUsed by:145 737
Symbol 130 EditableTextUses:27Used by:145
Symbol 131 EditableTextUses:27Used by:145
Symbol 132 EditableTextUses:27Used by:145
Symbol 133 EditableTextUses:27Used by:145
Symbol 134 EditableTextUses:27Used by:145
Symbol 135 EditableTextUses:27Used by:145
Symbol 136 EditableTextUses:27Used by:145
Symbol 137 EditableTextUses:27Used by:145
Symbol 138 EditableTextUses:27Used by:145
Symbol 139 EditableTextUses:27Used by:145
Symbol 140 EditableTextUses:27Used by:145
Symbol 141 EditableTextUses:27Used by:145
Symbol 142 GraphicUsed by:145 737
Symbol 143 EditableTextUses:27Used by:145
Symbol 144 EditableTextUses:27Used by:145
Symbol 145 MovieClip {values111}Uses:35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144Used by:827 877 880
Symbol 146 GraphicUsed by:147 766
Symbol 147 ButtonUses:146Used by:179
Symbol 148 GraphicUsed by:179 1010
Symbol 149 BitmapUsed by:150 163
Symbol 150 GraphicUses:149Used by:179 1010
Symbol 151 GraphicUsed by:179 1010
Symbol 152 GraphicUsed by:179 1010
Symbol 153 GraphicUsed by:179 1010
Symbol 154 GraphicUsed by:179 1010
Symbol 155 GraphicUsed by:179 1010
Symbol 156 GraphicUsed by:179 1010
Symbol 157 GraphicUsed by:179 1010
Symbol 158 GraphicUsed by:179 1010
Symbol 159 GraphicUsed by:179 1010
Symbol 160 GraphicUsed by:179 1010
Symbol 161 GraphicUsed by:179 1010
Symbol 162 GraphicUsed by:179 1010
Symbol 163 GraphicUses:149Used by:179 1010
Symbol 164 GraphicUsed by:177
Symbol 165 GraphicUsed by:177 1010
Symbol 166 GraphicUsed by:177 1010
Symbol 167 GraphicUsed by:177
Symbol 168 GraphicUsed by:177 1010
Symbol 169 GraphicUsed by:177
Symbol 170 GraphicUsed by:177 1010
Symbol 171 GraphicUsed by:177 1010
Symbol 172 GraphicUsed by:177
Symbol 173 GraphicUsed by:177
Symbol 174 GraphicUsed by:177
Symbol 175 GraphicUsed by:177
Symbol 176 GraphicUsed by:177
Symbol 177 MovieClipUses:164 165 166 167 168 169 170 171 172 173 174 175 176Used by:178
Symbol 178 MovieClip {CoverOrange_cpmStar_2_fla.bubble_logo3_100}Uses:177Used by:179 1010
Symbol 179 MovieClip {Intro}Uses:147 148 150 151 152 153 154 155 156 157 158 159 160 161 162 163 178Used by:1010
Symbol 180 BitmapUsed by:181 218 950
Symbol 181 GraphicUses:180Used by:203
Symbol 182 BitmapUsed by:183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 951
Symbol 183 GraphicUses:182Used by:203
Symbol 184 GraphicUses:182Used by:203
Symbol 185 GraphicUses:182Used by:203
Symbol 186 GraphicUses:182Used by:203
Symbol 187 GraphicUses:182Used by:203
Symbol 188 GraphicUses:182Used by:203
Symbol 189 GraphicUses:182Used by:203
Symbol 190 GraphicUses:182Used by:203
Symbol 191 GraphicUses:182Used by:203
Symbol 192 GraphicUses:182Used by:203
Symbol 193 GraphicUses:182Used by:203
Symbol 194 GraphicUses:182Used by:203
Symbol 195 GraphicUses:182Used by:203
Symbol 196 GraphicUses:182Used by:203
Symbol 197 GraphicUses:182Used by:203
Symbol 198 GraphicUses:182Used by:203
Symbol 199 GraphicUses:182Used by:203
Symbol 200 GraphicUses:182Used by:203
Symbol 201 GraphicUses:182Used by:203
Symbol 202 GraphicUses:182Used by:203
Symbol 203 MovieClipUses:181 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202Used by:Timeline
Symbol 204 EditableTextUses:27 206Used by:Timeline
Symbol 205 EditableTextUses:27 206Used by:Timeline
Symbol 206 FontUsed by:204 205 207 826 868 869 871
Symbol 207 EditableTextUses:206Used by:Timeline
Symbol 208 GraphicUsed by:209 285 314
Symbol 209 MovieClipUses:208Used by:217 244 251 258 261 264 269 277 284 301 308 313
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClipUses:210Used by:217
Symbol 212 GraphicUsed by:213
Symbol 213 MovieClipUses:212Used by:217
Symbol 214 GraphicUsed by:215
Symbol 215 MovieClipUses:214Used by:217
Symbol 216 GraphicUsed by:217 244 251 258 261 264 269 277 284 292 301 308 319
Symbol 217 Button {button_start}Uses:209 211 213 215 216Used by:880 1010  Timeline
Symbol 218 GraphicUses:180Used by:Timeline
Symbol 219 GraphicUsed by:1010
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:223 227 228 1010
Symbol 222 GraphicUsed by:223 228
Symbol 223 MovieClip {bubblknopks_4}Uses:221 222Used by:228
Symbol 224 GraphicUsed by:225 228
Symbol 225 MovieClipUses:224Used by:228
Symbol 226 GraphicUsed by:227
Symbol 227 MovieClip {bubblknopks_3}Uses:221 226Used by:228
Symbol 228 Button {bubblebox_logo_ro1}Uses:223 225 227 221 222 224Used by:827 877 880 901 931 1010
Symbol 229 GraphicUsed by:233
Symbol 230 GraphicUsed by:233
Symbol 231 EditableTextUses:29Used by:233
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClip {bubblebox_score}Uses:229 230 231 12 9 232Used by:1010
Symbol 234 FontUsed by:235 293 320 332 334 812 825 841 849 883 887 888 889 896 899 900 902 929 930
Symbol 235 EditableTextUses:234 898Used by:236
Symbol 236 Button {anton}Uses:235Used by:827 1010
Symbol 237 GraphicUsed by:1010
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClipUses:238Used by:244
Symbol 240 GraphicUsed by:241
Symbol 241 MovieClipUses:240Used by:244
Symbol 242 GraphicUsed by:243
Symbol 243 MovieClipUses:242Used by:244
Symbol 244 Button {button_back}Uses:209 239 241 243 216Used by:880 1010
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClipUses:245Used by:251
Symbol 247 GraphicUsed by:248
Symbol 248 MovieClipUses:247Used by:251
Symbol 249 GraphicUsed by:250
Symbol 250 MovieClipUses:249Used by:251
Symbol 251 Button {button_credits}Uses:209 246 248 250 216Used by:880 1010
Symbol 252 GraphicUsed by:253
Symbol 253 MovieClipUses:252Used by:258
Symbol 254 GraphicUsed by:255
Symbol 255 MovieClipUses:254Used by:258
Symbol 256 GraphicUsed by:257
Symbol 257 MovieClipUses:256Used by:258
Symbol 258 Button {button_highscore}Uses:209 253 255 257 216Used by:880 1010
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClipUses:259Used by:261
Symbol 261 Button {button_instruction}Uses:209 260 216Used by:880 1010
Symbol 262 GraphicUsed by:263
Symbol 263 MovieClipUses:262Used by:264 269
Symbol 264 Button {button_levels}Uses:209 263 216Used by:880 891 1010
Symbol 265 GraphicUsed by:266
Symbol 266 MovieClipUses:265Used by:269
Symbol 267 GraphicUsed by:268
Symbol 268 MovieClipUses:267Used by:269
Symbol 269 Button {button_levels_2}Uses:209 263 266 268 216Used by:1010
Symbol 270 GraphicUsed by:271
Symbol 271 MovieClipUses:270Used by:277
Symbol 272 GraphicUsed by:273
Symbol 273 MovieClipUses:272Used by:277
Symbol 274 GraphicUsed by:275
Symbol 275 MovieClipUses:274Used by:277
Symbol 276 MovieClipUsed by:277
Symbol 277 Button {button_liders}Uses:209 271 273 275 276 216Used by:880 1010
Symbol 278 GraphicUsed by:279
Symbol 279 MovieClipUses:278Used by:284
Symbol 280 GraphicUsed by:281
Symbol 281 MovieClipUses:280Used by:284
Symbol 282 GraphicUsed by:283
Symbol 283 MovieClipUses:282Used by:284
Symbol 284 Button {button_menu}Uses:209 279 281 283 216Used by:827 877 891 931 1010
Symbol 285 MovieClipUses:208Used by:292
Symbol 286 GraphicUsed by:287
Symbol 287 MovieClipUses:286Used by:292
Symbol 288 GraphicUsed by:289
Symbol 289 MovieClipUses:288Used by:292
Symbol 290 GraphicUsed by:291
Symbol 291 MovieClipUses:290Used by:292
Symbol 292 Button {button_more_games}Uses:285 287 289 291 216Used by:880 1010
Symbol 293 EditableTextUses:234 898Used by:294
Symbol 294 Button {button_Nata}Uses:293Used by:827 1010
Symbol 295 GraphicUsed by:296
Symbol 296 MovieClipUses:295Used by:301
Symbol 297 GraphicUsed by:298
Symbol 298 MovieClipUses:297Used by:301
Symbol 299 GraphicUsed by:300
Symbol 300 MovieClipUses:299Used by:301
Symbol 301 Button {button_ok}Uses:209 296 298 300 216Used by:842 901 1010
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClipUses:302Used by:308
Symbol 304 GraphicUsed by:305
Symbol 305 MovieClipUses:304Used by:308
Symbol 306 GraphicUsed by:307
Symbol 307 MovieClipUses:306Used by:308
Symbol 308 Button {button_reset}Uses:209 303 305 307 216Used by:891 1010
Symbol 309 BitmapUsed by:310 311 312
Symbol 310 GraphicUses:309Used by:313
Symbol 311 GraphicUses:309Used by:313
Symbol 312 GraphicUses:309Used by:313
Symbol 313 Button {button_solution}Uses:209 310 311 312Used by:891 1010
Symbol 314 MovieClipUses:208Used by:319
Symbol 315 BitmapUsed by:316 317 318
Symbol 316 GraphicUses:315Used by:319
Symbol 317 GraphicUses:315Used by:319
Symbol 318 GraphicUses:315Used by:319
Symbol 319 Button {cancel}Uses:314 316 317 318 216Used by:842 1010
Symbol 320 EditableTextUses:234 898Used by:321
Symbol 321 Button {max}Uses:320Used by:827 1010
Symbol 322 GraphicUsed by:1010
Symbol 323 BitmapUsed by:324
Symbol 324 GraphicUses:323Used by:1010
Symbol 325 GraphicUsed by:326
Symbol 326 MovieClip {надпись}Uses:325Used by:1010
Symbol 327 BitmapUsed by:331
Symbol 328 BitmapUsed by:331
Symbol 329 BitmapUsed by:331
Symbol 330 BitmapUsed by:331
Symbol 331 GraphicUses:327 328 329 330Used by:1010
Symbol 332 EditableTextUses:234 898Used by:333
Symbol 333 Button {Символ5}Uses:332Used by:827 1010
Symbol 334 EditableTextUses:234 898Used by:335
Symbol 335 Button {Символ7}Uses:334Used by:827 1010
Symbol 336 BitmapUsed by:337 450 951
Symbol 337 GraphicUses:336Used by:340
Symbol 338 EditableTextUses:27Used by:340
Symbol 339 EditableTextUses:27Used by:340
Symbol 340 MovieClip {dinElementBOX_G}Uses:337 338 339Used by:343 785 790 791 792 794 795 796 797 801 810 1010
Symbol 341 EditableTextUses:27Used by:343
Symbol 342 EditableTextUses:27Used by:343
Symbol 343 MovieClip {dinElementBOX_V}Uses:340 341 342Used by:785 787 789 795 800 1010
Symbol 344 GraphicUsed by:350
Symbol 345 EditableTextUses:27Used by:350
Symbol 346 EditableTextUses:27Used by:350
Symbol 347 GraphicUsed by:350
Symbol 348 EditableTextUses:27Used by:350
Symbol 349 EditableTextUses:27Used by:350
Symbol 350 MovieClip {dinElementCircle}Uses:344 345 346 347 348 349Used by:789 790 801 1010
Symbol 351 GraphicUsed by:354
Symbol 352 EditableTextUses:27Used by:354
Symbol 353 EditableTextUses:27Used by:354
Symbol 354 MovieClip {dverca_din}Uses:351 352 353Used by:1010
Symbol 355 GraphicUsed by:362
Symbol 356 EditableTextUses:27Used by:362
Symbol 357 EditableTextUses:27Used by:362
Symbol 358 GraphicUsed by:362
Symbol 359 GraphicUsed by:360
Symbol 360 MovieClip {kreplenie}Uses:359Used by:362 369
Symbol 361 GraphicUsed by:362
Symbol 362 MovieClip {gvozd_prav}Uses:355 356 357 358 360 361Used by:810 1010
Symbol 363 GraphicUsed by:364
Symbol 364 MovieClip {joint}Uses:363Used by:796 798 799 800 810 1010
Symbol 365 GraphicUsed by:369
Symbol 366 EditableTextUses:27Used by:369
Symbol 367 EditableTextUses:27Used by:369
Symbol 368 GraphicUsed by:369
Symbol 369 MovieClip {kacheli_din}Uses:365 366 367 360 368Used by:798 1010
Symbol 370 GraphicUsed by:374
Symbol 371 EditableTextUses:27Used by:374
Symbol 372 EditableTextUses:27Used by:374
Symbol 373 GraphicUsed by:374
Symbol 374 MovieClip {kacheliD_din}Uses:370 371 372 373Used by:1010
Symbol 375 EditableTextUses:27Used by:381
Symbol 376 EditableTextUses:27Used by:381
Symbol 377 GraphicUsed by:381
Symbol 378 EditableTextUses:27Used by:381
Symbol 379 EditableTextUses:27Used by:381
Symbol 380 GraphicUsed by:381 387 391 397
Symbol 381 MovieClip {kirpich_1}Uses:375 376 377 378 379 380Used by:775 781 785 789 790 791 792 793 794 795 796 798 799 800 801 810 877 1010
Symbol 382 EditableTextUses:27Used by:387
Symbol 383 EditableTextUses:27Used by:387
Symbol 384 GraphicUsed by:387
Symbol 385 EditableTextUses:27Used by:387
Symbol 386 EditableTextUses:27Used by:387
Symbol 387 MovieClip {kirpich_2}Uses:382 383 384 385 386 380Used by:775 781 785 789 790 791 792 793 794 795 796 798 799 800 801 810 877 1010
Symbol 388 GraphicUsed by:391
Symbol 389 EditableTextUses:27Used by:391
Symbol 390 EditableTextUses:27Used by:391
Symbol 391 MovieClip {kirpich_3}Uses:388 389 390 380Used by:775 781 785 789 790 791 792 793 794 795 796 798 799 800 801 810 877 1010
Symbol 392 EditableTextUses:27Used by:397
Symbol 393 EditableTextUses:27Used by:397
Symbol 394 GraphicUsed by:397
Symbol 395 EditableTextUses:27Used by:397
Symbol 396 EditableTextUses:27Used by:397
Symbol 397 MovieClip {kirpich_4}Uses:392 393 394 395 396 380Used by:775 781 785 789 790 791 792 793 794 795 796 798 799 800 801 810 1010
Symbol 398 GraphicUsed by:402
Symbol 399 EditableTextUses:27Used by:402
Symbol 400 EditableTextUses:27Used by:402
Symbol 401 GraphicUsed by:402
Symbol 402 MovieClip {krysha}Uses:398 399 400 401Used by:1010
Symbol 403 GraphicUsed by:407
Symbol 404 EditableTextUses:27Used by:407
Symbol 405 EditableTextUses:27Used by:407
Symbol 406 GraphicUsed by:407
Symbol 407 MovieClip {kryshaL}Uses:403 404 405 406Used by:788 1010
Symbol 408 GraphicUsed by:415
Symbol 409 EditableTextUses:27Used by:415
Symbol 410 EditableTextUses:27Used by:415
Symbol 411 GraphicUsed by:415
Symbol 412 EditableTextUses:27Used by:415
Symbol 413 EditableTextUses:27Used by:415
Symbol 414 GraphicUsed by:415
Symbol 415 MovieClip {kryshaR}Uses:408 409 410 411 412 413 414Used by:788 1010
Symbol 416 GraphicUsed by:417
Symbol 417 MovieClipUses:416Used by:420 426
Symbol 418 EditableTextUses:27Used by:420
Symbol 419 EditableTextUses:27Used by:420
Symbol 420 MovieClip {krest_din}Uses:417 418 419Used by:796 1010
Symbol 421 EditableTextUses:27Used by:426
Symbol 422 GraphicUsed by:423
Symbol 423 MovieClipUses:422Used by:426
Symbol 424 EditableTextUses:27Used by:426
Symbol 425 EditableTextUses:27Used by:426
Symbol 426 MovieClip {krest_stat}Uses:421 423 417 424 425Used by:799 1010
Symbol 427 GraphicUsed by:431
Symbol 428 EditableTextUses:27Used by:431
Symbol 429 EditableTextUses:27Used by:431
Symbol 430 GraphicUsed by:431
Symbol 431 MovieClip {lopast1_box_stat}Uses:427 428 429 430Used by:800 1010
Symbol 432 EditableTextUses:27Used by:435
Symbol 433 EditableTextUses:27Used by:435
Symbol 434 GraphicUsed by:435
Symbol 435 MovieClip {lopast2_box_stat}Uses:432 433 434Used by:1010
Symbol 436 GraphicUsed by:437
Symbol 437 MovieClip {micro}Uses:436Used by:1010
Symbol 438 GraphicUsed by:439
Symbol 439 MovieClip {pelena}Uses:438Used by:1010
Symbol 440 GraphicUsed by:444
Symbol 441 EditableTextUses:27Used by:444
Symbol 442 EditableTextUses:27Used by:444
Symbol 443 GraphicUsed by:444
Symbol 444 MovieClip {statElementBox}Uses:440 441 442 443Used by:787 788 789 791 795 799 800 810 1010
Symbol 445 GraphicUsed by:449
Symbol 446 EditableTextUses:27Used by:449
Symbol 447 EditableTextUses:27Used by:449
Symbol 448 GraphicUsed by:449
Symbol 449 MovieClip {statElementCircle}Uses:445 446 447 448Used by:782 792 797 800 801 1010
Symbol 450 GraphicUses:336Used by:454
Symbol 451 EditableTextUses:27Used by:454
Symbol 452 EditableTextUses:27Used by:454
Symbol 453 GraphicUsed by:454
Symbol 454 MovieClip {the_box}Uses:450 451 452 453Used by:1010
Symbol 455 GraphicUsed by:458
Symbol 456 EditableTextUses:27Used by:458
Symbol 457 EditableTextUses:27Used by:458
Symbol 458 MovieClip {tringl_din}Uses:455 456 457Used by:1010
Symbol 459 GraphicUsed by:463
Symbol 460 EditableTextUses:27Used by:463
Symbol 461 EditableTextUses:27Used by:463
Symbol 462 GraphicUsed by:463
Symbol 463 MovieClip {tringl_stat}Uses:459 460 461 462Used by:793 794 795 796 801 810 1010
Symbol 464 GraphicUsed by:737
Symbol 465 EditableTextUses:27Used by:737
Symbol 466 EditableTextUses:27Used by:737
Symbol 467 EditableTextUses:27Used by:737
Symbol 468 EditableTextUses:27Used by:737
Symbol 469 GraphicUsed by:737
Symbol 470 EditableTextUses:27Used by:737
Symbol 471 EditableTextUses:27Used by:737
Symbol 472 GraphicUsed by:737
Symbol 473 EditableTextUses:27Used by:737
Symbol 474 EditableTextUses:27Used by:737
Symbol 475 GraphicUsed by:737
Symbol 476 GraphicUsed by:737
Symbol 477 EditableTextUses:27Used by:737
Symbol 478 EditableTextUses:27Used by:737
Symbol 479 GraphicUsed by:737
Symbol 480 GraphicUsed by:737
Symbol 481 EditableTextUses:27Used by:737
Symbol 482 EditableTextUses:27Used by:737
Symbol 483 GraphicUsed by:737
Symbol 484 GraphicUsed by:737
Symbol 485 EditableTextUses:27Used by:737
Symbol 486 EditableTextUses:27Used by:737
Symbol 487 GraphicUsed by:737
Symbol 488 GraphicUsed by:737
Symbol 489 EditableTextUses:27Used by:737
Symbol 490 EditableTextUses:27Used by:737
Symbol 491 GraphicUsed by:737
Symbol 492 GraphicUsed by:737
Symbol 493 EditableTextUses:27Used by:737
Symbol 494 EditableTextUses:27Used by:737
Symbol 495 EditableTextUses:27Used by:737
Symbol 496 EditableTextUses:27Used by:737
Symbol 497 EditableTextUses:27Used by:737
Symbol 498 EditableTextUses:27Used by:737
Symbol 499 EditableTextUses:27Used by:737
Symbol 500 EditableTextUses:27Used by:737
Symbol 501 EditableTextUses:27Used by:737
Symbol 502 EditableTextUses:27Used by:737
Symbol 503 GraphicUsed by:737
Symbol 504 EditableTextUses:27Used by:737
Symbol 505 EditableTextUses:27Used by:737
Symbol 506 GraphicUsed by:737
Symbol 507 GraphicUsed by:737
Symbol 508 GraphicUsed by:737
Symbol 509 GraphicUsed by:737
Symbol 510 GraphicUsed by:737
Symbol 511 GraphicUsed by:737
Symbol 512 GraphicUsed by:737
Symbol 513 GraphicUsed by:737
Symbol 514 GraphicUsed by:737
Symbol 515 GraphicUsed by:737
Symbol 516 GraphicUsed by:737
Symbol 517 GraphicUsed by:737
Symbol 518 EditableTextUses:27Used by:737
Symbol 519 EditableTextUses:27Used by:737
Symbol 520 GraphicUsed by:737
Symbol 521 GraphicUsed by:737
Symbol 522 GraphicUsed by:737
Symbol 523 EditableTextUses:27Used by:737
Symbol 524 EditableTextUses:27Used by:737
Symbol 525 GraphicUsed by:737
Symbol 526 GraphicUsed by:737
Symbol 527 GraphicUsed by:737
Symbol 528 GraphicUsed by:737
Symbol 529 GraphicUsed by:737
Symbol 530 GraphicUsed by:737
Symbol 531 GraphicUsed by:737
Symbol 532 GraphicUsed by:737
Symbol 533 EditableTextUses:27Used by:737
Symbol 534 EditableTextUses:27Used by:737
Symbol 535 EditableTextUses:27Used by:737
Symbol 536 EditableTextUses:27Used by:737
Symbol 537 EditableTextUses:27Used by:737
Symbol 538 EditableTextUses:27Used by:737
Symbol 539 EditableTextUses:27Used by:737
Symbol 540 EditableTextUses:27Used by:737
Symbol 541 GraphicUsed by:737
Symbol 542 EditableTextUses:27Used by:737
Symbol 543 EditableTextUses:27Used by:737
Symbol 544 EditableTextUses:27Used by:737
Symbol 545 EditableTextUses:27Used by:737
Symbol 546 EditableTextUses:27Used by:737
Symbol 547 EditableTextUses:27Used by:737
Symbol 548 EditableTextUses:27Used by:737
Symbol 549 EditableTextUses:27Used by:737
Symbol 550 EditableTextUses:27Used by:737
Symbol 551 EditableTextUses:27Used by:737
Symbol 552 EditableTextUses:27Used by:737
Symbol 553 EditableTextUses:27Used by:737
Symbol 554 EditableTextUses:27Used by:737
Symbol 555 EditableTextUses:27Used by:737
Symbol 556 EditableTextUses:27Used by:737
Symbol 557 EditableTextUses:27Used by:737
Symbol 558 EditableTextUses:27Used by:737
Symbol 559 EditableTextUses:27Used by:737
Symbol 560 EditableTextUses:27Used by:737
Symbol 561 EditableTextUses:27Used by:737
Symbol 562 GraphicUsed by:737
Symbol 563 GraphicUsed by:737
Symbol 564 GraphicUsed by:737
Symbol 565 GraphicUsed by:737
Symbol 566 EditableTextUses:27Used by:737
Symbol 567 EditableTextUses:27Used by:737
Symbol 568 GraphicUsed by:737
Symbol 569 GraphicUsed by:737
Symbol 570 GraphicUsed by:737
Symbol 571 GraphicUsed by:737
Symbol 572 GraphicUsed by:737
Symbol 573 GraphicUsed by:737
Symbol 574 GraphicUsed by:737
Symbol 575 GraphicUsed by:737
Symbol 576 GraphicUsed by:737
Symbol 577 GraphicUsed by:737
Symbol 578 GraphicUsed by:737
Symbol 579 EditableTextUses:27Used by:737
Symbol 580 EditableTextUses:27Used by:737
Symbol 581 GraphicUsed by:737
Symbol 582 EditableTextUses:27Used by:737
Symbol 583 EditableTextUses:27Used by:737
Symbol 584 GraphicUsed by:737
Symbol 585 GraphicUsed by:737
Symbol 586 EditableTextUses:27Used by:737
Symbol 587 EditableTextUses:27Used by:737
Symbol 588 GraphicUsed by:737
Symbol 589 EditableTextUses:27Used by:737
Symbol 590 EditableTextUses:27Used by:737
Symbol 591 GraphicUsed by:737
Symbol 592 EditableTextUses:27Used by:737
Symbol 593 EditableTextUses:27Used by:737
Symbol 594 GraphicUsed by:737
Symbol 595 EditableTextUses:27Used by:737
Symbol 596 EditableTextUses:27Used by:737
Symbol 597 GraphicUsed by:737
Symbol 598 EditableTextUses:27Used by:737
Symbol 599 EditableTextUses:27Used by:737
Symbol 600 GraphicUsed by:737
Symbol 601 EditableTextUses:27Used by:737
Symbol 602 EditableTextUses:27Used by:737
Symbol 603 GraphicUsed by:737
Symbol 604 GraphicUses:34Used by:737
Symbol 605 GraphicUsed by:737
Symbol 606 GraphicUsed by:737
Symbol 607 GraphicUsed by:737
Symbol 608 GraphicUsed by:737
Symbol 609 GraphicUsed by:737
Symbol 610 EditableTextUses:27Used by:737
Symbol 611 EditableTextUses:27Used by:737
Symbol 612 GraphicUsed by:737
Symbol 613 GraphicUsed by:737
Symbol 614 EditableTextUses:27Used by:737
Symbol 615 EditableTextUses:27Used by:737
Symbol 616 GraphicUsed by:737
Symbol 617 GraphicUsed by:737
Symbol 618 EditableTextUses:27Used by:737
Symbol 619 EditableTextUses:27Used by:737
Symbol 620 GraphicUsed by:737
Symbol 621 GraphicUsed by:737
Symbol 622 EditableTextUses:27Used by:737
Symbol 623 EditableTextUses:27Used by:737
Symbol 624 GraphicUsed by:737
Symbol 625 GraphicUsed by:737
Symbol 626 EditableTextUses:27Used by:737
Symbol 627 EditableTextUses:27Used by:737
Symbol 628 GraphicUsed by:737
Symbol 629 GraphicUses:34Used by:737
Symbol 630 GraphicUsed by:737
Symbol 631 EditableTextUses:27Used by:737
Symbol 632 EditableTextUses:27Used by:737
Symbol 633 GraphicUsed by:737
Symbol 634 GraphicUsed by:737
Symbol 635 GraphicUsed by:737
Symbol 636 GraphicUsed by:737
Symbol 637 GraphicUsed by:737
Symbol 638 GraphicUsed by:737
Symbol 639 GraphicUsed by:737
Symbol 640 GraphicUsed by:737
Symbol 641 GraphicUsed by:737
Symbol 642 GraphicUsed by:737
Symbol 643 EditableTextUses:27Used by:737
Symbol 644 EditableTextUses:27Used by:737
Symbol 645 EditableTextUses:27Used by:737
Symbol 646 EditableTextUses:27Used by:737
Symbol 647 EditableTextUses:27Used by:737
Symbol 648 EditableTextUses:27Used by:737
Symbol 649 EditableTextUses:27Used by:737
Symbol 650 EditableTextUses:27Used by:737
Symbol 651 EditableTextUses:27Used by:737
Symbol 652 EditableTextUses:27Used by:737
Symbol 653 GraphicUsed by:737
Symbol 654 EditableTextUses:27Used by:737
Symbol 655 EditableTextUses:27Used by:737
Symbol 656 GraphicUsed by:737
Symbol 657 EditableTextUses:27Used by:737
Symbol 658 EditableTextUses:27Used by:737
Symbol 659 GraphicUsed by:737
Symbol 660 EditableTextUses:27Used by:737
Symbol 661 EditableTextUses:27Used by:737
Symbol 662 GraphicUsed by:737
Symbol 663 EditableTextUses:27Used by:737
Symbol 664 EditableTextUses:27Used by:737
Symbol 665 GraphicUsed by:737
Symbol 666 EditableTextUses:27Used by:737
Symbol 667 EditableTextUses:27Used by:737
Symbol 668 GraphicUsed by:737
Symbol 669 EditableTextUses:27Used by:737
Symbol 670 EditableTextUses:27Used by:737
Symbol 671 EditableTextUses:27Used by:737
Symbol 672 EditableTextUses:27Used by:737
Symbol 673 EditableTextUses:27Used by:737
Symbol 674 EditableTextUses:27Used by:737
Symbol 675 EditableTextUses:27Used by:737
Symbol 676 EditableTextUses:27Used by:737
Symbol 677 EditableTextUses:27Used by:737
Symbol 678 EditableTextUses:27Used by:737
Symbol 679 EditableTextUses:27Used by:737
Symbol 680 EditableTextUses:27Used by:737
Symbol 681 EditableTextUses:27Used by:737
Symbol 682 EditableTextUses:27Used by:737
Symbol 683 GraphicUsed by:737
Symbol 684 EditableTextUses:27Used by:737
Symbol 685 EditableTextUses:27Used by:737
Symbol 686 GraphicUsed by:737
Symbol 687 GraphicUsed by:737
Symbol 688 GraphicUsed by:737
Symbol 689 EditableTextUses:27Used by:737
Symbol 690 EditableTextUses:27Used by:737
Symbol 691 EditableTextUses:27Used by:737
Symbol 692 EditableTextUses:27Used by:737
Symbol 693 EditableTextUses:27Used by:737
Symbol 694 EditableTextUses:27Used by:737
Symbol 695 EditableTextUses:27Used by:737
Symbol 696 EditableTextUses:27Used by:737
Symbol 697 EditableTextUses:27Used by:737
Symbol 698 EditableTextUses:27Used by:737
Symbol 699 EditableTextUses:27Used by:737
Symbol 700 EditableTextUses:27Used by:737
Symbol 701 EditableTextUses:27Used by:737
Symbol 702 EditableTextUses:27Used by:737
Symbol 703 EditableTextUses:27Used by:737
Symbol 704 EditableTextUses:27Used by:737
Symbol 705 EditableTextUses:27Used by:737
Symbol 706 EditableTextUses:27Used by:737
Symbol 707 EditableTextUses:27Used by:737
Symbol 708 EditableTextUses:27Used by:737
Symbol 709 EditableTextUses:27Used by:737
Symbol 710 EditableTextUses:27Used by:737
Symbol 711 EditableTextUses:27Used by:737
Symbol 712 EditableTextUses:27Used by:737
Symbol 713 EditableTextUses:27Used by:737
Symbol 714 EditableTextUses:27Used by:737
Symbol 715 EditableTextUses:27Used by:737
Symbol 716 EditableTextUses:27Used by:737
Symbol 717 EditableTextUses:27Used by:737
Symbol 718 EditableTextUses:27Used by:737
Symbol 719 EditableTextUses:27Used by:737
Symbol 720 EditableTextUses:27Used by:737
Symbol 721 EditableTextUses:27Used by:737
Symbol 722 EditableTextUses:27Used by:737
Symbol 723 EditableTextUses:27Used by:737
Symbol 724 EditableTextUses:27Used by:737
Symbol 725 EditableTextUses:27Used by:737
Symbol 726 EditableTextUses:27Used by:737
Symbol 727 EditableTextUses:27Used by:737
Symbol 728 EditableTextUses:27Used by:737
Symbol 729 EditableTextUses:27Used by:737
Symbol 730 EditableTextUses:27Used by:737
Symbol 731 EditableTextUses:27Used by:737
Symbol 732 EditableTextUses:27Used by:737
Symbol 733 EditableTextUses:27Used by:737
Symbol 734 EditableTextUses:27Used by:737
Symbol 735 EditableTextUses:27Used by:737
Symbol 736 EditableTextUses:27Used by:737
Symbol 737 MovieClip {values}Uses:35 464 40 82 465 466 83 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 39 41 535 536 44 45 537 538 48 49 539 540 541 542 543 55 544 545 58 546 547 61 548 549 64 65 66 550 551 69 552 553 72 554 555 75 556 557 78 558 559 81 560 561 86 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 88 91 92 93 94 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 129 723 724 725 726 727 728 729 730 731 732 733 734 142 735 736Used by:775 781 782 785 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 810 1010
Symbol 738 BitmapUsed by:739 828 950
Symbol 739 GraphicUses:738Used by:742
Symbol 740 GraphicUsed by:741
Symbol 741 MovieClip {regionObl}Uses:740Used by:742 1010
Symbol 742 MovieClip {f_1}Uses:739 741Used by:775 781 782 785 787 810 1010
Symbol 743 BitmapUsed by:744 950
Symbol 744 GraphicUses:743Used by:745
Symbol 745 MovieClip {f_2}Uses:744Used by:788 789 790 791 792 1010
Symbol 746 BitmapUsed by:747 950
Symbol 747 GraphicUses:746Used by:748
Symbol 748 MovieClip {f_3}Uses:747Used by:793 794 795 796 797 1010
Symbol 749 BitmapUsed by:750 950
Symbol 750 GraphicUses:749Used by:751
Symbol 751 MovieClip {f_4}Uses:750Used by:798 799 800 801 1010
Symbol 752 GraphicUsed by:758
Symbol 753 GraphicUsed by:758
Symbol 754 GraphicUsed by:758
Symbol 755 GraphicUsed by:758
Symbol 756 GraphicUsed by:758
Symbol 757 GraphicUsed by:758
Symbol 758 MovieClip {onMusices}Uses:752 753 754 755 756 757Used by:880 1010
Symbol 759 GraphicUsed by:765
Symbol 760 GraphicUsed by:765
Symbol 761 GraphicUsed by:765
Symbol 762 GraphicUsed by:765
Symbol 763 GraphicUsed by:765
Symbol 764 GraphicUsed by:765
Symbol 765 MovieClip {onSoundes}Uses:759 760 761 762 763 764Used by:880 1010
Symbol 766 ButtonUses:146Used by:1010
Symbol 767 GraphicUsed by:774
Symbol 768 EditableTextUses:27Used by:774
Symbol 769 EditableTextUses:27Used by:774
Symbol 770 GraphicUsed by:774
Symbol 771 GraphicUsed by:772
Symbol 772 MovieClipUses:771Used by:774
Symbol 773 GraphicUsed by:774
Symbol 774 MovieClip {dinElementBOCHKA}Uses:767 768 769 770 772 773Used by:775 798 810 1010
Symbol 775 MovieClip {L_1}Uses:742 387 397 391 737 774 381Used by:1010
Symbol 776 GraphicUsed by:780
Symbol 777 EditableTextUses:27Used by:780
Symbol 778 EditableTextUses:27Used by:780
Symbol 779 GraphicUsed by:780
Symbol 780 MovieClip {dinElementBOCHKA_D}Uses:776 777 778 779Used by:781 798 810 877 1010
Symbol 781 MovieClip {L_2}Uses:742 737 780 387 397 381 391Used by:1010
Symbol 782 MovieClip {L_3}Uses:742 449 737Used by:1010
Symbol 783 FontUsed by:784 786
Symbol 784 EditableTextUses:783 908Used by:785
Symbol 785 MovieClip {L_4}Uses:742 381 387 391 397 737 784 340 343Used by:1010
Symbol 786 EditableTextUses:783 908Used by:787
Symbol 787 MovieClip {L_5}Uses:742 444 737 786 343Used by:1010
Symbol 788 MovieClip {L_6}Uses:745 444 737 415 407Used by:1010
Symbol 789 MovieClip {L_7}Uses:745 737 350 391 381 387 397 444 343Used by:1010
Symbol 790 MovieClip {L_8}Uses:745 737 387 350 340 391 381 397Used by:1010
Symbol 791 MovieClip {L_9}Uses:745 737 387 391 381 397 444 340Used by:1010
Symbol 792 MovieClip {L_10}Uses:745 449 737 397 387 381 391 340Used by:1010
Symbol 793 MovieClip {L_11}Uses:748 737 397 391 381 387 463Used by:1010
Symbol 794 MovieClip {L_12}Uses:748 397 737 391 387 381 463 340Used by:1010
Symbol 795 MovieClip {L_13}Uses:748 397 737 463 387 391 381 444 340 343Used by:1010
Symbol 796 MovieClip {L_14}Uses:748 420 364 391 463 737 381 387 397 340Used by:1010
Symbol 797 MovieClip {L_15}Uses:748 449 737 340Used by:1010
Symbol 798 MovieClip {L_16}Uses:751 391 369 364 737 780 774 381 397 387Used by:1010
Symbol 799 MovieClip {L_17}Uses:751 426 364 737 444 381 387 397 391Used by:1010
Symbol 800 MovieClip {L_18}Uses:751 364 444 737 431 449 381 387 391 397 343Used by:1010
Symbol 801 MovieClip {L_19}Uses:751 737 463 350 449 381 397 387 391 340Used by:1010
Symbol 802 GraphicUsed by:809
Symbol 803 EditableTextUses:27Used by:809
Symbol 804 EditableTextUses:27Used by:809
Symbol 805 GraphicUsed by:809
Symbol 806 EditableTextUses:27Used by:809
Symbol 807 EditableTextUses:27Used by:809
Symbol 808 GraphicUsed by:809
Symbol 809 MovieClip {box}Uses:802 803 804 805 806 807 808Used by:810 877 1010
Symbol 810 MovieClip {L_20}Uses:742 362 364 774 780 809 463 381 737 444 387 391 397 340Used by:1010
Symbol 811 GraphicUsed by:813
Symbol 812 TextUses:234Used by:813
Symbol 813 MovieClip {credits}Uses:811 812Used by:1010
Symbol 814 GraphicUsed by:827
Symbol 815 GraphicUsed by:827
Symbol 816 GraphicUsed by:827
Symbol 817 MovieClipUsed by:827 842 877 880 884 891 901 931
Symbol 818 GraphicUsed by:819
Symbol 819 MovieClipUses:818Used by:827 880 884
Symbol 820 GraphicUsed by:824
Symbol 821 GraphicUsed by:824
Symbol 822 GraphicUsed by:823
Symbol 823 MovieClipUses:822Used by:824
Symbol 824 MovieClipUses:820 821 823Used by:827 880
Symbol 825 EditableTextUses:234 898Used by:827
Symbol 826 EditableTextUses:206Used by:827
Symbol 827 MovieClip {credits_2}Uses:814 228 815 816 817 819 824 825 236 321 294 333 335 826 284 145Used by:1010
Symbol 828 GraphicUses:738Used by:829
Symbol 829 MovieClipUses:828Used by:830
Symbol 830 MovieClip {fonMenu}Uses:829Used by:1010
Symbol 831 GraphicUsed by:832
Symbol 832 MovieClip {lampa}Uses:831Used by:877 1010
Symbol 833 GraphicUsed by:836
Symbol 834 GraphicUsed by:835
Symbol 835 MovieClipUses:834Used by:836
Symbol 836 MovieClipUses:833 835Used by:839
Symbol 837 GraphicUsed by:839
Symbol 838 EditableTextUses:27Used by:839
Symbol 839 MovieClip {littl}Uses:836 837 838Used by:931 1010
Symbol 840 GraphicUsed by:842
Symbol 841 EditableTextUses:234 898Used by:842
Symbol 842 MovieClip {playAgain}Uses:840 817 841 301 319Used by:1010
Symbol 843 GraphicUsed by:844
Symbol 844 MovieClipUses:843Used by:845
Symbol 845 MovieClip {ramka}Uses:844Used by:931 1010
Symbol 846 GraphicUsed by:877
Symbol 847 GraphicUsed by:848
Symbol 848 MovieClipUses:847Used by:877 901
Symbol 849 EditableTextUses:234Used by:877
Symbol 850 GraphicUsed by:877
Symbol 851 GraphicUsed by:877
Symbol 852 EditableTextUses:27Used by:877
Symbol 853 FontUsed by:854 866 867
Symbol 854 EditableTextUses:853Used by:877
Symbol 855 GraphicUsed by:865
Symbol 856 EditableTextUses:27Used by:865
Symbol 857 EditableTextUses:27Used by:865
Symbol 858 EditableTextUses:27Used by:865
Symbol 859 EditableTextUses:27Used by:865
Symbol 860 GraphicUsed by:865
Symbol 861 GraphicUsed by:865
Symbol 862 GraphicUsed by:865
Symbol 863 GraphicUsed by:865
Symbol 864 GraphicUsed by:865
Symbol 865 MovieClip {bomb}Uses:855 856 857 858 859 860 861 862 863 864Used by:877 1010
Symbol 866 EditableTextUses:853Used by:877
Symbol 867 EditableTextUses:853Used by:877
Symbol 868 EditableTextUses:27 206Used by:877
Symbol 869 TextUses:206Used by:877
Symbol 870 GraphicUsed by:877
Symbol 871 TextUses:206Used by:877
Symbol 872 BitmapUsed by:873 950
Symbol 873 GraphicUses:872Used by:874
Symbol 874 MovieClipUses:873Used by:877
Symbol 875 EditableTextUses:27Used by:877
Symbol 876 EditableTextUses:27Used by:877
Symbol 877 MovieClip {instruction}Uses:846 817 848 849 850 145 851 852 854 865 780 381 387 391 809 866 867 868 832 869 870 871 874 875 876 284 228Used by:1010
Symbol 878 GraphicUsed by:880
Symbol 879 GraphicUsed by:880
Symbol 880 MovieClip {menu}Uses:878 879 817 819 824 145 244 251 258 261 264 277 217 758 765 228 292Used by:1010
Symbol 881 GraphicUsed by:884
Symbol 882 GraphicUsed by:884
Symbol 883 EditableTextUses:234Used by:884
Symbol 884 MovieClip {nextLevel}Uses:881 817 819 882 883Used by:1010
Symbol 885 GraphicUsed by:891
Symbol 886 GraphicUsed by:891
Symbol 887 EditableTextUses:234Used by:891
Symbol 888 EditableTextUses:234Used by:891
Symbol 889 EditableTextUses:234Used by:891
Symbol 890 GraphicUsed by:891
Symbol 891 MovieClip {panel}Uses:885 817 284 308 886 887 888 889 890 313 264Used by:1010
Symbol 892 GraphicUsed by:901
Symbol 893 GraphicUsed by:901
Symbol 894 GraphicUsed by:895
Symbol 895 MovieClipUses:894Used by:901
Symbol 896 EditableTextUses:234 898Used by:901
Symbol 897 GraphicUsed by:901
Symbol 898 FontUsed by:235 293 320 332 334 825 841 896 899 900 902 929 930
Symbol 899 EditableTextUses:234 898Used by:901
Symbol 900 EditableTextUses:234 898Used by:901
Symbol 901 MovieClip {pozdravlenie}Uses:892 893 817 895 848 896 897 899 900 301 228 33Used by:1010
Symbol 902 EditableTextUses:234 898Used by:903
Symbol 903 MovieClip {record}Uses:902Used by:1010
Symbol 904 GraphicUsed by:931
Symbol 905 GraphicUsed by:931
Symbol 906 GraphicUsed by:931
Symbol 907 GraphicUsed by:931
Symbol 908 FontUsed by:784 786 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
Symbol 909 EditableTextUses:908Used by:931
Symbol 910 EditableTextUses:908Used by:931
Symbol 911 EditableTextUses:908Used by:931
Symbol 912 EditableTextUses:908Used by:931
Symbol 913 EditableTextUses:908Used by:931
Symbol 914 EditableTextUses:908Used by:931
Symbol 915 EditableTextUses:908Used by:931
Symbol 916 EditableTextUses:908Used by:931
Symbol 917 EditableTextUses:908Used by:931
Symbol 918 EditableTextUses:908Used by:931
Symbol 919 EditableTextUses:908Used by:931
Symbol 920 EditableTextUses:908Used by:931
Symbol 921 EditableTextUses:908Used by:931
Symbol 922 EditableTextUses:908Used by:931
Symbol 923 EditableTextUses:908Used by:931
Symbol 924 EditableTextUses:908Used by:931
Symbol 925 EditableTextUses:908Used by:931
Symbol 926 EditableTextUses:908Used by:931
Symbol 927 EditableTextUses:908Used by:931
Symbol 928 EditableTextUses:908Used by:931
Symbol 929 EditableTextUses:234 898Used by:931
Symbol 930 EditableTextUses:234 898Used by:931
Symbol 931 MovieClip {select_levels}Uses:904 817 905 839 906 907 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 284 845 228 33Used by:1010
Symbol 932 GraphicUsed by:933
Symbol 933 MovieClip {stop_level}Uses:932Used by:1010
Symbol 934 GraphicUsed by:935
Symbol 935 MovieClipUses:934Used by:1010
Symbol 936 GraphicUsed by:937
Symbol 937 MovieClipUses:936Used by:1010
Symbol 938 GraphicUsed by:939
Symbol 939 MovieClipUses:938Used by:1010
Symbol 940 MovieClip {p1}Uses:14Used by:1010
Symbol 941 BitmapUsed by:950
Symbol 942 BitmapUsed by:950
Symbol 943 BitmapUsed by:950
Symbol 944 BitmapUsed by:950
Symbol 945 BitmapUsed by:950
Symbol 946 BitmapUsed by:950
Symbol 947 BitmapUsed by:950
Symbol 948 BitmapUsed by:950
Symbol 949 BitmapUsed by:950
Symbol 950 GraphicUses:941 180 942 749 743 746 943 944 945 946 947 738 872 948 949Used by:1010
Symbol 951 GraphicUses:34 336 182Used by:1010
Symbol 952 GraphicUsed by:955
Symbol 953 EditableTextUses:27Used by:955
Symbol 954 EditableTextUses:27Used by:955
Symbol 955 MovieClip {ball}Uses:952 953 954Used by:1010
Symbol 956 GraphicUsed by:957
Symbol 957 MovieClip {hitTestKrug}Uses:956Used by:1010
Symbol 958 GraphicUsed by:959
Symbol 959 MovieClip {hitTestKvadrat}Uses:958Used by:1010
Symbol 960 GraphicUsed by:988
Symbol 961 ShapeTweeningUsed by:988
Symbol 962 GraphicUsed by:988
Symbol 963 GraphicUsed by:988
Symbol 964 GraphicUsed by:988
Symbol 965 GraphicUsed by:988
Symbol 966 GraphicUsed by:988
Symbol 967 GraphicUsed by:988
Symbol 968 GraphicUsed by:988
Symbol 969 ShapeTweeningUsed by:988
Symbol 970 GraphicUsed by:988
Symbol 971 GraphicUsed by:988
Symbol 972 GraphicUsed by:988
Symbol 973 GraphicUsed by:988
Symbol 974 GraphicUsed by:988
Symbol 975 GraphicUsed by:988
Symbol 976 GraphicUsed by:988
Symbol 977 GraphicUsed by:988
Symbol 978 GraphicUsed by:988
Symbol 979 GraphicUsed by:988
Symbol 980 ShapeTweeningUsed by:988
Symbol 981 GraphicUsed by:988
Symbol 982 GraphicUsed by:988
Symbol 983 GraphicUsed by:988
Symbol 984 GraphicUsed by:988
Symbol 985 GraphicUsed by:988
Symbol 986 GraphicUsed by:988
Symbol 987 GraphicUsed by:988
Symbol 988 MovieClip {oblako}Uses:960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987Used by:1010
Symbol 989 Sound {ay}Used by:1010
Symbol 990 Sound {blam}Used by:1010
Symbol 991 Sound {bum}Used by:1010
Symbol 992 Sound {ha_ha}Used by:1010
Symbol 993 Sound {klap}Used by:1010
Symbol 994 Sound {kryndec}Used by:1010
Symbol 995 Sound {mama}Used by:1010
Symbol 996 Sound {menu_mp3}Used by:1010
Symbol 997 Sound {mmm}Used by:1010
Symbol 998 Sound {music}Used by:1010
Symbol 999 Sound {noShape}Used by:1010
Symbol 1000 Sound {oblakoSound_0}Used by:1010
Symbol 1001 Sound {oblakoSound_1}Used by:1010
Symbol 1002 Sound {oblakoSound_2}Used by:1010
Symbol 1003 Sound {ooo}Used by:1010
Symbol 1004 Sound {oy}Used by:1010
Symbol 1005 Sound {oyi}Used by:1010
Symbol 1006 Sound {pay}Used by:1010
Symbol 1007 Sound {pim}Used by:1010
Symbol 1008 Sound {pum}Used by:1010
Symbol 1009 Sound {sht}Used by:1010
Symbol 1010 MovieClip {CoverOrange_cpmStar_2_fla.tank_7}Uses:219 221 228 233 236 237 244 251 258 261 264 269 277 284 292 294 301 308 313 217 319 321 322 324 326 331 333 335 340 343 350 354 362 364 369 374 381 387 391 397 402 407 415 420 426 431 435 437 439 444 449 454 458 463 737 742 745 748 751 758 765 151 152 153 154 155 156 157 158 165 159 160 166 168 161 170 162 171 150 163 178 766 148 179 775 781 782 785 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 810 813 827 830 832 839 842 845 877 880 884 891 901 903 931 933 935 937 939 940 950 951 955 865 809 774 780 957 959 988 741 4 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009Used by:Timeline

Instance Names

"ploader"Frame 1Symbol 203 MovieClip
"informFPv"Frame 1Symbol 204 EditableText
"informFPv_2"Frame 1Symbol 205 EditableText
"startPlay"Frame 1Symbol 217 Button {button_start}
"send_btn"Symbol 33 MovieClip {bubblebox_submit_score} Frame 1Symbol 24 MovieClip {bubblebox_submit_score_fla.bubblebox_send_btn_2}
"bubblebox_name"Symbol 33 MovieClip {bubblebox_submit_score} Frame 1Symbol 30 EditableText
"bubblebox_saving"Symbol 33 MovieClip {bubblebox_submit_score} Frame 2Symbol 16 MovieClip {bubblebox_submit_score_fla.bubblebox_saving_5}
"bubblebox_view_score"Symbol 33 MovieClip {bubblebox_submit_score} Frame 3Symbol 11 MovieClip {bubblebox_submit_score_fla.bubblebox_view_scores_8}
"postext"Symbol 33 MovieClip {bubblebox_submit_score} Frame 3Symbol 31 EditableText
"try_again"Symbol 33 MovieClip {bubblebox_submit_score} Frame 4Symbol 8 MovieClip {bubblebox_submit_score_fla.bubblebox_try_again_10}
"typeObj"Symbol 145 MovieClip {values111} Frame 1Symbol 37 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 1Symbol 38 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 2Symbol 42 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 2Symbol 43 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 3Symbol 46 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 3Symbol 47 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 4Symbol 50 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 4Symbol 51 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 5Symbol 53 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 5Symbol 54 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 6Symbol 56 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 6Symbol 57 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 7Symbol 59 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 7Symbol 60 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 8Symbol 62 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 8Symbol 63 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 9Symbol 67 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 9Symbol 68 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 13Symbol 70 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 13Symbol 71 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 14Symbol 73 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 14Symbol 74 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 15Symbol 76 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 15Symbol 77 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 16Symbol 79 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 16Symbol 80 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 17Symbol 84 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 17Symbol 85 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 19Symbol 89 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 19Symbol 90 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 46Symbol 95 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 46Symbol 96 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 47Symbol 97 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 47Symbol 98 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 48Symbol 99 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 48Symbol 100 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 49Symbol 101 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 49Symbol 102 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 50Symbol 103 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 50Symbol 104 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 51Symbol 105 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 51Symbol 106 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 52Symbol 107 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 52Symbol 108 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 53Symbol 109 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 53Symbol 110 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 54Symbol 111 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 54Symbol 112 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 55Symbol 113 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 55Symbol 114 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 56Symbol 115 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 56Symbol 116 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 57Symbol 117 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 57Symbol 118 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 58Symbol 119 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 58Symbol 120 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 59Symbol 121 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 59Symbol 122 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 60Symbol 123 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 60Symbol 124 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 61Symbol 125 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 61Symbol 126 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 62Symbol 127 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 62Symbol 128 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 63Symbol 130 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 63Symbol 131 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 64Symbol 132 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 64Symbol 133 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 65Symbol 134 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 65Symbol 135 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 66Symbol 136 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 66Symbol 137 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 67Symbol 138 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 67Symbol 139 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 68Symbol 140 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 68Symbol 141 EditableText
"typeObj"Symbol 145 MovieClip {values111} Frame 69Symbol 143 EditableText
"shapeObj"Symbol 145 MovieClip {values111} Frame 69Symbol 144 EditableText
"play_latest_text"Symbol 179 MovieClip {Intro} Frame 79Symbol 178 MovieClip {CoverOrange_cpmStar_2_fla.bubble_logo3_100}
"play_latest_text"Symbol 179 MovieClip {Intro} Frame 117Symbol 178 MovieClip {CoverOrange_cpmStar_2_fla.bubble_logo3_100}
"insertname"Symbol 233 MovieClip {bubblebox_score} Frame 1Symbol 231 EditableText
"typeObj"Symbol 340 MovieClip {dinElementBOX_G} Frame 1Symbol 338 EditableText
"shapeObj"Symbol 340 MovieClip {dinElementBOX_G} Frame 1Symbol 339 EditableText
"typeObj"Symbol 343 MovieClip {dinElementBOX_V} Frame 1Symbol 341 EditableText
"shapeObj"Symbol 343 MovieClip {dinElementBOX_V} Frame 1Symbol 342 EditableText
"typeObj"Symbol 350 MovieClip {dinElementCircle} Frame 1Symbol 345 EditableText
"shapeObj"Symbol 350 MovieClip {dinElementCircle} Frame 1Symbol 346 EditableText
"typeObj"Symbol 350 MovieClip {dinElementCircle} Frame 1Symbol 348 EditableText
"shapeObj"Symbol 350 MovieClip {dinElementCircle} Frame 1Symbol 349 EditableText
"typeObj"Symbol 354 MovieClip {dverca_din} Frame 1Symbol 352 EditableText
"shapeObj"Symbol 354 MovieClip {dverca_din} Frame 1Symbol 353 EditableText
"typeObj"Symbol 362 MovieClip {gvozd_prav} Frame 1Symbol 356 EditableText
"shapeObj"Symbol 362 MovieClip {gvozd_prav} Frame 1Symbol 357 EditableText
"typeObj"Symbol 369 MovieClip {kacheli_din} Frame 1Symbol 366 EditableText
"shapeObj"Symbol 369 MovieClip {kacheli_din} Frame 1Symbol 367 EditableText
"typeObj"Symbol 374 MovieClip {kacheliD_din} Frame 1Symbol 371 EditableText
"shapeObj"Symbol 374 MovieClip {kacheliD_din} Frame 1Symbol 372 EditableText
"typeObj"Symbol 381 MovieClip {kirpich_1} Frame 1Symbol 375 EditableText
"shapeObj"Symbol 381 MovieClip {kirpich_1} Frame 1Symbol 376 EditableText
"typeObj"Symbol 381 MovieClip {kirpich_1} Frame 1Symbol 378 EditableText
"shapeObj"Symbol 381 MovieClip {kirpich_1} Frame 1Symbol 379 EditableText
"typeObj"Symbol 387 MovieClip {kirpich_2} Frame 1Symbol 382 EditableText
"shapeObj"Symbol 387 MovieClip {kirpich_2} Frame 1Symbol 383 EditableText
"typeObj"Symbol 387 MovieClip {kirpich_2} Frame 1Symbol 385 EditableText
"shapeObj"Symbol 387 MovieClip {kirpich_2} Frame 1Symbol 386 EditableText
"typeObj"Symbol 391 MovieClip {kirpich_3} Frame 1Symbol 389 EditableText
"shapeObj"Symbol 391 MovieClip {kirpich_3} Frame 1Symbol 390 EditableText
"typeObj"Symbol 397 MovieClip {kirpich_4} Frame 1Symbol 392 EditableText
"shapeObj"Symbol 397 MovieClip {kirpich_4} Frame 1Symbol 393 EditableText
"typeObj"Symbol 397 MovieClip {kirpich_4} Frame 1Symbol 395 EditableText
"shapeObj"Symbol 397 MovieClip {kirpich_4} Frame 1Symbol 396 EditableText
"typeObj"Symbol 402 MovieClip {krysha} Frame 1Symbol 399 EditableText
"shapeObj"Symbol 402 MovieClip {krysha} Frame 1Symbol 400 EditableText
"typeObj"Symbol 407 MovieClip {kryshaL} Frame 1Symbol 404 EditableText
"shapeObj"Symbol 407 MovieClip {kryshaL} Frame 1Symbol 405 EditableText
"typeObj"Symbol 415 MovieClip {kryshaR} Frame 1Symbol 409 EditableText
"shapeObj"Symbol 415 MovieClip {kryshaR} Frame 1Symbol 410 EditableText
"typeObj"Symbol 415 MovieClip {kryshaR} Frame 1Symbol 412 EditableText
"shapeObj"Symbol 415 MovieClip {kryshaR} Frame 1Symbol 413 EditableText
"shapeObj"Symbol 420 MovieClip {krest_din} Frame 1Symbol 418 EditableText
"typeObj"Symbol 420 MovieClip {krest_din} Frame 1Symbol 419 EditableText
"typeObj"Symbol 426 MovieClip {krest_stat} Frame 1Symbol 421 EditableText
"typeObj"Symbol 426 MovieClip {krest_stat} Frame 1Symbol 424 EditableText
"shapeObj"Symbol 426 MovieClip {krest_stat} Frame 1Symbol 425 EditableText
"typeObj"Symbol 431 MovieClip {lopast1_box_stat} Frame 1Symbol 428 EditableText
"shapeObj"Symbol 431 MovieClip {lopast1_box_stat} Frame 1Symbol 429 EditableText
"typeObj"Symbol 435 MovieClip {lopast2_box_stat} Frame 1Symbol 432 EditableText
"shapeObj"Symbol 435 MovieClip {lopast2_box_stat} Frame 1Symbol 433 EditableText
"typeObj"Symbol 444 MovieClip {statElementBox} Frame 1Symbol 441 EditableText
"shapeObj"Symbol 444 MovieClip {statElementBox} Frame 1Symbol 442 EditableText
"typeObj"Symbol 449 MovieClip {statElementCircle} Frame 1Symbol 446 EditableText
"shapeObj"Symbol 449 MovieClip {statElementCircle} Frame 1Symbol 447 EditableText
"typeObj"Symbol 454 MovieClip {the_box} Frame 1Symbol 451 EditableText
"shapeObj"Symbol 454 MovieClip {the_box} Frame 1Symbol 452 EditableText
"typeObj"Symbol 458 MovieClip {tringl_din} Frame 1Symbol 456 EditableText
"shapeObj"Symbol 458 MovieClip {tringl_din} Frame 1Symbol 457 EditableText
"typeObj"Symbol 463 MovieClip {tringl_stat} Frame 1Symbol 460 EditableText
"shapeObj"Symbol 463 MovieClip {tringl_stat} Frame 1Symbol 461 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 1Symbol 465 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 1Symbol 466 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 2Symbol 467 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 2Symbol 468 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 3Symbol 470 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 3Symbol 471 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 4Symbol 473 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 4Symbol 474 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 5Symbol 477 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 5Symbol 478 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 6Symbol 481 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 6Symbol 482 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 7Symbol 485 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 7Symbol 486 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 8Symbol 489 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 8Symbol 490 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 17Symbol 493 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 17Symbol 494 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 18Symbol 495 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 18Symbol 496 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 19Symbol 497 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 19Symbol 498 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 20Symbol 499 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 20Symbol 500 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 21Symbol 501 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 21Symbol 502 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 22Symbol 504 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 22Symbol 505 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 52Symbol 518 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 52Symbol 519 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 53Symbol 523 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 53Symbol 524 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 70Symbol 533 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 70Symbol 534 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 71Symbol 535 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 71Symbol 536 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 72Symbol 537 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 72Symbol 538 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 73Symbol 539 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 73Symbol 540 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 74Symbol 542 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 74Symbol 543 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 75Symbol 544 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 75Symbol 545 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 76Symbol 546 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 76Symbol 547 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 77Symbol 548 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 77Symbol 549 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 78Symbol 550 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 78Symbol 551 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 82Symbol 552 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 82Symbol 553 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 83Symbol 554 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 83Symbol 555 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 84Symbol 556 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 84Symbol 557 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 85Symbol 558 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 85Symbol 559 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 86Symbol 560 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 86Symbol 561 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 88Symbol 566 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 88Symbol 567 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 181Symbol 579 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 181Symbol 580 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 182Symbol 582 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 182Symbol 583 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 183Symbol 586 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 183Symbol 587 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 184Symbol 589 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 184Symbol 590 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 185Symbol 592 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 185Symbol 593 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 186Symbol 595 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 186Symbol 596 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 187Symbol 598 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 187Symbol 599 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 188Symbol 601 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 188Symbol 602 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 214Symbol 610 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 214Symbol 611 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 216Symbol 614 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 216Symbol 615 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 218Symbol 618 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 218Symbol 619 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 220Symbol 622 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 220Symbol 623 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 222Symbol 626 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 222Symbol 627 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 223Symbol 631 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 223Symbol 632 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 268Symbol 643 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 268Symbol 644 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 269Symbol 645 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 269Symbol 646 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 270Symbol 647 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 270Symbol 648 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 271Symbol 649 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 271Symbol 650 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 272Symbol 651 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 272Symbol 652 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 273Symbol 654 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 273Symbol 655 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 274Symbol 657 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 274Symbol 658 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 275Symbol 660 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 275Symbol 661 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 276Symbol 663 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 276Symbol 664 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 277Symbol 666 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 277Symbol 667 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 282Symbol 669 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 282Symbol 670 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 283Symbol 671 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 283Symbol 672 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 284Symbol 673 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 284Symbol 674 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 285Symbol 675 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 285Symbol 676 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 286Symbol 677 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 286Symbol 678 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 287Symbol 679 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 287Symbol 680 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 288Symbol 681 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 288Symbol 682 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 289Symbol 684 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 289Symbol 685 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 302Symbol 689 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 302Symbol 690 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 303Symbol 691 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 303Symbol 692 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 304Symbol 693 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 304Symbol 694 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 305Symbol 695 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 305Symbol 696 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 306Symbol 697 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 306Symbol 698 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 307Symbol 699 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 307Symbol 700 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 308Symbol 701 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 308Symbol 702 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 309Symbol 703 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 309Symbol 704 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 310Symbol 705 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 310Symbol 706 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 311Symbol 707 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 311Symbol 708 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 312Symbol 709 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 312Symbol 710 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 313Symbol 711 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 313Symbol 712 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 314Symbol 713 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 314Symbol 714 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 315Symbol 715 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 315Symbol 716 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 316Symbol 717 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 316Symbol 718 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 317Symbol 719 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 317Symbol 720 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 318Symbol 721 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 318Symbol 722 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 319Symbol 723 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 319Symbol 724 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 320Symbol 725 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 320Symbol 726 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 321Symbol 727 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 321Symbol 728 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 322Symbol 729 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 322Symbol 730 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 323Symbol 731 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 323Symbol 732 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 324Symbol 733 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 324Symbol 734 EditableText
"typeObj"Symbol 737 MovieClip {values} Frame 325Symbol 735 EditableText
"shapeObj"Symbol 737 MovieClip {values} Frame 325Symbol 736 EditableText
"typeObj"Symbol 774 MovieClip {dinElementBOCHKA} Frame 1Symbol 768 EditableText
"shapeObj"Symbol 774 MovieClip {dinElementBOCHKA} Frame 1Symbol 769 EditableText
"val_1"Symbol 775 MovieClip {L_1} Frame 1Symbol 737 MovieClip {values}
"typeObj"Symbol 780 MovieClip {dinElementBOCHKA_D} Frame 1Symbol 777 EditableText
"shapeObj"Symbol 780 MovieClip {dinElementBOCHKA_D} Frame 1Symbol 778 EditableText
"val_1"Symbol 781 MovieClip {L_2} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 782 MovieClip {L_3} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 785 MovieClip {L_4} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 787 MovieClip {L_5} Frame 1Symbol 737 MovieClip {values}
"val_2"Symbol 787 MovieClip {L_5} Frame 1Symbol 737 MovieClip {values}
"val_2"Symbol 788 MovieClip {L_6} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 788 MovieClip {L_6} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 789 MovieClip {L_7} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 790 MovieClip {L_8} Frame 1Symbol 737 MovieClip {values}
"val_2"Symbol 790 MovieClip {L_8} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 791 MovieClip {L_9} Frame 1Symbol 737 MovieClip {values}
"val_2"Symbol 791 MovieClip {L_9} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 792 MovieClip {L_10} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 793 MovieClip {L_11} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 794 MovieClip {L_12} Frame 1Symbol 737 MovieClip {values}
"val_2"Symbol 794 MovieClip {L_12} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 795 MovieClip {L_13} Frame 1Symbol 737 MovieClip {values}
"krep"Symbol 796 MovieClip {L_14} Frame 1Symbol 364 MovieClip {joint}
"val_1"Symbol 796 MovieClip {L_14} Frame 1Symbol 737 MovieClip {values}
"val_2"Symbol 796 MovieClip {L_14} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 797 MovieClip {L_15} Frame 1Symbol 737 MovieClip {values}
"krep"Symbol 798 MovieClip {L_16} Frame 1Symbol 364 MovieClip {joint}
"val_2"Symbol 798 MovieClip {L_16} Frame 1Symbol 737 MovieClip {values}
"val_1"Symbol 798 MovieClip {L_16} Frame 1Symbol 737 MovieClip {values}
"krep"Symbol 799 MovieClip {L_17} Frame 1Symbol 364 MovieClip {joint}
"val_1"Symbol 799 MovieClip {L_17} Frame 1Symbol 737 MovieClip {values}
"krep"Symbol 800 MovieClip {L_18} Frame 1Symbol 364 MovieClip {joint}
"val_1"Symbol 800 MovieClip {L_18} Frame 1Symbol 737 MovieClip {values}
"krep"Symbol 800 MovieClip {L_18} Frame 1Symbol 364 MovieClip {joint}
"val_1"Symbol 801 MovieClip {L_19} Frame 1Symbol 737 MovieClip {values}
"typeObj"Symbol 809 MovieClip {box} Frame 1Symbol 803 EditableText
"shapeObj"Symbol 809 MovieClip {box} Frame 1Symbol 804 EditableText
"typeObj"Symbol 809 MovieClip {box} Frame 1Symbol 806 EditableText
"shapeObj"Symbol 809 MovieClip {box} Frame 1Symbol 807 EditableText
"krep"Symbol 810 MovieClip {L_20} Frame 1Symbol 364 MovieClip {joint}
"val_1"Symbol 810 MovieClip {L_20} Frame 1Symbol 737 MovieClip {values}
"bubble_credits"Symbol 827 MovieClip {credits_2} Frame 1Symbol 228 Button {bubblebox_logo_ro1}
"myAnton"Symbol 827 MovieClip {credits_2} Frame 1Symbol 236 Button {anton}
"myMax"Symbol 827 MovieClip {credits_2} Frame 1Symbol 321 Button {max}
"myNata"Symbol 827 MovieClip {credits_2} Frame 1Symbol 294 Button {button_Nata}
"mybox"Symbol 827 MovieClip {credits_2} Frame 1Symbol 333 Button {Символ5}
"myjohny_k"Symbol 827 MovieClip {credits_2} Frame 1Symbol 335 Button {Символ7}
"butMenu"Symbol 827 MovieClip {credits_2} Frame 1Symbol 284 Button {button_menu}
"qwe"Symbol 839 MovieClip {littl} Frame 1Symbol 838 EditableText
"butOk"Symbol 842 MovieClip {playAgain} Frame 1Symbol 301 Button {button_ok}
"butNo"Symbol 842 MovieClip {playAgain} Frame 1Symbol 319 Button {cancel}
"typeObj"Symbol 865 MovieClip {bomb} Frame 1Symbol 856 EditableText
"shapeObj"Symbol 865 MovieClip {bomb} Frame 1Symbol 857 EditableText
"typeObj"Symbol 865 MovieClip {bomb} Frame 2Symbol 858 EditableText
"shapeObj"Symbol 865 MovieClip {bomb} Frame 2Symbol 859 EditableText
"butMenu"Symbol 877 MovieClip {instruction} Frame 1Symbol 284 Button {button_menu}
"bubble_instr"Symbol 877 MovieClip {instruction} Frame 1Symbol 228 Button {bubblebox_logo_ro1}
"butBack"Symbol 880 MovieClip {menu} Frame 1Symbol 244 Button {button_back}
"butCredits"Symbol 880 MovieClip {menu} Frame 1Symbol 251 Button {button_credits}
"highscore"Symbol 880 MovieClip {menu} Frame 1Symbol 258 Button {button_highscore}
"butInstr"Symbol 880 MovieClip {menu} Frame 1Symbol 261 Button {button_instruction}
"butLevels"Symbol 880 MovieClip {menu} Frame 1Symbol 264 Button {button_levels}
"addtosite"Symbol 880 MovieClip {menu} Frame 1Symbol 277 Button {button_liders}
"butPlay"Symbol 880 MovieClip {menu} Frame 1Symbol 217 Button {button_start}
"onMusic"Symbol 880 MovieClip {menu} Frame 1Symbol 758 MovieClip {onMusices}
"onSound"Symbol 880 MovieClip {menu} Frame 1Symbol 765 MovieClip {onSoundes}
"bubble_menu"Symbol 880 MovieClip {menu} Frame 1Symbol 228 Button {bubblebox_logo_ro1}
"moreGames"Symbol 880 MovieClip {menu} Frame 1Symbol 292 Button {button_more_games}
"butMenu"Symbol 891 MovieClip {panel} Frame 1Symbol 284 Button {button_menu}
"butReset"Symbol 891 MovieClip {panel} Frame 1Symbol 308 Button {button_reset}
"timeLevel_text"Symbol 891 MovieClip {panel} Frame 1Symbol 887 EditableText
"level_text"Symbol 891 MovieClip {panel} Frame 1Symbol 888 EditableText
"timeTotal_text"Symbol 891 MovieClip {panel} Frame 1Symbol 889 EditableText
"butSolution"Symbol 891 MovieClip {panel} Frame 1Symbol 313 Button {button_solution}
"butSelectLevel"Symbol 891 MovieClip {panel} Frame 1Symbol 264 Button {button_levels}
"totalScore"Symbol 901 MovieClip {pozdravlenie} Frame 1Symbol 900 EditableText
"butOk"Symbol 901 MovieClip {pozdravlenie} Frame 1Symbol 301 Button {button_ok}
"bubble_pozdr"Symbol 901 MovieClip {pozdravlenie} Frame 1Symbol 228 Button {bubblebox_logo_ro1}
"namePlayer"Symbol 901 MovieClip {pozdravlenie} Frame 1Symbol 33 MovieClip {bubblebox_submit_score}
"l_1"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_2"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_3"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_4"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_5"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_6"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_7"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_8"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_9"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_10"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_11"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_12"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_13"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_14"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_15"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_16"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_17"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_18"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_19"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"l_20"Symbol 931 MovieClip {select_levels} Frame 1Symbol 839 MovieClip {littl}
"lcor_5"Symbol 931 MovieClip {select_levels} Frame 1Symbol 909 EditableText
"lcor_4"Symbol 931 MovieClip {select_levels} Frame 1Symbol 910 EditableText
"lcor_3"Symbol 931 MovieClip {select_levels} Frame 1Symbol 911 EditableText
"lcor_2"Symbol 931 MovieClip {select_levels} Frame 1Symbol 912 EditableText
"lcor_1"Symbol 931 MovieClip {select_levels} Frame 1Symbol 913 EditableText
"lcor_10"Symbol 931 MovieClip {select_levels} Frame 1Symbol 914 EditableText
"lcor_9"Symbol 931 MovieClip {select_levels} Frame 1Symbol 915 EditableText
"lcor_8"Symbol 931 MovieClip {select_levels} Frame 1Symbol 916 EditableText
"lcor_7"Symbol 931 MovieClip {select_levels} Frame 1Symbol 917 EditableText
"lcor_6"Symbol 931 MovieClip {select_levels} Frame 1Symbol 918 EditableText
"lcor_15"Symbol 931 MovieClip {select_levels} Frame 1Symbol 919 EditableText
"lcor_14"Symbol 931 MovieClip {select_levels} Frame 1Symbol 920 EditableText
"lcor_13"Symbol 931 MovieClip {select_levels} Frame 1Symbol 921 EditableText
"lcor_12"Symbol 931 MovieClip {select_levels} Frame 1Symbol 922 EditableText
"lcor_11"Symbol 931 MovieClip {select_levels} Frame 1Symbol 923 EditableText
"lcor_20"Symbol 931 MovieClip {select_levels} Frame 1Symbol 924 EditableText
"lcor_19"Symbol 931 MovieClip {select_levels} Frame 1Symbol 925 EditableText
"lcor_18"Symbol 931 MovieClip {select_levels} Frame 1Symbol 926 EditableText
"lcor_17"Symbol 931 MovieClip {select_levels} Frame 1Symbol 927 EditableText
"lcor_16"Symbol 931 MovieClip {select_levels} Frame 1Symbol 928 EditableText
"total_scores"Symbol 931 MovieClip {select_levels} Frame 1Symbol 930 EditableText
"butMenu"Symbol 931 MovieClip {select_levels} Frame 1Symbol 284 Button {button_menu}
"myRamka"Symbol 931 MovieClip {select_levels} Frame 1Symbol 845 MovieClip {ramka}
"bubble_selector"Symbol 931 MovieClip {select_levels} Frame 1Symbol 228 Button {bubblebox_logo_ro1}
"namePlayer"Symbol 931 MovieClip {select_levels} Frame 1Symbol 33 MovieClip {bubblebox_submit_score}
"typeObj"Symbol 955 MovieClip {ball} Frame 1Symbol 953 EditableText
"shapeObj"Symbol 955 MovieClip {ball} Frame 1Symbol 954 EditableText
"play_latest_text"Symbol 1010 MovieClip {CoverOrange_cpmStar_2_fla.tank_7} Frame 18Symbol 178 MovieClip {CoverOrange_cpmStar_2_fla.bubble_logo3_100}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.

Labels

"saving"Symbol 33 MovieClip {bubblebox_submit_score} Frame 2
"success"Symbol 33 MovieClip {bubblebox_submit_score} Frame 3
"tryagain"Symbol 33 MovieClip {bubblebox_submit_score} Frame 4
"stopFrame"Symbol 179 MovieClip {Intro} Frame 147
"standart"Symbol 737 MovieClip {values} Frame 2
"strashno"Symbol 737 MovieClip {values} Frame 3
"uspokoilis"Symbol 737 MovieClip {values} Frame 17
"vertimZrachki"Symbol 737 MovieClip {values} Frame 43
"morgaem"Symbol 737 MovieClip {values} Frame 53
"podmigivaem"Symbol 737 MovieClip {values} Frame 71
"plakaem"Symbol 737 MovieClip {values} Frame 88
"ubivaem"Symbol 737 MovieClip {values} Frame 182
"stopDrozh"Symbol 737 MovieClip {values} Frame 204
"umer"Symbol 737 MovieClip {values} Frame 222
"boimsa"Symbol 737 MovieClip {values} Frame 223
"zhdem"Symbol 737 MovieClip {values} Frame 277
"raduemsya"Symbol 737 MovieClip {values} Frame 278
"happy"Symbol 737 MovieClip {values} Frame 325
"on"Symbol 758 MovieClip {onMusices} Frame 1
"off"Symbol 758 MovieClip {onMusices} Frame 2
"mousOn_1"Symbol 758 MovieClip {onMusices} Frame 3
"mousOn_2"Symbol 758 MovieClip {onMusices} Frame 4
"on"Symbol 765 MovieClip {onSoundes} Frame 1
"off"Symbol 765 MovieClip {onSoundes} Frame 2
"mousOn_1"Symbol 765 MovieClip {onSoundes} Frame 3
"mousOn_2"Symbol 765 MovieClip {onSoundes} Frame 4
"one"Symbol 813 MovieClip {credits} Frame 1
"two"Symbol 813 MovieClip {credits} Frame 2
"start"Symbol 865 MovieClip {bomb} Frame 3
"Sounds"Symbol 1010 MovieClip {CoverOrange_cpmStar_2_fla.tank_7} Frame 47




http://swfchan.com/16/78608/info.shtml
Created: 3/4 -2019 13:04:51 Last modified: 3/4 -2019 13:04:51 Server time: 22/12 -2024 22:02:41