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

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

Amberial Axis.swf

This is the info page for
Flash #65222

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


Text
Big Circle

Big Circle

Block

Block

Bridge

Bridge

Circle

Circle

Column

Column

Diagonal 45°

Diagonal 45°

Diagonal A

Diagonal A

Diagonal B

Diagonal B

Diagonal 45°
(Inverted)

Diagonal 45°
(Inverted)

Diagonal A
(Inverted)

Diagonal A
(Inverted)

Diagonal B
(Inverted)

Diagonal B
(Inverted)

Platform

Platform

Small Block

Small Block

Very Big Circle

Very Big Circle

Cavity

Magma Block

Magma Block

Fast Follower

Fast Follower

Horizontal Hitter

Horizontal Hitter

Horizontal Magma

Horizontal Magma

Slow Follower

Slow Follower

Vertical Hitter

Vertical Hitter

Vertical Magma

Vertical Magma

Big Block

Big Block

Big Circle

Big Circle

Block

Block

Circle

Circle

Column

Column

Platform A

Platform A

Platform B

Platform B

Platform C

Platform C

Elevator

Elevator

Vertical Force
Column

Vertical Force
Column

Motor

Motor

Big Circle Motor

Big Circle Motor

Big Circle Motor
(Inverted)

Big Circle Motor
(Inverted)

Small Circle Motor

Small Circle Motor

Small Circle Motor
(Inverted)

Small Circle Motor
(Inverted)

Motor
(Inverted)

Motor
(Inverted)

m

r

o

f

t

a

l

P

g

n

i

e

p

s

D

Disappearing Platform

Gravity Down

Gravity Down

Rotating Plank

Hanging Plank

Spring

Pendulum

Gravity Up

Gravity Up

Gravity Left

Gravity Left

Gravity Right

Gravity Right

Checkpoint

Checkpoint

Finish

h

s

i

n

F

Start

Start

<p align="left"><font face="PixelSplitter" size="14" color="#ff9900" letterSpacing="0.000000" kerning="1">Blue jazz -- evil-genius</font></p>

Use the <- and ->
arrow keys to move

mouse over the top left area to bring down the music player

red obstacles will
destroy you!

These are checkpoints,
touch them all to open the exit

thats it!
You did it

as a shorcut,
you can press Press "e" to exit and "r" to restart

<p align="center"><font face="PixelSplitter" size="20" color="#ffce84" letterSpacing="0.000000" kerning="1">00</font></p>

Time

(E)xit

(R)estart

Checkpoints

<p align="center"><font face="PixelSplitter" size="20" color="#ffffff" letterSpacing="0.000000" kerning="1">0/0</font></p>

Play more coolbuddy.com games

Level Editor

Programacion en el simbolo "Grid"

Background

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="left"><font face="PixelSplitter" size="14" color="#fffffc" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="center"><font face="PixelSplitter" size="12" color="#f1ac25" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="left"><font face="PixelSplitter" size="14" color="#fffffc" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="left"><font face="PixelSplitter" size="14" color="#fffffc" letterSpacing="0.000000" kerning="1">-</font></p>

<p align="left"><font face="PixelSplitter" size="14" color="#fffffc" letterSpacing="0.000000" kerning="1">-</font></p>

ActionScript [AS3]

Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2CircleDef extends b2ShapeDef { public var radius:Number; public var localPosition:b2Vec2; public function b2CircleDef(){ localPosition = new b2Vec2(0, 0); super(); type = b2Shape.e_circleShape; radius = 1; } } }//package Box2D.Collision.Shapes
Section 2
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { 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 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.x + ((_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); } public function GetLocalPosition():b2Vec2{ return (m_localPosition); } public function GetRadius():Number{ return (m_radius); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; _local4 = _arg2.R; var _local5:Number = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); var _local6:Number = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _local4 = _arg3.R; var _local7:Number = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); var _local8:Number = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((Math.min(_local5, _local7) - m_radius), (Math.min(_local6, _local8) - m_radius)); _arg1.upperBound.Set((Math.max(_local5, _local7) + m_radius), (Math.max(_local6, _local8) + m_radius)); } override public function ComputeMass(_arg1:b2MassData):void{ _arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius); _arg1.center.SetV(m_localPosition); _arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y)))); } override 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); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22 = _arg2.R; var _local4:Number = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); var _local5:Number = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius)); _arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius)); } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22 = _arg1.R; var _local4:Number = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); var _local5:Number = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _local4 = (_arg2.x - _local4); _local5 = (_arg2.y - _local5); return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius))); } } }//package Box2D.Collision.Shapes
Section 3
//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 4
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolygonDef extends b2ShapeDef { public var vertices:Array; public var vertexCount:int; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonDef(){ vertices = new Array(b2Settings.b2_maxPolygonVertices); super(); type = b2Shape.e_polygonShape; vertexCount = 0; var _local1:int; while (_local1 < b2Settings.b2_maxPolygonVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } public function SetAsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{ var _local5:b2Vec2; var _local6:b2Mat22; var _local7:int; vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); if (_arg3){ _local5 = _arg3; _local6 = s_mat; _local6.Set(_arg4); _local7 = 0; while (_local7 < vertexCount) { _arg3 = vertices[_local7]; _arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y))); _arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y))); _arg3.x = _arg1; _local7++; }; }; } public function SetAsBox(_arg1:Number, _arg2:Number):void{ vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); } } }//package Box2D.Collision.Shapes
Section 5
//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 { public var m_coreVertices:Array; public var m_vertices:Array; private var s_supportVec:b2Vec2; public var m_centroid:b2Vec2; public var m_normals:Array; public var m_obb:b2OBB; 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++; }; } public function GetCoreVertices():Array{ return (m_coreVertices); } public function GetVertices():Array{ return (m_vertices); } 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(Math.min(_local4.lowerBound.x, _local5.lowerBound.x), Math.min(_local4.lowerBound.y, _local5.lowerBound.y)); _arg1.upperBound.Set(Math.max(_local4.upperBound.x, _local5.upperBound.x), Math.max(_local4.upperBound.y, _local5.upperBound.y)); } public function GetCentroid():b2Vec2{ return (m_centroid); } public function GetOBB():b2OBB{ return (m_obb); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_coreVertices[0])); } public function Centroid(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_centroid)); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):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) { _local8 = (m_vertices[_local19].x - _local12); _local9 = (m_vertices[_local19].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 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[(_local9 + 1)] : m_vertices[0]; _local12 = (_local10.x - _local6); _local13 = (_local10.y - _local7); _local14 = (_local11.x - _local6); _local15 = (_local11.y - _local7); _local16 = ((_local12 * _local15) - (_local13 * _local14)); _local17 = (0.5 * _local16); _local4 = (_local4 + _local17); _local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x))); _local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y))); _local18 = _local6; _local19 = _local7; _local20 = _local12; _local21 = _local13; _local22 = _local14; _local23 = _local15; _local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18)); _local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local5 = (_local5 + (_local16 * (_local24 + _local25))); _local9++; }; _arg1.mass = (m_density * _local4); _local2 = (_local2 * (1 / _local4)); _local3 = (_local3 * (1 / _local4)); _arg1.center.Set(_local2, _local3); _arg1.I = (m_density * _local5); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Mat22; var _local11:Number; _local4 = _arg1.R; var _local5:Number = ((_arg2 * _local4.col1.x) + (_arg3 * _local4.col1.y)); var _local6:Number = ((_arg2 * _local4.col2.x) + (_arg3 * _local4.col2.y)); var _local7:int; var _local8:Number = ((m_coreVertices[0].x * _local5) + (m_coreVertices[0].y * _local6)); var _local9 = 1; while (_local9 < m_vertexCount) { _local11 = ((m_coreVertices[_local9].x * _local5) + (m_coreVertices[_local9].y * _local6)); if (_local11 > _local8){ _local7 = _local9; _local8 = _local11; }; _local9++; }; _local4 = _arg1.R; var _local10:b2Vec2 = m_coreVertices[_local7]; s_supportVec.x = (_arg1.position.x + ((_local4.col1.x * _local10.x) + (_local4.col2.x * _local10.y))); s_supportVec.y = (_arg1.position.y + ((_local4.col1.y * _local10.x) + (_local4.col2.y * _local10.y))); return (s_supportVec); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local3:Number; var _local4:Number; m_sweepRadius = 0; var _local2:int; while (_local2 < m_vertexCount) { _local3 = (m_coreVertices[_local2].x - _arg1.x); _local4 = (m_coreVertices[_local2].y - _arg1.y); _local3 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); m_sweepRadius = Math.max(m_sweepRadius, _local3); _local2++; }; } 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)); } public function GetVertexCount():int{ return (m_vertexCount); } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local9:Number; var _local3:b2Mat22 = _arg1.R; var _local4:Number = (_arg2.x - _arg1.position.x); var _local5:Number = (_arg2.y - _arg1.position.y); var _local6:Number = ((_local4 * _local3.col1.x) + (_local5 * _local3.col1.y)); var _local7:Number = ((_local4 * _local3.col2.x) + (_local5 * _local3.col2.y)); var _local8:int; while (_local8 < m_vertexCount) { _local4 = (_local6 - m_vertices[_local8].x); _local5 = (_local7 - m_vertices[_local8].y); _local9 = ((m_normals[_local8].x * _local4) + (m_normals[_local8].y * _local5)); if (_local9 > 0){ return (false); }; _local8++; }; return (true); } public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{ var _local3:b2Vec2; var _local7:Number; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = new b2Vec2(); var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; _local7 = (1 / 3); var _local8:int; while (_local8 < _arg2) { _local9 = _arg1[_local8]; _local10 = (((_local8 + 1) < _arg2)) ? _arg1[(_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[(_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)); _local13 = Math.min(_local13, _local21); _local14 = Math.min(_local14, _local22); _local15 = Math.max(_local15, _local21); _local16 = Math.max(_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 6
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; public class b2Shape { public var m_next:b2Shape; public var m_type:int; public var m_restitution:Number; public var m_sweepRadius:Number; public var m_userData; public var m_density:Number; public var m_proxyId:uint; public var m_friction:Number; public var m_isSensor:Boolean; public var m_groupIndex:int; public var m_categoryBits:uint; public var m_body:b2Body; public var m_maskBits:uint; public static const e_polygonShape:int = 1; public static const e_unknownShape:int = -1; public static const e_circleShape:int = 0; public static const e_shapeTypeCount:int = 2; private static var s_resetAABB:b2AABB = new b2AABB(); private static var s_syncAABB:b2AABB = new b2AABB(); private static var s_proxyAABB:b2AABB = new b2AABB(); public function b2Shape(_arg1:b2ShapeDef){ m_userData = _arg1.userData; m_friction = _arg1.friction; m_restitution = _arg1.restitution; m_density = _arg1.density; m_body = null; m_sweepRadius = 0; m_next = null; m_proxyId = b2Pair.b2_nullProxy; m_categoryBits = _arg1.categoryBits; m_maskBits = _arg1.maskBits; m_groupIndex = _arg1.groupIndex; m_isSensor = _arg1.isSensor; } public function GetSweepRadius():Number{ return (m_sweepRadius); } public function GetNext():b2Shape{ return (m_next); } public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ } public function GetType():int{ return (m_type); } public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ return (false); } public function IsSensor():Boolean{ return (m_isSensor); } public function ComputeMass(_arg1:b2MassData):void{ } 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 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 UpdateSweepRadius(_arg1:b2Vec2):void{ } public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ } public function GetBody():b2Body{ return (m_body); } public function GetUserData(){ return (m_userData); } public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } public function ResetProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ if (m_proxyId != b2Pair.b2_nullProxy){ _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 static function Destroy(_arg1:b2Shape, _arg2):void{ } public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{ switch (_arg1.type){ case e_circleShape: return (new b2CircleShape(_arg1)); case e_polygonShape: return (new b2PolygonShape(_arg1)); default: return (null); }; } } }//package Box2D.Collision.Shapes
Section 7
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { public class b2ShapeDef { public var friction:Number; public var groupIndex:int; public var categoryBits:int; public var density:Number; public var restitution:Number; public var maskBits:int; public var userData;// = null public var type:int; public var isSensor:Boolean; public function b2ShapeDef(){ type = b2Shape.e_unknownShape; userData = null; friction = 0.2; restitution = 0; density = 0; categoryBits = 1; maskBits = 0xFFFF; groupIndex = 0; isSensor = false; } } }//package Box2D.Collision.Shapes
Section 8
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var upperBound:b2Vec2; public var lowerBound:b2Vec2; public function b2AABB(){ lowerBound = new b2Vec2(); upperBound = new b2Vec2(); super(); } public function IsValid():Boolean{ var _local1:Number = (upperBound.x - lowerBound.x); var _local2:Number = (upperBound.y - lowerBound.y); var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 9
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var value:uint; public var proxyId:uint; public var stabbingCount:uint; 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; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Box2D.Collision
Section 10
//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 11
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { public var m_bounds:Array; public var m_quantizationFactor:b2Vec2; public var m_worldAABB:b2AABB; public var m_freeProxy:uint; public var m_proxyCount:int; public var m_proxyPool:Array; public var m_queryResultCount:int; public var m_pairManager:b2PairManager; public var m_timeStamp:uint; public var m_queryResults:Array; public static const b2_nullEdge:uint = b2Settings.USHRT_MAX; public static const b2_invalid:uint = b2Settings.USHRT_MAX; public static var s_validate:Boolean = false; public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){ var _local3:int; var _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); var _local5:Number = (_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[(b2Settings.b2_maxProxies - 1)] = _local6; _local6.SetNext(b2Pair.b2_nullProxy); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; m_freeProxy = 0; m_timeStamp = 1; m_queryResultCount = 0; } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _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 Commit():void{ m_pairManager.Commit(); } public function GetProxy(_arg1:int):b2Proxy{ if ((((_arg1 == b2Pair.b2_nullProxy)) || ((m_proxyPool[_arg1].IsValid() == false)))){ return (null); }; return (m_proxyPool[_arg1]); } private function IncrementTimeStamp():void{ var _local1:uint; if (m_timeStamp == b2Settings.USHRT_MAX){ _local1 = 0; while (_local1 < b2Settings.b2_maxProxies) { m_proxyPool[_local1].timeStamp = 0; _local1++; }; m_timeStamp = 1; } else { m_timeStamp++; }; } private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{ var _local11:int; var _local12:int; var _local13:b2Proxy; var _local8:uint = BinarySearch(_arg5, _arg6, _arg3); var _local9:uint = BinarySearch(_arg5, _arg6, _arg4); var _local10:uint = _local8; while (_local10 < _local9) { if (_arg5[_local10].IsLower()){ IncrementOverlapCount(_arg5[_local10].proxyId); }; _local10++; }; if (_local8 > 0){ _local11 = (_local8 - 1); _local12 = _arg5[_local11].stabbingCount; while (_local12) { if (_arg5[_local11].IsLower()){ _local13 = m_proxyPool[_arg5[_local11].proxyId]; if (_local8 <= _local13.upperBounds[_arg7]){ IncrementOverlapCount(_arg5[_local11].proxyId); _local12--; }; }; _local11--; }; }; _arg1[0] = _local8; _arg2[0] = _local9; } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local3:int; while (_local3 < 2) { _local4 = m_bounds[_local3]; if (_local4[_arg1.lowerBounds[_local3]].value > _local4[_arg2.upperBounds[_local3]].value){ return (false); }; if (_local4[_arg1.upperBounds[_local3]].value < _local4[_arg2.lowerBounds[_local3]].value){ return (false); }; _local3++; }; return (true); } private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{ var _local4:Number = _arg3.lowerBound.x; var _local5:Number = _arg3.lowerBound.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y); var _local6:Number = _arg3.upperBound.x; var _local7:Number = _arg3.upperBound.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1); } public function CreateProxy(_arg1:b2AABB, _arg2):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:int; var _local22: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[(_local13 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local21 = (_local13 + 2); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[(_local21 + _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[(_local12 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local21 = (_local12 + 1); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[(_local21 + _local17)]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local13++; _local11[_local12].value = _local7[_local9]; _local11[_local12].proxyId = _local5; _local11[_local13].value = _local8[_local9]; _local11[_local13].proxyId = _local5; _local11[_local12].stabbingCount = ((_local12 == 0)) ? 0 : _local11[(_local12 - 1)].stabbingCount; _local11[_local13].stabbingCount = _local11[(_local13 - 1)].stabbingCount; _local3 = _local12; while (_local3 < _local13) { _local11[_local3].stabbingCount++; _local3++; }; _local3 = _local12; while (_local3 < (_local6 + 2)) { _local22 = m_proxyPool[_local11[_local3].proxyId]; if (_local11[_local3].IsLower()){ _local22.lowerBounds[_local9] = _local3; } else { _local22.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 _local6:Array; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:Array; var _local12:int; var _local13:int; var _local14:b2Bound; var _local15:b2Bound; var _local16:int; var _local17:uint; var _local18:int; var _local19:b2Proxy; var _local2:b2Proxy = m_proxyPool[_arg1]; var _local3:int = (2 * m_proxyCount); var _local4:int; while (_local4 < 2) { _local6 = m_bounds[_local4]; _local7 = _local2.lowerBounds[_local4]; _local8 = _local2.upperBounds[_local4]; _local9 = _local6[_local7].value; _local10 = _local6[_local8].value; _local11 = new Array(); _local13 = ((_local8 - _local7) - 1); _local12 = 0; while (_local12 < _local13) { _local11[_local12] = new b2Bound(); _local14 = _local11[_local12]; _local15 = _local6[((_local7 + 1) + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local13 = _local11.length; _local16 = _local7; _local12 = 0; while (_local12 < _local13) { _local15 = _local11[_local12]; _local14 = _local6[(_local16 + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local11 = new Array(); _local13 = ((_local3 - _local8) - 1); _local12 = 0; while (_local12 < _local13) { _local11[_local12] = new b2Bound(); _local14 = _local11[_local12]; _local15 = _local6[((_local8 + 1) + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local13 = _local11.length; _local16 = (_local8 - 1); _local12 = 0; while (_local12 < _local13) { _local15 = _local11[_local12]; _local14 = _local6[(_local16 + _local12)]; _local14.value = _local15.value; _local14.proxyId = _local15.proxyId; _local14.stabbingCount = _local15.stabbingCount; _local12++; }; _local13 = (_local3 - 2); _local17 = _local7; while (_local17 < _local13) { _local19 = m_proxyPool[_local6[_local17].proxyId]; if (_local6[_local17].IsLower()){ _local19.lowerBounds[_local4] = _local17; } else { _local19.upperBounds[_local4] = _local17; }; _local17++; }; _local13 = (_local8 - 1); _local18 = _local7; while (_local18 < _local13) { _local6[_local18].stabbingCount--; _local18++; }; Query([0], [0], _local9, _local10, _local6, (_local3 - 2), _local4); _local4++; }; var _local5:int; while (_local5 < m_queryResultCount) { m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local5]); _local5++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); _local2.userData = null; _local2.overlapCount = b2_invalid; _local2.lowerBounds[0] = b2_invalid; _local2.lowerBounds[1] = b2_invalid; _local2.upperBounds[0] = b2_invalid; _local2.upperBounds[1] = b2_invalid; _local2.SetNext(m_freeProxy); m_freeProxy = _arg1; m_proxyCount--; } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local4:Array; var _local3:int; while (_local3 < 2) { _local4 = m_bounds[_local3]; if (_arg1.lowerValues[_local3] > _local4[_arg2.upperBounds[_local3]].value){ return (false); }; if (_arg1.upperValues[_local3] < _local4[_arg2.lowerBounds[_local3]].value){ return (false); }; _local3++; }; return (true); } public function Validate():void{ var _local1:b2Pair; var _local2:b2Proxy; var _local3:b2Proxy; var _local4:Boolean; var _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local5:int; while (_local5 < 2) { _local6 = m_bounds[_local5]; _local7 = (2 * m_proxyCount); _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local10 = _local6[_local9]; if (_local10.IsLower() == true){ _local8++; } else { _local8--; }; _local9++; }; _local5++; }; } private function IncrementOverlapCount(_arg1: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++; }; } public function InRange(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = _arg1.lowerBound.x; _local3 = _arg1.lowerBound.y; _local2 = (_local2 - m_worldAABB.upperBound.x); _local3 = (_local3 - m_worldAABB.upperBound.y); _local4 = m_worldAABB.lowerBound.x; _local5 = m_worldAABB.lowerBound.y; _local4 = (_local4 - _arg1.upperBound.x); _local5 = (_local5 - _arg1.upperBound.y); _local2 = b2Math.b2Max(_local2, _local4); _local3 = b2Math.b2Max(_local3, _local5); return ((b2Math.b2Max(_local2, _local3) < 0)); } public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{ var _local3:uint; var _local4:uint; var _local5:b2Bound; var _local6:b2Bound; var _local7:b2Bound; var _local8:uint; var _local9:b2Proxy; var _local14:Array; var _local15:uint; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:int; var _local20:int; var _local21:uint; var _local22:b2Proxy; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){ return; }; if (_arg2.IsValid() == false){ return; }; var _local10:uint = (2 * m_proxyCount); var _local11:b2Proxy = m_proxyPool[_arg1]; var _local12:b2BoundValues = new b2BoundValues(); ComputeBounds(_local12.lowerValues, _local12.upperValues, _arg2); var _local13:b2BoundValues = new b2BoundValues(); _local3 = 0; while (_local3 < 2) { _local13.lowerValues[_local3] = m_bounds[_local3][_local11.lowerBounds[_local3]].value; _local13.upperValues[_local3] = m_bounds[_local3][_local11.upperBounds[_local3]].value; _local3++; }; _local3 = 0; while (_local3 < 2) { _local14 = m_bounds[_local3]; _local15 = _local11.lowerBounds[_local3]; _local16 = _local11.upperBounds[_local3]; _local17 = _local12.lowerValues[_local3]; _local18 = _local12.upperValues[_local3]; _local19 = (_local17 - _local14[_local15].value); _local20 = (_local18 - _local14[_local16].value); _local14[_local15].value = _local17; _local14[_local16].value = _local18; if (_local19 < 0){ _local4 = _local15; while ((((_local4 > 0)) && ((_local17 < _local14[(_local4 - 1)].value)))) { _local5 = _local14[_local4]; _local6 = _local14[(_local4 - 1)]; _local21 = _local6.proxyId; _local22 = m_proxyPool[_local6.proxyId]; _local6.stabbingCount++; if (_local6.IsUpper() == true){ if (TestOverlap(_local12, _local22)){ m_pairManager.AddBufferedPair(_arg1, _local21); }; var _local23 = _local22.upperBounds; var _local24 = _local3; var _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount++; } else { _local23 = _local22.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount--; }; _local23 = _local11.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.Swap(_local6); _local4--; }; }; if (_local20 > 0){ _local4 = _local16; while ((((_local4 < (_local10 - 1))) && ((_local14[(_local4 + 1)].value <= _local18)))) { _local5 = _local14[_local4]; _local7 = _local14[(_local4 + 1)]; _local8 = _local7.proxyId; _local9 = m_proxyPool[_local8]; _local7.stabbingCount++; if (_local7.IsLower() == true){ if (TestOverlap(_local12, _local9)){ m_pairManager.AddBufferedPair(_arg1, _local8); }; _local23 = _local9.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount++; } else { _local23 = _local9.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount--; }; _local23 = _local11.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.Swap(_local7); _local4++; }; }; if (_local19 > 0){ _local4 = _local15; while ((((_local4 < (_local10 - 1))) && ((_local14[(_local4 + 1)].value <= _local17)))) { _local5 = _local14[_local4]; _local7 = _local14[(_local4 + 1)]; _local8 = _local7.proxyId; _local9 = m_proxyPool[_local8]; _local7.stabbingCount--; if (_local7.IsUpper()){ if (TestOverlap(_local13, _local9)){ m_pairManager.RemoveBufferedPair(_arg1, _local8); }; _local23 = _local9.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount--; } else { _local23 = _local9.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.stabbingCount++; }; _local23 = _local11.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.Swap(_local7); _local4++; }; }; if (_local20 < 0){ _local4 = _local16; while ((((_local4 > 0)) && ((_local18 < _local14[(_local4 - 1)].value)))) { _local5 = _local14[_local4]; _local6 = _local14[(_local4 - 1)]; _local21 = _local6.proxyId; _local22 = m_proxyPool[_local21]; _local6.stabbingCount--; if (_local6.IsLower() == true){ if (TestOverlap(_local13, _local22)){ m_pairManager.RemoveBufferedPair(_arg1, _local21); }; _local23 = _local22.lowerBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount--; } else { _local23 = _local22.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] + 1); _local23[_local24] = _local25; _local5.stabbingCount++; }; _local23 = _local11.upperBounds; _local24 = _local3; _local25 = (_local23[_local24] - 1); _local23[_local24] = _local25; _local5.Swap(_local6); _local4--; }; }; _local3++; }; } public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{ var _local6:int; var _local4:int; var _local5:int = (_arg2 - 1); while (_local4 <= _local5) { _local6 = ((_local4 + _local5) / 2); if (_arg1[_local6].value > _arg3){ _local5 = (_local6 - 1); } else { if (_arg1[_local6].value < _arg3){ _local4 = (_local6 + 1); } else { return (uint(_local6)); }; }; }; return (uint(_local4)); } } }//package Box2D.Collision
Section 12
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 13
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; public static const b2_oldPoint:uint = 4; public static const b2_newPoint:uint = 2; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local6:b2Mat22; var _local7:b2Vec2; var _local20:Number; _local6 = _arg2.R; _local7 = _arg1.m_normals[_arg3]; var _local8:Number = ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y)); var _local9:Number = ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y)); _local6 = _arg5.R; var _local10:Number = ((_local6.col1.x * _local8) + (_local6.col1.y * _local9)); var _local11:Number = ((_local6.col2.x * _local8) + (_local6.col2.y * _local9)); var _local12:int; var _local13:Number = Number.MAX_VALUE; var _local14:int; while (_local14 < _arg4.m_vertexCount) { _local7 = _arg4.m_vertices[_local14]; _local20 = ((_local7.x * _local10) + (_local7.y * _local11)); if (_local20 < _local13){ _local13 = _local20; _local12 = _local14; }; _local14++; }; _local7 = _arg1.m_vertices[_arg3]; _local6 = _arg2.R; var _local15:Number = (_arg2.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local16:Number = (_arg2.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local7 = _arg4.m_vertices[_local12]; _local6 = _arg5.R; var _local17:Number = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); var _local18:Number = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local17 = (_local17 - _local15); _local18 = (_local18 - _local16); var _local19:Number = ((_local17 * _local8) + (_local18 * _local9)); return (_local19); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2 = _arg2.lowerBound; var _local4:b2Vec2 = _arg1.upperBound; var _local5:Number = (_local3.x - _local4.x); var _local6:Number = (_local3.y - _local4.y); _local3 = _arg1.lowerBound; _local4 = _arg2.upperBound; var _local7:Number = (_local3.x - _local4.x); var _local8:Number = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{ var _local7:b2Mat22; var _local8:b2Vec2; var _local15:ClipVertex; var _local18:Number; _local7 = _arg3.R; _local8 = _arg2.m_normals[_arg4]; var _local9:Number = ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y)); var _local10:Number = ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y)); _local7 = _arg6.R; var _local11:Number = ((_local7.col1.x * _local9) + (_local7.col1.y * _local10)); _local10 = ((_local7.col2.x * _local9) + (_local7.col2.y * _local10)); _local9 = _local11; var _local12:int; var _local13:Number = Number.MAX_VALUE; var _local14:int; while (_local14 < _arg5.m_vertexCount) { _local8 = _arg5.m_normals[_local14]; _local18 = ((_local9 * _local8.x) + (_local10 * _local8.y)); if (_local18 < _local13){ _local13 = _local18; _local12 = _local14; }; _local14++; }; var _local16:int = _local12; var _local17:int = (((_local16 + 1) < _arg5.m_vertexCount)) ? (_local16 + 1) : 0; _local15 = _arg1[0]; _local8 = _arg5.m_vertices[_local16]; _local7 = _arg6.R; _local15.v.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local15.v.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local15.id.features.referenceFace = _arg4; _local15.id.features.incidentEdge = _local16; _local15.id.features.incidentVertex = 0; _local15 = _arg1[1]; _local8 = _arg5.m_vertices[_local17]; _local7 = _arg6.R; _local15.v.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local15.v.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local15.id.features.referenceFace = _arg4; _local15.id.features.incidentEdge = _local17; _local15.id.features.incidentVertex = 1; } public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{ var _local12:b2PolygonShape; var _local13:b2PolygonShape; var _local16:int; var _local17:uint; var _local33:int; var _local36:Number; var _local37:b2ManifoldPoint; _arg1.pointCount = 0; var _local6:int; var _local7:Array = [_local6]; var _local8:Number = FindMaxSeparation(_local7, _arg2, _arg3, _arg4, _arg5); _local6 = _local7[0]; if (_local8 > 0){ return; }; var _local9:int; var _local10:Array = [_local9]; var _local11:Number = FindMaxSeparation(_local10, _arg4, _arg5, _arg2, _arg3); _local9 = _local10[0]; if (_local11 > 0){ return; }; var _local14:b2XForm = new b2XForm(); var _local15:b2XForm = new b2XForm(); var _local18:Number = 0.98; var _local19:Number = 0.001; if (_local11 > ((_local18 * _local8) + _local19)){ _local12 = _arg4; _local13 = _arg2; _local14.Set(_arg5); _local15.Set(_arg3); _local16 = _local9; _local17 = 1; } else { _local12 = _arg2; _local13 = _arg4; _local14.Set(_arg3); _local15.Set(_arg5); _local16 = _local6; _local17 = 0; }; var _local20:Array = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local20, _local12, _local14, _local16, _local13, _local15); var _local21:int = _local12.m_vertexCount; var _local22:Array = _local12.m_vertices; var _local23:b2Vec2 = _local22[_local16].Copy(); var _local24:b2Vec2 = (((_local16 + 1) < _local21)) ? _local22[(_local16 + 1)].Copy() : _local22[0].Copy(); var _local25:b2Vec2 = b2Math.SubtractVV(_local24, _local23); var _local26:b2Vec2 = b2Math.b2MulMV(_local14.R, b2Math.SubtractVV(_local24, _local23)); _local26.Normalize(); var _local27:b2Vec2 = b2Math.b2CrossVF(_local26, 1); _local23 = b2Math.b2MulX(_local14, _local23); _local24 = b2Math.b2MulX(_local14, _local24); var _local28:Number = b2Math.b2Dot(_local27, _local23); var _local29:Number = -(b2Math.b2Dot(_local26, _local23)); var _local30:Number = b2Math.b2Dot(_local26, _local24); var _local31:Array = [new ClipVertex(), new ClipVertex()]; var _local32:Array = [new ClipVertex(), new ClipVertex()]; _local33 = ClipSegmentToLine(_local31, _local20, _local26.Negative(), _local29); if (_local33 < 2){ return; }; _local33 = ClipSegmentToLine(_local32, _local31, _local26, _local30); if (_local33 < 2){ return; }; _arg1.normal = (_local17) ? _local27.Negative() : _local27.Copy(); var _local34:int; var _local35:int; while (_local35 < b2Settings.b2_maxManifoldPoints) { _local36 = (b2Math.b2Dot(_local27, _local32[_local35].v) - _local28); if (_local36 <= 0){ _local37 = _arg1.points[_local34]; _local37.separation = _local36; _local37.localPoint1 = b2Math.b2MulXT(_arg3, _local32[_local35].v); _local37.localPoint2 = b2Math.b2MulXT(_arg5, _local32[_local35].v); _local37.id.key = _local32[_local35].id.key; _local37.id.features.flip = _local17; _local34++; }; _local35++; }; _arg1.pointCount = _local34; } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local7:b2Vec2; var _local8:b2Mat22; var _local21:int; var _local22:Number; var _local23:int; var _local24:Number; var _local6:int = _arg2.m_vertexCount; _local8 = _arg5.R; _local7 = _arg4.m_centroid; var _local9:Number = (_arg5.position.x + ((_local8.col1.x * _local7.x) + (_local8.col2.x * _local7.y))); var _local10:Number = (_arg5.position.y + ((_local8.col1.y * _local7.x) + (_local8.col2.y * _local7.y))); _local8 = _arg3.R; _local7 = _arg2.m_centroid; _local9 = (_local9 - (_arg3.position.x + ((_local8.col1.x * _local7.x) + (_local8.col2.x * _local7.y)))); _local10 = (_local10 - (_arg3.position.y + ((_local8.col1.y * _local7.x) + (_local8.col2.y * _local7.y)))); var _local11:Number = ((_local9 * _arg3.R.col1.x) + (_local10 * _arg3.R.col1.y)); var _local12:Number = ((_local9 * _arg3.R.col2.x) + (_local10 * _arg3.R.col2.y)); var _local13:int; var _local14:Number = -(Number.MAX_VALUE); var _local15:int; while (_local15 < _local6) { _local24 = ((_arg2.m_normals[_local15].x * _local11) + (_arg2.m_normals[_local15].y * _local12)); if (_local24 > _local14){ _local14 = _local24; _local13 = _local15; }; _local15++; }; var _local16:Number = EdgeSeparation(_arg2, _arg3, _local13, _arg4, _arg5); if (_local16 > 0){ return (_local16); }; var _local17:int = (((_local13 - 1) >= 0)) ? (_local13 - 1) : (_local6 - 1); var _local18:Number = EdgeSeparation(_arg2, _arg3, _local17, _arg4, _arg5); if (_local18 > 0){ return (_local18); }; var _local19:int = (((_local13 + 1) < _local6)) ? (_local13 + 1) : 0; var _local20:Number = EdgeSeparation(_arg2, _arg3, _local19, _arg4, _arg5); if (_local20 > 0){ return (_local20); }; if ((((_local18 > _local16)) && ((_local18 > _local20)))){ _local23 = -1; _local21 = _local17; _local22 = _local18; } else { if (_local20 > _local16){ _local23 = 1; _local21 = _local19; _local22 = _local20; } else { _arg1[0] = _local13; return (_local16); }; }; while (true) { if (_local23 == -1){ _local13 = (((_local21 - 1) >= 0)) ? (_local21 - 1) : (_local6 - 1); } else { _local13 = (((_local21 + 1) < _local6)) ? (_local21 + 1) : 0; }; _local16 = EdgeSeparation(_arg2, _arg3, _local13, _arg4, _arg5); if (_local16 > 0){ return (_local16); }; if (_local16 > _local22){ _local21 = _local13; _local22 = _local16; } else { break; }; }; _arg1[0] = _local21; return (_local22); } public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local7:b2Vec2; var _local8:Number; var _local10:Number; var _local11:b2Vec2; var _local5:int; var _local6:b2Vec2 = _arg2[0].v; _local7 = _arg2[1].v; _local8 = (b2Math.b2Dot(_arg3, _local6) - _arg4); var _local9:Number = (b2Math.b2Dot(_arg3, _local7) - _arg4); if (_local8 <= 0){ var _temp1 = _local5; _local5 = (_local5 + 1); var _local12 = _temp1; _arg1[_local12] = _arg2[0]; }; if (_local9 <= 0){ var _temp2 = _local5; _local5 = (_local5 + 1); _local12 = _temp2; _arg1[_local12] = _arg2[1]; }; if ((_local8 * _local9) < 0){ _local10 = (_local8 / (_local8 - _local9)); _local11 = _arg1[_local5].v; _local11.x = (_local6.x + (_local10 * (_local7.x - _local6.x))); _local11.y = (_local6.y + (_local10 * (_local7.y - _local6.y))); if (_local8 > 0){ _arg1[_local5].id = _arg2[0].id; } else { _arg1[_local5].id = _arg2[1].id; }; _local5++; }; return (_local5); } public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2Mat22; var _local7:b2Vec2; var _local16:Number; var _local22:Number; var _local23: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 + _arg4.m_radius); if (_local14 > (_local15 * _local15)){ return; }; if (_local14 < Number.MIN_VALUE){ _local16 = -(_local15); _arg1.normal.Set(0, 1); } else { _local22 = Math.sqrt(_local14); _local16 = (_local22 - _local15); _local23 = (1 / _local22); _arg1.normal.x = (_local23 * _local12); _arg1.normal.y = (_local23 * _local13); }; _arg1.pointCount = 1; var _local17:b2ManifoldPoint = _arg1.points[0]; _local17.id.key = 0; _local17.separation = _local16; _local8 = (_local8 + (_arg2.m_radius * _arg1.normal.x)); _local9 = (_local9 + (_arg2.m_radius * _arg1.normal.y)); _local10 = (_local10 - (_arg4.m_radius * _arg1.normal.x)); _local11 = (_local11 - (_arg4.m_radius * _arg1.normal.y)); var _local18:Number = (0.5 * (_local8 + _local10)); var _local19:Number = (0.5 * (_local9 + _local11)); var _local20:Number = (_local18 - _arg3.position.x); var _local21:Number = (_local19 - _arg3.position.y); _local17.localPoint1.x = ((_local20 * _arg3.R.col1.x) + (_local21 * _arg3.R.col1.y)); _local17.localPoint1.y = ((_local20 * _arg3.R.col2.x) + (_local21 * _arg3.R.col2.y)); _local20 = (_local18 - _arg5.position.x); _local21 = (_local19 - _arg5.position.y); _local17.localPoint2.x = ((_local20 * _arg5.R.col1.x) + (_local21 * _arg5.R.col1.y)); _local17.localPoint2.y = ((_local20 * _arg5.R.col2.x) + (_local21 * _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 _local28:Number; var _local29:Number; var _local30: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; while (_local21 < _arg2.m_vertexCount) { _local7 = (_local15 - _arg2.m_vertices[_local21].x); _local8 = (_local16 - _arg2.m_vertices[_local21].y); _local30 = ((_arg2.m_normals[_local21].x * _local7) + (_arg2.m_normals[_local21].y * _local8)); if (_local30 > _local20){ return; }; if (_local30 > _local19){ _local19 = _local30; _local18 = _local21; }; _local21++; }; if (_local19 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local11 = _arg2.m_normals[_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.referenceFace = b2_nullFeature; _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 _local22:int = _local18; var _local23:int = (((_local22 + 1) < _arg2.m_vertexCount)) ? (_local22 + 1) : 0; var _local24:Number = (_arg2.m_vertices[_local23].x - _arg2.m_vertices[_local22].x); var _local25:Number = (_arg2.m_vertices[_local23].y - _arg2.m_vertices[_local22].y); var _local26:Number = Math.sqrt(((_local24 * _local24) + (_local25 * _local25))); _local24 = (_local24 / _local26); _local25 = (_local25 / _local26); if (_local26 < Number.MIN_VALUE){ _local7 = (_local15 - _arg2.m_vertices[_local22].x); _local8 = (_local16 - _arg2.m_vertices[_local22].y); _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)); _local6 = _arg1.points[0]; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local22; _local6.id.features.referenceFace = b2_nullFeature; _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 = (_local17 - _local20); return; }; _local7 = (_local15 - _arg2.m_vertices[_local22].x); _local8 = (_local16 - _arg2.m_vertices[_local22].y); var _local27:Number = ((_local7 * _local24) + (_local8 * _local25)); _local6 = _arg1.points[0]; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = b2_nullFeature; _local6.id.features.referenceFace = b2_nullFeature; _local6.id.features.flip = 0; if (_local27 <= 0){ _local28 = _arg2.m_vertices[_local22].x; _local29 = _arg2.m_vertices[_local22].y; _local6.id.features.incidentVertex = _local22; } else { if (_local27 >= _local26){ _local28 = _arg2.m_vertices[_local23].x; _local29 = _arg2.m_vertices[_local23].y; _local6.id.features.incidentVertex = _local23; } else { _local28 = ((_local24 * _local27) + _arg2.m_vertices[_local22].x); _local29 = ((_local25 * _local27) + _arg2.m_vertices[_local22].y); _local6.id.features.incidentEdge = _local22; }; }; _local7 = (_local15 - _local28); _local8 = (_local16 - _local29); _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); } } }//package Box2D.Collision
Section 14
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { public class b2ContactID { public var _key:uint; public var features:Features; public function b2ContactID(){ features = new Features(); super(); features._m_id = this; } public function Set(_arg1:b2ContactID):void{ key = _arg1._key; } public function Copy():b2ContactID{ var _local1:b2ContactID = new b2ContactID(); _local1.key = key; return (_local1); } public function set key(_arg1:uint):void{ _key = _arg1; features._referenceFace = (_key & 0xFF); features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF); features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF); features._flip = (((_key & 4278190080) >> 24) & 0xFF); } public function get key():uint{ return (_key); } } }//package Box2D.Collision
Section 15
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class b2ContactPoint { public var normalForce:Number; public var separation:Number; public var normal:b2Vec2; public var position:b2Vec2; public var tangentForce:Number; public var shape1:b2Shape; public var shape2:b2Shape; public var id:b2ContactID; public function b2ContactPoint(){ position = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 16
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Distance { private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var gPoint:b2Point = new b2Point(); public static var g_GJK_Iterations:int = 0; public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local4:Number = (100 * Number.MIN_VALUE); var _local5:int; while (_local5 < _arg3) { _local6 = Math.abs((_arg1.x - _arg2[_local5].x)); _local7 = Math.abs((_arg1.y - _arg2[_local5].y)); _local8 = Math.max(Math.abs(_arg1.x), Math.abs(_arg2[_local5].x)); _local9 = Math.max(Math.abs(_arg1.y), Math.abs(_arg2[_local5].y)); if ((((_local6 < (_local4 * (_local8 + 1)))) && ((_local7 < (_local4 * (_local9 + 1)))))){ return (true); }; _local5++; }; return (false); } public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{ var _local14:Number; var _local15:Number; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:int; var _local7:Array = s_p1s; var _local8:Array = s_p2s; var _local9:Array = s_points; var _local10:int; _arg1.SetV(_arg3.GetFirstVertex(_arg4)); _arg2.SetV(_arg5.GetFirstVertex(_arg6)); var _local11:Number = 0; var _local12 = 20; var _local13:int; while (_local13 < _local12) { _local14 = (_arg2.x - _arg1.x); _local15 = (_arg2.y - _arg1.y); _local16 = _arg3.Support(_arg4, _local14, _local15); _local17 = _arg5.Support(_arg6, -(_local14), -(_local15)); _local11 = ((_local14 * _local14) + (_local15 * _local15)); _local18 = (_local17.x - _local16.x); _local19 = (_local17.y - _local16.y); _local20 = ((_local14 * _local18) + (_local15 * _local19)); if ((_local11 - ((_local14 * _local18) + (_local15 * _local19))) <= (0.01 * _local11)){ if (_local10 == 0){ _arg1.SetV(_local16); _arg2.SetV(_local17); }; g_GJK_Iterations = _local13; return (Math.sqrt(_local11)); }; switch (_local10){ case 0: _local7[0].SetV(_local16); _local8[0].SetV(_local17); _local9[0].Set(_local18, _local19); _arg1.SetV(_local7[0]); _arg2.SetV(_local8[0]); _local10++; break; case 1: _local7[1].SetV(_local16); _local8[1].SetV(_local17); _local9[1].x = _local18; _local9[1].y = _local19; _local10 = ProcessTwo(_arg1, _arg2, _local7, _local8, _local9); break; case 2: _local7[2].SetV(_local16); _local8[2].SetV(_local17); _local9[2].x = _local18; _local9[2].y = _local19; _local10 = ProcessThree(_arg1, _arg2, _local7, _local8, _local9); break; }; if (_local10 == 3){ g_GJK_Iterations = _local13; return (0); }; _local21 = -(Number.MAX_VALUE); _local22 = 0; while (_local22 < _local10) { _local21 = b2Math.b2Max(_local21, ((_local9[_local22].x * _local9[_local22].x) + (_local9[_local22].y * _local9[_local22].y))); _local22++; }; if ((((_local10 == 3)) || ((_local11 <= ((100 * Number.MIN_VALUE) * _local21))))){ g_GJK_Iterations = _local13; _local14 = (_arg2.x - _arg1.x); _local15 = (_arg2.y - _arg1.y); _local11 = ((_local14 * _local14) + (_local15 * _local15)); return (Math.sqrt(_local11)); }; _local13++; }; g_GJK_Iterations = _local12; return (Math.sqrt(_local11)); } 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(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _local20 = (_local19 - _local18); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = (_local11 - (_local17 * _local13)); _arg2.y = (_local12 - (_local17 * _local14)); return (_local20); }; if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); }; _arg1.x = _local9; _arg1.y = _local10; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local26:Number; var _local6:Number = _arg5[0].x; var _local7:Number = _arg5[0].y; var _local8:Number = _arg5[1].x; var _local9:Number = _arg5[1].y; var _local10:Number = _arg5[2].x; var _local11:Number = _arg5[2].y; var _local12:Number = (_local8 - _local6); var _local13:Number = (_local9 - _local7); var _local14:Number = (_local10 - _local6); var _local15:Number = (_local11 - _local7); var _local16:Number = (_local10 - _local8); var _local17:Number = (_local11 - _local9); var _local18:Number = -(((_local6 * _local12) + (_local7 * _local13))); var _local19:Number = ((_local8 * _local12) + (_local9 * _local13)); var _local20:Number = -(((_local6 * _local14) + (_local7 * _local15))); var _local21:Number = ((_local10 * _local14) + (_local11 * _local15)); var _local22:Number = -(((_local8 * _local16) + (_local9 * _local17))); var _local23:Number = ((_local10 * _local16) + (_local11 * _local17)); if ((((_local21 <= 0)) && ((_local23 <= 0)))){ _arg1.SetV(_arg3[2]); _arg2.SetV(_arg4[2]); _arg3[0].SetV(_arg3[2]); _arg4[0].SetV(_arg4[2]); _arg5[0].SetV(_arg5[2]); return (1); }; var _local24:Number = ((_local12 * _local15) - (_local13 * _local14)); var _local25:Number = (_local24 * ((_local6 * _local9) - (_local7 * _local8))); var _local27:Number = (_local24 * ((_local8 * _local11) - (_local9 * _local10))); if ((((((_local27 <= 0)) && ((_local22 >= 0)))) && ((_local23 >= 0)))){ _local26 = (_local22 / (_local22 + _local23)); _arg1.x = (_arg3[1].x + (_local26 * (_arg3[2].x - _arg3[1].x))); _arg1.y = (_arg3[1].y + (_local26 * (_arg3[2].y - _arg3[1].y))); _arg2.x = (_arg4[1].x + (_local26 * (_arg4[2].x - _arg4[1].x))); _arg2.y = (_arg4[1].y + (_local26 * (_arg4[2].y - _arg4[1].y))); _arg3[0].SetV(_arg3[2]); _arg4[0].SetV(_arg4[2]); _arg5[0].SetV(_arg5[2]); return (2); }; var _local28:Number = (_local24 * ((_local10 * _local7) - (_local11 * _local6))); if ((((((_local28 <= 0)) && ((_local20 >= 0)))) && ((_local21 >= 0)))){ _local26 = (_local20 / (_local20 + _local21)); _arg1.x = (_arg3[0].x + (_local26 * (_arg3[2].x - _arg3[0].x))); _arg1.y = (_arg3[0].y + (_local26 * (_arg3[2].y - _arg3[0].y))); _arg2.x = (_arg4[0].x + (_local26 * (_arg4[2].x - _arg4[0].x))); _arg2.y = (_arg4[0].y + (_local26 * (_arg4[2].y - _arg4[0].y))); _arg3[1].SetV(_arg3[2]); _arg4[1].SetV(_arg4[2]); _arg5[1].SetV(_arg5[2]); return (2); }; var _local29:Number = ((_local27 + _local28) + _local25); _local29 = (1 / _local29); var _local30:Number = (_local27 * _local29); var _local31:Number = (_local28 * _local29); var _local32:Number = ((1 - _local30) - _local31); _arg1.x = (((_local30 * _arg3[0].x) + (_local31 * _arg3[1].x)) + (_local32 * _arg3[2].x)); _arg1.y = (((_local30 * _arg3[0].y) + (_local31 * _arg3[1].y)) + (_local32 * _arg3[2].y)); _arg2.x = (((_local30 * _arg4[0].x) + (_local31 * _arg4[1].x)) + (_local32 * _arg4[2].x)); _arg2.y = (((_local30 * _arg4[0].y) + (_local31 * _arg4[1].y)) + (_local32 * _arg4[2].y)); return (3); } public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local9:b2Point = gPoint; _local8 = _arg5.m_localPosition; _local7 = _arg6.R; _local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); var _local10:Number = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity); var _local11:Number = (_arg5.GetRadius() - 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.GetType(); var _local8:int = _arg5.GetType(); if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6)); }; return (0); } public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local11:Number; var _local6:Number = -(_arg5[1].x); var _local7:Number = -(_arg5[1].y); var _local8:Number = (_arg5[0].x - _arg5[1].x); var _local9:Number = (_arg5[0].y - _arg5[1].y); var _local10:Number = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local8 = (_local8 / _local10); _local9 = (_local9 / _local10); _local11 = ((_local6 * _local8) + (_local7 * _local9)); if ((((_local11 <= 0)) || ((_local10 < Number.MIN_VALUE)))){ _arg1.SetV(_arg3[1]); _arg2.SetV(_arg4[1]); _arg3[0].SetV(_arg3[1]); _arg4[0].SetV(_arg4[1]); _arg5[0].SetV(_arg5[1]); return (1); }; _local11 = (_local11 / _local10); _arg1.x = (_arg3[1].x + (_local11 * (_arg3[0].x - _arg3[1].x))); _arg1.y = (_arg3[1].y + (_local11 * (_arg3[0].y - _arg3[1].y))); _arg2.x = (_arg4[1].x + (_local11 * (_arg4[0].x - _arg4[1].x))); _arg2.y = (_arg4[1].y + (_local11 * (_arg4[0].y - _arg4[1].y))); return (2); } } }//package Box2D.Collision
Section 17
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var pointCount:int;// = 0 public var normal:b2Vec2; public var points:Array; public function b2Manifold(){ points = new Array(b2Settings.b2_maxManifoldPoints); var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ManifoldPoint(); _local1++; }; normal = new b2Vec2(); } public function Set(_arg1:b2Manifold):void{ pointCount = _arg1.pointCount; var _local2:int; while (_local2 < b2Settings.b2_maxManifoldPoints) { (points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]); _local2++; }; normal.SetV(_arg1.normal); } public function Reset():void{ var _local1:int; while (_local1 < b2Settings.b2_maxManifoldPoints) { (points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; normal.SetZero(); pointCount = 0; } } }//package Box2D.Collision
Section 18
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ManifoldPoint { public var normalForce:Number; public var tangentForce:Number; public var id:b2ContactID; public var separation:Number; public var localPoint2:b2Vec2; public var localPoint1:b2Vec2; public function b2ManifoldPoint(){ localPoint1 = new b2Vec2(); localPoint2 = new b2Vec2(); id = new b2ContactID(); super(); } public function Set(_arg1:b2ManifoldPoint):void{ localPoint1.SetV(_arg1.localPoint1); localPoint2.SetV(_arg1.localPoint2); separation = _arg1.separation; normalForce = _arg1.normalForce; tangentForce = _arg1.tangentForce; id.key = _arg1.id.key; } public function Reset():void{ localPoint1.SetZero(); localPoint2.SetZero(); separation = 0; normalForce = 0; tangentForce = 0; id.key = 0; } } }//package Box2D.Collision
Section 19
//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 20
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { import Box2D.Common.*; public class b2Pair { public var proxyId1:uint; public var userData;// = null public var proxyId2:uint; public var status:uint; public var next:uint; public static var e_pairFinal:uint = 4; public static var b2_tableMask:int = (b2_tableCapacity - 1); public static var e_pairRemoved:uint = 2; public static var b2_nullPair:uint = b2Settings.USHRT_MAX; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = b2Settings.USHRT_MAX; public static var b2_tableCapacity:int = b2Settings.b2_maxPairs; public function SetBuffered():void{ status = (status | e_pairBuffered); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } } }//package Box2D.Collision
Section 21
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairRemoved(_arg1, _arg2, _arg3):void{ } public function PairAdded(_arg1, _arg2){ return (null); } } }//package Box2D.Collision
Section 22
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_pairCount:int; public var m_pairBuffer:Array; public var m_hashTable:Array; public var m_callback:b2PairCallback; public var m_pairs:Array; public var m_pairBufferCount:int; public var m_broadPhase:b2BroadPhase; public var m_freePair:uint; public function b2PairManager(){ var _local1:uint; super(); m_hashTable = new Array(b2Pair.b2_tableCapacity); _local1 = 0; while (_local1 < b2Pair.b2_tableCapacity) { m_hashTable[_local1] = b2Pair.b2_nullPair; _local1++; }; m_pairs = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1] = new b2Pair(); _local1++; }; m_pairBuffer = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairBuffer[_local1] = new b2BufferedPair(); _local1++; }; _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy; m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy; m_pairs[_local1].userData = null; m_pairs[_local1].status = 0; m_pairs[_local1].next = (_local1 + 1); _local1++; }; m_pairs[(b2Settings.b2_maxPairs - 1)].next = b2Pair.b2_nullPair; m_pairCount = 0; m_pairBufferCount = 0; } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{ var _local4:uint = m_hashTable[_arg3]; while (((!((_local4 == b2Pair.b2_nullPair))) && ((Equals(m_pairs[_local4], _arg1, _arg2) == false)))) { _local4 = m_pairs[_local4].next; }; if (_local4 == b2Pair.b2_nullPair){ return (null); }; return (m_pairs[_local4]); } 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 ValidateBuffer():void{ } public function Commit():void{ var _local1:int; var _local4:b2Pair; var _local5:b2Proxy; var _local6:b2Proxy; var _local2:int; var _local3:Array = m_broadPhase.m_proxyPool; _local1 = 0; while (_local1 < m_pairBufferCount) { _local4 = Find(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2); _local4.ClearBuffered(); _local5 = _local3[_local4.proxyId1]; _local6 = _local3[_local4.proxyId2]; if (_local4.IsRemoved()){ if (_local4.IsFinal() == true){ m_callback.PairRemoved(_local5.userData, _local6.userData, _local4.userData); }; m_pairBuffer[_local2].proxyId1 = _local4.proxyId1; m_pairBuffer[_local2].proxyId2 = _local4.proxyId2; _local2++; } else { if (_local4.IsFinal() == false){ _local4.userData = m_callback.PairAdded(_local5.userData, _local6.userData); _local4.SetFinal(); }; }; _local1++; }; _local1 = 0; while (_local1 < _local2) { RemovePair(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2); _local1++; }; m_pairBufferCount = 0; if (b2BroadPhase.s_validate){ ValidateTable(); }; } public function RemoveBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2Pair = Find(_arg1, _arg2); if (_local3 == null){ return; }; if (_local3.IsBuffered() == false){ _local3.SetBuffered(); m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1; m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2; m_pairBufferCount++; }; _local3.SetRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function RemovePair(_arg1:uint, _arg2:uint){ var _local6:uint; var _local7:uint; var _local8:b2Pair; var _local9:*; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); var _local4:uint = m_hashTable[_local3]; var _local5:b2Pair; while (_local4 != b2Pair.b2_nullPair) { if (Equals(m_pairs[_local4], _arg1, _arg2)){ _local7 = _local4; if (_local5){ _local5.next = m_pairs[_local4].next; } else { m_hashTable[_local3] = m_pairs[_local4].next; }; _local8 = m_pairs[_local7]; _local9 = _local8.userData; _local8.next = m_freePair; _local8.proxyId1 = b2Pair.b2_nullProxy; _local8.proxyId2 = b2Pair.b2_nullProxy; _local8.userData = null; _local8.status = 0; m_freePair = _local7; m_pairCount--; return (_local9); } else { _local5 = m_pairs[_local4]; _local4 = _local5.next; }; }; return (null); } public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{ m_broadPhase = _arg1; m_callback = _arg2; } public function AddBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2Pair = AddPair(_arg1, _arg2); if (_local3.IsBuffered() == false){ _local3.SetBuffered(); m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1; m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2; m_pairBufferCount++; }; _local3.ClearRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } 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 ValidateTable():void{ } public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{ return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))); } public static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint = (((_arg2 << 16) & 4294901760) | _arg1); _local3 = (~(_local3) + ((_local3 << 15) & 4294934528)); _local3 = (_local3 ^ ((_local3 >> 12) & 1048575)); _local3 = (_local3 + ((_local3 << 2) & 4294967292)); _local3 = (_local3 ^ ((_local3 >> 4) & 268435455)); _local3 = (_local3 * 2057); _local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF)); return (_local3); } public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{ return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3)))); } } }//package Box2D.Collision
Section 23
//b2Point (Box2D.Collision.b2Point) package Box2D.Collision { import Box2D.Common.Math.*; public class b2Point { public var p:b2Vec2; public function b2Point(){ p = new b2Vec2(); super(); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (p); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ return (p); } } }//package Box2D.Collision
Section 24
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { public class b2Proxy { public var overlapCount:uint; public var userData;// = null public var lowerBounds:Array; public var upperBounds:Array; public var timeStamp:uint; public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; super(); } public function GetNext():uint{ return (lowerBounds[0]); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } public function SetNext(_arg1:uint):void{ lowerBounds[0] = (_arg1 & 0xFFFF); } } }//package Box2D.Collision
Section 25
//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 = ((-(_local7) * _local15) + (_local7 * _local14)); if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){ _local16 = (_local16 / _local13); _local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local18); _local11 = (_local11 / _local18); _arg1[0] = _local16; _arg2.Set(_local10, _local11); return (true); }; }; }; return (false); } } }//package Box2D.Collision
Section 26
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Common.*; public class b2TimeOfImpact { public static var s_xf1:b2XForm = new b2XForm(); public static var s_xf2:b2XForm = new b2XForm(); public static var s_p1:b2Vec2 = new b2Vec2(); public static var s_p2:b2Vec2 = new b2Vec2(); public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{ var _local23:Number; var _local24:b2XForm; var _local25:b2XForm; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local5:Number = _arg1.GetSweepRadius(); var _local6:Number = _arg3.GetSweepRadius(); var _local7:Number = _arg2.t0; var _local8:Number = (_arg2.c.x - _arg2.c0.x); var _local9:Number = (_arg2.c.y - _arg2.c0.y); var _local10:Number = (_arg4.c.x - _arg4.c0.x); var _local11:Number = (_arg4.c.y - _arg4.c0.y); var _local12:Number = (_arg2.a - _arg2.a0); var _local13:Number = (_arg4.a - _arg4.a0); var _local14:Number = 0; var _local15:b2Vec2 = s_p1; var _local16:b2Vec2 = s_p2; var _local17 = 20; var _local18:int; var _local19:Number = 0; var _local20:Number = 0; var _local21:Number = 0; var _local22:Number = 0; while (true) { _local23 = (((1 - _local14) * _local7) + _local14); _local24 = s_xf1; _local25 = s_xf2; _arg2.GetXForm(_local24, _local23); _arg4.GetXForm(_local25, _local23); _local21 = b2Distance.Distance(_local15, _local16, _arg1, _local24, _arg3, _local25); if (_local18 == 0){ if (_local21 > (2 * b2Settings.b2_toiSlop)){ _local22 = (1.5 * b2Settings.b2_toiSlop); } else { _local22 = Math.max((0.05 * b2Settings.b2_toiSlop), (_local21 - (0.5 * b2Settings.b2_toiSlop))); }; }; if (((((_local21 - _local22) < (0.05 * b2Settings.b2_toiSlop))) || ((_local18 == _local17)))){ break; }; _local19 = (_local16.x - _local15.x); _local20 = (_local16.y - _local15.y); _local26 = Math.sqrt(((_local19 * _local19) + (_local20 * _local20))); _local19 = (_local19 / _local26); _local20 = (_local20 / _local26); _local27 = ((((_local19 * (_local8 - _local10)) + (_local20 * (_local9 - _local11))) + (Math.abs(_local12) * _local5)) + (Math.abs(_local13) * _local6)); if (Math.abs(_local27) < Number.MIN_VALUE){ _local14 = 1; break; }; _local28 = ((_local21 - _local22) / _local27); _local29 = (_local14 + _local28); if ((((_local29 < 0)) || ((1 < _local29)))){ _local14 = 1; break; }; if (_local29 < ((1 + (100 * Number.MIN_VALUE)) * _local14)){ break; }; _local14 = _local29; _local18++; }; return (_local14); } } }//package Box2D.Collision
Section 27
//ClipVertex (Box2D.Collision.ClipVertex) package Box2D.Collision { import Box2D.Common.Math.*; public class ClipVertex { public var id:b2ContactID; public var v:b2Vec2; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 28
//Features (Box2D.Collision.Features) package Box2D.Collision { public class Features { public var _referenceFace:int; public var _incidentEdge:int; public var _flip:int; public var _incidentVertex:int; public var _m_id:b2ContactID; public function get referenceFace():int{ return (_referenceFace); } public function set incidentVertex(_arg1:int):void{ _incidentVertex = _arg1; _m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000)); } public function get flip():int{ return (_flip); } public function get incidentEdge():int{ return (_incidentEdge); } public function set referenceFace(_arg1:int):void{ _referenceFace = _arg1; _m_id._key = ((_m_id._key & 4294967040) | (_referenceFace & 0xFF)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 29
//b2Mat22 (Box2D.Common.Math.b2Mat22) package Box2D.Common.Math { public class b2Mat22 { public var col1:b2Vec2; public var col2:b2Vec2; public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){ var _local4:Number; var _local5:Number; col1 = new b2Vec2(); col2 = new b2Vec2(); super(); if (((!((_arg2 == null))) && (!((_arg3 == null))))){ col1.SetV(_arg2); col2.SetV(_arg3); } else { _local4 = Math.cos(_arg1); _local5 = Math.sin(_arg1); col1.x = _local4; col2.x = -(_local5); col1.y = _local5; col2.y = _local4; }; } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col1.y = 0; col2.y = 1; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function Set(_arg1:Number):void{ var _local2:Number; _local2 = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetZero():void{ col1.x = 0; col2.x = 0; col1.y = 0; col2.y = 0; } public function SetM(_arg1:b2Mat22):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); } public function AddM(_arg1:b2Mat22):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); } public function Abs():void{ col1.Abs(); col2.Abs(); } public function Copy():b2Mat22{ return (new b2Mat22(0, col1, col2)); } public function 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 GetAngle():Number{ return (Math.atan2(col1.y, col1.x)); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number = col1.x; var _local5:Number = col2.x; var _local6:Number = col1.y; var _local7:Number = col2.y; var _local8:Number = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Box2D.Common.Math
Section 30
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1)); public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity); public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0); public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function b2IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = b2MulMV(_arg1.R, _arg2); _local3.x = (_local3.x + _arg1.position.x); _local3.y = (_local3.y + _arg1.position.y); return (_local3); } public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (((_local3 * _local3) + (_local4 * _local4))); } public static function b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:* = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function b2MulXT(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; var _local4:Number; _local3 = SubtractVV(_arg2, _arg1.position); _local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y)); _local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y)); _local3.x = _local4; return (_local3); } public static function b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (b2Max(_arg2, b2Min(_arg1, _arg3))); } public static function b2AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); var _local4:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); var _local5:b2Mat22 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2NextPowerOfTwo(_arg1:uint):uint{ _arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647)); _arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823)); _arg1 = (_arg1 | ((_arg1 >> 4) & 268435455)); _arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF)); _arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF)); return ((_arg1 + 1)); } public static function b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } } }//package Box2D.Common.Math
Section 31
//b2Sweep (Box2D.Common.Math.b2Sweep) package Box2D.Common.Math { public class b2Sweep { public var localCenter:b2Vec2; public var a:Number; public var c:b2Vec2; public var a0:Number; public var c0:b2Vec2; public var t0:Number; public function b2Sweep(){ localCenter = new b2Vec2(); c0 = new b2Vec2(); c = new b2Vec2(); super(); } public function Advance(_arg1:Number):void{ var _local2:Number; if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){ _local2 = ((_arg1 - t0) / (1 - t0)); c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x)); c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y)); a0 = (((1 - _local2) * a0) + (_local2 * a)); t0 = _arg1; }; } public function GetXForm(_arg1:b2XForm, _arg2:Number):void{ var _local4:Number; var _local5:Number; if ((1 - t0) > Number.MIN_VALUE){ _local4 = ((_arg2 - t0) / (1 - t0)); _arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x)); _arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y)); _local5 = (((1 - _local4) * a0) + (_local4 * a)); _arg1.R.Set(_local5); } else { _arg1.position.SetV(c); _arg1.R.Set(a); }; var _local3:b2Mat22 = _arg1.R; _arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y))); _arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y))); } } }//package Box2D.Common.Math
Section 32
//b2Vec2 (Box2D.Common.Math.b2Vec2) package Box2D.Common.Math { public class b2Vec2 { public var y:Number; public var x:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function Set(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function Length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function LengthSquared():Number{ return (((x * x) + (y * y))); } public function MulM(_arg1:b2Mat22):void{ var _local2:Number = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function SetZero():void{ x = 0; y = 0; } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function Normalize():Number{ var _local1:Number = Math.sqrt(((x * x) + (y * y))); if (_local1 < Number.MIN_VALUE){ return (0); }; var _local2:Number = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function CrossVF(_arg1:Number):void{ var _local2:Number = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } public function MaxV(_arg1:b2Vec2):void{ x = ((x > _arg1.x)) ? x : _arg1.x; y = ((y > _arg1.y)) ? y : _arg1.y; } public function SetV(_arg1:b2Vec2):void{ x = _arg1.x; y = _arg1.y; } public function Negative():b2Vec2{ return (new b2Vec2(-(x), -(y))); } public function CrossFV(_arg1:Number):void{ var _local2:Number = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public function Abs():void{ x = Math.abs(x); y = Math.abs(y); } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y)))); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 33
//b2XForm (Box2D.Common.Math.b2XForm) package Box2D.Common.Math { public class b2XForm { public var position:b2Vec2; public var R:b2Mat22; public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{ position = new b2Vec2(); R = new b2Mat22(); super(); if (_arg1){ position.SetV(_arg1); R.SetM(_arg2); }; } public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{ position.SetV(_arg1); R.SetM(_arg2); } public function Set(_arg1:b2XForm):void{ position.SetV(_arg1.position); R.SetM(_arg1.R); } public function SetIdentity():void{ position.SetZero(); R.SetIdentity(); } } }//package Box2D.Common.Math
Section 34
//b2Color (Box2D.Common.b2Color) package Box2D.Common { import Box2D.Common.Math.*; public class b2Color { private var _r:uint;// = 0 private var _g:uint;// = 0 private var _b:uint;// = 0 public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function get color():uint{ return (((_r | (_g << 8)) | (_b << 16))); } public function set r(_arg1:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set g(_arg1:Number):void{ _g = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } } }//package Box2D.Common
Section 35
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static const b2_linearSleepTolerance:Number = 0.01; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.005; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxProxies:int = 0x0200; public static const b2_maxAngularVelocitySquared:Number = 62500; public static const b2_maxPolygonVertices:int = 8; public static const b2_velocityThreshold:Number = 1; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxPairs:int = 4096; public static const b2_maxTOIContactsPerIsland:int = 32; public static const b2_timeToSleep:Number = 0.5; public static const b2_maxManifoldPoints:int = 2; public static const b2_maxAngularVelocity:Number = 250; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearVelocity:Number = 200; public static const b2_maxLinearCorrection:Number = 0.2; public static const b2_toiSlop:Number = 0.04; public static const b2_maxLinearVelocitySquared:Number = 40000; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 36
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleContact extends b2Contact { private var m_manifolds:Array; public var m_manifold:b2Manifold; private var m0:b2Manifold; private static var 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; m_manifold.points[0].normalForce = 0; m_manifold.points[0].tangentForce = 0; } override public function Evaluate(_arg1:b2ContactListener):void{ var _local4:b2ContactPoint; var _local5:b2Mat22; var _local6:b2Vec2; var _local2:b2Body = m_shape1.m_body; var _local3:b2Body = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local2.m_xf, (m_shape2 as b2CircleShape), _local3.m_xf); if (m_manifold.pointCount > 0){ m_manifoldCount = 1; if (m0.pointCount == 0){ m_manifold.points[0].id.features.flip = (m_manifold.points[0].id.features.flip | b2Collision.b2_newPoint); } else { m_manifold.points[0].id.features.flip = (m_manifold.points[0].id.features.flip & ~(b2Collision.b2_newPoint)); }; } else { m_manifoldCount = 0; if ((((m0.pointCount > 0)) && (_arg1))){ _local4 = s_evalCP; _local4.shape1 = m_shape1; _local4.shape2 = m_shape2; _local4.normal.SetV(m0.normal); _local5 = _local2.m_xf.R; _local6 = m0.points[0].localPoint1; _local4.position.x = (_local2.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local4.position.y = (_local2.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); _local4.separation = m0.points[0].separation; _local4.normalForce = m0.points[0].normalForce; _local4.tangentForce = m0.points[0].tangentForce; _local4.id.key = m0.points[0].id.key; _arg1.Remove(_local4); }; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2CircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 37
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Contact { public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_prev:b2Contact; public var m_toi:Number; public var m_next:b2Contact; public var m_friction:Number; public var m_manifoldCount:int; public var m_node1:b2ContactEdge; public var m_node2:b2ContactEdge; public var m_restitution:Number; public var m_flags:uint; public static var e_toiFlag:uint = 8; public static var e_nonSolidFlag:uint = 1; public static var e_slowFlag:uint = 2; public static var e_islandFlag:uint = 4; public static var s_registers:Array; public static var s_initialized:Boolean = false; public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){ m_node1 = new b2ContactEdge(); m_node2 = new b2ContactEdge(); super(); m_flags = 0; if (((!(_arg1)) || (!(_arg2)))){ m_shape1 = null; m_shape2 = null; return; }; if (((_arg1.IsSensor()) || (_arg2.IsSensor()))){ m_flags = (m_flags | e_nonSolidFlag); }; m_shape1 = _arg1; m_shape2 = _arg2; m_manifoldCount = 0; m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction)); m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution); m_prev = null; m_next = null; m_node1.contact = null; m_node1.prev = null; m_node1.next = null; m_node1.other = null; m_node2.contact = null; m_node2.prev = null; m_node2.next = null; m_node2.other = null; } public function IsSolid():Boolean{ return (((m_flags & e_nonSolidFlag) == 0)); } public function GetShape1():b2Shape{ return (m_shape1); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetNext():b2Contact{ return (m_next); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function GetManifolds():Array{ return (null); } public function Update(_arg1:b2ContactListener):void{ Evaluate(_arg1); var _local2:b2Body = m_shape1.GetBody(); var _local3:b2Body = m_shape2.GetBody(); if (((((((_local2.IsStatic()) || (_local2.IsBullet()))) || (_local3.IsStatic()))) || (_local3.IsBullet()))){ m_flags = (m_flags & ~(e_slowFlag)); } else { m_flags = (m_flags | e_slowFlag); }; } public function Evaluate(_arg1:b2ContactListener):void{ } public static function InitializeRegisters():void{ var _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 Destroy(_arg1:b2Contact, _arg2):void{ if (_arg1.GetManifoldCount() > 0){ _arg1.GetShape1().GetBody().WakeUp(); _arg1.GetShape2().GetBody().WakeUp(); }; var _local3:int = _arg1.GetShape1().GetType(); var _local4:int = _arg1.GetShape2().GetType(); var _local5:* = s_registers[_local3][_local4].destroyFcn; _local5(_arg1, _arg2); } public static function AddType(_arg1, _arg2, _arg3:int, _arg4:int):void{ s_registers[_arg3][_arg4].createFcn = _arg1; s_registers[_arg3][_arg4].destroyFcn = _arg2; s_registers[_arg3][_arg4].primary = true; if (_arg3 != _arg4){ s_registers[_arg4][_arg3].createFcn = _arg1; s_registers[_arg4][_arg3].destroyFcn = _arg2; s_registers[_arg4][_arg3].primary = false; }; } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local7:b2Contact; var _local8:int; var _local9:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; var _local4:int = _arg1.m_type; var _local5:int = _arg2.m_type; var _local6:* = s_registers[_local4][_local5].createFcn; if (_local6){ if (s_registers[_local4][_local5].primary){ return (_local6(_arg1, _arg2, _arg3)); }; _local7 = _local6(_arg2, _arg1, _arg3); _local8 = 0; while (_local8 < _local7.GetManifoldCount()) { _local9 = _local7.GetManifolds()[_local8]; _local7.GetManifolds()[_local8].normal = _local9.normal.Negative(); _local8++; }; return (_local7); //unresolved jump }; return (null); } } }//package Box2D.Dynamics.Contacts
Section 38
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var normal:b2Vec2; public var restitution:Number; public var body1:b2Body; public var manifold:b2Manifold; public var body2:b2Body; public var friction: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 39
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var tangentForce:Number; public var normalForce:Number; public var positionImpulse:Number; public var separation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var tangentMass:Number; public var normalMass:Number; public var velocityBias:Number; public var equalizedMass:Number; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 40
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactEdge { public var other:b2Body; public var prev:b2ContactEdge; public var contact:b2Contact; public var next:b2ContactEdge; } }//package Box2D.Dynamics.Contacts
Section 41
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var primary:Boolean; public var createFcn; public var destroyFcn; } }//package Box2D.Dynamics.Contacts
Section 42
//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_constraintCount:int; public var m_constraints:Array; public var m_allocator; public var m_step:b2TimeStep; public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){ var _local5:int; var _local6:b2Vec2; var _local7:b2Mat22; var _local9:b2Contact; 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; _local5 = 0; while (_local5 < _arg3) { m_constraintCount = (m_constraintCount + _arg2[_local5].GetManifoldCount()); _local5++; }; _local5 = 0; while (_local5 < m_constraintCount) { m_constraints[_local5] = new b2ContactConstraint(); _local5++; }; var _local8:int; _local5 = 0; while (_local5 < _arg3) { _local9 = _arg2[_local5]; _local10 = _local9.m_shape1.m_body; _local11 = _local9.m_shape2.m_body; _local12 = _local9.GetManifoldCount(); _local13 = _local9.GetManifolds(); _local14 = _local9.m_friction; _local15 = _local9.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[_local8]; _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.normalForce = _local28.normalForce; _local29.tangentForce = _local28.tangentForce; _local29.separation = _local28.separation; _local29.positionImpulse = 0; _local29.localAnchor1.SetV(_local28.localPoint1); _local29.localAnchor2.SetV(_local28.localPoint2); _local7 = _local10.m_xf.R; _local32 = (_local29.localAnchor1.x - _local10.GetLocalCenter().x); _local33 = (_local29.localAnchor1.y - _local10.GetLocalCenter().y); _local30 = ((_local7.col1.x * _local32) + (_local7.col2.x * _local33)); _local33 = ((_local7.col1.y * _local32) + (_local7.col2.y * _local33)); _local32 = _local30; _local7 = _local11.m_xf.R; _local34 = (_local29.localAnchor2.x - _local11.GetLocalCenter().x); _local35 = (_local29.localAnchor2.y - _local11.GetLocalCenter().y); _local30 = ((_local7.col1.x * _local34) + (_local7.col2.x * _local35)); _local35 = ((_local7.col1.y * _local34) + (_local7.col2.y * _local35)); _local34 = _local30; _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++; }; _local8++; _local22++; }; _local5++; }; } public function InitVelocityConstraints():void{ var _local1:b2Vec2; var _local2:b2Vec2; var _local3:b2Mat22; var _local5:b2ContactConstraint; var _local6:b2Body; var _local7:b2Body; 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:int; var _local19:b2ContactConstraintPoint; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2ContactConstraintPoint; var _local4:int; while (_local4 < m_constraintCount) { _local5 = m_constraints[_local4]; _local6 = _local5.body1; _local7 = _local5.body2; _local8 = _local6.m_invMass; _local9 = _local6.m_invI; _local10 = _local7.m_invMass; _local11 = _local7.m_invI; _local12 = _local5.normal.x; _local13 = _local5.normal.y; _local14 = _local13; _local15 = -(_local12); if (b2World.s_enableWarmStarting){ _local18 = _local5.pointCount; _local17 = 0; while (_local17 < _local18) { _local19 = _local5.points[_local17]; _local20 = (m_step.dt * ((_local19.normalForce * _local12) + (_local19.tangentForce * _local14))); _local21 = (m_step.dt * ((_local19.normalForce * _local13) + (_local19.tangentForce * _local15))); _local3 = _local6.m_xf.R; _local1 = _local6.GetLocalCenter(); _local22 = (_local19.localAnchor1.x - _local1.x); _local23 = (_local19.localAnchor1.y - _local1.y); _local16 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23)); _local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23)); _local22 = _local16; _local3 = _local7.m_xf.R; _local1 = _local7.GetLocalCenter(); _local24 = (_local19.localAnchor2.x - _local1.x); _local25 = (_local19.localAnchor2.y - _local1.y); _local16 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25)); _local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25)); _local24 = _local16; _local6.m_angularVelocity = (_local6.m_angularVelocity - (_local9 * ((_local22 * _local21) - (_local23 * _local20)))); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x - (_local8 * _local20)); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y - (_local8 * _local21)); _local7.m_angularVelocity = (_local7.m_angularVelocity + (_local11 * ((_local24 * _local21) - (_local25 * _local20)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x + (_local10 * _local20)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y + (_local10 * _local21)); _local17++; }; } else { _local18 = _local5.pointCount; _local17 = 0; while (_local17 < _local18) { _local26 = _local5.points[_local17]; _local26.normalForce = 0; _local26.tangentForce = 0; _local17++; }; }; _local4++; }; } 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.GetLocalCenter(); _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.GetLocalCenter(); _local24 = (_local21.localAnchor2.x - _local4.x); _local25 = (_local21.localAnchor2.y - _local4.y); _local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25)); _local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25)); _local24 = _local26; _local27 = (_local9.x + _local22); _local28 = (_local9.y + _local23); _local29 = (_local11.x + _local24); _local30 = (_local11.y + _local25); _local31 = (_local29 - _local27); _local32 = (_local30 - _local28); _local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation); _local2 = b2Math.b2Min(_local2, _local33); _local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local35 = (-(_local21.equalizedMass) * _local34); _local36 = _local21.positionImpulse; _local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0); _local35 = (_local21.positionImpulse - _local36); _local37 = (_local35 * _local17); _local38 = (_local35 * _local18); _local9.x = (_local9.x - (_local13 * _local37)); _local9.y = (_local9.y - (_local13 * _local38)); _local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37)))); _local7.m_sweep.a = _local10; _local7.SynchronizeTransform(); _local11.x = (_local11.x + (_local15 * _local37)); _local11.y = (_local11.y + (_local15 * _local38)); _local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37)))); _local8.m_sweep.a = _local12; _local8.SynchronizeTransform(); _local20++; }; _local5++; }; return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop))); } public function SolveVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraintPoint; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:b2Mat22; var _local14:b2Vec2; var _local16:b2ContactConstraint; var _local17:b2Body; var _local18:b2Body; var _local19:Number; var _local20:b2Vec2; var _local21:Number; var _local22:b2Vec2; 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:int; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local15:int; while (_local15 < m_constraintCount) { _local16 = m_constraints[_local15]; _local17 = _local16.body1; _local18 = _local16.body2; _local19 = _local17.m_angularVelocity; _local20 = _local17.m_linearVelocity; _local21 = _local18.m_angularVelocity; _local22 = _local18.m_linearVelocity; _local23 = _local17.m_invMass; _local24 = _local17.m_invI; _local25 = _local18.m_invMass; _local26 = _local18.m_invI; _local27 = _local16.normal.x; _local28 = _local16.normal.y; _local29 = _local28; _local30 = -(_local27); _local32 = _local16.pointCount; _local1 = 0; while (_local1 < _local32) { _local2 = _local16.points[_local1]; _local13 = _local17.m_xf.R; _local14 = _local17.GetLocalCenter(); _local3 = (_local2.localAnchor1.x - _local14.x); _local4 = (_local2.localAnchor1.y - _local14.y); _local31 = ((_local13.col1.x * _local3) + (_local13.col2.x * _local4)); _local4 = ((_local13.col1.y * _local3) + (_local13.col2.y * _local4)); _local3 = _local31; _local13 = _local18.m_xf.R; _local14 = _local18.GetLocalCenter(); _local5 = (_local2.localAnchor2.x - _local14.x); _local6 = (_local2.localAnchor2.y - _local14.y); _local31 = ((_local13.col1.x * _local5) + (_local13.col2.x * _local6)); _local6 = ((_local13.col1.y * _local5) + (_local13.col2.y * _local6)); _local5 = _local31; _local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4)); _local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3)); _local33 = ((_local7 * _local27) + (_local8 * _local28)); _local9 = ((-(m_step.inv_dt) * _local2.normalMass) * (_local33 - _local2.velocityBias)); _local34 = b2Math.b2Max((_local2.normalForce + _local9), 0); _local9 = (_local34 - _local2.normalForce); _local11 = ((m_step.dt * _local9) * _local27); _local12 = ((m_step.dt * _local9) * _local28); _local20.x = (_local20.x - (_local23 * _local11)); _local20.y = (_local20.y - (_local23 * _local12)); _local19 = (_local19 - (_local24 * ((_local3 * _local12) - (_local4 * _local11)))); _local22.x = (_local22.x + (_local25 * _local11)); _local22.y = (_local22.y + (_local25 * _local12)); _local21 = (_local21 + (_local26 * ((_local5 * _local12) - (_local6 * _local11)))); _local2.normalForce = _local34; _local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4)); _local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3)); _local35 = ((_local7 * _local29) + (_local8 * _local30)); _local9 = ((m_step.inv_dt * _local2.tangentMass) * -(_local35)); _local36 = (_local16.friction * _local2.normalForce); _local34 = b2Math.b2Clamp((_local2.tangentForce + _local9), -(_local36), _local36); _local9 = (_local34 - _local2.tangentForce); _local11 = ((m_step.dt * _local9) * _local29); _local12 = ((m_step.dt * _local9) * _local30); _local20.x = (_local20.x - (_local23 * _local11)); _local20.y = (_local20.y - (_local23 * _local12)); _local19 = (_local19 - (_local24 * ((_local3 * _local12) - (_local4 * _local11)))); _local22.x = (_local22.x + (_local25 * _local11)); _local22.y = (_local22.y + (_local25 * _local12)); _local21 = (_local21 + (_local26 * ((_local5 * _local12) - (_local6 * _local11)))); _local2.tangentForce = _local34; _local1++; }; _local17.m_angularVelocity = _local19; _local18.m_angularVelocity = _local21; _local15++; }; } public function FinalizeVelocityConstraints():void{ var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local1:int; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local3.points[_local4].normalForce = _local2.points[_local4].normalForce; _local3.points[_local4].tangentForce = _local2.points[_local4].tangentForce; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 43
//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 44
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { private var m_manifolds:Array; public var m_manifold:b2Manifold; private var m0:b2Manifold; private static var 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; m_manifold.points[0].normalForce = 0; m_manifold.points[0].tangentForce = 0; } override public function Evaluate(_arg1:b2ContactListener):void{ var _local4:b2ContactPoint; var _local5:b2Mat22; var _local6:b2Vec2; var _local2:b2Body = m_shape1.GetBody(); var _local3:b2Body = m_shape2.GetBody(); m0.Set(m_manifold); b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local2.m_xf, (m_shape2 as b2CircleShape), _local3.m_xf); if (m_manifold.pointCount > 0){ m_manifoldCount = 1; if (m0.pointCount == 0){ m_manifold.points[0].id.features.flip = (m_manifold.points[0].id.features.flip | b2Collision.b2_newPoint); } else { m_manifold.points[0].id.features.flip = (m_manifold.points[0].id.features.flip & ~(b2Collision.b2_newPoint)); }; } else { m_manifoldCount = 0; if ((((m0.pointCount > 0)) && (_arg1))){ _local4 = s_evalCP; _local4.shape1 = m_shape1; _local4.shape2 = m_shape2; _local4.normal.SetV(m0.normal); _local5 = _local2.m_xf.R; _local6 = m0.points[0].localPoint1; _local4.position.x = (_local2.m_xf.position.x + ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y))); _local4.position.y = (_local2.m_xf.position.y + ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y))); _local4.separation = m0.points[0].separation; _local4.normalForce = m0.points[0].normalForce; _local4.tangentForce = m0.points[0].tangentForce; _local4.id = m0.points[0].id; _arg1.Remove(_local4); }; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 45
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static var 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 _local4:b2ContactPoint; var _local5:int; var _local7:b2ManifoldPoint; var _local8:Boolean; var _local9:uint; var _local10:int; var _local11:b2ManifoldPoint; var _local12:b2ContactID; var _local13:b2ManifoldPoint; var _local14:b2Mat22; var _local15:b2Vec2; var _local2:b2Body = m_shape1.GetBody(); var _local3:b2Body = m_shape2.GetBody(); m0.Set(m_manifold); b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local2.m_xf, (m_shape2 as b2PolygonShape), _local3.m_xf); var _local6:Array = [false, false]; if (m_manifold.pointCount > 0){ _local5 = 0; while (_local5 < m_manifold.pointCount) { _local7 = m_manifold.points[_local5]; _local7.normalForce = 0; _local7.tangentForce = 0; _local8 = false; _local9 = _local7.id.key; _local10 = 0; while (_local10 < m0.pointCount) { if (_local6[_local10] == true){ } else { _local11 = m0.points[_local10]; _local12 = _local11.id; _local12.features.flip = (_local12.features.flip & ~(b2Collision.b2_newPoint)); if (_local12.key == _local9){ _local6[_local10] = true; _local7.normalForce = _local11.normalForce; _local7.tangentForce = _local11.tangentForce; _local8 = true; break; }; }; _local10++; }; if (_local8 == false){ _local7.id.features.flip = (_local7.id.features.flip | b2Collision.b2_newPoint); }; _local5++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (((_arg1) && ((m0.pointCount > 0)))){ _local4 = s_evalCP; _local4.shape1 = m_shape1; _local4.shape2 = m_shape2; _local4.normal.SetV(m0.normal); _local5 = 0; while (_local5 < m0.pointCount) { if (_local6[_local5]){ } else { _local13 = m0.points[_local5]; _local14 = _local2.m_xf.R; _local15 = _local13.localPoint1; _local4.position.x = (_local2.m_xf.position.x + ((_local14.col1.x * _local15.x) + (_local14.col2.x * _local15.y))); _local4.position.y = (_local2.m_xf.position.y + ((_local14.col1.y * _local15.x) + (_local14.col2.y * _local15.y))); _local4.separation = _local13.separation; _local4.normalForce = _local13.normalForce; _local4.tangentForce = _local13.tangentForce; _local4.id.key = _local13.id.key; _arg1.Remove(_local4); }; _local5++; }; }; } override public function GetManifolds():Array{ return (m_manifolds); } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolygonContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 46
//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_length:Number; public var m_force:Number; public var m_mass: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_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 GetReactionTorque():Number{ return (0); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2 = new b2Vec2(); _local1.SetV(m_u); _local1.Multiply(m_force); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; var _local2:b2Body = m_body1; var _local3:b2Body = m_body2; _local1 = _local2.m_xf.R; var _local4:Number = (m_localAnchor1.x - _local2.GetLocalCenter().x); var _local5:Number = (m_localAnchor1.y - _local2.GetLocalCenter().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.GetLocalCenter().x); var _local8:Number = (m_localAnchor2.y - _local3.GetLocalCenter().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 InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local13:Number; var _local14:Number; _local4 = m_body1; _local5 = m_body2; _local2 = _local4.m_xf.R; _local6 = (m_localAnchor1.x - _local4.GetLocalCenter().x); _local7 = (m_localAnchor1.y - _local4.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local5.GetLocalCenter().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); m_u.y = ((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y); 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)); m_mass = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12)); m_mass = (1 / m_mass); if (b2World.s_enableWarmStarting){ _local13 = ((_arg1.dt * m_force) * m_u.x); _local14 = ((_arg1.dt * m_force) * m_u.y); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local13)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local14)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local14) - (_local7 * _local13)))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local13)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local14)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local14) - (_local9 * _local13)))); } else { m_force = 0; }; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:b2Body; _local3 = m_body1; var _local4:b2Body = m_body2; _local2 = _local3.m_xf.R; var _local5:Number = (m_localAnchor1.x - _local3.GetLocalCenter().x); var _local6:Number = (m_localAnchor1.y - _local3.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local4.GetLocalCenter().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 = ((-(_arg1.inv_dt) * m_mass) * _local14); m_force = (m_force + _local15); var _local16:Number = ((_arg1.dt * _local15) * m_u.x); var _local17:Number = ((_arg1.dt * _local15) * m_u.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16)))); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17)); _local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); } } }//package Box2D.Dynamics.Joints
Section 47
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2DistanceJointDef extends b2JointDef { public var localAnchor1:b2Vec2; public var length:Number; public var localAnchor2:b2Vec2; public function b2DistanceJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; length = 1; } 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))); } } }//package Box2D.Dynamics.Joints
Section 48
//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_ground2:b2Body; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_revolute2:b2RevoluteJoint; public var m_force:Number; public var m_mass:Number; public var m_prismatic2:b2PrismaticJoint; public var m_ground1:b2Body; public var m_revolute1:b2RevoluteJoint; public var m_prismatic1:b2PrismaticJoint; public var m_constant:Number; public var m_J:b2Jacobian; public function b2GearJoint(_arg1:b2GearJointDef){ var _local2:Number; var _local3:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_J = new b2Jacobian(); super(_arg1); 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 (_arg1.joint1.m_type == b2Joint.e_revoluteJoint){ m_revolute1 = (_arg1.joint1 as b2RevoluteJoint); m_groundAnchor1.SetV(m_revolute1.m_localAnchor1); m_localAnchor1.SetV(m_revolute1.m_localAnchor2); _local2 = m_revolute1.GetJointAngle(); } else { m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint); m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1); m_localAnchor1.SetV(m_prismatic1.m_localAnchor2); _local2 = m_prismatic1.GetJointTranslation(); }; m_ground2 = _arg1.joint2.m_body1; m_body2 = _arg1.joint2.m_body2; if (_arg1.joint2.m_type == b2Joint.e_revoluteJoint){ m_revolute2 = (_arg1.joint2 as b2RevoluteJoint); m_groundAnchor2.SetV(m_revolute2.m_localAnchor1); m_localAnchor2.SetV(m_revolute2.m_localAnchor2); _local3 = m_revolute2.GetJointAngle(); } else { m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint); m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1); m_localAnchor2.SetV(m_prismatic2.m_localAnchor2); _local3 = m_prismatic2.GetJointTranslation(); }; m_ratio = _arg1.ratio; m_constant = (_local2 + (m_ratio * _local3)); 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 InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local15:Number; var _local2:b2Body = m_ground1; var _local3:b2Body = m_ground2; _local4 = m_body1; _local5 = 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.GetLocalCenter().x); _local9 = (m_localAnchor1.y - _local4.GetLocalCenter().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.GetLocalCenter().x); _local9 = (m_localAnchor2.y - _local5.GetLocalCenter().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 (b2World.s_enableWarmStarting){ _local15 = (_arg1.dt * m_force); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * m_J.linear1.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * m_J.linear1.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * m_J.angular1)); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * m_J.linear2.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * m_J.linear2.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * m_J.angular2)); } else { m_force = 0; }; } override public function GetReactionTorque():Number{ var _local1:b2Mat22 = m_body2.m_xf.R; var _local2:Number = (m_localAnchor1.x - m_body2.GetLocalCenter().x); var _local3:Number = (m_localAnchor1.y - m_body2.GetLocalCenter().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); } 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 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)); } public function GetRatio():Number{ return (m_ratio); } 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)); } } }//package Box2D.Dynamics.Joints
Section 49
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { public class b2GearJointDef extends b2JointDef { public var joint1:b2Joint; public var joint2:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 50
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var linear1:b2Vec2; public var linear2:b2Vec2; public var angular1:Number; public var angular2:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linear1.SetV(_arg1); angular1 = _arg2; linear2.SetV(_arg3); angular2 = _arg4; } public function SetZero():void{ linear1.SetZero(); angular1 = 0; linear2.SetZero(); angular2 = 0; } public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{ return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4))); } } }//package Box2D.Dynamics.Joints
Section 51
//b2Joint (Box2D.Dynamics.Joints.b2Joint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2Joint { public var m_islandFlag:Boolean; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_type:int; public var m_collideConnected:Boolean; public var m_node1:b2JointEdge; public var m_node2:b2JointEdge; public var m_userData; public var m_body1:b2Body; public var m_body2:b2Body; public static const e_unknownJoint:int = 0; public static const e_inactiveLimit:int = 0; public static const e_atUpperLimit:int = 2; public static const e_atLowerLimit:int = 1; public static const e_gearJoint:int = 6; public static const e_revoluteJoint:int = 1; public static const e_equalLimits:int = 3; public static const e_distanceJoint:int = 3; public static const e_pulleyJoint:int = 4; public static const e_prismaticJoint:int = 2; public static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_node1 = new b2JointEdge(); m_node2 = new b2JointEdge(); super(); m_type = _arg1.type; m_prev = null; m_next = null; m_body1 = _arg1.body1; m_body2 = _arg1.body2; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetBody2():b2Body{ return (m_body2); } public function InitPositionConstraints():void{ } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function GetNext():b2Joint{ return (m_next); } public function GetType():int{ return (m_type); } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function GetReactionTorque():Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce():b2Vec2{ return (null); } public function SolvePositionConstraints():Boolean{ return (false); } public function GetBody1():b2Body{ return (m_body1); } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public static function Destroy(_arg1:b2Joint, _arg2):void{ } 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); } } }//package Box2D.Dynamics.Joints
Section 52
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointDef { public var body2:b2Body; public var type:int; public var userData; public var collideConnected:Boolean; public var body1:b2Body; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 53
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointEdge { public var other:b2Body; public var next:b2JointEdge; public var prev:b2JointEdge; public var joint:b2Joint; } }//package Box2D.Dynamics.Joints
Section 54
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { private var K1:b2Mat22; private var K:b2Mat22; public var m_mass:b2Mat22; public var m_beta:Number; public var m_force:b2Vec2; private var K2:b2Mat22; public var m_target:b2Vec2; public var m_gamma:Number; public var m_C:b2Vec2; public var m_localAnchor:b2Vec2; public var m_maxForce: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_force = 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_force.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 = ((_local5 * _local6) * _local6); m_gamma = (1 / (_local7 + (_arg1.timeStep * _local8))); m_beta = ((_arg1.timeStep * _local8) / (_local7 + (_arg1.timeStep * _local8))); } public function SetTarget(_arg1:b2Vec2):void{ if (m_body2.IsSleeping()){ m_body2.WakeUp(); }; m_target = _arg1; } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor)); } override 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.GetLocalCenter().x); _local5 = (m_localAnchor.y - _local2.GetLocalCenter().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_force.x); var _local10:Number = (_arg1.dt * m_force.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 GetAnchor1():b2Vec2{ return (m_target); } override public function GetReactionTorque():Number{ return (0); } override public function GetReactionForce():b2Vec2{ return (m_force); } override public function SolvePositionConstraints():Boolean{ return (true); } 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.GetLocalCenter().x); var _local7:Number = (m_localAnchor.y - _local2.GetLocalCenter().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_force.x)); _local5 = ((_local9 + ((m_beta * _arg1.inv_dt) * m_C.y)) + ((m_gamma * _arg1.dt) * m_force.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_force.x; var _local13:Number = m_force.y; m_force.x = (m_force.x + _local10); m_force.y = (m_force.y + _local11); var _local14:Number = m_force.Length(); if (_local14 > m_maxForce){ m_force.Multiply((m_maxForce / _local14)); }; _local10 = (m_force.x - _local12); _local11 = (m_force.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)))); } } }//package Box2D.Dynamics.Joints
Section 55
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var timeStep:Number; public var target:b2Vec2; public var maxForce:Number; public var dampingRatio:Number; public var frequencyHz:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; timeStep = (1 / 60); } } }//package Box2D.Dynamics.Joints
Section 56
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PrismaticJoint extends b2Joint { public var m_limitForce:Number; public var m_lowerTranslation:Number; public var m_localXAxis1:b2Vec2; public var m_refAngle:Number; public var m_torque:Number; public var m_motorForce:Number; public var m_enableLimit:Boolean; public var m_angularMass:Number; public var m_maxMotorForce:Number; public var m_localYAxis1:b2Vec2; public var m_force:Number; public var m_motorMass:Number; public var m_upperTranslation:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_limitState:int; public var m_linearMass:Number; public var m_motorJacobian:b2Jacobian; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_enableMotor:Boolean; public var m_linearJacobian:b2Jacobian; 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 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 GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetLowerLimit():Number{ return (m_lowerTranslation); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetJointTranslation():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; var _local4:b2Vec2 = _local1.GetWorldPoint(m_localAnchor1); var _local5:b2Vec2 = _local2.GetWorldPoint(m_localAnchor2); var _local6:Number = (_local5.x - _local4.x); var _local7:Number = (_local5.y - _local4.y); var _local8:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local9:Number = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():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 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.GetLocalCenter().x); var _local12:Number = (m_localAnchor1.y - _local3.GetLocalCenter().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.GetLocalCenter().x); var _local14:Number = (m_localAnchor2.y - _local4.GetLocalCenter().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.GetLocalCenter().x); _local12 = (m_localAnchor1.y - _local3.GetLocalCenter().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.GetLocalCenter().x); _local14 = (m_localAnchor2.y - _local4.GetLocalCenter().y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y)); _local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y)); _local31 = ((_local29 * _local19) + (_local30 * _local20)); _local32 = 0; if (m_limitState == e_equalLimits){ _local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26)); } else { if (m_limitState == e_atLowerLimit){ _local1 = (_local31 - m_lowerTranslation); _local25 = b2Math.b2Max(_local25, -(_local1)); _local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); } else { if (m_limitState == e_atUpperLimit){ _local1 = (_local31 - m_upperTranslation); _local25 = b2Math.b2Max(_local25, _local1); _local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); }; }; }; _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) * m_motorJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * m_motorJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * m_motorJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * m_motorJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * m_motorJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * m_motorJacobian.angular2)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= b2Settings.b2_angularSlop)))); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ var _local3:b2Mat22; var _local1:b2Body = m_body1; var _local2:b2Body = m_body2; _local3 = _local1.m_xf.R; var _local4:Number = (m_localAnchor1.x - _local1.GetLocalCenter().x); var _local5:Number = (m_localAnchor1.y - _local1.GetLocalCenter().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.GetLocalCenter().x); var _local8:Number = (m_localAnchor2.y - _local2.GetLocalCenter().y); _local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8)); _local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8)); _local7 = _local6; var _local9:Number = (_local1.m_sweep.c.x + _local4); var _local10:Number = (_local1.m_sweep.c.y + _local5); var _local11:Number = (_local2.m_sweep.c.x + _local7); var _local12:Number = (_local2.m_sweep.c.y + _local8); var _local13:Number = (_local11 - _local9); var _local14:Number = (_local12 - _local10); var _local15:b2Vec2 = _local1.GetWorldVector(m_localXAxis1); var _local16:b2Vec2 = _local1.m_linearVelocity; var _local17:b2Vec2 = _local2.m_linearVelocity; var _local18:Number = _local1.m_angularVelocity; var _local19:Number = _local2.m_angularVelocity; var _local20:Number = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4))))); return (_local20); } override 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.GetLocalCenter().x); var _local7:Number = (m_localAnchor1.y - _local2.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local3.GetLocalCenter().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 (b2World.s_enableWarmStarting){ _local23 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.x))); _local24 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.y))); _local25 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.x))); _local26 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.y))); _local27 = (_arg1.dt * (((m_force * m_linearJacobian.angular1) - m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular1))); _local28 = (_arg1.dt * (((m_force * m_linearJacobian.angular2) + m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular2))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28)); } else { m_force = 0; m_torque = 0; m_limitForce = 0; m_motorForce = 0; }; m_limitPositionImpulse = 0; } public function GetMotorForce():Number{ return (m_motorForce); } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } public function SetMaxMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } override public function GetReactionTorque():Number{ return (m_torque); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } } }//package Box2D.Dynamics.Joints
Section 57
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var motorSpeed:Number; public var localAxis1:b2Vec2; public var referenceAngle:Number; public var upperTranslation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public var maxMotorForce:Number; public var lowerTranslation:Number; public function b2PrismaticJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); localAxis1 = new b2Vec2(); super(); type = b2Joint.e_prismaticJoint; localAxis1.Set(1, 0); referenceAngle = 0; enableLimit = false; lowerTranslation = 0; upperTranslation = 0; enableMotor = false; maxMotorForce = 0; motorSpeed = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); localAxis1 = body1.GetLocalVector(_arg4); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 58
//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_limitState1:int; public var m_limitState2:int; public var m_ground:b2Body; public var m_maxLength2:Number; public var m_maxLength1:Number; public var m_limitPositionImpulse1:Number; public var m_limitPositionImpulse2:Number; public var m_force:Number; public var m_constant:Number; public var m_positionImpulse:Number; public var m_state:int; public var m_ratio:Number; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_limitMass1:Number; public var m_limitMass2:Number; public var m_pulleyMass:Number; public var m_u1:b2Vec2; public var m_limitForce1:Number; public var m_limitForce2:Number; public var m_u2:b2Vec2; public static const b2_minPulleyLength:Number = 2; public function b2PulleyJoint(_arg1:b2PulleyJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u1 = new b2Vec2(); m_u2 = new b2Vec2(); super(_arg1); m_ground = m_body1.m_world.m_groundBody; m_groundAnchor1.x = (_arg1.groundAnchor1.x - m_ground.m_xf.position.x); m_groundAnchor1.y = (_arg1.groundAnchor1.y - m_ground.m_xf.position.y); m_groundAnchor2.x = (_arg1.groundAnchor2.x - m_ground.m_xf.position.x); m_groundAnchor2.y = (_arg1.groundAnchor2.y - m_ground.m_xf.position.y); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_ratio = _arg1.ratio; m_constant = (_arg1.length1 + (m_ratio * _arg1.length2)); m_maxLength1 = b2Math.b2Min(_arg1.maxLength1, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.b2Min(_arg1.maxLength2, ((m_constant - b2_minPulleyLength) / m_ratio)); m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; } public function GetGroundAnchor2():b2Vec2{ var _local1:b2Vec2 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor2); return (_local1); } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2 = m_u2.Copy(); _local1.Multiply(m_force); return (_local1); } 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.GetLocalCenter().x); _local9 = (m_localAnchor1.y - _local1.GetLocalCenter().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.GetLocalCenter().x); _local11 = (m_localAnchor2.y - _local2.GetLocalCenter().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.GetLocalCenter().x); _local9 = (m_localAnchor1.y - _local1.GetLocalCenter().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.GetLocalCenter().x); _local11 = (m_localAnchor2.y - _local2.GetLocalCenter().y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local17 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local17)); m_u2.y = (m_u2.y * (1 / _local17)); } else { m_u2.SetZero(); }; _local18 = (m_maxLength2 - _local17); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass2) * _local18); _local21 = m_limitPositionImpulse2; m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19)); _local19 = (m_limitPositionImpulse2 - _local21); _local14 = (-(_local19) * m_u2.x); _local15 = (-(_local19) * m_u2.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local2.SynchronizeTransform(); }; return ((_local23 < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _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.GetLocalCenter().x); var _local6:Number = (m_localAnchor1.y - _local2.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local3.GetLocalCenter().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 (b2World.s_enableWarmStarting){ _local23 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.x); _local24 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.y); _local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.x); _local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25)))); } else { m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; }; } override public function GetReactionTorque():Number{ return (0); } public function GetRatio():Number{ return (m_ratio); } 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.GetLocalCenter().x); var _local6:Number = (m_localAnchor1.y - _local2.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local3.GetLocalCenter().y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; if (m_state == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13)))); _local19 = ((-(_arg1.inv_dt) * m_pulleyMass) * _local18); _local20 = m_force; m_force = b2Math.b2Max(0, (m_force + _local19)); _local19 = (m_force - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local16 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.x); _local17 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; if (m_limitState1 == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local18 = -(((m_u1.x * _local10) + (m_u1.y * _local11))); _local19 = ((-(_arg1.inv_dt) * m_limitMass1) * _local18); _local20 = m_limitForce1; m_limitForce1 = b2Math.b2Max(0, (m_limitForce1 + _local19)); _local19 = (m_limitForce1 - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); }; if (m_limitState2 == e_atUpperLimit){ _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = -(((m_u2.x * _local12) + (m_u2.y * _local13))); _local19 = ((-(_arg1.inv_dt) * m_limitMass2) * _local18); _local20 = m_limitForce2; m_limitForce2 = b2Math.b2Max(0, (m_limitForce2 + _local19)); _local19 = (m_limitForce2 - _local20); _local16 = ((-(_arg1.dt) * _local19) * m_u2.x); _local17 = ((-(_arg1.dt) * _local19) * m_u2.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; } public function GetLength1():Number{ var _local1:b2Vec2 = 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 GetGroundAnchor1():b2Vec2{ var _local1:b2Vec2 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } } }//package Box2D.Dynamics.Joints
Section 59
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength1:Number; public var maxLength2:Number; public var length1:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var groundAnchor1:b2Vec2; public var groundAnchor2:b2Vec2; public var ratio:Number; public var length2:Number; public function b2PulleyJointDef(){ groundAnchor1 = new b2Vec2(); groundAnchor2 = new b2Vec2(); localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundAnchor1.Set(-1, 1); groundAnchor2.Set(1, 1); localAnchor1.Set(-1, 0); localAnchor2.Set(1, 0); length1 = 0; maxLength1 = 0; length2 = 0; maxLength2 = 0; ratio = 1; collideConnected = true; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{ body1 = _arg1; body2 = _arg2; groundAnchor1.SetV(_arg3); groundAnchor2.SetV(_arg4); localAnchor1 = body1.GetLocalPoint(_arg5); localAnchor2 = body2.GetLocalPoint(_arg6); var _local8:Number = (_arg5.x - _arg3.x); var _local9:Number = (_arg5.y - _arg3.y); length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); var _local10:Number = (_arg6.x - _arg4.x); var _local11:Number = (_arg6.y - _arg4.y); length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; var _local12:Number = (length1 + (ratio * length2)); maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 60
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { public var m_limitForce:Number; public var m_pivotMass:b2Mat22; public var m_motorForce:Number; public var m_enableLimit:Boolean; public var m_limitState:int; public var m_motorMass:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; private var K:b2Mat22; public var m_pivotForce:b2Vec2; public var m_enableMotor:Boolean; public var m_referenceAngle:Number; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_upperAngle:Number; public var m_lowerAngle:Number; public var m_maxMotorTorque:Number; public static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_pivotForce = new b2Vec2(); m_pivotMass = new b2Mat22(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_referenceAngle = _arg1.referenceAngle; m_pivotForce.Set(0, 0); m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 0; m_lowerAngle = _arg1.lowerAngle; m_upperAngle = _arg1.upperAngle; m_maxMotorTorque = _arg1.maxMotorTorque; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function 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.GetLocalCenter().x); var _local7:Number = (m_localAnchor1.y - _local2.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local3.GetLocalCenter().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 GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function GetUpperLimit():Number{ return (m_upperAngle); } public function GetLowerLimit():Number{ return (m_lowerAngle); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ return (m_pivotForce); } 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.GetLocalCenter().x); var _local8:Number = (m_localAnchor1.y - _local3.GetLocalCenter().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.GetLocalCenter().x); var _local11:Number = (m_localAnchor2.y - _local4.GetLocalCenter().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)))); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function SetMaxMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetJointAngle():Number{ return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle)); } public function GetMotorTorque():Number{ return (m_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.GetLocalCenter().x); _local7 = (m_localAnchor1.y - _local2.GetLocalCenter().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.GetLocalCenter().x); var _local9:Number = (m_localAnchor2.y - _local3.GetLocalCenter().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 (b2World.s_enableWarmStarting){ _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * m_pivotForce.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * m_pivotForce.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * m_pivotForce.y) - (_local7 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * m_pivotForce.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * m_pivotForce.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * m_pivotForce.y) - (_local9 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); } else { m_pivotForce.SetZero(); m_motorForce = 0; m_limitForce = 0; }; m_limitPositionImpulse = 0; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } override public function GetReactionTorque():Number{ return (m_limitForce); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } } }//package Box2D.Dynamics.Joints
Section 61
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var upperAngle:Number; public var enableMotor:Boolean; public var referenceAngle:Number; public var motorSpeed:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var lowerAngle:Number; public var maxMotorTorque:Number; public function b2RevoluteJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_revoluteJoint; localAnchor1.Set(0, 0); localAnchor2.Set(0, 0); referenceAngle = 0; lowerAngle = 0; upperAngle = 0; maxMotorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 62
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; public class b2Body { public var m_xf:b2XForm; public var m_next:b2Body; public var m_contactList:b2ContactEdge; public var m_angularVelocity:Number; public var m_shapeList:b2Shape; public var m_force:b2Vec2; public var m_sweep:b2Sweep; public var m_mass:Number; public var m_torque:Number; public var m_userData; public var m_linearVelocity:b2Vec2; public var m_flags:uint; public var m_invI:Number; public var m_world:b2World; public var m_prev:b2Body; public var m_invMass:Number; public var m_type:uint; public var m_linearDamping:Number; public var m_shapeCount:int; public var m_angularDamping:Number; public var m_sleepTime:Number; public var m_jointList:b2JointEdge; public var m_I:Number; public static var e_fixedRotationFlag:uint = 64; public static var e_frozenFlag:uint = 2; public static var e_maxTypes:uint = 3; public static var e_sleepFlag:uint = 8; private static var s_massData:b2MassData = new b2MassData(); public static var e_bulletFlag:uint = 32; public static var e_staticType:uint = 1; public static var e_islandFlag:uint = 4; public static var e_allowSleepFlag:uint = 16; private static var s_xf1:b2XForm = new b2XForm(); public static var e_dynamicType:uint = 2; public function b2Body(_arg1:b2BodyDef, _arg2:uint, _arg3: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_type = _arg2; m_world = _arg3; 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 _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_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_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; if (m_type == e_dynamicType){ m_mass = _arg1.massData.mass; }; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if (((((m_flags & b2Body.e_fixedRotationFlag) == 0)) && ((m_type == e_dynamicType)))){ m_I = _arg1.massData.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; m_userData = _arg1.userData; m_shapeList = null; m_shapeCount = 0; } public function SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } public function ApplyTorque(_arg1:Number):void{ if (IsSleeping()){ WakeUp(); }; m_torque = (m_torque + _arg1); } public function IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsDynamic():Boolean{ return ((m_type == e_dynamicType)); } public function SynchronizeTransform():void{ m_xf.R.Set(m_sweep.a); var _local1:b2Mat22 = m_xf.R; var _local2:b2Vec2 = m_sweep.localCenter; m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y))); m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y))); } public function GetInertia():Number{ return (m_I); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function SetMassFromShapes():void{ var _local1:b2Shape; if (m_world.m_lock == true){ return; }; if (m_type == e_staticType){ 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); } else { m_invMass = 0; m_invI = 0; }; 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; }; } public function GetJointList():b2JointEdge{ return (m_jointList); } 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 ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; m_force.x = (m_force.x + _arg1.x); m_force.y = (m_force.y + _arg1.y); m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))); } public function SynchronizeShapes():Boolean{ var _local4:b2Shape; var _local1:b2XForm = s_xf1; _local1.R.Set(m_sweep.a0); var _local2:b2Mat22 = _local1.R; var _local3:b2Vec2 = m_sweep.localCenter; _local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y))); _local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y))); var _local5:Boolean; _local4 = m_shapeList; while (_local4) { _local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf); if (_local5 == false){ break; }; _local4 = _local4.m_next; }; if (_local5 == false){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local4 = m_shapeList; while (_local4) { _local4.DestroyProxy(m_world.m_broadPhase); _local4 = _local4.m_next; }; return (false); }; return (true); } public function GetAngle():Number{ return (m_sweep.a); } public function GetXForm():b2XForm{ return (m_xf); } public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; m_linearVelocity.x = (m_linearVelocity.x + (m_invMass * _arg1.x)); m_linearVelocity.y = (m_linearVelocity.y + (m_invMass * _arg1.y)); m_angularVelocity = (m_angularVelocity + (m_invI * (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x)))); } public function GetContactList():b2ContactEdge{ return (m_contactList); } public function GetAngularVelocity():Number{ return (m_angularVelocity); } public function GetMass():Number{ return (m_mass); } public function GetShapeList():b2Shape{ return (m_shapeList); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulXT(m_xf, _arg1)); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } public function SetMass(_arg1:b2MassData):void{ var _local2:b2Mat22; if (m_world.m_lock == true){ return; }; if (m_type == e_staticType){ return; }; m_mass = 0; 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); _local2 = m_xf.R; var _local3:b2Vec2 = m_sweep.localCenter; m_sweep.c.x = ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y)); m_sweep.c.y = ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.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); var _local4:b2Shape = m_shapeList; while (_local4) { _local4.UpdateSweepRadius(m_sweep.localCenter); _local4 = _local4.m_next; }; } public function IsStatic():Boolean{ return ((m_type == e_staticType)); } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_xf.R, _arg1)); } public function GetNext():b2Body{ return (m_next); } public function Advance(_arg1:Number):void{ m_sweep.Advance(_arg1); m_sweep.c.SetV(m_sweep.c0); m_sweep.a = m_sweep.a0; SynchronizeTransform(); } public function SetBullet(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_bulletFlag); } else { m_flags = (m_flags & ~(e_bulletFlag)); }; } public function CreateShape(_arg1:b2ShapeDef):b2Shape{ if (m_world.m_lock == true){ return (null); }; var _local2:b2Shape = b2Shape.Create(_arg1, m_world.m_blockAllocator); _local2.m_next = m_shapeList; m_shapeList = _local2; m_shapeCount++; _local2.m_body = this; _local2.CreateProxy(m_world.m_broadPhase, m_xf); _local2.UpdateSweepRadius(m_sweep.localCenter); return (_local2); } 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 DestroyShape(_arg1:b2Shape):void{ if (m_world.m_lock == true){ return; }; _arg1.DestroyProxy(m_world.m_broadPhase); var _local2:b2Shape = m_shapeList; var _local3:Boolean; while (_local2 != null) { if (_local2 == _arg1){ _local2 = _arg1.m_next; _local3 = true; break; }; _local2 = _local2.m_next; }; _arg1.m_body = null; _arg1.m_next = null; m_shapeCount--; b2Shape.Destroy(_arg1, m_world.m_blockAllocator); } public function GetUserData(){ return (m_userData); } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function GetWorldCenter():b2Vec2{ return (m_sweep.c); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_xf.R, _arg1)); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulX(m_xf, _arg1)); } public function GetPosition():b2Vec2{ return (m_xf.position); } } }//package Box2D.Dynamics
Section 63
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class b2BodyDef { public var angularDamping:Number; public var angle:Number; public var isSleeping:Boolean; public var position:b2Vec2; public var isBullet:Boolean; public var allowSleep:Boolean; public var userData; public var fixedRotation:Boolean; public var linearDamping:Number; public var massData:b2MassData; public function b2BodyDef(){ massData = new b2MassData(); position = new b2Vec2(); super(); massData.center.SetZero(); massData.mass = 0; massData.I = 0; userData = null; position.Set(0, 0); angle = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; isSleeping = false; fixedRotation = false; isBullet = false; } } }//package Box2D.Dynamics
Section 64
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 65
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; public class b2ContactFilter { public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ if ((((_arg1.m_groupIndex == _arg2.m_groupIndex)) && (!((_arg1.m_groupIndex == 0))))){ return ((_arg1.m_groupIndex > 0)); }; var _local3:Boolean = ((!(((_arg1.m_maskBits & _arg2.m_categoryBits) == 0))) && (!(((_arg1.m_categoryBits & _arg2.m_maskBits) == 0)))); return (_local3); } } }//package Box2D.Dynamics
Section 66
//b2ContactListener (Box2D.Dynamics.b2ContactListener) package Box2D.Dynamics { import Box2D.Collision.*; public class b2ContactListener { public function Add(_arg1:b2ContactPoint):void{ } public function Remove(_arg1:b2ContactPoint):void{ } public function Persist(_arg1:b2ContactPoint):void{ } } }//package Box2D.Dynamics
Section 67
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_destroyImmediate:Boolean; public var m_nullContact:b2NullContact; public function b2ContactManager(){ m_nullContact = new b2NullContact(); super(); m_world = null; m_destroyImmediate = false; } override public function PairRemoved(_arg1, _arg2, _arg3):void{ if (_arg3 == null){ return; }; var _local4:b2Contact = (_arg3 as b2Contact); if (_local4 == m_nullContact){ return; }; Destroy(_local4); } public function Destroy(_arg1:b2Contact):void{ var _local7:b2ContactPoint; var _local8:b2Body; var _local9:Array; var _local10:int; var _local11:b2Manifold; var _local12:int; var _local13:b2ManifoldPoint; var _local14:b2Mat22; var _local15:b2Vec2; var _local16:b2Vec2; var _local2:b2Shape = _arg1.GetShape1(); var _local3:b2Shape = _arg1.GetShape2(); var _local4:int = _arg1.GetManifoldCount(); if ((((_local4 > 0)) && (m_world.m_contactListener))){ _local7 = new b2ContactPoint(); _local7.shape1 = _arg1.GetShape1(); _local7.shape2 = _arg1.GetShape2(); _local8 = _local7.shape1.GetBody(); _local9 = _arg1.GetManifolds(); _local10 = 0; while (_local10 < _local4) { _local11 = _local9[_local10]; _local7.normal.SetV(_local11.normal); _local12 = 0; while (_local12 < _local11.pointCount) { _local13 = _local11.points[_local12]; _local14 = _local8.GetXForm().R; _local15 = _local8.GetXForm().position; _local16 = _local13.localPoint1; _local7.position.x = (_local15.x + ((_local14.col1.x * _local16.x) + (_local14.col2.x * _local16.y))); _local7.position.y = (_local15.y + ((_local14.col1.y * _local16.x) + (_local14.col2.y * _local16.y))); _local7.separation = _local13.separation; _local7.normalForce = _local13.normalForce; _local7.tangentForce = _local13.tangentForce; _local7.id = _local13.id; m_world.m_contactListener.Remove(_local7); _local12++; }; _local10++; }; }; 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.GetBody(); var _local6:b2Body = _local3.GetBody(); 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--; } override public function PairAdded(_arg1, _arg2){ var _local3:b2Shape = (_arg1 as b2Shape); var _local4:b2Shape = (_arg2 as b2Shape); var _local5:b2Body = _local3.GetBody(); var _local6:b2Body = _local4.GetBody(); 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.GetShape1(); _local4 = _local7.GetShape2(); _local5 = _local3.GetBody(); _local6 = _local4.GetBody(); _local7.m_prev = null; _local7.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local7; }; m_world.m_contactList = _local7; _local7.m_node1.contact = _local7; _local7.m_node1.other = _local6; _local7.m_node1.prev = null; _local7.m_node1.next = _local5.m_contactList; if (_local5.m_contactList != null){ _local5.m_contactList.prev = _local7.m_node1; }; _local5.m_contactList = _local7.m_node1; _local7.m_node2.contact = _local7; _local7.m_node2.other = _local5; _local7.m_node2.prev = null; _local7.m_node2.next = _local6.m_contactList; if (_local6.m_contactList != null){ _local6.m_contactList.prev = _local7.m_node2; }; _local6.m_contactList = _local7.m_node2; m_world.m_contactCount++; return (_local7); } public function Collide():void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2ContactPoint; var _local5:b2Body; var _local6:int; var _local7:Array; var _local8:int; var _local9:b2Manifold; var _local10:int; var _local11:b2ManifoldPoint; var _local12:b2Mat22; var _local13:b2Vec2; var _local14:b2Vec2; var _local1:b2Contact = m_world.m_contactList; while (_local1) { _local2 = _local1.GetShape1().GetBody(); _local3 = _local1.GetShape2().GetBody(); if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){ } else { _local1.Update(m_world.m_contactListener); if ((((_local1.IsSolid() == false)) && (m_world.m_contactListener))){ _local4 = new b2ContactPoint(); _local4.shape1 = _local1.GetShape1(); _local4.shape2 = _local1.GetShape2(); _local4.normalForce = 0; _local4.tangentForce = 0; _local5 = _local4.shape1.GetBody(); _local6 = _local1.GetManifoldCount(); _local7 = _local1.GetManifolds(); _local8 = 0; while (_local8 < _local6) { _local9 = _local7[_local8]; _local4.normal.SetV(_local9.normal); _local10 = 0; while (_local10 < _local9.pointCount) { _local11 = _local9.points[_local10]; _local12 = _local5.GetXForm().R; _local13 = _local5.GetXForm().position; _local14 = _local11.localPoint1; _local4.position.x = (_local13.x + ((_local12.col1.x * _local14.x) + (_local12.col2.x * _local14.y))); _local4.position.y = (_local13.y + ((_local12.col1.y * _local14.x) + (_local12.col2.y * _local14.y))); _local4.separation = _local11.separation; if ((_local11.id.features.flip & b2Collision.b2_newPoint)){ _local11.id.features.flip = (_local11.id.features.flip & ~(b2Collision.b2_newPoint)); _local4.id = _local11.id; m_world.m_contactListener.Add(_local4); } else { _local4.id = _local11.id; m_world.m_contactListener.Persist(_local4); }; _local10++; }; _local8++; }; }; }; _local1 = _local1.GetNext(); }; } } }//package Box2D.Dynamics
Section 68
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import flash.display.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2DebugDraw { public var m_xformScale:Number;// = 1 public var m_fillAlpha:Number;// = 1 public var m_alpha:Number;// = 1 public var m_drawFlags:uint; public var m_lineThickness:Number;// = 1 public var m_drawScale:Number;// = 1 public var m_sprite:Sprite; public static var e_coreShapeBit:uint = 4; public static var e_shapeBit:uint = 1; public static var e_centerOfMassBit:uint = 64; public static var e_aabbBit:uint = 8; public static var e_obbBit:uint = 16; public static var e_pairBit:uint = 32; public static var e_jointBit:uint = 2; public function b2DebugDraw(){ m_drawFlags = 0; } public function ClearFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags & ~(_arg1)); } public function SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } public function AppendFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags | _arg1); } public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo((_arg2.x * m_drawScale), (_arg2.y * m_drawScale)); } public function 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 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 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 GetFlags():uint{ return (m_drawFlags); } 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 69
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; public class b2DestructionListener { public function SayGoodbyeShape(_arg1:b2Shape):void{ } public function SayGoodbyeJoint(_arg1:b2Joint):void{ } } }//package Box2D.Dynamics
Section 70
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Island { public var m_listener:b2ContactListener; public var m_positionIterationCount:int; public var m_bodyCapacity:int; public var m_bodies:Array; public var m_joints:Array; public var m_jointCapacity:int; public var m_contactCount:int; public var m_contacts:Array; public var m_contactCapacity:int; public var m_jointCount:int; public var m_allocator; public var m_bodyCount:int; private static var s_reportCP:b2ContactPoint = new b2ContactPoint(); public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){ var _local6:int; super(); m_bodyCapacity = _arg1; m_contactCapacity = _arg2; m_jointCapacity = _arg3; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_allocator = _arg4; m_listener = _arg5; m_bodies = new Array(_arg1); _local6 = 0; while (_local6 < _arg1) { m_bodies[_local6] = null; _local6++; }; m_contacts = new Array(_arg2); _local6 = 0; while (_local6 < _arg2) { m_contacts[_local6] = null; _local6++; }; m_joints = new Array(_arg3); _local6 = 0; while (_local6 < _arg3) { m_joints[_local6] = null; _local6++; }; m_positionIterationCount = 0; } public function AddBody(_arg1:b2Body):void{ var _local2 = m_bodyCount++; m_bodies[_local2] = _arg1; } public function AddJoint(_arg1:b2Joint):void{ var _local2 = m_jointCount++; m_joints[_local2] = _arg1; } public function Report(_arg1:Array):void{ var _local2:b2Mat22; var _local3:b2Vec2; var _local5:b2Contact; var _local6:b2ContactConstraint; var _local7:b2ContactPoint; 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_reportCP; _local7.shape1 = _local5.GetShape1(); _local7.shape2 = _local5.GetShape2(); _local8 = _local7.shape1.GetBody(); _local9 = _local5.GetManifoldCount(); _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]; _local2 = _local8.GetXForm().R; _local3 = _local14.localPoint1; _local7.position.x = (_local8.GetXForm().position.x + ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y))); _local7.position.y = (_local8.GetXForm().position.y + ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y))); _local7.separation = _local14.separation; _local7.normalForce = _local15.normalForce; _local7.tangentForce = _local15.tangentForce; if ((_local14.id.features.flip & b2Collision.b2_newPoint)){ _local14.id.features.flip = (_local14.id.features.flip & ~(b2Collision.b2_newPoint)); _local7.id.key = _local14.id.key; m_listener.Add(_local7); } else { _local7.id.key = _local14.id.key; m_listener.Persist(_local7); }; _local13++; }; _local11++; }; _local4++; }; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{ var _local5:int; var _local6:b2Body; var _local8:int; var _local9:Boolean; var _local10:Boolean; var _local11:Boolean; var _local12:Number; var _local13:Number; var _local14: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 _local7:b2ContactSolver = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local7.InitVelocityConstraints(); _local5 = 0; while (_local5 < m_jointCount) { m_joints[_local5].InitVelocityConstraints(_arg1); _local5++; }; _local5 = 0; while (_local5 < _arg1.maxIterations) { _local7.SolveVelocityConstraints(); _local8 = 0; while (_local8 < m_jointCount) { m_joints[_local8].SolveVelocityConstraints(_arg1); _local8++; }; _local5++; }; _local7.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) { m_joints[_local5].InitPositionConstraints(); _local5++; }; m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.maxIterations) { _local9 = _local7.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local10 = true; _local5 = 0; while (_local5 < m_jointCount) { _local11 = m_joints[_local5].SolvePositionConstraints(); _local10 = ((_local10) && (_local11)); _local5++; }; if (((_local9) && (_local10))){ break; }; m_positionIterationCount++; }; }; Report(_local7.m_constraints); if (_arg4){ _local12 = Number.MAX_VALUE; _local13 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local14 = (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; _local12 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local14)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local13)))){ _local6.m_sleepTime = 0; _local12 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local12 = b2Math.b2Min(_local12, _local6.m_sleepTime); }; }; _local5++; }; if (_local12 >= 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 Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } 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); } } }//package Box2D.Dynamics
Section 71
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var dt:Number; public var maxIterations:int; public var inv_dt:Number; } }//package Box2D.Dynamics
Section 72
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2World { public var m_contactList:b2Contact; public var m_blockAllocator; public var m_boundaryListener:b2BoundaryListener; public var m_allowSleep:Boolean; public var m_contactListener:b2ContactListener; public var m_broadPhase:b2BroadPhase; public var m_destructionListener:b2DestructionListener; public var m_jointCount:int; public var m_bodyCount:int; public var m_lock:Boolean; public var m_positionIterationCount:int; public var m_groundBody:b2Body; public var m_contactCount:int; public var m_debugDraw:b2DebugDraw; public var m_contactFilter:b2ContactFilter; public var m_bodyList:b2Body; public var m_stackAllocator; public var m_jointList:b2Joint; public var m_gravity:b2Vec2; public var m_contactManager:b2ContactManager; private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); public static var s_enablePositionCorrection:int = 1; 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 s_enableWarmStarting:int = 1; public static var s_enableTOI:int = 1; 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_allowSleep = _arg3; m_gravity = _arg2; m_lock = false; m_contactManager.m_world = this; m_broadPhase = new b2BroadPhase(_arg1, m_contactManager); var _local4:b2BodyDef = new b2BodyDef(); m_groundBody = CreateStaticBody(_local4); } public function DrawJoint(_arg1:b2Joint):void{ var _local11:b2PulleyJoint; var _local12:b2Vec2; var _local13:b2Vec2; var _local2:b2Body = _arg1.GetBody1(); var _local3:b2Body = _arg1.GetBody2(); var _local4:b2XForm = _local2.GetXForm(); var _local5:b2XForm = _local3.GetXForm(); 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.GetType()){ 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 SetDebugDraw(_arg1:b2DebugDraw):void{ m_debugDraw = _arg1; } public function SetListener(_arg1:b2ContactListener):void{ m_contactListener = _arg1; } 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.GetXForm(); _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.GetNext(); }; _local3 = _local3.GetNext(); }; }; if ((_local1 & b2DebugDraw.e_jointBit)){ _local5 = m_jointList; while (_local5) { DrawJoint(_local5); _local5 = _local5.GetNext(); }; }; 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.GetXForm(); _local4 = _local3.GetShapeList(); while (_local4) { if (_local4.GetType() != 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.GetNext(); }; _local3 = _local3.GetNext(); }; }; if ((_local1 & b2DebugDraw.e_centerOfMassBit)){ _local3 = m_bodyList; while (_local3) { _local11 = s_xf; _local11.R = _local3.GetXForm().R; _local11.position = _local3.GetWorldCenter(); m_debugDraw.DrawXForm(_local11); _local3 = _local3.GetNext(); }; }; } 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 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.GetLocalPosition()); _local8 = _local6.GetRadius(); _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 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.GetManifoldCount() == 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, (s_enablePositionCorrection > 0), m_allowSleep); m_positionIterationCount = Math.max(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.GetNext(); }; m_broadPhase.Commit(); } public function GetGroundBody():b2Body{ return (m_groundBody); } 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] as b2Shape); _local6++; }; return (_local5); } 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.GetShape1(); _local4 = _local11.GetShape2(); _local5 = _local3.GetBody(); _local6 = _local4.GetBody(); 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 = Math.min((((1 - _local18) * _local19) + _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.GetShape1(); _local4 = _local12.GetShape2(); _local5 = _local3.GetBody(); _local6 = _local4.GetBody(); _local5.Advance(_local13); _local6.Advance(_local13); _local12.Update(m_contactListener); _local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag)); if (_local12.GetManifoldCount() == 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.GetManifoldCount() == 0){ } else { _local8.AddContact(_local7.contact); _local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag); _local20 = _local7.other; if ((_local20.m_flags & b2Body.e_islandFlag)){ } else { if (_local20.IsStatic() == false){ _local20.Advance(_local13); _local20.WakeUp(); }; var _temp2 = _local15; _local15 = (_local15 + 1); var _local23 = _temp2; _local10[_local23] = _local20; _local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag); }; }; }; }; _local7 = _local7.next; }; }; }; _local16 = new b2TimeStep(); _local16.dt = ((1 - _local13) * _arg1.dt); _local16.inv_dt = (1 / _local16.dt); _local16.maxIterations = _arg1.maxIterations; _local8.SolveTOI(_local16); _local17 = 0; while (_local17 < _local8.m_bodyCount) { _local2 = _local8.m_bodies[_local17]; _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local21 = _local2.SynchronizeShapes(); if ((((_local21 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; _local7 = _local2.m_contactList; while (_local7) { _local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag)); _local7 = _local7.next; }; }; }; _local17++; }; _local17 = 0; while (_local17 < _local8.m_contactCount) { _local11 = _local8.m_contacts[_local17]; _local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local17++; }; m_broadPhase.Commit(); }; }; } public function GetJointList():b2Joint{ return (m_jointList); } public function GetBodyList():b2Body{ return (m_bodyList); } public function CreateDynamicBody(_arg1:b2BodyDef):b2Body{ if (m_lock == true){ return (null); }; var _local2:b2Body = new b2Body(_arg1, b2Body.e_dynamicType, 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 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.ResetProxy(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.ResetProxy(m_broadPhase, _local5.m_xf); _local6 = _local6.m_next; }; }; } public function SetFilter(_arg1:b2ContactFilter):void{ m_contactFilter = _arg1; } public function SetBoundaryListener(_arg1:b2BoundaryListener):void{ m_boundaryListener = _arg1; } public function SetDestructionListener(_arg1:b2DestructionListener):void{ m_destructionListener = _arg1; } public function CreateStaticBody(_arg1:b2BodyDef):b2Body{ if (m_lock == true){ return (null); }; var _local2:b2Body = new b2Body(_arg1, b2Body.e_staticType, 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 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; }; m_contactManager.Collide(); if (_local3.dt > 0){ Solve(_local3); }; if (((s_enableTOI) && ((_local3.dt > 0)))){ SolveTOI(_local3); }; DrawDebugData(); m_lock = false; } } }//package Box2D.Dynamics
Section 73
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent) package com.kongregate.as3.client.events { import flash.events.*; public class KongregateEvent extends Event { public static const COMPLETE:String = "component_api_available"; public function KongregateEvent(_arg1:String){ super(_arg1); } } }//package com.kongregate.as3.client.events
Section 74
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService) package com.kongregate.as3.client.services { import flash.events.*; public class AbstractShadowService extends EventDispatcher { protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{ trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4)); } } }//package com.kongregate.as3.client.services
Section 75
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow) package com.kongregate.as3.client.services { public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices { private var mode:String; public function HighScoreServiceShadow(){ mode = ""; } public function submit(_arg1:Number, _arg2:String=null):void{ alert("IHighScoreServices", "submit", arguments); } public function connect():Boolean{ alert("IKongregateServices", "connect"); return (true); } public function requestList(_arg1:Function):void{ alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]")); _arg1({success:false}); } public function setMode(_arg1:String):void{ alert("IHighScoreServices", "setMode", arguments); this.mode = _arg1; } } }//package com.kongregate.as3.client.services
Section 76
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices) package com.kongregate.as3.client.services { public interface IHighScoreServices { function setMode(_arg1:String):void; function submit(_arg1:Number, _arg2:String=null):void; function requestList(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 77
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices) package com.kongregate.as3.client.services { import flash.events.*; public interface IKongregateServices extends IEventDispatcher { function getPlayerInfo(_arg1:Function):void; function connect(_arg1:Number=-1):Boolean; } }//package com.kongregate.as3.client.services
Section 78
//IStatServices (com.kongregate.as3.client.services.IStatServices) package com.kongregate.as3.client.services { public interface IStatServices { function submitArray(_arg1:Array):void; function submit(_arg1:String, _arg2:Number):void; } }//package com.kongregate.as3.client.services
Section 79
//IUserServices (com.kongregate.as3.client.services.IUserServices) package com.kongregate.as3.client.services { public interface IUserServices { function getName():String; function getPlayerInfo(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 80
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow) package com.kongregate.as3.client.services { public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices { public function getName():String{ alert("IKongregateServices", "getName"); return ("Guest"); } public function connect(_arg1:Number=-1):Boolean{ alert("IKongregateServices", "connect", arguments); return (true); } public function getPlayerInfo(_arg1:Function):void{ alert("IKongregateServices", "getPlayerInfo"); _arg1(new Object()); } } }//package com.kongregate.as3.client.services
Section 81
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow) package com.kongregate.as3.client.services { public class StatServiceShadow extends AbstractShadowService implements IStatServices { public function submitArray(_arg1:Array):void{ alert("IStatServices", "submitArray", arguments); } public function submit(_arg1:String, _arg2:Number):void{ alert("IStatServices", "submitStat", arguments); } } }//package com.kongregate.as3.client.services
Section 82
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow) package com.kongregate.as3.client.services { public class UserServiceShadow extends AbstractShadowService implements IUserServices { public function getName():String{ alert("UserService", "getName"); return ("Guest"); } public function getPlayerInfo(_arg1:Function):void{ alert("UserService", "getPlayerInfo"); _arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""}); } } }//package com.kongregate.as3.client.services
Section 83
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; public interface IAPIBootstrap { function init(_arg1:Event=null, _arg2:Stage=null):void; function hideLog():void; function showLog(_arg1:int=0):void; } }//package com.kongregate.as3.client
Section 84
//KongregateAPI (com.kongregate.as3.client.KongregateAPI) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; import com.kongregate.as3.client.services.*; import flash.net.*; import flash.system.*; import flash.utils.*; import com.kongregate.as3.client.events.*; import flash.errors.*; public class KongregateAPI extends Sprite { private const VERSION:Number = 1; private var loader:Loader; private var loadedDomain:ApplicationDomain; private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices"; private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices"; private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices"; private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices"; private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf"; private static var _connected:Boolean; private static var kUser:IUserServices; private static var _loaded:Boolean; private static var kServices:IKongregateServices; private static var kScores:IHighScoreServices; private static var mInstance:KongregateAPI; private static var kStats:IStatServices; private static var kAPI:IAPIBootstrap; public function KongregateAPI(){ if (mInstance != null){ throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access.")); }; mInstance = this; this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } public function get loaded():Boolean{ return (_loaded); } public function get connected():Boolean{ return (_connected); } private function alertConnected(_arg1:TimerEvent=null):void{ var _local2:KongregateEvent; var _local3:Boolean; _local2 = new KongregateEvent(KongregateEvent.COMPLETE); _local3 = this.dispatchEvent(_local2); } private function init(_arg1:Event):void{ var _local2:Object; var _local3:String; var _local4:URLRequest; var _local5:LoaderContext; this.removeEventListener(Event.ADDED_TO_STAGE, init); _loaded = false; _connected = false; _local2 = LoaderInfo(root.loaderInfo).parameters; _local3 = _local2.api_path; if (_local3 == null){ trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded."); createShadowServices(); return; }; Security.allowDomain("*.kongregate.com"); Security.allowDomain("kongregatetrunk.com"); _local4 = new URLRequest(_local3); _local5 = new LoaderContext(false); _local5.applicationDomain = ApplicationDomain.currentDomain; _local5.securityDomain = SecurityDomain.currentDomain; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); loader.load(_local4, _local5); } public function get api():IAPIBootstrap{ return (kAPI); } private function loadComplete(_arg1:Event):void{ getServices(); } public function get scores():IHighScoreServices{ return (kScores); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ throw (new IOError(("API file not found. " + _arg1))); } public function get services():IKongregateServices{ return (kServices); } public function get stats():IStatServices{ return (kStats); } private function createShadowServices():void{ var _local1:Timer; trace(">>> Kongregate Shadow Services instantiated for local development.."); kServices = new KongregateServiceShadow(); kScores = new HighScoreServiceShadow(); kStats = new StatServiceShadow(); kUser = new UserServiceShadow(); _local1 = new Timer(200, 1); _local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected); _local1.start(); _connected = true; } public function get user():IUserServices{ return (kUser); } private function getServices():void{ var _local1:ApplicationDomain; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = ApplicationDomain.currentDomain; kAPI = IAPIBootstrap(loader.getChildAt(0)); this.addChild(loader); _local2 = _local1.getDefinition(CLASS_SERVICES); trace(_local2); kServices = _local2.getInstance(); _local3 = _local1.getDefinition(CLASS_SCORES); kScores = _local3.getInstance(); _local4 = _local1.getDefinition(CLASS_STATS); kStats = _local4.getInstance(); _local5 = _local1.getDefinition(CLASS_USER); kUser = _local5.getInstance(); kServices.connect(VERSION); _loaded = true; _connected = true; alertConnected(); } public static function getInstance():KongregateAPI{ if (!mInstance){ throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it.")); }; return (mInstance); } } }//package com.kongregate.as3.client
Section 85
//BaseScrollPane (fl.containers.BaseScrollPane) package fl.containers { import fl.core.*; import flash.events.*; import flash.display.*; import fl.controls.*; import fl.events.*; import flash.geom.*; public class BaseScrollPane extends UIComponent { protected var contentHeight:Number;// = 0 protected var _horizontalScrollBar:ScrollBar; protected var _horizontalPageScrollSize:Number;// = 0 protected var _verticalPageScrollSize:Number;// = 0 protected var _maxHorizontalScrollPosition:Number;// = 0 protected var defaultLineScrollSize:Number;// = 4 protected var vOffset:Number;// = 0 protected var contentScrollRect:Rectangle; protected var background:DisplayObject; protected var _verticalScrollBar:ScrollBar; protected var disabledOverlay:Shape; protected var vScrollBar:Boolean; protected var _horizontalScrollPolicy:String; protected var useFixedHorizontalScrolling:Boolean;// = false protected var contentWidth:Number;// = 0 protected var availableHeight:Number; protected var _verticalScrollPolicy:String; protected var contentPadding:Number;// = 0 protected var _useBitmpScrolling:Boolean;// = false protected var availableWidth:Number; protected var hScrollBar:Boolean; protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5}; override public function set enabled(_arg1:Boolean):void{ if (enabled == _arg1){ return; }; _verticalScrollBar.enabled = _arg1; _horizontalScrollBar.enabled = _arg1; super.enabled = _arg1; } public function set useBitmapScrolling(_arg1:Boolean):void{ _useBitmpScrolling = _arg1; invalidate(InvalidationType.STATE); } public function set horizontalLineScrollSize(_arg1:Number):void{ _horizontalScrollBar.lineScrollSize = _arg1; } protected function drawLayout():void{ calculateAvailableSize(); calculateContentWidth(); background.width = width; background.height = height; if (vScrollBar){ _verticalScrollBar.visible = true; _verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding); _verticalScrollBar.y = contentPadding; _verticalScrollBar.height = availableHeight; } else { _verticalScrollBar.visible = false; }; _verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize); setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); if (hScrollBar){ _horizontalScrollBar.visible = true; _horizontalScrollBar.x = contentPadding; _horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding); _horizontalScrollBar.width = availableWidth; } else { _horizontalScrollBar.visible = false; }; _horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize); setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); drawDisabledOverlay(); } protected function handleWheel(_arg1:MouseEvent):void{ if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){ return; }; _verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize)); setVerticalScrollPosition(_verticalScrollBar.scrollPosition); dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition)); } protected function handleScroll(_arg1:ScrollEvent):void{ if (_arg1.target == _verticalScrollBar){ setVerticalScrollPosition(_arg1.position); } else { setHorizontalScrollPosition(_arg1.position); }; } public function get verticalLineScrollSize():Number{ return (_verticalScrollBar.lineScrollSize); } protected function drawBackground():void{ var _local1:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue("skin")); background.width = width; background.height = height; addChildAt(background, 0); if (((!((_local1 == null))) && (!((_local1 == background))))){ removeChild(_local1); }; } protected function calculateAvailableSize():void{ var _local1:Number = ScrollBar.WIDTH; var _local2:Number = (contentPadding = Number(getStyleValue("contentPadding"))); var _local3:Number = ((height - (2 * _local2)) - vOffset); vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3))))); var _local4:Number = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2)); var _local5:Number = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4); hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0))))); if (hScrollBar){ _local3 = (_local3 - _local1); }; if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){ vScrollBar = true; _local4 = (_local4 - _local1); }; availableHeight = (_local3 + vOffset); availableWidth = _local4; } public function get verticalScrollPosition():Number{ return (_verticalScrollBar.scrollPosition); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } public function get horizontalPageScrollSize():Number{ if (isNaN(availableWidth)){ drawNow(); }; return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); _horizontalScrollBar.scrollPosition = _arg1; setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); } public function set verticalLineScrollSize(_arg1:Number):void{ _verticalScrollBar.lineScrollSize = _arg1; } public function get maxVerticalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentHeight - availableHeight))); } public function set horizontalPageScrollSize(_arg1:Number):void{ _horizontalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){ drawLayout(); }; updateChildren(); super.draw(); } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } protected function calculateContentWidth():void{ } public function set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } override protected function configUI():void{ super.configUI(); contentScrollRect = new Rectangle(0, 0, 85, 85); _verticalScrollBar = new ScrollBar(); _verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); _verticalScrollBar.visible = false; _verticalScrollBar.lineScrollSize = defaultLineScrollSize; addChild(_verticalScrollBar); copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); _horizontalScrollBar = new ScrollBar(); _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); _horizontalScrollBar.visible = false; _horizontalScrollBar.lineScrollSize = defaultLineScrollSize; addChild(_horizontalScrollBar); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); disabledOverlay = new Shape(); var _local1:Graphics = disabledOverlay.graphics; _local1.beginFill(0xFFFFFF); _local1.drawRect(0, 0, width, height); _local1.endFill(); addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } protected function drawDisabledOverlay():void{ if (enabled){ if (contains(disabledOverlay)){ removeChild(disabledOverlay); }; } else { disabledOverlay.x = (disabledOverlay.y = contentPadding); disabledOverlay.width = availableWidth; disabledOverlay.height = availableHeight; disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number); addChild(disabledOverlay); }; } public function get horizontalScrollPosition():Number{ return (_horizontalScrollBar.scrollPosition); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get horizontalLineScrollSize():Number{ return (_horizontalScrollBar.lineScrollSize); } public function set verticalScrollPosition(_arg1:Number):void{ drawNow(); _verticalScrollBar.scrollPosition = _arg1; setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); } protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } public function set verticalPageScrollSize(_arg1:Number):void{ _verticalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } protected function setContentSize(_arg1:Number, _arg2:Number):void{ if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){ return; }; contentWidth = _arg1; contentHeight = _arg2; invalidate(InvalidationType.SIZE); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function get maxHorizontalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentWidth - availableWidth))); } protected function updateChildren():void{ _verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled); _verticalScrollBar.drawNow(); _horizontalScrollBar.drawNow(); } public function get verticalPageScrollSize():Number{ if (isNaN(availableHeight)){ drawNow(); }; return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } public function get useBitmapScrolling():Boolean{ return (_useBitmpScrolling); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.containers
Section 86
//ScrollPane (fl.containers.ScrollPane) package fl.containers { import fl.core.*; import flash.events.*; import flash.display.*; import fl.controls.*; import fl.managers.*; import fl.events.*; import flash.net.*; import flash.system.*; import flash.ui.*; public class ScrollPane extends BaseScrollPane implements IFocusManagerComponent { protected var scrollDragHPos:Number; protected var loader:Loader; protected var xOffset:Number; protected var _source:Object;// = "" protected var scrollDragVPos:Number; protected var _scrollDrag:Boolean;// = false protected var currentContent:Object; protected var contentClip:Sprite; protected var yOffset:Number; private static var defaultStyles:Object = {upSkin:"ScrollPane_upSkin", disabledSkin:"ScrollPane_disabledSkin", focusRectSkin:null, focusRectPadding:null, contentPadding:0}; protected function clearContent():void{ if (contentClip.numChildren == 0){ return; }; contentClip.removeChildAt(0); currentContent = null; if (loader != null){ try { loader.close(); } catch(e) { }; try { loader.unload(); } catch(e) { }; loader = null; }; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } protected function calculateAvailableHeight():Number{ var _local1:Number = Number(getStyleValue("contentPadding")); return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0)); } override protected function drawLayout():void{ super.drawLayout(); contentScrollRect = contentClip.scrollRect; contentScrollRect.width = availableWidth; contentScrollRect.height = availableHeight; contentClip.cacheAsBitmap = useBitmapScrolling; contentClip.scrollRect = contentScrollRect; contentClip.x = (contentClip.y = contentPadding); } public function get bytesTotal():Number{ return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesTotal); } public function get source():Object{ return (_source); } override protected function handleScroll(_arg1:ScrollEvent):void{ passEvent(_arg1); super.handleScroll(_arg1); } protected function onContentLoad(_arg1:Event):void{ update(); var _local2:* = calculateAvailableHeight(); calculateAvailableSize(); horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), availableWidth); verticalScrollBar.setScrollProperties(_local2, 0, (contentHeight - _local2), _local2); passEvent(_arg1); } public function get scrollDrag():Boolean{ return (_scrollDrag); } protected function setScrollDrag():void{ if (_scrollDrag){ contentClip.addEventListener(MouseEvent.MOUSE_DOWN, doStartDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, endDrag, false, 0, true); } else { contentClip.removeEventListener(MouseEvent.MOUSE_DOWN, doStartDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, endDrag); removeEventListener(MouseEvent.MOUSE_MOVE, doDrag); }; contentClip.buttonMode = _scrollDrag; } public function get percentLoaded():Number{ if (loader != null){ return (Math.round(((bytesLoaded / bytesTotal) * 100))); }; return (0); } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ var _local3:* = contentClip.scrollRect; _local3.y = _arg1; contentClip.scrollRect = _local3; } protected function endDrag(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag); } override protected function drawBackground():void{ var _local1:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue((enabled) ? "upSkin" : "disabledSkin")); background.width = width; background.height = height; addChildAt(background, 0); if (((!((_local1 == null))) && (!((_local1 == background))))){ removeChild(_local1); }; } public function set source(_arg1:Object):void{ var _local2:*; clearContent(); if (isLivePreview){ return; }; _source = _arg1; if ((((_source == "")) || ((_source == null)))){ return; }; currentContent = getDisplayObjectInstance(_arg1); if (currentContent != null){ _local2 = contentClip.addChild((currentContent as DisplayObject)); dispatchEvent(new Event(Event.INIT)); update(); } else { load(new URLRequest(_source.toString())); }; } public function set scrollDrag(_arg1:Boolean):void{ _scrollDrag = _arg1; invalidate(InvalidationType.STATE); } protected function initLoader():void{ loader = new Loader(); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleError, false, 0, true); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleError, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.OPEN, passEvent, false, 0, true); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, passEvent, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onContentLoad, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.INIT, passEvent, false, 0, true); loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, passEvent, false, 0, true); contentClip.addChild(loader); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ drawBackground(); }; if (isInvalid(InvalidationType.STATE)){ setScrollDrag(); }; super.draw(); } protected function clearLoadEvents():void{ loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleError); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, handleError); loader.contentLoaderInfo.removeEventListener(Event.OPEN, passEvent); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, passEvent); loader.contentLoaderInfo.removeEventListener(HTTPStatusEvent.HTTP_STATUS, passEvent); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onContentLoad); } protected function handleError(_arg1:Event):void{ passEvent(_arg1); clearLoadEvents(); loader.contentLoaderInfo.removeEventListener(Event.INIT, handleInit); } public function get bytesLoaded():Number{ return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesLoaded); } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ var _local3:* = contentClip.scrollRect; _local3.x = _arg1; contentClip.scrollRect = _local3; } override protected function configUI():void{ super.configUI(); contentClip = new Sprite(); addChild(contentClip); contentClip.scrollRect = contentScrollRect; _horizontalScrollPolicy = ScrollPolicy.AUTO; _verticalScrollPolicy = ScrollPolicy.AUTO; } protected function handleInit(_arg1:Event):void{ loader.contentLoaderInfo.removeEventListener(Event.INIT, handleInit); passEvent(_arg1); invalidate(InvalidationType.SIZE); } public function update():void{ var _local1:DisplayObject = contentClip.getChildAt(0); setContentSize(_local1.width, _local1.height); } public function refreshPane():void{ if ((_source is URLRequest)){ _source = _source.url; }; source = _source; } public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{ if (_arg2 == null){ _arg2 = new LoaderContext(false, ApplicationDomain.currentDomain); }; clearContent(); initLoader(); currentContent = (_source = _arg1); loader.load(_arg1, _arg2); } protected function doStartDrag(_arg1:MouseEvent):void{ if (!enabled){ return; }; xOffset = mouseX; yOffset = mouseY; scrollDragHPos = horizontalScrollPosition; scrollDragVPos = verticalScrollPosition; stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true); } protected function doDrag(_arg1:MouseEvent):void{ var _local2:* = (scrollDragVPos - (mouseY - yOffset)); _verticalScrollBar.setScrollPosition(_local2); setVerticalScrollPosition(_verticalScrollBar.scrollPosition, true); var _local3:* = (scrollDragHPos - (mouseX - xOffset)); _horizontalScrollBar.setScrollPosition(_local3); setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, true); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int = calculateAvailableHeight(); switch (_arg1.keyCode){ case Keyboard.DOWN: verticalScrollPosition++; break; case Keyboard.UP: verticalScrollPosition--; break; case Keyboard.RIGHT: horizontalScrollPosition++; break; case Keyboard.LEFT: horizontalScrollPosition--; break; case Keyboard.END: verticalScrollPosition = maxVerticalScrollPosition; break; case Keyboard.HOME: verticalScrollPosition = 0; break; case Keyboard.PAGE_UP: verticalScrollPosition = (verticalScrollPosition - _local2); break; case Keyboard.PAGE_DOWN: verticalScrollPosition = (verticalScrollPosition + _local2); break; }; } public function get content():DisplayObject{ var _local1:Object = currentContent; if ((_local1 is URLRequest)){ _local1 = loader.content; }; return ((_local1 as DisplayObject)); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition())); } } }//package fl.containers
Section 87
//CellRenderer (fl.controls.listClasses.CellRenderer) package fl.controls.listClasses { import flash.events.*; import fl.controls.*; public class CellRenderer extends LabelButton implements ICellRenderer { protected var _listData:ListData; protected var _data:Object; private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public function CellRenderer():void{ toggle = true; focusEnabled = false; } override public function set selected(_arg1:Boolean):void{ super.selected = _arg1; } override protected function drawLayout():void{ var _local3:Number; var _local1:Number = Number(getStyleValue("textPadding")); var _local2:Number = 0; if (icon != null){ icon.x = _local1; icon.y = Math.round(((height - icon.height) >> 1)); _local2 = (icon.width + _local1); }; if (label.length > 0){ textField.visible = true; _local3 = Math.max(0, ((width - _local2) - (_local1 * 2))); textField.width = _local3; textField.height = (textField.textHeight + 4); textField.x = (_local2 + _local1); textField.y = Math.round(((height - textField.height) >> 1)); } else { textField.visible = false; }; background.width = width; background.height = height; } public function get listData():ListData{ return (_listData); } override public function setSize(_arg1:Number, _arg2:Number):void{ super.setSize(_arg1, _arg2); } public function get data():Object{ return (_data); } public function set data(_arg1:Object):void{ _data = _arg1; } public function set listData(_arg1:ListData):void{ _listData = _arg1; label = _listData.label; setStyle("icon", _listData.icon); } override public function get selected():Boolean{ return (super.selected); } override protected function toggleSelected(_arg1:MouseEvent):void{ } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls.listClasses
Section 88
//ICellRenderer (fl.controls.listClasses.ICellRenderer) package fl.controls.listClasses { public interface ICellRenderer { function set x(_arg1:Number):void; function set y(_arg1:Number):void; function setSize(_arg1:Number, _arg2:Number):void; function set data(_arg1:Object):void; function set selected(_arg1:Boolean):void; function set listData(_arg1:ListData):void; function get listData():ListData; function get data():Object; function get selected():Boolean; function setMouseState(_arg1:String):void; } }//package fl.controls.listClasses
Section 89
//ListData (fl.controls.listClasses.ListData) package fl.controls.listClasses { import fl.core.*; public class ListData { protected var _index:uint; protected var _owner:UIComponent; protected var _label:String; protected var _icon:Object;// = null protected var _row:uint; protected var _column:uint; public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){ _label = _arg1; _icon = _arg2; _owner = _arg3; _index = _arg4; _row = _arg5; _column = _arg6; } public function get row():uint{ return (_row); } public function get owner():UIComponent{ return (_owner); } public function get label():String{ return (_label); } public function get index():uint{ return (_index); } public function get icon():Object{ return (_icon); } public function get column():uint{ return (_column); } } }//package fl.controls.listClasses
Section 90
//BaseButton (fl.controls.BaseButton) package fl.controls { import fl.core.*; import flash.events.*; import flash.display.*; import fl.events.*; import flash.utils.*; public class BaseButton extends UIComponent { protected var pressTimer:Timer; protected var _autoRepeat:Boolean;// = false protected var _selected:Boolean;// = false protected var background:DisplayObject; private var unlockedMouseState:String; protected var mouseState:String; private var _mouseStateLocked:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } override public function get enabled():Boolean{ return (super.enabled); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function drawLayout():void{ background.width = width; background.height = height; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } protected function drawBackground():void{ var _local1:String = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); var _local2:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public function get selected():Boolean{ return (_selected); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 91
//Button (fl.controls.Button) package fl.controls { import fl.core.*; import flash.display.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var _emphasized:Boolean;// = false protected var emphasizedBorder:DisplayObject; private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; var _local1:Object = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 92
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 93
//ComboBox (fl.controls.ComboBox) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.events.*; import flash.display.*; import fl.data.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.geom.*; import flash.ui.*; public class ComboBox extends UIComponent implements IFocusManagerComponent { protected var isKeyDown:Boolean;// = false protected var _labels:Array; protected var background:BaseButton; protected var _dropdownWidth:Number; protected var inputField:TextInput; protected var highlightedCell:int;// = -1 protected var listOverIndex:uint; protected var editableValue:String; protected var _prompt:String; protected var isOpen:Boolean;// = false protected var list:List; protected var _rowCount:uint;// = 5 protected var _editable:Boolean;// = false private var collectionItemImport:SimpleCollectionItem; protected var currentIndex:int; protected static const BACKGROUND_STYLES:Object = {overSkin:"overSkin", downSkin:"downSkin", upSkin:"upSkin", disabledSkin:"disabledSkin", repeatInterval:"repeatInterval"}; protected static const LIST_STYLES:Object = {upSkin:"comboListUpSkin", overSkin:"comboListOverSkin", downSkin:"comobListDownSkin", disabledSkin:"comboListDisabledSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval", textFormat:"textFormat", disabledAlpha:"disabledAlpha", skin:"listSkin"}; private static var defaultStyles:Object = {upSkin:"ComboBox_upSkin", downSkin:"ComboBox_downSkin", overSkin:"ComboBox_overSkin", disabledSkin:"ComboBox_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, buttonWidth:24, disabledAlpha:null, listSkin:null}; public static var createAccessibilityImplementation:Function; protected function drawList():void{ list.rowCount = Math.max(0, Math.min(_rowCount, list.dataProvider.length)); } public function get imeMode():String{ return (inputField.imeMode); } protected function onInputFieldFocusOut(_arg1:FocusEvent):void{ inputField.removeEventListener(ComponentEvent.ENTER, onEnter); selectedIndex = selectedIndex; } public function set imeMode(_arg1:String):void{ inputField.imeMode = _arg1; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } protected function calculateAvailableHeight():Number{ var _local1:Number = Number(getStyleValue("contentPadding")); return ((list.height - (_local1 * 2))); } public function get dropdown():List{ return (list); } override protected function focusOutHandler(_arg1:FocusEvent):void{ isKeyDown = false; if (isOpen){ if (((!(_arg1.relatedObject)) || (!(list.contains(_arg1.relatedObject))))){ if (((!((highlightedCell == -1))) && (!((highlightedCell == selectedIndex))))){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); }; }; super.focusOutHandler(_arg1); } public function get selectedLabel():String{ if (editableValue != null){ return (editableValue); }; if (selectedIndex == -1){ return (null); }; return (itemToLabel(selectedItem)); } protected function onListChange(_arg1:Event):void{ editableValue = null; dispatchEvent(_arg1); invalidate(InvalidationType.SELECTED); if (isKeyDown){ return; }; close(); } public function get text():String{ return (inputField.text); } protected function onEnter(_arg1:ComponentEvent):void{ _arg1.stopPropagation(); } public function sortItemsOn(_arg1:String, _arg2:Object=null){ return (list.sortItemsOn(_arg1, _arg2)); } protected function handleDataChange(_arg1:DataChangeEvent):void{ invalidate(InvalidationType.DATA); } protected function onToggleListVisibility(_arg1:MouseEvent):void{ _arg1.stopPropagation(); dispatchEvent(_arg1); if (isOpen){ close(); } else { open(); stage.addEventListener(MouseEvent.MOUSE_UP, onListItemUp, false, 0, true); }; } public function get dropdownWidth():Number{ return (list.width); } protected function highlightCell(_arg1:int=-1):void{ var _local2:ICellRenderer; if (highlightedCell > -1){ _local2 = list.itemToCellRenderer(getItemAt(highlightedCell)); if (_local2 != null){ _local2.setMouseState("up"); }; }; if (_arg1 == -1){ return; }; list.scrollToIndex(_arg1); list.drawNow(); _local2 = list.itemToCellRenderer(getItemAt(_arg1)); if (_local2 != null){ _local2.setMouseState("over"); highlightedCell = _arg1; }; } public function removeItemAt(_arg1:uint):void{ list.removeItemAt(_arg1); invalidate(InvalidationType.DATA); } override protected function draw():void{ var _local1:* = selectedIndex; if ((((_local1 == -1)) && (((((!((prompt == null))) || (editable))) || ((length == 0)))))){ _local1 = Math.max(-1, Math.min(_local1, (length - 1))); } else { editableValue = null; _local1 = Math.max(0, Math.min(_local1, (length - 1))); }; if (list.selectedIndex != _local1){ list.selectedIndex = _local1; invalidate(InvalidationType.SELECTED, false); }; if (isInvalid(InvalidationType.STYLES)){ setStyles(); setEmbedFonts(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.STATE)){ drawTextFormat(); drawLayout(); invalidate(InvalidationType.DATA); }; if (isInvalid(InvalidationType.DATA)){ drawList(); invalidate(InvalidationType.SELECTED, true); }; if (isInvalid(InvalidationType.SELECTED)){ if ((((_local1 == -1)) && (!((editableValue == null))))){ inputField.text = editableValue; } else { if (_local1 > -1){ if (length > 0){ inputField.horizontalScrollPosition = 0; inputField.text = itemToLabel(list.selectedItem); }; } else { if ((((_local1 == -1)) && (!((_prompt == null))))){ showPrompt(); } else { inputField.text = ""; }; }; }; if (((((editable) && ((selectedIndex > -1)))) && ((stage.focus == inputField.textField)))){ inputField.setSelection(0, inputField.length); }; }; drawTextField(); super.draw(); } public function get selectedItem():Object{ return (list.selectedItem); } public function open():void{ currentIndex = selectedIndex; if (((isOpen) || ((length == 0)))){ return; }; dispatchEvent(new Event(Event.OPEN)); isOpen = true; addEventListener(Event.ENTER_FRAME, addCloseListener, false, 0, true); positionList(); list.scrollToSelected(); stage.addChild(list); } override protected function configUI():void{ super.configUI(); background = new BaseButton(); background.focusEnabled = false; copyStylesToChild(background, BACKGROUND_STYLES); background.addEventListener(MouseEvent.MOUSE_DOWN, onToggleListVisibility, false, 0, true); addChild(background); inputField = new TextInput(); inputField.focusTarget = (this as IFocusManagerComponent); inputField.focusEnabled = false; inputField.addEventListener(Event.CHANGE, onTextInput, false, 0, true); addChild(inputField); list = new List(); list.focusEnabled = false; copyStylesToChild(list, LIST_STYLES); list.addEventListener(Event.CHANGE, onListChange, false, 0, true); list.addEventListener(ListEvent.ITEM_CLICK, onListChange, false, 0, true); list.addEventListener(ListEvent.ITEM_ROLL_OUT, passEvent, false, 0, true); list.addEventListener(ListEvent.ITEM_ROLL_OVER, passEvent, false, 0, true); list.verticalScrollBar.addEventListener(Event.SCROLL, passEvent, false, 0, true); } public function set text(_arg1:String):void{ if (!editable){ return; }; inputField.text = _arg1; } public function addItem(_arg1:Object):void{ list.addItem(_arg1); invalidate(InvalidationType.DATA); } public function get editable():Boolean{ return (_editable); } public function get labelField():String{ return (list.labelField); } protected function positionList():void{ var _local1:Point = localToGlobal(new Point(0, 0)); list.x = _local1.x; if (((_local1.y + height) + list.height) > stage.stageHeight){ list.y = (_local1.y - list.height); } else { list.y = (_local1.y + height); }; } protected function onStageClick(_arg1:MouseEvent):void{ if (!isOpen){ return; }; if (((!(contains((_arg1.target as DisplayObject)))) && (!(list.contains((_arg1.target as DisplayObject)))))){ if (highlightedCell != -1){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); }; } public function set dropdownWidth(_arg1:Number):void{ _dropdownWidth = _arg1; invalidate(InvalidationType.SIZE); } public function get prompt():String{ return (_prompt); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ isKeyDown = true; if (_arg1.ctrlKey){ switch (_arg1.keyCode){ case Keyboard.UP: if (highlightedCell > -1){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); break; case Keyboard.DOWN: open(); break; }; return; }; _arg1.stopPropagation(); var _local2:int = Math.max(((calculateAvailableHeight() / list.rowHeight) << 0), 1); var _local3:uint = selectedIndex; var _local4:Number = ((highlightedCell)==-1) ? selectedIndex : highlightedCell; var _local5 = -1; switch (_arg1.keyCode){ case Keyboard.SPACE: if (isOpen){ close(); } else { open(); }; return; case Keyboard.ESCAPE: if (isOpen){ if (highlightedCell > -1){ selectedIndex = selectedIndex; }; close(); }; return; case Keyboard.UP: _local5 = Math.max(0, (_local4 - 1)); break; case Keyboard.DOWN: _local5 = Math.min((length - 1), (_local4 + 1)); break; case Keyboard.PAGE_UP: _local5 = Math.max((_local4 - _local2), 0); break; case Keyboard.PAGE_DOWN: _local5 = Math.min((_local4 + _local2), (length - 1)); break; case Keyboard.HOME: _local5 = 0; break; case Keyboard.END: _local5 = (length - 1); break; case Keyboard.ENTER: if (((_editable) && ((highlightedCell == -1)))){ editableValue = inputField.text; selectedIndex = -1; } else { if (((isOpen) && ((highlightedCell > -1)))){ editableValue = null; selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; }; dispatchEvent(new ComponentEvent(ComponentEvent.ENTER)); close(); return; default: if (editable){ break; }; _local5 = list.getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), _local4); break; }; if (_local5 > -1){ if (isOpen){ highlightCell(_local5); inputField.text = list.itemToLabel(getItemAt(_local5)); } else { highlightCell(); selectedIndex = _local5; dispatchEvent(new Event(Event.CHANGE)); }; }; } public function get value():String{ var _local1:Object; if (editableValue != null){ return (editableValue); }; _local1 = selectedItem; if (((!(_editable)) && (!((_local1.data == null))))){ return (_local1.data); }; return (itemToLabel(_local1)); } override protected function focusInHandler(_arg1:FocusEvent):void{ super.focusInHandler(_arg1); if (editable){ stage.focus = inputField.textField; }; } public function set dataProvider(_arg1:DataProvider):void{ _arg1.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true); list.dataProvider = _arg1; invalidate(InvalidationType.DATA); } public function get rowCount():uint{ return (_rowCount); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; if (!_editable){ return; }; inputField.restrict = _arg1; } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ return (list.replaceItemAt(_arg1, _arg2)); } public function removeAll():void{ list.removeAll(); inputField.text = ""; invalidate(InvalidationType.DATA); } protected function onTextInput(_arg1:Event):void{ _arg1.stopPropagation(); if (!_editable){ return; }; editableValue = inputField.text; selectedIndex = -1; dispatchEvent(new Event(Event.CHANGE)); } protected function onInputFieldFocus(_arg1:FocusEvent):void{ inputField.addEventListener(ComponentEvent.ENTER, onEnter, false, 0, true); close(); } protected function onListItemUp(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_UP, onListItemUp); if (((!((_arg1.target is ICellRenderer))) || (!(list.contains((_arg1.target as DisplayObject)))))){ return; }; editableValue = null; var _local2:* = selectedIndex; selectedIndex = _arg1.target.listData.index; if (_local2 != selectedIndex){ dispatchEvent(new Event(Event.CHANGE)); }; close(); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ isKeyDown = false; } protected function drawLayout():void{ var _local1:Number = (getStyleValue("buttonWidth") as Number); var _local2:Number = (getStyleValue("textPadding") as Number); background.setSize(width, height); inputField.x = (inputField.y = _local2); inputField.setSize(((width - _local1) - _local2), (height - _local2)); list.width = (isNaN(_dropdownWidth)) ? width : _dropdownWidth; background.enabled = enabled; background.drawNow(); } public function set selectedItem(_arg1:Object):void{ list.selectedItem = _arg1; invalidate(InvalidationType.SELECTED); } public function getItemAt(_arg1:uint):Object{ return (list.getItemAt(_arg1)); } override protected function initializeAccessibility():void{ if (ComboBox.createAccessibilityImplementation != null){ ComboBox.createAccessibilityImplementation(this); }; } public function itemToLabel(_arg1:Object):String{ if (_arg1 == null){ return (""); }; return (list.itemToLabel(_arg1)); } public function addItemAt(_arg1:Object, _arg2:uint):void{ list.addItemAt(_arg1, _arg2); invalidate(InvalidationType.DATA); } private function addCloseListener(_arg1:Event){ removeEventListener(Event.ENTER_FRAME, addCloseListener); if (!isOpen){ return; }; stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false, 0, true); } protected function setEmbedFonts():void{ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ inputField.textField.embedFonts = _local1; }; } public function set rowCount(_arg1:uint):void{ _rowCount = _arg1; invalidate(InvalidationType.SIZE); } public function removeItem(_arg1:Object):Object{ return (list.removeItem(_arg1)); } public function get dataProvider():DataProvider{ return (list.dataProvider); } public function get restrict():String{ return (inputField.restrict); } protected function showPrompt():void{ inputField.text = _prompt; } public function sortItems(... _args){ return (list.sortItems.apply(list, _args)); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; drawTextField(); } public function set labelField(_arg1:String):void{ list.labelField = _arg1; invalidate(InvalidationType.DATA); } public function get textField():TextInput{ return (inputField); } public function set prompt(_arg1:String):void{ if (_arg1 == ""){ _prompt = null; } else { _prompt = _arg1; }; invalidate(InvalidationType.STATE); } public function set labelFunction(_arg1:Function):void{ list.labelFunction = _arg1; invalidate(InvalidationType.DATA); } protected function setStyles():void{ copyStylesToChild(background, BACKGROUND_STYLES); copyStylesToChild(list, LIST_STYLES); } public function get length():int{ return (list.length); } protected function drawTextFormat():void{ var _local1:TextFormat = (getStyleValue((_enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local1 == null){ _local1 = new TextFormat(); }; inputField.textField.defaultTextFormat = _local1; inputField.textField.setTextFormat(_local1); setEmbedFonts(); } protected function drawTextField():void{ inputField.setStyle("upSkin", ""); inputField.setStyle("disabledSkin", ""); inputField.enabled = enabled; inputField.editable = _editable; inputField.textField.selectable = ((enabled) && (_editable)); inputField.mouseEnabled = (inputField.mouseChildren = ((enabled) && (_editable))); inputField.focusEnabled = false; if (_editable){ inputField.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus, false, 0, true); inputField.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut, false, 0, true); } else { inputField.removeEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus); inputField.removeEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut); }; } public function get labelFunction():Function{ return (list.labelFunction); } public function set selectedIndex(_arg1:int):void{ list.selectedIndex = _arg1; highlightCell(); invalidate(InvalidationType.SELECTED); } public function get selectedIndex():int{ return (list.selectedIndex); } public function close():void{ highlightCell(); highlightedCell = -1; if (!isOpen){ return; }; dispatchEvent(new Event(Event.CLOSE)); stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageClick); isOpen = false; stage.removeChild(list); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, List.getStyleDefinition())); } } }//package fl.controls
Section 94
//LabelButton (fl.controls.LabelButton) package fl.controls { import fl.core.*; import flash.events.*; import flash.display.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _toggle:Boolean;// = false public var textField:TextField; protected var mode:String;// = "center" protected var _labelPlacement:String;// = "right" protected var oldMouseState:String; protected var _label:String;// = "Label" protected var icon:DisplayObject; private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override protected function drawLayout():void{ var _local7:Number; var _local8:Number; var _local1:Number = Number(getStyleValue("textPadding")); var _local2:String = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); var _local3:Number = (textField.textWidth + 4); var _local4:Number = (textField.textHeight + 4); var _local5:Number = ((icon)==null) ? 0 : (icon.width + _local1); var _local6:Number = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } public function get labelPlacement():String{ return (_labelPlacement); } public function get toggle():Boolean{ return (_toggle); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } protected function drawIcon():void{ var _local1:DisplayObject = icon; var _local2:String = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); var _local3:Object = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public function get label():String{ return (_label); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 95
//List (fl.controls.List) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.events.*; import flash.display.*; import fl.managers.*; import flash.utils.*; import flash.geom.*; import flash.ui.*; public class List extends SelectableList implements IFocusManagerComponent { protected var _iconField:String;// = "icon" protected var _labelField:String;// = "label" protected var _iconFunction:Function; protected var _rowHeight:Number;// = 20 protected var _cellRenderer:Object; protected var _labelFunction:Function; private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null}; public static var createAccessibilityImplementation:Function; public function get iconField():String{ return (_iconField); } public function set iconField(_arg1:String):void{ if (_arg1 == _iconField){ return; }; _iconField = _arg1; invalidate(InvalidationType.DATA); } public function set labelField(_arg1:String):void{ if (_arg1 == _labelField){ return; }; _labelField = _arg1; invalidate(InvalidationType.DATA); } public function set rowHeight(_arg1:Number):void{ _rowHeight = _arg1; invalidate(InvalidationType.SIZE); } override protected function draw():void{ var _local1 = !((contentHeight == (rowHeight * length))); contentHeight = (rowHeight * length); if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; if (_cellRenderer != getStyleValue("cellRenderer")){ _invalidateList(); _cellRenderer = getStyleValue("cellRenderer"); }; }; if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){ drawLayout(); }; if (isInvalid(InvalidationType.RENDERER_STYLES)){ updateRendererStyles(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){ drawList(); }; updateChildren(); validate(); } override public function get rowCount():uint{ return (Math.ceil((calculateAvailableHeight() / rowHeight))); } override protected function configUI():void{ useFixedHorizontalScrolling = true; _horizontalScrollPolicy = ScrollPolicy.AUTO; _verticalScrollPolicy = ScrollPolicy.AUTO; super.configUI(); } public function set labelFunction(_arg1:Function):void{ if (_labelFunction == _arg1){ return; }; _labelFunction = _arg1; invalidate(InvalidationType.DATA); } override public function scrollToIndex(_arg1:int):void{ drawNow(); var _local2:uint = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1); var _local3:uint = Math.ceil((_verticalScrollPosition / rowHeight)); if (_arg1 < _local3){ verticalScrollPosition = (_arg1 * rowHeight); } else { if (_arg1 > _local2){ verticalScrollPosition = (((_arg1 + 1) * rowHeight) - availableHeight); }; }; } override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ list.x = -(_arg1); super.setHorizontalScrollPosition(_arg1, true); } override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:int = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1); var _local5 = -1; var _local6:int; switch (_arg1){ case Keyboard.UP: if (caretIndex > 0){ _local5 = (caretIndex - 1); }; break; case Keyboard.DOWN: if (caretIndex < (length - 1)){ _local5 = (caretIndex + 1); }; break; case Keyboard.PAGE_UP: if (caretIndex > 0){ _local5 = Math.max((caretIndex - _local4), 0); }; break; case Keyboard.PAGE_DOWN: if (caretIndex < (length - 1)){ _local5 = Math.min((caretIndex + _local4), (length - 1)); }; break; case Keyboard.HOME: if (caretIndex > 0){ _local5 = 0; }; break; case Keyboard.END: if (caretIndex < (length - 1)){ _local5 = (length - 1); }; break; }; if (_local5 >= 0){ doKeySelection(_local5, _arg2, _arg3); scrollToSelected(); }; } protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{ var _local5:int; var _local6:Array; var _local7:int; var _local8:int; var _local4:Boolean; if (_arg2){ _local6 = []; _local7 = lastCaretIndex; _local8 = _arg1; if (_local7 == -1){ _local7 = ((caretIndex)!=-1) ? caretIndex : _arg1; }; if (_local7 > _local8){ _local8 = _local7; _local7 = _arg1; }; _local5 = _local7; while (_local5 <= _local8) { _local6.push(_local5); _local5++; }; selectedIndices = _local6; caretIndex = _arg1; _local4 = true; } else { selectedIndex = _arg1; caretIndex = (lastCaretIndex = _arg1); _local4 = true; }; if (_local4){ dispatchEvent(new Event(Event.CHANGE)); }; invalidate(InvalidationType.DATA); } public function get rowHeight():Number{ return (_rowHeight); } override protected function initializeAccessibility():void{ if (List.createAccessibilityImplementation != null){ List.createAccessibilityImplementation(this); }; } public function get labelField():String{ return (_labelField); } public function set iconFunction(_arg1:Function):void{ if (_iconFunction == _arg1){ return; }; _iconFunction = _arg1; invalidate(InvalidationType.DATA); } public function set rowCount(_arg1:uint):void{ var _local2:Number = Number(getStyleValue("contentPadding")); var _local3:Number = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0; height = (((rowHeight * _arg1) + (2 * _local2)) + _local3); } public function get labelFunction():Function{ return (_labelFunction); } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ invalidate(InvalidationType.SCROLL); super.setVerticalScrollPosition(_arg1, true); } override protected function drawList():void{ var _local4:uint; var _local5:Object; var _local6:ICellRenderer; var _local9:Boolean; var _local10:String; var _local11:Object; var _local12:Sprite; var _local13:String; listHolder.x = (listHolder.y = contentPadding); var _local1:Rectangle = listHolder.scrollRect; _local1.x = _horizontalScrollPosition; _local1.y = (Math.floor(_verticalScrollPosition) % rowHeight); listHolder.scrollRect = _local1; listHolder.cacheAsBitmap = useBitmapScrolling; var _local2:uint = Math.floor((_verticalScrollPosition / rowHeight)); var _local3:uint = Math.min(length, ((_local2 + rowCount) + 1)); var _local7:Dictionary = (renderedItems = new Dictionary(true)); _local4 = _local2; while (_local4 < _local3) { _local7[_dataProvider.getItemAt(_local4)] = true; _local4++; }; var _local8:Dictionary = new Dictionary(true); while (activeCellRenderers.length > 0) { _local6 = (activeCellRenderers.pop() as ICellRenderer); _local5 = _local6.data; if ((((_local7[_local5] == null)) || ((invalidItems[_local5] == true)))){ availableCellRenderers.push(_local6); } else { _local8[_local5] = _local6; invalidItems[_local5] = true; }; list.removeChild((_local6 as DisplayObject)); }; invalidItems = new Dictionary(true); _local4 = _local2; while (_local4 < _local3) { _local9 = false; _local5 = _dataProvider.getItemAt(_local4); if (_local8[_local5] != null){ _local9 = true; _local6 = _local8[_local5]; delete _local8[_local5]; } else { if (availableCellRenderers.length > 0){ _local6 = (availableCellRenderers.pop() as ICellRenderer); } else { _local6 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer); _local12 = (_local6 as Sprite); if (_local12 != null){ _local12.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true); _local12.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true); _local12.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true); _local12.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true); _local12.doubleClickEnabled = true; _local12.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true); if (_local12.hasOwnProperty("setStyle")){ for (_local13 in rendererStyles) { var _local16 = _local12; _local16["setStyle"](_local13, rendererStyles[_local13]); }; }; }; }; }; list.addChild((_local6 as Sprite)); activeCellRenderers.push(_local6); _local6.y = (rowHeight * (_local4 - _local2)); _local6.setSize((availableWidth + _maxHorizontalScrollPosition), rowHeight); _local10 = itemToLabel(_local5); _local11 = null; if (_iconFunction != null){ _local11 = _iconFunction(_local5); } else { if (_iconField != null){ _local11 = _local5[_iconField]; }; }; if (!_local9){ _local6.data = _local5; }; _local6.listData = new ListData(_local10, _local11, this, _local4, _local4, 0); _local6.selected = !((_selectedIndices.indexOf(_local4) == -1)); if ((_local6 is UIComponent)){ (_local6 as UIComponent).drawNow(); }; _local4++; }; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.SPACE: if (caretIndex == -1){ caretIndex = 0; }; doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey); scrollToSelected(); break; default: _local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex); if (_local2 > -1){ selectedIndex = _local2; scrollToSelected(); }; break; }; _arg1.stopPropagation(); } public function get iconFunction():Function{ return (_iconFunction); } override public function itemToLabel(_arg1:Object):String{ if (_labelFunction != null){ return (String(_labelFunction(_arg1))); }; return (((_arg1[_labelField])!=null) ? String(_arg1[_labelField]) : ""); } protected function calculateAvailableHeight():Number{ var _local1:Number = Number(getStyleValue("contentPadding")); return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0)); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition())); } } }//package fl.controls
Section 96
//NumericStepper (fl.controls.NumericStepper) package fl.controls { import flash.events.*; import flash.display.*; import fl.events.*; import fl.core.*; import fl.managers.*; import flash.ui.*; public class NumericStepper extends UIComponent implements IFocusManagerComponent { protected var downArrow:BaseButton; protected var upArrow:BaseButton; protected var _stepSize:Number;// = 1 protected var _minimum:Number;// = 0 protected var inputField:TextInput; protected var _maximum:Number;// = 10 protected var _value:Number;// = 1 protected var _precision:Number; protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const TEXT_INPUT_STYLES:Object = {upSkin:"upSkin", disabledSkin:"disabledSkin", textPadding:"textPadding", textFormat:"textFormat", disabledTextFormat:"disabledTextFormat", embedFonts:"embedFonts"}; protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {downArrowDisabledSkin:"NumericStepperDownArrow_disabledSkin", downArrowDownSkin:"NumericStepperDownArrow_downSkin", downArrowOverSkin:"NumericStepperDownArrow_overSkin", downArrowUpSkin:"NumericStepperDownArrow_upSkin", upArrowDisabledSkin:"NumericStepperUpArrow_disabledSkin", upArrowDownSkin:"NumericStepperUpArrow_downSkin", upArrowOverSkin:"NumericStepperUpArrow_overSkin", upArrowUpSkin:"NumericStepperUpArrow_upSkin", upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRect:null, focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35, embedFonts:false}; public function NumericStepper(){ setStyles(); stepSize = _stepSize; } override public function set enabled(_arg1:Boolean):void{ if (_arg1 == enabled){ return; }; super.enabled = _arg1; upArrow.enabled = (downArrow.enabled = (inputField.enabled = _arg1)); } public function get imeMode():String{ return (inputField.imeMode); } public function set imeMode(_arg1:String):void{ inputField.imeMode = _arg1; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } protected function inStep(_arg1:Number):Boolean{ return ((((_arg1 - _minimum) % _stepSize) == 0)); } override protected function focusOutHandler(_arg1:FocusEvent):void{ if (_arg1.eventPhase == 3){ setValue(Number(inputField.text)); }; super.focusOutHandler(_arg1); } override public function setFocus():void{ if (stage){ stage.focus = inputField.textField; }; } public function set minimum(_arg1:Number):void{ _minimum = _arg1; if (_value < _minimum){ setValue(_minimum, false); }; } protected function inRange(_arg1:Number):Boolean{ return ((((_arg1 >= _minimum)) && ((_arg1 <= _maximum)))); } public function get minimum():Number{ return (_minimum); } public function get maximum():Number{ return (_maximum); } protected function setValue(_arg1:Number, _arg2:Boolean=true):void{ if (_arg1 == _value){ return; }; var _local3:Number = _value; _value = getValidValue(_arg1); inputField.text = _value.toString(); if (_arg2){ dispatchEvent(new Event(Event.CHANGE, true)); }; } protected function drawLayout():void{ var _local1:Number; _local1 = (width - upArrow.width); var _local2:Number = (height / 2); inputField.setSize(_local1, height); upArrow.height = _local2; downArrow.height = Math.floor(_local2); downArrow.move(_local1, _local2); upArrow.move(_local1, 0); downArrow.drawNow(); upArrow.drawNow(); inputField.drawNow(); } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == inputField)) || (super.isOurFocus(_arg1)))); } public function get previousValue():Number{ var _local1:Number = (_value - _stepSize); return ((inRange(_local1)) ? _local1 : _value); } public function get nextValue():Number{ var _local1:Number = (_value + _stepSize); return ((inRange(_local1)) ? _local1 : _value); } public function set maximum(_arg1:Number):void{ _maximum = _arg1; if (_value > _maximum){ setValue(_maximum, false); }; } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ setStyles(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; validate(); } protected function getPrecision():Number{ var _local1:String = _stepSize.toString(); if (_local1.indexOf(".") == -1){ return (0); }; return (_local1.split(".").pop().length); } protected function getValidValue(_arg1:Number):Number{ if (isNaN(_arg1)){ return (_value); }; var _local2:Number = Number((_stepSize * Math.round((_arg1 / _stepSize))).toFixed(_precision)); if (_local2 > maximum){ return (maximum); }; if (_local2 < minimum){ return (minimum); }; return (_local2); } public function get textField():TextInput{ return (inputField); } override protected function configUI():void{ super.configUI(); upArrow = new BaseButton(); copyStylesToChild(upArrow, UP_ARROW_STYLES); upArrow.autoRepeat = true; upArrow.setSize(21, 12); upArrow.focusEnabled = false; addChild(upArrow); downArrow = new BaseButton(); copyStylesToChild(downArrow, DOWN_ARROW_STYLES); downArrow.autoRepeat = true; downArrow.setSize(21, 12); downArrow.focusEnabled = false; addChild(downArrow); inputField = new TextInput(); copyStylesToChild(inputField, TEXT_INPUT_STYLES); inputField.restrict = "0-9\\-\\.\\,"; inputField.text = _value.toString(); inputField.setSize(21, 24); inputField.focusTarget = (this as IFocusManagerComponent); inputField.focusEnabled = false; inputField.addEventListener(FocusEvent.FOCUS_IN, passEvent); inputField.addEventListener(FocusEvent.FOCUS_OUT, passEvent); addChild(inputField); inputField.addEventListener(Event.CHANGE, onTextChange, false, 0, true); upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, stepperPressHandler, false, 0, true); downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, stepperPressHandler, false, 0, true); } public function set stepSize(_arg1:Number):void{ _stepSize = _arg1; _precision = getPrecision(); setValue(_value); } public function set value(_arg1:Number):void{ setValue(_arg1, false); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; _arg1.stopImmediatePropagation(); var _local2:Number = Number(inputField.text); switch (_arg1.keyCode){ case Keyboard.END: setValue(maximum); break; case Keyboard.HOME: setValue(minimum); break; case Keyboard.UP: setValue(nextValue); break; case Keyboard.DOWN: setValue(previousValue); break; case Keyboard.ENTER: setValue(_local2); break; }; } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); copyStylesToChild(inputField, TEXT_INPUT_STYLES); } public function get stepSize():Number{ return (_stepSize); } public function get value():Number{ return (_value); } protected function stepperPressHandler(_arg1:ComponentEvent):void{ setValue(Number(inputField.text), false); switch (_arg1.currentTarget){ case upArrow: setValue(nextValue); break; case downArrow: setValue(previousValue); }; inputField.setFocus(); inputField.textField.setSelection(0, 0); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); }; } protected function onTextChange(_arg1:Event):void{ _arg1.stopImmediatePropagation(); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 97
//ScrollBar (fl.controls.ScrollBar) package fl.controls { import fl.core.*; import flash.events.*; import fl.events.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" private var _minScrollPosition:Number;// = 0 private var _pageSize:Number;// = 10 private var _maxScrollPosition:Number;// = 0 protected var downArrow:BaseButton; private var _lineScrollSize:Number;// = 1 protected var upArrow:BaseButton; private var _scrollPosition:Number;// = 0 private var thumbScrollOffset:Number; protected var track:BaseButton; protected var thumb:LabelButton; protected var inDrag:Boolean;// = false private var _pageScrollSize:Number;// = 0 protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0}; public static const WIDTH:Number = 15; protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35}; public function ScrollBar(){ setStyles(); focusEnabled = false; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition)))))); updateThumb(); } override public function setSize(_arg1:Number, _arg2:Number):void{ if (_direction == ScrollBarDirection.HORIZONTAL){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; } public function set lineScrollSize(_arg1:Number):void{ if (_arg1 > 0){ _lineScrollSize = _arg1; }; } public function get minScrollPosition():Number{ return (_minScrollPosition); } protected function updateThumb():void{ var _local1:Number = ((_maxScrollPosition - _minScrollPosition) + _pageSize); if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){ thumb.height = 12; thumb.visible = false; } else { thumb.height = Math.max(13, ((_pageSize / _local1) * track.height)); thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition)))); thumb.visible = enabled; }; } public function set minScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _arg1, _maxScrollPosition); } public function get lineScrollSize():Number{ return (_lineScrollSize); } public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ var _local3:Number = scrollPosition; _scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1)); if (_local3 == _scrollPosition){ return; }; if (_arg2){ dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition)); }; updateThumb(); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } public function get scrollPosition():Number{ return (_scrollPosition); } override public function get height():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height); } public function get pageSize():Number{ return (_pageSize); } public function set maxScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _minScrollPosition, _arg1); } protected function thumbReleaseHandler(_arg1:MouseEvent):void{ inDrag = false; mouseChildren = true; thumb.mouseStateLocked = false; stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler); } public function set pageScrollSize(_arg1:Number):void{ if (_arg1 >= 0){ _pageScrollSize = _arg1; }; } public function set scrollPosition(_arg1:Number):void{ setScrollPosition(_arg1, true); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Number; if (isInvalid(InvalidationType.SIZE)){ _local1 = super.height; downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height))); track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height)))); updateThumb(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ setStyles(); }; downArrow.drawNow(); upArrow.drawNow(); track.drawNow(); thumb.drawNow(); validate(); } override public function get width():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width); } override protected function configUI():void{ super.configUI(); track = new BaseButton(); track.move(0, 14); track.useHandCursor = false; track.autoRepeat = true; track.focusEnabled = false; addChild(track); thumb = new LabelButton(); thumb.label = ""; thumb.setSize(WIDTH, 15); thumb.move(0, 15); thumb.focusEnabled = false; addChild(thumb); downArrow = new BaseButton(); downArrow.setSize(WIDTH, 14); downArrow.autoRepeat = true; downArrow.focusEnabled = false; addChild(downArrow); upArrow = new BaseButton(); upArrow.setSize(WIDTH, 14); upArrow.move(0, 0); upArrow.autoRepeat = true; upArrow.focusEnabled = false; addChild(upArrow); upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true); enabled = false; } public function set pageSize(_arg1:Number):void{ if (_arg1 > 0){ _pageSize = _arg1; }; } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ this.pageSize = _arg1; _minScrollPosition = _arg2; _maxScrollPosition = _arg3; if (_arg4 >= 0){ _pageScrollSize = _arg4; }; enabled = (_maxScrollPosition > _minScrollPosition); setScrollPosition(_scrollPosition, false); updateThumb(); } public function get pageScrollSize():Number{ return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize); } protected function handleThumbDrag(_arg1:MouseEvent):void{ var _local2:Number = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset))); setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition)); } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); } protected function scrollPressHandler(_arg1:ComponentEvent):void{ var _local2:Number; var _local3:Number; _arg1.stopImmediatePropagation(); if (_arg1.currentTarget == upArrow){ setScrollPosition((_scrollPosition - _lineScrollSize)); } else { if (_arg1.currentTarget == downArrow){ setScrollPosition((_scrollPosition + _lineScrollSize)); } else { _local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition); _local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize; if (_scrollPosition < _local2){ setScrollPosition(Math.min(_local2, (_scrollPosition + _local3))); } else { if (_scrollPosition > _local2){ setScrollPosition(Math.max(_local2, (_scrollPosition - _local3))); }; }; }; }; } protected function thumbPressHandler(_arg1:MouseEvent):void{ inDrag = true; thumbScrollOffset = (mouseY - thumb.y); thumb.mouseStateLocked = true; mouseChildren = false; stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true); } public function set direction(_arg1:String):void{ if (_direction == _arg1){ return; }; _direction = _arg1; if (isLivePreview){ return; }; setScaleY(1); var _local2 = (_direction == ScrollBarDirection.HORIZONTAL); if (((_local2) && (componentInspectorSetting))){ if (rotation == 90){ return; }; setScaleX(-1); rotation = -90; }; if (!componentInspectorSetting){ if (((_local2) && ((rotation == 0)))){ rotation = -90; setScaleX(-1); } else { if (((!(_local2)) && ((rotation == -90)))){ rotation = 0; setScaleX(1); }; }; }; invalidate(InvalidationType.SIZE); } public function get direction():String{ return (_direction); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 98
//ScrollBarDirection (fl.controls.ScrollBarDirection) package fl.controls { public class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; } }//package fl.controls
Section 99
//ScrollPolicy (fl.controls.ScrollPolicy) package fl.controls { public class ScrollPolicy { public static const OFF:String = "off"; public static const ON:String = "on"; public static const AUTO:String = "auto"; } }//package fl.controls
Section 100
//SelectableList (fl.controls.SelectableList) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.events.*; import flash.display.*; import fl.data.*; import fl.managers.*; import fl.events.*; import flash.utils.*; import fl.containers.*; import flash.ui.*; public class SelectableList extends BaseScrollPane implements IFocusManagerComponent { protected var invalidItems:Dictionary; protected var renderedItems:Dictionary; protected var caretIndex:int;// = -1 protected var updatedRendererStyles:Object; protected var _allowMultipleSelection:Boolean;// = false protected var lastCaretIndex:int;// = -1 protected var _verticalScrollPosition:Number; protected var _selectedIndices:Array; protected var preChangeItems:Array; protected var activeCellRenderers:Array; protected var availableCellRenderers:Array; protected var rendererStyles:Object; protected var list:Sprite; protected var _dataProvider:DataProvider; protected var _horizontalScrollPosition:Number; private var collectionItemImport:SimpleCollectionItem; protected var listHolder:Sprite; protected var _selectable:Boolean;// = true private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null}; public static var createAccessibilityImplementation:Function; public function SelectableList(){ activeCellRenderers = []; availableCellRenderers = []; invalidItems = new Dictionary(true); renderedItems = new Dictionary(true); _selectedIndices = []; if (dataProvider == null){ dataProvider = new DataProvider(); }; verticalScrollPolicy = ScrollPolicy.AUTO; rendererStyles = {}; updatedRendererStyles = {}; } protected function drawList():void{ } protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } public function get allowMultipleSelection():Boolean{ return (_allowMultipleSelection); } protected function onPreChange(_arg1:DataChangeEvent):void{ switch (_arg1.changeType){ case DataChangeType.REMOVE: case DataChangeType.ADD: case DataChangeType.INVALIDATE: case DataChangeType.REMOVE_ALL: case DataChangeType.REPLACE: case DataChangeType.INVALIDATE_ALL: break; default: preChangeItems = selectedItems; break; }; } public function set selectedIndices(_arg1:Array):void{ if (!_selectable){ return; }; _selectedIndices = ((_arg1)==null) ? [] : _arg1.concat(); invalidate(InvalidationType.SELECTED); } public function isItemSelected(_arg1:Object):Boolean{ return ((selectedItems.indexOf(_arg1) > -1)); } public function set allowMultipleSelection(_arg1:Boolean):void{ if (_arg1 == _allowMultipleSelection){ return; }; _allowMultipleSelection = _arg1; if (((!(_arg1)) && ((_selectedIndices.length > 1)))){ _selectedIndices = [_selectedIndices.pop()]; invalidate(InvalidationType.DATA); }; } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ if (_arg1 == _verticalScrollPosition){ return; }; var _local3:Number = (_arg1 - _verticalScrollPosition); _verticalScrollPosition = _arg1; if (_arg2){ dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1)); }; } public function sortItemsOn(_arg1:String, _arg2:Object=null){ return (_dataProvider.sortOn(_arg1, _arg2)); } public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{ var _local5:Number; var _local6:Object; var _local7:String; if (length == 0){ return (-1); }; _arg1 = _arg1.toUpperCase(); var _local3:int = (length - 1); var _local4:Number = 0; while (_local4 < _local3) { _local5 = ((_arg2 + 1) + _local4); if (_local5 > (length - 1)){ _local5 = (_local5 - length); }; _local6 = getItemAt(_local5); if (_local6 == null){ break; }; _local7 = itemToLabel(_local6); if (_local7 == null){ } else { if (_local7.charAt(0).toUpperCase() == _arg1){ return (_local5); }; }; _local4++; }; return (-1); } override protected function draw():void{ super.draw(); } public function removeItemAt(_arg1:uint):Object{ return (_dataProvider.removeItemAt(_arg1)); } public function get selectedItem():Object{ return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex)); } protected function handleDataChange(_arg1:DataChangeEvent):void{ var _local5:uint; var _local2:int = _arg1.startIndex; var _local3:int = _arg1.endIndex; var _local4:String = _arg1.changeType; if (_local4 == DataChangeType.INVALIDATE_ALL){ clearSelection(); invalidateList(); } else { if (_local4 == DataChangeType.INVALIDATE){ _local5 = 0; while (_local5 < _arg1.items.length) { invalidateItem(_arg1.items[_local5]); _local5++; }; } else { if (_local4 == DataChangeType.ADD){ _local5 = 0; while (_local5 < _selectedIndices.length) { if (_selectedIndices[_local5] >= _local2){ _selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3)); }; _local5++; }; } else { if (_local4 == DataChangeType.REMOVE){ _local5 = 0; while (_local5 < _selectedIndices.length) { if (_selectedIndices[_local5] >= _local2){ if (_selectedIndices[_local5] <= _local3){ delete _selectedIndices[_local5]; } else { _selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1)); }; }; _local5++; }; } else { if (_local4 == DataChangeType.REMOVE_ALL){ clearSelection(); } else { if (_local4 == DataChangeType.REPLACE){ } else { selectedItems = preChangeItems; preChangeItems = null; }; }; }; }; }; }; invalidate(InvalidationType.DATA); } public function itemToCellRenderer(_arg1:Object):ICellRenderer{ var _local2:*; var _local3:ICellRenderer; if (_arg1 != null){ for (_local2 in activeCellRenderers) { _local3 = (activeCellRenderers[_local2] as ICellRenderer); if (_local3.data == _arg1){ return (_local3); }; }; }; return (null); } public function addItem(_arg1:Object):void{ _dataProvider.addItem(_arg1); invalidateList(); } public function get rowCount():uint{ return (0); } override protected function configUI():void{ super.configUI(); listHolder = new Sprite(); addChild(listHolder); listHolder.scrollRect = contentScrollRect; list = new Sprite(); listHolder.addChild(list); } public function get selectable():Boolean{ return (_selectable); } public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{ delete rendererStyles[_arg1]; updatedRendererStyles[_arg1] = null; invalidate(InvalidationType.RENDERER_STYLES); } protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{ var _local2:ICellRenderer = (_arg1.target as ICellRenderer); var _local3:String = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT; dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data)); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); _arg1.stopPropagation(); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); _arg1.stopPropagation(); break; }; } protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{ if (!_enabled){ return; }; var _local2:ICellRenderer = (_arg1.currentTarget as ICellRenderer); var _local3:uint = _local2.listData.index; dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)); } public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{ if (rendererStyles[_arg1] == _arg2){ return; }; updatedRendererStyles[_arg1] = _arg2; rendererStyles[_arg1] = _arg2; invalidate(InvalidationType.RENDERER_STYLES); } public function set dataProvider(_arg1:DataProvider):void{ if (_dataProvider != null){ _dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange); _dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange); }; _dataProvider = _arg1; _dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true); _dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true); clearSelection(); invalidateList(); } public function invalidateList():void{ _invalidateList(); invalidate(InvalidationType.DATA); } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ return (_dataProvider.replaceItemAt(_arg1, _arg2)); } public function removeAll():void{ _dataProvider.removeAll(); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; list.mouseChildren = _enabled; } public function scrollToIndex(_arg1:int):void{ } public function get selectedIndices():Array{ return (_selectedIndices.concat()); } override protected function drawLayout():void{ super.drawLayout(); contentScrollRect = listHolder.scrollRect; contentScrollRect.width = availableWidth; contentScrollRect.height = availableHeight; listHolder.scrollRect = contentScrollRect; } protected function _invalidateList():void{ availableCellRenderers = []; while (activeCellRenderers.length > 0) { list.removeChild((activeCellRenderers.pop() as DisplayObject)); }; } public function set selectedItem(_arg1:Object):void{ var _local2:int = _dataProvider.getItemIndex(_arg1); selectedIndex = _local2; } public function getItemAt(_arg1:uint):Object{ return (_dataProvider.getItemAt(_arg1)); } protected function handleCellRendererChange(_arg1:Event):void{ var _local2:ICellRenderer = (_arg1.currentTarget as ICellRenderer); var _local3:uint = _local2.listData.index; _dataProvider.invalidateItemAt(_local3); } protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } public function itemToLabel(_arg1:Object):String{ return (_arg1["label"]); } public function addItemAt(_arg1:Object, _arg2:uint):void{ _dataProvider.addItemAt(_arg1, _arg2); invalidateList(); } override protected function initializeAccessibility():void{ if (SelectableList.createAccessibilityImplementation != null){ SelectableList.createAccessibilityImplementation(this); }; } protected function updateRendererStyles():void{ var _local4:String; var _local1:Array = availableCellRenderers.concat(activeCellRenderers); var _local2:uint = _local1.length; var _local3:uint; while (_local3 < _local2) { if (_local1[_local3].setStyle == null){ } else { for (_local4 in updatedRendererStyles) { _local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]); }; _local1[_local3].drawNow(); }; _local3++; }; updatedRendererStyles = {}; } public function set selectable(_arg1:Boolean):void{ if (_arg1 == _selectable){ return; }; if (!_arg1){ selectedIndices = []; }; _selectable = _arg1; } public function removeItem(_arg1:Object):Object{ return (_dataProvider.removeItem(_arg1)); } public function get dataProvider():DataProvider{ return (_dataProvider); } public function set maxHorizontalScrollPosition(_arg1:Number):void{ _maxHorizontalScrollPosition = _arg1; invalidate(InvalidationType.SIZE); } public function clearSelection():void{ selectedIndex = -1; } public function invalidateItemAt(_arg1:uint):void{ var _local2:Object = _dataProvider.getItemAt(_arg1); if (_local2 != null){ invalidateItem(_local2); }; } public function sortItems(... _args){ return (_dataProvider.sort.apply(_dataProvider, _args)); } public function set selectedItems(_arg1:Array):void{ var _local4:int; if (_arg1 == null){ selectedIndices = null; return; }; var _local2:Array = []; var _local3:uint; while (_local3 < _arg1.length) { _local4 = _dataProvider.getItemIndex(_arg1[_local3]); if (_local4 != -1){ _local2.push(_local4); }; _local3++; }; selectedIndices = _local2; } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ if (_arg1 == _horizontalScrollPosition){ return; }; var _local3:Number = (_arg1 - _horizontalScrollPosition); _horizontalScrollPosition = _arg1; if (_arg2){ dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1)); }; } override public function get maxHorizontalScrollPosition():Number{ return (_maxHorizontalScrollPosition); } public function scrollToSelected():void{ scrollToIndex(selectedIndex); } public function get selectedItems():Array{ var _local1:Array = []; var _local2:uint; while (_local2 < _selectedIndices.length) { _local1.push(_dataProvider.getItemAt(_selectedIndices[_local2])); _local2++; }; return (_local1); } public function get length():uint{ return (_dataProvider.length); } public function invalidateItem(_arg1:Object):void{ if (renderedItems[_arg1] == null){ return; }; invalidItems[_arg1] = true; invalidate(InvalidationType.DATA); } public function set selectedIndex(_arg1:int):void{ selectedIndices = ((_arg1)==-1) ? null : [_arg1]; } public function get selectedIndex():int{ return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]); } public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{ return (rendererStyles[_arg1]); } protected function handleCellRendererClick(_arg1:MouseEvent):void{ var _local5:int; var _local6:uint; if (!_enabled){ return; }; var _local2:ICellRenderer = (_arg1.currentTarget as ICellRenderer); var _local3:uint = _local2.listData.index; if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){ return; }; var _local4:int = selectedIndices.indexOf(_local3); if (!_allowMultipleSelection){ if (_local4 != -1){ return; }; _local2.selected = true; _selectedIndices = [_local3]; lastCaretIndex = (caretIndex = _local3); } else { if (_arg1.shiftKey){ _local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3; _selectedIndices = []; if (_local6 > _local3){ _local5 = _local6; while (_local5 >= _local3) { _selectedIndices.push(_local5); _local5--; }; } else { _local5 = _local6; while (_local5 <= _local3) { _selectedIndices.push(_local5); _local5++; }; }; caretIndex = _local3; } else { if (_arg1.ctrlKey){ if (_local4 != -1){ _local2.selected = false; _selectedIndices.splice(_local4, 1); } else { _local2.selected = true; _selectedIndices.push(_local3); }; caretIndex = _local3; } else { _selectedIndices = [_local3]; lastCaretIndex = (caretIndex = _local3); }; }; }; dispatchEvent(new Event(Event.CHANGE)); invalidate(InvalidationType.DATA); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition())); } } }//package fl.controls
Section 101
//TextArea (fl.controls.TextArea) package fl.controls { import fl.core.*; import flash.events.*; import flash.display.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.system.*; import flash.ui.*; public class TextArea extends UIComponent implements IFocusManagerComponent { protected var _horizontalScrollBar:UIScrollBar; protected var _html:Boolean;// = false protected var background:DisplayObject; protected var _verticalScrollBar:UIScrollBar; protected var _savedHTML:String; protected var _horizontalScrollPolicy:String;// = "auto" protected var _editable:Boolean;// = true protected var textHasChanged:Boolean;// = false public var textField:TextField; protected var _wordWrap:Boolean;// = true protected var _verticalScrollPolicy:String;// = "auto" protected static const SCROLL_BAR_STYLES:Object = {downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {upSkin:"TextArea_upSkin", disabledSkin:"TextArea_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseChildren = enabled; invalidate(InvalidationType.STATE); } override protected function focusInHandler(_arg1:FocusEvent):void{ setIMEMode(true); if (_arg1.target == this){ stage.focus = textField; }; var _local2:IFocusManager = focusManager; if (_local2){ if (editable){ _local2.showFocusIndicator = true; }; _local2.defaultButtonEnabled = false; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); invalidate(InvalidationType.DATA); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get imeMode():String{ return (IME.conversionMode); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } protected function handleWheel(_arg1:MouseEvent):void{ if (((!(enabled)) || (!(_verticalScrollBar.visible)))){ return; }; _verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * _verticalScrollBar.lineScrollSize)); dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, (_arg1.delta * _verticalScrollBar.lineScrollSize), _verticalScrollBar.scrollPosition)); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; invalidate(InvalidationType.DATA); } public function get textWidth():Number{ drawNow(); return (textField.textWidth); } override protected function focusOutHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager = focusManager; if (_local2){ _local2.defaultButtonEnabled = true; }; setSelection(0, 0); super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } protected function handleScroll(_arg1:ScrollEvent):void{ dispatchEvent(_arg1); } protected function drawLayout():void{ var _local1:Number = Number(getStyleValue("textPadding")); textField.x = (textField.y = _local1); background.width = width; background.height = height; var _local2:Number = height; var _local3:Boolean = needVScroll(); var _local4:Number = (width - (_local3) ? _verticalScrollBar.width : 0); var _local5:Boolean = needHScroll(); if (_local5){ _local2 = (_local2 - _horizontalScrollBar.height); }; setTextSize(_local4, _local2, _local1); if (((((_local5) && (!(_local3)))) && (needVScroll()))){ _local3 = true; _local4 = (_local4 - _verticalScrollBar.width); setTextSize(_local4, _local2, _local1); }; if (_local3){ _verticalScrollBar.visible = true; _verticalScrollBar.x = (width - _verticalScrollBar.width); _verticalScrollBar.height = _local2; _verticalScrollBar.visible = true; _verticalScrollBar.enabled = enabled; } else { _verticalScrollBar.visible = false; }; if (_local5){ _horizontalScrollBar.visible = true; _horizontalScrollBar.y = (height - _horizontalScrollBar.height); _horizontalScrollBar.width = _local4; _horizontalScrollBar.visible = true; _horizontalScrollBar.enabled = enabled; } else { _horizontalScrollBar.visible = false; }; updateScrollBars(); addEventListener(Event.ENTER_FRAME, delayedLayoutUpdate, false, 0, true); } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } protected function drawBackground():void{ var _local1:DisplayObject = background; var _local2:String = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background != null){ addChildAt(background, 0); }; if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function delayedLayoutUpdate(_arg1:Event):void{ if (textHasChanged){ textHasChanged = false; drawLayout(); return; }; removeEventListener(Event.ENTER_FRAME, delayedLayoutUpdate); } public function get verticalScrollPosition():Number{ return (textField.scrollV); } public function get text():String{ return (textField.text); } public function get verticalScrollBar():UIScrollBar{ return (_verticalScrollBar); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function get textHeight():Number{ drawNow(); return (textField.textHeight); } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get maxVerticalScrollPosition():int{ return (textField.maxScrollV); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); textField.scrollH = _arg1; } public function get restrict():String{ return (textField.restrict); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STATE)){ updateTextFieldType(); }; if (isInvalid(InvalidationType.STYLES)){ setStyles(); setEmbedFont(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA)){ drawLayout(); }; super.draw(); } public function set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; invalidate(InvalidationType.STATE); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } protected function setTextSize(_arg1:Number, _arg2:Number, _arg3:Number):void{ var _local4:Number = (_arg1 - (_arg3 * 2)); var _local5:Number = (_arg2 - (_arg3 * 2)); if (_local4 != textField.width){ textField.width = _local4; }; if (_local5 != textField.height){ textField.height = _local5; }; } public function get horizontalScrollBar():UIScrollBar{ return (_horizontalScrollBar); } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); _verticalScrollBar = new UIScrollBar(); _verticalScrollBar.name = "V"; _verticalScrollBar.visible = false; _verticalScrollBar.focusEnabled = false; copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); _verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); addChild(_verticalScrollBar); _horizontalScrollBar = new UIScrollBar(); _horizontalScrollBar.name = "H"; _horizontalScrollBar.visible = false; _horizontalScrollBar.focusEnabled = false; _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); addChild(_horizontalScrollBar); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); _horizontalScrollBar.scrollTarget = textField; _verticalScrollBar.scrollTarget = textField; addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } public function set verticalScrollPosition(_arg1:Number):void{ drawNow(); textField.scrollV = _arg1; } public function get maxChars():int{ return (textField.maxChars); } public function set text(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); textHasChanged = true; } protected function updateScrollBars(){ _horizontalScrollBar.update(); _verticalScrollBar.update(); _verticalScrollBar.enabled = enabled; _horizontalScrollBar.enabled = enabled; _horizontalScrollBar.drawNow(); _verticalScrollBar.drawNow(); } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } protected function needHScroll():Boolean{ if (_horizontalScrollPolicy == ScrollPolicy.OFF){ return (false); }; if (_horizontalScrollPolicy == ScrollPolicy.ON){ return (true); }; return ((textField.maxScrollH > 0)); } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function get horizontalScrollPosition():Number{ return (textField.scrollH); } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (_editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; textField.wordWrap = _wordWrap; textField.multiline = true; } public function appendText(_arg1:String):void{ textField.appendText(_arg1); invalidate(InvalidationType.DATA); } public function set wordWrap(_arg1:Boolean):void{ _wordWrap = _arg1; invalidate(InvalidationType.STATE); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } public function get length():Number{ return (textField.text.length); } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } public function set htmlText(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); textHasChanged = true; } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } public function get htmlText():String{ return (textField.htmlText); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } public function get wordWrap():Boolean{ return (_wordWrap); } protected function needVScroll():Boolean{ if (_verticalScrollPolicy == ScrollPolicy.OFF){ return (false); }; if (_verticalScrollPolicy == ScrollPolicy.ON){ return (true); }; return ((textField.maxScrollV > 1)); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 102
//TextInput (fl.controls.TextInput) package fl.controls { import fl.core.*; import flash.events.*; import flash.display.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class TextInput extends UIComponent implements IFocusManagerComponent { protected var _html:Boolean;// = false protected var background:DisplayObject; protected var _savedHTML:String; protected var _editable:Boolean;// = true public var textField:TextField; private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; updateTextFieldType(); } public function get imeMode():String{ return (_imeMode); } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } protected function drawLayout():void{ var _local1:Number = Number(getStyleValue("textPadding")); if (background != null){ background.width = width; background.height = height; }; textField.width = (width - (2 * _local1)); textField.height = (height - (2 * _local1)); textField.x = (textField.y = _local1); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; } public function get textWidth():Number{ return (textField.textWidth); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } override public function setFocus():void{ stage.focus = textField; } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } protected function drawBackground():void{ var _local1:DisplayObject = background; var _local2:String = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background == null){ return; }; addChildAt(background, 0); if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } public function get text():String{ return (textField.text); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function set horizontalScrollPosition(_arg1:int):void{ textField.scrollH = _arg1; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get textHeight():Number{ return (textField.textHeight); } public function get restrict():String{ return (textField.restrict); } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Object; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; updateTextFieldType(); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); } public function get maxChars():int{ return (textField.maxChars); } public function set text(_arg1:String):void{ textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function get horizontalScrollPosition():int{ return (textField.scrollH); } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } public function appendText(_arg1:String):void{ textField.appendText(_arg1); } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } public function get length():int{ return (textField.length); } public function set htmlText(_arg1:String):void{ if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } override protected function focusInHandler(_arg1:FocusEvent):void{ if (_arg1.target == this){ stage.focus = textField; }; var _local2:IFocusManager = focusManager; if (((editable) && (_local2))){ _local2.showFocusIndicator = true; if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){ setSelection(0, textField.length); }; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } public function get htmlText():String{ return (textField.htmlText); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 103
//UIScrollBar (fl.controls.UIScrollBar) package fl.controls { import fl.core.*; import flash.events.*; import fl.events.*; import flash.text.*; public class UIScrollBar extends ScrollBar { protected var inEdit:Boolean;// = false protected var inScroll:Boolean;// = false protected var _scrollTarget:TextField; private static var defaultStyles:Object = {}; protected function updateScrollTargetProperties():void{ var _local1:Boolean; var _local2:Number; if (_scrollTarget == null){ setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize); scrollPosition = 0; } else { _local1 = (direction == ScrollBarDirection.HORIZONTAL); _local2 = (_local1) ? _scrollTarget.width : 10; setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV, pageScrollSize); scrollPosition = (_local1) ? _scrollTarget.scrollH : _scrollTarget.scrollV; }; } override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number = _arg3; var _local6:Number = ((_arg2)<0) ? 0 : _arg2; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local5 = ((_arg3)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local5; } else { _local5 = ((_arg3)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local5; }; }; super.setScrollProperties(_arg1, _local6, _local5, _arg4); } protected function handleTargetScroll(_arg1:Event):void{ if (inDrag){ return; }; if (!enabled){ return; }; inEdit = true; updateScrollTargetProperties(); scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV; inEdit = false; } override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ super.setScrollPosition(_arg1, _arg2); if (!_scrollTarget){ inScroll = false; return; }; updateTargetScroll(); } public function get scrollTargetName():String{ return (_scrollTarget.name); } override protected function draw():void{ if (isInvalid(InvalidationType.DATA)){ updateScrollTargetProperties(); }; super.draw(); } override public function set direction(_arg1:String):void{ if (isLivePreview){ return; }; super.direction = _arg1; updateScrollTargetProperties(); } protected function updateTargetScroll(_arg1:ScrollEvent=null):void{ if (inEdit){ return; }; if (direction == ScrollBarDirection.HORIZONTAL){ _scrollTarget.scrollH = scrollPosition; } else { _scrollTarget.scrollV = scrollPosition; }; } override public function set minScrollPosition(_arg1:Number):void{ super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1; } override public function set maxScrollPosition(_arg1:Number):void{ var _local2:Number = _arg1; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local2 = ((_local2)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local2; } else { _local2 = ((_local2)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local2; }; }; super.maxScrollPosition = _local2; } protected function handleTargetChange(_arg1:Event):void{ inEdit = true; setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV, true); updateScrollTargetProperties(); inEdit = false; } public function update():void{ inEdit = true; updateScrollTargetProperties(); inEdit = false; } public function set scrollTargetName(_arg1:String):void{ var target = _arg1; try { scrollTarget = (parent.getChildByName(target) as TextField); } catch(error:Error) { throw (new Error("ScrollTarget not found, or is not a TextField")); }; } public function set scrollTarget(_arg1:TextField):void{ if (_scrollTarget != null){ _scrollTarget.removeEventListener(Event.CHANGE, handleTargetChange, false); _scrollTarget.removeEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false); _scrollTarget.removeEventListener(Event.SCROLL, handleTargetScroll, false); removeEventListener(ScrollEvent.SCROLL, updateTargetScroll, false); }; _scrollTarget = _arg1; if (_scrollTarget != null){ _scrollTarget.addEventListener(Event.CHANGE, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(Event.SCROLL, handleTargetScroll, false, 0, true); addEventListener(ScrollEvent.SCROLL, updateTargetScroll, false, 0, true); }; invalidate(InvalidationType.DATA); } public function get scrollTarget():TextField{ return (_scrollTarget); } override public function get direction():String{ return (super.direction); } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 104
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 105
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 106
//UIComponent (fl.core.UIComponent) package fl.core { import flash.events.*; import flash.display.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.system.*; import flash.utils.*; public class UIComponent extends Sprite { protected var _x:Number; protected var _enabled:Boolean;// = true protected var callLaterMethods:Dictionary; private var _mouseFocusEnabled:Boolean;// = true private var tempText:TextField; private var _focusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var invalidateFlag:Boolean;// = false protected var _oldIMEMode:String;// = null protected var _inspector:Boolean;// = false protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var invalidHash:Object; protected var sharedStyles:Object; protected var uiFocusRect:DisplayObject; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var _width:Number; protected var instanceStyles:Object; public var version:String;// = "3.0.0.16" protected var isFocused:Boolean;// = false protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } private function callLaterDispatcher(_arg1:Event):void{ var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; var _local2:Dictionary = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } protected function validate():void{ invalidHash = {}; } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } override public function get height():Number{ return (_height); } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } override public function get scaleY():Number{ return ((height / startHeight)); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function configUI():void{ isLivePreview = checkLivePreview(); var _local1:Number = rotation; rotation = 0; var _local2:Number = super.width; var _local3:Number = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } override public function get scaleX():Number{ return ((width / startWidth)); } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var skin = _arg1; var classDef:Object; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } override public function set visible(_arg1:Boolean):void{ if (super.visible == _arg1){ return; }; super.visible = _arg1; var _local2:String = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set y(_arg1:Number):void{ move(_x, _arg1); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local5:Object; var _local6:String; var _local2:Object = {}; var _local3:uint = _args.length; var _local4:uint; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 107
//DataProvider (fl.data.DataProvider) package fl.data { import flash.events.*; import fl.events.*; public class DataProvider extends EventDispatcher { protected var data:Array; public function DataProvider(_arg1:Object=null){ if (_arg1 == null){ data = []; } else { data = getDataFromObject(_arg1); }; } public function invalidateItemAt(_arg1:int):void{ checkIndex(_arg1, (data.length - 1)); dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1); } protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4)); } public function getItemIndex(_arg1:Object):int{ return (data.indexOf(_arg1)); } public function removeItemAt(_arg1:uint):Object{ checkIndex(_arg1, (data.length - 1)); dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1); var _local2:Array = data.splice(_arg1, 1); dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1); return (_local2[0]); } protected function getDataFromObject(_arg1:Object):Array{ var _local2:Array; var _local3:Array; var _local4:uint; var _local5:Object; var _local6:XML; var _local7:XMLList; var _local8:XML; var _local9:XMLList; var _local10:XML; var _local11:XMLList; var _local12:XML; if ((_arg1 is Array)){ _local3 = (_arg1 as Array); if (_local3.length > 0){ if ((((_local3[0] is String)) || ((_local3[0] is Number)))){ _local2 = []; _local4 = 0; while (_local4 < _local3.length) { _local5 = {label:String(_local3[_local4]), data:_local3[_local4]}; _local2.push(_local5); _local4++; }; return (_local2); }; }; return (_arg1.concat()); //unresolved jump }; if ((_arg1 is DataProvider)){ return (_arg1.toArray()); }; if ((_arg1 is XML)){ _local6 = (_arg1 as XML); _local2 = []; _local7 = _local6.*; for each (_local8 in _local7) { _arg1 = {}; _local9 = _local8.attributes(); for each (_local10 in _local9) { _arg1[_local10.localName()] = _local10.toString(); }; _local11 = _local8.*; for each (_local12 in _local11) { if (_local12.hasSimpleContent()){ _arg1[_local12.localName()] = _local12.toString(); }; }; _local2.push(_arg1); }; return (_local2); //unresolved jump }; throw (new TypeError((("Error: Type Coercion failed: cannot convert " + _arg1) + " to Array or DataProvider."))); } public function addItem(_arg1:Object):void{ dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1)); data.push(_arg1); dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1)); } public function concat(_arg1:Object):void{ addItems(_arg1); } public function getItemAt(_arg1:uint):Object{ checkIndex(_arg1, (data.length - 1)); return (data[_arg1]); } public function sortOn(_arg1:Object, _arg2:Object=null){ dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); var _local3:Array = data.sortOn(_arg1, _arg2); dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); return (_local3); } public function toArray():Array{ return (data.concat()); } public function addItems(_arg1:Object):void{ addItemsAt(_arg1, data.length); } public function clone():DataProvider{ return (new DataProvider(data)); } public function sort(... _args){ dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); var _local2:Array = data.sort.apply(data, _args); dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); return (_local2); } public function get length():uint{ return (data.length); } public function addItemAt(_arg1:Object, _arg2:uint):void{ checkIndex(_arg2, data.length); dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2); data.splice(_arg2, 0, _arg1); dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2); } override public function toString():String{ return ((("DataProvider [" + data.join(" , ")) + "]")); } public function invalidateItem(_arg1:Object):void{ var _local2:uint = getItemIndex(_arg1); if (_local2 == -1){ return; }; invalidateItemAt(_local2); } protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4)); } protected function checkIndex(_arg1:int, _arg2:int):void{ if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){ throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")"))); }; } public function addItemsAt(_arg1:Object, _arg2:uint):void{ checkIndex(_arg2, data.length); var _local3:Array = getDataFromObject(_arg1); dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1)); data.splice.apply(data, [_arg2, 0].concat(_local3)); dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1)); } public function replaceItem(_arg1:Object, _arg2:Object):Object{ var _local3:int = getItemIndex(_arg2); if (_local3 != -1){ return (replaceItemAt(_arg1, _local3)); }; return (null); } public function removeItem(_arg1:Object):Object{ var _local2:int = getItemIndex(_arg1); if (_local2 != -1){ return (removeItemAt(_local2)); }; return (null); } public function merge(_arg1:Object):void{ var _local6:Object; var _local2:Array = getDataFromObject(_arg1); var _local3:uint = _local2.length; var _local4:uint = data.length; dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1)); var _local5:uint; while (_local5 < _local3) { _local6 = _local2[_local5]; if (getItemIndex(_local6) == -1){ data.push(_local6); }; _local5++; }; if (data.length > _local4){ dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1)); } else { dispatchChangeEvent(DataChangeType.ADD, [], -1, -1); }; } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ checkIndex(_arg2, (data.length - 1)); var _local3:Array = [data[_arg2]]; dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2); data[_arg2] = _arg1; dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2); return (_local3[0]); } public function invalidate():void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length)); } public function removeAll():void{ var _local1:Array = data.concat(); dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length); data = []; dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length); } } }//package fl.data
Section 108
//SimpleCollectionItem (fl.data.SimpleCollectionItem) package fl.data { public dynamic class SimpleCollectionItem { public var data:String; public var label:String; public function toString():String{ return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]")); } } }//package fl.data
Section 109
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 110
//DataChangeEvent (fl.events.DataChangeEvent) package fl.events { import flash.events.*; public class DataChangeEvent extends Event { protected var _items:Array; protected var _changeType:String; protected var _startIndex:uint; protected var _endIndex:uint; public static const PRE_DATA_CHANGE:String = "preDataChange"; public static const DATA_CHANGE:String = "dataChange"; public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{ super(_arg1); _changeType = _arg2; _startIndex = _arg4; _items = _arg3; _endIndex = ((_arg5)==-1) ? _startIndex : _arg5; } public function get items():Array{ return (_items); } public function get changeType():String{ return (_changeType); } public function get startIndex():uint{ return (_startIndex); } public function get endIndex():uint{ return (_endIndex); } override public function toString():String{ return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable")); } override public function clone():Event{ return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex)); } } }//package fl.events
Section 111
//DataChangeType (fl.events.DataChangeType) package fl.events { public class DataChangeType { public static const ADD:String = "add"; public static const REMOVE:String = "remove"; public static const REMOVE_ALL:String = "removeAll"; public static const CHANGE:String = "change"; public static const REPLACE:String = "replace"; public static const INVALIDATE:String = "invalidate"; public static const INVALIDATE_ALL:String = "invalidateAll"; public static const SORT:String = "sort"; } }//package fl.events
Section 112
//ListEvent (fl.events.ListEvent) package fl.events { import flash.events.*; public class ListEvent extends Event { protected var _item:Object; protected var _index:int; protected var _rowIndex:int; protected var _columnIndex:int; public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick"; public static const ITEM_ROLL_OUT:String = "itemRollOut"; public static const ITEM_ROLL_OVER:String = "itemRollOver"; public static const ITEM_CLICK:String = "itemClick"; public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){ super(_arg1, _arg2, _arg3); _rowIndex = _arg5; _columnIndex = _arg4; _index = _arg6; _item = _arg7; } public function get item():Object{ return (_item); } override public function toString():String{ return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item")); } override public function clone():Event{ return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex)); } public function get rowIndex():Object{ return (_rowIndex); } public function get index():int{ return (_index); } public function get columnIndex():int{ return (_columnIndex); } } }//package fl.events
Section 113
//ScrollEvent (fl.events.ScrollEvent) package fl.events { import flash.events.*; public class ScrollEvent extends Event { private var _direction:String; private var _position:Number; private var _delta:Number; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){ super(ScrollEvent.SCROLL, false, false); _direction = _arg1; _delta = _arg2; _position = _arg3; } public function get position():Number{ return (_position); } public function get direction():String{ return (_direction); } public function get delta():Number{ return (_delta); } override public function toString():String{ return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position")); } override public function clone():Event{ return (new ScrollEvent(_direction, _delta, _position)); } } }//package fl.events
Section 114
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.core.*; import flash.events.*; import flash.display.*; import fl.controls.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; var _local5:int = focusableCandidates.length; var _local6:int = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } private function setFocusToNextObject(_arg1:FocusEvent):void{ if (!hasFocusableObjects()){ return; }; var _local2:InteractiveObject = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local3:TextField; var _local4:SimpleButton; var _local2:DisplayObjectContainer = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } private function tabChildrenChangeHandler(_arg1:Event):void{ if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } public function getFocus():InteractiveObject{ var _local1:InteractiveObject = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } public function set defaultButton(_arg1:Button):void{ var _local2:Button = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int = focusableCandidates.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local4:InteractiveObject; var _local3:DisplayObject = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local5:int; var _local6:String; var _local7:String; var _local3 = ""; var _local4 = ""; var _local8 = "0000"; var _local9:DisplayObject = DisplayObject(_arg1); var _local10:DisplayObject = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; var _local2:DisplayObject = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); var _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; var _local4:int = getIndexOfFocusedObject(_local2); var _local5:Boolean; var _local6:int = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; var _local7:int = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; var _local2:InteractiveObject = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local3:Button; var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ calculateCandidates = true; var _local2:InteractiveObject = InteractiveObject(_arg1.target); var _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } } }//package fl.managers
Section 115
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import flash.display.*; import fl.controls.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function hideFocus():void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function setFocus(_arg1:InteractiveObject):void; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 116
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package fl.managers
Section 117
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function get groupName():String; function get selected():Boolean; function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; } }//package fl.managers
Section 118
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.text.*; import flash.utils.*; public class StyleManager { private var classToInstancesDict:Dictionary; private var globalStyles:Object; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToDefaultStylesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class = getClassDef(_arg1); var _local5:Object = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local5:String; var _local2:StyleManager = getInstance(); var _local3:Class = getClassDef(_arg1); var _local4:Object = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local4:Object; var _local5:UIComponent; var _local3:Dictionary = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local3:Object; var _local2:Dictionary = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; var inst:StyleManager = getInstance(); var classDef:Class = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; if (inst.classToStylesDict[classDef] == null){ inst.classToStylesDict[classDef] = {}; }; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:StyleManager = getInstance(); var _local5:Object = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 119
//Input (General.Input) package General { import flash.events.*; import flash.display.*; public class Input { public static var mouseOffsetX:Number = 0; private static var keyArr:Array; public static var mouseDragX:Number = 0; public static var mouseDragY:Number = 0; public static var mouseOffsetY:Number = 0; public static var ascii:Array; public static var mouseX:Number = 0; public static var mouseY:Number = 0; public static var mouseOver:Boolean = false; private static var bufferSize:int; public static var mouse:Sprite = new Sprite(); public static var mouseDown:Boolean = false; public static var mouseReleased:Boolean = false; public static var lastKey:int = 0; public static var m_stageMc:Sprite; private static var keyState:Array; public static var timeSinceLastKey:int = 0; public static var mousePressed:Boolean = false; private static var keyBuffer:Array; public function Input(_arg1:Sprite):void{ m_stageMc = _arg1; ascii = new Array(222); fillAscii(); keyState = new Array(222); keyArr = new Array(); var _local2:int; while (_local2 < 222) { keyState[_local2] = new int(0); if (ascii[_local2] != undefined){ keyArr.push(_local2); }; _local2++; }; bufferSize = 5; keyBuffer = new Array(bufferSize); var _local3:int; while (_local3 < bufferSize) { keyBuffer[_local3] = new Array(0, 0); _local3++; }; _arg1.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPress, false, 0, true); _arg1.stage.addEventListener(KeyboardEvent.KEY_UP, keyRelease, false, 0, true); _arg1.stage.addEventListener(MouseEvent.MOUSE_DOWN, mousePress, false, 0, true); _arg1.stage.addEventListener(MouseEvent.CLICK, mouseRelease, false, 0, true); _arg1.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove, false, 0, true); _arg1.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave, false, 0, true); mouse.graphics.lineStyle(0.1, 0, 100); mouse.graphics.moveTo(0, 0); mouse.graphics.lineTo(0, 0.1); } public function mouseLeave(_arg1:Event):void{ mouseReleased = mouseDown; mouseDown = false; } public function keyPress(_arg1:KeyboardEvent):void{ keyState[_arg1.keyCode] = Math.max(keyState[_arg1.keyCode], 1); lastKey = _arg1.keyCode; } private function fillAscii():void{ ascii[65] = "A"; ascii[66] = "B"; ascii[67] = "C"; ascii[68] = "D"; ascii[69] = "E"; ascii[70] = "F"; ascii[71] = "G"; ascii[72] = "H"; ascii[73] = "I"; ascii[74] = "J"; ascii[75] = "K"; ascii[76] = "L"; ascii[77] = "M"; ascii[78] = "N"; ascii[79] = "O"; ascii[80] = "P"; ascii[81] = "Q"; ascii[82] = "R"; ascii[83] = "S"; ascii[84] = "T"; ascii[85] = "U"; ascii[86] = "V"; ascii[87] = "W"; ascii[88] = "X"; ascii[89] = "Y"; ascii[90] = "Z"; ascii[48] = "0"; ascii[49] = "1"; ascii[50] = "2"; ascii[51] = "3"; ascii[52] = "4"; ascii[53] = "5"; ascii[54] = "6"; ascii[55] = "7"; ascii[56] = "8"; ascii[57] = "9"; ascii[32] = "Spacebar"; ascii[17] = "Ctrl"; ascii[16] = "Shift"; ascii[192] = "~"; ascii[38] = "up"; ascii[40] = "down"; ascii[37] = "left"; ascii[39] = "right"; ascii[96] = "Numpad 0"; ascii[97] = "Numpad 1"; ascii[98] = "Numpad 2"; ascii[99] = "Numpad 3"; ascii[100] = "Numpad 4"; ascii[101] = "Numpad 5"; ascii[102] = "Numpad 6"; ascii[103] = "Numpad 7"; ascii[104] = "Numpad 8"; ascii[105] = "Numpad 9"; ascii[111] = "Numpad /"; ascii[106] = "Numpad *"; ascii[109] = "Numpad -"; ascii[107] = "Numpad +"; ascii[110] = "Numpad ."; ascii[45] = "Insert"; ascii[46] = "Delete"; ascii[33] = "Page Up"; ascii[34] = "Page Down"; ascii[35] = "End"; ascii[36] = "Home"; ascii[112] = "F1"; ascii[113] = "F2"; ascii[114] = "F3"; ascii[115] = "F4"; ascii[116] = "F5"; ascii[117] = "F6"; ascii[118] = "F7"; ascii[119] = "F8"; ascii[188] = ","; ascii[190] = "."; ascii[186] = ";"; ascii[222] = "'"; ascii[219] = "["; ascii[221] = "]"; ascii[189] = "-"; ascii[187] = "+"; ascii[220] = "\\"; ascii[191] = "/"; ascii[9] = "TAB"; ascii[8] = "Backspace"; } public function mouseMove(_arg1:MouseEvent):void{ if (mouseDown != _arg1.buttonDown){ mouseDown = _arg1.buttonDown; mouseReleased = !(_arg1.buttonDown); mousePressed = _arg1.buttonDown; mouseDragX = 0; mouseDragY = 0; }; mouseX = (_arg1.stageX - m_stageMc.x); mouseY = (_arg1.stageY - m_stageMc.y); mouseOffsetX = (mouseX - mouse.x); mouseOffsetY = (mouseY - mouse.y); if (mouseDown){ mouseDragX = (mouseDragX + mouseOffsetX); mouseDragY = (mouseDragY + mouseOffsetY); }; mouse.x = mouseX; mouse.y = mouseY; } public function keyRelease(_arg1:KeyboardEvent):void{ keyState[_arg1.keyCode] = -1; var _local2:int = (bufferSize - 1); while (_local2 > 0) { keyBuffer[_local2] = keyBuffer[(_local2 - 1)]; _local2--; }; keyBuffer[0] = [_arg1.keyCode, 0]; } public function mouseRelease(_arg1:MouseEvent):void{ mouseDown = false; mouseReleased = true; } public function mousePress(_arg1:MouseEvent):void{ mousePressed = true; mouseDown = true; mouseDragX = 0; mouseDragY = 0; } public static function getKeyHold(_arg1:int):int{ return (Math.max(0, keyState[_arg1])); } public static function update():void{ var _local1:int; while (_local1 < keyArr.length) { if (keyState[keyArr[_local1]] != 0){ var _local3 = keyState; var _local4 = keyArr[_local1]; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; }; _local1++; }; var _local2:int; while (_local2 < bufferSize) { _local3 = keyBuffer[_local2]; _local4 = 1; _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; _local2++; }; mouseReleased = false; mousePressed = false; mouseOver = false; } public static function isKeyPressed(_arg1:int):Boolean{ timeSinceLastKey = 0; return ((keyState[_arg1] == 1)); } public static function isKeyDown(_arg1:int):Boolean{ return ((keyState[_arg1] > 0)); } public static function getKeyString(_arg1:uint):String{ return (ascii[_arg1]); } public static function isKeyReleased(_arg1:int):Boolean{ return ((keyState[_arg1] == -1)); } public static function isKeyInBuffer(_arg1:int, _arg2:int, _arg3:int):Boolean{ return ((((keyBuffer[_arg2][0] == _arg1)) && ((keyBuffer[_arg2][1] <= _arg3)))); } } }//package General
Section 120
//Key (General.Key) package General { import flash.events.*; public class Key { public var mouseIsDown:Boolean; private var keys:Array; public function Key(_arg1:Object):void{ keys = new Array(222); mouseIsDown = false; _arg1.addEventListener(KeyboardEvent.KEY_DOWN, downhandle, false, 0, true); _arg1.addEventListener(KeyboardEvent.KEY_UP, uphandle, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, mDown); _arg1.addEventListener(MouseEvent.MOUSE_UP, mUp); } private function uphandle(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = false; } public function isUp(_arg1:uint, ... _args):Boolean{ var _local3:uint; if (_args.length == 0){ return (!(keys[_arg1])); }; if (keys[_arg1]){ return (false); }; _local3 = 0; while (_local3 < _args.length) { if (keys[_args[_local3]]){ return (false); }; _local3++; }; return (true); } private function mUp(_arg1:MouseEvent):void{ mouseIsDown = false; } private function downhandle(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = true; } public function isDown(_arg1:uint, ... _args):Boolean{ var _local3:uint; if (_args.length == 0){ return (keys[_arg1]); }; if (!keys[_arg1]){ return (false); }; _local3 = 0; while (_local3 < _args.length) { if (!keys[_args[_local3]]){ return (false); }; _local3++; }; return (true); } private function mDown(_arg1:MouseEvent):void{ mouseIsDown = true; } } }//package General
Section 121
//Area_100 (MainKongregate_fla.Area_100) package MainKongregate_fla { import flash.display.*; public dynamic class Area_100 extends MovieClip { public function Area_100(){ addFrameScript(0, frame1); } function frame1(){ visible = false; } } }//package MainKongregate_fla
Section 122
//Area_midddle_179 (MainKongregate_fla.Area_midddle_179) package MainKongregate_fla { import flash.display.*; public dynamic class Area_midddle_179 extends MovieClip { public var core:MovieClip; public function Area_midddle_179(){ addFrameScript(0, frame1); } function frame1(){ visible = false; } } }//package MainKongregate_fla
Section 123
//BGROUND_18 (MainKongregate_fla.BGROUND_18) package MainKongregate_fla { import flash.display.*; public dynamic class BGROUND_18 extends MovieClip { public var sky:MovieClip; public var bgC:MovieClip; public function BGROUND_18(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6); } function frame1(){ stop(); } function frame2(){ stop(); } function frame3(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame6(){ stop(); } } }//package MainKongregate_fla
Section 124
//btn_Essentials_Checkpoint_170 (MainKongregate_fla.btn_Essentials_Checkpoint_170) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Essentials_Checkpoint_170 extends MovieClip { public function btn_Essentials_Checkpoint_170(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 125
//btn_Essentials_Finish_171 (MainKongregate_fla.btn_Essentials_Finish_171) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Essentials_Finish_171 extends MovieClip { public function btn_Essentials_Finish_171(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 126
//btn_Essentials_Start_173 (MainKongregate_fla.btn_Essentials_Start_173) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Essentials_Start_173 extends MovieClip { public function btn_Essentials_Start_173(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 127
//btn_Hazard_BlockMagma_139 (MainKongregate_fla.btn_Hazard_BlockMagma_139) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_BlockMagma_139 extends MovieClip { public function btn_Hazard_BlockMagma_139(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 128
//btn_Hazard_FastFollower_140 (MainKongregate_fla.btn_Hazard_FastFollower_140) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_FastFollower_140 extends MovieClip { public function btn_Hazard_FastFollower_140(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 129
//btn_Hazard_HHitter_141 (MainKongregate_fla.btn_Hazard_HHitter_141) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_HHitter_141 extends MovieClip { public function btn_Hazard_HHitter_141(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 130
//btn_Hazard_HMagma_142 (MainKongregate_fla.btn_Hazard_HMagma_142) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_HMagma_142 extends MovieClip { public function btn_Hazard_HMagma_142(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 131
//btn_Hazard_SlowFollower_143 (MainKongregate_fla.btn_Hazard_SlowFollower_143) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_SlowFollower_143 extends MovieClip { public function btn_Hazard_SlowFollower_143(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 132
//btn_Hazard_VHitter_144 (MainKongregate_fla.btn_Hazard_VHitter_144) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_VHitter_144 extends MovieClip { public function btn_Hazard_VHitter_144(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 133
//btn_Hazard_VMagma_145 (MainKongregate_fla.btn_Hazard_VMagma_145) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Hazard_VMagma_145 extends MovieClip { public function btn_Hazard_VMagma_145(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 134
//btn_Loose_BBlock_146 (MainKongregate_fla.btn_Loose_BBlock_146) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_BBlock_146 extends MovieClip { public function btn_Loose_BBlock_146(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 135
//btn_Loose_BCircle_147 (MainKongregate_fla.btn_Loose_BCircle_147) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_BCircle_147 extends MovieClip { public function btn_Loose_BCircle_147(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 136
//btn_Loose_Block_148 (MainKongregate_fla.btn_Loose_Block_148) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_Block_148 extends MovieClip { public function btn_Loose_Block_148(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 137
//btn_Loose_Circle_149 (MainKongregate_fla.btn_Loose_Circle_149) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_Circle_149 extends MovieClip { public function btn_Loose_Circle_149(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 138
//btn_Loose_Column_150 (MainKongregate_fla.btn_Loose_Column_150) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_Column_150 extends MovieClip { public function btn_Loose_Column_150(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 139
//btn_Loose_PlatformA_151 (MainKongregate_fla.btn_Loose_PlatformA_151) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_PlatformA_151 extends MovieClip { public function btn_Loose_PlatformA_151(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 140
//btn_Loose_PlatformB_152 (MainKongregate_fla.btn_Loose_PlatformB_152) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_PlatformB_152 extends MovieClip { public function btn_Loose_PlatformB_152(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 141
//btn_Loose_PlatformC_153 (MainKongregate_fla.btn_Loose_PlatformC_153) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Loose_PlatformC_153 extends MovieClip { public function btn_Loose_PlatformC_153(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 142
//btn_Mechanism_Elevator_154 (MainKongregate_fla.btn_Mechanism_Elevator_154) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_Elevator_154 extends MovieClip { public function btn_Mechanism_Elevator_154(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 143
//btn_Mechanism_ForceColumnV_155 (MainKongregate_fla.btn_Mechanism_ForceColumnV_155) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_ForceColumnV_155 extends MovieClip { public function btn_Mechanism_ForceColumnV_155(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 144
//btn_Mechanism_Motor_156 (MainKongregate_fla.btn_Mechanism_Motor_156) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_Motor_156 extends MovieClip { public function btn_Mechanism_Motor_156(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 145
//btn_Mechanism_MotorCircleB_157 (MainKongregate_fla.btn_Mechanism_MotorCircleB_157) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_MotorCircleB_157 extends MovieClip { public function btn_Mechanism_MotorCircleB_157(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 146
//btn_Mechanism_MotorCircleBInv_158 (MainKongregate_fla.btn_Mechanism_MotorCircleBInv_158) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_MotorCircleBInv_158 extends MovieClip { public function btn_Mechanism_MotorCircleBInv_158(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 147
//btn_Mechanism_MotorCircleS_159 (MainKongregate_fla.btn_Mechanism_MotorCircleS_159) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_MotorCircleS_159 extends MovieClip { public function btn_Mechanism_MotorCircleS_159(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 148
//btn_Mechanism_MotorCircleSInv_160 (MainKongregate_fla.btn_Mechanism_MotorCircleSInv_160) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_MotorCircleSInv_160 extends MovieClip { public function btn_Mechanism_MotorCircleSInv_160(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 149
//btn_Mechanism_MotorInv_161 (MainKongregate_fla.btn_Mechanism_MotorInv_161) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Mechanism_MotorInv_161 extends MovieClip { public function btn_Mechanism_MotorInv_161(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 150
//btn_Misc_Bridge_162 (MainKongregate_fla.btn_Misc_Bridge_162) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_Bridge_162 extends MovieClip { public function btn_Misc_Bridge_162(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 151
//btn_Misc_DisappearingPlatform_163 (MainKongregate_fla.btn_Misc_DisappearingPlatform_163) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_DisappearingPlatform_163 extends MovieClip { public function btn_Misc_DisappearingPlatform_163(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 152
//btn_Misc_GravityInverterDown_164 (MainKongregate_fla.btn_Misc_GravityInverterDown_164) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_GravityInverterDown_164 extends MovieClip { public function btn_Misc_GravityInverterDown_164(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 153
//btn_Misc_GravityInverterLeft_168 (MainKongregate_fla.btn_Misc_GravityInverterLeft_168) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_GravityInverterLeft_168 extends MovieClip { public function btn_Misc_GravityInverterLeft_168(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package MainKongregate_fla
Section 154
//btn_Misc_GravityInverterRight_169 (MainKongregate_fla.btn_Misc_GravityInverterRight_169) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_GravityInverterRight_169 extends MovieClip { public function btn_Misc_GravityInverterRight_169(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 155
//btn_Misc_GravityInverterUp_167 (MainKongregate_fla.btn_Misc_GravityInverterUp_167) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_GravityInverterUp_167 extends MovieClip { public function btn_Misc_GravityInverterUp_167(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package MainKongregate_fla
Section 156
//btn_Misc_HangingPlank_165 (MainKongregate_fla.btn_Misc_HangingPlank_165) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_HangingPlank_165 extends MovieClip { public function btn_Misc_HangingPlank_165(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 157
//btn_Misc_Spring_166 (MainKongregate_fla.btn_Misc_Spring_166) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Misc_Spring_166 extends MovieClip { public function btn_Misc_Spring_166(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 158
//btn_Static_BCircle_124 (MainKongregate_fla.btn_Static_BCircle_124) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_BCircle_124 extends MovieClip { public function btn_Static_BCircle_124(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 159
//btn_Static_Block_125 (MainKongregate_fla.btn_Static_Block_125) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Block_125 extends MovieClip { public function btn_Static_Block_125(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 160
//btn_Static_Bridge_126 (MainKongregate_fla.btn_Static_Bridge_126) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Bridge_126 extends MovieClip { public function btn_Static_Bridge_126(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 161
//btn_Static_Cavity_138 (MainKongregate_fla.btn_Static_Cavity_138) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Cavity_138 extends MovieClip { public function btn_Static_Cavity_138(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 162
//btn_Static_Circle_127 (MainKongregate_fla.btn_Static_Circle_127) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Circle_127 extends MovieClip { public function btn_Static_Circle_127(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 163
//btn_Static_Column_128 (MainKongregate_fla.btn_Static_Column_128) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Column_128 extends MovieClip { public function btn_Static_Column_128(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 164
//btn_Static_Diagonal45_129 (MainKongregate_fla.btn_Static_Diagonal45_129) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Diagonal45_129 extends MovieClip { public function btn_Static_Diagonal45_129(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 165
//btn_Static_DiagonalA_130 (MainKongregate_fla.btn_Static_DiagonalA_130) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_DiagonalA_130 extends MovieClip { public function btn_Static_DiagonalA_130(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 166
//btn_Static_DiagonalB_131 (MainKongregate_fla.btn_Static_DiagonalB_131) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_DiagonalB_131 extends MovieClip { public function btn_Static_DiagonalB_131(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 167
//btn_Static_InvDiagonal45_132 (MainKongregate_fla.btn_Static_InvDiagonal45_132) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_InvDiagonal45_132 extends MovieClip { public function btn_Static_InvDiagonal45_132(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 168
//btn_Static_InvDiagonalA_133 (MainKongregate_fla.btn_Static_InvDiagonalA_133) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_InvDiagonalA_133 extends MovieClip { public function btn_Static_InvDiagonalA_133(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 169
//btn_Static_InvDiagonalB_134 (MainKongregate_fla.btn_Static_InvDiagonalB_134) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_InvDiagonalB_134 extends MovieClip { public function btn_Static_InvDiagonalB_134(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 170
//btn_Static_Platform_135 (MainKongregate_fla.btn_Static_Platform_135) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_Platform_135 extends MovieClip { public function btn_Static_Platform_135(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 171
//btn_Static_SmallBlock_136 (MainKongregate_fla.btn_Static_SmallBlock_136) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_SmallBlock_136 extends MovieClip { public function btn_Static_SmallBlock_136(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 172
//btn_Static_VBCircle_137 (MainKongregate_fla.btn_Static_VBCircle_137) package MainKongregate_fla { import flash.display.*; public dynamic class btn_Static_VBCircle_137 extends MovieClip { public function btn_Static_VBCircle_137(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 173
//Categories_77 (MainKongregate_fla.Categories_77) package MainKongregate_fla { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.utils.*; import Vanilla.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.net.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.system.*; import flash.ui.*; import flash.xml.*; public dynamic class Categories_77 extends MovieClip { public var btn_level33:SimpleButton; public var ttime_tame:TextField; public var txt_time_12:TextField; public var txt_time_13:TextField; public var txt_time_15:TextField; public var txt_time_16:TextField; public var txt_time_17:TextField; public var txt_time_18:TextField; public var txt_time_19:TextField; public var txt_time_14:TextField; public var txt_time_10:TextField; public var btn_level34:SimpleButton; public var txt_time_11:TextField; public var txt_time_2:TextField; public var txt_time_3:TextField; public var txt_time_4:TextField; public var btn_level27:SimpleButton; public var btn_level30:SimpleButton; public var txt_time_20:TextField; public var btn_level32:SimpleButton; public var txt_time_22:TextField; public var txt_time_23:TextField; public var txt_time_24:TextField; public var txt_time_25:TextField; public var txt_time_26:TextField; public var txt_time_27:TextField; public var txt_time_28:TextField; public var txt_time_29:TextField; public var btn_level35:SimpleButton; public var txt_time_21:TextField; public var submit_supreme:SimpleButton; public var curtain1:MovieClip; public var btn_level21:SimpleButton; public var btn_level25:SimpleButton; public var Sum:Number; public var txt_time_30:TextField; public var txt_time_31:TextField; public var txt_time_32:TextField; public var txt_time_33:TextField; public var txt_time_34:TextField; public var ttime_supreme:TextField; public var btn_level1:SimpleButton; public var btn_level2:SimpleButton; public var btn_level3:SimpleButton; public var btn_level4:SimpleButton; public var btn_level5:SimpleButton; public var btn_level6:SimpleButton; public var btn_level7:SimpleButton; public var btn_level8:SimpleButton; public var btn_level9:SimpleButton; public var ttime_mighty:TextField; public var owi:int; public var submit_tame:SimpleButton; public var btn_level10:SimpleButton; public var btn_level11:SimpleButton; public var btn_level13:SimpleButton; public var btn_level15:SimpleButton; public var btn_level16:SimpleButton; public var btn_level17:SimpleButton; public var btn_level18:SimpleButton; public var btn_level12:SimpleButton; public var ttime_skillful:TextField; public var btn_level14:SimpleButton; public var submit_mighty:SimpleButton; public var submit_skillful:SimpleButton; public var btn_level19:SimpleButton; public var btn_level20:SimpleButton; public var btn_level22:SimpleButton; public var btn_level24:SimpleButton; public var btn_level26:SimpleButton; public var btn_level28:SimpleButton; public var btn_level29:SimpleButton; public var btn_level23:SimpleButton; public var curtain3:MovieClip; public var txt_time_5:TextField; public var txt_time_6:TextField; public var txt_time_7:TextField; public var txt_time_8:TextField; public var txt_time_9:TextField; public var curtain2:MovieClip; public var txt_time_1:TextField; public var btn_level31:SimpleButton; public function Categories_77(){ addFrameScript(0, frame1); } public function live(_arg1:Event):void{ if (parent.mouseX < 240){ if (x < 0){ x = (x - ((parent.mouseX - 320) / 10)); }; } else { if (parent.mouseX > 400){ if (x > -740){ x = (x - ((parent.mouseX - 320) / 10)); }; }; }; } function frame1(){ owi = 0; owi = 1; while (owi < 100) { if (VAULT.Opens[owi]){ if (this.hasOwnProperty(("btn_level" + owi))){ this[("btn_level" + owi)].alpha = 0; }; }; owi++; }; owi = 1; while (owi < 36) { if (VAULT.Times[owi]){ this[("txt_time_" + owi)].text = VAULT.Times[owi]; }; owi++; }; if (VAULT.Opens[8] == 1){ curtain1.visible = false; }; if (VAULT.Opens[17] == 1){ curtain2.visible = false; }; if (VAULT.Opens[30] == 1){ curtain3.visible = false; }; this.addEventListener(Event.ENTER_FRAME, live); Sum = 0; if (VAULT.Times[1]){ if (VAULT.Times[2]){ if (VAULT.Times[3]){ if (VAULT.Times[4]){ if (VAULT.Times[5]){ if (VAULT.Times[6]){ if (VAULT.Times[7]){ owi = 1; while (owi < 8) { Sum = (Sum + VAULT.Times[owi]); owi++; }; ttime_tame.text = String(Sum); }; }; }; }; }; }; }; Sum = 0; if (VAULT.Times[8]){ if (VAULT.Times[9]){ if (VAULT.Times[10]){ if (VAULT.Times[11]){ if (VAULT.Times[12]){ if (VAULT.Times[13]){ if (VAULT.Times[14]){ if (VAULT.Times[15]){ if (VAULT.Times[16]){ owi = 8; while (owi < 17) { Sum = (Sum + VAULT.Times[owi]); owi++; }; ttime_skillful.text = String(Sum); }; }; }; }; }; }; }; }; }; Sum = 0; if (VAULT.Times[17]){ if (VAULT.Times[18]){ if (VAULT.Times[19]){ if (VAULT.Times[21]){ if (VAULT.Times[22]){ if (VAULT.Times[23]){ if (VAULT.Times[24]){ if (VAULT.Times[25]){ if (VAULT.Times[26]){ if (VAULT.Times[27]){ if (VAULT.Times[28]){ if (VAULT.Times[29]){ owi = 17; while (owi < 30) { Sum = (Sum + VAULT.Times[owi]); owi++; }; ttime_mighty.text = String(Sum); }; }; }; }; }; }; }; }; }; }; }; }; Sum = 0; if (VAULT.Times[30]){ if (VAULT.Times[31]){ if (VAULT.Times[32]){ if (VAULT.Times[33]){ if (VAULT.Times[34]){ if (VAULT.Times[35]){ owi = 30; while (owi < 36) { Sum = (Sum + VAULT.Times[owi]); owi++; }; ttime_supreme.text = String(Sum); }; }; }; }; }; }; } } }//package MainKongregate_fla
Section 174
//espiral_118 (MainKongregate_fla.espiral_118) package MainKongregate_fla { import flash.display.*; public dynamic class espiral_118 extends MovieClip { public function espiral_118(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame1(){ stop(); } function frame2(){ stop(); } function frame3(){ stop(); } function frame4(){ stop(); } } }//package MainKongregate_fla
Section 175
//handle_175 (MainKongregate_fla.handle_175) package MainKongregate_fla { import flash.display.*; public dynamic class handle_175 extends MovieClip { public function handle_175(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package MainKongregate_fla
Section 176
//MusicPlayer_12 (MainKongregate_fla.MusicPlayer_12) package MainKongregate_fla { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; public dynamic class MusicPlayer_12 extends MovieClip { public var txt_song:TextField; public var sPausado:Boolean; public var mp_next:SimpleButton; public var song:Sound; public var SongNo:Number; public var pausadoPos:Number; public var mp_off:SimpleButton; public var appear:Boolean; public var mc:SoundChannel; public var mp_pause:SimpleButton; public function MusicPlayer_12(){ addFrameScript(0, frame1); } public function soundCompleteHandler(_arg1:Event):void{ playNext(); } public function playNext():void{ mc.stop(); if (SongNo == 1){ song = new SNG_BlueJazz(); SongNo = 2; txt_song.text = "Blue Jazz - Evil Genius"; } else { if (SongNo == 2){ song = new SNG_TooClose(); SongNo = 3; txt_song.text = "Too Close to See - blacKISS"; } else { if (SongNo == 3){ song = new SNG_Waves(); SongNo = 4; txt_song.text = "Waves[..] - Antony Raijekov"; } else { if (SongNo == 4){ song = new SNG_Obsession(); SongNo = 1; txt_song.text = "Obsession - blacKISS"; }; }; }; }; mc = song.play(); mc.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); } public function mpOFF(_arg1:MouseEvent):void{ mc.stop(); } public function mpPAUSE(_arg1:MouseEvent):void{ if (sPausado){ if (SongNo == 1){ song = new SNG_Obsession(); }; if (SongNo == 2){ song = new SNG_BlueJazz(); }; if (SongNo == 3){ song = new SNG_TooClose(); }; if (SongNo == 4){ song = new SNG_Waves(); }; mc = song.play(pausadoPos); sPausado = false; } else { pausadoPos = mc.position; mc.stop(); sPausado = true; }; } public function mpPLAY(_arg1:MouseEvent):void{ playNext(); } function frame1(){ mc = new SoundChannel(); SongNo = 1; appear = false; mp_next.addEventListener(MouseEvent.CLICK, mpPLAY); mp_off.addEventListener(MouseEvent.CLICK, mpOFF); mp_pause.addEventListener(MouseEvent.CLICK, mpPAUSE); playNext(); sPausado = false; pausadoPos = 0; } } }//package MainKongregate_fla
Section 177
//Telon_16 (MainKongregate_fla.Telon_16) package MainKongregate_fla { import flash.display.*; public dynamic class Telon_16 extends MovieClip { public function Telon_16(){ addFrameScript(1, frame2); } function frame2(){ if (alpha > 0){ alpha = (alpha - 0.05); } else { y = (y - 640); }; } } }//package MainKongregate_fla
Section 178
//title_anim_5 (MainKongregate_fla.title_anim_5) package MainKongregate_fla { import flash.display.*; public dynamic class title_anim_5 extends MovieClip { public var btn_LEARN:SimpleButton; public var btn_EXTRAS:SimpleButton; public var btn_SALUTE:SimpleButton; public var ibtn_LoadLevel:SimpleButton; public var btn_PLAY:SimpleButton; public var btn_CREATE:SimpleButton; public function title_anim_5(){ addFrameScript(0x0100, frame257); } function frame257(){ stop(); } } }//package MainKongregate_fla
Section 179
//WinWin_ani_14 (MainKongregate_fla.WinWin_ani_14) package MainKongregate_fla { import flash.display.*; public dynamic class WinWin_ani_14 extends MovieClip { public function WinWin_ani_14(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package MainKongregate_fla
Section 180
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; import flash.utils.*; public class MochiAd { public static function getVersion():String{ return ("3.0 as3"); } public static function showClickAwayAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; var sendHostProgress:Boolean; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var clip:Object; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; var depth:Number = options.depth; delete options.depth; var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array = _arg2.split("."); var _local4:Number = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local7:Number = ((100 * _local6) / _local5); var _local8:Number = ((100 * _local3) / chk.ad_msec); var _local9:Object = this._mochiad_bar._inside; var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 181
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function reencode():void{ var _local1:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function set value(_arg1:Number):void{ setValue(_arg1); } public function toString():String{ var _local1:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 182
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; var _local2:Object = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 183
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; import flash.utils.*; import flash.geom.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local4:int; var _local14:Loader; var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var _local6:Array = [0, 64, 0, 0, 0]; var _local7:MovieClip = new MovieClip(); var _local8:LocalConnection = new LocalConnection(); var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); var _local10:ByteArray = new ByteArray(); var _local11:ByteArray = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); var _local12:uint = ((_local3.length + _local11.length) + 4); var _local13:uint = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); var _local2:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.0"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(_arg1:Object):Object{ var _local4:Array; var _local5:Number; var _local6:Array; var _local2:Object = {}; var _local3:String = _arg1.loaderInfo.parameters.mochiad_options; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = this.client._callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; trace("connected!"); _connecting = false; _connected = true; while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var id = _arg1; var clip = _arg2; var clipname:String = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); var f:Function = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); var req:URLRequest = new URLRequest(_servicesURL); var vars:URLVariables = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; if (widget){ vars.widget = true; }; req.data = vars; listen(); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 184
//F_LBrick (Vanilla.Features.F_LBrick) package Vanilla.Features { import Box2D.Dynamics.*; import flash.display.*; import Box2D.Collision.Shapes.*; import Vanilla.*; import Box2D.Collision.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; import Box2D.Common.Math.*; public class F_LBrick extends MovieClip { private var body:b2Body; private var bodyDef:b2BodyDef; public var boxDef:b2PolygonDef; public var core:ColoredBrick; public function F_LBrick(){ MGame.FQueue.push(this); } public function Init(_arg1:b2World, _arg2:Sprite):void{ var _local3:b2Body; visible = false; bodyDef = new b2BodyDef(); bodyDef.angle = ((rotation * Math.PI) / 180); trace(((("La rotacion es de: " + rotation) + " El angulo es de: ") + bodyDef.angle)); bodyDef.position.Set((x / 30), (y / 30)); boxDef = new b2PolygonDef(); boxDef.SetAsBox(((core.width * scaleX) / 60), ((core.height * scaleY) / 60)); bodyDef.userData = new ColoredBrick(); bodyDef.userData.width = ((((core.width * scaleX) / 60) * 2) * 30); bodyDef.userData.height = ((((core.height * scaleY) / 60) * 2) * 30); _arg2.addChild(bodyDef.userData); boxDef.density = 14; boxDef.friction = 0.1; boxDef.restitution = 0; body = _arg1.CreateDynamicBody(bodyDef); body.CreateShape(boxDef); body.SetMassFromShapes(); _local3 = body; } } }//package Vanilla.Features
Section 185
//F_LColumn (Vanilla.Features.F_LColumn) package Vanilla.Features { import Box2D.Dynamics.*; import flash.display.*; import Box2D.Collision.Shapes.*; import Vanilla.*; import Box2D.Collision.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Common.*; import Box2D.Common.Math.*; public class F_LColumn extends MovieClip { private var body:b2Body; private var bodyDef:b2BodyDef; public var boxDef:b2PolygonDef; public var core:ColoredColumn; public function F_LColumn(){ MGame.FQueue.push(this); } public function Init(_arg1:b2World, _arg2:Sprite):void{ var _local3:b2Body; visible = false; bodyDef = new b2BodyDef(); bodyDef.angle = ((rotation * Math.PI) / 180); trace(((("La rotacion es de: " + rotation) + " El angulo es de: ") + bodyDef.angle)); bodyDef.position.Set((x / 30), (y / 30)); boxDef = new b2PolygonDef(); boxDef.SetAsBox((((core.width * scaleX) - 5) / 60), ((core.height * scaleY) / 60)); bodyDef.userData = new ColoredColumn(); bodyDef.userData.width = ((((core.width * scaleX) / 60) * 2) * 30); bodyDef.userData.height = ((((core.height * scaleY) / 60) * 2) * 30); _arg2.addChild(bodyDef.userData); boxDef.density = 15; boxDef.friction = 0.1; boxDef.restitution = 0; body = _arg1.CreateDynamicBody(bodyDef); body.CreateShape(boxDef); body.SetMassFromShapes(); _local3 = body; } } }//package Vanilla.Features
Section 186
//F_PinABox (Vanilla.Features.F_PinABox) package Vanilla.Features { import flash.display.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; import Vanilla.*; public class F_PinABox extends MovieClip { private var m_world:b2World; public var boxDef:b2PolygonDef; private var bodyDef:b2BodyDef; private var p_jointDef:b2PrismaticJointDef; public var area:MovieClip; private var union:b2Joint; public var core:Gdt_Mechanism_Elevator; private var body:b2Body; public var coolOff:int;// = 0 private var bodyResorte:b2Body; private var prevGrav:Boolean;// = true public function F_PinABox(){ MGame.FQueue.push(this); MGame.ActionQueue.push(this); MGame.TickQueue.push(this); } public function tick(){ if (prevGrav != MGame.gravInv){ if (MGame.gravInv){ area.y = 8; m_world.DestroyJoint(union); p_jointDef.lowerTranslation = 0; p_jointDef.upperTranslation = 10; bodyResorte.m_userData.core.gotoAndStop(2); union = m_world.CreateJoint(p_jointDef); } else { area.y = -37; m_world.DestroyJoint(union); p_jointDef.lowerTranslation = -10; p_jointDef.upperTranslation = 0; bodyResorte.m_userData.core.gotoAndStop(1); union = m_world.CreateJoint(p_jointDef); }; }; prevGrav = MGame.gravInv; if (coolOff > 0){ coolOff--; }; } public function Init(_arg1:b2World, _arg2:Sprite):void{ var _local3:b2Body; m_world = _arg1; visible = false; bodyDef = new b2BodyDef(); bodyDef.position.Set((x / 30), ((y / 30) + 0)); bodyDef.angle = ((rotation * Math.PI) / 180); bodyDef.allowSleep = false; boxDef = new b2PolygonDef(); boxDef.SetAsBox(((core.width * scaleX) / 62), ((core.height * scaleY) / 60)); boxDef.density = 20; boxDef.friction = 1; boxDef.restitution = 0; bodyDef.userData = new W1_Impulsador(); bodyDef.userData.width = ((((core.width * scaleX) / 60) * 2) * 30); bodyDef.userData.height = ((((core.height * scaleY) / 60) * 2) * 30); body = m_world.CreateDynamicBody(bodyDef); body.CreateShape(boxDef); body.SetMassFromShapes(); bodyResorte = body; _arg2.addChild(bodyDef.userData); bodyDef = new b2BodyDef(); bodyDef.position.Set((x / 30), (y / 30)); boxDef = new b2PolygonDef(); boxDef.SetAsBox(0.1, 0.1); boxDef.density = 0; boxDef.friction = 0; boxDef.restitution = 1; body = m_world.CreateStaticBody(bodyDef); _local3 = body; p_jointDef = new b2PrismaticJointDef(); p_jointDef.Initialize(_local3, bodyResorte, _local3.GetWorldCenter(), new b2Vec2(0, 1)); p_jointDef.lowerTranslation = -10; p_jointDef.upperTranslation = 0; p_jointDef.enableLimit = true; p_jointDef.maxMotorForce = 0; p_jointDef.motorSpeed = 0; p_jointDef.enableMotor = false; union = m_world.CreateJoint(p_jointDef); } public function action(_arg1:b2Body){ if (coolOff <= 0){ coolOff = 50; if (!MGame.gravInv){ bodyResorte.ApplyForce(new b2Vec2(0, -7500), bodyResorte.GetWorldCenter()); } else { bodyResorte.ApplyForce(new b2Vec2(0, 7500), bodyResorte.GetWorldCenter()); }; }; } } }//package Vanilla.Features
Section 187
//P_CheckPoint (Vanilla.Pieces.P_CheckPoint) package Vanilla.Pieces { import flash.display.*; import Box2D.Dynamics.*; import Vanilla.*; public class P_CheckPoint extends MovieClip { public var area:MovieClip; public var ON:Boolean;// = false public function P_CheckPoint(){ addFrameScript(0, frame1, 1, frame2); MGame.ActionQueue.push(this); } function frame1(){ stop(); } function frame2(){ stop(); } public function action(_arg1:b2Body){ ON = true; gotoAndStop(2); } } }//package Vanilla.Pieces
Section 188
//P_Gravity (Vanilla.Pieces.P_Gravity) package Vanilla.Pieces { import flash.display.*; public class P_Gravity extends MovieClip { public var tipo:String;// = "Up" } }//package Vanilla.Pieces
Section 189
//P_HBLaser (Vanilla.Pieces.P_HBLaser) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HBLaser extends MovieClip { public function P_HBLaser(){ MGame.RedQueue.push(this); MGame.TickQueue.push(this); } public function tick(){ rotation++; } } }//package Vanilla.Pieces
Section 190
//P_HFFollower (Vanilla.Pieces.P_HFFollower) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HFFollower extends MovieClip { public var follower:Number;// = 2 public function P_HFFollower(){ MGame.RedQueue.push(this); } } }//package Vanilla.Pieces
Section 191
//P_HFollower (Vanilla.Pieces.P_HFollower) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HFollower extends MovieClip { public var follower:Number;// = 0.9 public function P_HFollower(){ MGame.RedQueue.push(this); } } }//package Vanilla.Pieces
Section 192
//P_HHHitter (Vanilla.Pieces.P_HHHitter) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HHHitter extends MovieClip { var i:Number;// = 0 public function P_HHHitter(){ MGame.RedQueue.push(this); MGame.TickQueue.push(this); } public function tick(){ i = (i + 0.07); x = (x + MGame.sinus); } } }//package Vanilla.Pieces
Section 193
//P_HLaser (Vanilla.Pieces.P_HLaser) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HLaser extends MovieClip { public function P_HLaser(){ MGame.RedQueue.push(this); MGame.TickQueue.push(this); } public function tick(){ rotation++; } } }//package Vanilla.Pieces
Section 194
//P_HMBlock (Vanilla.Pieces.P_HMBlock) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HMBlock extends MovieClip { public function P_HMBlock(){ MGame.RedQueue.push(this); } } }//package Vanilla.Pieces
Section 195
//P_HMHBlock (Vanilla.Pieces.P_HMHBlock) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HMHBlock extends MovieClip { public function P_HMHBlock(){ MGame.RedQueue.push(this); } } }//package Vanilla.Pieces
Section 196
//P_HMVBlock (Vanilla.Pieces.P_HMVBlock) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HMVBlock extends MovieClip { public function P_HMVBlock(){ MGame.RedQueue.push(this); } } }//package Vanilla.Pieces
Section 197
//P_HVHitter (Vanilla.Pieces.P_HVHitter) package Vanilla.Pieces { import flash.display.*; import Vanilla.*; public class P_HVHitter extends MovieClip { private var i:Number;// = 0 public function P_HVHitter(){ MGame.RedQueue.push(this); MGame.TickQueue.push(this); } public function tick(){ i = (i + 0.07); y = (y + ((Math.sin(i) * 3) + 0.025)); } } }//package Vanilla.Pieces
Section 198
//P_invVField (Vanilla.Pieces.P_invVField) package Vanilla.Pieces { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Vanilla.*; public class P_invVField extends MovieClip { public var area:MovieClip; public function P_invVField(){ MGame.ActionQueue.push(this); } public function action(_arg1:b2Body){ _arg1.ApplyForce(new b2Vec2(0, 210), _arg1.GetWorldCenter()); } } }//package Vanilla.Pieces
Section 199
//P_VField (Vanilla.Pieces.P_VField) package Vanilla.Pieces { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Vanilla.*; public class P_VField extends MovieClip { public var area:MovieClip; public function P_VField(){ MGame.ActionQueue.push(this); } public function action(_arg1:b2Body){ _arg1.ApplyForce(new b2Vec2(0, -210), _arg1.GetWorldCenter()); } } }//package Vanilla.Pieces
Section 200
//EditorUI (Vanilla.EditorUI) package Vanilla { public class EditorUI { public static var gdtSel:String = "none"; public static var bgSel:String = "BG0"; public static var LEVEL_CODE:String = "AA-"; public static var lvlLoad:Boolean = false; public function EditorUI(){ gdtSel = "none"; } public static function GENERAR():void{ trace(Piece.pQueue); LEVEL_CODE = ""; var _local1:int; while (_local1 < Piece.pQueue.length) { LEVEL_CODE = (LEVEL_CODE + String(((((("," + int(Piece.pQueue[_local1].x)) + "-") + int(Piece.pQueue[_local1].y)) + "-") + Piece.pQueue[_local1].tipo))); _local1++; }; LEVEL_CODE = (LEVEL_CODE + String((",0-0-" + bgSel))); Piece.pQueue.splice(0, Piece.pQueue.length); trace(LEVEL_CODE); } } }//package Vanilla
Section 201
//Levels (Vanilla.Levels) package Vanilla { public class Levels { public static function LEVEL_27():void{ EditorUI.LEVEL_CODE = ",8-30-S2,68-30-S2,8-90-S2,8-150-S2,68-90-S2,68-150-S2,8-210-S2,68-210-S2,8-270-S2,68-270-S2,8-330-S2,30-367-S1,90-367-S1,150-367-S1,210-367-S1,270-367-S1,330-367-S1,390-367-S1,450-367-S1,488-345-S2,488-285-S2,488-225-S2,488-165-S2,488-105-S2,488-45-S2,105-7-S1,165-7-S1,225-7-S1,285-7-S1,345-7-S1,405-7-S1,465-7-S1,31-16-E1,104-337-M5,128-330-S2,128-270-S2,128-210-S2,128-150-S2,128-90-S2,450-67-S1,390-67-S1,330-67-S1,270-67-S1,210-67-S1,464-22-M8,195-35-H7,255-35-H7,330-35-H7,360-35-H7,390-35-H7,165-127-S1,225-127-S1,345-127-S1,405-127-S1,225-95-H7,300-95-H7,164-142-H8,203-187-S6,218-187-S6,233-187-S6,248-187-S6,248-172-S6,248-157-S6,248-142-S6,330-352-L7,450-187-S1,330-187-S1,440-165-H6,300-275-H7,330-275-H7,360-275-H7,209-337-M5,240-275-H7,365-165-H6,277-172-E3,285-127-S1,290-165-H6,284-157-M8,202-142-H1,218-142-S6,226-166-E2,0-0-BG0"; Main.level = 27; } public static function LEVEL_28():void{ EditorUI.LEVEL_CODE = ",645-112-S1,758-292-S6,533-292-S6,368-292-S6,923-292-S6,923-330-S2,758-330-S2,533-330-S2,368-330-S2,705-277-S1,585-277-S1,728-315-S2,563-315-S2,728-427-S6,563-427-S6,758-390-S2,923-390-S2,533-390-S2,368-390-S2,780-427-S1,728-465-S2,563-465-S2,728-502-S6,728-240-L1,563-240-L1,728-180-L1,563-180-L1,923-427-S6,923-465-S2,758-465-S2,787-367-K4,787-337-K4,368-427-S6,368-465-S2,533-465-S2,533-540-S2,923-502-S6,758-502-S6,533-502-S6,368-502-S6,368-540-S2,563-540-S2,728-540-S2,563-615-S2,728-615-S2,758-540-S2,923-540-S2,758-615-S2,923-615-S2,533-577-S6,563-577-S6,728-577-S6,758-577-S6,533-615-S2,923-577-S6,758-652-S6,923-652-S6,563-652-S6,533-652-S6,563-690-S2,758-690-S2,533-690-S2,368-690-S2,840-682-K1,368-652-S6,923-690-S2,728-727-S6,563-727-S6,533-727-S6,758-727-S6,923-727-S6,563-765-S2,728-765-S2,758-765-S2,923-765-S2,599-802-H8,758-802-S6,728-802-S6,563-802-S6,533-802-S6,923-802-S6,533-765-S2,368-765-S2,368-727-S6,368-802-S6,728-840-S2,563-840-S2,728-877-S6,563-877-S6,592-907-K4,697-907-K4,644-967-H8,713-967-S6,698-967-S6,683-967-S6,608-967-S6,593-967-S6,578-967-S6,539-967-H8,749-967-H8,503-967-S6,488-967-S6,473-967-S6,788-967-S6,803-967-S6,818-967-S6,758-840-S2,923-840-S2,758-877-S6,923-877-S6,893-967-S6,908-967-S6,923-967-S6,368-840-S2,368-877-S6,398-967-S6,278-967-S6,263-967-S6,248-967-S6,233-967-S6,218-967-S6,938-967-S6,953-967-S6,1013-967-S6,1028-967-S6,1043-967-S6,1058-967-S6,1073-967-S6,1223-967-S6,1223-952-S6,1223-915-S2,1223-840-S2,1223-765-S2,1223-727-S6,1223-802-S6,1223-877-S6,1185-727-S1,960-727-S1,1035-727-S1,1110-727-S1,1148-727-S6,1073-727-S6,998-727-S6,1101-877-K6,53-967-S6,53-952-S6,53-915-S2,53-840-S2,53-802-S6,53-877-S6,330-727-S1,255-727-S1,180-727-S1,105-727-S1,30-727-S1,38-802-S6,23-802-S6,8-802-S6,8-765-S2,68-727-S6,143-727-S6,218-727-S6,293-727-S6,186-877-K6,53-1005-S2,53-1080-S2,53-1155-S2,1223-1005-S2,1223-1080-S2,1245-1132-S1,1223-1117-S6,1223-1042-S6,1283-1132-S6,1320-1132-S1,1395-1132-S1,1433-1132-S6,1433-1192-S6,1433-1162-S6,1358-1132-S6,1358-1192-S6,1283-1192-S6,53-1192-S6,53-1117-S6,53-1042-S6,1395-1192-S1,1208-967-S6,1170-967-S1,855-967-S1,435-967-S1,383-967-S6,368-967-S6,353-967-S6,338-967-S6,90-967-S1,218-982-S6,128-967-S6,128-982-S6,218-997-S6,128-997-S6,1245-1192-S1,1320-1192-S1,825-1192-S1,765-1192-S1,705-1192-S1,645-1192-S1,585-1192-S1,405-1192-S1,225-1192-S1,165-1192-S1,105-1192-S1,68-1192-S6,697-1132-K4,765-1117-K1,855-1057-S1,915-1057-S1,975-1057-S1,1020-1042-L8,990-1027-L8,1185-1192-S1,1125-1192-S1,1065-1192-S1,1005-1192-S1,945-1192-S1,1184-1177-H8,1223-1177-S6,1124-1177-H8,1064-1177-H8,1004-1177-H8,944-1177-H8,908-1177-S6,908-1192-S6,863-1177-S6,863-1192-S6,893-1192-S6,878-1192-S6,893-1177-S6,878-1177-S6,1410-1175-H7,1410-1115-H7,1350-1115-H7,1350-1175-H7,1290-1115-H7,1290-1175-H7,893-1140-S2,878-1140-S2,960-1012-L8,465-1192-K1,487-1109-H9,442-1109-H9,630-1117-K1,547-1109-H9,502-1109-H9,548-1072-S6,503-1072-S6,488-1072-S6,443-1072-S6,525-1192-K1,285-1192-K1,345-1192-K1,847-907-K4,847-847-K4,847-787-K4,1109-967-H8,758-157-S6,758-202-S6,533-202-S6,533-157-S6,494-292-M8,389-832-M5,397-907-K4,397-862-K4,510-427-S1,450-427-S1,390-577-S1,450-577-S1,368-615-S2,465-605-H7,435-395-H7,840-532-K1,450-271-S8,840-271-S8,172-1102-S5,397-247-E3,892-247-E3,847-277-E3,832-277-E3,442-277-E3,457-277-E3,563-390-S2,563-352-S6,563-502-S6,600-592-K1,659-592-H8,705-352-S1,645-352-S1,728-390-S2,728-690-S2,705-652-S1,645-652-S1,660-802-S1,37-772-E3,127-1057-E3,112-1087-E3,112-1117-E3,127-1147-E3,217-1147-E3,232-1117-E3,232-1087-E3,217-1057-E3,187-1042-E3,157-1042-E3,187-1162-E3,157-1162-E3,532-1072-E3,517-1072-E3,457-1072-E3,472-1072-E3,922-1147-E3,937-817-E3,937-802-E3,645-16-S8,728-37-S6,563-37-S6,563-52-S6,728-52-S6,728-90-S2,563-90-S2,982-952-K4,646-91-E1,1411-1171-E2,307-997-K4,307-952-K4,960-1177-L8"; Main.level = 28; } public static function LEVEL_29():void{ EditorUI.LEVEL_CODE = ",46-91-E1,45-112-S1,105-112-S1,165-112-S1,225-112-S1,285-112-S1,90-35-H7,150-35-H7,210-35-H7,270-35-H7,345-112-K1,54-24-H4,39-9-H4,596-326-S9,551-371-S9,506-416-S9,461-461-S9,416-506-S9,371-551-S9,326-596-S9,281-641-S9,206-851-S12,296-941-S12,341-986-S12,386-1031-S12,431-1076-S12,476-1121-S12,540-1192-S1,600-1192-S1,660-1192-S1,720-1192-S1,503-1192-S6,503-1177-S6,503-1162-S6,780-1192-S1,840-1192-S1,900-1192-S1,960-1192-S1,1020-1192-S1,1080-1192-S1,1140-1192-S1,1200-1192-S1,1238-1192-S6,1238-1177-S6,1238-1162-S6,1199-1162-H8,1139-1162-H8,1079-1162-H8,1019-1162-H8,959-1162-H8,899-1162-H8,839-1162-H8,779-1162-H8,719-1162-H8,659-1162-H8,518-1178-K9,548-1178-K9,578-1178-K9,608-1178-K9,638-1178-K9,668-1178-K9,698-1178-K9,728-1178-K9,758-1178-K9,788-1178-K9,818-1178-K9,848-1178-K9,878-1178-K9,908-1178-K9,938-1178-K9,968-1178-K9,998-1178-K9,1028-1178-K9,1058-1178-K9,1088-1178-K9,1118-1178-K9,1148-1178-K9,1178-1178-K9,1208-1178-K9,1275-1162-S1,1276-1141-E2,725-1140-H6,860-1125-H6,960-1145-H7,1080-1100-H7,697-1102-K4,832-1102-K4,641-281-S9,686-236-S9,682-217-H1,667-232-H1,652-247-H1,637-262-H1,622-277-H1,607-292-H1,592-307-H1,577-322-H1,562-337-H1,547-352-H1,532-367-H1,517-382-H1,502-397-H1,487-412-H1,472-427-H1,457-442-H1,442-457-H1,427-472-H1,412-487-H1,397-502-H1,382-517-H1,367-532-H1,352-547-H1,337-562-H1,322-577-H1,307-592-H1,292-607-H1,277-622-H1,262-637-H1,202-817-H1,217-832-H1,232-847-H1,247-862-H1,262-877-H1,277-892-H1,292-907-H1,307-922-H1,322-937-H1,337-952-H1,352-967-H1,367-982-H1,382-997-H1,397-1012-H1,412-1027-H1,427-1042-H1,442-1057-H1,457-1072-H1,472-1087-H1,487-1102-H1,502-1117-H1,251-896-S12,735-217-S1,758-203-K10,743-203-K10,728-203-K10,713-203-K10,773-217-S6,773-202-S6,773-187-S6,810-187-S1,870-187-S1,930-187-S1,990-187-S1,734-187-H8,765-172-L8,8-780-S2,23-788-K9,38-788-K9,53-788-K9,68-788-K9,83-788-K9,98-788-K9,113-788-K9,128-788-K9,143-788-K9,158-788-K9,45-802-S1,105-802-S1,143-802-S6,158-802-S6,173-817-S6,44-772-H8,104-772-H8,142-772-H1,157-772-H1,172-787-H1,187-802-H1,8-720-S2,8-660-S2,8-600-S2,248-667-S6,233-667-S6,218-667-S6,203-667-S6,188-667-S6,173-667-S6,503-1147-S6,599-1162-H8,539-1162-H8,608-1110-S2,608-1050-S2,547-1102-K4,547-1042-K4,592-277-E3,487-382-E3,322-547-E3,277-862-E3,412-997-E3,502-1087-E3,0-0-BG4"; Main.level = 29; } public static function LEVEL_32():void{ EditorUI.LEVEL_CODE = ",240-337-S1,300-337-S1,308-323-L4,323-323-L4,338-323-L4,398-323-L4,413-323-L4,428-323-L4,473-323-L4,488-323-L4,503-323-L4,345-307-L8,435-307-L8,525-307-L8,681-337-K5,996-172-K5,1155-82-S1,1275-82-S1,1223-68-L4,1410-247-S1,1350-247-S1,1312-104-H9,1312-164-H9,1432-29-H9,1432-89-H9,1432-149-H9,1432-209-H9,1305-352-S1,1365-352-S1,1387-284-H9,1387-389-H9,1440-275-H7,1440-335-H7,1395-457-S1,1335-457-S1,1440-395-H7,1275-457-S1,1298-443-L4,1283-443-L4,1268-443-L4,1253-443-L4,1185-457-S1,1163-405-S2,1253-525-S2,1208-525-S2,188-322-S6,173-322-S6,181-301-E1,1109-352-H8,1049-352-H8,989-352-H8,929-352-H8,869-352-H8,1252-322-E3,360-337-S1,420-337-S1,480-337-S1,540-337-S1,382-322-E3,457-322-E3,562-322-E3,353-323-L4,368-323-L4,443-323-L4,518-323-L4,533-323-L4,548-323-L4,1020-307-K1,1238-68-L4,1282-67-E3,1207-67-E3,1253-68-L4,1268-68-L4,1298-68-L4,1193-68-L4,1275-52-L7,1215-52-L7,1312-322-E3,1192-427-E3,1072-787-K4,1027-787-K4,982-787-K4,937-787-K4,892-787-K4,847-787-K4,990-650-H7,930-650-H7,870-650-H7,181-346-E2,180-877-S1,240-877-S1,300-877-S1,360-877-S1,802-787-K4,757-787-K4,1176-682-K5,1215-82-S1,840-247-K1,1230-200-H7,1170-200-H7,1065-847-S1,1005-847-S1,945-847-S1,885-847-S1,825-847-S1,765-847-S1,1170-352-K1,1230-352-S1,1418-443-L4,1403-443-L4,1282-314-H9,1282-254-H9,652-847-S5,299-847-M5,307-802-E3,292-802-E3,307-682-E3,292-682-E3,307-562-E3,292-562-E3,307-367-E3,292-367-E3,134-322-H8,97-299-H9,97-239-H9,809-352-H8,749-352-H8,689-352-H8,629-352-H8,1260-95-H7,1200-95-H7,577-352-H1,592-352-H1,570-817-L8,487-847-S5,810-650-H7,750-650-H7,728-847-S6,713-847-S6,578-847-S6,563-847-S6,413-877-S6,398-877-S6,554-367-M8,510-380-H7,480-380-H7,450-380-H7,375-245-H7,405-245-H7,345-245-H7"; Main.level = 32; } public static function LEVEL_1():void{ EditorUI.LEVEL_CODE = ",181-106-E1,165-150-S7,195-150-S7,240-142-S1,285-150-S7,315-150-S7,360-142-S1,120-142-S1,75-150-S7,465-121-S8,555-150-S7,585-150-S7,630-142-S1,675-150-S7,705-150-S7,705-240-S7,735-240-S7,780-232-S1,900-232-S1,1020-232-S1,825-240-S7,855-240-S7,945-240-S7,975-240-S7,787-202-E3,907-202-E3,1027-202-E3,1065-240-S7,1095-240-S7,1170-300-S7,1200-300-S7,1290-271-S8,1380-300-S7,1410-300-S7,1291-226-E2,705-65-H7,0-0-BG0"; Main.level = 1; } public static function LEVEL_2():void{ EditorUI.LEVEL_CODE = ",285-322-S1,345-322-S1,450-301-S8,555-322-S1,615-322-S1,675-322-K1,735-322-S1,450-127-S1,390-127-S1,285-106-S8,180-127-S1,120-127-S1,780-232-S1,840-232-S1,98-142-S6,203-142-S6,368-142-S6,473-142-S6,368-337-S6,263-337-S6,533-337-S6,758-337-S6,585-217-K1,548-217-S6,623-217-S6,758-247-S6,286-61-E2,451-256-E1,292-292-E3,112-97-E3,802-202-E3,863-247-S6,0-0-BG1"; Main.level = 2; } public static function LEVEL_3():void{ EditorUI.LEVEL_CODE = ",90-195-S7,120-195-S7,150-195-S7,60-195-S7,60-240-S7,60-285-S7,60-330-S7,60-375-S7,60-420-S7,60-465-S7,90-465-S7,120-465-S7,150-465-S7,180-195-S7,210-195-S7,285-195-S7,315-195-S7,345-195-S7,375-195-S7,405-195-S7,435-195-S7,435-240-S7,435-285-S7,435-330-S7,435-375-S7,435-420-S7,435-465-S7,405-465-S7,375-465-S7,345-465-S7,465-465-S7,30-465-S7,480-510-S7,480-555-S7,480-600-S7,480-645-S7,15-510-S7,15-555-S7,15-600-S7,15-645-S7,15-690-S7,45-690-S7,75-690-S7,105-690-S7,135-690-S7,480-690-S7,450-690-S7,420-690-S7,390-690-S7,360-690-S7,436-646-E2,150-346-S8,345-256-S8,330-436-S8,233-367-S6,248-367-S6,263-367-S6,263-277-S6,248-277-S6,233-277-S6,248-457-S6,233-457-S6,218-457-S6,256-136-E1,172-652-K4,322-652-K4,308-712-S6,323-712-S6,338-712-S6,293-712-S6,158-712-S6,173-712-S6,188-712-S6,203-712-S6,82-322-H1,82-307-H1,412-217-H1,412-232-H1,412-412-H1,412-427-H1,37-652-H1,37-637-H1,203-562-S6,218-547-S6,233-532-S6,248-517-S6,263-532-S6,278-547-S6,293-562-S6,0-0-BG5"; Main.level = 3; } public static function LEVEL_4():void{ EditorUI.LEVEL_CODE = ",53-52-S6,38-67-S6,330-91-S8,331-31-E1,23-82-S6,23-120-S2,38-157-S6,53-172-S6,218-172-S6,233-187-S6,248-210-S2,413-210-S2,428-187-S6,443-172-S6,608-172-S6,623-157-S6,623-120-S2,623-82-S6,608-67-S6,593-52-S6,135-197-S15,330-257-S15,525-197-S15,510-31-S8,135-31-S8,97-157-E3,562-157-E3,331-196-E2,0-0-BG2"; Main.level = 4; } public static function LEVEL_5():void{ EditorUI.LEVEL_CODE = ",825-196-S8,720-217-S1,930-217-S1,990-217-S1,908-232-S6,1050-217-S1,1073-232-S6,743-232-S6,698-232-S6,826-151-E1,1140-247-K1,1215-337-K1,1215-157-S1,1193-172-S6,1275-157-S1,1215-52-S1,1193-67-S6,1238-67-S6,1298-172-S6,1335-157-K1,1395-157-S1,1373-172-S6,1418-172-S6,1216-16-E2,1417-127-E3,1192-127-E3,697-187-E3,1072-187-E3,1155-337-S1,1275-337-S1,1133-352-S6,1298-352-S6,915-391-S8,833-412-S6,998-412-S6,750-427-K1,600-391-S8,518-412-S6,683-412-S6,592-352-E3,892-352-E3,1297-307-E3,1065-427-K1,1020-140-H7,1275-80-H7,1265-300-H6,0-0-BG0"; Main.level = 5; } public static function LEVEL_6():void{ EditorUI.LEVEL_CODE = ",577-292-E3,577-307-E3,577-322-E3,577-352-E3,577-337-E3,592-352-E3,592-337-E3,592-322-E3,592-307-E3,592-292-E3,607-292-E3,607-307-E3,607-322-E3,607-337-E3,607-337-E3,607-352-E3,622-352-E3,622-337-E3,622-322-E3,622-307-E3,622-292-E3,637-292-E3,637-307-E3,637-322-E3,637-337-E3,637-352-E3,577-367-E3,592-367-E3,607-367-E3,622-367-E3,637-367-E3,652-367-E3,652-352-E3,652-322-E3,652-337-E3,652-307-E3,652-292-E3,667-292-E3,667-307-E3,667-322-E3,667-337-E3,667-352-E3,667-367-E3,562-367-E3,562-352-E3,562-337-E3,562-322-E3,562-322-E3,562-307-E3,562-292-E3,547-292-E3,547-307-E3,547-322-E3,547-337-E3,547-352-E3,547-367-E3,532-367-E3,532-352-E3,532-337-E3,532-322-E3,532-307-E3,532-292-E3,517-292-E3,517-307-E3,517-337-E3,517-322-E3,517-352-E3,517-367-E3,517-277-E3,517-262-E3,517-247-E3,517-232-E3,517-217-E3,517-202-E3,517-187-E3,517-172-E3,517-157-E3,532-157-E3,532-187-E3,532-172-E3,547-172-E3,547-157-E3,547-187-E3,547-202-E3,532-202-E3,532-217-E3,547-217-E3,532-217-E3,532-232-E3,547-232-E3,547-247-E3,532-247-E3,532-262-E3,532-277-E3,532-277-E3,547-277-E3,547-262-E3,562-277-E3,562-262-E3,562-247-E3,562-232-E3,562-217-E3,562-217-E3,562-202-E3,562-187-E3,562-172-E3,562-157-E3,562-157-E3,667-277-E3,652-277-E3,637-277-E3,622-277-E3,607-277-E3,577-277-E3,592-277-E3,577-262-E3,577-247-E3,577-232-E3,577-202-E3,577-217-E3,577-187-E3,577-172-E3,577-157-E3,667-187-E3,667-172-E3,667-157-E3,637-157-E3,637-172-E3,637-187-E3,652-187-E3,652-172-E3,652-157-E3,607-172-E3,622-157-E3,622-172-E3,607-187-E3,592-187-E3,592-172-E3,592-157-E3,607-157-E3,592-202-E3,607-202-E3,622-187-E3,622-202-E3,637-202-E3,652-202-E3,667-202-E3,667-262-E3,667-247-E3,667-232-E3,667-217-E3,637-217-E3,652-217-E3,652-232-E3,652-247-E3,637-262-E3,637-262-E3,637-262-E3,637-247-E3,637-247-E3,652-262-E3,622-262-E3,622-247-E3,622-232-E3,637-232-E3,622-217-E3,607-217-E3,592-217-E3,592-232-E3,607-232-E3,607-232-E3,607-247-E3,607-262-E3,592-262-E3,592-247-E3,601-106-E1,518-382-S6,533-382-S6,548-382-S6,563-382-S6,578-382-S6,593-382-S6,608-382-S6,623-382-S6,638-382-S6,653-382-S6,668-382-S6,465-382-S1,720-382-S1,457-322-K4,457-262-K4,457-202-K4,727-322-K4,727-262-K4,727-217-K4,571-106-E2,518-412-S6,533-412-S6,548-412-S6,548-412-S6,563-412-S6,578-412-S6,593-412-S6,608-412-S6,623-412-S6,638-412-S6,653-412-S6,668-412-S6,698-412-S6,743-412-S6,443-412-S6,458-412-S6,473-412-S6,488-412-S6,713-412-S6,728-412-S6,772-112-S4,397-112-S4,855-76-S8,315-76-S8,772-382-S4,412-382-S4,855-346-S8,330-346-S8,0-0-BG4\t"; Main.level = 6; } public static function LEVEL_12():void{ EditorUI.LEVEL_CODE = ",45-37-S1,23-75-S2,23-135-S2,23-195-S2,23-255-S2,90-97-S1,128-75-S2,128-37-S6,128-22-S6,128-7-S6,128-135-S2,128-195-S2,128-255-S2,23-315-S2,128-315-S2,23-375-S2,128-375-S2,23-435-S2,128-435-S2,23-495-S2,128-495-S2,23-555-S2,128-555-S2,60-157-S1,90-217-S1,60-277-S1,90-337-S1,60-397-S1,90-457-S1,60-517-S1,90-577-S1,23-615-S2,60-637-S1,98-637-S6,113-637-S6,128-637-S6,165-637-S1,157-577-K4,157-472-K4,157-367-K4,157-277-K4,157-187-K4,157-97-K4,188-600-S2,188-540-S2,188-480-S2,188-420-S2,188-360-S2,188-300-S2,188-240-S2,188-180-S2,188-120-S2,188-82-S6,210-67-S1,248-83-K9,263-83-K9,278-83-K9,293-83-K9,308-83-K9,269-67-H8,307-67-H1,285-97-S1,233-82-S6,233-97-S6,248-97-S6,341-116-S12,386-161-S12,431-206-S12,476-251-S12,521-296-S12,566-341-S12,611-386-S12,656-431-S12,701-476-S12,746-521-S12,791-566-S12,836-611-S12,1238-885-S2,1200-907-S1,1140-907-S1,1118-922-S6,1118-937-S6,1080-937-S1,1103-923-K10,1073-923-K10,1043-923-K10,323-937-S6,323-922-S6,300-907-S1,240-907-S1,226-886-E2,359-907-H8,419-907-H8,479-907-H8,539-907-H8,599-907-H8,659-907-H8,719-907-H8,779-907-H8,839-907-H8,899-907-H8,959-907-H8,1019-907-H8,1079-907-H8,937-892-H1,757-869-H9,502-869-H9,577-847-K4,832-847-K4,982-847-K4,337-97-H1,352-112-H1,367-127-H1,382-142-H1,397-157-H1,412-172-H1,427-187-H1,442-202-H1,457-217-H1,472-232-H1,487-247-H1,502-262-H1,517-277-H1,532-292-H1,547-307-H1,562-322-H1,577-337-H1,592-352-H1,607-367-H1,622-382-H1,637-397-H1,652-412-H1,667-427-H1,682-442-H1,697-457-H1,712-472-H1,727-487-H1,742-502-H1,757-517-H1,772-532-H1,787-547-H1,802-562-H1,817-577-H1,832-592-H1,847-607-H1,862-622-H1,517-247-E3,682-412-E3,862-592-E3,240-52-L8,106-16-E1,9-9-H4,219-9-H4,279-159-H4,354-264-H4,414-354-H4,474-459-H4,1020-937-S1,960-937-S1,900-937-S1,840-937-S1,780-937-S1,720-937-S1,660-937-S1,600-937-S1,540-937-S1,480-937-S1,420-937-S1,360-937-S1,1013-923-K10,983-923-K10,953-923-K10,923-923-K10,893-923-K10,863-923-K10,833-923-K10,803-923-K10,773-923-K10,743-923-K10,713-923-K10,683-923-K10,653-923-K10,623-923-K10,593-923-K10,563-923-K10,533-923-K10,503-923-K10,473-923-K10,443-923-K10,413-923-K10,383-923-K10,353-923-K10,0-0-BG0"; Main.level = 12; } public static function LEVEL_13():void{ EditorUI.LEVEL_CODE = ",97-127-S4,142-127-S4,187-127-S4,142-172-S4,187-172-S4,232-172-S4,187-217-S4,232-217-S4,277-217-S4,232-262-S4,277-262-S4,322-262-S4,292-307-S4,337-307-S4,382-307-S4,136-46-E1,413-308-S3,413-323-S3,428-308-S3,443-323-S3,443-323-S3,443-323-S3,458-308-S3,458-323-S3,488-308-S3,488-323-S3,503-308-S3,518-323-S3,533-323-S3,533-308-S3,563-323-S3,563-308-S3,578-308-S3,593-323-S3,608-323-S3,608-308-S3,623-293-S3,638-278-S3,623-308-S3,638-293-S3,638-308-S3,623-323-S3,638-323-S3,638-263-S3,638-248-S3,638-233-S3,638-218-S3,638-203-S3,638-188-S3,638-173-S3,638-158-S3,638-143-S3,638-128-S3,307-172-E3,232-97-E3,397-262-E3,638-113-S3,638-98-S3,638-83-S3,577-247-S5,586-166-E2,0-0-BG0"; Main.level = 13; } public static function LEVEL_14():void{ EditorUI.LEVEL_CODE = ",480-967-S1,540-967-S1,600-982-S1,563-930-L1,1080-936-S11,1140-921-S11,1200-906-S11,960-966-S11,1267-937-K7,1312-937-K7,1125-1147-S1,1005-1147-S1,945-1162-S1,908-1162-S6,998-1057-S6,998-1020-L1,1020-951-S11,1065-1147-K1,1372-1057-K8,1327-1057-K8,1282-1057-K8,1237-1057-K8,1192-1057-K8,855-1192-S1,795-1192-S1,735-1192-S1,675-1192-S1,833-1178-K10,818-1178-K10,803-1178-K10,788-1178-K10,773-1178-K10,758-1178-K10,743-1178-K10,728-1178-K10,713-1178-K10,698-1178-K10,683-1178-K10,668-1178-K10,653-1178-K10,893-1170-S2,848-1178-K10,863-1178-K10,878-1178-K10,615-1192-S1,555-1192-S1,518-1170-S2,480-1147-S1,466-1126-E2,638-1178-K10,623-1178-K10,608-1178-K10,593-1178-K10,578-1178-K10,563-1178-K10,548-1178-K10,533-1178-K10,510-945-L2,554-1147-H8,614-1147-H8,674-1147-H8,734-1147-H8,794-1147-H8,854-1147-H8,1238-907-S6,1416-990-S10,443-990-S2,443-1050-S2,443-1110-S2,466-946-E1,638-982-S6,675-967-S1,735-982-S1,773-982-S6,810-967-S1,870-982-S1,908-982-S6,923-982-S6,923-967-S6,637-967-H1,772-967-H1,907-967-H1,907-1147-H1,944-1147-H8,869-967-H8,734-967-H8,599-967-H8,698-930-L1,833-930-L1,0-0-BG0"; Main.level = 14; } public static function LEVEL_15():void{ EditorUI.LEVEL_CODE = ",261-127-K5,186-202-K6,232-157-E3,41-71-S9,86-71-S9,131-71-S9,106-16-E1,356-251-S12,401-251-S12,446-251-S12,391-196-E2,0-0-BG0"; Main.level = 15; } public static function LEVEL_16():void{ EditorUI.LEVEL_CODE = ",353-457-S6,353-457-S6,338-457-S6,323-442-S6,338-442-S6,353-442-S6,368-442-S6,338-427-S6,353-427-S6,435-421-S8,435-406-S8,518-442-S6,533-442-S6,533-427-S6,518-427-S6,503-442-S6,548-442-S6,518-457-S6,533-457-S6,683-442-S6,698-442-S6,713-442-S6,728-442-S6,698-457-S6,713-457-S6,698-427-S6,713-427-S6,795-421-S8,795-406-S8,878-442-S6,863-442-S6,893-442-S6,908-442-S6,893-427-S6,878-427-S6,878-457-S6,893-457-S6,45-487-K1,600-380-H7,630-380-H7,570-410-H7,600-410-H7,630-410-H7,660-410-H7,600-440-H7,630-440-H7,46-391-E1,960-365-H7,990-365-H7,930-395-H7,960-395-H7,990-395-H7,1020-395-H7,960-425-H7,990-425-H7,1043-442-S6,1058-442-S6,1073-442-S6,1088-442-S6,1058-427-S6,1073-427-S6,1073-457-S6,1058-457-S6,1155-421-S8,1155-406-S8,1238-427-S6,1253-427-S6,1268-442-S6,1238-442-S6,1238-442-S6,1253-442-S6,1238-457-S6,1238-457-S6,1223-442-S6,1223-442-S6,1253-457-S6,215-480-H6,245-480-H6,185-510-H6,215-510-H6,245-510-H6,275-510-H6,215-540-H6,245-540-H6,50-555-H6,80-555-H6,110-585-H6,80-585-H6,50-585-H6,20-585-H6,50-615-H6,80-615-H6,1028-592-S6,1013-592-S6,998-607-S6,1013-607-S6,1028-607-S6,1043-607-S6,1028-622-S6,1013-622-S6,1103-607-S6,1118-607-S6,1103-592-S6,1118-592-S6,1088-592-S6,1133-592-S6,1103-577-S6,1118-577-S6,953-592-S6,938-592-S6,938-607-S6,923-607-S6,923-592-S6,908-592-S6,938-577-S6,923-577-S6,863-607-S6,848-607-S6,833-607-S6,818-607-S6,848-622-S6,833-607-S6,833-622-S6,833-592-S6,848-592-S6,773-592-S6,758-592-S6,758-592-S6,743-592-S6,728-592-S6,743-577-S6,758-577-S6,743-607-S6,758-607-S6,668-622-S6,683-607-S6,668-607-S6,653-607-S6,653-622-S6,638-607-S6,653-592-S6,668-592-S6,578-607-S6,563-607-S6,593-592-S6,578-592-S6,563-592-S6,548-592-S6,563-577-S6,578-577-S6,1110-622-K1,1020-637-K1,930-622-K1,840-637-K1,750-622-K1,660-637-K1,570-622-K1,1252-847-S5,1402-532-S5,1342-712-S5,1244-787-M5,847-652-E3,667-652-E3,1027-652-E3,481-646-E2,1132-427-H1,1162-427-H1,1147-427-H1,1177-427-H1,1192-427-H1,1117-427-H1,412-427-H1,427-427-H1,442-427-H1,457-427-H1,472-427-H1,397-427-H1,0-0-BG0"; Main.level = 16; } public static function LEVEL_17():void{ EditorUI.LEVEL_CODE = ",645-112-S1,758-292-S6,923-292-S6,923-330-S2,758-330-S2,705-277-S1,585-277-S1,728-315-S2,563-315-S2,728-352-S6,563-352-S6,728-390-S2,563-390-S2,728-427-S6,563-427-S6,758-390-S2,923-390-S2,780-427-S1,728-465-S2,563-465-S2,585-502-S1,645-502-S1,728-502-S6,675-487-L8,728-240-L1,563-240-L1,728-180-L1,563-180-L1,728-105-S2,563-105-S2,728-67-S6,563-67-S6,645-46-S8,743-157-S6,743-187-S6,743-217-S6,548-217-S6,548-187-S6,548-157-S6,923-427-S6,923-465-S2,758-465-S2,787-367-K4,787-337-K4,832-277-E3,847-277-E3,923-502-S6,758-502-S6,563-540-S2,728-540-S2,563-615-S2,728-615-S2,758-540-S2,923-540-S2,758-615-S2,923-615-S2,563-577-S6,728-577-S6,758-577-S6,923-577-S6,728-652-S6,758-652-S6,923-652-S6,563-652-S6,713-652-S6,698-652-S6,644-652-H8,728-690-S2,563-690-S2,758-690-S2,840-682-K1,923-690-S2,728-727-S6,563-727-S6,758-727-S6,923-727-S6,563-765-S2,728-765-S2,758-765-S2,923-765-S2,599-802-H8,758-802-S6,728-802-S6,653-802-S6,668-802-S6,683-802-S6,563-802-S6,923-802-S6,728-840-S2,563-840-S2,728-877-S6,563-877-S6,592-907-K4,697-907-K4,644-967-H8,713-967-S6,698-967-S6,683-967-S6,608-967-S6,593-967-S6,578-967-S6,749-967-H8,788-967-S6,803-967-S6,818-967-S6,758-840-S2,923-840-S2,758-877-S6,923-877-S6,893-967-S6,908-967-S6,923-967-S6,938-967-S6,953-967-S6,968-967-S6,1013-967-S6,1223-967-S6,1223-952-S6,1223-915-S2,1223-765-S2,1223-727-S6,1223-802-S6,1223-877-S6,960-727-S1,1110-727-S1,1148-727-S6,1073-727-S6,998-727-S6,1101-877-K6,937-787-E3,937-802-E3,1208-967-S6,855-967-S1,646-91-E1,1186-766-E2,847-907-K4,847-847-K4,847-787-K4,1109-967-H8,638-802-S6,563-967-S6,563-952-S6,563-915-S2,840-271-S8,1169-967-H8,983-967-S6,998-967-S6,1028-727-S6,1028-727-S6,1043-727-S6,1058-727-S6,1013-727-S6,1163-727-S6,1178-727-S6,1193-727-S6,1208-727-S6,1223-862-S6,1223-832-S6,1223-817-S6,1223-847-S6,1050-967-S1,908-577-S6,893-577-S6,840-547-K1,0-0-BG0"; Main.level = 17; } public static function LEVEL_19():void{ EditorUI.LEVEL_CODE = ",735-546-S14,776-581-S12,825-621-S14,866-656-S12,915-696-S14,1005-757-S1,1065-757-S1,1036-721-E1,833-593-L4,908-653-L4,982-659-H9,982-599-H9,982-539-H9,982-479-H9,982-419-H9,982-359-H9,982-299-H9,945-757-S1,885-757-S1,825-757-S1,856-721-E2,1110-725-H7,1147-817-K4,1147-712-K4,1147-607-K4,667-532-K4,667-637-K4,667-757-K4,802-644-H9,802-704-H9,802-734-H9,1065-847-S1,960-826-S8,863-825-L1,863-862-S6,878-847-S6,803-862-S6,788-862-S6,705-841-S8,615-811-S8,623-862-S6,533-832-S6,1147-922-K4,742-502-L5,982-719-H9,0-0-BG0"; Main.level = 19; } public static function LEVEL_8():void{ EditorUI.LEVEL_CODE = ",38-75-S2,53-120-S2,38-135-S2,38-195-S2,38-255-S2,53-225-S2,38-315-S2,38-375-S2,53-345-S2,195-397-S1,255-397-S1,225-382-S1,195-367-S1,255-367-S1,225-322-S1,375-247-S1,435-247-S1,405-262-S1,375-277-S1,435-277-S1,405-292-S1,375-307-S1,435-307-S1,405-322-S1,375-337-S1,435-337-S1,405-352-S1,375-367-S1,435-367-S1,405-382-S1,375-397-S1,435-397-S1,540-397-S1,600-397-S1,570-382-S1,540-367-S1,600-367-S1,75-397-S1,135-397-S1,315-397-S1,638-375-S2,638-315-S2,638-255-S2,623-330-S2,578-435-S2,578-615-S2,563-465-S2,555-652-S1,495-652-S1,435-652-S1,98-435-S2,98-495-S2,98-555-S2,98-615-S2,113-465-S2,113-585-S2,120-652-S1,180-652-S1,240-652-S1,210-637-S1,180-622-S1,240-622-S1,398-652-S6,112-352-E3,346-766-E2,345-817-S1,300-832-S1,390-832-S1,105-382-K1,405-232-S1,375-217-S1,435-217-S1,405-202-S1,375-187-S1,435-187-S1,406-106-E1,562-337-E3,195-337-S1,255-337-S1,225-352-S1,195-307-S1,255-307-S1,217-547-E3,112-637-H1,127-637-H1,142-637-H1,292-382-H1,307-382-H1,322-382-H1,337-382-H1,578-495-L1,578-555-L1,563-585-S2,682-592-K4,697-592-K4,607-592-K4,607-592-K4,652-592-K4,652-592-K4,615-652-S1,675-652-S1,742-592-K4,727-592-K4,735-652-S1,210-607-L7,180-592-L7,240-592-L7,112-524-H9,255-607-L6,165-607-L6,697-247-K4,712-247-K4,667-517-E3,225-292-K1,465-637-K1,525-637-K1,608-375-S2,772-457-K4,802-457-K4,832-457-K4,802-457-K4,832-457-K4,772-457-K4,638-135-L1,638-75-L1,600-22-S1,600-22-S1,540-22-S1,570-7-S1,503-75-S2,503-135-S2,518-105-S2,38-37-S6,38-22-S6,38-7-S6,397-772-K4,292-772-K4,562-67-E3,547-112-K4,562-112-K4,638-195-S2,623-210-S2,592-112-K4,577-112-K4,292-772-K4,397-772-K4,398-637-S6,413-637-S6,428-637-S6,0-0-BG4"; Main.level = 8; } public static function LEVEL_9():void{ EditorUI.LEVEL_CODE = ",285-127-S1,315-142-S1,345-157-S1,375-172-S1,435-172-S1,495-172-S1,555-172-S1,525-187-S1,465-187-S1,405-187-S1,450-202-S1,510-202-S1,480-217-S1,585-7-S1,645-7-S1,705-7-S1,765-7-S1,735-22-S1,675-22-S1,615-22-S1,810-202-S1,870-202-S1,750-202-S1,750-202-S1,780-217-S1,840-217-S1,900-217-S1,720-217-S1,855-7-S1,915-7-S1,1005-22-S1,885-22-S1,301-46-E1,674-22-H8,644-7-H8,704-7-H8,809-202-H8,779-217-H8,839-217-H8,1238-7-S6,1238-37-S6,1238-67-S6,1238-97-S6,1238-127-S6,1238-157-S6,1238-187-S6,1238-217-S6,1200-217-S1,1140-217-S1,1080-217-S1,1274-217-H8,1334-217-H8,1394-217-H8,1454-217-H8,1094-7-H8,1154-7-H8,1199-7-H8,1027-52-E3,637-292-E3,644-652-M5,644-37-H8,704-37-H8,674-52-H8,614-22-H8,734-22-H8,764-7-H8,584-7-H8,779-187-H8,839-187-H8,809-172-H8,749-202-H8,869-202-H8,899-217-H8,719-217-H8,914-37-H8,944-52-H8,1004-22-H8,884-22-H8,854-7-H8,914-7-H8,974-37-H8,945-22-S1,944-22-H8,975-7-S1,975-7-S1,1035-7-S1,974-7-H8,1034-7-H8,1141-91-E2,802-7-H1,817-7-H1,517-7-H1,457-7-H1,397-7-H1,337-7-H1,277-7-H1,0-0-BG2"; Main.level = 9; } public static function LEVEL_30():void{ EditorUI.LEVEL_CODE = ",76-1186-E1,982-419-H9,982-359-H9,982-299-H9,86-1211-S9,180-1201-S8,345-1186-S8,465-1192-K1,457-1057-K4,9-954-H4,9-909-H4,7-937-H5,405-1005-S7,255-1005-S7,105-1005-S7,45-1192-K1,180-1012-K1,330-1012-K1,97-937-K4,97-937-K4,97-937-K4,150-877-S1,210-877-S1,270-877-S1,330-877-S1,390-877-S1,203-840-L1,233-840-L1,278-840-L1,308-840-L1,338-840-L1,540-877-K1,540-472-S1,435-547-S1,480-562-S1,375-547-S1,315-547-S1,300-525-L2,300-495-L2,337-487-K4,225-487-K1,120-487-K1,180-412-S1,240-412-S1,300-412-S1,360-412-S1,420-412-S1,480-412-S1,540-412-S1,600-412-S1,660-412-S1,720-412-S1,780-412-S1,840-412-S1,900-412-S1,982-464-H9,982-509-H9,982-569-H9,982-629-H9,982-689-H9,982-749-H9,982-824-H9,982-809-H9,592-854-H9,592-794-H9,592-734-H9,592-704-H9,592-659-H9,592-614-H9,592-554-H9,592-509-H9,592-449-H9,953-502-S6,908-532-S6,863-577-S6,833-607-S6,818-622-S6,773-652-S6,675-532-S1,735-652-K1,697-569-H9,697-629-H9,809-667-H8,869-667-H8,929-667-H8,959-667-H8,614-772-H8,674-772-H8,734-772-H8,794-772-H8,854-772-H8,870-710-H7,795-710-H7,630-757-S1,705-757-S1,780-757-S1,840-757-S1,900-757-S1,956-806-S9,911-851-S9,866-896-S9,821-971-S12,866-1016-S12,915-1041-S11,975-1011-S11,1065-997-K1,1140-967-K1,1215-937-K1,1290-892-K1,1260-682-K1,1125-652-K1,1050-577-K1,1170-532-K1,1290-502-K1,1215-292-K1,1095-247-K1,1035-187-K1,547-697-K4,547-697-K4,547-697-K4,757-502-K4,776-926-S12,1372-817-K4,1372-817-K4,1342-727-K4,1297-337-K4,1297-337-K4,1036-106-E2,0-0-BG0"; Main.level = 30; } public static function LEVEL_31():void{ EditorUI.LEVEL_CODE = ",261-127-K5,41-71-S9,86-71-S9,131-71-S9,106-16-E1,396-232-K5,141-217-K6,231-307-K5,202-232-E3,202-157-E3,337-202-E3,322-112-E3,506-326-S12,551-326-S12,596-326-S12,541-271-E2,0-0-BG0"; Main.level = 31; } public static function LEVEL_18():void{ EditorUI.LEVEL_CODE = ",360-182-S15,367-97-S5,90-172-S1,60-202-S1,30-262-S1,60-307-S1,90-367-S1,135-412-S1,195-412-S1,255-412-S1,300-367-S1,330-307-S1,202-277-S5,376-16-E1,292-307-K4,247-352-K4,322-247-K4,360-262-S1,195-151-S8,196-166-E2,0-0-BG0"; Main.level = 18; } public static function LEVEL_11():void{ EditorUI.LEVEL_CODE = ",15-435-S7,120-435-S7,113-480-S2,23-480-S2,23-570-S2,113-570-S2,23-660-S2,113-660-S2,23-750-S2,113-750-S2,15-525-S7,15-615-S7,120-525-S7,15-705-S7,120-705-S7,120-615-S7,23-840-S2,15-795-S7,113-787-S6,23-877-S6,60-877-S1,150-877-S1,240-877-S1,330-877-S1,180-787-S1,270-787-S1,23-922-S6,38-937-S6,53-952-S6,53-967-S6,53-982-S6,68-937-S6,83-922-S6,113-922-S6,128-922-S6,98-937-S6,98-952-S6,98-967-S6,113-982-S6,128-982-S6,143-967-S6,143-952-S6,143-937-S6,173-922-S6,173-937-S6,173-952-S6,173-967-S6,188-982-S6,203-982-S6,218-967-S6,218-952-S6,218-937-S6,218-922-S6,248-922-S6,248-937-S6,248-952-S6,248-967-S6,248-982-S6,263-952-S6,278-952-S6,293-922-S6,293-937-S6,293-952-S6,293-967-S6,293-982-S6,323-967-S6,323-982-S6,323-952-S6,323-922-S6,323-937-S6,338-922-S6,353-922-S6,368-922-S6,368-937-S6,368-952-S6,368-967-S6,368-982-S6,353-967-S6,338-967-S6,105-885-S7,195-885-S7,285-885-S7,135-780-S7,225-780-S7,315-780-S7,398-982-S6,428-982-S6,458-982-S6,375-885-S7,360-787-S1,420-877-S1,510-877-S1,450-787-S1,540-787-S1,600-877-S1,578-787-S6,638-877-S6,578-750-S2,638-840-S2,638-802-S6,578-712-S6,615-712-S1,675-802-S1,765-802-S1,705-712-S1,795-712-S1,720-810-S7,803-802-S6,660-705-S7,750-705-S7,840-705-S7,863-712-S6,803-840-S2,863-750-S2,863-787-S6,803-877-S6,900-787-S1,840-877-S1,930-877-S1,990-787-S1,1028-787-S6,968-877-S6,1028-825-S2,968-915-S2,968-952-S6,1028-862-S6,1065-862-S1,1005-952-S1,1065-952-S1,1065-952-S1,1125-862-S1,1125-952-S1,1163-952-S6,1215-862-S1,1253-862-S6,1170-855-S7,945-780-S7,1253-900-S2,1163-990-S2,1253-937-S6,1163-1027-S6,1200-1027-S1,1290-937-S1,1335-930-S7,1290-1027-S1,1335-1035-S7,1245-1035-S7,1343-907-S6,1380-1027-S1,1418-1027-S6,1418-990-S2,1343-870-S2,1418-900-S2,1343-780-S2,1418-810-S2,1418-720-S2,1343-690-S2,1418-630-S2,1418-540-S2,1418-450-S2,1418-360-S2,1418-270-S2,1418-180-S2,1418-90-S2,1418-52-S6,1350-52-S1,1260-52-S1,1170-52-S1,1343-652-S6,1305-652-S1,1215-652-S1,1125-652-S1,1035-652-S1,945-652-S1,855-652-S1,765-652-S1,675-652-S1,585-652-S1,495-652-S1,405-652-S1,315-652-S1,225-652-S1,203-637-S6,1080-52-S1,990-52-S1,900-52-S1,810-52-S1,720-52-S1,630-52-S1,540-52-S1,450-52-S1,360-52-S1,270-52-S1,203-600-S2,203-510-S2,203-420-S2,203-330-S2,203-240-S2,203-150-S2,203-60-S2,195-105-S7,195-195-S7,195-285-S7,195-375-S7,195-465-S7,195-555-S7,270-660-S7,360-660-S7,450-660-S7,540-660-S7,630-660-S7,720-660-S7,810-660-S7,900-660-S7,990-660-S7,1080-660-S7,1170-660-S7,1260-660-S7,1335-825-S7,1335-735-S7,1425-765-S7,1425-855-S7,1425-945-S7,1425-675-S7,1425-585-S7,1425-495-S7,1425-405-S7,1425-315-S7,1425-225-S7,1425-135-S7,1395-45-S7,1305-45-S7,1215-45-S7,1125-45-S7,1035-45-S7,945-45-S7,855-45-S7,765-45-S7,675-45-S7,585-45-S7,495-45-S7,405-45-S7,315-45-S7,225-45-S7,405-780-S7,495-780-S7,465-885-S7,555-885-S7,885-885-S7,607-817-K4,1387-967-K4,1387-877-K4,1387-787-K4,1387-697-K4,1395-600-S7,1365-600-S7,1335-600-S7,1305-600-S7,1335-570-S7,1365-570-S7,1395-570-S7,1365-540-S7,1395-540-S7,1395-510-S7,1305-450-S7,1275-420-S7,1245-390-S7,1395-285-S7,1290-255-S7,1260-225-S7,1230-195-S7,1200-225-S7,1170-225-S7,285-630-S7,255-600-S7,225-570-S7,315-510-S7,345-480-S7,375-450-S7,285-390-S7,255-360-S7,225-330-S7,315-255-S7,345-225-S7,375-195-S7,405-195-S7,435-195-S7,435-225-S7,465-225-S7,878-292-S6,878-307-S6,863-307-S6,848-307-S6,818-307-S6,833-307-S6,818-322-S6,818-337-S6,833-352-S6,833-367-S6,863-322-S6,863-337-S6,863-352-S6,863-367-S6,893-307-S6,893-322-S6,893-337-S6,893-352-S6,893-367-S6,908-307-S6,923-307-S6,938-307-S6,938-322-S6,938-337-S6,923-352-S6,923-367-S6,878-255-L1,878-195-L1,878-135-L1,877-82-L3,877-277-E3,1267-592-K4,1297-532-K4,1327-502-K4,1357-472-K4,1312-412-K4,1267-352-K4,1297-187-K4,1357-277-K4,1365-315-S7,1335-345-S7,1177-157-K4,76-436-E1,871-631-E2,967-614-H9,772-614-H9,772-554-H9,772-494-H9,967-554-H9,967-494-H9,952-457-H1,937-442-H1,787-457-H1,802-442-H1,817-509-H9,922-509-H9,802-577-H1,817-577-H1,832-577-H1,892-577-H1,907-577-H1,922-577-H1,802-592-H1,817-607-H1,832-622-H1,922-592-H1,907-607-H1,892-622-H1,772-412-K4,817-412-K4,907-412-K4,952-412-K4,997-502-K4,997-592-K4,742-592-K4,742-502-K4,1020-330-S7,1050-330-S7,1110-390-S7,1140-390-S7,1185-450-S7,1215-450-S7,307-592-K4,262-562-K4,277-487-K4,322-427-K4,322-352-K4,292-322-K4,247-292-K4,277-217-K4,337-157-K4,457-157-K4,645-217-K1,555-217-K1,975-217-K1,735-217-K1,1095-217-K1"; Main.level = 11; } public static function LEVEL_7():void{ EditorUI.LEVEL_CODE = ",179-262-M5,209-292-M5,239-307-M5,269-307-M5,299-307-M5,329-292-M5,359-262-M5,164-217-M5,374-217-M5,164-142-M8,374-142-M8,179-97-M8,359-97-M8,209-67-M8,329-67-M8,239-52-M8,299-52-M8,269-52-M8,277-179-H9,262-179-H9,292-179-H9,284-172-H8,284-187-H8,269-172-H8,269-187-H8,271-226-E1,271-136-E2,322-112-E3,322-232-E3,232-112-E3,232-232-E3,202-172-E3,352-172-E3,0-0-BG3\t"; Main.level = 7; } public static function LEVEL_35():void{ EditorUI.LEVEL_CODE = ",1178-52-S6,1343-52-S6,1178-217-S6,1343-217-S6,1013-52-S6,1013-217-S6,848-52-S6,848-217-S6,848-382-S6,1013-382-S6,1178-382-S6,1343-382-S6,683-52-S6,683-217-S6,1343-547-S6,1178-547-S6,1013-547-S6,848-547-S6,683-547-S6,1178-712-S6,1343-712-S6,1304-52-H8,1049-52-H8,1139-52-H8,1087-52-H1,1102-52-H1,1214-52-H8,1252-52-H1,1267-52-H1,1342-22-E3,1177-22-E3,1012-22-E3,1177-89-H9,1177-179-H9,1177-134-H9,757-157-K4,772-157-K4,757-157-K4,772-157-K4,1342-254-H9,1342-344-H9,1342-299-H9,1304-712-H8,1214-712-H8,1259-712-H8,1049-547-H8,1139-547-H8,1094-547-H8,1336-151-E1,1214-217-H8,1304-382-H8,1214-382-H8,1259-382-H8,1253-217-S6,1139-217-H8,1049-217-H8,1139-382-H8,1304-547-H8,1103-382-S6,1268-547-S6,1342-674-H9,1342-584-H9,1342-629-H9,1012-254-H9,1012-344-H9,735-532-S1,795-532-S1,765-517-S1,766-481-E2,719-547-H8,809-547-H8,764-547-H8,847-509-H9,847-464-H9,682-509-H9,682-464-H9,824-382-H8,848-427-S6,683-427-S6,728-382-S6,803-382-S6,974-52-H8,884-52-H8,929-52-H8,824-52-H8,704-52-H8,728-52-S6,803-52-S6,1013-322-S6,1013-277-S6,1012-509-H9,1012-419-H9,1013-487-S6,1058-532-S6,1073-532-S6,743-217-S6,773-217-S6,758-217-S6,788-217-S6,1342-502-E3,1177-502-E3,1013-442-S6,1177-674-H9,1177-584-H9,1177-629-H9,922-472-K4,937-472-K4,908-532-S6,923-532-S6,938-532-S6,953-532-S6,929-547-H8,893-547-S6,968-547-S6,518-217-S6,518-382-S6,683-382-S6,697-382-H1,712-382-H1,1214-622-H8,1274-622-H8,1313-622-S6,1282-629-H9,1283-592-S6,1283-667-S6,757-82-K4,772-82-K4,922-472-K4,937-472-K4,1057-472-K4,1057-472-K4,1043-532-S6,974-217-H8,953-217-S6,697-217-H1,712-217-H1,712-217-H1,727-217-H1,802-217-H1,817-217-H1,832-217-H1,682-89-H9,683-127-S6,644-127-H8,517-164-H9,517-179-H9,518-127-S6,593-487-S6,608-487-S6,623-487-S6,592-524-H9,607-524-H9,622-524-H9,517-419-H9,517-479-H9,517-509-H9,518-547-S6,593-547-S6,608-547-S6,623-547-S6,659-547-H8,554-547-H8,554-382-H8,554-217-H8,592-254-H9,592-344-H9,592-299-H9,593-217-S6,593-382-S6,727-344-H9,727-284-H9,727-239-H9,802-344-H9,802-284-H9,802-239-H9,608-127-S6,592-172-E3,517-82-E3,1073-217-S6,1118-217-S6,1072-187-E3,1117-187-E3,0-0-BG0"; Main.level = 35; } public static function LEVEL_10():void{ EditorUI.LEVEL_CODE = ",690-367-S1,728-352-S6,728-337-S6,750-322-S1,750-247-S1,810-322-S1,833-285-S2,810-247-S1,773-307-S6,788-307-S6,712-352-H1,712-337-H1,697-352-H1,690-247-S1,615-292-S1,653-270-S2,555-397-S1,495-397-S1,555-442-S1,495-442-S1,435-442-S1,555-292-S1,495-292-S1,435-292-S1,375-292-S1,338-315-S2,413-397-S6,428-397-S6,443-397-S6,458-397-S6,593-397-S6,653-397-S6,653-382-S6,653-367-S6,592-412-H1,653-412-S6,337-397-K4,323-337-S6,323-457-S6,338-457-S6,353-457-S6,368-457-S6,368-442-S6,383-442-S6,398-442-S6,308-360-S2,308-420-S2,308-457-S6,720-501-S11,765-487-S1,848-450-S2,825-487-S1,870-382-S1,848-412-S6,848-397-S6,886-271-E2,870-247-S1,593-472-S6,593-487-S6,817-427-K4,877-322-K4,908-270-S2,908-330-S2,908-382-S6,908-367-S6,337-397-K4,817-427-K4,877-322-K4,781-271-E1,442-382-H1,457-382-H1,472-382-H1,487-382-H1,502-382-H1,517-382-H1,532-382-H1,547-382-H1,435-381-S11,555-381-S14,600-427-L8,592-457-H1,592-442-H1,593-412-S6,608-413-L4,623-413-L4,623-413-L4,638-413-L4,638-398-L4,623-398-L4,675-516-S11,626-551-S9,581-596-S9,562-584-H9,562-479-H9,562-524-H9,0-0-BG3"; Main.level = 10; } public static function LEVEL_33():void{ EditorUI.LEVEL_CODE = ",1042-44-H9,1042-29-H9,975-1177-S1,1013-1177-S6,1050-1177-S1,1088-1177-S6,1110-1185-S7,1133-1177-S6,1170-1177-S1,1208-1177-S6,1230-1185-S7,1253-1177-S6,1290-1177-S1,1328-1177-S6,1350-1185-S7,1373-1177-S6,1410-1177-S1,1433-1140-S2,1433-1080-S2,1433-1020-S2,1433-960-S2,1433-900-S2,1433-840-S2,1433-780-S2,1433-720-S2,1433-660-S2,1433-600-S2,1433-540-S2,1433-480-S2,1433-420-S2,1433-360-S2,1433-300-S2,1433-240-S2,1433-180-S2,1433-120-S2,1433-60-S2,1433-7-S6,1433-22-S6,937-1139-H9,937-1079-H9,937-1019-H9,937-959-H9,937-899-H9,937-839-H9,937-779-H9,937-719-H9,937-659-H9,937-599-H9,937-539-H9,937-479-H9,937-419-H9,937-359-H9,937-299-H9,937-239-H9,937-164-H9,937-194-H9,937-104-H9,937-44-H9,1042-104-H9,1042-164-H9,1042-224-H9,1042-284-H9,1042-344-H9,1042-404-H9,1042-464-H9,1042-524-H9,1042-584-H9,1042-644-H9,1042-704-H9,1042-764-H9,1042-809-H9,1042-869-H9,1042-929-H9,1042-989-H9,1042-1049-H9,1042-1109-H9,937-7-H1,983-67-S6,998-67-S6,1028-142-S6,1013-142-S6,998-142-S6,953-292-S6,968-292-S6,983-292-S6,1028-412-S6,1013-412-S6,998-412-S6,953-547-S6,968-547-S6,983-547-S6,998-682-S6,1013-682-S6,1028-682-S6,953-847-S6,968-847-S6,983-847-S6,1028-982-S6,1013-982-S6,998-982-S6,953-1102-S6,968-1102-S6,983-1102-S6,960-140-H7,1020-290-H7,960-410-H7,1010-450-H6,965-570-H6,965-630-H6,960-710-H7,1020-845-H7,1010-780-H6,965-915-H6,1010-1005-H6,1010-1035-H6,1402-1117-K4,1177-1117-K4,1259-1162-H8,1319-1162-H8,1290-1102-K1,1395-997-K1,1251-937-K5,1251-937-K5,1110-907-K1,1185-817-K1,1290-772-K1,1380-727-K1,1245-815-H7,1335-770-H7,1162-922-K4,1327-607-K4,1282-592-K4,1237-562-K4,1192-547-K4,1147-532-K4,1192-442-K4,1237-397-K4,1282-382-K4,1327-337-K4,1372-322-K4,1320-292-K1,1267-202-K4,1222-157-K4,1177-112-K4,1132-67-K4,1192-922-K4,1205-150-H6,1070-120-H6,1355-390-H6,1250-465-H6,1160-600-H6,1250-645-H6,1200-620-H7,1305-425-H7,1155-170-H7,1125-170-H7,991-16-E1,1096-16-E2,1087-67-K4,0-0-BG0"; Main.level = 33; } public static function LEVEL_34():void{ EditorUI.LEVEL_CODE = ",255-277-S1,255-202-S1,315-202-S1,315-277-S1,375-277-S1,495-292-S1,555-277-S1,405-202-S1,338-187-S6,383-187-S6,383-150-S2,338-150-S2,593-300-S2,683-300-S2,683-360-S2,593-360-S2,593-420-S2,683-420-S2,593-480-S2,683-480-S2,660-360-S7,620-435-H6,620-465-H6,683-540-S2,593-540-S2,615-555-S7,683-600-S2,593-600-S2,593-660-S2,683-660-S2,650-645-H6,650-675-H6,683-720-S2,593-720-S2,683-780-S2,593-780-S2,683-840-S2,683-900-S2,555-817-S1,495-817-S1,435-817-S1,398-855-S2,398-915-S2,398-975-S2,443-1035-S2,398-1035-S2,398-817-S6,660-900-S7,494-277-H8,607-577-E3,622-577-E3,652-337-E3,667-337-E3,667-877-E3,652-877-E3,443-1095-S2,398-1095-S2,398-1155-S2,420-1192-S1,480-1192-S1,480-1117-S1,540-1117-S1,600-1117-S1,540-1192-S1,600-1192-S1,660-1117-S1,660-1192-S1,720-1117-S1,720-1192-S1,780-1192-S1,780-1117-S1,840-1117-S1,840-1192-S1,900-1192-S1,863-1080-S2,1163-1155-S2,1163-1095-S2,1163-1035-S2,863-1020-S2,1163-975-S2,1163-915-S2,863-960-S2,1140-990-S7,863-900-S2,1163-855-S2,863-840-S2,1163-795-S2,863-780-S2,1163-735-S2,863-720-S2,1011-937-K5,1125-862-K1,1163-675-S2,863-660-S2,1163-615-S2,1163-577-S6,1200-577-S1,1260-577-S1,1298-555-S2,1298-495-S2,1298-435-S2,1298-375-S2,1011-757-K5,825-577-S1,765-577-S1,728-555-S2,863-577-S6,863-600-S2,728-495-S2,728-435-S2,728-375-S2,728-315-S2,1132-577-K4,892-577-K4,1011-532-K5,1140-442-K1,885-442-K1,645-157-S1,1403-120-S2,1403-60-S2,683-960-S2,480-1012-S1,540-1012-S1,599-1012-H8,659-1012-H8,683-997-S6,660-990-S7,659-952-M5,593-817-S6,383-90-S2,338-90-S2,360-52-S1,359-82-M8,367-127-E3,352-127-E3,907-847-E3,967-667-E3,1057-667-E3,907-862-E3,1282-382-E3,1267-382-E3,749-547-M5,1274-547-M5,1124-112-M8,1140-262-S1,960-262-S1,900-262-S1,286-256-E1,194-202-H8,194-277-H8,900-202-S1,960-202-S1,998-202-S6,704-262-H8,893-224-M7,839-262-H8,728-277-S6,705-157-S1,728-172-S6,728-187-S6,893-239-M7,742-382-E3,757-382-E3,472-832-E3,487-832-E3,307-217-E3,322-217-E3,397-217-E3,412-217-E3,900-1102-K1,907-1042-K4,907-967-K4,1125-697-K1,900-697-K1,435-292-S1,434-277-H8,308-263-L4,323-263-L4,338-263-L4,353-263-L4,368-263-L4,383-263-L4,585-1115-H7,555-1115-H7,615-1115-H7,645-1115-H7,675-1115-H7,705-1115-H7,735-1115-H7,765-1115-H7,795-1115-H7,825-1115-H7,1260-337-S1,765-352-S1,525-1115-H7,495-1115-H7,1026-1102-K6,765-337-K1,1034-292-M8,1124-292-M8,157-239-H9,157-202-H1,157-277-H1,196-241-E2,660-7-S1,720-7-S1,780-7-S1,840-7-S1,900-7-S1,757-142-K4,787-142-K4,960-7-S1,1020-7-S1,1080-7-S1,1140-7-S1,1200-7-S1,1260-7-S1,1320-7-S1,1380-7-S1,1403-22-S6,1364-37-M8,1080-262-K1,1103-105-S2,1103-165-S2,1020-262-S1,982-112-H1,982-142-H1,982-172-H1,945-82-S1,885-82-S1,862-112-H1,862-142-H1,862-172-H1,1260-82-S1,1200-262-S1,1222-292-H1,1222-307-H1,1125-1192-S1,1163-1192-S6,1283-67-S6,848-82-S6,1223-120-S2,1259-112-M8,1298-315-S2,1380-157-S1,1320-157-S1,1343-195-S2,1222-232-H1,1222-217-H1,1223-157-S6,1283-157-S6,1238-157-S6,1316-266-S9,1259-307-M5,1343-232-S6,840-202-S1,585-157-S1,525-157-S1,600-7-S1,540-7-S1,480-7-S1,420-7-S1,383-7-S6,383-22-S6,383-37-S6,413-29-M6,419-172-M5,787-112-K4,757-112-K4,1373-104-M7,953-1192-S6,1065-1192-S1,1005-1192-S1,443-202-S6,476-176-S9,728-202-S6,502-127-E3,502-142-E3,1118-82-S6,1133-82-S6,1223-82-S6,1162-82-H1,1192-82-H1,997-82-H1,1027-82-H1,1058-82-S6,1088-82-S6,1073-82-S6,1064-187-M5,1034-112-M8"; Main.level = 34; } public static function LEVEL_20():void{ EditorUI.LEVEL_CODE = ",261-127-K5,186-202-K6,232-157-E3,41-71-S9,86-71-S9,131-71-S9,106-16-E1,336-277-K5,296-431-S12,251-431-S12,206-431-S12,241-376-E2,397-247-E3,0-0-BG"; Main.level = 20; } public static function LEVEL_21():void{ EditorUI.LEVEL_CODE = ",503-412-S6,518-412-S6,511-166-E1,406-466-E2,510-382-L6,510-397-L6,517-367-E3,502-352-E3,517-337-E3,502-322-E3,517-307-E3,502-292-E3,517-277-E3,502-262-E3,517-247-E3,502-232-E3,517-217-E3,510-367-L6,510-352-L6,510-337-L6,510-322-L6,510-307-L6,510-292-L6,510-277-L6,510-262-L6,510-247-L6,510-232-L6,510-217-L6,510-435-S7,510-480-S7,510-525-S7,510-570-S7,510-615-S7,510-660-S7,510-705-S7,405-510-S7,405-555-S7,285-450-S7,285-495-S7,285-540-S7,285-585-S7,405-600-S7,285-630-S7,285-675-S7,285-720-S7,630-600-S7,630-645-S7,630-690-S7,735-525-S7,735-570-S7,735-615-S7,735-660-S7,735-705-S7,900-600-S7,900-690-S7,1095-555-S7,1095-600-S7,1095-645-S7,105-600-S7,105-645-S7,105-690-S7,113-667-S6,98-667-S6,98-622-S6,113-622-S6,278-472-S6,293-472-S6,278-517-S6,293-517-S6,278-562-S6,293-562-S6,278-607-S6,293-607-S6,278-652-S6,293-652-S6,278-697-S6,293-697-S6,398-622-S6,413-622-S6,398-577-S6,413-577-S6,398-532-S6,413-532-S6,413-532-S6,413-532-S6,503-457-S6,503-457-S6,518-457-S6,503-502-S6,518-502-S6,503-547-S6,518-547-S6,503-592-S6,518-592-S6,503-637-S6,518-637-S6,503-682-S6,518-682-S6,503-727-S6,518-727-S6,623-622-S6,638-622-S6,638-667-S6,623-667-S6,728-547-S6,743-547-S6,743-592-S6,728-592-S6,728-637-S6,743-637-S6,728-682-S6,743-682-S6,893-622-S6,908-622-S6,893-667-S6,405-645-S7,405-675-S7,510-750-S7,510-780-S7,285-750-S7,285-780-S7,900-645-S7,908-667-S6,502-382-E3,517-397-E3,0-0-BG1"; Main.level = 21; } public static function LEVEL_22():void{ EditorUI.LEVEL_CODE = ",52-142-K4,97-142-K4,142-142-K4,187-142-K4,232-142-K4,277-142-K4,46-181-E1,60-202-S1,120-202-S1,180-202-S1,240-202-S1,300-202-S1,322-142-K4,367-142-K4,360-202-S1,80-90-H6,140-90-H6,200-90-H6,260-90-H6,320-90-H6,380-90-H6,20-90-H6,23-180-S2,23-120-S2,23-60-S2,420-202-S1,405-277-S1,345-277-S1,285-277-S1,225-277-S1,165-277-S1,404-232-M8,23-240-S2,23-300-S2,23-360-S2,23-420-S2,23-480-S2,23-540-S2,23-600-S2,23-660-S2,23-720-S2,23-780-S2,23-840-S2,23-900-S2,23-960-S2,60-982-S1,120-982-S1,180-982-S1,240-982-S1,300-982-S1,360-982-S1,330-245-H7,270-245-H7,210-245-H7,150-245-H7,293-263-L4,233-263-L4,173-263-L4,353-263-L4,105-277-S1,60-337-S1,120-337-K1,240-337-K1,180-337-S1,300-337-S1,338-337-S6,353-337-S6,413-337-S6,428-337-S6,390-427-S1,330-427-S1,270-427-S1,210-427-S1,150-427-S1,83-427-S6,98-427-S6,113-427-S6,60-502-S1,120-502-S1,180-502-S1,240-502-S1,300-502-S1,338-502-S6,353-502-S6,413-465-S2,210-395-H7,150-395-H7,270-395-H7,330-395-H7,128-488-L4,188-488-L4,248-488-L4,308-488-L4,390-592-S1,330-592-S1,337-592-S4,292-592-S4,247-592-S4,202-592-S4,157-592-S4,112-592-S4,126-727-K5,321-727-K5,217-704-H9,232-704-H9,413-630-S2,413-690-S2,413-750-S2,413-810-S2,59-742-H8,119-742-H8,179-742-H8,217-742-H1,232-742-H1,314-742-H8,374-742-H8,233-780-S2,255-817-S1,315-817-S1,353-817-S6,390-922-S1,330-922-S1,270-922-S1,173-900-S2,210-922-K1,150-862-S1,113-862-S6,98-862-S6,83-862-S6,330-800-H7,293-908-L4,278-908-L4,263-908-L4,158-968-L4,218-968-L4,278-968-L4,338-968-L4,413-322-S6,413-307-S6,413-292-S6,428-322-S6,428-307-S6,428-292-S6,413-352-S6,413-367-S6,413-382-S6,413-525-S2,413-847-S6,413-862-S6,413-877-S6,458-202-S6,473-202-S6,443-277-S6,458-277-S6,458-315-S2,458-375-S2,458-435-S2,458-495-S2,458-555-S2,458-615-S2,458-675-S2,458-735-S2,458-795-S2,458-855-S2,458-892-S6,458-907-S6,458-922-S6,495-922-S1,533-900-S2,533-840-S2,533-780-S2,533-720-S2,533-660-S2,533-600-S2,533-540-S2,533-480-S2,533-420-S2,533-360-S2,533-300-S2,533-240-S2,533-180-S2,533-120-S2,533-60-S2,517-277-H1,517-742-H1,472-877-H1,494-892-M5,472-472-H1,398-1005-S2,473-1005-S2,533-960-S2,495-982-S1,434-1012-H8,434-997-H8,434-982-H8,496-961-E2,435-1042-S1,473-1042-S6,398-1042-S6,434-1027-H8,353-908-L4,0-0-BG0"; Main.level = 22; } public static function LEVEL_23():void{ EditorUI.LEVEL_CODE = ",53-52-S6,38-67-S6,135-31-S8,330-91-S8,331-31-E1,331-106-E2,127-37-E3,23-82-S6,23-120-S2,38-157-S6,53-172-S6,218-172-S6,233-187-S6,248-210-S2,413-210-S2,428-187-S6,443-172-S6,608-172-S6,623-157-S6,623-120-S2,623-82-S6,608-67-S6,593-52-S6,510-31-S8,517-37-E3,135-197-S15,330-257-S15,525-197-S15,0-0-BG0"; Main.level = 23; } public static function LEVEL_24():void{ EditorUI.LEVEL_CODE = ",517-239-H9,517-179-H9,45-127-S1,67-284-H9,67-224-H9,67-164-H9,517-119-H9,517-59-H9,225-322-K1,285-322-K1,345-322-K1,405-322-K1,503-322-S6,518-322-S6,533-322-S6,548-322-S6,563-322-S6,578-322-S6,68-322-S6,83-322-S6,98-322-S6,113-322-S6,128-322-S6,577-284-H9,577-224-H9,547-262-K4,622-224-H9,622-284-H9,622-344-H9,697-344-H9,697-284-H9,697-224-H9,697-164-H9,697-104-H9,697-59-H9,697-404-H9,622-404-H9,622-464-H9,697-464-H9,46-106-E1,547-217-K4,22-7-H5,165-322-S1,465-322-S1,480-230-H7,420-230-H7,142-179-H9,142-239-H9,142-119-H9,142-59-H9,180-230-H7,240-230-H7,285-95-H7,330-95-H7,375-95-H7,24-444-H4,24-69-H4,9-189-H4,429-39-H4,337-7-H5,697-524-H9,622-524-H9,622-584-H9,622-644-H9,697-584-H9,697-644-H9,622-704-H9,697-704-H9,622-764-H9,697-764-H9,622-824-H9,697-824-H9,667-142-E3,142-292-E3,502-292-E3,630-1057-S1,690-1057-S1,750-1057-S1,570-1057-S1,772-974-H9,772-914-H9,772-854-H9,547-974-H9,547-914-H9,547-854-H9,758-1020-L1,758-960-L1,758-900-L1,563-1020-L1,563-960-L1,563-900-L1,742-974-H9,742-914-H9,742-854-H9,577-974-H9,577-914-H9,577-854-H9,750-1177-S1,690-1177-S1,630-1177-S1,570-1177-S1,661-1156-E2,577-37-H1,607-37-H1,637-37-H1,728-1020-L1,728-960-L1,728-900-L1,593-1020-L1,593-960-L1,593-900-L1,593-840-L1,563-840-L1,758-840-L1,728-840-L1,547-172-K4,547-127-K4,547-82-K4,683-1140-L1,638-1140-L1,660-1102-L8,788-1057-S6,533-1057-S6,713-1140-L1,608-1140-L1,578-1140-L1,743-1140-L1,735-1102-L7,585-1102-L7,1314-1134-H4,112-532-H5,599-187-H8,728-780-L1,758-780-L1,728-720-L1,758-720-L1,577-787-L3,577-742-L3,577-697-L3,1432-1132-H5"; Main.level = 24; } public static function LEVEL_25():void{ EditorUI.LEVEL_CODE = ",41-251-S12,86-296-S12,131-341-S12,176-386-S12,221-431-S12,266-476-S12,311-521-S12,116-176-S12,161-221-S12,206-266-S12,251-311-S12,296-356-S12,341-401-S12,386-446-S12,431-491-S12,476-536-S12,356-566-S12,371-611-S9,326-656-S9,281-701-S9,491-671-S9,446-716-S9,401-761-S9,236-746-S9,191-791-S9,386-806-S12,251-881-S12,296-926-S12,341-971-S12,431-851-S12,390-997-S1,450-997-S1,510-997-S1,570-997-S1,480-877-S1,600-877-S1,630-997-S1,690-997-S1,989-997-H8,959-877-H8,1019-877-H8,1079-877-H8,1049-997-H8,1109-997-H8,1169-997-H8,1229-997-H8,1290-997-S1,1328-975-S2,1327-854-H9,1289-967-M5,1237-794-H9,1327-734-H9,1237-614-H9,908-435-S2,908-495-S2,26-206-S9,71-161-S9,91-196-E1,277-457-E3,1237-494-H9,1327-434-H9,1327-674-H9,1327-614-H9,1327-554-H9,1327-494-H9,1215-457-S1,1155-457-S1,1095-457-S1,1073-495-S2,1050-607-K1,990-682-K1,930-757-K1,536-626-S9,540-860-H7,1328-915-S2,22-157-H5,521-581-S12,660-920-H7,758-877-S6,893-997-S6,878-997-S6,878-1035-S2,773-1035-S2,878-840-S2,878-1095-S2,773-1095-S2,412-697-E3,206-836-S12,1238-855-S2,1200-877-S1,1140-877-S1,1237-674-H9,1327-374-H9,1305-337-S1,1245-337-S1,1185-337-S1,1125-337-S1,908-375-S2,1065-337-S1,1005-337-S1,945-337-S1,908-337-S6,922-307-E3,1079-367-M8,756-442-K6,816-292-K5,427-967-E3,757-967-E3,847-787-K4,802-787-K4,847-712-K4,802-712-K4,847-637-K4,802-637-K4,802-562-K4,802-502-K4,847-562-K4,847-502-K4,847-412-K4,802-412-K4,847-352-K4,802-352-K4,773-840-S2,773-877-S6,803-877-S6,818-862-S6,848-877-S6,833-862-S6,803-1012-S6,818-997-S6,833-997-S6,848-1012-S6,847-1072-K4,802-1072-K4,802-997-K4,847-997-K4,802-922-K4,847-922-K4,720-877-S1,900-877-S1,750-997-S1,908-555-S2,908-615-S2,930-997-S1,1289-907-M5,893-929-M6,1237-382-E3,1012-307-E3,1102-307-E3,1192-307-E3,1282-307-E3,1396-316-E2,1237-554-H9,1237-734-H9,1265-795-H6,0-0-BG0"; Main.level = 25; } public static function LEVEL_26():void{ EditorUI.LEVEL_CODE = ",187-592-K4,202-592-K4,307-562-K4,106-586-E1,255-515-H7,322-562-K4,427-517-K4,442-517-K4,547-472-K4,562-472-K4,375-560-H7,375-485-H7,495-455-H7,495-530-H7,255-590-H7,120-607-S1,645-442-S1,683-442-S6,698-442-S6,735-442-S1,788-442-S6,773-442-S6,878-442-S6,878-480-S2,878-570-S2,878-660-S2,878-750-S2,878-532-S6,878-517-S6,878-622-S6,878-607-S6,878-712-S6,878-697-S6,968-787-S6,983-787-S6,878-787-S6,788-787-S6,1020-787-S1,1110-787-S1,1200-787-S1,1290-787-S1,1058-787-S6,1073-787-S6,1148-787-S6,1163-787-S6,1238-787-S6,1253-787-S6,840-862-S1,930-862-S1,877-862-H1,892-862-H1,967-862-H1,982-862-H1,982-862-H1,1020-862-S1,1110-862-S1,1200-862-S1,1290-862-S1,1380-862-S1,1328-765-S2,1403-765-S2,1403-825-S2,1057-862-H1,1072-862-H1,1147-862-H1,1162-862-H1,1237-862-H1,1252-862-H1,1327-862-H1,1342-862-H1,788-480-S2,788-570-S2,788-660-S2,788-532-S6,788-517-S6,788-622-S6,788-607-S6,788-697-S6,788-712-S6,788-750-S2,815-585-H6,847-697-K4,847-682-K4,847-667-K4,788-862-S6,803-862-S6,1379-832-M5,1328-675-S2,1403-675-S2,1403-585-S2,1403-495-S2,1403-405-S2,1400-660-H6,1403-727-S6,1403-712-S6,1328-727-S6,1328-712-S6,1328-637-S6,1328-622-S6,1328-607-S6,1328-592-S6,1403-637-S6,1403-622-S6,1403-547-S6,1403-532-S6,1328-502-S6,1328-487-S6,1328-450-S2,1328-360-S2,1403-315-S2,1328-322-S6,1328-307-S6,1328-270-S2,1403-225-S2,1328-412-S6,1328-397-S6,1403-277-S6,1403-262-S6,1403-367-S6,1403-352-S6,1403-442-S6,1403-442-S6,1403-457-S6,877-824-H9,787-824-H9,1328-555-S2,1328-517-S6,1290-247-S1,1230-247-S1,1305-127-S1,1245-127-S1,1170-127-S1,1110-127-S1,1035-127-S1,975-127-S1,1380-127-S1,136-586-E2,1418-187-S6,1433-187-S6,1433-172-S6,1433-157-S6,1433-142-S6,1433-127-S6,1418-127-S6,1403-187-S6,1418-149-M7,1140-247-S1,1080-247-S1,990-247-S1,930-247-S1,885-127-S1,825-127-S1,735-127-S1,675-127-S1,600-127-S1,997-187-H1,982-187-H1,862-202-H1,847-202-H1,667-187-H1,652-187-H1,840-247-S1,780-247-S1,690-247-S1,563-165-S2,563-225-S2,563-285-S2,563-127-S6,638-127-S6,743-247-S6,728-247-S6,893-247-S6,878-247-S6,788-127-S6,788-127-S6,773-127-S6,1028-247-S6,1043-247-S6,923-127-S6,923-127-S6,938-127-S6,1073-127-S6,1193-247-S6,1178-247-S6,1208-127-S6,1343-127-S6,968-772-S6,968-735-S2,968-615-S2,968-495-S2,968-457-S6,968-442-S6,967-554-H9,967-674-H9,1004-442-H8,1064-442-H8,1124-442-H8,1184-442-H8,1244-442-H8,1289-442-H8,832-847-E3,599-157-M8,922-442-E3,0-0-BG0"; Main.level = 26; } } }//package Vanilla
Section 202
//Main (Vanilla.Main) package Vanilla { import flash.events.*; import flash.display.*; import fl.controls.*; import fl.data.*; import com.kongregate.as3.client.*; import flash.text.*; import flash.net.*; import flash.utils.*; import mochi.as3.*; import fl.containers.*; public dynamic class Main extends MovieClip { public var creds_CoolBuddy:SimpleButton; public var j1; public var j2; public var Obtn_LoadLevel:SimpleButton; public var btn_Restart:SimpleButton; public var levels_complete:int; public var collObj1:DataProvider; public var collObj2:DataProvider; public var scroll_elements:ScrollPane; public var ibtnp_LevelEditor:SimpleButton; public var Combito_Background:ComboBox; public var telon:MovieClip; public var btn_Exit:SimpleButton; public var time_lbl:MovieClip; public var Cbtn_Back:SimpleButton; public var Ebtn_Back:SimpleButton; public var creds_Haini:SimpleButton; public var Ibtn_Back:SimpleButton; public var _mochiads_game_id:String; public var Obtn_Back:SimpleButton; public var __setPropDict:Dictionary; public var winAni:MovieClip; public var Ibtn_GameForum:SimpleButton; public var musicPlayer:MovieClip; public var btn_save:SimpleButton; public var btn_CLEAR:SimpleButton; public var world:MGame; public var btn_TEST:SimpleButton; public var collProp1:Object; public var btn_Vanilla1:SimpleButton; public var btn_Vanilla2:SimpleButton; public var Combito_selector:ComboBox; public var Ibtn_LevelCentral:SimpleButton; public var Obtn_LevelCentral:SimpleButton; public var check_txt:TextField; public var levels_unlocked:int; public var itemObj1:SimpleCollectionItem; public var CTitle:MovieClip; public var cat:MovieClip; public var gridContainer:ScrollPane; public var collProps1:Array; public var itemObj2:SimpleCollectionItem; public var kongC:int; public var kongregate:KongregateAPI; public var btn_ERASE:SimpleButton; public var collProps2:Array; public var i1:int; public var btn_LOAD:SimpleButton; public var i2:int; public var collProp2:Object; public var btn_coolbuddy:SimpleButton; public var time_txt:TextField; public static var level:int = 1; public static var LevelArray:Array = new Array(); public static var prevScreen:String; public function Main():void{ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10); var _local1:* = 1; while (_local1 < 17) { LevelArray[_local1] = 0; _local1++; }; LevelArray[1] = 1; LevelArray[0] = 0; } public function goLevelEditor(_arg1:MouseEvent){ world.pressLevelEditor(); } public function exitClick(_arg1:MouseEvent){ world.pressExit(); } public function Obtn_LoadLevelClick(_arg1:MouseEvent){ var _local2:Panel_Load_OW = new Panel_Load_OW(); _local2.x = 320; _local2.y = 240; addChild(_local2); } public function TESTClick(_arg1:MouseEvent):void{ EditorUI.GENERAR(); Main.prevScreen = "EditorTest"; gotoAndPlay("prepGame"); } public function goPLAY(_arg1:MouseEvent){ gotoAndPlay("OverWorld"); } public function fsubmit_mighty(_arg1:MouseEvent){ var o:Object; var boardID:String; var event = _arg1; if (cat.ttime_mighty.text != "-"){ o = {n:[4, 4, 13, 2, 4, 14, 8, 10, 9, 6, 7, 1, 8, 13, 12, 9], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, score:Number(cat.ttime_mighty.text)}); kongregate.stats.submit("Mighty levels total time", Number(cat.ttime_mighty.text)); }; } public function mpl(_arg1:Event):void{ if (musicPlayer.appear == true){ if (musicPlayer.y < 0){ musicPlayer.y = (musicPlayer.y + 2); }; } else { if (musicPlayer.y > -47){ musicPlayer.y = (musicPlayer.y - 2); }; }; } function __setProp_Combito_selector_Scene1_Layer1_6(){ try { Combito_selector["componentInspectorSetting"] = true; } catch(e:Error) { }; collObj1 = new DataProvider(); collProps1 = [{label:"Essentials", data:"Essentials"}, {label:"Static", data:"Static"}, {label:"Loose", data:"Loose"}, {label:"Mechanisms", data:"Mechanisms"}, {label:"Hazard", data:"Hazard"}, {label:"Misc", data:"Misc"}]; i1 = 0; while (i1 < collProps1.length) { itemObj1 = new SimpleCollectionItem(); collProp1 = collProps1[i1]; for (j1 in collProp1) { itemObj1[j1] = collProp1[j1]; }; collObj1.addItem(itemObj1); i1++; }; Combito_selector.dataProvider = collObj1; Combito_selector.editable = false; Combito_selector.enabled = true; Combito_selector.prompt = ""; Combito_selector.restrict = ""; Combito_selector.rowCount = 5; Combito_selector.visible = true; try { Combito_selector["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function goLEARN(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.coolbuddy.com/?cid=171"); navigateToURL(_local2, "_blank"); } public function LOADClick(_arg1:MouseEvent):void{ var _local2:Panel_Load = new Panel_Load(); _local2.x = 320; _local2.y = 240; addChild(_local2); } public function flvl_11(_arg1:MouseEvent){ if (VAULT.Opens[11] == 1){ Levels.LEVEL_11(); startGame(); }; } public function flvl_13(_arg1:MouseEvent){ if (VAULT.Opens[13] == 1){ Levels.LEVEL_13(); startGame(); }; } public function flvl_15(_arg1:MouseEvent){ if (VAULT.Opens[15] == 1){ Levels.LEVEL_15(); startGame(); }; } public function flvl_16(_arg1:MouseEvent){ if (VAULT.Opens[16] == 1){ Levels.LEVEL_16(); startGame(); }; } public function flvl_10(_arg1:MouseEvent){ if (VAULT.Opens[10] == 1){ Levels.LEVEL_10(); startGame(); }; } public function flvl_18(_arg1:MouseEvent){ if (VAULT.Opens[18] == 1){ Levels.LEVEL_18(); startGame(); }; } public function flvl_17(_arg1:MouseEvent){ if (VAULT.Opens[17] == 1){ Levels.LEVEL_17(); startGame(); }; } public function flvl_14(_arg1:MouseEvent){ if (VAULT.Opens[14] == 1){ Levels.LEVEL_14(); startGame(); }; } public function goEXTRAS(_arg1:MouseEvent){ gotoAndPlay("Instructions"); } public function flvl_12(_arg1:MouseEvent){ if (VAULT.Opens[12] == 1){ Levels.LEVEL_12(); startGame(); }; } public function flvl_20(_arg1:MouseEvent){ if (VAULT.Opens[20] == 1){ Levels.LEVEL_20(); startGame(); }; } public function CLEARClick(_arg1:MouseEvent){ eraseLevelCache(); } public function flvl_23(_arg1:MouseEvent){ if (VAULT.Opens[23] == 1){ Levels.LEVEL_23(); startGame(); }; } public function flvl_24(_arg1:MouseEvent){ if (VAULT.Opens[24] == 1){ Levels.LEVEL_24(); startGame(); }; } public function flvl_26(_arg1:MouseEvent){ if (VAULT.Opens[26] == 1){ Levels.LEVEL_26(); startGame(); }; } public function MusicPlayerRollIn(_arg1:MouseEvent):void{ musicPlayer.appear = true; } public function flvl_21(_arg1:MouseEvent){ if (VAULT.Opens[21] == 1){ Levels.LEVEL_21(); startGame(); }; } public function flvl_22(_arg1:MouseEvent){ if (VAULT.Opens[22] == 1){ Levels.LEVEL_22(); startGame(); }; } public function MusicPlayerRollOut(_arg1:MouseEvent):void{ musicPlayer.appear = false; } public function fsubmit_supreme(_arg1:MouseEvent){ var o:Object; var boardID:String; var event = _arg1; if (cat.ttime_supreme.text != "-"){ o = {n:[4, 4, 13, 2, 4, 14, 8, 10, 9, 6, 7, 1, 8, 13, 12, 9], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, score:Number(cat.ttime_supreme.text)}); kongregate.stats.submit("Supreme levels total time", Number(cat.ttime_supreme.text)); }; } public function flvl_19(_arg1:MouseEvent){ if (VAULT.Opens[19] == 1){ Levels.LEVEL_19(); startGame(); }; } function __setProp_scroll_elements_Scene1_Layer1_6(){ try { scroll_elements["componentInspectorSetting"] = true; } catch(e:Error) { }; scroll_elements.enabled = true; scroll_elements.horizontalLineScrollSize = 2; scroll_elements.horizontalPageScrollSize = 2; scroll_elements.horizontalScrollPolicy = "off"; scroll_elements.scrollDrag = false; scroll_elements.source = "Gadgetlist"; scroll_elements.verticalLineScrollSize = 2; scroll_elements.verticalPageScrollSize = 2; scroll_elements.verticalScrollPolicy = "on"; scroll_elements.visible = true; try { scroll_elements["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function flvl_27(_arg1:MouseEvent){ if (VAULT.Opens[27] == 1){ Levels.LEVEL_27(); startGame(); }; } public function flvl_28(_arg1:MouseEvent){ if (VAULT.Opens[28] == 1){ Levels.LEVEL_28(); startGame(); }; } public function flvl_29(_arg1:MouseEvent){ if (VAULT.Opens[29] == 1){ Levels.LEVEL_29(); startGame(); }; } public function goVanilla(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.villavanilla.com"); navigateToURL(_local2, "_blank"); } public function flvl_25(_arg1:MouseEvent){ if (VAULT.Opens[25] == 1){ Levels.LEVEL_25(); startGame(); }; } public function ComboBoxChanged(_arg1:Event):void{ if (ComboBox(_arg1.target).selectedItem.data == "Essentials"){ MovieClip(scroll_elements.content).gotoAndStop("Essentials"); }; if (ComboBox(_arg1.target).selectedItem.data == "Static"){ MovieClip(scroll_elements.content).gotoAndStop("Static"); }; if (ComboBox(_arg1.target).selectedItem.data == "Loose"){ MovieClip(scroll_elements.content).gotoAndStop("Loose"); }; if (ComboBox(_arg1.target).selectedItem.data == "Mechanisms"){ MovieClip(scroll_elements.content).gotoAndStop("Mechanisms"); }; if (ComboBox(_arg1.target).selectedItem.data == "Hazard"){ MovieClip(scroll_elements.content).gotoAndStop("Hazard"); }; if (ComboBox(_arg1.target).selectedItem.data == "Misc"){ MovieClip(scroll_elements.content).gotoAndStop("Misc"); }; } function frame6(){ stop(); stage.quality = StageQuality.MEDIUM; world.visible = true; btn_Restart.addEventListener(MouseEvent.CLICK, restartClick); btn_Exit.addEventListener(MouseEvent.CLICK, exitClick); btn_coolbuddy.addEventListener(MouseEvent.CLICK, goLEARN); ibtnp_LevelEditor.addEventListener(MouseEvent.CLICK, goLevelEditor); ibtnp_LevelEditor.focusRect = false; btn_coolbuddy.focusRect = false; btn_Exit.focusRect = false; btn_Restart.focusRect = false; time_txt.focusRect = false; ibtnp_LevelEditor.tabEnabled = false; btn_coolbuddy.tabEnabled = false; btn_Exit.tabEnabled = false; btn_Restart.tabEnabled = false; time_txt.tabEnabled = false; stage.focus = this; } public function goHaini(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.haini.com.mx"); navigateToURL(_local2, "_blank"); } function frame2(){ MochiServices.connect("6d3f2e8ece46794c", root); MochiBot.track(this, "794cc607"); } public function fsubmit_tame(_arg1:MouseEvent){ var o:Object; var boardID:String; var event = _arg1; if (cat.ttime_tame.text != "-"){ o = {n:[4, 4, 13, 2, 4, 14, 8, 10, 9, 6, 7, 1, 8, 13, 12, 9], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, score:Number(cat.ttime_tame.text)}); trace(("Puntaje de " + String(Number(cat.ttime_tame.text)))); kongregate.stats.submit("Tame levels total time", Number(cat.ttime_tame.text)); }; trace("No se autorizo el subir el puntaje"); } public function ComboBackChanged(_arg1:Event):void{ if (ComboBox(_arg1.target).selectedItem.data == "Blueprint"){ EditorUI.bgSel = "BG0"; }; if (ComboBox(_arg1.target).selectedItem.data == "Clouds"){ EditorUI.bgSel = "BG1"; }; if (ComboBox(_arg1.target).selectedItem.data == "Fantasy"){ EditorUI.bgSel = "BG2"; }; if (ComboBox(_arg1.target).selectedItem.data == "Universe"){ EditorUI.bgSel = "BG3"; }; if (ComboBox(_arg1.target).selectedItem.data == "Boscage"){ EditorUI.bgSel = "BG4"; }; if (ComboBox(_arg1.target).selectedItem.data == "Lament"){ EditorUI.bgSel = "BG5"; }; } public function flvl_31(_arg1:MouseEvent){ if (VAULT.Opens[31] == 1){ Levels.LEVEL_31(); startGame(); }; } public function startGame():void{ gotoAndPlay("prepGame"); } public function flvl_34(_arg1:MouseEvent){ if (VAULT.Opens[34] == 1){ Levels.LEVEL_34(); startGame(); }; } public function Obtn_LevelCentralClick(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.coolbuddy.com/games/community/game_forum.asp?cat=827"); navigateToURL(_local2, "_blank"); } public function flvl_30(_arg1:MouseEvent){ if (VAULT.Opens[30] == 1){ Levels.LEVEL_30(); startGame(); }; } public function flvl_32(_arg1:MouseEvent){ if (VAULT.Opens[32] == 1){ Levels.LEVEL_32(); startGame(); }; } function __setProp_gridContainer_Scene1_Layer1_6(){ try { gridContainer["componentInspectorSetting"] = true; } catch(e:Error) { }; gridContainer.enabled = true; gridContainer.horizontalLineScrollSize = 2; gridContainer.horizontalPageScrollSize = 0; gridContainer.horizontalScrollPolicy = "auto"; gridContainer.scrollDrag = false; gridContainer.source = "grid"; gridContainer.verticalLineScrollSize = 2; gridContainer.verticalPageScrollSize = 0; gridContainer.verticalScrollPolicy = "auto"; gridContainer.visible = true; try { gridContainer["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function flvl_35(_arg1:MouseEvent){ if (VAULT.Opens[35] == 1){ Levels.LEVEL_35(); startGame(); }; } function frame8(){ stop(); Obtn_Back.addEventListener(MouseEvent.CLICK, Ebtn_BackClick); Obtn_LoadLevel.addEventListener(MouseEvent.CLICK, Obtn_LoadLevelClick); Obtn_LevelCentral.addEventListener(MouseEvent.CLICK, Obtn_LevelCentralClick); Main.prevScreen = "OverWorld"; cat.btn_level1.addEventListener(MouseEvent.CLICK, flvl_1); cat.btn_level2.addEventListener(MouseEvent.CLICK, flvl_2); cat.btn_level3.addEventListener(MouseEvent.CLICK, flvl_3); cat.btn_level4.addEventListener(MouseEvent.CLICK, flvl_4); cat.btn_level5.addEventListener(MouseEvent.CLICK, flvl_5); cat.btn_level6.addEventListener(MouseEvent.CLICK, flvl_6); cat.btn_level7.addEventListener(MouseEvent.CLICK, flvl_7); cat.btn_level8.addEventListener(MouseEvent.CLICK, flvl_8); cat.btn_level9.addEventListener(MouseEvent.CLICK, flvl_9); cat.btn_level10.addEventListener(MouseEvent.CLICK, flvl_10); cat.btn_level11.addEventListener(MouseEvent.CLICK, flvl_11); cat.btn_level12.addEventListener(MouseEvent.CLICK, flvl_12); cat.btn_level13.addEventListener(MouseEvent.CLICK, flvl_13); cat.btn_level14.addEventListener(MouseEvent.CLICK, flvl_14); cat.btn_level15.addEventListener(MouseEvent.CLICK, flvl_15); cat.btn_level16.addEventListener(MouseEvent.CLICK, flvl_16); cat.btn_level17.addEventListener(MouseEvent.CLICK, flvl_17); cat.btn_level18.addEventListener(MouseEvent.CLICK, flvl_18); cat.btn_level19.addEventListener(MouseEvent.CLICK, flvl_19); cat.btn_level20.addEventListener(MouseEvent.CLICK, flvl_20); cat.btn_level21.addEventListener(MouseEvent.CLICK, flvl_21); cat.btn_level22.addEventListener(MouseEvent.CLICK, flvl_22); cat.btn_level23.addEventListener(MouseEvent.CLICK, flvl_23); cat.btn_level24.addEventListener(MouseEvent.CLICK, flvl_24); cat.btn_level25.addEventListener(MouseEvent.CLICK, flvl_25); cat.btn_level26.addEventListener(MouseEvent.CLICK, flvl_26); cat.btn_level27.addEventListener(MouseEvent.CLICK, flvl_27); cat.btn_level28.addEventListener(MouseEvent.CLICK, flvl_28); cat.btn_level29.addEventListener(MouseEvent.CLICK, flvl_29); cat.btn_level30.addEventListener(MouseEvent.CLICK, flvl_30); cat.btn_level31.addEventListener(MouseEvent.CLICK, flvl_31); cat.btn_level32.addEventListener(MouseEvent.CLICK, flvl_32); cat.btn_level33.addEventListener(MouseEvent.CLICK, flvl_33); cat.btn_level34.addEventListener(MouseEvent.CLICK, flvl_34); cat.btn_level35.addEventListener(MouseEvent.CLICK, flvl_35); cat.submit_tame.addEventListener(MouseEvent.CLICK, fsubmit_tame); cat.submit_skillful.addEventListener(MouseEvent.CLICK, fsubmit_skillful); cat.submit_mighty.addEventListener(MouseEvent.CLICK, fsubmit_mighty); cat.submit_supreme.addEventListener(MouseEvent.CLICK, fsubmit_supreme); levels_unlocked = 0; kongC = 1; while (kongC <= 35) { if (VAULT.Opens[kongC] == 1){ levels_unlocked++; }; kongC++; }; kongregate.stats.submit("Levels Unlocked", levels_unlocked); levels_complete = 0; kongC = 1; while (kongC <= 35) { if (VAULT.Times[kongC]){ levels_complete++; }; kongC++; }; kongregate.stats.submit("Levels Completed", levels_complete); if (levels_complete >= 35){ kongregate.stats.submit("All levels Completed", 1); }; } function frame9(){ stop(); Ibtn_Back.addEventListener(MouseEvent.CLICK, Ebtn_BackClick); Main.prevScreen = "Instructions"; Ibtn_LevelCentral.addEventListener(MouseEvent.CLICK, Obtn_LevelCentralClick); Ibtn_GameForum.addEventListener(MouseEvent.CLICK, GameForumClick); } public function Ebtn_BackClick(_arg1:MouseEvent){ gotoAndPlay("menu"); } function frame4(){ musicPlayer.addEventListener(MouseEvent.ROLL_OVER, MusicPlayerRollIn); musicPlayer.addEventListener(MouseEvent.ROLL_OUT, MusicPlayerRollOut); this.addEventListener(Event.ENTER_FRAME, mpl); VAULT.INITALIZE(); stop(); CTitle.btn_PLAY.addEventListener(MouseEvent.CLICK, goPLAY); CTitle.btn_CREATE.addEventListener(MouseEvent.CLICK, goCREATE); CTitle.btn_LEARN.addEventListener(MouseEvent.CLICK, goLEARN); CTitle.btn_SALUTE.addEventListener(MouseEvent.CLICK, goSALUTE); CTitle.btn_EXTRAS.addEventListener(MouseEvent.CLICK, goEXTRAS); CTitle.ibtn_LoadLevel.addEventListener(MouseEvent.CLICK, goiLoadLevel); if ((((((((prevScreen == "OverWorld")) || ((prevScreen == "Editor")))) || ((prevScreen == "Instructions")))) || ((prevScreen == "Credits")))){ CTitle.gotoAndStop(0x0101); telon.alpha = 0; }; } function frame7(){ if ((((__setPropDict[Combito_Background] == undefined)) || (!((int(__setPropDict[Combito_Background]) == 7))))){ __setPropDict[Combito_Background] = 7; __setProp_Combito_Background_Scene1_Layer1_6(); }; if ((((__setPropDict[Combito_selector] == undefined)) || (!((int(__setPropDict[Combito_selector]) == 7))))){ __setPropDict[Combito_selector] = 7; __setProp_Combito_selector_Scene1_Layer1_6(); }; if ((((__setPropDict[scroll_elements] == undefined)) || (!((int(__setPropDict[scroll_elements]) == 7))))){ __setPropDict[scroll_elements] = 7; __setProp_scroll_elements_Scene1_Layer1_6(); }; if ((((__setPropDict[gridContainer] == undefined)) || (!((int(__setPropDict[gridContainer]) == 7))))){ __setPropDict[gridContainer] = 7; __setProp_gridContainer_Scene1_Layer1_6(); }; stop(); if (Main.prevScreen == "mainGame"){ MovieClip(gridContainer.content).loadLevel(); }; Main.prevScreen = "Editor"; Ebtn_Back.addEventListener(MouseEvent.CLICK, Ebtn_BackClick); Combito_selector.addEventListener(Event.CHANGE, ComboBoxChanged); Combito_Background.addEventListener(Event.CHANGE, ComboBackChanged); btn_save.addEventListener(MouseEvent.CLICK, SaveClick); btn_TEST.addEventListener(MouseEvent.CLICK, TESTClick); btn_LOAD.addEventListener(MouseEvent.CLICK, LOADClick); btn_ERASE.addEventListener(MouseEvent.CLICK, ERASEClick); btn_CLEAR.addEventListener(MouseEvent.CLICK, CLEARClick); level = 0; } public function GameForumClick(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.coolbuddy.com/games/community/Game_Comments.asp?cat=827"); navigateToURL(_local2, "_blank"); } public function flvl_33(_arg1:MouseEvent){ if (VAULT.Opens[33] == 1){ Levels.LEVEL_33(); startGame(); }; } function frame1(){ MochiAd.showPreGameAd({clip:root, id:"6d3f2e8ece46794c", res:"640x480", background:16119273, color:0xFFBB00, outline:13994812, no_bg:true}); } function frame10(){ stop(); Cbtn_Back.addEventListener(MouseEvent.CLICK, Ebtn_BackClick); Main.prevScreen = "Credits"; btn_Vanilla1.addEventListener(MouseEvent.CLICK, goVanilla); btn_Vanilla2.addEventListener(MouseEvent.CLICK, goVanilla); creds_CoolBuddy.addEventListener(MouseEvent.CLICK, goLEARN); creds_Haini.addEventListener(MouseEvent.CLICK, goHaini); } public function eraseLevelCache():void{ var _local1:panel_Question = new panel_Question(); _local1.x = 320; _local1.y = 240; addChild(_local1); } public function fsubmit_skillful(_arg1:MouseEvent){ var o:Object; var boardID:String; var event = _arg1; if (cat.ttime_skillful.text != "-"){ o = {n:[4, 4, 13, 2, 4, 14, 8, 10, 9, 6, 7, 1, 8, 13, 12, 9], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); MochiScores.showLeaderboard({boardID:boardID, score:Number(cat.ttime_skillful.text)}); kongregate.stats.submit("Skillful levels total time", Number(cat.ttime_skillful.text)); }; } public function flvl_1(_arg1:MouseEvent){ if (VAULT.Opens[1] == 1){ Levels.LEVEL_1(); startGame(); }; } public function flvl_2(_arg1:MouseEvent){ if (VAULT.Opens[2] == 1){ Levels.LEVEL_2(); startGame(); }; } public function flvl_3(_arg1:MouseEvent){ if (VAULT.Opens[3] == 1){ Levels.LEVEL_3(); startGame(); }; } public function flvl_7(_arg1:MouseEvent){ if (VAULT.Opens[7] == 1){ Levels.LEVEL_7(); startGame(); }; } public function flvl_8(_arg1:MouseEvent){ if (VAULT.Opens[8] == 1){ Levels.LEVEL_8(); startGame(); }; } public function flvl_4(_arg1:MouseEvent){ if (VAULT.Opens[4] == 1){ Levels.LEVEL_4(); startGame(); }; } public function flvl_5(_arg1:MouseEvent){ if (VAULT.Opens[5] == 1){ Levels.LEVEL_5(); startGame(); }; } public function flvl_6(_arg1:MouseEvent){ if (VAULT.Opens[6] == 1){ Levels.LEVEL_6(); startGame(); }; } public function goiLoadLevel(_arg1:MouseEvent){ var _local2:Panel_Load_OW = new Panel_Load_OW(); _local2.x = 320; _local2.y = 240; addChild(_local2); } function frame3(){ _mochiads_game_id = "6d3f2e8ece46794c"; } public function ERASEClick(_arg1:MouseEvent){ EditorUI.gdtSel = "ERASE"; } public function restartClick(_arg1:MouseEvent){ world.pressRestart(); } public function flvl_9(_arg1:MouseEvent){ if (VAULT.Opens[9] == 1){ Levels.LEVEL_9(); startGame(); }; } public function goCREATE(_arg1:MouseEvent){ gotoAndPlay("Editor"); } public function SaveClick(_arg1:MouseEvent):void{ EditorUI.GENERAR(); Main.prevScreen = "EditorSave"; gotoAndPlay("prepGame"); } function __setProp_Combito_Background_Scene1_Layer1_6(){ try { Combito_Background["componentInspectorSetting"] = true; } catch(e:Error) { }; collObj2 = new DataProvider(); collProps2 = [{label:"Blueprint", data:"Blueprint"}, {label:"Clouds", data:"Clouds"}, {label:"Enchanted", data:"Fantasy"}, {label:"Universe", data:"Universe"}, {label:"Boscage", data:"Boscage"}, {label:"Lament", data:"Lament"}]; i2 = 0; while (i2 < collProps2.length) { itemObj2 = new SimpleCollectionItem(); collProp2 = collProps2[i2]; for (j2 in collProp2) { itemObj2[j2] = collProp2[j2]; }; collObj2.addItem(itemObj2); i2++; }; Combito_Background.dataProvider = collObj2; Combito_Background.editable = false; Combito_Background.enabled = true; Combito_Background.prompt = ""; Combito_Background.restrict = ""; Combito_Background.rowCount = 5; Combito_Background.visible = true; try { Combito_Background["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function goSALUTE(_arg1:MouseEvent){ gotoAndPlay("Credits"); } } }//package Vanilla
Section 203
//MGame (Vanilla.MGame) package Vanilla { import flash.events.*; import flash.display.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; import flash.text.*; import General.*; import flash.media.*; import Vanilla.Features.*; import Vanilla.Pieces.*; public class MGame extends MovieClip { private var bodyDef:b2BodyDef; public var exitOpen:Boolean;// = false public var boundariesA:MovieClip; private var circleDef:b2CircleDef; private var labelin:TextField; private var numElements:int; var exit:Gdt_Essentials_Finish; private var body:b2Body; private var prevSpeedx:Number;// = 0 private var prevSpeedy:Number;// = 0 private var sinCount:Number;// = 0 var FXSprite:Sprite; public var m_world:b2World; private var boxDef:b2PolygonDef; public var BG:MovieClip; public var m_iterations:int; public var m_timeStep:Number; private var Background:int;// = 0 private var sc:SoundChannel; public var m_sprite:Sprite; private var cling:Sound; public var tutorial:MovieClip; private var bodyAmberball:b2Body; private var st:SoundTransform; private var coolOff:int;// = 10 private var polygonDef:b2PolygonDef; private var worldAABB:b2AABB; public var keys:Key; public var boundariesB:MovieClip; public var boundariesC:MovieClip; public var boundariesD:MovieClip; private var chckSum:Number;// = 0 public var m_input:Input; public static var RedQueue:Array = new Array(); public static var chckQueue:Array = new Array(); public static var gravHorizontal:Number = 0; public static var FQueue:Array = new Array(); public static var time:int = 0; public static var sinus:Number = 0; public static var prevLevel:int = 30; public static var gravInv:Boolean = false; public static var TickQueue:Array = new Array(); public static var gravQueue:Array = new Array(); public static var ActionQueue:Array = new Array(); public static var life:int = 100; public function MGame(){ cling = new FX_Cling(); sc = new SoundChannel(); st = new SoundTransform(1, 0); FXSprite = new Sprite(); super(); addFrameScript(0, frame1); keys = new Key(stage); addChild(FXSprite); FXSprite.x = 0; FXSprite.y = 0; } public function pressExit():void{ finish(); if (Main.prevScreen == "OverWorld"){ MovieClip(parent).gotoAndPlay("OverWorld"); } else { MovieClip(parent).gotoAndPlay("Editor"); }; Main.prevScreen = "mainGame"; } public function finish():void{ life = 100; removeEventListener(Event.ENTER_FRAME, Update); clearQueues(); } private function general_Init():void{ var _local1:int; var _local7:Array; var _local9:*; var _local10:*; var _local11:b2Body; var _local12:P_CheckPoint; var _local13:*; var _local14:Gdt_Static_Bridge; var _local15:int; var _local16:Gdt_Static_Cavity; var _local17:F_PinABox; var _local18:P_VField; var _local19:b2Body; var _local20:b2Body; var _local21:*; var _local22:P_invVField; var _local23:P_HMBlock; var _local24:P_HBLaser; var _local25:P_HLaser; var _local26:P_HFollower; var _local27:P_HFFollower; var _local28:P_HHHitter; var _local29:P_HVHitter; var _local30:P_HMHBlock; var _local31:P_HMVBlock; var _local32:Gdt_Misc_GravityUp; var _local33:Gdt_Misc_GravityRight; var _local34:Gdt_Misc_GravityLeft; var _local35:Gdt_Misc_GravityDown; clearQueues(); life = 100; time = 0; gravInv = false; gravHorizontal = 0; sinCount = 0; m_iterations = 100; m_timeStep = (1 / 30); worldAABB = new b2AABB(); worldAABB.lowerBound.Set(-1000, -1000); worldAABB.upperBound.Set(1000, 1000); var _local2:b2Vec2 = new b2Vec2(0, 12.8); var _local3:Boolean; m_world = new b2World(worldAABB, _local2, _local3); var _local4:b2DebugDraw = new b2DebugDraw(); var _local5:Sprite = new Sprite(); addChild(_local5); _local4.m_sprite = _local5; _local4.m_drawScale = 30; _local4.m_fillAlpha = 0; _local4.m_lineThickness = 1; _local4.m_drawFlags = 4294967295; var _local6:Array = EditorUI.LEVEL_CODE.split(","); var _local8:Gdt_Essentials_Start = new Gdt_Essentials_Start(); _local8.x = 1000; _local8.y = 1000; addChild(_local8); exit = new Gdt_Essentials_Finish(); exit.x = 100; exit.y = 100; addChild(exit); _local1 = 0; while (_local1 < _local6.length) { _local7 = _local6[_local1].split("-"); if (_local7[2] == "E1"){ _local8.x = _local7[0]; _local8.y = _local7[1]; }; if (_local7[2] == "E2"){ exit.x = _local7[0]; exit.y = _local7[1]; }; if (_local7[2] == "E3"){ _local12 = new P_CheckPoint(); _local12.x = _local7[0]; _local12.y = _local7[1]; addChild(_local12); chckQueue.push(_local12); }; if (_local7[2] == "S1"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Platform(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(((_local9.userData.width * scaleX) / 60), ((_local9.userData.height * scaleY) / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S2"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Column(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S3"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Circle(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 60); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S4"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_BCircle(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 60); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S5"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_VBCircle(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 60); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S6"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_SmallBlock(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S7"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Block(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S8"){ _local14 = new Gdt_Static_Bridge(); _local14.x = _local7[0]; _local14.y = _local7[1]; addChild(_local14); _local15 = 1; while (_local15 <= 11) { _local9 = new b2BodyDef(); _local9.angle = ((_local14[("i" + _local15)].rotation * Math.PI) / 180); _local9.position.Set(((_local14[("i" + _local15)].x + _local14.x) / 30), ((_local14[("i" + _local15)].y + _local14.y) / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(((_local14[("i" + _local15)].core.width * _local14[("i" + _local15)].scaleX) / 60), ((_local14[("i" + _local15)].core.height * _local14[("i" + _local15)].scaleY) / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); _local15++; }; }; if (_local7[2] == "S9"){ _local9 = new b2BodyDef(); _local9.angle = 0.785398163; _local9.userData = new Gdt_Static_Column(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S10"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Column(); _local9.angle = 0.392699082; _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S11"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Column(); _local9.angle = 1.17809725; _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S12"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Column(); _local9.angle = -0.785398163; _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S13"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Column(); _local9.angle = -0.392699082; _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S14"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Static_Column(); _local9.angle = -1.17809725; _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "S15"){ _local16 = new Gdt_Static_Cavity(); _local16.x = _local7[0]; _local16.y = _local7[1]; addChild(_local16); _local15 = 1; while (_local15 <= 11) { _local9 = new b2BodyDef(); _local9.angle = ((_local16[("i" + _local15)].rotation * Math.PI) / 180); _local9.position.Set(((_local16[("i" + _local15)].x + _local16.x) / 30), ((_local16[("i" + _local15)].y + _local16.y) / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(((_local16[("i" + _local15)].core.width * _local16[("i" + _local15)].scaleX) / 60), ((_local16[("i" + _local15)].core.height * _local16[("i" + _local15)].scaleY) / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); _local15++; }; }; if (_local7[2] == "L1"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_Column(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 62), (_local9.userData.height / 62)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L2"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_Block(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 62), (_local9.userData.height / 62)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L3"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_BBlock(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 62), (_local9.userData.height / 62)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L4"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_Circle(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 62); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L5"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_BCircle(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 62); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L6"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_PlatformA(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 62), (_local9.userData.height / 62)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L7"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_PlatformB(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 62), (_local9.userData.height / 62)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "L8"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Loose_PlatformC(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local9.allowSleep = false; _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 62), (_local9.userData.height / 62)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addChild(_local9.userData); }; if (_local7[2] == "K1"){ _local17 = new F_PinABox(); _local17.x = _local7[0]; _local17.y = _local7[1]; addChild(_local17); }; if (_local7[2] == "K4"){ _local18 = new P_VField(); _local18.x = _local7[0]; _local18.y = _local7[1]; addChild(_local18); }; if (_local7[2] == "K5"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Mechanism_Motor(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); _local19 = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(0.5, 0.5); _local10.density = 1; _local10.friction = 0; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local20 = _local11; _local21 = new b2RevoluteJointDef(); _local21.Initialize(_local20, _local19, _local20.GetWorldCenter()); _local21.lowerAngle = (-0.5 * Math.PI); _local21.upperAngle = (0.25 * Math.PI); _local21.enableLimit = false; _local21.maxMotorTorque = 1000; _local21.motorSpeed = -1; _local21.enableMotor = true; m_world.CreateJoint(_local21); }; if (_local7[2] == "K6"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Mechanism_MotorInv(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((_local9.userData.width / 60), (_local9.userData.height / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); _local19 = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(0.5, 0.5); _local10.density = 1; _local10.friction = 0; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local20 = _local11; _local21 = new b2RevoluteJointDef(); _local21.Initialize(_local20, _local19, _local20.GetWorldCenter()); _local21.lowerAngle = (-0.5 * Math.PI); _local21.upperAngle = (0.25 * Math.PI); _local21.enableLimit = false; _local21.maxMotorTorque = 1000; _local21.motorSpeed = 1; _local21.enableMotor = true; m_world.CreateJoint(_local21); }; if (_local7[2] == "K7"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Mechanism_MotorCircleB(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 60); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); _local19 = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(0.5, 0.5); _local10.density = 1; _local10.friction = 0; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local20 = _local11; _local21 = new b2RevoluteJointDef(); _local21.Initialize(_local20, _local19, _local20.GetWorldCenter()); _local21.lowerAngle = (-0.5 * Math.PI); _local21.upperAngle = (0.25 * Math.PI); _local21.enableLimit = false; _local21.maxMotorTorque = 1000; _local21.motorSpeed = 5; _local21.enableMotor = true; m_world.CreateJoint(_local21); }; if (_local7[2] == "K8"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Mechanism_MotorCircleBInv(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 60); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); _local19 = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(0.5, 0.5); _local10.density = 1; _local10.friction = 0; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local20 = _local11; _local21 = new b2RevoluteJointDef(); _local21.Initialize(_local20, _local19, _local20.GetWorldCenter()); _local21.lowerAngle = (-0.5 * Math.PI); _local21.upperAngle = (0.25 * Math.PI); _local21.enableLimit = false; _local21.maxMotorTorque = 1000; _local21.motorSpeed = -5; _local21.enableMotor = true; m_world.CreateJoint(_local21); }; if (_local7[2] == "K9"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Mechanism_MotorCircleS(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 65); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); _local19 = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(0.5, 0.5); _local10.density = 1; _local10.friction = 0; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local20 = _local11; _local21 = new b2RevoluteJointDef(); _local21.Initialize(_local20, _local19, _local20.GetWorldCenter()); _local21.lowerAngle = (-0.5 * Math.PI); _local21.upperAngle = (0.25 * Math.PI); _local21.enableLimit = false; _local21.maxMotorTorque = 1000; _local21.motorSpeed = 5; _local21.enableMotor = true; m_world.CreateJoint(_local21); }; if (_local7[2] == "K10"){ _local9 = new b2BodyDef(); _local9.userData = new Gdt_Mechanism_MotorCircleSInv(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local13 = new b2CircleDef(); _local13.radius = (_local9.userData.width / 65); _local13.density = 14; _local13.friction = 0.1; _local13.restitution = 0; _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); _local19 = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((_local7[0] / 30), (_local7[1] / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox(0.5, 0.5); _local10.density = 1; _local10.friction = 0; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local20 = _local11; _local21 = new b2RevoluteJointDef(); _local21.Initialize(_local20, _local19, _local20.GetWorldCenter()); _local21.lowerAngle = (-0.5 * Math.PI); _local21.upperAngle = (0.25 * Math.PI); _local21.enableLimit = false; _local21.maxMotorTorque = 1000; _local21.motorSpeed = -5; _local21.enableMotor = true; m_world.CreateJoint(_local21); }; if (_local7[2] == "K11"){ _local22 = new P_invVField(); _local22.x = _local7[0]; _local22.y = _local7[1]; addChild(_local22); }; if (_local7[2] == "H1"){ _local23 = new P_HMBlock(); _local23.x = (Number(_local7[0]) + 1); _local23.y = _local7[1]; addChild(_local23); }; if (_local7[2] == "H2"){ _local24 = new P_HBLaser(); _local24.x = (Number(_local7[0]) + 1); _local24.y = _local7[1]; addChild(_local24); }; if (_local7[2] == "H3"){ _local25 = new P_HLaser(); _local25.x = (Number(_local7[0]) + 1); _local25.y = _local7[1]; addChild(_local25); }; if (_local7[2] == "H4"){ _local26 = new P_HFollower(); _local26.x = (Number(_local7[0]) + 2); _local26.y = (Number(_local7[1]) + 2); addChild(_local26); }; if (_local7[2] == "H5"){ _local27 = new P_HFFollower(); if ((((_local7[0] < 30)) && ((_local7[1] < 30)))){ _local27.x = 20; _local27.x = 20; } else { _local27.x = Number(_local7[0]); _local27.y = Number(_local7[1]); }; addChild(_local27); }; if (_local7[2] == "H6"){ _local28 = new P_HHHitter(); _local28.x = (Number(_local7[0]) + 1); _local28.y = _local7[1]; addChild(_local28); }; if (_local7[2] == "H7"){ _local29 = new P_HVHitter(); _local29.x = (Number(_local7[0]) + 1); _local29.y = _local7[1]; addChild(_local29); }; if (_local7[2] == "H8"){ _local30 = new P_HMHBlock(); _local30.x = (Number(_local7[0]) + 1); _local30.y = _local7[1]; addChild(_local30); }; if (_local7[2] == "H9"){ _local31 = new P_HMVBlock(); _local31.x = (Number(_local7[0]) + 1); _local31.y = _local7[1]; addChild(_local31); }; if (_local7[2] == "M1"){ }; if (_local7[2] == "M2"){ }; if (_local7[2] == "M3"){ }; if (_local7[2] == "M4"){ }; if (_local7[2] == "M5"){ _local32 = new Gdt_Misc_GravityUp(); _local32.x = _local7[0]; _local32.y = _local7[1]; _local32.tipo = "Up"; addChild(_local32); gravQueue.push(_local32); }; if (_local7[2] == "M6"){ _local33 = new Gdt_Misc_GravityRight(); _local33.x = _local7[0]; _local33.y = _local7[1]; _local33.tipo = "Right"; addChild(_local33); gravQueue.push(_local33); }; if (_local7[2] == "M7"){ _local34 = new Gdt_Misc_GravityLeft(); _local34.x = _local7[0]; _local34.y = _local7[1]; _local34.tipo = "Left"; addChild(_local34); gravQueue.push(_local34); }; if (_local7[2] == "M8"){ _local35 = new Gdt_Misc_GravityDown(); _local35.x = _local7[0]; _local35.y = _local7[1]; _local35.tipo = "Down"; addChild(_local35); gravQueue.push(_local35); }; if (_local7[2] == "BG0"){ Background = 1; }; if (_local7[2] == "BG1"){ Background = 2; }; if (_local7[2] == "BG2"){ Background = 3; }; if (_local7[2] == "BG3"){ Background = 4; }; if (_local7[2] == "BG4"){ Background = 5; }; if (_local7[2] == "BG5"){ Background = 6; }; _local1++; }; _local1 = 0; while (_local1 < FQueue.length) { FQueue[_local1].Init(m_world, this); _local1++; }; _local9 = new b2BodyDef(); _local9.position.Set((_local8.x / 30), (_local8.y / 30)); _local13 = new b2CircleDef(); _local13.radius = 0.4; _local13.restitution = 0.6; _local13.friction = 0.11; _local13.density = 25; _local9.linearDamping = 0.2; _local9.angularDamping = 4; _local9.userData = new Mdl_Original(); _local9.userData.width = ((0.4 * 2) * 30); _local9.userData.height = ((0.4 * 2) * 30); _local11 = m_world.CreateDynamicBody(_local9); _local11.CreateShape(_local13); _local11.SetMassFromShapes(); bodyAmberball = _local11; addChild(_local9.userData); _local9 = new b2BodyDef(); _local9.position.Set((2106 / 30), (2120 / 30)); _local10 = new b2PolygonDef(); _local10.SetAsBox((3851 / 60), (179 / 60)); _local10.density = 14; _local10.friction = 0.1; _local10.restitution = 0; _local11 = m_world.CreateStaticBody(_local9); _local11.CreateShape(_local10); _local11.SetMassFromShapes(); addEventListener(Event.ENTER_FRAME, Update, false, 0, true); } public function clearQueues():void{ TickQueue.splice(0, TickQueue.length); FQueue.splice(0, FQueue.length); RedQueue.splice(0, RedQueue.length); ActionQueue.splice(0, ActionQueue.length); chckQueue.splice(0, chckQueue.length); gravQueue.splice(0, gravQueue.length); } public function pressRestart():void{ finish(); MovieClip(parent).gotoAndPlay("prepGame"); } public function pressLevelEditor():void{ finish(); MovieClip(parent).gotoAndPlay("Editor"); Main.prevScreen = "mainGame"; } public function Update(_arg1:Event):void{ var _local2:int; var _local8:Panel_Save; sinCount = (sinCount + 0.07); sinus = ((Math.sin(sinCount) * 3) + 0.025); time++; var _local3:int = TickQueue.length; _local2 = 0; while (_local2 < _local3) { TickQueue[_local2].tick(); _local2++; }; if (this.hasOwnProperty(("Actions_frame_" + currentFrame))){ var _local9 = this; _local9[("Actions_frame_" + currentFrame)](); }; if (life <= 0){ finish(); MovieClip(parent).gotoAndPlay("prepGame"); }; var _local4:int = ActionQueue.length; _local2 = 0; while (_local2 < ActionQueue.length) { if (ActionQueue[_local2].area.hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ ActionQueue[_local2].action(bodyAmberball); }; _local2++; }; if (contains(exit)){ if (exitOpen){ if (exit.hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ finish(); if (Main.prevScreen == "EditorSave"){ Main.prevScreen = "mainGame"; MovieClip(parent).gotoAndPlay("Editor"); _local8 = new Panel_Save(); _local8.x = 320; _local8.y = 240; MovieClip(parent).addChild(_local8); }; if (Main.prevScreen == "OverWorld"){ Main.prevScreen = "mainGame"; MovieClip(parent).gotoAndPlay("OverWorld"); if (!VAULT.Times[Main.level]){ if (Main.level < 8){ if (VAULT.Times.length < 7){ VAULT.Opens.push(1); VAULT.Opens.push(1); }; } else { if (Main.level < 17){ if (VAULT.Times.length < 16){ VAULT.Opens.push(1); VAULT.Opens.push(1); }; } else { if (Main.level < 30){ if (VAULT.Times.length < 29){ VAULT.Opens.push(1); VAULT.Opens.push(1); }; }; }; }; }; if (!VAULT.Times[Main.level]){ VAULT.Times[Main.level] = time; } else { if (time < VAULT.Times[Main.level]){ VAULT.Times[Main.level] = time; }; }; VAULT.SAVE(); MovieClip(parent).winAni.play(); }; if (Main.prevScreen == "EditorTest"){ Main.prevScreen = "mainGame"; MovieClip(parent).gotoAndPlay("Editor"); }; }; }; }; var _local5:int = RedQueue.length; if (RedQueue){ _local2 = 0; while (_local2 < _local5) { if (RedQueue[_local2]){ if (RedQueue[_local2].hasOwnProperty("follower")){ if (RedQueue[_local2].x > (bodyAmberball.m_userData.x + 1)){ RedQueue[_local2].x = (RedQueue[_local2].x - RedQueue[_local2].follower); } else { if (RedQueue[_local2].x < bodyAmberball.m_userData.x){ RedQueue[_local2].x = (RedQueue[_local2].x + RedQueue[_local2].follower); }; }; if (RedQueue[_local2].y > (bodyAmberball.m_userData.y + 1)){ RedQueue[_local2].y = (RedQueue[_local2].y - RedQueue[_local2].follower); } else { if (RedQueue[_local2].y < bodyAmberball.m_userData.y){ RedQueue[_local2].y = (RedQueue[_local2].y + RedQueue[_local2].follower); }; }; }; }; if (RedQueue[_local2]){ if (RedQueue[_local2].hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ life = 100; finish(); clearQueues(); MovieClip(parent).gotoAndPlay("prepGame"); }; }; _local2++; }; }; var _local6:int = gravQueue.length; _local2 = 0; while (_local2 < _local6) { if (gravQueue[_local2].hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ if (gravQueue[_local2].tipo == "Up"){ m_world.m_gravity = new b2Vec2(0, -12.8); gravInv = true; gravHorizontal = 0; } else { if (gravQueue[_local2].tipo == "Down"){ m_world.m_gravity = new b2Vec2(0, 12.8); gravInv = false; gravHorizontal = 0; } else { if (gravQueue[_local2].tipo == "Left"){ m_world.m_gravity = new b2Vec2(-12.8, 0); gravHorizontal = -1; } else { if (gravQueue[_local2].tipo == "Right"){ m_world.m_gravity = new b2Vec2(12.8, 0); gravHorizontal = 1; }; }; }; }; }; _local2++; }; exitOpen = true; chckSum = 0; _local2 = 0; while (_local2 < chckQueue.length) { if (chckQueue[_local2].ON){ chckSum++; }; _local2++; }; if (chckSum >= chckQueue.length){ exitOpen = true; } else { exitOpen = false; }; if (exitOpen){ exit.alpha = 1; } else { exit.alpha = 0.2; }; if (boundariesA){ if (contains(boundariesA)){ if (boundariesA.hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ pressRestart(); }; }; }; if (boundariesB){ if (contains(boundariesB)){ if (boundariesB.hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ pressRestart(); }; }; }; if (boundariesC){ if (contains(boundariesC)){ if (boundariesC.hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ pressRestart(); }; }; }; if (boundariesD){ if (contains(boundariesD)){ if (boundariesD.hitTestPoint((bodyAmberball.m_userData.x + x), (bodyAmberball.m_userData.y + y))){ pressRestart(); }; }; }; if ((bodyAmberball.m_userData.x + x) > 420){ BG.sky.x = (BG.sky.x + (((bodyAmberball.m_userData.x + x) - 420) * 0.47)); x = (x - (((bodyAmberball.m_userData.x + x) - 420) * 0.5)); }; if ((bodyAmberball.m_userData.x + x) < 220){ BG.sky.x = (BG.sky.x + (((bodyAmberball.m_userData.x + x) - 220) * 0.47)); x = (x - (((bodyAmberball.m_userData.x + x) - 220) * 0.5)); }; if ((bodyAmberball.m_userData.y + y) > 200){ BG.sky.y = (BG.sky.y + (((bodyAmberball.m_userData.y + y) - 200) * 0.47)); y = (y - (((bodyAmberball.m_userData.y + y) - 200) * 0.5)); }; if ((bodyAmberball.m_userData.y + y) < 200){ BG.sky.y = (BG.sky.y + (((bodyAmberball.m_userData.y + y) - 200) * 0.47)); y = (y - (((bodyAmberball.m_userData.y + y) - 200) * 0.5)); }; if (this.hasOwnProperty(("Camera_frame_" + currentFrame))){ _local9 = this; _local9[("Camera_frame_" + currentFrame)](); }; m_world.Step(m_timeStep, m_iterations); if (keys.isDown(37)){ bodyAmberball.ApplyTorque(-170); if (gravHorizontal == 0){ bodyAmberball.ApplyForce(new b2Vec2(-170, 0), bodyAmberball.GetWorldCenter()); } else { if (gravHorizontal == 1){ bodyAmberball.ApplyForce(new b2Vec2(0, 170), bodyAmberball.GetWorldCenter()); } else { if (gravHorizontal == -1){ bodyAmberball.ApplyForce(new b2Vec2(0, -170), bodyAmberball.GetWorldCenter()); }; }; }; }; if (keys.isDown(39)){ bodyAmberball.ApplyTorque(170); if (gravHorizontal == 0){ bodyAmberball.ApplyForce(new b2Vec2(170, 0), bodyAmberball.GetWorldCenter()); } else { if (gravHorizontal == 1){ bodyAmberball.ApplyForce(new b2Vec2(0, -170), bodyAmberball.GetWorldCenter()); } else { if (gravHorizontal == -1){ bodyAmberball.ApplyForce(new b2Vec2(0, 170), bodyAmberball.GetWorldCenter()); }; }; }; }; if (keys.isDown(82)){ pressRestart(); }; if (keys.isDown(69)){ pressExit(); }; if (MovieClip(parent).time_txt){ if (MovieClip(parent).contains(MovieClip(parent).time_txt)){ MovieClip(parent).time_txt.text = String(time); }; }; if (MovieClip(parent).check_txt){ if (MovieClip(parent).contains(MovieClip(parent).check_txt)){ MovieClip(parent).check_txt.text = ((String(chckSum) + "/") + String(chckQueue.length)); }; }; var _local7:b2Body = m_world.m_bodyList; while (_local7) { if ((_local7.m_userData is Sprite)){ _local7.m_userData.x = (_local7.GetPosition().x * 30); _local7.m_userData.y = (_local7.GetPosition().y * 30); _local7.m_userData.rotation = (_local7.GetAngle() * (180 / Math.PI)); if (_local7.m_userData.hasOwnProperty("brillo")){ _local7.m_userData.brillo.rotation = -(_local7.m_userData.rotation); }; if (_local7.m_userData.hasOwnProperty("brillo_2")){ _local7.m_userData.brillo_2.rotation = -(_local7.m_userData.rotation); }; if (_local7.m_userData.hasOwnProperty("brillo_3")){ _local7.m_userData.brillo_3.rotation = -(_local7.m_userData.rotation); }; if (_local7.m_userData.hasOwnProperty("brillo")){ _local7.m_userData.brillo.alpha = ((_local7.GetLinearVelocity().Length() / 15) + 0.4); }; if (_local7.m_userData.hasOwnProperty("brillo_2")){ _local7.m_userData.brillo_2.alpha = ((_local7.GetLinearVelocity().Length() / 12) + 0.4); }; }; _local7 = _local7.m_next; }; if (Math.abs((prevSpeedx - bodyAmberball.GetLinearVelocity().x)) > 6){ st.volume = 0.07; sc.soundTransform = st; sc = cling.play(); }; if (Math.abs((prevSpeedy - bodyAmberball.GetLinearVelocity().y)) > 6){ st.volume = 0.03; sc.soundTransform = st; sc = cling.play(); }; prevSpeedx = bodyAmberball.GetLinearVelocity().x; prevSpeedy = bodyAmberball.GetLinearVelocity().y; } function frame1(){ stop(); general_Init(); BG.gotoAndStop(Background); stage.focus = this; MovieClip(parent).stage.focus = this; if (Main.level == 1){ tutorial.visible = true; } else { tutorial.visible = false; }; } } }//package Vanilla
Section 204
//Piece (Vanilla.Piece) package Vanilla { import flash.display.*; public class Piece extends MovieClip { public var i10:MovieClip; public var i11:MovieClip; public var area:MovieClip; public var inner:MovieClip; public var core:Gdt_Static_Platform; public var i1:MovieClip; public var i2:MovieClip; public var i3:MovieClip; public var i4:MovieClip; public var i5:MovieClip; public var i6:MovieClip; public var i7:MovieClip; public var i8:MovieClip; public var i9:MovieClip; public var tipo:String;// = "INVALID" public static var pQueue:Array = new Array(); } }//package Vanilla
Section 205
//VAULT (Vanilla.VAULT) package Vanilla { import flash.net.*; public class VAULT { public static var Times:Array; public static var Opens:Array; public static var DaBa:SharedObject; public static function INITALIZE(){ DaBa = SharedObject.getLocal("AA_SaveFile"); if (DaBa.data.hasOwnProperty("Times")){ Times = DaBa.data.Times; } else { Times = new Array(); }; if (DaBa.data.hasOwnProperty("Opens")){ Opens = DaBa.data.Opens; } else { Opens = new Array(); Opens.push(1); Opens.push(1); }; } public static function SAVE(){ DaBa.data.Times = Times; DaBa.data.Opens = Opens; DaBa.flush(); } } }//package Vanilla
Section 206
//BoulderGfx (BoulderGfx) package { import flash.display.*; public dynamic class BoulderGfx extends MovieClip { } }//package
Section 207
//BrickThread (BrickThread) package { import flash.display.*; public dynamic class BrickThread extends MovieClip { public var core:MovieClip; } }//package
Section 208
//BridgePlank (BridgePlank) package { import flash.display.*; public dynamic class BridgePlank extends MovieClip { } }//package
Section 209
//BridgePlankwBolt (BridgePlankwBolt) package { import flash.display.*; public dynamic class BridgePlankwBolt extends MovieClip { public var core:f_s_plank; } }//package
Section 210
//Button_disabledSkin (Button_disabledSkin) package { import flash.display.*; public dynamic class Button_disabledSkin extends MovieClip { } }//package
Section 211
//Button_downSkin (Button_downSkin) package { import flash.display.*; public dynamic class Button_downSkin extends MovieClip { } }//package
Section 212
//Button_emphasizedSkin (Button_emphasizedSkin) package { import flash.display.*; public dynamic class Button_emphasizedSkin extends MovieClip { } }//package
Section 213
//Button_overSkin (Button_overSkin) package { import flash.display.*; public dynamic class Button_overSkin extends MovieClip { } }//package
Section 214
//Button_selectedDisabledSkin (Button_selectedDisabledSkin) package { import flash.display.*; public dynamic class Button_selectedDisabledSkin extends MovieClip { } }//package
Section 215
//Button_selectedDownSkin (Button_selectedDownSkin) package { import flash.display.*; public dynamic class Button_selectedDownSkin extends MovieClip { } }//package
Section 216
//Button_selectedOverSkin (Button_selectedOverSkin) package { import flash.display.*; public dynamic class Button_selectedOverSkin extends MovieClip { } }//package
Section 217
//Button_selectedUpSkin (Button_selectedUpSkin) package { import flash.display.*; public dynamic class Button_selectedUpSkin extends MovieClip { } }//package
Section 218
//Button_upSkin (Button_upSkin) package { import flash.display.*; public dynamic class Button_upSkin extends MovieClip { } }//package
Section 219
//CellRenderer_disabledSkin (CellRenderer_disabledSkin) package { import flash.display.*; public dynamic class CellRenderer_disabledSkin extends MovieClip { } }//package
Section 220
//CellRenderer_downSkin (CellRenderer_downSkin) package { import flash.display.*; public dynamic class CellRenderer_downSkin extends MovieClip { } }//package
Section 221
//CellRenderer_overSkin (CellRenderer_overSkin) package { import flash.display.*; public dynamic class CellRenderer_overSkin extends MovieClip { } }//package
Section 222
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip { } }//package
Section 223
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedDownSkin extends MovieClip { } }//package
Section 224
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedOverSkin extends MovieClip { } }//package
Section 225
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedUpSkin extends MovieClip { } }//package
Section 226
//CellRenderer_upSkin (CellRenderer_upSkin) package { import flash.display.*; public dynamic class CellRenderer_upSkin extends MovieClip { } }//package
Section 227
//ColoredBrick (ColoredBrick) package { import flash.display.*; public dynamic class ColoredBrick extends MovieClip { public var core:MovieClip; } }//package
Section 228
//ColoredColumn (ColoredColumn) package { import flash.display.*; public dynamic class ColoredColumn extends MovieClip { public var core:MovieClip; } }//package
Section 229
//ComboBox_disabledSkin (ComboBox_disabledSkin) package { import flash.display.*; public dynamic class ComboBox_disabledSkin extends MovieClip { } }//package
Section 230
//ComboBox_downSkin (ComboBox_downSkin) package { import flash.display.*; public dynamic class ComboBox_downSkin extends MovieClip { } }//package
Section 231
//ComboBox_overSkin (ComboBox_overSkin) package { import flash.display.*; public dynamic class ComboBox_overSkin extends MovieClip { } }//package
Section 232
//ComboBox_upSkin (ComboBox_upSkin) package { import flash.display.*; public dynamic class ComboBox_upSkin extends MovieClip { } }//package
Section 233
//Cuadrenemy (Cuadrenemy) package { import flash.display.*; public dynamic class Cuadrenemy extends MovieClip { public var red:MovieClip; } }//package
Section 234
//Exit_inner (Exit_inner) package { import flash.display.*; public dynamic class Exit_inner extends MovieClip { public var core:MovieClip; } }//package
Section 235
//f_p_gear (f_p_gear) package { import flash.display.*; public dynamic class f_p_gear extends MovieClip { } }//package
Section 236
//f_s_board (f_s_board) package { import flash.display.*; public dynamic class f_s_board extends MovieClip { } }//package
Section 237
//f_s_horBasic (f_s_horBasic) package { import flash.display.*; public dynamic class f_s_horBasic extends MovieClip { } }//package
Section 238
//f_s_plank (f_s_plank) package { import flash.display.*; public dynamic class f_s_plank extends MovieClip { } }//package
Section 239
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 240
//FX_Cling (FX_Cling) package { import flash.media.*; public dynamic class FX_Cling extends Sound { } }//package
Section 241
//Gadgetlist (Gadgetlist) package { import flash.events.*; import flash.display.*; import Vanilla.*; public dynamic class Gadgetlist extends MovieClip { public var btn_loose_platforma:MovieClip; public var btn_loose_platformb:MovieClip; public var btn_loose_platformc:MovieClip; public var btn_mechanism_forcecolumnv:MovieClip; public var btn_essentials_finish:MovieClip; public var btn_essentials_start:MovieClip; public var btn_static_invdiagonal45:MovieClip; public var btn_loose_column:MovieClip; public var btn_static_circle:MovieClip; public var btn_misc_disappearingplatform:MovieClip; public var btn_static_bcircle:MovieClip; public var btn_hazard_fastfollower:MovieClip; public var btn_mechanism_motor:MovieClip; public var btn_loose_bblock:MovieClip; public var btn_hazard_hhitter:MovieClip; public var btn_static_smallblock:MovieClip; public var btn_static_cavity:MovieClip; public var btn_static_platform:MovieClip; public var btn_misc_gravity_down:MovieClip; public var btn_mechanism_motorinv:MovieClip; public var btn_loose_block:MovieClip; public var btn_static_vbcircle:MovieClip; public var btn_mechanism_motorcirclebinv:MovieClip; public var btn_misc_composedbridge:MovieClip; public var btn_loose_bcircle:MovieClip; public var btn_static_block:MovieClip; public var btn_misc_hangingplank:MovieClip; public var btn_misc_gravity_up:MovieClip; public var btn_essentials_checkpoint:MovieClip; public var btn_loose_circle:MovieClip; public var btn_mechanism_motorcirclesinv:MovieClip; public var btn_hazard_vmagma:MovieClip; public var btn_misc_gravity_right:MovieClip; public var btn_static_column:MovieClip; public var btn_misc_gravity_left:MovieClip; public var btn_hazard_vhitter:MovieClip; public var btn_static_diagonala:MovieClip; public var btn_static_diagonalb:MovieClip; public var btn_static_diagonal45:MovieClip; public var btn_static_invdiagonala:MovieClip; public var btn_static_invdiagonalb:MovieClip; public var btn_hazard_slowfollower:MovieClip; public var btn_static_bridge:MovieClip; public var btn_mechanism_elevator:MovieClip; public var btn_hazard_blockmagma:MovieClip; public var btn_mechanism_motorcircleb:MovieClip; public var btn_hazard_hmagma:MovieClip; public var btn_misc_composedspring:MovieClip; public var btn_mechanism_motorcircles:MovieClip; public function Gadgetlist(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7); } public function btn_mechanism_forcecolumnv_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_ForceColumnV"; clean_state_mechanisms(); btn_mechanism_forcecolumnv.gotoAndStop(2); } public function btn_static_diagonalb_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_DiagonalB"; clean_state_static(); btn_static_diagonalb.gotoAndStop(2); } public function btn_mechanism_motorinv_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_MotorInv"; clean_state_mechanisms(); btn_mechanism_motorinv.gotoAndStop(2); } public function btn_loose_platforma_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_PlatformA"; clean_state_loose(); btn_loose_platforma.gotoAndStop(2); } public function btn_static_bridge_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Bridge"; clean_state_static(); btn_static_bridge.gotoAndStop(2); } public function clean_state_static():void{ btn_static_bcircle.gotoAndStop(1); btn_static_block.gotoAndStop(1); btn_static_bridge.gotoAndStop(1); btn_static_circle.gotoAndStop(1); btn_static_column.gotoAndStop(1); btn_static_diagonal45.gotoAndStop(1); btn_static_diagonala.gotoAndStop(1); btn_static_diagonalb.gotoAndStop(1); btn_static_invdiagonal45.gotoAndStop(1); btn_static_invdiagonala.gotoAndStop(1); btn_static_invdiagonalb.gotoAndStop(1); btn_static_platform.gotoAndStop(1); btn_static_smallblock.gotoAndStop(1); btn_static_vbcircle.gotoAndStop(1); btn_static_cavity.gotoAndStop(1); } public function btn_loose_column_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_Column"; clean_state_loose(); btn_loose_column.gotoAndStop(2); } public function btn_static_circle_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Circle"; clean_state_static(); btn_static_circle.gotoAndStop(2); } public function btn_loose_block_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_Block"; clean_state_loose(); btn_loose_block.gotoAndStop(2); } public function btn_static_column_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Column"; clean_state_static(); btn_static_column.gotoAndStop(2); } public function btn_misc_gravity_left_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_GravityLeft"; clean_state_misc(); btn_misc_gravity_left.gotoAndStop(2); } public function btn_loose_circle_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_Circle"; clean_state_loose(); btn_loose_circle.gotoAndStop(2); } public function btn_static_platform_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Platform"; clean_state_static(); btn_static_platform.gotoAndStop(2); } public function btn_mechanism_elevator_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_Elevator"; clean_state_mechanisms(); btn_mechanism_elevator.gotoAndStop(2); } public function btn_misc_disappearingplatform_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_DisappearingPlatform"; clean_state_misc(); btn_misc_disappearingplatform.gotoAndStop(2); } public function btn_misc_gravity_up_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_GravityUp"; clean_state_misc(); btn_misc_gravity_up.gotoAndStop(2); } public function btn_misc_composedspring_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_ComposedSpring"; clean_state_misc(); btn_misc_composedspring.gotoAndStop(2); } public function btn_mechanism_motorcircles_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_MotorCircleS"; clean_state_mechanisms(); btn_mechanism_motorcircles.gotoAndStop(2); } public function btn_static_diagonal45_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Diagonal45"; clean_state_static(); btn_static_diagonal45.gotoAndStop(2); } public function btn_static_vbcircle_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_VBCircle"; clean_state_static(); btn_static_vbcircle.gotoAndStop(2); } public function btn_essentials_finish_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Essentials_Finish"; clean_state_essentials(); btn_essentials_finish.gotoAndStop(2); } public function btn_mechanism_hthruster_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_HThruster"; clean_state_mechanisms(); } public function btn_loose_platformb_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_PlatformB"; clean_state_loose(); btn_loose_platformb.gotoAndStop(2); } public function btn_essentials_start_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Essentials_Start"; clean_state_essentials(); btn_essentials_start.gotoAndStop(2); } function frame1(){ gotoAndStop("Essentials"); } function frame2(){ btn_static_bcircle.addEventListener(MouseEvent.CLICK, btn_static_bcircle_click); btn_static_block.addEventListener(MouseEvent.CLICK, btn_static_block_click); btn_static_bridge.addEventListener(MouseEvent.CLICK, btn_static_bridge_click); btn_static_circle.addEventListener(MouseEvent.CLICK, btn_static_circle_click); btn_static_column.addEventListener(MouseEvent.CLICK, btn_static_column_click); btn_static_diagonal45.addEventListener(MouseEvent.CLICK, btn_static_diagonal45_click); btn_static_diagonala.addEventListener(MouseEvent.CLICK, btn_static_diagonala_click); btn_static_diagonalb.addEventListener(MouseEvent.CLICK, btn_static_diagonalb_click); btn_static_invdiagonal45.addEventListener(MouseEvent.CLICK, btn_static_invdiagonal45_click); btn_static_invdiagonala.addEventListener(MouseEvent.CLICK, btn_static_invdiagonala_click); btn_static_invdiagonalb.addEventListener(MouseEvent.CLICK, btn_static_invdiagonalb_click); btn_static_platform.addEventListener(MouseEvent.CLICK, btn_static_platform_click); btn_static_smallblock.addEventListener(MouseEvent.CLICK, btn_static_smallblock_click); btn_static_vbcircle.addEventListener(MouseEvent.CLICK, btn_static_vbcircle_click); btn_static_cavity.addEventListener(MouseEvent.CLICK, btn_static_cavity_click); } function frame3(){ btn_hazard_blockmagma.addEventListener(MouseEvent.CLICK, btn_hazard_blockmagma_click); btn_hazard_fastfollower.addEventListener(MouseEvent.CLICK, btn_hazard_fastfollower_click); btn_hazard_hmagma.addEventListener(MouseEvent.CLICK, btn_hazard_hmagma_click); btn_hazard_slowfollower.addEventListener(MouseEvent.CLICK, btn_hazard_slowfollower_click); btn_hazard_vmagma.addEventListener(MouseEvent.CLICK, btn_hazard_vmagma_click); btn_hazard_hhitter.addEventListener(MouseEvent.CLICK, btn_hazard_hhitter_click); btn_hazard_vhitter.addEventListener(MouseEvent.CLICK, btn_hazard_vhitter_click); } function frame4(){ btn_loose_bblock.addEventListener(MouseEvent.CLICK, btn_loose_bblock_click); btn_loose_block.addEventListener(MouseEvent.CLICK, btn_loose_block_click); btn_loose_bcircle.addEventListener(MouseEvent.CLICK, btn_loose_bcircle_click); btn_loose_column.addEventListener(MouseEvent.CLICK, btn_loose_column_click); btn_loose_circle.addEventListener(MouseEvent.CLICK, btn_loose_circle_click); btn_loose_platforma.addEventListener(MouseEvent.CLICK, btn_loose_platforma_click); btn_loose_platformb.addEventListener(MouseEvent.CLICK, btn_loose_platformb_click); btn_loose_platformc.addEventListener(MouseEvent.CLICK, btn_loose_platformc_click); } function frame6(){ btn_misc_composedbridge.addEventListener(MouseEvent.CLICK, btn_misc_composedbridge_click); btn_misc_disappearingplatform.addEventListener(MouseEvent.CLICK, btn_misc_disappearingplatform_click); btn_misc_hangingplank.addEventListener(MouseEvent.CLICK, btn_misc_hangingplank_click); btn_misc_composedspring.addEventListener(MouseEvent.CLICK, btn_misc_composedspring_click); btn_misc_gravity_down.addEventListener(MouseEvent.CLICK, btn_misc_gravity_down_click); btn_misc_gravity_up.addEventListener(MouseEvent.CLICK, btn_misc_gravity_up_click); btn_misc_gravity_left.addEventListener(MouseEvent.CLICK, btn_misc_gravity_left_click); btn_misc_gravity_right.addEventListener(MouseEvent.CLICK, btn_misc_gravity_right_click); } function frame7(){ stop(); btn_essentials_checkpoint.addEventListener(MouseEvent.CLICK, btn_essentials_checkpoint_click); btn_essentials_finish.addEventListener(MouseEvent.CLICK, btn_essentials_finish_click); btn_essentials_start.addEventListener(MouseEvent.CLICK, btn_essentials_start_click); } public function btn_hazard_blockmagma_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_BlockMagma"; clean_state_hazard(); btn_hazard_blockmagma.gotoAndStop(2); } function frame5(){ btn_mechanism_elevator.addEventListener(MouseEvent.CLICK, btn_mechanism_elevator_click); btn_mechanism_forcecolumnv.addEventListener(MouseEvent.CLICK, btn_mechanism_forcecolumnv_click); btn_mechanism_motor.addEventListener(MouseEvent.CLICK, btn_mechanism_motor_click); btn_mechanism_motorcircleb.addEventListener(MouseEvent.CLICK, btn_mechanism_motorcircleb_click); btn_mechanism_motorcirclebinv.addEventListener(MouseEvent.CLICK, btn_mechanism_motorcirclebinv_click); btn_mechanism_motorcircles.addEventListener(MouseEvent.CLICK, btn_mechanism_motorcircles_click); btn_mechanism_motorcirclesinv.addEventListener(MouseEvent.CLICK, btn_mechanism_motorcirclesinv_click); btn_mechanism_motorinv.addEventListener(MouseEvent.CLICK, btn_mechanism_motorinv_click); } public function btn_loose_bcircle_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_BCircle"; clean_state_loose(); btn_loose_bcircle.gotoAndStop(2); } public function btn_loose_bblock_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_BBlock"; clean_state_loose(); btn_loose_bblock.gotoAndStop(2); } public function clean_state_loose():void{ btn_loose_bblock.gotoAndStop(1); btn_loose_block.gotoAndStop(1); btn_loose_bcircle.gotoAndStop(1); btn_loose_column.gotoAndStop(1); btn_loose_circle.gotoAndStop(1); btn_loose_platforma.gotoAndStop(1); btn_loose_platformb.gotoAndStop(1); btn_loose_platformc.gotoAndStop(1); } public function btn_misc_hangingplank_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_HangingPlank"; clean_state_misc(); btn_misc_hangingplank.gotoAndStop(2); } public function btn_misc_gravity_down_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_GravityDown"; clean_state_misc(); btn_misc_gravity_down.gotoAndStop(2); } public function clean_state_misc():void{ btn_misc_composedspring.gotoAndStop(1); btn_misc_composedbridge.gotoAndStop(1); btn_misc_disappearingplatform.gotoAndStop(1); btn_misc_hangingplank.gotoAndStop(1); btn_misc_gravity_up.gotoAndStop(1); btn_misc_gravity_down.gotoAndStop(1); btn_misc_gravity_left.gotoAndStop(1); btn_misc_gravity_right.gotoAndStop(1); } public function btn_loose_platformc_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Loose_PlatformC"; clean_state_loose(); btn_loose_platformc.gotoAndStop(2); } public function clean_state_essentials():void{ btn_essentials_checkpoint.gotoAndStop(1); btn_essentials_finish.gotoAndStop(1); btn_essentials_start.gotoAndStop(1); } public function btn_static_invdiagonala_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_InvDiagonalA"; clean_state_static(); btn_static_invdiagonala.gotoAndStop(2); } public function btn_static_bcircle_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_BCircle"; clean_state_static(); btn_static_bcircle.gotoAndStop(2); } public function btn_hazard_hmagma_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_HMagma"; clean_state_hazard(); btn_hazard_hmagma.gotoAndStop(2); } public function btn_static_cavity_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Cavity"; clean_state_static(); btn_static_cavity.gotoAndStop(2); } public function clean_state_hazard():void{ btn_hazard_blockmagma.gotoAndStop(1); btn_hazard_fastfollower.gotoAndStop(1); btn_hazard_hhitter.gotoAndStop(1); btn_hazard_hmagma.gotoAndStop(1); btn_hazard_slowfollower.gotoAndStop(1); btn_hazard_vhitter.gotoAndStop(1); btn_hazard_vmagma.gotoAndStop(1); } public function btn_mechanism_motorcirclesinv_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_MotorCircleSInv"; clean_state_mechanisms(); btn_mechanism_motorcirclesinv.gotoAndStop(2); } public function btn_hazard_fastfollower_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_FastFollower"; clean_state_hazard(); btn_hazard_fastfollower.gotoAndStop(2); } public function btn_static_smallblock_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_SmallBlock"; clean_state_static(); btn_static_smallblock.gotoAndStop(2); } public function btn_mechanism_motorcirclebinv_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_MotorCircleBInv"; clean_state_mechanisms(); btn_mechanism_motorcirclebinv.gotoAndStop(2); } public function btn_mechanism_vthruster_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_VThruster"; clean_state_mechanisms(); } public function btn_hazard_vhitter_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_VHitter"; clean_state_hazard(); btn_hazard_vhitter.gotoAndStop(2); } public function btn_static_diagonala_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_DiagonalA"; clean_state_static(); btn_static_diagonala.gotoAndStop(2); } public function btn_static_block_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_Block"; clean_state_static(); btn_static_block.gotoAndStop(2); } public function btn_hazard_slowfollower_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_SlowFollower"; clean_state_hazard(); btn_hazard_slowfollower.gotoAndStop(2); } public function btn_hazard_hhitter_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_HHitter"; clean_state_hazard(); btn_hazard_hhitter.gotoAndStop(2); } public function btn_static_invdiagonalb_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_InvDiagonalB"; clean_state_static(); btn_static_invdiagonalb.gotoAndStop(2); } public function btn_essentials_checkpoint_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Essentials_Checkpoint"; clean_state_essentials(); btn_essentials_checkpoint.gotoAndStop(2); } public function btn_misc_composedbridge_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_ComposedBridge"; clean_state_misc(); btn_misc_composedbridge.gotoAndStop(2); } public function btn_static_invdiagonal45_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Static_InvDiagonal45"; clean_state_static(); btn_static_invdiagonal45.gotoAndStop(2); } public function btn_hazard_vmagma_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Hazard_VMagma"; clean_state_hazard(); btn_hazard_vmagma.gotoAndStop(2); } public function clean_state_mechanisms():void{ btn_mechanism_elevator.gotoAndStop(1); btn_mechanism_forcecolumnv.gotoAndStop(1); btn_mechanism_motor.gotoAndStop(1); btn_mechanism_motorcircleb.gotoAndStop(1); btn_mechanism_motorcirclebinv.gotoAndStop(1); btn_mechanism_motorcircles.gotoAndStop(1); btn_mechanism_motorcirclesinv.gotoAndStop(1); btn_mechanism_motorinv.gotoAndStop(1); } public function btn_misc_gravity_right_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Misc_GravityRight"; clean_state_misc(); btn_misc_gravity_right.gotoAndStop(2); } public function btn_mechanism_motorcircleb_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_MotorCircleB"; clean_state_mechanisms(); btn_mechanism_motorcircleb.gotoAndStop(2); } public function btn_mechanism_motor_click(_arg1:MouseEvent){ EditorUI.gdtSel = "Gdt_Mechanism_Motor"; clean_state_mechanisms(); btn_mechanism_motor.gotoAndStop(2); } } }//package
Section 242
//Gdt_Essentials_Checkpoint (Gdt_Essentials_Checkpoint) package { import Vanilla.*; public dynamic class Gdt_Essentials_Checkpoint extends Piece { public function Gdt_Essentials_Checkpoint(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 243
//Gdt_Essentials_Finish (Gdt_Essentials_Finish) package { import Vanilla.*; public dynamic class Gdt_Essentials_Finish extends Piece { } }//package
Section 244
//Gdt_Essentials_Start (Gdt_Essentials_Start) package { import Vanilla.*; public dynamic class Gdt_Essentials_Start extends Piece { } }//package
Section 245
//Gdt_Hazard_BLaser (Gdt_Hazard_BLaser) package { import Vanilla.*; public dynamic class Gdt_Hazard_BLaser extends Piece { } }//package
Section 246
//Gdt_Hazard_BlockMagma (Gdt_Hazard_BlockMagma) package { import Vanilla.*; public dynamic class Gdt_Hazard_BlockMagma extends Piece { } }//package
Section 247
//Gdt_Hazard_FastFollower (Gdt_Hazard_FastFollower) package { import Vanilla.*; public dynamic class Gdt_Hazard_FastFollower extends Piece { } }//package
Section 248
//Gdt_Hazard_HHitter (Gdt_Hazard_HHitter) package { import Vanilla.*; public dynamic class Gdt_Hazard_HHitter extends Piece { } }//package
Section 249
//Gdt_Hazard_HMagma (Gdt_Hazard_HMagma) package { import Vanilla.*; public dynamic class Gdt_Hazard_HMagma extends Piece { } }//package
Section 250
//Gdt_Hazard_LaserS (Gdt_Hazard_LaserS) package { import Vanilla.*; public dynamic class Gdt_Hazard_LaserS extends Piece { } }//package
Section 251
//Gdt_Hazard_SlowFollower (Gdt_Hazard_SlowFollower) package { import Vanilla.*; public dynamic class Gdt_Hazard_SlowFollower extends Piece { } }//package
Section 252
//Gdt_Hazard_VHitter (Gdt_Hazard_VHitter) package { import Vanilla.*; public dynamic class Gdt_Hazard_VHitter extends Piece { } }//package
Section 253
//Gdt_Hazard_VMagma (Gdt_Hazard_VMagma) package { import Vanilla.*; public dynamic class Gdt_Hazard_VMagma extends Piece { } }//package
Section 254
//Gdt_Loose_BBlock (Gdt_Loose_BBlock) package { import Vanilla.*; public dynamic class Gdt_Loose_BBlock extends Piece { } }//package
Section 255
//Gdt_Loose_BCircle (Gdt_Loose_BCircle) package { import Vanilla.*; public dynamic class Gdt_Loose_BCircle extends Piece { } }//package
Section 256
//Gdt_Loose_Block (Gdt_Loose_Block) package { import Vanilla.*; public dynamic class Gdt_Loose_Block extends Piece { } }//package
Section 257
//Gdt_Loose_Circle (Gdt_Loose_Circle) package { import Vanilla.*; public dynamic class Gdt_Loose_Circle extends Piece { } }//package
Section 258
//Gdt_Loose_Column (Gdt_Loose_Column) package { import Vanilla.*; public dynamic class Gdt_Loose_Column extends Piece { } }//package
Section 259
//Gdt_Loose_PlatformA (Gdt_Loose_PlatformA) package { import Vanilla.*; public dynamic class Gdt_Loose_PlatformA extends Piece { } }//package
Section 260
//Gdt_Loose_PlatformB (Gdt_Loose_PlatformB) package { import Vanilla.*; public dynamic class Gdt_Loose_PlatformB extends Piece { } }//package
Section 261
//Gdt_Loose_PlatformC (Gdt_Loose_PlatformC) package { import Vanilla.*; public dynamic class Gdt_Loose_PlatformC extends Piece { } }//package
Section 262
//Gdt_Mechanism_Elevator (Gdt_Mechanism_Elevator) package { import Vanilla.*; public dynamic class Gdt_Mechanism_Elevator extends Piece { public function Gdt_Mechanism_Elevator(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 263
//Gdt_Mechanism_ForceColumnV (Gdt_Mechanism_ForceColumnV) package { import Vanilla.*; public dynamic class Gdt_Mechanism_ForceColumnV extends Piece { } }//package
Section 264
//Gdt_Mechanism_HThruster (Gdt_Mechanism_HThruster) package { import Vanilla.*; public dynamic class Gdt_Mechanism_HThruster extends Piece { } }//package
Section 265
//Gdt_Mechanism_Motor (Gdt_Mechanism_Motor) package { import Vanilla.*; public dynamic class Gdt_Mechanism_Motor extends Piece { } }//package
Section 266
//Gdt_Mechanism_MotorCircleB (Gdt_Mechanism_MotorCircleB) package { import Vanilla.*; public dynamic class Gdt_Mechanism_MotorCircleB extends Piece { } }//package
Section 267
//Gdt_Mechanism_MotorCircleBInv (Gdt_Mechanism_MotorCircleBInv) package { import Vanilla.*; public dynamic class Gdt_Mechanism_MotorCircleBInv extends Piece { } }//package
Section 268
//Gdt_Mechanism_MotorCircleS (Gdt_Mechanism_MotorCircleS) package { import Vanilla.*; public dynamic class Gdt_Mechanism_MotorCircleS extends Piece { } }//package
Section 269
//Gdt_Mechanism_MotorCircleSInv (Gdt_Mechanism_MotorCircleSInv) package { import Vanilla.*; public dynamic class Gdt_Mechanism_MotorCircleSInv extends Piece { } }//package
Section 270
//Gdt_Mechanism_MotorInv (Gdt_Mechanism_MotorInv) package { import Vanilla.*; public dynamic class Gdt_Mechanism_MotorInv extends Piece { } }//package
Section 271
//Gdt_Mechanism_VThruster (Gdt_Mechanism_VThruster) package { import Vanilla.*; public dynamic class Gdt_Mechanism_VThruster extends Piece { } }//package
Section 272
//Gdt_Misc_ComposedBridge (Gdt_Misc_ComposedBridge) package { import Vanilla.*; public dynamic class Gdt_Misc_ComposedBridge extends Piece { } }//package
Section 273
//Gdt_Misc_ComposedSpring (Gdt_Misc_ComposedSpring) package { import Vanilla.*; public dynamic class Gdt_Misc_ComposedSpring extends Piece { } }//package
Section 274
//Gdt_Misc_DisappearingPlatform (Gdt_Misc_DisappearingPlatform) package { import Vanilla.*; public dynamic class Gdt_Misc_DisappearingPlatform extends Piece { public function Gdt_Misc_DisappearingPlatform(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 275
//Gdt_Misc_GravityDown (Gdt_Misc_GravityDown) package { import Vanilla.Pieces.*; public dynamic class Gdt_Misc_GravityDown extends P_Gravity { } }//package
Section 276
//Gdt_Misc_GravityLeft (Gdt_Misc_GravityLeft) package { import Vanilla.Pieces.*; public dynamic class Gdt_Misc_GravityLeft extends P_Gravity { } }//package
Section 277
//Gdt_Misc_GravityRight (Gdt_Misc_GravityRight) package { import Vanilla.Pieces.*; public dynamic class Gdt_Misc_GravityRight extends P_Gravity { } }//package
Section 278
//Gdt_Misc_GravityUp (Gdt_Misc_GravityUp) package { import Vanilla.Pieces.*; public dynamic class Gdt_Misc_GravityUp extends P_Gravity { } }//package
Section 279
//Gdt_Misc_HangingPlank (Gdt_Misc_HangingPlank) package { import Vanilla.*; public dynamic class Gdt_Misc_HangingPlank extends Piece { } }//package
Section 280
//Gdt_Misc_HangingPlankBolt (Gdt_Misc_HangingPlankBolt) package { import Vanilla.*; public dynamic class Gdt_Misc_HangingPlankBolt extends Piece { } }//package
Section 281
//Gdt_Misc_Pendulum (Gdt_Misc_Pendulum) package { import Vanilla.*; public dynamic class Gdt_Misc_Pendulum extends Piece { } }//package
Section 282
//Gdt_Misc_Spring (Gdt_Misc_Spring) package { import Vanilla.*; public dynamic class Gdt_Misc_Spring extends Piece { } }//package
Section 283
//Gdt_Misc_SpringResorte (Gdt_Misc_SpringResorte) package { import Vanilla.*; public dynamic class Gdt_Misc_SpringResorte extends Piece { } }//package
Section 284
//Gdt_Misc_StitchedBridgePart (Gdt_Misc_StitchedBridgePart) package { import Vanilla.*; public dynamic class Gdt_Misc_StitchedBridgePart extends Piece { } }//package
Section 285
//Gdt_Static_BCircle (Gdt_Static_BCircle) package { import Vanilla.*; public dynamic class Gdt_Static_BCircle extends Piece { } }//package
Section 286
//Gdt_Static_Block (Gdt_Static_Block) package { import Vanilla.*; public dynamic class Gdt_Static_Block extends Piece { } }//package
Section 287
//Gdt_Static_Bridge (Gdt_Static_Bridge) package { import Vanilla.*; public dynamic class Gdt_Static_Bridge extends Piece { } }//package
Section 288
//Gdt_Static_Cavity (Gdt_Static_Cavity) package { import flash.display.*; public dynamic class Gdt_Static_Cavity extends MovieClip { public var i2:MovieClip; public var i10:MovieClip; public var i11:MovieClip; public var i1:MovieClip; public var i4:MovieClip; public var i5:MovieClip; public var i6:MovieClip; public var i7:MovieClip; public var i8:MovieClip; public var i3:MovieClip; public var i9:MovieClip; } }//package
Section 289
//Gdt_Static_Circle (Gdt_Static_Circle) package { import Vanilla.*; public dynamic class Gdt_Static_Circle extends Piece { } }//package
Section 290
//Gdt_Static_Column (Gdt_Static_Column) package { import Vanilla.*; public dynamic class Gdt_Static_Column extends Piece { } }//package
Section 291
//Gdt_Static_Diagonal45 (Gdt_Static_Diagonal45) package { import Vanilla.*; public dynamic class Gdt_Static_Diagonal45 extends Piece { } }//package
Section 292
//Gdt_Static_DiagonalA (Gdt_Static_DiagonalA) package { import Vanilla.*; public dynamic class Gdt_Static_DiagonalA extends Piece { } }//package
Section 293
//Gdt_Static_DiagonalB (Gdt_Static_DiagonalB) package { import Vanilla.*; public dynamic class Gdt_Static_DiagonalB extends Piece { } }//package
Section 294
//Gdt_Static_InvDiagonal45 (Gdt_Static_InvDiagonal45) package { import Vanilla.*; public dynamic class Gdt_Static_InvDiagonal45 extends Piece { } }//package
Section 295
//Gdt_Static_InvDiagonalA (Gdt_Static_InvDiagonalA) package { import Vanilla.*; public dynamic class Gdt_Static_InvDiagonalA extends Piece { } }//package
Section 296
//Gdt_Static_InvDiagonalB (Gdt_Static_InvDiagonalB) package { import Vanilla.*; public dynamic class Gdt_Static_InvDiagonalB extends Piece { } }//package
Section 297
//Gdt_Static_Platform (Gdt_Static_Platform) package { import Vanilla.*; public dynamic class Gdt_Static_Platform extends Piece { } }//package
Section 298
//Gdt_Static_SmallBlock (Gdt_Static_SmallBlock) package { import Vanilla.*; public dynamic class Gdt_Static_SmallBlock extends Piece { } }//package
Section 299
//Gdt_Static_VBCircle (Gdt_Static_VBCircle) package { import Vanilla.*; public dynamic class Gdt_Static_VBCircle extends Piece { } }//package
Section 300
//grid (grid) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.utils.*; import Vanilla.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.net.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.system.*; import flash.ui.*; import flash.xml.*; public dynamic class grid extends MovieClip { public var handle:MovieClip; public var myTimer:Timer; public var piece:MovieClip; public function grid(){ addFrameScript(0, frame1); } function frame1(){ myTimer = new Timer(1, 0); myTimer.addEventListener("timer", timerHandler); myTimer.start(); EditorUI.gdtSel = "Gdt_Essentials_Start"; this.addEventListener(MouseEvent.CLICK, placeGdt); } public function timerHandler(_arg1:TimerEvent):void{ if (EditorUI.gdtSel != "ERASE"){ handle.x = ((mouseX - (mouseX % 15)) + (handle.width / 2)); handle.y = ((mouseY - (mouseY % 15)) + (handle.height / 2)); } else { handle.x = mouseX; handle.y = mouseY; }; if (EditorUI.gdtSel == "Gdt_Essentials_Finish"){ handle.gotoAndStop("Gdt_Essentials_Finish"); }; if (EditorUI.gdtSel == "Gdt_Essentials_Checkpoint"){ handle.gotoAndStop("Gdt_Essentials_Checkpoint"); }; if (EditorUI.gdtSel == "Gdt_Essentials_Start"){ handle.gotoAndStop("Gdt_Essentials_Start"); }; if (EditorUI.gdtSel == "Gdt_Hazard_BLaser"){ handle.gotoAndStop("Gdt_Hazard_BLaser"); }; if (EditorUI.gdtSel == "Gdt_Hazard_BlockMagma"){ handle.gotoAndStop("Gdt_Hazard_BlockMagma"); }; if (EditorUI.gdtSel == "Gdt_Hazard_FastFollower"){ handle.gotoAndStop("Gdt_Hazard_FastFollower"); }; if (EditorUI.gdtSel == "Gdt_Hazard_HHitter"){ handle.gotoAndStop("Gdt_Hazard_HHitter"); }; if (EditorUI.gdtSel == "Gdt_Hazard_HMagma"){ handle.gotoAndStop("Gdt_Hazard_HMagma"); }; if (EditorUI.gdtSel == "Gdt_Hazard_LaserS"){ handle.gotoAndStop("Gdt_Hazard_LaserS"); }; if (EditorUI.gdtSel == "Gdt_Hazard_SlowFollower"){ handle.gotoAndStop("Gdt_Hazard_SlowFollower"); }; if (EditorUI.gdtSel == "Gdt_Hazard_VHitter"){ handle.gotoAndStop("Gdt_Hazard_VHitter"); }; if (EditorUI.gdtSel == "Gdt_Hazard_HHitter"){ handle.gotoAndStop("Gdt_Hazard_HHitter"); }; if (EditorUI.gdtSel == "Gdt_Hazard_VMagma"){ handle.gotoAndStop("Gdt_Hazard_VMagma"); }; if (EditorUI.gdtSel == "Gdt_Loose_BBlock"){ handle.gotoAndStop("Gdt_Loose_BBlock"); }; if (EditorUI.gdtSel == "Gdt_Loose_Block"){ handle.gotoAndStop("Gdt_Loose_Block"); }; if (EditorUI.gdtSel == "Gdt_Loose_BCircle"){ handle.gotoAndStop("Gdt_Loose_BCircle"); }; if (EditorUI.gdtSel == "Gdt_Loose_Column"){ handle.gotoAndStop("Gdt_Loose_Column"); }; if (EditorUI.gdtSel == "Gdt_Loose_Circle"){ handle.gotoAndStop("Gdt_Loose_Circle"); }; if (EditorUI.gdtSel == "Gdt_Loose_PlatformA"){ handle.gotoAndStop("Gdt_Loose_PlatformA"); }; if (EditorUI.gdtSel == "Gdt_Loose_PlatformB"){ handle.gotoAndStop("Gdt_Loose_PlatformB"); }; if (EditorUI.gdtSel == "Gdt_Loose_PlatformC"){ handle.gotoAndStop("Gdt_Loose_PlatformC"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_Elevator"){ handle.gotoAndStop("Gdt_Mechanism_Elevator"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_ForceColumnV"){ handle.gotoAndStop("Gdt_Mechanism_ForceColumnV"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_HThruster"){ handle.gotoAndStop("Gdt_Mechanism_HThruster"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_Motor"){ handle.gotoAndStop("Gdt_Mechanism_Motor"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleB"){ handle.gotoAndStop("Gdt_Mechanism_MotorCircleB"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleBInv"){ handle.gotoAndStop("Gdt_Mechanism_MotorCircleBInv"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleS"){ handle.gotoAndStop("Gdt_Mechanism_MotorCircleS"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleSInv"){ handle.gotoAndStop("Gdt_Mechanism_MotorCircleSInv"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorInv"){ handle.gotoAndStop("Gdt_Mechanism_MotorInv"); }; if (EditorUI.gdtSel == "Gdt_Mechanism_VThruster"){ handle.gotoAndStop("Gdt_Mechanism_VThruster"); }; if (EditorUI.gdtSel == "Gdt_Misc_Bouncer"){ handle.gotoAndStop("Gdt_Misc_Bouncer"); }; if (EditorUI.gdtSel == "Gdt_Misc_ComposedBridge"){ handle.gotoAndStop("Gdt_Misc_ComposedBridge"); }; if (EditorUI.gdtSel == "Gdt_Misc_DisappearingPlatform"){ handle.gotoAndStop("Gdt_Misc_DisappearingPlatform"); }; if (EditorUI.gdtSel == "Gdt_Misc_GravityUp"){ handle.gotoAndStop("Gdt_Misc_GravityUp"); }; if (EditorUI.gdtSel == "Gdt_Misc_GravityDown"){ handle.gotoAndStop("Gdt_Misc_GravityDown"); }; if (EditorUI.gdtSel == "Gdt_Misc_GravityRight"){ handle.gotoAndStop("Gdt_Misc_GravityRight"); }; if (EditorUI.gdtSel == "Gdt_Misc_GravityLeft"){ handle.gotoAndStop("Gdt_Misc_GravityLeft"); }; if (EditorUI.gdtSel == "Gdt_Misc_HangingPlank"){ handle.gotoAndStop("Gdt_Misc_HangingPlank"); }; if (EditorUI.gdtSel == "Gdt_Misc_Pendulum"){ handle.gotoAndStop("Gdt_Misc_Pendulum"); }; if (EditorUI.gdtSel == "Gdt_Misc_ComposedSpring"){ handle.gotoAndStop("Gdt_Misc_ComposedSpring"); }; if (EditorUI.gdtSel == "Gdt_Static_BCircle"){ handle.gotoAndStop("Gdt_Static_BCircle"); }; if (EditorUI.gdtSel == "Gdt_Static_Block"){ handle.gotoAndStop("Gdt_Static_Block"); }; if (EditorUI.gdtSel == "Gdt_Static_Bridge"){ handle.gotoAndStop("Gdt_Static_Bridge"); }; if (EditorUI.gdtSel == "Gdt_Static_Platform"){ handle.gotoAndStop("Gdt_Static_Platform"); }; if (EditorUI.gdtSel == "Gdt_Static_Circle"){ handle.gotoAndStop("Gdt_Static_Circle"); }; if (EditorUI.gdtSel == "Gdt_Static_Column"){ handle.gotoAndStop("Gdt_Static_Column"); }; if (EditorUI.gdtSel == "Gdt_Static_Diagonal45"){ handle.gotoAndStop("Gdt_Static_Diagonal45"); }; if (EditorUI.gdtSel == "Gdt_Static_DiagonalA"){ handle.gotoAndStop("Gdt_Static_DiagonalA"); }; if (EditorUI.gdtSel == "Gdt_Static_DiagonalB"){ handle.gotoAndStop("Gdt_Static_DiagonalB"); }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonal45"){ handle.gotoAndStop("Gdt_Static_InvDiagonal45"); }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonal45"){ handle.gotoAndStop("Gdt_Static_InvDiagonal45"); }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonalA"){ handle.gotoAndStop("Gdt_Static_InvDiagonalA"); }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonalB"){ handle.gotoAndStop("Gdt_Static_InvDiagonalB"); }; if (EditorUI.gdtSel == "Gdt_Static_SmallBlock"){ handle.gotoAndStop("Gdt_Static_SmallBlock"); }; if (EditorUI.gdtSel == "Gdt_Static_VBCircle"){ handle.gotoAndStop("Gdt_Static_VBCircle"); }; if (EditorUI.gdtSel == "Gdt_Static_Cavity"){ handle.gotoAndStop("Gdt_Static_Cavity"); }; if (EditorUI.gdtSel == "ERASE"){ handle.gotoAndStop("ERASE"); }; } public function placeGdt(_arg1:MouseEvent):void{ var _local2:Boolean; var _local3:*; var _local4:Boolean; if (EditorUI.gdtSel == "Gdt_Essentials_Finish"){ piece = new Gdt_Essentials_Finish(); piece.tipo = "E2"; }; if (EditorUI.gdtSel == "Gdt_Essentials_Checkpoint"){ piece = new Gdt_Essentials_Checkpoint(); piece.tipo = "E3"; }; if (EditorUI.gdtSel == "Gdt_Essentials_Start"){ piece = new Gdt_Essentials_Start(); piece.tipo = "E1"; }; if (EditorUI.gdtSel == "Gdt_Hazard_BlockMagma"){ piece = new Gdt_Hazard_BlockMagma(); piece.tipo = "H1"; }; if (EditorUI.gdtSel == "Gdt_Hazard_BLaser"){ piece = new Gdt_Hazard_BLaser(); piece.tipo = "H2"; }; if (EditorUI.gdtSel == "Gdt_Hazard_LaserS"){ piece = new Gdt_Hazard_LaserS(); piece.tipo = "H3"; }; if (EditorUI.gdtSel == "Gdt_Hazard_SlowFollower"){ piece = new Gdt_Hazard_SlowFollower(); piece.tipo = "H4"; }; if (EditorUI.gdtSel == "Gdt_Hazard_FastFollower"){ piece = new Gdt_Hazard_FastFollower(); piece.tipo = "H5"; }; if (EditorUI.gdtSel == "Gdt_Hazard_HHitter"){ piece = new Gdt_Hazard_HHitter(); piece.tipo = "H6"; }; if (EditorUI.gdtSel == "Gdt_Hazard_VHitter"){ piece = new Gdt_Hazard_VHitter(); piece.tipo = "H7"; }; if (EditorUI.gdtSel == "Gdt_Hazard_HMagma"){ piece = new Gdt_Hazard_HMagma(); piece.tipo = "H8"; }; if (EditorUI.gdtSel == "Gdt_Hazard_VMagma"){ piece = new Gdt_Hazard_VMagma(); piece.tipo = "H9"; }; if (EditorUI.gdtSel == "Gdt_Loose_Column"){ piece = new Gdt_Loose_Column(); piece.tipo = "L1"; }; if (EditorUI.gdtSel == "Gdt_Loose_Block"){ piece = new Gdt_Loose_Block(); piece.tipo = "L2"; }; if (EditorUI.gdtSel == "Gdt_Loose_BBlock"){ piece = new Gdt_Loose_BBlock(); piece.tipo = "L3"; }; if (EditorUI.gdtSel == "Gdt_Loose_Circle"){ piece = new Gdt_Loose_Circle(); piece.tipo = "L4"; }; if (EditorUI.gdtSel == "Gdt_Loose_BCircle"){ piece = new Gdt_Loose_BCircle(); piece.tipo = "L5"; }; if (EditorUI.gdtSel == "Gdt_Loose_PlatformA"){ piece = new Gdt_Loose_PlatformA(); piece.tipo = "L6"; }; if (EditorUI.gdtSel == "Gdt_Loose_PlatformB"){ piece = new Gdt_Loose_PlatformB(); piece.tipo = "L7"; }; if (EditorUI.gdtSel == "Gdt_Loose_PlatformC"){ piece = new Gdt_Loose_PlatformC(); piece.tipo = "L8"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_Elevator"){ piece = new Gdt_Mechanism_Elevator(); piece.tipo = "K1"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_HThruster"){ piece = new Gdt_Mechanism_HThruster(); piece.tipo = "K2"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_VThruster"){ piece = new Gdt_Mechanism_VThruster(); piece.tipo = "K3"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_ForceColumnV"){ piece = new Gdt_Mechanism_ForceColumnV(); piece.tipo = "K4"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_Motor"){ piece = new Gdt_Mechanism_Motor(); piece.tipo = "K5"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorInv"){ piece = new Gdt_Mechanism_MotorInv(); piece.tipo = "K6"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleB"){ piece = new Gdt_Mechanism_MotorCircleB(); piece.tipo = "K7"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleBInv"){ piece = new Gdt_Mechanism_MotorCircleBInv(); piece.tipo = "K8"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleS"){ piece = new Gdt_Mechanism_MotorCircleS(); piece.tipo = "K9"; }; if (EditorUI.gdtSel == "Gdt_Mechanism_MotorCircleSInv"){ piece = new Gdt_Mechanism_MotorCircleSInv(); piece.tipo = "K10"; }; if (EditorUI.gdtSel == "Gdt_Misc_DisappearingPlatform"){ piece = new Gdt_Misc_DisappearingPlatform(); piece.tipo = "M1"; }; if (EditorUI.gdtSel == "Gdt_Misc_HangingPlank"){ piece = new Gdt_Misc_HangingPlank(); piece.tipo = "M2"; }; if (EditorUI.gdtSel == "Gdt_Misc_ComposedBridge"){ piece = new Gdt_Misc_ComposedBridge(); piece.tipo = "M3"; }; if (EditorUI.gdtSel == "Gdt_Misc_ComposedSpring"){ piece = new Gdt_Misc_ComposedSpring(); piece.tipo = "M4"; }; if (EditorUI.gdtSel == "Gdt_Misc_GravityUp"){ piece = new Gdt_Misc_GravityUp(); piece.tipo = "M5"; }; if (EditorUI.gdtSel == "Gdt_Misc_GravityRight"){ piece = new Gdt_Misc_GravityRight(); piece.tipo = "M6"; }; if (EditorUI.gdtSel == "Gdt_Misc_GravityLeft"){ piece = new Gdt_Misc_GravityLeft(); piece.tipo = "M7"; }; if (EditorUI.gdtSel == "Gdt_Misc_GravityDown"){ piece = new Gdt_Misc_GravityDown(); piece.tipo = "M8"; }; if (EditorUI.gdtSel == "Gdt_Static_Platform"){ piece = new Gdt_Static_Platform(); piece.tipo = "S1"; }; if (EditorUI.gdtSel == "Gdt_Static_Column"){ piece = new Gdt_Static_Column(); piece.tipo = "S2"; }; if (EditorUI.gdtSel == "Gdt_Static_Circle"){ piece = new Gdt_Static_Circle(); piece.tipo = "S3"; }; if (EditorUI.gdtSel == "Gdt_Static_BCircle"){ piece = new Gdt_Static_BCircle(); piece.tipo = "S4"; }; if (EditorUI.gdtSel == "Gdt_Static_VBCircle"){ piece = new Gdt_Static_VBCircle(); piece.tipo = "S5"; }; if (EditorUI.gdtSel == "Gdt_Static_SmallBlock"){ piece = new Gdt_Static_SmallBlock(); piece.tipo = "S6"; }; if (EditorUI.gdtSel == "Gdt_Static_Block"){ piece = new Gdt_Static_Block(); piece.tipo = "S7"; }; if (EditorUI.gdtSel == "Gdt_Static_Bridge"){ piece = new Gdt_Static_Bridge(); piece.tipo = "S8"; }; if (EditorUI.gdtSel == "Gdt_Static_Diagonal45"){ piece = new Gdt_Static_Diagonal45(); piece.tipo = "S9"; }; if (EditorUI.gdtSel == "Gdt_Static_DiagonalA"){ piece = new Gdt_Static_DiagonalA(); piece.tipo = "S10"; }; if (EditorUI.gdtSel == "Gdt_Static_DiagonalB"){ piece = new Gdt_Static_DiagonalB(); piece.tipo = "S11"; }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonal45"){ piece = new Gdt_Static_InvDiagonal45(); piece.tipo = "S12"; }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonalA"){ piece = new Gdt_Static_InvDiagonalA(); piece.tipo = "S13"; }; if (EditorUI.gdtSel == "Gdt_Static_InvDiagonalB"){ piece = new Gdt_Static_InvDiagonalB(); piece.tipo = "S14"; }; if (EditorUI.gdtSel == "Gdt_Static_Cavity"){ piece = new Gdt_Static_Cavity(); piece.tipo = "S15"; }; if (EditorUI.gdtSel != "ERASE"){ if (piece.tipo == "E1"){ _local2 = false; _local3 = 0; while (_local3 < Piece.pQueue.length) { if (Piece.pQueue[_local3].tipo == "E1"){ Piece.pQueue[_local3].x = handle.x; Piece.pQueue[_local3].y = handle.y; _local2 = true; }; _local3++; }; if (!_local2){ piece.x = handle.x; piece.y = handle.y; addChild(piece); Piece.pQueue.push(piece); }; } else { if (piece.tipo == "E2"){ _local4 = false; _local3 = 0; while (_local3 < Piece.pQueue.length) { if (Piece.pQueue[_local3].tipo == "E2"){ Piece.pQueue[_local3].x = handle.x; Piece.pQueue[_local3].y = handle.y; _local4 = true; }; _local3++; }; if (!_local4){ piece.x = handle.x; piece.y = handle.y; addChild(piece); Piece.pQueue.push(piece); }; } else { piece.x = handle.x; piece.y = handle.y; addChild(piece); Piece.pQueue.push(piece); }; }; } else { _local3 = 0; while (_local3 < Piece.pQueue.length) { if (Piece.pQueue[_local3].hitTestObject(handle)){ removeChild(Piece.pQueue[_local3]); Piece.pQueue.splice(_local3, 1); } else { _local3++; }; }; }; } public function loadLevel():void{ var _local1:*; var _local3:Array; _local1 = 0; while (_local1 < Piece.pQueue.length) { if (contains(Piece.pQueue[_local1])){ removeChild(Piece.pQueue[_local1]); }; _local1++; }; Piece.pQueue.splice(0, Piece.pQueue.length); var _local2:Array = EditorUI.LEVEL_CODE.split(","); _local1 = 0; while (_local1 < _local2.length) { _local3 = _local2[_local1].split("-"); if (_local3[2] == "E1"){ piece = new Gdt_Essentials_Start(); piece.tipo = "E1"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "E2"){ piece = new Gdt_Essentials_Finish(); piece.tipo = "E2"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "E3"){ piece = new Gdt_Essentials_Checkpoint(); piece.tipo = "E3"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S1"){ piece = new Gdt_Static_Platform(); piece.tipo = "S1"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S2"){ piece = new Gdt_Static_Column(); piece.tipo = "S2"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S3"){ piece = new Gdt_Static_Circle(); piece.tipo = "S3"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S4"){ piece = new Gdt_Static_BCircle(); piece.tipo = "S4"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S5"){ piece = new Gdt_Static_VBCircle(); piece.tipo = "S5"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S6"){ piece = new Gdt_Static_SmallBlock(); piece.tipo = "S6"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S7"){ piece = new Gdt_Static_Block(); piece.tipo = "S7"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S8"){ piece = new Gdt_Static_Bridge(); piece.tipo = "S8"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S9"){ piece = new Gdt_Static_Diagonal45(); piece.tipo = "S9"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S10"){ piece = new Gdt_Static_DiagonalA(); piece.tipo = "S10"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S11"){ piece = new Gdt_Static_DiagonalB(); piece.tipo = "S11"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S12"){ piece = new Gdt_Static_InvDiagonal45(); piece.tipo = "S12"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S13"){ piece = new Gdt_Static_InvDiagonalA(); piece.tipo = "S13"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "S14"){ piece = new Gdt_Static_InvDiagonalB(); piece.tipo = "S14"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); addChild(piece); }; if (_local3[2] == "S15"){ piece = new Gdt_Static_Cavity(); piece.tipo = "S15"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); addChild(piece); }; if (_local3[2] == "L1"){ piece = new Gdt_Loose_Column(); piece.tipo = "L1"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L2"){ piece = new Gdt_Loose_Block(); piece.tipo = "L2"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L3"){ piece = new Gdt_Loose_BBlock(); piece.tipo = "L3"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L4"){ piece = new Gdt_Loose_Circle(); piece.tipo = "L4"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L5"){ piece = new Gdt_Loose_BCircle(); piece.tipo = "L5"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L6"){ piece = new Gdt_Loose_PlatformA(); piece.tipo = "L6"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L7"){ piece = new Gdt_Loose_PlatformB(); piece.tipo = "L7"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "L8"){ piece = new Gdt_Loose_PlatformC(); piece.tipo = "L8"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K1"){ piece = new Gdt_Mechanism_Elevator(); piece.tipo = "K1"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K2"){ piece = new Gdt_Mechanism_HThruster(); piece.tipo = "K2"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K3"){ piece = new Gdt_Mechanism_VThruster(); piece.tipo = "K3"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K4"){ piece = new Gdt_Mechanism_ForceColumnV(); piece.tipo = "K4"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K5"){ piece = new Gdt_Mechanism_Motor(); piece.tipo = "K5"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K6"){ piece = new Gdt_Mechanism_MotorInv(); piece.tipo = "K6"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K7"){ piece = new Gdt_Mechanism_MotorCircleB(); piece.tipo = "K7"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K8"){ piece = new Gdt_Mechanism_MotorCircleBInv(); piece.tipo = "K8"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K9"){ piece = new Gdt_Mechanism_MotorCircleS(); piece.tipo = "K9"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "K10"){ piece = new Gdt_Mechanism_MotorCircleSInv(); piece.tipo = "K10"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H1"){ piece = new Gdt_Hazard_BlockMagma(); piece.tipo = "H1"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H2"){ piece = new Gdt_Hazard_BLaser(); piece.tipo = "H2"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H3"){ piece = new Gdt_Hazard_LaserS(); piece.tipo = "H3"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H4"){ piece = new Gdt_Hazard_SlowFollower(); piece.tipo = "H4"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H5"){ piece = new Gdt_Hazard_FastFollower(); piece.tipo = "H5"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H6"){ piece = new Gdt_Hazard_HHitter(); piece.tipo = "H6"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H7"){ piece = new Gdt_Hazard_VHitter(); piece.tipo = "H7"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H8"){ piece = new Gdt_Hazard_HMagma(); piece.tipo = "H8"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "H9"){ piece = new Gdt_Hazard_VMagma(); piece.tipo = "H9"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "M5"){ piece = new Gdt_Misc_GravityUp(); piece.tipo = "M5"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "M6"){ piece = new Gdt_Misc_GravityRight(); piece.tipo = "M6"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "M7"){ piece = new Gdt_Misc_GravityLeft(); piece.tipo = "M7"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; if (_local3[2] == "M8"){ piece = new Gdt_Misc_GravityDown(); piece.tipo = "M8"; piece.x = _local3[0]; piece.y = _local3[1]; Piece.pQueue.push(piece); }; _local1++; }; _local1 = 0; while (_local1 < Piece.pQueue.length) { addChild(Piece.pQueue[_local1]); _local1++; }; } } }//package
Section 301
//List_skin (List_skin) package { import flash.display.*; public dynamic class List_skin extends MovieClip { } }//package
Section 302
//Mdl_Glass (Mdl_Glass) package { import flash.display.*; public dynamic class Mdl_Glass extends MovieClip { public var brillo:MovieClip; } }//package
Section 303
//Mdl_Original (Mdl_Original) package { import flash.display.*; public dynamic class Mdl_Original extends MovieClip { public var brillo:MovieClip; public var brillo_2:MovieClip; public var brillo_3:MovieClip; public var espiral:MovieClip; } }//package
Section 304
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4 = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 305
//NumericStepperDownArrow_disabledSkin (NumericStepperDownArrow_disabledSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_disabledSkin extends MovieClip { } }//package
Section 306
//NumericStepperDownArrow_downSkin (NumericStepperDownArrow_downSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_downSkin extends MovieClip { } }//package
Section 307
//NumericStepperDownArrow_overSkin (NumericStepperDownArrow_overSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_overSkin extends MovieClip { } }//package
Section 308
//NumericStepperDownArrow_upSkin (NumericStepperDownArrow_upSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_upSkin extends MovieClip { } }//package
Section 309
//NumericStepperUpArrow_disabledSkin (NumericStepperUpArrow_disabledSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_disabledSkin extends MovieClip { } }//package
Section 310
//NumericStepperUpArrow_downSkin (NumericStepperUpArrow_downSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_downSkin extends MovieClip { } }//package
Section 311
//NumericStepperUpArrow_overSkin (NumericStepperUpArrow_overSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_overSkin extends MovieClip { } }//package
Section 312
//NumericStepperUpArrow_upSkin (NumericStepperUpArrow_upSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_upSkin extends MovieClip { } }//package
Section 313
//Panel_Load (Panel_Load) package { import flash.events.*; import flash.display.*; import fl.controls.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.utils.*; import Vanilla.*; import flash.media.*; import flash.geom.*; import flash.ui.*; import flash.errors.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.xml.*; public dynamic class Panel_Load extends MovieClip { public var lvl_txt:TextArea; public var btn_close:SimpleButton; public var btn_load:SimpleButton; public function Panel_Load(){ addFrameScript(0, frame1); } public function closeClick(_arg1:MouseEvent){ MovieClip(parent).removeChild(this); } public function loadClick(_arg1:MouseEvent){ EditorUI.LEVEL_CODE = lvl_txt.text; EditorUI.lvlLoad = true; MovieClip(MovieClip(parent).gridContainer.content).loadLevel(); MovieClip(parent).removeChild(this); } function frame1(){ btn_close.addEventListener(MouseEvent.CLICK, closeClick); btn_load.addEventListener(MouseEvent.CLICK, loadClick); } } }//package
Section 314
//Panel_Load_OW (Panel_Load_OW) package { import flash.events.*; import flash.display.*; import fl.controls.*; import flash.net.*; import Vanilla.*; public dynamic class Panel_Load_OW extends MovieClip { public var btn_load:SimpleButton; public var btn_Levelentral:SimpleButton; public var btn_close:SimpleButton; public var lvl_txt:TextArea; public function Panel_Load_OW(){ addFrameScript(0, frame1); } public function loadClick(_arg1:MouseEvent){ EditorUI.LEVEL_CODE = lvl_txt.text; MovieClip(parent).gotoAndPlay("prepGame"); MovieClip(parent).removeChild(this); Main.level = 0; } function frame1(){ btn_close.addEventListener(MouseEvent.CLICK, closeClick); btn_load.addEventListener(MouseEvent.CLICK, loadClick); btn_Levelentral.addEventListener(MouseEvent.CLICK, goLevelCentral); } public function closeClick(_arg1:MouseEvent){ MovieClip(parent).removeChild(this); } public function goLevelCentral(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.coolbuddy.com/games/community/game_forum.asp?cat=827"); navigateToURL(_local2, "_blank"); } } }//package
Section 315
//panel_Question (panel_Question) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.utils.*; import Vanilla.*; import flash.media.*; import flash.geom.*; import flash.ui.*; import flash.errors.*; import adobe.utils.*; import flash.accessibility.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.xml.*; public dynamic class panel_Question extends MovieClip { public var btn_yes:SimpleButton; public var btn_close:SimpleButton; public var btn_no:SimpleButton; public function panel_Question(){ addFrameScript(0, frame1); } public function closeClick(_arg1:MouseEvent){ MovieClip(parent).removeChild(this); } public function yesClick(_arg1:MouseEvent){ var _local2:* = 0; while (_local2 < Piece.pQueue.length) { if (MovieClip(parent).gridContainer.content.contains(Piece.pQueue[_local2])){ MovieClip(parent).gridContainer.content.removeChild(Piece.pQueue[_local2]); }; _local2++; }; Piece.pQueue.splice(0, Piece.pQueue.length); MovieClip(parent).removeChild(this); } function frame1(){ btn_close.addEventListener(MouseEvent.CLICK, closeClick); btn_yes.addEventListener(MouseEvent.CLICK, yesClick); btn_no.addEventListener(MouseEvent.CLICK, noClick); } public function noClick(_arg1:MouseEvent){ MovieClip(parent).removeChild(this); } } }//package
Section 316
//Panel_Save (Panel_Save) package { import flash.events.*; import flash.display.*; import fl.controls.*; import flash.net.*; import Vanilla.*; public dynamic class Panel_Save extends MovieClip { public var lvl_txt:TextArea; public var btn_close:SimpleButton; public var btn_SaveShareLC:SimpleButton; public function Panel_Save(){ addFrameScript(0, frame1); } public function closeClick(_arg1:MouseEvent){ MovieClip(parent).removeChild(this); } function frame1(){ lvl_txt.text = EditorUI.LEVEL_CODE; btn_close.addEventListener(MouseEvent.CLICK, closeClick); btn_SaveShareLC.addEventListener(MouseEvent.CLICK, SaveShareLCClick); } public function SaveShareLCClick(_arg1:MouseEvent){ var _local2:URLRequest = new URLRequest("http://www.coolbuddy.com/games/community/Game_paste_forum.asp?cat=827"); navigateToURL(_local2, "_blank"); } } }//package
Section 317
//pink_petal (pink_petal) package { import flash.display.*; public dynamic class pink_petal extends MovieClip { } }//package
Section 318
//rope (rope) package { import flash.display.*; public dynamic class rope extends MovieClip { } }//package
Section 319
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_disabledSkin extends MovieClip { } }//package
Section 320
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_downSkin extends MovieClip { } }//package
Section 321
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_overSkin extends MovieClip { } }//package
Section 322
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_upSkin extends MovieClip { } }//package
Section 323
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_disabledSkin extends MovieClip { } }//package
Section 324
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_downSkin extends MovieClip { } }//package
Section 325
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_overSkin extends MovieClip { } }//package
Section 326
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_upSkin extends MovieClip { } }//package
Section 327
//ScrollBar_thumbIcon (ScrollBar_thumbIcon) package { import flash.display.*; public dynamic class ScrollBar_thumbIcon extends MovieClip { } }//package
Section 328
//ScrollPane_disabledSkin (ScrollPane_disabledSkin) package { import flash.display.*; public dynamic class ScrollPane_disabledSkin extends MovieClip { } }//package
Section 329
//ScrollPane_upSkin (ScrollPane_upSkin) package { import flash.display.*; public dynamic class ScrollPane_upSkin extends MovieClip { } }//package
Section 330
//ScrollThumb_downSkin (ScrollThumb_downSkin) package { import flash.display.*; public dynamic class ScrollThumb_downSkin extends MovieClip { } }//package
Section 331
//ScrollThumb_overSkin (ScrollThumb_overSkin) package { import flash.display.*; public dynamic class ScrollThumb_overSkin extends MovieClip { } }//package
Section 332
//ScrollThumb_upSkin (ScrollThumb_upSkin) package { import flash.display.*; public dynamic class ScrollThumb_upSkin extends MovieClip { } }//package
Section 333
//ScrollTrack_skin (ScrollTrack_skin) package { import flash.display.*; public dynamic class ScrollTrack_skin extends MovieClip { } }//package
Section 334
//SNG_BlueJazz (SNG_BlueJazz) package { import flash.media.*; public dynamic class SNG_BlueJazz extends Sound { } }//package
Section 335
//SNG_Obsession (SNG_Obsession) package { import flash.media.*; public dynamic class SNG_Obsession extends Sound { } }//package
Section 336
//SNG_TooClose (SNG_TooClose) package { import flash.media.*; public dynamic class SNG_TooClose extends Sound { } }//package
Section 337
//SNG_Waves (SNG_Waves) package { import flash.media.*; public dynamic class SNG_Waves extends Sound { } }//package
Section 338
//TextArea_disabledSkin (TextArea_disabledSkin) package { import flash.display.*; public dynamic class TextArea_disabledSkin extends MovieClip { } }//package
Section 339
//TextArea_upSkin (TextArea_upSkin) package { import flash.display.*; public dynamic class TextArea_upSkin extends MovieClip { } }//package
Section 340
//TextInput_disabledSkin (TextInput_disabledSkin) package { import flash.display.*; public dynamic class TextInput_disabledSkin extends MovieClip { } }//package
Section 341
//TextInput_upSkin (TextInput_upSkin) package { import flash.display.*; public dynamic class TextInput_upSkin extends MovieClip { } }//package
Section 342
//W1_Impulsador (W1_Impulsador) package { import flash.display.*; public dynamic class W1_Impulsador extends MovieClip { public var core:Gdt_Mechanism_Elevator; } }//package

Library Items

Symbol 1 MovieClip {com.kongregate.as3.client.KongregateAPI}Used by:Timeline
Symbol 2 Sound {FX_Cling}
Symbol 3 Sound {SNG_BlueJazz}
Symbol 4 Sound {SNG_Obsession}
Symbol 5 Sound {SNG_TooClose}
Symbol 6 Sound {SNG_Waves}
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip {Vanilla.Pieces.P_HVHitter}Uses:7
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip {Vanilla.Pieces.P_HHHitter}Uses:9
Symbol 11 GraphicUsed by:12 199
Symbol 12 MovieClip {MainKongregate_fla.Area_100}Uses:11Used by:16 25 27 229 555
Symbol 13 GraphicUsed by:16
Symbol 14 GraphicUsed by:16
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClip {Vanilla.Pieces.P_CheckPoint}Uses:12 13 14 15
Symbol 17 GraphicUsed by:21
Symbol 18 GraphicUsed by:21
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClip {Gdt_Hazard_FastFollower}Uses:19Used by:21 36 141 143 249
Symbol 21 MovieClip {Vanilla.Pieces.P_HBLaser}Uses:17 18 20
Symbol 22 GraphicUsed by:25
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClipUses:23Used by:25 27 127 249
Symbol 25 MovieClip {Vanilla.Pieces.P_VField}Uses:22 24 12
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClip {Vanilla.Pieces.P_invVField}Uses:26 24 12
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClip {Vanilla.Pieces.P_HFFollower}Uses:28
Symbol 30 GraphicUsed by:31
Symbol 31 MovieClip {Vanilla.Pieces.P_HMBlock}Uses:30
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClip {Vanilla.Pieces.P_HFollower}Uses:32
Symbol 34 GraphicUsed by:36
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClip {Vanilla.Pieces.P_HLaser}Uses:34 35 20
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClip {Vanilla.Pieces.P_HMHBlock}Uses:37
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:39Used by:65 66 85 603 604 637 646 769
Symbol 41 MovieClip {fl.core.ComponentShim}Used by:65 66 85 603 604 635 636 637 646 769
Symbol 42 GraphicUsed by:43
Symbol 43 MovieClip {focusRectSkin}Uses:42Used by:65 66 85 603 604 636 637 646
Symbol 44 GraphicUsed by:46
Symbol 45 GraphicUsed by:46 48 50 52 54 56 58 60 579 582 586 596
Symbol 46 MovieClip {NumericStepperDownArrow_disabledSkin}Uses:44 45Used by:66
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClip {NumericStepperDownArrow_downSkin}Uses:47 45Used by:66
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClip {NumericStepperDownArrow_overSkin}Uses:49 45Used by:66
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClip {NumericStepperDownArrow_upSkin}Uses:51 45Used by:66
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClip {NumericStepperUpArrow_disabledSkin}Uses:53 45Used by:66
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClip {NumericStepperUpArrow_downSkin}Uses:55 45Used by:66
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClip {NumericStepperUpArrow_overSkin}Uses:57 45Used by:66
Symbol 59 GraphicUsed by:60
Symbol 60 MovieClip {NumericStepperUpArrow_upSkin}Uses:59 45Used by:66
Symbol 61 GraphicUsed by:62 574
Symbol 62 MovieClip {TextInput_disabledSkin}Uses:61Used by:65
Symbol 63 GraphicUsed by:64 575
Symbol 64 MovieClip {TextInput_upSkin}Uses:63Used by:65
Symbol 65 MovieClip {fl.controls.TextInput}Uses:40 41 62 64 43Used by:66 646
Symbol 66 MovieClip {fl.controls.NumericStepper}Uses:40 41 43 46 48 50 52 54 56 58 60 65
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClip {Button_disabledSkin}Uses:67Used by:85
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClip {Button_downSkin}Uses:69Used by:85
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClip {Button_emphasizedSkin}Uses:71Used by:85
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClip {Button_overSkin}Uses:73Used by:85
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClip {Button_selectedDisabledSkin}Uses:75Used by:85
Symbol 77 GraphicUsed by:78
Symbol 78 MovieClip {Button_selectedDownSkin}Uses:77Used by:85
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClip {Button_selectedOverSkin}Uses:79Used by:85
Symbol 81 GraphicUsed by:82
Symbol 82 MovieClip {Button_selectedUpSkin}Uses:81Used by:85
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClip {Button_upSkin}Uses:83Used by:85
Symbol 85 MovieClip {fl.controls.Button}Uses:40 41 68 70 72 74 76 78 80 82 84 43
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClip {Gdt_Misc_HangingPlank}Uses:86
Symbol 88 GraphicUsed by:89
Symbol 89 MovieClip {Gdt_Misc_StitchedBridgePart}Uses:88
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClip {Gdt_Misc_Spring}Uses:90
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClip {Gdt_Misc_Pendulum}Uses:92
Symbol 94 GraphicUsed by:95
Symbol 95 MovieClip {Gdt_Misc_GravityLeft}Uses:94
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClip {Gdt_Misc_GravityRight}Uses:96
Symbol 98 GraphicUsed by:99
Symbol 99 MovieClip {Gdt_Misc_GravityDown}Uses:98
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClip {Gdt_Misc_GravityUp}Uses:100
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClip {Gdt_Misc_SpringResorte}Uses:102
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClip {Gdt_Misc_HangingPlankBolt}Uses:104
Symbol 106 GraphicUsed by:107 249
Symbol 107 MovieClip {Gdt_Misc_ComposedSpring}Uses:106
Symbol 108 GraphicUsed by:109 249
Symbol 109 MovieClip {Gdt_Misc_ComposedBridge}Uses:108
Symbol 110 GraphicUsed by:111 249
Symbol 111 MovieClip {Gdt_Mechanism_VThruster}Uses:110
Symbol 112 GraphicUsed by:113 249
Symbol 113 MovieClip {Gdt_Mechanism_HThruster}Uses:112
Symbol 114 GraphicUsed by:115
Symbol 115 MovieClip {Gdt_Mechanism_Motor}Uses:114
Symbol 116 GraphicUsed by:117
Symbol 117 MovieClip {Gdt_Mechanism_MotorInv}Uses:116
Symbol 118 GraphicUsed by:119
Symbol 119 MovieClip {Gdt_Mechanism_MotorCircleS}Uses:118
Symbol 120 GraphicUsed by:121
Symbol 121 MovieClip {Gdt_Mechanism_MotorCircleSInv}Uses:120
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClip {Gdt_Mechanism_MotorCircleBInv}Uses:122
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClip {Gdt_Mechanism_MotorCircleB}Uses:124
Symbol 126 GraphicUsed by:127 249
Symbol 127 MovieClip {Gdt_Mechanism_ForceColumnV}Uses:126 24
Symbol 128 GraphicUsed by:129
Symbol 129 MovieClip {Gdt_Hazard_HHitter}Uses:128
Symbol 130 GraphicUsed by:131
Symbol 131 MovieClip {Gdt_Hazard_VHitter}Uses:130
Symbol 132 GraphicUsed by:133 249
Symbol 133 MovieClip {Gdt_Hazard_BlockMagma}Uses:132
Symbol 134 GraphicUsed by:135 249
Symbol 135 MovieClip {Gdt_Hazard_HMagma}Uses:134
Symbol 136 GraphicUsed by:137 613
Symbol 137 MovieClip {Gdt_Hazard_VMagma}Uses:136
Symbol 138 GraphicUsed by:139
Symbol 139 MovieClip {Gdt_Hazard_SlowFollower}Uses:138
Symbol 140 GraphicUsed by:141
Symbol 141 MovieClip {Gdt_Hazard_LaserS}Uses:140 20
Symbol 142 GraphicUsed by:143
Symbol 143 MovieClip {Gdt_Hazard_BLaser}Uses:142 20
Symbol 144 GraphicUsed by:151 249
Symbol 145 GraphicUsed by:146
Symbol 146 MovieClipUses:145Used by:151 249 512
Symbol 147 GraphicUsed by:148
Symbol 148 MovieClipUses:147Used by:151 157
Symbol 149 GraphicUsed by:150
Symbol 150 MovieClipUses:149Used by:151
Symbol 151 MovieClip {Gdt_Essentials_Finish}Uses:144 146 148 150
Symbol 152 GraphicUsed by:157 249
Symbol 153 GraphicUsed by:154
Symbol 154 MovieClipUses:153Used by:157 249
Symbol 155 GraphicUsed by:156
Symbol 156 MovieClipUses:155Used by:157
Symbol 157 MovieClip {Gdt_Essentials_Start}Uses:152 154 148 156
Symbol 158 GraphicUsed by:160 249
Symbol 159 GraphicUsed by:160
Symbol 160 MovieClip {Gdt_Essentials_Checkpoint}Uses:158 159
Symbol 161 GraphicUsed by:162
Symbol 162 MovieClip {Gdt_Loose_BBlock}Uses:161
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClip {Gdt_Loose_Block}Uses:163
Symbol 165 GraphicUsed by:166
Symbol 166 MovieClip {Gdt_Loose_PlatformA}Uses:165
Symbol 167 GraphicUsed by:168 249
Symbol 168 MovieClip {Gdt_Loose_PlatformC}Uses:167
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClip {Gdt_Loose_PlatformB}Uses:169
Symbol 171 GraphicUsed by:172
Symbol 172 MovieClip {Gdt_Loose_Column}Uses:171
Symbol 173 GraphicUsed by:174
Symbol 174 MovieClip {Gdt_Loose_Circle}Uses:173
Symbol 175 GraphicUsed by:176
Symbol 176 MovieClip {Gdt_Loose_BCircle}Uses:175
Symbol 177 GraphicUsed by:178 249
Symbol 178 MovieClip {Gdt_Static_Column}Uses:177
Symbol 179 GraphicUsed by:180 249
Symbol 180 MovieClip {Gdt_Static_Block}Uses:179
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClip {Gdt_Static_SmallBlock}Uses:181
Symbol 183 GraphicUsed by:184 249
Symbol 184 MovieClipUses:183Used by:185
Symbol 185 MovieClip {Gdt_Static_Platform}Uses:184Used by:186 187 188 189 190 191
Symbol 186 MovieClip {Gdt_Static_DiagonalA}Uses:185
Symbol 187 MovieClip {Gdt_Static_Diagonal45}Uses:185
Symbol 188 MovieClip {Gdt_Static_DiagonalB}Uses:185
Symbol 189 MovieClip {Gdt_Static_InvDiagonalA}Uses:185
Symbol 190 MovieClip {Gdt_Static_InvDiagonal45}Uses:185
Symbol 191 MovieClip {Gdt_Static_InvDiagonalB}Uses:185
Symbol 192 GraphicUsed by:193
Symbol 193 MovieClip {Gdt_Static_Circle}Uses:192
Symbol 194 GraphicUsed by:195
Symbol 195 MovieClip {Gdt_Static_BCircle}Uses:194
Symbol 196 GraphicUsed by:197 249
Symbol 197 MovieClip {Gdt_Static_VBCircle}Uses:196
Symbol 198 GraphicUsed by:201 268
Symbol 199 MovieClipUses:11Used by:200
Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}Uses:199Used by:201 203
Symbol 201 MovieClip {Gdt_Static_Bridge}Uses:198 200
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClip {Gdt_Static_Cavity}Uses:202 200Used by:249
Symbol 204 GraphicUsed by:250
Symbol 205 GraphicUsed by:249
Symbol 206 GraphicUsed by:249
Symbol 207 GraphicUsed by:249
Symbol 208 GraphicUsed by:249
Symbol 209 GraphicUsed by:249
Symbol 210 GraphicUsed by:249
Symbol 211 GraphicUsed by:249
Symbol 212 GraphicUsed by:249
Symbol 213 GraphicUsed by:249
Symbol 214 GraphicUsed by:249
Symbol 215 GraphicUsed by:249
Symbol 216 GraphicUsed by:249
Symbol 217 GraphicUsed by:249
Symbol 218 GraphicUsed by:249
Symbol 219 GraphicUsed by:249 554
Symbol 220 GraphicUsed by:249
Symbol 221 GraphicUsed by:249
Symbol 222 GraphicUsed by:249
Symbol 223 GraphicUsed by:249
Symbol 224 GraphicUsed by:249
Symbol 225 GraphicUsed by:249
Symbol 226 GraphicUsed by:249
Symbol 227 GraphicUsed by:228
Symbol 228 MovieClipUses:227Used by:229
Symbol 229 MovieClip {Gdt_Misc_DisappearingPlatform}Uses:228 12Used by:249
Symbol 230 GraphicUsed by:249
Symbol 231 GraphicUsed by:249
Symbol 232 GraphicUsed by:249
Symbol 233 GraphicUsed by:249
Symbol 234 GraphicUsed by:249
Symbol 235 GraphicUsed by:249
Symbol 236 GraphicUsed by:249
Symbol 237 GraphicUsed by:249
Symbol 238 GraphicUsed by:249
Symbol 239 GraphicUsed by:249
Symbol 240 GraphicUsed by:249
Symbol 241 GraphicUsed by:249
Symbol 242 GraphicUsed by:249
Symbol 243 GraphicUsed by:249
Symbol 244 GraphicUsed by:249
Symbol 245 GraphicUsed by:249
Symbol 246 GraphicUsed by:249
Symbol 247 GraphicUsed by:249
Symbol 248 GraphicUsed by:249
Symbol 249 MovieClip {MainKongregate_fla.handle_175}Uses:158 144 146 152 154 205 20 132 206 207 208 209 210 211 134 212 213 214 215 216 217 218 167 219 126 24 112 220 221 222 223 224 225 110 226 229 230 231 232 233 106 108 234 179 235 236 177 237 238 239 240 241 242 183 243 196 244 203 245 246 247 248Used by:250
Symbol 250 MovieClip {grid}Uses:204 249
Symbol 251 GraphicUsed by:518
Symbol 252 GraphicUsed by:518
Symbol 253 GraphicUsed by:518
Symbol 254 GraphicUsed by:259
Symbol 255 FontUsed by:256 258 261 263 265 267 270 272 275 277 280 282 285 287 290 292 295 297 300 302 305 307 310 312 315 317 320 322 325 330 332 335 337 340 342 345 347 350 352 355 357 360 362 366 368 371 373 376 378 381 383 386 388 391 393 396 398 401 403 407 409 412 414 417 419 422 424 427 429 432 434 437 439 442 444 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 469 471 474 476 478 481 484 486 489 491 494 496 500 502 505 507 508 509 510 511 514 516
Symbol 256 TextUses:255Used by:259
Symbol 257 GraphicUsed by:259
Symbol 258 TextUses:255Used by:259
Symbol 259 MovieClip {MainKongregate_fla.btn_Static_BCircle_124}Uses:254 256 257 258Used by:518
Symbol 260 GraphicUsed by:264
Symbol 261 TextUses:255Used by:264
Symbol 262 GraphicUsed by:264
Symbol 263 TextUses:255Used by:264
Symbol 264 MovieClip {MainKongregate_fla.btn_Static_Block_125}Uses:260 261 262 263Used by:518
Symbol 265 TextUses:255Used by:268 449
Symbol 266 GraphicUsed by:268
Symbol 267 TextUses:255Used by:268 449
Symbol 268 MovieClip {MainKongregate_fla.btn_Static_Bridge_126}Uses:198 265 266 267Used by:518
Symbol 269 GraphicUsed by:273
Symbol 270 TextUses:255Used by:273
Symbol 271 GraphicUsed by:273
Symbol 272 TextUses:255Used by:273
Symbol 273 MovieClip {MainKongregate_fla.btn_Static_Circle_127}Uses:269 270 271 272Used by:518
Symbol 274 GraphicUsed by:278
Symbol 275 TextUses:255Used by:278
Symbol 276 GraphicUsed by:278
Symbol 277 TextUses:255Used by:278
Symbol 278 MovieClip {MainKongregate_fla.btn_Static_Column_128}Uses:274 275 276 277Used by:518
Symbol 279 GraphicUsed by:283
Symbol 280 TextUses:255Used by:283
Symbol 281 GraphicUsed by:283
Symbol 282 TextUses:255Used by:283
Symbol 283 MovieClip {MainKongregate_fla.btn_Static_Diagonal45_129}Uses:279 280 281 282Used by:518
Symbol 284 GraphicUsed by:288
Symbol 285 TextUses:255Used by:288
Symbol 286 GraphicUsed by:288
Symbol 287 TextUses:255Used by:288
Symbol 288 MovieClip {MainKongregate_fla.btn_Static_DiagonalA_130}Uses:284 285 286 287Used by:518
Symbol 289 GraphicUsed by:293
Symbol 290 TextUses:255Used by:293
Symbol 291 GraphicUsed by:293
Symbol 292 TextUses:255Used by:293
Symbol 293 MovieClip {MainKongregate_fla.btn_Static_DiagonalB_131}Uses:289 290 291 292Used by:518
Symbol 294 GraphicUsed by:298
Symbol 295 TextUses:255Used by:298
Symbol 296 GraphicUsed by:298
Symbol 297 TextUses:255Used by:298
Symbol 298 MovieClip {MainKongregate_fla.btn_Static_InvDiagonal45_132}Uses:294 295 296 297Used by:518
Symbol 299 GraphicUsed by:303
Symbol 300 TextUses:255Used by:303
Symbol 301 GraphicUsed by:303
Symbol 302 TextUses:255Used by:303
Symbol 303 MovieClip {MainKongregate_fla.btn_Static_InvDiagonalA_133}Uses:299 300 301 302Used by:518
Symbol 304 GraphicUsed by:308
Symbol 305 TextUses:255Used by:308
Symbol 306 GraphicUsed by:308
Symbol 307 TextUses:255Used by:308
Symbol 308 MovieClip {MainKongregate_fla.btn_Static_InvDiagonalB_134}Uses:304 305 306 307Used by:518
Symbol 309 GraphicUsed by:313
Symbol 310 TextUses:255Used by:313
Symbol 311 GraphicUsed by:313
Symbol 312 TextUses:255Used by:313
Symbol 313 MovieClip {MainKongregate_fla.btn_Static_Platform_135}Uses:309 310 311 312Used by:467 518
Symbol 314 GraphicUsed by:318
Symbol 315 TextUses:255Used by:318
Symbol 316 GraphicUsed by:318
Symbol 317 TextUses:255Used by:318
Symbol 318 MovieClip {MainKongregate_fla.btn_Static_SmallBlock_136}Uses:314 315 316 317Used by:518
Symbol 319 GraphicUsed by:323
Symbol 320 TextUses:255Used by:323
Symbol 321 GraphicUsed by:323
Symbol 322 TextUses:255Used by:323
Symbol 323 MovieClip {MainKongregate_fla.btn_Static_VBCircle_137}Uses:319 320 321 322Used by:518
Symbol 324 GraphicUsed by:327
Symbol 325 TextUses:255Used by:327
Symbol 326 GraphicUsed by:327
Symbol 327 MovieClip {MainKongregate_fla.btn_Static_Cavity_138}Uses:324 325 326Used by:518
Symbol 328 GraphicUsed by:518
Symbol 329 GraphicUsed by:333
Symbol 330 TextUses:255Used by:333
Symbol 331 GraphicUsed by:333
Symbol 332 TextUses:255Used by:333
Symbol 333 MovieClip {MainKongregate_fla.btn_Hazard_BlockMagma_139}Uses:329 330 331 332Used by:518
Symbol 334 GraphicUsed by:338
Symbol 335 TextUses:255Used by:338
Symbol 336 GraphicUsed by:338
Symbol 337 TextUses:255Used by:338
Symbol 338 MovieClip {MainKongregate_fla.btn_Hazard_FastFollower_140}Uses:334 335 336 337Used by:518
Symbol 339 GraphicUsed by:343
Symbol 340 TextUses:255Used by:343
Symbol 341 GraphicUsed by:343
Symbol 342 TextUses:255Used by:343
Symbol 343 MovieClip {MainKongregate_fla.btn_Hazard_HHitter_141}Uses:339 340 341 342Used by:518
Symbol 344 GraphicUsed by:348
Symbol 345 TextUses:255Used by:348
Symbol 346 GraphicUsed by:348
Symbol 347 TextUses:255Used by:348
Symbol 348 MovieClip {MainKongregate_fla.btn_Hazard_HMagma_142}Uses:344 345 346 347Used by:518
Symbol 349 GraphicUsed by:353
Symbol 350 TextUses:255Used by:353
Symbol 351 GraphicUsed by:353
Symbol 352 TextUses:255Used by:353
Symbol 353 MovieClip {MainKongregate_fla.btn_Hazard_SlowFollower_143}Uses:349 350 351 352Used by:518
Symbol 354 GraphicUsed by:358
Symbol 355 TextUses:255Used by:358
Symbol 356 GraphicUsed by:358
Symbol 357 TextUses:255Used by:358
Symbol 358 MovieClip {MainKongregate_fla.btn_Hazard_VHitter_144}Uses:354 355 356 357Used by:518
Symbol 359 GraphicUsed by:363
Symbol 360 TextUses:255Used by:363
Symbol 361 GraphicUsed by:363
Symbol 362 TextUses:255Used by:363
Symbol 363 MovieClip {MainKongregate_fla.btn_Hazard_VMagma_145}Uses:359 360 361 362Used by:518
Symbol 364 GraphicUsed by:518
Symbol 365 GraphicUsed by:369
Symbol 366 TextUses:255Used by:369
Symbol 367 GraphicUsed by:369
Symbol 368 TextUses:255Used by:369
Symbol 369 MovieClip {MainKongregate_fla.btn_Loose_BBlock_146}Uses:365 366 367 368Used by:518
Symbol 370 GraphicUsed by:374
Symbol 371 TextUses:255Used by:374
Symbol 372 GraphicUsed by:374
Symbol 373 TextUses:255Used by:374
Symbol 374 MovieClip {MainKongregate_fla.btn_Loose_BCircle_147}Uses:370 371 372 373Used by:518
Symbol 375 GraphicUsed by:379
Symbol 376 TextUses:255Used by:379
Symbol 377 GraphicUsed by:379
Symbol 378 TextUses:255Used by:379
Symbol 379 MovieClip {MainKongregate_fla.btn_Loose_Block_148}Uses:375 376 377 378Used by:518
Symbol 380 GraphicUsed by:384
Symbol 381 TextUses:255Used by:384
Symbol 382 GraphicUsed by:384
Symbol 383 TextUses:255Used by:384
Symbol 384 MovieClip {MainKongregate_fla.btn_Loose_Circle_149}Uses:380 381 382 383Used by:518
Symbol 385 GraphicUsed by:389
Symbol 386 TextUses:255Used by:389
Symbol 387 GraphicUsed by:389
Symbol 388 TextUses:255Used by:389
Symbol 389 MovieClip {MainKongregate_fla.btn_Loose_Column_150}Uses:385 386 387 388Used by:518
Symbol 390 GraphicUsed by:394
Symbol 391 TextUses:255Used by:394
Symbol 392 GraphicUsed by:394
Symbol 393 TextUses:255Used by:394
Symbol 394 MovieClip {MainKongregate_fla.btn_Loose_PlatformA_151}Uses:390 391 392 393Used by:518
Symbol 395 GraphicUsed by:399
Symbol 396 TextUses:255Used by:399
Symbol 397 GraphicUsed by:399
Symbol 398 TextUses:255Used by:399
Symbol 399 MovieClip {MainKongregate_fla.btn_Loose_PlatformB_152}Uses:395 396 397 398Used by:518
Symbol 400 GraphicUsed by:404
Symbol 401 TextUses:255Used by:404
Symbol 402 GraphicUsed by:404
Symbol 403 TextUses:255Used by:404
Symbol 404 MovieClip {MainKongregate_fla.btn_Loose_PlatformC_153}Uses:400 401 402 403Used by:518
Symbol 405 GraphicUsed by:518
Symbol 406 GraphicUsed by:410
Symbol 407 TextUses:255Used by:410
Symbol 408 GraphicUsed by:410
Symbol 409 TextUses:255Used by:410
Symbol 410 MovieClip {MainKongregate_fla.btn_Mechanism_Elevator_154}Uses:406 407 408 409Used by:518
Symbol 411 GraphicUsed by:415
Symbol 412 TextUses:255Used by:415
Symbol 413 GraphicUsed by:415
Symbol 414 TextUses:255Used by:415
Symbol 415 MovieClip {MainKongregate_fla.btn_Mechanism_ForceColumnV_155}Uses:411 412 413 414Used by:518
Symbol 416 GraphicUsed by:420
Symbol 417 TextUses:255Used by:420
Symbol 418 GraphicUsed by:420
Symbol 419 TextUses:255Used by:420
Symbol 420 MovieClip {MainKongregate_fla.btn_Mechanism_Motor_156}Uses:416 417 418 419Used by:518
Symbol 421 GraphicUsed by:425
Symbol 422 TextUses:255Used by:425
Symbol 423 GraphicUsed by:425
Symbol 424 TextUses:255Used by:425
Symbol 425 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleB_157}Uses:421 422 423 424Used by:518
Symbol 426 GraphicUsed by:430
Symbol 427 TextUses:255Used by:430
Symbol 428 GraphicUsed by:430
Symbol 429 TextUses:255Used by:430
Symbol 430 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleBInv_158}Uses:426 427 428 429Used by:518
Symbol 431 GraphicUsed by:435
Symbol 432 TextUses:255Used by:435
Symbol 433 GraphicUsed by:435
Symbol 434 TextUses:255Used by:435
Symbol 435 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleS_159}Uses:431 432 433 434Used by:518
Symbol 436 GraphicUsed by:440
Symbol 437 TextUses:255Used by:440
Symbol 438 GraphicUsed by:440
Symbol 439 TextUses:255Used by:440
Symbol 440 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleSInv_160}Uses:436 437 438 439Used by:518
Symbol 441 GraphicUsed by:445
Symbol 442 TextUses:255Used by:445
Symbol 443 GraphicUsed by:445
Symbol 444 TextUses:255Used by:445
Symbol 445 MovieClip {MainKongregate_fla.btn_Mechanism_MotorInv_161}Uses:441 442 443 444Used by:518
Symbol 446 GraphicUsed by:518
Symbol 447 GraphicUsed by:449
Symbol 448 GraphicUsed by:449
Symbol 449 MovieClip {MainKongregate_fla.btn_Misc_Bridge_162}Uses:447 265 267 448Used by:518
Symbol 450 GraphicUsed by:467
Symbol 451 TextUses:255Used by:467
Symbol 452 TextUses:255Used by:467
Symbol 453 TextUses:255Used by:467
Symbol 454 TextUses:255Used by:467
Symbol 455 TextUses:255Used by:467
Symbol 456 TextUses:255Used by:467
Symbol 457 TextUses:255Used by:467
Symbol 458 TextUses:255Used by:467
Symbol 459 TextUses:255Used by:467
Symbol 460 TextUses:255Used by:467
Symbol 461 TextUses:255Used by:467
Symbol 462 TextUses:255Used by:467
Symbol 463 TextUses:255Used by:467
Symbol 464 TextUses:255Used by:467
Symbol 465 TextUses:255Used by:467
Symbol 466 TextUses:255Used by:467
Symbol 467 MovieClip {MainKongregate_fla.btn_Misc_DisappearingPlatform_163}Uses:450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 313 466Used by:518
Symbol 468 GraphicUsed by:472
Symbol 469 TextUses:255Used by:472
Symbol 470 GraphicUsed by:472
Symbol 471 TextUses:255Used by:472
Symbol 472 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterDown_164}Uses:468 469 470 471Used by:518
Symbol 473 GraphicUsed by:477
Symbol 474 TextUses:255Used by:477
Symbol 475 GraphicUsed by:477
Symbol 476 TextUses:255Used by:477
Symbol 477 MovieClip {MainKongregate_fla.btn_Misc_HangingPlank_165}Uses:473 474 475 476Used by:518
Symbol 478 TextUses:255Used by:482
Symbol 479 GraphicUsed by:482
Symbol 480 GraphicUsed by:482
Symbol 481 TextUses:255Used by:482
Symbol 482 MovieClip {MainKongregate_fla.btn_Misc_Spring_166}Uses:478 479 480 481Used by:518
Symbol 483 GraphicUsed by:487
Symbol 484 TextUses:255Used by:487
Symbol 485 GraphicUsed by:487
Symbol 486 TextUses:255Used by:487
Symbol 487 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterUp_167}Uses:483 484 485 486Used by:518
Symbol 488 GraphicUsed by:492
Symbol 489 TextUses:255Used by:492
Symbol 490 GraphicUsed by:492
Symbol 491 TextUses:255Used by:492
Symbol 492 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterLeft_168}Uses:488 489 490 491Used by:518
Symbol 493 GraphicUsed by:497
Symbol 494 TextUses:255Used by:497
Symbol 495 GraphicUsed by:497
Symbol 496 TextUses:255Used by:497
Symbol 497 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterRight_169}Uses:493 494 495 496Used by:518
Symbol 498 GraphicUsed by:518
Symbol 499 GraphicUsed by:503
Symbol 500 TextUses:255Used by:503
Symbol 501 GraphicUsed by:503
Symbol 502 TextUses:255Used by:503
Symbol 503 MovieClip {MainKongregate_fla.btn_Essentials_Checkpoint_170}Uses:499 500 501 502Used by:518
Symbol 504 GraphicUsed by:512
Symbol 505 TextUses:255Used by:512
Symbol 506 GraphicUsed by:512
Symbol 507 TextUses:255Used by:512
Symbol 508 TextUses:255Used by:512
Symbol 509 TextUses:255Used by:512
Symbol 510 TextUses:255Used by:512
Symbol 511 TextUses:255Used by:512
Symbol 512 MovieClip {MainKongregate_fla.btn_Essentials_Finish_171}Uses:504 505 146 506 507 508 509 510 511Used by:518
Symbol 513 GraphicUsed by:517
Symbol 514 TextUses:255Used by:517
Symbol 515 GraphicUsed by:517
Symbol 516 TextUses:255Used by:517
Symbol 517 MovieClip {MainKongregate_fla.btn_Essentials_Start_173}Uses:513 514 515 516Used by:518
Symbol 518 MovieClip {Gadgetlist}Uses:251 252 253 259 264 268 273 278 283 288 293 298 303 308 313 318 323 327 328 333 338 343 348 353 358 363 364 369 374 379 384 389 394 399 404 405 410 415 420 425 430 435 440 445 446 449 467 472 477 482 487 492 497 498 503 512 517
Symbol 519 GraphicUsed by:520
Symbol 520 MovieClipUses:519Used by:528
Symbol 521 GraphicUsed by:525
Symbol 522 GraphicUsed by:525
Symbol 523 GraphicUsed by:525
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClip {MainKongregate_fla.espiral_118}Uses:521 522 523 524Used by:528
Symbol 526 GraphicUsed by:527
Symbol 527 MovieClipUses:526Used by:528
Symbol 528 MovieClip {Mdl_Original}Uses:520 525 527
Symbol 529 GraphicUsed by:532
Symbol 530 GraphicUsed by:531
Symbol 531 MovieClipUses:530Used by:532
Symbol 532 MovieClip {Mdl_Glass}Uses:529 531
Symbol 533 GraphicUsed by:534
Symbol 534 MovieClip {f_s_board}Uses:533
Symbol 535 GraphicUsed by:536
Symbol 536 MovieClip {f_s_horBasic}Uses:535
Symbol 537 GraphicUsed by:538
Symbol 538 MovieClip {f_p_gear}Uses:537
Symbol 539 GraphicUsed by:540
Symbol 540 MovieClipUses:539Used by:541 551
Symbol 541 MovieClip {BrickThread}Uses:540
Symbol 542 GraphicUsed by:543
Symbol 543 MovieClip {f_s_plank}Uses:542Used by:545 546
Symbol 544 GraphicUsed by:545
Symbol 545 MovieClip {BridgePlankwBolt}Uses:543 544
Symbol 546 MovieClip {BridgePlank}Uses:543
Symbol 547 GraphicUsed by:548
Symbol 548 MovieClipUses:547Used by:549
Symbol 549 MovieClip {ColoredColumn}Uses:548Used by:550
Symbol 550 MovieClip {Vanilla.Features.F_LColumn}Uses:549
Symbol 551 MovieClip {ColoredBrick}Uses:540Used by:552
Symbol 552 MovieClip {Vanilla.Features.F_LBrick}Uses:551
Symbol 553 GraphicUsed by:554
Symbol 554 MovieClip {Gdt_Mechanism_Elevator}Uses:219 553Used by:555 556
Symbol 555 MovieClip {Vanilla.Features.F_PinABox}Uses:12 554
Symbol 556 MovieClip {W1_Impulsador}Uses:554
Symbol 557 GraphicUsed by:560
Symbol 558 GraphicUsed by:559
Symbol 559 MovieClipUses:558Used by:560
Symbol 560 MovieClip {Cuadrenemy}Uses:557 559
Symbol 561 GraphicUsed by:562
Symbol 562 MovieClip {rope}Uses:561
Symbol 563 GraphicUsed by:564
Symbol 564 MovieClip {pink_petal}Uses:563
Symbol 565 GraphicUsed by:566
Symbol 566 MovieClip {BoulderGfx}Uses:565
Symbol 567 GraphicUsed by:568
Symbol 568 MovieClipUses:567Used by:569
Symbol 569 MovieClip {Exit_inner}Uses:568
Symbol 570 BitmapUsed by:571 611
Symbol 571 GraphicUses:570Used by:607
Symbol 572 GraphicUsed by:573
Symbol 573 ButtonUses:572Used by:607 610 612 616 693 820  Timeline
Symbol 574 MovieClip {TextArea_disabledSkin}Uses:61Used by:604
Symbol 575 MovieClip {TextArea_upSkin}Uses:63Used by:604
Symbol 576 GraphicUsed by:577
Symbol 577 MovieClip {ScrollTrack_skin}Uses:576Used by:603 636
Symbol 578 GraphicUsed by:580
Symbol 579 MovieClipUses:45Used by:580 590 592
Symbol 580 MovieClip {ScrollArrowUp_downSkin}Uses:578 579Used by:603 636
Symbol 581 GraphicUsed by:582
Symbol 582 MovieClip {ScrollArrowDown_downSkin}Uses:581 45Used by:603 636
Symbol 583 GraphicUsed by:584
Symbol 584 MovieClip {ScrollThumb_downSkin}Uses:583Used by:603 636
Symbol 585 GraphicUsed by:586
Symbol 586 MovieClip {ScrollArrowDown_overSkin}Uses:585 45Used by:603 636
Symbol 587 GraphicUsed by:588
Symbol 588 MovieClip {ScrollThumb_overSkin}Uses:587Used by:603 636
Symbol 589 GraphicUsed by:590
Symbol 590 MovieClip {ScrollArrowUp_overSkin}Uses:589 579Used by:603 636
Symbol 591 GraphicUsed by:592
Symbol 592 MovieClip {ScrollArrowUp_upSkin}Uses:591 579Used by:603 636
Symbol 593 GraphicUsed by:594
Symbol 594 MovieClip {ScrollThumb_upSkin}Uses:593Used by:603 636
Symbol 595 GraphicUsed by:596
Symbol 596 MovieClip {ScrollArrowDown_upSkin}Uses:595 45Used by:603 636
Symbol 597 GraphicUsed by:598
Symbol 598 MovieClip {ScrollArrowDown_disabledSkin}Uses:597Used by:603 636
Symbol 599 GraphicUsed by:600
Symbol 600 MovieClip {ScrollArrowUp_disabledSkin}Uses:599Used by:603 636
Symbol 601 GraphicUsed by:602
Symbol 602 MovieClip {ScrollBar_thumbIcon}Uses:601Used by:603 636
Symbol 603 MovieClip {fl.controls.UIScrollBar}Uses:40 41 43 577 580 582 584 586 588 590 592 594 596 598 600 602Used by:604
Symbol 604 MovieClip {fl.controls.TextArea}Uses:40 41 574 575 43 603Used by:607 610 612
Symbol 605 GraphicUsed by:606
Symbol 606 MovieClipUses:605Used by:607 612
Symbol 607 MovieClip {Panel_Load_OW}Uses:571 573 604 606
Symbol 608 BitmapUsed by:609
Symbol 609 GraphicUses:608Used by:610
Symbol 610 MovieClip {Panel_Save}Uses:609 573 604
Symbol 611 GraphicUses:570Used by:612
Symbol 612 MovieClip {Panel_Load}Uses:611 573 604 606
Symbol 613 MovieClip {Vanilla.Pieces.P_HMVBlock}Uses:136
Symbol 614 BitmapUsed by:615
Symbol 615 GraphicUses:614Used by:616
Symbol 616 MovieClip {panel_Question}Uses:615 573
Symbol 617 GraphicUsed by:618
Symbol 618 MovieClip {List_skin}Uses:617Used by:637
Symbol 619 GraphicUsed by:620
Symbol 620 MovieClip {CellRenderer_upSkin}Uses:619Used by:635
Symbol 621 GraphicUsed by:622
Symbol 622 MovieClip {CellRenderer_disabledSkin}Uses:621Used by:635
Symbol 623 GraphicUsed by:624
Symbol 624 MovieClip {CellRenderer_downSkin}Uses:623Used by:635
Symbol 625 GraphicUsed by:626
Symbol 626 MovieClip {CellRenderer_overSkin}Uses:625Used by:635
Symbol 627 GraphicUsed by:628
Symbol 628 MovieClip {CellRenderer_selectedDisabledSkin}Uses:627Used by:635
Symbol 629 GraphicUsed by:630
Symbol 630 MovieClip {CellRenderer_selectedDownSkin}Uses:629Used by:635
Symbol 631 GraphicUsed by:632
Symbol 632 MovieClip {CellRenderer_selectedOverSkin}Uses:631Used by:635
Symbol 633 GraphicUsed by:634
Symbol 634 MovieClip {CellRenderer_selectedUpSkin}Uses:633Used by:635
Symbol 635 MovieClip {fl.controls.listClasses.CellRenderer}Uses:620 41 622 624 626 628 630 632 634Used by:637
Symbol 636 MovieClip {fl.controls.ScrollBar}Uses:577 41 43 580 582 584 586 588 590 592 594 596 598 600 602Used by:637 769
Symbol 637 MovieClip {fl.controls.List}Uses:40 41 618 635 43 636Used by:646
Symbol 638 GraphicUsed by:639
Symbol 639 MovieClip {ComboBox_upSkin}Uses:638Used by:646
Symbol 640 GraphicUsed by:641
Symbol 641 MovieClip {ComboBox_disabledSkin}Uses:640Used by:646
Symbol 642 GraphicUsed by:643
Symbol 643 MovieClip {ComboBox_overSkin}Uses:642Used by:646
Symbol 644 GraphicUsed by:645
Symbol 645 MovieClip {ComboBox_downSkin}Uses:644Used by:646
Symbol 646 MovieClip {fl.controls.ComboBox}Uses:40 41 43 639 641 643 645 65 637Used by:Timeline
Symbol 647 GraphicUsed by:Timeline
Symbol 648 GraphicUsed by:Timeline
Symbol 649 GraphicUsed by:650
Symbol 650 MovieClipUses:649Used by:Timeline
Symbol 651 BitmapUsed by:652
Symbol 652 GraphicUses:651Used by:653
Symbol 653 MovieClipUses:652Used by:657 732
Symbol 654 BitmapUsed by:655
Symbol 655 GraphicUses:654Used by:656
Symbol 656 MovieClipUses:655Used by:657 732
Symbol 657 MovieClipUses:653 656Used by:Timeline
Symbol 658 BitmapUsed by:659
Symbol 659 GraphicUses:658Used by:688
Symbol 660 BitmapUsed by:661
Symbol 661 GraphicUses:660Used by:688
Symbol 662 BitmapUsed by:663
Symbol 663 GraphicUses:662Used by:688
Symbol 664 BitmapUsed by:665 666
Symbol 665 GraphicUses:664Used by:668
Symbol 666 GraphicUses:664Used by:668
Symbol 667 SoundUsed by:668 672 676 680 683 687
Symbol 668 ButtonUses:665 666 667Used by:688
Symbol 669 BitmapUsed by:670 671
Symbol 670 GraphicUses:669Used by:672
Symbol 671 GraphicUses:669Used by:672
Symbol 672 ButtonUses:670 671 667Used by:688
Symbol 673 BitmapUsed by:674 675
Symbol 674 GraphicUses:673Used by:676
Symbol 675 GraphicUses:673Used by:676
Symbol 676 ButtonUses:674 675 667Used by:688
Symbol 677 BitmapUsed by:678 679
Symbol 678 GraphicUses:677Used by:680
Symbol 679 GraphicUses:677Used by:680
Symbol 680 ButtonUses:678 679 667Used by:688
Symbol 681 BitmapUsed by:682
Symbol 682 GraphicUses:681Used by:683
Symbol 683 ButtonUses:682 667Used by:688
Symbol 684 BitmapUsed by:685 686
Symbol 685 GraphicUses:684Used by:687
Symbol 686 GraphicUses:684Used by:687
Symbol 687 ButtonUses:685 686 667Used by:688
Symbol 688 MovieClip {MainKongregate_fla.title_anim_5}Uses:659 661 663 668 672 676 680 683 687Used by:Timeline
Symbol 689 BitmapUsed by:690
Symbol 690 GraphicUses:689Used by:693
Symbol 691 FontUsed by:692 736 737 738 739 740 741 744 745 747 750 753 754 755 758 772 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817
Symbol 692 EditableTextUses:691Used by:693
Symbol 693 MovieClip {MainKongregate_fla.MusicPlayer_12}Uses:690 573 692Used by:Timeline
Symbol 694 GraphicUsed by:695
Symbol 695 MovieClipUses:694Used by:697
Symbol 696 SoundUsed by:697
Symbol 697 MovieClip {MainKongregate_fla.WinWin_ani_14}Uses:695 696Used by:Timeline
Symbol 698 GraphicUsed by:Timeline
Symbol 699 GraphicUsed by:700
Symbol 700 MovieClip {MainKongregate_fla.Telon_16}Uses:699Used by:Timeline
Symbol 701 GraphicUsed by:732
Symbol 702 BitmapUsed by:703
Symbol 703 GraphicUses:702Used by:704
Symbol 704 MovieClipUses:703Used by:732
Symbol 705 BitmapUsed by:706
Symbol 706 GraphicUses:705Used by:707
Symbol 707 MovieClipUses:706Used by:732
Symbol 708 BitmapUsed by:709
Symbol 709 GraphicUses:708Used by:710
Symbol 710 MovieClipUses:709Used by:732
Symbol 711 BitmapUsed by:712
Symbol 712 GraphicUses:711Used by:713
Symbol 713 MovieClipUses:712Used by:732
Symbol 714 BitmapUsed by:715
Symbol 715 GraphicUses:714Used by:716
Symbol 716 MovieClipUses:715Used by:732
Symbol 717 BitmapUsed by:718
Symbol 718 GraphicUses:717Used by:719
Symbol 719 MovieClipUses:718Used by:732
Symbol 720 BitmapUsed by:721
Symbol 721 GraphicUses:720Used by:722
Symbol 722 MovieClipUses:721Used by:732
Symbol 723 BitmapUsed by:724
Symbol 724 GraphicUses:723Used by:725
Symbol 725 MovieClipUses:724Used by:732
Symbol 726 BitmapUsed by:727
Symbol 727 GraphicUses:726Used by:728
Symbol 728 MovieClipUses:727Used by:732
Symbol 729 BitmapUsed by:730
Symbol 730 GraphicUses:729Used by:731
Symbol 731 MovieClipUses:730Used by:732
Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18}Uses:701 653 656 704 707 710 713 716 719 722 725 728 731Used by:743
Symbol 733 GraphicUsed by:734
Symbol 734 MovieClipUses:733Used by:743
Symbol 735 GraphicUsed by:742
Symbol 736 TextUses:691Used by:742
Symbol 737 TextUses:691Used by:742
Symbol 738 TextUses:691Used by:742
Symbol 739 TextUses:691Used by:742
Symbol 740 TextUses:691Used by:742
Symbol 741 TextUses:691Used by:742
Symbol 742 MovieClipUses:735 736 737 738 739 740 741Used by:743
Symbol 743 MovieClip {Vanilla.MGame}Uses:732 734 742Used by:Timeline
Symbol 744 EditableTextUses:691Used by:Timeline
Symbol 745 TextUses:691Used by:746
Symbol 746 MovieClipUses:745Used by:Timeline
Symbol 747 TextUses:691Used by:749
Symbol 748 GraphicUsed by:749
Symbol 749 ButtonUses:747 748Used by:Timeline
Symbol 750 TextUses:691Used by:752
Symbol 751 GraphicUsed by:752
Symbol 752 ButtonUses:750 751Used by:Timeline
Symbol 753 TextUses:691Used by:Timeline
Symbol 754 EditableTextUses:691Used by:Timeline
Symbol 755 TextUses:691Used by:757
Symbol 756 GraphicUsed by:757
Symbol 757 ButtonUses:755 756Used by:Timeline
Symbol 758 TextUses:691Used by:760
Symbol 759 GraphicUsed by:760
Symbol 760 ButtonUses:758 759Used by:Timeline
Symbol 761 BitmapUsed by:762
Symbol 762 GraphicUses:761Used by:Timeline
Symbol 763 GraphicUsed by:764
Symbol 764 MovieClipUses:763Used by:767 768
Symbol 765 GraphicUsed by:766
Symbol 766 MovieClipUses:765Used by:767 768
Symbol 767 MovieClip {ScrollPane_disabledSkin}Uses:764 766Used by:769
Symbol 768 MovieClip {ScrollPane_upSkin}Uses:764 766Used by:769
Symbol 769 MovieClip {fl.containers.ScrollPane}Uses:40 41 767 768 636Used by:Timeline
Symbol 770 FontUsed by:771
Symbol 771 TextUses:770Used by:Timeline
Symbol 772 TextUses:691Used by:Timeline
Symbol 773 BitmapUsed by:774
Symbol 774 GraphicUses:773Used by:Timeline
Symbol 775 BitmapUsed by:776
Symbol 776 GraphicUses:775Used by:820
Symbol 777 GraphicUsed by:778
Symbol 778 ButtonUses:777Used by:820
Symbol 779 GraphicUsed by:820
Symbol 780 EditableTextUses:691Used by:820
Symbol 781 EditableTextUses:691Used by:820
Symbol 782 EditableTextUses:691Used by:820
Symbol 783 EditableTextUses:691Used by:820
Symbol 784 EditableTextUses:691Used by:820
Symbol 785 EditableTextUses:691Used by:820
Symbol 786 EditableTextUses:691Used by:820
Symbol 787 EditableTextUses:691Used by:820
Symbol 788 EditableTextUses:691Used by:820
Symbol 789 EditableTextUses:691Used by:820
Symbol 790 EditableTextUses:691Used by:820
Symbol 791 EditableTextUses:691Used by:820
Symbol 792 EditableTextUses:691Used by:820
Symbol 793 EditableTextUses:691Used by:820
Symbol 794 EditableTextUses:691Used by:820
Symbol 795 EditableTextUses:691Used by:820
Symbol 796 EditableTextUses:691Used by:820
Symbol 797 EditableTextUses:691Used by:820
Symbol 798 EditableTextUses:691Used by:820
Symbol 799 EditableTextUses:691Used by:820
Symbol 800 EditableTextUses:691Used by:820
Symbol 801 EditableTextUses:691Used by:820
Symbol 802 EditableTextUses:691Used by:820
Symbol 803 EditableTextUses:691Used by:820
Symbol 804 EditableTextUses:691Used by:820
Symbol 805 EditableTextUses:691Used by:820
Symbol 806 EditableTextUses:691Used by:820
Symbol 807 EditableTextUses:691Used by:820
Symbol 808 EditableTextUses:691Used by:820
Symbol 809 EditableTextUses:691Used by:820
Symbol 810 EditableTextUses:691Used by:820
Symbol 811 EditableTextUses:691Used by:820
Symbol 812 EditableTextUses:691Used by:820
Symbol 813 EditableTextUses:691Used by:820
Symbol 814 EditableTextUses:691Used by:820
Symbol 815 EditableTextUses:691Used by:820
Symbol 816 EditableTextUses:691Used by:820
Symbol 817 EditableTextUses:691Used by:820
Symbol 818 GraphicUsed by:819
Symbol 819 MovieClipUses:818Used by:820
Symbol 820 MovieClip {MainKongregate_fla.Categories_77}Uses:776 778 573 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 819Used by:Timeline
Symbol 821 BitmapUsed by:822
Symbol 822 GraphicUses:821Used by:Timeline
Symbol 823 BitmapUsed by:824
Symbol 824 GraphicUses:823Used by:Timeline

Instance Names

"kongregate"Frame 2Symbol 1 MovieClip {com.kongregate.as3.client.KongregateAPI}
"CTitle"Frame 4Symbol 688 MovieClip {MainKongregate_fla.title_anim_5}
"musicPlayer"Frame 4Symbol 693 MovieClip {MainKongregate_fla.MusicPlayer_12}
"winAni"Frame 4Symbol 697 MovieClip {MainKongregate_fla.WinWin_ani_14}
"telon"Frame 4Symbol 700 MovieClip {MainKongregate_fla.Telon_16}
"world"Frame 6Symbol 743 MovieClip {Vanilla.MGame}
"time_txt"Frame 6Symbol 744 EditableText
"time_lbl"Frame 6Symbol 746 MovieClip
"btn_Exit"Frame 6Symbol 749 Button
"btn_Restart"Frame 6Symbol 752 Button
"check_txt"Frame 6Symbol 754 EditableText
"btn_coolbuddy"Frame 6Symbol 757 Button
"ibtnp_LevelEditor"Frame 6Symbol 760 Button
"gridContainer"Frame 7Symbol 769 MovieClip {fl.containers.ScrollPane}
"scroll_elements"Frame 7Symbol 769 MovieClip {fl.containers.ScrollPane}
"Combito_selector"Frame 7Symbol 646 MovieClip {fl.controls.ComboBox}
"btn_save"Frame 7Symbol 573 Button
"btn_TEST"Frame 7Symbol 573 Button
"btn_LOAD"Frame 7Symbol 573 Button
"btn_CLEAR"Frame 7Symbol 573 Button
"btn_ERASE"Frame 7Symbol 573 Button
"Ebtn_Back"Frame 7Symbol 573 Button
"Combito_Background"Frame 7Symbol 646 MovieClip {fl.controls.ComboBox}
"Obtn_Back"Frame 8Symbol 573 Button
"Obtn_LoadLevel"Frame 8Symbol 573 Button
"Obtn_LevelCentral"Frame 8Symbol 573 Button
"cat"Frame 8Symbol 820 MovieClip {MainKongregate_fla.Categories_77}
"Ibtn_Back"Frame 9Symbol 573 Button
"Ibtn_LevelCentral"Frame 9Symbol 573 Button
"Ibtn_GameForum"Frame 9Symbol 573 Button
"Cbtn_Back"Frame 10Symbol 573 Button
"btn_Vanilla2"Frame 10Symbol 573 Button
"btn_Vanilla1"Frame 10Symbol 573 Button
"creds_CoolBuddy"Frame 10Symbol 573 Button
"creds_Haini"Frame 10Symbol 573 Button
"area"Symbol 16 MovieClip {Vanilla.Pieces.P_CheckPoint} Frame 1Symbol 12 MovieClip {MainKongregate_fla.Area_100}
"area"Symbol 25 MovieClip {Vanilla.Pieces.P_VField} Frame 1Symbol 12 MovieClip {MainKongregate_fla.Area_100}
"area"Symbol 27 MovieClip {Vanilla.Pieces.P_invVField} Frame 1Symbol 12 MovieClip {MainKongregate_fla.Area_100}
"inner"Symbol 185 MovieClip {Gdt_Static_Platform} Frame 1Symbol 184 MovieClip
"core"Symbol 186 MovieClip {Gdt_Static_DiagonalA} Frame 1Symbol 185 MovieClip {Gdt_Static_Platform}
"core"Symbol 187 MovieClip {Gdt_Static_Diagonal45} Frame 1Symbol 185 MovieClip {Gdt_Static_Platform}
"core"Symbol 188 MovieClip {Gdt_Static_DiagonalB} Frame 1Symbol 185 MovieClip {Gdt_Static_Platform}
"core"Symbol 189 MovieClip {Gdt_Static_InvDiagonalA} Frame 1Symbol 185 MovieClip {Gdt_Static_Platform}
"core"Symbol 190 MovieClip {Gdt_Static_InvDiagonal45} Frame 1Symbol 185 MovieClip {Gdt_Static_Platform}
"core"Symbol 191 MovieClip {Gdt_Static_InvDiagonalB} Frame 1Symbol 185 MovieClip {Gdt_Static_Platform}
"core"Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179} Frame 1Symbol 199 MovieClip
"i6"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i7"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i8"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i9"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i10"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i11"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i5"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i4"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i3"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i2"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i1"Symbol 201 MovieClip {Gdt_Static_Bridge} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i6"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i7"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i8"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i9"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i10"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i11"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i5"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i4"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i3"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i2"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"i1"Symbol 203 MovieClip {Gdt_Static_Cavity} Frame 1Symbol 200 MovieClip {MainKongregate_fla.Area_midddle_179}
"core"Symbol 229 MovieClip {Gdt_Misc_DisappearingPlatform} Frame 1Symbol 228 MovieClip
"area"Symbol 229 MovieClip {Gdt_Misc_DisappearingPlatform} Frame 1Symbol 12 MovieClip {MainKongregate_fla.Area_100}
"handle"Symbol 250 MovieClip {grid} Frame 1Symbol 249 MovieClip {MainKongregate_fla.handle_175}
"btn_static_bcircle"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 259 MovieClip {MainKongregate_fla.btn_Static_BCircle_124}
"btn_static_block"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 264 MovieClip {MainKongregate_fla.btn_Static_Block_125}
"btn_static_bridge"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 268 MovieClip {MainKongregate_fla.btn_Static_Bridge_126}
"btn_static_circle"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 273 MovieClip {MainKongregate_fla.btn_Static_Circle_127}
"btn_static_column"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 278 MovieClip {MainKongregate_fla.btn_Static_Column_128}
"btn_static_diagonal45"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 283 MovieClip {MainKongregate_fla.btn_Static_Diagonal45_129}
"btn_static_diagonala"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 288 MovieClip {MainKongregate_fla.btn_Static_DiagonalA_130}
"btn_static_diagonalb"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 293 MovieClip {MainKongregate_fla.btn_Static_DiagonalB_131}
"btn_static_invdiagonal45"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 298 MovieClip {MainKongregate_fla.btn_Static_InvDiagonal45_132}
"btn_static_invdiagonala"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 303 MovieClip {MainKongregate_fla.btn_Static_InvDiagonalA_133}
"btn_static_invdiagonalb"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 308 MovieClip {MainKongregate_fla.btn_Static_InvDiagonalB_134}
"btn_static_platform"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 313 MovieClip {MainKongregate_fla.btn_Static_Platform_135}
"btn_static_smallblock"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 318 MovieClip {MainKongregate_fla.btn_Static_SmallBlock_136}
"btn_static_vbcircle"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 323 MovieClip {MainKongregate_fla.btn_Static_VBCircle_137}
"btn_static_cavity"Symbol 518 MovieClip {Gadgetlist} Frame 2Symbol 327 MovieClip {MainKongregate_fla.btn_Static_Cavity_138}
"btn_hazard_blockmagma"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 333 MovieClip {MainKongregate_fla.btn_Hazard_BlockMagma_139}
"btn_hazard_fastfollower"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 338 MovieClip {MainKongregate_fla.btn_Hazard_FastFollower_140}
"btn_hazard_hhitter"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 343 MovieClip {MainKongregate_fla.btn_Hazard_HHitter_141}
"btn_hazard_hmagma"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 348 MovieClip {MainKongregate_fla.btn_Hazard_HMagma_142}
"btn_hazard_slowfollower"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 353 MovieClip {MainKongregate_fla.btn_Hazard_SlowFollower_143}
"btn_hazard_vhitter"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 358 MovieClip {MainKongregate_fla.btn_Hazard_VHitter_144}
"btn_hazard_vmagma"Symbol 518 MovieClip {Gadgetlist} Frame 3Symbol 363 MovieClip {MainKongregate_fla.btn_Hazard_VMagma_145}
"btn_loose_bblock"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 369 MovieClip {MainKongregate_fla.btn_Loose_BBlock_146}
"btn_loose_bcircle"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 374 MovieClip {MainKongregate_fla.btn_Loose_BCircle_147}
"btn_loose_block"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 379 MovieClip {MainKongregate_fla.btn_Loose_Block_148}
"btn_loose_circle"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 384 MovieClip {MainKongregate_fla.btn_Loose_Circle_149}
"btn_loose_column"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 389 MovieClip {MainKongregate_fla.btn_Loose_Column_150}
"btn_loose_platforma"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 394 MovieClip {MainKongregate_fla.btn_Loose_PlatformA_151}
"btn_loose_platformb"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 399 MovieClip {MainKongregate_fla.btn_Loose_PlatformB_152}
"btn_loose_platformc"Symbol 518 MovieClip {Gadgetlist} Frame 4Symbol 404 MovieClip {MainKongregate_fla.btn_Loose_PlatformC_153}
"btn_mechanism_elevator"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 410 MovieClip {MainKongregate_fla.btn_Mechanism_Elevator_154}
"btn_mechanism_forcecolumnv"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 415 MovieClip {MainKongregate_fla.btn_Mechanism_ForceColumnV_155}
"btn_mechanism_motor"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 420 MovieClip {MainKongregate_fla.btn_Mechanism_Motor_156}
"btn_mechanism_motorcircleb"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 425 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleB_157}
"btn_mechanism_motorcirclebinv"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 430 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleBInv_158}
"btn_mechanism_motorcircles"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 435 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleS_159}
"btn_mechanism_motorcirclesinv"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 440 MovieClip {MainKongregate_fla.btn_Mechanism_MotorCircleSInv_160}
"btn_mechanism_motorinv"Symbol 518 MovieClip {Gadgetlist} Frame 5Symbol 445 MovieClip {MainKongregate_fla.btn_Mechanism_MotorInv_161}
"btn_misc_composedbridge"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 449 MovieClip {MainKongregate_fla.btn_Misc_Bridge_162}
"btn_misc_disappearingplatform"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 467 MovieClip {MainKongregate_fla.btn_Misc_DisappearingPlatform_163}
"btn_misc_gravity_down"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 472 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterDown_164}
"btn_misc_hangingplank"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 477 MovieClip {MainKongregate_fla.btn_Misc_HangingPlank_165}
"btn_misc_composedspring"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 482 MovieClip {MainKongregate_fla.btn_Misc_Spring_166}
"btn_misc_gravity_up"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 487 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterUp_167}
"btn_misc_gravity_left"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 492 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterLeft_168}
"btn_misc_gravity_right"Symbol 518 MovieClip {Gadgetlist} Frame 6Symbol 497 MovieClip {MainKongregate_fla.btn_Misc_GravityInverterRight_169}
"btn_essentials_checkpoint"Symbol 518 MovieClip {Gadgetlist} Frame 7Symbol 503 MovieClip {MainKongregate_fla.btn_Essentials_Checkpoint_170}
"btn_essentials_finish"Symbol 518 MovieClip {Gadgetlist} Frame 7Symbol 512 MovieClip {MainKongregate_fla.btn_Essentials_Finish_171}
"btn_essentials_start"Symbol 518 MovieClip {Gadgetlist} Frame 7Symbol 517 MovieClip {MainKongregate_fla.btn_Essentials_Start_173}
"brillo"Symbol 528 MovieClip {Mdl_Original} Frame 1Symbol 520 MovieClip
"espiral"Symbol 528 MovieClip {Mdl_Original} Frame 1Symbol 525 MovieClip {MainKongregate_fla.espiral_118}
"brillo_3"Symbol 528 MovieClip {Mdl_Original} Frame 1Symbol 520 MovieClip
"brillo_2"Symbol 528 MovieClip {Mdl_Original} Frame 1Symbol 527 MovieClip
"brillo"Symbol 532 MovieClip {Mdl_Glass} Frame 1Symbol 531 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 541 MovieClip {BrickThread} Frame 1Symbol 540 MovieClip
"core"Symbol 545 MovieClip {BridgePlankwBolt} Frame 1Symbol 543 MovieClip {f_s_plank}
"core"Symbol 549 MovieClip {ColoredColumn} Frame 1Symbol 548 MovieClip
"core"Symbol 550 MovieClip {Vanilla.Features.F_LColumn} Frame 1Symbol 549 MovieClip {ColoredColumn}
"core"Symbol 551 MovieClip {ColoredBrick} Frame 1Symbol 540 MovieClip
"core"Symbol 552 MovieClip {Vanilla.Features.F_LBrick} Frame 1Symbol 551 MovieClip {ColoredBrick}
"area"Symbol 555 MovieClip {Vanilla.Features.F_PinABox} Frame 1Symbol 12 MovieClip {MainKongregate_fla.Area_100}
"core"Symbol 555 MovieClip {Vanilla.Features.F_PinABox} Frame 1Symbol 554 MovieClip {Gdt_Mechanism_Elevator}
"core"Symbol 556 MovieClip {W1_Impulsador} Frame 1Symbol 554 MovieClip {Gdt_Mechanism_Elevator}
"red"Symbol 560 MovieClip {Cuadrenemy} Frame 1Symbol 559 MovieClip
"core"Symbol 569 MovieClip {Exit_inner} Frame 1Symbol 568 MovieClip
"btn_close"Symbol 607 MovieClip {Panel_Load_OW} Frame 1Symbol 573 Button
"btn_load"Symbol 607 MovieClip {Panel_Load_OW} Frame 1Symbol 573 Button
"lvl_txt"Symbol 607 MovieClip {Panel_Load_OW} Frame 1Symbol 604 MovieClip {fl.controls.TextArea}
"btn_Levelentral"Symbol 607 MovieClip {Panel_Load_OW} Frame 1Symbol 573 Button
"btn_close"Symbol 610 MovieClip {Panel_Save} Frame 1Symbol 573 Button
"lvl_txt"Symbol 610 MovieClip {Panel_Save} Frame 1Symbol 604 MovieClip {fl.controls.TextArea}
"btn_SaveShareLC"Symbol 610 MovieClip {Panel_Save} Frame 1Symbol 573 Button
"btn_close"Symbol 612 MovieClip {Panel_Load} Frame 1Symbol 573 Button
"btn_load"Symbol 612 MovieClip {Panel_Load} Frame 1Symbol 573 Button
"lvl_txt"Symbol 612 MovieClip {Panel_Load} Frame 1Symbol 604 MovieClip {fl.controls.TextArea}
"btn_close"Symbol 616 MovieClip {panel_Question} Frame 1Symbol 573 Button
"btn_yes"Symbol 616 MovieClip {panel_Question} Frame 1Symbol 573 Button
"btn_no"Symbol 616 MovieClip {panel_Question} Frame 1Symbol 573 Button
"btn_PLAY"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 1Symbol 668 Button
"btn_CREATE"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 1Symbol 672 Button
"btn_LEARN"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 1Symbol 676 Button
"btn_SALUTE"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 1Symbol 680 Button
"ibtn_LoadLevel"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 1Symbol 683 Button
"btn_EXTRAS"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 1Symbol 687 Button
"mp_off"Symbol 693 MovieClip {MainKongregate_fla.MusicPlayer_12} Frame 1Symbol 573 Button
"mp_pause"Symbol 693 MovieClip {MainKongregate_fla.MusicPlayer_12} Frame 1Symbol 573 Button
"mp_next"Symbol 693 MovieClip {MainKongregate_fla.MusicPlayer_12} Frame 1Symbol 573 Button
"txt_song"Symbol 693 MovieClip {MainKongregate_fla.MusicPlayer_12} Frame 1Symbol 692 EditableText
"sky"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 1Symbol 653 MovieClip
"bgC"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 1Symbol 656 MovieClip
"sky"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 2Symbol 704 MovieClip
"bgC"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 2Symbol 707 MovieClip
"sky"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 3Symbol 710 MovieClip
"bgC"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 3Symbol 713 MovieClip
"sky"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 4Symbol 716 MovieClip
"bgC"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 4Symbol 719 MovieClip
"sky"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 5Symbol 722 MovieClip
"bgC"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 5Symbol 725 MovieClip
"sky"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 6Symbol 728 MovieClip
"bgC"Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18} Frame 6Symbol 731 MovieClip
"BG"Symbol 743 MovieClip {Vanilla.MGame} Frame 1Symbol 732 MovieClip {MainKongregate_fla.BGROUND_18}
"boundariesD"Symbol 743 MovieClip {Vanilla.MGame} Frame 1Symbol 734 MovieClip
"boundariesB"Symbol 743 MovieClip {Vanilla.MGame} Frame 1Symbol 734 MovieClip
"boundariesA"Symbol 743 MovieClip {Vanilla.MGame} Frame 1Symbol 734 MovieClip
"boundariesC"Symbol 743 MovieClip {Vanilla.MGame} Frame 1Symbol 734 MovieClip
"tutorial"Symbol 743 MovieClip {Vanilla.MGame} Frame 1Symbol 742 MovieClip
"btn_level1"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level2"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level3"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level4"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level5"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level6"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level7"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level8"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level9"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level10"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level11"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level12"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level13"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level14"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level15"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level16"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level17"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level18"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level19"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level20"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level21"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level22"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level23"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level24"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level25"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level26"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level27"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level28"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level29"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level30"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level31"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level32"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level33"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level34"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"btn_level35"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 778 Button
"submit_skillful"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 573 Button
"submit_tame"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 573 Button
"submit_mighty"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 573 Button
"submit_supreme"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 573 Button
"txt_time_1"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 780 EditableText
"txt_time_2"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 781 EditableText
"txt_time_3"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 782 EditableText
"txt_time_4"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 783 EditableText
"txt_time_5"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 784 EditableText
"txt_time_6"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 785 EditableText
"txt_time_7"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 786 EditableText
"ttime_tame"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 787 EditableText
"txt_time_8"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 788 EditableText
"txt_time_9"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 789 EditableText
"txt_time_10"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 790 EditableText
"txt_time_11"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 791 EditableText
"txt_time_12"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 792 EditableText
"txt_time_13"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 793 EditableText
"txt_time_14"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 794 EditableText
"txt_time_15"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 795 EditableText
"txt_time_16"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 796 EditableText
"txt_time_17"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 797 EditableText
"txt_time_18"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 798 EditableText
"txt_time_19"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 799 EditableText
"txt_time_20"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 800 EditableText
"txt_time_21"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 801 EditableText
"txt_time_22"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 802 EditableText
"txt_time_23"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 803 EditableText
"txt_time_24"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 804 EditableText
"txt_time_25"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 805 EditableText
"txt_time_29"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 806 EditableText
"txt_time_30"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 807 EditableText
"txt_time_31"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 808 EditableText
"txt_time_32"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 809 EditableText
"txt_time_33"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 810 EditableText
"txt_time_34"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 811 EditableText
"txt_time_26"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 812 EditableText
"txt_time_27"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 813 EditableText
"txt_time_28"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 814 EditableText
"ttime_skillful"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 815 EditableText
"ttime_mighty"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 816 EditableText
"ttime_supreme"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 817 EditableText
"curtain1"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 819 MovieClip
"curtain2"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 819 MovieClip
"curtain3"Symbol 820 MovieClip {MainKongregate_fla.Categories_77} Frame 1Symbol 819 MovieClip

Special Tags

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

Labels

"menu"Frame 4
"prepGame"Frame 5
"mainGame"Frame 6
"Editor"Frame 7
"OverWorld"Frame 8
"Instructions"Frame 9
"Credits"Frame 10
"Gdt_Essentials_Checkpoint"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 2
"Gdt_Essentials_Finish"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 3
"Gdt_Essentials_Start"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 4
"Gdt_Hazard_BLaser"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 5
"Gdt_Hazard_BlockMagma"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 6
"Gdt_Hazard_FastFollower"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 7
"Gdt_Hazard_HHitter"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 8
"Gdt_Hazard_VMagma"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 9
"Gdt_Hazard_LaserS"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 10
"Gdt_Hazard_SlowFollower"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 11
"Gdt_Hazard_VHitter"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 12
"Gdt_Hazard_HMagma"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 13
"Gdt_Loose_BBlock"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 14
"Gdt_Loose_BCircle"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 15
"Gdt_Loose_Block"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 16
"Gdt_Loose_Circle"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 17
"Gdt_Loose_Column"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 18
"Gdt_Loose_PlatformA"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 19
"Gdt_Loose_PlatformB"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 20
"Gdt_Loose_PlatformC"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 21
"Gdt_Mechanism_Elevator"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 22
"Gdt_Mechanism_ForceColumnV"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 23
"Gdt_Mechanism_HThruster"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 24
"Gdt_Mechanism_Motor"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 25
"Gdt_Mechanism_MotorCircleB"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 26
"Gdt_Mechanism_MotorCircleBInv"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 27
"Gdt_Mechanism_MotorCircleS"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 28
"Gdt_Mechanism_MotorCircleSInv"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 29
"Gdt_Mechanism_MotorInv"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 30
"Gdt_Mechanism_VThruster"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 31
"Gdt_Misc_Bouncer"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 32
"Gdt_Misc_DisappearingPlatform"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 33
"Gdt_Misc_GravitilessBouncer"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 34
"Gdt_Misc_GravityInverter"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 35
"Gdt_Misc_HangingPlank"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 36
"Gdt_Misc_HangingPlankBolt"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 37
"Gdt_Misc_Pendulum"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 38
"Gdt_Misc_ComposedSpring"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 39
"Gdt_Misc_ComposedBridge"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 40
"Gdt_Static_BCircle"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 41
"Gdt_Static_Block"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 42
"Gdt_Static_Bridge"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 43
"Gdt_Static_Circle"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 44
"Gdt_Static_Column"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 45
"Gdt_Static_Diagonal45"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 46
"Gdt_Static_DiagonalA"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 47
"Gdt_Static_DiagonalB"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 48
"Gdt_Static_InvDiagonal45"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 49
"Gdt_Static_InvDiagonalA"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 50
"Gdt_Static_InvDiagonalB"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 51
"Gdt_Static_Platform"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 52
"Gdt_Static_SmallBlock"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 53
"Gdt_Static_VBCircle"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 54
"ERASE"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 55
"Gdt_Static_Cavity"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 56
"Gdt_Misc_GravityDown"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 57
"Gdt_Misc_GravityUp"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 58
"Gdt_Misc_GravityLeft"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 59
"Gdt_Misc_GravityRight"Symbol 249 MovieClip {MainKongregate_fla.handle_175} Frame 60
"Static"Symbol 518 MovieClip {Gadgetlist} Frame 2
"Hazard"Symbol 518 MovieClip {Gadgetlist} Frame 3
"Loose"Symbol 518 MovieClip {Gadgetlist} Frame 4
"Mechanisms"Symbol 518 MovieClip {Gadgetlist} Frame 5
"Misc"Symbol 518 MovieClip {Gadgetlist} Frame 6
"Essentials"Symbol 518 MovieClip {Gadgetlist} Frame 7
"btn_PLAY"Symbol 688 MovieClip {MainKongregate_fla.title_anim_5} Frame 230




http://swfchan.com/14/65222/info.shtml
Created: 12/4 -2019 16:51:58 Last modified: 12/4 -2019 16:51:58 Server time: 01/11 -2024 00:00:48