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

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

Angry-Mushrooms.swf

This is the info page for
Flash #115627

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


Text
Select Level

Home

Score

<p align="center"><font face="Honda" size="36" color="#999900" letterSpacing="0.000000" kerning="1">m<font color="#cc9900">o<font color="#339966">r<font color="#ff6600">e <font color="#996699">g<font color="#00cccc">a<font color="#3399ff">m<font color="#669999">e<font color="#cc66ff">s</font></font></font></font></font></font></font></font></font></p>

<p align="center"><font face="Honda" size="36" color="#cc66ff" letterSpacing="0.000000" kerning="1">W<font color="#0099ff">a<font color="#ff9900">l<font color="#999900">k<font color="#9999ff">t<font color="#66cc00">h<font color="#cccc00">o<font color="#ffccff">u<font color="#9966ff">g<font color="#cc9900">h</font></font></font></font></font></font></font></font></font></font></p>

Failed

This Stage Finished, More
levels Coming Soon...

关数

next

Close Ad

Play

<p align="center"><font face="Honda" size="36" color="#cc66ff" letterSpacing="0.000000" kerning="1">A<font color="#ffcc00">n<font color="#66ccff">g<font color="#66cc00">r<font color="#99cc00">y</font></font></font> <font color="#99ccff">M<font color="#ffccff">u</font></font>s<font color="#ccccff">h<font color="#cccc00">r<font color="#cc9999">o<font color="#99ccff">o<font color="#66cc00">m<font color="#00ccff">s</font></font></font></font></font></font></font></font></p>

<p align="center"><font face="Honda" size="39" color="#00ccff" letterSpacing="0.000000" kerning="1">1<font color="#99ccff">.</font> <font color="#cc99ff">R<font color="#ffccff">e<font color="#ffcc00">s<font color="#66ccff">c<font color="#33ccff">u<font color="#99ccff">e</font></font></font></font> <font color="#9999ff">P<font color="#cc9900">r<font color="#ffcc00">i<font color="#ff9999">n</font></font></font></font>c<font color="#ff66ff">e<font color="#cc66ff">s<font color="#ffcc00">s</font></font></font></font></font></font></p>

<p align="center"><font face="Honda" size="47" color="#00ccff" letterSpacing="0.000000" kerning="1">1<font color="#99ccff">.</font> <font color="#cc99ff">R<font color="#ffccff">e<font color="#ffcc00">s<font color="#66ccff">c<font color="#33ccff">u<font color="#99ccff">e</font></font></font></font> <font color="#cc9900">L<font color="#9999ff">u<font color="#ffcc00">i<font color="#66ccff">g<font color="#cc66ff">i</font></font></font></font></font></font></font></font></p>

<p align="center"><font face="Honda" size="47" color="#00ccff" letterSpacing="0.000000" kerning="1">1<font color="#99ccff">.</font> <font color="#cc99ff">R<font color="#ffccff">e<font color="#ffcc00">s<font color="#66ccff">c<font color="#33ccff">u<font color="#99ccff">e</font></font></font></font> <font color="#ff9900">Y<font color="#99ccff">o<font color="#33ccff">s<font color="#9999ff">h<font color="#6699ff">i</font></font></font></font></font></font></font></font></p>

<p align="center"><font face="Honda" size="36" color="#00ccff" letterSpacing="0.000000" kerning="1">1<font color="#99ccff">.</font> <font color="#cc99ff">R<font color="#ffccff">e<font color="#ffcc00">s<font color="#66ccff">c<font color="#33ccff">u<font color="#99ccff">e</font></font></font></font> </font>M<font color="#66cc00">a<font color="#33cccc">r<font color="#9966ff">i<font color="#ffcc00">o</font></font></font></font></font></font></p>

<p align="center"><font face="Honda" size="36" color="#cc66ff" letterSpacing="0.000000" kerning="1">A<font color="#ffcc00">n<font color="#66ccff">g<font color="#66cc00">r<font color="#99cc00">y</font></font></font> <font color="#99ccff">M<font color="#ffccff">u</font></font>s<font color="#ccccff">h<font color="#cccc00">r<font color="#cc9999">o<font color="#99ccff">o<font color="#66cc00">m<font color="#00ccff">s</font></font></font></font></font></font></font></font></p>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

<p align="left"><font face="SimSun" size="8" color="#000000" letterSpacing="0.000000" kerning="0">我方阵营</font></p><p align="left"></p>

<p align="left"><font face="SimSun" size="8" color="#000000" letterSpacing="0.000000" kerning="0">敌方阵营</font></p><p align="left"></p>

<p align="left"><font face="Arial" size="19" color="#000000" letterSpacing="0.000000" kerning="0">1111111111</font></p><p align="left"></p>

ActionScript [AS3]

Section 1
//button_5 (_fla.button_5) package _fla { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class button_5 extends MovieClip { public function button_5(){ addFrameScript(0, frame1); } public function clickHandler(_arg1:Event):void{ parent.removeChild(parent["adBox"]); parent.removeChild(this); } function frame1(){ addEventListener(MouseEvent.CLICK, clickHandler); } } }//package _fla
Section 2
//Timeline_132 (_fla.Timeline_132) package _fla { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class Timeline_132 extends MovieClip { public var btm:SimpleButton; public function Timeline_132(){ addFrameScript(0, frame1); } public function onClick(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest("http://www.playcow.com/play/882/angry-mushroom-walkthough"); navigateToURL(_local2); } function frame1(){ btm.addEventListener(MouseEvent.CLICK, onClick); } } }//package _fla
Section 3
//Timeline_2 (_fla.Timeline_2) package _fla { import flash.display.*; import flash.geom.*; import flash.events.*; import CPMStar.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class Timeline_2 extends MovieClip { public var adBox:MovieClip; public var closeButton:MovieClip; public var CPMStarPoolID:int; public var CPMStarSubPoolID:int; public var ad:DisplayObject; public function Timeline_2(){ addFrameScript(0, frame1); } function frame1(){ CPMStarPoolID = 6821; CPMStarSubPoolID = 1; ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID); adBox.addChild(ad); } } }//package _fla
Section 4
//Timeline_21 (_fla.Timeline_21) package _fla { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class Timeline_21 extends MovieClip { public var btn:SimpleButton; public function Timeline_21(){ addFrameScript(0, frame1); } public function onClick(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest(" http://www.playcow.com"); navigateToURL(_local2); } function frame1(){ btn.addEventListener(MouseEvent.CLICK, onClick); } } }//package _fla
Section 5
//Timeline_31 (_fla.Timeline_31) package _fla { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class Timeline_31 extends MovieClip { public var btn:SimpleButton; public function Timeline_31(){ addFrameScript(0, frame1); } public function onClick(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest(" http://www.playcow.com"); navigateToURL(_local2); } function frame1(){ btn.addEventListener(MouseEvent.CLICK, onClick); } } }//package _fla
Section 6
//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 7
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { public var m_localPosition:b2Vec2; public var m_radius:Number; public function b2CircleShape(_arg1:b2ShapeDef){ m_localPosition = new b2Vec2(); super(_arg1); var _local2:b2CircleDef = (_arg1 as b2CircleDef); m_type = e_circleShape; m_localPosition.SetV(_local2.localPosition); m_radius = _local2.radius; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22 = _arg1.R; var _local4:Number = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); var _local5:Number = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _local4 = (_arg2.x - _local4); _local5 = (_arg2.y - _local5); return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius))); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local10:Number; var _local6:b2Mat22 = _arg1.R; var _local7:Number = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y))); var _local8:Number = (_arg1.position.y + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y))); var _local9:Number = (_arg4.p1.x - _local7); _local10 = (_arg4.p1.y - _local8); var _local11:Number = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius)); if (_local11 < 0){ return (false); }; var _local12:Number = (_arg4.p2.x - _arg4.p1.x); var _local13:Number = (_arg4.p2.y - _arg4.p1.y); var _local14:Number = ((_local9 * _local12) + (_local10 * _local13)); var _local15:Number = ((_local12 * _local12) + (_local13 * _local13)); var _local16:Number = ((_local14 * _local14) - (_local15 * _local11)); if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){ return (false); }; var _local17:Number = -((_local14 + Math.sqrt(_local16))); if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){ _local17 = (_local17 / _local15); _arg2[0] = _local17; _arg3.x = (_local9 + (_local17 * _local12)); _arg3.y = (_local10 + (_local17 * _local13)); _arg3.Normalize(); return (true); }; return (false); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22 = _arg2.R; var _local4:Number = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); var _local5:Number = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius)); _arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius)); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; _local4 = _arg2.R; var _local5:Number = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); var _local6:Number = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _local4 = _arg3.R; var _local7:Number = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); var _local8:Number = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius)); _arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius)); } override public function ComputeMass(_arg1:b2MassData):void{ _arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius); _arg1.center.SetV(m_localPosition); _arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y)))); } public function GetLocalPosition():b2Vec2{ return (m_localPosition); } public function GetRadius():Number{ return (m_radius); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:Number = (m_localPosition.x - _arg1.x); var _local3:Number = (m_localPosition.y - _arg1.y); _local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop); } } }//package Box2D.Collision.Shapes
Section 8
//b2FilterData (Box2D.Collision.Shapes.b2FilterData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2FilterData { public var categoryBits:uint;// = 1 public var maskBits:uint;// = 0xFFFF public var groupIndex:int;// = 0 public function Copy():b2FilterData{ var _local1:b2FilterData = new b2FilterData(); _local1.categoryBits = categoryBits; _local1.maskBits = maskBits; _local1.groupIndex = groupIndex; return (_local1); } } }//package Box2D.Collision.Shapes
Section 9
//b2MassData (Box2D.Collision.Shapes.b2MassData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2MassData { public var mass:Number;// = 0 public var center:b2Vec2; public var I:Number;// = 0 public function b2MassData(){ center = new b2Vec2(0, 0); super(); } } }//package Box2D.Collision.Shapes
Section 10
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolygonDef extends b2ShapeDef { public var vertices:Array; public var vertexCount:int; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonDef(){ vertices = new Array(b2Settings.b2_maxPolygonVertices); super(); type = b2Shape.e_polygonShape; vertexCount = 0; var _local1:int; while (_local1 < b2Settings.b2_maxPolygonVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } public function 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); } 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++; }; }; } } }//package Box2D.Collision.Shapes
Section 11
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonShape extends b2Shape { private var s_supportVec:b2Vec2; public var m_centroid:b2Vec2; public var m_obb:b2OBB; public var m_vertices:Array; public var m_normals:Array; public var m_coreVertices:Array; 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 _local3:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; s_supportVec = new b2Vec2(); m_obb = new b2OBB(); m_vertices = new Array(b2Settings.b2_maxPolygonVertices); m_normals = new Array(b2Settings.b2_maxPolygonVertices); m_coreVertices = new Array(b2Settings.b2_maxPolygonVertices); super(_arg1); m_type = e_polygonShape; var _local2:b2PolygonDef = (_arg1 as b2PolygonDef); m_vertexCount = _local2.vertexCount; var _local4:int = _local3; var _local5:int = _local3; _local3 = 0; while (_local3 < m_vertexCount) { m_vertices[_local3] = _local2.vertices[_local3].Copy(); _local3++; }; _local3 = 0; while (_local3 < m_vertexCount) { _local4 = _local3; _local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0; _local6 = (m_vertices[_local5].x - m_vertices[_local4].x); _local7 = (m_vertices[_local5].y - m_vertices[_local4].y); _local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); m_normals[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8)); _local3++; }; m_centroid = ComputeCentroid(_local2.vertices, _local2.vertexCount); ComputeOBB(m_obb, m_vertices, m_vertexCount); _local3 = 0; while (_local3 < m_vertexCount) { _local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (m_vertexCount - 1); _local5 = _local3; _local9 = m_normals[_local4].x; _local10 = m_normals[_local4].y; _local11 = m_normals[_local5].x; _local12 = m_normals[_local5].y; _local13 = (m_vertices[_local3].x - m_centroid.x); _local14 = (m_vertices[_local3].y - m_centroid.y); _local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop); _local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop); _local17 = (1 / ((_local9 * _local12) - (_local10 * _local11))); m_coreVertices[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + m_centroid.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + m_centroid.y)); _local3++; }; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Vec2; var _local10:Number; var _local4:b2Mat22 = _arg1.R; var _local5:Number = (_arg2.x - _arg1.position.x); var _local6:Number = (_arg2.y - _arg1.position.y); var _local7:Number = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y)); var _local8:Number = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y)); var _local9:int; while (_local9 < m_vertexCount) { _local3 = m_vertices[_local9]; _local5 = (_local7 - _local3.x); _local6 = (_local8 - _local3.y); _local3 = m_normals[_local9]; _local10 = ((_local3.x * _local5) + (_local3.y * _local6)); if (_local10 > 0){ return (false); }; _local9++; }; return (true); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local20:Number; var _local21:Number; var _local6:Number = 0; var _local7:Number = _arg5; _local8 = (_arg4.p1.x - _arg1.position.x); _local9 = (_arg4.p1.y - _arg1.position.y); _local10 = _arg1.R; var _local12:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); var _local13:Number = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local8 = (_arg4.p2.x - _arg1.position.x); _local9 = (_arg4.p2.y - _arg1.position.y); _local10 = _arg1.R; var _local14:Number = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); var _local15:Number = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); var _local16:Number = (_local14 - _local12); var _local17:Number = (_local15 - _local13); var _local18 = -1; var _local19:int; while (_local19 < m_vertexCount) { _local11 = m_vertices[_local19]; _local8 = (_local11.x - _local12); _local9 = (_local11.y - _local13); _local11 = m_normals[_local19]; _local20 = ((_local11.x * _local8) + (_local11.y * _local9)); _local21 = ((_local11.x * _local16) + (_local11.y * _local17)); if ((((_local21 < 0)) && ((_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); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Mat22 = s_computeMat; _local3 = _arg2.R; _local4 = m_obb.R.col1; _local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local4 = m_obb.R.col2; _local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local5.Abs(); var _local6:b2Mat22 = _local5; _local4 = m_obb.extents; var _local7:Number = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y)); var _local8:Number = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y)); _local3 = _arg2.R; _local4 = m_obb.center; var _local9:Number = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); var _local10:Number = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y))); _arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8)); _arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8)); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2AABB = s_sweptAABB1; var _local5:b2AABB = s_sweptAABB2; ComputeAABB(_local4, _arg2); ComputeAABB(_local5, _arg3); _arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y); _arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y); } override public function ComputeMass(_arg1:b2MassData):void{ var _local10:b2Vec2; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = (1 / 3); var _local9:int; while (_local9 < m_vertexCount) { _local10 = m_vertices[_local9]; _local11 = (((_local9 + 1) < m_vertexCount)) ? m_vertices[int((_local9 + 1))] : m_vertices[0]; _local12 = (_local10.x - _local6); _local13 = (_local10.y - _local7); _local14 = (_local11.x - _local6); _local15 = (_local11.y - _local7); _local16 = ((_local12 * _local15) - (_local13 * _local14)); _local17 = (0.5 * _local16); _local4 = (_local4 + _local17); _local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x))); _local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y))); _local18 = _local6; _local19 = _local7; _local20 = _local12; _local21 = _local13; _local22 = _local14; _local23 = _local15; _local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18)); _local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local5 = (_local5 + (_local16 * (_local24 + _local25))); _local9++; }; _arg1.mass = (m_density * _local4); _local2 = (_local2 * (1 / _local4)); _local3 = (_local3 * (1 / _local4)); _arg1.center.Set(_local2, _local3); _arg1.I = (m_density * _local5); } public function GetOBB():b2OBB{ return (m_obb); } public function GetCentroid():b2Vec2{ return (m_centroid); } public function GetVertexCount():int{ return (m_vertexCount); } public function GetVertices():Array{ return (m_vertices); } public function GetCoreVertices():Array{ return (m_coreVertices); } public function GetNormals():Array{ return (m_normals); } 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)); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Vec2; var _local5:b2Mat22; var _local11:Number; _local5 = _arg1.R; var _local6:Number = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y)); var _local7:Number = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y)); var _local8:int; _local4 = m_coreVertices[0]; var _local9:Number = ((_local4.x * _local6) + (_local4.y * _local7)); var _local10 = 1; while (_local10 < m_vertexCount) { _local4 = m_coreVertices[_local10]; _local11 = ((_local4.x * _local6) + (_local4.y * _local7)); if (_local11 > _local9){ _local8 = _local10; _local9 = _local11; }; _local10++; }; _local5 = _arg1.R; _local4 = m_coreVertices[_local8]; s_supportVec.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y))); s_supportVec.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y))); return (s_supportVec); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:b2Vec2; var _local4:Number; var _local5:Number; m_sweepRadius = 0; var _local3:int; while (_local3 < m_vertexCount) { _local2 = m_coreVertices[_local3]; _local4 = (_local2.x - _arg1.x); _local5 = (_local2.y - _arg1.y); _local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_local4 > m_sweepRadius){ m_sweepRadius = _local4; }; _local3++; }; } public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{ var _local3:b2Vec2; var _local7:Number; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = new b2Vec2(); var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; _local7 = (1 / 3); var _local8:int; while (_local8 < _arg2) { _local9 = _arg1[_local8]; _local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0]; _local11 = (_local9.x - _local5); _local12 = (_local9.y - _local6); _local13 = (_local10.x - _local5); _local14 = (_local10.y - _local6); _local15 = ((_local11 * _local14) - (_local12 * _local13)); _local16 = (0.5 * _local15); _local4 = (_local4 + _local16); _local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x))); _local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y))); _local8++; }; _local3.x = (_local3.x * (1 / _local4)); _local3.y = (_local3.y * (1 / _local4)); return (_local3); } public static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{ var _local4:int; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:b2Mat22; var _local5:Array = new Array((b2Settings.b2_maxPolygonVertices + 1)); _local4 = 0; while (_local4 < _arg3) { _local5[_local4] = _arg2[_local4]; _local4++; }; _local5[_arg3] = _local5[0]; var _local6:Number = Number.MAX_VALUE; _local4 = 1; while (_local4 <= _arg3) { _local7 = _local5[int((_local4 - 1))]; _local8 = (_local5[_local4].x - _local7.x); _local9 = (_local5[_local4].y - _local7.y); _local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local8 = (_local8 / _local10); _local9 = (_local9 / _local10); _local11 = -(_local9); _local12 = _local8; _local13 = Number.MAX_VALUE; _local14 = Number.MAX_VALUE; _local15 = -(Number.MAX_VALUE); _local16 = -(Number.MAX_VALUE); _local17 = 0; while (_local17 < _arg3) { _local19 = (_local5[_local17].x - _local7.x); _local20 = (_local5[_local17].y - _local7.y); _local21 = ((_local8 * _local19) + (_local9 * _local20)); _local22 = ((_local11 * _local19) + (_local12 * _local20)); if (_local21 < _local13){ _local13 = _local21; }; if (_local22 < _local14){ _local14 = _local22; }; if (_local21 > _local15){ _local15 = _local21; }; if (_local22 > _local16){ _local16 = _local22; }; _local17++; }; _local18 = ((_local15 - _local13) * (_local16 - _local14)); if (_local18 < (0.95 * _local6)){ _local6 = _local18; _arg1.R.col1.x = _local8; _arg1.R.col1.y = _local9; _arg1.R.col2.x = _local11; _arg1.R.col2.y = _local12; _local23 = (0.5 * (_local13 + _local15)); _local24 = (0.5 * (_local14 + _local16)); _local25 = _arg1.R; _arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24))); _arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24))); _arg1.extents.x = (0.5 * (_local15 - _local13)); _arg1.extents.y = (0.5 * (_local16 - _local14)); }; _local4++; }; } } }//package Box2D.Collision.Shapes
Section 12
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Shape { public var m_type:int; public var m_next:b2Shape; public var m_body:b2Body; public var m_sweepRadius:Number; public var m_density:Number; public var m_friction:Number; public var m_restitution:Number; public var m_proxyId:uint; public var m_filter:b2FilterData; public var m_isSensor:Boolean; public var m_userData; public static const e_unknownShape:int = -1; public static const e_circleShape:int = 0; public static const e_polygonShape:int = 1; public static const e_shapeTypeCount:int = 2; private static var s_proxyAABB:b2AABB = new b2AABB(); private static var s_syncAABB:b2AABB = new b2AABB(); private static var s_resetAABB: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 GetType():int{ return (m_type); } public function IsSensor():Boolean{ return (m_isSensor); } public function SetFilterData(_arg1:b2FilterData):void{ m_filter = _arg1.Copy(); } public function GetFilterData():b2FilterData{ return (m_filter.Copy()); } public function GetBody():b2Body{ return (m_body); } public function GetNext():b2Shape{ return (m_next); } public function GetUserData(){ return (m_userData); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ return (false); } public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ } public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ } public function ComputeMass(_arg1:b2MassData):void{ } public function GetSweepRadius():Number{ return (m_sweepRadius); } public function GetFriction():Number{ return (m_friction); } public function GetRestitution():Number{ return (m_restitution); } public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB = s_proxyAABB; ComputeAABB(_local3, _arg2); var _local4:Boolean = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function DestroyProxy(_arg1:b2BroadPhase):void{ if (m_proxyId != b2Pair.b2_nullProxy){ _arg1.DestroyProxy(m_proxyId); m_proxyId = b2Pair.b2_nullProxy; }; } public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{ if (m_proxyId == b2Pair.b2_nullProxy){ return (false); }; var _local4:b2AABB = s_syncAABB; ComputeSweptAABB(_local4, _arg2, _arg3); if (_arg1.InRange(_local4)){ _arg1.MoveProxy(m_proxyId, _local4); return (true); }; return (false); } public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _arg1.DestroyProxy(m_proxyId); var _local3:b2AABB = s_resetAABB; ComputeAABB(_local3, _arg2); var _local4:Boolean = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function UpdateSweepRadius(_arg1:b2Vec2):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); }; } public static function Destroy(_arg1:b2Shape, _arg2):void{ } } }//package Box2D.Collision.Shapes
Section 13
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2ShapeDef { public var type:int; public var userData;// = null public var friction:Number;// = 0.2 public var restitution:Number;// = 0 public var density:Number;// = 0 public var isSensor:Boolean;// = false public var filter:b2FilterData; public function b2ShapeDef(){ type = b2Shape.e_unknownShape; filter = new b2FilterData(); super(); } } }//package Box2D.Collision.Shapes
Section 14
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var lowerBound:b2Vec2; public var upperBound:b2Vec2; public function b2AABB(){ lowerBound = new b2Vec2(); upperBound = new b2Vec2(); super(); } public function IsValid():Boolean{ var _local1:Number = (upperBound.x - lowerBound.x); var _local2:Number = (upperBound.y - lowerBound.y); var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 15
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var value:uint; public var proxyId:uint; public var stabbingCount:uint; public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } public function Swap(_arg1:b2Bound):void{ var _local2:uint = value; var _local3:uint = proxyId; var _local4:uint = stabbingCount; value = _arg1.value; proxyId = _arg1.proxyId; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxyId = _local3; _arg1.stabbingCount = _local4; } } }//package Box2D.Collision
Section 16
//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 17
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { public var m_pairManager:b2PairManager; public var m_proxyPool:Array; public var m_freeProxy:uint; public var m_bounds:Array; public var m_queryResults:Array; public var m_queryResultCount:int; public var m_worldAABB:b2AABB; public var m_quantizationFactor:b2Vec2; public var m_proxyCount:int; public var m_timeStamp:uint; public static const b2_invalid:uint = b2Settings.USHRT_MAX; public static const b2_nullEdge:uint = b2Settings.USHRT_MAX; public static var s_validate:Boolean = false; public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){ var _local3:int; 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++; }; var _local4:Number = (_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 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 GetProxy(_arg1:int):b2Proxy{ var _local2:b2Proxy = m_proxyPool[_arg1]; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){ return (null); }; return (_local2); } public function CreateProxy(_arg1:b2AABB, _arg2):uint{ var _local3:uint; var _local4:b2Proxy; 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; var _local5:uint = m_freeProxy; _local4 = m_proxyPool[_local5]; m_freeProxy = _local4.GetNext(); _local4.overlapCount = 0; _local4.userData = _arg2; var _local6:uint = (2 * m_proxyCount); var _local7:Array = new Array(); var _local8:Array = new Array(); ComputeBounds(_local7, _local8, _arg1); var _local9:int; 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++; var _local10:int; 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 _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; var _local4:b2Proxy = m_proxyPool[_arg1]; var _local5:int = (2 * m_proxyCount); var _local6:int; 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++; }; var _local7:int; 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 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 _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; }; var _local12:uint = (2 * m_proxyCount); var _local13:b2Proxy = m_proxyPool[_arg1]; var _local14:b2BoundValues = new b2BoundValues(); ComputeBounds(_local14.lowerValues, _local14.upperValues, _arg2); var _local15:b2BoundValues = 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 function Commit():void{ m_pairManager.Commit(); } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local6:uint; var _local7:uint; var _local12:b2Proxy; var _local4:Array = new Array(); var _local5:Array = new Array(); ComputeBounds(_local4, _local5, _arg1); var _local8:Array = [_local6]; var _local9:Array = [_local7]; Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0); Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1); var _local10:int; var _local11:int; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_proxyPool[m_queryResults[_local11]]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } public function Validate():void{ var _local1:b2Pair; var _local2:b2Proxy; var _local3:b2Proxy; var _local4:Boolean; var _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local5:int; while (_local5 < 2) { _local6 = m_bounds[_local5]; _local7 = (2 * m_proxyCount); _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local10 = _local6[_local9]; if (_local10.IsLower() == true){ _local8++; } else { _local8--; }; _local9++; }; _local5++; }; } private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{ var _local4:Number = _arg3.lowerBound.x; var _local5:Number = _arg3.lowerBound.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y); var _local6:Number = _arg3.upperBound.x; var _local7:Number = _arg3.upperBound.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1); } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local5:b2Bound; var _local6:b2Bound; var _local3:int; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg1.lowerBounds[_local3]]; _local6 = _local4[_arg2.upperBounds[_local3]]; if (_local5.value > _local6.value){ return (false); }; _local5 = _local4[_arg1.upperBounds[_local3]]; _local6 = _local4[_arg2.lowerBounds[_local3]]; if (_local5.value < _local6.value){ return (false); }; _local3++; }; return (true); } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local5:b2Bound; var _local3:int; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg2.upperBounds[_local3]]; if (_arg1.lowerValues[_local3] > _local5.value){ return (false); }; _local5 = _local4[_arg2.lowerBounds[_local3]]; if (_arg1.upperValues[_local3] < _local5.value){ return (false); }; _local3++; }; return (true); } private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{ var _local10:b2Bound; var _local12:int; var _local13:int; var _local14:b2Proxy; var _local8:uint = BinarySearch(_arg5, _arg6, _arg3); var _local9:uint = BinarySearch(_arg5, _arg6, _arg4); var _local11:uint = _local8; while (_local11 < _local9) { _local10 = _arg5[_local11]; if (_local10.IsLower()){ IncrementOverlapCount(_local10.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 IncrementOverlapCount(_arg1:uint):void{ var _local2:b2Proxy = 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++; }; } 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++; }; } public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{ var _local6:int; var _local7:b2Bound; var _local4:int; var _local5:int = (_arg2 - 1); while (_local4 <= _local5) { _local6 = ((_local4 + _local5) / 2); _local7 = _arg1[_local6]; if (_local7.value > _arg3){ _local5 = (_local6 - 1); } else { if (_local7.value < _arg3){ _local4 = (_local6 + 1); } else { return (uint(_local6)); }; }; }; return (uint(_local4)); } } }//package Box2D.Collision
Section 18
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 19
//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 ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local5:ClipVertex; var _local6:int; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local11:Number; var _local12:b2Vec2; var _local13:ClipVertex; _local6 = 0; _local5 = _arg2[0]; _local7 = _local5.v; _local5 = _arg2[1]; _local8 = _local5.v; _local9 = (b2Math.b2Dot(_arg3, _local7) - _arg4); var _local10:Number = (b2Math.b2Dot(_arg3, _local8) - _arg4); if (_local9 <= 0){ var _temp1 = _local6; _local6 = (_local6 + 1); var _local14 = _temp1; _arg1[_local14] = _arg2[0]; }; if (_local10 <= 0){ var _temp2 = _local6; _local6 = (_local6 + 1); _local14 = _temp2; _arg1[_local14] = _arg2[1]; }; if ((_local9 * _local10) < 0){ _local11 = (_local9 / (_local9 - _local10)); _local5 = _arg1[_local6]; _local12 = _local5.v; _local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x))); _local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y))); _local5 = _arg1[_local6]; if (_local9 > 0){ _local13 = _arg2[0]; _local5.id = _local13.id; } else { _local13 = _arg2[1]; _local5.id = _local13.id; }; _local6++; }; return (_local6); } public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local11:b2Mat22; var _local12:b2Vec2; var _local25:Number; var _local6:int = _arg1.m_vertexCount; var _local7:Array = _arg1.m_vertices; var _local8:Array = _arg1.m_normals; var _local9:int = _arg4.m_vertexCount; var _local10:Array = _arg4.m_vertices; _local11 = _arg2.R; _local12 = _local8[_arg3]; var _local13:Number = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)); var _local14:Number = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)); _local11 = _arg5.R; var _local15:Number = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14)); var _local16:Number = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14)); var _local17:int; var _local18:Number = Number.MAX_VALUE; var _local19:int; while (_local19 < _local9) { _local12 = _local10[_local19]; _local25 = ((_local12.x * _local15) + (_local12.y * _local16)); if (_local25 < _local18){ _local18 = _local25; _local17 = _local19; }; _local19++; }; _local12 = _local7[_arg3]; _local11 = _arg2.R; var _local20:Number = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); var _local21:Number = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local12 = _local10[_local17]; _local11 = _arg5.R; var _local22:Number = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); var _local23:Number = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local22 = (_local22 - _local20); _local23 = (_local23 - _local21); var _local24:Number = ((_local22 * _local13) + (_local23 * _local14)); return (_local24); } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local8:b2Vec2; var _local9:b2Mat22; var _local22:int; var _local23:Number; var _local24:int; var _local25:Number; var _local6:int = _arg2.m_vertexCount; var _local7:Array = _arg2.m_normals; _local9 = _arg5.R; _local8 = _arg4.m_centroid; var _local10:Number = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))); var _local11:Number = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))); _local9 = _arg3.R; _local8 = _arg2.m_centroid; _local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)))); _local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)))); var _local12:Number = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y)); var _local13:Number = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y)); var _local14:int; var _local15:Number = -(Number.MAX_VALUE); var _local16:int; while (_local16 < _local6) { _local8 = _local7[_local16]; _local25 = ((_local8.x * _local12) + (_local8.y * _local13)); if (_local25 > _local15){ _local15 = _local25; _local14 = _local16; }; _local16++; }; var _local17:Number = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; var _local18:int = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1); var _local19:Number = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5); if (_local19 > 0){ return (_local19); }; var _local20:int = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0; var _local21:Number = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5); if (_local21 > 0){ return (_local21); }; if ((((_local19 > _local17)) && ((_local19 > _local21)))){ _local24 = -1; _local22 = _local18; _local23 = _local19; } else { if (_local21 > _local17){ _local24 = 1; _local22 = _local20; _local23 = _local21; } else { _arg1[0] = _local14; return (_local17); }; }; while (true) { if (_local24 == -1){ _local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1); } else { _local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; if (_local17 > _local23){ _local22 = _local14; _local23 = _local17; } else { break; }; }; _arg1[0] = _local22; return (_local23); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{ var _local12:b2Mat22; var _local13:b2Vec2; var _local20:ClipVertex; var _local23:Number; var _local7:int = _arg2.m_vertexCount; var _local8:Array = _arg2.m_normals; var _local9:int = _arg5.m_vertexCount; var _local10:Array = _arg5.m_vertices; var _local11:Array = _arg5.m_normals; _local12 = _arg3.R; _local13 = _local8[_arg4]; var _local14:Number = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)); var _local15:Number = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)); _local12 = _arg6.R; var _local16:Number = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15)); _local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15)); _local14 = _local16; var _local17:int; var _local18:Number = Number.MAX_VALUE; var _local19:int; while (_local19 < _local9) { _local13 = _local11[_local19]; _local23 = ((_local14 * _local13.x) + (_local15 * _local13.y)); if (_local23 < _local18){ _local18 = _local23; _local17 = _local19; }; _local19++; }; var _local21:int = _local17; var _local22:int = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0; _local20 = _arg1[0]; _local13 = _local10[_local21]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local21; _local20.id.features.incidentVertex = 0; _local20 = _arg1[1]; _local13 = _local10[_local22]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local22; _local20.id.features.incidentVertex = 1; } public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{ var _local6:ClipVertex; var _local13:b2PolygonShape; var _local14:b2PolygonShape; var _local17:int; var _local18:uint; var _local34:int; var _local37:b2Vec2; var _local38:Number; var _local39:b2ManifoldPoint; _arg1.pointCount = 0; var _local7:int; var _local8:Array = [_local7]; var _local9:Number = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5); _local7 = _local8[0]; if (_local9 > 0){ return; }; var _local10:int; var _local11:Array = [_local10]; var _local12:Number = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3); _local10 = _local11[0]; if (_local12 > 0){ return; }; var _local15:b2XForm = new b2XForm(); var _local16:b2XForm = new b2XForm(); var _local19:Number = 0.98; var _local20:Number = 0.001; if (_local12 > ((_local19 * _local9) + _local20)){ _local13 = _arg4; _local14 = _arg2; _local15.Set(_arg5); _local16.Set(_arg3); _local17 = _local10; _local18 = 1; } else { _local13 = _arg2; _local14 = _arg4; _local15.Set(_arg3); _local16.Set(_arg5); _local17 = _local7; _local18 = 0; }; var _local21:Array = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16); var _local22:int = _local13.m_vertexCount; var _local23:Array = _local13.m_vertices; var _local24:b2Vec2 = _local23[_local17]; var _local25:b2Vec2 = _local24.Copy(); if ((_local17 + 1) < _local22){ _local24 = _local23[int((_local17 + 1))]; _local37 = _local24.Copy(); } else { _local24 = _local23[0]; _local37 = _local24.Copy(); }; var _local26:b2Vec2 = b2Math.SubtractVV(_local37, _local25); var _local27:b2Vec2 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25)); _local27.Normalize(); var _local28:b2Vec2 = b2Math.b2CrossVF(_local27, 1); _local25 = b2Math.b2MulX(_local15, _local25); _local37 = b2Math.b2MulX(_local15, _local37); var _local29:Number = b2Math.b2Dot(_local28, _local25); var _local30:Number = -(b2Math.b2Dot(_local27, _local25)); var _local31:Number = b2Math.b2Dot(_local27, _local37); var _local32:Array = [new ClipVertex(), new ClipVertex()]; var _local33:Array = [new ClipVertex(), new ClipVertex()]; _local34 = ClipSegmentToLine(_local32, _local21, _local27.Negative(), _local30); if (_local34 < 2){ return; }; _local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31); if (_local34 < 2){ return; }; _arg1.normal = (_local18) ? _local28.Negative() : _local28.Copy(); var _local35:int; var _local36:int; while (_local36 < b2Settings.b2_maxManifoldPoints) { _local6 = _local33[_local36]; _local38 = (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 b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2Mat22; var _local7:b2Vec2; var _local18:Number; var _local24:Number; var _local25:Number; _arg1.pointCount = 0; _local6 = _arg3.R; _local7 = _arg2.m_localPosition; var _local8:Number = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local9:Number = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local6 = _arg5.R; _local7 = _arg4.m_localPosition; var _local10:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local11:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); var _local12:Number = (_local10 - _local8); var _local13:Number = (_local11 - _local9); var _local14:Number = ((_local12 * _local12) + (_local13 * _local13)); var _local15:Number = _arg2.m_radius; var _local16:Number = _arg4.m_radius; var _local17:Number = (_local15 + _local16); if (_local14 > (_local17 * _local17)){ return; }; if (_local14 < Number.MIN_VALUE){ _local18 = -(_local17); _arg1.normal.Set(0, 1); } else { _local24 = Math.sqrt(_local14); _local18 = (_local24 - _local17); _local25 = (1 / _local24); _arg1.normal.x = (_local25 * _local12); _arg1.normal.y = (_local25 * _local13); }; _arg1.pointCount = 1; var _local19:b2ManifoldPoint = _arg1.points[0]; _local19.id.key = 0; _local19.separation = _local18; _local8 = (_local8 + (_local15 * _arg1.normal.x)); _local9 = (_local9 + (_local15 * _arg1.normal.y)); _local10 = (_local10 - (_local16 * _arg1.normal.x)); _local11 = (_local11 - (_local16 * _arg1.normal.y)); var _local20:Number = (0.5 * (_local8 + _local10)); var _local21:Number = (0.5 * (_local9 + _local11)); var _local22:Number = (_local20 - _arg3.position.x); var _local23:Number = (_local21 - _arg3.position.y); _local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y)); _local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y)); _local22 = (_local20 - _arg5.position.x); _local23 = (_local21 - _arg5.position.y); _local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y)); _local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y)); } public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2ManifoldPoint; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:b2Mat22; var _local17:Number; var _local32:Number; var _local33:Number; var _local34:Number; _arg1.pointCount = 0; _local12 = _arg5.R; _local11 = _arg4.m_localPosition; var _local13:Number = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y))); var _local14:Number = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y))); _local7 = (_local13 - _arg3.position.x); _local8 = (_local14 - _arg3.position.y); _local12 = _arg3.R; var _local15:Number = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); var _local16:Number = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); var _local18:int; var _local19:Number = -(Number.MAX_VALUE); var _local20:Number = _arg4.m_radius; var _local21:int = _arg2.m_vertexCount; var _local22:Array = _arg2.m_vertices; var _local23:Array = _arg2.m_normals; var _local24:int; while (_local24 < _local21) { _local11 = _local22[_local24]; _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local11 = _local23[_local24]; _local34 = ((_local11.x * _local7) + (_local11.y * _local8)); if (_local34 > _local20){ return; }; if (_local34 > _local19){ _local19 = _local34; _local18 = _local24; }; _local24++; }; if (_local19 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local11 = _local23[_local18]; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)); _arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)); _local6 = _arg1.points[0]; _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = b2_nullFeature; _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local19 - _local20); return; }; var _local25:int = _local18; var _local26:int = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0; _local11 = _local22[_local25]; var _local27:b2Vec2 = _local22[_local26]; var _local28:Number = (_local27.x - _local11.x); var _local29:Number = (_local27.y - _local11.y); var _local30:Number = Math.sqrt(((_local28 * _local28) + (_local29 * _local29))); _local28 = (_local28 / _local30); _local29 = (_local29 / _local30); _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); var _local31:Number = ((_local7 * _local28) + (_local8 * _local29)); _local6 = _arg1.points[0]; if (_local31 <= 0){ _local32 = _local11.x; _local33 = _local11.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local25; } else { if (_local31 >= _local30){ _local32 = _local27.x; _local33 = _local27.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local26; } else { _local32 = ((_local28 * _local31) + _local11.x); _local33 = ((_local29 * _local31) + _local11.y); _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = b2_nullFeature; }; }; _local7 = (_local15 - _local32); _local8 = (_local16 - _local33); _local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8))); _local7 = (_local7 / _local17); _local8 = (_local8 / _local17); if (_local17 > _local20){ return; }; _arg1.pointCount = 1; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8)); _arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8)); _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local17 - _local20); _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2 = _arg2.lowerBound; var _local4:b2Vec2 = _arg1.upperBound; var _local5:Number = (_local3.x - _local4.x); var _local6:Number = (_local3.y - _local4.y); _local3 = _arg1.lowerBound; _local4 = _arg2.upperBound; var _local7:Number = (_local3.x - _local4.x); var _local8:Number = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } } }//package Box2D.Collision
Section 20
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { public class b2ContactID { public var features:Features; public var _key:uint; public function b2ContactID(){ features = new Features(); super(); features._m_id = this; } public function Set(_arg1:b2ContactID):void{ key = _arg1._key; } public function Copy():b2ContactID{ var _local1:b2ContactID = new b2ContactID(); _local1.key = key; return (_local1); } public function 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 21
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class b2ContactPoint { public var shape1:b2Shape; public var shape2:b2Shape; public var position:b2Vec2; public var velocity:b2Vec2; public var normal:b2Vec2; public var separation:Number; public var friction:Number; public var restitution:Number; public var id:b2ContactID; public function b2ContactPoint(){ position = new b2Vec2(); velocity = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 22
//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_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_p2s: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 ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local17:Number; var _local6:b2Vec2 = _arg5[0]; var _local7:b2Vec2 = _arg5[1]; var _local8:b2Vec2 = _arg3[0]; _local9 = _arg3[1]; _local10 = _arg4[0]; _local11 = _arg4[1]; var _local12:Number = -(_local7.x); var _local13:Number = -(_local7.y); var _local14:Number = (_local6.x - _local7.x); var _local15:Number = (_local6.y - _local7.y); var _local16:Number = Math.sqrt(((_local14 * _local14) + (_local15 * _local15))); _local14 = (_local14 / _local16); _local15 = (_local15 / _local16); _local17 = ((_local12 * _local14) + (_local13 * _local15)); if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){ _arg1.SetV(_local9); _arg2.SetV(_local11); _local8.SetV(_local9); _local10.SetV(_local11); _local6.SetV(_local7); return (1); }; _local17 = (_local17 / _local16); _arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x))); _arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y))); _arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x))); _arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y))); return (2); } public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Vec2; var _local35:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg5[2]; _local9 = _arg3[0]; _local10 = _arg3[1]; _local11 = _arg3[2]; _local12 = _arg4[0]; _local13 = _arg4[1]; var _local14:b2Vec2 = _arg4[2]; var _local15:Number = _local6.x; var _local16:Number = _local6.y; var _local17:Number = _local7.x; var _local18:Number = _local7.y; var _local19:Number = _local8.x; var _local20:Number = _local8.y; var _local21:Number = (_local17 - _local15); var _local22:Number = (_local18 - _local16); var _local23:Number = (_local19 - _local15); var _local24:Number = (_local20 - _local16); var _local25:Number = (_local19 - _local17); var _local26:Number = (_local20 - _local18); var _local27:Number = -(((_local15 * _local21) + (_local16 * _local22))); var _local28:Number = ((_local17 * _local21) + (_local18 * _local22)); var _local29:Number = -(((_local15 * _local23) + (_local16 * _local24))); var _local30:Number = ((_local19 * _local23) + (_local20 * _local24)); var _local31:Number = -(((_local17 * _local25) + (_local18 * _local26))); var _local32:Number = ((_local19 * _local25) + (_local20 * _local26)); if ((((_local30 <= 0)) && ((_local32 <= 0)))){ _arg1.SetV(_local11); _arg2.SetV(_local14); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (1); }; var _local33:Number = ((_local21 * _local24) - (_local22 * _local23)); var _local34:Number = (_local33 * ((_local15 * _local18) - (_local16 * _local17))); var _local36:Number = (_local33 * ((_local17 * _local20) - (_local18 * _local19))); if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){ _local35 = (_local31 / (_local31 + _local32)); _arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x))); _arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y))); _arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x))); _arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y))); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (2); }; var _local37:Number = (_local33 * ((_local19 * _local16) - (_local20 * _local15))); if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){ _local35 = (_local29 / (_local29 + _local30)); _arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x))); _arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y))); _arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x))); _arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y))); _local10.SetV(_local11); _local13.SetV(_local14); _local7.SetV(_local8); return (2); }; var _local38:Number = ((_local36 + _local37) + _local34); _local38 = (1 / _local38); var _local39:Number = (_local36 * _local38); var _local40:Number = (_local37 * _local38); var _local41:Number = ((1 - _local39) - _local40); _arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x)); _arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y)); _arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x)); _arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y)); return (3); } public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{ var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local4:Number = (100 * Number.MIN_VALUE); var _local5:int; while (_local5 < _arg3) { _local6 = _arg2[_local5]; _local7 = 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 _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:int; var _local8:Array = s_p1s; var _local9:Array = s_p2s; var _local10:Array = s_points; var _local11:int; _arg1.SetV(_arg3.GetFirstVertex(_arg4)); _arg2.SetV(_arg5.GetFirstVertex(_arg6)); var _local12:Number = 0; var _local13 = 20; var _local14:int; while (_local14 < _local13) { _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local17 = _arg3.Support(_arg4, _local15, _local16); _local18 = _arg5.Support(_arg6, -(_local15), -(_local16)); _local12 = ((_local15 * _local15) + (_local16 * _local16)); _local19 = (_local18.x - _local17.x); _local20 = (_local18.y - _local17.y); _local21 = ((_local15 * _local19) + (_local16 * _local20)); if ((_local12 - _local21) <= (0.01 * _local12)){ if (_local11 == 0){ _arg1.SetV(_local17); _arg2.SetV(_local18); }; g_GJK_Iterations = _local14; return (Math.sqrt(_local12)); }; switch (_local11){ case 0: _local7 = _local8[0]; _local7.SetV(_local17); _local7 = _local9[0]; _local7.SetV(_local18); _local7 = _local10[0]; _local7.x = _local19; _local7.y = _local20; _arg1.SetV(_local8[0]); _arg2.SetV(_local9[0]); _local11++; break; case 1: _local7 = _local8[1]; _local7.SetV(_local17); _local7 = _local9[1]; _local7.SetV(_local18); _local7 = _local10[1]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10); break; case 2: _local7 = _local8[2]; _local7.SetV(_local17); _local7 = _local9[2]; _local7.SetV(_local18); _local7 = _local10[2]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10); break; }; if (_local11 == 3){ g_GJK_Iterations = _local14; return (0); }; _local22 = -(Number.MAX_VALUE); _local23 = 0; while (_local23 < _local11) { _local7 = _local10[_local23]; _local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y))); _local23++; }; if ((((_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 _local19:Number; var _local20:Number; _local7 = _arg4.R; _local8 = _arg3.m_localPosition; var _local9:Number = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); var _local10:Number = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local7 = _arg6.R; _local8 = _arg5.m_localPosition; var _local11:Number = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); var _local12:Number = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); var _local13:Number = (_local11 - _local9); var _local14:Number = (_local12 - _local10); var _local15:Number = ((_local13 * _local13) + (_local14 * _local14)); var _local16:Number = (_arg3.m_radius - b2Settings.b2_toiSlop); var _local17:Number = (_arg5.m_radius - b2Settings.b2_toiSlop); var _local18:Number = (_local16 + _local17); if (_local15 > (_local18 * _local18)){ _local19 = Math.sqrt(_local15); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _local20 = (_local19 - _local18); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = (_local11 - (_local17 * _local13)); _arg2.y = (_local12 - (_local17 * _local14)); return (_local20); }; if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local19 = Math.sqrt(_local15); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); }; _arg1.x = _local9; _arg1.y = _local10; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local9:b2Point = gPoint; _local8 = _arg5.m_localPosition; _local7 = _arg6.R; _local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); var _local10:Number = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity); var _local11:Number = (_arg5.m_radius - b2Settings.b2_toiSlop); if (_local10 > _local11){ _local10 = (_local10 - _local11); _local12 = (_arg2.x - _arg1.x); _local13 = (_arg2.y - _arg1.y); _local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13))); _local12 = (_local12 / _local14); _local13 = (_local13 / _local14); _arg2.x = (_arg2.x - (_local11 * _local12)); _arg2.y = (_arg2.y - (_local11 * _local13)); } else { _local10 = 0; _arg2.x = _arg1.x; _arg2.y = _arg1.y; }; return (_local10); } public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{ var _local7:int = _arg3.m_type; var _local8:int = _arg5.m_type; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6)); }; return (0); } } }//package Box2D.Collision
Section 23
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var points:Array; public var normal:b2Vec2; public var pointCount:int;// = 0 public function b2Manifold(){ points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ManifoldPoint(); _local1++; }; normal = new b2Vec2(); } public function Reset():void{ var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { (points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; normal.SetZero(); pointCount = 0; } public function Set(_arg1:b2Manifold):void{ pointCount = _arg1.pointCount; var _local2:int; while (_local2 < b2Settings.b2_maxManifoldPoints) { (points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]); _local2++; }; normal.SetV(_arg1.normal); } } }//package Box2D.Collision
Section 24
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ManifoldPoint { public var localPoint1:b2Vec2; public var localPoint2:b2Vec2; public var separation:Number; public var normalImpulse:Number; public var tangentImpulse:Number; public var id:b2ContactID; public function b2ManifoldPoint(){ localPoint1 = new b2Vec2(); localPoint2 = new b2Vec2(); id = new b2ContactID(); super(); } public function Reset():void{ localPoint1.SetZero(); localPoint2.SetZero(); separation = 0; normalImpulse = 0; tangentImpulse = 0; id.key = 0; } 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; } } }//package Box2D.Collision
Section 25
//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 26
//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 next:uint; public var status:uint; public static var b2_nullPair:uint = b2Settings.USHRT_MAX; public static var b2_nullProxy:uint = b2Settings.USHRT_MAX; public static var b2_tableCapacity:int = b2Settings.b2_maxPairs; public static var b2_tableMask:int = (b2_tableCapacity - 1); public static var e_pairBuffered:uint = 1; public static var e_pairRemoved:uint = 2; public static var e_pairFinal:uint = 4; public function SetBuffered():void{ status = (status | e_pairBuffered); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } } }//package Box2D.Collision
Section 27
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairAdded(_arg1, _arg2){ return (null); } public function PairRemoved(_arg1, _arg2, _arg3):void{ } } }//package Box2D.Collision
Section 28
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_broadPhase:b2BroadPhase; public var m_callback:b2PairCallback; public var m_pairs:Array; public var m_freePair:uint; public var m_pairCount:int; public var m_pairBuffer:Array; public var m_pairBufferCount:int; public var m_hashTable:Array; 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; } 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 = 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(); }; } public function RemoveBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair = 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(); }; } public function Commit():void{ var _local1:b2BufferedPair; var _local2:int; var _local5:b2Pair; var _local6:b2Proxy; var _local7:b2Proxy; var _local3:int; var _local4:Array = 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(); }; } private function AddPair(_arg1:uint, _arg2:uint):b2Pair{ var _local6:uint; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); var _local4 = FindHash(_arg1, _arg2, _local3); if (_local4 != null){ return (_local4); }; var _local5:uint = 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 RemovePair(_arg1:uint, _arg2:uint){ var _local3:b2Pair; var _local7:uint; var _local8:uint; var _local9:*; if (_arg1 > _arg2){ _local7 = _arg1; _arg1 = _arg2; _arg2 = _local7; }; var _local4:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); var _local5:uint = m_hashTable[_local4]; var _local6:b2Pair; 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); } private function Find(_arg1:uint, _arg2:uint):b2Pair{ var _local4:uint; if (_arg1 > _arg2){ _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; }; var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); return (FindHash(_arg1, _arg2, _local3)); } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{ var _local4:b2Pair; var _local5:uint = 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 ValidateBuffer():void{ } private function ValidateTable():void{ } public static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint = (((_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)))); } public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{ return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))); } } }//package Box2D.Collision
Section 29
//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 Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ return (p); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (p); } } }//package Box2D.Collision
Section 30
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { public class b2Proxy { public var lowerBounds:Array; public var upperBounds:Array; public var overlapCount:uint; public var timeStamp:uint; public var userData;// = null public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; super(); } public function GetNext():uint{ return (lowerBounds[0]); } public function SetNext(_arg1:uint):void{ lowerBounds[0] = (_arg1 & 0xFFFF); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } } }//package Box2D.Collision
Section 31
//b2Segment (Box2D.Collision.b2Segment) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Segment { public var p1:b2Vec2; public var p2:b2Vec2; public function b2Segment(){ p1 = new b2Vec2(); p2 = new b2Vec2(); super(); } public function TestSegment(_arg1:Array, _arg2:b2Vec2, _arg3:b2Segment, _arg4:Number):Boolean{ var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local5:b2Vec2 = _arg3.p1; var _local6:Number = (_arg3.p2.x - _local5.x); var _local7:Number = (_arg3.p2.y - _local5.y); var _local8:Number = (p2.x - p1.x); var _local9:Number = (p2.y - p1.y); var _local10:Number = _local9; var _local11:Number = -(_local8); var _local12:Number = (100 * Number.MIN_VALUE); var _local13:Number = -(((_local6 * _local10) + (_local7 * _local11))); if (_local13 > _local12){ _local14 = (_local5.x - p1.x); _local15 = (_local5.y - p1.y); _local16 = ((_local14 * _local10) + (_local15 * _local11)); if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){ _local17 = ((-(_local6) * _local15) + (_local7 * _local14)); if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){ _local16 = (_local16 / _local13); _local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local18); _local11 = (_local11 / _local18); _arg1[0] = _local16; _arg2.Set(_local10, _local11); return (true); }; }; }; return (false); } } }//package Box2D.Collision
Section 32
//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_p1:b2Vec2 = new b2Vec2(); public static var s_p2:b2Vec2 = new b2Vec2(); public static var s_xf1:b2XForm = new b2XForm(); public static var s_xf2:b2XForm = new b2XForm(); public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{ var _local5:Number; var _local6:Number; var _local25:Number; var _local26:b2XForm; var _local27:b2XForm; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local7:Number = _arg1.m_sweepRadius; var _local8:Number = _arg3.m_sweepRadius; var _local9:Number = _arg2.t0; var _local10:Number = (_arg2.c.x - _arg2.c0.x); var _local11:Number = (_arg2.c.y - _arg2.c0.y); var _local12:Number = (_arg4.c.x - _arg4.c0.x); var _local13:Number = (_arg4.c.y - _arg4.c0.y); var _local14:Number = (_arg2.a - _arg2.a0); var _local15:Number = (_arg4.a - _arg4.a0); var _local16:Number = 0; var _local17:b2Vec2 = s_p1; var _local18:b2Vec2 = s_p2; var _local19 = 20; var _local20:int; var _local21:Number = 0; var _local22:Number = 0; var _local23:Number = 0; var _local24:Number = 0; while (true) { _local25 = (((1 - _local16) * _local9) + _local16); _local26 = s_xf1; _local27 = s_xf2; _arg2.GetXForm(_local26, _local25); _arg4.GetXForm(_local27, _local25); _local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27); if (_local20 == 0){ if (_local23 > (2 * b2Settings.b2_toiSlop)){ _local24 = (1.5 * b2Settings.b2_toiSlop); } else { _local5 = (0.05 * b2Settings.b2_toiSlop); _local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop)); _local24 = ((_local5 > _local6)) ? _local5 : _local6; }; }; if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){ break; }; _local21 = (_local18.x - _local17.x); _local22 = (_local18.y - _local17.y); _local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22))); _local21 = (_local21 / _local28); _local22 = (_local22 / _local28); _local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8)); if (_local29 == 0){ _local16 = 1; break; }; _local30 = ((_local23 - _local24) / _local29); _local31 = (_local16 + _local30); if ((((_local31 < 0)) || ((1 < _local31)))){ _local16 = 1; break; }; if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){ break; }; _local16 = _local31; _local20++; }; return (_local16); } } }//package Box2D.Collision
Section 33
//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 34
//Features (Box2D.Collision.Features) package Box2D.Collision { public class Features { public var _referenceEdge:int; public var _incidentEdge:int; public var _incidentVertex:int; public var _flip:int; public var _m_id:b2ContactID; public function set referenceEdge(_arg1:int):void{ _referenceEdge = _arg1; _m_id._key = ((_m_id._key & 4294967040) | (_referenceEdge & 0xFF)); } public function get referenceEdge():int{ return (_referenceEdge); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } public function get incidentEdge():int{ return (_incidentEdge); } public function set incidentVertex(_arg1:int):void{ _incidentVertex = _arg1; _m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function get flip():int{ return (_flip); } } }//package Box2D.Collision
Section 35
//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 Set(_arg1:Number):void{ var _local2:Number; _local2 = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function Copy():b2Mat22{ return (new b2Mat22(0, col1, col2)); } 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 SetIdentity():void{ col1.x = 1; col2.x = 0; col1.y = 0; col2.y = 1; } public function SetZero():void{ col1.x = 0; col2.x = 0; col1.y = 0; col2.y = 0; } public function GetAngle():Number{ return (Math.atan2(col1.y, col1.x)); } public function Invert(_arg1:b2Mat22):b2Mat22{ var _local2:Number; var _local4:Number; var _local6:Number; _local2 = col1.x; var _local3:Number = col2.x; _local4 = col1.y; var _local5:Number = col2.y; _local6 = ((_local2 * _local5) - (_local3 * _local4)); _local6 = (1 / _local6); _arg1.col1.x = (_local6 * _local5); _arg1.col2.x = (-(_local6) * _local3); _arg1.col1.y = (-(_local6) * _local4); _arg1.col2.y = (_local6 * _local2); return (_arg1); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number = col1.x; var _local5:Number = col2.x; var _local6:Number = col1.y; var _local7:Number = col2.y; var _local8:Number = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } public function Abs():void{ col1.Abs(); col2.Abs(); } } }//package Box2D.Common.Math
Section 36
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0); 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 function b2IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function 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 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 AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (((_local3 * _local3) + (_local4 * _local4))); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); var _local4:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); var _local5:b2Mat22 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function b2AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (b2Max(_arg2, b2Min(_arg1, _arg3))); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:* = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); 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 b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } } }//package Box2D.Common.Math
Section 37
//b2Sweep (Box2D.Common.Math.b2Sweep) package Box2D.Common.Math { import Box2D.Common.*; public class b2Sweep { public var localCenter:b2Vec2; public var c0:b2Vec2; public var c:b2Vec2; public var a0:Number; public var a:Number; public var t0:Number; public function b2Sweep(){ localCenter = new b2Vec2(); c0 = new b2Vec2(); c = new b2Vec2(); super(); } public function GetXForm(_arg1:b2XForm, _arg2:Number):void{ var _local4:Number; var _local5:Number; if ((1 - t0) > Number.MIN_VALUE){ _local4 = ((_arg2 - t0) / (1 - t0)); _arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x)); _arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y)); _local5 = (((1 - _local4) * a0) + (_local4 * a)); _arg1.R.Set(_local5); } else { _arg1.position.SetV(c); _arg1.R.Set(a); }; var _local3:b2Mat22 = _arg1.R; _arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y))); _arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y))); } 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; }; } } }//package Box2D.Common.Math
Section 38
//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 SetZero():void{ x = 0; y = 0; } public function Set(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function SetV(_arg1:b2Vec2):void{ x = _arg1.x; y = _arg1.y; } public function Negative():b2Vec2{ return (new b2Vec2(-(x), -(y))); } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function MulM(_arg1:b2Mat22):void{ var _local2:Number = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function CrossVF(_arg1:Number):void{ var _local2:Number = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } public function CrossFV(_arg1:Number):void{ var _local2:Number = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.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 Abs():void{ if (x < 0){ x = -(x); }; if (y < 0){ y = -(y); }; } public function Length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function LengthSquared():Number{ return (((x * x) + (y * y))); } public function Normalize():Number{ var _local1:Number = Math.sqrt(((x * x) + (y * y))); if (_local1 < Number.MIN_VALUE){ return (0); }; var _local2:Number = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y)))); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 39
//b2XForm (Box2D.Common.Math.b2XForm) package Box2D.Common.Math { import Box2D.Common.*; public class b2XForm { public var position:b2Vec2; public var R:b2Mat22; public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{ position = new b2Vec2(); R = new b2Mat22(); super(); if (_arg1){ position.SetV(_arg1); R.SetM(_arg2); }; } public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{ position.SetV(_arg1); R.SetM(_arg2); } public function SetIdentity():void{ position.SetZero(); R.SetIdentity(); } public function Set(_arg1:b2XForm):void{ position.SetV(_arg1.position); R.SetM(_arg1.R); } } }//package Box2D.Common.Math
Section 40
//b2Color (Box2D.Common.b2Color) package Box2D.Common { import Box2D.Common.Math.*; public class b2Color { private var _r:uint;// = 0 private var _g:uint;// = 0 private var _b:uint;// = 0 public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function set r(_arg1:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set g(_arg1:Number):void{ _g = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function get color():uint{ return (((_r | (_g << 8)) | (_b << 16))); } } }//package Box2D.Common
Section 41
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const USHRT_MAX:int = 0xFFFF; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxManifoldPoints:int = 2; public static const b2_maxPolygonVertices:int = 8; public static const b2_maxProxies:int = 0x0200; public static const b2_maxPairs:int = 4096; public static const b2_linearSlop:Number = 0.005; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_toiSlop:Number = 0.04; public static const b2_maxTOIContactsPerIsland:int = 32; public static const b2_velocityThreshold:Number = 1; public static const b2_maxLinearCorrection:Number = 0.2; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const b2_maxLinearVelocity:Number = 200; public static const b2_maxLinearVelocitySquared:Number = 40000; public static const b2_maxAngularVelocity:Number = 250; public static const b2_maxAngularVelocitySquared:Number = 62500; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_timeToSleep:Number = 0.5; public static const b2_linearSleepTolerance:Number = 0.01; public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 42
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { private var m_manifolds:Array; public var m_manifold:b2Manifold; private var m0:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; var _local3:b2ManifoldPoint = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local8:b2ManifoldPoint; var _local5:b2Body = m_shape1.m_body; var _local6:b2Body = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf); var _local7:b2ContactPoint = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = 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); }; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2CircleContact(_arg1, _arg2)); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } } }//package Box2D.Dynamics.Contacts
Section 43
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Contact { public var m_flags:uint; public var m_prev:b2Contact; public var m_next:b2Contact; public var m_node1:b2ContactEdge; public var m_node2:b2ContactEdge; public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_manifoldCount:int; public var m_friction:Number; public var m_restitution:Number; public var m_toi:Number; public static var e_nonSolidFlag:uint = 1; public static var e_slowFlag:uint = 2; public static var e_islandFlag:uint = 4; public static var e_toiFlag:uint = 8; 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 GetManifolds():Array{ return (null); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function IsSolid():Boolean{ return (((m_flags & e_nonSolidFlag) == 0)); } public function GetNext():b2Contact{ return (m_next); } public function GetShape1():b2Shape{ return (m_shape1); } public function GetShape2():b2Shape{ return (m_shape2); } public function Update(_arg1:b2ContactListener):void{ var _local2:int = m_manifoldCount; Evaluate(_arg1); var _local3:int = m_manifoldCount; var _local4:b2Body = m_shape1.m_body; var _local5:b2Body = m_shape2.m_body; if ((((_local3 == 0)) && ((_local2 > 0)))){ _local4.WakeUp(); _local5.WakeUp(); }; if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){ m_flags = (m_flags & ~(e_slowFlag)); } else { m_flags = (m_flags | e_slowFlag); }; } public function Evaluate(_arg1:b2ContactListener):void{ } 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 InitializeRegisters():void{ var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); var _local1:int; while (_local1 < b2Shape.e_shapeTypeCount) { s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { s_registers[_local1][_local2] = new b2ContactRegister(); _local2++; }; _local1++; }; AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape); AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape); AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape); } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local8:b2Contact; var _local9:int; var _local10:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; var _local4:int = _arg1.m_type; var _local5:int = _arg2.m_type; var _local6:b2ContactRegister = s_registers[_local4][_local5]; var _local7:Function = _local6.createFcn; if (_local7 != null){ if (_local6.primary){ return (_local7(_arg1, _arg2, _arg3)); }; _local8 = _local7(_arg2, _arg1, _arg3); _local9 = 0; while (_local9 < _local8.m_manifoldCount) { _local10 = _local8.GetManifolds()[_local9]; _local8.GetManifolds()[_local9].normal = _local10.normal.Negative(); _local9++; }; return (_local8); //unresolved jump }; return (null); } public static function Destroy(_arg1:b2Contact, _arg2):void{ if (_arg1.m_manifoldCount > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; var _local3:int = _arg1.m_shape1.m_type; var _local4:int = _arg1.m_shape2.m_type; var _local5:b2ContactRegister = s_registers[_local3][_local4]; var _local6:Function = _local5.destroyFcn; _local6(_arg1, _arg2); } } }//package Box2D.Dynamics.Contacts
Section 44
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var normal:b2Vec2; public var manifold:b2Manifold; public var body1:b2Body; public var body2:b2Body; public var friction:Number; public var restitution:Number; public var pointCount:int; public function b2ContactConstraint(){ normal = new b2Vec2(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 45
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var r1:b2Vec2; public var r2:b2Vec2; public var normalImpulse:Number; public var tangentImpulse:Number; public var positionImpulse:Number; public var normalMass:Number; public var tangentMass:Number; public var equalizedMass:Number; public var separation:Number; public var velocityBias:Number; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); r1 = new b2Vec2(); r2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 46
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactEdge { public var other:b2Body; public var contact:b2Contact; public var prev:b2ContactEdge; public var next:b2ContactEdge; } }//package Box2D.Dynamics.Contacts
Section 47
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var createFcn:Function; public var destroyFcn:Function; public var primary:Boolean; } }//package Box2D.Dynamics.Contacts
Section 48
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; public class b2ContactResult { public var shape1:b2Shape; public var shape2:b2Shape; public var position:b2Vec2; public var normal:b2Vec2; 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 49
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactSolver { public var m_step:b2TimeStep; public var m_allocator; public var m_constraints:Array; public var m_constraintCount:int; public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){ var _local5:b2Contact; var _local6:int; var _local7:b2Vec2; var _local8:b2Mat22; 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++; }; var _local9:int; _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 _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:b2ContactConstraintPoint; var _local21:Number; var _local22:Number; var _local23:b2ContactConstraintPoint; var _local5:int; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_invMass; _local10 = _local7.m_invI; _local11 = _local8.m_invMass; _local12 = _local8.m_invI; _local13 = _local6.normal.x; _local14 = _local6.normal.y; _local15 = _local14; _local16 = -(_local13); if (_arg1.warmStarting){ _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local20 = _local6.points[_local18]; _local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio); _local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio); _local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15)); _local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16)); _local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.r1.x * _local22) - (_local20.r1.y * _local21)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22)); _local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.r2.x * _local22) - (_local20.r2.y * _local21)))); _local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21)); _local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22)); _local18++; }; } else { _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local23 = _local6.points[_local18]; _local23.normalImpulse = 0; _local23.tangentImpulse = 0; _local18++; }; }; _local5++; }; } public function 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 _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; var _local19:int; 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 _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ManifoldPoint; var _local6:b2ContactConstraintPoint; var _local1:int; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } public function SolvePositionConstraints(_arg1:Number):Boolean{ var _local3:b2Mat22; var _local4:b2Vec2; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:b2Vec2; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:int; var _local20:int; var _local21:b2ContactConstraintPoint; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local2:Number = 0; var _local5:int; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_sweep.c; _local10 = _local7.m_sweep.a; _local11 = _local8.m_sweep.c; _local12 = _local8.m_sweep.a; _local13 = (_local7.m_mass * _local7.m_invMass); _local14 = (_local7.m_mass * _local7.m_invI); _local15 = (_local8.m_mass * _local8.m_invMass); _local16 = (_local8.m_mass * _local8.m_invI); _local17 = _local6.normal.x; _local18 = _local6.normal.y; _local19 = _local6.pointCount; _local20 = 0; while (_local20 < _local19) { _local21 = _local6.points[_local20]; _local3 = _local7.m_xf.R; _local4 = _local7.m_sweep.localCenter; _local22 = (_local21.localAnchor1.x - _local4.x); _local23 = (_local21.localAnchor1.y - _local4.y); _local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23)); _local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23)); _local22 = _local26; _local3 = _local8.m_xf.R; _local4 = _local8.m_sweep.localCenter; _local24 = (_local21.localAnchor2.x - _local4.x); _local25 = (_local21.localAnchor2.y - _local4.y); _local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25)); _local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25)); _local24 = _local26; _local27 = (_local9.x + _local22); _local28 = (_local9.y + _local23); _local29 = (_local11.x + _local24); _local30 = (_local11.y + _local25); _local31 = (_local29 - _local27); _local32 = (_local30 - _local28); _local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation); _local2 = b2Math.b2Min(_local2, _local33); _local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local35 = (-(_local21.equalizedMass) * _local34); _local36 = _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))); } } }//package Box2D.Dynamics.Contacts
Section 50
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2NullContact extends b2Contact { override public function Evaluate(_arg1:b2ContactListener):void{ } override public function GetManifolds():Array{ return (null); } } }//package Box2D.Dynamics.Contacts
Section 51
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { private var m_manifolds:Array; public var m_manifold:b2Manifold; private var m0:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape)); b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape)); m_manifold.pointCount = 0; var _local3:b2ManifoldPoint = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:int; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2ManifoldPoint; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; var _local6:b2Body = m_shape1.m_body; var _local7:b2Body = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf); var _local8:Array = [false, false]; var _local9:b2ContactPoint = s_evalCP; _local9.shape1 = m_shape1; _local9.shape2 = m_shape2; _local9.friction = 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++; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndCircleContact(_arg1, _arg2)); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } } }//package Box2D.Dynamics.Contacts
Section 52
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonContact extends b2Contact { private var m0:b2Manifold; private var m_manifolds:Array; 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 Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local7:b2ContactPoint; var _local8:int; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; var _local5:b2Body = m_shape1.m_body; var _local6:b2Body = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf); var _local9:Array = [false, false]; _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = 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++; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolygonContact(_arg1, _arg2)); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } } }//package Box2D.Dynamics.Contacts
Section 53
//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_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_u:b2Vec2; public var m_frequencyHz:Number; public var m_dampingRatio:Number; public var m_gamma:Number; public var m_bias:Number; public var m_impulse:Number; public var m_mass: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 InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local8: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); var _local7:Number = (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); var _local9:Number = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; m_u.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6); m_u.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7); var _local10:Number = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y))); if (_local10 > b2Settings.b2_linearSlop){ m_u.Multiply((1 / _local10)); } else { m_u.SetZero(); }; var _local11:Number = ((_local6 * m_u.y) - (_local7 * m_u.x)); var _local12:Number = ((_local8 * m_u.y) - (_local9 * m_u.x)); var _local13:Number = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12)); m_mass = (1 / _local13); if (m_frequencyHz > 0){ _local14 = (_local10 - m_length); _local15 = ((2 * Math.PI) * m_frequencyHz); _local16 = (((2 * m_mass) * m_dampingRatio) * _local15); _local17 = ((m_mass * _local15) * _local15); m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17)))); m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma); m_mass = (1 / (_local13 + m_gamma)); }; if (_arg1.warmStarting){ m_impulse = (m_impulse * _arg1.dtRatio); _local18 = (m_impulse * m_u.x); _local19 = (m_impulse * m_u.y); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18)))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18)))); } else { m_impulse = 0; }; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; _local2 = _local3.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); var _local7:Number = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local7; var _local10:Number = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6)); var _local11:Number = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5)); var _local12:Number = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9)); var _local13:Number = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8)); var _local14:Number = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11))); var _local15:Number = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse))); m_impulse = (m_impulse + _local15); var _local16:Number = (_local15 * m_u.x); var _local17:Number = (_local15 * m_u.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16)))); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17)); _local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; if (m_frequencyHz > 0){ return (true); }; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local1 = _local2.m_xf.R; var _local4:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local5:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); var _local6:Number = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5)); _local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5)); _local4 = _local6; _local1 = _local3.m_xf.R; var _local7:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local8:Number = (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; var _local9:Number = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4); var _local10:Number = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5); var _local11:Number = Math.sqrt(((_local9 * _local9) + (_local10 * _local10))); _local9 = (_local9 / _local11); _local10 = (_local10 / _local11); var _local12:Number = (_local11 - m_length); _local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local13:Number = (-(m_mass) * _local12); m_u.Set(_local9, _local10); var _local14:Number = (_local13 * m_u.x); var _local15:Number = (_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 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 = new b2Vec2(); _local1.SetV(m_u); _local1.Multiply((m_inv_dt * m_impulse)); return (_local1); } override public function GetReactionTorque():Number{ return (0); } } }//package Box2D.Dynamics.Joints
Section 54
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2DistanceJointDef extends b2JointDef { public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var length:Number; public var frequencyHz:Number; public var dampingRatio:Number; public function b2DistanceJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; length = 1; frequencyHz = 0; dampingRatio = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1.SetV(body1.GetLocalPoint(_arg3)); localAnchor2.SetV(body2.GetLocalPoint(_arg4)); var _local5:Number = (_arg4.x - _arg3.x); var _local6:Number = (_arg4.y - _arg3.y); length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6))); frequencyHz = 0; dampingRatio = 0; } } }//package Box2D.Dynamics.Joints
Section 55
//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_ground1:b2Body; public var m_ground2:b2Body; public var m_revolute1:b2RevoluteJoint; public var m_prismatic1:b2PrismaticJoint; public var m_revolute2:b2RevoluteJoint; public var m_prismatic2:b2PrismaticJoint; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_J:b2Jacobian; public var m_constant:Number; public var m_ratio:Number; public var m_mass:Number; public var m_force:Number; public function b2GearJoint(_arg1:b2GearJointDef){ var _local4:Number; var _local5:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_J = new b2Jacobian(); super(_arg1); var _local2:int = _arg1.joint1.m_type; var _local3:int = _arg1.joint2.m_type; m_revolute1 = null; m_prismatic1 = null; m_revolute2 = null; m_prismatic2 = null; m_ground1 = _arg1.joint1.m_body1; m_body1 = _arg1.joint1.m_body2; if (_local2 == b2Joint.e_revoluteJoint){ m_revolute1 = (_arg1.joint1 as b2RevoluteJoint); m_groundAnchor1.SetV(m_revolute1.m_localAnchor1); m_localAnchor1.SetV(m_revolute1.m_localAnchor2); _local4 = m_revolute1.GetJointAngle(); } else { m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint); m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1); m_localAnchor1.SetV(m_prismatic1.m_localAnchor2); _local4 = m_prismatic1.GetJointTranslation(); }; m_ground2 = _arg1.joint2.m_body1; m_body2 = _arg1.joint2.m_body2; if (_local3 == b2Joint.e_revoluteJoint){ m_revolute2 = (_arg1.joint2 as b2RevoluteJoint); m_groundAnchor2.SetV(m_revolute2.m_localAnchor1); m_localAnchor2.SetV(m_revolute2.m_localAnchor2); _local5 = m_revolute2.GetJointAngle(); } else { m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint); m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1); m_localAnchor2.SetV(m_prismatic2.m_localAnchor2); _local5 = m_prismatic2.GetJointTranslation(); }; m_ratio = _arg1.ratio; m_constant = (_local4 + (m_ratio * _local5)); m_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 = new b2Vec2((m_force * m_J.linear2.x), (m_force * m_J.linear2.y)); return (_local1); } override public function GetReactionTorque():Number{ var _local1:b2Mat22 = m_body2.m_xf.R; var _local2:Number = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x); var _local3:Number = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y); var _local4:Number = ((_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 InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local15:Number; var _local2:b2Body = m_ground1; var _local3:b2Body = m_ground2; var _local4:b2Body = m_body1; var _local5:b2Body = m_body2; var _local14:Number = 0; m_J.SetZero(); if (m_revolute1){ m_J.angular1 = -1; _local14 = (_local14 + _local4.m_invI); } else { _local10 = _local2.m_xf.R; _local11 = m_prismatic1.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local4.m_xf.R; _local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linear1.Set(-(_local6), -(_local7)); m_J.angular1 = -(_local12); _local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12))); }; if (m_revolute2){ m_J.angular2 = -(m_ratio); _local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI)); } else { _local10 = _local3.m_xf.R; _local11 = m_prismatic2.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7)); m_J.angular2 = (-(m_ratio) * _local12); _local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12)))); }; m_mass = (1 / _local14); if (_arg1.warmStarting){ _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 SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:Number = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); var _local5:Number = ((-(_arg1.inv_dt) * m_mass) * _local4); m_force = (m_force + _local5); var _local6:Number = (_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)); } override public function SolvePositionConstraints():Boolean{ var _local4:Number; var _local5:Number; var _local1:Number = 0; var _local2:b2Body = m_body1; var _local3:b2Body = 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(); }; var _local6:Number = (m_constant - (_local4 + (m_ratio * _local5))); var _local7:Number = (-(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)); } } }//package Box2D.Dynamics.Joints
Section 56
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2GearJointDef extends b2JointDef { public var joint1:b2Joint; public var joint2:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 57
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var linear1:b2Vec2; public var angular1:Number; public var linear2:b2Vec2; public var angular2:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function SetZero():void{ linear1.SetZero(); angular1 = 0; linear2.SetZero(); angular2 = 0; } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linear1.SetV(_arg1); angular1 = _arg2; linear2.SetV(_arg3); angular2 = _arg4; } 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 58
//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_type:int; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_node1:b2JointEdge; public var m_node2:b2JointEdge; public var m_body1:b2Body; public var m_body2:b2Body; public var m_inv_dt:Number; public var m_islandFlag:Boolean; public var m_collideConnected:Boolean; public var m_userData; public static const e_unknownJoint:int = 0; public static const e_revoluteJoint:int = 1; public static const e_prismaticJoint:int = 2; public static const e_distanceJoint:int = 3; public static const e_pulleyJoint:int = 4; public static const e_mouseJoint:int = 5; public static const e_gearJoint:int = 6; public static const e_inactiveLimit:int = 0; public static const e_atLowerLimit:int = 1; public static const e_atUpperLimit:int = 2; public static const e_equalLimits:int = 3; 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 GetType():int{ return (m_type); } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function GetReactionForce():b2Vec2{ return (null); } public function GetReactionTorque():Number{ return (0); } public function GetBody1():b2Body{ return (m_body1); } public function GetBody2():b2Body{ return (m_body2); } public function GetNext():b2Joint{ return (m_next); } public function GetUserData(){ return (m_userData); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public function InitPositionConstraints():void{ } public function SolvePositionConstraints():Boolean{ return (false); } public static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; switch (_arg1.type){ case e_distanceJoint: _local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef)); break; case e_mouseJoint: _local3 = new b2MouseJoint((_arg1 as b2MouseJointDef)); break; case e_prismaticJoint: _local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef)); break; case e_revoluteJoint: _local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef)); break; case e_pulleyJoint: _local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef)); break; case e_gearJoint: _local3 = new b2GearJoint((_arg1 as b2GearJointDef)); break; default: break; }; return (_local3); } public static function Destroy(_arg1:b2Joint, _arg2):void{ } } }//package Box2D.Dynamics.Joints
Section 59
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2JointDef { public var type:int; public var userData; public var body1:b2Body; public var body2:b2Body; public var collideConnected:Boolean; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 60
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointEdge { public var other:b2Body; public var joint:b2Joint; public var prev:b2JointEdge; public var next:b2JointEdge; } }//package Box2D.Dynamics.Joints
Section 61
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { private var K:b2Mat22; private var K1:b2Mat22; private var K2:b2Mat22; public var m_localAnchor:b2Vec2; public var m_target:b2Vec2; public var m_impulse:b2Vec2; public var m_mass:b2Mat22; public var m_C:b2Vec2; public var m_maxForce:Number; public var m_beta:Number; public var m_gamma:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local3:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); m_localAnchor = new b2Vec2(); m_target = new b2Vec2(); m_impulse = new b2Vec2(); m_mass = new b2Mat22(); m_C = new b2Vec2(); super(_arg1); m_target.SetV(_arg1.target); var _local2:Number = (m_target.x - m_body2.m_xf.position.x); _local3 = (m_target.y - m_body2.m_xf.position.y); var _local4:b2Mat22 = m_body2.m_xf.R; m_localAnchor.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y)); m_localAnchor.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y)); m_maxForce = _arg1.maxForce; m_impulse.SetZero(); var _local5:Number = m_body2.m_mass; var _local6:Number = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); var _local7:Number = (((2 * _local5) * _arg1.dampingRatio) * _local6); var _local8:Number = ((_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 GetReactionTorque():Number{ return (0); } public function SetTarget(_arg1:b2Vec2):void{ if (m_body2.IsSleeping()){ m_body2.WakeUp(); }; m_target = _arg1; } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local7:Number; var _local8: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); var _local6:Number = ((_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); var _local9:Number = (_arg1.dt * m_impulse.x); var _local10:Number = (_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 SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local2:b2Body = m_body2; _local3 = _local2.m_xf.R; var _local6:Number = (m_localAnchor.x - _local2.m_sweep.localCenter.x); var _local7:Number = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7)); _local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7)); _local6 = _local4; var _local8:Number = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7)); var _local9:Number = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6)); _local3 = m_mass; _local4 = ((_local8 + ((m_beta * _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)); var _local10:Number = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5))); var _local11:Number = (-(_arg1.inv_dt) * ((_local3.col1.y * _local4) + (_local3.col2.y * _local5))); var _local12:Number = m_impulse.x; var _local13:Number = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); var _local14:Number = m_impulse.Length(); if (_local14 > m_maxForce){ m_impulse.Multiply((m_maxForce / _local14)); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); var _local15:Number = (_arg1.dt * _local10); var _local16:Number = (_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)))); } override public function SolvePositionConstraints():Boolean{ return (true); } } }//package Box2D.Dynamics.Joints
Section 62
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var target:b2Vec2; public var maxForce:Number; public var frequencyHz:Number; public var dampingRatio:Number; 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 63
//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_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_localXAxis1:b2Vec2; public var m_localYAxis1:b2Vec2; public var m_refAngle:Number; public var m_linearJacobian:b2Jacobian; public var m_linearMass:Number; public var m_force:Number; public var m_angularMass:Number; public var m_torque:Number; public var m_motorJacobian:b2Jacobian; public var m_motorMass:Number; public var m_motorForce:Number; public var m_limitForce:Number; public var m_limitPositionImpulse:Number; public var m_lowerTranslation:Number; public var m_upperTranslation:Number; public var m_maxMotorForce:Number; public var m_motorSpeed:Number; public var m_enableLimit:Boolean; public var m_enableMotor:Boolean; public var m_limitState:int; 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)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Mat22 = m_body1.m_xf.R; var _local2:Number = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y))); var _local3:Number = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y))); var _local4:Number = (m_force * ((_local1.col1.x * m_localYAxis1.x) + (_local1.col2.x * m_localYAxis1.y))); var _local5:Number = (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 GetReactionTorque():Number{ return (m_torque); } public function GetJointTranslation():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:b2Vec2 = _local1.GetWorldPoint(m_localAnchor1); var _local5:b2Vec2 = _local2.GetWorldPoint(m_localAnchor2); var _local6:Number = (_local5.x - _local4.x); var _local7:Number = (_local5.y - _local4.y); var _local8:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local9:Number = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function GetJointSpeed():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_xf.R; var _local4:Number = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); var _local5:Number = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); var _local6:Number = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; var _local7:Number = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); var _local8:Number = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8)); _local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8)); _local7 = _local6; var _local9:Number = (_local1.m_sweep.c.x + _local4); var _local10:Number = (_local1.m_sweep.c.y + _local5); var _local11:Number = (_local2.m_sweep.c.x + _local7); var _local12:Number = (_local2.m_sweep.c.y + _local8); var _local13:Number = (_local11 - _local9); var _local14:Number = (_local12 - _local10); var _local15:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local16:b2Vec2 = _local1.m_linearVelocity; var _local17:b2Vec2 = _local2.m_linearVelocity; var _local18:Number = _local1.m_angularVelocity; var _local19:Number = _local2.m_angularVelocity; var _local20:Number = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } public function GetLowerLimit():Number{ return (m_lowerTranslation); } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } public function SetMaxMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } public function GetMotorForce():Number{ return (m_motorForce); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local5:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_xf.R; var _local6:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local7:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; var _local10:Number = _local2.m_invMass; var _local11:Number = _local3.m_invMass; var _local12:Number = _local2.m_invI; var _local13:Number = _local3.m_invI; _local4 = _local2.m_xf.R; var _local14:Number = ((_local4.col1.x * m_localYAxis1.x) + (_local4.col2.x * m_localYAxis1.y)); var _local15:Number = ((_local4.col1.y * m_localYAxis1.x) + (_local4.col2.y * m_localYAxis1.y)); var _local16:Number = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x); var _local17:Number = ((_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; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local8:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; var _local4:Number = _local2.m_invMass; var _local5:Number = _local3.m_invMass; var _local6:Number = _local2.m_invI; var _local7:Number = _local3.m_invI; var _local9:Number = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); var _local10:Number = ((-(_arg1.inv_dt) * m_linearMass) * _local9); m_force = (m_force + _local10); var _local11:Number = (_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)); var _local12:Number = (_local3.m_angularVelocity - _local2.m_angularVelocity); var _local13:Number = ((-(_arg1.inv_dt) * m_angularMass) * _local12); m_torque = (m_torque + _local13); var _local14:Number = (_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)); }; } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local9:b2Mat22; var _local10:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; var _local5:Number = _local3.m_invMass; var _local6:Number = _local4.m_invMass; var _local7:Number = _local3.m_invI; var _local8:Number = _local4.m_invI; _local9 = _local3.m_xf.R; var _local11:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); var _local12:Number = (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; var _local13:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); var _local14:Number = (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; var _local15:Number = (_local3.m_sweep.c.x + _local11); var _local16:Number = (_local3.m_sweep.c.y + _local12); var _local17:Number = (_local4.m_sweep.c.x + _local13); var _local18:Number = (_local4.m_sweep.c.y + _local14); var _local19:Number = (_local17 - _local15); var _local20:Number = (_local18 - _local16); _local9 = _local3.m_xf.R; var _local21:Number = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); var _local22:Number = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); var _local23:Number = ((_local21 * _local19) + (_local22 * _local20)); _local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); var _local24:Number = (-(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)); var _local25:Number = b2Math.b2Abs(_local23); var _local26:Number = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_refAngle); _local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); var _local27:Number = (-(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(); var _local28:Number = 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)))); } } }//package Box2D.Dynamics.Joints
Section 64
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var localAxis1:b2Vec2; public var referenceAngle:Number; public var enableLimit:Boolean; public var lowerTranslation:Number; public var upperTranslation:Number; public var enableMotor:Boolean; public var maxMotorForce:Number; public var motorSpeed: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 65
//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_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_constant:Number; public var m_ratio:Number; public var m_maxLength1:Number; public var m_maxLength2:Number; public var m_pulleyMass:Number; public var m_limitMass1:Number; public var m_limitMass2:Number; public var m_force:Number; public var m_limitForce1:Number; public var m_limitForce2:Number; public var m_positionImpulse:Number; public var m_limitPositionImpulse1:Number; public var m_limitPositionImpulse2:Number; public var m_state:int; public var m_limitState1:int; public var m_limitState2:int; 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; } 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 = m_u2.Copy(); _local1.Multiply(m_force); return (_local1); } override public function GetReactionTorque():Number{ return (0); } public function GetGroundAnchor1():b2Vec2{ var _local1:b2Vec2 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } public function GetGroundAnchor2():b2Vec2{ var _local1:b2Vec2 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor2); return (_local1); } public function GetLength1():Number{ var _local1:b2Vec2 = m_body1.GetWorldPoint(m_localAnchor1); var _local2:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x); var _local3:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y); var _local4:Number = (_local1.x - _local2); var _local5:Number = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } public function GetLength2():Number{ var _local1:b2Vec2 = m_body2.GetWorldPoint(m_localAnchor2); var _local2:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x); var _local3:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y); var _local4:Number = (_local1.x - _local2); var _local5:Number = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } public function GetRatio():Number{ return (m_ratio); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); var _local7:Number = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; var _local10:Number = (_local2.m_sweep.c.x + _local5); var _local11:Number = (_local2.m_sweep.c.y + _local6); var _local12:Number = (_local3.m_sweep.c.x + _local8); var _local13:Number = (_local3.m_sweep.c.y + _local9); var _local14:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x); var _local15:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y); var _local16:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x); var _local17:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y); m_u1.Set((_local10 - _local14), (_local11 - _local15)); m_u2.Set((_local12 - _local16), (_local13 - _local17)); var _local18:Number = m_u1.Length(); var _local19:Number = m_u2.Length(); if (_local18 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local18)); } else { m_u1.SetZero(); }; if (_local19 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local19)); } else { m_u2.SetZero(); }; var _local20:Number = ((m_constant - _local18) - (m_ratio * _local19)); if (_local20 > 0){ m_state = e_inactiveLimit; m_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; }; var _local21:Number = ((_local5 * m_u1.y) - (_local6 * m_u1.x)); var _local22:Number = ((_local8 * m_u2.y) - (_local9 * m_u2.x)); m_limitMass1 = (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21)); m_limitMass2 = (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22)); m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2)); m_limitMass1 = (1 / m_limitMass1); m_limitMass2 = (1 / m_limitMass2); m_pulleyMass = (1 / m_pulleyMass); if (_arg1.warmStarting){ _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 SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local6:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); var _local7:Number = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; if (m_state == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13)))); _local19 = ((-(_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)))); }; } override public function SolvePositionConstraints():Boolean{ var _local3:b2Mat22; 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 _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:Number = (m_ground.m_xf.position.x + m_groundAnchor1.x); var _local5:Number = (m_ground.m_xf.position.y + m_groundAnchor1.y); var _local6:Number = (m_ground.m_xf.position.x + m_groundAnchor2.x); var _local7:Number = (m_ground.m_xf.position.y + m_groundAnchor2.y); var _local23:Number = 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)); } } }//package Box2D.Dynamics.Joints
Section 66
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var groundAnchor1:b2Vec2; public var groundAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var length1:Number; public var maxLength1:Number; public var length2:Number; public var maxLength2:Number; public var ratio:Number; public function b2PulleyJointDef(){ groundAnchor1 = new b2Vec2(); groundAnchor2 = new b2Vec2(); localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundAnchor1.Set(-1, 1); groundAnchor2.Set(1, 1); localAnchor1.Set(-1, 0); localAnchor2.Set(1, 0); length1 = 0; maxLength1 = 0; length2 = 0; maxLength2 = 0; ratio = 1; collideConnected = true; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{ body1 = _arg1; body2 = _arg2; groundAnchor1.SetV(_arg3); groundAnchor2.SetV(_arg4); localAnchor1 = body1.GetLocalPoint(_arg5); localAnchor2 = body2.GetLocalPoint(_arg6); var _local8:Number = (_arg5.x - _arg3.x); var _local9:Number = (_arg5.y - _arg3.y); length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); var _local10:Number = (_arg6.x - _arg4.x); var _local11:Number = (_arg6.y - _arg4.y); length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; var _local12:Number = (length1 + (ratio * length2)); maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 67
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { private var K:b2Mat22; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_pivotForce:b2Vec2; public var m_motorForce:Number; public var m_limitForce:Number; public var m_limitPositionImpulse:Number; public var m_pivotMass:b2Mat22; public var m_motorMass:Number; public var m_enableMotor:Boolean; public var m_maxMotorTorque:Number; public var m_motorSpeed:Number; public var m_enableLimit:Boolean; public var m_referenceAngle:Number; public var m_lowerAngle:Number; public var m_upperAngle:Number; public var m_limitState:int; 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)); } override public function GetReactionForce():b2Vec2{ return (m_pivotForce); } override public function GetReactionTorque():Number{ return (m_limitForce); } public function GetJointAngle():Number{ return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle)); } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } public function GetLowerLimit():Number{ return (m_lowerAngle); } public function GetUpperLimit():Number{ return (m_upperAngle); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } public function SetMaxMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetMotorTorque():Number{ return (m_motorForce); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local7:Number; var _local14:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; var _local6:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; var _local10:Number = _local2.m_invMass; var _local11:Number = _local3.m_invMass; var _local12:Number = _local2.m_invI; var _local13:Number = _local3.m_invI; 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; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Mat22; var _local5:Number; var _local10:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local4 = _local2.m_xf.R; var _local6:Number = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); var _local7:Number = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; var _local8:Number = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); var _local9:Number = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; var _local11:Number = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7)); var _local12:Number = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6)); var _local13:Number = (-(_arg1.inv_dt) * ((m_pivotMass.col1.x * _local11) + (m_pivotMass.col2.x * _local12))); var _local14:Number = (-(_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); var _local15:Number = (_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)); }; } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local6:b2Mat22; var _local25:Number; var _local26:Number; var _local3:b2Body = m_body1; var _local4:b2Body = m_body2; var _local5:Number = 0; _local6 = _local3.m_xf.R; var _local7:Number = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); var _local8:Number = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); var _local9:Number = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8)); _local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8)); _local7 = _local9; _local6 = _local4.m_xf.R; var _local10:Number = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); var _local11:Number = (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; var _local12:Number = (_local3.m_sweep.c.x + _local7); var _local13:Number = (_local3.m_sweep.c.y + _local8); var _local14:Number = (_local4.m_sweep.c.x + _local10); var _local15:Number = (_local4.m_sweep.c.y + _local11); var _local16:Number = (_local14 - _local12); var _local17:Number = (_local15 - _local13); _local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17))); var _local18:Number = _local3.m_invMass; var _local19:Number = _local4.m_invMass; var _local20:Number = _local3.m_invI; var _local21:Number = _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)); var _local22:Number = tImpulse.x; var _local23:Number = 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(); var _local24:Number = 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)))); } } }//package Box2D.Dynamics.Joints
Section 68
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var referenceAngle:Number; public var enableLimit:Boolean; public var lowerAngle:Number; public var upperAngle:Number; public var enableMotor:Boolean; public var motorSpeed:Number; public var maxMotorTorque:Number; public function b2RevoluteJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_revoluteJoint; localAnchor1.Set(0, 0); localAnchor2.Set(0, 0); referenceAngle = 0; lowerAngle = 0; upperAngle = 0; maxMotorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 69
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Body { public var m_flags:uint; public var m_type:int; public var m_xf:b2XForm; public var m_sweep:b2Sweep; public var m_linearVelocity:b2Vec2; public var m_angularVelocity:Number; public var m_force:b2Vec2; public var m_torque:Number; public var m_world:b2World; public var m_prev:b2Body; public var m_next:b2Body; public var m_shapeList:b2Shape; public var m_shapeCount:int; public var m_jointList:b2JointEdge; public var m_contactList:b2ContactEdge; public var m_mass:Number; public var m_invMass:Number; public var m_I:Number; public var m_invI:Number; public var m_linearDamping:Number; public var m_angularDamping:Number; public var m_sleepTime:Number; public var m_userData; private static var s_massData:b2MassData = new b2MassData(); private static var s_xf1:b2XForm = new b2XForm(); public static var e_frozenFlag:uint = 2; public static var e_islandFlag:uint = 4; public static var e_sleepFlag:uint = 8; public static var e_allowSleepFlag:uint = 16; public static var e_bulletFlag:uint = 32; public static var e_fixedRotationFlag:uint = 64; public static var e_staticType:uint = 1; public static var e_dynamicType:uint = 2; public static var e_maxTypes:uint = 3; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ m_xf = new b2XForm(); m_sweep = new b2Sweep(); m_linearVelocity = new b2Vec2(); m_force = new b2Vec2(); super(); m_flags = 0; if (_arg1.isBullet){ m_flags = (m_flags | e_bulletFlag); }; if (_arg1.fixedRotation){ m_flags = (m_flags | e_fixedRotationFlag); }; if (_arg1.allowSleep){ m_flags = (m_flags | e_allowSleepFlag); }; if (_arg1.isSleeping){ m_flags = (m_flags | e_sleepFlag); }; m_world = _arg2; m_xf.position.SetV(_arg1.position); m_xf.R.Set(_arg1.angle); m_sweep.localCenter.SetV(_arg1.massData.center); m_sweep.t0 = 1; m_sweep.a0 = (m_sweep.a = _arg1.angle); var _local3:b2Mat22 = m_xf.R; var _local4:b2Vec2 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_jointList = null; m_contactList = null; m_prev = null; m_next = null; m_linearDamping = _arg1.linearDamping; m_angularDamping = _arg1.angularDamping; m_force.Set(0, 0); m_torque = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_sleepTime = 0; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.massData.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.massData.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; m_userData = _arg1.userData; m_shapeList = null; m_shapeCount = 0; } public function 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{ if (m_world.m_lock == true){ return; }; _arg1.DestroyProxy(m_world.m_broadPhase); var _local2:b2Shape = m_shapeList; var _local3:b2Shape; var _local4:Boolean; while (_local2 != null) { if (_local2 == _arg1){ if (_local3){ _local3.m_next = _arg1.m_next; } else { m_shapeList = _arg1.m_next; }; _local4 = true; break; }; _local3 = _local2; _local2 = _local2.m_next; }; _arg1.m_body = null; _arg1.m_next = null; m_shapeCount--; b2Shape.Destroy(_arg1, m_world.m_blockAllocator); } public function SetMass(_arg1:b2MassData):void{ var _local2:b2Shape; if (m_world.m_lock == true){ return; }; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; m_sweep.localCenter.SetV(_arg1.center); var _local3:b2Mat22 = m_xf.R; var _local4:b2Vec2 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); _local2 = m_shapeList; while (_local2) { _local2.UpdateSweepRadius(m_sweep.localCenter); _local2 = _local2.m_next; }; var _local5:int = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local5 != m_type){ _local2 = m_shapeList; while (_local2) { _local2.RefilterProxy(m_world.m_broadPhase, m_xf); _local2 = _local2.m_next; }; }; } public function SetMassFromShapes():void{ var _local1:b2Shape; if (m_world.m_lock == true){ return; }; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; var _local2:Number = 0; var _local3:Number = 0; var _local4:b2MassData = s_massData; _local1 = m_shapeList; while (_local1) { _local1.ComputeMass(_local4); m_mass = (m_mass + _local4.mass); _local2 = (_local2 + (_local4.mass * _local4.center.x)); _local3 = (_local3 + (_local4.mass * _local4.center.y)); m_I = (m_I + _local4.I); _local1 = _local1.m_next; }; if (m_mass > 0){ m_invMass = (1 / m_mass); _local2 = (_local2 * m_invMass); _local3 = (_local3 * m_invMass); }; if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){ m_I = (m_I - (m_mass * ((_local2 * _local2) + (_local3 * _local3)))); m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; m_sweep.localCenter.Set(_local2, _local3); var _local5:b2Mat22 = m_xf.R; var _local6:b2Vec2 = m_sweep.localCenter; m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y)); m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); _local1 = m_shapeList; while (_local1) { _local1.UpdateSweepRadius(m_sweep.localCenter); _local1 = _local1.m_next; }; var _local7:int = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local7 != m_type){ _local1 = m_shapeList; while (_local1) { _local1.RefilterProxy(m_world.m_broadPhase, m_xf); _local1 = _local1.m_next; }; }; } public function SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{ var _local3:b2Shape; var _local7:Boolean; if (m_world.m_lock == true){ return (true); }; if (IsFrozen()){ return (false); }; m_xf.R.Set(_arg2); m_xf.position.SetV(_arg1); var _local4:b2Mat22 = m_xf.R; var _local5:b2Vec2 = m_sweep.localCenter; m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y)); m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_sweep.a0 = (m_sweep.a = _arg2); var _local6:Boolean; _local3 = m_shapeList; while (_local3) { _local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf); if (_local7 == false){ _local6 = true; break; }; _local3 = _local3.m_next; }; if (_local6 == true){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local3 = m_shapeList; while (_local3) { _local3.DestroyProxy(m_world.m_broadPhase); _local3 = _local3.m_next; }; return (false); }; m_world.m_broadPhase.Commit(); return (true); } public function GetXForm():b2XForm{ return (m_xf); } public function GetPosition():b2Vec2{ return (m_xf.position); } public function GetAngle():Number{ return (m_sweep.a); } public function GetWorldCenter():b2Vec2{ return (m_sweep.c); } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } public function SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } public function GetAngularVelocity():Number{ return (m_angularVelocity); } 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 ApplyTorque(_arg1:Number):void{ if (IsSleeping()){ WakeUp(); }; m_torque = (m_torque + _arg1); } 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 GetMass():Number{ return (m_mass); } public function GetInertia():Number{ return (m_I); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22 = m_xf.R; var _local3:b2Vec2 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (_local3); } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_xf.R, _arg1)); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulXT(m_xf, _arg1)); } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_xf.R, _arg1)); } public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{ return (new b2Vec2((m_linearVelocity.x - (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.y + (m_angularVelocity * (_arg1.x - m_sweep.c.x))))); } public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22 = m_xf.R; var _local3:b2Vec2 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_local3.x - m_sweep.c.x))))); } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function SetBullet(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_bulletFlag); } else { m_flags = (m_flags & ~(e_bulletFlag)); }; } public function IsStatic():Boolean{ return ((m_type == e_staticType)); } public function IsDynamic():Boolean{ return ((m_type == e_dynamicType)); } public function IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } 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 GetShapeList():b2Shape{ return (m_shapeList); } public function GetJointList():b2JointEdge{ return (m_jointList); } public function GetNext():b2Body{ return (m_next); } public function GetUserData(){ return (m_userData); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetWorld():b2World{ return (m_world); } public function SynchronizeShapes():Boolean{ var _local4:b2Shape; var _local1:b2XForm = s_xf1; _local1.R.Set(m_sweep.a0); var _local2:b2Mat22 = _local1.R; var _local3:b2Vec2 = m_sweep.localCenter; _local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y))); _local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y))); var _local5:Boolean; _local4 = m_shapeList; while (_local4) { _local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf); if (_local5 == false){ break; }; _local4 = _local4.m_next; }; if (_local5 == false){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local4 = m_shapeList; while (_local4) { _local4.DestroyProxy(m_world.m_broadPhase); _local4 = _local4.m_next; }; return (false); }; return (true); } public function SynchronizeTransform():void{ m_xf.R.Set(m_sweep.a); var _local1:b2Mat22 = m_xf.R; var _local2:b2Vec2 = m_sweep.localCenter; m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y))); m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y))); } public function IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointEdge = m_jointList; while (_local2) { if (_local2.other == _arg1){ return ((_local2.joint.m_collideConnected == false)); }; _local2 = _local2.next; }; return (false); } public function Advance(_arg1:Number):void{ m_sweep.Advance(_arg1); m_sweep.c.SetV(m_sweep.c0); m_sweep.a = m_sweep.a0; SynchronizeTransform(); } } }//package Box2D.Dynamics
Section 70
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; public class b2BodyDef { public var massData:b2MassData; public var userData; public var position:b2Vec2; public var angle:Number; public var linearDamping:Number; public var angularDamping:Number; public var allowSleep:Boolean; public var isSleeping:Boolean; public var fixedRotation:Boolean; public var isBullet:Boolean; 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 71
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 72
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; 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 = _arg1.GetFilterData(); var _local4:b2FilterData = _arg2.GetFilterData(); if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){ return ((_local3.groupIndex > 0)); }; var _local5:Boolean = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } } }//package Box2D.Dynamics
Section 73
//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 Persist(_arg1:b2ContactPoint):void{ } public function Remove(_arg1:b2ContactPoint):void{ } public function Result(_arg1:b2ContactResult):void{ } } }//package Box2D.Dynamics
Section 74
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_nullContact:b2NullContact; public var m_destroyImmediate:Boolean; 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 = (_arg1 as b2Shape); var _local4:b2Shape = (_arg2 as b2Shape); var _local5:b2Body = _local3.m_body; var _local6:b2Body = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){ return (m_nullContact); }; var _local7:b2Contact = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator); if (_local7 == null){ return (m_nullContact); }; _local3 = _local7.m_shape1; _local4 = _local7.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local7.m_prev = null; _local7.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local7; }; m_world.m_contactList = _local7; _local7.m_node1.contact = _local7; _local7.m_node1.other = _local6; _local7.m_node1.prev = null; _local7.m_node1.next = _local5.m_contactList; if (_local5.m_contactList != null){ _local5.m_contactList.prev = _local7.m_node1; }; _local5.m_contactList = _local7.m_node1; _local7.m_node2.contact = _local7; _local7.m_node2.other = _local5; _local7.m_node2.prev = null; _local7.m_node2.next = _local6.m_contactList; if (_local6.m_contactList != null){ _local6.m_contactList.prev = _local7.m_node2; }; _local6.m_contactList = _local7.m_node2; m_world.m_contactCount++; return (_local7); } override public function PairRemoved(_arg1, _arg2, _arg3):void{ if (_arg3 == null){ return; }; var _local4:b2Contact = (_arg3 as b2Contact); if (_local4 == m_nullContact){ return; }; Destroy(_local4); } public function Destroy(_arg1:b2Contact):void{ var _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; var _local2:b2Shape = _arg1.m_shape1; var _local3:b2Shape = _arg1.m_shape2; var _local4:int = _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_shape2; _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; }; var _local5:b2Body = _local2.m_body; var _local6:b2Body = _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 _local2:b2Body; var _local3:b2Body; var _local1:b2Contact = m_world.m_contactList; while (_local1) { _local2 = _local1.m_shape1.m_body; _local3 = _local1.m_shape2.m_body; if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){ } else { _local1.Update(m_world.m_contactListener); }; _local1 = _local1.m_next; }; } } }//package Box2D.Dynamics
Section 75
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import Box2D.Common.Math.*; import flash.display.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2DebugDraw { public var m_drawFlags:uint; public var m_sprite:Sprite; public var m_drawScale:Number;// = 1 public var m_lineThickness:Number;// = 1 public var m_alpha:Number;// = 1 public var m_fillAlpha:Number;// = 1 public var m_xformScale:Number;// = 1 public static var e_shapeBit:uint = 1; public static var e_jointBit:uint = 2; public static var e_coreShapeBit:uint = 4; 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_centerOfMassBit:uint = 64; public function b2DebugDraw(){ m_drawFlags = 0; } public function SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } public function GetFlags():uint{ return (m_drawFlags); } public function AppendFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags | _arg1); } public function ClearFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags & ~(_arg1)); } public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); var _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); } public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.beginFill(_arg3.color, m_fillAlpha); var _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.endFill(); } public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); } public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg4.color, m_alpha); m_sprite.graphics.moveTo(0, 0); m_sprite.graphics.beginFill(_arg4.color, m_fillAlpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); m_sprite.graphics.endFill(); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * m_drawScale), ((_arg1.y + (_arg3.y * _arg2)) * m_drawScale)); } public function 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 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)); } } }//package Box2D.Dynamics
Section 76
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; public class b2DestructionListener { public function SayGoodbyeJoint(_arg1:b2Joint):void{ } public function SayGoodbyeShape(_arg1:b2Shape):void{ } } }//package Box2D.Dynamics
Section 77
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Island { public var m_allocator; public var m_listener:b2ContactListener; public var m_bodies:Array; public var m_contacts:Array; public var m_joints:Array; public var m_bodyCount:int; public var m_jointCount:int; public var m_contactCount:int; public var m_bodyCapacity:int; public var m_contactCapacity:int; public var m_jointCapacity:int; public var m_positionIterationCount: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 Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{ var _local5:int; var _local6:b2Body; var _local7:b2Joint; var _local9:int; var _local10:Boolean; var _local11:Boolean; var _local12:Boolean; var _local13:Number; var _local14:Number; var _local15:Number; _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * (_arg2.x + (_local6.m_invMass * _local6.m_force.x)))); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * (_arg2.y + (_local6.m_invMass * _local6.m_force.y)))); _local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque)); _local6.m_force.SetZero(); _local6.m_torque = 0; _local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1)); _local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1)); if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){ _local6.m_linearVelocity.Normalize(); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity); }; if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){ if (_local6.m_angularVelocity < 0){ _local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity); } else { _local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity; }; }; }; _local5++; }; var _local8:b2ContactSolver = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local8.InitVelocityConstraints(_arg1); _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitVelocityConstraints(_arg1); _local5++; }; _local5 = 0; while (_local5 < _arg1.maxIterations) { _local8.SolveVelocityConstraints(); _local9 = 0; while (_local9 < m_jointCount) { _local7 = m_joints[_local9]; _local7.SolveVelocityConstraints(_arg1); _local9++; }; _local5++; }; _local8.FinalizeVelocityConstraints(); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { _local6.m_sweep.c0.SetV(_local6.m_sweep.c); _local6.m_sweep.a0 = _local6.m_sweep.a; _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y)); _local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity)); _local6.SynchronizeTransform(); }; _local5++; }; if (_arg3){ _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitPositionConstraints(); _local5++; }; m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.maxIterations) { _local10 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local11 = true; _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local12 = _local7.SolvePositionConstraints(); _local11 = ((_local11) && (_local12)); _local5++; }; if (((_local10) && (_local11))){ break; }; m_positionIterationCount++; }; }; Report(_local8.m_constraints); if (_arg4){ _local13 = Number.MAX_VALUE; _local14 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local15 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.m_invMass == 0){ } else { if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){ _local6.m_sleepTime = 0; _local13 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local15)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local14)))){ _local6.m_sleepTime = 0; _local13 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local13 = b2Math.b2Min(_local13, _local6.m_sleepTime); }; }; _local5++; }; if (_local13 >= b2Settings.b2_timeToSleep){ _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag); _local6.m_linearVelocity.SetZero(); _local6.m_angularVelocity = 0; _local5++; }; }; }; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:int; var _local5:b2Body; var _local6:Boolean; var _local3:b2ContactSolver = 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++; }; var _local4:Number = 0.75; _local2 = 0; while (_local2 < _arg1.maxIterations) { _local6 = _local3.SolvePositionConstraints(_local4); if (_local6){ break; }; _local2++; }; Report(_local3.m_constraints); } public function Report(_arg1:Array):void{ var _local2:b2Mat22; var _local3:b2Vec2; var _local5:b2Contact; var _local6:b2ContactConstraint; var _local7:b2ContactResult; var _local8:b2Body; var _local9:int; var _local10:Array; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2ContactConstraintPoint; if (m_listener == null){ return; }; var _local4:int; while (_local4 < m_contactCount) { _local5 = m_contacts[_local4]; _local6 = _arg1[_local4]; _local7 = s_reportCR; _local7.shape1 = _local5.m_shape1; _local7.shape2 = _local5.m_shape2; _local8 = _local7.shape1.m_body; _local9 = _local5.m_manifoldCount; _local10 = _local5.GetManifolds(); _local11 = 0; while (_local11 < _local9) { _local12 = _local10[_local11]; _local7.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local15 = _local6.points[_local13]; _local7.position = _local8.GetWorldPoint(_local14.localPoint1); _local7.normalImpulse = _local15.normalImpulse; _local7.tangentImpulse = _local15.tangentImpulse; _local7.id.key = _local14.id.key; m_listener.Result(_local7); _local13++; }; _local11++; }; _local4++; }; } public function AddBody(_arg1:b2Body):void{ var _local2 = m_bodyCount++; m_bodies[_local2] = _arg1; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function AddJoint(_arg1:b2Joint):void{ var _local2 = m_jointCount++; m_joints[_local2] = _arg1; } } }//package Box2D.Dynamics
Section 78
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var dt:Number; public var inv_dt:Number; public var dtRatio:Number; public var maxIterations:int; public var warmStarting:Boolean; public var positionCorrection:Boolean; } }//package Box2D.Dynamics
Section 79
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2World { public var m_blockAllocator; public var m_stackAllocator; public var m_lock:Boolean; public var m_broadPhase:b2BroadPhase; public var m_contactManager:b2ContactManager; public var m_bodyList:b2Body; public var m_jointList:b2Joint; public var m_contactList:b2Contact; public var m_bodyCount:int; public var m_contactCount:int; public var m_jointCount:int; public var m_gravity:b2Vec2; public var m_allowSleep:Boolean; public var m_groundBody:b2Body; public var m_destructionListener:b2DestructionListener; public var m_boundaryListener:b2BoundaryListener; public var m_contactFilter:b2ContactFilter; public var m_contactListener:b2ContactListener; public var m_debugDraw:b2DebugDraw; public var m_inv_dt0:Number; public var m_positionIterationCount:int; private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6); private static var s_xf:b2XForm = new b2XForm(); public static var m_positionCorrection:Boolean; public static var m_warmStarting:Boolean; public static var m_continuousPhysics:Boolean; public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ 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); var _local4:b2BodyDef = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function SetDestructionListener(_arg1:b2DestructionListener):void{ m_destructionListener = _arg1; } public function SetBoundaryListener(_arg1:b2BoundaryListener):void{ m_boundaryListener = _arg1; } public function SetContactFilter(_arg1:b2ContactFilter):void{ m_contactFilter = _arg1; } public function SetContactListener(_arg1:b2ContactListener):void{ m_contactListener = _arg1; } public function SetDebugDraw(_arg1:b2DebugDraw):void{ m_debugDraw = _arg1; } public function Validate():void{ m_broadPhase.Validate(); } public function GetProxyCount():int{ return (m_broadPhase.m_proxyCount); } public function GetPairCount():int{ return (m_broadPhase.m_pairManager.m_pairCount); } public function CreateBody(_arg1:b2BodyDef):b2Body{ if (m_lock == true){ return (null); }; var _local2:b2Body = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function DestroyBody(_arg1:b2Body):void{ var _local4:b2JointEdge; var _local5:b2Shape; if (m_lock == true){ return; }; var _local2:b2JointEdge = _arg1.m_jointList; while (_local2) { _local4 = _local2; _local2 = _local2.next; if (m_destructionListener){ m_destructionListener.SayGoodbyeJoint(_local4.joint); }; DestroyJoint(_local4.joint); }; var _local3:b2Shape = _arg1.m_shapeList; while (_local3) { _local5 = _local3; _local3 = _local3.m_next; if (m_destructionListener){ m_destructionListener.SayGoodbyeShape(_local5); }; _local5.DestroyProxy(m_broadPhase); b2Shape.Destroy(_local5, m_blockAllocator); }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_bodyList){ m_bodyList = _arg1.m_next; }; m_bodyCount--; } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local3:b2Body; var _local4:b2Shape; var _local2:b2Joint = b2Joint.Create(_arg1, m_blockAllocator); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_node1.joint = _local2; _local2.m_node1.other = _local2.m_body2; _local2.m_node1.prev = null; _local2.m_node1.next = _local2.m_body1.m_jointList; if (_local2.m_body1.m_jointList){ _local2.m_body1.m_jointList.prev = _local2.m_node1; }; _local2.m_body1.m_jointList = _local2.m_node1; _local2.m_node2.joint = _local2; _local2.m_node2.other = _local2.m_body1; _local2.m_node2.prev = null; _local2.m_node2.next = _local2.m_body2.m_jointList; if (_local2.m_body2.m_jointList){ _local2.m_body2.m_jointList.prev = _local2.m_node2; }; _local2.m_body2.m_jointList = _local2.m_node2; if (_arg1.collideConnected == false){ _local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2; _local4 = _local3.m_shapeList; while (_local4) { _local4.RefilterProxy(m_broadPhase, _local3.m_xf); _local4 = _local4.m_next; }; }; return (_local2); } public function DestroyJoint(_arg1:b2Joint):void{ var _local5:b2Body; var _local6:b2Shape; var _local2:Boolean = _arg1.m_collideConnected; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_jointList){ m_jointList = _arg1.m_next; }; var _local3:b2Body = _arg1.m_body1; var _local4:b2Body = _arg1.m_body2; _local3.WakeUp(); _local4.WakeUp(); if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local3.m_jointList){ _local3.m_jointList = _arg1.m_node1.next; }; _arg1.m_node1.prev = null; _arg1.m_node1.next = null; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local4.m_jointList){ _local4.m_jointList = _arg1.m_node2.next; }; _arg1.m_node2.prev = null; _arg1.m_node2.next = null; b2Joint.Destroy(_arg1, m_blockAllocator); m_jointCount--; if (_local2 == false){ _local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4; _local6 = _local5.m_shapeList; while (_local6) { _local6.RefilterProxy(m_broadPhase, _local5.m_xf); _local6 = _local6.m_next; }; }; } public function Refilter(_arg1:b2Shape):void{ _arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf); } public function SetWarmStarting(_arg1:Boolean):void{ m_warmStarting = _arg1; } public function SetPositionCorrection(_arg1:Boolean):void{ m_positionCorrection = _arg1; } public function SetContinuousPhysics(_arg1:Boolean):void{ m_continuousPhysics = _arg1; } public function GetBodyCount():int{ return (m_bodyCount); } public function GetJointCount():int{ return (m_jointCount); } public function GetContactCount():int{ return (m_contactCount); } public function SetGravity(_arg1:b2Vec2):void{ m_gravity = _arg1; } public function GetGroundBody():b2Body{ return (m_groundBody); } public function Step(_arg1:Number, _arg2:int):void{ m_lock = true; var _local3:b2TimeStep = 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 Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array = new Array(_arg3); var _local5:int = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); var _local6:int; while (_local6 < _local5) { _arg2[_local6] = _local4[_local6]; _local6++; }; return (_local5); } public function GetBodyList():b2Body{ return (m_bodyList); } public function GetJointList():b2Joint{ return (m_jointList); } public function Solve(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local9:int; var _local10:int; var _local11:b2Body; var _local12:b2ContactEdge; var _local13:b2JointEdge; var _local14:Boolean; m_positionIterationCount = 0; var _local3:b2Island = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator, m_contactListener); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2 = _local2.m_next; }; var _local4:b2Contact = m_contactList; while (_local4) { _local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag)); _local4 = _local4.m_next; }; var _local5:b2Joint = m_jointList; while (_local5) { _local5.m_islandFlag = false; _local5 = _local5.m_next; }; var _local6:int = m_bodyCount; var _local7:Array = new Array(_local6); var _local8:b2Body = m_bodyList; while (_local8) { if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){ } else { if (_local8.IsStatic()){ } else { _local3.Clear(); _local9 = 0; var _temp1 = _local9; _local9 = (_local9 + 1); var _local15 = _temp1; _local7[_local15] = _local8; _local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag); while (_local9 > 0) { --_local9; _local2 = _local7[_local9]; _local3.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local12 = _local2.m_contactList; while (_local12) { if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){ } else { if (_local12.contact.m_manifoldCount == 0){ } else { _local3.AddContact(_local12.contact); _local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag); _local11 = _local12.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local9; _local9 = (_local9 + 1); var _local16 = _temp2; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; }; _local12 = _local12.next; }; _local13 = _local2.m_jointList; while (_local13) { if (_local13.joint.m_islandFlag == true){ } else { _local3.AddJoint(_local13.joint); _local13.joint.m_islandFlag = true; _local11 = _local13.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local9; _local9 = (_local9 + 1); _local16 = _temp3; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; _local13 = _local13.next; }; }; }; _local3.Solve(_arg1, m_gravity, m_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 SolveTOI(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactEdge; 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; var _local8:b2Island = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, m_stackAllocator, m_contactListener); var _local9:int = m_bodyCount; var _local10:Array = 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 DrawJoint(_arg1:b2Joint):void{ var _local11:b2PulleyJoint; var _local12:b2Vec2; var _local13:b2Vec2; var _local2:b2Body = _arg1.m_body1; var _local3:b2Body = _arg1.m_body2; var _local4:b2XForm = _local2.m_xf; var _local5:b2XForm = _local3.m_xf; var _local6:b2Vec2 = _local4.position; var _local7:b2Vec2 = _local5.position; var _local8:b2Vec2 = _arg1.GetAnchor1(); var _local9:b2Vec2 = _arg1.GetAnchor2(); var _local10:b2Color = s_jointColor; switch (_arg1.m_type){ case b2Joint.e_distanceJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; case b2Joint.e_pulleyJoint: _local11 = (_arg1 as b2PulleyJoint); _local12 = _local11.GetGroundAnchor1(); _local13 = _local11.GetGroundAnchor2(); m_debugDraw.DrawSegment(_local12, _local8, _local10); m_debugDraw.DrawSegment(_local13, _local9, _local10); m_debugDraw.DrawSegment(_local12, _local13, _local10); break; case b2Joint.e_mouseJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; default: if (_local2 != m_groundBody){ m_debugDraw.DrawSegment(_local6, _local8, _local10); }; m_debugDraw.DrawSegment(_local8, _local9, _local10); if (_local3 != m_groundBody){ m_debugDraw.DrawSegment(_local7, _local9, _local10); }; }; } public function DrawShape(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{ var _local6:b2CircleShape; var _local7:b2Vec2; var _local8:Number; var _local9:b2Vec2; var _local10:int; var _local11:b2PolygonShape; var _local12:int; var _local13:Array; var _local14:Array; var _local15:Array; var _local5:b2Color = s_coreColor; switch (_arg1.m_type){ case b2Shape.e_circleShape: _local6 = (_arg1 as b2CircleShape); _local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition); _local8 = _local6.m_radius; _local9 = _arg2.R.col1; m_debugDraw.DrawSolidCircle(_local7, _local8, _local9, _arg3); if (_arg4){ m_debugDraw.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5); }; break; case b2Shape.e_polygonShape: _local11 = (_arg1 as b2PolygonShape); _local12 = _local11.GetVertexCount(); _local13 = _local11.GetVertices(); _local14 = new Array(b2Settings.b2_maxPolygonVertices); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]); _local10++; }; m_debugDraw.DrawSolidPolygon(_local14, _local12, _arg3); if (_arg4){ _local15 = _local11.GetCoreVertices(); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]); _local10++; }; m_debugDraw.DrawPolygon(_local14, _local12, _local5); }; break; }; } public function DrawDebugData():void{ var _local2:int; var _local3:b2Body; var _local4:b2Shape; var _local5:b2Joint; var _local6:b2BroadPhase; var _local11:b2XForm; var _local15:Boolean; var _local16: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(); var _local1:uint = m_debugDraw.GetFlags(); var _local7:b2Vec2 = new b2Vec2(); var _local8:b2Vec2 = new b2Vec2(); var _local9:b2Vec2 = new b2Vec2(); var _local10:b2Color = new b2Color(0, 0, 0); var _local12:b2AABB = new b2AABB(); var _local13:b2AABB = new b2AABB(); var _local14:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()]; if ((_local1 & b2DebugDraw.e_shapeBit)){ _local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local3.IsStatic()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15); } else { if (_local3.IsSleeping()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15); } else { DrawShape(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15); }; }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_jointBit)){ _local5 = m_jointList; while (_local5) { DrawJoint(_local5); _local5 = _local5.m_next; }; }; if ((_local1 & b2DebugDraw.e_pairBit)){ _local6 = m_broadPhase; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.9, 0.3); _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; }; }; } } }//package Box2D.Dynamics
Section 80
//PropTween (com.greensock.core.PropTween) package com.greensock.core { public class PropTween { public var target:Object; public var property:String; public var start:Number; public var change:Number; public var name:String; public var priority:int; public var isPlugin:Boolean; public var nextNode:PropTween; public var prevNode:PropTween; public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; if (_arg7){ _arg7.prevNode = this; this.nextNode = _arg7; }; this.priority = _arg8; } } }//package com.greensock.core
Section 81
//SimpleTimeline (com.greensock.core.SimpleTimeline) package com.greensock.core { public class SimpleTimeline extends TweenCore { protected var _firstChild:TweenCore; protected var _lastChild:TweenCore; public var autoRemoveChildren:Boolean; public function SimpleTimeline(_arg1:Object=null){ super(0, _arg1); } public function addChild(_arg1:TweenCore):void{ if (((!(_arg1.cachedOrphan)) && (_arg1.timeline))){ _arg1.timeline.remove(_arg1, true); }; _arg1.timeline = this; if (_arg1.gc){ _arg1.setEnabled(true, true); }; if (_firstChild){ _firstChild.prevNode = _arg1; }; _arg1.nextNode = _firstChild; _firstChild = _arg1; _arg1.prevNode = null; _arg1.cachedOrphan = false; } public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{ if (_arg1.cachedOrphan){ return; }; if (!_arg2){ _arg1.setEnabled(false, true); }; if (_arg1.nextNode){ _arg1.nextNode.prevNode = _arg1.prevNode; } else { if (_lastChild == _arg1){ _lastChild = _arg1.prevNode; }; }; if (_arg1.prevNode){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (_firstChild == _arg1){ _firstChild = _arg1.nextNode; }; }; _arg1.cachedOrphan = true; } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local5:Number; var _local6:TweenCore; var _local4:TweenCore = _firstChild; this.cachedTotalTime = _arg1; this.cachedTime = _arg1; while (_local4) { _local6 = _local4.nextNode; if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){ if (!_local4.cachedReversed){ _local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false); } else { _local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration; _local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false); }; }; _local4 = _local6; }; } public function get rawTime():Number{ return (this.cachedTotalTime); } } }//package com.greensock.core
Section 82
//TweenCore (com.greensock.core.TweenCore) package com.greensock.core { import com.greensock.*; public class TweenCore { protected var _delay:Number; protected var _hasUpdate:Boolean; protected var _rawPrevTime:Number;// = -1 protected var _pauseTime:Number; public var vars:Object; public var active:Boolean; public var gc:Boolean; public var initted:Boolean; public var timeline:SimpleTimeline; public var cachedStartTime:Number; public var cachedTime:Number; public var cachedTotalTime:Number; public var cachedDuration:Number; public var cachedTotalDuration:Number; public var cachedTimeScale:Number; public var cachedReversed:Boolean; public var nextNode:TweenCore; public var prevNode:TweenCore; public var cachedOrphan:Boolean; public var cacheIsDirty:Boolean; public var cachedPaused:Boolean; public var data; public static const version:Number = 1.382; protected static var _classInitted:Boolean; public function TweenCore(_arg1:Number=0, _arg2:Object=null){ this.vars = ((_arg2)!=null) ? _arg2 : {}; this.cachedDuration = (this.cachedTotalDuration = _arg1); _delay = (this.vars.delay) ? Number(this.vars.delay) : 0; this.cachedTimeScale = (this.vars.timeScale) ? Number(this.vars.timeScale) : 1; this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false))))); this.cachedTotalTime = (this.cachedTime = 0); this.data = this.vars.data; if (!_classInitted){ if (isNaN(TweenLite.rootFrame)){ TweenLite.initClass(); _classInitted = true; } else { return; }; }; var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.cachedStartTime = (_local3.cachedTotalTime + _delay); _local3.addChild(this); if (this.vars.reversed){ this.cachedReversed = true; }; if (this.vars.paused){ this.paused = true; }; } public function play():void{ this.reversed = false; this.paused = false; } public function pause():void{ this.paused = true; } public function resume():void{ this.paused = false; } public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{ this.reversed = false; this.paused = false; this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2); } public function reverse(_arg1:Boolean=true):void{ this.reversed = true; if (_arg1){ this.paused = false; } else { if (this.gc){ this.setEnabled(true, false); }; }; } public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ } public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{ if (!_arg1){ renderTime(this.totalDuration, _arg2, false); return; }; if (this.timeline.autoRemoveChildren){ this.setEnabled(false, false); } else { this.active = false; }; if (!_arg2){ if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); } else { if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){ this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams); }; }; }; } public function invalidate():void{ } public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{ this.gc = !(_arg1); if (_arg1){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); if (((!(_arg2)) && (this.cachedOrphan))){ this.timeline.addChild(this); }; } else { this.active = false; if (((!(_arg2)) && (!(this.cachedOrphan)))){ this.timeline.remove(this, true); }; }; return (false); } public function kill():void{ setEnabled(false, false); } protected function setDirtyCache(_arg1:Boolean=true):void{ var _local2:TweenCore = (_arg1) ? this : this.timeline; while (_local2) { _local2.cacheIsDirty = true; _local2 = _local2.timeline; }; } protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{ var _local3:Number; var _local4:Number; if (this.timeline){ _local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; if (this.cachedReversed){ _local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale)); } else { this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale)); }; if (!this.timeline.cacheIsDirty){ setDirtyCache(false); }; if (this.cachedTotalTime != _arg1){ renderTime(_arg1, _arg2, false); }; }; } public function get delay():Number{ return (_delay); } public function set delay(_arg1:Number):void{ this.startTime = (this.startTime + (_arg1 - _delay)); _delay = _arg1; } public function get duration():Number{ return (this.cachedDuration); } public function set duration(_arg1:Number):void{ this.cachedDuration = (this.cachedTotalDuration = _arg1); setDirtyCache(false); } public function get totalDuration():Number{ return (this.cachedTotalDuration); } public function set totalDuration(_arg1:Number):void{ this.duration = _arg1; } public function get currentTime():Number{ return (this.cachedTime); } public function set currentTime(_arg1:Number):void{ setTotalTime(_arg1, false); } public function get totalTime():Number{ return (this.cachedTotalTime); } public function set totalTime(_arg1:Number):void{ setTotalTime(_arg1, false); } public function get startTime():Number{ return (this.cachedStartTime); } public function set startTime(_arg1:Number):void{ var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc))))); this.cachedStartTime = _arg1; if (_local2){ this.timeline.addChild(this); }; } public function get reversed():Boolean{ return (this.cachedReversed); } public function set reversed(_arg1:Boolean):void{ if (_arg1 != this.cachedReversed){ this.cachedReversed = _arg1; setTotalTime(this.cachedTotalTime, true); }; } public function get paused():Boolean{ return (this.cachedPaused); } public function set paused(_arg1:Boolean):void{ if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){ if (_arg1){ _pauseTime = this.timeline.rawTime; } else { this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime)); _pauseTime = NaN; setDirtyCache(false); }; this.cachedPaused = _arg1; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(_arg1)) && (this.gc))){ this.setTotalTime(this.cachedTotalTime, false); this.setEnabled(true, false); }; } } }//package com.greensock.core
Section 83
//TweenLite (com.greensock.TweenLite) package com.greensock { import flash.display.*; import flash.events.*; import com.greensock.core.*; import flash.utils.*; public class TweenLite extends TweenCore { public var target:Object; public var propTweenLookup:Object; public var ratio:Number;// = 0 public var cachedPT1:PropTween; protected var _ease:Function; protected var _overwrite:uint; protected var _overwrittenProps:Object; protected var _hasPlugins:Boolean; protected var _notifyPluginsOfEnabled:Boolean; public static const version:Number = 11.36; public static var plugins:Object = {}; public static var fastEaseLookup:Dictionary = new Dictionary(false); public static var onPluginEvent:Function; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public static var defaultEase:Function = TweenLite.easeOut; public static var overwriteManager:Object; public static var rootFrame:Number; public static var rootTimeline:SimpleTimeline; public static var rootFramesTimeline:SimpleTimeline; public static var masterList:Dictionary = new Dictionary(false); private static var _shape:Shape = new Shape(); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onInit:1, onInitParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1}; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local5:TweenLite; super(_arg2, _arg3); this.target = _arg1; if ((((this.target is TweenCore)) && (this.vars.timeScale))){ this.cachedTimeScale = 1; }; propTweenLookup = {}; _ease = defaultEase; _overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); var _local4:Array = masterList[_arg1]; if (!_local4){ masterList[_arg1] = [this]; } else { if (_overwrite == 1){ for each (_local5 in _local4) { if (!_local5.gc){ _local5.setEnabled(false, false); }; }; masterList[_arg1] = [this]; } else { _local4[_local4.length] = this; }; }; if (((this.active) || (this.vars.immediateRender))){ renderTime(0, false, true); }; } protected function init():void{ var _local1:String; var _local2:int; var _local3:*; var _local4:Boolean; var _local5:Array; var _local6:PropTween; if (this.vars.onInit){ this.vars.onInit.apply(null, this.vars.onInitParams); }; if (typeof(this.vars.ease) == "function"){ _ease = this.vars.ease; }; if (this.vars.easeParams){ this.vars.proxiedEase = _ease; _ease = easeProxy; }; this.cachedPT1 = null; this.propTweenLookup = {}; for (_local1 in this.vars) { if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){ } else { if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){ this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1); if (this.cachedPT1.name == "_MULTIPLE_"){ _local2 = _local3.overwriteProps.length; while (--_local2 > -1) { this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1; }; } else { this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1; }; if (_local3.priority){ this.cachedPT1.priority = _local3.priority; _local4 = true; }; if (((_local3.onDisable) || (_local3.onEnable))){ _notifyPluginsOfEnabled = true; }; _hasPlugins = true; } else { this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1); this.propTweenLookup[_local1] = this.cachedPT1; }; }; }; if (_local4){ onPluginEvent("onInit", this); }; if (this.vars.runBackwards){ _local6 = this.cachedPT1; while (_local6) { _local6.start = (_local6.start + _local6.change); _local6.change = -(_local6.change); _local6 = _local6.nextNode; }; }; _hasUpdate = Boolean(!((this.vars.onUpdate == null))); if (_overwrittenProps){ killVars(_overwrittenProps); if (this.cachedPT1 == null){ this.setEnabled(false, false); }; }; if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){ if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){ init(); }; }; this.initted = true; } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local4:Boolean; var _local5:Number = this.cachedTime; if (_arg1 >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); this.ratio = 1; _local4 = true; if (this.cachedDuration == 0){ if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){ _arg3 = true; }; _rawPrevTime = _arg1; }; } else { if (_arg1 <= 0){ this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (_arg1 < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ _arg3 = true; _local4 = true; }; _rawPrevTime = _arg1; }; }; if (((this.cachedReversed) && (!((_local5 == 0))))){ _local4 = true; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); this.ratio = _ease(_arg1, 0, 1, this.cachedDuration); }; }; if ((((this.cachedTime == _local5)) && (!(_arg3)))){ return; }; if (!this.initted){ init(); if (((!(_local4)) && (this.cachedTime))){ this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; var _local6:PropTween = this.cachedPT1; while (_local6) { _local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change)); _local6 = _local6.nextNode; }; if (((_hasUpdate) && (!(_arg2)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local4){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, _arg2); }; } public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{ var _local3:String; var _local4:PropTween; var _local5:Boolean; if (_overwrittenProps == null){ _overwrittenProps = {}; }; for (_local3 in _arg1) { if ((_local3 in propTweenLookup)){ _local4 = propTweenLookup[_local3]; if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){ _local4.target.killProps(_arg1); if (_local4.target.overwriteProps.length == 0){ _local4.name = ""; }; }; if (_local4.name != "_MULTIPLE_"){ if (_local4.nextNode){ _local4.nextNode.prevNode = _local4.prevNode; }; if (_local4.prevNode){ _local4.prevNode.nextNode = _local4.nextNode; } else { if (this.cachedPT1 == _local4){ this.cachedPT1 = _local4.nextNode; }; }; if (((_local4.isPlugin) && (_local4.target.onDisable))){ _local4.target.onDisable(); if (_local4.target.activeDisable){ _local5 = true; }; }; delete propTweenLookup[_local3]; }; }; if (((_arg2) && (!((_arg1 == _overwrittenProps))))){ _overwrittenProps[_local3] = 1; }; }; return (_local5); } override public function invalidate():void{ if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ onPluginEvent("onDisable", this); }; this.cachedPT1 = null; _overwrittenProps = null; _hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false))); this.propTweenLookup = {}; } override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{ var _local3:Array; if (_arg1){ _local3 = TweenLite.masterList[this.target]; if (!_local3){ TweenLite.masterList[this.target] = [this]; } else { _local3[_local3.length] = this; }; }; super.setEnabled(_arg1, _arg2); if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this)); }; return (false); } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public static function initClass():void{ rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.cachedStartTime = (getTimer() * 0.001); rootFramesTimeline.cachedStartTime = rootFrame; rootTimeline.autoRemoveChildren = true; rootFramesTimeline.autoRemoveChildren = true; _shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; if (!("immediateRender" in _arg3)){ _arg3.immediateRender = true; }; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0})); } protected static function updateAll(_arg1:Event=null):void{ var _local2:Dictionary; var _local3:Object; var _local4:Array; var _local5:int; rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false); rootFrame++; rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false); if (!(rootFrame % 60)){ _local2 = masterList; for (_local3 in _local2) { _local4 = _local2[_local3]; _local5 = _local4.length; while (--_local5 > -1) { if (TweenLite(_local4[_local5]).gc){ _local4.splice(_local5, 1); }; }; if (_local4.length == 0){ delete _local2[_local3]; }; }; }; } public static function killTweensOf(_arg1:Object, _arg2:Boolean=false, _arg3:Object=null):void{ var _local4:Array; var _local5:int; var _local6:TweenLite; if ((_arg1 in masterList)){ _local4 = masterList[_arg1]; _local5 = _local4.length; while (--_local5 > -1) { _local6 = _local4[_local5]; if (!_local6.gc){ if (_arg2){ _local6.complete(false, false); }; if (_arg3 != null){ _local6.killVars(_arg3); }; if ((((_arg3 == null)) || ((((_local6.cachedPT1 == null)) && (_local6.initted))))){ _local6.setEnabled(false, false); }; }; }; if (_arg3 == null){ delete masterList[_arg1]; }; }; } protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (1 - (_arg1 / _arg4)); return ((1 - (_arg1 * _arg1))); } } }//package com.greensock
Section 84
//AdLoader (CPMStar.AdLoader) package CPMStar { import flash.display.*; import flash.net.*; import flash.system.*; public class AdLoader { private static var cpmstarLoader:Loader; public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{ Security.allowDomain("server.cpmstar.com"); var _local3 = "http://server.cpmstar.com/adviewas3.swf"; cpmstarLoader = new Loader(); cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2))); return (cpmstarLoader); } } }//package CPMStar
Section 85
//display (display.display) package display { import flash.display.*; public class display extends MovieClip { public function destroy():void{ parent.removeChild(this); } } }//package display
Section 86
//display_back (display.display_back) package display { import flash.display.*; import flash.events.*; import com.greensock.*; import main.*; public class display_back extends MovieClip { public function display_back(){ addEventListener(Event.ENTER_FRAME, update); } private function update(_arg1:Event):void{ if (((!(isNaN(mainVar.foreOffset))) && (!(isNaN(mainVar.foreOffsetY))))){ TweenLite.to(this, 0.2, {x:(mainVar.foreOffset * 0.1)}); }; } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package display
Section 87
//display_fore (display.display_fore) package display { import flash.display.*; import flash.geom.*; import flash.events.*; import main.*; public class display_fore extends display { public var dis_grass:MovieClip; public var p1:MovieClip; public var p2:MovieClip; public var lastX:Number;// = 0 public static var thisX:Number; public static var thisY:Number; public static var thisWidth:Number; public static var thisHeight:Number; public function display_fore(){ thisX = this.x; thisY = this.y; thisWidth = this.width; thisHeight = this.height; mainVar.display_gap = ((p2.x - p1.x) - 800); } private function update(_arg1:Event):void{ mainVar.main_speed = (this.localToGlobal(new Point(p1.x, p1.y)).x - lastX); mainVar.canMoveRight = true; mainVar.canMoveLeft = true; if (this.localToGlobal(new Point(p1.x, p1.y)).x > -30){ mainVar.canMoveRight = false; }; if (this.localToGlobal(new Point(p2.x, p2.y)).x < 860){ mainVar.canMoveLeft = false; }; lastX = this.localToGlobal(new Point(p1.x, p1.y)).x; } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package display
Section 88
//display_middle (display.display_middle) package display { import flash.display.*; import flash.events.*; import com.greensock.*; import main.*; public class display_middle extends MovieClip { public function display_middle(){ addEventListener(Event.ENTER_FRAME, update); } private function update(_arg1:Event):void{ if (!isNaN(mainVar.foreOffset)){ TweenLite.to(this, 0.2, {x:(mainVar.foreOffset * 0.3)}); }; } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package display
Section 89
//displayScore (effect.displayScore) package effect { import flash.display.*; import flash.events.*; import flash.utils.*; public class displayScore extends MovieClip { public var _scale:Number;// = 0.7 public var scoreCardWidth:Number; public var gap:Number;// = 10 public var score:Number; public var digit:Number; public var visioDis:MovieClip; public var cardArray:Array; public var yEasing:Number;// = 5 public var scoreTimer:Timer; public var scoreTo:Number; public function displayScore(_arg1:Number){ scoreTimer = new Timer(30); super(); initScore(_arg1); } private function initScore(_arg1:Number):void{ var _local2:MovieClip; var _local3:Number; score = Math.floor(_arg1); visioDis = new MovieClip(); digit = String(score).length; cardArray = []; var _local4:Number = 0; while (_local4 < digit) { _local2 = new m_score(); scoreCardWidth = _local2.width; _local2.x = (_local4 * (scoreCardWidth + gap)); cardArray.push(_local2); visioDis.addChild(_local2); _local4++; }; visioDis.x = (-((digit - 1)) * (scoreCardWidth + gap)); scaleX = (scaleY = _scale); var _local5:Number = 0; while (_local5 < digit) { _local3 = Number(String(score).charAt(_local5)); if (_local3 != 0){ cardArray[_local5].gotoAndStop(_local3); } else { cardArray[_local5].gotoAndStop(10); }; _local5++; }; addChild(visioDis); } public function setScore(_arg1:Number):void{ scoreTimer.addEventListener(TimerEvent.TIMER, addScoreTimer); scoreTimer.start(); scoreTo = Math.floor(_arg1); } private function addScoreTimer(_arg1:TimerEvent):void{ if (score < scoreTo){ removeChild(visioDis); initScore((score + ((scoreTo - score) * 0.2))); score = (score + ((scoreTo - score) * 0.2)); } else { scoreTimer.stop(); scoreTimer.removeEventListener(TimerEvent.TIMER, addScoreTimer); }; } private function showNum(_arg1:Number){ initScore(_arg1); } } }//package effect
Section 90
//fragment (effect.fragment) package effect { import flash.display.*; import flash.geom.*; import flash.events.*; public class fragment extends Sprite { public var fadeTime:Number; public var currentTime:Number; public var rotationSpeed:Number; public var position:Point; public var offsetX:Number; public var offsetY:Number; public var offsetSize:Number; public var gravity:Number;// = 0.02 public var speedY:Number;// = 0 public function fragment(_arg1:Point){ position = _arg1; x = _arg1.x; y = _arg1.y; fadeTime = ((Math.random() * 20) + 20); currentTime = fadeTime; rotationSpeed = ((Math.random() * 20) - 10); offsetX = ((Math.random() * 2) - 1); offsetY = ((Math.random() * 2) - 1); offsetSize = ((Math.random() * 0.4) + 0.3); this.scaleX = (this.scaleY = offsetSize); addEventListener(Event.ENTER_FRAME, startToPlay); } private function startToPlay(_arg1:Event):void{ alpha = (currentTime / fadeTime); rotation = (rotation + rotationSpeed); currentTime--; x = (x + offsetX); y = (y + offsetY); y = (y + speedY); speedY = (speedY + gravity); scaleX = (scaleX - 0.01); scaleY = (scaleY - 0.01); if (alpha <= 0.1){ this.parent.removeChild(this); removeEventListener(Event.ENTER_FRAME, startToPlay); }; } } }//package effect
Section 91
//frog (effect.frog) package effect { import flash.display.*; import flash.geom.*; public class frog extends fragment { public function frog(_arg1:Class, _arg2:Point){ var _local3:MovieClip = new (_arg1); this.addChild(_local3); super(_arg2); } } }//package effect
Section 92
//MyScore (effect.MyScore) package effect { import flash.display.*; import flash.events.*; import MyClass.*; public class MyScore extends MovieClip { public var _scale:Number;// = 0.3 public var scoreCardWidth:Number; public var gap:Number;// = 7 public var score:Number; public var digit:Number; public var visioDis:MovieClip; public var cardArray:Array; public var yEasing:Number;// = 5 public function MyScore(_arg1:Number){ var _local2:MovieClip; var _local3:Number; super(); visioDis = new MovieClip(); score = Math.floor(_arg1); digit = String(score).length; cardArray = []; var _local4:Number = 0; while (_local4 < digit) { _local2 = new m_score(); scoreCardWidth = _local2.width; _local2.x = (_local4 * (scoreCardWidth + gap)); _local2.y = MyData.random(-4, 4); cardArray.push(_local2); visioDis.addChild(_local2); _local4++; }; visioDis.x = ((-((digit - 1)) * (scoreCardWidth + gap)) / 2); scaleX = (scaleY = _scale); var _local5:Number = 0; while (_local5 < digit) { _local3 = Number(String(score).charAt(_local5)); if (_local3 != 0){ cardArray[_local5].gotoAndStop(_local3); } else { cardArray[_local5].gotoAndStop(10); }; _local5++; }; addChild(visioDis); addEventListener(Event.ENTER_FRAME, move); } private function move(_arg1:Event):void{ y = (y - yEasing); if (yEasing > 0){ yEasing = (yEasing - 0.4); } else { if (yEasing <= 0){ removeEventListener(Event.ENTER_FRAME, move); addEventListener(Event.ENTER_FRAME, fade); }; }; } private function fade(_arg1:Event):void{ alpha = (alpha - 0.05); if (alpha <= 0){ removeEventListener(Event.ENTER_FRAME, fade); parent.removeChild(this); }; } } }//package effect
Section 93
//MyScoreBig (effect.MyScoreBig) package effect { import flash.display.*; import flash.geom.*; import flash.events.*; public class MyScoreBig extends MovieClip { public var _scale:Number;// = 0.5 public var scoreCardWidth:Number; public var gap:Number;// = 7 public var score:Number; public var digit:Number; public var visioDis:MovieClip; public var cardArray:Array; public var yEasing:Number;// = 5 public function MyScoreBig(_arg1:Number, _arg2:ColorTransform){ var _local3:MovieClip; var _local4:Number; super(); visioDis = new MovieClip(); score = Math.floor(_arg1); digit = String(score).length; cardArray = []; var _local5:Number = 0; while (_local5 < digit) { _local3 = new m_score(); _local3.transform.colorTransform = _arg2; scoreCardWidth = _local3.width; _local3.x = (_local5 * (scoreCardWidth + gap)); cardArray.push(_local3); visioDis.addChild(_local3); _local5++; }; visioDis.x = ((-((digit - 1)) * (scoreCardWidth + gap)) / 2); scaleX = (scaleY = _scale); var _local6:Number = 0; while (_local6 < digit) { _local4 = Number(String(score).charAt(_local6)); if (_local4 != 0){ cardArray[_local6].gotoAndStop(_local4); } else { cardArray[_local6].gotoAndStop(10); }; _local6++; }; addChild(visioDis); addEventListener(Event.ENTER_FRAME, move); } private function move(_arg1:Event):void{ y = (y - yEasing); scaleX = (scaleX + 0.02); scaleY = (scaleY + 0.02); if (yEasing > 0){ yEasing = (yEasing - 0.25); } else { if (yEasing == 0){ removeEventListener(Event.ENTER_FRAME, move); addEventListener(Event.ENTER_FRAME, fade); }; }; } private function fade(_arg1:Event):void{ alpha = (alpha - 0.05); if (alpha <= 0){ removeEventListener(Event.ENTER_FRAME, fade); parent.removeChild(this); }; } } }//package effect
Section 94
//Timeline_101 (fkdxn_fla.Timeline_101) package fkdxn_fla { import flash.display.*; public dynamic class Timeline_101 extends MovieClip { public function Timeline_101(){ addFrameScript(0, frame1); } function frame1(){ stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 95
//Timeline_102 (fkdxn_fla.Timeline_102) package fkdxn_fla { import flash.display.*; public dynamic class Timeline_102 extends MovieClip { public function Timeline_102(){ addFrameScript(0, frame1); } function frame1(){ stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 96
//Timeline_103 (fkdxn_fla.Timeline_103) package fkdxn_fla { import flash.display.*; public dynamic class Timeline_103 extends MovieClip { public var menuI:MovieClip; public function Timeline_103(){ addFrameScript(0, frame1, 4, frame5); } function frame1(){ stop(); } function frame5(){ stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 97
//Timeline_108 (fkdxn_fla.Timeline_108) package fkdxn_fla { import flash.display.*; public dynamic class Timeline_108 extends MovieClip { public function Timeline_108(){ addFrameScript(0, frame1); } function frame1(){ stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 98
//Timeline_109 (fkdxn_fla.Timeline_109) package fkdxn_fla { import flash.display.*; public dynamic class Timeline_109 extends MovieClip { public function Timeline_109(){ addFrameScript(0, frame1); } function frame1(){ stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 99
//Timeline_167 (fkdxn_fla.Timeline_167) package fkdxn_fla { import flash.display.*; import MyClass.*; public dynamic class Timeline_167 extends MovieClip { public function Timeline_167(){ addFrameScript(35, frame36); } function frame36(){ gotoAndPlay(MyData.random(1, 15)); } } }//package fkdxn_fla
Section 100
//Timeline_171 (fkdxn_fla.Timeline_171) package fkdxn_fla { import flash.display.*; import MyClass.*; public dynamic class Timeline_171 extends MovieClip { public function Timeline_171(){ addFrameScript(57, frame58); } function frame58(){ gotoAndPlay(MyData.random(1, 15)); } } }//package fkdxn_fla
Section 101
//Timeline_173 (fkdxn_fla.Timeline_173) package fkdxn_fla { import flash.display.*; import MyClass.*; public dynamic class Timeline_173 extends MovieClip { public function Timeline_173(){ addFrameScript(70, frame71); } function frame71(){ gotoAndPlay(MyData.random(1, 15)); } } }//package fkdxn_fla
Section 102
//Timeline_175 (fkdxn_fla.Timeline_175) package fkdxn_fla { import flash.display.*; import MyClass.*; public dynamic class Timeline_175 extends MovieClip { public function Timeline_175(){ addFrameScript(38, frame39); } function frame39(){ gotoAndPlay(MyData.random(1, 15)); } } }//package fkdxn_fla
Section 103
//Timeline_186 (fkdxn_fla.Timeline_186) package fkdxn_fla { import flash.display.*; import MyClass.*; public dynamic class Timeline_186 extends MovieClip { public function Timeline_186(){ addFrameScript(37, frame38); } function frame38(){ gotoAndPlay(MyData.random(1, 15)); } } }//package fkdxn_fla
Section 104
//Timeline_190 (fkdxn_fla.Timeline_190) package fkdxn_fla { import flash.display.*; import MyClass.*; public dynamic class Timeline_190 extends MovieClip { public function Timeline_190(){ addFrameScript(100, frame101); } function frame101(){ gotoAndPlay(MyData.random(1, 15)); } } }//package fkdxn_fla
Section 105
//Timeline_3 (fkdxn_fla.Timeline_3) package fkdxn_fla { import flash.display.*; import flash.events.*; public dynamic class Timeline_3 extends MovieClip { public function Timeline_3(){ addFrameScript(41, frame42); } function frame42(){ stage.dispatchEvent(new Event("canStart")); stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 106
//Timeline_36 (fkdxn_fla.Timeline_36) package fkdxn_fla { import flash.display.*; public dynamic class Timeline_36 extends MovieClip { public function Timeline_36(){ addFrameScript(0, frame1); } function frame1(){ stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 107
//Timeline_4 (fkdxn_fla.Timeline_4) package fkdxn_fla { import flash.display.*; import flash.events.*; public dynamic class Timeline_4 extends MovieClip { public function Timeline_4(){ addFrameScript(18, frame19); } function frame19(){ stage.dispatchEvent(new Event("canStart")); stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 108
//Timeline_80 (fkdxn_fla.Timeline_80) package fkdxn_fla { import flash.display.*; import flash.events.*; public dynamic class Timeline_80 extends MovieClip { public function Timeline_80(){ addFrameScript(277, frame278); } function frame278(){ stage.dispatchEvent(new Event("canStart")); stop(); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 109
//Timeline_96 (fkdxn_fla.Timeline_96) package fkdxn_fla { import flash.display.*; import flash.events.*; import main.*; import effect.*; public dynamic class Timeline_96 extends MovieClip { public var levelInfo:MovieClip; public var mc_star:MovieClip; public var btn_next:MovieClip; public var btn_select:MovieClip; public var btn_retry:MovieClip; public var currentPart:displayScore; public var currentLevel:displayScore; public var currentScore:displayScore; public function Timeline_96(){ addFrameScript(0, frame1); } public function showLevel(_arg1:Event):void{ if (null != currentPart){ if (null != currentPart.parent){ currentPart.parent.removeChild(currentPart); }; }; currentPart = null; if (null != currentLevel){ if (null != currentLevel.parent){ currentLevel.parent.removeChild(currentLevel); }; }; currentLevel = null; if (null != currentScore){ if (null != currentScore.parent){ currentScore.parent.removeChild(currentScore); }; }; currentScore = null; showS(); } public function showS():void{ levelInfo.gotoAndStop(1); btn_next.visible = true; mc_star.visible = true; trace(mainVar.GAME_RESULT); if (mainVar.GAME_RESULT == "win"){ if (mainVar.currentLevel.toString().length == 1){ currentPart = new displayScore(mainVar.currentPart); currentLevel = new displayScore(mainVar.currentLevel); addChild(currentPart); addChild(currentLevel); currentPart.x = -90; currentPart.y = -130; currentPart.scaleX = (currentPart.scaleY = 2); currentLevel.x = 0; currentLevel.y = -130; currentLevel.scaleX = (currentLevel.scaleY = 2); } else { if (mainVar.currentLevel.toString().length == 2){ currentPart = new displayScore(mainVar.currentPart); currentLevel = new displayScore(mainVar.currentLevel); addChild(currentPart); addChild(currentLevel); currentPart.x = -90; currentPart.y = -130; currentPart.scaleX = (currentPart.scaleY = 2); currentLevel.x = 40; currentLevel.y = -130; currentLevel.scaleX = (currentLevel.scaleY = 2); }; }; currentScore = new displayScore(mainVar.currentScore); currentScore.scaleX = (currentScore.scaleY = 1.3); addChild(currentScore); currentScore.x = 70; currentScore.y = 68; if ((mainVar.birdNum / mainVar.birdNumOri) >= 0.8){ mc_star.gotoAndStop(3); } else { if (((((mainVar.birdNum / mainVar.birdNumOri) < 0.8)) && (((mainVar.birdNum / mainVar.birdNumOri) > 0.4)))){ mc_star.gotoAndStop(2); } else { mc_star.gotoAndStop(1); }; }; } else { if (mainVar.GAME_RESULT == "fail"){ if (mainVar.currentLevel.toString().length == 1){ currentPart = new displayScore(mainVar.currentPart); currentLevel = new displayScore(mainVar.currentLevel); addChild(currentPart); addChild(currentLevel); currentPart.x = -90; currentPart.y = -130; currentPart.scaleX = (currentPart.scaleY = 2); currentLevel.x = 0; currentLevel.y = -130; currentLevel.scaleX = (currentLevel.scaleY = 2); } else { if (mainVar.currentLevel.toString().length == 2){ currentPart = new displayScore(mainVar.currentPart); currentLevel = new displayScore(mainVar.currentLevel); addChild(currentPart); addChild(currentLevel); currentPart.x = -90; currentPart.y = -130; currentPart.scaleX = (currentPart.scaleY = 2); currentLevel.x = 40; currentLevel.y = -130; currentLevel.scaleX = (currentLevel.scaleY = 2); }; }; levelInfo.gotoAndStop(2); btn_next.visible = false; mc_star.visible = false; }; }; } function frame1(){ stage.addEventListener("showLevel", showLevel); } override public function get stage():Stage{ return (MovieClip(root).stage); } } }//package fkdxn_fla
Section 110
//bird (item.bird) package item { import flash.display.*; import flash.geom.*; import flash.utils.*; public class bird extends MovieClip { public var attack:Number; public var _density:Number; public var BOS:Number;// = 0 public var tempMoveLinePoint:Point; public var color:ColorTransform; public var RedSmall:Array; public var BlueSmall:Array; public var YellowSmall:Array; public static var birdSpeed:Number = 28; public function bird(){ tempMoveLinePoint = new Point(0, 0); RedSmall = new Array(1.5, 500); BlueSmall = new Array(1.5, 500); YellowSmall = new Array(1.5, 200); super(); this.mouseEnabled = false; attack = this[getQualifiedClassName(this).slice(10)][0]; _density = this[getQualifiedClassName(this).slice(10)][1]; } } }//package item
Section 111
//birdBall (item.birdBall) package item { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import flash.events.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import main.*; import flash.utils.*; import effect.*; public class birdBall extends role { public var sprite:Sprite; public var body:b2Body; public var _bodyDef:b2BodyDef; public var RW:Number; public var RH:Number; public var attack:Number; public var ifDead:Boolean;// = false public var t:Timer; public var isDownToEarth:Boolean;// = false public static const DENSITY:Number = 50; public static const RESTITUTION:Number = 0; public static const FRICTION:Number = 50; public function birdBall(_arg1, _arg2:Number){ t = new Timer(30); this.sprite = _arg1; if (!isNaN(_arg1.attack)){ attack = _arg1.attack; }; var _local3:Point = new Point(_arg1.x, _arg1.y); var _local4:b2CircleDef = new b2CircleDef(); _local4.radius = ((_arg1.width / 2) / mainVar.RATIO); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = DENSITY; _bodyDef = new b2BodyDef(); _bodyDef.angularDamping = 8; _bodyDef.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _bodyDef.angle = ((_arg2 * Math.PI) / 180); body = mainVar.world.CreateBody(_bodyDef); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); } override public function hit(_arg1:role, _arg2:b2ContactPoint):void{ if (((!(isDownToEarth)) && (!((_arg1 is birdBall))))){ mainVar.can = true; mainVar.isCollide = true; mainVar.isShot = true; mainVar.lineTask--; if (mainVar.lineTask == 0){ if (((mainVar.isFirstDrawLine) && (mainVar.isShot))){ mainVar.isFirstDrawLine = false; mainVar.lastMoveLineArray = mainVar.moveLineArray; mainVar.moveLineArray = []; } else { mainVar.clearDrawLine(); mainVar.lastMoveLineArray = mainVar.moveLineArray; mainVar.moveLineArray = []; }; mainVar.canDrawMoveLine = false; }; isDownToEarth = true; if (!ifDead){ ifDead = true; mainVar.birdNum--; }; t.addEventListener(TimerEvent.TIMER, statusJudge); t.start(); }; if (_arg2.velocity.Length() >= 4){ createFrog(_arg2.position); }; MovieClip(getSprite()).gotoAndStop(3); super.hit(_arg1, _arg2); } override public function hitNo(_arg1:b2ContactPoint):void{ MovieClip(getSprite()).gotoAndStop(3); if (!isDownToEarth){ mainVar.can = true; mainVar.isCollide = true; mainVar.lineTask--; if (mainVar.lineTask == 0){ if (((mainVar.isFirstDrawLine) && (mainVar.isShot))){ mainVar.isFirstDrawLine = false; mainVar.lastMoveLineArray = mainVar.moveLineArray; mainVar.moveLineArray = []; } else { mainVar.clearDrawLine(); mainVar.lastMoveLineArray = mainVar.moveLineArray; mainVar.moveLineArray = []; }; mainVar.canDrawMoveLine = false; }; isDownToEarth = true; if (!ifDead){ ifDead = true; mainVar.birdNum--; }; t.addEventListener(TimerEvent.TIMER, statusJudge); t.start(); }; createFrog(_arg1.position); super.hitNo(_arg1); } private function statusJudge(_arg1:TimerEvent):void{ var _local2:b2Vec2; var _local3:Number = (2 / mainVar.RATIO); var _local4:Number = (1 / mainVar.RATIO); if ((((body.GetLinearVelocity().Length() <= _local3)) && ((body.GetAngularVelocity() < _local4)))){ _local2 = new b2Vec2((getSprite().x / mainVar.RATIO), (getSprite().y / mainVar.RATIO)); createFrog(_local2); destroy(); mainVar.isExped = true; mainVar.isBirdStatic = true; t.removeEventListener(TimerEvent.TIMER, statusJudge); }; } private function createFrog(_arg1:b2Vec2):void{ var _local2:frog; var _local3:String = String(sprite).slice(12, 15); var _local4:Number = Math.floor(((Math.random() * 2) + 2)); _arg1.Multiply(mainVar.RATIO); _arg1.Add(new b2Vec2(0, -10)); var _local5:Number = 0; while (_local5 < _local4) { _local2 = new frog(E_frog1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; _local5++; }; var _local6:Number = Math.floor(((Math.random() * 5) + 15)); if (_local3 == "Red"){ _local5 = 0; while (_local5 < _local6) { if (Math.random() < 0.5){ _local2 = new frog(E_redFeather1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { _local2 = new frog(E_redFeather2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; _local5++; }; }; if (_local3 == "Blu"){ _local5 = 0; while (_local5 < _local6) { if (Math.random() < 0.5){ _local2 = new frog(E_blueFeather1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { _local2 = new frog(E_blueFeather2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; _local5++; }; }; if (_local3 == "Yel"){ _local5 = 0; while (_local5 < _local6) { if (Math.random() < 0.5){ _local2 = new frog(E_yellowFeather1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { _local2 = new frog(E_yellowFeather2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; _local5++; }; }; } public function setSpeed(_arg1:b2Vec2){ body.SetLinearVelocity(_arg1); } } }//package item
Section 112
//birdBlueSmall (item.birdBlueSmall) package item { public class birdBlueSmall extends bird { public function birdBlueSmall(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 113
//birdRedSmall (item.birdRedSmall) package item { public class birdRedSmall extends bird { public function birdRedSmall(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 114
//birdYellowSmall (item.birdYellowSmall) package item { public class birdYellowSmall extends bird { public function birdYellowSmall(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 115
//blockSprite (item.blockSprite) package item { import flash.display.*; public class blockSprite extends Sprite { public function blockSprite(){ graphics.beginFill(0); graphics.drawRect(-13, -10, 12, 20); graphics.endFill(); } } }//package item
Section 116
//box (item.box) package item { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import main.*; import effect.*; public class box extends role { public var sprite:MovieClip; public var body:b2Body; public var RW:Number; public var RH:Number; public static const DENSITY:Number = 50; public static const RESTITUTION:Number = 0; public static const FRICTION:Number = 1; public function box(_arg1, _arg2:Number){ var _local3:Point; var _local4:b2PolygonDef; this.sprite = _arg1; _local3 = new Point(_arg1.x, _arg1.y); _local4 = new b2PolygonDef(); _local4.SetAsBox(((_arg1.width / 2) / mainVar.RATIO), ((_arg1.height / 2) / mainVar.RATIO)); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = _arg1._density; var _local5:b2BodyDef = new b2BodyDef(); _local5.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _local5.angle = ((_arg2 * Math.PI) / 180); _local5.angularDamping = 8; body = mainVar.world.CreateBody(_local5); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); } override public function hit(_arg1:role, _arg2:b2ContactPoint):void{ var _local3:String; var _local4:MyScore; if ((_arg1 is birdBall)){ _local3 = String(sprite).slice(10, 12); if (_local3 == "wo"){ soundControl.play_sound("sound_wood_hit"); } else { if (_local3 == "gl"){ soundControl.play_sound("sound_glass_hit"); } else { if (_local3 == "st"){ soundControl.play_sound("sound_stone_hit"); }; }; }; b2CHp = (b2CHp - (_arg2.velocity.Length() * birdBall(_arg1).attack)); if (_arg2.velocity.Length() > 3){ _local4 = new MyScore((_arg2.velocity.Length() * 10)); mainVar.currentScore = (mainVar.currentScore + (_arg2.velocity.Length() * 10)); mainVar.scoreBoard.setScore(mainVar.currentScore); _local4.x = sprite.x; _local4.y = sprite.y; mainVar._view.addChild(_local4); }; } else { if ((_arg1 is box)){ b2CHp = (b2CHp - ((_arg2.velocity.Length() * itemA(_arg1.getSprite())._density) / 100)); } else { if ((_arg1 is pigBox)){ b2CHp = (b2CHp - ((_arg2.velocity.Length() * pig(_arg1.getSprite())._density) / 100)); }; }; }; if ((_role is MovieClip)){ if (b2CHp <= (b2Hp * 0.75)){ MovieClip(_role).gotoAndStop(2); }; if (b2CHp <= (b2Hp * 0.5)){ MovieClip(_role).gotoAndStop(3); }; if (b2CHp <= (b2Hp * 0.25)){ MovieClip(_role).gotoAndStop(4); }; if (b2CHp <= 0){ createFrog(_arg2.position); this.destroy(); }; }; super.hit(_arg1, _arg2); } private function createFrog(_arg1:b2Vec2):void{ var _local2:frog; var _local3:Number; var _local4:String = String(sprite).slice(10, 12); _arg1.Multiply(mainVar.RATIO); _arg1.Add(new b2Vec2(0, -10)); _arg1 = new b2Vec2(sprite.x, sprite.y); var _local5:Number = Math.floor(((Math.random() * 10) + 3)); if (_local4 == "wo"){ soundControl.play_sound("sound_wood_exp"); _local3 = 0; while (_local3 < _local5) { if (Math.random() < 0.3){ _local2 = new frog(E_wood1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if ((((Math.random() >= 0.3)) && ((Math.random() < 0.6)))){ _local2 = new frog(E_wood2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if (Math.random() >= 0.6){ _local2 = new frog(E_wood3, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; }; }; _local3++; }; }; if (_local4 == "gl"){ soundControl.play_sound("sound_glass_exp"); _local3 = 0; while (_local3 < _local5) { if (Math.random() < 0.2){ _local2 = new frog(E_glass1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if ((((Math.random() >= 0.2)) && ((Math.random() < 0.4)))){ _local2 = new frog(E_glass2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if ((((Math.random() >= 0.4)) && ((Math.random() < 0.6)))){ _local2 = new frog(E_glass3, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if ((((Math.random() >= 0.6)) && ((Math.random() < 0.8)))){ _local2 = new frog(E_glass4, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if (Math.random() >= 0.8){ _local2 = new frog(E_glass5, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; }; }; }; }; _local3++; }; }; if (_local4 == "st"){ soundControl.play_sound("sound_stone_exp"); _local3 = 0; while (_local3 < _local5) { if (Math.random() < 0.3){ _local2 = new frog(E_stone1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if ((((Math.random() >= 0.3)) && ((Math.random() < 0.6)))){ _local2 = new frog(E_stone2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if (Math.random() >= 0.6){ _local2 = new frog(E_stone3, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; }; }; _local3++; }; }; } } }//package item
Section 117
//floor (item.floor) package item { import flash.display.*; import flash.geom.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import main.*; public class floor { public var DENSITY:Number;// = 0 public var RESTITUTION:Number;// = 0.5 public var FRICTION:Number;// = 0.5 public function floor(_arg1:DisplayObjectContainer, _arg2:Point){ var _local3:b2PolygonDef; super(); var _local4:Sprite = new Sprite(); _local4.graphics.beginFill(1945803); _local4.graphics.drawRect(-2100, 393, 5000, 100); _local4.graphics.endFill(); _local3 = new b2PolygonDef(); _local3.SetAsBox((2500 / mainVar.RATIO), (50 / mainVar.RATIO)); _local3.density = DENSITY; _local3.friction = FRICTION; _local3.restitution = RESTITUTION; var _local5:b2BodyDef = new b2BodyDef(); _local5.position.Set((400 / mainVar.RATIO), (443 / mainVar.RATIO)); var _local6:b2Body = mainVar.world.CreateBody(_local5); _local6.CreateShape(_local3); } } }//package item
Section 118
//I_bottomDesk (item.I_bottomDesk) package item { public class I_bottomDesk extends itemA { } }//package item
Section 119
//I_glass_long (item.I_glass_long) package item { public class I_glass_long extends itemA { public function I_glass_long(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 120
//I_glass_middle (item.I_glass_middle) package item { public class I_glass_middle extends itemA { public function I_glass_middle(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 121
//I_glass_short (item.I_glass_short) package item { public class I_glass_short extends itemA { public function I_glass_short(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 122
//I_glass_small_1 (item.I_glass_small_1) package item { public class I_glass_small_1 extends itemA { public function I_glass_small_1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 123
//I_glass_small_2 (item.I_glass_small_2) package item { public class I_glass_small_2 extends itemA { public function I_glass_small_2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 124
//I_glass_wide (item.I_glass_wide) package item { public class I_glass_wide extends itemA { public function I_glass_wide(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 125
//I_R_stone_big (item.I_R_stone_big) package item { public class I_R_stone_big extends itemA { public function I_R_stone_big(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 126
//I_R_wood_round1 (item.I_R_wood_round1) package item { public class I_R_wood_round1 extends itemA { public function I_R_wood_round1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 127
//I_smileface (item.I_smileface) package item { public class I_smileface extends itemA { public function I_smileface(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 128
//I_stone_long (item.I_stone_long) package item { public class I_stone_long extends itemA { public function I_stone_long(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 129
//I_stone_long2 (item.I_stone_long2) package item { public class I_stone_long2 extends itemA { public function I_stone_long2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 130
//I_stone_middle (item.I_stone_middle) package item { public class I_stone_middle extends itemA { public function I_stone_middle(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 131
//I_stone_short (item.I_stone_short) package item { public class I_stone_short extends itemA { public function I_stone_short(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 132
//I_stone_small_1 (item.I_stone_small_1) package item { public class I_stone_small_1 extends itemA { public function I_stone_small_1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 133
//I_stone_small_2 (item.I_stone_small_2) package item { public class I_stone_small_2 extends itemA { public function I_stone_small_2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 134
//I_stone_wide (item.I_stone_wide) package item { public class I_stone_wide extends itemA { public function I_stone_wide(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 135
//I_wood_middle (item.I_wood_middle) package item { public class I_wood_middle extends itemA { public function I_wood_middle(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 136
//I_wood_middle_long (item.I_wood_middle_long) package item { public class I_wood_middle_long extends itemA { public function I_wood_middle_long(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 137
//I_wood_short (item.I_wood_short) package item { public class I_wood_short extends itemA { public function I_wood_short(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 138
//I_wood_small (item.I_wood_small) package item { public class I_wood_small extends itemA { public function I_wood_small(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 139
//I_wood_wide (item.I_wood_wide) package item { public class I_wood_wide extends itemA { public function I_wood_wide(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 140
//I_wood_wide_2 (item.I_wood_wide_2) package item { public class I_wood_wide_2 extends itemA { public function I_wood_wide_2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 141
//itemA (item.itemA) package item { import flash.display.*; import flash.utils.*; public class itemA extends MovieClip { public var _hp:Number; public var _density:Number; public var _glass_middle:Array; public var _glass_long:Array; public var _glass_wide:Array; public var _glass_small_1:Array; public var _glass_small_2:Array; public var _glass_short:Array; public var _bottomDesk:Array; public var _stone_wide:Array; public var _stone_middle:Array; public var _stone_long:Array; public var _stone_short:Array; public var _stone_long2:Array; public var _stone_small_1:Array; public var _stone_small_2:Array; public var _wood_middle_long:Array; public var _wood_middle:Array; public var _wood_short:Array; public var _wood_small:Array; public var _R_wood_round1:Array; public var _wood_wide:Array; public var _wood_wide_2:Array; public var _smileface:Array; public var _R_stone_big:Array; public function itemA(){ _glass_middle = new Array(20, 20); _glass_long = new Array(20, 20); _glass_wide = new Array(20, 20); _glass_small_1 = new Array(20, 20); _glass_small_2 = new Array(20, 20); _glass_short = new Array(20, 20); _bottomDesk = new Array(500, 200); _stone_wide = new Array(200, 200); _stone_middle = new Array(200, 100); _stone_long = new Array(200, 200); _stone_short = new Array(200, 200); _stone_long2 = new Array(200, 200); _stone_small_1 = new Array(200, 200); _stone_small_2 = new Array(200, 200); _wood_middle_long = new Array(50, 20); _wood_middle = new Array(40, 20); _wood_short = new Array(30, 20); _wood_small = new Array(40, 20); _R_wood_round1 = new Array(100, 20); _wood_wide = new Array(30, 20); _wood_wide_2 = new Array(30, 20); _smileface = new Array(2, 20); _R_stone_big = new Array(30, 150); super(); if (getQualifiedClassName(this).slice(6, 8) == "I_"){ _hp = this[getQualifiedClassName(this).slice(7)][0]; _density = this[getQualifiedClassName(this).slice(7)][1]; }; } } }//package item
Section 142
//M_pigBig (item.M_pigBig) package item { public class M_pigBig extends pig { public function M_pigBig(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 143
//M_pigMiddle (item.M_pigMiddle) package item { public class M_pigMiddle extends pig { public function M_pigMiddle(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 144
//M_pigSmall (item.M_pigSmall) package item { public class M_pigSmall extends pig { public function M_pigSmall(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package item
Section 145
//pig (item.pig) package item { import flash.display.*; import flash.utils.*; public class pig extends MovieClip { public var _hp:Number; public var _density:Number; public var _pigSmall:Array; public var _pigMiddle:Array; public var _pigBig:Array; public function pig(){ _pigSmall = new Array(2, 20); _pigMiddle = new Array(10, 20); _pigBig = new Array(10, 20); super(); _hp = this[getQualifiedClassName(this).slice(7)][0]; _density = this[getQualifiedClassName(this).slice(7)][1]; } } }//package item
Section 146
//pigBox (item.pigBox) package item { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import main.*; import effect.*; public class pigBox extends role { public var sprite:MovieClip; public var body:b2Body; public var ifDead:Boolean;// = false public var RW:Number; public var RH:Number; public static const DENSITY:Number = 50; public static const RESTITUTION:Number = 0; public static const FRICTION:Number = 1; public function pigBox(_arg1, _arg2:Number){ this.sprite = _arg1; var _local3:Point = new Point(_arg1.x, _arg1.y); var _local4:b2CircleDef = new b2CircleDef(); _local4.radius = ((_arg1.width / 2) / mainVar.RATIO); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = DENSITY; var _local5:b2BodyDef = new b2BodyDef(); _local5.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _local5.angle = ((_arg2 * Math.PI) / 180); _local5.angularDamping = 8; body = mainVar.world.CreateBody(_local5); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); } override public function hit(_arg1:role, _arg2:b2ContactPoint):void{ var _local3:ColorTransform; var _local4:MyScoreBig; var _local5:b2Vec2; if ((_arg1 is birdBall)){ b2CHp = (b2CHp - (_arg2.velocity.Length() * birdBall(_arg1).attack)); } else { b2CHp = (b2CHp - _arg2.velocity.Length()); }; if ((_role is MovieClip)){ if (b2CHp <= (b2Hp * 0.75)){ MovieClip(_role).gotoAndStop(2); }; if (b2CHp <= (b2Hp * 0.5)){ MovieClip(_role).gotoAndStop(3); }; if (b2CHp <= (b2Hp * 0.25)){ MovieClip(_role).gotoAndStop(4); }; if (b2CHp <= 0){ this.destroy(); if (!ifDead){ ifDead = true; mainVar.pigNum--; }; _local3 = new ColorTransform(0, 1, 0); _local4 = new MyScoreBig(5000, _local3); mainVar.currentScore = (mainVar.currentScore + 5000); mainVar.scoreBoard.setScore(mainVar.currentScore); _local4.x = sprite.x; _local4.y = sprite.y; mainVar._view.addChild(_local4); _local5 = new b2Vec2((getSprite().x / mainVar.RATIO), (getSprite().y / mainVar.RATIO)); createFrog(_local5); }; }; super.hit(_arg1, _arg2); } private function createFrog(_arg1:b2Vec2):void{ var _local2:frog; var _local3:Number = Math.floor(((Math.random() * 2) + 2)); _arg1.Multiply(mainVar.RATIO); _arg1.Add(new b2Vec2(0, -10)); var _local4:Number = 0; while (_local4 < _local3) { _local2 = new frog(E_frog1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; _local4++; }; var _local5:Number = Math.floor(((Math.random() * 5) + 5)); _local4 = 0; while (_local4 < _local5) { if (Math.random() < 0.5){ _local2 = new frog(E_redFeather1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { _local2 = new frog(E_redFeather2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; _local4++; }; } } }//package item
Section 147
//roundItem (item.roundItem) package item { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import main.*; import effect.*; public class roundItem extends role { public var sprite:MovieClip; public var body:b2Body; public var RW:Number; public var RH:Number; public static const DENSITY:Number = 50; public static const RESTITUTION:Number = 0; public static const FRICTION:Number = 1; public function roundItem(_arg1, _arg2:Number){ var _local3:Point; var _local4:b2CircleDef; this.sprite = _arg1; _local3 = new Point(_arg1.x, _arg1.y); _local4 = new b2CircleDef(); _local4.radius = ((_arg1.width / 2) / mainVar.RATIO); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = _arg1._density; var _local5:b2BodyDef = new b2BodyDef(); _local5.angularDamping = 10; _local5.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _local5.angle = ((_arg2 * Math.PI) / 180); body = mainVar.world.CreateBody(_local5); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); } override public function hit(_arg1:role, _arg2:b2ContactPoint):void{ var _local3:MyScore; if ((_arg1 is birdBall)){ b2CHp = (b2CHp - (_arg2.velocity.Length() * birdBall(_arg1).attack)); if (_arg2.velocity.Length() > 3){ _local3 = new MyScore((_arg2.velocity.Length() * 10)); mainVar.currentScore = (mainVar.currentScore + (_arg2.velocity.Length() * 10)); mainVar.scoreBoard.setScore(mainVar.currentScore); _local3.x = sprite.x; _local3.y = sprite.y; mainVar._view.addChild(_local3); }; } else { b2CHp = (b2CHp - _arg2.velocity.Length()); }; if ((_role is MovieClip)){ if (b2CHp <= (b2Hp * 0.75)){ MovieClip(_role).gotoAndStop(2); }; if (b2CHp <= (b2Hp * 0.5)){ MovieClip(_role).gotoAndStop(3); }; if (b2CHp <= (b2Hp * 0.25)){ MovieClip(_role).gotoAndStop(4); }; if (b2CHp <= 0){ createFrog(_arg2.position); this.destroy(); }; }; super.hit(_arg1, _arg2); } private function createFrog(_arg1:b2Vec2):void{ var _local2:frog; var _local3:Number; var _local4:Number; var _local5:String = String(sprite).slice(10, 12); _arg1.Multiply(mainVar.RATIO); _arg1.Add(new b2Vec2(0, -10)); _arg1 = new b2Vec2(sprite.x, sprite.y); if (_local5 == "wo"){ _local3 = Math.floor(((Math.random() * 10) + 30)); _local4 = 0; while (_local4 < _local3) { if (Math.random() < 0.3){ _local2 = new frog(E_wood1, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if ((((Math.random() >= 0.3)) && ((Math.random() < 0.6)))){ _local2 = new frog(E_wood2, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; } else { if (Math.random() >= 0.6){ _local2 = new frog(E_wood3, new Point(_arg1.x, _arg1.y)); mainVar._view.addChild(_local2); _local2.x = _arg1.x; _local2.y = _arg1.y; }; }; }; _local4++; }; }; } } }//package item
Section 148
//staticBirdBox (item.staticBirdBox) package item { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import flash.events.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import main.*; import MyClass.*; import universals.gus.*; import flash.utils.*; public class staticBirdBox extends role { public var sprite:MovieClip; public var body:b2Body; public var _bodyDef:b2BodyDef; public var ifJump:Boolean;// = false public var jumpNum:Number; public var onboardPower:Number; public var t:Timer; public var t2:Timer; public var t3:Timer; public var t4:Timer; public var isOut:Boolean;// = false public var isRamdomRotate:Boolean;// = false public var rotateNum:Number; public var currentNum:Number;// = 0 public var RW:Number; public var RH:Number; public var thisX:Number; public var jumpBird; public var speedY:Number;// = 0 public var speedX:Number;// = 0 public var h_max:Number;// = 37 public var h_fin:Number;// = 33 public var time:Number;// = 0 public var g:Number;// = 0.4 public static const DENSITY:Number = 9000; public static const RESTITUTION:Number = 0; public static const FRICTION:Number = 1; public function staticBirdBox(_arg1, _arg2:Number){ t = new Timer(30); t2 = new Timer(30); t3 = new Timer(30); t4 = new Timer(30); var _local3:Point = new Point(_arg1.x, _arg1.y); thisX = _arg1.x; this.sprite = _arg1; var _local4:b2CircleDef = new b2CircleDef(); _local4.radius = ((_arg1.width / 2) / mainVar.RATIO); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = DENSITY; _local4.filter.categoryBits = 6; _bodyDef = new b2BodyDef(); _bodyDef.fixedRotation = true; _bodyDef.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _bodyDef.angle = ((_arg2 * Math.PI) / 180); body = mainVar.world.CreateBody(_bodyDef); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); t.addEventListener(TimerEvent.TIMER, randomJump); t.start(); t2.addEventListener(TimerEvent.TIMER, randomRotate); t2.start(); t3.addEventListener(TimerEvent.TIMER, startOnboardT); t4.addEventListener(TimerEvent.TIMER, jump); } private function startOnboardT(_arg1:TimerEvent):void{ var _local2:Class = (getDefinitionByName(getQualifiedClassName(sprite)) as Class); jumpBird = new (_local2); jumpBird.x = sprite.x; jumpBird.y = sprite.y; jumpBird.scaleX = (jumpBird.scaleY = 0.5); mainVar._view.addChild(jumpBird); t4.start(); t.stop(); t.removeEventListener(TimerEvent.TIMER, randomJump); currentNum = 0; isOut = true; t3.stop(); t3.removeEventListener(TimerEvent.TIMER, startOnboardT); destroy(); time = NumberObject.getAToBTimes(0, -58, -9, 10, g); speedY = -9; speedX = (onboardPower / time); rotateNum = (360 / time); } private function jump(_arg1:TimerEvent):void{ jumpBird.y = (jumpBird.y + speedY); jumpBird.x = (jumpBird.x + speedX); if (speedY < 10){ speedY = (speedY + g); }; } override public function update():void{ isBinding = false; super.update(); } public function startOnboard(_arg1:Number):void{ onboardPower = _arg1; t3.start(); } private function randomRotate(_arg1:TimerEvent):void{ if (isOut){ if (currentNum < Math.abs((360 / rotateNum))){ jumpBird.rotation = (jumpBird.rotation + rotateNum); currentNum++; } else { t4.stop(); t4.removeEventListener(TimerEvent.TIMER, jump); jumpBird.parent.removeChild(jumpBird); currentNum = 0; isOut = false; t2.stop(); t2.removeEventListener(TimerEvent.TIMER, randomRotate); createBird(); }; }; } public function randomJump(_arg1:TimerEvent){ if (mainVar.isGameEnd){ t.removeEventListener(TimerEvent.TIMER, randomJump); t2.removeEventListener(TimerEvent.TIMER, randomRotate); }; if (!ifJump){ body.ApplyForce(new b2Vec2(0, -60000), body.GetWorldCenter()); ifJump = true; jumpNum = MyData.random(100, 200); } else { jumpNum--; if (jumpNum == 0){ ifJump = false; if (Math.random() < 0.5){ isRamdomRotate = true; }; }; }; if (isRamdomRotate){ rotateNum = 15; if (currentNum < (360 / rotateNum)){ sprite.rotation = (sprite.rotation + rotateNum); currentNum++; } else { currentNum = 0; isRamdomRotate = false; }; }; } public function createBird():void{ mainVar.canShot = true; mainVar.mouseObj = new mainVar.onboardBirdClass(); mainVar._view.addChild(mainVar.mouseObj); mainVar.mouseObj.mask = Sprite(mainVar._view.getChildByName("weapon")).getChildByName("birdMask"); mainVar.mouseObjFollow(mainVar._pm); mainVar.mouseObj.scaleX = 0.5; mainVar.mouseObj.scaleY = 0.5; mainVar.mouseObj.mouseEnabled = false; mainVar.mouseObj.mouseChildren = false; } } }//package item
Section 149
//staticDisplay (item.staticDisplay) package item { import flash.display.*; public class staticDisplay extends MovieClip { } }//package item
Section 150
//staticFloor (item.staticFloor) package item { import flash.display.*; import flash.geom.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import main.*; public class staticFloor extends role { public var sprite:MovieClip; public var body:b2Body; public var ifDead:Boolean;// = false public var RW:Number; public var RH:Number; public static const DENSITY:Number = 0; public static const RESTITUTION:Number = 0.4; public static const FRICTION:Number = 1; public function staticFloor(_arg1, _arg2:Number){ this.sprite = _arg1; var _local3:Point = new Point(_arg1.x, _arg1.y); var _local4:b2PolygonDef = new b2PolygonDef(); _local4.SetAsBox(((_arg1.width / 2) / mainVar.RATIO), ((_arg1.height / 2) / mainVar.RATIO)); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = DENSITY; var _local5:b2BodyDef = new b2BodyDef(); _local5.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _local5.angle = ((_arg2 * Math.PI) / 180); body = mainVar.world.CreateBody(_local5); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); } } }//package item
Section 151
//staticFloorTri (item.staticFloorTri) package item { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.*; import main.*; public class staticFloorTri extends role { public var sprite:MovieClip; public var body:b2Body; public var ifDead:Boolean;// = false public var RW:Number; public var RH:Number; public static const DENSITY:Number = 0; public static const RESTITUTION:Number = 0.4; public static const FRICTION:Number = 1; public function staticFloorTri(_arg1, _arg2:Number){ var _local3:Point; var _local4:b2PolygonDef; this.sprite = _arg1; _local3 = new Point(_arg1.x, _arg1.y); _local4 = new b2PolygonDef(); _local4.vertexCount = 3; b2Vec2(_local4.vertices[0]).Set(((_arg1.width / 2) / mainVar.RATIO), ((-(_arg1.height) / 2) / mainVar.RATIO)); b2Vec2(_local4.vertices[1]).Set(((_arg1.width / 2) / mainVar.RATIO), ((_arg1.height / 2) / mainVar.RATIO)); b2Vec2(_local4.vertices[2]).Set(((-(_arg1.width) / 2) / mainVar.RATIO), ((_arg1.height / 2) / mainVar.RATIO)); _local4.restitution = RESTITUTION; _local4.friction = FRICTION; _local4.density = DENSITY; var _local5:b2BodyDef = new b2BodyDef(); _local5.position.Set((_local3.x / mainVar.RATIO), (_local3.y / mainVar.RATIO)); _local5.angle = ((_arg2 * Math.PI) / 180); body = mainVar.world.CreateBody(_local5); body.CreateShape(_local4); body.SetMassFromShapes(); super(body, _arg1); } } }//package item
Section 152
//FpsCounter (main.FpsCounter) package main { import flash.display.*; import flash.utils.*; import flash.text.*; import flash.system.*; public class FpsCounter extends Sprite { private var textBox:TextField; private var textBox2:TextField; private var textBox3:TextField; private var mfpsCount:int;// = 0 private var mfpsCount2:int;// = 0 private var avgCount:int;// = 30 private var avgCount2:int;// = 30 private var oldT:uint; public var frameNow:Number; public function FpsCounter(){ textBox = new TextField(); textBox.text = "..."; textBox.textColor = 11145540; textBox.selectable = false; textBox2 = new TextField(); textBox2.text = "..."; textBox2.width = 150; textBox2.textColor = 11145540; textBox2.selectable = false; textBox2.y = 15; textBox3 = new TextField(); textBox3.text = "..."; textBox3.textColor = 11145540; textBox3.selectable = false; textBox3.y = 30; oldT = getTimer(); addChild(textBox); addChild(textBox2); addChild(textBox3); } public function update():void{ var _local1:uint = getTimer(); var _local2:uint = (_local1 - oldT); mfpsCount = (mfpsCount + _local2); if (avgCount < 1){ textBox.text = String((Math.round((1000 / (mfpsCount / 30))) + " fps average")); frameNow = Math.round((1000 / (mfpsCount / 30))); avgCount = 30; mfpsCount = 0; }; avgCount--; oldT = getTimer(); textBox3.text = (Math.round((System.totalMemory / (0x0400 * 0x0400))) + " MB used"); } public function updatePhys(_arg1:uint):void{ var _local2:uint = getTimer(); var _local3:uint = (_local2 - _arg1); mfpsCount2 = (mfpsCount2 + _local3); if (avgCount2 < 1){ textBox2.text = String((((("Physics step: " + Math.round((mfpsCount2 / 30))) + " ms (") + Math.round((1000 / (mfpsCount2 / 30)))) + " fps)")); avgCount2 = 30; mfpsCount2 = 0; }; avgCount2--; } public function updateEnd():void{ } } }//package main
Section 153
//gameContactListener (main.gameContactListener) package main { import Box2D.Dynamics.*; import Box2D.Collision.*; public class gameContactListener extends b2ContactListener { override public function Add(_arg1:b2ContactPoint):void{ var _local2:role = (_arg1.shape1.GetBody().GetUserData() as role); var _local3:role = (_arg1.shape2.GetBody().GetUserData() as role); if (((_local2) && (_local3))){ _local2.hit(_local3, _arg1); _local3.hit(_local2, _arg1); } else { if (_local2){ _local2.hitNo(_arg1); } else { if (_local3){ _local3.hitNo(_arg1); }; }; }; } } }//package main
Section 154
//gameDriver (main.gameDriver) package main { import flash.display.*; import item.*; import flash.utils.*; public class gameDriver { public static var gameItemArray:Array; public static var LEVEL_1:Array = [["item", "item.I_bottomDesk", 540.4, 379.05, 75.2, 22.9, 0, 0, 1, 0, "box"], ["item", "item.I_bottomDesk", 615.5, 379.05, 75.2, 22.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 565.55, 262.05, 8.85, 65.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_short", 580, 212.25, 9, 16.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_short", 580.2, 289.3, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 595.85, 262.05, 8.85, 65.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 548.4, 334.05, 8.85, 67.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 609.85, 334.05, 8.85, 67.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 580.45, 321.25, 34.9, 8.55, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 580.35, 363.35, 34.9, 8.55, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 507.3, 359.2, 9, 16.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_short", 646.55, 359.2, 9, 16.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 579.05, 297, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_glass_middle", 567.25, 342.2, 8.55, 33.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 592.7, 342.2, 8.55, 33.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 580.35, 224.95, 34.9, 8.55, 0, 0, 1, 0, "box"], ["bird", "item.birdRedSmall", 141.6, 380.4, 22.7, 22.05, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 108.1, 381.5, 22.7, 22.05, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 170.15, 380.4, 22.7, 22.05, 0, 0, 1, 0, "staticBirdBox"], ["pig", "item.M_pigSmall", 579.55, 274.95, 19.85, 19.45, 0, 0, 1, 0, "pigBox"]]; public static var LEVEL_2:Array = [["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["staticDisplay", "item.", 500, 279.7, 455.5, 233.7, 0, 0, 1, 0, ""], ["item", "item.I_stone_middle", 370.3, 304.5, 9.2, 39.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_middle", 418.8, 305, 9.2, 39.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_middle", 465.8, 304.5, 9.2, 39.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 526.85, 292.25, 8.7, 64.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 369.2, 280.45, 38.1, 9.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 419.2, 280.95, 38.1, 9.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 466.2, 280.45, 38.1, 9.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 526.7, 255.65, 38.1, 9.35, 0, 0, 1, 0, "box"], ["pig", "item.M_pigSmall", 370.9, 265.95, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 419.9, 266.95, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 466.4, 265.95, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 527.4, 241.15, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["static_tri", "item._tri", 312.05, 356.6, 63.5, 63.5, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 509.8, 356.95, 332.3, 65, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 601.6, 292.5, 63.5, 63.5, 0, 0, 1, 0, "staticFloorTri"], ["static_tri", "item._tri", 679.8, 212.6, 93.05, 93.05, 0, 0, 1, 0, "staticFloorTri"], ["static_tri", "item._tri", 694.95, 293.5, 63.5, 63.5, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "staticFloorTri"], ["static_tri", "item._tri", 702, 338.15, 51.5, 51.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"], ["static_rec", "item._rec", 701.85, 377.05, 51.8, 26, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_3:Array = [["item", "item.I_wood_wide", 638, 342.1, 34.4, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_middle", 638.25, 354.5, 34.85, 8.05, 0, 0, 1, 0, "box"], ["item", "item.I_stone_middle", 624.8, 374.75, 8.05, 32.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_middle", 651.6, 374.75, 8.05, 32.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 638.1, 328.95, 66.1, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 636.95, 320.2, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_R_wood_round1", 443.55, 330.15, 30.75, 31.1, 0, 0, 1, 0, "roundItem"], ["item", "item.I_smileface", 636.55, 299.8, 31.35, 31.5, 0, 0, 1, 0, "roundItem"], ["pig", "item.M_pigSmall", 575.6, 380.1, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 541.9, 378.85, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 442.3, 372.3, 144.05, 53.55, 0, 0, 1, 0, ""], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["static_tri", "item._tri", 399.7, 368.2, 45.2, 45.2, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 443.95, 369.2, 37.7, 46.9, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 481.65, 367.2, 45.2, 45.2, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_4:Array = [["item", "item.I_glass_long", 515.9, 257.05, 70.05, 39.3, -25.0395202636719, 0.423243294858427, 0.90601606683181, 0.467147670281874, "box"], ["item", "item.I_glass_long", 486.05, 310.15, 9.65, 72.9, 90.3007507324219, 0.999986223556048, 0.00524906640392368, 190.507443915847, "box"], ["item", "item.I_glass_long", 608.95, 310.85, 9.65, 72.9, 90.3007507324219, 0.999986223556048, 0.00524906640392368, 190.507443915847, "box"], ["item", "item.I_glass_long", 581, 257.6, 70.6, 36.75, -157.140441894531, 0.388473639870551, 0.921459836957491, 0.421584994038619, "box"], ["item", "item.I_glass_middle", 546.3, 267.1, 8.55, 35.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide", 546.95, 293.65, 34.4, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 511.7, 298.35, 34.55, 24.9, -29.9992218017578, 0.499988237491574, 0.866032194765339, 0.577332159836219, "box"], ["item", "item.I_wood_middle", 585.85, 299.55, 34.5, 24.9, 30.0011749267578, 0.500017758906591, 0.866015150432156, 0.577377611300534, "box"], ["item", "item.I_stone_long2", 548.3, 307.05, 73.6, 10, 0, 0, 1, 0, "box"], ["item", "item.I_stone_middle", 516.6, 328.95, 8.45, 36.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_middle", 580.05, 329.75, 8.45, 36.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["pig", "item.M_pigSmall", 546.7, 335.55, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 544.7, 368.2, 227.95, 43.4, 0, 0, 1, 0, ""], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_wood_middle", 498.95, 328.8, 8.75, 34.45, -89.6529235839844, 0.999981652638421, 0.00605758916829602, 165.079146976835, "box"], ["item", "item.I_wood_middle", 597.5, 329.05, 8.75, 36.55, -89.6511688232422, 0.999981466647582, 0.00608821495607335, 164.248712284713, "box"], ["static_tri", "item._tri", 450.4, 368.15, 45.2, 45.2, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 541.1, 369.15, 139.5, 46.9, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 633.6, 369.9, 45.2, 45.2, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_5:Array = [["item", "item.I_stone_wide", 490.75, 347.05, 16.1, 31.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 490.75, 378.6, 16.1, 31.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 561.7, 346.65, 16.1, 31.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 561.7, 378.1, 16.1, 31.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 491.55, 326.95, 63.3, 8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 563.15, 326.95, 63.3, 8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 503.9, 361.75, 8, 63.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 549.65, 362.95, 8, 63.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 476.65, 361.75, 8.6, 63.1, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 468, 361.75, 8.6, 63.1, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 588.4, 362.35, 8.6, 63.1, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 578.25, 361.85, 8.6, 63.1, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 557.75, 290.95, 8.6, 63.1, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 495.4, 292.35, 8.6, 63.1, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 503.9, 292.45, 8, 63.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 513.95, 291.3, 8, 63.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 542.05, 291.65, 8, 63.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 550.55, 291.05, 8, 63.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 508.25, 257.25, 31.45, 7.65, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 545.6, 257.75, 31.45, 7.65, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 527.4, 218, 63.15, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_middle", 497.5, 237.7, 7.7, 31.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 505.2, 238.2, 7.7, 31.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 548.5, 238.2, 7.7, 31.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 556.45, 238.2, 7.7, 31.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 499.15, 206.1, 7.45, 15.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 510, 206.1, 7.45, 15.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 545.25, 206.1, 7.45, 15.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 555.3, 206.1, 7.45, 15.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_R_stone_big", 526.3, 238.2, 38, 39.4, 105.04704284668, 0.96571299669386, 0.259612033651304, 3.71983140808854, "roundItem"], ["pig", "item.M_pigSmall", 527.5, 275.9, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 526.2, 378.6, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 527.85, 294.4, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 527.5, 312.8, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 527.65, 348.05, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_stone_long2", 611.75, 366, 40.75, 57.9, 57.9279937744141, 0.847381452857657, 0.530984626286718, 1.59586814929759, "box"], ["item", "item.I_stone_long2", 443.15, 366.05, 44.2, 55.75, 126.349914550781, 0.805412230438579, 0.592715057223919, 1.35885231971474, "box"]]; public static var LEVEL_6:Array = [["item", "item.I_glass_wide", 348.75, 326.5, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 405.35, 326.5, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_long", 377.15, 304.65, 70.15, 9.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 350.4, 292.2, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 378.5, 292.2, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 405.25, 292.2, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 475.3, 286.85, 74.4, 9.5, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 454.1, 299.15, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 497.5, 299.85, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 446.8, 264.05, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 503.75, 264.55, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_long", 475.55, 242.9, 70.15, 9.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 448.95, 230.35, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 475.8, 230.85, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 502.5, 229.85, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 376.8, 348.65, 74.4, 9.5, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 353.55, 361.15, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 401.25, 361.15, 35.5, 17.9, 0, 0, 1, 0, "box"], ["pig", "item.M_pigSmall", 476.1, 273.25, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 376.4, 334.8, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["staticDisplay", "item.", 537.3, 382.15, 404.2, 149.8, 0, 0, 1, 0, ""], ["static_rec", "item._rec", 378.45, 380.1, 85.6, 19.6, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 476.05, 349, 84.6, 84.4, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 678.55, 395.05, 119.5, 119.5, 45, 0.707106781186547, 0.707106781186548, 1, "staticFloor"]]; public static var LEVEL_7:Array = [["item", "item.I_glass_small_2", 537.35, 167.65, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 516.05, 167.65, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 493.3, 167.65, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 516.35, 232.2, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 559.85, 232.15, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 577.2, 232.2, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 456.55, 232.25, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 473.65, 232.15, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 463.95, 245.75, 34.9, 18.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 482.75, 280.5, 34.9, 18.9, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_small_1", 473.4, 262.6, 16.8, 16.8, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 550.95, 245.6, 34.9, 18.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 569.75, 280.35, 34.9, 18.9, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_small_1", 560.05, 262.45, 16.8, 16.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 480.65, 293.5, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 553, 293.6, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 451.55, 315.8, 17.9, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 503.4, 315.8, 17.9, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 528.6, 315.8, 17.9, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 580.45, 315.8, 17.9, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["pig", "item.M_pigSmall", 517.9, 280.55, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 467.7, 217.85, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 564.55, 218.15, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 515.95, 363.5, 171.2, 63.1, 0, 0, 1, 0, ""], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_glass_wide", 454.8, 271.6, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 491.1, 253.1, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 541.3, 271.45, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 578.1, 253.45, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 504.65, 181.6, 34.9, 18.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 523.45, 216.35, 34.9, 18.9, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_small_1", 513.75, 198.45, 16.8, 16.8, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 495, 207.45, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 531.8, 189.45, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["static_rec", "item._rec", 516.2, 362.4, 170.7, 60.9, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_8:Array = [["item", "item.I_wood_small", 418.95, 229.5, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 418.5, 214.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 418.7, 244.5, 14.65, 14.6, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 533.35, 244.15, 14.65, 14.6, 0, 0, 1, 0, "box"], ["item", "item.I_R_stone_big", 475.35, 193.35, 27.7, 26.05, 0, 0, 1, 0, "roundItem"], ["item", "item.I_R_stone_big", 468.3, 212.25, 15.25, 14.3, 0, 0, 1, 0, "roundItem"], ["item", "item.I_R_stone_big", 483.55, 212.75, 15.25, 14.3, 0, 0, 1, 0, "roundItem"], ["item", "item.I_wood_small", 533.6, 229.5, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 533, 214.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["pig", "item.M_pigSmall", 377.9, 313.7, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 435.9, 242.55, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 516, 243.55, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 572, 312.7, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 475.2, 309.3, 220.5, 178.85, 0, 0, 1, 0, ""], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["static_rec", "item._rec", 475.1, 356.25, 220.5, 67.4, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 474.1, 287, 125.5, 71.1, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 402, 287.7, 22.7, 71.2, 0, 0, 1, 0, "staticFloorTri"], ["static_tri", "item._tri", 453.5, 236.35, 15.2, 29.7, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 475.6, 235.95, 35.9, 31, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 496.95, 235.8, 16.7, 30.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"], ["static_tri", "item._tri", 547.65, 287.75, 21.45, 71.25, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_9:Array = [["item", "item.I_glass_wide", 430, 243.6, 34.9, 18.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 552.55, 243.85, 34.9, 18.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_middle", 429.85, 217.5, 8.55, 34.8, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 554.05, 217.8, 8.55, 34.8, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_small", 537.7, 347.15, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 574.2, 363.95, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 432.1, 254.9, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 433.1, 298.8, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 554.95, 300.4, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 555.45, 257.15, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 563.25, 346.3, 35.05, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 547.95, 364.1, 35.05, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 494.75, 367.9, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 405.45, 277.2, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 458.85, 277.2, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 413.95, 321.2, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 452.2, 320.7, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 535.45, 320.9, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 573.1, 321.3, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 523.7, 279.05, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 532.45, 279.05, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 576.45, 279.05, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 586.2, 279.05, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_small_2", 542.95, 292.5, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 567.4, 292.5, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 417.8, 290.25, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 445.15, 290.25, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 413.45, 380.3, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 448.15, 380.3, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 540.85, 380.3, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 575.6, 380.3, 35.5, 17.9, 0, 0, 1, 0, "box"], ["pig", "item.M_pigSmall", 431.8, 284.6, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 555.25, 286.85, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 494.6, 345.45, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["item", "item.I_wood_small", 415.55, 346.55, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 451.05, 363.85, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 441.1, 346.7, 35.05, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 424.8, 363.5, 35.05, 16.9, 0, 0, 1, 0, "box"], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_stone_wide", 434.15, 321.85, 17.9, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 554.65, 322.55, 17.9, 33.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"]]; public static var LEVEL_10:Array = [["item", "item.I_glass_small_1", 335.7, 226.05, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 328.9, 240.35, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 344.05, 240.35, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 320.55, 253.5, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 335.7, 253.5, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 350.45, 253.5, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 357.9, 267.8, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 343.2, 267.8, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 329.55, 267.8, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 315.5, 267.8, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 440.85, 179.5, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 434.05, 193.8, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 449.2, 193.8, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 425.7, 206.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 440.85, 206.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 455.6, 206.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 463.05, 221.25, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 448.35, 221.25, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 434.7, 221.25, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 420.65, 221.25, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 336.95, 278.25, 56.05, 7.65, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 336.95, 284.95, 56.05, 7.65, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 312.8, 316.7, 7.65, 56.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 323.25, 316.7, 7.65, 56.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 416.1, 270.75, 7.65, 56.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 423.2, 270.75, 7.65, 56.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 461.3, 270.75, 7.65, 56.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 468.9, 270.75, 7.65, 56.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_long2", 442.1, 232.3, 56.05, 7.65, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 442.1, 239, 56.05, 7.65, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 351.35, 316.9, 7.45, 56.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_long", 360.95, 316.9, 7.45, 56.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 376.9, 316.25, 26.05, 22.6, -141.658782958984, 0.620343418369169, 0.784330315164507, 0.790921128987672, "box"], ["pig", "item.M_pigMiddle", 442.7, 282.85, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 336.8, 335.85, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 413.4, 347.1, 317.8, 96.5, 0, 0, 1, 0, ""], ["bird", "item.birdBlueSmall", 91.25, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62.5, 382.2, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 28.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["static_tri", "item._tri", 281.9, 370.1, 53.25, 53.2, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 378.15, 368.35, 139.5, 46.9, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 521.2, 344.6, 92.75, 92.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"], ["static_tri", "item._tri", 385.55, 325.3, 53.25, 53.2, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 444.05, 344.7, 61, 91.9, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_11:Array = [["item", "item.I_glass_small_1", 386.3, 257.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 401.85, 257.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 417.1, 257.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 432.3, 257.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 387.3, 322.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 402.85, 322.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 418.1, 322.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 433.3, 322.6, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 387.95, 279.55, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 432.1, 279.55, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 388.4, 293.15, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 388.4, 308.2, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 432.55, 293.9, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 432.95, 307.85, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 410.15, 308.1, 29.8, 14.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 410.85, 337.2, 29.8, 14.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 395.9, 351.7, 29.8, 14.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 426.1, 352.1, 29.8, 14.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 409.25, 246.35, 59.75, 7.55, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 409.45, 268.5, 59.75, 7.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_middle", 410.3, 286.25, 7.25, 29.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_small_1", 387.7, 235.45, 14.65, 14.6, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 429.85, 235.45, 14.65, 14.6, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 387.75, 337.1, 14.65, 14.6, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 433.1, 337.1, 14.65, 14.6, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 582.15, 330.95, 59.75, 7.55, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 559.75, 342.25, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 605.6, 342.25, 14.25, 14.7, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 559.3, 356.7, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 605.5, 356.7, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 605.5, 370.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 560, 370.95, 14.25, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 583.35, 370.45, 29.7, 16.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 569.2, 385.2, 29.8, 14.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 599, 385.2, 29.8, 14.35, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_2", 556.7, 323.9, 7.65, 7.05, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_2", 606.45, 323.9, 7.65, 7.05, 0, 0, 1, 0, "box"], ["pig", "item.M_pigSmall", 408.95, 232.95, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 470.25, 348.4, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 494.1, 348.4, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 583.55, 311.35, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 532.75, 372.85, 396.05, 59.3, 0, 0, 1, 0, ""], ["bird", "item.birdBlueSmall", 86.85, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 116.1, 380.15, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 61.65, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 36.45, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_wood_middle_long", 400.85, 286.65, 5.95, 28.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 419.25, 286.45, 5.95, 28.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["static_tri", "item._tri", 361.8, 373.9, 36.4, 36.4, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 449.1, 374.1, 139, 30.4, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 538.1, 378.2, 38.75, 38.8, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"], ["static_rec", "item._rec", 671.9, 391.6, 96.5, 96.5, 45, 0.707106781186547, 0.707106781186548, 1, "staticFloor"]]; public static var LEVEL_12:Array = [["item", "item.I_glass_small_1", 461.4, 219.7, 19.6, 19.6, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 442.3, 263.9, 19.6, 19.6, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 422.5, 300.55, 19.25, 35.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 493.85, 301.35, 19.25, 35.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_small_1", 478.4, 264.55, 19.6, 19.6, 0, 0, 1, 0, "box"], ["item", "item.I_glass_middle", 444.25, 211.75, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 477.8, 211.75, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 461.3, 189.4, 35.5, 8.7, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_middle", 443.85, 233.45, 35.5, 8.7, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_middle", 479.55, 233.45, 35.5, 8.7, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_middle", 427.6, 255.95, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 461.15, 255.95, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 494.9, 255.95, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 423.35, 278.6, 35.5, 8.7, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_middle", 459.1, 278.6, 35.5, 8.7, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_middle", 495.1, 278.6, 35.5, 8.7, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_middle", 405.5, 301.1, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 441, 300.8, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 476.45, 301.1, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 511.85, 300.8, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 405.5, 345.45, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_middle", 510.25, 345.55, 8.7, 35.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 404.2, 323, 35.6, 8.75, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 439.8, 323, 35.6, 8.75, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 475.2, 323, 35.6, 8.75, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 510.1, 323, 35.6, 8.75, 0, 0, 1, 0, "box"], ["item", "item.I_stone_middle", 390.9, 346.15, 8.75, 37.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_middle", 527.5, 346.15, 8.75, 37.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["staticDisplay", "item.", 458.4, 384.85, 264.45, 43.45, 0, 0, 1, 0, ""], ["pig", "item.M_pigSmall", 458.45, 308.8, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 438.7, 353.35, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 475.35, 353.35, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdBlueSmall", 126.85, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 52.1, 382.8, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 101.65, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 76.45, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_wood_middle", 457.35, 345.4, 8.75, 35.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 421.65, 345, 8.75, 35.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 492.85, 345, 8.75, 35.6, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["static_tri", "item._tri", 355, 377.9, 27.65, 27.65, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 458.7, 379, 179.7, 31.8, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 564.45, 379.05, 31.55, 31.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_13:Array = [["item", "item.I_stone_short", 435.35, 195.05, 8.7, 16.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_short", 496.05, 195.05, 8.7, 16.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_short", 388.6, 311.65, 8.7, 16.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_short", 540.5, 312.75, 8.7, 16.75, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_small_2", 408, 255.15, 9.05, 8.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_2", 517.8, 255.15, 9.05, 8.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 421.35, 268, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 507.15, 268, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_glass_short", 407.7, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 416.5, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 425.65, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 434.5, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 493.55, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 502.95, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 511.7, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_short", 520.2, 285.75, 8.3, 17.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 421.35, 303.05, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 508.45, 303.85, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 465, 328.8, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 531.15, 329.6, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 402.1, 328.8, 35.5, 17.9, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 429.6, 316.4, 70.1, 9.5, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 499.4, 316.4, 70.1, 9.5, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 464.9, 252.55, 70.15, 9.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 439.35, 229.7, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 490.75, 229.7, 18.9, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 442.85, 294.55, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 485.05, 294.8, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 465.05, 242.7, 34.9, 8.55, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 464.85, 307.85, 34.9, 8.55, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 465.25, 208.2, 70.1, 9.5, 0, 0, 1, 0, "box"], ["bird", "item.birdBlueSmall", 119.65, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 40.1, 382.8, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 94.45, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 68.9, 382.8, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["staticDisplay", "item.", 466.65, 370.8, 284.15, 66.6, 0, 0, 1, 0, ""], ["pig", "item.M_pigMiddle", 465.55, 288.05, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 465.05, 228.6, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 466.65, 193.6, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["static_tri", "item._tri", 363.05, 365.35, 56.8, 56.8, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 467.15, 365.5, 150.8, 56.7, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 569.5, 363.75, 53.55, 53.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_14:Array = [["item", "item.I_R_stone_big", 461.65, 213.35, 30.45, 31.55, 104.998931884766, 0.965930651058897, 0.258801038145013, 3.73232912040199, "roundItem"], ["item", "item.I_stone_wide", 479.6, 246.6, 29.05, 14.65, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 462.6, 233.3, 28.45, 14.3, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 488.55, 226.4, 14.3, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 436.2, 226.3, 14.3, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 442.65, 247.45, 30.15, 16.3, 0, 0, 1, 0, "box"], ["staticDisplay", "item.", 475.35, 329.55, 375.05, 152.65, 0, 0, 1, 0, ""], ["pig", "item.M_pigMiddle", 436.75, 375.7, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 411.3, 378.3, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 392.5, 378.3, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 514.3, 375.7, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 559.5, 375.5, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 540.15, 381.9, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 474, 368.35, 47.05, 46, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdRedSmall", 102, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 135.5, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 26, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 62, 380.9, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_R_stone_big", 445.4, 207.3, 13.2, 13.75, 105.001373291016, 0.965919622520321, 0.258842196772863, 3.73169303368232, "roundItem"], ["item", "item.I_R_stone_big", 450.45, 198.7, 13.2, 13.75, 105.001373291016, 0.965919622520321, 0.258842196772863, 3.73169303368232, "roundItem"], ["item", "item.I_R_stone_big", 460.05, 194.7, 13.2, 13.75, 105.001373291016, 0.965919622520321, 0.258842196772863, 3.73169303368232, "roundItem"], ["item", "item.I_R_stone_big", 477.15, 207.9, 13.2, 13.75, 105.001373291016, 0.965919622520321, 0.258842196772863, 3.73169303368232, "roundItem"], ["item", "item.I_R_stone_big", 469.95, 199.5, 13.2, 13.75, 105.001373291016, 0.965919622520321, 0.258842196772863, 3.73169303368232, "roundItem"], ["static_tri", "item._tri", 575.05, 374.85, 56.8, 56.8, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 461.2, 258.45, 64.9, 10.4, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 629.5, 374.05, 53.55, 53.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"], ["static_tri", "item._tri", 319.45, 374.85, 56.8, 56.8, 0, 0, 1, 0, "staticFloorTri"], ["static_tri", "item._tri", 373.9, 374.05, 53.55, 53.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_15:Array = [["item", "item.I_glass_long", 469.25, 350.35, 63.15, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 439.9, 265.95, 15.1, 15.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 465.05, 265.95, 15.1, 15.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 488.9, 265.95, 15.1, 15.1, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 370.4, 266.15, 15.55, 15.4, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 345.2, 265.75, 15.55, 15.4, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 320.35, 266.15, 15.55, 15.4, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 469, 321.4, 31.2, 15.75, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 346.9, 335.75, 33.75, 17, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 464.7, 289.9, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 346.95, 289.4, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 346.95, 319.65, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 348.55, 367.85, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 482.85, 306.45, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 449.2, 306.45, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 453.6, 337.5, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 346.2, 305.95, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 347.8, 352.55, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 464.7, 277.6, 66.8, 8.45, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 346.9, 277.1, 66.8, 8.45, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 439.95, 289.5, 15.1, 15.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 443.15, 320.95, 15.1, 15.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 493.3, 321.85, 15.1, 15.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 488.1, 337.9, 15.95, 16.45, 0, 0, 1, 0, "box"], ["staticDisplay", "item.", 468.5, 375.55, 273.5, 42.35, 0, 0, 1, 0, ""], ["bird", "item.birdBlueSmall", 93.65, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 75.25, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 111.65, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 129.65, 381.35, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_stone_small_1", 488.95, 290.4, 15.55, 15.4, 0, 0, 1, 0, "box"], ["pig", "item.M_pigMiddle", 471.2, 375.65, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 402.85, 344.65, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 535.65, 344.65, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["item", "item.I_stone_small_1", 608.4, 266.15, 15.55, 15.4, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 583.2, 265.75, 15.55, 15.4, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 558.35, 266.15, 15.55, 15.4, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 584.9, 335.75, 33.75, 17, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 584.95, 289.4, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 584.95, 319.65, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 586.55, 367.85, 33.3, 16.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 584.2, 305.95, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 585.8, 352.55, 33.2, 17.95, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 584.9, 277.1, 66.8, 8.45, 0, 0, 1, 0, "box"], ["static_rec", "item._rec", 388, 383.45, 112.1, 14.8, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 405.8, 364.85, 74.9, 20.8, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 530.2, 364.45, 74.9, 20.8, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 548.8, 383.45, 112.1, 14.8, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_16:Array = [["item", "item.I_wood_small", 360.25, 239.75, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 389.2, 239.75, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 421.9, 239.75, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 455.05, 239.75, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 484.8, 239.75, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 485.05, 274.7, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 485.45, 291.8, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 360.25, 273.9, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 360.65, 291.8, 16.75, 17.3, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 416.7, 282.85, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle", 427.4, 282.85, 8.55, 34.9, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 359.15, 343.05, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 376.65, 343.45, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 369.45, 317.55, 35.05, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 468.8, 343.05, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 486.35, 343.05, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 477.3, 317.3, 35.05, 16.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 423.4, 343.05, 16.9, 35.05, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 422.6, 312.35, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 422.6, 321.15, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 457.85, 252.15, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 457.85, 261.45, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 386.2, 261.45, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 386.35, 252.65, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 458.25, 304.7, 70.3, 8.85, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 387, 304.7, 70.3, 8.85, 0, 0, 1, 0, "box"], ["staticDisplay", "item.", 423.85, 379, 159.6, 38.05, 0, 0, 1, 0, ""], ["pig", "item.M_pigMiddle", 390.35, 284.45, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 399.45, 350.2, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 456.75, 284.45, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 445.45, 350.6, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdYellowSmall", 28.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 52.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 84.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 112.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 140.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["static_rec", "item._rec", 423.75, 377.65, 158.8, 36, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_17:Array = [["item", "item.I_wood_small", 343.1, 197.4, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 380.85, 197.4, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 317.8, 228.75, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 346.4, 228.15, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 346.35, 216.25, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 376.85, 228.15, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 376.8, 216.25, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 404.7, 228.15, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 361.3, 206.7, 50.65, 6.4, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 335.15, 237.45, 50.65, 6.4, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 385.7, 237.45, 50.65, 6.4, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 328.85, 267.1, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 335.65, 267.1, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 389.9, 267.1, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 396.7, 267.1, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 338.1, 294.1, 50.65, 6.4, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 388.65, 294.1, 50.65, 6.4, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 315.65, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 322.45, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 358.05, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 364.85, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 404.35, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 411.15, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 371.45, 323.25, 6.4, 50.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_small", 317.8, 285.35, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 346.4, 284.8, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 376.85, 284.8, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 407.9, 284.8, 12.15, 12.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 341.35, 341.4, 25.55, 12.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 388.95, 341.4, 25.55, 12.35, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 314.8, 360.25, 25.85, 13.05, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 364.8, 360.25, 25.85, 13.05, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 414.55, 360.25, 25.85, 13.05, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 337.1, 350.4, 51.15, 6.95, 0, 0, 1, 0, "box"], ["item", "item.I_stone_long2", 388.55, 350.4, 51.15, 6.95, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 303.35, 379.05, 13.05, 25.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 323.5, 379.05, 13.05, 25.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 353.75, 379.05, 13.05, 25.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 372.35, 379.05, 13.05, 25.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 402.45, 379.05, 13.05, 25.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_wide", 422.65, 379.05, 13.05, 25.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 362.05, 253.8, 12.35, 25.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 362.05, 279.05, 12.35, 25.55, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["pig", "item.M_pigSmall", 341.75, 325.55, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 388.45, 325.55, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 360.35, 225.4, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdYellowSmall", 52.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 84.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 112.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"]]; public static var LEVEL_18:Array = [["item", "item.I_wood_wide_2", 529.9, 191.1, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 433.95, 328.1, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 433.95, 346.15, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 399.55, 373.8, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 419.1, 373.8, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 445.1, 301.1, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 462.9, 333.75, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 483.4, 232.25, 36.85, 20.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 508.5, 292.95, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 475.45, 288.05, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 475.45, 306.1, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 520.25, 247.25, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 520.25, 265.3, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 550.1, 254.85, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 561.85, 209.15, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 561.85, 227.2, 36.85, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 471.15, 261.05, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 490.7, 261.05, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 508.3, 213.35, 36.85, 17.8, 0, 0, 1, 0, "box"], ["pig", "item.M_pigSmall", 442.15, 379.85, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 483.65, 342.2, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 528.45, 301.4, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 571.65, 265.7, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 575.75, 243.75, 243.8, 298.75, 0, 0, 1, 0, ""], ["bird", "item.birdYellowSmall", 28.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 52.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 84.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 112.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 140.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_wood_wide_2", 561.9, 182.15, 17.8, 36.85, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["static_rec", "item._rec", 639.7, 243.75, 116, 298.7, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 563.35, 332, 43, 115.2, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 519.4, 352.1, 47.8, 81.9, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 477.75, 370.85, 47.8, 37.7, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_19:Array = [["staticDisplay", "item.", 574.6, 347.8, 345.4, 92, 0, 0, 1, 0, ""], ["item", "item.I_wood_middle_long", 549.65, 321.85, 54.4, 6.85, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_middle_long", 477.95, 330.6, 34.7, 49.65, -122.124710083008, 0.846892665117395, 0.531763870313089, 1.59261039043282, "box"], ["item", "item.I_wood_middle_long", 518.95, 274.55, 12.3, 17.35, -111.823715209961, 0.928332035048589, 0.371752111900585, 2.49718025891631, "box"], ["item", "item.I_wood_middle_long", 514.7, 328.95, 7.35, 54.25, -90.5289154052734, 0.999957391711621, 0.00923118417598776, 108.323848018624, "box"], ["item", "item.I_wood_middle_long", 526.3, 340.75, 7.75, 29.8, -91.7820434570313, 0.999516355436706, 0.0310975113879669, 32.1413615053283, "box"], ["item", "item.I_wood_middle_long", 573.55, 340.5, 7.75, 29.8, -91.7820434570313, 0.999516355436706, 0.0310975113879669, 32.1413615053283, "box"], ["item", "item.I_wood_middle_long", 517.7, 295.35, 39.9, 45.85, -129.856323242188, 0.767653907992033, 0.640864632777125, 1.19784096161693, "box"], ["item", "item.I_wood_middle_long", 496.3, 324.1, 29.65, 18.7, -24.951904296875, 0.421857332459729, 0.906662225445596, 0.46528610172592, "box"], ["item", "item.I_wood_middle_long", 500.25, 304.3, 12.85, 30.25, -77.8471069335938, 0.977589309055535, 0.210521122028933, 4.64366377888285, "box"], ["item", "item.I_wood_middle_long", 531.25, 281.65, 29.45, 18.9, -25.7380676269531, 0.434257669292136, 0.900788697009994, 0.482086054957812, "box"], ["item", "item.I_wood_middle_long", 550.2, 291.15, 8.65, 54.2, -88.039794921875, 0.999414825492186, 0.0342053590307685, 29.2180773367468, "box"], ["item", "item.I_wood_middle_long", 574.95, 297.45, 44.4, 41.4, -42.4097747802734, 0.674428359801747, 0.73834029247707, 0.913438378852517, "box"], ["item", "item.I_wood_middle_long", 581.1, 327.9, 7.35, 54.25, -90.5289154052734, 0.999957391711621, 0.00923118417598776, 108.323848018624, "box"], ["item", "item.I_wood_middle_long", 594.75, 331.7, 24.65, 26.7, -131.394165039063, 0.750178413264828, 0.661235471123158, 1.13451024033934, "box"], ["item", "item.I_wood_middle_long", 607.55, 320.6, 12.25, 30.25, -79.2149047851563, 0.982335962412514, 0.187125778424782, 5.24960254371035, "box"], ["item", "item.I_wood_middle_long", 612, 302.4, 54.8, 13.75, -172.714065551758, 0.126821104420534, 0.991925605816059, 0.127853443521299, "box"], ["item", "item.I_wood_middle_long", 569.8, 279.25, 30.15, 11.65, 9.62924194335938, 0.167271945988726, 0.985910795196576, 0.169662353636542, "box"], ["item", "item.I_wood_middle_long", 533.45, 268.3, 12.3, 17.35, -111.823715209961, 0.928332035048589, 0.371752111900585, 2.49718025891631, "box"], ["item", "item.I_glass_long", 448.4, 327.2, 31.9, 57.95, -65.7055511474609, 0.911443142255809, 0.411426054637837, 2.21532674457897, "box"], ["item", "item.I_glass_long", 487.4, 283.75, 41.25, 53.35, -54.4944305419922, 0.814059067058812, 0.58078208937547, 1.40166007518274, "box"], ["item", "item.I_glass_long", 521.4, 260.55, 33.3, 20.8, -24.3590545654297, 0.41245352011874, 0.910978646150205, 0.452758713787385, "box"], ["item", "item.I_glass_long", 573.2, 266.15, 57.75, 32, 24.4395294189453, 0.413732628974581, 0.910398435698229, 0.454452262604416, "box"], ["item", "item.I_glass_long", 623.75, 289.8, 59.7, 24, 15.9263458251953, 0.274401418943912, 0.961615235570635, 0.285354691558187, "box"], ["item", "item.I_glass_small_1", 456.9, 345.35, 19.45, 19.5, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 470.4, 341.3, 7.75, 29.8, -91.7820434570313, 0.999516355436706, 0.0310975113879669, 32.1413615053283, "box"], ["item", "item.I_glass_small_1", 483.3, 313.05, 26.7, 26.7, -31.3418121337891, 0.520142522854364, 0.854079478689599, 0.609009507701098, "box"], ["item", "item.I_glass_small_1", 535.35, 293.9, 17.8, 17.8, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 561.75, 291.55, 17.1, 17.1, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 502, 338.05, 18.25, 18.3, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 504.8, 351, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 478.6, 351, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 492.4, 296.65, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 560.9, 268.35, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 593.9, 292.45, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 602.9, 293.45, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 591.4, 315.35, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 597.3, 323.7, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 615.8, 323.7, 8.5, 8.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_2", 569.4, 314.15, 8.5, 8.35, 0, 0, 1, 0, "box"], ["pig", "item.M_pigMiddle", 549.05, 339.65, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdBlueSmall", 116.45, 381.6, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 45.15, 383.15, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 67.65, 381.55, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 94.15, 382.05, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["static_rec", "item._rec", 548.55, 373.9, 254.3, 36.5, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 402.1, 382.65, 35.6, 35.6, 0, 0, 1, 0, "staticFloorTri"], ["static_tri", "item._tri", 617.25, 328.35, 55.4, 55.45, 0, 0, 1, 0, "staticFloorTri"], ["static_rec", "item._rec", 665.5, 345.75, 40.8, 88.1, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 710.7, 365.9, 52.3, 52.25, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var LEVEL_20:Array = [["item", "item.I_wood_middle_long", 441.5, 272.45, 77.5, 9.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 459.65, 262.8, 38.5, 9.45, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 432.15, 262.55, 16.85, 9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 458.05, 238.9, 18.65, 38.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 494.5, 240.75, 18.65, 38.65, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 472.1, 283.05, 77.5, 9.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 472.1, 292.9, 77.5, 9.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 473.8, 320.95, 77.5, 9.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 473.8, 330.75, 77.5, 9.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 530.65, 340.65, 77.5, 9.8, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 518.15, 269.05, 38.65, 18.65, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 539.1, 306.75, 38.65, 18.65, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 397.75, 327.05, 38.65, 18.65, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 403.5, 345.7, 38.65, 18.65, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 442.15, 346.3, 38.65, 18.65, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 427.5, 307.3, 39.15, 19.7, 0, 0, 1, 0, "box"], ["item", "item.I_stone_wide", 539.3, 325.95, 39.15, 19.7, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 422.9, 288.55, 19.05, 18.9, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 404.7, 288.5, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 397.95, 307.55, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 456.05, 306.75, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 374.9, 345.5, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 510.9, 306.55, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 520.9, 287.1, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 489.95, 269.45, 18.5, 19.05, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 560, 350.3, 18.65, 9.95, 0, 0, 1, 0, "box"], ["item", "item.I_wood_short", 505.95, 350.3, 18.65, 9.95, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 506.35, 373.3, 9.45, 38.5, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_R_stone_big", 476.75, 207.1, 35.95, 33.75, 0, 0, 1, 0, "roundItem"], ["pig", "item.M_pigSmall", 475.3, 381.7, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigSmall", 531.3, 381.7, 19.8, 19.35, 0, 0, 1, 0, "pigBox"], ["bird", "item.birdYellowSmall", 28.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 52.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 84.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 112.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 140.85, 380.1, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["staticDisplay", "item.", 502.65, 375.3, 281.05, 39.05, 0, 0, 1, 0, ""], ["static_rec", "item._rec", 408.95, 376.85, 91, 41.7, 0, 0, 1, 0, "staticFloor"], ["static_rec", "item._rec", 596.15, 376.85, 91, 41.7, 0, 0, 1, 0, "staticFloor"]]; public static var LEVEL_21:Array = [["item", "item.I_glass_small_1", 511.4, 181.9, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 533.9, 181.9, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 556.15, 181.9, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 533.2, 192.35, 60.15, 7.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 612.2, 230, 60.15, 7.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 509.35, 224.6, 7.55, 57.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_long", 558.35, 224.2, 7.55, 57.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_small_1", 437.5, 220, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 459.5, 220, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 481.8, 220, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 456.55, 230.85, 60.15, 7.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 436.75, 262.35, 7.15, 54.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_long", 632.55, 261.75, 7.55, 57.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_small_1", 589.05, 219.15, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 611, 219.15, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_small_1", 633.3, 219.15, 13.55, 13.55, 0, 0, 1, 0, "box"], ["item", "item.I_glass_long", 533.45, 256.6, 60.15, 7.95, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 416.55, 322.85, 28.45, 15.35, 0, 0, 1, 0, "box"], ["item", "item.I_glass_wide", 653.85, 322.5, 28.45, 15.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 458, 292.6, 57.25, 7.2, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 458, 300.3, 57.25, 7.2, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 612.05, 293.6, 57.25, 7.2, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 612.05, 300.1, 57.25, 7.2, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 478.25, 262.05, 6.85, 54.4, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 590.9, 262.05, 7.2, 57.25, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 534.2, 246.3, 27.15, 13.1, 0, 0, 1, 0, "box"], ["item", "item.I_wood_wide_2", 533.5, 275.05, 13.1, 27.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 534.45, 224.4, 13.1, 27.15, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_wide_2", 519.3, 294.8, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 547, 294.8, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 504.95, 308.3, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 564.1, 308.7, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 570.45, 337.3, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 574.2, 350.25, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 499.3, 337.4, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_wide_2", 494.7, 350.8, 27.15, 13.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_glass_long", 436.75, 330.15, 7.15, 54.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_small", 498.65, 322.9, 14.9, 15.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_small", 573.05, 323.35, 14.9, 15.35, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 535.8, 319.05, 57.25, 7.2, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle", 515.95, 343.95, 6.95, 26.7, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_short", 513.5, 326.85, 15.25, 8.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_short", 557.4, 327.3, 15.25, 8.1, 180, 1.22460635382238E-16, 1, 1.22460635382238E-16, "box"], ["item", "item.I_wood_middle", 554.35, 344.8, 6.95, 26.7, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_stone_small_1", 457.8, 268.4, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 449.4, 282.35, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 464.65, 282.35, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 613.35, 268.6, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 605, 282.55, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 620.2, 282.55, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_stone_small_1", 534.8, 202.9, 14.05, 14, 0, 0, 1, 0, "box"], ["item", "item.I_wood_middle_long", 591.5, 330.15, 6.85, 54.4, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_middle_long", 477.9, 330.35, 6.85, 54.4, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_long", 632.35, 330.15, 7.15, 54.3, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["pig", "item.M_pigMiddle", 458.2, 341.25, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 535.3, 341.65, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["pig", "item.M_pigMiddle", 612.25, 342.3, 32.55, 31.9, 0, 0, 1, 0, "pigBox"], ["staticDisplay", "item.", 535.3, 381.75, 367.8, 49.05, 0, 0, 1, 0, ""], ["bird", "item.birdBlueSmall", 116.45, 381.6, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 95.7, 382.45, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 67.65, 381.55, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdBlueSmall", 48.45, 381.6, 17.55, 16.9, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdRedSmall", 31.7, 382.45, 22.7, 22, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", 6.05, 380.35, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", -17.95, 384, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["bird", "item.birdYellowSmall", -41.95, 384.85, 25.1, 24.15, 0, 0, 1, 0, "staticBirdBox"], ["item", "item.I_glass_wide", 423.3, 341.95, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 407.8, 342.5, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 422.75, 300.7, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 645.85, 342.5, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 660.6, 341.95, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 647.95, 300, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 512.5, 273.4, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 551.5, 274.2, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 499.1, 287.75, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_glass_wide", 566.85, 288.4, 15.35, 28.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["item", "item.I_wood_short", 533.65, 308.3, 8.25, 15.45, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "box"], ["static_rec", "item._rec", 535.35, 375.65, 269.8, 36.5, 0, 0, 1, 0, "staticFloor"], ["static_tri", "item._tri", 382.55, 375.15, 35.6, 35.6, 0, 0, 1, 0, "staticFloorTri"], ["static_tri", "item._tri", 686.3, 373.35, 31.9, 31.95, 90, 1, 6.12303176911189E-17, 1.63317787283838E16, "staticFloorTri"]]; public static var itemClass:Class; public static var mc; public static var readInA:Number; public static var readInH:Number; public static var readInW:Number; public static var cos:Number; public static var sin:Number; public static var tan:Number; public static var Item; public static function init(_arg1:Number, _arg2:Number=1):void{ gameItemArray = (gameDriver[("LEVEL_" + _arg1)] as Array); } public static function readFromGameDriver(_arg1:MovieClip):void{ var _local2:MovieClip; var _local3:Number = 0; while (_local3 < _arg1.numChildren) { _local2 = (_arg1.getChildAt(_local3) as MovieClip); if (judgeType(_local2)){ readInA = ((_local2.rotation * Math.PI) / 180); cos = Math.abs(Math.cos(readInA)); sin = Math.abs(Math.sin(readInA)); tan = Math.abs(Math.tan(readInA)); trace((((((((((((((((((((((((((((("[" + "\"") + returnType(_local2)) + "\"") + ",") + "\"") + "item.") + getQualifiedClassName(_local2).slice(6)) + "\"") + ",") + _local2.x) + ",") + _local2.y) + ",") + _local2.width) + ",") + _local2.height) + ",") + _local2.rotation) + ",") + sin) + ",") + cos) + ",") + tan) + ",\"") + returnClass(_local2)) + "\"") + "],")); }; _local3++; }; } private static function returnType(_arg1):String{ if ((_arg1 is itemA)){ return ("itemA"); }; if ((_arg1 is pig)){ return ("pig"); }; if ((_arg1 is bird)){ return ("bird"); }; if ((_arg1 is staticP)){ return ("staticPoint"); }; if ((_arg1 is static_tri)){ return ("static_tri"); }; if ((_arg1 is static_rec)){ return ("static_rec"); }; if ((_arg1 is staticDisplay)){ return ("staticDisplay"); }; return (""); } private static function returnClass(_arg1):String{ if ((_arg1 is itemA)){ if (getQualifiedClassName(_arg1).slice(8, 9) == "R"){ return ("roundItem"); }; if (getQualifiedClassName(_arg1).slice(8, 9) == "T"){ return ("roundItem"); }; if (getQualifiedClassName(_arg1) == "item::I_smileface"){ return ("roundItem"); }; return ("box"); }; if ((_arg1 is pig)){ return ("pigBox"); }; if ((_arg1 is bird)){ return ("staticBirdBox"); }; if ((_arg1 is staticP)){ return (""); }; if ((_arg1 is static_tri)){ return ("staticFloorTri"); }; if ((_arg1 is static_rec)){ return ("staticFloor"); }; if ((_arg1 is staticDisplay)){ return (""); }; return (""); } private static function judgeType(_arg1):Boolean{ if ((((((((((((((_arg1 is itemA)) || ((_arg1 is pig)))) || ((_arg1 is bird)))) || ((_arg1 is staticP)))) || ((_arg1 is static_tri)))) || ((_arg1 is static_rec)))) || ((_arg1 is staticDisplay)))){ return (true); }; return (false); } } }//package main
Section 155
//mainBtn (main.mainBtn) package main { import flash.display.*; import flash.events.*; import com.greensock.*; public class mainBtn { public var mc:EventDispatcher; public var func:Function; public var effect; public var overSound:Class; public var clickSound:Class; public var ori_scale:Number; public function mainBtn(_arg1:DisplayObject, _arg2:Function, _arg3:Class=null, _arg4:Class=null){ ori_scale = _arg1.scaleX; this.mc = _arg1; this.func = _arg2; this.overSound = _arg3; this.clickSound = _arg4; MovieClip(_arg1).buttonMode = true; MovieClip(_arg1).mouseChildren = false; _arg1.addEventListener(MouseEvent.MOUSE_OVER, overHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, outHandler); _arg1.addEventListener(MouseEvent.CLICK, _arg2); _arg1.addEventListener(MouseEvent.CLICK, click); _arg1.addEventListener(Event.REMOVED_FROM_STAGE, clear); } private function outHandler(_arg1:MouseEvent):void{ var _arg1 = _arg1; var e:* = _arg1; try { TweenLite.to(mc, 0.2, {scaleX:ori_scale, scaleY:ori_scale}); } catch(e:Error) { }; } private function overHandler(_arg1:MouseEvent):void{ var _arg1 = _arg1; var e:* = _arg1; try { if (overSound){ new mainSound(overSound).playSound(1); }; soundControl.play_sound("sound_btn"); TweenLite.to(mc, 0.2, {scaleX:(1.2 * ori_scale), scaleY:(1.2 * ori_scale)}); } catch(e:Error) { }; } private function click(_arg1:MouseEvent):void{ soundControl.play_sound("sound_btn2"); if (clickSound){ new mainSound(clickSound).playSound(1); }; } private function clear(_arg1:Event):void{ mc.removeEventListener(Event.REMOVED_FROM_STAGE, clear); mc.removeEventListener(MouseEvent.MOUSE_OVER, overHandler); mc.removeEventListener(MouseEvent.MOUSE_OUT, outHandler); mc.removeEventListener(MouseEvent.CLICK, func); mc.removeEventListener(MouseEvent.CLICK, click); } } }//package main
Section 156
//mainSound (main.mainSound) package main { import flash.events.*; import flash.media.*; public class mainSound { public var sound:Sound; public var soundChannel:SoundChannel; public var soundTransform:SoundTransform; public var isSound:Boolean;// = false public function mainSound(_arg1:Class){ sound = new (_arg1); soundChannel = new SoundChannel(); sound.addEventListener(Event.SOUND_COMPLETE, clear); soundTransform = new SoundTransform(); } private function clear(_arg1:Event):void{ isSound = false; } public function playSound(_arg1:Number=1):void{ if (mainVar.globalSound){ isSound = true; soundChannel = sound.play(0, _arg1); }; } public function stopSound():void{ isSound = false; soundChannel.stop(); } public function setVolumn(_arg1:Number):void{ soundChannel.soundTransform = new SoundTransform(_arg1); } public function volumnOut():void{ } public function volumnIn():void{ } } }//package main
Section 157
//mainVar (main.mainVar) package main { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import flash.events.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import com.greensock.*; import item.*; import effect.*; public class mainVar extends EventDispatcher { private static var _world:b2World; public static var RATIO:Number = 100; public static var bodyArray:Array; public static var shellArray:Array; public static var _view:view; public static var enemyArray:Array; public static var enemyArray2:Array; public static var houseArray:Array; public static var jointArray:Array; public static var currentScore:Number = 0; public static var totalScore:Number = 0; public static var thisScore:Number = 0; public static var isJump:Boolean = false; public static var worldB:Number = 10000; public static var languageSelected:String = "EN"; public static var isMouseDown:Boolean = false; public static var canMoveScreen:Boolean = true; public static var canMoveLeft:Boolean = true; public static var canMoveRight:Boolean = true; public static var display_gap:Number; public static var display_rate:Number; public static var main_speed:Number; public static var isDraged:Boolean = false; public static var lineSprite1:Sprite; public static var lineSprite2:Sprite; public static var BlockSprite:blockSprite; public static var mouseObj:MovieClip; public static var ropeColor:uint = 2826252; public static var isShot:Boolean = false; public static var shotOutBird:birdBall; public static var canDrag:Boolean = false; public static var _pm:Point; public static var mainStage:Stage; public static var canDrawMoveLine:Boolean = false; public static var BOS:Number = 0; public static var tempMoveLinePoint:Point; public static var moveLineArray:Array; public static var lastMoveLineArray:Array; public static var isFirstDrawLine:Boolean = true; public static var birdGroup:MovieClip; public static var enemyGroup:MovieClip; public static var mouseSpeed:Number; public static var currentMousePoint:Point = new Point(0, 0); public static var foreOffset:Number; public static var foreOffsetY:Number; public static var viewCenter:Point; public static var shotBirdArray:Array; public static var shotBirdTypeArray:Array; public static var shotBirdNum:Number; public static var canShot:Boolean = false; public static var isDown:Boolean = false; public static var moveDis:Number = 300; public static var scoreBoard:displayScore; public static var STAGE_LEFT:Number = -100; public static var STAGE_RIGHT:Number = 700; public static var STAGE_UP:Number = 200; public static var STAGE_DOWN:Number = 320; public static var shouldFollow:Boolean = true; public static var GAME_STATIC:String = "ready"; public static var itemArray:Array; public static var pigNum:Number; public static var birdNumOri:Number; public static var birdNum:Number; public static var GAME_RESULT:String = "normal"; public static var isGameEnd:Boolean = false; public static var canMoveBack:Boolean = true; public static var isBirdStatic:Boolean = true; public static var reportScoreBird:Number = 0; public static var mouse1:MovieClip; public static var mouse2:MovieClip; public static var currentPart:Number = 2; public static var currentLevel:Number = 21; public static var isExped:Boolean = true; public static var onboardBirdClass:Class; public static var functionBoard:MovieClip; public static var isCollide:Boolean; public static var isFunction:Boolean = false; public static var lineTask:Number; public static var isClicked:Boolean; public static var birdNumOnStage:Number; public static var realBirdNum:Number; public static var isGamePaused:Boolean; public static var can:Boolean; public static var bird1:birdBall; public static var bird2:birdBall; public static var bird3:birdBall; public static var stopOneFrame:Number = 0; public static var globalSound:Boolean = true; public static var btn_scale_max:Number = 1.2; public function mainVar(){ mouseObj.mouseEnabled = false; } public static function get world():b2World{ return (_world); } public static function set world(_arg1:b2World):void{ _world = _arg1; } public static function createWorld():void{ var _local3:Boolean; var _local1:b2AABB = new b2AABB(); _local1.lowerBound.Set((-(worldB) / mainVar.RATIO), (-(worldB) / mainVar.RATIO)); _local1.upperBound.Set((worldB / mainVar.RATIO), (worldB / mainVar.RATIO)); var _local2:b2Vec2 = new b2Vec2(0, 16.5); world = new b2World(_local1, _local2, _local3); world.SetContactListener(new gameContactListener()); } public static function distance(_arg1:DisplayObject, _arg2:DisplayObject):Number{ return (Math.sqrt((((_arg2.x - _arg1.x) * (_arg2.x - _arg1.x)) + ((_arg2.y - _arg1.y) * (_arg2.y - _arg1.y))))); } public static function distanceP(_arg1:Point, _arg2:Point):Number{ return (Math.sqrt((((_arg2.x - _arg1.x) * (_arg2.x - _arg1.x)) + ((_arg2.y - _arg1.y) * (_arg2.y - _arg1.y))))); } public static function distanceX(_arg1:DisplayObject, _arg2:DisplayObject):Number{ return ((_arg1.x - _arg2.x)); } public static function distanceXP(_arg1:Point, _arg2:Point):Number{ return ((_arg1.x - _arg2.x)); } public static function distanceY(_arg1:DisplayObject, _arg2:DisplayObject):Number{ return ((_arg1.y - _arg2.y)); } public static function angle(_arg1:DisplayObject, _arg2:DisplayObject):Number{ return (((Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)) * 180) / Math.PI)); } public static function angleP(_arg1:Point, _arg2:Point):Number{ return (((Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)) * 180) / Math.PI)); } public static function toPositive(_arg1:Number):Number{ var _local2:Number; if (_arg1 <= 0){ _local2 = -(_arg1); } else { _local2 = _arg1; }; return (_local2); } public static function showDisplayObject(_arg1:MovieClip):void{ var _local2:Number = 0; while (_local2 < _arg1.numChildren) { trace(((((_local2 + "---->") + _arg1.getChildAt(_local2)) + "------->name:------>") + _arg1.getChildAt(_local2).name)); _local2++; }; } public static function MLocalToGlobal(_arg1:DisplayObject):Point{ var _local2:Point; var _local3:Point = new Point(_arg1.x, _arg1.y); _local2 = _arg1.parent.localToGlobal(_local3); return (_local2); } public static function MGlobalToLocal(_arg1:DisplayObject, _arg2:DisplayObject):Point{ var _local3:Point; var _local4:Point = new Point(_arg1.x, _arg1.y); _local3 = _arg2.globalToLocal(_local4); return (_local3); } public static function swapIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject, _arg3:DisplayObject):void{ if (_arg1.getChildIndex(_arg2) < _arg1.getChildIndex(_arg3)){ _arg1.swapChildren(_arg2, _arg3); }; } public static function clearWorld():void{ var _local1:b2Body = mainVar._world.GetBodyList(); while (_local1) { mainVar.world.DestroyBody(_local1); _local1 = _local1.GetNext(); }; mainVar._world = null; } public static function mouseObjFollow(_arg1:Point){ mouseObj.x = _arg1.x; mouseObj.y = _arg1.y; } public static function clearDrawLine():void{ var _local1:Number; if (mainVar.lastMoveLineArray.length > 0){ _local1 = 0; while (_local1 < mainVar.lastMoveLineArray.length) { mainVar._view.removeChild(mainVar.lastMoveLineArray[_local1]); _local1++; }; mainVar.lastMoveLineArray = []; }; } public static function setAsButton(_arg1:EventDispatcher):void{ _arg1.addEventListener(MouseEvent.MOUSE_OVER, btn_over); _arg1.addEventListener(MouseEvent.MOUSE_OUT, btn_out); } private static function btn_over(_arg1:MouseEvent):void{ TweenLite.to(_arg1.target, 0.2, {scaleX:1.1, scaleY:1.02}); } private static function btn_out(_arg1:MouseEvent):void{ trace(1); TweenLite.to(_arg1.target, 0.2, {scaleX:1, scaleY:1}); } public static function removeButton(_arg1:EventDispatcher):void{ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, btn_over); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, btn_out); } public static function initData():void{ _world = null; currentScore = 0; totalScore = 0; isJump = false; worldB = 10000; languageSelected = "EN"; isMouseDown = false; canMoveScreen = true; canMoveLeft = true; canMoveRight = true; isDraged = false; isExped = true; ropeColor = 2826252; isShot = false; canDrag = true; canDrawMoveLine = false; BOS = 0; isFirstDrawLine = true; currentMousePoint = new Point(0, 0); canShot = false; isDown = false; moveDis = 300; shouldFollow = true; GAME_STATIC = "ready"; GAME_RESULT = "normal"; isGameEnd = false; canMoveBack = false; isBirdStatic = true; reportScoreBird = 0; } } }//package main
Section 158
//MyEvent (main.MyEvent) package main { import flash.events.*; public class MyEvent extends Event { private var _object:Object; public function MyEvent(_arg1:String, _arg2:Object):void{ super(_arg1); _object = _arg2; } public function get param():Object{ return (_object); } } }//package main
Section 159
//role (main.role) package main { import flash.display.*; import flash.events.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import com.greensock.*; import item.*; public class role extends EventDispatcher { protected var _body:b2Body; protected var _role:DisplayObject; public var score:Number;// = 0 public var isRemove:Boolean;// = false public var isShell:Boolean;// = false public var ifBroken:Boolean;// = false public var temp:Number; public var b2Hp:Number; public var b2CHp:Number; public var isBinding:Boolean;// = true public function role(_arg1:b2Body, _arg2:DisplayObject){ _body = _arg1; _body.SetUserData(this); _role = _arg2; _role.cacheAsBitmap = true; if ((this is pigBox)){ if (!isNaN(pig(_arg2)._hp)){ b2Hp = pig(_arg2)._hp; b2CHp = b2Hp; }; }; if ((this is box)){ if (!isNaN(itemA(_arg2)._hp)){ b2Hp = itemA(_arg2)._hp; b2CHp = b2Hp; }; }; if ((this is roundItem)){ if (!isNaN(itemA(_arg2)._hp)){ b2Hp = itemA(_arg2)._hp; b2CHp = b2Hp; }; }; update(); if (!isShell){ }; } public function update():void{ _role.x = (_body.GetPosition().x * mainVar.RATIO); _role.y = (_body.GetPosition().y * mainVar.RATIO); if (isBinding){ temp = Math.floor(((_body.GetAngle() * 180) / Math.PI)); if ((((temp < 360)) && ((temp >= 0)))){ _role.rotation = temp; } else { if (temp >= 360){ _role.rotation = (temp % 360); } else { if ((((temp > -360)) && ((temp < 0)))){ _role.rotation = temp; } else { if (temp <= -360){ _role.rotation = (temp % 360); }; }; }; }; }; } public function mainUpdate():void{ if (!_body.IsStatic()){ update(); }; childUpdate(); } public function childUpdate():void{ } public function destroy():void{ if (!isRemove){ isRemove = true; TweenLite.to(_role, 0.01, {onComplete:safe}); }; } public function hit(_arg1:role, _arg2:b2ContactPoint):void{ } public function hitNo(_arg1:b2ContactPoint):void{ } private function cleanUp():void{ } public function getBody():b2Body{ return (_body); } public function getSprite():DisplayObject{ return (_role); } public function safe():void{ try { if (_role){ _role.parent.removeChild(_role); }; if (_body){ mainVar.world.DestroyBody(_body); }; } catch(e:Error) { }; } private function realRemove():void{ } public static function distance(_arg1:role, _arg2:role):Number{ return (Math.sqrt((((_arg2.getSprite().x - _arg1.getSprite().x) * (_arg2.getSprite().x - _arg1.getSprite().x)) + ((_arg2.getSprite().y - _arg1.getSprite().y) * (_arg2.getSprite().y - _arg1.getSprite().y))))); } } }//package main
Section 160
//screenControl (main.screenControl) package main { import flash.display.*; public class screenControl extends Sprite { public var LEFT:Number; public var RIGHT:Number; public var UP:Number; public var DOWN:Number; public var WIDTH:Number;// = 300 public function screenControl(_arg1:Number=0, _arg2:Number=800, _arg3:Number=0, _arg4:Number=555){ LEFT = _arg1; RIGHT = _arg2; UP = _arg3; DOWN = _arg4; } public function beginControl():void{ if (mainVar.canMoveScreen){ if ((((mouseX <= (LEFT + WIDTH))) && (mainVar.canMoveRight))){ mainVar._view.moveRight(Math.abs((WIDTH / (mouseX - LEFT)))); } else { if ((((mouseX >= (RIGHT - WIDTH))) && (mainVar.canMoveLeft))){ mainVar._view.moveLeft(Math.abs((WIDTH / (RIGHT - mouseX)))); }; }; if (mouseY <= (UP + WIDTH)){ } else { if (mouseY >= (DOWN - WIDTH)){ }; }; }; } } }//package main
Section 161
//soundControl (main.soundControl) package main { import flash.media.*; import flash.utils.*; public class soundControl { public var sound:Sound; public var soundChannel:SoundChannel; public var soundTransform:SoundTransform; public var isSound:Boolean;// = false public var soundItem:Object; public function soundControl(){ soundItem = []; super(); } public static function play_sound(_arg1:String, _arg2:Boolean=false):void{ var _local3:Class; if (_arg1 != null){ if (!SoundObject.playSound(_arg1, 0, _arg2)){ _local3 = (getDefinitionByName(_arg1) as Class); if (null != _local3){ SoundObject.pushSound(_arg1, _local3); } else { trace("没有找到声音链接,错误引发ControlSound"); }; }; }; } public static function play_music(_arg1:String):void{ var _local2:Class; if (_arg1 != null){ if (!SoundObject.playMusic(_arg1)){ _local2 = (getDefinitionByName(_arg1) as Class); if (_local2 != null){ SoundObject.pushSound(_arg1, _local2, false); } else { throw (new Error("没有找到声音链接,错误引发ControlSound")); }; SoundObject.playMusic(_arg1); }; }; } } }//package main
Section 162
//SoundObject (main.SoundObject) package main { import flash.events.*; import flash.media.*; public class SoundObject { private static var soundClass:Array = []; private static var soundChannelStopData:Array = []; private static var soundChannel:Array; private static var sound_total:int = 10; private static var sound_index:int = 0; private static var sound_holds:int = 4; private static var sound:Array; private static var sound_volume:SoundTransform = new SoundTransform(); private static var musicChannelStopData:Array = []; private static var musicChannel:Array; private static var music_total:int = 1; private static var music_index:int = 0; private static var music:Array; private static var music_volume:SoundTransform = new SoundTransform(); private static var actionSound:Sound; private static var actionSoundChannel:SoundChannel; public static var finished:Boolean = true; public static function clear():Boolean{ var _local1:Boolean; stopMusic(); stopSound(); soundChannelStopData = []; soundChannel = null; musicChannelStopData = []; musicChannel = null; return (_local1); } public static function playSound(_arg1:String, _arg2:Number=0, _arg3:Boolean=false):Boolean{ var _local4:int; var _local5:int; var _local6:int; var _local7:int; if (!soundChannel){ creatSound(); }; var _local8:int = SoundObject.index_result(soundChannel, _arg1, 0); if (_local8 < 0){ _local8 = SoundObject.index_result(soundClass, _arg1, 0); if (_local8 >= 0){ _local4 = 1; while (_local4 <= sound_holds) { if (soundChannel[sound_index][_local4]){ soundChannel[sound_index][_local4].stop(); }; soundChannel[sound_index][_local4] = null; _local4++; }; sound[sound_index] = new (soundClass[_local8][1]); if ((Math.round((sound[sound_index].length * 100)) / 100) != (Math.round((_arg2 * 100)) / 100)){ soundChannel[sound_index][0] = soundClass[_local8][0]; soundChannel[sound_index][1] = sound[sound_index].play(_arg2); if (soundChannel[sound_index][1]){ soundChannel[sound_index][1].soundTransform = sound_volume; }; setSoundIndex(); return (true); }; soundChannel[sound_index][0] = null; sound[sound_index] = null; return (false); }; } else { _local5 = 0; _local6 = 1; _local7 = 0; if (_arg3){ _local4 = 1; while (_local4 <= sound_holds) { if (soundChannel[_local8][_local4]){ soundChannel[_local8][_local4].stop(); }; _local4++; }; }; _local5 = SoundObject.index_result(soundClass, _arg1, 0); sound[_local8] = new (soundClass[_local5][1]); if ((Math.round((sound[_local8].length * 100)) / 100) >= (Math.round((_arg2 * 100)) / 100)){ _local4 = 1; while (_local4 <= sound_holds) { if (!soundChannel[_local8][_local4]){ soundChannel[_local8][_local4] = sound[_local8].play(_arg2); if (soundChannel[_local8][_local4]){ soundChannel[_local8][_local4].soundTransform = sound_volume; }; return (true); }; if (_local7 < soundChannel[_local8][_local4].position){ _local7 = soundChannel[_local8][_local4].position; _local6 = _local4; }; _local4++; }; soundChannel[_local8][_local6].stop(); soundChannel[_local8][_local6] = sound[_local8].play(_arg2); if (soundChannel[_local8][_local6]){ soundChannel[_local8][_local6].soundTransform = sound_volume; }; return (true); }; _local4 = 0; while (_local4 <= sound_holds) { soundChannel[_local8][_local4] = null; _local4++; }; sound[_local8] = null; }; return (false); } public static function soundvolume(_arg1:Number=1, _arg2:Number=0):Boolean{ if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){ sound_volume = new SoundTransform(_arg1, _arg2); soundvalume_change(); return (true); }; return (false); } public static function get sound_volume_val():Number{ return (sound_volume.volume); } private static function soundvalume_change():Boolean{ var _local1:int; var _local2:int; if (!soundChannel){ creatSound(); return (false); }; while (_local2 < soundChannel.length) { _local1 = 1; while (_local1 <= sound_holds) { if ((soundChannel[_local2][_local1] is SoundChannel)){ soundChannel[_local2][_local1].soundTransform = sound_volume; }; _local1++; }; _local2++; }; return (true); } private static function soundEvent(_arg1:Event):void{ var _local2:int; var _local3:int; _arg1.target.removeEventListener(Event.SOUND_COMPLETE, soundEvent); while (_local3 < soundChannel.length) { _local2 = 1; while (_local2 <= sound_holds) { if (musicChannel[_local3][_local2] == _arg1.target){ playMusic(musicChannel[_local3][_local2]); }; _local2++; }; _local3++; }; } public static function stopSound():Boolean{ var _local1:int; var _local2:int; creatSoundStop(); if (!soundChannel){ return (false); }; _local2 = 0; while (_local2 < soundChannel.length) { _local1 = 1; while (_local1 <= sound_holds) { if ((((soundChannel[_local2][_local1] is SoundChannel)) && (!((soundChannel[_local2][_local1].position == 0))))){ soundChannelStopData[_local2][0] = soundChannel[_local2][0]; soundChannelStopData[_local2][_local1] = soundChannel[_local2][_local1].position; soundChannel[_local2][_local1].stop(); }; soundChannel[_local2][_local1] = null; _local1++; }; soundChannel[_local2][0] = null; _local2++; }; SoundMixer.stopAll(); return (true); } public static function resumeSound():Boolean{ var _local1:int; var _local2:int; if (!soundChannel){ return (false); }; _local2 = 0; while (_local2 < soundChannelStopData.length) { _local1 = 1; while (_local1 <= sound_holds) { if (soundChannelStopData[_local2][_local1] != null){ playSound(soundChannelStopData[_local2][0], (soundChannelStopData[_local2][_local1] + 200)); soundChannelStopData[_local2][_local1] = null; }; _local1++; }; soundChannelStopData[_local2][0] = null; _local2++; }; return (true); } private static function creatSound():void{ var _local1:int; soundChannel = []; sound = []; while (_local1 < sound_total) { soundChannel.push([null, null, null]); sound.push(null); _local1++; }; } private static function creatSoundStop():void{ var _local1:int; soundChannelStopData = []; while (_local1 < sound_total) { soundChannelStopData.push([null, null, null]); _local1++; }; } public static function playMusic(_arg1:String, _arg2:Number=0, _arg3:Boolean=false):Boolean{ if (!musicChannel){ creatMusic(); }; var _local4:int = SoundObject.index_result(musicChannel, _arg1, 0); if (_local4 < 0){ _local4 = SoundObject.index_result(soundClass, _arg1, 0); if (_local4 >= 0){ music[music_index] = new (soundClass[_local4][1]); if (musicChannel[music_index][1]){ musicChannel[music_index][1].stop(); }; musicChannel[music_index][0] = soundClass[_local4][0]; musicChannel[music_index][1] = music[music_index].play(_arg2); if (musicChannel[music_index][1]){ musicChannel[music_index][1].soundTransform = music_volume; }; musicChannel[music_index][1].addEventListener(Event.SOUND_COMPLETE, musicEvent); setMusicIndex(); return (true); }; } else { musicChannel[_local4][1].stop(); musicChannel[_local4][1] = music[_local4].play(_arg2); if (musicChannel[_local4][1]){ musicChannel[_local4][1].soundTransform = music_volume; }; musicChannel[_local4][1].addEventListener(Event.SOUND_COMPLETE, musicEvent); return (true); }; return (false); } public static function musicvolume(_arg1:Number=1, _arg2:Number=0):Boolean{ if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){ music_volume = new SoundTransform(_arg1, _arg2); musicvalume_change(); return (true); }; return (false); } public static function get music_volume_val():Number{ return (music_volume.volume); } private static function musicvalume_change():Boolean{ var _local1:int; if (!musicChannel){ creatMusic(); return (false); }; while (_local1 < musicChannel.length) { if ((musicChannel[_local1][1] is SoundChannel)){ musicChannel[_local1][1].soundTransform = music_volume; }; _local1++; }; return (true); } private static function musicEvent(_arg1:Event):void{ var _local2:int; _arg1.target.removeEventListener(Event.SOUND_COMPLETE, musicEvent); while (_local2 < musicChannel.length) { if (musicChannel[_local2][1] == _arg1.target){ playMusic(musicChannel[_local2][0]); }; _local2++; }; } public static function stopMusic():Boolean{ var _local1:int; if (!musicChannel){ return (false); }; _local1 = 0; while (_local1 < musicChannel.length) { if ((((musicChannel[_local1][1] is SoundChannel)) && (!((musicChannel[_local1][1].position == 0))))){ musicChannelStopData[_local1][0] = musicChannel[_local1][0]; musicChannelStopData[_local1][1] = musicChannel[_local1][1].position; musicChannel[_local1][1].removeEventListener(Event.SOUND_COMPLETE, musicEvent); musicChannel[_local1][1].stop(); }; _local1++; }; return (true); } public static function resumeMusic():Boolean{ var _local1:int; if (!musicChannel){ return (false); }; _local1 = 0; while (_local1 < musicChannelStopData.length) { if (musicChannelStopData[_local1][1] != null){ SoundObject.playMusic(musicChannelStopData[_local1][0], musicChannelStopData[_local1][1]); musicChannelStopData[_local1][1] = null; musicChannelStopData[_local1][0] = null; }; _local1++; }; return (true); } private static function creatMusic():void{ var _local1:int; musicChannel = []; music = []; while (_local1 < music_total) { musicChannel.push([null, null]); musicChannelStopData.push([null, null]); music.push(null); _local1++; }; } public static function completeSound(_arg1:Class):Boolean{ finished = false; actionSound = new (_arg1); actionSoundChannel = actionSound.play(); actionSoundChannel.addEventListener(Event.SOUND_COMPLETE, completeHD); return (true); } private static function completeHD(_arg1:Event):void{ actionSoundChannel.removeEventListener(Event.SOUND_COMPLETE, completeHD); finished = true; } public static function pushSounds(... _args):void{ var _local2:int; while (_local2 < _args.length) { pushSound(_args[_local2][0], _args[_local2][1], false); _local2++; }; } public static function pushSound(_arg1:String, _arg2:Class, _arg3:Boolean=true):void{ soundClass.push([_arg1, _arg2]); if (_arg3){ SoundObject.playSound(_arg1); }; } private static function index_result(_arg1:Array, _arg2:String, ... _args):int{ var _local4:Array; var _local5:int; var _local6:int; if (!each_type(_args, "number")){ return (-2); }; _local5 = 0; while (_local5 < _arg1.length) { _local4 = _arg1[_local5]; _local6 = 0; while (_local6 < _args.length) { if (_local6 == (_args.length - 1)){ if (_local4[_args[_local6]] == _arg2){ return (_local5); }; } else { if ((_local4 is Array)){ _local4 = _local4[_args[_local6]]; } else { return (-3); }; }; _local6++; }; if (_arg1[_local5] == _arg2){ return (_local5); }; _local5++; }; return (-1); } private static function each_type(_arg1:Array, _arg2:String):Boolean{ var _local3:int; while (_local3 < _arg1.lengt) { if (typeof(_arg1[_local3]) != _arg2){ return (false); }; _local3++; }; return (Boolean(_arg1.length)); } private static function setSoundIndex():void{ sound_index = (sound_index + 1); if (sound_index >= sound_total){ sound_index = 0; }; } private static function setMusicIndex():void{ music_index = (music_index + 1); if (music_index >= music_total){ music_index = 0; }; } } }//package main
Section 163
//view (main.view) package main { import flash.display.*; import flash.geom.*; import flash.events.*; import com.greensock.*; public class view extends Sprite { public var rate:Number;// = 130 public var speedMax:Number;// = 15 public var easing:Number;// = 0.05 public var dis:Number;// = 300 public var pointSpeed:Point; var t:Number; public static var boundTop:Number = 180; public static var boundBottom:Number = 220; public static var boundLeft:Number = 180; public static var boundRight:Number = 370; public static var zoomSize:Number = 3; public static var size:Number = 1.5; public function view(){ pointSpeed = new Point(0, 0); super(); this.scaleX = size; this.scaleY = size; } public function drag(_arg1:MouseEvent):void{ mainVar.mouse2.gotoAndStop(2); mainVar.moveDis = 0; if (!(_arg1.target is functionReactor)){ mainVar.isClicked = true; }; mainVar.mouse1.gotoAndStop(2); mainVar.isMouseDown = true; if (mainVar.canDrag){ this.startDrag(false, new Rectangle((-300 * view.size), (-142 * view.size), (800 * view.size), (0 * view.size))); }; } public function released(_arg1:MouseEvent):void{ mainVar.mouse2.gotoAndStop(1); mainVar.mouse1.gotoAndStop(1); mainVar.isMouseDown = false; this.stopDrag(); mainVar.stopOneFrame = 2; mainVar.canMoveScreen = true; } public function clicked(_arg1:MouseEvent):void{ mainVar.isMouseDown = true; mainVar.canMoveScreen = false; } public function moveLeft(_arg1:Number):void{ this.x = (this.x - speedLimit(_arg1)); stage.dispatchEvent(new MyEvent("goLeft", {a:speedLimit(_arg1)})); } public function moveRight(_arg1:Number):void{ this.x = (this.x + speedLimit(_arg1)); stage.dispatchEvent(new MyEvent("goRight", {a:speedLimit(_arg1)})); } public function moveUp(_arg1:Number, _arg2:Number):void{ this.y = (this.y - ((_arg1 * _arg2) / rate)); } public function moveDown(_arg1:Number, _arg2:Number):void{ this.y = (this.y + ((_arg1 * _arg2) / rate)); } public function zoomIn(_arg1:Point, _arg2:Number):void{ var _local3:int = ((stage.stageWidth / 2) - (_arg1.x * _arg2)); var _local4:int = ((stage.stageHeight / 2) - (_arg1.y * _arg2)); TweenLite.to(this, 0.5, {x:_local3, y:_local4, scaleX:_arg2, scaleY:_arg2}); size = _arg2; } public function zoomOut(_arg1:Point, _arg2:Number):void{ var _local3:int = ((stage.stageWidth / 2) - (_arg1.x * _arg2)); var _local4:int = ((stage.stageHeight / 2) - (_arg1.y * _arg2)); TweenLite.to(this, 3, {x:_local3, y:_local4, scaleX:_arg2, scaleY:_arg2, onComplete:canDragNow}); size = _arg2; } private function canDragNow():void{ mainVar._view.zoomIn(mainVar._pm, 2); mainVar.canDrag = true; } public function getPositionNow(_arg1:Point):void{ TweenLite.to(this, 0.2, {x:((stage.stageWidth / 2) - (_arg1.x * size)), y:((stage.stageHeight / 2) - (_arg1.y * size))}); } public function getPosition_Weak(_arg1:Point, _arg2:Number, _arg3:Function=null):void{ if (_arg3 != null){ TweenLite.to(this, _arg2, {x:((stage.stageWidth / 2) - (_arg1.x * size)), onComplete:_arg3}); pointSpeed = _arg1; } else { TweenLite.to(this, _arg2, {x:((stage.stageWidth / 2) - (_arg1.x * size))}); pointSpeed = _arg1; }; } public function shake(){ TweenLite.to(this, 0.05, {x:(this.x - 30), onComplete:shakeBack}); } private function shakeBack():void{ TweenLite.to(this, 0.05, {x:(this.x + 30)}); mainVar.isShot = false; } public function speedLimit(_arg1:Number):Number{ if (Math.abs(_arg1) > speedMax){ return (speedMax); }; return (_arg1); } public function moveTo(_arg1:Point):void{ if (mainVar.moveDis > 0){ this.x = (this.x - (mainVar.moveDis * easing)); mainVar.moveDis = (mainVar.moveDis - 5); }; } } }//package main
Section 164
//MyData (MyClass.MyData) package MyClass { import flash.utils.*; public class MyData { public static function clone(_arg1:Object):Object{ var _local2:ByteArray = new ByteArray(); _local2.writeObject(_arg1); _local2.position = 0; return (_local2.readObject()); } public static function random(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; if (_arg1 >= _arg2){ _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; }; _local3 = (_arg1 + Math.floor((Math.random() * ((_arg2 - _arg1) + 1)))); return (_local3); } } }//package MyClass
Section 165
//MyPoint (MyClass.MyPoint) package MyClass { import flash.display.*; import flash.geom.*; public class MyPoint extends Point { public static function MLocalToGlobal(_arg1:DisplayObject):Point{ var _local2:Point; var _local3:Point = new Point(_arg1.x, _arg1.y); _local2 = _arg1.parent.localToGlobal(_local3); return (_local2); } public static function MGlobalToLocal(_arg1:DisplayObject, _arg2:DisplayObject):Point{ var _local3:Point; var _local4:Point = new Point(_arg1.x, _arg1.y); _local3 = _arg2.globalToLocal(_local4); return (_local3); } public static function distance(_arg1, _arg2):Number{ return (Math.sqrt((((_arg2.x - _arg1.x) * (_arg2.x - _arg1.x)) + ((_arg2.y - _arg1.y) * (_arg2.y - _arg1.y))))); } } }//package MyClass
Section 166
//NumberObject (universals.gus.NumberObject) package universals.gus { import flash.geom.*; public class NumberObject { public static function intToArray(_arg1:int, _arg2:int=0):Array{ var _local4:int; var _local3:Array = []; _arg1 = Math.round(_arg1); while (_local4 < _arg2) { _local3.push((_arg1 % 10)); _arg1 = int((_arg1 / 10)); _local4++; }; return (_local3); } public static function sign(_arg1:Number):int{ var _local2:* = 1; if (_arg1 < 0){ _local2 = -1; }; return (_local2); } public static function angleTo360(_arg1:Number, _arg2:Boolean=true):Number{ var _local3:Number; if (_arg2){ if (_arg1 >= 0){ _local3 = (_arg1 % 360); } else { _local3 = ((180 + (_arg1 % 360)) + 180); }; } else { if (_arg1 <= 0){ _local3 = (_arg1 % 360); } else { _local3 = (-180 + (-180 + (_arg1 % 360))); }; }; return (_local3); } public static function distance(_arg1:Point, _arg2:Point):Number{ var _local3:Number = 0; _local3 = (Math.pow((_arg1.x - _arg2.x), 2) + Math.pow((_arg1.y - _arg2.y), 2)); _local3 = Math.sqrt(_local3); return (_local3); } public static function distance_ellipse(_arg1:Number, _arg2:Number, _arg3:Number):Number{ var _local4:Number = 0; var _local5:Point = new Point(); _local5.x = (Math.cos(angleToRadian(_arg1)) * _arg2); _local5.y = (Math.sin(angleToRadian(_arg1)) * _arg3); _local4 = distance(new Point(0, 0), _local5); return (_local4); } public static function pointToAngle(_arg1:Point):Number{ var _local2:Number = 0; _local2 = ((Math.atan2(_arg1.y, _arg1.x) / Math.PI) * 180); return (_local2); } public static function angleToRadian(_arg1:Number):Number{ var _local2:Number = 0; _local2 = ((_arg1 * Math.PI) / 180); return (_local2); } public static function isIn(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Boolean; _local4 = (((_arg1 <= _arg3)) && ((_arg1 >= _arg2))); return (_local4); } public static function getNumBySpeedAdd(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number = _arg1; _local5 = (_local5 + _arg4); if (_local5 > _arg2){ _local5 = _arg2; }; if (_local5 < _arg3){ _local5 = _arg3; }; return (_local5); } public static function angleByPoint3(_arg1:Point, _arg2:Point, _arg3:Point):Number{ if (Math.abs((angleBy360(new Point((_arg1.x - _arg3.x), (_arg1.y - _arg3.y))) - angleBy360(new Point((_arg2.x - _arg3.x), (_arg2.y - _arg3.y))))) <= 180){ return (Math.abs((angleBy360(new Point((_arg1.x - _arg3.x), (_arg1.y - _arg3.y))) - angleBy360(new Point((_arg2.x - _arg3.x), (_arg2.y - _arg3.y)))))); }; return ((360 - Math.abs((angleBy360(new Point((_arg1.x - _arg3.x), (_arg1.y - _arg3.y))) - angleBy360(new Point((_arg2.x - _arg3.x), (_arg2.y - _arg3.y))))))); } public static function angleBy360(_arg1:Point):Number{ if (((Math.atan2(_arg1.y, _arg1.x) * 180) / Math.PI) >= 0){ return (((Math.atan2(_arg1.y, _arg1.x) * 180) / Math.PI)); }; return ((360 + ((Math.atan2(_arg1.y, _arg1.x) * 180) / Math.PI))); } public static function distanceXY(_arg1:Number, _arg2:Number, _arg3:Number=NaN, _arg4:Number=NaN):Number{ if (((!(isNaN(_arg3))) && (!(isNaN(_arg3))))){ if (_arg3 < _arg4){ throw (new Error("最低值高于最小值")); }; }; var _local5:Number = Math.sqrt((Math.pow(_arg1, 2) + Math.pow(_arg2, 2))); if (!isNaN(_arg3)){ if (_local5 > _arg3){ _local5 = _arg3; }; }; if (!isNaN(_arg4)){ if (_local5 < _arg4){ _local5 = _arg4; }; }; return (_local5); } public static function addNM(_arg1:Number, _arg2:Number, _arg3:Number=1):Number{ var _local4:Number = 0; if ((_arg1 + _arg3) < _arg1){ throw (new Error()); }; while (_arg1 <= _arg2) { _local4 = (_local4 + _arg1); _arg1 = (_arg1 + _arg3); }; return (_local4); } public static function getAToBTimes(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1):Number{ var _local6:Number = 1; if ((_arg3 + _arg5) < _arg3){ throw (new Error()); }; while (Math.abs((_arg1 - _arg2)) > _arg3) { if (_arg3 <= _arg4){ _arg3 = (_arg3 + _arg5); }; _arg1 = (_arg1 + _arg3); _local6++; }; return (_local6); } public static function random(... _args):Number{ return (_args[Math.floor((Math.random() * _args.length))]); } } }//package universals.gus
Section 167
//E_blueFeather1 (E_blueFeather1) package { import flash.display.*; public dynamic class E_blueFeather1 extends MovieClip { } }//package
Section 168
//E_blueFeather2 (E_blueFeather2) package { import flash.display.*; public dynamic class E_blueFeather2 extends MovieClip { } }//package
Section 169
//E_frog1 (E_frog1) package { import flash.display.*; public dynamic class E_frog1 extends MovieClip { } }//package
Section 170
//E_glass1 (E_glass1) package { import flash.display.*; public dynamic class E_glass1 extends MovieClip { } }//package
Section 171
//E_glass2 (E_glass2) package { import flash.display.*; public dynamic class E_glass2 extends MovieClip { } }//package
Section 172
//E_glass3 (E_glass3) package { import flash.display.*; public dynamic class E_glass3 extends MovieClip { } }//package
Section 173
//E_glass4 (E_glass4) package { import flash.display.*; public dynamic class E_glass4 extends MovieClip { } }//package
Section 174
//E_glass5 (E_glass5) package { import flash.display.*; public dynamic class E_glass5 extends MovieClip { } }//package
Section 175
//E_redFeather1 (E_redFeather1) package { import flash.display.*; public dynamic class E_redFeather1 extends MovieClip { } }//package
Section 176
//E_redFeather2 (E_redFeather2) package { import flash.display.*; public dynamic class E_redFeather2 extends MovieClip { } }//package
Section 177
//E_stone1 (E_stone1) package { import flash.display.*; public dynamic class E_stone1 extends MovieClip { } }//package
Section 178
//E_stone2 (E_stone2) package { import flash.display.*; public dynamic class E_stone2 extends MovieClip { } }//package
Section 179
//E_stone3 (E_stone3) package { import flash.display.*; public dynamic class E_stone3 extends MovieClip { } }//package
Section 180
//E_wood1 (E_wood1) package { import flash.display.*; public dynamic class E_wood1 extends MovieClip { } }//package
Section 181
//E_wood2 (E_wood2) package { import flash.display.*; public dynamic class E_wood2 extends MovieClip { } }//package
Section 182
//E_wood3 (E_wood3) package { import flash.display.*; public dynamic class E_wood3 extends MovieClip { } }//package
Section 183
//E_yellowFeather1 (E_yellowFeather1) package { import flash.display.*; public dynamic class E_yellowFeather1 extends MovieClip { } }//package
Section 184
//E_yellowFeather2 (E_yellowFeather2) package { import flash.display.*; public dynamic class E_yellowFeather2 extends MovieClip { } }//package
Section 185
//functionReactor (functionReactor) package { import flash.display.*; public dynamic class functionReactor extends MovieClip { } }//package
Section 186
//game (game) package { import Box2D.Common.Math.*; import flash.display.*; import flash.geom.*; import flash.events.*; import com.greensock.*; import main.*; import item.*; import MyClass.*; import flash.utils.*; import flash.text.*; import effect.*; import display.*; import flash.ui.*; public class game extends MovieClip { public var g_enemy:MovieClip; public var menuI:MovieClip; public var guslevelmask:MovieClip; public var dis_fore:display_fore; public var report:TextField; public var g_bird:MovieClip; public var comic:MovieClip; public var btn_part4:MovieClip; public var m:MovieClip; public var btn_start:MovieClip; public var mc_loading:MovieClip; public var gusSelectLeft:SimpleButton; public var btn_fresh:MovieClip; public var dis_back:display_back; public var btn_part1:MovieClip; public var gusLevel:MovieClip; public var m2:MovieClip; public var mainMask:MovieClip; public var resultBoard:MovieClip; public var btn_part3:MovieClip; public var btn_returnToTop:SimpleButton; public var dis_middle:display_middle; public var gusSelectRight:SimpleButton; public var btn_part2:MovieClip; public var btn_gold:SimpleButton; public var weapon:MovieClip; public var btn_menu:MovieClip; public var outPoint:MovieClip; public var screen:screenControl; public var pm:Point; public var fps:FpsCounter; public var highCalculateTimer:Timer; public var winTimer:Timer; public var loadTimer:Timer; public var birdFunctionReactorTimer:Timer; public var freshCold:Number;// = 0 public var shotCold:Timer; public var itemArray:Array; private var _preMouseX:Number;// = 0 var followPos:Point; public function game(){ screen = new screenControl(); highCalculateTimer = new Timer(500); winTimer = new Timer(1000); loadTimer = new Timer(1000); birdFunctionReactorTimer = new Timer(30); shotCold = new Timer(5000); itemArray = []; followPos = new Point(0, 0); super(); stage.scaleMode = StageScaleMode.SHOW_ALL; addFrameScript(0, frame1); addFrameScript(1, frame2); addFrameScript(2, frame3); addFrameScript(3, frame4); addFrameScript(4, frame5); addFrameScript(5, frame6); addFrameScript(6, frame7); addFrameScript(24, frame25); } private function frame6():void{ stage.addEventListener(MouseEvent.CLICK, skipComic); } private function skipComic(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.CLICK, skipComic); nextFrame(); } private function frame5():void{ var _local1:Sprite = (getChildByName("gusLevel") as Sprite); var _local2:Number = _local1.numChildren; var _local3:Number = 0; _local3 = 0; while (_local3 < _local2) { if ((_local1.getChildAt(_local3) is Sprite)){ new mainBtn(_local1.getChildAt(_local3), levelSelect); }; _local3++; }; } private function levelSelect(_arg1:MouseEvent):void{ SoundObject.stopMusic(); var _local2:Number = Number(String(_arg1.target.name).slice(9)); if ((((_local2 == 1)) && ((mainVar.currentPart == 1)))){ mainVar.currentLevel = 1; nextFrame(); } else { mainVar.currentLevel = _local2; gotoAndStop(7); }; } private function frame4():void{ new mainBtn(btn_part1, part1F); new mainBtn(btn_part2, part2F); new mainBtn(btn_part3, part3F); new mainBtn(btn_part4, part4F); } private function part1F(_arg1:MouseEvent):void{ (mainVar.currentPart == 1); nextFrame(); } private function part2F(_arg1:MouseEvent):void{ (mainVar.currentPart == 2); nextFrame(); } private function part3F(_arg1:MouseEvent):void{ (mainVar.currentPart == 3); throw (new Error("暂时还没有开放")); } private function part4F(_arg1:MouseEvent):void{ (mainVar.currentPart == 4); throw (new Error("暂时还没有开放")); } private function frame3():void{ new mainBtn(btn_start, startToSelect); soundControl.play_music("music_main"); } private function startToSelect(_arg1:MouseEvent):void{ nextFrame(); } private function frame7():void{ initGame(); new mainBtn(btn_fresh, freshGame); new mainBtn(btn_menu, showMenu); } private function frame25():void{ } public function initGame():void{ SoundObject.stopMusic(); SoundObject.stopSound(); soundControl.play_sound("sound_start"); soundControl.play_music("music_back"); mainVar.GAME_RESULT = ""; mainVar.isGamePaused = false; mainVar.isGameEnd = false; mainVar.isCollide = false; mainVar.canDrag = false; mainVar._view = new view(); swapChildren(mc_loading, getChildAt((numChildren - 1))); m.visible = false; m2.visible = false; mc_loading.visible = true; Mouse.hide(); mainVar.bodyArray = []; mainVar.moveLineArray = []; mainVar.lastMoveLineArray = []; mainVar.shotBirdArray = []; mainVar.shotBirdTypeArray = []; mainVar.itemArray = []; mainVar.pigNum = 0; mainVar.birdNum = 0; mainVar.lineSprite1 = new Sprite(); mainVar.lineSprite2 = new Sprite(); mainVar.BlockSprite = new blockSprite(); mainVar.lineSprite1.mouseEnabled = false; mainVar.lineSprite2.mouseEnabled = false; outPoint.visible = false; addChild(mainVar._view); addChild(menuI); menuI.mouseEnabled = false; resultBoard.mouseEnabled = false; resultBoard.mouseChildren = false; mainVar.swapIndex(this, resultBoard, mainVar._view); mainVar._view.addChild(weapon); mainVar._view.addChild(mainVar.lineSprite2); mainVar._view.addChild(mainVar.lineSprite1); mainVar.birdGroup = g_bird; mainVar.enemyGroup = g_enemy; mainVar._view.addChild(g_bird); mainVar._view.addChild(g_enemy); mainVar._view.mask = mainMask; mainVar.lineSprite1.mask = Sprite(mainVar._view.getChildByName("weapon")).getChildByName("lineMask1"); mainVar.lineSprite2.mask = Sprite(mainVar._view.getChildByName("weapon")).getChildByName("lineMask2"); mainVar.BlockSprite.mask = Sprite(mainVar._view.getChildByName("weapon")).getChildByName("blockMask"); mainVar.createWorld(); initItems(); var _local1:floor = new floor(mainVar._view, new Point(0, -300)); mainVar._view.addChild(dis_fore); pm = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.middle.x, weapon.middle.y))); mainVar._pm = pm; shotCold.stop(); sortShotBirdArray(); mainVar.shotBirdNum = mainVar.shotBirdArray.length; mainVar.viewCenter = new Point((mainVar.enemyGroup.x - mainVar.birdGroup.x), (mainVar.enemyGroup.y - mainVar.birdGroup.y)); mainVar.viewCenter = mainVar._view.globalToLocal(mainVar.viewCenter); mainVar._view.getPositionNow(new Point((pm.x + 500), pm.y)); weapon.lineClick.addEventListener(MouseEvent.MOUSE_DOWN, drawLine); stage.addEventListener(MouseEvent.MOUSE_DOWN, mainVar._view.drag, true); stage.addEventListener(MouseEvent.MOUSE_UP, mainVar._view.released); stage.addEventListener(Event.MOUSE_LEAVE, loseFocus); addEventListener(MouseEvent.MOUSE_MOVE, drawLine); addEventListener(MouseEvent.MOUSE_UP, drawLine, true); highCalculateTimer.addEventListener(TimerEvent.TIMER, highCalculate); highCalculateTimer.start(); addEventListener(Event.ENTER_FRAME, update); loadTimer.addEventListener(TimerEvent.TIMER, fadeLoad); loadTimer.start(); addChild(btn_fresh); btn_fresh.visible = true; btn_fresh.x = 94.3; addChild(btn_menu); btn_menu.visible = true; mainVar.scoreBoard = new displayScore(0); addChild(mainVar.scoreBoard); mainVar.scoreBoard.x = 900; mainVar.scoreBoard.y = 17; m.visible = true; m2.visible = true; addChild(m); m.mouseEnabled = false; m.mouseChildren = false; m2.mouseEnabled = false; m2.mouseChildren = false; mainVar.mouse1 = m; mainVar.mouse2 = m2; if (!shotCold.hasEventListener(TimerEvent.TIMER)){ shotCold.addEventListener(TimerEvent.TIMER, turnToFight); }; addChild(mc_loading); TweenLite.to(this, 3, {onComplete:wait}); } private function wait():void{ mainVar._view.getPosition_Weak(pm, 1, dragNow); } private function dragNow():void{ mainVar.canDrag = true; } private function loseFocus(_arg1:Event):void{ drawLine(new MouseEvent(MouseEvent.MOUSE_UP)); } private function showMenu(_arg1:MouseEvent):void{ if (mainVar.canDrag){ mainVar.swapIndex(this, menuI, mainVar._view); btn_fresh.visible = (btn_menu.visible = false); mainVar.isGamePaused = true; new mainBtn(menuI.menuI.btn_fresh, freshGame); new mainBtn(menuI.menuI.btn_menu, returnToSelect); new mainBtn(menuI.menuI.btn_index, gameIndex); new mainBtn(menuI.menuI.btn_cancel, hideMenu); new mainBtn(menuI.menuI.btn_cancel, hideMenu); new mainBtn(menuI.menuI.btn_sound, soundHandler); menuI.play(); }; } private function soundHandler(_arg1:MouseEvent):void{ if (mainVar.globalSound){ _arg1.target.gotoAndStop(2); mainVar.globalSound = false; SoundObject.soundvolume(0); SoundObject.musicvolume(0); } else { _arg1.target.gotoAndStop(1); mainVar.globalSound = true; SoundObject.soundvolume(1); SoundObject.musicvolume(1); }; } private function gameIndex(_arg1:MouseEvent):void{ SoundObject.stopMusic(); SoundObject.stopSound(); soundControl.play_music("music_main"); removeChild(m); removeChild(m2); removeChild(menuI); Mouse.show(); gameClear(); mainVar.initData(); gotoAndStop(3); } private function returnToSelect(_arg1:MouseEvent):void{ if (resultBoard){ removeChild(resultBoard); }; SoundObject.stopMusic(); SoundObject.stopSound(); soundControl.play_music("music_main"); btn_fresh.visible = (btn_menu.visible = false); removeChild(m); removeChild(m2); removeChild(menuI); Mouse.show(); gameClear(); mainVar.initData(); gotoAndStop(5); } private function hideMenu(_arg1:MouseEvent):void{ mainVar.isGamePaused = false; btn_fresh.visible = (btn_menu.visible = true); menuI.gotoAndPlay(7); } private function freshGame(_arg1:Event):void{ if (mainVar.canDrag){ menuI.gotoAndStop(1); if (freshCold == 0){ btn_fresh.visible = false; gameClear(); mainVar.initData(); initGame(); freshCold = 40; }; }; } public function gameClear():void{ resultBoard.alpha = 0; removeChild(mainVar._view); if (mainVar.scoreBoard){ removeChild(mainVar.scoreBoard); mainVar.scoreBoard = null; }; mainVar.clearWorld(); stage.removeEventListener(MouseEvent.MOUSE_DOWN, mainVar._view.drag, true); stage.removeEventListener(MouseEvent.MOUSE_UP, mainVar._view.released); removeEventListener(MouseEvent.MOUSE_MOVE, drawLine); removeEventListener(MouseEvent.MOUSE_UP, drawLine, true); highCalculateTimer.stop(); highCalculateTimer.removeEventListener(TimerEvent.TIMER, highCalculate); removeEventListener(Event.ENTER_FRAME, update); loadTimer.stop(); loadTimer.removeEventListener(TimerEvent.TIMER, fadeLoad); } private function fadeLoad(_arg1:TimerEvent):void{ loadTimer.stop(); loadTimer.removeEventListener(TimerEvent.TIMER, fadeLoad); mc_loading.visible = false; mc_loading.mouseEnabled = false; } private function draw(_arg1:MouseEvent):void{ trace(_arg1.target); } private function drawLine(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Point; var _local4:Point; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Point; var _local9:Number; var _local10:Number; var _local11:Number = 90; if ((((_arg1.type == "mouseDown")) && (mainVar.canShot))){ mainVar.GAME_STATIC = "prepare to shot"; m.gotoAndStop(2); mainVar.isMouseDown = true; mainVar._view.stopDrag(); _arg1.stopPropagation(); if (mainVar._view.getChildIndex(mainVar.lineSprite1) < mainVar._view.getChildIndex(mainVar.mouseObj)){ mainVar._view.swapChildren(mainVar.lineSprite1, mainVar.mouseObj); }; mainVar.isDraged = true; _local6 = mainVar.distanceP(new Point(mainVar._view.getChildByName("weapon").globalToLocal(new Point(mouseX, mouseY)).x, mainVar._view.getChildByName("weapon").globalToLocal(new Point(mouseX, mouseY)).y), new Point(Sprite(mainVar._view.getChildByName("weapon")).getChildByName("middle").x, Sprite(mainVar._view.getChildByName("weapon")).getChildByName("middle").y)); _local3 = mainVar._view.globalToLocal(new Point(mouseX, mouseY)); mainVar.mouseObjFollow(_local3); mainVar._view.addChild(mainVar.BlockSprite); mainVar.BlockSprite.visible = true; mainVar.BlockSprite.x = _local3.x; mainVar.BlockSprite.y = _local3.y; mainVar.BlockSprite.rotation = mainVar.angleP(_local3, pm); if (_local6 <= _local11){ if (_local6 <= _local11){ _local5 = (_local6 / _local11); } else { _local5 = 1; }; mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.lineSprite1.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); mainVar.lineSprite2.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); _local2 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line1.x, weapon.line1.y))); mainVar.lineSprite1.graphics.moveTo(_local2.x, _local2.y); _local3 = mainVar._view.globalToLocal(new Point(mouseX, mouseY)); mainVar.lineSprite1.graphics.lineTo(_local3.x, _local3.y); _local4 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line2.x, weapon.line2.y))); mainVar.lineSprite2.graphics.moveTo(_local4.x, _local4.y); mainVar.lineSprite2.graphics.lineTo(_local3.x, _local3.y); mainVar.lineSprite1.graphics.endFill(); mainVar.lineSprite2.graphics.endFill(); }; } else { if ((((_arg1.type == "mouseUp")) && (mainVar.isDraged))){ mainVar.isMouseDown = false; m.gotoAndStop(1); m2.gotoAndStop(1); _arg1.stopPropagation(); mainVar.stopOneFrame = 2; if (!mainVar.isShot){ if (mainVar._view.getChildIndex(mainVar.lineSprite1) > mainVar._view.getChildIndex(mainVar.mouseObj)){ mainVar._view.swapChildren(mainVar.lineSprite1, mainVar.mouseObj); }; }; mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.isDraged = false; _local3 = mainVar._view.globalToLocal(new Point(mouseX, mouseY)); if (mainVar.mouseObj){ }; if (mainVar.BlockSprite){ mainVar.BlockSprite.visible = false; }; _local6 = mainVar.distanceP(new Point(mainVar.mouseObj.x, mainVar.mouseObj.y), pm); if (_local6 <= _local11){ _local5 = (_local6 / _local11); } else { _local5 = 1; }; _local3 = mainVar._view.globalToLocal(new Point(mouseX, mouseY)); shotTheBird(new Point(mainVar.mouseObj.x, mainVar.mouseObj.y), mainVar.angleP(_local3, pm), new b2Vec2(((bird.birdSpeed * _local5) * Math.cos(((mainVar.angleP(_local3, pm) * Math.PI) / 180))), ((bird.birdSpeed * _local5) * Math.sin(((mainVar.angleP(_local3, pm) * Math.PI) / 180))))); }; }; if ((((_arg1.type == "mouseMove")) && (mainVar.isDraged))){ _local3 = mainVar._view.globalToLocal(new Point(mouseX, mouseY)); _local7 = mainVar.angleP(_local3, pm); _local6 = mainVar.distanceP(new Point(mainVar._view.getChildByName("weapon").globalToLocal(new Point(mouseX, mouseY)).x, mainVar._view.getChildByName("weapon").globalToLocal(new Point(mouseX, mouseY)).y), new Point(Sprite(mainVar._view.getChildByName("weapon")).getChildByName("middle").x, Sprite(mainVar._view.getChildByName("weapon")).getChildByName("middle").y)); if (_local6 <= _local11){ _local5 = (_local6 / _local11); } else { _local5 = 1; }; if (_local6 <= _local11){ if ((((_local7 <= -77)) && ((_local7 >= -120)))){ mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.lineSprite1.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); mainVar.lineSprite2.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); _local2 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line1.x, weapon.line1.y))); mainVar.lineSprite1.graphics.moveTo(_local2.x, _local2.y); _local8 = new Point((pm.x - (20 * Math.cos(((_local7 * Math.PI) / 180)))), (pm.y + (20 * Math.sin(((-(_local7) * Math.PI) / 180))))); mainVar.mouseObjFollow(_local8); mainVar.lineSprite1.graphics.lineTo(_local8.x, _local8.y); mainVar.BlockSprite.rotation = mainVar.angleP(_local8, pm); mainVar.BlockSprite.x = _local8.x; mainVar.BlockSprite.y = _local8.y; _local4 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line2.x, weapon.line2.y))); mainVar.lineSprite2.graphics.moveTo(_local4.x, _local4.y); mainVar.lineSprite2.graphics.lineTo(_local8.x, _local8.y); mainVar.lineSprite1.graphics.endFill(); mainVar.lineSprite2.graphics.endFill(); } else { mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.lineSprite1.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); mainVar.lineSprite2.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); _local2 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line1.x, weapon.line1.y))); mainVar.lineSprite1.graphics.moveTo(_local2.x, _local2.y); mainVar.mouseObjFollow(_local3); mainVar.lineSprite1.graphics.lineTo(_local3.x, _local3.y); mainVar.BlockSprite.rotation = mainVar.angleP(_local3, pm); mainVar.BlockSprite.x = _local3.x; mainVar.BlockSprite.y = _local3.y; _local4 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line2.x, weapon.line2.y))); mainVar.lineSprite2.graphics.moveTo(_local4.x, _local4.y); mainVar.lineSprite2.graphics.lineTo(_local3.x, _local3.y); mainVar.lineSprite1.graphics.endFill(); mainVar.lineSprite2.graphics.endFill(); }; } else { if ((((_local7 <= -77)) && ((_local7 >= -120)))){ mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.lineSprite1.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); mainVar.lineSprite2.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); _local2 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line1.x, weapon.line1.y))); mainVar.lineSprite1.graphics.moveTo(_local2.x, _local2.y); _local8 = new Point((pm.x - (20 * Math.cos(((_local7 * Math.PI) / 180)))), (pm.y + (20 * Math.sin(((-(_local7) * Math.PI) / 180))))); mainVar.mouseObjFollow(_local8); mainVar.lineSprite1.graphics.lineTo(_local8.x, _local8.y); mainVar.BlockSprite.rotation = mainVar.angleP(_local8, pm); mainVar.BlockSprite.x = _local8.x; mainVar.BlockSprite.y = _local8.y; _local4 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line2.x, weapon.line2.y))); mainVar.lineSprite2.graphics.moveTo(_local4.x, _local4.y); mainVar.lineSprite2.graphics.lineTo(_local8.x, _local8.y); mainVar.lineSprite1.graphics.endFill(); mainVar.lineSprite2.graphics.endFill(); } else { mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.lineSprite1.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); mainVar.lineSprite2.graphics.lineStyle(maxBold((5 / _local5)), mainVar.ropeColor); _local2 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line1.x, weapon.line1.y))); mainVar.lineSprite1.graphics.moveTo(_local2.x, _local2.y); _local9 = (_local3.y - pm.y); _local10 = (_local3.x - pm.x); mainVar.lineSprite1.graphics.lineTo((pm.x + ((_local10 * _local11) / _local6)), (pm.y + ((_local9 * _local11) / _local6))); _local4 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line2.x, weapon.line2.y))); mainVar.lineSprite2.graphics.moveTo(_local4.x, _local4.y); mainVar.BlockSprite.rotation = mainVar.angleP(_local3, pm); mainVar.BlockSprite.x = (pm.x + ((_local10 * _local11) / _local6)); mainVar.BlockSprite.y = (pm.y + ((_local9 * _local11) / _local6)); mainVar.mouseObjFollow(new Point((pm.x + ((_local10 * _local11) / _local6)), (pm.y + ((_local9 * _local11) / _local6)))); mainVar.lineSprite2.graphics.lineTo((pm.x + ((_local10 * _local11) / _local6)), (pm.y + ((_local9 * _local11) / _local6))); mainVar.lineSprite1.graphics.endFill(); mainVar.lineSprite2.graphics.endFill(); }; }; }; } private function shotTheBird(_arg1:Point, _arg2:Number, _arg3:b2Vec2):void{ shotCold.start(); mainVar.can = false; mainVar.birdNumOri--; mainVar.isClicked = false; mainVar.birdNumOnStage = 1; mainVar.lineTask = 1; mainVar.isFunction = false; mainVar.isExped = false; mainVar.isBirdStatic = false; mainVar.GAME_STATIC = "shot out bird"; mainVar.clearDrawLine(); mainVar.shouldFollow = true; mainVar.canShot = false; mainVar.moveDis = 300; mainVar.mouseObj.removeEventListener(MouseEvent.MOUSE_DOWN, drawLine); mainVar.isShot = true; if (mainVar.mouseObj.parent == mainVar._view){ mainVar._view.removeChild(mainVar.mouseObj); }; var _local4:* = new mainVar.onboardBirdClass(); if (mainVar.onboardBirdClass == birdRedSmall){ soundControl.play_sound("sound_red"); } else { if (mainVar.onboardBirdClass == birdYellowSmall){ soundControl.play_sound("sound_yellow"); } else { if (mainVar.onboardBirdClass == birdBlueSmall){ soundControl.play_sound("sound_blue"); }; }; }; mainVar._view.addChild(_local4); _local4.x = _arg1.x; _local4.y = _arg1.y; _local4.scaleX = 0.5; _local4.scaleY = 0.5; mainVar.shotOutBird = new birdBall(_local4, 0); MovieClip(mainVar.shotOutBird.getSprite()).gotoAndStop(2); mainVar.shotOutBird.setSpeed(_arg3); mainVar.shotOutBird.getSprite().mask = Sprite(mainVar._view.getChildByName("weapon")).getChildByName("birdOMask"); mainVar.bodyArray.push(mainVar.shotOutBird); mainVar.canDrawMoveLine = true; var _local5:Point = new Point(mainVar.shotOutBird.getSprite().x, mainVar.shotOutBird.getSprite().y); mainVar.tempMoveLinePoint = _local5; var _local6:MovieClip = new linePointB(); _local6.mouseEnabled = false; _local6.scaleX = (_local6.scaleY = 0.5); mainVar._view.addChild(_local6); _local6.x = mainVar.shotOutBird.getSprite().x; _local6.y = mainVar.shotOutBird.getSprite().y; mainVar.BOS = 1; mainVar.moveLineArray.push(_local6); if (mainVar.shotBirdArray.length == 0){ }; birdFunction(); birdFunctionReactorTimer.addEventListener(TimerEvent.TIMER, birdFunctionReactorTest); birdFunctionReactorTimer.start(); } private function birdFunctionReactorTest(_arg1:TimerEvent):void{ if (((mainVar.isCollide) && (mainVar.functionBoard))){ mainVar.isCollide = false; if (mainVar.functionBoard.hasEventListener(MouseEvent.MOUSE_DOWN)){ mainVar.functionBoard.removeEventListener(MouseEvent.MOUSE_DOWN, startBirdFunction); removeChild(mainVar.functionBoard); birdFunctionReactorTimer.stop(); birdFunctionReactorTimer.removeEventListener(TimerEvent.TIMER, birdFunctionReactorTest); }; }; } private function birdFunction():void{ if (mainVar.onboardBirdClass != birdRedSmall){ mainVar.functionBoard = new functionReactor(); addChild(mainVar.functionBoard); mainVar.functionBoard.x = (stage.stageWidth / 2); mainVar.functionBoard.y = (stage.stageHeight / 2); mainVar.functionBoard.addEventListener(MouseEvent.MOUSE_DOWN, startBirdFunction); }; } private function startBirdFunction(_arg1:MouseEvent):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:birdBlueSmall; var _local7:birdBlueSmall; var _local8:birdBlueSmall; var _local9:Number; var _local10:MovieClip = new E_frog1(); mainVar.moveLineArray.push(_local10); _local10.scaleX = (_local10.scaleY = 0.6); mainVar._view.addChild(_local10); _local10.x = mainVar.shotOutBird.getSprite().x; _local10.y = mainVar.shotOutBird.getSprite().y; _local10.mouseEnabled = false; if (mainVar.functionBoard.hasEventListener(MouseEvent.MOUSE_DOWN)){ mainVar.functionBoard.removeEventListener(MouseEvent.MOUSE_DOWN, startBirdFunction); removeChild(mainVar.functionBoard); mainVar.isFunction = true; }; if (mainVar.onboardBirdClass == birdBlueSmall){ mainVar.lineTask = 3; mainVar.birdNumOnStage = 3; _local2 = Math.atan2(mainVar.shotOutBird.getBody().GetLinearVelocity().y, mainVar.shotOutBird.getBody().GetLinearVelocity().x); _local3 = mainVar.shotOutBird.getBody().GetLinearVelocity().Length(); _local4 = ((10 * Math.PI) / 180); _local5 = 10; _local6 = new birdBlueSmall(); _local7 = new birdBlueSmall(); _local8 = new birdBlueSmall(); mainVar._view.addChild(_local6); mainVar._view.addChild(_local7); mainVar._view.addChild(_local8); _local6.x = (mainVar.shotOutBird.getSprite().x + (_local5 * Math.cos((_local2 + _local4)))); _local6.y = (mainVar.shotOutBird.getSprite().y + (_local5 * Math.sin((_local2 + _local4)))); _local7.x = (mainVar.shotOutBird.getSprite().x + (_local5 * Math.cos(_local2))); _local7.y = (mainVar.shotOutBird.getSprite().y + (_local5 * Math.sin(_local2))); _local8.x = (mainVar.shotOutBird.getSprite().x + (_local5 * Math.cos((_local2 - _local4)))); _local8.y = (mainVar.shotOutBird.getSprite().y + (_local5 * Math.sin((_local2 - _local4)))); _local6.scaleX = (_local6.scaleY = 0.5); _local7.scaleX = (_local7.scaleY = 0.5); _local8.scaleX = (_local8.scaleY = 0.5); mainVar.bird1 = new birdBall(_local6, 0); mainVar.bird2 = new birdBall(_local7, 0); mainVar.bird3 = new birdBall(_local8, 0); mainVar.canDrawMoveLine = true; mainVar.bird1.setSpeed(new b2Vec2((_local3 * Math.cos((_local2 + _local4))), (_local3 * Math.sin((_local2 + _local4))))); mainVar.bird2.setSpeed(new b2Vec2((_local3 * Math.cos(_local2)), (_local3 * Math.sin(_local2)))); mainVar.bird3.setSpeed(new b2Vec2((_local3 * Math.cos((_local2 - _local4))), (_local3 * Math.sin((_local2 - _local4))))); mainVar.bodyArray.push(mainVar.bird1); mainVar.bodyArray.push(mainVar.bird2); mainVar.bodyArray.push(mainVar.bird3); mainVar.shotOutBird.destroy(); mainVar.shotOutBird = mainVar.bird2; }; if (mainVar.onboardBirdClass == birdYellowSmall){ _local2 = Math.atan2(mainVar.shotOutBird.getBody().GetLinearVelocity().y, mainVar.shotOutBird.getBody().GetLinearVelocity().x); _local9 = 16; MovieClip(mainVar.shotOutBird.getSprite()).gotoAndStop(4); mainVar.shotOutBird.setSpeed(new b2Vec2((_local9 * Math.cos(_local2)), (_local9 * Math.sin(_local2)))); }; } private function moveToEnemyGroup():void{ report.text = (mainVar.isExped + ""); } private function drawMoveLine(_arg1:DisplayObject):void{ var _local2:MovieClip; var _local3:Number = 15; var _local4:Point = new Point(_arg1.x, _arg1.y); if (mainVar.distanceP(bird(_arg1).tempMoveLinePoint, _local4) >= _local3){ if (bird(_arg1).BOS == 0){ _local2 = new linePointB(); _local2.mouseEnabled = false; _local2.scaleX = (_local2.scaleY = 0.5); mainVar._view.addChild(_local2); _local2.x = bird(_arg1).tempMoveLinePoint.x; _local2.y = bird(_arg1).tempMoveLinePoint.y; bird(_arg1).BOS = 1; mainVar.moveLineArray.push(_local2); } else { _local2 = new linePointS(); _local2.mouseEnabled = false; _local2.scaleX = (_local2.scaleY = 0.5); mainVar._view.addChild(_local2); _local2.x = bird(_arg1).tempMoveLinePoint.x; _local2.y = bird(_arg1).tempMoveLinePoint.y; bird(_arg1).BOS = 0; mainVar.moveLineArray.push(_local2); }; bird(_arg1).tempMoveLinePoint = _local4; }; } private function getTheMin(_arg1:Number):Number{ if (_arg1 > 2){ return (2); }; return (_arg1); } public function maxBold(_arg1:Number):Number{ if (_arg1 >= 10){ return (10); }; return (_arg1); } private function initItems():void{ var _local1:Array; var _local2:Class; var _local3:Class; var _local4:*; var _local5:*; var _local6:Class; gameDriver.readFromGameDriver(this); gameDriver.init(mainVar.currentLevel, mainVar.currentPart); mainVar.birdNum = 0; mainVar.pigNum = 0; mainVar.birdNumOri = 0; var _local7:Number = 0; while (_local7 < gameDriver.gameItemArray.length) { _local1 = gameDriver.gameItemArray[_local7]; if (_local1[0] == "staticDisplay"){ _local6 = (getDefinitionByName(("sd" + mainVar.currentLevel)) as Class); _local5 = new (_local6); _local5.x = _local1[2]; _local5.y = _local1[3]; mainVar._view.addChild(_local5); } else { if (_local1[0] == "bird"){ _local3 = (getDefinitionByName(("item." + _local1[10])) as Class); _local2 = (getDefinitionByName(_local1[1]) as Class); _local4 = new (_local2); mainVar._view.addChild(_local4); _local4.x = _local1[2]; _local4.y = _local1[3]; if ((((_local1[6] == 0)) || ((_local1[6] == 180)))){ _local4.width = _local1[4]; _local4.height = _local1[5]; _local5 = new staticBirdBox(_local4, _local1[6]); } else { if ((((_local1[6] == 90)) || ((_local1[6] == 270)))){ _local4.width = _local1[5]; _local4.height = _local1[4]; _local5 = new staticBirdBox(_local4, _local1[6]); } else { _local4.height = ((_local1[5] - (_local1[9] * _local1[4])) / (((_local1[8] * _local1[8]) - (_local1[7] * _local1[7])) / _local1[8])); _local4.width = ((_local1[4] - (_local1[7] * _local4.height)) / _local1[8]); _local5 = new staticBirdBox(_local4, _local1[6]); }; }; mainVar.bodyArray.push(_local5); mainVar.shotBirdTypeArray.push(_local4); mainVar.shotBirdArray.push(_local5); mainVar.birdNum++; } else { if (_local1[0] == "static_tri"){ _local4 = new static_tri(); mainVar._view.addChild(_local4); _local4.x = _local1[2]; _local4.y = _local1[3]; if ((((_local1[6] == 0)) || ((_local1[6] == 180)))){ _local4.width = _local1[4]; _local4.height = _local1[5]; _local5 = new staticFloorTri(_local4, _local1[6]); } else { if ((((_local1[6] == 90)) || ((_local1[6] == 270)))){ _local4.width = _local1[5]; _local4.height = _local1[4]; _local5 = new staticFloorTri(_local4, _local1[6]); } else { _local4.height = ((_local1[5] - (_local1[9] * _local1[4])) / (((_local1[8] * _local1[8]) - (_local1[7] * _local1[7])) / _local1[8])); _local4.width = ((_local1[4] - (_local1[7] * _local4.height)) / _local1[8]); _local5 = new staticFloorTri(_local4, _local1[6]); }; }; } else { if (_local1[0] == "static_rec"){ _local4 = new static_rec(); mainVar._view.addChild(_local4); _local4.x = _local1[2]; _local4.y = _local1[3]; if ((((_local1[6] == 0)) || ((_local1[6] == 180)))){ _local4.width = _local1[4]; _local4.height = _local1[5]; _local5 = new staticFloor(_local4, _local1[6]); } else { if ((((_local1[6] == 90)) || ((_local1[6] == 270)))){ _local4.width = _local1[5]; _local4.height = _local1[4]; _local5 = new staticFloor(_local4, _local1[6]); } else { _local4.height = ((_local1[5] - (_local1[9] * _local1[4])) / (((_local1[8] * _local1[8]) - (_local1[7] * _local1[7])) / _local1[8])); _local4.width = ((_local1[4] - (_local1[7] * _local4.height)) / _local1[8]); _local5 = new staticFloor(_local4, _local1[6]); }; }; } else { if (_local1[0] == "pig"){ _local3 = (getDefinitionByName(("item." + _local1[10])) as Class); _local2 = (getDefinitionByName(_local1[1]) as Class); _local4 = new (_local2); mainVar._view.addChild(_local4); _local4.x = _local1[2]; _local4.y = _local1[3]; if ((((_local1[6] == 0)) || ((_local1[6] == 180)))){ _local4.width = _local1[4]; _local4.height = _local1[5]; _local5 = new pigBox(_local4, _local1[6]); } else { if ((((_local1[6] == 90)) || ((_local1[6] == 270)))){ _local4.width = _local1[5]; _local4.height = _local1[4]; _local5 = new pigBox(_local4, _local1[6]); } else { _local4.height = ((_local1[5] - (_local1[9] * _local1[4])) / (((_local1[8] * _local1[8]) - (_local1[7] * _local1[7])) / _local1[8])); _local4.width = ((_local1[4] - (_local1[7] * _local4.height)) / _local1[8]); _local5 = new pigBox(_local4, _local1[6]); }; }; mainVar.itemArray.push(_local5); mainVar.bodyArray.push(_local5); mainVar.pigNum++; } else { if (_local1[10] == "box"){ _local3 = (getDefinitionByName("item.box") as Class); } else { if (_local1[10] == "roundItem"){ _local3 = (roundItem as Class); }; }; _local2 = (getDefinitionByName(_local1[1]) as Class); _local4 = new (_local2); mainVar._view.addChild(_local4); _local4.x = _local1[2]; _local4.y = _local1[3]; if ((((_local1[6] == 0)) || ((_local1[6] == 180)))){ _local4.width = _local1[4]; _local4.height = _local1[5]; _local5 = new _local3(_local4, _local1[6]); } else { if ((((_local1[6] == 90)) || ((_local1[6] == 270)))){ _local4.width = _local1[5]; _local4.height = _local1[4]; _local5 = new _local3(_local4, _local1[6]); } else { _local4.height = ((_local1[5] - (_local1[9] * _local1[4])) / (((_local1[8] * _local1[8]) - (_local1[7] * _local1[7])) / _local1[8])); _local4.width = ((_local1[4] - (_local1[7] * _local4.height)) / _local1[8]); _local5 = new _local3(_local4, _local1[6]); }; }; if (_local1[0] == "item"){ mainVar.itemArray.push(_local5); mainVar.bodyArray.push(_local5); }; }; }; }; }; }; _local7++; }; mainVar.birdNumOri = mainVar.birdNum; } private function sortShotBirdArray():void{ mainVar.isCollide = false; if (mainVar.shotBirdArray.length > 0){ mainVar.shotBirdTypeArray.sortOn("x", (Array.NUMERIC | Array.DESCENDING)); mainVar.shotBirdArray.sortOn("thisX", (Array.NUMERIC | Array.DESCENDING)); mainVar.shotBirdArray[0].startOnboard((pm.x - mainVar.shotBirdArray[0].thisX)); mainVar.onboardBirdClass = (getDefinitionByName(getQualifiedClassName(mainVar.shotBirdTypeArray[0])) as Class); mainVar.shotBirdArray.shift(); mainVar.shotBirdTypeArray.shift(); }; } private function clearItems():void{ var _local1:Number = 0; while (_local1 < numChildren) { if ((((((((((((getChildAt(_local1) is itemA)) || ((getChildAt(_local1) is pig)))) || ((getChildAt(_local1) is bird)))) || ((getChildAt(_local1) is staticP)))) || ((getChildAt(_local1) is static_tri)))) || ((getChildAt(_local1) is static_rec)))){ getChildAt(_local1).parent.removeChild(getChildAt(_local1)); _local1--; }; _local1++; }; } private function update(_arg1:Event):void{ var _local2:role; if (!mainVar.isGameEnd){ mainVar.foreOffset = MyPoint.MLocalToGlobal(mainVar._view.getChildByName("dis_fore")).x; mainVar.foreOffsetY = MyPoint.MLocalToGlobal(mainVar._view).y; if (!mainVar.isGamePaused){ mainVar.world.Step((1 / mainVar.RATIO), 10); for each (_local2 in mainVar.bodyArray) { _local2.mainUpdate(); }; }; if (mainVar.isDraged){ }; if (((!(mainVar.isMouseDown)) && (!(mainVar.isClicked)))){ if (null != mainVar.shotOutBird){ if (((!(mainVar.shotOutBird.isDownToEarth)) && ((mainVar.shotOutBird.getSprite().x > 150)))){ followBird(); }; }; }; lineOri(); if (mainVar.canDrawMoveLine){ drawMoveLine(mainVar.shotOutBird.getSprite()); if (mainVar.bird1){ if (!mainVar.bird1.isDownToEarth){ drawMoveLine(mainVar.bird1.getSprite()); }; }; if (mainVar.bird2){ if (!mainVar.bird2.isDownToEarth){ drawMoveLine(mainVar.bird2.getSprite()); }; }; if (mainVar.bird3){ if (!mainVar.bird3.isDownToEarth){ drawMoveLine(mainVar.bird3.getSprite()); }; }; }; if (freshCold > 0){ freshCold--; }; mainVar.mouseSpeed = mainVar.distanceP(new Point(mouseX, mouseY), mainVar.currentMousePoint); calMouseSpeed(); outHandler(); moveToEnemyGroup(); pigTest(); birdTest(); }; if (mainVar.GAME_RESULT != "win"){ if (!mainVar.stopOneFrame){ m2.x = -222; m2.y = -222; m.x = mouseX; m.y = mouseY; }; }; if (mainVar.GAME_RESULT == "win"){ if (!mainVar.stopOneFrame){ m.x = -222; m.y = -222; m2.x = mouseX; m2.y = mouseY; }; }; if (mainVar.stopOneFrame > 0){ mainVar.stopOneFrame--; }; } private function birdTest():void{ if (mainVar.birdNum == 0){ }; } private function bordControl():void{ var _local1:Number = 0; while (_local1 < mainVar.bodyArray.length) { if ((mainVar.bodyArray[_local1] is birdBall)){ if ((((birdBall(mainVar.bodyArray[_local1]).getSprite().x > 1000)) && (!(birdBall(mainVar.bodyArray[_local1]).isRemove)))){ birdBall(mainVar.bodyArray[_local1]).destroy(); mainVar.birdNumOnStage--; birdBall(mainVar.bodyArray[_local1]).isDownToEarth = true; mainVar.isShot = true; mainVar.isExped = true; }; }; _local1++; }; if (mainVar.birdNumOnStage == 0){ mainVar.isBirdStatic = true; }; } private function pigTest():void{ if (mainVar.pigNum == 0){ btn_fresh.visible = false; btn_menu.visible = false; shotCold.stop(); highCalculateTimer.stop(); shotCold.removeEventListener(TimerEvent.TIMER, turnToFight); if (mainVar.GAME_RESULT != "win"){ TweenLite.to(this, 2, {onComplete:toWin}); mainVar.GAME_RESULT = "win"; }; }; } private function toWin():void{ swapChildren(resultBoard, m2); mainVar._view.getPosition_Weak(mainVar._pm, 1); winHandler(); } private function winHandler():void{ var _local1:Number = 0; while (_local1 < mainVar._view.numChildren) { if ((mainVar._view.getChildAt(_local1) is bird)){ }; _local1++; }; winTimer.addEventListener(TimerEvent.TIMER, makeScore); winTimer.start(); } private function makeScore(_arg1:TimerEvent):void{ var _local2:ColorTransform; var _local3:MyScoreBig; if (mainVar.reportScoreBird < mainVar.shotBirdArray.length){ _local2 = new ColorTransform(1, 0, 0); _local3 = new MyScoreBig(10000, colorJudge(role(mainVar.shotBirdArray[mainVar.reportScoreBird]).getSprite())); mainVar.currentScore = (mainVar.currentScore + 10000); mainVar.scoreBoard.setScore(mainVar.currentScore); mainVar._view.addChild(_local3); _local3.x = role(mainVar.shotBirdArray[mainVar.reportScoreBird]).getSprite().x; _local3.y = role(mainVar.shotBirdArray[mainVar.reportScoreBird]).getSprite().y; mainVar.reportScoreBird++; } else { mainVar.isGameEnd = true; resultBoard.mouseEnabled = true; resultBoard.mouseChildren = true; resultBoard.x = 378; resultBoard.y = 252; mainVar.swapIndex(this, resultBoard, mainVar._view); stage.dispatchEvent(new Event("showLevel")); TweenLite.to(resultBoard, 1, {alpha:1}); soundControl.play_sound("sound_win"); if (mainVar.scoreBoard){ removeChild(mainVar.scoreBoard); mainVar.scoreBoard = null; }; new mainBtn(resultBoard.btn_select, returnToSelect); new mainBtn(resultBoard.btn_retry, win_retry); if (mainVar.currentLevel != 21){ new mainBtn(resultBoard.btn_next, win_next); } else { resultBoard.levelInfo.gotoAndStop(3); resultBoard.mc_star.visible = false; }; winTimer.stop(); }; } private function colorJudge(_arg1):ColorTransform{ var _local2:ColorTransform; if ((_arg1 is birdRedSmall)){ _local2 = new ColorTransform(1, 0, 0, 0.8); } else { if ((_arg1 is birdBlueSmall)){ _local2 = new ColorTransform(0, 0, 1, 0.8); } else { if ((_arg1 is birdYellowSmall)){ _local2 = new ColorTransform(1, 1, 0, 0.8); }; }; }; return (_local2); } private function win_select(_arg1:MouseEvent):void{ trace("select"); } private function win_retry(_arg1:MouseEvent):void{ freshGame(new MouseEvent(MouseEvent.CLICK)); trace("retry"); } private function win_next(_arg1:MouseEvent):void{ resultBoard.x = 0; resultBoard.y = 800; trace("next"); gameClear(); mainVar.initData(); mainVar.currentLevel++; initGame(); } private function turnToFight(_arg1:TimerEvent):void{ if (mainVar.GAME_RESULT != "win"){ shotCold.stop(); sortShotBirdArray(); }; } private function outHandler():void{ try { if (mainVar.shotOutBird){ if (MyPoint.MLocalToGlobal(mainVar.shotOutBird.getSprite()).y <= 0){ outPoint.visible = true; outPoint.x = MyPoint.MLocalToGlobal(mainVar.shotOutBird.getSprite()).x; } else { outPoint.visible = false; }; }; } catch(e:Error) { }; } private function highCalculate(_arg1:TimerEvent):void{ mouseToTheTop(); if (mainVar.shotOutBird != null){ if (((mainVar.shotOutBird.isDownToEarth) || (mainVar.isFunction))){ canMoveBackJudge(); }; }; if (mainVar.birdNumOnStage > 0){ bordControl(); }; } private function canMoveBackJudge():void{ var _local1:Number; trace(555); mainVar.canMoveBack = true; _local1 = 0; while (_local1 < mainVar.itemArray.length) { if (((!(role(mainVar.itemArray[_local1]).isRemove)) && ((role(mainVar.itemArray[_local1]).getBody().GetLinearVelocity().Length() > 0.1)))){ mainVar.canMoveBack = false; break; }; _local1++; }; if (_local1 == mainVar.itemArray.length){ if (((((((!((mainVar.GAME_RESULT == "win"))) && (mainVar.isShot))) && (mainVar.isBirdStatic))) && (mainVar.canMoveBack))){ mainVar.isFunction = false; mainVar.isShot = false; mainVar.canMoveBack = true; mainVar._view.getPosition_Weak(mainVar._pm, 1); mainVar.isDown = false; if ((((((mainVar.birdNumOri == 0)) && (mainVar.isExped))) && (!((mainVar.GAME_RESULT == "win"))))){ mainVar.GAME_RESULT = "fail"; mainVar.isGameEnd = true; resultBoard.mouseEnabled = true; resultBoard.mouseChildren = true; resultBoard.x = 378; resultBoard.y = 252; mainVar.swapIndex(this, resultBoard, mainVar._view); stage.dispatchEvent(new Event("showLevel")); TweenLite.to(resultBoard, 1, {alpha:1}); if (mainVar.scoreBoard){ removeChild(mainVar.scoreBoard); mainVar.scoreBoard = null; }; btn_fresh.visible = false; btn_menu.visible = false; new mainBtn(resultBoard.btn_select, returnToSelect); new mainBtn(resultBoard.btn_retry, win_retry); }; }; }; if (((mainVar.canMoveBack) && (mainVar.isBirdStatic))){ }; } private function mouseToTheTop():void{ } private function calMouseSpeed():void{ mainVar.currentMousePoint = new Point(mouseX, mouseY); } private function followBird():void{ if (((!(mainVar.canShot)) && (mainVar.isShot))){ mainVar.canMoveScreen = false; if (mainVar.shotOutBird.getSprite().x <= mainVar.STAGE_LEFT){ followPos.x = mainVar.STAGE_LEFT; mainVar.isDown = true; mainVar.shouldFollow = false; mainVar.isShot = false; if (mainVar.GAME_RESULT != "win"){ mainVar.isDown = false; shotCold.stop(); sortShotBirdArray(); }; mainVar._view.getPosition_Weak(mainVar._pm, 1); } else { if (mainVar.shotOutBird.getSprite().x >= mainVar.STAGE_RIGHT){ followPos.x = mainVar.STAGE_RIGHT; mainVar.isDown = true; mainVar.shouldFollow = false; mainVar.isShot = false; if (mainVar.GAME_RESULT != "win"){ mainVar.isDown = false; shotCold.stop(); sortShotBirdArray(); }; mainVar._view.getPosition_Weak(mainVar._pm, 1); } else { followPos.x = mainVar.shotOutBird.getSprite().x; mainVar._view.getPosition_Weak(new Point(followPos.x, followPos.y), 0.5); }; }; if (mainVar.shotOutBird.getSprite().y <= mainVar.STAGE_UP){ followPos.y = mainVar.STAGE_UP; } else { if (mainVar.shotOutBird.getSprite().y >= mainVar.STAGE_DOWN){ followPos.y = mainVar.STAGE_DOWN; } else { followPos.y = mainVar.shotOutBird.getSprite().y; }; }; } else { mainVar.canMoveScreen = true; }; } private function lineOri():void{ var _local1:Point; var _local2:Point; var _local3:Point; if (!mainVar.isDraged){ mainVar.lineSprite1.graphics.clear(); mainVar.lineSprite2.graphics.clear(); mainVar.lineSprite1.graphics.lineStyle(maxBold(10), mainVar.ropeColor); mainVar.lineSprite2.graphics.lineStyle(maxBold(10), mainVar.ropeColor); _local1 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line1.x, weapon.line1.y))); _local2 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.middle.x, weapon.middle.y))); _local3 = mainVar._view.globalToLocal(weapon.localToGlobal(new Point(weapon.line2.x, weapon.line2.y))); mainVar.lineSprite1.graphics.moveTo(_local1.x, _local1.y); mainVar.lineSprite1.graphics.lineTo(_local2.x, _local2.y); mainVar.lineSprite2.graphics.moveTo(_local3.x, _local3.y); mainVar.lineSprite2.graphics.lineTo(_local2.x, _local2.y); mainVar.lineSprite1.graphics.endFill(); mainVar.lineSprite2.graphics.endFill(); }; } function fwAd_onClickStartBtn(_arg1:Event=null):void{ (root as MovieClip).play(); stage.focus = this; mainVar.mainStage = stage; stage.addEventListener("canStart", next1); nextFrame(); } private function frame2():void{ stop(); } private function frame1():void{ stop(); if (null != stage){ this.loaderInfo.addEventListener(Event.COMPLETE, fwAd_onClickStartBtn); } else { this.loaderInfo.addEventListener(Event.COMPLETE, fwAd_onClickStartBtn); }; try { } catch(e:SecurityError) { trace(e); }; } private function next1(_arg1:Event):void{ nextFrame(); } } }//package
Section 187
//linePointB (linePointB) package { import flash.display.*; public dynamic class linePointB extends MovieClip { } }//package
Section 188
//linePointS (linePointS) package { import flash.display.*; public dynamic class linePointS extends MovieClip { } }//package
Section 189
//m_score (m_score) package { import flash.display.*; public dynamic class m_score extends MovieClip { public function m_score(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 190
//music_back (music_back) package { import flash.media.*; public dynamic class music_back extends Sound { } }//package
Section 191
//music_main (music_main) package { import flash.media.*; public dynamic class music_main extends Sound { } }//package
Section 192
//sd10 (sd10) package { import item.*; public dynamic class sd10 extends staticDisplay { } }//package
Section 193
//sd11 (sd11) package { import item.*; public dynamic class sd11 extends staticDisplay { } }//package
Section 194
//sd12 (sd12) package { import item.*; public dynamic class sd12 extends staticDisplay { } }//package
Section 195
//sd13 (sd13) package { import item.*; public dynamic class sd13 extends staticDisplay { } }//package
Section 196
//sd14 (sd14) package { import item.*; public dynamic class sd14 extends staticDisplay { } }//package
Section 197
//sd15 (sd15) package { import item.*; public dynamic class sd15 extends staticDisplay { } }//package
Section 198
//sd16 (sd16) package { import item.*; public dynamic class sd16 extends staticDisplay { } }//package
Section 199
//sd18 (sd18) package { import item.*; public dynamic class sd18 extends staticDisplay { } }//package
Section 200
//sd19 (sd19) package { import item.*; public dynamic class sd19 extends staticDisplay { } }//package
Section 201
//sd2 (sd2) package { import item.*; public dynamic class sd2 extends staticDisplay { } }//package
Section 202
//sd20 (sd20) package { import item.*; public dynamic class sd20 extends staticDisplay { } }//package
Section 203
//sd21 (sd21) package { import item.*; public dynamic class sd21 extends staticDisplay { } }//package
Section 204
//sd3 (sd3) package { import item.*; public dynamic class sd3 extends staticDisplay { } }//package
Section 205
//sd4 (sd4) package { import item.*; public dynamic class sd4 extends staticDisplay { } }//package
Section 206
//sd6 (sd6) package { import item.*; public dynamic class sd6 extends staticDisplay { } }//package
Section 207
//sd7 (sd7) package { import item.*; public dynamic class sd7 extends staticDisplay { } }//package
Section 208
//sd8 (sd8) package { import item.*; public dynamic class sd8 extends staticDisplay { } }//package
Section 209
//sound_blue (sound_blue) package { import flash.media.*; public dynamic class sound_blue extends Sound { } }//package
Section 210
//sound_btn (sound_btn) package { import flash.media.*; public dynamic class sound_btn extends Sound { } }//package
Section 211
//sound_btn2 (sound_btn2) package { import flash.media.*; public dynamic class sound_btn2 extends Sound { } }//package
Section 212
//sound_btn3 (sound_btn3) package { import flash.media.*; public dynamic class sound_btn3 extends Sound { } }//package
Section 213
//sound_glass_exp (sound_glass_exp) package { import flash.media.*; public dynamic class sound_glass_exp extends Sound { } }//package
Section 214
//sound_glass_hit (sound_glass_hit) package { import flash.media.*; public dynamic class sound_glass_hit extends Sound { } }//package
Section 215
//sound_red (sound_red) package { import flash.media.*; public dynamic class sound_red extends Sound { } }//package
Section 216
//sound_start (sound_start) package { import flash.media.*; public dynamic class sound_start extends Sound { } }//package
Section 217
//sound_stone_exp (sound_stone_exp) package { import flash.media.*; public dynamic class sound_stone_exp extends Sound { } }//package
Section 218
//sound_stone_hit (sound_stone_hit) package { import flash.media.*; public dynamic class sound_stone_hit extends Sound { } }//package
Section 219
//sound_win (sound_win) package { import flash.media.*; public dynamic class sound_win extends Sound { } }//package
Section 220
//sound_wood_exp (sound_wood_exp) package { import flash.media.*; public dynamic class sound_wood_exp extends Sound { } }//package
Section 221
//sound_wood_hit (sound_wood_hit) package { import flash.media.*; public dynamic class sound_wood_hit extends Sound { } }//package
Section 222
//sound_yellow (sound_yellow) package { import flash.media.*; public dynamic class sound_yellow extends Sound { } }//package
Section 223
//static_rec (static_rec) package { import flash.display.*; public dynamic class static_rec extends MovieClip { } }//package
Section 224
//static_tri (static_tri) package { import flash.display.*; public dynamic class static_tri extends MovieClip { } }//package
Section 225
//staticP (staticP) package { import flash.display.*; public dynamic class staticP extends MovieClip { } }//package

Library Items

Symbol 1 Sound {sound_btn}
Symbol 2 Sound {sound_btn2}
Symbol 3 Sound {sound_btn3}
Symbol 4 Sound {music_back}
Symbol 5 Sound {sound_glass_exp}
Symbol 6 Sound {sound_glass_hit}
Symbol 7 Sound {sound_red}
Symbol 8 Sound {sound_yellow}
Symbol 9 Sound {sound_start}
Symbol 10 Sound {sound_blue}
Symbol 11 Sound {sound_wood_exp}
Symbol 12 Sound {sound_wood_hit}
Symbol 13 Sound {sound_win}
Symbol 14 Sound {sound_stone_exp}
Symbol 15 Sound {sound_stone_hit}
Symbol 16 Sound {music_main}
Symbol 17 GraphicUsed by:18 25 226 227 228
Symbol 18 MovieClip {E_yellowFeather2}Uses:17
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClip {E_stone3}Uses:19
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {E_stone2}Uses:21
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {E_stone1}Uses:23
Symbol 25 MovieClipUses:17
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClip {E_yellowFeather1}Uses:26
Symbol 28 GraphicUsed by:35
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:35 37 39 41 43 45 47 49 51 53 66 69
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:35 37 39 41 43 45 47 49 51 53 66 69
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClipUses:33Used by:35 37 39 41 43 45 47 49 51 53 62 66 69 73 78 80 84 86
Symbol 35 MovieClip {sd19}Uses:28 30 32 34
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClip {sd21}Uses:36 30 32 34
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClip {sd20}Uses:38 30 32 34
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClip {sd18}Uses:40 30 32 34
Symbol 42 GraphicUsed by:43
Symbol 43 MovieClip {sd16}Uses:42 30 32 34
Symbol 44 GraphicUsed by:45
Symbol 45 MovieClip {sd15}Uses:44 30 32 34
Symbol 46 GraphicUsed by:47
Symbol 47 MovieClipUses:46 30 32 34Used by:49
Symbol 48 GraphicUsed by:49
Symbol 49 MovieClip {sd14}Uses:47 48 30 32 34
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClip {sd13}Uses:50 30 32 34
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClip {sd12}Uses:52 30 32 34
Symbol 54 GraphicUsed by:62
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:62 86
Symbol 57 GraphicUsed by:62
Symbol 58 GraphicUsed by:62
Symbol 59 GraphicUsed by:62
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClipUses:60Used by:62 86
Symbol 62 MovieClip {sd11}Uses:54 56 57 58 59 61 34
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClip {functionReactor}Uses:63
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClip {sd10}Uses:65 30 32 34
Symbol 67 GraphicUsed by:69
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClip {sd8}Uses:67 30 32 34 68
Symbol 70 GraphicUsed by:73
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClipUses:71Used by:73 78 80 84
Symbol 73 MovieClip {sd7}Uses:70 72 34
Symbol 74 BitmapUsed by:75 76 77
Symbol 75 GraphicUses:74Used by:78
Symbol 76 GraphicUses:74Used by:78
Symbol 77 GraphicUses:74Used by:78
Symbol 78 MovieClip {sd6}Uses:75 72 34 76 77
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClip {sd4}Uses:79 72 34
Symbol 81 GraphicUsed by:84
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClipUses:82Used by:84
Symbol 84 MovieClip {sd3}Uses:81 83 72 34
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClip {sd2}Uses:85 56 61 34
Symbol 87 GraphicUsed by:88
Symbol 88 MovieClip {static_rec}Uses:87
Symbol 89 GraphicUsed by:90
Symbol 90 MovieClip {static_tri}Uses:89
Symbol 91 GraphicUsed by:92
Symbol 92 MovieClip {staticP}Uses:91
Symbol 93 GraphicUsed by:103
Symbol 94 GraphicUsed by:103
Symbol 95 GraphicUsed by:103
Symbol 96 GraphicUsed by:103
Symbol 97 GraphicUsed by:103
Symbol 98 GraphicUsed by:103
Symbol 99 GraphicUsed by:103
Symbol 100 GraphicUsed by:103
Symbol 101 GraphicUsed by:103
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClip {m_score}Uses:93 94 95 96 97 98 99 100 101 102
Symbol 104 GraphicUsed by:105 106
Symbol 105 MovieClip {linePointS}Uses:104
Symbol 106 MovieClipUses:104Used by:107
Symbol 107 MovieClip {linePointB}Uses:106
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClipUses:108Used by:110
Symbol 110 MovieClip {E_frog1}Uses:109
Symbol 111 GraphicUsed by:112
Symbol 112 MovieClipUses:111Used by:119 120 121 152 184 186 192
Symbol 113 GraphicUsed by:114
Symbol 114 MovieClipUses:113Used by:119 120 121 152 184 186 192
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClipUses:115Used by:119 120 121 152 184 186 192
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClipUses:117Used by:119 120 121 152 184 186 192
Symbol 119 MovieClip {item.I_stone_short}Uses:112 114 116 118
Symbol 120 MovieClip {item.I_stone_small_2}Uses:112 114 116 118
Symbol 121 MovieClip {item.I_stone_small_1}Uses:112 114 116 118
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:122Used by:130 131 141 151 183 185
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:124Used by:130 131 141 151 183 185
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClipUses:126Used by:130 131 141 151 183 185
Symbol 128 GraphicUsed by:129
Symbol 129 MovieClipUses:128Used by:130 131 141 151 183 185
Symbol 130 MovieClip {item.I_glass_small_1}Uses:123 125 127 129
Symbol 131 MovieClip {item.I_glass_small_2}Uses:123 125 127 129
Symbol 132 GraphicUsed by:133
Symbol 133 MovieClipUses:132Used by:140
Symbol 134 GraphicUsed by:135
Symbol 135 MovieClipUses:134Used by:140
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:136Used by:140
Symbol 138 GraphicUsed by:139
Symbol 139 MovieClipUses:138Used by:140
Symbol 140 MovieClip {item.I_wood_small}Uses:133 135 137 139
Symbol 141 MovieClip {item.I_glass_wide}Uses:123 125 127 129
Symbol 142 GraphicUsed by:143
Symbol 143 MovieClipUses:142Used by:144
Symbol 144 MovieClipUses:143Used by:150 205 207
Symbol 145 GraphicUsed by:150
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClipUses:146Used by:148
Symbol 148 MovieClipUses:147Used by:150
Symbol 149 GraphicUsed by:150
Symbol 150 MovieClip {item.I_smileface}Uses:144 145 148 149
Symbol 151 MovieClip {item.I_glass_short}Uses:123 125 127 129
Symbol 152 MovieClip {item.I_stone_wide}Uses:112 114 116 118
Symbol 153 GraphicUsed by:157
Symbol 154 GraphicUsed by:157
Symbol 155 GraphicUsed by:157
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClip {item.I_R_stone_big}Uses:153 154 155 156
Symbol 158 GraphicUsed by:162 163
Symbol 159 GraphicUsed by:162 164
Symbol 160 GraphicUsed by:162 165
Symbol 161 GraphicUsed by:162 166
Symbol 162 MovieClip {item.I_wood_wide_2}Uses:158 159 160 161
Symbol 163 MovieClipUses:158Used by:167 168
Symbol 164 MovieClipUses:159Used by:167 168
Symbol 165 MovieClipUses:160Used by:167 168
Symbol 166 MovieClipUses:161Used by:167 168
Symbol 167 MovieClip {item.I_wood_wide}Uses:163 164 165 166
Symbol 168 MovieClip {item.I_wood_short}Uses:163 164 165 166
Symbol 169 GraphicUsed by:173
Symbol 170 GraphicUsed by:173
Symbol 171 GraphicUsed by:173
Symbol 172 GraphicUsed by:173
Symbol 173 MovieClip {item.I_R_wood_round1}Uses:169 170 171 172
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClipUses:174Used by:182
Symbol 176 GraphicUsed by:177
Symbol 177 MovieClipUses:176Used by:182
Symbol 178 GraphicUsed by:179
Symbol 179 MovieClipUses:178Used by:182
Symbol 180 GraphicUsed by:181
Symbol 181 MovieClipUses:180Used by:182
Symbol 182 MovieClip {item.I_wood_middle}Uses:175 177 179 181
Symbol 183 MovieClip {item.I_glass_middle}Uses:123 125 127 129
Symbol 184 MovieClip {item.I_stone_middle}Uses:112 114 116 118
Symbol 185 MovieClip {item.I_glass_long}Uses:123 125 127 129
Symbol 186 MovieClip {item.I_stone_long2}Uses:112 114 116 118
Symbol 187 GraphicUsed by:191
Symbol 188 GraphicUsed by:191
Symbol 189 GraphicUsed by:191
Symbol 190 GraphicUsed by:191
Symbol 191 MovieClip {item.I_wood_middle_long}Uses:187 188 189 190
Symbol 192 MovieClip {item.I_stone_long}Uses:112 114 116 118
Symbol 193 MovieClip {item.I_bottomDesk}
Symbol 194 GraphicUsed by:195 456
Symbol 195 MovieClipUses:194Used by:196 386
Symbol 196 MovieClipUses:195Used by:197 198 199 201 214 215 223 236
Symbol 197 MovieClip {fkdxn_fla.Timeline_167}Uses:196Used by:200
Symbol 198 MovieClipUses:196Used by:200
Symbol 199 MovieClipUses:196Used by:200
Symbol 200 MovieClip {item.M_pigSmall}Uses:197 198 199
Symbol 201 MovieClipUses:196
Symbol 202 GraphicUsed by:205 207
Symbol 203 GraphicUsed by:205 207
Symbol 204 GraphicUsed by:205 207
Symbol 205 MovieClip {fkdxn_fla.Timeline_171}Uses:144 202 203 204Used by:206
Symbol 206 MovieClip {item.birdYellowSmall}Uses:205
Symbol 207 MovieClipUses:144 202 203 204
Symbol 208 GraphicUsed by:209
Symbol 209 MovieClipUses:208Used by:211 213
Symbol 210 GraphicUsed by:211 213
Symbol 211 MovieClip {fkdxn_fla.Timeline_173}Uses:209 210Used by:212
Symbol 212 MovieClip {item.birdBlueSmall}Uses:211
Symbol 213 MovieClipUses:209 210
Symbol 214 MovieClip {fkdxn_fla.Timeline_175}Uses:196Used by:222
Symbol 215 MovieClipUses:196Used by:222
Symbol 216 GraphicUsed by:217
Symbol 217 MovieClipUses:216Used by:219 238
Symbol 218 GraphicUsed by:219
Symbol 219 MovieClipUses:217 218Used by:220
Symbol 220 MovieClipUses:219Used by:221
Symbol 221 MovieClipUses:220Used by:222
Symbol 222 MovieClip {item.M_pigMiddle}Uses:214 215 221
Symbol 223 MovieClipUses:196
Symbol 224 GraphicUsed by:225
Symbol 225 MovieClip {E_redFeather1}Uses:224
Symbol 226 MovieClip {E_redFeather2}Uses:17
Symbol 227 MovieClip {E_blueFeather1}Uses:17
Symbol 228 MovieClip {E_blueFeather2}Uses:17
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClip {E_wood1}Uses:229
Symbol 231 GraphicUsed by:232
Symbol 232 MovieClip {E_wood2}Uses:231
Symbol 233 GraphicUsed by:234
Symbol 234 MovieClip {E_wood3}Uses:233
Symbol 235 MovieClipUsed by:239
Symbol 236 MovieClipUses:196Used by:239
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClipUses:217 237Used by:239
Symbol 239 MovieClip {item.M_pigBig}Uses:235 236 238
Symbol 240 GraphicUsed by:241 242 245
Symbol 241 MovieClip {fkdxn_fla.Timeline_190}Uses:240Used by:244
Symbol 242 MovieClipUses:240Used by:243 244
Symbol 243 MovieClipUses:242Used by:244
Symbol 244 MovieClip {item.birdRedSmall}Uses:241 242 243
Symbol 245 MovieClipUses:240
Symbol 246 GraphicUsed by:247
Symbol 247 MovieClipUses:246Used by:248 249
Symbol 248 MovieClip {E_glass1}Uses:247
Symbol 249 MovieClip {E_glass2}Uses:247
Symbol 250 GraphicUsed by:251
Symbol 251 MovieClipUses:250Used by:252
Symbol 252 MovieClip {E_glass3}Uses:251
Symbol 253 GraphicUsed by:254
Symbol 254 MovieClipUses:253Used by:255
Symbol 255 MovieClip {E_glass4}Uses:254
Symbol 256 GraphicUsed by:257
Symbol 257 MovieClipUses:256Used by:258
Symbol 258 MovieClip {E_glass5}Uses:257
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClipUses:259Used by:280
Symbol 261 GraphicUsed by:277
Symbol 262 GraphicUsed by:277
Symbol 263 GraphicUsed by:277
Symbol 264 GraphicUsed by:277
Symbol 265 GraphicUsed by:277
Symbol 266 GraphicUsed by:277
Symbol 267 GraphicUsed by:277
Symbol 268 GraphicUsed by:277
Symbol 269 GraphicUsed by:277
Symbol 270 GraphicUsed by:277
Symbol 271 GraphicUsed by:277
Symbol 272 GraphicUsed by:277
Symbol 273 GraphicUsed by:277
Symbol 274 GraphicUsed by:277
Symbol 275 GraphicUsed by:277
Symbol 276 GraphicUsed by:277
Symbol 277 MovieClipUses:261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276Used by:280 283
Symbol 278 GraphicUsed by:279
Symbol 279 MovieClipUses:278Used by:280
Symbol 280 MovieClip {fkdxn_fla.Timeline_109}Uses:260 277 279Used by:Timeline
Symbol 281 GraphicUsed by:283
Symbol 282 GraphicUsed by:283
Symbol 283 MovieClip {fkdxn_fla.Timeline_108}Uses:281 277 282Used by:Timeline
Symbol 284 ShapeTweeningUsed by:313
Symbol 285 GraphicUsed by:308
Symbol 286 GraphicUsed by:287
Symbol 287 MovieClipUses:286Used by:288
Symbol 288 MovieClipUses:287Used by:308
Symbol 289 GraphicUsed by:290
Symbol 290 MovieClipUses:289Used by:291
Symbol 291 MovieClipUses:290Used by:308 348  Timeline
Symbol 292 FontUsed by:293 298 317 318 322 325 326 339 343 426 431 437 443 447 451 460
Symbol 293 TextUses:292Used by:296
Symbol 294 GraphicUsed by:295
Symbol 295 MovieClipUses:294Used by:296 299 341 344
Symbol 296 MovieClipUses:293 295Used by:297
Symbol 297 MovieClipUses:296Used by:308
Symbol 298 TextUses:292Used by:299 341
Symbol 299 MovieClipUses:298 295Used by:300
Symbol 300 MovieClipUses:299Used by:308  Timeline
Symbol 301 GraphicUsed by:304 471
Symbol 302 GraphicUsed by:303
Symbol 303 MovieClipUses:302Used by:304
Symbol 304 MovieClipUses:301 303Used by:307
Symbol 305 GraphicUsed by:306
Symbol 306 MovieClipUses:305Used by:307  Timeline
Symbol 307 MovieClip {fkdxn_fla.Timeline_36}Uses:304 306Used by:308  Timeline
Symbol 308 MovieClipUses:285 288 291 297 300 307Used by:313
Symbol 309 GraphicUsed by:313
Symbol 310 ShapeTweeningUsed by:313
Symbol 311 GraphicUsed by:313
Symbol 312 GraphicUsed by:313
Symbol 313 MovieClip {fkdxn_fla.Timeline_103}Uses:284 308 309 310 311 312Used by:Timeline
Symbol 314 GraphicUsed by:316 346 427 438 444 448 455 456
Symbol 315 GraphicUsed by:316 346
Symbol 316 MovieClip {fkdxn_fla.Timeline_102}Uses:314 315Used by:348
Symbol 317 TextUses:292Used by:330
Symbol 318 EditableTextUses:292Used by:320
Symbol 319 GraphicUsed by:320 323
Symbol 320 ButtonUses:318 319Used by:321
Symbol 321 MovieClip {_fla.Timeline_21}Uses:320Used by:330  Timeline
Symbol 322 EditableTextUses:292Used by:323
Symbol 323 ButtonUses:322 319Used by:324
Symbol 324 MovieClip {_fla.Timeline_132}Uses:323Used by:330
Symbol 325 TextUses:292Used by:330
Symbol 326 TextUses:292Used by:330
Symbol 327 GraphicUsed by:328
Symbol 328 ButtonUses:327Used by:329
Symbol 329 MovieClip {_fla.Timeline_31}Uses:328Used by:330  Timeline
Symbol 330 MovieClip {fkdxn_fla.Timeline_101}Uses:317 321 324 325 326 329Used by:348
Symbol 331 GraphicUsed by:336
Symbol 332 GraphicUsed by:333
Symbol 333 MovieClipUses:332Used by:336
Symbol 334 GraphicUsed by:335
Symbol 335 MovieClipUses:334Used by:336
Symbol 336 MovieClipUses:331 333 335Used by:348
Symbol 337 BitmapUsed by:338 345
Symbol 338 GraphicUses:337Used by:340
Symbol 339 TextUses:292Used by:340
Symbol 340 MovieClipUses:338 339Used by:348
Symbol 341 MovieClipUses:298 295Used by:342
Symbol 342 MovieClipUses:341Used by:348  Timeline
Symbol 343 TextUses:292Used by:344
Symbol 344 MovieClipUses:343 295Used by:348
Symbol 345 GraphicUses:337Used by:347
Symbol 346 MovieClipUses:314 315Used by:347
Symbol 347 MovieClipUses:345 346Used by:348
Symbol 348 MovieClip {fkdxn_fla.Timeline_96}Uses:336 340 291 342 344 347 330 316Used by:Timeline
Symbol 349 BitmapUsed by:350
Symbol 350 GraphicUses:349Used by:351 414
Symbol 351 MovieClipUses:350Used by:354
Symbol 352 GraphicUsed by:353
Symbol 353 MovieClipUses:352Used by:354
Symbol 354 MovieClip {display.display_fore}Uses:351 353Used by:Timeline
Symbol 355 GraphicUsed by:356
Symbol 356 MovieClipUses:355Used by:357
Symbol 357 MovieClipUses:356Used by:375
Symbol 358 GraphicUsed by:371
Symbol 359 GraphicUsed by:360
Symbol 360 MovieClipUses:359Used by:371
Symbol 361 GraphicUsed by:362
Symbol 362 MovieClipUses:361Used by:371
Symbol 363 GraphicUsed by:371
Symbol 364 GraphicUsed by:365
Symbol 365 MovieClipUses:364Used by:366
Symbol 366 MovieClipUses:365Used by:371 411
Symbol 367 GraphicUsed by:368
Symbol 368 MovieClipUses:367Used by:371
Symbol 369 GraphicUsed by:371
Symbol 370 GraphicUsed by:371
Symbol 371 MovieClipUses:358 360 362 363 366 368 369 370Used by:375
Symbol 372 GraphicUsed by:374
Symbol 373 GraphicUsed by:374
Symbol 374 MovieClipUses:372 373Used by:375
Symbol 375 MovieClip {display.display_middle}Uses:357 371 374Used by:Timeline
Symbol 376 GraphicUsed by:377
Symbol 377 MovieClip {display.display_back}Uses:376Used by:Timeline
Symbol 378 GraphicUsed by:385
Symbol 379 BitmapUsed by:380 383 384
Symbol 380 GraphicUses:379Used by:385
Symbol 381 GraphicUsed by:382
Symbol 382 MovieClipUses:381Used by:385
Symbol 383 GraphicUses:379Used by:385
Symbol 384 GraphicUses:379Used by:385
Symbol 385 MovieClip {fkdxn_fla.Timeline_80}Uses:378 380 382 383 384Used by:Timeline
Symbol 386 MovieClipUses:195Used by:387
Symbol 387 MovieClip {fkdxn_fla.Timeline_186}Uses:386Used by:455
Symbol 388 GraphicUsed by:389
Symbol 389 MovieClipUses:388Used by:390 577  Timeline
Symbol 390 MovieClip {fkdxn_fla.Timeline_4}Uses:389Used by:Timeline
Symbol 391 BitmapUsed by:392
Symbol 392 GraphicUses:391Used by:393
Symbol 393 MovieClip {fkdxn_fla.Timeline_3}Uses:392Used by:Timeline
Symbol 394 GraphicUsed by:Timeline
Symbol 395 GraphicUsed by:396
Symbol 396 MovieClipUses:395Used by:397
Symbol 397 MovieClipUses:396Used by:404
Symbol 398 GraphicUsed by:401
Symbol 399 FontUsed by:400 565
Symbol 400 TextUses:399Used by:401
Symbol 401 MovieClip {_fla.button_5}Uses:398 400Used by:404
Symbol 402 GraphicUsed by:403
Symbol 403 MovieClipUses:402Used by:404
Symbol 404 MovieClip {_fla.Timeline_2}Uses:397 401 403Used by:Timeline
Symbol 405 GraphicUsed by:Timeline
Symbol 406 BitmapUsed by:408
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:406 407Used by:409
Symbol 409 MovieClipUses:408Used by:Timeline
Symbol 410 GraphicUsed by:411
Symbol 411 MovieClipUses:366 410Used by:412
Symbol 412 MovieClipUses:411Used by:413
Symbol 413 MovieClipUses:412Used by:Timeline
Symbol 414 MovieClipUses:350Used by:415
Symbol 415 MovieClipUses:414Used by:416
Symbol 416 MovieClipUses:415Used by:Timeline
Symbol 417 GraphicUsed by:Timeline
Symbol 418 BitmapUsed by:419
Symbol 419 GraphicUses:418Used by:Timeline
Symbol 420 GraphicUsed by:427 455 456
Symbol 421 GraphicUsed by:422 438 444 448 456
Symbol 422 MovieClipUses:421Used by:427 438 444 448 455
Symbol 423 GraphicUsed by:427
Symbol 424 MovieClipUsed by:427
Symbol 425 GraphicUsed by:427
Symbol 426 TextUses:292Used by:427
Symbol 427 MovieClipUses:314 420 422 423 424 425 426Used by:Timeline
Symbol 428 BitmapUsed by:430
Symbol 429 BitmapUsed by:430 461 544
Symbol 430 GraphicUses:428 429Used by:Timeline
Symbol 431 EditableTextUses:292Used by:Timeline
Symbol 432 GraphicUsed by:438 444 448
Symbol 433 GraphicUsed by:438
Symbol 434 GraphicUsed by:435 438 444 448
Symbol 435 MovieClipUses:434Used by:438 444 448
Symbol 436 GraphicUsed by:438 444 448
Symbol 437 EditableTextUses:292Used by:438
Symbol 438 ButtonUses:314 432 422 433 435 436 437 421 434Used by:441
Symbol 439 GraphicUsed by:440
Symbol 440 MovieClipUses:439Used by:441 445 449
Symbol 441 MovieClipUses:438 440Used by:Timeline
Symbol 442 GraphicUsed by:444
Symbol 443 EditableTextUses:292Used by:444
Symbol 444 ButtonUses:314 432 422 442 435 436 443 421 434Used by:445
Symbol 445 MovieClipUses:444 440Used by:Timeline
Symbol 446 GraphicUsed by:448
Symbol 447 EditableTextUses:292Used by:448
Symbol 448 ButtonUses:314 432 422 446 435 436 447 421 434Used by:449
Symbol 449 MovieClipUses:448 440Used by:Timeline
Symbol 450 GraphicUsed by:455 456
Symbol 451 EditableTextUses:292Used by:452 456
Symbol 452 MovieClipUses:451Used by:455
Symbol 453 GraphicUsed by:455 456
Symbol 454 GraphicUsed by:455 456
Symbol 455 MovieClipUses:314 420 422 450 452 453 387 454Used by:456
Symbol 456 ButtonUses:455 314 420 421 450 451 453 194 454Used by:457
Symbol 457 MovieClipUses:456Used by:Timeline
Symbol 458 GraphicUsed by:459
Symbol 459 MovieClipUses:458Used by:Timeline
Symbol 460 EditableTextUses:292Used by:Timeline
Symbol 461 GraphicUses:429Used by:462
Symbol 462 ButtonUses:461Used by:Timeline
Symbol 463 GraphicUsed by:Timeline
Symbol 464 BitmapUsed by:465 467 473 475
Symbol 465 GraphicUses:464Used by:466
Symbol 466 ButtonUses:465Used by:Timeline
Symbol 467 GraphicUses:464Used by:468
Symbol 468 ButtonUses:467Used by:Timeline
Symbol 469 GraphicUsed by:470
Symbol 470 MovieClipUses:469Used by:471
Symbol 471 MovieClipUses:301 470Used by:472
Symbol 472 MovieClipUses:471Used by:Timeline
Symbol 473 GraphicUses:464Used by:474
Symbol 474 MovieClipUses:473Used by:Timeline
Symbol 475 GraphicUses:464Used by:Timeline
Symbol 476 GraphicUsed by:543
Symbol 477 BitmapUsed by:478
Symbol 478 GraphicUses:477Used by:481 484 487 490 493 496 499 502 505 508 511 514 517 520 523 526 529 532 535 538 541
Symbol 479 FontUsed by:480 483 486 489 492 495 498 501 504 507 510 513 516 519 522 525 528 531 534 537 540
Symbol 480 TextUses:479Used by:481
Symbol 481 MovieClipUses:478 480Used by:482
Symbol 482 MovieClipUses:481Used by:543
Symbol 483 TextUses:479Used by:484
Symbol 484 MovieClipUses:478 483Used by:485
Symbol 485 MovieClipUses:484Used by:543
Symbol 486 TextUses:479Used by:487
Symbol 487 MovieClipUses:478 486Used by:488
Symbol 488 MovieClipUses:487Used by:543
Symbol 489 TextUses:479Used by:490
Symbol 490 MovieClipUses:478 489Used by:491
Symbol 491 MovieClipUses:490Used by:543
Symbol 492 TextUses:479Used by:493
Symbol 493 MovieClipUses:478 492Used by:494
Symbol 494 MovieClipUses:493Used by:543
Symbol 495 TextUses:479Used by:496
Symbol 496 MovieClipUses:478 495Used by:497
Symbol 497 MovieClipUses:496Used by:543
Symbol 498 TextUses:479Used by:499
Symbol 499 MovieClipUses:478 498Used by:500
Symbol 500 MovieClipUses:499Used by:543
Symbol 501 TextUses:479Used by:502
Symbol 502 MovieClipUses:478 501Used by:503
Symbol 503 MovieClipUses:502Used by:543
Symbol 504 TextUses:479Used by:505
Symbol 505 MovieClipUses:478 504Used by:506
Symbol 506 MovieClipUses:505Used by:543
Symbol 507 TextUses:479Used by:508
Symbol 508 MovieClipUses:478 507Used by:509
Symbol 509 MovieClipUses:508Used by:543
Symbol 510 TextUses:479Used by:511
Symbol 511 MovieClipUses:478 510Used by:512
Symbol 512 MovieClipUses:511Used by:543
Symbol 513 TextUses:479Used by:514
Symbol 514 MovieClipUses:478 513Used by:515
Symbol 515 MovieClipUses:514Used by:543
Symbol 516 TextUses:479Used by:517
Symbol 517 MovieClipUses:478 516Used by:518
Symbol 518 MovieClipUses:517Used by:543
Symbol 519 TextUses:479Used by:520
Symbol 520 MovieClipUses:478 519Used by:521
Symbol 521 MovieClipUses:520Used by:543
Symbol 522 TextUses:479Used by:523
Symbol 523 MovieClipUses:478 522Used by:524
Symbol 524 MovieClipUses:523Used by:543
Symbol 525 TextUses:479Used by:526
Symbol 526 MovieClipUses:478 525Used by:527
Symbol 527 MovieClipUses:526Used by:543
Symbol 528 TextUses:479Used by:529
Symbol 529 MovieClipUses:478 528Used by:530
Symbol 530 MovieClipUses:529Used by:543
Symbol 531 TextUses:479Used by:532
Symbol 532 MovieClipUses:478 531Used by:533
Symbol 533 MovieClipUses:532Used by:543
Symbol 534 TextUses:479Used by:535
Symbol 535 MovieClipUses:478 534Used by:536
Symbol 536 MovieClipUses:535Used by:543
Symbol 537 TextUses:479Used by:538
Symbol 538 MovieClipUses:478 537Used by:539
Symbol 539 MovieClipUses:538Used by:543
Symbol 540 TextUses:479Used by:541
Symbol 541 MovieClipUses:478 540Used by:542
Symbol 542 MovieClipUses:541Used by:543
Symbol 543 MovieClipUses:476 482 485 488 491 494 497 500 503 506 509 512 515 518 521 524 527 530 533 536 539 542Used by:Timeline
Symbol 544 GraphicUses:429Used by:Timeline
Symbol 545 GraphicUsed by:548 550
Symbol 546 FontUsed by:547 549
Symbol 547 EditableTextUses:546Used by:548
Symbol 548 MovieClipUses:545 547Used by:Timeline
Symbol 549 EditableTextUses:546Used by:550
Symbol 550 MovieClipUses:545 549Used by:Timeline
Symbol 551 GraphicUsed by:559
Symbol 552 GraphicUsed by:553
Symbol 553 MovieClipUses:552Used by:559
Symbol 554 GraphicUsed by:555
Symbol 555 MovieClipUses:554Used by:559
Symbol 556 GraphicUsed by:559
Symbol 557 GraphicUsed by:558
Symbol 558 MovieClipUses:557Used by:559
Symbol 559 MovieClipUses:551 553 555 556 558Used by:Timeline
Symbol 560 GraphicUsed by:561
Symbol 561 MovieClipUses:560Used by:Timeline
Symbol 562 GraphicUsed by:563
Symbol 563 MovieClipUses:562Used by:Timeline
Symbol 564 FontUsed by:565
Symbol 565 EditableTextUses:399 564Used by:Timeline
Symbol 566 GraphicUsed by:577
Symbol 567 GraphicUsed by:568
Symbol 568 MovieClipUses:567Used by:570
Symbol 569 GraphicUsed by:570
Symbol 570 MovieClipUses:568 569Used by:571
Symbol 571 MovieClipUses:570Used by:577
Symbol 572 GraphicUsed by:573
Symbol 573 MovieClipUses:572Used by:574
Symbol 574 MovieClipUses:573Used by:576
Symbol 575 GraphicUsed by:576
Symbol 576 MovieClipUses:574 575Used by:577
Symbol 577 MovieClipUses:566 389 571 576Used by:Timeline

Instance Names

"btn_start"Frame 3Symbol 427 MovieClip
"btn_part2"Frame 4Symbol 441 MovieClip
"btn_part3"Frame 4Symbol 445 MovieClip
"btn_part4"Frame 4Symbol 449 MovieClip
"btn_part1"Frame 4Symbol 457 MovieClip
"guslevelmask"Frame 5Symbol 459 MovieClip
"gusSelectLeft"Frame 5Symbol 466 Button
"gusSelectRight"Frame 5Symbol 468 Button
"gusLevel"Frame 5Symbol 543 MovieClip
"comic"Frame 6Symbol 385 MovieClip {fkdxn_fla.Timeline_80}
"dis_back"Frame 7Symbol 377 MovieClip {display.display_back}
"dis_middle"Frame 7Symbol 375 MovieClip {display.display_middle}
"g_bird"Frame 7Symbol 548 MovieClip
"g_enemy"Frame 7Symbol 550 MovieClip
"weapon"Frame 7Symbol 559 MovieClip
"dis_fore"Frame 7Symbol 354 MovieClip {display.display_fore}
"outPoint"Frame 7Symbol 561 MovieClip
"resultBoard"Frame 7Symbol 348 MovieClip {fkdxn_fla.Timeline_96}
"btn_fresh"Frame 7Symbol 291 MovieClip
"btn_menu"Frame 7Symbol 342 MovieClip
"menuI"Frame 7Symbol 313 MovieClip {fkdxn_fla.Timeline_103}
"mainMask"Frame 7Symbol 563 MovieClip
"report"Frame 7Symbol 565 EditableText
"m2"Frame 7Symbol 283 MovieClip {fkdxn_fla.Timeline_108}
"m"Frame 7Symbol 280 MovieClip {fkdxn_fla.Timeline_109}
"m2"Frame 7Symbol 283 MovieClip {fkdxn_fla.Timeline_108}
"mc_loading"Frame 7Symbol 577 MovieClip
"btn_cancel"Symbol 308 MovieClip Frame 1Symbol 288 MovieClip
"btn_fresh"Symbol 308 MovieClip Frame 1Symbol 291 MovieClip
"btn_menu"Symbol 308 MovieClip Frame 1Symbol 297 MovieClip
"btn_index"Symbol 308 MovieClip Frame 1Symbol 300 MovieClip
"btn_sound"Symbol 308 MovieClip Frame 1Symbol 307 MovieClip {fkdxn_fla.Timeline_36}
"menuI"Symbol 313 MovieClip {fkdxn_fla.Timeline_103} Frame 1Symbol 308 MovieClip
"btn"Symbol 321 MovieClip {_fla.Timeline_21} Frame 1Symbol 320 Button
"btm"Symbol 324 MovieClip {_fla.Timeline_132} Frame 1Symbol 323 Button
"btn"Symbol 329 MovieClip {_fla.Timeline_31} Frame 1Symbol 328 Button
"btn_menu_Walkthough"Symbol 330 MovieClip {fkdxn_fla.Timeline_101} Frame 1Symbol 324 MovieClip {_fla.Timeline_132}
"btn_retry"Symbol 348 MovieClip {fkdxn_fla.Timeline_96} Frame 1Symbol 291 MovieClip
"btn_select"Symbol 348 MovieClip {fkdxn_fla.Timeline_96} Frame 1Symbol 342 MovieClip
"btn_next"Symbol 348 MovieClip {fkdxn_fla.Timeline_96} Frame 1Symbol 344 MovieClip
"levelInfo"Symbol 348 MovieClip {fkdxn_fla.Timeline_96} Frame 1Symbol 330 MovieClip {fkdxn_fla.Timeline_101}
"mc_star"Symbol 348 MovieClip {fkdxn_fla.Timeline_96} Frame 1Symbol 316 MovieClip {fkdxn_fla.Timeline_102}
"p1"Symbol 354 MovieClip {display.display_fore} Frame 1Symbol 353 MovieClip
"p2"Symbol 354 MovieClip {display.display_fore} Frame 1Symbol 353 MovieClip
"closeButton"Symbol 404 MovieClip {_fla.Timeline_2} Frame 1Symbol 401 MovieClip {_fla.button_5}
"adBox"Symbol 404 MovieClip {_fla.Timeline_2} Frame 1Symbol 403 MovieClip
"btn_level1"Symbol 543 MovieClip Frame 1Symbol 482 MovieClip
"btn_level2"Symbol 543 MovieClip Frame 1Symbol 485 MovieClip
"btn_level3"Symbol 543 MovieClip Frame 1Symbol 488 MovieClip
"btn_level4"Symbol 543 MovieClip Frame 1Symbol 491 MovieClip
"btn_level5"Symbol 543 MovieClip Frame 1Symbol 494 MovieClip
"btn_level6"Symbol 543 MovieClip Frame 1Symbol 497 MovieClip
"btn_level7"Symbol 543 MovieClip Frame 1Symbol 500 MovieClip
"btn_level8"Symbol 543 MovieClip Frame 1Symbol 503 MovieClip
"btn_level9"Symbol 543 MovieClip Frame 1Symbol 506 MovieClip
"btn_level10"Symbol 543 MovieClip Frame 1Symbol 509 MovieClip
"btn_level11"Symbol 543 MovieClip Frame 1Symbol 512 MovieClip
"btn_level12"Symbol 543 MovieClip Frame 1Symbol 515 MovieClip
"btn_level13"Symbol 543 MovieClip Frame 1Symbol 518 MovieClip
"btn_level14"Symbol 543 MovieClip Frame 1Symbol 521 MovieClip
"btn_level15"Symbol 543 MovieClip Frame 1Symbol 524 MovieClip
"btn_level16"Symbol 543 MovieClip Frame 1Symbol 527 MovieClip
"btn_level17"Symbol 543 MovieClip Frame 1Symbol 530 MovieClip
"btn_level18"Symbol 543 MovieClip Frame 1Symbol 533 MovieClip
"btn_level19"Symbol 543 MovieClip Frame 1Symbol 536 MovieClip
"btn_level20"Symbol 543 MovieClip Frame 1Symbol 539 MovieClip
"btn_level21"Symbol 543 MovieClip Frame 1Symbol 542 MovieClip
"lineMask1"Symbol 559 MovieClip Frame 1Symbol 553 MovieClip
"lineMask2"Symbol 559 MovieClip Frame 1Symbol 553 MovieClip
"blockMask"Symbol 559 MovieClip Frame 1Symbol 553 MovieClip
"birdMask"Symbol 559 MovieClip Frame 1Symbol 553 MovieClip
"birdOMask"Symbol 559 MovieClip Frame 1Symbol 553 MovieClip
"line2"Symbol 559 MovieClip Frame 1Symbol 555 MovieClip
"line1"Symbol 559 MovieClip Frame 1Symbol 555 MovieClip
"middle"Symbol 559 MovieClip Frame 1Symbol 555 MovieClip
"lineClick"Symbol 559 MovieClip Frame 1Symbol 558 MovieClip

Special Tags

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




http://swfchan.com/24/115627/info.shtml
Created: 9/3 -2019 11:00:39 Last modified: 9/3 -2019 11:00:39 Server time: 19/04 -2024 11:45:19